def makeGeom(self, curve, startParam, endParam): '''makeGeom(self, curve, startParam, endParam)''' # print('###### makeGeom') if isinstance(curve, (Part.LineSegment, Part.Line)): # print('1') geom = Part.LineSegment(curve, startParam, endParam) elif isinstance(curve, Part.ArcOfCircle): # print('2') angleXU = curve.AngleXU geom = Part.ArcOfCircle(curve.Circle, startParam, endParam) geom.AngleXU = angleXU elif isinstance(curve, Part.ArcOfEllipse): # print('3') angleXU = curve.AngleXU geom = Part.ArcOfEllipse(curve.Ellipse, startParam, endParam) geom.AngleXU = angleXU elif isinstance(curve, Part.ArcOfParabola): # print('4') angleXU = curve.AngleXU geom = Part.ArcOfParabola(curve.Parabola, startParam, endParam) geom.AngleXU = angleXU elif isinstance(curve, Part.ArcOfHyperbola): # print('5') angleXU = curve.AngleXU geom = Part.ArcOfHyperbola(curve.Hyperbola, startParam, endParam) geom.AngleXU = angleXU elif isinstance(curve, Part.Circle): # print('6') angleXU = curve.AngleXU geom = Part.ArcOfCircle(curve, startParam, endParam) geom.AngleXU = angleXU elif isinstance(curve, Part.Ellipse): # print('7') angleXU = curve.AngleXU geom = Part.ArcOfEllipse(curve, startParam, endParam) geom.AngleXU = angleXU elif isinstance(curve, Part.Parabola): # print('8') angleXU = curve.AngleXU geom = Part.ArcOfParabola(curve, startParam, endParam) geom.AngleXU = angleXU elif isinstance(curve, Part.Hyperbola): # print('9') angleXU = curve.AngleXU geom = Part.ArcOfHyperbola(curve, startParam, endParam) geom.AngleXU = angleXU elif isinstance(curve, Part.BSplineCurve): # print('10') pass # print('geom ', geom) return geom
def makeGeom(self, curve, startParam, endParam): '''makeGeom(self, curve, startParam, endParam)''' # print '###### makeGeom' if isinstance(curve, (Part.Line, Part.LineSegment)): # print '1' geom = Part.LineSegment(curve, startParam, endParam) elif isinstance(curve, Part.Circle): # print '2' angleXU = curve.AngleXU geom = Part.ArcOfCircle(curve, startParam, endParam) geom.AngleXU = angleXU elif isinstance(curve, Part.ArcOfCircle): # print '3' angleXU = curve.AngleXU geom = Part.ArcOfCircle(curve.Circle, startParam, endParam) geom.AngleXU = angleXU elif isinstance(curve, Part.Ellipse): # print '4' angleXU = curve.AngleXU geom = Part.ArcOfEllipse(curve, startParam, endParam) geom.AngleXU = angleXU elif isinstance(curve, Part.ArcOfEllipse): # print '5' angleXU = curve.AngleXU geom = Part.ArcOfEllipse(curve.Ellipse, startParam, endParam) geom.AngleXU = angleXU elif isinstance(curve, Part.Parabola): # print '6' angleXU = curve.AngleXU geom = Part.ArcOfParabola(curve, startParam, endParam) geom.AngleXU = angleXU elif isinstance(curve, Part.ArcOfParabola): # print '7' angleXU = curve.AngleXU geom = Part.ArcOfParabola(curve.Parabola, startParam, endParam) geom.AngleXU = angleXU elif isinstance(curve, Part.Hyperbola): # print '8' angleXU = curve.AngleXU geom = Part.ArcOfHyperbola(curve, startParam, endParam) geom.AngleXU = angleXU elif isinstance(curve, Part.ArcOfHyperbola): # print '9' angleXU = curve.AngleXU geom = Part.ArcOfHyperbola(curve.Hyperbola, startParam, endParam) geom.AngleXU = angleXU elif isinstance(curve, Part.BSplineCurve): # print '10' pass # print 'geom ', geom return geom