Skip to content

Commit

Permalink
+ fixes #1878: model refine exception
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Dec 28, 2014
1 parent 7d8b1f3 commit e329cb5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Mod/Part/App/modelRefine.cpp
Expand Up @@ -519,11 +519,13 @@ bool wireEncirclesAxis(const TopoDS_Wire& wire, const Handle(Geom_CylindricalSur
gp_Vec dv = gp_Vec(pend.X(), pend.Y(), pend.Z()) - bv; gp_Vec dv = gp_Vec(pend.X(), pend.Y(), pend.Z()) - bv;
double dist = dv.Magnitude(); double dist = dv.Magnitude();


// Check orientation of this piece in relation to cylinder axis if (dist > 0) {
if ((bv - cv).Crossed(dv).IsOpposite(av, Precision::Confusion())) // Check orientation of this piece in relation to cylinder axis
dist = -dist; if ((bv - cv).Crossed(dv).IsOpposite(av, Precision::Confusion()))
dist = -dist;


length += dist; length += dist;
}
} }


begin = pend; begin = pend;
Expand Down

0 comments on commit e329cb5

Please sign in to comment.