| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| |
|
| |
|
| | #ifndef PARTDESIGN_Feature_H
|
| | #define PARTDESIGN_Feature_H
|
| |
|
| | #include <App/PropertyStandard.h>
|
| | #include <App/SuppressibleExtension.h>
|
| | #include <Mod/Part/App/PartFeature.h>
|
| | #include <Mod/Part/App/PreviewExtension.h>
|
| | #include <Mod/PartDesign/PartDesignGlobal.h>
|
| |
|
| | class gp_Pnt;
|
| | class gp_Pln;
|
| |
|
| |
|
| |
|
| | namespace PartDesign
|
| | {
|
| |
|
| | using TopoShape = Part::TopoShape;
|
| |
|
| | class Body;
|
| |
|
| | |
| | |
| | |
| |
|
| | class PartDesignExport Feature: public Part::Feature,
|
| | public App::SuppressibleExtension,
|
| | public Part::PreviewExtension
|
| | {
|
| | PROPERTY_HEADER_WITH_OVERRIDE(PartDesign::Feature);
|
| |
|
| | public:
|
| | Feature();
|
| |
|
| | enum SingleSolidRuleMode
|
| | {
|
| | Disabled = 0,
|
| | Enforced = 1
|
| | };
|
| |
|
| |
|
| | App::PropertyLink BaseFeature;
|
| | App::PropertyLinkHidden _Body;
|
| |
|
| |
|
| | Part::PropertyPartShape SuppressedShape;
|
| |
|
| | Base::Placement SuppressedPlacement;
|
| |
|
| | App::DocumentObjectExecReturn* recompute() override;
|
| | App::DocumentObjectExecReturn* recomputePreview() override;
|
| |
|
| | short mustExecute() const override;
|
| |
|
| |
|
| | static bool isDatum(const App::DocumentObject* feature);
|
| |
|
| |
|
| | Body* getFeatureBody() const;
|
| |
|
| | |
| | |
| | |
| | |
| | |
| |
|
| | virtual Part::Feature* getBaseObject(bool silent = false) const;
|
| |
|
| | virtual const TopoDS_Shape& getBaseShape() const;
|
| |
|
| | Part::TopoShape getBaseTopoShape(bool silent = false) const;
|
| |
|
| |
|
| | virtual void getGeneratedShapes(
|
| | std::vector<int>& faces,
|
| | std::vector<int>& edges,
|
| | std::vector<int>& vertices
|
| | ) const;
|
| |
|
| | virtual void updatePreviewShape();
|
| |
|
| | PyObject* getPyObject() override;
|
| |
|
| | const char* getViewProviderName() const override
|
| | {
|
| | return "PartDesignGui::ViewProvider";
|
| | }
|
| |
|
| | void onChanged(const App::Property* prop) override;
|
| |
|
| | App::DocumentObject* getSubObject(
|
| | const char* subname,
|
| | PyObject** pyObj,
|
| | Base::Matrix4D* pmat,
|
| | bool transform,
|
| | int depth
|
| | ) const override;
|
| |
|
| |
|
| | protected:
|
| | |
| | |
| |
|
| | TopoShape getSolid(const TopoShape&) const;
|
| | static int countSolids(const TopoDS_Shape&, TopAbs_ShapeEnum type = TopAbs_SOLID);
|
| |
|
| | |
| | |
| |
|
| | TopoShape fixSolids(const TopoShape&);
|
| |
|
| | |
| | |
| |
|
| | bool isSingleSolidRuleSatisfied(const TopoDS_Shape&, TopAbs_ShapeEnum type = TopAbs_SOLID);
|
| | SingleSolidRuleMode singleSolidRuleMode() const;
|
| |
|
| | void updateSuppressedShape();
|
| |
|
| | |
| | |
| |
|
| | void setMaterialToBodyMaterial();
|
| |
|
| |
|
| | static const gp_Pnt getPointFromFace(const TopoDS_Face& f);
|
| |
|
| | static gp_Pln makePlnFromPlane(const App::DocumentObject* obj);
|
| |
|
| | static TopoDS_Shape makeShapeFromPlane(const App::DocumentObject* obj);
|
| | static TopoShape makeTopoShapeFromPlane(const App::DocumentObject* obj);
|
| | };
|
| |
|
| | using FeaturePython = App::FeaturePythonT<Feature>;
|
| |
|
| | }
|
| |
|
| |
|
| | #endif
|
| |
|