mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
Compare commits
31 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
bb368e271e | ||
|
04ecb233f2 | ||
|
dbfb0666b2 | ||
|
c74b60ab81 | ||
|
3d41db2138 | ||
|
43764346a1 | ||
|
3c61e8f7e0 | ||
|
da9cb57f57 | ||
|
60490a5c19 | ||
|
2b5fcf89b2 | ||
|
99ee8eb9d3 | ||
|
b9a5469aa1 | ||
|
c004c09c9e | ||
|
f15afeb84b | ||
|
488b78ed3c | ||
|
6faa1bd160 | ||
|
00be1552ed | ||
|
a2bacd54f4 | ||
|
d2abb6d844 | ||
|
e697b85307 | ||
|
9967602647 | ||
|
e1a92d9ef0 | ||
|
730b9ecc2d | ||
|
336e2cdeda | ||
|
e5021ff47f | ||
|
9735948819 | ||
|
660a8938a3 | ||
|
642ddd1253 | ||
|
03fc07c28b | ||
|
2e84f455db | ||
|
2d7f390051 |
@ -661,8 +661,10 @@ endif()
|
||||
if (CAN_USE_GLES2)
|
||||
if (USE_GLES2)
|
||||
add_definitions (-DHAVE_GLES2_EXT)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl")
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
|
||||
if (NOT IOS)
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl")
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
|
||||
endif()
|
||||
else()
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EGL")
|
||||
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GLES2")
|
||||
|
@ -173,8 +173,17 @@ static Standard_Real ComputeTolReached(const Handle(Adaptor3d_Curve)& c3d,
|
||||
{
|
||||
Standard_Real t = IntToReal(i) / IntToReal(nbp);
|
||||
Standard_Real u = first * (1.0 - t) + last * t;
|
||||
gp_Pnt Pc3d = c3d->Value(u);
|
||||
gp_Pnt Pcons = cons.Value(u);
|
||||
gp_Pnt Pc3d, Pcons;
|
||||
try
|
||||
{
|
||||
Pc3d = c3d->Value(u);
|
||||
Pcons = cons.Value(u);
|
||||
}
|
||||
catch (Standard_Failure const&)
|
||||
{
|
||||
d2 = Precision::Infinite();
|
||||
break;
|
||||
}
|
||||
if (Precision::IsInfinite(Pcons.X()) ||
|
||||
Precision::IsInfinite(Pcons.Y()) ||
|
||||
Precision::IsInfinite(Pcons.Z()))
|
||||
|
@ -91,7 +91,7 @@ static void ComputeTrsf2d(const Handle(TheWLine)& theline,
|
||||
//function : Parameters
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
static void Parameters(const ApproxInt_TheMultiLine& Line,
|
||||
void ApproxInt_Approx::Parameters(const ApproxInt_TheMultiLine& Line,
|
||||
const Standard_Integer firstP,
|
||||
const Standard_Integer lastP,
|
||||
const Approx_ParametrizationType Par,
|
||||
|
@ -26,6 +26,8 @@
|
||||
#include <Precision.hxx>
|
||||
#include <NCollection_Vector.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <GeomInt_WLApprox.hxx>
|
||||
#include <GeomInt_TheMultiLineOfWLApprox.hxx>
|
||||
|
||||
// (Sqrt(5.0) - 1.0) / 4.0
|
||||
//static const Standard_Real aSinCoeff = 0.30901699437494742410229341718282;
|
||||
@ -88,6 +90,94 @@ static Standard_Real EvalCurv(const Standard_Real dim,
|
||||
return curv;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : BuildCurvature
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void ApproxInt_KnotTools::BuildCurvature(
|
||||
const NCollection_LocalArray<Standard_Real>& theCoords,
|
||||
const Standard_Integer theDim,
|
||||
const math_Vector& thePars,
|
||||
TColStd_Array1OfReal& theCurv,
|
||||
Standard_Real& theMaxCurv)
|
||||
{
|
||||
// Arrays are allocated for max theDim = 7: 1 3d curve + 2 2d curves.
|
||||
Standard_Real Val[21], Par[3], Res[21];
|
||||
Standard_Integer i, j, m, ic;
|
||||
Standard_Integer dim = theDim;
|
||||
//
|
||||
theMaxCurv = 0.;
|
||||
if (theCurv.Length() < 3)
|
||||
{
|
||||
theCurv.Init(0.);
|
||||
return;
|
||||
}
|
||||
i = theCurv.Lower();
|
||||
for (j = 0; j < 3; ++j)
|
||||
{
|
||||
Standard_Integer k = i + j;
|
||||
ic = (k - theCurv.Lower()) * dim;
|
||||
Standard_Integer l = dim*j;
|
||||
for (m = 0; m < dim; ++m)
|
||||
{
|
||||
Val[l + m] = theCoords[ic + m];
|
||||
}
|
||||
Par[j] = thePars(k);
|
||||
}
|
||||
PLib::EvalLagrange(Par[0], 2, 2, dim, *Val, *Par, *Res);
|
||||
//
|
||||
theCurv(i) = EvalCurv(dim, &Res[dim], &Res[2 * dim]);
|
||||
//
|
||||
if (theCurv(i) > theMaxCurv)
|
||||
{
|
||||
theMaxCurv = theCurv(i);
|
||||
}
|
||||
//
|
||||
for (i = theCurv.Lower() + 1; i < theCurv.Upper(); ++i)
|
||||
{
|
||||
for (j = 0; j < 3; ++j)
|
||||
{
|
||||
Standard_Integer k = i + j - 1;
|
||||
ic = (k - theCurv.Lower()) * dim;
|
||||
Standard_Integer l = dim*j;
|
||||
for (m = 0; m < dim; ++m)
|
||||
{
|
||||
Val[l + m] = theCoords[ic + m];
|
||||
}
|
||||
Par[j] = thePars(k);
|
||||
}
|
||||
PLib::EvalLagrange(Par[1], 2, 2, dim, *Val, *Par, *Res);
|
||||
//
|
||||
theCurv(i) = EvalCurv(dim, &Res[dim], &Res[2 * dim]);
|
||||
if (theCurv(i) > theMaxCurv)
|
||||
{
|
||||
theMaxCurv = theCurv(i);
|
||||
}
|
||||
}
|
||||
//
|
||||
i = theCurv.Upper();
|
||||
for (j = 0; j < 3; ++j)
|
||||
{
|
||||
Standard_Integer k = i + j - 2;
|
||||
ic = (k - theCurv.Lower()) * dim;
|
||||
Standard_Integer l = dim*j;
|
||||
for (m = 0; m < dim; ++m)
|
||||
{
|
||||
Val[l + m] = theCoords[ic + m];
|
||||
}
|
||||
Par[j] = thePars(k);
|
||||
}
|
||||
PLib::EvalLagrange(Par[2], 2, 2, dim, *Val, *Par, *Res);
|
||||
//
|
||||
theCurv(i) = EvalCurv(dim, &Res[dim], &Res[2 * dim]);
|
||||
if (theCurv(i) > theMaxCurv)
|
||||
{
|
||||
theMaxCurv = theCurv(i);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ComputeKnotInds
|
||||
//purpose :
|
||||
@ -100,75 +190,10 @@ void ApproxInt_KnotTools::ComputeKnotInds(const NCollection_LocalArray<Standard_
|
||||
//I: Create discrete curvature.
|
||||
NCollection_Sequence<Standard_Integer> aFeatureInds;
|
||||
TColStd_Array1OfReal aCurv(thePars.Lower(), thePars.Upper());
|
||||
// Arrays are allocated for max theDim = 7: 1 3d curve + 2 2d curves.
|
||||
Standard_Real Val[21], Par[3], Res[21];
|
||||
Standard_Integer i, j, m, ic;
|
||||
Standard_Real aMaxCurv = 0.;
|
||||
Standard_Integer dim = theDim;
|
||||
//
|
||||
i = aCurv.Lower();
|
||||
for(j = 0; j < 3; ++j)
|
||||
{
|
||||
Standard_Integer k = i+j;
|
||||
ic = (k - aCurv.Lower()) * dim;
|
||||
Standard_Integer l = dim*j;
|
||||
for(m = 0; m < dim; ++m)
|
||||
{
|
||||
Val[l + m] = theCoords[ic + m];
|
||||
}
|
||||
Par[j] = thePars(k);
|
||||
}
|
||||
PLib::EvalLagrange(Par[0], 2, 2, dim, *Val, *Par, *Res);
|
||||
//
|
||||
aCurv(i) = EvalCurv(dim, &Res[dim], &Res[2*dim]);
|
||||
//
|
||||
if(aCurv(i) > aMaxCurv)
|
||||
{
|
||||
aMaxCurv = aCurv(i);
|
||||
}
|
||||
//
|
||||
for(i = aCurv.Lower()+1; i < aCurv.Upper(); ++i)
|
||||
{
|
||||
for(j = 0; j < 3; ++j)
|
||||
{
|
||||
Standard_Integer k = i+j-1;
|
||||
ic = (k - aCurv.Lower()) * dim;
|
||||
Standard_Integer l = dim*j;
|
||||
for(m = 0; m < dim; ++m)
|
||||
{
|
||||
Val[l + m] = theCoords[ic + m];
|
||||
}
|
||||
Par[j] = thePars(k);
|
||||
}
|
||||
PLib::EvalLagrange(Par[1], 2, 2, dim, *Val, *Par, *Res);
|
||||
//
|
||||
aCurv(i) = EvalCurv(dim, &Res[dim], &Res[2*dim]);
|
||||
if(aCurv(i) > aMaxCurv)
|
||||
{
|
||||
aMaxCurv = aCurv(i);
|
||||
}
|
||||
}
|
||||
//
|
||||
i = aCurv.Upper();
|
||||
for(j = 0; j < 3; ++j)
|
||||
{
|
||||
Standard_Integer k = i+j-2;
|
||||
ic = (k - aCurv.Lower()) * dim;
|
||||
Standard_Integer l = dim*j;
|
||||
for(m = 0; m < dim; ++m)
|
||||
{
|
||||
Val[l + m] = theCoords[ic + m];
|
||||
}
|
||||
Par[j] = thePars(k);
|
||||
}
|
||||
PLib::EvalLagrange(Par[2], 2, 2, dim, *Val, *Par, *Res);
|
||||
//
|
||||
aCurv(i) = EvalCurv(dim, &Res[dim], &Res[2*dim]);
|
||||
if(aCurv(i) > aMaxCurv)
|
||||
{
|
||||
aMaxCurv = aCurv(i);
|
||||
}
|
||||
|
||||
BuildCurvature(theCoords, theDim, thePars, aCurv, aMaxCurv);
|
||||
//
|
||||
Standard_Integer i, j, dim = theDim;
|
||||
#ifdef APPROXINT_KNOTTOOLS_DEBUG
|
||||
std::cout << "Discrete curvature array is" << std::endl;
|
||||
for(i = aCurv.Lower(); i <= aCurv.Upper(); ++i)
|
||||
@ -627,3 +652,172 @@ void ApproxInt_KnotTools::BuildKnots(const TColgp_Array1OfPnt& thePntsXYZ,
|
||||
#endif
|
||||
|
||||
}
|
||||
//=======================================================================
|
||||
//function : MaxParamRatio
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
static Standard_Real MaxParamRatio(const math_Vector& thePars)
|
||||
{
|
||||
Standard_Integer i;
|
||||
Standard_Real aMaxRatio = 0.;
|
||||
//
|
||||
for (i = thePars.Lower() + 1; i < thePars.Upper(); ++i)
|
||||
{
|
||||
Standard_Real aRat = (thePars(i + 1) - thePars(i)) / (thePars(i) - thePars(i - 1));
|
||||
if (aRat < 1.)
|
||||
aRat = 1. / aRat;
|
||||
|
||||
aMaxRatio = Max(aMaxRatio, aRat);
|
||||
}
|
||||
return aMaxRatio;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : DefineParType
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Approx_ParametrizationType ApproxInt_KnotTools::DefineParType(
|
||||
const Handle(IntPatch_WLine)& theWL,
|
||||
const Standard_Integer theFpar, const Standard_Integer theLpar,
|
||||
const Standard_Boolean theApproxXYZ,
|
||||
const Standard_Boolean theApproxU1V1,
|
||||
const Standard_Boolean theApproxU2V2
|
||||
)
|
||||
{
|
||||
if (theLpar - theFpar == 1)
|
||||
return Approx_IsoParametric;
|
||||
|
||||
const Standard_Integer nbp3d = theApproxXYZ ? 1 : 0,
|
||||
nbp2d = (theApproxU1V1 ? 1 : 0) + (theApproxU2V2 ? 1 : 0);
|
||||
|
||||
GeomInt_TheMultiLineOfWLApprox aTestLine(theWL, nbp3d, nbp2d, theApproxU1V1, theApproxU2V2,
|
||||
0., 0., 0., 0., 0., 0., 0., theApproxU1V1, theFpar, theLpar);
|
||||
|
||||
TColgp_Array1OfPnt aTabPnt3d(1, Max(1, nbp3d));
|
||||
TColgp_Array1OfPnt2d aTabPnt2d(1, Max(1, nbp2d));
|
||||
TColgp_Array1OfPnt aPntXYZ(theFpar, theLpar);
|
||||
TColgp_Array1OfPnt2d aPntU1V1(theFpar, theLpar);
|
||||
TColgp_Array1OfPnt2d aPntU2V2(theFpar, theLpar);
|
||||
|
||||
Standard_Integer i, j;
|
||||
|
||||
for (i = theFpar; i <= theLpar; ++i)
|
||||
{
|
||||
if (nbp3d != 0 && nbp2d != 0) aTestLine.Value(i, aTabPnt3d, aTabPnt2d);
|
||||
else if (nbp2d != 0) aTestLine.Value(i, aTabPnt2d);
|
||||
else if (nbp3d != 0) aTestLine.Value(i, aTabPnt3d);
|
||||
//
|
||||
if (nbp3d > 0)
|
||||
{
|
||||
aPntXYZ(i) = aTabPnt3d(1);
|
||||
}
|
||||
if (nbp2d > 1)
|
||||
{
|
||||
aPntU1V1(i) = aTabPnt2d(1);
|
||||
aPntU2V2(i) = aTabPnt2d(2);
|
||||
}
|
||||
else if (nbp2d > 0)
|
||||
{
|
||||
if (theApproxU1V1)
|
||||
{
|
||||
aPntU1V1(i) = aTabPnt2d(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
aPntU2V2(i) = aTabPnt2d(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Standard_Integer aDim = 0;
|
||||
|
||||
if (theApproxXYZ)
|
||||
aDim += 3;
|
||||
if (theApproxU1V1)
|
||||
aDim += 2;
|
||||
if (theApproxU2V2)
|
||||
aDim += 2;
|
||||
|
||||
Standard_Integer aLength = theLpar - theFpar + 1;
|
||||
NCollection_LocalArray<Standard_Real> aCoords(aLength * aDim);
|
||||
for (i = theFpar; i <= theLpar; ++i)
|
||||
{
|
||||
j = (i - theFpar) * aDim;
|
||||
if (theApproxXYZ)
|
||||
{
|
||||
aCoords[j] = aPntXYZ.Value(i).X();
|
||||
++j;
|
||||
aCoords[j] = aPntXYZ.Value(i).Y();
|
||||
++j;
|
||||
aCoords[j] = aPntXYZ.Value(i).Z();
|
||||
++j;
|
||||
}
|
||||
if (theApproxU1V1)
|
||||
{
|
||||
aCoords[j] = aPntU1V1.Value(i).X();
|
||||
++j;
|
||||
aCoords[j] = aPntU1V1.Value(i).Y();
|
||||
++j;
|
||||
}
|
||||
if (theApproxU2V2)
|
||||
{
|
||||
aCoords[j] = aPntU2V2.Value(i).X();
|
||||
++j;
|
||||
aCoords[j] = aPntU2V2.Value(i).Y();
|
||||
++j;
|
||||
}
|
||||
}
|
||||
|
||||
//Analysis of curvature
|
||||
const Standard_Real aCritRat = 500.;
|
||||
const Standard_Real aCritParRat = 100.;
|
||||
math_Vector aPars(theFpar, theLpar);
|
||||
Approx_ParametrizationType aParType = Approx_ChordLength;
|
||||
GeomInt_WLApprox::Parameters(aTestLine, theFpar, theLpar, aParType, aPars);
|
||||
TColStd_Array1OfReal aCurv(aPars.Lower(), aPars.Upper());
|
||||
Standard_Real aMaxCurv = 0.;
|
||||
BuildCurvature(aCoords, aDim, aPars, aCurv, aMaxCurv);
|
||||
|
||||
if (aMaxCurv < Precision::PConfusion()
|
||||
|| Precision::IsPositiveInfinite(aMaxCurv))
|
||||
{
|
||||
//Linear case
|
||||
return aParType;
|
||||
}
|
||||
|
||||
Standard_Real aMidCurv = 0.;
|
||||
Standard_Real eps = Epsilon(1.);
|
||||
j = 0;
|
||||
for (i = aCurv.Lower(); i <= aCurv.Upper(); ++i)
|
||||
{
|
||||
if (aMaxCurv - aCurv(i) < eps)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
++j;
|
||||
aMidCurv += aCurv(i);
|
||||
}
|
||||
|
||||
if (j > 1)
|
||||
{
|
||||
aMidCurv /= j;
|
||||
}
|
||||
|
||||
if (aMidCurv <= eps)
|
||||
return aParType;
|
||||
|
||||
Standard_Real aRat = aMaxCurv / aMidCurv;
|
||||
|
||||
if (aRat > aCritRat)
|
||||
{
|
||||
if(aRat > 5.*aCritRat)
|
||||
aParType = Approx_Centripetal;
|
||||
else
|
||||
{
|
||||
Standard_Real aParRat = MaxParamRatio(aPars);
|
||||
if (aParRat > aCritParRat)
|
||||
aParType = Approx_Centripetal;
|
||||
}
|
||||
}
|
||||
|
||||
return aParType;
|
||||
}
|
||||
|
@ -38,12 +38,15 @@
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <NCollection_LocalArray.hxx>
|
||||
#include <Approx_ParametrizationType.hxx>
|
||||
|
||||
class math_Vector;
|
||||
template <class A> class NCollection_Sequence;
|
||||
template <class A> class NCollection_List;
|
||||
template <class A> class NCollection_Vector;
|
||||
|
||||
class IntPatch_WLine;
|
||||
|
||||
// Corresponds for debug information output.
|
||||
// Debug information is also printed when OCCT_DEBUG defined.
|
||||
//#define APPROXINT_KNOTTOOLS_DEBUG
|
||||
@ -84,6 +87,22 @@ public:
|
||||
const Standard_Integer theMinNbPnts,
|
||||
NCollection_Vector<Standard_Integer>& theKnots);
|
||||
|
||||
//! Builds discrete curvature
|
||||
Standard_EXPORT static void BuildCurvature(
|
||||
const NCollection_LocalArray<Standard_Real>& theCoords,
|
||||
const Standard_Integer theDim,
|
||||
const math_Vector& thePars,
|
||||
TColStd_Array1OfReal& theCurv,
|
||||
Standard_Real& theMaxCurv);
|
||||
|
||||
//! Defines preferable parametrization type for theWL
|
||||
Standard_EXPORT static Approx_ParametrizationType DefineParType(const Handle(IntPatch_WLine)& theWL,
|
||||
const Standard_Integer theFpar, const Standard_Integer theLpar,
|
||||
const Standard_Boolean theApproxXYZ,
|
||||
const Standard_Boolean theApproxU1V1,
|
||||
const Standard_Boolean theApproxU2V2);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
//! Compute indices of knots:
|
||||
|
@ -284,6 +284,35 @@ void BOPAlgo_PaveFiller::PerformFF(const Message_ProgressRange& theRange)
|
||||
// Post-processing options
|
||||
Standard_Boolean bSplitCurve = Standard_False;
|
||||
//
|
||||
// Collect all pairs of Edge/Edge interferences to check if
|
||||
// some faces have to be moved to obtain more precise intersection
|
||||
NCollection_DataMap<BOPDS_Pair, TColStd_ListOfInteger, BOPDS_PairMapHasher> aEEMap;
|
||||
const BOPDS_VectorOfInterfEE& aVEEs = myDS->InterfEE();
|
||||
for (Standard_Integer iEE = 0; iEE < aVEEs.Size(); ++iEE)
|
||||
{
|
||||
const BOPDS_Interf& aEE = aVEEs(iEE);
|
||||
if (!aEE.HasIndexNew())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
Standard_Integer nE1, nE2;
|
||||
aEE.Indices(nE1, nE2);
|
||||
|
||||
const Standard_Integer nVN = aEE.IndexNew();
|
||||
|
||||
BOPDS_Pair aPair(nE1, nE2);
|
||||
TColStd_ListOfInteger* pPoints = aEEMap.ChangeSeek(aPair);
|
||||
if (pPoints)
|
||||
{
|
||||
pPoints->Append(nVN);
|
||||
}
|
||||
else
|
||||
{
|
||||
pPoints = aEEMap.Bound(BOPDS_Pair(nE1, nE2), TColStd_ListOfInteger());
|
||||
pPoints->Append(nVN);
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare the pairs of faces for intersection
|
||||
BOPAlgo_VectorOfFaceFace aVFaceFace;
|
||||
myIterator->Initialize(TopAbs_FACE, TopAbs_FACE);
|
||||
@ -312,15 +341,87 @@ void BOPAlgo_PaveFiller::PerformFF(const Message_ProgressRange& theRange)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if there is an intersection between edges of the faces.
|
||||
// If there is an intersection, check if there is a shift between the edges
|
||||
// (intersection point is on some distance from the edges), and move one of
|
||||
// the faces to the point of exact edges intersection. This should allow
|
||||
// obtaining more precise intersection curves between the faces
|
||||
// (at least the curves should reach the boundary).
|
||||
// Note, that currently this check considers only closed edges (seam edges).
|
||||
TopoDS_Face aFShifted1 = aF1, aFShifted2 = aF2;
|
||||
// Keep shift value to use it as the tolerance for intersection curves
|
||||
Standard_Real aShiftValue = 0.;
|
||||
|
||||
if (aBAS1.GetType() != GeomAbs_Plane ||
|
||||
aBAS2.GetType() != GeomAbs_Plane) {
|
||||
|
||||
Standard_Boolean isFound = Standard_False;
|
||||
for (TopExp_Explorer aExp1(aF1, TopAbs_EDGE); !isFound && aExp1.More(); aExp1.Next())
|
||||
{
|
||||
const TopoDS_Edge& aE1 = TopoDS::Edge(aExp1.Current());
|
||||
const Standard_Integer nE1 = myDS->Index(aE1);
|
||||
|
||||
for (TopExp_Explorer aExp2(aF2, TopAbs_EDGE); !isFound && aExp2.More(); aExp2.Next())
|
||||
{
|
||||
const TopoDS_Edge& aE2 = TopoDS::Edge(aExp2.Current());
|
||||
const Standard_Integer nE2 = myDS->Index(aE2);
|
||||
|
||||
Standard_Boolean bIsClosed1 = BRep_Tool::IsClosed(aE1, aF1);
|
||||
Standard_Boolean bIsClosed2 = BRep_Tool::IsClosed(aE2, aF2);
|
||||
if (!bIsClosed1 && !bIsClosed2)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const TColStd_ListOfInteger* pPoints = aEEMap.Seek(BOPDS_Pair(nE1, nE2));
|
||||
if (!pPoints)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for (TColStd_ListOfInteger::Iterator itEEP(*pPoints); itEEP.More(); itEEP.Next())
|
||||
{
|
||||
const Standard_Integer& nVN = itEEP.Value();
|
||||
const TopoDS_Vertex& aVN = TopoDS::Vertex(myDS->Shape(nVN));
|
||||
const gp_Pnt& aPnt = BRep_Tool::Pnt(aVN);
|
||||
|
||||
// Compute points exactly on the edges
|
||||
GeomAPI_ProjectPointOnCurve& aProjPC1 = myContext->ProjPC(aE1);
|
||||
GeomAPI_ProjectPointOnCurve& aProjPC2 = myContext->ProjPC(aE2);
|
||||
aProjPC1.Perform(aPnt);
|
||||
aProjPC2.Perform(aPnt);
|
||||
if (!aProjPC1.NbPoints() && !aProjPC2.NbPoints())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
gp_Pnt aP1 = aProjPC1.NbPoints() > 0 ? aProjPC1.NearestPoint() : aPnt;
|
||||
gp_Pnt aP2 = aProjPC2.NbPoints() > 0 ? aProjPC2.NearestPoint() : aPnt;
|
||||
|
||||
Standard_Real aShiftDist = aP1.Distance(aP2);
|
||||
if (aShiftDist > BRep_Tool::Tolerance(aVN))
|
||||
{
|
||||
// Move one of the faces to the point of exact intersection of edges
|
||||
gp_Trsf aTrsf;
|
||||
aTrsf.SetTranslation(bIsClosed1 ? gp_Vec(aP1, aP2) : gp_Vec(aP2, aP1));
|
||||
TopLoc_Location aLoc(aTrsf);
|
||||
(bIsClosed1 ? &aFShifted1 : &aFShifted2)->Move(aLoc);
|
||||
aShiftValue = aShiftDist;
|
||||
isFound = Standard_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
BOPAlgo_FaceFace& aFaceFace=aVFaceFace.Appended();
|
||||
//
|
||||
aFaceFace.SetRunParallel (myRunParallel);
|
||||
aFaceFace.SetIndices(nF1, nF2);
|
||||
aFaceFace.SetFaces(aF1, aF2);
|
||||
aFaceFace.SetFaces(aFShifted1, aFShifted2);
|
||||
aFaceFace.SetBoxes (myDS->ShapeInfo (nF1).Box(), myDS->ShapeInfo (nF2).Box());
|
||||
// compute minimal tolerance for the curves
|
||||
Standard_Real aTolFF = ToleranceFF(aBAS1, aBAS2);
|
||||
// Note: in case of faces with closed edges it should not be less than value of the shift
|
||||
Standard_Real aTolFF = Max(aShiftValue, ToleranceFF(aBAS1, aBAS2));
|
||||
aFaceFace.SetTolFF(aTolFF);
|
||||
//
|
||||
IntSurf_ListOfPntOn2S aListOfPnts;
|
||||
|
@ -106,6 +106,11 @@ public:
|
||||
|
||||
Standard_EXPORT const AppParCurves_MultiBSpCurve& Value (const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT static void Parameters(const BRepApprox_TheMultiLineOfApprox& Line,
|
||||
const Standard_Integer firstP,
|
||||
const Standard_Integer lastP,
|
||||
const Approx_ParametrizationType Par,
|
||||
math_Vector& TheParameters);
|
||||
|
||||
|
||||
|
||||
|
@ -1978,6 +1978,12 @@ public:
|
||||
return aDeriv.Transformed(mySurfaceTrsf);
|
||||
}
|
||||
|
||||
gp_Dir Normal()
|
||||
{
|
||||
gp_Dir aNormal = mySurfaceProps.Normal();
|
||||
return aNormal.Transformed(mySurfaceTrsf);
|
||||
}
|
||||
|
||||
// Calculate principal curvatures, which consist of minimal and maximal normal curvatures and
|
||||
// the directions on the tangent plane (principal direction) where the extremums are reached
|
||||
void Curvature(gp_Dir& thePrincipalDir1, Standard_Real& theCurvature1,
|
||||
@ -2016,32 +2022,63 @@ private:
|
||||
//purpose : check the angle at the border between two squares.
|
||||
// Two shares should have a shared front edge.
|
||||
//=======================================================================
|
||||
static GeomAbs_Shape tgtfaces(const TopoDS_Edge& Ed,
|
||||
const TopoDS_Face& F1,
|
||||
const TopoDS_Face& F2,
|
||||
const Standard_Real theAngleTol)
|
||||
GeomAbs_Shape BRepLib::ContinuityOfFaces(const TopoDS_Edge& theEdge,
|
||||
const TopoDS_Face& theFace1,
|
||||
const TopoDS_Face& theFace2,
|
||||
const Standard_Real theAngleTol)
|
||||
{
|
||||
Standard_Boolean isSeam = F1.IsEqual(F2);
|
||||
Standard_Boolean isSeam = theFace1.IsEqual(theFace2);
|
||||
|
||||
TopoDS_Edge E = Ed;
|
||||
TopoDS_Edge anEdgeInFace1, anEdgeInFace2;
|
||||
Handle(Geom2d_Curve) aCurve1, aCurve2;
|
||||
|
||||
Standard_Real aFirst, aLast;
|
||||
|
||||
if (!theFace1.IsSame (theFace2) &&
|
||||
BRep_Tool::IsClosed (theEdge, theFace1) &&
|
||||
BRep_Tool::IsClosed (theEdge, theFace2))
|
||||
{
|
||||
//Find the edge in the face 1: this edge will have correct orientation
|
||||
TopoDS_Face aFace1 = theFace1;
|
||||
aFace1.Orientation (TopAbs_FORWARD);
|
||||
TopExp_Explorer anExplo (aFace1, TopAbs_EDGE);
|
||||
for (; anExplo.More(); anExplo.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge (anExplo.Current());
|
||||
if (anEdge.IsSame (theEdge))
|
||||
{
|
||||
anEdgeInFace1 = anEdge;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (anEdgeInFace1.IsNull())
|
||||
return GeomAbs_C0;
|
||||
|
||||
aCurve1 = BRep_Tool::CurveOnSurface (anEdgeInFace1, aFace1, aFirst, aLast);
|
||||
TopoDS_Face aFace2 = theFace2;
|
||||
aFace2.Orientation (TopAbs_FORWARD);
|
||||
anEdgeInFace2 = anEdgeInFace1;
|
||||
anEdgeInFace2.Reverse();
|
||||
aCurve2 = BRep_Tool::CurveOnSurface (anEdgeInFace2, aFace2, aFirst, aLast);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Obtaining of pcurves of edge on two faces.
|
||||
anEdgeInFace1 = anEdgeInFace2 = theEdge;
|
||||
aCurve1 = BRep_Tool::CurveOnSurface (anEdgeInFace1, theFace1, aFirst, aLast);
|
||||
//For the case of seam edge
|
||||
if (theFace1.IsSame(theFace2))
|
||||
anEdgeInFace2.Reverse();
|
||||
aCurve2 = BRep_Tool::CurveOnSurface (anEdgeInFace2, theFace2, aFirst, aLast);
|
||||
}
|
||||
|
||||
// Check if pcurves exist on both faces of edge
|
||||
Standard_Real aFirst,aLast;
|
||||
E.Orientation(TopAbs_FORWARD);
|
||||
Handle(Geom2d_Curve) aCurve1 = BRep_Tool::CurveOnSurface(E, F1, aFirst, aLast);
|
||||
if(aCurve1.IsNull())
|
||||
return GeomAbs_C0;
|
||||
|
||||
if (isSeam)
|
||||
E.Orientation(TopAbs_REVERSED);
|
||||
Handle(Geom2d_Curve) aCurve2 = BRep_Tool::CurveOnSurface(E, F2, aFirst, aLast);
|
||||
if(aCurve2.IsNull())
|
||||
if (aCurve1.IsNull() || aCurve2.IsNull())
|
||||
return GeomAbs_C0;
|
||||
|
||||
TopLoc_Location aLoc1, aLoc2;
|
||||
Handle(Geom_Surface) aSurface1 = BRep_Tool::Surface(F1, aLoc1);
|
||||
Handle(Geom_Surface) aSurface1 = BRep_Tool::Surface (theFace1, aLoc1);
|
||||
const gp_Trsf& aSurf1Trsf = aLoc1.Transformation();
|
||||
Handle(Geom_Surface) aSurface2 = BRep_Tool::Surface(F2, aLoc2);
|
||||
Handle(Geom_Surface) aSurface2 = BRep_Tool::Surface (theFace2, aLoc2);
|
||||
const gp_Trsf& aSurf2Trsf = aLoc2.Transformation();
|
||||
|
||||
if (aSurface1->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface)))
|
||||
@ -2058,11 +2095,11 @@ static GeomAbs_Shape tgtfaces(const TopoDS_Edge& Ed,
|
||||
return GeomAbs_CN;
|
||||
}
|
||||
|
||||
SurfaceProperties aSP1(aSurface1, aSurf1Trsf, aCurve1, F1.Orientation() == TopAbs_REVERSED);
|
||||
SurfaceProperties aSP2(aSurface2, aSurf2Trsf, aCurve2, F2.Orientation() == TopAbs_REVERSED);
|
||||
SurfaceProperties aSP1(aSurface1, aSurf1Trsf, aCurve1, theFace1.Orientation() == TopAbs_REVERSED);
|
||||
SurfaceProperties aSP2(aSurface2, aSurf2Trsf, aCurve2, theFace2.Orientation() == TopAbs_REVERSED);
|
||||
|
||||
Standard_Real f, l, eps;
|
||||
BRep_Tool::Range(E,f,l);
|
||||
BRep_Tool::Range (theEdge,f,l);
|
||||
Extrema_LocateExtPC ext;
|
||||
Handle(BRepAdaptor_Curve) aHC2;
|
||||
|
||||
@ -2073,7 +2110,6 @@ static GeomAbs_Shape tgtfaces(const TopoDS_Edge& Ed,
|
||||
const Standard_Real anAngleTol2 = theAngleTol * theAngleTol;
|
||||
|
||||
gp_Vec aDer1, aDer2;
|
||||
gp_Vec aNorm1;
|
||||
Standard_Real aSqLen1, aSqLen2;
|
||||
gp_Dir aCrvDir1[2], aCrvDir2[2];
|
||||
Standard_Real aCrvLen1[2], aCrvLen2[2];
|
||||
@ -2101,13 +2137,26 @@ static GeomAbs_Shape tgtfaces(const TopoDS_Edge& Ed,
|
||||
aDer2 = aSP2.Derivative();
|
||||
aSqLen2 = aDer2.SquareMagnitude();
|
||||
Standard_Boolean isSmoothSuspect = (aDer1.CrossSquareMagnitude(aDer2) <= anAngleTol2 * aSqLen1 * aSqLen2);
|
||||
if (isSmoothSuspect)
|
||||
{
|
||||
gp_Dir aNormal1 = aSP1.Normal();
|
||||
if (theFace1.Orientation() == TopAbs_REVERSED)
|
||||
aNormal1.Reverse();
|
||||
gp_Dir aNormal2 = aSP2.Normal();
|
||||
if (theFace2.Orientation() == TopAbs_REVERSED)
|
||||
aNormal2.Reverse();
|
||||
|
||||
if (aNormal1 * aNormal2 < 0.)
|
||||
return GeomAbs_C0;
|
||||
}
|
||||
|
||||
if (!isSmoothSuspect)
|
||||
{
|
||||
// Refine by projection
|
||||
if (aHC2.IsNull())
|
||||
{
|
||||
// adaptor for pcurve on the second surface
|
||||
aHC2 = new BRepAdaptor_Curve (E, F2);
|
||||
aHC2 = new BRepAdaptor_Curve (anEdgeInFace2, theFace2);
|
||||
ext.Initialize(*aHC2, f, l, Precision::PConfusion());
|
||||
}
|
||||
ext.Perform(aSP1.Value(), u);
|
||||
@ -2303,9 +2352,8 @@ void BRepLib::EncodeRegularity(TopoDS_Edge& E,
|
||||
BRep_Builder B;
|
||||
if(BRep_Tool::Continuity(E,F1,F2)<=GeomAbs_C0){
|
||||
try {
|
||||
GeomAbs_Shape aCont = tgtfaces(E, F1, F2, TolAng);
|
||||
GeomAbs_Shape aCont = ContinuityOfFaces(E, F1, F2, TolAng);
|
||||
B.Continuity(E,F1,F2,aCont);
|
||||
|
||||
}
|
||||
catch(Standard_Failure const&)
|
||||
{
|
||||
@ -2423,7 +2471,7 @@ Standard_Boolean BRepLib::
|
||||
|
||||
gp_Vec3f aNorm1f, aNorm2f;
|
||||
aPT1->Normal (aFNodF1, aNorm1f);
|
||||
aPT1->Normal (aFNodF2, aNorm2f);
|
||||
aPT2->Normal (aFNodF2, aNorm2f);
|
||||
const gp_XYZ aNorm1 (aNorm1f.x(), aNorm1f.y(), aNorm1f.z());
|
||||
const gp_XYZ aNorm2 (aNorm2f.x(), aNorm2f.y(), aNorm2f.z());
|
||||
const Standard_Real aDot = aNorm1 * aNorm2;
|
||||
|
@ -202,7 +202,14 @@ public:
|
||||
//! orientation to have matter in the solid. Returns
|
||||
//! False if the solid is unOrientable (open or incoherent)
|
||||
Standard_EXPORT static Standard_Boolean OrientClosedSolid (TopoDS_Solid& solid);
|
||||
|
||||
|
||||
//! Returns the order of continuity between two faces
|
||||
//! connected by an edge
|
||||
Standard_EXPORT static GeomAbs_Shape ContinuityOfFaces(const TopoDS_Edge& theEdge,
|
||||
const TopoDS_Face& theFace1,
|
||||
const TopoDS_Face& theFace2,
|
||||
const Standard_Real theAngleTol);
|
||||
|
||||
//! Encodes the Regularity of edges on a Shape.
|
||||
//! Warning: <TolAng> is an angular tolerance, expressed in Rad.
|
||||
//! Warning: If the edges's regularity are coded before, nothing
|
||||
|
@ -132,7 +132,7 @@ namespace
|
||||
{
|
||||
if (aDEdge->GetCurve()->ParametersNb() == 2)
|
||||
{
|
||||
if (splitEdge (aDEdge, Abs (getConeStep (aDFace))))
|
||||
if (splitEdge (aDEdge, aDFace, Abs (getConeStep (aDFace))))
|
||||
{
|
||||
TopLoc_Location aLoc;
|
||||
const Handle (Poly_Triangulation)& aTriangulation =
|
||||
@ -177,48 +177,89 @@ namespace
|
||||
}
|
||||
|
||||
//! Splits 3D and all pcurves accordingly using the specified step.
|
||||
Standard_Boolean splitEdge(const IMeshData::IEdgePtr& theDEdge,
|
||||
const Standard_Real theDU) const
|
||||
Standard_Boolean splitEdge(const IMeshData::IEdgePtr& theDEdge,
|
||||
const IMeshData::IFaceHandle& theDFace,
|
||||
const Standard_Real theDU) const
|
||||
{
|
||||
if (!splitCurve<gp_XYZ> (theDEdge->GetCurve (), theDU))
|
||||
TopoDS_Edge aE = theDEdge->GetEdge();
|
||||
const TopoDS_Face& aF = theDFace->GetFace();
|
||||
|
||||
Standard_Real aFParam, aLParam;
|
||||
|
||||
Handle(Geom_Curve) aHC = BRep_Tool::Curve (aE, aFParam, aLParam);
|
||||
|
||||
const IMeshData::IPCurveHandle& aIPC1 = theDEdge->GetPCurve(0);
|
||||
const IMeshData::IPCurveHandle& aIPC2 = theDEdge->GetPCurve(1);
|
||||
|
||||
// Calculate the step by parameter of the curve.
|
||||
const gp_Pnt2d& aFPntOfIPC1 = aIPC1->GetPoint (0);
|
||||
const gp_Pnt2d& aLPntOfIPC1 = aIPC1->GetPoint (aIPC1->ParametersNb() - 1);
|
||||
const Standard_Real aMod = Abs (aFPntOfIPC1.Y() - aLPntOfIPC1.Y());
|
||||
|
||||
if (aMod < gp::Resolution())
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
for (Standard_Integer aPCurveIdx = 0; aPCurveIdx < theDEdge->PCurvesNb(); ++aPCurveIdx)
|
||||
const Standard_Real aDT = Abs (aLParam - aFParam) / aMod * theDU;
|
||||
|
||||
if (!splitCurve<gp_Pnt> (aHC, theDEdge->GetCurve(), aDT))
|
||||
{
|
||||
splitCurve<gp_XY> (theDEdge->GetPCurve (aPCurveIdx), theDU);
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
// Define two pcurves of the seam-edge.
|
||||
Handle(Geom2d_Curve) aPC1, aPC2;
|
||||
Standard_Real af, al;
|
||||
|
||||
aE.Orientation (TopAbs_FORWARD);
|
||||
aPC1 = BRep_Tool::CurveOnSurface (aE, aF, af, al);
|
||||
|
||||
aE.Orientation (TopAbs_REVERSED);
|
||||
aPC2 = BRep_Tool::CurveOnSurface (aE, aF, af, al);
|
||||
|
||||
if (aPC1.IsNull() || aPC2.IsNull())
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
// Select the correct pcurve of the seam-edge.
|
||||
const gp_Pnt2d& aFPntOfPC1 = aPC1->Value (aPC1->FirstParameter());
|
||||
|
||||
if (Abs (aLPntOfIPC1.X() - aFPntOfPC1.X()) > Precision::Confusion())
|
||||
{
|
||||
std::swap (aPC1, aPC2);
|
||||
}
|
||||
|
||||
splitCurve<gp_Pnt2d> (aPC1, aIPC1, aDT);
|
||||
splitCurve<gp_Pnt2d> (aPC2, aIPC2, aDT);
|
||||
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//! Splits the given curve using the specified step.
|
||||
template<class PointType, class Curve>
|
||||
Standard_Boolean splitCurve(Curve& theCurve, const Standard_Real theDU) const
|
||||
template<class PointType, class GeomCurve, class Curve>
|
||||
Standard_Boolean splitCurve(GeomCurve& theGeomCurve,
|
||||
Curve& theCurve,
|
||||
const Standard_Real theDT) const
|
||||
{
|
||||
Standard_Boolean isUpdated = Standard_False;
|
||||
PointType aDir = theCurve->GetPoint(theCurve->ParametersNb() - 1).Coord() - theCurve->GetPoint(0).Coord();
|
||||
const Standard_Real aModulus = aDir.Modulus();
|
||||
if (aModulus < gp::Resolution())
|
||||
{
|
||||
return isUpdated;
|
||||
}
|
||||
aDir /= aModulus;
|
||||
|
||||
const Standard_Real aLastParam = theCurve->GetParameter(theCurve->ParametersNb() - 1);
|
||||
const Standard_Boolean isReversed = theCurve->GetParameter(0) > aLastParam;
|
||||
const Standard_Real aFirstParam = theCurve->GetParameter (0);
|
||||
const Standard_Real aLastParam = theCurve->GetParameter (theCurve->ParametersNb() - 1);
|
||||
const Standard_Boolean isReversed = aFirstParam > aLastParam;
|
||||
|
||||
for (Standard_Integer aPointIdx = 1; ; ++aPointIdx)
|
||||
{
|
||||
const Standard_Real aCurrParam = theCurve->GetParameter(0) + aPointIdx * theDU * (isReversed ? -1.0 : 1.0);
|
||||
if (( isReversed && (aCurrParam < aLastParam)) ||
|
||||
(!isReversed && !(aCurrParam < aLastParam)))
|
||||
const Standard_Real aCurrParam = aFirstParam + aPointIdx * theDT * (isReversed ? -1.0 : 1.0);
|
||||
if (( isReversed && (aCurrParam - aLastParam < Precision::PConfusion())) ||
|
||||
(!isReversed && !(aCurrParam - aLastParam < - Precision::PConfusion())))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
theCurve->InsertPoint(theCurve->ParametersNb() - 1,
|
||||
theCurve->GetPoint(0).Translated (aDir * aPointIdx * theDU),
|
||||
theCurve->InsertPoint (theCurve->ParametersNb() - 1,
|
||||
theGeomCurve->Value (aCurrParam),
|
||||
aCurrParam);
|
||||
|
||||
isUpdated = Standard_True;
|
||||
|
@ -52,6 +52,7 @@
|
||||
#include <BOPAlgo_PaveFiller.hxx>
|
||||
#include <BOPAlgo_Section.hxx>
|
||||
#include <BOPAlgo_Splitter.hxx>
|
||||
#include <BOPAlgo_BOP.hxx>
|
||||
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||
@ -107,6 +108,19 @@ namespace {
|
||||
{
|
||||
BRep_Builder().Add (theSOut, theS);
|
||||
}
|
||||
static void AddToContainer (const TopoDS_Shape& theKey,
|
||||
const TopoDS_Shape& theValue,
|
||||
TopTools_DataMapOfShapeListOfShape& theMap)
|
||||
{
|
||||
if (TopTools_ListOfShape* pList = theMap.ChangeSeek (theKey))
|
||||
{
|
||||
pList->Append (theValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
theMap.Bound (theKey, TopTools_ListOfShape())->Append (theValue);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : TakeModified
|
||||
@ -617,7 +631,9 @@ private: //! @name Intersection and post-treatment of edges
|
||||
|
||||
//! Filtering the invalid edges according to currently invalid faces
|
||||
void FilterInvalidEdges (const BRepOffset_DataMapOfShapeIndexedMapOfShape& theDMFMIE,
|
||||
const TopTools_IndexedMapOfShape& theMERemoved);
|
||||
const TopTools_IndexedMapOfShape& theMERemoved,
|
||||
const TopTools_IndexedMapOfShape& theMEInside,
|
||||
TopTools_MapOfShape& theMEUseInRebuild);
|
||||
|
||||
private: //! @name Checking faces
|
||||
|
||||
@ -766,6 +782,7 @@ private: //! @name Checking faces
|
||||
const TopTools_MapOfShape& theVertsToAvoid,
|
||||
const TopTools_MapOfShape& theNewVertsToAvoid,
|
||||
const TopTools_MapOfShape& theMECheckExt,
|
||||
const TopTools_DataMapOfShapeListOfShape* theSSInterfs,
|
||||
TopTools_MapOfShape& theMVBounds,
|
||||
TopTools_DataMapOfShapeListOfShape& theEImages);
|
||||
|
||||
@ -877,16 +894,18 @@ private:
|
||||
TopTools_IndexedMapOfShape myEdgesToAvoid; //!< Splits of edges to be avoided when building splits of faces
|
||||
TopTools_MapOfShape myLastInvEdges; //!< Edges marked invalid on the current step and to be avoided on the next step
|
||||
TopTools_MapOfShape myModifiedEdges; //!< Edges to be used for building splits
|
||||
TopTools_IndexedMapOfShape myInsideEdges; //!< Edges located fully inside solids built from the splits of offset faces
|
||||
|
||||
TopTools_IndexedDataMapOfShapeListOfShape myInvalidFaces; //!< Invalid faces - splits of offset faces consisting of invalid edges
|
||||
TopTools_DataMapOfShapeShape myArtInvalidFaces; //!< Artificially invalid faces - valid faces intentionally marked invalid
|
||||
//! to be rebuilt on the future steps in the situations when invalid edges
|
||||
//! are present, but invalid faces not
|
||||
BRepOffset_DataMapOfShapeIndexedMapOfShape myArtInvalidFaces; //!< Artificially invalid faces - valid faces intentionally marked invalid
|
||||
//! to be rebuilt on the future steps in the situations when invalid edges
|
||||
//! are present, but invalid faces not
|
||||
TopTools_DataMapOfShapeInteger myAlreadyInvFaces; //!< Count number of the same face being marked invalid to avoid infinite
|
||||
//! rebuilding of the same face
|
||||
TopTools_DataMapOfShapeListOfShape myFNewHoles; //!< Images of the hole faces of the original face
|
||||
|
||||
TopTools_DataMapOfShapeListOfShape mySSInterfs; //!< Intersection information, used to collect intersection pairs during rebuild
|
||||
TopTools_DataMapOfShapeListOfShape mySSInterfsArt; //!< Intersection information, used to collect intersection pairs during rebuild
|
||||
NCollection_DataMap <TopoDS_Shape,
|
||||
BRepOffset_DataMapOfShapeMapOfShape,
|
||||
TopTools_ShapeMapHasher> myIntersectionPairs; //!< All possible intersection pairs, used to avoid some of the intersections
|
||||
@ -1004,6 +1023,7 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfExtendedFaces (const Message_Prog
|
||||
myInvalidEdges.Clear();
|
||||
myInvertedEdges.Clear();
|
||||
mySSInterfs.Clear();
|
||||
mySSInterfsArt.Clear();
|
||||
myIntersectionPairs.Clear();
|
||||
mySolids.Nullify();
|
||||
myFacesToRebuild.Clear();
|
||||
@ -1299,9 +1319,8 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces (const Message_ProgressRang
|
||||
//
|
||||
if (bArtificialCase)
|
||||
{
|
||||
TopTools_IndexedMapOfShape aMEInv;
|
||||
// make the face invalid
|
||||
myArtInvalidFaces.Bind (aF, aCE);
|
||||
TopTools_IndexedMapOfShape aMEInv;
|
||||
//
|
||||
*pLFIm = aLFImages;
|
||||
TopTools_ListIteratorOfListOfShape aItLFIm (aLFImages);
|
||||
@ -1324,6 +1343,7 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces (const Message_ProgressRang
|
||||
}
|
||||
}
|
||||
//
|
||||
myArtInvalidFaces.Bind (aF, aMEInv);
|
||||
aDMFMIE.Bind (aF, aMEInv);
|
||||
aLFDone.Append (aF);
|
||||
//
|
||||
@ -1519,9 +1539,8 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces (const Message_ProgressRang
|
||||
RemoveInvalidSplitsFromValid (aDMFMVIE);
|
||||
//
|
||||
// remove inside faces
|
||||
TopTools_IndexedMapOfShape aMEInside;
|
||||
RemoveInsideFaces (anInvertedFaces, aMFToCheckInt, aMFInvInHole, aFHoles,
|
||||
aMERemoved, aMEInside, aPSOuter.Next (5.));
|
||||
aMERemoved, myInsideEdges, aPSOuter.Next (5.));
|
||||
//
|
||||
// make compound of valid splits
|
||||
TopoDS_Compound aCFIm;
|
||||
@ -1546,7 +1565,7 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces (const Message_ProgressRang
|
||||
FilterEdgesImages (aCFIm);
|
||||
//
|
||||
// filter invalid faces
|
||||
FilterInvalidFaces (aDMEF, aMEInside);
|
||||
FilterInvalidFaces (aDMEF, aMERemoved.Extent() ? myInsideEdges : aMERemoved);
|
||||
aNb = myInvalidFaces.Extent();
|
||||
if (!aNb)
|
||||
{
|
||||
@ -1572,7 +1591,10 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces (const Message_ProgressRang
|
||||
#endif
|
||||
//
|
||||
// filter invalid edges
|
||||
FilterInvalidEdges (aDMFMIE, aMERemoved);
|
||||
TopTools_MapOfShape aMEUseInRebuild;
|
||||
FilterInvalidEdges (aDMFMIE, aMERemoved,
|
||||
aMERemoved.Extent() ? myInsideEdges : aMERemoved,
|
||||
aMEUseInRebuild);
|
||||
//
|
||||
// Check additionally validity of edges originated from vertices.
|
||||
CheckEdgesCreatedByVertex();
|
||||
@ -1594,8 +1616,11 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces (const Message_ProgressRang
|
||||
for (i = 1; i <= aNb; ++i)
|
||||
{
|
||||
const TopoDS_Shape& aE = myInvalidEdges (i);
|
||||
myEdgesToAvoid.Add (aE);
|
||||
myLastInvEdges.Add (aE);
|
||||
if (!aMEUseInRebuild.Contains(aE))
|
||||
{
|
||||
myEdgesToAvoid.Add (aE);
|
||||
}
|
||||
}
|
||||
//
|
||||
aNb = myInvalidFaces.Extent();
|
||||
@ -1793,11 +1818,10 @@ Standard_Boolean BRepOffset_BuildOffsetFaces::CheckIfArtificial (const TopoDS_Sh
|
||||
{
|
||||
const TopoDS_Edge& aE = TopoDS::Edge (aItLE.Value());
|
||||
//
|
||||
if (myOEImages.IsBound (aE))
|
||||
if (const TopTools_ListOfShape* pLEIm = myOEImages.Seek (aE))
|
||||
{
|
||||
Standard_Boolean bChecked = Standard_False;
|
||||
const TopTools_ListOfShape& aLEIm = myOEImages.Find (aE);
|
||||
TopTools_ListIteratorOfListOfShape aItLEIm (aLEIm);
|
||||
TopTools_ListIteratorOfListOfShape aItLEIm (*pLEIm);
|
||||
for (; aItLEIm.More(); aItLEIm.Next())
|
||||
{
|
||||
const TopoDS_Edge& aEIm = TopoDS::Edge (aItLEIm.Value());
|
||||
@ -4165,6 +4189,7 @@ void BRepOffset_BuildOffsetFaces::RemoveInsideFaces (const TopTools_ListOfShape&
|
||||
RemoveInvalidSplits (aMFToRem, aMV, theMERemoved);
|
||||
//
|
||||
// Get inside faces from the removed ones comparing them with boundary edges
|
||||
theMEInside.Clear();
|
||||
aNb = theMERemoved.Extent();
|
||||
for (i = 1; i <= aNb; ++i)
|
||||
{
|
||||
@ -4189,6 +4214,28 @@ void BRepOffset_BuildOffsetFaces::RemoveInsideFaces (const TopTools_ListOfShape&
|
||||
void BRepOffset_BuildOffsetFaces::ShapesConnections (const TopTools_DataMapOfShapeShape& theDMFOr,
|
||||
BOPAlgo_Builder& theBuilder)
|
||||
{
|
||||
// Make connexity blocks from invalid edges to use the whole block
|
||||
// to which the edge is connected instead of the single edge.
|
||||
TopoDS_Compound aCEInv;
|
||||
BRep_Builder().MakeCompound(aCEInv);
|
||||
for (Standard_Integer i = 1; i <= myInvalidEdges.Extent(); ++i)
|
||||
{
|
||||
AddToContainer (myInvalidEdges(i), aCEInv);
|
||||
}
|
||||
|
||||
TopTools_ListOfShape aLCB;
|
||||
BOPTools_AlgoTools::MakeConnexityBlocks (aCEInv, TopAbs_VERTEX, TopAbs_EDGE, aLCB);
|
||||
|
||||
// Binding from the edge to the block
|
||||
TopTools_DataMapOfShapeShape aECBMap;
|
||||
for (TopTools_ListOfShape::Iterator itCB(aLCB); itCB.More(); itCB.Next())
|
||||
{
|
||||
for (TopoDS_Iterator itE(itCB.Value()); itE.More(); itE.Next())
|
||||
{
|
||||
aECBMap.Bind(itE.Value(), itCB.Value());
|
||||
}
|
||||
}
|
||||
|
||||
// update invalid edges with images and keep connection to original edge
|
||||
TopTools_DataMapOfShapeListOfShape aDMEOr;
|
||||
Standard_Integer aNb = myInvalidEdges.Extent();
|
||||
@ -4206,13 +4253,7 @@ void BRepOffset_BuildOffsetFaces::ShapesConnections (const TopTools_DataMapOfSha
|
||||
for (; aItLEIm.More(); aItLEIm.Next())
|
||||
{
|
||||
const TopoDS_Shape& aEIm = aItLEIm.Value();
|
||||
//
|
||||
TopTools_ListOfShape* pLEOr = aDMEOr.ChangeSeek (aEIm);
|
||||
if (!pLEOr)
|
||||
{
|
||||
pLEOr = aDMEOr.Bound (aEIm, TopTools_ListOfShape());
|
||||
}
|
||||
AppendToList (*pLEOr, aEInv);
|
||||
AddToContainer (aEIm, aEInv, aDMEOr);
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -4365,6 +4406,121 @@ void BRepOffset_BuildOffsetFaces::ShapesConnections (const TopTools_DataMapOfSha
|
||||
AppendToList (*pLF, aFOp);
|
||||
}
|
||||
}
|
||||
|
||||
// Treatment for the artificial case - check if one of the faces is artificially invalid
|
||||
for (Standard_Integer iF = 0; iF < 2; ++iF)
|
||||
{
|
||||
const TopoDS_Shape& aFArt = !iF ? *pF1 : *pF2;
|
||||
const TopoDS_Shape& aFOpposite = !iF ? *pF2 : *pF1;
|
||||
|
||||
if (!myArtInvalidFaces.IsBound (aFArt))
|
||||
continue;
|
||||
|
||||
if (myInvalidFaces.Contains (aFOpposite) && !myArtInvalidFaces.IsBound (aFOpposite))
|
||||
continue;
|
||||
|
||||
// Collect own invalid edges of the face and the invalid edges connected to those
|
||||
// own invalid edges to be avoided in the check for intersection.
|
||||
TopTools_IndexedMapOfShape aMEAvoid;
|
||||
if (const TopTools_IndexedMapOfShape* pFEInv = myArtInvalidFaces.Seek (aFOpposite))
|
||||
{
|
||||
for (Standard_Integer iE = 1; iE <= pFEInv->Extent(); ++iE)
|
||||
{
|
||||
if (const TopoDS_Shape* pCB = aECBMap.Seek (pFEInv->FindKey(iE)))
|
||||
{
|
||||
TopExp::MapShapes (*pCB, TopAbs_EDGE, aMEAvoid);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (const TopTools_ListOfShape* pLFIm = myOFImages.Seek (aFOpposite))
|
||||
{
|
||||
for (TopTools_ListOfShape::Iterator itLFIm (*pLFIm); itLFIm.More(); itLFIm.Next())
|
||||
{
|
||||
for (TopExp_Explorer expE (itLFIm.Value(), TopAbs_EDGE); expE.More(); expE.Next())
|
||||
{
|
||||
if (const TopoDS_Shape* pCB = aECBMap.Seek (expE.Current()))
|
||||
{
|
||||
TopExp::MapShapes (*pCB, TopAbs_EDGE, aMEAvoid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const TopoDS_Shape& aFArtIm = !iF ? aFIm1 : aFIm2;
|
||||
const TopoDS_Shape& aFOppositeIm = !iF ? aFIm2 : aFIm1;
|
||||
|
||||
// Check if there are any intersections between edges of artificially
|
||||
// invalid face and opposite face
|
||||
const Standard_Integer nFOp = pDS->Index (aFOppositeIm);
|
||||
|
||||
for (TopExp_Explorer expE (aFArtIm, TopAbs_EDGE); expE.More(); expE.Next())
|
||||
{
|
||||
const TopoDS_Shape& aE = expE.Current();
|
||||
if (!myInvalidEdges.Contains (aE) || myInvertedEdges.Contains (aE) || aMEAvoid.Contains (aE))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
const Standard_Integer nE = pDS->Index (aE);
|
||||
if (nE < 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!pDS->HasInterf(nE, nFOp))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
TopTools_ListOfShape aLV;
|
||||
const BOPDS_VectorOfInterfEF& aEFs = pDS->InterfEF();
|
||||
for (Standard_Integer iEF = 0; iEF < aEFs.Size(); ++iEF)
|
||||
{
|
||||
const BOPDS_InterfEF& aEF = aEFs (iEF);
|
||||
if (aEF.Contains (nE) && aEF.Contains(nFOp))
|
||||
{
|
||||
if (aEF.CommonPart().Type() == TopAbs_VERTEX)
|
||||
aLV.Append (pDS->Shape (aEF.IndexNew()));
|
||||
}
|
||||
}
|
||||
|
||||
if (aLV.IsEmpty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Make sure that there is an opposite intersection exists, i.e. some of the edges
|
||||
// of the opposite face intersect the artificially invalid face.
|
||||
const Standard_Integer nFArt = pDS->Index (aFArtIm);
|
||||
TopExp_Explorer expEOp (aFOppositeIm, TopAbs_EDGE);
|
||||
for (; expEOp.More(); expEOp.Next())
|
||||
{
|
||||
const TopoDS_Shape& aEOp = expEOp.Current();
|
||||
const Standard_Integer nEOp = pDS->Index (aEOp);
|
||||
if (pDS->HasInterf(nEOp, nFArt))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!expEOp.More())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Intersection is present - add connection between offset faces.
|
||||
AddToContainer (aFArt, aFOpposite, mySSInterfsArt);
|
||||
|
||||
// Add connection between edge and opposite face
|
||||
AddToContainer (aE, aFOpposite, mySSInterfsArt);
|
||||
|
||||
// Along with the opposite face, save the intersection vertices to
|
||||
// be used for trimming the intersection edge in the rebuilding process
|
||||
for (TopTools_ListOfShape::Iterator itLV (aLV); itLV.More(); itLV.Next())
|
||||
{
|
||||
// Add connection to intersection vertex
|
||||
AddToContainer (aE, itLV.Value(), mySSInterfsArt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4960,7 +5116,9 @@ void BRepOffset_BuildOffsetFaces::CheckEdgesCreatedByVertex()
|
||||
//purpose : Filtering the invalid edges according to currently invalid faces
|
||||
//=======================================================================
|
||||
void BRepOffset_BuildOffsetFaces::FilterInvalidEdges (const BRepOffset_DataMapOfShapeIndexedMapOfShape& theDMFMIE,
|
||||
const TopTools_IndexedMapOfShape& theMERemoved)
|
||||
const TopTools_IndexedMapOfShape& theMERemoved,
|
||||
const TopTools_IndexedMapOfShape& theMEInside,
|
||||
TopTools_MapOfShape& theMEUseInRebuild)
|
||||
{
|
||||
TopoDS_Compound aCEInv;
|
||||
TopTools_IndexedMapOfShape aMEInv;
|
||||
@ -5023,14 +5181,16 @@ void BRepOffset_BuildOffsetFaces::FilterInvalidEdges (const BRepOffset_DataMapOf
|
||||
const TopoDS_Shape& aF = myInvalidFaces.FindKey (i);
|
||||
if (myArtInvalidFaces.IsBound (aF))
|
||||
{
|
||||
const TopTools_IndexedMapOfShape& aMIE = theDMFMIE.Find (aF);
|
||||
const Standard_Integer aNbIE = aMIE.Extent();
|
||||
for (Standard_Integer iE = 1; iE <= aNbIE; ++iE)
|
||||
if (const TopTools_IndexedMapOfShape* aMIE = theDMFMIE.Seek (aF))
|
||||
{
|
||||
const TopoDS_Shape& aE = aMIE (iE);
|
||||
if (aMEInv.Contains (aE) && !aMEInvToAvoid.Contains (aE))
|
||||
const Standard_Integer aNbIE = aMIE->Extent();
|
||||
for (Standard_Integer iE = 1; iE <= aNbIE; ++iE)
|
||||
{
|
||||
aReallyInvEdges.Add (aE);
|
||||
const TopoDS_Shape& aE = aMIE->FindKey (iE);
|
||||
if (aMEInv.Contains (aE) && !aMEInvToAvoid.Contains (aE))
|
||||
{
|
||||
aReallyInvEdges.Add (aE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5053,8 +5213,46 @@ void BRepOffset_BuildOffsetFaces::FilterInvalidEdges (const BRepOffset_DataMapOf
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
myInvalidEdges = aReallyInvEdges;
|
||||
|
||||
// Check if any of the currently invalid edges may be used for
|
||||
// rebuilding splits of invalid faces.
|
||||
// For that the edge should be inside and not connected to invalid
|
||||
// boundary edges of the same origin.
|
||||
|
||||
aNb = myInvalidEdges.Extent();
|
||||
for (i = 1; i <= aNb; ++i)
|
||||
{
|
||||
const TopoDS_Shape& aE = myInvalidEdges (i);
|
||||
if (!theMEInside.Contains (aE) || !myValidEdges.Contains (aE))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const TopTools_ListOfShape* pEOrigins = myOEOrigins.Seek (aE);
|
||||
if (!pEOrigins)
|
||||
{
|
||||
theMEUseInRebuild.Add (aE);
|
||||
continue;
|
||||
}
|
||||
|
||||
Standard_Boolean bHasInvOutside = Standard_False;
|
||||
for (TopTools_ListOfShape::Iterator itEOr (*pEOrigins); !bHasInvOutside && itEOr.More(); itEOr.Next())
|
||||
{
|
||||
if (const TopTools_ListOfShape* pEIms = myOEImages.Seek (itEOr.Value()))
|
||||
{
|
||||
for (TopTools_ListOfShape::Iterator itEIms (*pEIms); !bHasInvOutside && itEIms.More(); itEIms.Next())
|
||||
{
|
||||
bHasInvOutside = myInvalidEdges.Contains (itEIms.Value()) && !theMEInside.Contains (itEIms.Value());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!bHasInvOutside)
|
||||
{
|
||||
theMEUseInRebuild.Add (aE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -5116,7 +5314,7 @@ void BRepOffset_BuildOffsetFaces::FindFacesToRebuild()
|
||||
aDMFLV.Bind (aF, aLVAvoid);
|
||||
}
|
||||
//
|
||||
const TopTools_ListOfShape* pLF = mySSInterfs.Seek (aF);
|
||||
const TopTools_ListOfShape* pLF = !myArtInvalidFaces.IsBound(aF) ? mySSInterfs.Seek (aF) : mySSInterfsArt.Seek(aF);
|
||||
if (pLF)
|
||||
{
|
||||
TopTools_ListIteratorOfListOfShape aItLFE (*pLF);
|
||||
@ -5275,7 +5473,7 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT
|
||||
TopTools_DataMapOfShapeShape aDMFImF;
|
||||
TopoDS_Compound aCFArt;
|
||||
BRep_Builder().MakeCompound (aCFArt);
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeShape aItM (myArtInvalidFaces);
|
||||
BRepOffset_DataMapOfShapeIndexedMapOfShape::Iterator aItM (myArtInvalidFaces);
|
||||
for (; aItM.More(); aItM.Next())
|
||||
{
|
||||
const TopoDS_Shape& aF = aItM.Key();
|
||||
@ -5597,9 +5795,13 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT
|
||||
continue;
|
||||
}
|
||||
//
|
||||
const TopTools_ListOfShape& aLFImi = myOFImages.FindFromKey (aFi);
|
||||
const TopTools_ListOfShape* aLFImi = myOFImages.Seek (aFi);
|
||||
if (!aLFImi)
|
||||
continue;
|
||||
//
|
||||
TopTools_ListOfShape& aLFEi = aFLE.ChangeFromKey (aFi);
|
||||
TopTools_ListOfShape* aLFEi = aFLE.ChangeSeek (aFi);
|
||||
if (!aLFEi)
|
||||
continue;
|
||||
//
|
||||
TopTools_ListOfShape& aLFDone = aMDone.ChangeFind (aFi);
|
||||
//
|
||||
@ -5618,20 +5820,42 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT
|
||||
if (pInterFi && !pInterFi->Contains (aFj))
|
||||
continue;
|
||||
|
||||
const TopTools_ListOfShape& aLFImj = myOFImages.FindFromKey (aFj);
|
||||
const TopTools_ListOfShape* aLFImj = myOFImages.Seek(aFj);
|
||||
if (!aLFImj)
|
||||
continue;
|
||||
//
|
||||
TopTools_ListOfShape& aLFEj = aFLE.ChangeFromKey (aFj);
|
||||
TopTools_ListOfShape* aLFEj = aFLE.ChangeSeek (aFj);
|
||||
if (!aLFEj)
|
||||
continue;
|
||||
|
||||
//
|
||||
// if there are some common edges between faces
|
||||
// we should use these edges and do not intersect again.
|
||||
TopTools_ListOfShape aLEC;
|
||||
FindCommonParts (aLFImi, aLFImj, aLEC);
|
||||
FindCommonParts (*aLFImi, *aLFImj, aLEC);
|
||||
//
|
||||
if (aLEC.Extent())
|
||||
{
|
||||
// no need to intersect if we have common edges between faces
|
||||
Standard_Boolean bForceUse = aMFIntExt.Contains (aFi) || aMFIntExt.Contains (aFj);
|
||||
ProcessCommonEdges (aLEC, aME, aMEInfETrim, aMAllInvs, bForceUse, aMECV, aMECheckExt, aDMEETrim, aLFEi, aLFEj, aMEToInt);
|
||||
ProcessCommonEdges (aLEC, aME, aMEInfETrim, aMAllInvs, bForceUse, aMECV, aMECheckExt, aDMEETrim, *aLFEi, *aLFEj, aMEToInt);
|
||||
|
||||
// Add common vertices not belonging to the common edges for trimming the intersection edges
|
||||
TopTools_IndexedMapOfShape aMVOnCE;
|
||||
for (TopTools_ListOfShape::Iterator itE (aLEC); itE.More(); itE.Next())
|
||||
{
|
||||
TopExp::MapShapes (itE.Value(), TopAbs_VERTEX, aMVOnCE);
|
||||
}
|
||||
|
||||
TopTools_ListOfShape aLEV;
|
||||
FindCommonParts (*aLFImi, *aLFImj, aLEV, TopAbs_VERTEX);
|
||||
for (TopTools_ListOfShape::Iterator itV (aLEV); itV.More(); itV.Next())
|
||||
{
|
||||
if (!aMVOnCE.Contains (itV.Value()))
|
||||
{
|
||||
aMECV.Add (itV.Value());
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
//
|
||||
@ -5657,7 +5881,7 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT
|
||||
{
|
||||
// use intersection line obtained on the previous steps
|
||||
// plus, find new origins for these lines
|
||||
UpdateIntersectedFaces (aFInv, aFi, aFj, aLFInv, aLFImi, aLFImj, aLFEi, aLFEj, aMEToInt);
|
||||
UpdateIntersectedFaces (aFInv, aFi, aFj, aLFInv, *aLFImi, *aLFImj, *aLFEi, *aLFEj, aMEToInt);
|
||||
continue;
|
||||
}
|
||||
//
|
||||
@ -5669,13 +5893,14 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT
|
||||
aLFDone.Append (aFj);
|
||||
aMDone.ChangeFind (aFj).Append (aFi);
|
||||
//
|
||||
IntersectFaces (aFInv, aFi, aFj, aLFInv, aLFImi, aLFImj, aLFEi, aLFEj, aMECV, aMEToInt);
|
||||
IntersectFaces (aFInv, aFi, aFj, aLFInv, *aLFImi, *aLFImj, *aLFEi, *aLFEj, aMECV, aMEToInt);
|
||||
}
|
||||
}
|
||||
//
|
||||
// intersect and trim edges for this chain
|
||||
IntersectAndTrimEdges (aMFInt, aMEToInt, aDMEETrim, aME, aMECV,
|
||||
aMVInv, aMVRInv, aMECheckExt, aMVBounds, aEImages);
|
||||
aMVInv, aMVRInv, aMECheckExt, bArtificial ? &mySSInterfsArt : 0,
|
||||
aMVBounds, aEImages);
|
||||
//
|
||||
Standard_Integer iE, aNbEToInt = aMEToInt.Extent();
|
||||
for (iE = 1; iE <= aNbEToInt; ++iE)
|
||||
@ -5956,12 +6181,8 @@ void BRepOffset_BuildOffsetFaces::FindFacesForIntersection (const TopoDS_Shape&
|
||||
}
|
||||
}
|
||||
//
|
||||
if (theArtCase)
|
||||
{
|
||||
return;
|
||||
}
|
||||
//
|
||||
const TopTools_ListOfShape* pLFInv = mySSInterfs.Seek (theFInv);
|
||||
const TopTools_DataMapOfShapeListOfShape& aSSInterfsMap = theArtCase ? mySSInterfsArt : mySSInterfs;
|
||||
const TopTools_ListOfShape* pLFInv = aSSInterfsMap.Seek (theFInv);
|
||||
if (!pLFInv)
|
||||
{
|
||||
return;
|
||||
@ -5985,7 +6206,7 @@ void BRepOffset_BuildOffsetFaces::FindFacesForIntersection (const TopoDS_Shape&
|
||||
for (i = 1; i <= aNbE; ++i)
|
||||
{
|
||||
const TopoDS_Shape& aS = theME (i);
|
||||
const TopTools_ListOfShape* pLF = mySSInterfs.Seek (aS);
|
||||
const TopTools_ListOfShape* pLF = aSSInterfsMap.Seek (aS);
|
||||
if (!pLF)
|
||||
{
|
||||
continue;
|
||||
@ -6002,30 +6223,33 @@ void BRepOffset_BuildOffsetFaces::FindFacesForIntersection (const TopoDS_Shape&
|
||||
//
|
||||
// check if the face has some connection to already added for intersection faces
|
||||
const TopTools_ListOfShape& aLFIm = myOFImages.FindFromKey (aF);
|
||||
TopTools_ListIteratorOfListOfShape aItLFIm (aLFIm);
|
||||
for (; aItLFIm.More(); aItLFIm.Next())
|
||||
if (!theArtCase)
|
||||
{
|
||||
const TopoDS_Shape& aFIm = aItLFIm.Value();
|
||||
TopExp_Explorer aExp (aFIm, TopAbs_EDGE);
|
||||
for (; aExp.More(); aExp.Next())
|
||||
TopTools_ListIteratorOfListOfShape aItLFIm (aLFIm);
|
||||
for (; aItLFIm.More(); aItLFIm.Next())
|
||||
{
|
||||
if (aMShapes.Contains (aExp.Current()))
|
||||
const TopoDS_Shape& aFIm = aItLFIm.Value();
|
||||
TopExp_Explorer aExp (aFIm, TopAbs_EDGE);
|
||||
for (; aExp.More(); aExp.Next())
|
||||
{
|
||||
if (aMShapes.Contains (aExp.Current()))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (aExp.More())
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (aExp.More())
|
||||
if (!aItLFIm.More())
|
||||
{
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (!aItLFIm.More())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
//
|
||||
aMFToAdd.Add (aF);
|
||||
aItLFIm.Initialize (aLFIm);
|
||||
TopTools_ListIteratorOfListOfShape aItLFIm (aLFIm);
|
||||
for (; aItLFIm.More(); aItLFIm.Next())
|
||||
{
|
||||
const TopoDS_Shape& aFIm = aItLFIm.Value();
|
||||
@ -6423,6 +6647,7 @@ void BRepOffset_BuildOffsetFaces::IntersectAndTrimEdges (const TopTools_IndexedM
|
||||
const TopTools_MapOfShape& theVertsToAvoid,
|
||||
const TopTools_MapOfShape& theNewVertsToAvoid,
|
||||
const TopTools_MapOfShape& theMECheckExt,
|
||||
const TopTools_DataMapOfShapeListOfShape* theSSInterfs,
|
||||
TopTools_MapOfShape& theMVBounds,
|
||||
TopTools_DataMapOfShapeListOfShape& theEImages)
|
||||
{
|
||||
@ -6468,30 +6693,39 @@ void BRepOffset_BuildOffsetFaces::IntersectAndTrimEdges (const TopTools_IndexedM
|
||||
aNb = theMSInv.Extent();
|
||||
for (i = 1; i <= aNb; ++i)
|
||||
{
|
||||
const TopoDS_Shape& aV = theMSInv (i);
|
||||
if (aV.ShapeType() != TopAbs_VERTEX)
|
||||
const TopoDS_Shape& aS = theMSInv(i);
|
||||
// edge case
|
||||
if (theSSInterfs)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
//
|
||||
TopTools_ListOfShape* pLVE = aDMVE.ChangeSeek (aV);
|
||||
if (!pLVE)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
//
|
||||
aIt.Initialize (*pLVE);
|
||||
for (; aIt.More(); aIt.Next())
|
||||
{
|
||||
const TopoDS_Shape& aE = aIt.Value();
|
||||
//
|
||||
aExp.Init (aE, TopAbs_VERTEX);
|
||||
for (; aExp.More(); aExp.Next())
|
||||
if (const TopTools_ListOfShape* pLV = theSSInterfs->Seek (aS))
|
||||
{
|
||||
const TopoDS_Shape& aV1 = aExp.Current();
|
||||
if (!theVertsToAvoid.Contains (aV1) && aMFence.Add (aV1))
|
||||
// Add vertices from intersection info to trim section edges of artificial faces
|
||||
for (TopTools_ListOfShape::Iterator itLV (*pLV); itLV.More(); itLV.Next())
|
||||
{
|
||||
aLArgs.Append (aV1);
|
||||
if (itLV.Value().ShapeType() == TopAbs_VERTEX)
|
||||
{
|
||||
aLArgs.Append (itLV.Value());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// vertex case
|
||||
if (const TopTools_ListOfShape* pLVE = aDMVE.ChangeSeek(aS))
|
||||
{
|
||||
aIt.Initialize(*pLVE);
|
||||
for (; aIt.More(); aIt.Next())
|
||||
{
|
||||
const TopoDS_Shape& aE = aIt.Value();
|
||||
//
|
||||
aExp.Init(aE, TopAbs_VERTEX);
|
||||
for (; aExp.More(); aExp.Next())
|
||||
{
|
||||
const TopoDS_Shape& aV1 = aExp.Current();
|
||||
if (!theVertsToAvoid.Contains(aV1) && aMFence.Add(aV1))
|
||||
{
|
||||
aLArgs.Append(aV1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -7137,9 +7371,19 @@ void BRepOffset_BuildOffsetFaces::UpdateValidEdges (const TopTools_IndexedDataMa
|
||||
TopExp::MapShapes (aItSpIm.Value(), TopAbs_EDGE, aNewEdges);
|
||||
}
|
||||
}
|
||||
|
||||
TopoDS_Compound anInsideEdges;
|
||||
BRep_Builder().MakeCompound (anInsideEdges);
|
||||
for (Standard_Integer iE = 1; iE <= myInsideEdges.Extent(); ++iE)
|
||||
{
|
||||
BRep_Builder().Add (anInsideEdges, myInsideEdges (iE));
|
||||
}
|
||||
|
||||
//
|
||||
// Rebuild the map of edges to avoid, using the intersection results
|
||||
TopTools_IndexedMapOfShape aMEAvoid;
|
||||
TopoDS_Compound aCEAvoid;
|
||||
BRep_Builder().MakeCompound (aCEAvoid);
|
||||
// GF's data structure
|
||||
const BOPDS_PDS& pDS = aGF.PDS();
|
||||
|
||||
@ -7175,7 +7419,7 @@ void BRepOffset_BuildOffsetFaces::UpdateValidEdges (const TopTools_IndexedDataMa
|
||||
if (bKeep)
|
||||
{
|
||||
// keep the original edge
|
||||
aMEAvoid.Add (aE);
|
||||
AddToContainer (aE, aMEAvoid);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -7184,9 +7428,41 @@ void BRepOffset_BuildOffsetFaces::UpdateValidEdges (const TopTools_IndexedDataMa
|
||||
{
|
||||
const TopoDS_Shape& aEIm = aItLEIm.Value();
|
||||
if (!aNewEdges.Contains (aEIm))
|
||||
aMEAvoid.Add (aEIm);
|
||||
{
|
||||
AddToContainer(aEIm, aCEAvoid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Standard_Boolean isCut = Standard_False;
|
||||
if (aCEAvoid.NbChildren() > 0)
|
||||
{
|
||||
// Perform intersection with the small subset of the edges to make
|
||||
// it possible to use the inside edges for building new splits.
|
||||
BOPAlgo_BOP aBOP;
|
||||
aBOP.AddArgument (aCEAvoid);
|
||||
aBOP.AddTool (anInsideEdges);
|
||||
aBOP.SetOperation (BOPAlgo_CUT);
|
||||
aBOP.Perform();
|
||||
isCut = !aBOP.HasErrors();
|
||||
|
||||
if (isCut)
|
||||
{
|
||||
for (TopoDS_Iterator itCE (aCEAvoid); itCE.More(); itCE.Next())
|
||||
{
|
||||
if (!aBOP.IsDeleted (itCE.Value()))
|
||||
{
|
||||
aMEAvoid.Add (itCE.Value());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isCut)
|
||||
{
|
||||
TopExp::MapShapes (aCEAvoid, TopAbs_EDGE, aMEAvoid);
|
||||
}
|
||||
|
||||
myEdgesToAvoid = aMEAvoid;
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ static int TranslateFrom (const BinObjMgt_Persistent& theSource,
|
||||
TopAbs_Orientation anOrient = CharToOrientation (aCharOrient);
|
||||
|
||||
theResult.TShape (theShapeSet->Shape (aShapeID).TShape());//TShape
|
||||
theResult.Location (theShapeSet->Locations().Location (aLocID)); //Location
|
||||
theResult.Location (theShapeSet->Locations().Location (aLocID), Standard_False); //Location
|
||||
theResult.Orientation (anOrient);//Orientation
|
||||
return 0;
|
||||
}
|
||||
|
@ -139,12 +139,12 @@ ChFiDS_TypeOfConcavity ChFi3d::DefineConnectType(const TopoDS_Edge& E,
|
||||
//function : IsTangentFaces
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean ChFi3d::IsTangentFaces(const TopoDS_Edge& theEdge,
|
||||
const TopoDS_Face& theFace1,
|
||||
const TopoDS_Face& theFace2,
|
||||
const GeomAbs_Shape Order)
|
||||
Standard_Boolean ChFi3d::IsTangentFaces(const TopoDS_Edge& theEdge,
|
||||
const TopoDS_Face& theFace1,
|
||||
const TopoDS_Face& theFace2,
|
||||
const GeomAbs_Shape theOrder)
|
||||
{
|
||||
if (Order == GeomAbs_G1 && BRep_Tool::Continuity(theEdge, theFace1, theFace2) != GeomAbs_C0)
|
||||
if (theOrder == GeomAbs_G1 && BRep_Tool::Continuity(theEdge, theFace1, theFace2) != GeomAbs_C0)
|
||||
return Standard_True;
|
||||
|
||||
Standard_Real TolC0 = Max(0.001, 1.5*BRep_Tool::Tolerance(theEdge));
|
||||
@ -152,15 +152,46 @@ Standard_Boolean ChFi3d::IsTangentFaces(const TopoDS_Edge& theEdge,
|
||||
Standard_Real aFirst;
|
||||
Standard_Real aLast;
|
||||
|
||||
// Obtaining of pcurves of edge on two faces.
|
||||
const Handle(Geom2d_Curve) aC2d1 = BRep_Tool::CurveOnSurface
|
||||
(theEdge, theFace1, aFirst, aLast);
|
||||
//For the case of seam edge
|
||||
TopoDS_Edge EE = theEdge;
|
||||
if (theFace1.IsSame(theFace2))
|
||||
EE.Reverse();
|
||||
const Handle(Geom2d_Curve) aC2d2 = BRep_Tool::CurveOnSurface
|
||||
(EE, theFace2, aFirst, aLast);
|
||||
Handle(Geom2d_Curve) aC2d1, aC2d2;
|
||||
|
||||
if (!theFace1.IsSame (theFace2) &&
|
||||
BRep_Tool::IsClosed (theEdge, theFace1) &&
|
||||
BRep_Tool::IsClosed (theEdge, theFace2))
|
||||
{
|
||||
//Find the edge in the face 1: this edge will have correct orientation
|
||||
TopoDS_Edge anEdgeInFace1;
|
||||
TopoDS_Face aFace1 = theFace1;
|
||||
aFace1.Orientation (TopAbs_FORWARD);
|
||||
TopExp_Explorer anExplo (aFace1, TopAbs_EDGE);
|
||||
for (; anExplo.More(); anExplo.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge (anExplo.Current());
|
||||
if (anEdge.IsSame (theEdge))
|
||||
{
|
||||
anEdgeInFace1 = anEdge;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (anEdgeInFace1.IsNull())
|
||||
return Standard_False;
|
||||
|
||||
aC2d1 = BRep_Tool::CurveOnSurface (anEdgeInFace1, aFace1, aFirst, aLast);
|
||||
TopoDS_Face aFace2 = theFace2;
|
||||
aFace2.Orientation (TopAbs_FORWARD);
|
||||
anEdgeInFace1.Reverse();
|
||||
aC2d2 = BRep_Tool::CurveOnSurface (anEdgeInFace1, aFace2, aFirst, aLast);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Obtaining of pcurves of edge on two faces.
|
||||
aC2d1 = BRep_Tool::CurveOnSurface (theEdge, theFace1, aFirst, aLast);
|
||||
//For the case of seam edge
|
||||
TopoDS_Edge EE = theEdge;
|
||||
if (theFace1.IsSame(theFace2))
|
||||
EE.Reverse();
|
||||
aC2d2 = BRep_Tool::CurveOnSurface (EE, theFace2, aFirst, aLast);
|
||||
}
|
||||
|
||||
if (aC2d1.IsNull() || aC2d2.IsNull())
|
||||
return Standard_False;
|
||||
|
||||
@ -191,15 +222,19 @@ Standard_Boolean ChFi3d::IsTangentFaces(const TopoDS_Edge& theEdge,
|
||||
if (i == aNbSamples) aPar = aLast;
|
||||
|
||||
LocalAnalysis_SurfaceContinuity aCont(aC2d1, aC2d2, aPar,
|
||||
aSurf1, aSurf2, Order,
|
||||
aSurf1, aSurf2, theOrder,
|
||||
0.001, TolC0, 0.1, 0.1, 0.1);
|
||||
if (!aCont.IsDone())
|
||||
{
|
||||
if (theOrder == GeomAbs_C2 &&
|
||||
aCont.StatusError() == LocalAnalysis_NullSecondDerivative)
|
||||
continue;
|
||||
|
||||
nbNotDone++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Order == GeomAbs_G1)
|
||||
if (theOrder == GeomAbs_G1)
|
||||
{
|
||||
if (!aCont.IsG1())
|
||||
return Standard_False;
|
||||
|
@ -2036,6 +2036,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
if ((possible1 && possible2) || (!possible1 && !possible2) || (nbarete > 4)) {
|
||||
while (!trouve) {
|
||||
nb++;
|
||||
if (nb>=nn) throw Standard_Failure("IntersectionAtEnd : the max number of faces reached");
|
||||
if (nb!=1) F3=Face[nb-2];
|
||||
Face[nb-1]=F3;
|
||||
if (CV1.Arc().IsSame(edgelibre1))
|
||||
|
@ -610,6 +610,9 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11,
|
||||
const Bnd_Range aRange(theUt21, theUt22);
|
||||
Bnd_Range aProjRng1;
|
||||
|
||||
// Precision of the calculation depends on circles radii
|
||||
const Standard_Real aPrecision = Max(Epsilon(myC[0]->Circle().Radius()), Epsilon(myC[1]->Circle().Radius()));
|
||||
|
||||
// Project arc of the 1st circle between points theUt11 and theUt12 to the
|
||||
// 2nd circle. It is necessary to chose correct arc from two possible ones.
|
||||
|
||||
@ -671,7 +674,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11,
|
||||
// myIsParallel = TRUE and only the least distance will be returned.
|
||||
//4. Arcs are not parallel. Then several (or single) extremas will be returned.
|
||||
|
||||
if (aRng.Delta() > Precision::Angular())
|
||||
if (aRng.Delta() > Precision::Confusion())
|
||||
{
|
||||
Standard_Real aPar = 0.0;
|
||||
aRng.GetIntermediatePoint(0.5, aPar);
|
||||
@ -686,7 +689,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11,
|
||||
aMinSqD = Min(aMinSqD, ExtPCir.SquareDistance(anExtID));
|
||||
}
|
||||
|
||||
if (aMinSqD <= aMinSquareDist + 10.* Epsilon(1. + aMinSqD))
|
||||
if (aMinSqD <= aMinSquareDist + (1. + aMinSqD) * aPrecision)
|
||||
{
|
||||
ClearSolutions();
|
||||
mySqDist.Append(aMinSqD);
|
||||
@ -711,7 +714,6 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Nearer solution can be found
|
||||
}
|
||||
else if (!aRng.IsVoid())
|
||||
@ -787,7 +789,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11,
|
||||
imin = k;
|
||||
}
|
||||
}
|
||||
if (aDmin <= aMinSquareDist + 10.* Epsilon(1. + aDmin))
|
||||
if (aDmin <= aMinSquareDist + (1. + aDmin) * aPrecision)
|
||||
{
|
||||
if (imin == 0)
|
||||
{
|
||||
|
@ -103,9 +103,11 @@ bool Font_FTFont::Init (const Handle(NCollection_Buffer)& theData,
|
||||
{
|
||||
throw Standard_ProgramError ("Font_FTFont, Light and Normal hinting styles are mutually exclusive");
|
||||
}
|
||||
#ifdef HAVE_FREETYPE
|
||||
setLoadFlag (FT_LOAD_TARGET_LIGHT, (theParams.FontHinting & Font_Hinting_Light) != 0);
|
||||
setLoadFlag (FT_LOAD_NO_HINTING, (theParams.FontHinting & Font_Hinting_Normal) == 0
|
||||
&& (theParams.FontHinting & Font_Hinting_Light) == 0);
|
||||
#endif
|
||||
|
||||
// manage native / autohinting
|
||||
if ((theParams.FontHinting & Font_Hinting_ForceAutohint) != 0
|
||||
@ -113,8 +115,10 @@ bool Font_FTFont::Init (const Handle(NCollection_Buffer)& theData,
|
||||
{
|
||||
throw Standard_ProgramError ("Font_FTFont, ForceAutohint and NoAutohint are mutually exclusive");
|
||||
}
|
||||
#ifdef HAVE_FREETYPE
|
||||
setLoadFlag (FT_LOAD_FORCE_AUTOHINT, (theParams.FontHinting & Font_Hinting_ForceAutohint) != 0);
|
||||
setLoadFlag (FT_LOAD_NO_AUTOHINT, (theParams.FontHinting & Font_Hinting_NoAutohint) != 0);
|
||||
#endif
|
||||
|
||||
if (!myFTLib->IsValid())
|
||||
{
|
||||
|
@ -132,7 +132,7 @@ void GeomConvert_CompCurveToBSplineCurve::Add(
|
||||
if (SecondCurve->Degree() < Deg) { SecondCurve->IncreaseDegree(Deg); }
|
||||
|
||||
// Declarationd
|
||||
Standard_Real L1, L2, U_de_raccord;
|
||||
Standard_Real L1, L2;
|
||||
Standard_Integer ii, jj;
|
||||
Standard_Real Ratio=1, Ratio1, Ratio2, Delta1, Delta2;
|
||||
Standard_Integer NbP1 = FirstCurve->NbPoles(), NbP2 = SecondCurve->NbPoles();
|
||||
@ -159,7 +159,6 @@ void GeomConvert_CompCurveToBSplineCurve::Add(
|
||||
Delta1 = 0;
|
||||
Ratio2 = 1/Ratio;
|
||||
Delta2 = Ratio2*SecondCurve->Knot(1) - FirstCurve->Knot(NbK1);
|
||||
U_de_raccord = FirstCurve->LastParameter();
|
||||
}
|
||||
else {
|
||||
// On ne bouge pas la seconde courbe
|
||||
@ -167,12 +166,11 @@ void GeomConvert_CompCurveToBSplineCurve::Add(
|
||||
Delta1 = Ratio1*FirstCurve->Knot(NbK1) - SecondCurve->Knot(1);
|
||||
Ratio2 = 1;
|
||||
Delta2 = 0;
|
||||
U_de_raccord = SecondCurve->FirstParameter();
|
||||
}
|
||||
|
||||
// Les Noeuds
|
||||
Standard_Real eps;
|
||||
for (ii=1; ii<NbK1; ii++) {
|
||||
for (ii=1; ii<=NbK1; ii++) {
|
||||
Noeuds(ii) = Ratio1*FirstCurve->Knot(ii) - Delta1;
|
||||
if(ii > 1) {
|
||||
eps = Epsilon (Abs(Noeuds(ii-1)));
|
||||
@ -183,11 +181,6 @@ void GeomConvert_CompCurveToBSplineCurve::Add(
|
||||
}
|
||||
Mults(ii) = FirstCurve->Multiplicity(ii);
|
||||
}
|
||||
Noeuds(NbK1) = U_de_raccord;
|
||||
eps = Epsilon (Abs(Noeuds(NbK1-1)));
|
||||
if(Noeuds(NbK1) - Noeuds(NbK1-1) <= eps) {
|
||||
Noeuds(NbK1) += eps;
|
||||
}
|
||||
Mults(NbK1) = FirstCurve->Degree();
|
||||
for (ii=2, jj=NbK1+1; ii<=NbK2; ii++, jj++) {
|
||||
Noeuds(jj) = Ratio2*SecondCurve->Knot(ii) - Delta2;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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:
|
||||
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
@ -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:
|
||||
|
@ -214,9 +214,9 @@ Handle(Image_PixMap) Graphic3d_TextureRoot::GetImage (const Handle(Image_Support
|
||||
void Graphic3d_TextureRoot::convertToCompatible (const Handle(Image_SupportedFormats)& theSupported,
|
||||
const Handle(Image_PixMap)& theImage)
|
||||
{
|
||||
if (theSupported.IsNull()
|
||||
|| theSupported->IsSupported (theImage->Format())
|
||||
|| theImage.IsNull())
|
||||
if (theImage.IsNull()
|
||||
|| theSupported.IsNull()
|
||||
|| theSupported->IsSupported (theImage->Format()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
//function : AddPointIntoLine
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
static inline void AddPointIntoLine(Handle(IntSurf_LineOn2S) theLine,
|
||||
static inline void AddPointIntoLine(Handle(IntSurf_LineOn2S)& theLine,
|
||||
const Standard_Real* const theArrPeriods,
|
||||
IntSurf_PntOn2S &thePoint,
|
||||
IntPatch_Point* theVertex = 0)
|
||||
@ -252,6 +252,69 @@ void IntPatch_ALineToWLine::SetTolOpenDomain(const Standard_Real aTol)
|
||||
return myTolOpenDomain;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : CorrectEndPoint
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void IntPatch_ALineToWLine::CorrectEndPoint(Handle(IntSurf_LineOn2S)& theLine,
|
||||
const Standard_Integer theIndex) const
|
||||
{
|
||||
const Standard_Real aTol = 1.e-5;
|
||||
const Standard_Real aSqTol = 1.e-10;
|
||||
|
||||
//Perform linear extrapolation from two previous points
|
||||
Standard_Integer anIndFirst, anIndSecond;
|
||||
if (theIndex == 1)
|
||||
{
|
||||
anIndFirst = 3;
|
||||
anIndSecond = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
anIndFirst = theIndex - 2;
|
||||
anIndSecond = theIndex - 1;
|
||||
}
|
||||
IntSurf_PntOn2S aPntOn2S = theLine->Value(theIndex);
|
||||
|
||||
for (Standard_Integer ii = 1; ii <= 2; ii++)
|
||||
{
|
||||
Standard_Boolean anIsOnFirst = (ii == 1);
|
||||
|
||||
const IntSurf_Quadric& aQuad = (ii == 1)? myQuad1 : myQuad2;
|
||||
if (aQuad.TypeQuadric() == GeomAbs_Cone)
|
||||
{
|
||||
const gp_Cone aCone = aQuad.Cone();
|
||||
const gp_Pnt anApex = aCone.Apex();
|
||||
if (anApex.SquareDistance (aPntOn2S.Value()) > aSqTol)
|
||||
continue;
|
||||
}
|
||||
else if (aQuad.TypeQuadric() == GeomAbs_Sphere)
|
||||
{
|
||||
Standard_Real aU, aV;
|
||||
aPntOn2S.ParametersOnSurface(anIsOnFirst, aU, aV);
|
||||
if (Abs(aV - M_PI/2) > aTol &&
|
||||
Abs(aV + M_PI/2) > aTol)
|
||||
continue;
|
||||
}
|
||||
else
|
||||
continue;
|
||||
|
||||
gp_Pnt2d PrevPrevP2d = theLine->Value(anIndFirst).ValueOnSurface(anIsOnFirst);
|
||||
gp_Pnt2d PrevP2d = theLine->Value (anIndSecond).ValueOnSurface(anIsOnFirst);
|
||||
gp_Dir2d aDir = gp_Vec2d(PrevPrevP2d, PrevP2d);
|
||||
Standard_Real aX0 = PrevPrevP2d.X(), aY0 = PrevPrevP2d.Y();
|
||||
Standard_Real aXend, aYend;
|
||||
aPntOn2S.ParametersOnSurface(anIsOnFirst, aXend, aYend);
|
||||
|
||||
if (Abs(aDir.Y()) < gp::Resolution())
|
||||
continue;
|
||||
|
||||
Standard_Real aNewXend = aDir.X()/aDir.Y() * (aYend - aY0) + aX0;
|
||||
|
||||
theLine->SetUV (theIndex, anIsOnFirst, aNewXend, aYend);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetSectionRadius
|
||||
//purpose :
|
||||
@ -331,24 +394,27 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine,
|
||||
#if 0
|
||||
//To draw ALine as a wire DRAW-object use the following code.
|
||||
{
|
||||
static int zzz = 0;
|
||||
zzz++;
|
||||
static int ind = 0;
|
||||
ind++;
|
||||
|
||||
bool flShow = /*(zzz == 1)*/false;
|
||||
bool flShow = true;
|
||||
|
||||
if (flShow)
|
||||
{
|
||||
std::cout << " +++ DUMP ALine (begin) +++++" << std::endl;
|
||||
Standard_Integer aI = 0;
|
||||
const Standard_Real aStep = (theLPar - theFPar) / 9999.0;
|
||||
for (Standard_Real aPrm = theFPar; aPrm < theLPar; aPrm += aStep)
|
||||
const Standard_Integer NbSamples = 20;
|
||||
const Standard_Real aStep = (theLPar - theFPar) / NbSamples;
|
||||
char* name = new char[100];
|
||||
|
||||
for (Standard_Integer ii = 0; ii <= NbSamples; ii++)
|
||||
{
|
||||
Standard_Real aPrm = theFPar + ii * aStep;
|
||||
const gp_Pnt aPP(theALine->Value(aPrm));
|
||||
std::cout << "vertex v" << ++aI << " " << aPP.X() << " " << aPP.Y() << " " << aPP.Z() << std::endl;
|
||||
}
|
||||
std::cout << "vertex v" << ii << " " << aPP.X() << " " << aPP.Y() << " " << aPP.Z() << std::endl;
|
||||
|
||||
gp_Pnt aPP(theALine->Value(theLPar));
|
||||
std::cout << "vertex v" << ++aI << " " << aPP.X() << " " << aPP.Y() << " " << aPP.Z() << std::endl;
|
||||
sprintf(name, "p%d_%d", ii, ind);
|
||||
Draw::Set(name, aPP);
|
||||
}
|
||||
std::cout << " --- DUMP ALine (end) -----" << std::endl;
|
||||
}
|
||||
}
|
||||
@ -435,6 +501,8 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine,
|
||||
|
||||
Standard_Integer aNewVertID = 0;
|
||||
aLinOn2S = new IntSurf_LineOn2S;
|
||||
Standard_Boolean anIsFirstDegenerated = Standard_False,
|
||||
anIsLastDegenerated = Standard_False;
|
||||
|
||||
const Standard_Real aStepMin = 0.1*aStep, aStepMax = 10.0*aStep;
|
||||
|
||||
@ -467,6 +535,9 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine,
|
||||
{
|
||||
// We cannot compute 2D-parameters of
|
||||
// aPOn2S correctly.
|
||||
|
||||
if (anIsLastDegenerated) //the current last point is wrong
|
||||
aLinOn2S->RemovePoint (aLinOn2S->NbPoints());
|
||||
|
||||
isPointValid = Standard_False;
|
||||
}
|
||||
@ -591,6 +662,27 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine,
|
||||
AddPointIntoLine(aLinOn2S, anArrPeriods, aPOn2S);
|
||||
aPrevLPoint = aPOn2S;
|
||||
}
|
||||
else
|
||||
{
|
||||
//add point, set correxponding status: to be corrected later
|
||||
Standard_Boolean ToAdd = Standard_False;
|
||||
if (aLinOn2S->NbPoints() == 0)
|
||||
{
|
||||
anIsFirstDegenerated = Standard_True;
|
||||
ToAdd = Standard_True;
|
||||
}
|
||||
else if (aLinOn2S->NbPoints() > 1)
|
||||
{
|
||||
anIsLastDegenerated = Standard_True;
|
||||
ToAdd = Standard_True;
|
||||
}
|
||||
|
||||
if (ToAdd)
|
||||
{
|
||||
AddPointIntoLine(aLinOn2S, anArrPeriods, aPOn2S);
|
||||
aPrevLPoint = aPOn2S;
|
||||
}
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
@ -630,6 +722,15 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine,
|
||||
|
||||
aPrePointExist = IsPoleOrSeam(myS1, myS2, aPrefIso, aLinOn2S, aVtx,
|
||||
anArrPeriods, aTol, aSingularSurfaceID);
|
||||
if (aPrePointExist == IntPatch_SPntPole ||
|
||||
aPrePointExist == IntPatch_SPntPoleSeamU)
|
||||
{
|
||||
//set correxponding status: to be corrected later
|
||||
if (aLinOn2S->NbPoints() == 1)
|
||||
anIsFirstDegenerated = Standard_True;
|
||||
else
|
||||
anIsLastDegenerated = Standard_True;
|
||||
}
|
||||
|
||||
const Standard_Real aCurVertParam = aVtx.ParameterOnLine();
|
||||
if(aPrePointExist != IntPatch_SPntNone)
|
||||
@ -702,6 +803,15 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine,
|
||||
continue;
|
||||
}
|
||||
|
||||
//Correct first and last points if needed
|
||||
if (aLinOn2S->NbPoints() >= 3)
|
||||
{
|
||||
if (anIsFirstDegenerated)
|
||||
CorrectEndPoint (aLinOn2S, 1);
|
||||
if (anIsLastDegenerated)
|
||||
CorrectEndPoint (aLinOn2S, aLinOn2S->NbPoints());
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
//-- W L i n e c r e a t i o n ---
|
||||
//-----------------------------------------------------------------
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <IntPatch_SequenceOfLine.hxx>
|
||||
#include <IntSurf_Quadric.hxx>
|
||||
#include <IntSurf_LineOn2S.hxx>
|
||||
|
||||
class IntPatch_ALine;
|
||||
class IntSurf_PntOn2S;
|
||||
@ -90,6 +91,13 @@ protected:
|
||||
//! This check is made for cone and sphere only.
|
||||
Standard_EXPORT Standard_Real GetSectionRadius(const gp_Pnt& thePnt3d) const;
|
||||
|
||||
//! Corrects the U-parameter of an end point (first or last) of the line
|
||||
//! if this end point is a pole.
|
||||
//! The line must contain at least 3 points.
|
||||
//! This is made for cone and sphere only.
|
||||
Standard_EXPORT void CorrectEndPoint(Handle(IntSurf_LineOn2S)& theLine,
|
||||
const Standard_Integer theIndex) const;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <Geom2dAdaptor_Curve.hxx>
|
||||
#include <ProjLib.hxx>
|
||||
|
||||
|
||||
//======================================================================
|
||||
// function: SequenceOfLine
|
||||
//======================================================================
|
||||
@ -125,7 +126,7 @@ void IntPatch_Intersection::SetTolerances(const Standard_Real TolArc,
|
||||
if(myTolArc>0.5) myTolArc=0.5;
|
||||
if(myTolTang>0.5) myTolTang=0.5;
|
||||
if(myFleche<1.0e-3) myFleche=1e-3;
|
||||
if(myUVMaxStep<1.0e-3) myUVMaxStep=1e-3;
|
||||
//if(myUVMaxStep<1.0e-3) myUVMaxStep=1e-3;
|
||||
if(myFleche>10) myFleche=10;
|
||||
if(myUVMaxStep>0.5) myUVMaxStep=0.5;
|
||||
}
|
||||
@ -1023,7 +1024,6 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_Surface)& theS1,
|
||||
myFleche = 0.01;
|
||||
if(myUVMaxStep <= Precision::PConfusion())
|
||||
myUVMaxStep = 0.01;
|
||||
|
||||
done = Standard_False;
|
||||
spnt.Clear();
|
||||
slin.Clear();
|
||||
@ -1254,15 +1254,16 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_Surface)& t
|
||||
const GeomAbs_SurfaceType typs2)
|
||||
{
|
||||
IntPatch_PrmPrmIntersection interpp;
|
||||
//
|
||||
if(!theD1->DomainIsInfinite() && !theD2->DomainIsInfinite())
|
||||
{
|
||||
Standard_Boolean ClearFlag = Standard_True;
|
||||
if(!ListOfPnts.IsEmpty())
|
||||
{
|
||||
interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep, ListOfPnts);
|
||||
interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche, myUVMaxStep, ListOfPnts);
|
||||
ClearFlag = Standard_False;
|
||||
}
|
||||
interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep,ClearFlag);
|
||||
interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche, myUVMaxStep,ClearFlag);
|
||||
}
|
||||
else if((theD1->DomainIsInfinite()) ^ (theD2->DomainIsInfinite()))
|
||||
{
|
||||
@ -1275,7 +1276,7 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_Surface)& t
|
||||
const Standard_Real AP = Max(MU, MV);
|
||||
Handle(Adaptor3d_Surface) SS;
|
||||
FUN_TrimInfSurf(pMinXYZ, pMaxXYZ, theS1, AP, SS);
|
||||
interpp.Perform(SS,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep);
|
||||
interpp.Perform(SS,theD1,theS2,theD2,TolTang,TolArc,myFleche, myUVMaxStep);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1285,7 +1286,7 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_Surface)& t
|
||||
const Standard_Real AP = Max(MU, MV);
|
||||
Handle(Adaptor3d_Surface) SS;
|
||||
FUN_TrimInfSurf(pMinXYZ, pMaxXYZ, theS2, AP, SS);
|
||||
interpp.Perform(theS1, theD1, SS, theD2,TolTang, TolArc,myFleche,myUVMaxStep);
|
||||
interpp.Perform(theS1, theD1, SS, theD2,TolTang, TolArc,myFleche, myUVMaxStep);
|
||||
}
|
||||
}//(theD1->DomainIsInfinite()) ^ (theD2->DomainIsInfinite())
|
||||
else
|
||||
@ -1324,7 +1325,7 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_Surface)& t
|
||||
Handle(Adaptor3d_Surface) nS1 = theS1;
|
||||
Handle(Adaptor3d_Surface) nS2 = theS2;
|
||||
FUN_TrimBothSurf(theS1,typs1,theS2,typs2,1.e+8,nS1,nS2);
|
||||
interpp.Perform(nS1,theD1,nS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep);
|
||||
interpp.Perform(nS1,theD1,nS2,theD2,TolTang,TolArc,myFleche, myUVMaxStep);
|
||||
}// 'NON - COLLINEAR LINES'
|
||||
}// both domains are infinite
|
||||
|
||||
@ -1791,3 +1792,134 @@ void IntPatch_Intersection::Dump(const Standard_Integer /*Mode*/,
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : CheckSingularPoints
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean IntPatch_Intersection::CheckSingularPoints(
|
||||
const Handle(Adaptor3d_Surface)& theS1,
|
||||
const Handle(Adaptor3d_TopolTool)& theD1,
|
||||
const Handle(Adaptor3d_Surface)& theS2,
|
||||
Standard_Real& theDist)
|
||||
{
|
||||
theDist = Precision::Infinite();
|
||||
Standard_Boolean isSingular = Standard_False;
|
||||
if (theS1 == theS2)
|
||||
{
|
||||
return isSingular;
|
||||
}
|
||||
//
|
||||
const Standard_Integer aNbBndPnts = 5;
|
||||
const Standard_Real aTol = Precision::Confusion();
|
||||
Standard_Integer i;
|
||||
theD1->Init();
|
||||
Standard_Boolean isU = Standard_True;
|
||||
for (; theD1->More(); theD1->Next())
|
||||
{
|
||||
Handle(Adaptor2d_Curve2d) aBnd = theD1->Value();
|
||||
Standard_Real pinf = aBnd->FirstParameter(), psup = aBnd->LastParameter();
|
||||
if (Precision::IsNegativeInfinite(pinf) || Precision::IsPositiveInfinite(psup))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
Standard_Real t, dt = (psup - pinf) / (aNbBndPnts - 1);
|
||||
gp_Pnt2d aP1;
|
||||
gp_Vec2d aDir;
|
||||
aBnd->D1((pinf + psup) / 2., aP1, aDir);
|
||||
if (Abs(aDir.X()) > Abs(aDir.Y()))
|
||||
isU = Standard_True;
|
||||
else
|
||||
isU = Standard_False;
|
||||
gp_Pnt aPP1;
|
||||
gp_Vec aDU, aDV;
|
||||
Standard_Real aD1NormMax = 0.;
|
||||
gp_XYZ aPmid(0., 0., 0.);
|
||||
Standard_Integer aNb = 0;
|
||||
for (t = pinf; t <= psup; t += dt)
|
||||
{
|
||||
aP1 = aBnd->Value(t);
|
||||
theS1->D1(aP1.X(), aP1.Y(), aPP1, aDU, aDV);
|
||||
if (isU)
|
||||
aD1NormMax = Max(aD1NormMax, aDU.Magnitude());
|
||||
else
|
||||
aD1NormMax = Max(aD1NormMax, aDV.Magnitude());
|
||||
|
||||
aPmid += aPP1.XYZ();
|
||||
aNb++;
|
||||
|
||||
if (aD1NormMax > aTol)
|
||||
break;
|
||||
}
|
||||
|
||||
if (aD1NormMax <= aTol)
|
||||
{
|
||||
//Singular point aPP1;
|
||||
aPmid /= aNb;
|
||||
aPP1.SetXYZ(aPmid);
|
||||
Standard_Real aTolU = Precision::PConfusion(), aTolV = Precision::PConfusion();
|
||||
Extrema_ExtPS aProj(aPP1, *theS2.get(), aTolU, aTolV, Extrema_ExtFlag_MIN);
|
||||
|
||||
if (aProj.IsDone())
|
||||
{
|
||||
Standard_Integer aNbExt = aProj.NbExt();
|
||||
for (i = 1; i <= aNbExt; ++i)
|
||||
{
|
||||
theDist = Min(theDist, aProj.SquareDistance(i));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (!Precision::IsInfinite(theDist))
|
||||
{
|
||||
theDist = Sqrt(theDist);
|
||||
isSingular = Standard_True;
|
||||
}
|
||||
|
||||
return isSingular;
|
||||
|
||||
}
|
||||
//=======================================================================
|
||||
//function : DefineUVMaxStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Real IntPatch_Intersection::DefineUVMaxStep(
|
||||
const Handle(Adaptor3d_Surface)& theS1,
|
||||
const Handle(Adaptor3d_TopolTool)& theD1,
|
||||
const Handle(Adaptor3d_Surface)& theS2,
|
||||
const Handle(Adaptor3d_TopolTool)& theD2)
|
||||
{
|
||||
Standard_Real anUVMaxStep = 0.001;
|
||||
Standard_Real aDistToSing1 = Precision::Infinite();
|
||||
Standard_Real aDistToSing2 = Precision::Infinite();
|
||||
const Standard_Real aTolMin = Precision::Confusion(), aTolMax = 1.e-5;
|
||||
if (theS1 != theS2)
|
||||
{
|
||||
Standard_Boolean isSing1 = CheckSingularPoints(theS1, theD1, theS2, aDistToSing1);
|
||||
if (isSing1)
|
||||
{
|
||||
if (aDistToSing1 > aTolMin && aDistToSing1 < aTolMax)
|
||||
{
|
||||
anUVMaxStep = 0.0001;
|
||||
}
|
||||
else
|
||||
{
|
||||
isSing1 = Standard_False;
|
||||
}
|
||||
}
|
||||
if (!isSing1)
|
||||
{
|
||||
Standard_Boolean isSing2 = CheckSingularPoints(theS2, theD2, theS1, aDistToSing2);
|
||||
if (isSing2)
|
||||
{
|
||||
if (aDistToSing2 > aTolMin && aDistToSing2 < aTolMax)
|
||||
{
|
||||
anUVMaxStep = 0.0001;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return anUVMaxStep;
|
||||
}
|
||||
|
||||
|
@ -133,7 +133,21 @@ public:
|
||||
//! Mode for more accurate dumps.
|
||||
Standard_EXPORT void Dump (const Standard_Integer Mode, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2) const;
|
||||
|
||||
//! Checks if surface theS1 has degenerated boundary (dS/du or dS/dv = 0) and
|
||||
//! calculates minimal distance between corresponding singular points and surface theS2
|
||||
//! If singular point exists the method returns "true" and stores minimal distance in theDist.
|
||||
Standard_EXPORT static Standard_Boolean CheckSingularPoints(
|
||||
const Handle(Adaptor3d_Surface)& theS1,
|
||||
const Handle(Adaptor3d_TopolTool)& theD1,
|
||||
const Handle(Adaptor3d_Surface)& theS2,
|
||||
Standard_Real& theDist);
|
||||
|
||||
//! Calculates recommended value for myUVMaxStep depending on surfaces and their domains
|
||||
Standard_EXPORT static Standard_Real DefineUVMaxStep(
|
||||
const Handle(Adaptor3d_Surface)& theS1,
|
||||
const Handle(Adaptor3d_TopolTool)& theD1,
|
||||
const Handle(Adaptor3d_Surface)& theS2,
|
||||
const Handle(Adaptor3d_TopolTool)& theD2);
|
||||
|
||||
|
||||
protected:
|
||||
|
@ -2386,6 +2386,9 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf
|
||||
//Try to extend the intersection line to the boundary,
|
||||
//if it is possibly
|
||||
PW.PutToBoundary(Surf1, Surf2);
|
||||
//
|
||||
if (PW.NbPoints() < 3)
|
||||
continue;
|
||||
|
||||
const Standard_Integer aMinNbPoints = 40;
|
||||
if(PW.NbPoints() < aMinNbPoints)
|
||||
|
@ -649,8 +649,11 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L,
|
||||
IntCS.ParameterOnSurface(U2,V2);
|
||||
gp_Pnt anOldPnt, aNewPnt;
|
||||
OtherSurf->D0(U,V, anOldPnt);
|
||||
OtherSurf->D0(U2,V2, aNewPnt);
|
||||
if (anOldPnt.SquareDistance(aNewPnt) < Precision::SquareConfusion())
|
||||
OtherSurf->D0(U2,V2, aNewPnt);
|
||||
//if (anOldPnt.SquareDistance(aNewPnt) < Precision::SquareConfusion())
|
||||
Standard_Real aTolConf = Max(Precision::Confusion(), edgeTol);
|
||||
|
||||
if (anOldPnt.SquareDistance(aNewPnt) < aTolConf * aTolConf)
|
||||
{
|
||||
U2 = U;
|
||||
V2 = V;
|
||||
|
@ -471,8 +471,7 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol)
|
||||
|
||||
//----------------------------------------------------
|
||||
//-- On detecte les points confondus dans la LineOn2S
|
||||
Standard_Real dmini = Precision::Confusion();
|
||||
dmini*=dmini;
|
||||
Standard_Real dmini = Precision::SquareConfusion();
|
||||
for(i=2; (i<=nbponline) && (nbponline > 2); i++) {
|
||||
const IntSurf_PntOn2S& aPnt1=curv->Value(i-1);
|
||||
const IntSurf_PntOn2S& aPnt2=curv->Value(i);
|
||||
@ -516,7 +515,20 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol)
|
||||
|
||||
IntSurf_PntOn2S POn2S = svtx.Value(i).PntOn2S();
|
||||
RecadreMemePeriode(POn2S,curv->Value(1),U1Period(),V1Period(),U2Period(),V2Period());
|
||||
curv->Value(1,POn2S);
|
||||
if (myCreationWay == IntPatch_WLImpImp)
|
||||
{
|
||||
//Adjust first point of curve to corresponding vertex the following way:
|
||||
//set 3D point as the point of the vertex and 2D points as the points of the point on curve.
|
||||
curv->SetPoint (1, POn2S.Value());
|
||||
Standard_Real mu1,mv1,mu2,mv2;
|
||||
curv->Value(1).Parameters(mu1,mv1,mu2,mv2);
|
||||
svtx.ChangeValue(i).SetParameter(1);
|
||||
svtx.ChangeValue(i).SetParameters(mu1,mv1,mu2,mv2);
|
||||
}
|
||||
else
|
||||
{
|
||||
curv->Value(1,POn2S);
|
||||
}
|
||||
|
||||
//--curv->Value(1,svtx.Value(i).PntOn2S());
|
||||
svtx.ChangeValue(i).SetParameter(1.0);
|
||||
@ -551,6 +563,9 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol)
|
||||
//---------------------------------------------------------
|
||||
Standard_Boolean Substitution = Standard_False;
|
||||
//-- for(k=indicevertexonline+1; !Substitution && k>=indicevertexonline-1;k--) { avant le 9 oct 97
|
||||
Standard_Real mu1,mv1,mu2,mv2;
|
||||
curv->Value(indicevertexonline).Parameters(mu1,mv1,mu2,mv2);
|
||||
|
||||
for(k=indicevertexonline+1; k>=indicevertexonline-1;k--) {
|
||||
if(k>0 && k<=nbponline) {
|
||||
if(CompareVertexAndPoint(P,curv->Value(k).Value(),vTol)) {
|
||||
@ -560,9 +575,21 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol)
|
||||
//-------------------------------------------------------
|
||||
IntSurf_PntOn2S POn2S = svtx.Value(i).PntOn2S();
|
||||
RecadreMemePeriode(POn2S,curv->Value(k),U1Period(),V1Period(),U2Period(),V2Period());
|
||||
curv->Value(k,POn2S);
|
||||
Standard_Real mu1,mv1,mu2,mv2;
|
||||
POn2S.Parameters(mu1,mv1,mu2,mv2);
|
||||
|
||||
if (myCreationWay == IntPatch_WLImpImp)
|
||||
{
|
||||
//Adjust a point of curve to corresponding vertex the following way:
|
||||
//set 3D point as the point of the vertex and 2D points as the points
|
||||
//of the point on curve with index <indicevertexonline>
|
||||
curv->SetPoint (k, POn2S.Value());
|
||||
curv->SetUV (k, Standard_True, mu1, mv1);
|
||||
curv->SetUV (k, Standard_False, mu2, mv2);
|
||||
}
|
||||
else
|
||||
{
|
||||
curv->Value(k,POn2S);
|
||||
POn2S.Parameters(mu1,mv1,mu2,mv2);
|
||||
}
|
||||
svtx.ChangeValue(i).SetParameter(k);
|
||||
svtx.ChangeValue(i).SetParameters(mu1,mv1,mu2,mv2);
|
||||
Substitution = Standard_True;
|
||||
|
@ -62,9 +62,14 @@ public:
|
||||
//! Replaces the point of range Index in the line.
|
||||
void Value (const Standard_Integer Index, const IntSurf_PntOn2S& P);
|
||||
|
||||
//! Sets the 3D point of the Index-th PntOn2S
|
||||
Standard_EXPORT void SetPoint(const Standard_Integer Index, const gp_Pnt& thePnt);
|
||||
|
||||
//! Sets the parametric coordinates on one of the surfaces
|
||||
//! of the point of range Index in the line.
|
||||
Standard_EXPORT void SetUV(const Standard_Integer Index, const Standard_Boolean OnFirst, const Standard_Real U, const Standard_Real V);
|
||||
Standard_EXPORT void SetUV(const Standard_Integer Index,
|
||||
const Standard_Boolean OnFirst,
|
||||
const Standard_Real U, const Standard_Real V);
|
||||
|
||||
void Clear();
|
||||
|
||||
|
@ -38,6 +38,12 @@ inline void IntSurf_LineOn2S::Value(const Standard_Integer Index,
|
||||
mySeq(Index) = P;
|
||||
}
|
||||
|
||||
inline void IntSurf_LineOn2S::SetPoint(const Standard_Integer Index,
|
||||
const gp_Pnt& thePnt)
|
||||
{
|
||||
mySeq(Index).SetValue (thePnt);
|
||||
}
|
||||
|
||||
inline void IntSurf_LineOn2S::Clear ()
|
||||
{
|
||||
mySeq.Clear();
|
||||
|
@ -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;
|
||||
|
@ -22,6 +22,14 @@
|
||||
#define No_Standard_OutOfRange
|
||||
#endif
|
||||
|
||||
static void CutVectorByTolerances (gp_Vec2d& theVector,
|
||||
const math_Vector& theTolerance)
|
||||
{
|
||||
if (Abs(theVector.X()) < theTolerance(1))
|
||||
theVector.SetX (0.);
|
||||
if (Abs(theVector.Y()) < theTolerance(2))
|
||||
theVector.SetY (0.);
|
||||
}
|
||||
|
||||
// _______________________________________________
|
||||
//
|
||||
@ -392,8 +400,15 @@ Standard_Boolean IntWalk_IWalking::TestArretPassage
|
||||
|
||||
//Normalizing factor. If it is less than 1.0 then the range will be expanded.
|
||||
//This is no good for computation. Therefore, it is limited.
|
||||
const Standard_Real deltau = mySRangeU.IsVoid() ? UM - Um : Max(mySRangeU.Delta(), 1.0);
|
||||
const Standard_Real deltav = mySRangeV.IsVoid() ? VM - Vm : Max(mySRangeV.Delta(), 1.0);
|
||||
//Do not limit this factor in case of highly anisotropic parametrization
|
||||
//(parametric space is considerably larger in one direction than another).
|
||||
const Standard_Boolean isHighlyAnisotropic = Max(tolu, tolv) > 1000. * Min(tolu, tolv);
|
||||
const Standard_Real deltau = mySRangeU.IsVoid() ? UM - Um
|
||||
: (isHighlyAnisotropic ? mySRangeU.Delta()
|
||||
: Max(mySRangeU.Delta(), 1.0));
|
||||
const Standard_Real deltav = mySRangeV.IsVoid() ? VM - Vm
|
||||
: (isHighlyAnisotropic ? mySRangeV.Delta()
|
||||
: Max(mySRangeV.Delta(), 1.0));
|
||||
|
||||
Up/=deltau; UV1/=deltau;
|
||||
Vp/=deltav; UV2/=deltav;
|
||||
@ -771,8 +786,13 @@ void IntWalk_IWalking::TestArretCadre
|
||||
Line->Value(j).ParametersOnS1(Uc,Vc);
|
||||
}
|
||||
|
||||
Scal = (Up-wd1[i].ustart) * (Uc-wd1[i].ustart) +
|
||||
(Vp-wd1[i].vstart) * (Vc-wd1[i].vstart);
|
||||
gp_Vec2d aVec1 (Up-wd1[i].ustart, Vp-wd1[i].vstart),
|
||||
aVec2 (Uc-wd1[i].ustart, Vc-wd1[i].vstart);
|
||||
CutVectorByTolerances (aVec1, tolerance);
|
||||
CutVectorByTolerances (aVec2, tolerance);
|
||||
|
||||
Scal = aVec1 * aVec2;
|
||||
|
||||
// if a stop point is found: stop the line on this point.
|
||||
if (Scal < 0) {
|
||||
Line->Cut(j); nbp= Line->NbPoints();
|
||||
@ -791,8 +811,14 @@ void IntWalk_IWalking::TestArretCadre
|
||||
}
|
||||
else if (nbMultiplicities[i] > 0) {
|
||||
for (Standard_Integer k = N+1; k <= N + nbMultiplicities[i]; k++) {
|
||||
Scal = (Up-Umult(k)) * (Uc-Umult(k)) +
|
||||
(Vp-Vmult(k)) * (Vc-Vmult(k));
|
||||
|
||||
aVec1.SetCoord (Up-Umult(k), Vp-Vmult(k)),
|
||||
aVec2.SetCoord (Uc-Umult(k), Vc-Vmult(k));
|
||||
CutVectorByTolerances (aVec1, tolerance);
|
||||
CutVectorByTolerances (aVec2, tolerance);
|
||||
|
||||
Scal = aVec1 * aVec2;
|
||||
|
||||
if (Scal < 0) {
|
||||
Line->Cut(j); nbp= Line->NbPoints();
|
||||
Irang=i;
|
||||
@ -847,11 +873,13 @@ void IntWalk_IWalking::TestArretCadre
|
||||
// now the last point of the line and the last calculated point are compated.
|
||||
// there will be no need to "Cut"
|
||||
|
||||
Scal = (Up-wd1[i].ustart) * (UV(1)-wd1[i].ustart) +
|
||||
// (Vp-wd1[i].vstart) * (UV(2)-wd1[i].vstart);
|
||||
// modified by NIZHNY-MKK Fri Oct 27 12:29:41 2000
|
||||
(Vp-wd1[i].vstart) * (UV(2)-wd1[i].vstart);
|
||||
|
||||
gp_Vec2d aVec1 (Up-wd1[i].ustart, Vp-wd1[i].vstart),
|
||||
aVec2 (UV(1)-wd1[i].ustart, UV(2)-wd1[i].vstart);
|
||||
CutVectorByTolerances (aVec1, tolerance);
|
||||
CutVectorByTolerances (aVec2, tolerance);
|
||||
|
||||
Scal = aVec1 * aVec2;
|
||||
|
||||
if (Scal < 0) {
|
||||
Irang = i;
|
||||
UV(1) = wd1[Irang].ustart;
|
||||
@ -867,8 +895,14 @@ void IntWalk_IWalking::TestArretCadre
|
||||
}
|
||||
else if (nbMultiplicities[i] > 0) {
|
||||
for (Standard_Integer j = N+1; j <= N+nbMultiplicities[i]; j++) {
|
||||
Scal = (Up-Umult(j)) * (UV(1)-Umult(j)) +
|
||||
(Vp-Vmult(j)) * (UV(2)-Vmult(j));
|
||||
|
||||
aVec1.SetCoord (Up-Umult(j), Vp-Vmult(j));
|
||||
aVec2.SetCoord (UV(1)-Umult(j), UV(2)-Vmult(j));
|
||||
CutVectorByTolerances (aVec1, tolerance);
|
||||
CutVectorByTolerances (aVec2, tolerance);
|
||||
|
||||
Scal = aVec1 * aVec2;
|
||||
|
||||
if (Scal < 0) {
|
||||
Irang=i;
|
||||
UV(1) = wd1[Irang].ustart;
|
||||
|
@ -2316,10 +2316,65 @@ Standard_Boolean IntWalk_PWalking::HandleSingleSingularPoint(const Handle(Adapto
|
||||
if (anInt.IsEmpty())
|
||||
continue;
|
||||
|
||||
anInt.Point().Parameters(thePnt(1), thePnt(2), thePnt(3), thePnt(4));
|
||||
|
||||
Standard_Real aPars[4];
|
||||
anInt.Point().Parameters(aPars[0], aPars[1], aPars[2], aPars[3]);
|
||||
Handle(Adaptor3d_Surface) aSurfs[2] = { theASurf1, theASurf2 };
|
||||
//Local resolutions
|
||||
Standard_Real aTol2 = the3DTol * the3DTol;
|
||||
gp_Pnt aP;
|
||||
gp_Vec aDU, aDV;
|
||||
gp_Pnt aPInt;
|
||||
Standard_Integer k;
|
||||
for (k = 0; k < 2; ++k)
|
||||
{
|
||||
Standard_Integer iu, iv;
|
||||
iu = 2*k;
|
||||
iv = iu + 1;
|
||||
aSurfs[k]->D1(aPars[iu], aPars[iv], aPInt, aDU, aDV);
|
||||
Standard_Real aMod = aDU.Magnitude();
|
||||
if (aMod > Precision::Confusion())
|
||||
{
|
||||
Standard_Real aTolU = the3DTol / aMod;
|
||||
if (Abs(aLowBorder[iu] - aPars[iu]) < aTolU)
|
||||
{
|
||||
aP = aSurfs[k]->Value(aLowBorder[iu], aPars[iv]);
|
||||
if (aPInt.SquareDistance(aP) < aTol2)
|
||||
aPars[iu] = aLowBorder[iu];
|
||||
}
|
||||
else if (Abs(aUppBorder[iu] - aPars[iu]) < aTolU)
|
||||
{
|
||||
aP = aSurfs[k]->Value(aUppBorder[iu], aPars[iv]);
|
||||
if (aPInt.SquareDistance(aP) < aTol2)
|
||||
aPars[iu] = aUppBorder[iu];
|
||||
}
|
||||
}
|
||||
aMod = aDV.Magnitude();
|
||||
if (aMod > Precision::Confusion())
|
||||
{
|
||||
Standard_Real aTolV = the3DTol / aMod;
|
||||
if (Abs(aLowBorder[iv] - aPars[iv]) < aTolV)
|
||||
{
|
||||
aP = aSurfs[k]->Value(aPars[iu], aLowBorder[iv]);
|
||||
if (aPInt.SquareDistance(aP) < aTol2)
|
||||
aPars[iv] = aLowBorder[iv];
|
||||
}
|
||||
else if (Abs(aUppBorder[iv] - aPars[iv]) < aTolV)
|
||||
{
|
||||
aP = aSurfs[k]->Value(aPars[iu], aUppBorder[iv]);
|
||||
if (aPInt.SquareDistance(aP) < aTol2)
|
||||
aPars[iv] = aUppBorder[iv];
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
//
|
||||
Standard_Integer j;
|
||||
for (j = 1; j <= 4; ++j)
|
||||
{
|
||||
thePnt(j) = aPars[j - 1];
|
||||
}
|
||||
Standard_Boolean isInDomain = Standard_True;
|
||||
for (Standard_Integer j = 1; isInDomain && (j <= 4); ++j)
|
||||
for (j = 1; isInDomain && (j <= 4); ++j)
|
||||
{
|
||||
if ((thePnt(j) - aLowBorder[j - 1] + Precision::PConfusion())*
|
||||
(thePnt(j) - aUppBorder[j - 1] - Precision::PConfusion()) > 0.0)
|
||||
@ -2461,13 +2516,13 @@ Standard_Boolean IntWalk_PWalking::
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if (aPInd == 1)
|
||||
{
|
||||
// After insertion, we will obtain
|
||||
// two coincident points in the line.
|
||||
// Therefore, insertion is forbidden.
|
||||
return isOK;
|
||||
}
|
||||
//else if (aPInd == 1)
|
||||
//{
|
||||
// // After insertion, we will obtain
|
||||
// // two coincident points in the line.
|
||||
// // Therefore, insertion is forbidden.
|
||||
// return isOK;
|
||||
//}
|
||||
}
|
||||
|
||||
for (++aPInd; aPInd <= aNbPnts; aPInd++)
|
||||
@ -2493,6 +2548,12 @@ Standard_Boolean IntWalk_PWalking::
|
||||
RemoveAPoint(1);
|
||||
}
|
||||
|
||||
aP1.SetXYZ(line->Value(1).Value().XYZ());
|
||||
if (aP1.SquareDistance(aPInt) <= Precision::SquareConfusion())
|
||||
{
|
||||
RemoveAPoint(1);
|
||||
}
|
||||
|
||||
line->InsertBefore(1, anIP);
|
||||
isOK = Standard_True;
|
||||
}
|
||||
@ -2511,13 +2572,13 @@ Standard_Boolean IntWalk_PWalking::
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if (aPInd == aNbPnts)
|
||||
{
|
||||
// After insertion, we will obtain
|
||||
// two coincident points in the line.
|
||||
// Therefore, insertion is forbidden.
|
||||
return isOK;
|
||||
}
|
||||
//else if (aPInd == aNbPnts)
|
||||
//{
|
||||
// // After insertion, we will obtain
|
||||
// // two coincident points in the line.
|
||||
// // Therefore, insertion is forbidden.
|
||||
// return isOK;
|
||||
//}
|
||||
}
|
||||
|
||||
for (--aPInd; aPInd > 0; aPInd--)
|
||||
@ -2543,7 +2604,14 @@ Standard_Boolean IntWalk_PWalking::
|
||||
RemoveAPoint(aNbPnts);
|
||||
}
|
||||
|
||||
Standard_Integer aNbPnts = line->NbPoints();
|
||||
aP1.SetXYZ(line->Value(aNbPnts).Value().XYZ());
|
||||
if (aP1.SquareDistance(aPInt) <= Precision::SquareConfusion())
|
||||
{
|
||||
RemoveAPoint(aNbPnts);
|
||||
}
|
||||
line->Add(anIP);
|
||||
|
||||
isOK = Standard_True;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,9 @@
|
||||
|
||||
#if !defined(HAVE_EGL)
|
||||
#if defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(HAVE_GLES2) || defined(OCCT_UWP)
|
||||
#define HAVE_EGL
|
||||
#if !defined(__APPLE__)
|
||||
#define HAVE_EGL // EAGL is used instead of EGL
|
||||
#endif
|
||||
#elif !defined(_WIN32) && !defined(__APPLE__) && !defined(HAVE_XLIB)
|
||||
#define HAVE_EGL
|
||||
#endif
|
||||
|
@ -52,7 +52,17 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_GraphicDriver,Graphic3d_GraphicDriver)
|
||||
#include <GL/glx.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__)
|
||||
#if !defined(HAVE_EGL)
|
||||
#if defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(HAVE_GLES2) || defined(OCCT_UWP)
|
||||
#if !defined(__APPLE__)
|
||||
#define HAVE_EGL // EAGL is used instead of EGL
|
||||
#endif
|
||||
#elif !defined(_WIN32) && !defined(__APPLE__) && !defined(HAVE_XLIB)
|
||||
#define HAVE_EGL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_EGL)
|
||||
#include <EGL/egl.h>
|
||||
#ifndef EGL_OPENGL_ES3_BIT
|
||||
#define EGL_OPENGL_ES3_BIT 0x00000040
|
||||
@ -63,7 +73,7 @@ namespace
|
||||
{
|
||||
static const Handle(OpenGl_Context) TheNullGlCtx;
|
||||
|
||||
#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__)
|
||||
#if defined(HAVE_EGL)
|
||||
//! Wrapper over eglChooseConfig() called with preferred defaults.
|
||||
static EGLConfig chooseEglSurfConfig (EGLDisplay theDisplay)
|
||||
{
|
||||
@ -155,7 +165,7 @@ OpenGl_GraphicDriver::OpenGl_GraphicDriver (const Handle(Aspect_DisplayConnectio
|
||||
myMapOfView (1, NCollection_BaseAllocator::CommonBaseAllocator()),
|
||||
myMapOfStructure (1, NCollection_BaseAllocator::CommonBaseAllocator())
|
||||
{
|
||||
#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__)
|
||||
#if defined(HAVE_EGL)
|
||||
myEglDisplay = (Aspect_Display )EGL_NO_DISPLAY;
|
||||
myEglContext = (Aspect_RenderingContext )EGL_NO_CONTEXT;
|
||||
#endif
|
||||
@ -250,7 +260,7 @@ void OpenGl_GraphicDriver::ReleaseContext()
|
||||
aWindow->GetGlContext()->forcedRelease();
|
||||
}
|
||||
|
||||
#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__)
|
||||
#if defined(HAVE_EGL)
|
||||
if (myIsOwnContext)
|
||||
{
|
||||
if (myEglContext != (Aspect_RenderingContext )EGL_NO_CONTEXT)
|
||||
@ -285,7 +295,7 @@ void OpenGl_GraphicDriver::ReleaseContext()
|
||||
Standard_Boolean OpenGl_GraphicDriver::InitContext()
|
||||
{
|
||||
ReleaseContext();
|
||||
#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__)
|
||||
#if defined(HAVE_EGL)
|
||||
|
||||
#if defined(HAVE_XLIB)
|
||||
if (myDisplayConnection.IsNull())
|
||||
@ -369,7 +379,7 @@ Standard_Boolean OpenGl_GraphicDriver::InitEglContext (Aspect_Display t
|
||||
void* theEglConfig)
|
||||
{
|
||||
ReleaseContext();
|
||||
#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__)
|
||||
#if defined(HAVE_EGL)
|
||||
#if defined(HAVE_XLIB)
|
||||
if (myDisplayConnection.IsNull())
|
||||
{
|
||||
@ -420,7 +430,7 @@ void OpenGl_GraphicDriver::chooseVisualInfo()
|
||||
|
||||
XVisualInfo* aVisInfo = NULL;
|
||||
Aspect_FBConfig anFBConfig = NULL;
|
||||
#if defined(HAVE_EGL) || defined(HAVE_GLES2)
|
||||
#if defined(HAVE_EGL)
|
||||
XVisualInfo aVisInfoTmp;
|
||||
memset (&aVisInfoTmp, 0, sizeof(aVisInfoTmp));
|
||||
aVisInfoTmp.screen = DefaultScreen (aDisp);
|
||||
|
@ -14,8 +14,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <ProjLib.hxx>
|
||||
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <ElSLib.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_Circle.hxx>
|
||||
#include <Geom2d_Ellipse.hxx>
|
||||
#include <Geom2d_Parabola.hxx>
|
||||
#include <Geom2d_Hyperbola.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <Geom2d_BezierCurve.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
#include <gp_Circ2d.hxx>
|
||||
#include <gp_Cone.hxx>
|
||||
@ -33,22 +42,13 @@
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Sphere.hxx>
|
||||
#include <gp_Torus.hxx>
|
||||
#include <ProjLib.hxx>
|
||||
#include <ProjLib_Cone.hxx>
|
||||
#include <ProjLib_Cylinder.hxx>
|
||||
#include <ProjLib_Plane.hxx>
|
||||
#include <ProjLib_Sphere.hxx>
|
||||
#include <ProjLib_Torus.hxx>
|
||||
#include <ProjLib_ProjectedCurve.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_Circle.hxx>
|
||||
#include <Geom2d_Ellipse.hxx>
|
||||
#include <Geom2d_Parabola.hxx>
|
||||
#include <Geom2d_Hyperbola.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <Geom2d_BezierCurve.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Project
|
||||
|
@ -37,141 +37,77 @@ class gp_Cylinder;
|
||||
class gp_Cone;
|
||||
class gp_Sphere;
|
||||
class gp_Torus;
|
||||
class ProjLib_ProjectOnPlane;
|
||||
class ProjLib_ProjectOnSurface;
|
||||
class ProjLib_ComputeApprox;
|
||||
class ProjLib_ComputeApproxOnPolarSurface;
|
||||
class ProjLib_ProjectedCurve;
|
||||
class ProjLib_HProjectedCurve;
|
||||
class ProjLib_CompProjectedCurve;
|
||||
class ProjLib_HCompProjectedCurve;
|
||||
class ProjLib_PrjResolve;
|
||||
class ProjLib_PrjFunc;
|
||||
class ProjLib_Projector;
|
||||
class ProjLib_Plane;
|
||||
class ProjLib_Cylinder;
|
||||
class ProjLib_Cone;
|
||||
class ProjLib_Sphere;
|
||||
class ProjLib_Torus;
|
||||
|
||||
//! The projLib package first provides projection of
|
||||
//! curves on a plane along a given Direction. The
|
||||
//! result will be a 3D curve.
|
||||
//! The ProjLib package provides projection of curves
|
||||
//! on surfaces to compute the curve in the parametric
|
||||
//! space.
|
||||
//! The ProjLib package first provides projection of curves on a plane along a given Direction.
|
||||
//! The result will be a 3D curve.
|
||||
//!
|
||||
//! The ProjLib package provides projection of curves on surfaces to compute the curve in the parametric space.
|
||||
//! It is assumed that the curve is on the surface.
|
||||
//!
|
||||
//! It provides :
|
||||
//! It provides:
|
||||
//!
|
||||
//! * Package methods to handle the easiest cases :
|
||||
//! * Package methods to handle the easiest cases:
|
||||
//! - Line, Circle, Ellipse, Parabola, Hyperbola on plane.
|
||||
//! - Line, Circle on cylinder.
|
||||
//! - Line, Circle on cone.
|
||||
//!
|
||||
//! - Line, Circle, Ellipse, Parabola, Hyperbola on plane.
|
||||
//! * Classes to handle the general cases:
|
||||
//! - Plane.
|
||||
//! - Cylinder.
|
||||
//! - Cone.
|
||||
//! - Sphere.
|
||||
//! - Torus.
|
||||
//!
|
||||
//! - Line, Circle on cylinder.
|
||||
//!
|
||||
//! - Line, Circle on cone.
|
||||
//!
|
||||
//! * Classes to handle the general cases :
|
||||
//!
|
||||
//! - Plane.
|
||||
//!
|
||||
//! - Cylinder.
|
||||
//!
|
||||
//! - Cone.
|
||||
//!
|
||||
//! - Sphere.
|
||||
//!
|
||||
//! - Torus.
|
||||
//!
|
||||
//! * A generic class to handle a Curve from Adaptor3d
|
||||
//! on a Surface from Adaptor3d.
|
||||
//! * A generic class to handle a Adaptor3d_Curve on a Adaptor3d_Surface.
|
||||
class ProjLib
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT static gp_Pnt2d Project (const gp_Pln& Pl, const gp_Pnt& P);
|
||||
|
||||
|
||||
Standard_EXPORT static gp_Lin2d Project (const gp_Pln& Pl, const gp_Lin& L);
|
||||
|
||||
|
||||
Standard_EXPORT static gp_Circ2d Project (const gp_Pln& Pl, const gp_Circ& C);
|
||||
|
||||
|
||||
Standard_EXPORT static gp_Elips2d Project (const gp_Pln& Pl, const gp_Elips& E);
|
||||
|
||||
|
||||
Standard_EXPORT static gp_Parab2d Project (const gp_Pln& Pl, const gp_Parab& P);
|
||||
|
||||
|
||||
Standard_EXPORT static gp_Hypr2d Project (const gp_Pln& Pl, const gp_Hypr& H);
|
||||
|
||||
|
||||
Standard_EXPORT static gp_Pnt2d Project (const gp_Cylinder& Cy, const gp_Pnt& P);
|
||||
|
||||
|
||||
Standard_EXPORT static gp_Lin2d Project (const gp_Cylinder& Cy, const gp_Lin& L);
|
||||
|
||||
|
||||
Standard_EXPORT static gp_Lin2d Project (const gp_Cylinder& Cy, const gp_Circ& Ci);
|
||||
|
||||
|
||||
Standard_EXPORT static gp_Pnt2d Project (const gp_Cone& Co, const gp_Pnt& P);
|
||||
|
||||
|
||||
Standard_EXPORT static gp_Lin2d Project (const gp_Cone& Co, const gp_Lin& L);
|
||||
|
||||
|
||||
Standard_EXPORT static gp_Lin2d Project (const gp_Cone& Co, const gp_Circ& Ci);
|
||||
|
||||
|
||||
Standard_EXPORT static gp_Pnt2d Project (const gp_Sphere& Sp, const gp_Pnt& P);
|
||||
|
||||
|
||||
Standard_EXPORT static gp_Lin2d Project (const gp_Sphere& Sp, const gp_Circ& Ci);
|
||||
|
||||
|
||||
Standard_EXPORT static gp_Pnt2d Project (const gp_Torus& To, const gp_Pnt& P);
|
||||
|
||||
|
||||
Standard_EXPORT static gp_Lin2d Project (const gp_Torus& To, const gp_Circ& Ci);
|
||||
|
||||
//! Make empty P-Curve <aC> of relevant to <PC> type
|
||||
Standard_EXPORT static void MakePCurveOfType (const ProjLib_ProjectedCurve& PC,
|
||||
Handle(Geom2d_Curve)& aC);
|
||||
|
||||
//! Returns "true" if surface is analytical, that is it can be
|
||||
//! Plane, Cylinder, Cone, Sphere, Torus.
|
||||
//! For all other types of surface method returns "false".
|
||||
Standard_EXPORT static Standard_Boolean IsAnaSurf
|
||||
(const Handle(Adaptor3d_Surface)& theAS);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class ProjLib_ProjectOnPlane;
|
||||
friend class ProjLib_ProjectOnSurface;
|
||||
friend class ProjLib_ComputeApprox;
|
||||
friend class ProjLib_ComputeApproxOnPolarSurface;
|
||||
friend class ProjLib_ProjectedCurve;
|
||||
friend class ProjLib_HProjectedCurve;
|
||||
friend class ProjLib_CompProjectedCurve;
|
||||
friend class ProjLib_HCompProjectedCurve;
|
||||
friend class ProjLib_PrjResolve;
|
||||
friend class ProjLib_PrjFunc;
|
||||
friend class ProjLib_Projector;
|
||||
friend class ProjLib_Plane;
|
||||
friend class ProjLib_Cylinder;
|
||||
friend class ProjLib_Cone;
|
||||
friend class ProjLib_Sphere;
|
||||
friend class ProjLib_Torus;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _ProjLib_HeaderFile
|
||||
|
@ -297,6 +297,7 @@ bool RWGltf_TriangulationReader::readDracoBuffer (const Handle(RWGltf_GltfLatePr
|
||||
myCoordSysConverter.TransformPosition (anXYZ.ChangeCoord());
|
||||
setNodePosition (theDestMesh, THE_LOWER_NODE_INDEX + aVertIter, anXYZ);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RWGltf_GltfArrayType_Normal:
|
||||
{
|
||||
|
@ -284,6 +284,11 @@ Handle(Transfer_Binder) STEPControl_ActorRead::Transfer
|
||||
{
|
||||
// [BEGIN] Get version of preprocessor (to detect I-Deas case) (ssv; 23.11.2010)
|
||||
Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast ( TP->Model() );
|
||||
if (!aStepModel->IsInitializedUnit())
|
||||
{
|
||||
XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info
|
||||
aStepModel->SetLocalLengthUnit(UnitsMethods::GetCasCadeLengthUnit());
|
||||
}
|
||||
Interface_EntityIterator anEntIt = aStepModel->Header();
|
||||
for ( anEntIt.Start(); anEntIt.More(); anEntIt.Next() ) {
|
||||
DeclareAndCast( HeaderSection_FileName, aFileNameEntity, anEntIt.Value() );
|
||||
@ -1614,7 +1619,6 @@ Handle(Transfer_Binder) STEPControl_ActorRead::TransferShape(
|
||||
const Message_ProgressRange& theProgress)
|
||||
{
|
||||
if (start.IsNull()) return NullResult();
|
||||
XSAlgo::AlgoContainer()->PrepareForTransfer();
|
||||
|
||||
Message_Messenger::StreamBuffer sout = TP->Messenger()->SendInfo();
|
||||
#ifdef TRANSLOG
|
||||
|
@ -543,7 +543,11 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsSphere (const gp_Pnt& theCen
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
const gp_Pnt aPntOnSphere (myAxis.Location().XYZ() + myAxis.Direction().XYZ() * aDepth);
|
||||
const gp_Vec aNormal (aPntOnSphere.XYZ() - theCenter.XYZ());
|
||||
thePickResult.SetDepth (aDepth);
|
||||
thePickResult.SetPickedPoint (aPntOnSphere);
|
||||
thePickResult.SetSurfaceNormal (aNormal);
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
@ -576,7 +580,22 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsCylinder (const Standard_Rea
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const gp_Pnt aPntOnCylinder = aLoc.XYZ() + aRayDir.XYZ() * aDepth;
|
||||
thePickResult.SetDepth (aDepth);
|
||||
thePickResult.SetPickedPoint (aPntOnCylinder.Transformed (theTrsf));
|
||||
if (Abs (aPntOnCylinder.Z()) < Precision::Confusion())
|
||||
{
|
||||
thePickResult.SetSurfaceNormal (-gp::DZ().Transformed (theTrsf));
|
||||
}
|
||||
else if (Abs (aPntOnCylinder.Z() - theHeight) < Precision::Confusion())
|
||||
{
|
||||
thePickResult.SetSurfaceNormal (gp::DZ().Transformed (theTrsf));
|
||||
}
|
||||
else
|
||||
{
|
||||
thePickResult.SetSurfaceNormal (gp_Vec (aPntOnCylinder.X(), aPntOnCylinder.Y(), 0.0).Transformed (theTrsf));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -753,20 +753,24 @@ Standard_Boolean SelectMgr_RectangularFrustum::OverlapsCylinder (const Standard_
|
||||
{
|
||||
Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box,
|
||||
"Error! SelectMgr_RectangularFrustum::Overlaps() should be called after selection frustum initialization");
|
||||
Standard_Real aTimeEnter = 0.0, aTimeLeave = 0.0;
|
||||
Standard_Real aTimes[2] = { 0.0, 0.0 };
|
||||
const gp_Trsf aTrsfInv = theTrsf.Inverted();
|
||||
const gp_Pnt aLoc = myNearPickedPnt.Transformed (aTrsfInv);
|
||||
const gp_Dir aRayDir = myViewRayDir .Transformed (aTrsfInv);
|
||||
if (!RayCylinderIntersection (theBottomRad, theTopRad, theHeight, aLoc, aRayDir, aTimeEnter, aTimeLeave))
|
||||
if (!RayCylinderIntersection (theBottomRad, theTopRad, theHeight, aLoc, aRayDir, aTimes[0], aTimes[1]))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
thePickResult.SetDepth (aTimeEnter * myScale);
|
||||
|
||||
Standard_Integer aResTime = 0;
|
||||
thePickResult.SetDepth (aTimes[aResTime] * myScale);
|
||||
if (theClipRange.IsClipped (thePickResult.Depth()))
|
||||
{
|
||||
thePickResult.SetDepth (aTimeLeave * myScale);
|
||||
aResTime = 1;
|
||||
thePickResult.SetDepth (aTimes[aResTime] * myScale);
|
||||
}
|
||||
const gp_Pnt aPntOnCylinder (aLoc.XYZ() + aRayDir.XYZ() * thePickResult.Depth());
|
||||
|
||||
const gp_Pnt aPntOnCylinder = aLoc.XYZ() + aRayDir.XYZ() * aTimes[aResTime];
|
||||
if (Abs (aPntOnCylinder.Z()) < Precision::Confusion())
|
||||
{
|
||||
thePickResult.SetSurfaceNormal (-gp::DZ().Transformed (theTrsf));
|
||||
@ -779,7 +783,7 @@ Standard_Boolean SelectMgr_RectangularFrustum::OverlapsCylinder (const Standard_
|
||||
{
|
||||
thePickResult.SetSurfaceNormal (gp_Vec (aPntOnCylinder.X(), aPntOnCylinder.Y(), 0.0).Transformed (theTrsf));
|
||||
}
|
||||
thePickResult.SetPickedPoint (aPntOnCylinder);
|
||||
thePickResult.SetPickedPoint (aPntOnCylinder.Transformed (theTrsf));
|
||||
return !theClipRange.IsClipped (thePickResult.Depth());
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <BRepTopAdaptor_TopolTool.hxx>
|
||||
#include <GC_MakeCircle.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_Circle.hxx>
|
||||
#include <GCE2d_MakeLine.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2dConvert.hxx>
|
||||
@ -46,6 +47,7 @@
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <GeomConvert.hxx>
|
||||
#include <GeomConvert_ApproxSurface.hxx>
|
||||
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
|
||||
#include <GeomLib_IsPlanarSurface.hxx>
|
||||
#include <gp_Cylinder.hxx>
|
||||
@ -102,6 +104,19 @@
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_UnifySameDomain,Standard_Transient)
|
||||
|
||||
static Standard_Boolean IsOnSingularity(const TopTools_ListOfShape& theEdgeList)
|
||||
{
|
||||
TopTools_ListIteratorOfListOfShape anItl (theEdgeList);
|
||||
for (; anItl.More(); anItl.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge (anItl.Value());
|
||||
if (BRep_Tool::Degenerated (anEdge))
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
static void SplitWire (const TopoDS_Wire& theWire,
|
||||
const TopoDS_Face& theFace,
|
||||
const TopTools_IndexedMapOfShape& theVmap,
|
||||
@ -1212,7 +1227,31 @@ static Standard_Boolean GetNormalToSurface(const TopoDS_Face& theFace,
|
||||
{
|
||||
Standard_Real f, l;
|
||||
// get 2d curve to get point in 2d
|
||||
const Handle(Geom2d_Curve)& aC2d = BRep_Tool::CurveOnSurface(theEdge, theFace, f, l);
|
||||
Handle(Geom2d_Curve) aC2d;
|
||||
if (BRep_Tool::IsClosed(theEdge, theFace))
|
||||
{
|
||||
//Find the edge in the face: it will have correct orientation
|
||||
TopoDS_Edge anEdgeInFace;
|
||||
TopoDS_Face aFace = theFace;
|
||||
aFace.Orientation (TopAbs_FORWARD);
|
||||
TopExp_Explorer anExplo (aFace, TopAbs_EDGE);
|
||||
for (; anExplo.More(); anExplo.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge (anExplo.Current());
|
||||
if (anEdge.IsSame (theEdge))
|
||||
{
|
||||
anEdgeInFace = anEdge;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (anEdgeInFace.IsNull())
|
||||
return Standard_False;
|
||||
|
||||
aC2d = BRep_Tool::CurveOnSurface (anEdgeInFace, aFace, f, l);
|
||||
}
|
||||
else
|
||||
aC2d = BRep_Tool::CurveOnSurface(theEdge, theFace, f, l);
|
||||
|
||||
if (aC2d.IsNull()) {
|
||||
return Standard_False;
|
||||
}
|
||||
@ -1576,9 +1615,6 @@ void ShapeUpgrade_UnifySameDomain::UnionPCurves(const TopTools_SequenceOfShape&
|
||||
if (isFound)
|
||||
continue;
|
||||
|
||||
Standard_Real aFirst, aLast;
|
||||
Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface (aFirstEdge, aFace, aFirst, aLast);
|
||||
|
||||
aFaceSeq.Append (aFace);
|
||||
}
|
||||
|
||||
@ -1623,6 +1659,9 @@ void ShapeUpgrade_UnifySameDomain::UnionPCurves(const TopTools_SequenceOfShape&
|
||||
|
||||
if (aPCurveSeq.IsEmpty()) {
|
||||
Handle(Geom2d_Curve) aCopyPCurve = Handle(Geom2d_Curve)::DownCast(aPCurve->Copy());
|
||||
if (aCopyPCurve->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve)))
|
||||
aCopyPCurve = (Handle(Geom2d_TrimmedCurve)::DownCast(aCopyPCurve))->BasisCurve();
|
||||
|
||||
aPCurveSeq.Append(aCopyPCurve);
|
||||
aFirstsSeq.Append(aFirst);
|
||||
aLastsSeq.Append(aLast);
|
||||
@ -1697,6 +1736,9 @@ void ShapeUpgrade_UnifySameDomain::UnionPCurves(const TopTools_SequenceOfShape&
|
||||
else
|
||||
{
|
||||
Handle(Geom2d_Curve) aCopyPCurve = Handle(Geom2d_Curve)::DownCast(aPCurve->Copy());
|
||||
if (aCopyPCurve->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve)))
|
||||
aCopyPCurve = (Handle(Geom2d_TrimmedCurve)::DownCast(aCopyPCurve))->BasisCurve();
|
||||
|
||||
aPCurveSeq.Append(aCopyPCurve);
|
||||
aFirstsSeq.Append(aFirst);
|
||||
aLastsSeq.Append(aLast);
|
||||
@ -1817,57 +1859,53 @@ void ShapeUpgrade_UnifySameDomain::UnionPCurves(const TopTools_SequenceOfShape&
|
||||
}
|
||||
}
|
||||
|
||||
//Reparametrize 3d curve if needed
|
||||
//Reparametrize pcurves if needed
|
||||
if (!ResPCurves.IsEmpty())
|
||||
{
|
||||
if (Abs (aFirst3d - ResFirsts(1)) > aMaxTol ||
|
||||
Abs (aLast3d - ResLasts(1)) > aMaxTol)
|
||||
for (Standard_Integer ii = 1; ii <= ResPCurves.Length(); ii++)
|
||||
{
|
||||
GeomAdaptor_Curve aGAcurve (aCurve);
|
||||
GeomAbs_CurveType aType = aGAcurve.GetType();
|
||||
if (aType == GeomAbs_Line)
|
||||
if (Abs (aFirst3d - ResFirsts(ii)) > aMaxTol ||
|
||||
Abs (aLast3d - ResLasts(ii)) > aMaxTol)
|
||||
{
|
||||
gp_Lin aLin = aGAcurve.Line();
|
||||
gp_Dir aDir = aLin.Direction();
|
||||
gp_Pnt aPnt = aGAcurve.Value (aFirst3d);
|
||||
gp_Vec anOffset = -aDir;
|
||||
anOffset *= ResFirsts(1);
|
||||
aPnt.Translate (anOffset);
|
||||
Handle(Geom_Line) aLine = new Geom_Line (aPnt, aDir);
|
||||
aBuilder.UpdateEdge (theEdge, aLine, aTolEdge);
|
||||
aBuilder.Range(theEdge, ResFirsts(1), ResLasts(1));
|
||||
}
|
||||
else if (aType == GeomAbs_Circle)
|
||||
{
|
||||
gp_Circ aCirc = aGAcurve.Circle();
|
||||
Standard_Real aRadius = aCirc.Radius();
|
||||
gp_Ax2 aPosition = aCirc.Position();
|
||||
gp_Ax1 anAxis = aPosition.Axis();
|
||||
Standard_Real anOffset = aFirst3d - ResFirsts(1);
|
||||
aPosition.Rotate (anAxis, anOffset);
|
||||
Handle(Geom_Circle) aCircle = new Geom_Circle (aPosition, aRadius);
|
||||
aBuilder.UpdateEdge (theEdge, aCircle, aTolEdge);
|
||||
aBuilder.Range(theEdge, ResFirsts(1), ResLasts(1));
|
||||
}
|
||||
else //general case
|
||||
{
|
||||
for (Standard_Integer ii = 1; ii <= ResPCurves.Length(); ii++)
|
||||
Geom2dAdaptor_Curve aGAcurve (ResPCurves(ii));
|
||||
GeomAbs_CurveType aType = aGAcurve.GetType();
|
||||
if (aType == GeomAbs_Line)
|
||||
{
|
||||
if (Abs (aFirst3d - ResFirsts(ii)) > Precision::Confusion() ||
|
||||
Abs (aLast3d - ResLasts(ii)) > Precision::Confusion())
|
||||
{
|
||||
Handle(Geom2d_TrimmedCurve) aTrPCurve =
|
||||
new Geom2d_TrimmedCurve (ResPCurves(ii), ResFirsts(ii), ResLasts(ii));
|
||||
Handle(Geom2d_BSplineCurve) aBSplinePCurve = Geom2dConvert::CurveToBSplineCurve(aTrPCurve);
|
||||
TColStd_Array1OfReal aKnots (1, aBSplinePCurve->NbKnots());
|
||||
aBSplinePCurve->Knots (aKnots);
|
||||
BSplCLib::Reparametrize (aFirst3d, aLast3d, aKnots);
|
||||
aBSplinePCurve->SetKnots (aKnots);
|
||||
ResPCurves(ii) = aBSplinePCurve;
|
||||
}
|
||||
gp_Lin2d aLin2d = aGAcurve.Line();
|
||||
gp_Dir2d aDir2d = aLin2d.Direction();
|
||||
gp_Pnt2d aPnt2d = aGAcurve.Value(ResFirsts(ii));
|
||||
gp_Vec2d anOffset = -aDir2d;
|
||||
anOffset *= aFirst3d;
|
||||
aPnt2d.Translate (anOffset);
|
||||
Handle(Geom2d_Line) aNewLine2d = new Geom2d_Line (aPnt2d, aDir2d);
|
||||
ResPCurves(ii) = aNewLine2d;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (aType == GeomAbs_Circle)
|
||||
{
|
||||
gp_Circ2d aCirc2d = aGAcurve.Circle();
|
||||
Standard_Real aRadius = aCirc2d.Radius();
|
||||
gp_Ax22d aPosition = aCirc2d.Position();
|
||||
gp_Pnt2d aLocation = aCirc2d.Location();
|
||||
Standard_Real anOffset = ResFirsts(ii) - aFirst3d;
|
||||
aPosition.Rotate (aLocation, anOffset);
|
||||
Handle(Geom2d_Circle) aNewCircle2d = new Geom2d_Circle (aPosition, aRadius);
|
||||
ResPCurves(ii) = aNewCircle2d;
|
||||
}
|
||||
else //general case
|
||||
{
|
||||
Handle(Geom2d_TrimmedCurve) aTrPCurve =
|
||||
new Geom2d_TrimmedCurve (ResPCurves(ii), ResFirsts(ii), ResLasts(ii));
|
||||
Handle(Geom2d_BSplineCurve) aBSplinePCurve = Geom2dConvert::CurveToBSplineCurve(aTrPCurve);
|
||||
TColStd_Array1OfReal aKnots (1, aBSplinePCurve->NbKnots());
|
||||
aBSplinePCurve->Knots (aKnots);
|
||||
BSplCLib::Reparametrize (aFirst3d, aLast3d, aKnots);
|
||||
aBSplinePCurve->SetKnots (aKnots);
|
||||
ResPCurves(ii) = aBSplinePCurve;
|
||||
}
|
||||
ResFirsts(ii) = aFirst3d;
|
||||
ResLasts(ii) = aLast3d;
|
||||
} //if ranges > aMaxTol
|
||||
} //for (Standard_Integer ii = 1; ii <= ResPCurves.Length(); ii++)
|
||||
}
|
||||
|
||||
for (Standard_Integer j = 1; j <= ResPCurves.Length(); j++)
|
||||
@ -2965,29 +3003,107 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
|
||||
TopTools_IndexedDataMapOfShapeListOfShape VEmap;
|
||||
for (Standard_Integer ind = 1; ind <= edges.Length(); ind++)
|
||||
TopExp::MapShapesAndUniqueAncestors(edges(ind), TopAbs_VERTEX, TopAbs_EDGE, VEmap);
|
||||
|
||||
//Try to find seam edge and an edge that is not seam but has 2 pcurves on the surface
|
||||
Standard_Boolean SeamFound = Standard_False;
|
||||
TopoDS_Edge EdgeWith2pcurves;
|
||||
for (Standard_Integer ii = 1; ii <= faces.Length(); ii++)
|
||||
{
|
||||
const TopoDS_Face& face_ii = TopoDS::Face(faces(ii));
|
||||
TopoDS_Wire anOuterWire = BRepTools::OuterWire(face_ii);
|
||||
TopoDS_Iterator itw(anOuterWire);
|
||||
for (; itw.More(); itw.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(itw.Value());
|
||||
if (BRep_Tool::IsClosed (anEdge, face_ii))
|
||||
{
|
||||
if (BRepTools::IsReallyClosed(anEdge, face_ii))
|
||||
SeamFound = Standard_True;
|
||||
else
|
||||
EdgeWith2pcurves = anEdge;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Standard_Boolean aIsEdgeWith2pcurvesSmooth = Standard_False;
|
||||
if (myConcatBSplines && !EdgeWith2pcurves.IsNull() && !SeamFound)
|
||||
{
|
||||
const TopTools_ListOfShape& aFaceList = theGMapEdgeFaces.FindFromKey (EdgeWith2pcurves);
|
||||
const TopoDS_Face& aFace1 = TopoDS::Face (aFaceList.First());
|
||||
const TopoDS_Face& aFace2 = TopoDS::Face (aFaceList.Last());
|
||||
GeomAbs_Shape anOrderOfCont = BRepLib::ContinuityOfFaces (EdgeWith2pcurves,
|
||||
aFace1, aFace2,
|
||||
myAngTol);
|
||||
aIsEdgeWith2pcurvesSmooth = (anOrderOfCont >= GeomAbs_G1);
|
||||
}
|
||||
|
||||
if (aIsEdgeWith2pcurvesSmooth)
|
||||
{
|
||||
Handle(Geom2d_Curve) aPC1, aPC2;
|
||||
Standard_Real aFirst, aLast;
|
||||
aPC1 = BRep_Tool::CurveOnSurface (EdgeWith2pcurves, F_RefFace, aFirst, aLast);
|
||||
EdgeWith2pcurves.Reverse();
|
||||
aPC2 = BRep_Tool::CurveOnSurface (EdgeWith2pcurves, F_RefFace, aFirst, aLast);
|
||||
gp_Pnt2d aPnt1 = aPC1->Value (aFirst);
|
||||
gp_Pnt2d aPnt2 = aPC2->Value (aFirst);
|
||||
Standard_Boolean anIsUclosed = (Abs(aPnt1.X() - aPnt2.X()) > Abs(aPnt1.Y() - aPnt2.Y()));
|
||||
Standard_Boolean aToMakeUPeriodic = Standard_False, aToMakeVPeriodic = Standard_False;
|
||||
if (anIsUclosed && Uperiod == 0.)
|
||||
aToMakeUPeriodic = Standard_True;
|
||||
if (!anIsUclosed && Vperiod == 0.)
|
||||
aToMakeVPeriodic = Standard_True;
|
||||
|
||||
if (aToMakeUPeriodic || aToMakeVPeriodic)
|
||||
{
|
||||
Handle(Geom_BSplineSurface) aBSplineSurface = Handle(Geom_BSplineSurface)::DownCast(aBaseSurface);
|
||||
if (aBSplineSurface.IsNull())
|
||||
{
|
||||
Standard_Real aTol = 1.e-4;
|
||||
GeomAbs_Shape aUCont = GeomAbs_C1, aVCont = GeomAbs_C1;
|
||||
Standard_Integer degU = 14, degV = 14;
|
||||
Standard_Integer nmax = 16;
|
||||
Standard_Integer aPrec = 1;
|
||||
GeomConvert_ApproxSurface Approximator(aBaseSurface,aTol,aUCont,aVCont,degU,degV,nmax,aPrec);
|
||||
aBSplineSurface = Approximator.Surface();
|
||||
}
|
||||
|
||||
if (aToMakeUPeriodic)
|
||||
{
|
||||
aBSplineSurface->SetUPeriodic();
|
||||
Uperiod = aBSplineSurface->UPeriod();
|
||||
}
|
||||
if (aToMakeVPeriodic)
|
||||
{
|
||||
aBSplineSurface->SetVPeriodic();
|
||||
Vperiod = aBSplineSurface->VPeriod();
|
||||
}
|
||||
|
||||
//Update ref face and pcurves if the surface changed
|
||||
if (aBSplineSurface != aBaseSurface)
|
||||
{
|
||||
TopoDS_Face OldRefFace = RefFace;
|
||||
Handle(Geom2d_Curve) NullPCurve;
|
||||
RefFace.Nullify();
|
||||
BB.MakeFace(RefFace, aBSplineSurface, aBaseLocation, 0.);
|
||||
for (Standard_Integer ii = 1; ii <= edges.Length(); ii++)
|
||||
{
|
||||
TopoDS_Edge anEdge = TopoDS::Edge(edges(ii));
|
||||
Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface (anEdge, OldRefFace, aFirst, aLast);
|
||||
if (MapEdgesWithTemporaryPCurves.Contains(anEdge))
|
||||
BB.UpdateEdge(anEdge, NullPCurve, OldRefFace, 0.);
|
||||
BB.UpdateEdge(anEdge, aPCurve, RefFace, 0.);
|
||||
}
|
||||
F_RefFace = RefFace;
|
||||
F_RefFace.Orientation(TopAbs_FORWARD);
|
||||
}
|
||||
}
|
||||
} //if (myConcatBSplines && !EdgeWith2pcurves.IsNull() && !SeamFound)
|
||||
|
||||
//Perform relocating to new U-origin
|
||||
//Define boundaries in 2d space of RefFace
|
||||
if (Uperiod != 0.)
|
||||
{
|
||||
//try to find a real seam edge - if it exists, do nothing
|
||||
Standard_Boolean SeamFound = Standard_False;
|
||||
for (Standard_Integer ii = 1; ii <= faces.Length(); ii++)
|
||||
{
|
||||
const TopoDS_Face& face_ii = TopoDS::Face(faces(ii));
|
||||
TopoDS_Wire anOuterWire = BRepTools::OuterWire(face_ii);
|
||||
TopoDS_Iterator itw(anOuterWire);
|
||||
for (; itw.More(); itw.Next())
|
||||
{
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(itw.Value());
|
||||
if (BRepTools::IsReallyClosed(anEdge, face_ii))
|
||||
{
|
||||
SeamFound = Standard_True;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//if seam edge exists, do nothing
|
||||
if (!SeamFound)
|
||||
{
|
||||
//try to find the origin of U in 2d space
|
||||
@ -3189,6 +3305,10 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
|
||||
if (NextEdge.IsNull())
|
||||
{
|
||||
Standard_Boolean EndOfWire = Standard_False;
|
||||
|
||||
Standard_Boolean anIsOnSingularity = IsOnSingularity (Elist);
|
||||
if (!anIsOnSingularity && Elist.Extent() > 1)
|
||||
SplittingVertices.Add (CurVertex);
|
||||
|
||||
TopTools_ListOfShape TmpElist, TrueElist;
|
||||
//<TrueElist> will be the list of candidates to become <NextEdge>
|
||||
@ -3208,7 +3328,6 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
|
||||
else
|
||||
{
|
||||
//we must choose the closest direction - the biggest angle
|
||||
SplittingVertices.Add (CurVertex);
|
||||
Standard_Real MaxAngle = RealFirst();
|
||||
TopoDS_Edge TrueEdge;
|
||||
Handle(Geom2d_Curve) CurPCurve = BRep_Tool::CurveOnSurface(CurEdge, F_RefFace, fpar, lpar);
|
||||
|
@ -155,13 +155,22 @@ public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
//! Registers this callback object in the current error handler (if found).
|
||||
void RegisterCallback();
|
||||
#if defined(OCC_CONVERT_SIGNALS)
|
||||
Standard_EXPORT
|
||||
#endif
|
||||
void RegisterCallback();
|
||||
|
||||
//! Unregisters this callback object from the error handler.
|
||||
void UnregisterCallback();
|
||||
#if defined(OCC_CONVERT_SIGNALS)
|
||||
Standard_EXPORT
|
||||
#endif
|
||||
void UnregisterCallback();
|
||||
|
||||
//! Destructor
|
||||
virtual ~Callback();
|
||||
#if defined(OCC_CONVERT_SIGNALS)
|
||||
Standard_EXPORT
|
||||
#endif
|
||||
virtual ~Callback();
|
||||
|
||||
//! The callback function to perform necessary callback action.
|
||||
//! Called by the exception handler when it is being destroyed but
|
||||
@ -171,7 +180,10 @@ public:
|
||||
protected:
|
||||
|
||||
//! Empty constructor
|
||||
Callback();
|
||||
#if defined(OCC_CONVERT_SIGNALS)
|
||||
Standard_EXPORT
|
||||
#endif
|
||||
Callback();
|
||||
|
||||
private:
|
||||
Standard_Address myHandler;
|
||||
|
@ -35,7 +35,7 @@
|
||||
// Primary definitions
|
||||
#define OCC_VERSION_MAJOR 7
|
||||
#define OCC_VERSION_MINOR 6
|
||||
#define OCC_VERSION_MAINTENANCE 0
|
||||
#define OCC_VERSION_MAINTENANCE 2
|
||||
|
||||
//! This macro must be commented in official release, and set to non-empty
|
||||
//! string in other situations, to identify specifics of the version, e.g.:
|
||||
@ -47,7 +47,7 @@
|
||||
// Derived (manually): version as real and string (major.minor)
|
||||
#define OCC_VERSION 7.6
|
||||
#define OCC_VERSION_STRING "7.6"
|
||||
#define OCC_VERSION_COMPLETE "7.6.0"
|
||||
#define OCC_VERSION_COMPLETE "7.6.2"
|
||||
|
||||
//! Derived: extended version as string ("major.minor.maintenance.dev")
|
||||
#ifdef OCC_VERSION_DEVELOPMENT
|
||||
|
@ -280,11 +280,11 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape
|
||||
&TopoDS::Face (aSubfacesMap.FindKey (2))
|
||||
};
|
||||
|
||||
TopLoc_Location aLocSurf;
|
||||
TopLoc_Location aLocSurf[2];
|
||||
const Handle(Geom_Surface)* aSurfaces[2] =
|
||||
{
|
||||
&BRep_Tool::Surface (*aFaces[0], aLocSurf),
|
||||
&BRep_Tool::Surface (*aFaces[1], aLocSurf)
|
||||
&BRep_Tool::Surface (*aFaces[0], aLocSurf[0]),
|
||||
&BRep_Tool::Surface (*aFaces[1], aLocSurf[1])
|
||||
};
|
||||
|
||||
Standard_Integer aConIndex = 0;
|
||||
@ -308,7 +308,7 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape
|
||||
const Standard_Real aRad1 = aCone.RefRadius();
|
||||
const Standard_Real aHeight = (aRad1 != 0.0)
|
||||
? aRad1 / Abs (Tan (aCone.SemiAngle()))
|
||||
: aCone.Location().Distance (aGeomPln->Location());
|
||||
: aCone.Location().Distance (aGeomPln->Location().Transformed (aLocSurf[aConIndex == 0 ? 1 : 0]));
|
||||
const Standard_Real aRad2 = (aRad1 != 0.0) ? 0.0 : Tan (aCone.SemiAngle()) * aHeight;
|
||||
gp_Trsf aTrsf;
|
||||
aTrsf.SetTransformation (aCone.Position(), gp_Ax3());
|
||||
@ -326,18 +326,19 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape
|
||||
&TopoDS::Face (aSubfacesMap.FindKey (3))
|
||||
};
|
||||
|
||||
TopLoc_Location aLocSurf;
|
||||
TopLoc_Location aLocSurf[3];
|
||||
const Handle(Geom_Surface)* aSurfaces[3] =
|
||||
{
|
||||
&BRep_Tool::Surface (*aFaces[0], aLocSurf),
|
||||
&BRep_Tool::Surface (*aFaces[1], aLocSurf),
|
||||
&BRep_Tool::Surface (*aFaces[2], aLocSurf)
|
||||
&BRep_Tool::Surface (*aFaces[0], aLocSurf[0]),
|
||||
&BRep_Tool::Surface (*aFaces[1], aLocSurf[1]),
|
||||
&BRep_Tool::Surface (*aFaces[2], aLocSurf[2])
|
||||
};
|
||||
|
||||
Standard_Integer aConIndex = -1, aNbPlanes = 0;
|
||||
Handle(Geom_ConicalSurface) aGeomCone;
|
||||
Handle(Geom_CylindricalSurface) aGeomCyl;
|
||||
Handle(Geom_Plane) aGeomPlanes[2];
|
||||
const TopLoc_Location* aGeomPlanesLoc[2];
|
||||
for (Standard_Integer aSurfIter = 0; aSurfIter < 3; ++aSurfIter)
|
||||
{
|
||||
const Handle(Geom_Surface)& aSurf = *aSurfaces[aSurfIter];
|
||||
@ -361,6 +362,7 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape
|
||||
aGeomPlanes[aNbPlanes] = Handle(Geom_Plane)::DownCast (aSurf);
|
||||
if (!aGeomPlanes[aNbPlanes].IsNull())
|
||||
{
|
||||
aGeomPlanesLoc[aNbPlanes] = &aLocSurf[aSurfIter];
|
||||
++aNbPlanes;
|
||||
}
|
||||
}
|
||||
@ -375,7 +377,8 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape
|
||||
{
|
||||
const gp_Cone aCone = BRepAdaptor_Surface (*aFaces[aConIndex]).Cone();
|
||||
const Standard_Real aRad1 = aCone.RefRadius();
|
||||
const Standard_Real aHeight = aGeomPlanes[0]->Location().Distance (aGeomPlanes[1]->Location());
|
||||
const Standard_Real aHeight = aGeomPlanes[0]->Location().Transformed (*aGeomPlanesLoc[0])
|
||||
.Distance (aGeomPlanes[1]->Location().Transformed (*aGeomPlanesLoc[1]));
|
||||
gp_Trsf aTrsf;
|
||||
aTrsf.SetTransformation (aCone.Position(), gp_Ax3());
|
||||
const Standard_Real aTriangleHeight = (aCone.SemiAngle() > 0.0)
|
||||
@ -398,7 +401,8 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape
|
||||
{
|
||||
const gp_Cylinder aCyl = BRepAdaptor_Surface (*aFaces[aConIndex]).Cylinder();
|
||||
const Standard_Real aRad = aCyl.Radius();
|
||||
const Standard_Real aHeight = aGeomPlanes[0]->Location().Distance (aGeomPlanes[1]->Location());
|
||||
const Standard_Real aHeight = aGeomPlanes[0]->Location().Transformed (*aGeomPlanesLoc[0])
|
||||
.Distance (aGeomPlanes[1]->Location().Transformed (*aGeomPlanesLoc[1]));
|
||||
gp_Trsf aTrsf;
|
||||
aTrsf.SetTransformation (aCyl.Position(), gp_Ax3());
|
||||
Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad, aRad, aHeight, aTrsf);
|
||||
@ -410,7 +414,7 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape
|
||||
|
||||
for (Standard_Integer aShIndex = 1; aShIndex <= aSubfacesMap.Extent(); ++aShIndex)
|
||||
{
|
||||
ComputeSensitive (aSubfacesMap (aShIndex), theOwner,
|
||||
ComputeSensitive (aSubfacesMap.FindKey (aShIndex), theOwner,
|
||||
theSelection,
|
||||
theDeflection, theDeviationAngle, theNbPOnEdge, theMaxParam, isAutoTriangulation);
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ void TNaming_CopyShape::Translate( const TopoDS_Shape& aShape,
|
||||
}
|
||||
|
||||
aResult.Orientation(aShape.Orientation());
|
||||
aResult.Location(TNaming_CopyShape::Translate(aShape.Location(), aMap));
|
||||
aResult.Location(TNaming_CopyShape::Translate(aShape.Location(), aMap), false);
|
||||
TrTool->UpdateShape(aShape,aResult);
|
||||
// #ifdef OCCT_DEBUG
|
||||
// if(fShar) {
|
||||
|
@ -325,7 +325,7 @@ static int doTranslate (const XmlMNaming_Shape1& thePShape,
|
||||
return 1;
|
||||
theResult.TShape (theShapeSet.Shape(aShapeId).TShape());
|
||||
theResult.Orientation (thePShape.Orientation());
|
||||
theResult.Location (theShapeSet.Locations().Location (thePShape.LocId()));
|
||||
theResult.Location (theShapeSet.Locations().Location (thePShape.LocId()), false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -27,27 +27,37 @@ CommitCommand D0
|
||||
SaveAs D0 ${docname}
|
||||
Close D0
|
||||
|
||||
set whole_time [lindex [time {
|
||||
Open ${docname} D1
|
||||
Close D1
|
||||
} 20] 0]
|
||||
# Computes the elapsed time of open and close document with a given arguments (as text).
|
||||
# It launches 10 iteration, 10 actions in each. Returns time of average time of the minimum-time iteration.
|
||||
proc action_time args {
|
||||
global docname
|
||||
set min_time 1000000
|
||||
for {set iter 0} {$iter < 10} {incr iter} {
|
||||
set iter_time [lindex [time {
|
||||
Open ${docname} D {*}$args
|
||||
Close D
|
||||
} 10] 0]
|
||||
puts "Iteration time $iter_time mcs"
|
||||
if {$iter_time < $min_time} {
|
||||
set min_time $iter_time
|
||||
}
|
||||
}
|
||||
|
||||
return $min_time
|
||||
}
|
||||
|
||||
set whole_time [action_time]
|
||||
puts "Whole document open time $whole_time mcs"
|
||||
|
||||
set quater_time [lindex [time {
|
||||
Open ${docname} D2 -read0:2
|
||||
Close D2
|
||||
} 20] 0]
|
||||
set quater_time [action_time -read0:2]
|
||||
puts "Quater of document open time $quater_time mcs"
|
||||
|
||||
# Check that open of quater of the document is at least twice faster than open of whole.
|
||||
if { [expr $quater_time * 2] > $whole_time } {
|
||||
# Check that open of quater of the document is significantly faster than open of whole.
|
||||
if { [expr $quater_time * 1.5] > $whole_time } {
|
||||
puts "Error : loading of quater of the document content too slow relatively to the whole document load"
|
||||
}
|
||||
|
||||
set four_quaters_time [lindex [time {
|
||||
Open ${docname} D3 -read0:1 -read0:2 -read0:3 -read0:4
|
||||
Close D3
|
||||
} 20] 0]
|
||||
set four_quaters_time [action_time -read0:1 -read0:2 -read0:3 -read0:4]
|
||||
puts "Four quaters of document open time $four_quaters_time mcs"
|
||||
|
||||
# Check that open of four quaters of the document is not too much slower than opening of the whole document.
|
||||
@ -69,6 +79,7 @@ if {![catch {Attributes D4 0:1:1:13}] || ![catch {Attributes D4 0:1:3:14}] || ![
|
||||
puts "Error : loading of document skipping arrays and sub-trees contains invalid attributes list"
|
||||
}
|
||||
|
||||
# check for appending arrays to the document from the file
|
||||
set append_arrays_time [lindex [time {
|
||||
Open ${docname} D4 -append -readTDataStd_IntegerArray -read0:2 -read0:3
|
||||
}] 0]
|
||||
|
24
tests/bugs/heal/bug29382_2
Normal file
24
tests/bugs/heal/bug29382_2
Normal file
@ -0,0 +1,24 @@
|
||||
puts "================================================================================"
|
||||
puts "OCC29382: ShapeUpgrade_UnifySameDomain algorithm incorrectly processes the shape"
|
||||
puts "================================================================================"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug29382_Group_3.brep] a
|
||||
|
||||
unifysamedom result a +b
|
||||
|
||||
checkshape result
|
||||
checkshape a
|
||||
|
||||
checknbshapes result -solid 3 -shell 3 -face 16 -wire 16 -edge 30 -vertex 18
|
||||
|
||||
set tolres [checkmaxtol result]
|
||||
|
||||
if { ${tolres} > 1.8066863810061599e-05} {
|
||||
puts "Error: bad tolerance of result"
|
||||
}
|
||||
|
||||
explode result
|
||||
checkprops result_1 -v 4.41996e-06
|
||||
checkprops result_2 -v 1.30453e-06
|
||||
checkprops result_3 -v 1.16532e-06
|
24
tests/bugs/heal/bug29382_3
Normal file
24
tests/bugs/heal/bug29382_3
Normal file
@ -0,0 +1,24 @@
|
||||
puts "================================================================================"
|
||||
puts "OCC29382: ShapeUpgrade_UnifySameDomain algorithm incorrectly processes the shape"
|
||||
puts "================================================================================"
|
||||
puts ""
|
||||
|
||||
beziercurve a 5 0 0 0 1 0 0 2 2 0 0 0.5 0 0 0 0
|
||||
mkedge a a
|
||||
wire a a
|
||||
mkplane a a
|
||||
prism a a 0 0 1
|
||||
box b -0.3 -0.2 0 1 0.4 1
|
||||
bcommon shape a b
|
||||
|
||||
unifysamedom result shape +b
|
||||
|
||||
checkshape result
|
||||
|
||||
checknbshapes result -solid 1 -shell 1 -face 5 -wire 5 -edge 9 -vertex 5
|
||||
|
||||
set tolres [checkmaxtol result]
|
||||
|
||||
if { ${tolres} > 6.e-6} {
|
||||
puts "Error: bad tolerance of result"
|
||||
}
|
20
tests/bugs/heal/bug32719
Normal file
20
tests/bugs/heal/bug32719
Normal file
@ -0,0 +1,20 @@
|
||||
puts "============================================================"
|
||||
puts "OCC32719: UnifySameDomain result has incorrect triangulation"
|
||||
puts "============================================================"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32719.brep] a
|
||||
|
||||
unifysamedom result a
|
||||
|
||||
checkshape result
|
||||
|
||||
checknbshapes result -t -solid 4 -shell 4 -face 20 -wire 20 -edge 32 -vertex 16
|
||||
|
||||
set tolres [checkmaxtol result]
|
||||
|
||||
if { ${tolres} > 6.e-6} {
|
||||
puts "Error: bad tolerance of result"
|
||||
}
|
||||
|
||||
checkprops result -s 0.0222593 -v 5.17261e-05
|
23
tests/bugs/heal/bug32814_1
Normal file
23
tests/bugs/heal/bug32814_1
Normal file
@ -0,0 +1,23 @@
|
||||
puts "=============================================="
|
||||
puts "OCC32814: Unifysamedom produces invalid result"
|
||||
puts "=============================================="
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32814_1.brep] s
|
||||
|
||||
unifysamedom result s -a 1e-4
|
||||
|
||||
checkshape result
|
||||
bopargcheck result
|
||||
|
||||
checknbshapes result -t -face 7 -wire 13 -edge 70 -vertex 64
|
||||
|
||||
set tolres [checkmaxtol result]
|
||||
|
||||
if { ${tolres} > 1.e-7} {
|
||||
puts "Error: bad tolerance of result"
|
||||
}
|
||||
|
||||
checkprops result -s 5.54082e+06
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
23
tests/bugs/heal/bug32814_2
Normal file
23
tests/bugs/heal/bug32814_2
Normal file
@ -0,0 +1,23 @@
|
||||
puts "=============================================="
|
||||
puts "OCC32814: Unifysamedom produces invalid result"
|
||||
puts "=============================================="
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32814_2.brep] s
|
||||
|
||||
unifysamedom result s
|
||||
|
||||
checkshape result
|
||||
bopargcheck result
|
||||
|
||||
checknbshapes result -t -solid 1 -shell 1 -face 78 -wire 110 -edge 220 -vertex 136
|
||||
|
||||
set tolres [checkmaxtol result]
|
||||
|
||||
if { ${tolres} > 2.e-7} {
|
||||
puts "Error: bad tolerance of result"
|
||||
}
|
||||
|
||||
checkprops result -s 1.61456e+06 -v 3e+07
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
9
tests/bugs/mesh/bug32767
Normal file
9
tests/bugs/mesh/bug32767
Normal file
@ -0,0 +1,9 @@
|
||||
puts "================"
|
||||
puts "0032767: Mesh - incorrect splitting of edges of seams leading to hang \[since OCCT 7.4.0\] "
|
||||
puts "================"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32767.brep] s
|
||||
tclean s
|
||||
incmesh s 0.01
|
||||
checktrinfo s -tri 3220 -nod 1770 -defl 0.018398669654253779 -tol_abs_defl 1e-6
|
@ -3,8 +3,6 @@ puts "0029807: Impossible to cut cone from prism"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
puts "TODO OCC29922 ALL: Error: Degenerated edge is not found"
|
||||
|
||||
restore [locate_data_file bug29807-obj.brep] b1
|
||||
restore [locate_data_file bug29807-tool.brep] b2
|
||||
|
||||
|
@ -3,9 +3,6 @@ puts "0029807: Impossible to cut cone from prism"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
puts "TODO OCC29860 ALL: Error : is WRONG because number of WIRE entities in shape \"result\" is 10"
|
||||
puts "TODO OCC29860 ALL: Error : is WRONG because number of FACE entities in shape \"result\" is 10"
|
||||
|
||||
restore [locate_data_file bug29807-obj.brep] b1
|
||||
restore [locate_data_file bug29807-tool.brep] b2
|
||||
|
||||
|
26
tests/bugs/modalg_7/bug32066
Normal file
26
tests/bugs/modalg_7/bug32066
Normal file
@ -0,0 +1,26 @@
|
||||
puts "======================================================="
|
||||
puts "0032066: Modeling Algorithms - Incorrect result of Boolean CUT operation"
|
||||
puts "======================================================="
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32066_solid.brep] s
|
||||
|
||||
restore [locate_data_file bug32066_hole_2547.brep] h1
|
||||
restore [locate_data_file bug32066_hole_2562.brep] h2
|
||||
restore [locate_data_file bug32066_hole_2563.brep] h3
|
||||
restore [locate_data_file bug32066_hole_2564.brep] h4
|
||||
|
||||
bclearobjects
|
||||
bcleartools
|
||||
baddobjects s
|
||||
baddtools h1 h2 h3 h4
|
||||
bfillds
|
||||
|
||||
bbop r 2
|
||||
|
||||
checkshape r
|
||||
|
||||
checknbshapes r -wire 73 -face 65 -shell 1 -solid 1 -t
|
||||
checkprops r -s 3.45489e+07 -v 1.54742e+08
|
||||
|
||||
checkview -display r -2d -path ${imagedir}/${test_image}.png
|
25
tests/bugs/modalg_7/bug32874_1
Normal file
25
tests/bugs/modalg_7/bug32874_1
Normal file
@ -0,0 +1,25 @@
|
||||
puts "================================================="
|
||||
puts "0032874: IsParallel() method of Extrema_ExtCC does not give same results in OCC 7.6.0 vs OCC 7.5.0"
|
||||
puts "================================================="
|
||||
puts ""
|
||||
|
||||
set distExpected 10
|
||||
circle c1 0 0 0 100
|
||||
circle c2 0 0 0 100+$distExpected
|
||||
|
||||
set nbSteps 72
|
||||
for {set i 1} {$i < $nbSteps} {incr i} {
|
||||
trim cc1 c1 0 2.*pi/$nbSteps*$i
|
||||
trim cc2 c2 0 2.*pi/$nbSteps*$i
|
||||
|
||||
set extr [extrema cc1 cc2]
|
||||
if {[regexp {Infinite number of extremas, distance = ([-0-9.+eE]+)} $extr full dist]} {
|
||||
if {[expr abs($dist - $distExpected)] < 1.e-7} {
|
||||
puts "OK"
|
||||
} else {
|
||||
puts "Error: wrong distance $dist instead of $distExpected expected"
|
||||
}
|
||||
} else {
|
||||
puts "Error: non-parallel curves"
|
||||
}
|
||||
}
|
29
tests/bugs/modalg_7/bug32874_2
Normal file
29
tests/bugs/modalg_7/bug32874_2
Normal file
@ -0,0 +1,29 @@
|
||||
puts "================================================="
|
||||
puts "0032874: IsParallel() method of Extrema_ExtCC does not give same results in OCC 7.6.0 vs OCC 7.5.0"
|
||||
puts "================================================="
|
||||
puts ""
|
||||
|
||||
set distExpected 3.5
|
||||
circle c1 0 0 0 100
|
||||
circle c2 0 0 0 100+$distExpected
|
||||
|
||||
set start {0.0 0.5*pi pi 1.5*pi 2.0*pi}
|
||||
set delta {pi/4.0 pi/3.0 pi/2.0 0.55*pi 0.99*pi pi 1.1*pi}
|
||||
|
||||
foreach f $start {
|
||||
foreach d $delta {
|
||||
trim cc1 c1 $f $f+$d
|
||||
trim cc2 c2 $f $f+$d
|
||||
|
||||
set extr [extrema cc1 cc2]
|
||||
if {[regexp {Infinite number of extremas, distance = ([-0-9.+eE]+)} $extr full dist]} {
|
||||
if {[expr abs($dist - $distExpected)] < 1.e-7} {
|
||||
puts "OK"
|
||||
} else {
|
||||
puts "Error: wrong distance $dist instead of $distExpected expected"
|
||||
}
|
||||
} else {
|
||||
puts "Error: non-parallel curves"
|
||||
}
|
||||
}
|
||||
}
|
30
tests/bugs/modalg_7/bug32874_3
Normal file
30
tests/bugs/modalg_7/bug32874_3
Normal file
@ -0,0 +1,30 @@
|
||||
puts "================================================="
|
||||
puts "0032874: IsParallel() method of Extrema_ExtCC does not give same results in OCC 7.6.0 vs OCC 7.5.0"
|
||||
puts "================================================="
|
||||
puts ""
|
||||
|
||||
set radius 0.001
|
||||
set distExpected 0.00001
|
||||
circle c1 0 0 0 $radius
|
||||
circle c2 0 0 0 $radius+$distExpected
|
||||
|
||||
set start {0.0 0.5*pi pi 1.5*pi 2.0*pi}
|
||||
set delta {pi/4.0 pi/3.0 pi/2.0 0.55*pi 0.99*pi pi 1.1*pi}
|
||||
|
||||
foreach f $start {
|
||||
foreach d $delta {
|
||||
trim cc1 c1 $f $f+$d
|
||||
trim cc2 c2 $f $f+$d
|
||||
|
||||
set extr [extrema cc1 cc2]
|
||||
if {[regexp {Infinite number of extremas, distance = ([-0-9.+eE]+)} $extr full dist]} {
|
||||
if {[expr abs($dist - $distExpected)] < 1.e-7} {
|
||||
puts "OK"
|
||||
} else {
|
||||
puts "Error: wrong distance $dist instead of $distExpected expected"
|
||||
}
|
||||
} else {
|
||||
puts "Error: non-parallel curves"
|
||||
}
|
||||
}
|
||||
}
|
30
tests/bugs/modalg_7/bug32874_4
Normal file
30
tests/bugs/modalg_7/bug32874_4
Normal file
@ -0,0 +1,30 @@
|
||||
puts "================================================="
|
||||
puts "0032874: IsParallel() method of Extrema_ExtCC does not give same results in OCC 7.6.0 vs OCC 7.5.0"
|
||||
puts "================================================="
|
||||
puts ""
|
||||
|
||||
set radius 0.001
|
||||
set distExpected 1000.0
|
||||
circle c1 0 0 0 $radius
|
||||
circle c2 0 0 0 $radius+$distExpected
|
||||
|
||||
set start {0.0 0.5*pi pi 1.5*pi 2.0*pi}
|
||||
set delta {pi/4.0 pi/3.0 pi/2.0 0.55*pi 0.99*pi pi 1.1*pi}
|
||||
|
||||
foreach f $start {
|
||||
foreach d $delta {
|
||||
trim cc1 c1 $f $f+$d
|
||||
trim cc2 c2 $f $f+$d
|
||||
|
||||
set extr [extrema cc1 cc2]
|
||||
if {[regexp {Infinite number of extremas, distance = ([-0-9.+eE]+)} $extr full dist]} {
|
||||
if {[expr abs($dist - $distExpected)] < 1.e-7} {
|
||||
puts "OK"
|
||||
} else {
|
||||
puts "Error: wrong distance $dist instead of $distExpected expected"
|
||||
}
|
||||
} else {
|
||||
puts "Error: non-parallel curves"
|
||||
}
|
||||
}
|
||||
}
|
30
tests/bugs/modalg_7/bug32874_5
Normal file
30
tests/bugs/modalg_7/bug32874_5
Normal file
@ -0,0 +1,30 @@
|
||||
puts "================================================="
|
||||
puts "0032874: IsParallel() method of Extrema_ExtCC does not give same results in OCC 7.6.0 vs OCC 7.5.0"
|
||||
puts "================================================="
|
||||
puts ""
|
||||
|
||||
set radius 1000.0
|
||||
set distExpected 1.e-5
|
||||
circle c1 0 0 0 $radius
|
||||
circle c2 0 0 0 $radius-$distExpected
|
||||
|
||||
set start {0.0 0.5*pi pi 1.5*pi 2.0*pi}
|
||||
set delta {pi/4.0 pi/3.0 pi/2.0 0.55*pi 0.99*pi pi 1.1*pi}
|
||||
|
||||
foreach f $start {
|
||||
foreach d $delta {
|
||||
trim cc1 c1 $f $f+$d
|
||||
trim cc2 c2 $f $f+$d
|
||||
|
||||
set extr [extrema cc1 cc2]
|
||||
if {[regexp {Infinite number of extremas, distance = ([-0-9.+eE]+)} $extr full dist]} {
|
||||
if {[expr abs($dist - $distExpected)] < 1.e-7} {
|
||||
puts "OK"
|
||||
} else {
|
||||
puts "Error: wrong distance $dist instead of $distExpected expected"
|
||||
}
|
||||
} else {
|
||||
puts "Error: non-parallel curves"
|
||||
}
|
||||
}
|
||||
}
|
35
tests/bugs/modalg_8/bug32721
Normal file
35
tests/bugs/modalg_8/bug32721
Normal file
@ -0,0 +1,35 @@
|
||||
puts "======================================================"
|
||||
puts "OCC32721: BOP wrong results on a cone and an extrusion"
|
||||
puts "======================================================"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32721.brep] prism
|
||||
pcone cone 6 0 10
|
||||
|
||||
bop cone prism
|
||||
bopfuse r1
|
||||
bopcommon r2
|
||||
bopcut r3
|
||||
boptuc r4
|
||||
|
||||
checkshape r1
|
||||
checknbshapes r1 -t -vertex 8 -edge 17 -wire 8 -face 8 -shell 1 -solid 1
|
||||
checkshape r2
|
||||
checknbshapes r2 -t -vertex 3 -edge 7 -wire 4 -face 4 -shell 1 -solid 1
|
||||
checkshape r3
|
||||
checknbshapes r3 -t -vertex 4 -edge 10 -wire 4 -face 4 -shell 1 -solid 1
|
||||
checkshape r4
|
||||
checknbshapes r4 -t -vertex 7 -edge 14 -wire 8 -face 8 -shell 2 -solid 2
|
||||
|
||||
set tolres [checkmaxtol r1]
|
||||
|
||||
if { ${tolres} > 0.0002} {
|
||||
puts "Error: bad tolerance of result"
|
||||
}
|
||||
|
||||
checkprops r1 -s 388.634 -v 406.357
|
||||
checkprops r2 -s 57.8605 -v 22.8116
|
||||
checkprops r3 -s 358.735 -v 354.179
|
||||
checkprops r4 -s 87.7592 -v 29.3659
|
||||
|
||||
checkview -display r1 -2d -path ${imagedir}/${test_image}.png
|
6
tests/bugs/xde/bug32784
Normal file
6
tests/bugs/xde/bug32784
Normal file
@ -0,0 +1,6 @@
|
||||
puts "==========="
|
||||
puts "0032784: BinXCAF fails to load documents containing the shapes with scaled/mirrored location"
|
||||
puts "==========="
|
||||
|
||||
if [info exists D] {catch {Close D}}
|
||||
XOpen [locate_data_file bug32784_mirrored.xbf] D
|
@ -1,5 +1,3 @@
|
||||
puts "TODO OCC30286 ALL: Error : The length of result shape is 9589.21, expected 9547.11"
|
||||
|
||||
set viewname "vright"
|
||||
set length 9547.11
|
||||
|
||||
|
@ -1,6 +1,3 @@
|
||||
puts "TODO OCC30286 Windows: Error : The length of result shape is 2416.66, expected 2418.08"
|
||||
puts "TODO OCC30286 Linux: Error : The length of result shape is 2414.48, expected 2418.08"
|
||||
|
||||
set viewname "vright"
|
||||
set length 2418.08
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
puts "TODO OCC30286 Linux: Error : The length of result shape is 3249.9, expected 3234.6"
|
||||
|
||||
set viewname "vright"
|
||||
set length 3234.6
|
||||
set length 3237.63
|
||||
|
||||
testreadstep [locate_data_file bug27341_570-DWLNL-40-08-L_131LANG_16VERSATZ_DIN.stp] a
|
||||
COMPUTE_HLR $viewname $algotype
|
||||
|
@ -1,4 +1,4 @@
|
||||
puts "TODO OCC30286 ALL: Error : The length of result shape is 227257, expected 11."
|
||||
puts "TODO OCC30286 ALL: Error : The length of result shape is"
|
||||
|
||||
puts "========================================================================"
|
||||
puts "OCC27979: Parasolid converted BREP shows weird lines on hidden line Algo"
|
||||
|
10
tests/hlr/exact_hlr/bug32747
Normal file
10
tests/hlr/exact_hlr/bug32747
Normal file
@ -0,0 +1,10 @@
|
||||
puts "================================================"
|
||||
puts "OCC32747: Exact HLR algorithm gives wrong result"
|
||||
puts "================================================"
|
||||
puts ""
|
||||
|
||||
set viewname "vfront"
|
||||
set length 34.3597
|
||||
|
||||
restore [locate_data_file bug32747.brep] a
|
||||
COMPUTE_HLR $viewname $algotype
|
6
tests/hlr/exact_hlr/end
Normal file
6
tests/hlr/exact_hlr/end
Normal file
@ -0,0 +1,6 @@
|
||||
checkprops result -l ${length}
|
||||
|
||||
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
||||
|
||||
# to end a test script
|
||||
puts "TEST COMPLETED"
|
15
tests/lowalgos/extcc/bug32796
Normal file
15
tests/lowalgos/extcc/bug32796
Normal file
@ -0,0 +1,15 @@
|
||||
puts "============"
|
||||
puts "OCC32796: Modeling Data - Calculation of distance between two circles crashes"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32796e1.brep] e1
|
||||
restore [locate_data_file bug32796e2.brep] e2
|
||||
mkcurve c1 e1
|
||||
mkcurve c2 e2
|
||||
|
||||
if [catch { extrema c1 c2 }] {
|
||||
puts "Calculation of distance between two circles crashes"
|
||||
} else {
|
||||
puts "Calculation of distance between two circles is OK"
|
||||
}
|
@ -7,7 +7,7 @@ puts ""
|
||||
###############################
|
||||
|
||||
puts "TODO OCC29501 ALL: Error in ii12_22"
|
||||
|
||||
puts "TODO OCC29501 All: Error: The curve ii12_22 is possible"
|
||||
set MaxToler 1.5e-4
|
||||
|
||||
restore [locate_data_file bug24472_Pipe_1.brep] b1
|
||||
|
@ -7,7 +7,7 @@ puts ""
|
||||
#######################################################################
|
||||
|
||||
set MaxTol 1.e-3
|
||||
set GoodNbCurv 11
|
||||
set GoodNbCurv 12
|
||||
|
||||
restore [locate_data_file bug27167_pipe.brep] a1
|
||||
pcylinder a2 100 300
|
||||
|
@ -6,7 +6,7 @@ puts ""
|
||||
# Incomplete intersection curve from the attached shapes
|
||||
#################################################
|
||||
|
||||
set ExpTol 1.1e-7
|
||||
set ExpTol 1.e-5
|
||||
set GoodNbCurv 3
|
||||
set GoodLength 0.6288896355727489
|
||||
|
||||
|
@ -18,7 +18,7 @@ fit
|
||||
# Before the fix: Exception in Debug-mode only
|
||||
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves f_1 f_2 -2d] full Toler NbCurv
|
||||
|
||||
checkreal Tolerance $Toler 4.601149532364662e-008 1.0e-7 0.0
|
||||
checkreal Tolerance $Toler 2.1053092622220167e-07 1.0e-7 0.0
|
||||
|
||||
if {$NbCurv != 1} {
|
||||
puts "Error: Please check NbCurves for intersector"
|
||||
|
@ -17,7 +17,9 @@ fit
|
||||
|
||||
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves b1_5 b2_2 -2d] full Toler NbCurv
|
||||
|
||||
checkreal Tolerance $Toler 0.00039718358540697849 0.0 0.01
|
||||
if { ${Toler} > 0.0004} {
|
||||
puts "Error: bad tolerance of result"
|
||||
}
|
||||
|
||||
if {$NbCurv != 2} {
|
||||
puts "Error: Please check NbCurves for intersector"
|
||||
|
@ -17,7 +17,9 @@ fit
|
||||
|
||||
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves b1_5 b2_2 -2d] full Toler NbCurv
|
||||
|
||||
checkreal Tolerance $Toler 5.0314111870170835e-005 0.0 0.01
|
||||
if { ${Toler} > 5.1e-5} {
|
||||
puts "Error: bad tolerance of result"
|
||||
}
|
||||
|
||||
if {$NbCurv != 2} {
|
||||
puts "Error: Please check NbCurves for intersector"
|
||||
|
@ -18,7 +18,9 @@ fit
|
||||
|
||||
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves b1_5 b2_2 -2d] full Toler NbCurv
|
||||
|
||||
checkreal Tolerance $Toler 0.00011289757099748416 0.0 0.01
|
||||
if { ${Toler} > 0.000113} {
|
||||
puts "Error: bad tolerance of result"
|
||||
}
|
||||
|
||||
if {$NbCurv != 2} {
|
||||
puts "Error: Please check NbCurves for intersector"
|
||||
|
@ -18,7 +18,9 @@ fit
|
||||
|
||||
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves b1_5 b2_2 -2d] full Toler NbCurv
|
||||
|
||||
checkreal Tolerance $Toler 7.7125880147734232e-007 0.0 0.01
|
||||
if { ${Toler} > 8e-7} {
|
||||
puts "Error: bad tolerance of result"
|
||||
}
|
||||
|
||||
if {$NbCurv != 2} {
|
||||
puts "Error: Please check NbCurves for intersector"
|
||||
|
@ -16,7 +16,9 @@ fit
|
||||
|
||||
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves b1_5 f2 -2d] full Toler NbCurv
|
||||
|
||||
checkreal Tolerance $Toler 0.00039718358530349535 0.0 0.01
|
||||
if { ${Toler} > 0.0004} {
|
||||
puts "Error: bad tolerance of result"
|
||||
}
|
||||
|
||||
if {$NbCurv != 2} {
|
||||
puts "Error: Please check NbCurves for intersector"
|
||||
|
@ -17,7 +17,9 @@ fit
|
||||
|
||||
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves b1_5 f2 -2d] full Toler NbCurv
|
||||
|
||||
checkreal Tolerance $Toler 0.00011289757087827709 0.0 0.01
|
||||
if { ${Toler} > 0.000113} {
|
||||
puts "Error: bad tolerance of result"
|
||||
}
|
||||
|
||||
if {$NbCurv != 2} {
|
||||
puts "Error: Please check NbCurves for intersector"
|
||||
|
@ -17,7 +17,9 @@ fit
|
||||
|
||||
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves b1_5 f2 -2d] full Toler NbCurv
|
||||
|
||||
checkreal Tolerance $Toler 7.7124681583892622e-007 0.0 0.01
|
||||
if { ${Toler} > 8e-7} {
|
||||
puts "Error: bad tolerance of result"
|
||||
}
|
||||
|
||||
if {$NbCurv != 2} {
|
||||
puts "Error: Please check NbCurves for intersector"
|
||||
|
@ -32,8 +32,8 @@ while { $AllowRepeat != 0 } {
|
||||
puts "Error: Wrong curve's range!"
|
||||
}
|
||||
|
||||
xdistcs res_$ic s1 U1 U2 100 2.0e-7
|
||||
xdistcs res_$ic s2 U1 U2 100 2.0e-7
|
||||
xdistcs res_$ic s1 U1 U2 100 6.0e-7
|
||||
xdistcs res_$ic s2 U1 U2 100 6.0e-7
|
||||
|
||||
mkedge ee res_$ic
|
||||
baddobjects ee
|
||||
|
56
tests/lowalgos/intss/bug32701
Normal file
56
tests/lowalgos/intss/bug32701
Normal file
@ -0,0 +1,56 @@
|
||||
puts "========"
|
||||
puts "0032701: Modeling Algorithms - 2d curve has bending near the degenerated edge of the face"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32701s.brep] s
|
||||
restore [locate_data_file bug32701t.brep] t
|
||||
|
||||
explode t f
|
||||
|
||||
set log [bopcurves s t_3 -2d]
|
||||
|
||||
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} $log full Toler NbCurv
|
||||
|
||||
if {$NbCurv != 1} {
|
||||
puts "Error: Number of curves is wrong"
|
||||
}
|
||||
|
||||
if { $Toler > 3.0e-5} {
|
||||
puts "Error: Big tolerance value"
|
||||
}
|
||||
|
||||
set log [bopcurves s t_4 -2d]
|
||||
|
||||
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} $log full Toler NbCurv
|
||||
|
||||
if {$NbCurv != 1} {
|
||||
puts "Error: Number of curves is wrong"
|
||||
}
|
||||
|
||||
if { $Toler > 8.0e-5} {
|
||||
puts "Error: Big tolerance value"
|
||||
}
|
||||
|
||||
bcommon cc s t
|
||||
|
||||
checkshape cc
|
||||
checkprops cc -s 19899.6
|
||||
|
||||
##checkview -display cc -2d -path ${imagedir}/${test_image}.png
|
||||
|
||||
bcut cct s t
|
||||
|
||||
checkshape cct
|
||||
checkprops cct -s 32252.5
|
||||
|
||||
compound cc cct qq
|
||||
|
||||
checkview -display qq -2d -path ${imagedir}/${test_image}.png
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,7 +1,11 @@
|
||||
restore [locate_data_file bug25926_before_offset.brep] s
|
||||
|
||||
OFFSETSHAPE 50 {} $calcul $type
|
||||
explode s so
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s_1 50
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 3.68672e+008
|
||||
checkprops result -s 4.96128e+06 -v 3.68655e+08
|
||||
|
||||
checknbshapes result -shell 1
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -wire 12 -face 12 -shell 1 -solid 1
|
||||
|
@ -1,8 +1,10 @@
|
||||
restore [locate_data_file bug25926_before_offset_trim1.brep] s
|
||||
|
||||
OFFSETSHAPE 50 {} $calcul $type
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 50
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 3.61993e+007
|
||||
checkprops result -s 696458
|
||||
checkprops result -s 694900 -v 3.6175e+07
|
||||
|
||||
checknbshapes result -shell 1
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -wire 9 -face 9 -shell 1 -solid 1
|
||||
|
@ -7,7 +7,7 @@ restore [locate_data_file bug25926_offset_shape_trim3.brep] s
|
||||
|
||||
OFFSETSHAPE 12 {} $calcul $type
|
||||
|
||||
checkprops result -v 948181 -s 66208.6
|
||||
checkprops result -v 948181 -s 66208.6 -deps 1.e-3
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -shell 1 -face 14
|
||||
|
@ -1,5 +1,3 @@
|
||||
puts "TODO CR27414 ALL: Error : is WRONG because number of FACE entities in shape"
|
||||
|
||||
restore [locate_data_file bug26917_dom-8092_trim3.brep] s
|
||||
|
||||
offsetparameter 1e-7 $calcul $type
|
||||
|
@ -1,5 +1,3 @@
|
||||
puts "TODO CR27414 ALL: Error : is WRONG because number of FACE entities in shape"
|
||||
|
||||
restore [locate_data_file bug26917_dom-8092_trim4.brep] s
|
||||
|
||||
offsetparameter 1e-7 $calcul $type
|
||||
|
@ -1,5 +1,3 @@
|
||||
puts "TODO CR27414 ALL: Error : is WRONG because number of FACE entities in shape"
|
||||
|
||||
restore [locate_data_file bug26917_dom-8092_simple.brep] s
|
||||
|
||||
offsetparameter 1e-7 $calcul $type
|
||||
|
@ -7,7 +7,7 @@ restore [locate_data_file bug26917_25926_offset_shape_trim4.brep] s
|
||||
|
||||
OFFSETSHAPE 12 {} $calcul $type
|
||||
|
||||
checkprops result -v 643336 -s 45602.9
|
||||
checkprops result -v 643336 -s 45602.9 -deps 1.e-3
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -shell 1 -face 8
|
||||
|
@ -1,6 +1,6 @@
|
||||
puts "TODO OCC27414 ALL: Error: The command cannot be built"
|
||||
puts "TODO OCC27414 ALL: Tcl Exception"
|
||||
puts "TODO OCC27414 ALL: TEST INCOMPLETE"
|
||||
puts "TODO OCC27414 ALL: Error : is WRONG because number of"
|
||||
puts "TODO OCC27414 ALL: Error : The area of result shape is"
|
||||
puts "TODO OCC27414 ALL: Error : The volume of result shape is"
|
||||
|
||||
restore [locate_data_file bug26917_dom-8092.t6c1_trim5_with_faces.brep] c
|
||||
|
||||
|
@ -4,9 +4,9 @@ offsetparameter 1e-7 c i r
|
||||
offsetload s 8
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 4.40128e+007 -s 1.81672e+006
|
||||
checkprops result -s 1.81645e+06 -v 4.40127e+07
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -edge 186 -face 64 -shell 1
|
||||
checknbshapes result_unif -wire 62 -face 62 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
|
17
tests/offset/shape_type_i_c/XU4
Normal file
17
tests/offset/shape_type_i_c/XU4
Normal file
@ -0,0 +1,17 @@
|
||||
puts "============================================================================================="
|
||||
puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\""
|
||||
puts "============================================================================================="
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32333_Z4_trim.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 9.5
|
||||
offsetperform result
|
||||
|
||||
checkprops result -s 88948.9 -v 1.11587e+06
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -wire 15 -face 15 -shell 1 -solid 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
31
tests/offset/shape_type_i_c/XU5
Normal file
31
tests/offset/shape_type_i_c/XU5
Normal file
@ -0,0 +1,31 @@
|
||||
puts "TODO CR27414 ALL: Error: operation with offset value 7 has failed"
|
||||
puts "TODO CR27414 ALL: Error: operation with offset value 8 has failed"
|
||||
puts "TODO CR27414 ALL: Error: operation with offset value 9 has failed"
|
||||
puts "TODO CR27414 ALL: Error: operation with offset value 10 has failed"
|
||||
puts "TODO CR27414 ALL: Error: operation with offset value 11 has failed"
|
||||
puts "TODO CR27414 ALL: Error: operation with offset value 12 has failed"
|
||||
puts "TODO CR27414 ALL: Operations with following offset values have failed: 7 8 9 10 11 12"
|
||||
puts "TODO CR27414 ALL: Error : The offset cannot be built"
|
||||
|
||||
puts "============================================================================================="
|
||||
puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\""
|
||||
puts "============================================================================================="
|
||||
puts ""
|
||||
|
||||
# This is a simplified version of XZ7 case
|
||||
|
||||
restore [locate_data_file bug32333_178_trim4.brep] s
|
||||
|
||||
set ref_values { { 94323.2 1.42329e+06 14 14 } \
|
||||
{ 98288.3 1.51959e+06 14 14 } \
|
||||
{ 102311 1.61989e+06 14 14 } \
|
||||
{ 106392 1.72423e+06 14 14 } \
|
||||
{ 110531 1.83269e+06 14 14 } \
|
||||
{ 114728 1.94532e+06 14 14 } }
|
||||
|
||||
perform_offset_increasing s 7 12 1 $ref_values
|
||||
|
||||
#copy r10 result
|
||||
#copy r10_unif result_unif
|
||||
|
||||
#checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
@ -1,7 +1,4 @@
|
||||
puts "TODO CR32333 ALL: Error : The area of result shape is"
|
||||
puts "TODO CR32333 ALL: Error : The command is not valid."
|
||||
puts "TODO CR32333 ALL: Error : The volume of result shape is"
|
||||
puts "TODO CR32333 ALL: Error : is WRONG because number of"
|
||||
puts "TODO CR27414 ALL: Error : is WRONG because number of"
|
||||
|
||||
puts "============================================================================================="
|
||||
puts "0032088: Modeling Algorithms - Empty result of offset operation in mode \"Complete\" join type \"Intersection\""
|
||||
@ -17,6 +14,6 @@ offsetperform result
|
||||
checkprops result -s 3.1312e+06 -v 5.77267e+07
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -wire 492 -face 492 -shell 1 -solid 1
|
||||
checknbshapes result_unif -wire 491 -face 492 -shell 1 -solid 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
|
@ -1,7 +1,3 @@
|
||||
puts "TODO OCC32333 ALL: Error: The command cannot be built"
|
||||
puts "TODO OCC32333 ALL: gives an empty result"
|
||||
puts "TODO OCC32333 ALL: TEST INCOMPLETE"
|
||||
|
||||
puts "============================================================================================="
|
||||
puts "0032088: Modeling Algorithms - Empty result of offset operation in mode \"Complete\" join type \"Intersection\""
|
||||
puts "============================================================================================="
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user