Partial Restore: ensure line segment length when x coordinate is exactly zero
fixes #4012
This commit is contained in:
committed by
abdullahtahiriyo
parent
f8b715aa7c
commit
aa9cd0d91c
@@ -3752,7 +3752,13 @@ void GeomLineSegment::Restore (Base::XMLReader &reader)
|
||||
// the points are too close. The best try to restore is incrementing the distance.
|
||||
// for other objects, the best effort may be just to leave default values.
|
||||
reader.setPartialRestore(true);
|
||||
end = start + Base::Vector3d(start.x*DBL_EPSILON,0,0);
|
||||
|
||||
if(start.x == 0) {
|
||||
end = start + Base::Vector3d(DBL_EPSILON,0,0);
|
||||
}
|
||||
else {
|
||||
end = start + Base::Vector3d(start.x*DBL_EPSILON,0,0);
|
||||
}
|
||||
|
||||
setPoints(start, end);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user