diff --git a/src/Mod/PartDesign/App/FeatureGroove.cpp b/src/Mod/PartDesign/App/FeatureGroove.cpp index 1087809cd..40309d496 100644 --- a/src/Mod/PartDesign/App/FeatureGroove.cpp +++ b/src/Mod/PartDesign/App/FeatureGroove.cpp @@ -56,8 +56,6 @@ Groove::Groove() ADD_PROPERTY_TYPE(Axis,(Base::Vector3f(0.0f,1.0f,0.0f)),"Groove", App::Prop_ReadOnly, "Axis"); ADD_PROPERTY_TYPE(Angle,(360.0),"Groove", App::Prop_None, "Angle"); ADD_PROPERTY_TYPE(ReferenceAxis,(0),"Groove",(App::PropertyType)(App::Prop_None),"Reference axis of Groove"); - ADD_PROPERTY_TYPE(Midplane,(0),"Groove", App::Prop_None, "Mid plane"); - ADD_PROPERTY_TYPE(Reversed, (0),"Groove", App::Prop_None, "Reversed"); } short Groove::mustExecute() const @@ -66,9 +64,7 @@ short Groove::mustExecute() const ReferenceAxis.isTouched() || Axis.isTouched() || Base.isTouched() || - Angle.isTouched() || - Midplane.isTouched() || - Reversed.isTouched()) + Angle.isTouched()) return 1; return Subtractive::mustExecute(); } diff --git a/src/Mod/PartDesign/App/FeatureGroove.h b/src/Mod/PartDesign/App/FeatureGroove.h index 1bc7a151d..7e637e607 100644 --- a/src/Mod/PartDesign/App/FeatureGroove.h +++ b/src/Mod/PartDesign/App/FeatureGroove.h @@ -40,8 +40,6 @@ public: App::PropertyVector Base; App::PropertyVector Axis; App::PropertyAngle Angle; - App::PropertyBool Midplane; - App::PropertyBool Reversed; /** if this property is set to a valid link, both Axis and Base properties * are calculated according to the linked line @@ -50,7 +48,13 @@ public: /** @name methods override feature */ //@{ - /// recalculate the feature + /** Recalculate the feature + * Revolves the Sketch around the given Axis (with basepoint Base) + * The angle of the revolution is given by Angle. + * If Midplane is true, then the revolution will extend for half of Angle on both sides of the sketch plane. + * If Reversed is true then the direction of revolution will be reversed. + * The created material will be cut out of the sketch support + */ App::DocumentObjectExecReturn *execute(void); short mustExecute() const; /// returns the type name of the view provider diff --git a/src/Mod/PartDesign/App/FeaturePad.cpp b/src/Mod/PartDesign/App/FeaturePad.cpp index cc7f18ebe..ae037197b 100644 --- a/src/Mod/PartDesign/App/FeaturePad.cpp +++ b/src/Mod/PartDesign/App/FeaturePad.cpp @@ -59,8 +59,6 @@ Pad::Pad() ADD_PROPERTY(Type,((long)0)); Type.setEnums(TypeEnums); ADD_PROPERTY(Length,(100.0)); - ADD_PROPERTY(Reversed,(0)); - ADD_PROPERTY(Midplane,(0)); ADD_PROPERTY(Length2,(100.0)); ADD_PROPERTY(FaceName,("")); } @@ -69,8 +67,6 @@ short Pad::mustExecute() const { if (Placement.isTouched() || Length.isTouched() || - Midplane.isTouched() || - Reversed.isTouched() || Length2.isTouched() || FaceName.isTouched()) return 1; diff --git a/src/Mod/PartDesign/App/FeaturePad.h b/src/Mod/PartDesign/App/FeaturePad.h index 8c9787685..f70803df7 100644 --- a/src/Mod/PartDesign/App/FeaturePad.h +++ b/src/Mod/PartDesign/App/FeaturePad.h @@ -40,15 +40,24 @@ public: App::PropertyEnumeration Type; App::PropertyLength Length; - //App::PropertyEnumeration Side; - App::PropertyBool Reversed; - App::PropertyBool Midplane; App::PropertyLength Length2; App::PropertyString FaceName; /** @name methods override feature */ //@{ - /// recalculate the feature + /** Recalculate the feature + * Extrudes the Sketch in the direction of the sketch face normal + * If Type is "Length" then Length gives the extrusion length, the direction will be away from the support + * If Type is "UpToLast" then the extrusion will stop at the last face of the support + * that is cut by a line through the centre of gravite of the sketch + * If Type is "UpToFirst" then extrusion will stop at the first face of the support + * If Type is "UpToFace" then the extrusion will stop at FaceName in the support + * If Type is "TwoLengths" then the extrusion will extend Length in the direction away from the support + * and Length2 in the opposite direction + * If Midplane is true, then the extrusion will extend for half of the length on both sides of the sketch plane + * If Reversed is true then the direction of revolution will be reversed. + * The created material will be fused with the sketch support (if there is one) + */ App::DocumentObjectExecReturn *execute(void); short mustExecute() const; /// returns the type name of the view provider diff --git a/src/Mod/PartDesign/App/FeaturePocket.h b/src/Mod/PartDesign/App/FeaturePocket.h index cab10b16a..f3c65bf12 100644 --- a/src/Mod/PartDesign/App/FeaturePocket.h +++ b/src/Mod/PartDesign/App/FeaturePocket.h @@ -43,7 +43,16 @@ public: /** @name methods override feature */ //@{ - /// recalculate the feature + /** Recalculate the feature + * Extrudes the Sketch in the direction of the sketch face normal + * If Type is "Length" then Length gives the extrusion length, the direction will be into the support + * If Type is "ThroughAll" then the extrusion length will be infinite + * If Type is "UpToFirst" then extrusion will stop at the first face of the support that is cut + * by a line through the centre of gravite of the sketch + * If Type is "UpToFace" then the extrusion will stop at FaceName in the support + * If Midplane is true, then the extrusion will extend for half of the length on both sides of the sketch plane + * The created material will be cut out of the sketch support + */ App::DocumentObjectExecReturn *execute(void); short mustExecute() const; /// returns the type name of the view provider diff --git a/src/Mod/PartDesign/App/FeatureRevolution.cpp b/src/Mod/PartDesign/App/FeatureRevolution.cpp index 32acdb705..30501df24 100644 --- a/src/Mod/PartDesign/App/FeatureRevolution.cpp +++ b/src/Mod/PartDesign/App/FeatureRevolution.cpp @@ -56,8 +56,6 @@ Revolution::Revolution() ADD_PROPERTY_TYPE(Axis,(Base::Vector3f(0.0f,1.0f,0.0f)),"Revolution", App::Prop_ReadOnly, "Axis"); ADD_PROPERTY_TYPE(Angle,(360.0),"Revolution", App::Prop_None, "Angle"); ADD_PROPERTY_TYPE(ReferenceAxis,(0),"Revolution",(App::Prop_None),"Reference axis of revolution"); - ADD_PROPERTY_TYPE(Midplane,(0),"Revolution", App::Prop_None, "Mid plane"); - ADD_PROPERTY_TYPE(Reversed, (0),"Revolution", App::Prop_None, "Reversed"); } short Revolution::mustExecute() const @@ -66,9 +64,7 @@ short Revolution::mustExecute() const ReferenceAxis.isTouched() || Axis.isTouched() || Base.isTouched() || - Angle.isTouched() || - Midplane.isTouched() || - Reversed.isTouched()) + Angle.isTouched()) return 1; return Additive::mustExecute(); } diff --git a/src/Mod/PartDesign/App/FeatureRevolution.h b/src/Mod/PartDesign/App/FeatureRevolution.h index 976f473d2..485c851f6 100644 --- a/src/Mod/PartDesign/App/FeatureRevolution.h +++ b/src/Mod/PartDesign/App/FeatureRevolution.h @@ -40,8 +40,6 @@ public: App::PropertyVector Base; App::PropertyVector Axis; App::PropertyAngle Angle; - App::PropertyBool Midplane; - App::PropertyBool Reversed; /** if this property is set to a valid link, both Axis and Base properties * are calculated according to the linked line @@ -50,7 +48,13 @@ public: /** @name methods override feature */ //@{ - /// recalculate the feature + /** Recalculate the feature + * Revolves the Sketch around the given Axis (with basepoint Base) + * The angle of the revolution is given by Angle. + * If Midplane is true, then the revolution will extend for half of Angle on both sides of the sketch plane. + * If Reversed is true then the direction of revolution will be reversed. + * The created material will be fused with the sketch support (if there is one) + */ App::DocumentObjectExecReturn *execute(void); short mustExecute() const; /// returns the type name of the view provider diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp index 3d1bcd092..1cb4ef1a4 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp +++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp @@ -75,11 +75,15 @@ PROPERTY_SOURCE(PartDesign::SketchBased, PartDesign::Feature) SketchBased::SketchBased() { ADD_PROPERTY(Sketch,(0)); + ADD_PROPERTY_TYPE(Midplane,(0),"SketchBased", App::Prop_None, "Extrude symmetric to sketch face"); + ADD_PROPERTY_TYPE(Reversed, (0),"SketchBased", App::Prop_None, "Reverse extrusion direction"); } short SketchBased::mustExecute() const { - if (Sketch.isTouched()) + if (Sketch.isTouched() || + Midplane.isTouched() || + Reversed.isTouched()) return 1; return 0; // PartDesign::Feature::mustExecute(); } diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.h b/src/Mod/PartDesign/App/FeatureSketchBased.h index b99d6a15a..8c75d9724 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.h +++ b/src/Mod/PartDesign/App/FeatureSketchBased.h @@ -40,7 +40,12 @@ class PartDesignExport SketchBased : public PartDesign::Feature public: SketchBased(); + /// Common properties for all sketch based features App::PropertyLink Sketch; + /// Reverse extrusion direction + App::PropertyBool Reversed; + /// Make extrusion symmetric to sketch plane + App::PropertyBool Midplane; short mustExecute() const;