mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0032701: Modeling Algorithms - 2d curve has bending near the degenerated edge of the face
ApproxInt_Approx, ApproxInt_KnotTools, BRepApprox_Approx, GeomInt_IntSS, IntTools_FaceFace: Analysis of curvature is added for adjusting ParametrizationType IntPatch_Intersection.cxx - adding methods for estimation of UV max step depending on used surfaces GeomInt_IntSS.cxx, IntTools_FaceFace.cxx - using methods for max step estimation Approx_SameParameter.cxx - adding control against big values. BOPAlgo_PaveFiller_6.cxx - adjusting position of faces before intersection
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <gp_Elips.hxx>
|
||||
#include <ApproxInt_KnotTools.hxx>
|
||||
|
||||
static
|
||||
void Parameters(const Handle(GeomAdaptor_Surface)&,
|
||||
@@ -502,7 +503,7 @@ void IntTools_FaceFace::Perform (const TopoDS_Face& aF1,
|
||||
Tolerances(myHS1, myHS2, TolTang);
|
||||
|
||||
{
|
||||
const Standard_Real UVMaxStep = 0.001;
|
||||
const Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep(myHS1, dom1, myHS2, dom2);
|
||||
const Standard_Real Deflection = 0.1;
|
||||
myIntersector.SetTolerances(TolArc, TolTang, UVMaxStep, Deflection);
|
||||
}
|
||||
@@ -1164,22 +1165,6 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
|
||||
tol2d = myTolApprox;
|
||||
}
|
||||
|
||||
if(myHS1 == myHS2) {
|
||||
theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, 30, Standard_False, aParType);
|
||||
rejectSurface = Standard_True;
|
||||
}
|
||||
else {
|
||||
if(reApprox && !rejectSurface)
|
||||
theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, 30, Standard_False, aParType);
|
||||
else {
|
||||
Standard_Integer iDegMax, iDegMin, iNbIter;
|
||||
//
|
||||
ApproxParameters(myHS1, myHS2, iDegMin, iDegMax, iNbIter);
|
||||
theapp3d.SetParameters(myTolApprox, tol2d, iDegMin, iDegMax,
|
||||
iNbIter, 30, Standard_True, aParType);
|
||||
}
|
||||
}
|
||||
//
|
||||
Standard_Real aReachedTol = Precision::Confusion();
|
||||
bIsDecomposited = IntTools_WLineTool::
|
||||
DecompositionOfWLine(WL,
|
||||
@@ -1227,6 +1212,35 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
|
||||
ilprm = (Standard_Integer)lprm;
|
||||
}
|
||||
}
|
||||
|
||||
Standard_Boolean anApprox = myApprox;
|
||||
if (typs1 == GeomAbs_Plane) {
|
||||
anApprox = Standard_False;
|
||||
anApprox1 = Standard_True;
|
||||
}
|
||||
else if (typs2 == GeomAbs_Plane) {
|
||||
anApprox = Standard_False;
|
||||
anApprox2 = Standard_True;
|
||||
}
|
||||
|
||||
aParType = ApproxInt_KnotTools::DefineParType(WL, ifprm, ilprm,
|
||||
anApprox, anApprox1, anApprox2);
|
||||
if (myHS1 == myHS2) {
|
||||
theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, 30, Standard_False, aParType);
|
||||
rejectSurface = Standard_True;
|
||||
}
|
||||
else {
|
||||
if (reApprox && !rejectSurface)
|
||||
theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, 30, Standard_False, aParType);
|
||||
else {
|
||||
Standard_Integer iDegMax, iDegMin, iNbIter;
|
||||
//
|
||||
ApproxParameters(myHS1, myHS2, iDegMin, iDegMax, iNbIter);
|
||||
theapp3d.SetParameters(myTolApprox, tol2d, iDegMin, iDegMax,
|
||||
iNbIter, 30, Standard_True, aParType);
|
||||
}
|
||||
}
|
||||
|
||||
//-- lbr :
|
||||
//-- Si une des surfaces est un plan , on approxime en 2d
|
||||
//-- sur cette surface et on remonte les points 2d en 3d.
|
||||
@@ -1892,6 +1906,7 @@ Handle(Geom_Curve) MakeBSpline (const Handle(IntPatch_WLine)& WL,
|
||||
enlarge=Standard_True;
|
||||
}
|
||||
//
|
||||
|
||||
if(!isuperiodic && enlarge) {
|
||||
|
||||
if(!Precision::IsInfinite(theumin) &&
|
||||
@@ -1907,6 +1922,7 @@ Handle(Geom_Curve) MakeBSpline (const Handle(IntPatch_WLine)& WL,
|
||||
else
|
||||
theumax = usup;
|
||||
}
|
||||
|
||||
//
|
||||
if(!isvperiodic && enlarge) {
|
||||
if(!Precision::IsInfinite(thevmin) &&
|
||||
@@ -1924,6 +1940,7 @@ Handle(Geom_Curve) MakeBSpline (const Handle(IntPatch_WLine)& WL,
|
||||
thevmax = vsup;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if(isuperiodic || isvperiodic) {
|
||||
Standard_Boolean correct = Standard_False;
|
||||
|
Reference in New Issue
Block a user