+ fix indentation and strip trailing spaces
+ fix small bug with trimming of circles in the Sketcher git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5014 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
parent
3764181284
commit
f9646b3956
|
@ -661,8 +661,8 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
|
||||||
std::vector< Part::Geometry * > newVals(geomlist);
|
std::vector< Part::Geometry * > newVals(geomlist);
|
||||||
newVals[GeoId] = geoNew;
|
newVals[GeoId] = geoNew;
|
||||||
Geometry.setValues(newVals);
|
Geometry.setValues(newVals);
|
||||||
|
|
||||||
delete geoNew;
|
delete geoNew;
|
||||||
|
rebuildVertexIndex();
|
||||||
|
|
||||||
// go through all constraints and replace the point (GeoId,end) with (newGeoId,end)
|
// go through all constraints and replace the point (GeoId,end) with (newGeoId,end)
|
||||||
/*const std::vector<Constraint *> &constraints = this->Constraints.getValues();
|
/*const std::vector<Constraint *> &constraints = this->Constraints.getValues();
|
||||||
|
|
|
@ -1969,23 +1969,23 @@ Restart:
|
||||||
Base::Vector3d constrPos2 = midpos2 + (norm2 * scale * 2.5);
|
Base::Vector3d constrPos2 = midpos2 + (norm2 * scale * 2.5);
|
||||||
constrPos2 = seekConstraintPosition(constrPos2, dir2, scale * 2.5, edit->constrGroup->getChild(i));
|
constrPos2 = seekConstraintPosition(constrPos2, dir2, scale * 2.5, edit->constrGroup->getChild(i));
|
||||||
|
|
||||||
// Translate the Icon based on calculated position
|
// Translate the Icon based on calculated position
|
||||||
Base::Vector3d relPos1 = constrPos1 - midpos1 ; // Relative Position of Icons to Midpoint1
|
Base::Vector3d relPos1 = constrPos1 - midpos1 ; // Relative Position of Icons to Midpoint1
|
||||||
Base::Vector3d relPos2 = constrPos2 - midpos2 ; // Relative Position of Icons to Midpoint2
|
Base::Vector3d relPos2 = constrPos2 - midpos2 ; // Relative Position of Icons to Midpoint2
|
||||||
|
|
||||||
relPos1 = relPos1 / scale;
|
relPos1 = relPos1 / scale;
|
||||||
relPos2 = relPos2 / scale;
|
relPos2 = relPos2 / scale;
|
||||||
|
|
||||||
dynamic_cast<SoZoomTranslation *>(sep->getChild(1))->abPos = SbVec3f(midpos1.x, midpos1.y, zConstr); //Absolute Reference
|
dynamic_cast<SoZoomTranslation *>(sep->getChild(1))->abPos = SbVec3f(midpos1.x, midpos1.y, zConstr); //Absolute Reference
|
||||||
|
|
||||||
//Reference Position that is scaled according to zoom
|
//Reference Position that is scaled according to zoom
|
||||||
dynamic_cast<SoZoomTranslation *>(sep->getChild(1))->translation = SbVec3f(relPos1.x, relPos1.y, 0);
|
dynamic_cast<SoZoomTranslation *>(sep->getChild(1))->translation = SbVec3f(relPos1.x, relPos1.y, 0);
|
||||||
|
|
||||||
Base::Vector3d secondPos = midpos2 - midpos1;
|
Base::Vector3d secondPos = midpos2 - midpos1;
|
||||||
dynamic_cast<SoZoomTranslation *>(sep->getChild(3))->abPos = SbVec3f(secondPos.x, secondPos.y, zConstr); //Absolute Reference
|
dynamic_cast<SoZoomTranslation *>(sep->getChild(3))->abPos = SbVec3f(secondPos.x, secondPos.y, zConstr); //Absolute Reference
|
||||||
|
|
||||||
//Reference Position that is scaled according to zoom
|
//Reference Position that is scaled according to zoom
|
||||||
dynamic_cast<SoZoomTranslation *>(sep->getChild(3))->translation = SbVec3f(relPos2.x -relPos1.x, relPos2.y -relPos1.y, 0);
|
dynamic_cast<SoZoomTranslation *>(sep->getChild(3))->translation = SbVec3f(relPos2.x -relPos1.x, relPos2.y -relPos1.y, 0);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user