Changeset 8088 for mauRepo/MolesManager/trunk/src/ea_model/iso_19107_2003_spatial_schema/geometry/coordinate_geometry/gm_conic.py
 Timestamp:
 10/02/12 13:39:16 (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

mauRepo/MolesManager/trunk/src/ea_model/iso_19107_2003_spatial_schema/geometry/coordinate_geometry/gm_conic.py
r8087 r8088 1 2 3 1 4 2 5 … … 20 23 21 24 ''' 22 Created on 06Feb2012 15:59:4225 Created on 10Feb2012 12:03:14 23 26 24 27 @author: mnagni … … 52 55 super(GM_Conic, self).__init__() 53 56 54 55 56 57 @property 57 def curve(self): 58 def curve(self): 58 59 return self._gm_curvesegment.curve 59 60 60 61 @curve.setter 61 def curve(self, value): 62 def curve(self, value): 62 63 self._gm_curvesegment.curve = value 63 64 64 65 @property 65 def numDerivativesAtEnd(self): 66 def numDerivativesAtEnd(self): 66 67 return self._gm_curvesegment.numDerivativesAtEnd 67 68 68 69 @numDerivativesAtEnd.setter 69 def numDerivativesAtEnd(self, value): 70 def numDerivativesAtEnd(self, value): 70 71 self._gm_curvesegment.numDerivativesAtEnd = value 71 72 72 73 @property 73 def interpolation(self): 74 def interpolation(self): 74 75 return self._gm_curvesegment.interpolation 75 76 76 77 @interpolation.setter 77 def interpolation(self, value): 78 def interpolation(self, value): 78 79 self._gm_curvesegment.interpolation = value 79 80 80 81 @property 81 def numDerivativesAtStart(self): 82 def numDerivativesAtStart(self): 82 83 return self._gm_curvesegment.numDerivativesAtStart 83 84 84 85 @numDerivativesAtStart.setter 85 def numDerivativesAtStart(self, value): 86 def numDerivativesAtStart(self, value): 86 87 self._gm_curvesegment.numDerivativesAtStart = value 87 88 88 89 90 89 @property 91 def numDerivativeInterior(self): 90 def numDerivativeInterior(self): 92 91 return self._gm_curvesegment.numDerivativeInterior 93 92 94 93 @numDerivativeInterior.setter 95 def numDerivativeInterior(self, value): 94 def numDerivativeInterior(self, value): 96 95 self._gm_curvesegment.numDerivativeInterior = value 97 98 99 100 101 102 103 104 105 96 106 97 def __key(self): 107 98 return (self.startConstrParam, self.curve, self.numDerivativesAtEnd, self.interpolation, self.numDerivativesAtStart, self.endConstrParam, self.numDerivativeInterior, self.shifted, self.position, self.semiLatusRectum, self.eccentricity) 108 99 109 def __eq__( x, y):100 def __eq__(self, y): 110 101 ''' 111 102 Cannot compare classes which do not define a "__key" attribute 112 103 ''' 113 if hasattr( x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)):114 return x.__key() == y.__key()115 return id( x) == id(y)104 if hasattr(self, '_%s__key' % (type(self).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): 105 return self.__key() == y.__key() 106 return id(self) == id(y) 116 107 117 108 def __hash__(self):
Note: See TracChangeset
for help on using the changeset viewer.