algorithmic modeling for Rhino
Hi All,
I'm developing a custom component and would like to extract the edges of a trimmed surface, but can't seem to figure it out. I've used the duplicateedgecuves under Brep but that give the full untrimmed surface edges.
Any help is greatly appreciated.
Thanks.
[C]
Tags:
Hi Charles,
Try to shrink the surface. It should give you a trimmed surface. Then try to duplicate the edges.
tryShrink = srf.Faces.ShrinkFaces()
if tryShrink: edges = srf.DuplicateEdgeCurves()
In some cases shrink surface fails. In that cases I mesh the surface and find mesh NakedEdges instead:
import Rhino as rc
meshPar = rc.Geometry.MeshingParameters.Default
meshedFace = rc.Geometry.Mesh.CreateFromBrep(srf, meshPar)[0]
edges = meshedFace.GetNakedEdges()
Hope it helps,
Mostapha
Thanks Mostapha, brilliant solution. Works well for flat shapes, but not so much for shapes with curved edges.
For example if you were to take a segment of a torus, where the three edges are curved, each edge gets broken down into multiple curve segments, therefore returning multiple points. I've used the method Curve.simpify to remove colinear and cocircular segments once I've extracted the naked edges from the mesh.
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
© 2024 Created by Scott Davidson. Powered by