#include "PartSet_WidgetSketchLabel.h"
#include "PartSet_Validators.h"
#include "PartSet_Tools.h"
-#include "ModuleBase_WidgetValidated.h"
#include "PartSet_WidgetPoint2d.h"
#include "PartSet_WidgetPoint2dDistance.h"
#include "PartSet_WidgetShapeSelector.h"
#include <ModuleBase_IViewWindow.h>
#include <ModuleBase_IPropertyPanel.h>
#include <ModuleBase_WidgetEditor.h>
+#include <ModuleBase_WidgetValidated.h>
#include <ModuleBase_FilterFactory.h>
#include <ModuleBase_Tools.h>
#include <GeomValidators_ShapeType.h>
#include <ModelAPI_Data.h>
#include <ModelAPI_Session.h>
#include <ModelAPI_ShapeValidator.h>
+#include <ModelAPI_ResultBody.h>
#include <GeomDataAPI_Point2D.h>
#include <GeomDataAPI_Point.h>
#include <SketchPlugin_Arc.h>
#include <SketchPlugin_Circle.h>
#include <SketchPlugin_Point.h>
+#include <SketchPlugin_ConstraintAngle.h>
#include <SketchPlugin_ConstraintLength.h>
#include <SketchPlugin_ConstraintDistance.h>
#include <SketchPlugin_ConstraintParallel.h>
#include <QDebug>
#endif
-
-
/*!Create and return new instance of XGUI_Module*/
extern "C" PARTSET_EXPORT ModuleBase_IModule* createModule(ModuleBase_IWorkshop* theWshop)
{
aFactory->registerValidator("PartSet_HVDirSelection", new PartSet_HVDirSelection);
aFactory->registerValidator("PartSet_TangentSelection", new PartSet_TangentSelection);
aFactory->registerValidator("PartSet_FilletSelection", new PartSet_FilletSelection);
+ aFactory->registerValidator("PartSet_AngleSelection", new PartSet_AngleSelection);
aFactory->registerValidator("PartSet_DifferentObjects", new PartSet_DifferentObjectsValidator);
aFactory->registerValidator("PartSet_DifferentShapes", new ModelAPI_ShapeValidator);
std::string aId = aFeature->getKind();
if ((aId == SketchPlugin_ConstraintRadius::ID()) ||
(aId == SketchPlugin_ConstraintLength::ID()) ||
- (aId == SketchPlugin_ConstraintDistance::ID())) {
+ (aId == SketchPlugin_ConstraintDistance::ID()) ||
+ (aId == SketchPlugin_ConstraintAngle::ID())) {
editFeature(aFeature);
}
}
}
}
+void PartSet_Module::onBeforeObjectErase(ObjectPtr theObject, AISObjectPtr theAIS)
+{
+ // it should be recomputed in order to disappear in the viewer if the corresponded object
+ // is erased
+ if (myCustomPrs->isActive())
+ myCustomPrs->customize(theObject);
+}
+
void PartSet_Module::onViewTransformed(int theTrsfType)
{
// Set length of arrows constant in pixel size
theMenu->addAction(myMenuMgr->action("EDIT_CMD"));
}
- ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(aObject);
+ ResultBodyPtr aResult = std::dynamic_pointer_cast<ModelAPI_ResultBody>(aObject);
if( aResult.get() )
{
theMenu->addAction(myMenuMgr->action("SELECT_PARENT_CMD"));