Applying the Extrude Surface method of the Rhinoscriptsyntax module reverts surprisingly the corrupted result whereas the curve excursion method of the Rhino common works totally fine. Maybe someone knows what is the cause here?
import rhinoscriptsyntax as rs
Sr2 = rs.AddPlanarSrf(Cr)
NorPar = rs.SurfaceParameter(Sr2,(0.5, 0.5))
NormVect = rs.SurfaceNormal(Sr2,NorPar)
NormVect = NormVect*20
DirLine = rs.AddLine((0,0,0), NormVect)
Wrong = rs.ExtrudeSurface(Sr2,DirLine,False)
import Rhino as R
Cr = rs.coercecurve(Cr)
Fine = R.Geometry.Extrusion.Create(Cr,10,True)
Extrusion.gh (4.7 KB)
It works fine if you explode and re-join your source curve (no other changes to your code). I can’t explain it, but it works.
Extrusion_re.gh (8.0 KB)
@kev.r Thank you, Kevin! Definitely works but likewise I can’t catch the essence of the problem
This problem isn’t isolated to grasshopper or GhPython. If you:
- Bake your curve to Rhino
- Select the curve and run the _PlanarSrf command to get a surface.
- Select the surface and run the _ExtrudeSrf command to get a polysurface.
The result is the same distorted polysurface:
You can fix it by selecting the polysurface and running _DivideAlongCreases with the Split At Tangents option set.
This can all be replicated in GhPython:
Extrusion_re2.gh (8.1 KB)