Rename superPlacement property to AttachmentOffset

The name Attachment Offset gives a better picture of what the
property does.
This commit is contained in:
Peter Lama
2017-10-28 10:47:26 -07:00
committed by wmayer
parent 98faf0c661
commit 033334474c
19 changed files with 192 additions and 165 deletions

View File

@@ -160,6 +160,11 @@ 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
}
PYTHON_TYPE_DEF(PrimitivePy, PartDesign::FeaturePy)
PYTHON_TYPE_IMP(PrimitivePy, PartDesign::FeaturePy)

View File

@@ -64,6 +64,7 @@ public:
return PartDesign::FeatureAddSub::execute();
}
protected:
void handleChangedPropertyName(Base::XMLReader &reader, const char* TypeName, const char* PropName);
//make the boolean ops with the primitives provided by the derived features
App::DocumentObjectExecReturn* execute(const TopoDS_Shape& primitiveShape);
Type primitiveType = Box;

View File

@@ -258,7 +258,7 @@ void fixSketchSupport (Sketcher::SketchObject* sketch)
Datum.c_str(), refStr.toStdString().c_str());
Gui::Command::doCommand(Gui::Command::Doc,"App.activeDocument().%s.MapMode = '%s'",
Datum.c_str(), AttachEngine::getModeName(Attacher::mmFlatFace).c_str());
Gui::Command::doCommand(Gui::Command::Doc,"App.activeDocument().%s.superPlacement.Base.z = %f",
Gui::Command::doCommand(Gui::Command::Doc,"App.activeDocument().%s.AttachmentOffset.Base.z = %f",
Datum.c_str(), offset);
Gui::Command::doCommand(Gui::Command::Doc,
"App.activeDocument().%s.insertObject(App.activeDocument().%s, App.activeDocument().%s)",

View File

@@ -35,7 +35,7 @@ class TestDatumPoint(unittest.TestCase):
self.DatumPoint.MapMode = 'ObjectOrigin'
self.Body.addObject(self.DatumPoint)
self.Doc.recompute()
self.assertEqual(self.DatumPoint.superPlacement.Base, App.Vector(0))
self.assertEqual(self.DatumPoint.AttachmentOffset.Base, App.Vector(0))
def tearDown(self):
#closing doc