salomegeom
6.5.0

Functions  
def  geompyDC.geompyDC.GetExistingSubObjects 
Get all subshapes and groups of theShape, that were created already by any other methods.  
def  geompyDC.geompyDC.GetGroups 
Get all groups of theShape, that were created already by any other methods.  
def  geompyDC.geompyDC.SubShapeAll 
Explode a shape on subshapes of a given type.  
def  geompyDC.geompyDC.SubShapeAllIDs 
Explode a shape on subshapes of a given type.  
def  geompyDC.geompyDC.SubShape 
Obtain a compound of subshapes of aShape, selected by they indices in list of all subshapes of type aType.  
def  geompyDC.geompyDC.SubShapeAllSortedCentres 
Explode a shape on subshapes of a given type.  
def  geompyDC.geompyDC.SubShapeAllSortedCentresIDs 
Explode a shape on subshapes of a given type.  
def  geompyDC.geompyDC.SubShapeSortedCentres 
Obtain a compound of subshapes of aShape, selected by they indices in sorted list of all subshapes of type aType.  
def  geompyDC.geompyDC.ExtractShapes 
Extract shapes (excluding the main shape) of given type.  
def  geompyDC.geompyDC.SubShapes 
Get a set of subshapes defined by their unique IDs inside aShape 
def geompyDC.geompyDC.ExtractShapes  (  self,  
aShape,  
aType,  
isSorted = False 

) 
Extract shapes (excluding the main shape) of given type.
aShape  The shape. 
aType  The shape type (see ShapeType()) 
isSorted  Boolean flag to switch sorting on/off. 
Example
Extract shapes (excluding the main shape) of given type. Parameters: aShape The shape. aType The shape type (see geompy.ShapeType) isSorted Boolean flag to switch sorting on/off. Returns: List of subshapes of type aType, contained in aShape.
Definition at line 4168 of file geompyDC.py.
04168 04169 def ExtractShapes(self, aShape, aType, isSorted = False): 04170 """ 04171 Extract shapes (excluding the main shape) of given type. 04172 04173 Parameters: 04174 aShape The shape. 04175 aType The shape type (see geompy.ShapeType) 04176 isSorted Boolean flag to switch sorting on/off. 04177 04178 Returns: 04179 List of subshapes of type aType, contained in aShape. 04180 """ 04181 # Example: see GEOM_TestAll.py 04182 ListObj = self.ShapesOp.ExtractSubShapes(aShape, aType, isSorted) 04183 RaiseIfFailed("ExtractSubShapes", self.ShapesOp) 04184 return ListObj
def geompyDC.geompyDC.GetExistingSubObjects  (  self,  
theShape,  
theGroupsOnly = False 

) 
Get all subshapes and groups of theShape, that were created already by any other methods.
theShape  Any shape. 
theGroupsOnly  If this parameter is TRUE, only groups will be returned, else all found subshapes and groups. 
Example
Get all subshapes and groups of theShape, that were created already by any other methods. Parameters: theShape Any shape. theGroupsOnly If this parameter is TRUE, only groups will be returned, else all found subshapes and groups. Returns: List of existing subobjects of theShape.
Definition at line 3965 of file geompyDC.py.
03965 03966 def GetExistingSubObjects(self, theShape, theGroupsOnly = False): 03967 """ 03968 Get all subshapes and groups of theShape, 03969 that were created already by any other methods. 03970 03971 Parameters: 03972 theShape Any shape. 03973 theGroupsOnly If this parameter is TRUE, only groups will be 03974 returned, else all found subshapes and groups. 03975 03976 Returns: 03977 List of existing subobjects of theShape. 03978 """ 03979 # Example: see GEOM_TestAll.py 03980 ListObj = self.ShapesOp.GetExistingSubObjects(theShape, theGroupsOnly) 03981 RaiseIfFailed("GetExistingSubObjects", self.ShapesOp) 03982 return ListObj
def geompyDC.geompyDC.GetGroups  (  self,  
theShape  
) 
Get all groups of theShape, that were created already by any other methods.
theShape  Any shape. 
Example
Get all groups of theShape, that were created already by any other methods. Parameters: theShape Any shape. Returns: List of existing groups of theShape.
Definition at line 3989 of file geompyDC.py.
03989 03990 def GetGroups(self, theShape): 03991 """ 03992 Get all groups of theShape, 03993 that were created already by any other methods. 03994 03995 Parameters: 03996 theShape Any shape. 03997 03998 Returns: 03999 List of existing groups of theShape. 04000 """ 04001 # Example: see GEOM_TestAll.py 04002 ListObj = self.ShapesOp.GetExistingSubObjects(theShape, True) 04003 RaiseIfFailed("GetExistingSubObjects", self.ShapesOp) 04004 return ListObj
def geompyDC.geompyDC.SubShape  (  self,  
aShape,  
aType,  
ListOfInd  
) 
Obtain a compound of subshapes of aShape, selected by they indices in list of all subshapes of type aType.
Each index is in range [1, Nb_SubShapes_Of_Given_Type]
aShape  Shape to get subshape of. 
ListOfInd  List of subshapes indices. 
aType  Type of subshapes to be retrieved (see ShapeType()) 
Example
Obtain a compound of subshapes of aShape, selected by they indices in list of all subshapes of type aType. Each index is in range [1, Nb_SubShapes_Of_Given_Type] Parameters: aShape Shape to get subshape of. ListOfID List of subshapes indices. aType Type of subshapes to be retrieved (see geompy.ShapeType) Returns: A compound of subshapes of aShape.
Definition at line 4059 of file geompyDC.py.
04059 04060 def SubShape(self, aShape, aType, ListOfInd): 04061 """ 04062 Obtain a compound of subshapes of aShape, 04063 selected by they indices in list of all subshapes of type aType. 04064 Each index is in range [1, Nb_SubShapes_Of_Given_Type] 04065 04066 Parameters: 04067 aShape Shape to get subshape of. 04068 ListOfID List of subshapes indices. 04069 aType Type of subshapes to be retrieved (see geompy.ShapeType) 04070 04071 Returns: 04072 A compound of subshapes of aShape. 04073 """ 04074 # Example: see GEOM_TestAll.py 04075 ListOfIDs = [] 04076 AllShapeIDsList = self.SubShapeAllIDs(aShape, aType) 04077 for ind in ListOfInd: 04078 ListOfIDs.append(AllShapeIDsList[ind  1]) 04079 anObj = self.GetSubShape(aShape, ListOfIDs) 04080 return anObj
def geompyDC.geompyDC.SubShapeAll  (  self,  
aShape,  
aType  
) 
Explode a shape on subshapes of a given type.
If the shape itself matches the type, it is also returned.
aShape  Shape to be exploded. 
aType  Type of subshapes to be retrieved (see ShapeType()) 
Example
Explode a shape on subshapes of a given type. If the shape itself matches the type, it is also returned. Parameters: aShape Shape to be exploded. aType Type of subshapes to be retrieved (see geompy.ShapeType) Returns: List of subshapes of type theShapeType, contained in theShape.
Definition at line 4012 of file geompyDC.py.
04012 04013 def SubShapeAll(self, aShape, aType): 04014 """ 04015 Explode a shape on subshapes of a given type. 04016 If the shape itself matches the type, it is also returned. 04017 04018 Parameters: 04019 aShape Shape to be exploded. 04020 aType Type of subshapes to be retrieved (see geompy.ShapeType) 04021 04022 Returns: 04023 List of subshapes of type theShapeType, contained in theShape. 04024 """ 04025 # Example: see GEOM_TestAll.py 04026 ListObj = self.ShapesOp.MakeAllSubShapes(aShape, aType, False) 04027 RaiseIfFailed("SubShapeAll", self.ShapesOp) 04028 return ListObj
def geompyDC.geompyDC.SubShapeAllIDs  (  self,  
aShape,  
aType  
) 
Explode a shape on subshapes of a given type.
aShape  Shape to be exploded. 
aType  Type of subshapes to be retrieved (see ShapeType()) 
Example
Explode a shape on subshapes of a given type. Parameters: aShape Shape to be exploded (see geompy.ShapeType) aType Type of subshapes to be retrieved (see geompy.ShapeType) Returns: List of IDs of subshapes.
Definition at line 4035 of file geompyDC.py.
04035 04036 def SubShapeAllIDs(self, aShape, aType): 04037 """ 04038 Explode a shape on subshapes of a given type. 04039 04040 Parameters: 04041 aShape Shape to be exploded (see geompy.ShapeType) 04042 aType Type of subshapes to be retrieved (see geompy.ShapeType) 04043 04044 Returns: 04045 List of IDs of subshapes. 04046 """ 04047 ListObj = self.ShapesOp.GetAllSubShapesIDs(aShape, aType, False) 04048 RaiseIfFailed("SubShapeAllIDs", self.ShapesOp) 04049 return ListObj
def geompyDC.geompyDC.SubShapeAllSortedCentres  (  self,  
aShape,  
aType  
) 
Explode a shape on subshapes of a given type.
Subshapes will be sorted by coordinates of their gravity centers. If the shape itself matches the type, it is also returned.
aShape  Shape to be exploded. 
aType  Type of subshapes to be retrieved (see ShapeType()) 
Example
Explode a shape on subshapes of a given type. Subshapes will be sorted by coordinates of their gravity centers. If the shape itself matches the type, it is also returned. Parameters: aShape Shape to be exploded. aType Type of subshapes to be retrieved (see geompy.ShapeType) Returns: List of subshapes of type theShapeType, contained in theShape.
Definition at line 4089 of file geompyDC.py.
04089 04090 def SubShapeAllSortedCentres(self, aShape, aType): 04091 """ 04092 Explode a shape on subshapes of a given type. 04093 Subshapes will be sorted by coordinates of their gravity centers. 04094 If the shape itself matches the type, it is also returned. 04095 04096 Parameters: 04097 aShape Shape to be exploded. 04098 aType Type of subshapes to be retrieved (see geompy.ShapeType) 04099 04100 Returns: 04101 List of subshapes of type theShapeType, contained in theShape. 04102 """ 04103 # Example: see GEOM_TestAll.py 04104 ListObj = self.ShapesOp.MakeAllSubShapes(aShape, aType, True) 04105 RaiseIfFailed("SubShapeAllSortedCentres", self.ShapesOp) 04106 return ListObj
def geompyDC.geompyDC.SubShapeAllSortedCentresIDs  (  self,  
aShape,  
aType  
) 
Explode a shape on subshapes of a given type.
Subshapes will be sorted by coordinates of their gravity centers.
aShape  Shape to be exploded. 
aType  Type of subshapes to be retrieved (see ShapeType()) 
Example
Explode a shape on subshapes of a given type. Subshapes will be sorted by coordinates of their gravity centers. Parameters: aShape Shape to be exploded. aType Type of subshapes to be retrieved (see geompy.ShapeType) Returns: List of IDs of subshapes.
Definition at line 4114 of file geompyDC.py.
04114 04115 def SubShapeAllSortedCentresIDs(self, aShape, aType): 04116 """ 04117 Explode a shape on subshapes of a given type. 04118 Subshapes will be sorted by coordinates of their gravity centers. 04119 04120 Parameters: 04121 aShape Shape to be exploded. 04122 aType Type of subshapes to be retrieved (see geompy.ShapeType) 04123 04124 Returns: 04125 List of IDs of subshapes. 04126 """ 04127 ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, aType, True) 04128 RaiseIfFailed("SubShapeAllIDs", self.ShapesOp) 04129 return ListIDs
def geompyDC.geompyDC.SubShapes  (  self,  
aShape,  
anIDs  
) 
Get a set of subshapes defined by their unique IDs inside aShape
aShape  Main shape. 
anIDs  List of unique IDs of subshapes inside aShape. 
Example
Get a set of subshapes defined by their unique IDs inside theMainShape Parameters: aShape Main shape. anIDs List of unique IDs of subshapes inside theMainShape. Returns: List of GEOM.GEOM_Object, corresponding to found subshapes.
Definition at line 4191 of file geompyDC.py.
04191 04192 def SubShapes(self, aShape, anIDs): 04193 """ 04194 Get a set of subshapes defined by their unique IDs inside theMainShape 04195 04196 Parameters: 04197 aShape Main shape. 04198 anIDs List of unique IDs of subshapes inside theMainShape. 04199 04200 Returns: 04201 List of GEOM.GEOM_Object, corresponding to found subshapes. 04202 """ 04203 # Example: see GEOM_TestAll.py 04204 ListObj = self.ShapesOp.MakeSubShapes(aShape, anIDs) 04205 RaiseIfFailed("SubShapes", self.ShapesOp) 04206 return ListObj
def geompyDC.geompyDC.SubShapeSortedCentres  (  self,  
aShape,  
aType,  
ListOfInd  
) 
Obtain a compound of subshapes of aShape, selected by they indices in sorted list of all subshapes of type aType.
Each index is in range [1, Nb_SubShapes_Of_Given_Type]
aShape  Shape to get subshape of. 
ListOfInd  List of subshapes indices. 
aType  Type of subshapes to be retrieved (see ShapeType()) 
Example
Obtain a compound of subshapes of aShape, selected by they indices in sorted list of all subshapes of type aType. Each index is in range [1, Nb_SubShapes_Of_Given_Type] Parameters: aShape Shape to get subshape of. ListOfID List of subshapes indices. aType Type of subshapes to be retrieved (see geompy.ShapeType) Returns: A compound of subshapes of aShape.
Definition at line 4139 of file geompyDC.py.
04139 04140 def SubShapeSortedCentres(self, aShape, aType, ListOfInd): 04141 """ 04142 Obtain a compound of subshapes of aShape, 04143 selected by they indices in sorted list of all subshapes of type aType. 04144 Each index is in range [1, Nb_SubShapes_Of_Given_Type] 04145 04146 Parameters: 04147 aShape Shape to get subshape of. 04148 ListOfID List of subshapes indices. 04149 aType Type of subshapes to be retrieved (see geompy.ShapeType) 04150 04151 Returns: 04152 A compound of subshapes of aShape. 04153 """ 04154 # Example: see GEOM_TestAll.py 04155 ListOfIDs = [] 04156 AllShapeIDsList = self.SubShapeAllSortedCentresIDs(aShape, aType) 04157 for ind in ListOfInd: 04158 ListOfIDs.append(AllShapeIDsList[ind  1]) 04159 anObj = self.GetSubShape(aShape, ListOfIDs) 04160 return anObj