+ fixes #0001878: model refine exception

This commit is contained in:
wmayer 2014-12-28 18:10:02 +01:00
parent 7d8b1f30c3
commit e329cb5c3a

View File

@ -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;
double dist = dv.Magnitude();
// Check orientation of this piece in relation to cylinder axis
if ((bv - cv).Crossed(dv).IsOpposite(av, Precision::Confusion()))
dist = -dist;
if (dist > 0) {
// Check orientation of this piece in relation to cylinder axis
if ((bv - cv).Crossed(dv).IsOpposite(av, Precision::Confusion()))
dist = -dist;
length += dist;
length += dist;
}
}
begin = pend;