Sketcher: Clone: do not apply parallel constraint if angle constraint is applied on arc

This commit is contained in:
0penBrain
2022-11-17 13:55:38 +01:00
committed by abdullahtahiriyo
parent 300ca5b206
commit 8a574f5a51

View File

@@ -4302,13 +4302,15 @@ int SketchObject::addCopy(const std::vector<int> &geoIdList, const Base::Vector3
constNew->Second = fit->second; // first is already (*it->First)
newconstrVals.push_back(constNew);
}
else if ((*it)->Type == Sketcher::Angle && clone){
// Angles on a single Element are mapped to parallel constraints in clone mode
Constraint *constNew = (*it)->copy();
constNew->Type = Sketcher::Parallel;
constNew->isDriving = true;
constNew->Second = fit->second; // first is already (*it->First)
newconstrVals.push_back(constNew);
else if ((*it)->Type == Sketcher::Angle && clone) {
if (getGeometry((*it)->First)->getTypeId() == Part::GeomLineSegment::getClassTypeId()) {
// Angles on a single Element are mapped to parallel constraints in clone mode
Constraint *constNew = (*it)->copy();
constNew->Type = Sketcher::Parallel;
constNew->isDriving = true;
constNew->Second = fit->second; // first is already (*it->First)
newconstrVals.push_back(constNew);
}
}
else {
Constraint *constNew = (*it)->copy();