Set placement property to read-only for skecth/ dress up features
This commit is contained in:
@@ -48,4 +48,14 @@ void DressUp::positionByBase(void)
|
||||
this->Placement.setValue(base->Placement.getValue());
|
||||
}
|
||||
|
||||
void DressUp::onChanged(const App::Property* prop)
|
||||
{
|
||||
if (prop == &Base) {
|
||||
// if attached to a sketch then mark it as read-only
|
||||
this->Placement.StatusBits.set(2, Base.getValue() != 0);
|
||||
}
|
||||
|
||||
Feature::onChanged(prop);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -41,7 +41,10 @@ public:
|
||||
|
||||
/// updates the Placement property from the Placement of Base
|
||||
void positionByBase(void);
|
||||
};
|
||||
|
||||
protected:
|
||||
void onChanged(const App::Property* prop);
|
||||
};
|
||||
|
||||
} //namespace PartDesign
|
||||
|
||||
|
||||
@@ -89,6 +89,16 @@ void SketchBased::positionBySketch(void)
|
||||
}
|
||||
}
|
||||
|
||||
void SketchBased::onChanged(const App::Property* prop)
|
||||
{
|
||||
if (prop == &Sketch) {
|
||||
// if attached to a sketch then mark it as read-only
|
||||
this->Placement.StatusBits.set(2, Sketch.getValue() != 0);
|
||||
}
|
||||
|
||||
Feature::onChanged(prop);
|
||||
}
|
||||
|
||||
bool SketchBased::isInside(const TopoDS_Wire& wire1, const TopoDS_Wire& wire2) const
|
||||
{
|
||||
Bnd_Box box1;
|
||||
|
||||
@@ -51,6 +51,7 @@ public:
|
||||
int getSketchAxisCount(void) const;
|
||||
|
||||
protected:
|
||||
void onChanged(const App::Property* prop);
|
||||
TopoDS_Face validateFace(const TopoDS_Face&) const;
|
||||
TopoDS_Shape makeFace(const std::vector<TopoDS_Wire>&) const;
|
||||
TopoDS_Shape makeFace(std::list<TopoDS_Wire>&) const; // for internal use only
|
||||
|
||||
Reference in New Issue
Block a user