+ 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
|
@ -557,7 +557,7 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
|
|||
}
|
||||
|
||||
this->Constraints.setValues(newVals);
|
||||
|
||||
|
||||
movePoint(GeoId, end, point1);
|
||||
movePoint(newGeoId, start, point2);
|
||||
|
||||
|
@ -661,9 +661,9 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
|
|||
std::vector< Part::Geometry * > newVals(geomlist);
|
||||
newVals[GeoId] = geoNew;
|
||||
Geometry.setValues(newVals);
|
||||
|
||||
delete geoNew;
|
||||
|
||||
rebuildVertexIndex();
|
||||
|
||||
// go through all constraints and replace the point (GeoId,end) with (newGeoId,end)
|
||||
/*const std::vector<Constraint *> &constraints = this->Constraints.getValues();
|
||||
std::vector<Constraint *> newVals(constraints);
|
||||
|
@ -676,7 +676,7 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
|
|||
constraints[i]->Second = newGeoId;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// constrain the trimming points on the corresponding geometries
|
||||
Sketcher::Constraint *newConstr = new Sketcher::Constraint();
|
||||
newConstr->Type = Sketcher::PointOnObject;
|
||||
|
@ -756,7 +756,7 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
|
|||
Constraint *constNew = newVals[i]->clone();
|
||||
constNew->First = newGeoId;
|
||||
newVals[i] = constNew;
|
||||
|
||||
|
||||
} else if (constraints[i]->Second == GeoId &&
|
||||
constraints[i]->SecondPos == end) {
|
||||
|
||||
|
|
|
@ -1969,23 +1969,23 @@ Restart:
|
|||
Base::Vector3d constrPos2 = midpos2 + (norm2 * scale * 2.5);
|
||||
constrPos2 = seekConstraintPosition(constrPos2, dir2, scale * 2.5, edit->constrGroup->getChild(i));
|
||||
|
||||
// Translate the Icon based on calculated position
|
||||
Base::Vector3d relPos1 = constrPos1 - midpos1 ; // Relative Position of Icons to Midpoint1
|
||||
Base::Vector3d relPos2 = constrPos2 - midpos2 ; // Relative Position of Icons to Midpoint2
|
||||
// Translate the Icon based on calculated position
|
||||
Base::Vector3d relPos1 = constrPos1 - midpos1 ; // Relative Position of Icons to Midpoint1
|
||||
Base::Vector3d relPos2 = constrPos2 - midpos2 ; // Relative Position of Icons to Midpoint2
|
||||
|
||||
relPos1 = relPos1 / scale;
|
||||
relPos2 = relPos2 / scale;
|
||||
relPos1 = relPos1 / 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
|
||||
dynamic_cast<SoZoomTranslation *>(sep->getChild(1))->translation = SbVec3f(relPos1.x, relPos1.y, 0);
|
||||
//Reference Position that is scaled according to zoom
|
||||
dynamic_cast<SoZoomTranslation *>(sep->getChild(1))->translation = SbVec3f(relPos1.x, relPos1.y, 0);
|
||||
|
||||
Base::Vector3d secondPos = midpos2 - midpos1;
|
||||
dynamic_cast<SoZoomTranslation *>(sep->getChild(3))->abPos = SbVec3f(secondPos.x, secondPos.y, zConstr); //Absolute Reference
|
||||
Base::Vector3d secondPos = midpos2 - midpos1;
|
||||
dynamic_cast<SoZoomTranslation *>(sep->getChild(3))->abPos = SbVec3f(secondPos.x, secondPos.y, zConstr); //Absolute Reference
|
||||
|
||||
//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);
|
||||
//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);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user