Skip to content

Commit

Permalink
Sketcher: fix circular external edge projection
Browse files Browse the repository at this point in the history
  • Loading branch information
realthunder committed Jan 7, 2022
1 parent 42d6648 commit 4fcab4d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Mod/Sketcher/App/SketchObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7022,8 +7022,6 @@ void SketchObject::rebuildExternalGeometry(bool defining)
GeomAPI_ProjectPointOnSurf proj(cnt,gPlane);
cnt = proj.NearestPoint();
circle.SetLocation(cnt);
cnt.Transform(mov);
circle.Transform(mov);

double cosTheta = fabs(vec1.Dot(vec2)); // cos of angle between the two planes, assuming vectirs are normalized to 1
double minorRadius = circle.Radius() * cosTheta;
Expand Down Expand Up @@ -7164,6 +7162,7 @@ void SketchObject::rebuildExternalGeometry(bool defining)
}
else { // general case, full circle
Base::Vector3d p(cnt.X(),cnt.Y(),cnt.Z()); // converting to FCAD style vector
invPlm.multVec(p,p); // transforming towards sketch's (x,y) coordinates

gp_Vec vecMajorAxis = vec1 ^ vec2; // major axis in 3D space
Base::Vector3d vectorMajorAxis(vecMajorAxis.X(),vecMajorAxis.Y(),vecMajorAxis.Z()); // maj axis into FCAD style vector
Expand Down

0 comments on commit 4fcab4d

Please sign in to comment.