Scriptin towards outerspace

Double curvature surfaces, faceted:

Some easy scriptin did that:

Option Explicit


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)
Call Rhino.EnableRedraw(True)

End Sub


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s