You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 23, 2020. It is now read-only.
Hi,
I need to select and highlight a set o mesh vertices (TopologyVertices).
I use the following code for select the first 5 vertex, but selection appears for a moment and disappears.
pyhon
import Rhino
import scriptcontext
if( name == "main" ):
go=Rhino.Input.Custom.GetObject()
go.GeometryFilter=Rhino.DocObjects.ObjectType.MeshVertex
go.SetCommandPrompt("Get mesh vertex")
go.Get()
objref = go.Object(0)
go.Dispose()
MeshObj = objref.Object()
vertex=objref.GeometryComponentIndex.Index
mesh=objref.Mesh()
meTV=mesh.TopologyVertices
round=meTV.ConnectedTopologyVertices(vertex)
IT=Rhino.Geometry.ComponentIndexType.MeshTopologyVertex
for i in round:
CompInd=Rhino.Geometry.ComponentIndex(IT,i)
MeshObj.SelectSubObject(CompInd,True,True)
scriptcontext.doc.Views.Redraw()
I misunderstood something?
The text was updated successfully, but these errors were encountered:
Hi,
I need to select and highlight a set o mesh vertices (TopologyVertices).
I use the following code for select the first 5 vertex, but selection appears for a moment and disappears.
pyhon
import Rhino
import scriptcontext
if( name == "main" ):
go=Rhino.Input.Custom.GetObject()
go.GeometryFilter=Rhino.DocObjects.ObjectType.MeshVertex
go.SetCommandPrompt("Get mesh vertex")
go.Get()
objref = go.Object(0)
go.Dispose()
MeshObj = objref.Object()
vertex=objref.GeometryComponentIndex.Index
mesh=objref.Mesh()
meTV=mesh.TopologyVertices
round=meTV.ConnectedTopologyVertices(vertex)
IT=Rhino.Geometry.ComponentIndexType.MeshTopologyVertex
for i in round:
CompInd=Rhino.Geometry.ComponentIndex(IT,i)
MeshObj.SelectSubObject(CompInd,True,True)
scriptcontext.doc.Views.Redraw()
The text was updated successfully, but these errors were encountered: