Back to index

salome-geom  6.5.0
Public Member Functions | Private Attributes Class Reference

List of all members.

Public Member Functions

def __init__
def getObj
def __eq__
def __hash__

Private Attributes


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.

Definition at line 78 of file

Constructor & Destructor Documentation

def (   self,

Definition at line 85 of file

00086     def __init__(self, mainShape, id):
00087         self._mainShape = mainShape
00088         self._id = id

Member Function Documentation

def (   self,

Definition at line 96 of file

00097     def __eq__(self, other):
00098         return self._mainShape._is_equivalent(other._mainShape) and \
00099                self._id == other._id

Definition at line 100 of file

00101     def __hash__(self):
00102         return self._mainShape._hash(2147483647) ^ self._id

def (   self,
Return the sub-shape (GEOM object). `geom` is a pseudo-geompy object
used to find the geometrical object.

Definition at line 89 of file

00090     def getObj(self, geom):
00091         """
00092         Return the sub-shape (GEOM object). `geom` is a pseudo-geompy object
00093         used to find the geometrical object.
00094         """
00095         return geom.GetSubShape(self._mainShape, [self._id])

Member Data Documentation

Definition at line 87 of file

Definition at line 86 of file

The documentation for this class was generated from the following file: