Help with rhinoScript to Python for Mac?

I have the following rhinoscript to turn on all points for a selected object regardless of it’s type.

I’m not up to speed with Python yet and was wondering if someone would be gracious enough to help me out. Basically it turns points regardless of geometry type.

Thanks in advance.

Option Explicit

Call AllPointsOn()
Sub AllPointsOn()
	Dim arrObjects, Object
	arrObjects = Rhino.GetObjects("Select objects for edit point display.", 1073742364, True, True, False)
	If isNull(arrObjects) Then
		Exit Sub
	End If
	Rhino.EnableRedraw False
	For Each Object In arrObjects
		Rhino.SelectObject Object
		If Rhino.IsBrep(Object) Then
			Rhino.Command "_NoEcho _SolidPtOn"
		ElseIf Rhino.IsCurve(Object) Then
			Rhino.Command "_noecho _PointsOn"
		ElseIf Rhino.IsDimension(Object) Then
			Rhino.Command "_noecho _PointsOn"
		End If
	Rhino.EnableRedraw True
End Sub`

Something like this -

import rhinoscriptsyntax as rs

def test():
    Ids = rs.GetObjects("Select objects", filter = 0,preselect=True)
    if not Ids: return
    for Id in Ids:
        if rs.IsPolysurface(Id):
            rs.Command("SolidPtOn", False)


1 Like

perfect thank you Pascal!

curious, what are the point cloud points that are showing? that something new in Mac?


Yeah, point clouds are single objects and they have ‘grips’ or control points at every point location. Be careful turning these on for very large clouds, it can take a long time and bog things down - though there may be a limit built in now, I cannot remember, of how many points Rhino will try to show on one operation.


1 Like