Part: Rename AttachExtension::Support property to AttachmentSupport, to avoid name conflict with base features. Fixes #7052
This commit is contained in:
committed by
Adrián Insaurralde Avalos
parent
2643902b6b
commit
fbd8767242
@@ -62,7 +62,7 @@ Line::Line()
|
||||
myShape.Infinite(Standard_True);
|
||||
Shape.setValue(myShape);
|
||||
|
||||
Support.touch();
|
||||
AttachmentSupport.touch();
|
||||
}
|
||||
|
||||
Line::~Line() = default;
|
||||
|
||||
@@ -147,11 +147,6 @@ void FeaturePrimitive::onChanged(const App::Property* prop)
|
||||
FeatureAddSub::onChanged(prop);
|
||||
}
|
||||
|
||||
void FeaturePrimitive::handleChangedPropertyName(Base::XMLReader &reader, const char* TypeName, const char* PropName)
|
||||
{
|
||||
extHandleChangedPropertyName(reader, TypeName, PropName); // AttachExtension
|
||||
}
|
||||
|
||||
// suppress warning about tp_print for Py3.8
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
|
||||
@@ -61,7 +61,6 @@ public:
|
||||
return PartDesign::FeatureAddSub::execute();
|
||||
}
|
||||
protected:
|
||||
void handleChangedPropertyName(Base::XMLReader &reader, const char* TypeName, const char* PropName) override;
|
||||
//make the boolean ops with the primitives provided by the derived features
|
||||
App::DocumentObjectExecReturn* execute(const TopoDS_Shape& primitiveShape);
|
||||
Type primitiveType = Box;
|
||||
|
||||
@@ -99,7 +99,7 @@ void ProfileBased::positionByPrevious()
|
||||
else {
|
||||
//no base. Use either Sketch support's placement, or sketch's placement itself.
|
||||
Part::Part2DObject* sketch = getVerifiedSketch();
|
||||
App::DocumentObject* support = sketch->Support.getValue();
|
||||
App::DocumentObject* support = sketch->AttachmentSupport.getValue();
|
||||
if (support && support->isDerivedFrom(App::GeoFeature::getClassTypeId())) {
|
||||
this->Placement.setValue(static_cast<App::GeoFeature*>(support)->Placement.getValue());
|
||||
}
|
||||
@@ -307,13 +307,13 @@ const TopoDS_Face ProfileBased::getSupportFace() const
|
||||
|
||||
TopoDS_Face ProfileBased::getSupportFace(const Part::Part2DObject* sketch) const
|
||||
{
|
||||
if (sketch && sketch->MapMode.getValue() == Attacher::mmFlatFace && sketch->Support.getValue()) {
|
||||
const auto& Support = sketch->Support;
|
||||
App::DocumentObject* ref = Support.getValue();
|
||||
if (sketch && sketch->MapMode.getValue() == Attacher::mmFlatFace && sketch->AttachmentSupport.getValue()) {
|
||||
const auto& AttachmentSupport = sketch->AttachmentSupport;
|
||||
App::DocumentObject* ref = AttachmentSupport.getValue();
|
||||
|
||||
Part::Feature* part = dynamic_cast<Part::Feature*>(ref);
|
||||
if (part) {
|
||||
const std::vector<std::string>& sub = Support.getSubValues();
|
||||
const std::vector<std::string>& sub = AttachmentSupport.getSubValues();
|
||||
assert(sub.size() == 1);
|
||||
|
||||
if (sub.at(0).empty()) {
|
||||
@@ -385,7 +385,7 @@ Part::Feature* ProfileBased::getBaseObject(bool silent) const
|
||||
Part::Part2DObject* sketch = getVerifiedSketch(silent);
|
||||
const char* err = nullptr;
|
||||
|
||||
App::DocumentObject* spt = sketch->Support.getValue();
|
||||
App::DocumentObject* spt = sketch->AttachmentSupport.getValue();
|
||||
if (spt) {
|
||||
if (spt->isDerivedFrom(Part::Feature::getClassTypeId())) {
|
||||
rv = static_cast<Part::Feature*>(spt);
|
||||
|
||||
Reference in New Issue
Block a user