icon

Support Forum

  • Das angeforderte Thema existiert nicht.

  • The requested topic does not exist.

[Frage] irregular Frontal Niche Error

Schlagworte:
  • 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?

Anhänge (3)

Typ: image/png
4-mal heruntergeladen
Größe: 13,20 KiB
Typ: image/png
4-mal heruntergeladen
Größe: 64,87 KiB
Typ: image/png
4-mal heruntergeladen
Größe: 11,07 KiB

Zitiert von: 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.

Anhänge (2)

Typ: image/png
6-mal heruntergeladen
Größe: 37,85 KiB
Typ: image/png
5-mal heruntergeladen
Größe: 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