diff --git a/src/Mod/PartDesign/App/FeatureLinearPattern.cpp b/src/Mod/PartDesign/App/FeatureLinearPattern.cpp index 2ba1df02a2..d34233ef42 100644 --- a/src/Mod/PartDesign/App/FeatureLinearPattern.cpp +++ b/src/Mod/PartDesign/App/FeatureLinearPattern.cpp @@ -113,16 +113,24 @@ const std::list LinearPattern::getTransformations(const std::vectorgetTypeId().isDerivedFrom(Part::Part2DObject::getClassTypeId())) { Part::Part2DObject* refSketch = static_cast(refObject); Base::Axis axis; - if (subStrings[0] == "H_Axis") + if (subStrings[0] == "H_Axis") { axis = refSketch->getAxis(Part::Part2DObject::H_Axis); - else if (subStrings[0] == "V_Axis") + axis *= refSketch->Placement.getValue(); + } + else if (subStrings[0] == "V_Axis") { axis = refSketch->getAxis(Part::Part2DObject::V_Axis); - else if (subStrings[0] == "N_Axis") + axis *= refSketch->Placement.getValue(); + } + else if (subStrings[0] == "N_Axis") { axis = refSketch->getAxis(Part::Part2DObject::N_Axis); + axis *= refSketch->Placement.getValue(); + } else if (subStrings[0].compare(0, 4, "Axis") == 0) { int AxId = std::atoi(subStrings[0].substr(4,4000).c_str()); - if (AxId >= 0 && AxId < refSketch->getAxisCount()) + if (AxId >= 0 && AxId < refSketch->getAxisCount()) { axis = refSketch->getAxis(AxId); + axis *= refSketch->Placement.getValue(); + } } else if (subStrings[0].compare(0, 4, "Edge") == 0) { Part::TopoShape refShape = refSketch->Shape.getShape(); @@ -136,10 +144,12 @@ const std::list LinearPattern::getTransformations(const std::vectorPlacement.getValue(); dir = gp_Dir(axis.getDirection().x, axis.getDirection().y, axis.getDirection().z); } else if (refObject->getTypeId().isDerivedFrom(PartDesign::Plane::getClassTypeId())) { PartDesign::Plane* plane = static_cast(refObject);