1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +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:
ifv
2021-12-02 17:02:17 +03:00
committed by smoskvin
parent 5614b1369a
commit 9eee5ab7e4
22 changed files with 776 additions and 135 deletions

View File

@@ -18,6 +18,7 @@
#include <Adaptor3d_TopolTool.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <Extrema_ExtPS.hxx>
//=======================================================================
//function : Perform
@@ -82,7 +83,7 @@ void GeomInt_IntSS::Perform(const Handle(Geom_Surface)& S1,
Standard_Real TolArc = Tol;
Standard_Real TolTang = Tol;
Standard_Real UVMaxStep = 0.001;
Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep(myHS1, dom1, myHS2, dom2);
Standard_Real Deflection = 0.1;
myIntersector.SetTolerances(TolArc,TolTang,UVMaxStep,Deflection);
@@ -184,3 +185,4 @@ void GeomInt_IntSS::Perform(const Handle(Geom_Surface)& S1,
StdFail_NotDone_Raise_if(!myIntersector.IsDone(),"GeomInt_IntSS::LineOnS2");
return slineS2(Index);
}

View File

@@ -106,7 +106,6 @@ public:
Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakeBSpline2d(const Handle(IntPatch_WLine)& theWLine, const Standard_Integer ideb, const Standard_Integer ifin, const Standard_Boolean onFirst);
protected:

View File

@@ -48,6 +48,7 @@
#include <IntRes2d_IntersectionSegment.hxx>
#include <IntSurf_Quadric.hxx>
#include <Precision.hxx>
#include <ApproxInt_KnotTools.hxx>
//=======================================================================
//function : AdjustUPeriodic
@@ -623,12 +624,31 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index,
ifprm = (Standard_Integer)fprm;
ilprm = (Standard_Integer)lprm;
}
//-- lbr :
//-- Si une des surfaces est un plan , on approxime en 2d
//-- sur cette surface et on remonte les points 2d en 3d.
Standard_Boolean anApprox = myApprox;
Standard_Boolean anApprox1 = myApprox1;
Standard_Boolean anApprox2 = myApprox2;
GeomAbs_SurfaceType typs1, typs2;
typs1 = myHS1->GetType();
typs2 = myHS2->GetType();
if (typs1 == GeomAbs_Plane) {
anApprox = Standard_False;
anApprox1 = Standard_True;
}
else if (typs2 == GeomAbs_Plane) {
anApprox = Standard_False;
anApprox2 = Standard_True;
}
Approx_ParametrizationType aParType = ApproxInt_KnotTools::DefineParType(WL, ifprm, ilprm,
anApprox, anApprox1, anApprox2);
theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, 30, myHS1 != myHS2, aParType);
//-- lbr :
//-- Si une des surfaces est un plan , on approxime en 2d
//-- sur cette surface et on remonte les points 2d en 3d.
//
if(typs1 == GeomAbs_Plane) {
theapp3d.Perform(myHS1, myHS2, WL, Standard_False,
@@ -646,12 +666,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index,
if ((typs1==GeomAbs_BezierSurface || typs1==GeomAbs_BSplineSurface) &&
(typs2==GeomAbs_BezierSurface || typs2==GeomAbs_BSplineSurface)) {
theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, 30, Standard_True);
//Standard_Boolean bUseSurfaces;
//bUseSurfaces=NotUseSurfacesForApprox(myFace1, myFace2, WL, ifprm, ilprm);
//if (bUseSurfaces) {
//theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, Standard_False);
//}
theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, 30, Standard_True, aParType);
}
}
//

View File

@@ -96,7 +96,11 @@ public:
Standard_EXPORT const AppParCurves_MultiBSpCurve& Value (const Standard_Integer Index) const;
Standard_EXPORT static void Parameters(const GeomInt_TheMultiLineOfWLApprox& Line,
const Standard_Integer firstP,
const Standard_Integer lastP,
const Approx_ParametrizationType Par,
math_Vector& TheParameters);
protected: