| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| |
|
| | #ifndef PARTDESIGN_FEATURE_EXTRUDE_H |
| | #define PARTDESIGN_FEATURE_EXTRUDE_H |
| |
|
| | #include <App/PropertyStandard.h> |
| | #include <App/PropertyUnits.h> |
| | #include "FeatureSketchBased.h" |
| |
|
| | class gp_Dir; |
| | class TopoDS_Face; |
| | class TopoDS_Shape; |
| | class TopLoc_Location; |
| |
|
| | namespace PartDesign |
| | { |
| |
|
| | class PartDesignExport FeatureExtrude: public ProfileBased |
| | { |
| | PROPERTY_HEADER_WITH_OVERRIDE(PartDesign::FeatureExtrude); |
| |
|
| | public: |
| | FeatureExtrude(); |
| |
|
| | App::PropertyEnumeration SideType; |
| | App::PropertyEnumeration Type; |
| | App::PropertyEnumeration Type2; |
| | App::PropertyLength Length; |
| | App::PropertyLength Length2; |
| | App::PropertyAngle TaperAngle; |
| | App::PropertyAngle TaperAngle2; |
| | App::PropertyBool UseCustomVector; |
| | App::PropertyVector Direction; |
| | App::PropertyBool AlongSketchNormal; |
| | App::PropertyLength Offset; |
| | App::PropertyLength Offset2; |
| | App::PropertyLinkSub ReferenceAxis; |
| |
|
| | static App::PropertyQuantityConstraint::Constraints signedLengthConstraint; |
| | static double maxAngle; |
| | static App::PropertyAngle::Constraints floatAngle; |
| |
|
| | |
| | |
| | short mustExecute() const override; |
| | void setupObject() override; |
| |
|
| | const char* getViewProviderName() const override |
| | { |
| | return "PartDesignGui::ViewProviderExtrude"; |
| | } |
| | |
| |
|
| | static const char* SideTypesEnums[]; |
| |
|
| | protected: |
| | void onDocumentRestored() override; |
| | Base::Vector3d computeDirection(const Base::Vector3d& sketchVector, bool inverse); |
| | bool hasTaperedAngle() const; |
| | void onChanged(const App::Property* prop) override; |
| |
|
| |
|
| | |
| | enum class ExtrudeOption |
| | { |
| | MakeFace = 1, |
| | MakeFuse = 2, |
| | LegacyPocket = 4, |
| | InverseDirection = 8, |
| | }; |
| |
|
| | using ExtrudeOptions = Base::Flags<ExtrudeOption>; |
| |
|
| | App::DocumentObjectExecReturn* buildExtrusion(ExtrudeOptions options); |
| |
|
| | |
| | |
| | |
| | |
| | |
| | TopoShape makeShellFromUpToShape(TopoShape shape, TopoShape sketchshape, gp_Dir dir); |
| |
|
| | |
| | |
| | |
| | void updateProperties(); |
| |
|
| | TopoShape generateSingleExtrusionSide( |
| | const TopoShape& sketchShape, |
| | const std::string& method, |
| | double length, |
| | double taperAngleDeg, |
| | App::PropertyLinkSub& upToFacePropHandle, |
| | App::PropertyLinkSubList& upToShapePropHandle, |
| | gp_Dir dir, |
| | double offsetVal, |
| | bool makeFace, |
| | const TopoShape& base, |
| | TopLoc_Location& invObjLoc |
| | ); |
| | }; |
| |
|
| | } |
| |
|
| | ENABLE_BITMASK_OPERATORS(PartDesign::FeatureExtrude::ExtrudeOption) |
| |
|
| | #endif |
| |
|