Message 1 of 1
Mdt VBA Surface editing

Not applicable
03-04-2003
08:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have created a trimmed surface with the following code. Do anyone know how to edit or modify the existing nurbsurface with mdt vba??
' Create a 3rd order nurb surface (6x6 control frame)
Dim knots As GeKnotVector
Set knots = ge.KnotVector
knots.AddKnot 0
knots.AddKnot 0
knots.AddKnot 0
knots.AddKnot 6
knots.AddKnot 6
knots.AddKnot 6
Dim cntrlPoints As gePoints
Set cntrlPoints = ge.Collection(gePoints)
Dim wghts(1 To 9) As Double
cntrlPoints.Add ge.Point(0, 0, 0): wghts(1) = 1
cntrlPoints.Add ge.Point(1, 0, 0): wghts(2) = 1
cntrlPoints.Add ge.Point(2, 0, 0): wghts(3) = 1
cntrlPoints.Add ge.Point(0, 1, 0): wghts(4) = 1
cntrlPoints.Add ge.Point(1, 1, 3): wghts(5) = 1
cntrlPoints.Add ge.Point(2, 1, 0): wghts(6) = 1
cntrlPoints.Add ge.Point(0, 2, 0): wghts(7) = 1
cntrlPoints.Add ge.Point(1, 2, 0): wghts(8) = 1
cntrlPoints.Add ge.Point(2, 2, 0): wghts(9) = 1
Dim surf As GeNurbSurface
Set surf = ge.NurbSurface
surf.SetDefinitionData 2, 2, geOpen Or geNoPoles, geOpen Or geNoPoles, _
3, 3, cntrlPoints, wghts, knots, knots
Do anyone know how to edit or modify the existing nurbsurface with mdt vba??
' Create a 3rd order nurb surface (6x6 control frame)
Dim knots As GeKnotVector
Set knots = ge.KnotVector
knots.AddKnot 0
knots.AddKnot 0
knots.AddKnot 0
knots.AddKnot 6
knots.AddKnot 6
knots.AddKnot 6
Dim cntrlPoints As gePoints
Set cntrlPoints = ge.Collection(gePoints)
Dim wghts(1 To 9) As Double
cntrlPoints.Add ge.Point(0, 0, 0): wghts(1) = 1
cntrlPoints.Add ge.Point(1, 0, 0): wghts(2) = 1
cntrlPoints.Add ge.Point(2, 0, 0): wghts(3) = 1
cntrlPoints.Add ge.Point(0, 1, 0): wghts(4) = 1
cntrlPoints.Add ge.Point(1, 1, 3): wghts(5) = 1
cntrlPoints.Add ge.Point(2, 1, 0): wghts(6) = 1
cntrlPoints.Add ge.Point(0, 2, 0): wghts(7) = 1
cntrlPoints.Add ge.Point(1, 2, 0): wghts(8) = 1
cntrlPoints.Add ge.Point(2, 2, 0): wghts(9) = 1
Dim surf As GeNurbSurface
Set surf = ge.NurbSurface
surf.SetDefinitionData 2, 2, geOpen Or geNoPoles, geOpen Or geNoPoles, _
3, 3, cntrlPoints, wghts, knots, knots
Do anyone know how to edit or modify the existing nurbsurface with mdt vba??