icon

[Domanda] irregular Frontal Niche Error

Tags:
  • Allplan
  • 2025
  • PythonParts
  • Niche
  • Wall
  • Opening

I'm trying to create a frontal niche with an irregular shape in a wall using a PythonPart.

I found two different ways to create niches: Niche and Polygonal Niche.

The first one (Niche) allows me to select different symbols from the library. In the properties, it is possible to modify the shapePolygon, but this only accepts the path to an existing symbol, which is then used to generate the irregular shape. It does not use the polygon shape that I assign directly.

On the other hand, the Polygonal Niche allows me to define any shape because the constructor accepts a Polygon2D. However, this polygon defines the shape of the niche from the top of the wall, not from the front face of the wall.

So my question is:

Is there a way to create a frontal niche with an irregular shape in a PythonPart without assigning an existing symbol from the library?

Allegati (3)

Type: image/png
4 scaricato
Size: 13,20 KiB
Type: image/png
4 scaricato
Size: 64,87 KiB
Type: image/png
4 scaricato
Size: 11,07 KiB

Show most helpful answer Hide most helpful answer

Hi,

have a look at this example. Short answer: yes it is possible, but with limitataions. And it is a complex task, which is why we created the GeneralOpeningSlopedPolyhedronUtil and GeneralOpeningSlopedBRepUtil.

The limitations:
a wall opening with a complex shape is always created as a vertically extruded solid, limited with two surfaces: one from the bottom and one from the top. Even when you use a shape saved in the library, ALLPLAN will try to create the opening using the same logic. If it is not possible (e.g. because of how the shape looks like), ALLPLAN will crash.

The way, how the above mentioned utils work under the hood is the same:

  • they take the solid
  • establish the intersection solid with a wall
  • establish the limiting surfaces from the bottom and the top
  • create an opening with these two surfaces as bottom and top surface

Try them out and let us know, if it solved your problem

Cheers,
Bart

Quotato da: DavidCano
I'm trying to create a frontal niche with an irregular shape in a wall using a PythonPart.
I found two different ways to create niches: Niche and Polygonal Niche.
The first one (Niche) allows me to select different symbols from the library. In the properties, it is possible to modify the shapePolygon, but this only accepts the path to an existing symbol, which is then used to generate the irregular shape. It does not use the polygon shape that I assign directly.
On the other hand, the Polygonal Niche allows me to define any shape because the constructor accepts a Polygon2D. However, this polygon defines the shape of the niche from the top of the wall, not from the front face of the wall.
So my question is:
Is there a way to create a frontal niche with an irregular shape in a PythonPart without assigning an existing symbol from the library?

As shown below, when trying to apply a different shape from the front view of the wall, it seems impossible to modify the ShapePolygon directly through code. The only available option appears to be selecting another symbol from the library.

Any suggestions or recommended approaches would be greatly appreciated.

Thank you.

Allegati (2)

Type: image/png
8 scaricato
Size: 37,85 KiB
Type: image/png
7 scaricato
Size: 41,03 KiB

Hi,

have a look at this example. Short answer: yes it is possible, but with limitataions. And it is a complex task, which is why we created the GeneralOpeningSlopedPolyhedronUtil and GeneralOpeningSlopedBRepUtil.

The limitations:
a wall opening with a complex shape is always created as a vertically extruded solid, limited with two surfaces: one from the bottom and one from the top. Even when you use a shape saved in the library, ALLPLAN will try to create the opening using the same logic. If it is not possible (e.g. because of how the shape looks like), ALLPLAN will crash.

The way, how the above mentioned utils work under the hood is the same:

  • they take the solid
  • establish the intersection solid with a wall
  • establish the limiting surfaces from the bottom and the top
  • create an opening with these two surfaces as bottom and top surface

Try them out and let us know, if it solved your problem

Cheers,
Bart

Hi,

I have been testing the function and the provided example, and I noticed some issues.

There are irregular objects that create the niche correctly, like the one shown in image 1. However, other simpler objects, such as the “L” shape in image 2, generate niches that do not seem to make sense. Because of this, it looks like the function may be causing some problems.

We are not sure whether this is a bug or if the functionality is simply not working as designed. I would like to know if there is a possible solution for these cases, or if there is a recommended way to model the 3D objects to ensure that the niche is created correctly.

Thank you.

Cheers,
David

Allegati (2)

Type: image/png
4 scaricato
Size: 48,17 KiB
Type: image/png
6 scaricato
Size: 34,02 KiB

Hi,

There are some limitations, rather than recommendations. In the attachment I tried to visually show, what I mean by the bottom and top limiting surfaces of an opening (grey).

As I said earlier, a wall opening in ALLPLAN is considered as a "vertical element", which means it can only be created as a vertically extruded shape (which lies in the XY plane). In both of your cases, the shape is a rectangle with thickness equal to the thickness of the wall. This shape is then limited by a surface from the bottom (bottom surface) and the top (top surface). These surfaces must fulfill the requirement: any Z+ ray must cross the bottom surface only once/each Z- ray must cross the top surface only once.

The opening can have only one "right side" and only one "left side" - the vertical sides. They can be 0 in length.

On the left side, the shape is valid. On the right, the shape is not valid, because there are some Z+ rays, that would have to cross the bottom surface twice.

Your L-shape is basically the edge case between the two I present. Apparently, with a PythonPart it doesn't work either (maybe as a library symbol it would work).

I hope, it's more clear now.

Cheers,
Bart

Allegati (1)

Type: image/png
4 scaricato
Size: 34,26 KiB