mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0027079: Bad approximation of intersection curves with variable curvature
1. Method Approx_ComputeLine::Perform is modified: now it contains also recursive calls after new line computation made by new method ApproxInt_MultiLine::MakeMLOneMorePoint. 2. New method MakeMLOneMorePoint is added to ApproxInt_MultiLine: it builds new sub-line as a part of main line with new point added into the middle of the longest interval between existing points. 3. Method ShapeConstruct_ProjectCurveOnSurface::ApproxPCurve is modified to avoid regressions: now it takes care of the set of initial points to be enough close to each other so that an interval between two adjacent points is less than half-period of the surface. 4. Modification in ShapeConstruct_ProjectCurveOnSurface: correction of pcurves of edges which extremities are in the singularities of surface.
This commit is contained in:
@@ -135,7 +135,13 @@ private:
|
||||
|
||||
|
||||
//! is internally used in the algorithm.
|
||||
Standard_EXPORT Standard_Boolean Compute (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer fpt, const Standard_Integer lpt, math_Vector& Para, Standard_Real& TheTol3d, Standard_Real& TheTol2d);
|
||||
Standard_EXPORT Standard_Boolean Compute (const GeomInt_TheMultiLineOfWLApprox& Line,
|
||||
const Standard_Integer fpt,
|
||||
const Standard_Integer lpt,
|
||||
math_Vector& Para,
|
||||
Standard_Real& TheTol3d,
|
||||
Standard_Real& TheTol2d,
|
||||
Standard_Integer& indbad);
|
||||
|
||||
//! is internally used in the algorithm.
|
||||
Standard_EXPORT Standard_Boolean ComputeCurve (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer firspt, const Standard_Integer lastpt);
|
||||
@@ -176,6 +182,7 @@ private:
|
||||
AppParCurves_Constraint myfirstC;
|
||||
AppParCurves_Constraint mylastC;
|
||||
Standard_Integer myMultiLineNb;
|
||||
Standard_Integer myNbPlusOnePoint;
|
||||
Standard_Boolean myIsClear;
|
||||
|
||||
|
||||
|
@@ -53,17 +53,34 @@ public:
|
||||
Standard_EXPORT GeomInt_TheImpPrmSvSurfacesOfWLApprox(const IntSurf_Quadric& Surf1, const Handle(Adaptor3d_HSurface)& Surf2);
|
||||
|
||||
//! returns True if Tg,Tguv1 Tguv2 can be computed.
|
||||
Standard_EXPORT Standard_Boolean Compute (Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, Standard_Real& v2, gp_Pnt& Pt, gp_Vec& Tg, gp_Vec2d& Tguv1, gp_Vec2d& Tguv2);
|
||||
Standard_EXPORT Standard_Boolean Compute (Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, Standard_Real& v2,
|
||||
gp_Pnt& Pt, gp_Vec& Tg, gp_Vec2d& Tguv1, gp_Vec2d& Tguv2);
|
||||
|
||||
Standard_EXPORT void Pnt (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Pnt& P);
|
||||
|
||||
Standard_EXPORT Standard_Boolean SeekPoint(const Standard_Real u1,
|
||||
const Standard_Real v1,
|
||||
const Standard_Real u2,
|
||||
const Standard_Real v2,
|
||||
IntSurf_PntOn2S& Point);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Tangency (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec& Tg);
|
||||
|
||||
Standard_EXPORT Standard_Boolean TangencyOnSurf1 (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec2d& Tg);
|
||||
|
||||
Standard_EXPORT Standard_Boolean TangencyOnSurf2 (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec2d& Tg);
|
||||
|
||||
|
||||
Standard_Boolean FillInitialVectorOfSolution(const Standard_Real u1,
|
||||
const Standard_Real v1,
|
||||
const Standard_Real u2,
|
||||
const Standard_Real v2,
|
||||
const Standard_Real binfu,
|
||||
const Standard_Real bsupu,
|
||||
const Standard_Real binfv,
|
||||
const Standard_Real bsupv,
|
||||
math_Vector& X,
|
||||
Standard_Real& TranslationU,
|
||||
Standard_Real& TranslationV);
|
||||
|
||||
|
||||
protected:
|
||||
|
@@ -41,6 +41,8 @@ public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
Standard_EXPORT GeomInt_TheMultiLineOfWLApprox();
|
||||
|
||||
//! The class SvSurfaces is used when the approximation algorithm
|
||||
//! needs some extra points on the line <line>.
|
||||
//! A New line is then created which shares the same surfaces and functions.
|
||||
@@ -51,6 +53,8 @@ public:
|
||||
const Standard_Address PtrSvSurfaces,
|
||||
const Standard_Integer NbP3d,
|
||||
const Standard_Integer NbP2d,
|
||||
const Standard_Boolean ApproxU1V1,
|
||||
const Standard_Boolean ApproxU2V2,
|
||||
const Standard_Real xo,
|
||||
const Standard_Real yo,
|
||||
const Standard_Real zo,
|
||||
@@ -66,6 +70,8 @@ public:
|
||||
Standard_EXPORT GeomInt_TheMultiLineOfWLApprox( const Handle(IntPatch_WLine)& line,
|
||||
const Standard_Integer NbP3d,
|
||||
const Standard_Integer NbP2d,
|
||||
const Standard_Boolean ApproxU1V1,
|
||||
const Standard_Boolean ApproxU2V2,
|
||||
const Standard_Real xo,
|
||||
const Standard_Real yo,
|
||||
const Standard_Real zo,
|
||||
@@ -112,8 +118,19 @@ public:
|
||||
//! Returns the 3d and 2d points of the multipoint <MPointIndex>.
|
||||
Standard_EXPORT Standard_Boolean Tangency (const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV, TColgp_Array1OfVec2d& tabV2d) const;
|
||||
|
||||
Standard_EXPORT GeomInt_TheMultiLineOfWLApprox MakeMLBetween (const Standard_Integer Low, const Standard_Integer High, const Standard_Integer NbPointsToInsert) const;
|
||||
//! Tries to make a sub-line between <Low> and <High> points of this line
|
||||
//! by adding <NbPointsToInsert> new points
|
||||
Standard_EXPORT GeomInt_TheMultiLineOfWLApprox MakeMLBetween (const Standard_Integer Low,
|
||||
const Standard_Integer High,
|
||||
const Standard_Integer NbPointsToInsert) const;
|
||||
|
||||
//! Tries to make a sub-line between <Low> and <High> points of this line
|
||||
//! by adding one more point between (indbad-1)-th and indbad-th points
|
||||
Standard_EXPORT Standard_Boolean MakeMLOneMorePoint (const Standard_Integer Low,
|
||||
const Standard_Integer High,
|
||||
const Standard_Integer indbad,
|
||||
GeomInt_TheMultiLineOfWLApprox& OtherLine) const;
|
||||
|
||||
//! Dump of the current multi-line.
|
||||
Standard_EXPORT void Dump() const;
|
||||
|
||||
@@ -121,23 +138,24 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
GeomInt_TheMultiLineOfWLApprox operator=(GeomInt_TheMultiLineOfWLApprox&);
|
||||
|
||||
private:
|
||||
const Standard_Address PtrOnmySvSurfaces;
|
||||
const Handle(IntPatch_WLine) myLine;
|
||||
const Standard_Integer indicemin;
|
||||
const Standard_Integer indicemax;
|
||||
const Standard_Integer nbp3d;
|
||||
const Standard_Integer nbp2d;
|
||||
const Standard_Boolean p2donfirst;
|
||||
const Standard_Real Xo;
|
||||
const Standard_Real Yo;
|
||||
const Standard_Real Zo;
|
||||
const Standard_Real U1o;
|
||||
const Standard_Real V1o;
|
||||
const Standard_Real U2o;
|
||||
const Standard_Real V2o;
|
||||
Standard_Address PtrOnmySvSurfaces;
|
||||
Handle(IntPatch_WLine) myLine;
|
||||
Standard_Integer indicemin;
|
||||
Standard_Integer indicemax;
|
||||
Standard_Integer nbp3d;
|
||||
Standard_Integer nbp2d;
|
||||
Standard_Boolean myApproxU1V1;
|
||||
Standard_Boolean myApproxU2V2;
|
||||
Standard_Boolean p2donfirst;
|
||||
Standard_Real Xo;
|
||||
Standard_Real Yo;
|
||||
Standard_Real Zo;
|
||||
Standard_Real U1o;
|
||||
Standard_Real V1o;
|
||||
Standard_Real U2o;
|
||||
Standard_Real V2o;
|
||||
|
||||
|
||||
};
|
||||
|
@@ -92,6 +92,13 @@ public:
|
||||
//! Is called if WhatStatus returned "PointsAdded".
|
||||
static GeomInt_TheMultiLineOfWLApprox MakeMLBetween (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer I1, const Standard_Integer I2, const Standard_Integer NbPMin);
|
||||
|
||||
//! Is called when the Bezier curve contains a loop
|
||||
static Standard_Boolean MakeMLOneMorePoint (const GeomInt_TheMultiLineOfWLApprox& ML,
|
||||
const Standard_Integer I1,
|
||||
const Standard_Integer I2,
|
||||
const Standard_Integer indbad,
|
||||
GeomInt_TheMultiLineOfWLApprox& OtherLine);
|
||||
|
||||
static Approx_Status WhatStatus (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer I1, const Standard_Integer I2);
|
||||
|
||||
//! Dump of the current multi-line.
|
||||
|
@@ -50,10 +50,17 @@ public:
|
||||
Standard_EXPORT GeomInt_ThePrmPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor3d_HSurface)& Surf2);
|
||||
|
||||
//! returns True if Tg,Tguv1 Tguv2 can be computed.
|
||||
Standard_EXPORT Standard_Boolean Compute (Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, Standard_Real& v2, gp_Pnt& Pt, gp_Vec& Tg, gp_Vec2d& Tguv1, gp_Vec2d& Tguv2);
|
||||
Standard_EXPORT Standard_Boolean Compute (Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, Standard_Real& v2,
|
||||
gp_Pnt& Pt, gp_Vec& Tg, gp_Vec2d& Tguv1, gp_Vec2d& Tguv2);
|
||||
|
||||
Standard_EXPORT void Pnt (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Pnt& P);
|
||||
|
||||
Standard_EXPORT Standard_Boolean SeekPoint(const Standard_Real u1,
|
||||
const Standard_Real v1,
|
||||
const Standard_Real u2,
|
||||
const Standard_Real v2,
|
||||
IntSurf_PntOn2S& Point);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Tangency (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec& Tg);
|
||||
|
||||
Standard_EXPORT Standard_Boolean TangencyOnSurf1 (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec2d& Tg);
|
||||
|
Reference in New Issue
Block a user