convert_to_selections#

Modeler3D.convert_to_selections(assignment, return_list=False)[source]#

Convert modeler objects.

This method converts modeler object or IDs to the corresponding output according to the following scheme:

assignment

Return value

int object name (str)

Object3D object name (str) FacePrimitive int, face ID EdgePrimitive int, edge ID str return the same str

  • If object_id is a list, a list is returned according

to the table. If object_id is a single value, a list of length == 1 is returned (default).

  • If the second argument, return_list, is set to False (default), a

string is returned with elements separated by a comma (,)”.

Parameters:
assignmentstr, int, list

One or more object IDs whose name will be returned. A list can contain both strings (object names) and integers (object IDs).

return_listbool, option

Whether to return a list of the selections. The default is False, in which case a string of the selections is returned. If True, a list of the selections is returned.

Returns:
str or list

Name of the objects corresponding to the one or more object IDs passed as arguments.