I’ve been writing a dynamo script that converts buildings from the CityGML-format to 3d-solids.
The walls of my buildings are defined by points that create a surface. I extract the points that form a surface and try to create a surface using “Surface.ByPerimeterPoints”. The script processes thousands of surfaces and almost all work without any issue but for some, seemingly random, surfaces, Dynamo throws an error.
To reproduce the issue, I’ve extracted a “faulty” surface that is created by six points:
I recommend leaving the geometry scaling as you risk losing accuracy of shapes. Instead pull the points closer to the origin and see if that clears the issue when making the geometry.
Instead try this:
Starting with the list of lists of points
Take the first point out of each sublist using a List.FirstItem node
Create a coordinate system using the first points
Transform each sublist of points from the associated coordinate system to the origin coordinate system (CoordinateSystem.Identity() node).
Build the surface from the transformed points
Might as well do any other geometry manipulation at this point as well, if you’re thickening the surface to get solids, or otherwise creating content.
Shift the completed geometries back to the original location by using a Geometry.Transform node the associated coordinate systems.
As you’ve got lists of lists of objects lacing and list levels will matter - @L2 list level will likely be your best friend for most of the graph.
This is the way!
I originally ruled it out because 95% of ~350000 surfaces built without a problem but moving it closer to 0 resolved the issue.
In my approach I just moved the whole list closer to zero and found that it worked once Y-values reached <~150000 but your workflow with moving each individual surface is much neater.
Thanks for all the replys.
Edit: The forum bugs out when I try to accept the solution - I might have to try it again later.