20 #ifndef SketchPlugin_Fillet_H_
21 #define SketchPlugin_Fillet_H_
23 #include "SketchPlugin.h"
25 #include "SketchPlugin_SketchEntity.h"
27 #include <GeomAPI_IPresentable.h>
28 #include <GeomDataAPI_Point2D.h>
40 inline static const std::string&
ID()
42 static const std::string MY_FEATURE_ID(
"SketchFillet");
49 static const std::string
ID(
"fillet_point");
54 SKETCHPLUGIN_EXPORT
virtual const std::string&
getKind()
61 SKETCHPLUGIN_EXPORT
virtual void execute();
67 SKETCHPLUGIN_EXPORT
virtual AISObjectPtr
getAISObject(AISObjectPtr thePrevious);
71 SKETCHPLUGIN_EXPORT
virtual bool isMacro()
const {
return true;}
77 SKETCHPLUGIN_EXPORT
virtual void move(
const double,
const double) {}
83 bool calculateFilletParameters();
86 FeaturePtr createFilletArc();
89 FeaturePtr createFilletApex(
const std::shared_ptr<GeomAPI_Pnt2d>& theCoordinates);
96 void removeReferencesButKeepDistances(std::set<FeaturePtr>& theFeaturesToRemove,
97 const AttributePoint2DPtr theFilletPoints[2]);
99 bool findFeaturesContainingFilletPoint(std::shared_ptr<GeomDataAPI_Point2D> theFilletPoint);
102 FeaturePtr myBaseFeatures[2];
103 std::string myFeatAttributes[4];
105 bool myIsNotInversed[2];
106 bool myFilletCreated;
107 std::shared_ptr<GeomAPI_XY> myCenterXY;
108 std::shared_ptr<GeomAPI_XY> myTangentXY1;
109 std::shared_ptr<GeomAPI_XY> myTangentXY2;
A class which defines an interface of object which is able to create its own presentation.
Definition: GeomAPI_IPresentable.h:29
2 coordinates: they may represent vector or point or something else
Definition: GeomAPI_XY.h:32
Feature for creation of a new arc filleting two objects which have coincident point.
Definition: SketchPlugin_Fillet.h:37
virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious)
Returns the AIS preview.
Definition: SketchPlugin_Fillet.cpp:168
SketchPlugin_Fillet()
Use plugin manager for features creation.
Definition: SketchPlugin_Fillet.cpp:85
virtual void initAttributes()
Request for initialization of data model of the feature: adding all attributes.
Definition: SketchPlugin_Fillet.cpp:91
virtual void execute()
Creates a new part document if needed.
Definition: SketchPlugin_Fillet.cpp:96
static const std::string & ID()
Feature kind.
Definition: SketchPlugin_Fillet.h:40
virtual const std::string & getKind()
Definition: SketchPlugin_Fillet.h:54
virtual void move(const double, const double)
Reimplemented from SketchPlugin_Feature::move().
Definition: SketchPlugin_Fillet.h:77
virtual bool isMacro() const
Reimplemented from ModelAPI_Feature::isMacro().
Definition: SketchPlugin_Fillet.h:71
virtual bool isPreviewNeeded() const
Returns true if preview update during the edition needed.
Definition: SketchPlugin_Fillet.h:73
static const std::string & FILLET_POINT_ID()
Attribute name of fillet point.
Definition: SketchPlugin_Fillet.h:47
Sketch Entity for creation of the new feature in PartSet.
Definition: SketchPlugin_SketchEntity.h:45