algorithmic modeling for Rhino
Hi all,
I am trying to evaluate a surface in order to check if it has any trims inside (inner loops) and if so to extract the vertices of this/these inner loop(s). So far no matter how I create a surface in Rhino the component only recognizes the outer 4 trims of the surface and nothing more so I cannot go into the if statement that is following. what do I miss? Any ideas??
Thanks!
Tags:
Hi,
Your input need to be a "Brep".
If you input a surface, then you are only get the underlying surface (not trimmed) of your brep.
Hi Rajaa! Thank you for your reply! Even with a Brep it does not work and when I create a surface from two planar curves again I get only one outer loop with four trims. It doesn't recognize the inner loop no matter what I tried. I even created a component that "shrinks" the trimmed surfaces and actually gets rid of the "Trimmed" information that a surface has and still nothing. Can you tell me if the approach in the code is right or if I miss something that I can't figure out? sorry but they are all a bit new for me and I may miss something minor that I don't understand..
This code seems to work fine in my computer to detect the inner loops, see if it works in yours:
List<Curve> crv = new List<Curve>();
foreach(BrepLoop loop in x.Loops)
{
if (loop.LoopType == BrepLoopType.Inner)
crv.Add(loop.To3dCurve());
}
A = crv;
(the x input should be a brep)
Vincente thanks! It works great, obviously I did not need edges but curves to work with!
thanks for the help!
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by