Sets manager¶
-
model.sets.sets_mng.
append_nodes_from_line
(setTo, line)¶ Appends the nodes in the specified line to a set of entities
Parameters: - setTo – set of entities
- line – line that contains the nodes
-
model.sets.sets_mng.
append_points
(setTo, points)¶ Appends points to set of entities
Parameters: - setTo – set of entities
- points – list of points [pt1,pt2, …]
-
model.sets.sets_mng.
append_sets
(setTo, sets)¶ Appends other sets to set of entities
Parameters: - setTo – base set of entities
- points – list of sets to be appended [set1,set2, …]
-
model.sets.sets_mng.
get_lines_on_points
(setPoints, setLinName, onlyIncluded=True)¶ return a set of lines (and all the entities of lower rank associated) from a given set of points.
Parameters: setPoints – set of points :param setLinName : name of the returned set of lines :param onlyIncluded: True to select only lines whose both ends are in the
set of points False to select all lines that ‘touch’ the set of points (defaults to True)
-
model.sets.sets_mng.
get_lstNod_from_lst3DPos
(preprocessor, lst3DPos)¶ return the set of the nearest nodes to the points passed as a list of points (expressed as geom.Pos3d(x,y,z))
-
model.sets.sets_mng.
get_lstNod_on_points_fromSet
(setFrom)¶ return the list of nearest nodes to all the points included in the set of entities ‘setFrom’
-
model.sets.sets_mng.
get_max_coo_nod
(setWithNod, cooId)¶ Return the maximum value of the specified coordinate in the set of nodes
Parameters: - setWithNod – set that contains the nodes
- cooId – identification of the desired coordinate (0 for X coordinate, 1 for Y coord. and 2 for Z coord.
-
model.sets.sets_mng.
get_min_coo_nod
(setWithNod, cooId)¶ Return the minimum value of the specified coordinate in the set of nodes
Parameters: - setWithNod – set that contains the nodes
- cooId – identification of the desired coordinate (0 for X coordinate, 1 for Y coord. and 2 for Z coord.
-
model.sets.sets_mng.
get_nodes_wire
(setBusq, lstPtsWire, tol=0.01)¶ return the list of nodes from the set setBusq that belong to the line defined by the successive points in list lstPtsWire (expressed as geom.Pos3d(x,y,z))
-
model.sets.sets_mng.
get_set_nodes_plane_XY
(setName, setBusq, zCoord, tol=0.0001)¶ Return a set of nodes close to a plane parallel to XY within a tolerance.
Parameters: - setName – name of the set to be created
- setBusq – set from which to extract the nodes
- zCoord – Z-coordinate of the plane parallel to XY
- tol – tolerance (defaults to 1e-4)
-
model.sets.sets_mng.
get_set_nodes_plane_XZ
(setName, setBusq, yCoord, tol=0.0001)¶ Return a set of nodes close to a plane parallel to XZ within a tolerance.
Parameters: - setName – name of the set to be created
- setBusq – set from which to extract the nodes
- yCoord – Y-coordinate of the plane parallel to XZ
- tol – tolerance (defaults to 1e-4)
-
model.sets.sets_mng.
get_set_nodes_plane_YZ
(setName, setBusq, xCoord, tol=0.0001)¶ Return a set of nodes close to a plane parallel to YZ within a tolerance.
Parameters: - setName – name of the set to be created
- setBusq – set from which to extract the nodes
- xCoord – X-coordinate of the plane parallel to YZ
- tol – tolerance (defaults to 1e-4)
-
model.sets.sets_mng.
get_subset_elem_of_mat
(matType, fromSet, toSetName)¶ return a subset of fromSet composed by the elements of material matType
Parameters: - matType – name of the material of target elements (string)
- fromSet – set from which to extract the subset
- toSetName – string to name the created subset
-
model.sets.sets_mng.
get_subset_elem_of_type
(elemType, fromSet, toSetName)¶ return a subset of fromSet composed by the elements of type elemType
Parameters: - elemType – name of the type of target elements (string)
- fromSet – set from which to extract the subset
- toSetName – string to name the created subset
-
model.sets.sets_mng.
get_subset_inside
(geomObj, fromSet, toSetName, tol=0.0)¶ return a subset of fromSet composed by the entities inside the 3D geometric figure geomObj.
Parameters: - geomObj – geom object that delimits the subset
- fromSet – set from which to extract the subset
- toSetName – string to name the created subset
- tol – geometric tolerance for the search (defaults to 0.0)
-
model.sets.sets_mng.
get_subset_lin_longer_than
(Lmin, fromSet, toSetName)¶ return a subset of fromSet composed by lines longer than Lmin. If toSetName exists the subset is appended to it.
Parameters: - Lmin – minimum length of lines
- fromSet – set from which to extract the subset
- toSetName – string to name the subset
-
model.sets.sets_mng.
get_subset_lin_parallel_to_axis
(axis, fromSet, toSetName, tol=0.001)¶ return a subset of fromSet composed by lines parallel to one of the global axes. If toSetName exists the subset is appended to it.
Parameters: - axis – global axis (can be equal to ‘X’, ‘Y’, ‘Z’)
- fromSet – set from which to extract the subset
- toSetName – string to name the created subset
- tol – tolerance in line tangent to capture lines (defaults to 0.001)
-
model.sets.sets_mng.
get_subset_lin_shorter_than
(Lmax, fromSet, toSetName)¶ return a subset of fromSet composed by lines shorter than Lmax. If toSetName exists the subset is appended to it.
Parameters: - Lmax – maximum length of lines
- fromSet – set from which to extract the subset
- toSetName – string to name the subset
-
model.sets.sets_mng.
lstElem_to_set
(preprocessor, lstElem, setName)¶ add the elements in list lstElem to the set named setName. If the set doesn’t exist, the function creates it.
-
model.sets.sets_mng.
lstLin_to_set
(preprocessor, lstLin, setName)¶ add the lines in list lstNod to the set named setName. If the set doesn’t exist, the function creates it.
-
model.sets.sets_mng.
lstNod_to_set
(preprocessor, lstNod, setName)¶ add the nodes in list lstNod to the set named setName. If the set doesn’t exist, the function creates it.
-
model.sets.sets_mng.
rot_X
(toSet, angle)¶ Apply a rotation around global X axis to all the entities in the set
Parameters: - toSet – set of entities
- angle – rotation angle (degrees)
-
model.sets.sets_mng.
rot_Y
(toSet, angle)¶ Apply a rotation around global Y axis to all the entities in the set
Parameters: - toSet – set of entities
- angle – rotation angle (degrees)
-
model.sets.sets_mng.
rot_Z
(toSet, angle)¶ Apply a rotation around global Z axis to all the entities in the set
Parameters: - toSet – set of entities
- angle – rotation angle (degrees)
-
model.sets.sets_mng.
setAddOf
(setA, setB)¶ return a new set that has all the entities in setA and setB This function is going to be replaced by the overload of add operator for sets.
-
model.sets.sets_mng.
setElem_to_lst
(setElem)¶ return a list with the elements included in the set setElem
-
model.sets.sets_mng.
setLin_to_lst
(setLin)¶ return a list with the lines included in the set setLin
-
model.sets.sets_mng.
setNod_to_lst
(setNod)¶ return a list with the nodes included in the set setNod
-
model.sets.sets_mng.
setPnt_to_lst
(setPnt)¶ return a list with the points included in set setPnt
-
model.sets.sets_mng.
setSurf_to_lst
(setSurf)¶ return a list with the surfaces included in the set setSurf
-
model.sets.sets_mng.
set_included_in_orthoPrism
(preprocessor, setInit, prismBase, prismAxis, setName)¶ reselect from set setInit those elements included in a orthogonal prism defined by a 2D polygon and the direction of its axis.
Parameters: - preprocessor – preprocessor
- setInit – set of elements to which restrict the search
- prismBase – 2D polygon that defines the n-sided base of the prism. The vertices of the polygon are defined in global coordinates in the following way: - for X-axis-prism: (y,z) - for Y-axis-prism: (x,z) - for Z-axis-prism: (x,y)
- prismAxis – axis of the prism (can be equal to ‘X’, ‘Y’, ‘Z’)
- setName – name of the set to be generated
-
model.sets.sets_mng.
set_not_included_in_orthoPrism
(preprocessor, setInit, prismBase, prismAxis, setName)¶ reselect from set setInit those elements NOT included in a orthogonal prism defined by a 2D polygon and the direction of its axis.
Parameters: - preprocessor – preprocessor
- setInit – set of elements to which restrict the search
- prismBase – 2D polygon that defines the n-sided base of the prism. The vertices of the polygon are defined in global coordinates in the following way: - for X-axis-prism: (y,z) - for Y-axis-prism: (x,z) - for Z-axis-prism: (x,y)
- prismAxis – axis of the prism (can be equal to ‘X’, ‘Y’, ‘Z’)
- setName – name of the set to be generated
-
model.sets.sets_mng.
translat
(toSet, deltaXYZ)¶ Apply a translation (dx,dy,dz) to all the entities in the set
Parameters: - toSet – set of entities
- deltaXYZ – displacements in global X-Y-Z axes(dx,dy,dz)