//#include <SketchPlugin_ConstraintRigid.h>
#include <Events_Loop.h>
+#include <Config_PropManager.h>
#include <StdSelect_TypeOfFace.hxx>
#include <TopoDS_Vertex.hxx>
new ModuleBase_FilterCustom(aSelectFilter));
}
+void PartSet_Module::registerProperties()
+{
+ Config_PropManager::registerProp("Sketch planes", "planes_size", "Size", Config_Prop::Double,
+ PLANE_SIZE);
+ Config_PropManager::registerProp("Sketch planes", "planes_thickness", "Thickness",
+ Config_Prop::Integer, SKETCH_WIDTH);
+}
+
void PartSet_Module::operationCommitted(ModuleBase_Operation* theOperation)
{
if (theOperation->isEditOperation())
if (aSketchFeature.get() != NULL) {
FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
- if (aFeature.get() != NULL) {
+ // MPV: the second and third conditions to avoid crash on exit for application
+ if (aFeature.get() != NULL && aFeature->data().get() && aFeature->data()->isValid()) {
if (aFeature == aSketchFeature) {
aCanDisplay = false;
}
- else {
+ else if (aSketchFeature.get() && aSketchFeature->data().get() &&
+ aSketchFeature->data()->isValid()) {
for (int i = 0; i < aSketchFeature->numberOfSubs() && !aCanDisplay; i++) {
FeaturePtr aSubFeature = aSketchFeature->subFeature(i);
std::list<ResultPtr> aResults = aSubFeature->results();