Hi guys, I’m using polygons from a shp file, with the boundary surface component. While most of the polygons are ok, there are some which are pretty problematic and gave weird surfaces (in the image below, I have extracted a particular polygon from the tree which is giving a strange shape)
and some which do not form surfaces at all (see arrows). Most of the polygons (the rest) seem fine though, with appropriate surfaces forming.
By any chance anyone knows what’s happening? Would really appreciate help here as this is a crucial step of my workflow. A holistic approach will be good as well, since i have over 15,000 polygons and it will be tough to go through them manually.
Could it be that the polylines, for which the
Boundary Surface fails, are not planar and/or not closed?
Open polylines could be closed and non-planar ones for instance projected to a plane, before attempting to make surfaces.
yea you have a point there. unfortunately i have checked for these already.
Can you attach here just the geometries? .3dm or .gh with internalized geometries…
It could be tolerance issues and or object far from the origin
TestFiles.zip (6.0 MB)
Thanks everyone. Have attached the rhino file (blank with units set, Rhino 5) and GH, with internalized data. Have also attached the ShapeFiles (just put it in the File Path component to replicate the issue). As you can see in the picture below, some of the polygons don’t become surfaces. Also, the units are way off (several orders of magnitude off) the original in the shape file. Thank you
As said, it seems to be a tolerance issue ! Don’t forget to recompute solution after tolerance change
And errors here !!!
Did you work in unit bigger than kilometers ? !!! Radians ?
Hey thanks. yea I think it’s half the solution but it doesn’t solve the problem. i actually changed the tolerance a couple of times already, and still get polygons which don’t convert to surfaces.
Have you a orange component or not. For me no orange !!
It seems that I have no problem here,
TestFile_v1_re.gh (2.9 MB)
This also works without changing tolerance but by actually increasing geometries size and location…
that’s interesting. what settings are you using? thank you
thank you. your solution is pretty neat. Could you explain a little on your workflow? I’m pretty new to this so this will help me a lot in my learning.
It is on th screen capture
Absolute tolerance 0.00001 unit
yup that’s what I thought and tried. But it’s still wonky. why would reducing to tolerance to 0.00001 solve it? I would have thought looser tolerance will make it easier to form surfaces from the edges? Could you kindly explain to me please? I would like to understand. Also, by doing that, i realise the resultant number of surfaces are inconsistent. For example, in the original ShapeFile, there were 13,713 polygons, which is the final number of surfaces i would like to have of course. by changing the tolerance to 0.00001, importing the ShapeFile using the generic Import SHP component gave 13,037 after boundary surfaces, and the @IT component gave 13,175.
For the tolerance read the documentation, there is a wiki page somewhere.
For the number the only thing I know is that if you have one polygon inside another polygon It could give you 1 or 2 surfaces. One is the nominal result.
It flatten your curve tree into a list and then make the bounding box of all of them as a whole.
Then, as the box is flat, i took the area of it to have a rough center of all your curves.
Then with that center i moved the curves into worldXYZ origin and scaled them by 1000 factor…
@maje90 understood, thank you.
@laurent_delrieu yeah i saw that. I think what I could not get is reducing the tolerance supposedly make it more “strict”, so that less surfaces will be form, while a looser tolerance will make it easier to form curves. However, in your case, a much lower tolerance gave no invalid surfaces, while in my case both lower and higher tolerances has surfaces that are not formed properly, just different surfaces.