Grasshopper

algorithmic modeling for Rhino

Is it possible to select object edge into a block or a sub block

I write a little script with MRhinoGetObject function.

But it doesn't work with polysurface edge which are inclued in a block?

Dim go As New MRhinoGetObject()

      go.SetCommandPrompt("Sélectionnez les deux arrêtes sur les pièces à serrer pour placer la Boulonnerie...")

      go.SetGeometryFilter(IRhinoGetObject.GEOMETRY_TYPE_FILTER.edge_object)

      go.AcceptNothing()

      go.GetObjects(2, 2)

      If (go.CommandResult() <> IRhinoCommand.result.success) Then

        C1 = go.CommandResult()

      End If

 

      Dim object_ref1 As MRhinoObjRef = go.Object(0)

      Dim obj1 As IRhinoObject = object_ref1.Object()

      Dim curve1 As OnCurve = object_ref1.Curve()

 

      Dim object_ref2 As MRhinoObjRef = go.Object(1)

      Dim obj2 As IRhinoObject = object_ref2.Object()

      Dim curve2 As OnCurve = object_ref2.Curve()

 

 

      C1 = curve1.NurbsCurve

      C2 = curve2.NurbsCurve

Views: 180

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service