Path: fix Area tolerance problem
This commit is contained in:
@@ -2143,7 +2143,7 @@ TopoDS_Shape Area::toShape(const CCurve &_c, const gp_Trsf *trsf, int reorient)
|
||||
continue;
|
||||
}
|
||||
gp_Pnt pnext(v.m_p.x,v.m_p.y,0);
|
||||
if(pnext.SquareDistance(pt)<Precision::SquareConfusion())
|
||||
if(pnext.SquareDistance(pt)<=Precision::SquareConfusion())
|
||||
continue;
|
||||
if(v.m_type == 0) {
|
||||
auto edge = BRepBuilderAPI_MakeEdge(pt,pnext).Edge();
|
||||
@@ -2531,7 +2531,7 @@ struct ShapeInfo{
|
||||
|
||||
//checking the case of bestpoint == wire start
|
||||
if(state==0 && !mySupportEdge &&
|
||||
pprev.SquareDistance(myBestPt)<Precision::SquareConfusion()) {
|
||||
pprev.SquareDistance(myBestPt)<=Precision::SquareConfusion()) {
|
||||
pend = myBestWire->pend();
|
||||
return myBestWire->wire;
|
||||
}
|
||||
@@ -2553,7 +2553,7 @@ struct ShapeInfo{
|
||||
Handle_Geom_Curve curve = BRep_Tool::Curve(edge, first, last);
|
||||
pt = curve->Value(last);
|
||||
bool reversed;
|
||||
if(pprev.SquareDistance(pt)<Precision::SquareConfusion()) {
|
||||
if(pprev.SquareDistance(pt)<=Precision::SquareConfusion()) {
|
||||
reversed = true;
|
||||
pt = curve->Value(first);
|
||||
}else
|
||||
@@ -2623,7 +2623,7 @@ struct ShapeInfo{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}else if(myBestPt.SquareDistance(pprev)<Precision::SquareConfusion()){
|
||||
}else if(myBestPt.SquareDistance(pprev)<=Precision::SquareConfusion()){
|
||||
pend = pprev;
|
||||
// AREA_TRACE("break vertex");
|
||||
//if best point is on some vertex
|
||||
@@ -2733,9 +2733,9 @@ struct ShapeInfoBuilder {
|
||||
if(!pos.Direct()) pos = gp_Ax3(pos.Ax2());
|
||||
const gp_Dir &dir = pos.Direction();
|
||||
gp_Ax3 dstPos;
|
||||
bool x0 = fabs(dir.X())<Precision::Confusion();
|
||||
bool y0 = fabs(dir.Y())<Precision::Confusion();
|
||||
bool z0 = fabs(dir.Z())<Precision::Confusion();
|
||||
bool x0 = fabs(dir.X())<=Precision::Confusion();
|
||||
bool y0 = fabs(dir.Y())<=Precision::Confusion();
|
||||
bool z0 = fabs(dir.Z())<=Precision::Confusion();
|
||||
switch(myArcPlane) {
|
||||
case Area::ArcPlaneAuto: {
|
||||
if(x0&&y0){
|
||||
|
||||
Reference in New Issue
Block a user