Scriptin towards outerspace
Double curvature surfaces, faceted:
Some easy scriptin did that:
Option Explicit
SurfaceFaceting()
Sub SurfaceFaceting()
Dim strSurf : strSurf = Rhino.GetObject("Select surface to facet", 8, True, True)
If IsNull(strSurf) Then Exit Sub
Dim intDetailLevel : intDetailLevel = Rhino.GetInteger("Detail level", 40, 2)
If IsNull(intDetailLevel) Then Exit Sub
Dim dbl
Dim uDomain : uDomain = Rhino.SurfaceDomain(strSurf, 0)
Dim uStep : uStep = (uDomain(1) - uDomain(0))/intDetailLevel
Dim vDomain : vDomain = Rhino.SurfaceDomain(strSurf, 1)
Dim vStep : vStep = (vDomain(1) - vDomain(0))/intDetailLevel
Dim u, v, strFrame, pt
Call Rhino.EnableRedraw(False)
For u = uDomain(0) To uDomain(1) Step uStep
For v = vDomain(0) To vDomain(1) Step vStep
pt = Rhino.EvaluateSurface(strSurf, Array(u,v))
strFrame = Rhino.SurfaceFrame(strSurf, Array(u,v))
Call Rhino.AddPlaneSurface(strFrame, 1, 1)
Next
Next
Call Rhino.EnableRedraw(True)
End Sub
No comments:
Post a Comment