1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0029732: Sewing produces result with high tolerance

Added re-construction  2D curve having shift by parameter relative to 3D curve by projection of the 3D curve on the surface.
This commit is contained in:
gka
2018-05-03 12:38:14 +03:00
parent 40e759a3b8
commit b378ae25c2
2 changed files with 3 additions and 7 deletions

View File

@@ -123,7 +123,6 @@
#include <TopTools_ListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <ShapeConstruct_ProjectCurveOnSurface.hxx>
#include <ShapeFix_Edge.hxx>
#include <ShapeBuild_Edge.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
@@ -759,7 +758,6 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Edge& edgeFirs
else itf2.Initialize(listFacesFirst);
Standard_Boolean isResEdge = Standard_False;
TopoDS_Face fac2;
for (; itf2.More(); itf2.Next()) {
Handle(Geom2d_Curve) c2d2, c2d21;
Standard_Real firstOld, lastOld;
@@ -943,8 +941,6 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Edge& edgeFirs
for (i = 1; i <= nbp; i++)
c3dpnt(i) = c3dAdapt.Value(first3d + (i - 1)*deltaT);
Standard_Real dist = 0., maxTol = -1.0;
Standard_Boolean more = Standard_True;
@@ -1006,8 +1002,8 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Edge& edgeFirs
}
aBuilder.SameParameter(edge, Standard_True);
}
}
Standard_Real tolEdge1 = BRep_Tool::Tolerance(edge);
if (tolEdge1 > MaxTolerance()) edge.Nullify();
return edge;

View File

@@ -469,8 +469,8 @@ Standard_Boolean ShapeAnalysis_Edge::CheckPoints (const gp_Pnt& P1A,
const Standard_Real preci2)
{
myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK);
if( (P1A.SquareDistance(P2B) < P1A.SquareDistance(P2A) ) &&
( P1B.SquareDistance(P2A) < P1B.SquareDistance(P2B)) )
if (P1A.Distance (P2B) + (P1B.Distance (P2A)) <
P1A.Distance (P2A) + (P1B.Distance (P2B)))
{
myStatus |= ShapeExtend::EncodeStatus(ShapeExtend_DONE1);
return Standard_True;