Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8561

Move control point for Brep (including Curves3d)

$
0
0

@jerry1 wrote:

Hi every one, I am a new developer of Rhino-Plugin programing, and now I have a question,
I need to move my control points of Brep, so I use the GetGrips function to move them....
but the result is very strange, it just only move control points of base surface. How to completely move all control points including curves3D

Function Move_brep_control_point(ByRef robj As Rhino.DocObjects.ObjRef, ByVal dx As Double, ByVal dy As Double, ByVal dz As Double)
        Dim i, j, k, cur_num, pt_num As Integer
        Dim testTransform As Rhino.Geometry.Transform
        Dim ro() As Rhino.DocObjects.GripObject
        
        '
        Dim kk As Rhino.Geometry.Brep
        kk = robj.Brep

        '
        robj.Object().GripsOn = True
        ro = robj.Object.GetGrips

        'base surface-control point
        For j = 0 To ro.Length - 1
            testTransform = Rhino.Geometry.Transform.Translation(dx, dy, dz)
            ro(j).Move(testTransform)
        Next j

        '3d curve
        cur_num = robj.Brep.Curves3D.Count
        For j = 0 To cur_num - 1
            pt_num = robj.Brep.Curves3D.Item(j).GetLength()
            For k = 0 To pt_num - 1
                'robj.Brep.Curves3D.Item(j).PointAtLength()
            Next k
        Next j
    End Function

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 8561

Trending Articles