def makeFeature(self,sel): fp = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Outline Curve") OutlineFP(fp, sel) approximate_extension.ApproximateExtension(fp) fp.Active = False OutlineVP(fp.ViewObject) FreeCAD.ActiveDocument.recompute()
def makeCPCFeature(self, o1, o2, d1, d2): cc = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", "Combined_projection_curve") CombinedProjectionCurveFP(cc, o1, o2, d1, d2) approximate_extension.ApproximateExtension(cc) cc.Active = False CombinedProjectionCurveVP(cc.ViewObject) FreeCAD.ActiveDocument.recompute()
def makeJoinFeature(self, source): joinCurve = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", "JoinCurve") join(joinCurve) approximate_extension.ApproximateExtension(joinCurve) joinCurve.Active = False joinVP(joinCurve.ViewObject) if isinstance(source, list): joinCurve.Edges = source else: joinCurve.Base = source FreeCAD.ActiveDocument.recompute() joinCurve.ViewObject.LineWidth = 2.0 joinCurve.ViewObject.LineColor = (0.3, 0.0, 0.5)