BoundarySrf, Working with Trees and Branches

unhandled

(Nils) #1

Hello,
again i am struggling with some script and was wondering if you could help lead me into the right direction.

I created several curves around objects and want to create planar surfaces from those curves and then choose the surface with the smallest area for each object. This task leads me to two question.

  1. If i use the “BoundarySrf”-component on the curves i dont get the same number of surfaces as curves. (For some curves the surface between those curves and not between “itself” is created). However if i flatten the curves, before the creating of the surfaces, it works fine.

  2. As a result of the flattening, the seperation into several branches is gone and i only get the absolut smallest surface (and not the smallest surface for each object). To resolve that issue i would need to seperate the created surfaces into the same trees that my curves were using.

I hope i could describe my problem properly. Any advice is appreciated.
Regards,
Nils
Körper-Frage.gh (35.0 KB)


(Riccardo Majewski) #2

You can calculate directly area of a curve.
Otherwise, graft input of boundary (as you did) and then pass the output to a “Trim tree” component.


(Nils) #3

That was alot easier than expected, thanks alot! Any idea why the BoundarySrf is failing?


(Riccardo Majewski) #4

What do you mean?
It isn’t failing for me, no warning or error messages…


(Nils) #5

Neither do I, but if you look at the unflattened BoundarySrf there are 130 curves as input but only 119 surfaces as output. For some curves the BoundarySrf creates surfaces between two curves instead(marked with a yellow X) of between the curves itself. I was wondering why it works that way for some curves.


(Riccardo Majewski) #6

If you think about it, it IS supposed to work that way.
On rhino, if you select 2 closed curves (one inside the other) and do Boundary surface command, it will create 1 surface with a hole…
To avoid this you have to input to the Boundary component in gh lists (or, more correctly, “branches”) with just 1 curve inside… by grafting, as you did.