Example #1
0
 def __init__(self, x,y,z):
     """Constructor for KbeVertex"""
     gp_Pnt.__init__(self, x,y,z)
     KbeObject.__init__(self,
                        #name='Vertex #{0} {1},{2},{3}'.format(self._n,  self.x, self.y, self.z)
                        name='Vertex #{0}'.format(self._n)
                             )
     self._n += 1 # should be a property of KbeObject
Example #2
0
 def __init__(self, pnt):
     if isinstance(pnt, (list, tuple)):
         gp_Pnt.__init__(self, *pnt)
     elif isinstance(pnt, vec):
         gp_Pnt.__init__(self, *pnt)
     elif isinstance(pnt, gp_Pnt):
         gp_Pnt.__init__(self, pnt)
     elif isinstance(pnt, TopoDS_Vertex):
         # convert to type "gp_Pnt"
         gp_Pnt.__init__(self, BRep_Tool.Pnt(pnt))
     elif isinstance(pnt, TopoDS_Shape):
         self.brt = BRep_Tool()
         self.pnt1 = self.brt.Pnt(topods_Vertex(pnt))
         gp_Pnt.__init__(self, self.pnt1.XYZ())
     else:
         raise TypeError
Example #3
0
 def __init__(self, *kargs):
     gp_Pnt.__init__(self, *kargs)
     self.x = 4
 def __init__(self, *kargs):
     gp_Pnt.__init__(self, *kargs)
     self.x = 4
Example #5
0
 def __init__(self, pnt):
     gp_Pnt.__init__(self, pnt)
     GP3.__init__(self)