algorithmic modeling for Rhino
I have a list of curves that I offset in both directions since the offset command doesn't control exactly what direction each curve is offset to. What I would like to do is cull the longer curves so that I am left with just the interior offset curves.
I have attached my script but for some reason the cull pattern isn't deleting the longer curves even after I have set the boolean to true. Am I missing something?
Tags:
For your logic, you'd need to pick'n'choose the correct line from two inputs... but here's another approach.
Problem is, the shorter line can end up on the outside for sections that are concave. So the whole idea doen't work...
Yes, that script works but like you said I'll have to pick'n'choose each curve because the concave curves don't fit the system.
Is there another logic you think would work better? The only reason why i'm working with this system is because it's the only one I know.
There's a mesh volume component, that returns the centroid. Don't know if this will work with open meshes. You can use the distance to the CurveCP (closest point on curve) to decide whether the curve is "inside". Still there may be strange cases where the outside curve could be closer to the centroid... If mesh volume doesn't work, just explode the mesh and average all vertices.
Another way could be to find the MeshCP and compare the vector from MeshCP to the chosen point on the curve (could be end or mid or whatever) with the face normal vector. Close to 0° angles (smaller 90°) should indicate "outside", close to 180° (larger 90°) are "inside". That's given your mesh is clean and all face normals point outside as they should...
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