Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

Duplicate, Untrim and Extend sub-object surface from GetObject

$
0
0

I’m using Rhino.Input.Custom.GetObject() with a filter for Surface and with sub objects allowed, and it seems to work.

However, the results from the Objects() seems to be either Surface or PlaneSurface in my use cases, and both of those have Duplicate and Extend (but not Untrim?)… in either case, I don’t understand how to run those methods regardless of the object type:

	go = Rhino.Input.Custom.GetObject()
	go.SetCommandPrompt("Select two surfaces")
	go.AlreadySelectedObjectSelect = True
	go.SubObjectSelect = True
	go.GeometryFilter = Rhino.DocObjects.ObjectType.Surface
	go.GetMultiple(2, 2) # Ensure the user selects two objects

	if go.CommandResult() != Rhino.Commands.Result.Success:
		print("Command result was unsuccessful")
		return

	s1 = go.Objects()[0]
	s2 = go.Objects()[1]

	d1 = s1.Duplicate()
	d2 = s2.Duplicate()

What am I missing and why is there no Untrim?

6 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles