Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

Brep.CreateFromRevSurface returns a Surface

$
0
0

Why does the Brep.CreateFromRevSurface method returns a Surface object from python component?

import rhinoscriptsyntax as rs
import Rhino.Geometry as rg
import math

HT = 8
ext_param = cir.ExtremeParameters(rg.Vector3d(0,0,1)) 
ext_pt = [cir.PointAt(i) for i in ext_param]
pt1 = ext_pt[0]
pt0 = rg.Point3d(0,0,pt1.Z)
pt2 = ext_pt[1]
pt3 = rg.Point3d(pt2.X, pt2.Y, pt1.Z-HT)
pt4 = rg.Point3d(0, 0, pt3.Z)
points = [pt0, pt1, pt2, pt3, pt4]
plc = rg.PolylineCurve(points)

axis = rg.Line(0,0,0, 0,0,1)
stk = rg.RevSurface.Create(plc, axis, 0.0, math.pi*2)
print stk.HasBrepForm
#stock = rg.Brep.TryConvertBrep(stk)
#mbrep = rg.Brep.CreateFromSurface(stk)
mbrep = rg.Brep.CreateFromRevSurface(stk,True,True)
print mbrep

Screenshot 2024-03-28 at 3.41.18 PM
RevSrf.gh (6.5 KB)

Eventually I’d like to get a brep (polysurface) to be able to complete solid different operation from that brep

7 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles