Hi, I want get a brep’s gumball,but I can’t find it in sdk
Public Function SetFromArc(ByVal arc As Arc) As Boolean
Public Function SetFromBoundingBox(ByVal boundingBox As BoundingBox) As Boolean
Public Function SetFromBoundingBox(ByVal frame As Plane, ByVal frameBoundingBox As BoundingBox) As Boolean
Public Function SetFromCircle(ByVal circle As Circle) As Boolean
Public Function SetFromCurve(ByVal curve As Curve) As Boolean
Public Function SetFromEllipse(ByVal ellipse As Ellipse) As Boolean
Public Function SetFromExtrusion(ByVal extrusion As Extrusion) As Boolean
Public Function SetFromHatch(ByVal hatch As Hatch) As Boolean
Public Function SetFromLight(ByVal light As Light) As Boolean
Public Function SetFromLine(ByVal line As Line) As Boolean
Public Function SetFromPlane(ByVal plane As Plane) As Boolean
Hi Dale,Thank you first.
Can you say more detail ? or Post some net code.
I don’t understand “Determine a plane on one of the faces of the Brep”, if the face is not a planar surface How can I get a plane from it?
And you see "Public Function SetFromPlane(ByVal plane As Plane) As Boolean"
SetFromPlane just need One Plane,but a brep may be many faces–
Gumball is a transformation widget. And the basis for many transformation is a base plane (e.g. starting location). So the Gumball wants to be oriented to some plane.
A Brep does not necessarily have an obvious plane on which to orient on. So, it might not be easy to come up with a single “SetFromBrep” function that always set it to where you want.
But if you need some example, then perhaps you can use this as a starting place.
Public Shared Function SetFromBrepFace(ByRef gbl As GumballObject, ByVal face As BrepFace) As Boolean
Dim result As Boolean = False
If (gb IsNot Nothing AndAlso face IsNot Nothing) Then
Dim u As Double = face.Domain(0).Mid
Dim v As Double = face.Domain(1).Mid
Dim frame As New Plane()
result = face.FrameAt(u, v, frame)
If (result = True) Then
result = gbl.SetFromPlane(frame)
Just get the Frameat(u.mid,v.mid)? I don’t belive the gumball will use in rhino is so easy–
Not say the gumball, I want to know, Is there a OCS coodinate system in a geometrybase?
I need it,when the geometrybase being trimed or split,the OCS plane do not change. @dale are you there? I really hate the time difference-- It’s midnight now here