convert_to_selections#
- Modeler2D.convert_to_selections(assignment, return_list=False)#
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 IDEdgePrimitive
int, edge IDstr
return the samestr
If
object_id
is a list, a list is returned according
to the table. If
object_id
is a single value, a list oflength == 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:
- assignment
str
,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. IfTrue
, a list of the selections is returned.
- assignment
- Returns: