mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0027341: Incorrect exact HLR results
- removal of excess interferences in case of simple hiding face - correct processing of boundary edges coinciding with outlines - change of API for testing Draw Command - correction of Draw command "build3d" - test cases are added. Linux reference data is changed. Partially fixed 0027340: Insufficient exact HLR speed Number of samples in PolyPoly intersection algorithm tuned in each instance of generic class. Default number of the samples in Geom2dAdaptor is changed according to the Adaptor2d_Curve2d class. Minimal number of points in case of B-Spline is changed. Minimal number of samples support is added in intersection algorithms.
This commit is contained in:
@@ -95,7 +95,9 @@ public:
|
||||
//! Create a domain from a curve
|
||||
Standard_EXPORT IntRes2d_Domain ComputeDomain (const Adaptor2d_Curve2d& C1, const Standard_Real TolDomain) const;
|
||||
|
||||
|
||||
//! Set / get minimum number of points in polygon intersection.
|
||||
Standard_EXPORT void SetMinNbSamples (const Standard_Integer theMinNbSamples);
|
||||
Standard_EXPORT Standard_Integer GetMinNbSamples () const;
|
||||
|
||||
|
||||
protected:
|
||||
|
@@ -25,21 +25,25 @@
|
||||
|
||||
//============================================================
|
||||
Standard_Integer Geom2dInt_Geom2dCurveTool::NbSamples (const Adaptor2d_Curve2d& C,
|
||||
const Standard_Real U0,
|
||||
const Standard_Real U1)
|
||||
const Standard_Real U0,
|
||||
const Standard_Real U1)
|
||||
{
|
||||
GeomAbs_CurveType typC = C.GetType();
|
||||
Standard_Integer nbs = C.NbSamples();
|
||||
|
||||
if(typC == GeomAbs_BSplineCurve) {
|
||||
Standard_Real t=C.LastParameter()-C.FirstParameter();
|
||||
Standard_Real t1=U1-U0;
|
||||
if(t1<0.0) t1=-t1;
|
||||
if(typC == GeomAbs_BSplineCurve)
|
||||
{
|
||||
Standard_Real t = C.LastParameter() - C.FirstParameter();
|
||||
Standard_Real t1 = U1 - U0;
|
||||
if(t1 < 0.0) t1 = -t1;
|
||||
nbs = C.NbKnots();
|
||||
nbs*= C.Degree();
|
||||
Standard_Real anb = t1/t * nbs;
|
||||
Standard_Real anb = t1 / t * nbs;
|
||||
nbs = (Standard_Integer)anb;
|
||||
if(nbs < 4) nbs=4;
|
||||
|
||||
Standard_Integer aMinPntNb = Max(C.Degree() + 1, 4);
|
||||
if(nbs < aMinPntNb)
|
||||
nbs = aMinPntNb;
|
||||
}
|
||||
else if (typC == GeomAbs_Circle)
|
||||
{
|
||||
|
@@ -42,14 +42,15 @@ public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT Geom2dInt_TheIntPCurvePCurveOfGInter();
|
||||
|
||||
|
||||
Standard_EXPORT void Perform (const Adaptor2d_Curve2d& Curve1, const IntRes2d_Domain& Domain1, const Adaptor2d_Curve2d& Curve2, const IntRes2d_Domain& Domain2, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
Standard_EXPORT void Perform (const Adaptor2d_Curve2d& Curve1, const IntRes2d_Domain& Domain1, const Standard_Real TolConf, const Standard_Real Tol);
|
||||
|
||||
|
||||
//! Set / get minimum number of points in polygon for intersection.
|
||||
Standard_EXPORT void SetMinNbSamples (const Standard_Integer theMinNbSamples);
|
||||
Standard_EXPORT Standard_Integer GetMinNbSamples () const;
|
||||
|
||||
|
||||
protected:
|
||||
@@ -59,9 +60,6 @@ protected:
|
||||
|
||||
Standard_EXPORT void Perform (const Adaptor2d_Curve2d& Curve1, const IntRes2d_Domain& Domain1, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Integer NbIter, const Standard_Real DeltaU, const Standard_Real DeltaV);
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -72,10 +70,11 @@ private:
|
||||
//! : during prelimanary search for line (case of bad paramerization of Bspline for example).
|
||||
Standard_EXPORT Standard_Boolean findIntersect (const Adaptor2d_Curve2d& Curve1, const IntRes2d_Domain& Domain1, const Adaptor2d_Curve2d& Curve2, const IntRes2d_Domain& Domain2, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Integer NbIter, const Standard_Real DeltaU, const Standard_Real DeltaV, const Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter& thePoly1, const Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter& thePoly2, const Standard_Boolean isFullRepresentation);
|
||||
|
||||
|
||||
IntRes2d_Domain DomainOnCurve1;
|
||||
IntRes2d_Domain DomainOnCurve2;
|
||||
|
||||
//! Minimal number of sample points
|
||||
Standard_Integer myMinPntNb;
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user