Support Forum

[Frage] Creating a top view

Schlagworte:
  • Allplan
  • 2022-1-0
  • Visual
  • Scripting
  • View
  • Views

Hello,

I would like to create a top view from an existing model. There are no example visual scripts that show me how to create top views from a model. I have seen a node called ''SectionBodyOrthogonal'', but I couldn't manage to set it up correctly. Is there anyone who can show me how to script this properly so I can make a top view based on a rectange or polygon for example?

Kind regards.

Anhänge (1)

Typ: image/png
87-mal heruntergeladen
Größe: 15,31 KiB

The node SectionBodyOrthogonal seems to have some issues. We will work on that.

You can still try the node SectionBoday and set the (0,0,-1) as the view direction, a vector pointing downwards. After that, you need the node SectionsToDrawingFiles to write the result to a drawing file. After starting the script, click on the "Run" button to generate the section and the "Save" button to write the result to the specified drawing file.

Currently, the options for generating sections are limited in VS. If it doesn't work as expected, please provide more information about what you want to achieve. We can check what and how to improve our node library.

Product Owner API, Allplan GmbH

Anhänge (1)

Typ: image/png
149-mal heruntergeladen
Größe: 37,33 KiB

Zitiert von: Xinling
The node SectionBodyOrthogonal seems to have some issues. We will work on that.
You can still try the node SectionBoday and set the (0,0,-1) as the view direction, a vector pointing downwards. After that, you need the node SectionsToDrawingFiles to write the result to a drawing file. After starting the script, click on the "Run" button to generate the section and the "Save" button to write the result to the specified drawing file.
Currently, the options for generating sections are limited in VS. If it doesn't work as expected, please provide more information about what you want to achieve. We can check what and how to improve our node library.

Thanks for the reply.

I've experimented with the SectionsToDrawingFiles a bit but it's unclear for me where VS wants to place the section, for me it seems that VS places it right over the position of the Polygon3DInput when I use a top view (0,0,-1) but without any model content.

When I try to make a sideview or frontview, with (0,100,0) as the view direction for example, the section seems to be placed under the model/Polygon3DInput but also without any model content.

Anhänge (2)

Typ: image/png
69-mal heruntergeladen
Größe: 5,30 KiB
Typ: image/png
71-mal heruntergeladen
Größe: 5,34 KiB

The node SectionsToDrawingFiles is also a little bit tricky. If you use that to generate a section, a horizontal section will be generated in-place, a vertical section will be generated parallel to the section line with some offset (please check attached gif). But make sure before you start the script, the target drawing file can't be loaded (passive, editable or active). After the section is generated in a drawing file, the target drawing file will be active.

But if you want to generate vertical sections with closed polygons, you can check the example ViewsOfWallsByRectangle.pyp and ViewsOfWallsByPolygons.pyp under Examples → SectionAndViews. It allows you to place the sections where you want.

Product Owner API, Allplan GmbH

Anhänge (1)

Typ: image/gif
203-mal heruntergeladen
Größe: 435,12 KiB

Zitiert von: Xinling
The node SectionsToDrawingFiles is also a little bit tricky. If you use that to generate a section, a horizontal section will be generated in-place, a vertical section will be generated parallel to the section line with some offset (please check attached gif). But make sure before you start the script, the target drawing file can't be loaded (passive, editable or active). After the section is generated in a drawing file, the target drawing file will be active.
But if you want to generate vertical sections with closed polygons, you can check the example ViewsOfWallsByRectangle.pyp and ViewsOfWallsByPolygons.pyp under Examples → SectionAndViews. It allows you to place the sections where you want.

Even though I'm making sure the target drawing file is not loaded in any way, the section still does not generate any model contents.

Whenever I use the node SectionPositionInput (without SectionsToDrawingFiles), which was used in the mentioned examples scripts, the section seems to generate model contents just fine.

I currently have a script that allows me to place 2 Line3D's so I can place two section lines. The view direction is perpendicular on the Line3D because I use the SectionPolygonsByCutlineAndDepth and set the Depth to a fixed distance. After this I use the SectionPositionInput which allows me to place the sections wherever I want.

Is there a way to use the SectionBody node and the SectionPositionInput scripts together? I'm asking this because I want to assign variable section reference names/numbers that are connected to the Polygon3DInput. Or is there another way to assign the reference names to the sections in the script I've given in the attachments?

Anhänge (1)

Typ: image/png
113-mal heruntergeladen
Größe: 66,83 KiB

As those nodes regarding section function are currently not very flexible, it seems to be impossible to use them together. Maybe we could add the section number to other nodes...

Product Owner API, Allplan GmbH