Version: 9.15.0
Home
SubShapeID Class Reference

This class enables the use of sub-shapes in sets or as dictionary keys. More...

Public Member Functions

def __init__ (self, mainShape, id)
 
def getObj (self, geom)
 Return the sub-shape (GEOM object). More...
 
def __eq__ (self, other)
 
def __hash__ (self)
 

Private Attributes

 _mainShape
 
 _id
 

Detailed Description

This class enables the use of sub-shapes in sets or as dictionary keys.

It implements eq and hash methods so that sub-shapes with the same CORBA object mainShape and the same id are considered equal.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  mainShape,
  id 
)

Member Function Documentation

◆ getObj()

def getObj (   self,
  geom 
)

Return the sub-shape (GEOM object).

geom is a pseudo-geompy object used to find the geometrical object.

References SubShapeID._id, StructuralElement._id, and SubShapeID._mainShape.

◆ __eq__()

def __eq__ (   self,
  other 
)

◆ __hash__()

def __hash__ (   self)

Field Documentation

◆ _mainShape

_mainShape
private

◆ _id

_id
private