Rename superPlacement property to AttachmentOffset
The name Attachment Offset gives a better picture of what the property does.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user