mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-18 14:27:39 +03:00
Compare commits
22 Commits
V7_8_0
...
CR0_720_Fi
Author | SHA1 | Date | |
---|---|---|---|
|
c94b7bf9d6 | ||
|
55374b512e | ||
|
52a5d7a61d | ||
|
77676f1b6d | ||
|
515991ffef | ||
|
3d5d9d2b5e | ||
|
51e75dba6c | ||
|
b008680dc0 | ||
|
2b5ced28c3 | ||
|
1c4b27600f | ||
|
214171ff60 | ||
|
22f9125e1e | ||
|
1a196a871d | ||
|
5eba99e74b | ||
|
1560ac5528 | ||
|
4b46072ae9 | ||
|
eed77ff55c | ||
|
118e720920 | ||
|
80f77ed256 | ||
|
8f87d4a954 | ||
|
eeccb2515d | ||
|
b1ee6d0e4b |
@@ -1437,3 +1437,10 @@ The Error/Warning reporting system of the algorithms in Boolean Component (in al
|
||||
The methods returning the status of errors and warnings of the algorithms (ErrorStatus() and WarningStatus()) have been removed.
|
||||
Instead use methods HasErrors() and HasWarnings() to check for presence of errors and warnings, respectively.
|
||||
The full list of errors and warnings, with associated data such as problematic sub-shapes, can be obtained by method GetReport().
|
||||
|
||||
@section upgrade_occt730 Upgrade to OCCT 7.3.0
|
||||
|
||||
@subsection upgrade_730_BRepAdaptor_CompCurve Changes in BRepAdaptor_CompCurve
|
||||
|
||||
The method BRepAdaptor_CompCurve::SetPeriodic has been eliminated.
|
||||
Since new version, the method BRepAdaptor_CompCurve::IsPeriodic() will always return FALSE. Earlier, it could return TRUE in case if the wire contained only one edge based on periodic curve.
|
||||
|
@@ -458,7 +458,7 @@ GeomAbs_CurveType Adaptor2d_OffsetCurve::GetType() const {
|
||||
return GeomAbs_Circle;
|
||||
|
||||
default:
|
||||
return GeomAbs_OtherCurve;
|
||||
return GeomAbs_OffsetCurve;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -650,3 +650,27 @@ Handle(Geom2d_BSplineCurve) Adaptor2d_OffsetCurve::BSpline() const
|
||||
"Adaptor2d_OffsetCurve::BSpline() - wrong curve type");
|
||||
return myCurve->BSpline();
|
||||
}
|
||||
|
||||
static Standard_Integer nbPoints(const Handle(Adaptor2d_HCurve2d)& theCurve)
|
||||
{
|
||||
|
||||
Standard_Integer nbs = 20;
|
||||
|
||||
if (theCurve->GetType() == GeomAbs_BezierCurve)
|
||||
{
|
||||
nbs = Max(nbs, 3 + theCurve->NbPoles());
|
||||
}
|
||||
else if (theCurve->GetType() == GeomAbs_BSplineCurve) {
|
||||
nbs = Max(nbs, theCurve->NbKnots() * theCurve->Degree());
|
||||
}
|
||||
|
||||
if (nbs > 300)
|
||||
nbs = 300;
|
||||
return nbs;
|
||||
|
||||
}
|
||||
|
||||
Standard_Integer Adaptor2d_OffsetCurve::NbSamples() const
|
||||
{
|
||||
return nbPoints(myCurve);
|
||||
}
|
||||
|
@@ -174,6 +174,8 @@ public:
|
||||
|
||||
Standard_EXPORT Handle(Geom2d_BSplineCurve) BSpline() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbSamples() const Standard_OVERRIDE;;
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -994,46 +994,61 @@ Standard_Boolean BOPTools_AlgoTools::AreFacesSameDomain
|
||||
Handle(IntTools_Context)& theContext,
|
||||
const Standard_Real theFuzz)
|
||||
{
|
||||
Standard_Boolean bFlag;
|
||||
Standard_Integer iErr;
|
||||
Standard_Real aTolF1, aTolF2, aTol;
|
||||
gp_Pnt2d aP2D;
|
||||
gp_Pnt aP;
|
||||
TopoDS_Face aF1, aF2;
|
||||
TopoDS_Edge aE1;
|
||||
TopExp_Explorer aExp;
|
||||
Standard_Real aFuzz1 = (theFuzz > Precision::Confusion() ? theFuzz : Precision::Confusion());
|
||||
//
|
||||
bFlag=Standard_False;
|
||||
//
|
||||
aF1=theF1;
|
||||
aF1.Orientation(TopAbs_FORWARD);
|
||||
aF2=theF2;
|
||||
aF2.Orientation(TopAbs_FORWARD);
|
||||
//
|
||||
aTolF1=BRep_Tool::Tolerance(aF1);
|
||||
// 1
|
||||
aExp.Init(aF1, TopAbs_EDGE);
|
||||
for (; aExp.More(); aExp.Next()) {
|
||||
aE1=(*(TopoDS_Edge*)(&aExp.Current()));
|
||||
if (!BRep_Tool::Degenerated(aE1)) {
|
||||
Standard_Real aTolE = BRep_Tool::Tolerance(aE1);
|
||||
if (aTolE > aTolF1) {
|
||||
aTolF1 = aTolE;
|
||||
Standard_Boolean bFacesSD = Standard_False;
|
||||
|
||||
// The idea is to find a point inside the first face
|
||||
// and check its validity for the second face.
|
||||
// If valid - the faces are same domain.
|
||||
|
||||
gp_Pnt aP1;
|
||||
gp_Pnt2d aP2D1;
|
||||
// Find point inside the first face
|
||||
Standard_Integer iErr =
|
||||
BOPTools_AlgoTools3D::PointInFace(theF1, aP1, aP2D1, theContext);
|
||||
|
||||
if (iErr != 0)
|
||||
{
|
||||
// unable to find the point
|
||||
return bFacesSD;
|
||||
}
|
||||
|
||||
// Check validity of the point for second face
|
||||
|
||||
// Compute the tolerance to check the validity -
|
||||
// sum of tolerance of faces and fuzzy tolerance
|
||||
|
||||
// Compute the tolerance of the faces, taking into account the deviation
|
||||
// of the edges from the surfaces
|
||||
Standard_Real aTolF1 = BRep_Tool::Tolerance(theF1),
|
||||
aTolF2 = BRep_Tool::Tolerance(theF2);
|
||||
|
||||
// Find maximal tolerance of edges.
|
||||
// The faces should have the same boundaries, thus
|
||||
// it does not matter which face to explore.
|
||||
{
|
||||
Standard_Real aTolEMax = -1.;
|
||||
TopExp_Explorer anExpE(theF1, TopAbs_EDGE);
|
||||
for (; anExpE.More(); anExpE.Next())
|
||||
{
|
||||
const TopoDS_Edge& aE = TopoDS::Edge(anExpE.Current());
|
||||
if (!BRep_Tool::Degenerated(aE))
|
||||
{
|
||||
Standard_Real aTolE = BRep_Tool::Tolerance(aE);
|
||||
if (aTolE > aTolEMax)
|
||||
aTolEMax = aTolE;
|
||||
}
|
||||
}
|
||||
if (aTolEMax > aTolF1) aTolF1 = aTolEMax;
|
||||
if (aTolEMax > aTolF2) aTolF2 = aTolEMax;
|
||||
}
|
||||
// 2
|
||||
aTolF2=BRep_Tool::Tolerance(aF2);
|
||||
aTol = aTolF1 + aTolF2 + aFuzz1;
|
||||
//
|
||||
iErr = BOPTools_AlgoTools3D::PointInFace(aF1, aP, aP2D,
|
||||
theContext);
|
||||
if (!iErr) {
|
||||
bFlag=theContext->IsValidPointForFace(aP, aF2, aTol);
|
||||
}
|
||||
//
|
||||
return bFlag;
|
||||
|
||||
// Checking criteria
|
||||
Standard_Real aTol = aTolF1 + aTolF2 + Max(theFuzz, Precision::Confusion());
|
||||
|
||||
// Project and classify the point on second face
|
||||
bFacesSD = theContext->IsValidPointForFace(aP1, theF2, aTol);
|
||||
|
||||
return bFacesSD;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -46,11 +46,9 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve()
|
||||
: TFirst (0.0),
|
||||
TLast (0.0),
|
||||
PTol (0.0),
|
||||
myPeriod(0.0),
|
||||
CurIndex(-1),
|
||||
Forward (Standard_False),
|
||||
IsbyAC (Standard_False),
|
||||
Periodic(Standard_False)
|
||||
IsbyAC (Standard_False)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -60,11 +58,9 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& theWire,
|
||||
TFirst (0.0),
|
||||
TLast (0.0),
|
||||
PTol (0.0),
|
||||
myPeriod(0.0),
|
||||
CurIndex(-1),
|
||||
Forward (Standard_False),
|
||||
IsbyAC (theIsAC),
|
||||
Periodic(Standard_False)
|
||||
IsbyAC (theIsAC)
|
||||
{
|
||||
Initialize(theWire, theIsAC);
|
||||
}
|
||||
@@ -78,11 +74,9 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& theWire,
|
||||
TFirst (theFirst),
|
||||
TLast (theLast),
|
||||
PTol (theTolerance),
|
||||
myPeriod(0.0),
|
||||
CurIndex(-1),
|
||||
Forward (Standard_False),
|
||||
IsbyAC (theIsAC),
|
||||
Periodic(Standard_False)
|
||||
IsbyAC (theIsAC)
|
||||
{
|
||||
Initialize(theWire, theIsAC, theFirst, theLast, theTolerance);
|
||||
}
|
||||
@@ -144,13 +138,6 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& theWire,
|
||||
|
||||
TFirst = 0;
|
||||
TLast = myKnots->Value(myKnots->Length());
|
||||
myPeriod = TLast - TFirst;
|
||||
if (NbEdge == 1) {
|
||||
Periodic = myCurves->Value(1).IsPeriodic();
|
||||
}
|
||||
else {
|
||||
Periodic = Standard_False;
|
||||
}
|
||||
}
|
||||
|
||||
void BRepAdaptor_CompCurve::Initialize(const TopoDS_Wire& W,
|
||||
@@ -200,15 +187,6 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& theWire,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BRepAdaptor_CompCurve::SetPeriodic(const Standard_Boolean isPeriodic)
|
||||
{
|
||||
if (myWire.Closed()) {
|
||||
Periodic = isPeriodic;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
|
||||
{
|
||||
return myWire;
|
||||
@@ -308,13 +286,13 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
|
||||
|
||||
Standard_Boolean BRepAdaptor_CompCurve::IsPeriodic() const
|
||||
{
|
||||
return Periodic;
|
||||
return Standard_False;
|
||||
|
||||
}
|
||||
|
||||
Standard_Real BRepAdaptor_CompCurve::Period() const
|
||||
{
|
||||
return myPeriod;
|
||||
return (TLast - TFirst);
|
||||
}
|
||||
|
||||
gp_Pnt BRepAdaptor_CompCurve::Value(const Standard_Real U) const
|
||||
@@ -475,12 +453,6 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
|
||||
|
||||
|
||||
Wtest = W+Eps; //Offset to discriminate the nodes
|
||||
if(Periodic){
|
||||
Wtest = ElCLib::InPeriod(Wtest,
|
||||
0,
|
||||
myPeriod);
|
||||
W = Wtest-Eps;
|
||||
}
|
||||
|
||||
// Find the index
|
||||
Standard_Boolean Trouve = Standard_False;
|
||||
|
@@ -52,7 +52,13 @@ class Geom_BSplineCurve;
|
||||
//! The Curve from BRepAdaptor allows to use a Wire
|
||||
//! of the BRep topology like a 3D curve.
|
||||
//! Warning: With this class of curve, C0 and C1 continuities
|
||||
//! are not assumed. So be carful with some algorithm!
|
||||
//! are not assumed. So be careful with some algorithm!
|
||||
//! Please note that BRepAdaptor_CompCurve cannot be
|
||||
//! periodic curve at all (even if it contains single
|
||||
//! periodic edge).
|
||||
//!
|
||||
//! BRepAdaptor_CompCurve can only work on valid wires where all edges are
|
||||
//! connected to each other to make a chain.
|
||||
class BRepAdaptor_CompCurve : public Adaptor3d_Curve
|
||||
{
|
||||
public:
|
||||
@@ -75,10 +81,6 @@ public:
|
||||
//! Sets wire <W> and trimmed parameter.
|
||||
Standard_EXPORT void Initialize (const TopoDS_Wire& W, const Standard_Boolean KnotByCurvilinearAbcissa, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
|
||||
|
||||
//! Set the flag Periodic.
|
||||
//! Warning: This method has no effect if the wire is not closed
|
||||
Standard_EXPORT void SetPeriodic (const Standard_Boolean Periodic);
|
||||
|
||||
//! Returns the wire.
|
||||
Standard_EXPORT const TopoDS_Wire& Wire() const;
|
||||
|
||||
@@ -197,15 +199,11 @@ private:
|
||||
Standard_Real TFirst;
|
||||
Standard_Real TLast;
|
||||
Standard_Real PTol;
|
||||
Standard_Real myPeriod;
|
||||
Handle(BRepAdaptor_HArray1OfCurve) myCurves;
|
||||
Handle(TColStd_HArray1OfReal) myKnots;
|
||||
Standard_Integer CurIndex;
|
||||
Standard_Boolean Forward;
|
||||
Standard_Boolean IsbyAC;
|
||||
Standard_Boolean Periodic;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@@ -115,8 +115,9 @@ void BRepBndLib::Add(const TopoDS_Shape& S, Bnd_Box& B, Standard_Boolean useTria
|
||||
}
|
||||
else {
|
||||
for (;ex2.More();ex2.Next()) {
|
||||
BC.Initialize(TopoDS::Edge(ex2.Current()));
|
||||
BndLib_Add3dCurve::Add(BC, BRep_Tool::Tolerance(F), B);
|
||||
const TopoDS_Edge& anEdge = TopoDS::Edge(ex2.Current());
|
||||
BC.Initialize(anEdge);
|
||||
BndLib_Add3dCurve::Add(BC, BRep_Tool::Tolerance(anEdge), B);
|
||||
}
|
||||
B.Enlarge(BRep_Tool::Tolerance(F));
|
||||
}
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include <Precision.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <Geom2dAPI_ProjectPointOnCurve.hxx>
|
||||
|
||||
static const Standard_Real Probing_Start = 0.123;
|
||||
static const Standard_Real Probing_End = 0.7;
|
||||
@@ -41,27 +42,28 @@ BRepClass_FaceExplorer::BRepClass_FaceExplorer(const TopoDS_Face& F) :
|
||||
myFace(F),
|
||||
myCurEdgeInd(1),
|
||||
myCurEdgePar(Probing_Start)
|
||||
{
|
||||
{
|
||||
myFace.Orientation(TopAbs_FORWARD);
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : CheckPoint
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean BRepClass_FaceExplorer::CheckPoint(gp_Pnt2d& thePoint)
|
||||
Standard_Boolean BRepClass_FaceExplorer::CheckPoint(gp_Pnt2d& thePoint)
|
||||
{
|
||||
Standard_Real anUMin = 0.0, anUMax = 0.0, aVMin = 0.0, aVMax = 0.0;
|
||||
TopLoc_Location aLocation;
|
||||
const Handle(Geom_Surface)& aSurface = BRep_Tool::Surface(myFace, aLocation);
|
||||
aSurface->Bounds(anUMin, anUMax, aVMin, aVMax);
|
||||
if (Precision::IsInfinite(anUMin) || Precision::IsInfinite(anUMax) ||
|
||||
Precision::IsInfinite(aVMin) || Precision::IsInfinite(aVMax))
|
||||
Precision::IsInfinite(aVMin) || Precision::IsInfinite(aVMax))
|
||||
{
|
||||
BRepTools::UVBounds(myFace, anUMin, anUMax, aVMin, aVMax);
|
||||
if (Precision::IsInfinite(anUMin) || Precision::IsInfinite(anUMax) ||
|
||||
Precision::IsInfinite(aVMin) || Precision::IsInfinite(aVMax))
|
||||
Precision::IsInfinite(aVMin) || Precision::IsInfinite(aVMax))
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
@@ -71,14 +73,14 @@ Standard_Boolean BRepClass_FaceExplorer::CheckPoint(gp_Pnt2d& thePoint)
|
||||
Standard_Real aDistance = aCenterPnt.Distance(thePoint);
|
||||
if (Precision::IsInfinite(aDistance))
|
||||
{
|
||||
thePoint.SetCoord(anUMin - ( anUMax - anUMin ),
|
||||
aVMin - ( aVMax - aVMin ));
|
||||
thePoint.SetCoord (anUMin - (anUMax - anUMin ),
|
||||
aVMin - (aVMax - aVMin ));
|
||||
return Standard_False;
|
||||
}
|
||||
else
|
||||
{
|
||||
Standard_Real anEpsilon = Epsilon(aDistance);
|
||||
if (anEpsilon > Max(anUMax - anUMin, aVMax - aVMin))
|
||||
if (anEpsilon > Max (anUMax - anUMin, aVMax - aVMin))
|
||||
{
|
||||
gp_Vec2d aLinVec(aCenterPnt, thePoint);
|
||||
gp_Dir2d aLinDir(aLinVec);
|
||||
@@ -124,7 +126,7 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
|
||||
gp_Lin2d& L,
|
||||
Standard_Real& Par)
|
||||
{
|
||||
TopExp_Explorer anExpF(myFace,TopAbs_EDGE);
|
||||
TopExp_Explorer anExpF(myFace, TopAbs_EDGE);
|
||||
Standard_Integer i;
|
||||
Standard_Real aFPar;
|
||||
Standard_Real aLPar;
|
||||
@@ -137,7 +139,7 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
|
||||
if (i != myCurEdgeInd)
|
||||
continue;
|
||||
|
||||
const TopoDS_Shape &aLocalShape = anExpF.Current();
|
||||
const TopoDS_Shape &aLocalShape = anExpF.Current();
|
||||
const TopAbs_Orientation anOrientation = aLocalShape.Orientation();
|
||||
|
||||
if (anOrientation == TopAbs_FORWARD || anOrientation == TopAbs_REVERSED) {
|
||||
@@ -146,27 +148,29 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
|
||||
aC2d = BRep_Tool::CurveOnSurface(anEdge, myFace, aFPar, aLPar);
|
||||
|
||||
if (!aC2d.IsNull()) {
|
||||
// Treatment of infinite cases.
|
||||
if (Precision::IsNegativeInfinite(aFPar)) {
|
||||
if (Precision::IsPositiveInfinite(aLPar)) {
|
||||
aFPar = -1.;
|
||||
aLPar = 1.;
|
||||
} else {
|
||||
aFPar = aLPar - 1.;
|
||||
}
|
||||
} else if (Precision::IsPositiveInfinite(aLPar))
|
||||
aLPar = aFPar + 1.;
|
||||
// Treatment of infinite cases.
|
||||
if (Precision::IsNegativeInfinite(aFPar)) {
|
||||
if (Precision::IsPositiveInfinite(aLPar)) {
|
||||
aFPar = -1.;
|
||||
aLPar = 1.;
|
||||
}
|
||||
else {
|
||||
aFPar = aLPar - 1.;
|
||||
}
|
||||
}
|
||||
else if (Precision::IsPositiveInfinite(aLPar))
|
||||
aLPar = aFPar + 1.;
|
||||
|
||||
for (; myCurEdgePar < Probing_End ;myCurEdgePar += Probing_Step) {
|
||||
aParamIn = myCurEdgePar*aFPar + (1. - myCurEdgePar)*aLPar;
|
||||
for (; myCurEdgePar < Probing_End; myCurEdgePar += Probing_Step) {
|
||||
aParamIn = myCurEdgePar*aFPar + (1. - myCurEdgePar)*aLPar;
|
||||
|
||||
gp_Vec2d aTanVec;
|
||||
aC2d->D1(aParamIn, aPOnC, aTanVec);
|
||||
Par = aPOnC.SquareDistance(P);
|
||||
aC2d->D1(aParamIn, aPOnC, aTanVec);
|
||||
Par = aPOnC.SquareDistance(P);
|
||||
|
||||
if (Par > aTolParConf2) {
|
||||
gp_Vec2d aLinVec(P, aPOnC);
|
||||
gp_Dir2d aLinDir(aLinVec);
|
||||
if (Par > aTolParConf2) {
|
||||
gp_Vec2d aLinVec(P, aPOnC);
|
||||
gp_Dir2d aLinDir(aLinVec);
|
||||
|
||||
Standard_Real aTanMod = aTanVec.SquareMagnitude();
|
||||
if (aTanMod < aTolParConf2)
|
||||
@@ -174,8 +178,10 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
|
||||
aTanVec /= Sqrt(aTanMod);
|
||||
Standard_Real aSinA = aTanVec.Crossed(aLinDir.XY());
|
||||
const Standard_Real SmallAngle = 0.001;
|
||||
Standard_Boolean isSmallAngle = Standard_False;
|
||||
if (Abs(aSinA) < SmallAngle)
|
||||
{
|
||||
isSmallAngle = Standard_True;
|
||||
// The line from the input point P to the current point on edge
|
||||
// is tangent to the edge curve. This condition is bad for classification.
|
||||
// Therefore try to go to another point in the hope that there will be
|
||||
@@ -185,28 +191,62 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
|
||||
continue;
|
||||
}
|
||||
|
||||
L = gp_Lin2d(P, aLinDir);
|
||||
L = gp_Lin2d(P, aLinDir);
|
||||
|
||||
// Check if ends of a curve lie on a line.
|
||||
aC2d->D0(aFPar, aPOnC);
|
||||
// Check if ends of a curve lie on a line.
|
||||
aC2d->D0(aFPar, aPOnC);
|
||||
Standard_Real aFDist = P.SquareDistance(aPOnC);
|
||||
if (L.SquareDistance(aPOnC) > aTolParConf2) {
|
||||
aC2d->D0(aLPar, aPOnC);
|
||||
if (L.SquareDistance(aPOnC) > aTolParConf2) {
|
||||
Standard_Real aLDist = P.SquareDistance(aPOnC);
|
||||
|
||||
if (L.SquareDistance(aPOnC) > aTolParConf2) {
|
||||
aC2d->D0(aLPar, aPOnC);
|
||||
if (isSmallAngle)
|
||||
{
|
||||
//Try to find minimal distance between curve and line
|
||||
|
||||
if (L.SquareDistance(aPOnC) > aTolParConf2) {
|
||||
myCurEdgePar += Probing_Step;
|
||||
Geom2dAPI_ProjectPointOnCurve aProj;
|
||||
aProj.Init(P, aC2d, aFPar, aLPar);
|
||||
if (aProj.NbPoints() > 0)
|
||||
{
|
||||
Standard_Real aMinDist = aProj.LowerDistance();
|
||||
aMinDist *= aMinDist;
|
||||
Standard_Real aTMin = aProj.LowerDistanceParameter();
|
||||
if (aMinDist > aFDist)
|
||||
{
|
||||
aMinDist = aFDist;
|
||||
aTMin = aFPar;
|
||||
}
|
||||
if (aMinDist > aLDist)
|
||||
{
|
||||
aMinDist = aLDist;
|
||||
aTMin = aLPar;
|
||||
}
|
||||
if (aMinDist < Par)
|
||||
{
|
||||
Par = aMinDist;
|
||||
if (Par < aTolParConf2)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
aC2d->D1(aTMin, aPOnC, aTanVec);
|
||||
aLinDir.SetXY(aTanVec.XY());
|
||||
L = gp_Lin2d(P, aLinDir);
|
||||
}
|
||||
}
|
||||
}
|
||||
myCurEdgePar += Probing_Step;
|
||||
if (myCurEdgePar >= Probing_End) {
|
||||
myCurEdgeInd++;
|
||||
myCurEdgePar = Probing_Start;
|
||||
}
|
||||
|
||||
if (myCurEdgePar >= Probing_End) {
|
||||
myCurEdgeInd++;
|
||||
myCurEdgePar = Probing_Start;
|
||||
}
|
||||
|
||||
Par = Sqrt(Par);
|
||||
return Standard_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Par = Sqrt(Par);
|
||||
return Standard_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // if (!aC2d.IsNull()) {
|
||||
} // if (anOrientation == TopAbs_FORWARD ...
|
||||
|
||||
@@ -217,7 +257,7 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P,
|
||||
|
||||
// nothing found, return an horizontal line
|
||||
Par = RealLast();
|
||||
L = gp_Lin2d(P,gp_Dir2d(1,0));
|
||||
L = gp_Lin2d(P, gp_Dir2d(1, 0));
|
||||
|
||||
return Standard_False;
|
||||
}
|
||||
|
@@ -135,10 +135,10 @@ void BRepClass_Intersector::Perform(const gp_Lin2d& L,
|
||||
IntRes2d_Domain DL;
|
||||
//
|
||||
if(P!=RealLast()) {
|
||||
DL.SetValues(L.Location(),0.,aTolZ,ElCLib::Value(P,L),P,aTolZ);
|
||||
DL.SetValues(L.Location(),0.,Precision::PConfusion(),ElCLib::Value(P,L),P,Precision::PConfusion());
|
||||
}
|
||||
else {
|
||||
DL.SetValues(L.Location(),0.,aTolZ,Standard_True);
|
||||
DL.SetValues(L.Location(),0.,Precision::PConfusion(),Standard_True);
|
||||
}
|
||||
|
||||
IntRes2d_Domain DE(pdeb,deb,toldeb,pfin,fin,tolfin);
|
||||
|
@@ -385,10 +385,8 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
|
||||
if (Affich)
|
||||
DBRep::Set("theguide", TheGuide);
|
||||
#endif
|
||||
// transform the guide in a single curve (periodic if posssible)
|
||||
Handle(BRepAdaptor_HCompCurve) Guide =
|
||||
new (BRepAdaptor_HCompCurve) (TheGuide);
|
||||
Guide->ChangeCurve().SetPeriodic(Standard_True);
|
||||
// transform the guide in a single curve
|
||||
Handle(BRepAdaptor_HCompCurve) Guide = new (BRepAdaptor_HCompCurve) (TheGuide);
|
||||
|
||||
if (CurvilinearEquivalence) { // trihedron by curvilinear reduced abscissa
|
||||
if (KeepContact == BRepFill_Contact ||
|
||||
|
@@ -131,10 +131,10 @@ BRepLib_MakeWire::BRepLib_MakeWire(const TopoDS_Wire& W,
|
||||
|
||||
void BRepLib_MakeWire::Add(const TopoDS_Wire& W)
|
||||
{
|
||||
TopExp_Explorer ex(W,TopAbs_EDGE);
|
||||
while (ex.More()) {
|
||||
Add(TopoDS::Edge(ex.Current()));
|
||||
ex.Next();
|
||||
for (TopoDS_Iterator it(W); it.More(); it.Next()) {
|
||||
Add(TopoDS::Edge(it.Value()));
|
||||
if (myError != BRepLib_WireDone)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <BRepLib_WireError.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <BRepLib_MakeShape.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
@@ -172,14 +173,14 @@ private:
|
||||
};
|
||||
|
||||
void CollectCoincidentVertices(const TopTools_ListOfShape& theL,
|
||||
NCollection_List<NCollection_List<TopoDS_Vertex>>& theGrVL);
|
||||
NCollection_List<NCollection_List<TopoDS_Vertex>>& theGrVL);
|
||||
|
||||
void CreateNewVertices(const NCollection_List<NCollection_List<TopoDS_Vertex>>& theGrVL,
|
||||
NCollection_DataMap<TopoDS_Vertex, TopoDS_Vertex>& theO2NV);
|
||||
TopTools_DataMapOfShapeShape& theO2NV);
|
||||
|
||||
void CreateNewListOfEdges(const TopTools_ListOfShape& theL,
|
||||
const NCollection_DataMap<TopoDS_Vertex, TopoDS_Vertex>& theO2NV,
|
||||
TopTools_ListOfShape& theNewEList);
|
||||
const TopTools_DataMapOfShapeShape& theO2NV,
|
||||
TopTools_ListOfShape& theNewEList);
|
||||
|
||||
void Add(const TopoDS_Edge& E, Standard_Boolean IsCheckGeometryProximity);
|
||||
|
||||
|
@@ -58,7 +58,7 @@ void BRepLib_MakeWire::Add(const TopTools_ListOfShape& L)
|
||||
|
||||
CollectCoincidentVertices(L, aGrVL);
|
||||
|
||||
NCollection_DataMap<TopoDS_Vertex, TopoDS_Vertex> anO2NV;
|
||||
TopTools_DataMapOfShapeShape anO2NV;
|
||||
|
||||
CreateNewVertices(aGrVL, anO2NV);
|
||||
|
||||
@@ -188,17 +188,13 @@ void BRepLib_MakeWire::CollectCoincidentVertices(const TopTools_ListOfShape& the
|
||||
NCollection_List<NCollection_List<TopoDS_Vertex>>& theGrVL)
|
||||
{
|
||||
TopTools_IndexedMapOfShape anAllV;
|
||||
TopTools_ListIteratorOfListOfShape anItL;
|
||||
TopTools_IndexedDataMapOfShapeListOfShape aMV2EL;
|
||||
|
||||
TopExp::MapShapesAndAncestors(myShape, TopAbs_VERTEX, TopAbs_EDGE, aMV2EL);
|
||||
TopExp_Explorer exp;
|
||||
for (anItL.Initialize(theL); anItL.More(); anItL.Next())
|
||||
TopExp::MapShapesAndAncestors(anItL.Value(), TopAbs_VERTEX, TopAbs_EDGE, aMV2EL);
|
||||
TopExp::MapShapes(myShape, TopAbs_VERTEX, anAllV);
|
||||
|
||||
for (int i = 1; i <= aMV2EL.Extent(); i++)
|
||||
if (aMV2EL(i).Extent() == 1)
|
||||
anAllV.Add(aMV2EL.FindKey(i));
|
||||
TopTools_ListIteratorOfListOfShape anItL(theL);
|
||||
for (; anItL.More(); anItL.Next())
|
||||
TopExp::MapShapes(anItL.Value(), TopAbs_VERTEX, anAllV);
|
||||
|
||||
//aV2CV : vertex <-> its coincident vertices
|
||||
NCollection_DataMap<TopoDS_Vertex, NCollection_Map<TopoDS_Vertex>> aV2CV;
|
||||
@@ -303,8 +299,8 @@ void BRepLib_MakeWire::CollectCoincidentVertices(const TopTools_ListOfShape& the
|
||||
//function : CreateNewVertices
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BRepLib_MakeWire::CreateNewVertices(const NCollection_List<NCollection_List<TopoDS_Vertex>>& theGrVL,
|
||||
NCollection_DataMap<TopoDS_Vertex, TopoDS_Vertex>& theO2NV)
|
||||
void BRepLib_MakeWire::CreateNewVertices(const NCollection_List<NCollection_List<TopoDS_Vertex>>& theGrVL,
|
||||
TopTools_DataMapOfShapeShape& theO2NV)
|
||||
{
|
||||
//map [old vertex => new vertex]
|
||||
//note that already existing shape (i.e. the original ones)
|
||||
@@ -356,7 +352,7 @@ void BRepLib_MakeWire::CreateNewVertices(const NCollection_List<NCollection_List
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BRepLib_MakeWire::CreateNewListOfEdges(const TopTools_ListOfShape& theL,
|
||||
const NCollection_DataMap<TopoDS_Vertex, TopoDS_Vertex>& theO2NV,
|
||||
const TopTools_DataMapOfShapeShape& theO2NV,
|
||||
TopTools_ListOfShape& theNewEList)
|
||||
{
|
||||
///create the new list (theNewEList) from the input list L
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Adaptor2d_Curve2d.hxx>
|
||||
#include <Extrema_Curve2dTool.hxx>
|
||||
#include <Extrema_ExtPC2d.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
@@ -43,6 +44,7 @@
|
||||
#define Pnt_hxx <gp_Pnt2d.hxx>
|
||||
#define Vec gp_Vec2d
|
||||
#define Vec_hxx <gp_Vec2d.hxx>
|
||||
#define Extrema_GExtPC Extrema_ExtPC2d
|
||||
#define Extrema_GenExtCC Extrema_ECC2d
|
||||
#define Extrema_GenExtCC_hxx <Extrema_ECC2d.hxx>
|
||||
#include <Extrema_GenExtCC.gxx>
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
#include <Extrema_CurveTool.hxx>
|
||||
#include <Extrema_ExtPC.hxx>
|
||||
#include <Extrema_POnCurv.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
@@ -43,6 +44,7 @@
|
||||
#define Pnt_hxx <gp_Pnt.hxx>
|
||||
#define Vec gp_Vec
|
||||
#define Vec_hxx <gp_Vec.hxx>
|
||||
#define Extrema_GExtPC Extrema_ExtPC
|
||||
#define Extrema_GenExtCC Extrema_ECC
|
||||
#define Extrema_GenExtCC_hxx <Extrema_ECC.hxx>
|
||||
#include <Extrema_GenExtCC.gxx>
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <StdFail_NotDone.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColStd_ListOfInteger.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <NCollection_Vector.hxx>
|
||||
#include <NCollection_CellFilter.hxx>
|
||||
@@ -92,6 +93,29 @@ private:
|
||||
Standard_Boolean myIsFind;
|
||||
};
|
||||
|
||||
//=======================================================================
|
||||
//function : ProjPOnC
|
||||
//purpose : Projects the point on the curve and returns the minimal
|
||||
// projection distance
|
||||
//=======================================================================
|
||||
static Standard_Real ProjPOnC(const Pnt& theP,
|
||||
Extrema_GExtPC& theProjTool)
|
||||
{
|
||||
Standard_Real aDist = ::RealLast();
|
||||
theProjTool.Perform(theP);
|
||||
if (theProjTool.IsDone() && theProjTool.NbExt())
|
||||
{
|
||||
for (Standard_Integer i = 1; i <= theProjTool.NbExt(); ++i)
|
||||
{
|
||||
Standard_Real aD = theProjTool.SquareDistance(i);
|
||||
if (aD < aDist)
|
||||
aDist = aD;
|
||||
}
|
||||
aDist = sqrt(aDist);
|
||||
}
|
||||
return aDist;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Extrema_GenExtCC
|
||||
//purpose :
|
||||
@@ -262,9 +286,10 @@ void Extrema_GenExtCC::Perform()
|
||||
aFinder.SetFunctionalMinimalValue(0.0); // Best distance cannot be lower than 0.0.
|
||||
|
||||
// Size computed to have cell index inside of int32 value.
|
||||
const Standard_Real aCellSize = Max(anIntervals1.Last() - anIntervals1.First(),
|
||||
const Standard_Real aCellSize = Max(Max(anIntervals1.Last() - anIntervals1.First(),
|
||||
anIntervals2.Last() - anIntervals2.First())
|
||||
* Precision::PConfusion() / (2.0 * Sqrt(2.0));
|
||||
* Precision::PConfusion() / (2.0 * Sqrt(2.0)),
|
||||
Precision::PConfusion());
|
||||
Extrema_CCPointsInspector anInspector(aCellSize);
|
||||
NCollection_CellFilter<Extrema_CCPointsInspector> aFilter(aCellSize);
|
||||
NCollection_Vector<gp_XY> aPnts;
|
||||
@@ -329,63 +354,150 @@ void Extrema_GenExtCC::Perform()
|
||||
}
|
||||
}
|
||||
|
||||
if (aPnts.Size() == 0)
|
||||
const Standard_Integer aNbSol = aPnts.Length();
|
||||
if (aNbSol == 0)
|
||||
{
|
||||
// No solutions.
|
||||
myDone = Standard_False;
|
||||
return;
|
||||
}
|
||||
|
||||
myDone = Standard_True;
|
||||
|
||||
if (aNbSol == 1)
|
||||
{
|
||||
// Single solution
|
||||
const gp_XY& aSol = aPnts.First();
|
||||
myPoints1.Append(aSol.X());
|
||||
myPoints2.Append(aSol.Y());
|
||||
return;
|
||||
}
|
||||
|
||||
// More than one solution is found.
|
||||
// Check for infinity solutions case, for this:
|
||||
// Sort points lexicographically and check midpoint between each two neighboring points.
|
||||
// If all midpoints functional value is acceptable
|
||||
// then set myParallel flag to true and return one solution.
|
||||
// If all midpoints functional value is acceptable then check the projection distances
|
||||
// of the bounding points of the curves onto the opposite curves.
|
||||
// If these distances are also acceptable set myParallel flag to true and return one solution.
|
||||
std::sort(aPnts.begin(), aPnts.end(), comp);
|
||||
Standard_Boolean isParallel = Standard_False;
|
||||
|
||||
// Solutions to pass into result.
|
||||
// If the parallel segment is found, save only extreme solutions on that segment.
|
||||
// The first and last solutions will always be the extreme ones, thus save them unconditionally.
|
||||
TColStd_ListOfInteger aSolutions;
|
||||
|
||||
// Manages the addition of the solution into result.
|
||||
// Set it to TRUE to add the first solution.
|
||||
Standard_Boolean bSaveSolution = Standard_True;
|
||||
|
||||
// Define direction of the second curve relatively the first one
|
||||
// (it will be needed for projection).
|
||||
Standard_Boolean bDirsCoinside = Standard_True;
|
||||
// Check also if the found solutions are not concentrated in one point
|
||||
// on any of the curves. And if they are, avoid marking the curves as parallel.
|
||||
Standard_Boolean bDifferentSolutions = Standard_False;
|
||||
|
||||
Standard_Boolean isParallel = Standard_True;
|
||||
Standard_Real aVal = 0.0;
|
||||
math_Vector aVec(1,2, 0.0);
|
||||
math_Vector aVec(1, 2, 0.0);
|
||||
|
||||
// Avoid mark parallel case when have duplicates out of tolerance.
|
||||
// Bad conditioned task: bug25635_1, bug23706_10, bug23706_13.
|
||||
if (aPnts.Size() >= 2)
|
||||
// Iterate on all solutions and collect the extreme solutions on all parallel segments.
|
||||
for (Standard_Integer anIdx = 0; anIdx < aNbSol - 1; anIdx++)
|
||||
{
|
||||
isParallel = Standard_True;
|
||||
for(Standard_Integer anIdx = aPnts.Lower(); anIdx <= aPnts.Upper() - 1; anIdx++)
|
||||
const gp_XY& aCurrent = aPnts(anIdx);
|
||||
const gp_XY& aNext = aPnts(anIdx + 1);
|
||||
|
||||
aVec(1) = (aCurrent.X() + aNext.X()) * 0.5;
|
||||
aVec(2) = (aCurrent.Y() + aNext.Y()) * 0.5;
|
||||
|
||||
aFunc.Value(aVec, aVal);
|
||||
|
||||
if (Abs(aVal - aF) < Precision::Confusion())
|
||||
{
|
||||
const gp_XY& aCurrent = aPnts(anIdx);
|
||||
const gp_XY& aNext = aPnts(anIdx + 1);
|
||||
|
||||
aVec(1) = (aCurrent.X() + aNext.X()) * 0.5;
|
||||
aVec(2) = (aCurrent.Y() + aNext.Y()) * 0.5;
|
||||
|
||||
aFunc.Value(aVec, aVal);
|
||||
|
||||
if (Abs(aVal - aF) > Precision::Confusion())
|
||||
// It seems the parallel segment is found.
|
||||
// Save only extreme solutions on that segment.
|
||||
if (bSaveSolution)
|
||||
{
|
||||
isParallel = Standard_False;
|
||||
break;
|
||||
// Add current solution as the beginning of the parallel segment.
|
||||
aSolutions.Append(anIdx);
|
||||
// Do not keep the next solution in current parallel segment.
|
||||
bSaveSolution = Standard_False;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Mid point does not satisfy the tolerance criteria, curves are not parallel.
|
||||
isParallel = Standard_False;
|
||||
// Add current solution as the last one in previous parallel segment.
|
||||
aSolutions.Append(anIdx);
|
||||
// Save also the next solution as the first one in next parallel segment.
|
||||
bSaveSolution = Standard_True;
|
||||
}
|
||||
|
||||
if (!bDifferentSolutions)
|
||||
{
|
||||
if (aNext.X() > aCurrent.X())
|
||||
{
|
||||
if (aNext.Y() > aCurrent.Y())
|
||||
{
|
||||
bDifferentSolutions = Standard_True;
|
||||
bDirsCoinside = Standard_True;
|
||||
}
|
||||
else if (aNext.Y() < aCurrent.Y())
|
||||
{
|
||||
bDifferentSolutions = Standard_True;
|
||||
bDirsCoinside = Standard_False;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Save the last solution
|
||||
aSolutions.Append(aNbSol - 1);
|
||||
|
||||
if (!bDifferentSolutions)
|
||||
isParallel = Standard_False;
|
||||
|
||||
if (isParallel)
|
||||
{
|
||||
// For the check on parallel case it is also necessary to check additionally
|
||||
// if the ends of the curves do not diverge. For this, project the bounding
|
||||
// points of the curves on the opposite curves and check the distances.
|
||||
|
||||
Standard_Real aT1[2] = {myLowBorder(1), myUppBorder(1)};
|
||||
Standard_Real aT2[2] = {bDirsCoinside ? myLowBorder(2) : myUppBorder(2),
|
||||
bDirsCoinside ? myUppBorder(2) : myLowBorder(2)};
|
||||
|
||||
Extrema_GExtPC anExtPC1, anExtPC2;
|
||||
anExtPC1.Initialize(C1, myLowBorder(1), myUppBorder(1));
|
||||
anExtPC2.Initialize(C2, myLowBorder(2), myUppBorder(2));
|
||||
|
||||
for (Standard_Integer iT = 0; isParallel && (iT < 2); ++iT)
|
||||
{
|
||||
Standard_Real aDist1 = ProjPOnC(C1.Value(aT1[iT]), anExtPC2);
|
||||
Standard_Real aDist2 = ProjPOnC(C2.Value(aT2[iT]), anExtPC1);
|
||||
isParallel = (Abs(Min(aDist1, aDist2) - aF) < Precision::Confusion());
|
||||
}
|
||||
}
|
||||
|
||||
if (isParallel)
|
||||
{
|
||||
const gp_XY& aCurrent = aPnts.First();
|
||||
myPoints1.Append(aCurrent.X());
|
||||
myPoints2.Append(aCurrent.Y());
|
||||
// Keep only one solution
|
||||
const gp_XY& aSol = aPnts.First();
|
||||
myPoints1.Append(aSol.X());
|
||||
myPoints2.Append(aSol.Y());
|
||||
myParallel = Standard_True;
|
||||
}
|
||||
else
|
||||
{
|
||||
for(Standard_Integer anIdx = aPnts.Lower(); anIdx <= aPnts.Upper(); anIdx++)
|
||||
// Keep all saved solutions
|
||||
TColStd_ListIteratorOfListOfInteger aItSol(aSolutions);
|
||||
for (; aItSol.More(); aItSol.Next())
|
||||
{
|
||||
const gp_XY& aCurrent = aPnts(anIdx);
|
||||
myPoints1.Append(aCurrent.X());
|
||||
myPoints2.Append(aCurrent.Y());
|
||||
const gp_XY& aSol = aPnts(aItSol.Value());
|
||||
myPoints1.Append(aSol.X());
|
||||
myPoints2.Append(aSol.Y());
|
||||
}
|
||||
}
|
||||
|
||||
myDone = Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -191,7 +191,7 @@ pararg2(1,aNbSolMAX)
|
||||
Geom2dInt_TheIntConicCurveOfGInter Intp(Line,D1,C2,D2,Tol,Tol);
|
||||
if (Intp.IsDone()) {
|
||||
if (!Intp.IsEmpty()) {
|
||||
for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
|
||||
for (Standard_Integer i = 1 ; i <= Intp.NbPoints() && NbrSol < cirsol.Length() ; i++) {
|
||||
NbrSol++;
|
||||
gp_Pnt2d Center(Intp.Point(i).Value());
|
||||
cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
|
||||
@@ -375,7 +375,7 @@ pararg2(1,aNbSolMAX)
|
||||
Intp.Perform(Circ,D1,C2,D2,Tol,Tol);
|
||||
if (Intp.IsDone()) {
|
||||
if (!Intp.IsEmpty()) {
|
||||
for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
|
||||
for (Standard_Integer i = 1 ; i <= Intp.NbPoints() && NbrSol < cirsol.Length() ; i++) {
|
||||
NbrSol++;
|
||||
gp_Pnt2d Center(Intp.Point(i).Value());
|
||||
cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
|
||||
@@ -507,7 +507,7 @@ pararg2(1,aNbSolMAX)
|
||||
Intp.Perform(Circ,D1,Cu2,D2,Tol,Tol);
|
||||
if (Intp.IsDone()) {
|
||||
if (!Intp.IsEmpty()) {
|
||||
for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) {
|
||||
for (Standard_Integer i = 1 ; i <= Intp.NbPoints() && NbrSol < cirsol.Length(); i++) {
|
||||
NbrSol++;
|
||||
gp_Pnt2d Center(Intp.Point(i).Value());
|
||||
cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
|
||||
@@ -853,7 +853,7 @@ pararg2(1,aNbSolMAX)
|
||||
if (!Intp.IsEmpty()) {
|
||||
const Standard_Real aSQApproxTol = Precision::Approximation() *
|
||||
Precision::Approximation();
|
||||
for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++)
|
||||
for (Standard_Integer i = 1 ; i <= Intp.NbPoints() && NbrSol < cirsol.Length() ; i++)
|
||||
{
|
||||
Standard_Real aU0 = Intp.Point(i).ParamOnFirst();
|
||||
Standard_Real aV0 = Intp.Point(i).ParamOnSecond();
|
||||
|
@@ -365,7 +365,7 @@ static Standard_Integer xdistcs(Draw_Interpretor& di, Standard_Integer n, const
|
||||
// report error or warning if distance is greater than tolerance
|
||||
if (aD > anErrTol)
|
||||
{
|
||||
di << "Error :";
|
||||
di << "Error in " << a[1] << ":";
|
||||
}
|
||||
else if (aD > aWarnTol)
|
||||
{
|
||||
|
@@ -42,7 +42,7 @@ class HLRAlgo_Coincidence
|
||||
public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
Standard_EXPORT HLRAlgo_Coincidence() :
|
||||
HLRAlgo_Coincidence() :
|
||||
myFE(0),
|
||||
myParam(0.),
|
||||
myStBef(TopAbs_IN),
|
||||
|
@@ -382,8 +382,8 @@ void HLRAlgo_PolyData::hideByOneTriangle (const HLRAlgo_BiPoint::PointsT& thePoi
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (HLRAlgo_PolyData_ERROR) {
|
||||
cout << " error : HLRAlgo_PolyData::HideByOneTriangle " << endl;
|
||||
cout << " ( more than 2 points )." << endl;
|
||||
std::cout << " error : HLRAlgo_PolyData::HideByOneTriangle " << std::endl;
|
||||
std::cout << " ( more than 2 points )." << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -470,7 +470,7 @@ void HLRAlgo_PolyData::hideByOneTriangle (const HLRAlgo_BiPoint::PointsT& thePoi
|
||||
if (d2 < 0) ad2 = -d2;
|
||||
pp = ad1 / ( ad1 + ad2 );
|
||||
if (TrFlags & HLRAlgo_PolyMask_EMskGrALin2)
|
||||
pdp = (thePoints.PntP1.X() + (thePoints.Pnt2.X() - thePoints.PntP1.X()) * pp - theTriangle.V2.X()) / aD.X();
|
||||
pdp = (thePoints.PntP1.X() + (thePoints.PntP2.X() - thePoints.PntP1.X()) * pp - theTriangle.V2.X()) / aD.X();
|
||||
else
|
||||
pdp = (thePoints.PntP1.Y() + (thePoints.PntP2.Y() - thePoints.PntP1.Y()) * pp - theTriangle.V2.Y()) / aD.Y();
|
||||
Standard_Boolean OutSideP = Standard_False;
|
||||
@@ -524,8 +524,8 @@ void HLRAlgo_PolyData::hideByOneTriangle (const HLRAlgo_BiPoint::PointsT& thePoi
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (HLRAlgo_PolyData_ERROR) {
|
||||
cout << " error : HLRAlgo_PolyData::HideByOneTriangle " << endl;
|
||||
cout << " ( more than 2 points )." << endl;
|
||||
std::cout << " error : HLRAlgo_PolyData::HideByOneTriangle " << std::endl;
|
||||
std::cout << " ( more than 2 points )." << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -666,8 +666,8 @@ void HLRAlgo_PolyData::hideByOneTriangle (const HLRAlgo_BiPoint::PointsT& thePoi
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (HLRAlgo_PolyData_ERROR) {
|
||||
cout << " error : HLRAlgo_PolyData::HideByOneTriangle " << endl;
|
||||
cout << " ( more than 2 points )." << endl;
|
||||
std::cout << " error : HLRAlgo_PolyData::HideByOneTriangle " << std::endl;
|
||||
std::cout << " ( more than 2 points )." << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@@ -326,7 +326,7 @@ HLRAlgo_PolyInternalData::AddNode (
|
||||
Nod3RValues.Normal = gp_XYZ(1., 0., 0.);
|
||||
#ifdef OCCT_DEBUG
|
||||
if (HLRAlgo_PolyInternalData_ERROR)
|
||||
cout << "HLRAlgo_PolyInternalData::AddNode" << endl;
|
||||
std::cout << "HLRAlgo_PolyInternalData::AddNode" << std::endl;
|
||||
#endif
|
||||
}
|
||||
return ip3;
|
||||
@@ -415,8 +415,8 @@ HLRAlgo_PolyInternalData::UpdateLinks (const Standard_Integer ip1,
|
||||
myNbPISeg--;
|
||||
#ifdef OCCT_DEBUG
|
||||
if (HLRAlgo_PolyInternalData_ERROR) {
|
||||
cout << "HLRAlgo_PolyInternalData::UpdateLinks : segment error";
|
||||
cout << endl;
|
||||
std::cout << "HLRAlgo_PolyInternalData::UpdateLinks : segment error";
|
||||
std::cout << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -520,8 +520,8 @@ HLRAlgo_PolyInternalData::UpdateLinks (const Standard_Integer ip1,
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (HLRAlgo_PolyInternalData_ERROR) {
|
||||
cout << "HLRAlgo_PolyInternalData::UpdateLinks : triangle error ";
|
||||
cout << endl;
|
||||
std::cout << "HLRAlgo_PolyInternalData::UpdateLinks : triangle error ";
|
||||
std::cout << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -640,33 +640,33 @@ void HLRAlgo_PolyInternalData::Dump () const
|
||||
const Handle(HLRAlgo_PolyInternalNode)* pi = &PINod->ChangeValue(i);
|
||||
HLRAlgo_PolyInternalNode::NodeIndices& aNodIndices1 = (*pi)->Indices();
|
||||
HLRAlgo_PolyInternalNode::NodeData& Nod1RValues = (*pi)->Data();
|
||||
cout << "Node " << setw(6) << i << " : ";
|
||||
cout << setw(6) << aNodIndices1.NdSg;
|
||||
cout << setw(20)<< Nod1RValues.Point.X();
|
||||
cout << setw(20)<< Nod1RValues.Point.Y();
|
||||
cout << setw(20)<< Nod1RValues.Point.Z();
|
||||
cout << endl;
|
||||
std::cout << "Node " << std::setw(6) << i << " : ";
|
||||
std::cout << std::setw(6) << aNodIndices1.NdSg;
|
||||
std::cout << std::setw(20)<< Nod1RValues.Point.X();
|
||||
std::cout << std::setw(20)<< Nod1RValues.Point.Y();
|
||||
std::cout << std::setw(20)<< Nod1RValues.Point.Z();
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
for (i = 1; i <= myNbPISeg; i++) {
|
||||
HLRAlgo_PolyInternalSegment* aSegIndices = &PISeg->ChangeValue(i);
|
||||
cout << "Segment " << setw(6) << i << " : ";
|
||||
cout << setw(6) << aSegIndices->LstSg1;
|
||||
cout << setw(6) << aSegIndices->LstSg2;
|
||||
cout << setw(6) << aSegIndices->NxtSg1;
|
||||
cout << setw(6) << aSegIndices->NxtSg2;
|
||||
cout << setw(6) << aSegIndices->Conex1;
|
||||
cout << setw(6) << aSegIndices->Conex2;
|
||||
cout << endl;
|
||||
std::cout << "Segment " << std::setw(6) << i << " : ";
|
||||
std::cout << std::setw(6) << aSegIndices->LstSg1;
|
||||
std::cout << std::setw(6) << aSegIndices->LstSg2;
|
||||
std::cout << std::setw(6) << aSegIndices->NxtSg1;
|
||||
std::cout << std::setw(6) << aSegIndices->NxtSg2;
|
||||
std::cout << std::setw(6) << aSegIndices->Conex1;
|
||||
std::cout << std::setw(6) << aSegIndices->Conex2;
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
for (i = 1; i <= myNbTData; i++) {
|
||||
HLRAlgo_TriangleData& aTriangle = TData->ChangeValue(i);
|
||||
cout << "Triangle " << setw(6) << i << " : ";
|
||||
cout << setw(6) << aTriangle.Node1;
|
||||
cout << setw(6) << aTriangle.Node2;
|
||||
cout << setw(6) << aTriangle.Node3;
|
||||
cout << endl;
|
||||
std::cout << "Triangle " << std::setw(6) << i << " : ";
|
||||
std::cout << std::setw(6) << aTriangle.Node1;
|
||||
std::cout << std::setw(6) << aTriangle.Node2;
|
||||
std::cout << std::setw(6) << aTriangle.Node3;
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -681,7 +681,7 @@ void HLRAlgo_PolyInternalData::IncTData(
|
||||
if (myNbTData >= myMxTData) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if (HLRAlgo_PolyInternalData_TRACE)
|
||||
cout << "HLRAlgo_PolyInternalData::IncTData : " << myMxTData << endl;
|
||||
std::cout << "HLRAlgo_PolyInternalData::IncTData : " << myMxTData << std::endl;
|
||||
#endif
|
||||
Standard_Integer i,j,k;
|
||||
j = myMxTData;
|
||||
@@ -720,7 +720,7 @@ void HLRAlgo_PolyInternalData::IncPISeg(
|
||||
if (myNbPISeg >= myMxPISeg) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if (HLRAlgo_PolyInternalData_TRACE)
|
||||
cout << "HLRAlgo_PolyInternalData::IncPISeg : " << myMxPISeg << endl;
|
||||
std::cout << "HLRAlgo_PolyInternalData::IncPISeg : " << myMxPISeg << std::endl;
|
||||
#endif
|
||||
Standard_Integer i,j,k;
|
||||
j = myMxPISeg;
|
||||
@@ -758,7 +758,7 @@ void HLRAlgo_PolyInternalData::IncPINod(
|
||||
if (myNbPINod >= myMxPINod) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if (HLRAlgo_PolyInternalData_TRACE)
|
||||
cout << "HLRAlgo_PolyInternalData::IncPINod : " << myMxPINod << endl;
|
||||
std::cout << "HLRAlgo_PolyInternalData::IncPINod : " << myMxPINod << std::endl;
|
||||
#endif
|
||||
Standard_Integer i,j,k;
|
||||
j = myMxPINod;
|
||||
|
@@ -86,7 +86,6 @@ HLRBRep_ShapeToHLR.cxx
|
||||
HLRBRep_ShapeToHLR.hxx
|
||||
HLRBRep_SLProps.hxx
|
||||
HLRBRep_SLProps_0.cxx
|
||||
HLRBRep_SLPropsATool.cxx
|
||||
HLRBRep_SLPropsATool.hxx
|
||||
HLRBRep_SLPropsATool.lxx
|
||||
HLRBRep_Surface.cxx
|
||||
|
@@ -283,7 +283,7 @@ inline Handle(Geom2d_BezierCurve)
|
||||
HLRBRep_CurveTool::Bezier (const Standard_Address /*C*/)
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<" HLRBRep_CurveTool::Bezier : Not Implemented "<<endl;
|
||||
std::cout<<" HLRBRep_CurveTool::Bezier : Not Implemented "<<std::endl;
|
||||
#endif
|
||||
//-- return(((HLRBRep_Curve *)C)->Bezier());
|
||||
return(0);
|
||||
@@ -298,7 +298,7 @@ inline Handle(Geom2d_BSplineCurve)
|
||||
HLRBRep_CurveTool::BSpline (const Standard_Address /*C*/)
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<" HLRBRep_CurveTool::BSpline : Not Implemented "<<endl;
|
||||
std::cout<<" HLRBRep_CurveTool::BSpline : Not Implemented "<<std::endl;
|
||||
#endif
|
||||
//-- return(((HLRBRep_Curve *)C)->BSpline());
|
||||
return(0);
|
||||
|
@@ -105,7 +105,7 @@ public:
|
||||
//-- ============================================================
|
||||
void SetDim(const Standard_Integer n) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"\n@#@#@#@#@# SetDim "<<n<<endl;
|
||||
std::cout<<"\n@#@#@#@#@# SetDim "<<n<<std::endl;
|
||||
#endif
|
||||
if(UV)
|
||||
Destroy();
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
}
|
||||
//-- ============================================================
|
||||
~TableauRejection() {
|
||||
//-- cout<<"\n Destructeur TableauRejection"<<endl;
|
||||
//-- std::cout<<"\n Destructeur TableauRejection"<<std::endl;
|
||||
Destroy();
|
||||
}
|
||||
//-- ============================================================
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else
|
||||
cout<<" IndUV ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
|
||||
std::cout<<" IndUV ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<std::endl;
|
||||
#endif
|
||||
}
|
||||
for(i=0;i<N;i++) {
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
UV[i]=NULL;
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else { cout<<" UV ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl; }
|
||||
else { std::cout<<" UV ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<std::endl; }
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
//-- declaration de la Nv ligne de taille : ancienne taille + SIZEUV
|
||||
//--
|
||||
|
||||
//-- cout<<" \n alloc nbUV["<<i0<<"]="<<nbUV[i0];
|
||||
//-- std::cout<<" \n alloc nbUV["<<i0<<"]="<<nbUV[i0];
|
||||
|
||||
Standard_Real *NvLigneUV = (Standard_Real *) malloc((nbUV[i0]+SIZEUV)*sizeof(Standard_Real));
|
||||
Standard_Integer *NvLigneInd = (Standard_Integer *)malloc((nbUV[i0]+SIZEUV)*sizeof(Standard_Integer));
|
||||
@@ -280,7 +280,7 @@ public:
|
||||
}
|
||||
//-- ============================================================
|
||||
void ResetTabBit(const Standard_Integer nbedgs) {
|
||||
//-- cout<<"\n ResetTabBit"<<endl;
|
||||
//-- std::cout<<"\n ResetTabBit"<<std::endl;
|
||||
if(TabBit) {
|
||||
for(Standard_Integer i=0;i<nbedgs;i++) {
|
||||
if(TabBit[i]) {
|
||||
@@ -295,7 +295,7 @@ public:
|
||||
}
|
||||
//-- ============================================================
|
||||
void InitTabBit(const Standard_Integer nbedgs) {
|
||||
//-- cout<<"\n InitTabBit"<<endl;
|
||||
//-- std::cout<<"\n InitTabBit"<<std::endl;
|
||||
if(TabBit && nTabBit) {
|
||||
ResetTabBit(nTabBit);
|
||||
}
|
||||
@@ -312,7 +312,7 @@ public:
|
||||
}
|
||||
//-- ============================================================
|
||||
void SetNoIntersection(Standard_Integer i0,Standard_Integer i1) {
|
||||
// cout<<" SetNoIntersection : "<<i0<<" "<<i1<<endl;
|
||||
// std::cout<<" SetNoIntersection : "<<i0<<" "<<i1<<std::endl;
|
||||
i0--;
|
||||
i1--;
|
||||
if(i0>i1) {
|
||||
@@ -324,7 +324,7 @@ public:
|
||||
}
|
||||
//-- ============================================================
|
||||
Standard_Boolean NoIntersection(Standard_Integer i0,Standard_Integer i1) {
|
||||
// cout<<" ??NoIntersection : "<<i0<<" "<<i1<<" ";
|
||||
// std::cout<<" ??NoIntersection : "<<i0<<" "<<i1<<" ";
|
||||
i0--;
|
||||
i1--;
|
||||
if(i0>i1) {
|
||||
@@ -333,10 +333,10 @@ public:
|
||||
Standard_Integer c=i1>>5;
|
||||
Standard_Integer o=i1 & 31;
|
||||
if(TabBit[i0][c] & Mask32[o]) {
|
||||
//-- cout<<" TRUE "<<endl;
|
||||
//-- std::cout<<" TRUE "<<std::endl;
|
||||
return(Standard_True);
|
||||
}
|
||||
//-- cout<<" FALSE "<<endl;
|
||||
//-- std::cout<<" FALSE "<<std::endl;
|
||||
return(Standard_False);
|
||||
}
|
||||
//-- ============================================================
|
||||
@@ -418,7 +418,7 @@ HLRBRep_Data::HLRBRep_Data (const Standard_Integer NV,
|
||||
}
|
||||
|
||||
void HLRBRep_Data::Destroy() {
|
||||
//-- cout<<"\n HLRBRep_Data::~HLRBRep_Data()"<<endl;
|
||||
//-- std::cout<<"\n HLRBRep_Data::~HLRBRep_Data()"<<std::endl;
|
||||
((TableauRejection *)myReject)->Destroy();
|
||||
delete ((TableauRejection *)myReject);
|
||||
}
|
||||
@@ -1190,7 +1190,7 @@ void HLRBRep_Data::NextInterference ()
|
||||
GetSingleIntersection(myLE,myFE,su,sv);
|
||||
if(su!=RealLast()) {
|
||||
myIntersector.SimulateOnePoint(myLEData,su,myFEData,sv);
|
||||
//-- cout<<"p";
|
||||
//-- std::cout<<"p";
|
||||
}
|
||||
else {
|
||||
myIntersector.Perform
|
||||
@@ -1224,13 +1224,13 @@ void HLRBRep_Data::NextInterference ()
|
||||
else {
|
||||
myNbPoints = myNbSegments = 0;
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "HLRBRep_Data::NextInterference : ";
|
||||
std::cout << "HLRBRep_Data::NextInterference : ";
|
||||
if (myLE == myFE)
|
||||
cout << "Edge " << myLE
|
||||
<< " : Intersection not done" << endl;
|
||||
std::cout << "Edge " << myLE
|
||||
<< " : Intersection not done" << std::endl;
|
||||
else
|
||||
cout << "Edges " << myLE << " , " << myFE
|
||||
<< " : Intersection not done" << endl;
|
||||
std::cout << "Edges " << myLE << " , " << myFE
|
||||
<< " : Intersection not done" << std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1246,7 +1246,7 @@ void HLRBRep_Data::NextInterference ()
|
||||
}
|
||||
}
|
||||
else {
|
||||
//-- cout<<"+";
|
||||
//-- std::cout<<"+";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1391,7 +1391,7 @@ void HLRBRep_Data::EdgeState (const Standard_Real p1,
|
||||
stbef = TopAbs_OUT;
|
||||
staft = TopAbs_OUT;
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "HLRBRep_Data::EdgeState : undefined" << endl;
|
||||
std::cout << "HLRBRep_Data::EdgeState : undefined" << std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1399,7 +1399,7 @@ void HLRBRep_Data::EdgeState (const Standard_Real p1,
|
||||
stbef = TopAbs_OUT;
|
||||
staft = TopAbs_OUT;
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "HLRBRep_Data::EdgeState : undefined" << endl;
|
||||
std::cout << "HLRBRep_Data::EdgeState : undefined" << std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1464,8 +1464,8 @@ HLRBRep_Data::HidingStartLevel (const Standard_Integer E,
|
||||
Loop = Standard_False;
|
||||
else {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "HLRBRep_Data::HidingStartLevel : ";
|
||||
cout << "Bad Parameter." << endl;
|
||||
std::cout << "HLRBRep_Data::HidingStartLevel : ";
|
||||
std::cout << "Bad Parameter." << std::endl;
|
||||
#endif
|
||||
}
|
||||
It.Next();
|
||||
@@ -1548,9 +1548,9 @@ Standard_Boolean HLRBRep_Data::OrientOutLine (const Standard_Integer I, HLRBRep_
|
||||
gp_Vec Nm = mySLProps.Normal();
|
||||
if (curv == 0) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "HLRBRep_Data::OrientOutLine " << I;
|
||||
cout << " Edge " << myFE << " : ";
|
||||
cout << "CurvatureValue == 0." << endl;
|
||||
std::cout << "HLRBRep_Data::OrientOutLine " << I;
|
||||
std::cout << " Edge " << myFE << " : ";
|
||||
std::cout << "CurvatureValue == 0." << std::endl;
|
||||
#endif
|
||||
}
|
||||
if (curv > 0)
|
||||
@@ -1561,9 +1561,9 @@ Standard_Boolean HLRBRep_Data::OrientOutLine (const Standard_Integer I, HLRBRep_
|
||||
Nm.Cross(Tg);
|
||||
if (Tg.Magnitude() < gp::Resolution()) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "HLRBRep_Data::OrientOutLine " << I;
|
||||
cout << " Edge " << myFE << " : ";
|
||||
cout << "Tg.Magnitude() == 0." << endl;
|
||||
std::cout << "HLRBRep_Data::OrientOutLine " << I;
|
||||
std::cout << " Edge " << myFE << " : ";
|
||||
std::cout << "Tg.Magnitude() == 0." << std::endl;
|
||||
#endif
|
||||
}
|
||||
if (myProj.Perspective())
|
||||
@@ -1583,9 +1583,9 @@ Standard_Boolean HLRBRep_Data::OrientOutLine (const Standard_Integer I, HLRBRep_
|
||||
}
|
||||
else {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "HLRBRep_Data::OrientOutLine " << I;
|
||||
cout << " Edge " << myFE << " : ";
|
||||
cout << "UVPoint not found, OutLine not Oriented" << endl;
|
||||
std::cout << "HLRBRep_Data::OrientOutLine " << I;
|
||||
std::cout << " Edge " << myFE << " : ";
|
||||
std::cout << "UVPoint not found, OutLine not Oriented" << std::endl;
|
||||
#endif
|
||||
}
|
||||
ed1.Used(Standard_True);
|
||||
@@ -1644,9 +1644,9 @@ void HLRBRep_Data::OrientOthEdge (const Standard_Integer I,
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
cout << "HLRBRep_Data::OrientOthEdge " << I;
|
||||
cout << " Edge " << myFE << " : ";
|
||||
cout << "UVPoint not found, Edge not Oriented" << endl;
|
||||
std::cout << "HLRBRep_Data::OrientOthEdge " << I;
|
||||
std::cout << " Edge " << myFE << " : ";
|
||||
std::cout << "UVPoint not found, Edge not Oriented" << std::endl;
|
||||
}
|
||||
#else
|
||||
(void)I; // avoid compiler warning
|
||||
@@ -1863,7 +1863,7 @@ HLRBRep_Data::Classify (const Standard_Integer E,
|
||||
q2 = (q& 0x0000FFFF);
|
||||
printf("\nmot: %3d q1 = %+10d q2=%+10d Mask : %d",qwe+8,(q1>32768)? (32768-q1) : q1,(q2>32768)? (32768-q2) : q2,q&0x80008000);
|
||||
}
|
||||
cout<<endl;
|
||||
std::cout<<std::endl;
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
@@ -235,7 +235,7 @@ void HLRBRep_Hider::Hide(const Standard_Integer FI,
|
||||
ILOn.Remove(It); break;
|
||||
case TopAbs_UNKNOWN :
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "UNKNOWN state staft" << endl;
|
||||
std::cout << "UNKNOWN state staft" << std::endl;
|
||||
#endif
|
||||
case TopAbs_ON :
|
||||
It.Next(); break;
|
||||
@@ -249,7 +249,7 @@ void HLRBRep_Hider::Hide(const Standard_Integer FI,
|
||||
ILOn.Remove(It); break;
|
||||
case TopAbs_UNKNOWN :
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "UNKNOWN state stbef" << endl;
|
||||
std::cout << "UNKNOWN state stbef" << std::endl;
|
||||
#endif
|
||||
case TopAbs_ON :
|
||||
It.Next(); break;
|
||||
@@ -279,7 +279,7 @@ void HLRBRep_Hider::Hide(const Standard_Integer FI,
|
||||
ILOn.Remove(It); break;
|
||||
case TopAbs_UNKNOWN :
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "UNKNOWN state after" << endl;
|
||||
std::cout << "UNKNOWN state after" << std::endl;
|
||||
#endif
|
||||
It.Next(); break;
|
||||
} break;
|
||||
@@ -299,7 +299,7 @@ void HLRBRep_Hider::Hide(const Standard_Integer FI,
|
||||
Int.Transition(TopAbs_REVERSED); break;
|
||||
case TopAbs_UNKNOWN :
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "UNKNOWN state after" << endl;
|
||||
std::cout << "UNKNOWN state after" << std::endl;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@@ -317,13 +317,13 @@ void HLRBRep_Hider::Hide(const Standard_Integer FI,
|
||||
ILOn.Remove(It); break;
|
||||
case TopAbs_UNKNOWN :
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "UNKNOWN state after" << endl;
|
||||
std::cout << "UNKNOWN state after" << std::endl;
|
||||
#endif
|
||||
It.Next(); break;
|
||||
} break;
|
||||
case TopAbs_UNKNOWN :
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "UNKNOWN state stbef" << endl;
|
||||
std::cout << "UNKNOWN state stbef" << std::endl;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@@ -370,14 +370,14 @@ void HLRBRep_Hider::Hide(const Standard_Integer FI,
|
||||
{
|
||||
ToRemove.Append(Int.Intersection().Parameter());
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Two adjacent interferences with transition FORWARD"<<endl;
|
||||
std::cout<<"Two adjacent interferences with transition FORWARD"<<std::endl;
|
||||
#endif
|
||||
}
|
||||
else if (aTrans == TopAbs_REVERSED)
|
||||
{
|
||||
ToRemove.Append(PrevParam);
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"Two adjacent interferences with transition REVERSED"<<endl;
|
||||
std::cout<<"Two adjacent interferences with transition REVERSED"<<std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -698,9 +698,9 @@ void HLRBRep_Hider::Hide(const Standard_Integer FI,
|
||||
|
||||
catch(Standard_Failure const& anException) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "An exception was catched when hiding edge " << E;
|
||||
cout << " by the face " << FI << endl;
|
||||
cout << anException << endl;
|
||||
std::cout << "An exception was catched when hiding edge " << E;
|
||||
std::cout << " by the face " << FI << std::endl;
|
||||
std::cout << anException << std::endl;
|
||||
#endif
|
||||
(void)anException;
|
||||
}
|
||||
|
@@ -114,9 +114,9 @@ void HLRBRep_InternalAlgo::Update ()
|
||||
catch(Standard_Failure const& anException) {
|
||||
if (myDebug)
|
||||
{
|
||||
cout << "An exception was catched when preparing the Shape " << i;
|
||||
cout << " and computing its OutLines " << endl;
|
||||
cout << anException << endl;
|
||||
std::cout << "An exception was catched when preparing the Shape " << i;
|
||||
std::cout << " and computing its OutLines " << std::endl;
|
||||
std::cout << anException << std::endl;
|
||||
}
|
||||
DS[i-1] = new HLRBRep_Data(0,0,0);
|
||||
dv = 0;
|
||||
@@ -165,7 +165,7 @@ void HLRBRep_InternalAlgo::Update ()
|
||||
SB.Bounds(v1,v2,e1,e2,f1,f2);
|
||||
|
||||
for (Standard_Integer e = e1; e <= e2; e++) {
|
||||
HLRBRep_EdgeData ed = aEDataArray.ChangeValue(e);
|
||||
HLRBRep_EdgeData& ed = aEDataArray.ChangeValue(e);
|
||||
HLRAlgo::DecodeMinMax(ed.MinMax(), TheMin, TheMax);
|
||||
if (FirstTime) {
|
||||
FirstTime = Standard_False;
|
||||
@@ -307,7 +307,7 @@ void HLRBRep_InternalAlgo::InitEdgeStatus ()
|
||||
Standard_Integer nf = myDS->NbFaces();
|
||||
|
||||
for (Standard_Integer e = 1; e <= ne; e++) {
|
||||
HLRBRep_EdgeData ed = aEDataArray.ChangeValue(e);
|
||||
HLRBRep_EdgeData& ed = aEDataArray.ChangeValue(e);
|
||||
if (ed.Selected()) ed.Status().ShowAll();
|
||||
}
|
||||
// for (Standard_Integer f = 1; f <= nf; f++) {
|
||||
@@ -368,7 +368,7 @@ void HLRBRep_InternalAlgo::Select ()
|
||||
Standard_Integer nf = myDS->NbFaces();
|
||||
|
||||
for (Standard_Integer e = 1; e <= ne; e++) {
|
||||
HLRBRep_EdgeData ed = aEDataArray.ChangeValue(e);
|
||||
HLRBRep_EdgeData& ed = aEDataArray.ChangeValue(e);
|
||||
ed.Selected(Standard_True);
|
||||
}
|
||||
|
||||
@@ -556,7 +556,7 @@ void HLRBRep_InternalAlgo::PartialHide ()
|
||||
Standard_Integer i,n = myShapes.Length();
|
||||
|
||||
if (myDebug)
|
||||
cout << " Partial hiding" << endl << endl;
|
||||
std::cout << " Partial hiding" << std::endl << std::endl;
|
||||
|
||||
for (i = 1; i <= n; i++)
|
||||
Hide(i);
|
||||
@@ -576,7 +576,7 @@ void HLRBRep_InternalAlgo::Hide ()
|
||||
Standard_Integer i,j,n = myShapes.Length();
|
||||
|
||||
if (myDebug)
|
||||
cout << " Total hiding" << endl;
|
||||
std::cout << " Total hiding" << std::endl;
|
||||
|
||||
for (i = 1; i <= n; i++)
|
||||
Hide(i);
|
||||
@@ -602,7 +602,7 @@ void HLRBRep_InternalAlgo::Hide (const Standard_Integer I)
|
||||
"HLRBRep_InternalAlgo::Hide : unknown Shape");
|
||||
|
||||
if (myDebug)
|
||||
cout << " hiding the shape " << I << " by itself" << endl;
|
||||
std::cout << " hiding the shape " << I << " by itself" << std::endl;
|
||||
|
||||
Select(I);
|
||||
InitEdgeStatus();
|
||||
@@ -643,8 +643,8 @@ void HLRBRep_InternalAlgo::Hide (const Standard_Integer I,
|
||||
((MinMaxShBJ->Max[6] - MinMaxShBI->Min[6]) & 0x80008000) == 0 &&
|
||||
((MinMaxShBJ->Max[7] - MinMaxShBI->Min[7]) & 0x80008000) == 0) {
|
||||
if (myDebug) {
|
||||
cout << " hiding the shape " << I;
|
||||
cout << " by the shape : " << J << endl;
|
||||
std::cout << " hiding the shape " << I;
|
||||
std::cout << " by the shape : " << J << std::endl;
|
||||
}
|
||||
SelectEdge(I);
|
||||
SelectFace(J);
|
||||
@@ -717,17 +717,17 @@ void HLRBRep_InternalAlgo::HideSelected (const Standard_Integer I,
|
||||
|
||||
if (myDebug)
|
||||
{
|
||||
cout << endl;
|
||||
cout << "Vertices : " << setw(5) << myDS->NbVertices() << endl;
|
||||
cout << "Edges : " << setw(5) << myDS->NbEdges() << " , ";
|
||||
cout << "Selected : " << setw(5) << nbSelEdges << " , ";
|
||||
cout << "Visibles : " << setw(5) << nbVisEdges << endl;
|
||||
cout << "Faces : " << setw(5) << myDS->NbFaces() << " , ";
|
||||
cout << "Selected : " << setw(5) << nbSelFaces << " , ";
|
||||
cout << "Simple : " << setw(5) << nbFSimp << endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << "Vertices : " << std::setw(5) << myDS->NbVertices() << std::endl;
|
||||
std::cout << "Edges : " << std::setw(5) << myDS->NbEdges() << " , ";
|
||||
std::cout << "Selected : " << std::setw(5) << nbSelEdges << " , ";
|
||||
std::cout << "Visibles : " << std::setw(5) << nbVisEdges << std::endl;
|
||||
std::cout << "Faces : " << std::setw(5) << myDS->NbFaces() << " , ";
|
||||
std::cout << "Selected : " << std::setw(5) << nbSelFaces << " , ";
|
||||
std::cout << "Simple : " << std::setw(5) << nbFSimp << std::endl;
|
||||
if (SideFace)
|
||||
cout << "Side : " << setw(5) << nbFSide << " , ";
|
||||
cout << "Cachantes : " << setw(5) << nbCache << endl << endl;
|
||||
std::cout << "Side : " << std::setw(5) << nbFSide << " , ";
|
||||
std::cout << "Cachantes : " << std::setw(5) << nbCache << std::endl << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -748,13 +748,13 @@ void HLRBRep_InternalAlgo::HideSelected (const Standard_Integer I,
|
||||
if(++QWE>QWEQWE) {
|
||||
QWE=0;
|
||||
if (myDebug)
|
||||
cout<<"*";
|
||||
std::cout<<"*";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (myDebug && HLRBRep_InternalAlgo_TRACE) {
|
||||
j++;
|
||||
cout << " OwnHiding " << j << " of face : " << f << endl;
|
||||
std::cout << " OwnHiding " << j << " of face : " << f << std::endl;
|
||||
}
|
||||
}
|
||||
Cache.OwnHiding(f);
|
||||
@@ -867,7 +867,7 @@ void HLRBRep_InternalAlgo::HideSelected (const Standard_Integer I,
|
||||
if(HLRBRep_InternalAlgo_TRACE10 && HLRBRep_InternalAlgo_TRACE==Standard_False) {
|
||||
if(++QWE>QWEQWE) {
|
||||
if (myDebug)
|
||||
cout<<".";
|
||||
std::cout<<".";
|
||||
QWE=0;
|
||||
}
|
||||
}
|
||||
@@ -892,22 +892,22 @@ void HLRBRep_InternalAlgo::HideSelected (const Standard_Integer I,
|
||||
nbFSimp++;
|
||||
}
|
||||
|
||||
cout << "\n";
|
||||
cout << "Simple Faces : ";
|
||||
cout << nbFSimp << "\n";
|
||||
cout << "Intersections calculees : ";
|
||||
cout << nbCal2Intersection << "\n";
|
||||
cout << "Intersections Ok : ";
|
||||
cout << nbOkIntersection << "\n";
|
||||
cout << "Points : ";
|
||||
cout << nbPtIntersection << "\n";
|
||||
cout << "Segments : ";
|
||||
cout << nbSegIntersection << "\n";
|
||||
cout << "Classification : ";
|
||||
cout << nbClassification << "\n";
|
||||
cout << "Intersections curve-surface : ";
|
||||
cout << nbCal3Intersection << "\n";
|
||||
cout << endl << endl;
|
||||
std::cout << "\n";
|
||||
std::cout << "Simple Faces : ";
|
||||
std::cout << nbFSimp << "\n";
|
||||
std::cout << "Intersections calculees : ";
|
||||
std::cout << nbCal2Intersection << "\n";
|
||||
std::cout << "Intersections Ok : ";
|
||||
std::cout << nbOkIntersection << "\n";
|
||||
std::cout << "Points : ";
|
||||
std::cout << nbPtIntersection << "\n";
|
||||
std::cout << "Segments : ";
|
||||
std::cout << nbSegIntersection << "\n";
|
||||
std::cout << "Classification : ";
|
||||
std::cout << nbClassification << "\n";
|
||||
std::cout << "Intersections curve-surface : ";
|
||||
std::cout << nbCal3Intersection << "\n";
|
||||
std::cout << std::endl << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@@ -159,7 +159,7 @@ public:
|
||||
|
||||
static Standard_Integer NbSamples (const gp_Lin& C, const Standard_Real U0, const Standard_Real U1);
|
||||
|
||||
Standard_EXPORT static void SamplePars (const gp_Lin& C, const Standard_Real U0, const Standard_Real U1, const Standard_Real Defl, const Standard_Integer NbMin, Handle(TColStd_HArray1OfReal)& Pars);
|
||||
static void SamplePars (const gp_Lin& C, const Standard_Real U0, const Standard_Real U1, const Standard_Real Defl, const Standard_Integer NbMin, Handle(TColStd_HArray1OfReal)& Pars);
|
||||
|
||||
|
||||
|
||||
|
@@ -438,13 +438,20 @@ void HLRBRep_PolyAlgo::StoreShell (const TopoDS_Shape& Shape,
|
||||
PD (f) = new HLRAlgo_PolyData();
|
||||
psd->PolyData().ChangeValue(iFace) = PD(f);
|
||||
PID(f) = new HLRAlgo_PolyInternalData(nbN,nbT);
|
||||
Handle(HLRAlgo_PolyInternalData)& pid =
|
||||
*(Handle(HLRAlgo_PolyInternalData)*)&(PID(f));
|
||||
Handle(Geom_Surface) S = BRep_Tool::Surface(F);
|
||||
if (S->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface))
|
||||
S = Handle(Geom_RectangularTrimmedSurface)::DownCast(S)->BasisSurface();
|
||||
GeomAdaptor_Surface AS(S);
|
||||
pid->Planar(AS.GetType() == GeomAbs_Plane);
|
||||
Handle(HLRAlgo_PolyInternalData)& pid = *(Handle(HLRAlgo_PolyInternalData)*)&(PID(f));
|
||||
if (Handle(Geom_Surface) S = BRep_Tool::Surface(F))
|
||||
{
|
||||
if (Handle(Geom_RectangularTrimmedSurface) aRectTrimSurf = Handle(Geom_RectangularTrimmedSurface)::DownCast(S))
|
||||
{
|
||||
S = aRectTrimSurf->BasisSurface();
|
||||
}
|
||||
GeomAdaptor_Surface AS(S);
|
||||
pid->Planar(AS.GetType() == GeomAbs_Plane);
|
||||
}
|
||||
else
|
||||
{
|
||||
pid->Planar (false);
|
||||
}
|
||||
HLRAlgo_Array1OfTData* TData = &pid->TData();
|
||||
HLRAlgo_Array1OfPISeg* PISeg = &pid->PISeg();
|
||||
HLRAlgo_Array1OfPINod* PINod = &pid->PINod();
|
||||
@@ -501,8 +508,8 @@ void HLRBRep_PolyAlgo::StoreShell (const TopoDS_Shape& Shape,
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (DoError) {
|
||||
cout << " HLRBRep_PolyAlgo::StoreShell : Face ";
|
||||
cout << f << " non triangulated" << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::StoreShell : Face ";
|
||||
std::cout << f << " non triangulated" << std::endl;
|
||||
}
|
||||
#endif
|
||||
NT = &(((HLRAlgo_Array1OfTData*)TData)->ChangeValue(1));
|
||||
@@ -527,8 +534,8 @@ void HLRBRep_PolyAlgo::StoreShell (const TopoDS_Shape& Shape,
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (DoError) {
|
||||
cout << "HLRBRep_PolyAlgo::StoreShell : Face ";
|
||||
cout << f << " deja stockee" << endl;
|
||||
std::cout << "HLRBRep_PolyAlgo::StoreShell : Face ";
|
||||
std::cout << f << " deja stockee" << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -656,8 +663,8 @@ Normal (const Standard_Integer iNode,
|
||||
Nod1RValues.Normal = gp_XYZ(1., 0., 0.);
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoError) {
|
||||
cout << "HLRBRep_PolyAlgo::Normal : AverageNormal error";
|
||||
cout << endl;
|
||||
std::cout << "HLRBRep_PolyAlgo::Normal : AverageNormal error";
|
||||
std::cout << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -733,8 +740,8 @@ HLRBRep_PolyAlgo::AverageNormal(const Standard_Integer iNode,
|
||||
OK = Standard_False;
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoError) {
|
||||
cout << "HLRAlgo_PolyInternalData:: inverted normals on ";
|
||||
cout << "node " << iNode << endl;
|
||||
std::cout << "HLRAlgo_PolyInternalData:: inverted normals on ";
|
||||
std::cout << "node " << iNode << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -875,8 +882,8 @@ InitBiPointsWithConnexity (const Standard_Integer e,
|
||||
else if (aNode12Indices->Edg2 == e) U2 = Nod12RValues->PCu2;
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
|
||||
cout << "Parameter error on Node " << i1p2 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
|
||||
std::cout << "Parameter error on Node " << i1p2 << std::endl;
|
||||
}
|
||||
#endif
|
||||
aNode12Indices->Flag |= NMsk_Edge;
|
||||
@@ -906,10 +913,10 @@ InitBiPointsWithConnexity (const Standard_Integer e,
|
||||
if (Nod11RValues->Normal.X()*Nod12RValues->Normal.X() +
|
||||
Nod11RValues->Normal.Y()*Nod12RValues->Normal.Y() +
|
||||
Nod11RValues->Normal.Z()*Nod12RValues->Normal.Z() < 0) {
|
||||
cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
|
||||
cout << "Too big angle between " << i1p1 << setw(6);
|
||||
cout << " and " << i1p2 << setw(6);
|
||||
cout << " in face " << i1 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
|
||||
std::cout << "Too big angle between " << i1p1 << std::setw(6);
|
||||
std::cout << " and " << i1p2 << std::setw(6);
|
||||
std::cout << " in face " << i1 << std::endl;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -927,8 +934,8 @@ InitBiPointsWithConnexity (const Standard_Integer e,
|
||||
else if (aNode12Indices->Edg2 == e) U2 = Nod12RValues->PCu2;
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
|
||||
cout << "Parameter error on Node " << i1p2 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
|
||||
std::cout << "Parameter error on Node " << i1p2 << std::endl;
|
||||
}
|
||||
#endif
|
||||
aNode12Indices->Flag |= NMsk_Edge;
|
||||
@@ -945,8 +952,8 @@ InitBiPointsWithConnexity (const Standard_Integer e,
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (DoError) {
|
||||
cout << "HLRBRep_PolyAlgo::InitBiPointsWithConnexity : Edge ";
|
||||
cout << e << " connex 1 sans PolygonOnTriangulation" << endl;
|
||||
std::cout << "HLRBRep_PolyAlgo::InitBiPointsWithConnexity : Edge ";
|
||||
std::cout << e << " connex 1 sans PolygonOnTriangulation" << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1041,8 +1048,8 @@ InitBiPointsWithConnexity (const Standard_Integer e,
|
||||
else if (aNode12Indices->Edg2 == e) U2 = Nod12RValues->PCu2;
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
|
||||
cout << "Parameter error on Node " << i1p2 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
|
||||
std::cout << "Parameter error on Node " << i1p2 << std::endl;
|
||||
}
|
||||
#endif
|
||||
aNode12Indices->Flag |= NMsk_Edge;
|
||||
@@ -1085,18 +1092,18 @@ InitBiPointsWithConnexity (const Standard_Integer e,
|
||||
if (Nod11RValues->Normal.X()*Nod12RValues->Normal.X() +
|
||||
Nod11RValues->Normal.Y()*Nod12RValues->Normal.Y() +
|
||||
Nod11RValues->Normal.Z()*Nod12RValues->Normal.Z() < 0) {
|
||||
cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
|
||||
cout << "To big angle between " << i1p1 << setw(6);
|
||||
cout << " and " << i1p2 << setw(6);
|
||||
cout << " in face " << i1 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
|
||||
std::cout << "To big angle between " << i1p1 << std::setw(6);
|
||||
std::cout << " and " << i1p2 << std::setw(6);
|
||||
std::cout << " in face " << i1 << std::endl;
|
||||
}
|
||||
if (Nod21RValues->Normal.X()*Nod22RValues->Normal.X() +
|
||||
Nod21RValues->Normal.Y()*Nod22RValues->Normal.Y() +
|
||||
Nod21RValues->Normal.Z()*Nod22RValues->Normal.Z() < 0) {
|
||||
cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
|
||||
cout << "To big angle between " << i2p1 << setw(6);
|
||||
cout << " and " << i2p2 << setw(6);
|
||||
cout<< " in face " << i2 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
|
||||
std::cout << "To big angle between " << i2p1 << std::setw(6);
|
||||
std::cout << " and " << i2p2 << std::setw(6);
|
||||
std::cout<< " in face " << i2 << std::endl;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1114,8 +1121,8 @@ InitBiPointsWithConnexity (const Standard_Integer e,
|
||||
else if (aNode12Indices->Edg2 == e) U2 = Nod12RValues->PCu2;
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
|
||||
cout << "Parameter error on Node " << i1p2 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
|
||||
std::cout << "Parameter error on Node " << i1p2 << std::endl;
|
||||
}
|
||||
#endif
|
||||
aNode12Indices->Flag |= NMsk_Edge;
|
||||
@@ -1136,8 +1143,8 @@ InitBiPointsWithConnexity (const Standard_Integer e,
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (DoError) {
|
||||
cout << "HLRBRep_PolyAlgo::InitBiPointsWithConnexity : Edge ";
|
||||
cout << e << " connect 2 without PolygonOnTriangulation" << endl;
|
||||
std::cout << "HLRBRep_PolyAlgo::InitBiPointsWithConnexity : Edge ";
|
||||
std::cout << e << " connect 2 without PolygonOnTriangulation" << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1198,8 +1205,8 @@ InitBiPointsWithConnexity (const Standard_Integer e,
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (DoError) {
|
||||
cout << "HLRBRep_PolyAlgo::InitBiPointsWithConnexity : Edge ";
|
||||
cout << e << " Isolated, without Polygone 3D" << endl;
|
||||
std::cout << "HLRBRep_PolyAlgo::InitBiPointsWithConnexity : Edge ";
|
||||
std::cout << e << " Isolated, without Polygone 3D" << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1489,8 +1496,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
|
||||
else if (Nod11Indices.Edg2 == e) Nod11RValues.PCu2 = U3;
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
cout << "Parameter error on Node " << i1p1 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
std::cout << "Parameter error on Node " << i1p1 << std::endl;
|
||||
}
|
||||
#endif
|
||||
Nod11RValues.Scal = 0;
|
||||
@@ -1521,8 +1528,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
|
||||
else if (Nod12Indices.Edg2 == e) Nod12RValues.PCu2 = U3;
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
cout << "Parameter error on Node " << i1p2 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
std::cout << "Parameter error on Node " << i1p2 << std::endl;
|
||||
}
|
||||
#endif
|
||||
Nod12RValues.Scal = 0;
|
||||
@@ -1644,8 +1651,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
|
||||
else if (Nod11Indices.Edg2 == e) Nod11RValues.PCu2 = U3;
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
cout << "Parameter error on Node " << i1p1 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
std::cout << "Parameter error on Node " << i1p1 << std::endl;
|
||||
}
|
||||
#endif
|
||||
Nod11RValues.Scal = 0;
|
||||
@@ -1656,8 +1663,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
|
||||
else if (Nod21Indices.Edg2 == e) Nod21RValues.PCu2 = U3;
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
cout << "Parameter error on Node " << i2p1 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
std::cout << "Parameter error on Node " << i2p1 << std::endl;
|
||||
}
|
||||
#endif
|
||||
Nod21RValues.Scal = 0;
|
||||
@@ -1693,8 +1700,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
|
||||
else if (Nod12Indices.Edg2 == e) Nod12RValues.PCu2 = U3;
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
cout << "Parameter error on Node " << i1p2 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
std::cout << "Parameter error on Node " << i1p2 << std::endl;
|
||||
}
|
||||
#endif
|
||||
Nod12RValues.Scal = 0;
|
||||
@@ -1705,8 +1712,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
|
||||
else if (Nod22Indices.Edg2 == e) Nod22RValues.PCu2 = U3;
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
cout << "Parameter error on Node " << i2p2 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
std::cout << "Parameter error on Node " << i2p2 << std::endl;
|
||||
}
|
||||
#endif
|
||||
Nod22RValues.Scal = 0;
|
||||
@@ -1853,8 +1860,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
|
||||
else if (Nod11Indices.Edg2 == e) Nod11RValues.PCu2 = U3;
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
cout << "Parameter error on Node " << i1p1 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
std::cout << "Parameter error on Node " << i1p1 << std::endl;
|
||||
}
|
||||
#endif
|
||||
Nod11RValues.Scal = 0;
|
||||
@@ -1865,8 +1872,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
|
||||
else if (Nod21Indices.Edg2 == e) Nod21RValues.PCu2 = U3;
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
cout << "Parameter error on Node " << i2p1 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
std::cout << "Parameter error on Node " << i2p1 << std::endl;
|
||||
}
|
||||
#endif
|
||||
Nod21RValues.Scal = 0;
|
||||
@@ -1902,8 +1909,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
|
||||
else if (Nod12Indices.Edg2 == e) Nod12RValues.PCu2 = U4;
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
cout << "Parameter error on Node " << i1p2 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
std::cout << "Parameter error on Node " << i1p2 << std::endl;
|
||||
}
|
||||
#endif
|
||||
Nod12RValues.Scal = 0;
|
||||
@@ -1914,8 +1921,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
|
||||
else if (Nod22Indices.Edg2 == e) Nod22RValues.PCu2 = U4;
|
||||
#ifdef OCCT_DEBUG
|
||||
else {
|
||||
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
cout << "Parameter error on Node " << i2p2 << endl;
|
||||
std::cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
|
||||
std::cout << "Parameter error on Node " << i2p2 << std::endl;
|
||||
}
|
||||
#endif
|
||||
Nod22RValues.Scal = 0;
|
||||
@@ -2078,9 +2085,9 @@ HLRBRep_PolyAlgo::InsertOnOutLine (TColStd_Array1OfTransient& PID)
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoTrace) {
|
||||
cout << " InsertOnOutLine : NbTData " << (*pid)->NbTData() << endl;
|
||||
cout << " InsertOnOutLine : NbPISeg " << (*pid)->NbPISeg() << endl;
|
||||
cout << " InsertOnOutLine : NbPINod " << (*pid)->NbPINod() << endl;
|
||||
std::cout << " InsertOnOutLine : NbTData " << (*pid)->NbTData() << std::endl;
|
||||
std::cout << " InsertOnOutLine : NbPISeg " << (*pid)->NbPISeg() << std::endl;
|
||||
std::cout << " InsertOnOutLine : NbPINod " << (*pid)->NbPINod() << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2162,9 +2169,9 @@ HLRBRep_PolyAlgo::InsertOnOutLine (TColStd_Array1OfTransient& PID)
|
||||
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoTrace) {
|
||||
cout << " InsertOnOutLine : NbTData " << (*pid)->NbTData() << endl;
|
||||
cout << " InsertOnOutLine : NbPISeg " << (*pid)->NbPISeg() << endl;
|
||||
cout << " InsertOnOutLine : NbPINod " << (*pid)->NbPINod() << endl;
|
||||
std::cout << " InsertOnOutLine : NbTData " << (*pid)->NbTData() << std::endl;
|
||||
std::cout << " InsertOnOutLine : NbPISeg " << (*pid)->NbPISeg() << std::endl;
|
||||
std::cout << " InsertOnOutLine : NbPINod " << (*pid)->NbPINod() << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -2241,7 +2248,7 @@ HLRBRep_PolyAlgo::CheckFrBackTriangles (HLRAlgo_ListOfBPoint& List,
|
||||
(tdata->Flags & HLRAlgo_PolyMask_FMskFrBack)) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoTrace)
|
||||
cout << " face : " << f << " , triangle " << i << endl;
|
||||
std::cout << " face : " << f << " , triangle " << i << std::endl;
|
||||
#endif
|
||||
Modif = Standard_True;
|
||||
const Handle(HLRAlgo_PolyInternalNode)* pi1p1 =
|
||||
@@ -2310,8 +2317,8 @@ HLRBRep_PolyAlgo::CheckFrBackTriangles (HLRAlgo_ListOfBPoint& List,
|
||||
FrBackInList = Standard_True;
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoTrace) {
|
||||
cout << tdata->Node1 << " modifies : DX,DY ";
|
||||
cout << X1 << " , " << Y1 << endl;
|
||||
std::cout << tdata->Node1 << " modifies : DX,DY ";
|
||||
std::cout << X1 << " , " << Y1 << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -2323,8 +2330,8 @@ HLRBRep_PolyAlgo::CheckFrBackTriangles (HLRAlgo_ListOfBPoint& List,
|
||||
FrBackInList = Standard_True;
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoTrace) {
|
||||
cout << tdata->Node2 << " modifies : DX,DY ";
|
||||
cout << X2 << " , " << Y2 << endl;
|
||||
std::cout << tdata->Node2 << " modifies : DX,DY ";
|
||||
std::cout << X2 << " , " << Y2 << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -2336,14 +2343,14 @@ HLRBRep_PolyAlgo::CheckFrBackTriangles (HLRAlgo_ListOfBPoint& List,
|
||||
FrBackInList = Standard_True;
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoTrace) {
|
||||
cout << tdata->Node3 << " modifies : DX,DY ";
|
||||
cout << X3 << " , " << Y3 << endl;
|
||||
std::cout << tdata->Node3 << " modifies : DX,DY ";
|
||||
std::cout << X3 << " , " << Y3 << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (DoTrace)
|
||||
cout << "modification error" << endl;
|
||||
std::cout << "modification error" << std::endl;
|
||||
#endif
|
||||
}
|
||||
tdata++;
|
||||
@@ -2383,7 +2390,7 @@ HLRBRep_PolyAlgo::CheckFrBackTriangles (HLRAlgo_ListOfBPoint& List,
|
||||
if (Nod11Indices->Flag & NMsk_Move) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoTrace)
|
||||
cout << theIndices.Face1Pt1 << " modifies 11" << endl;
|
||||
std::cout << theIndices.Face1Pt1 << " modifies 11" << std::endl;
|
||||
#endif
|
||||
Nod11RValues = &PINod1->ChangeValue(theIndices.Face1Pt1)->Data();
|
||||
HLRAlgo_BiPoint::PointsT& aPoints = BP.Points();
|
||||
@@ -2402,7 +2409,7 @@ HLRBRep_PolyAlgo::CheckFrBackTriangles (HLRAlgo_ListOfBPoint& List,
|
||||
if (Nod11Indices->Flag & NMsk_Move) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoTrace)
|
||||
cout << theIndices.Face1Pt2 << " modifies 12" << endl;
|
||||
std::cout << theIndices.Face1Pt2 << " modifies 12" << std::endl;
|
||||
#endif
|
||||
Nod11RValues = &PINod1->ChangeValue(theIndices.Face1Pt2)->Data();
|
||||
HLRAlgo_BiPoint::PointsT& aPoints = BP.Points();
|
||||
@@ -2426,7 +2433,7 @@ HLRBRep_PolyAlgo::CheckFrBackTriangles (HLRAlgo_ListOfBPoint& List,
|
||||
if (Nod11Indices->Flag & NMsk_Move) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoTrace)
|
||||
cout << theIndices.Face2Pt1 << " modifies 21" << endl;
|
||||
std::cout << theIndices.Face2Pt1 << " modifies 21" << std::endl;
|
||||
#endif
|
||||
Nod11RValues = &PINod2->ChangeValue(theIndices.Face2Pt1)->Data();
|
||||
HLRAlgo_BiPoint::PointsT& aPoints = BP.Points();
|
||||
@@ -2445,7 +2452,7 @@ HLRBRep_PolyAlgo::CheckFrBackTriangles (HLRAlgo_ListOfBPoint& List,
|
||||
if (Nod11Indices->Flag & NMsk_Move) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoTrace)
|
||||
cout << theIndices.Face2Pt2 << " modifies 22" << endl;
|
||||
std::cout << theIndices.Face2Pt2 << " modifies 22" << std::endl;
|
||||
#endif
|
||||
Nod11RValues = &PINod2->ChangeValue(theIndices.Face2Pt2)->Data();
|
||||
HLRAlgo_BiPoint::PointsT& aPoints = BP.Points();
|
||||
@@ -2563,8 +2570,8 @@ void HLRBRep_PolyAlgo::ChangeNode (const Standard_Integer ip1,
|
||||
Nod1RValues.Normal = gp_XYZ(1., 0., 0.);
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoError) {
|
||||
cout << "HLRBRep_PolyAlgo::ChangeNode between " << ip1;
|
||||
cout << " and " << ip2 << endl;
|
||||
std::cout << "HLRBRep_PolyAlgo::ChangeNode between " << ip1;
|
||||
std::cout << " and " << ip2 << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -2583,8 +2590,8 @@ void HLRBRep_PolyAlgo::ChangeNode (const Standard_Integer ip1,
|
||||
Nod2RValues.Normal = gp_XYZ(1., 0., 0.);
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoError) {
|
||||
cout << "HLRBRep_PolyAlgo::ChangeNode between " << ip2;
|
||||
cout << " and " << ip1 << endl;
|
||||
std::cout << "HLRBRep_PolyAlgo::ChangeNode between " << ip2;
|
||||
std::cout << " and " << ip1 << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -2684,8 +2691,8 @@ HLRBRep_PolyAlgo::OrientTriangle(const Standard_Integer,
|
||||
theTriangle.Flags |= HLRAlgo_PolyMask_FMskOnOutL;
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoTrace) {
|
||||
cout << "HLRBRep_PolyAlgo::OrientTriangle : OnOutL";
|
||||
cout << " triangle " << iTri << endl;
|
||||
std::cout << "HLRBRep_PolyAlgo::OrientTriangle : OnOutL";
|
||||
std::cout << " triangle " << iTri << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -2717,8 +2724,8 @@ HLRBRep_PolyAlgo::OrientTriangle(const Standard_Integer,
|
||||
if (aD12Norm <= 1.e-10) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoTrace) {
|
||||
cout << "HLRBRep_PolyAlgo::OrientTriangle : Flat";
|
||||
cout << " triangle " << iTri << endl;
|
||||
std::cout << "HLRBRep_PolyAlgo::OrientTriangle : Flat";
|
||||
std::cout << " triangle " << iTri << std::endl;
|
||||
}
|
||||
#endif
|
||||
theTriangle.Flags |= HLRAlgo_PolyMask_FMskFlat;
|
||||
@@ -2731,8 +2738,8 @@ HLRBRep_PolyAlgo::OrientTriangle(const Standard_Integer,
|
||||
if (aD23Norm < 1.e-10) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoTrace) {
|
||||
cout << "HLRBRep_PolyAlgo::OrientTriangle : Flat";
|
||||
cout << " triangle " << iTri << endl;
|
||||
std::cout << "HLRBRep_PolyAlgo::OrientTriangle : Flat";
|
||||
std::cout << " triangle " << iTri << std::endl;
|
||||
}
|
||||
#endif
|
||||
theTriangle.Flags |= HLRAlgo_PolyMask_FMskFlat;
|
||||
@@ -2745,8 +2752,8 @@ HLRBRep_PolyAlgo::OrientTriangle(const Standard_Integer,
|
||||
if (aD31Norm < 1.e-10) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoTrace) {
|
||||
cout << "HLRBRep_PolyAlgo::OrientTriangle : Flat";
|
||||
cout << " triangle " << iTri << endl;
|
||||
std::cout << "HLRBRep_PolyAlgo::OrientTriangle : Flat";
|
||||
std::cout << " triangle " << iTri << std::endl;
|
||||
}
|
||||
#endif
|
||||
theTriangle.Flags |= HLRAlgo_PolyMask_FMskFlat;
|
||||
@@ -2761,8 +2768,8 @@ HLRBRep_PolyAlgo::OrientTriangle(const Standard_Integer,
|
||||
if (aDNorm < 1.e-5) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoTrace) {
|
||||
cout << "HLRBRep_PolyAlgo::OrientTriangle : Flat";
|
||||
cout << " triangle " << iTri << endl;
|
||||
std::cout << "HLRBRep_PolyAlgo::OrientTriangle : Flat";
|
||||
std::cout << " triangle " << iTri << std::endl;
|
||||
}
|
||||
#endif
|
||||
theTriangle.Flags |= HLRAlgo_PolyMask_FMskFlat;
|
||||
@@ -2838,8 +2845,8 @@ HLRBRep_PolyAlgo::Triangles(const Standard_Integer ip1,
|
||||
iTri2 = 0;
|
||||
#ifdef OCCT_DEBUG
|
||||
if (DoError) {
|
||||
cout << "HLRBRep_PolyAlgo::Triangles : error";
|
||||
cout << " between " << ip1 << " and " << ip2 << endl;
|
||||
std::cout << "HLRBRep_PolyAlgo::Triangles : error";
|
||||
std::cout << " between " << ip1 << " and " << ip2 << std::endl;
|
||||
}
|
||||
#endif
|
||||
return Standard_False;
|
||||
@@ -2975,8 +2982,8 @@ HLRBRep_PolyAlgo::UpdateOutLines (HLRAlgo_ListOfBPoint& List,
|
||||
aTriangle.Flags |= HLRAlgo_PolyMask_EMskOutLin3;
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (DoError) {
|
||||
cout << "HLRAlgo_PolyInternalData::UpdateOutLines";
|
||||
cout << " : segment not found" << endl;
|
||||
std::cout << "HLRAlgo_PolyInternalData::UpdateOutLines";
|
||||
std::cout << " : segment not found" << std::endl;
|
||||
}
|
||||
#endif
|
||||
tn1 = aTriangle2.Node1;
|
||||
@@ -2995,8 +3002,8 @@ HLRBRep_PolyAlgo::UpdateOutLines (HLRAlgo_ListOfBPoint& List,
|
||||
aTriangle2.Flags |= HLRAlgo_PolyMask_EMskOutLin3;
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (DoError) {
|
||||
cout << "HLRAlgo_PolyInternalData::UpdateOutLines";
|
||||
cout << " : segment not found" << endl;
|
||||
std::cout << "HLRAlgo_PolyInternalData::UpdateOutLines";
|
||||
std::cout << " : segment not found" << std::endl;
|
||||
}
|
||||
#endif
|
||||
HLRAlgo_PolyInternalNode::NodeData& Nod1RValues =
|
||||
@@ -3081,9 +3088,9 @@ UpdateEdgesBiPoints (HLRAlgo_ListOfBPoint& List,
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
else if (DoError) {
|
||||
cout << "HLRBRep_PolyAlgo::UpdateEdgesBiPoints : error ";
|
||||
cout << " between " << aIndices.FaceConex1 << setw(6);
|
||||
cout << " and " << aIndices.FaceConex2 << endl;
|
||||
std::cout << "HLRBRep_PolyAlgo::UpdateEdgesBiPoints : error ";
|
||||
std::cout << " between " << aIndices.FaceConex1 << std::setw(6);
|
||||
std::cout << " and " << aIndices.FaceConex2 << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -3133,9 +3140,9 @@ HLRBRep_PolyAlgo::UpdatePolyData (TColStd_Array1OfTransient& PD,
|
||||
if (!(OT->Flags & HLRAlgo_PolyMask_FMskSide)) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if ((OT->Flags & HLRAlgo_PolyMask_FMskFrBack) && DoTrace) {
|
||||
cout << "HLRBRep_PolyAlgo::ReverseBackTriangle :";
|
||||
cout << " face " << f << setw(6);
|
||||
cout << " triangle " << i << endl;
|
||||
std::cout << "HLRBRep_PolyAlgo::ReverseBackTriangle :";
|
||||
std::cout << " face " << f << std::setw(6);
|
||||
std::cout << " triangle " << i << std::endl;
|
||||
}
|
||||
#endif
|
||||
if (OT->Flags & HLRAlgo_PolyMask_FMskOrBack) {
|
||||
|
@@ -1,20 +0,0 @@
|
||||
// Created on: 1992-08-18
|
||||
// Created by: Herve LEGRAND
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <HLRBRep_SLPropsATool.hxx>
|
@@ -49,7 +49,7 @@ public:
|
||||
//! <V> on the Surface <A>.
|
||||
static void D2 (const Standard_Address A, const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& DUV);
|
||||
|
||||
Standard_EXPORT static gp_Vec DN (const Standard_Address A, const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv);
|
||||
static gp_Vec DN (const Standard_Address A, const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv);
|
||||
|
||||
//! returns the order of continuity of the Surface
|
||||
//! <A>. returns 1 : first derivative only is
|
||||
|
@@ -33,7 +33,6 @@
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
|
@@ -228,7 +228,7 @@ void HLRTopoBRep_DSFiller::InsertFace (const Standard_Integer /*FI*/,
|
||||
|
||||
if(ipL-ipF < 1) {
|
||||
InsuffisantNumberOfPoints=Standard_True;
|
||||
//cout<<"\n !! Pb ds HLRTopoBRep_DSFiller.cxx (Contour App Nbp <3)"<<endl;
|
||||
//std::cout<<"\n !! Pb ds HLRTopoBRep_DSFiller.cxx (Contour App Nbp <3)"<<std::endl;
|
||||
}
|
||||
/*
|
||||
else if(ipL-ipF < 6) {
|
||||
@@ -390,7 +390,7 @@ void HLRTopoBRep_DSFiller::InsertFace (const Standard_Integer /*FI*/,
|
||||
TOL3d=TOL*Maxx; if(TOL3d<1e-12) TOL3d=1e-12; else if(TOL3d>0.1) TOL3d=0.1;
|
||||
TOL2d=TOL*Maxu; if(TOL2d<1e-12) TOL2d=1e-12; else if(TOL2d>0.1) TOL2d=0.1;
|
||||
|
||||
//-- cout<<"\nHLRTopoBRep_DSFiller : nbp="<<nbp<<" Tol3d="<<TOL3d<<" Tol2d="<<TOL2d<<endl;
|
||||
//-- std::cout<<"\nHLRTopoBRep_DSFiller : nbp="<<nbp<<" Tol3d="<<TOL3d<<" Tol2d="<<TOL2d<<std::endl;
|
||||
|
||||
Approx.SetParameters(TOL3d, TOL2d, dmin, dmax, niter, 30, tg);
|
||||
Approx.Perform(AppLine,Standard_True,Standard_True,Standard_False,1,nbp);
|
||||
|
@@ -197,23 +197,23 @@ void HLRTopoBRep_FaceIsoLiner::Perform (const Standard_Integer FI,
|
||||
Hatcher.ComputeDomains (IndH);
|
||||
if (!Hatcher.IsDone (IndH)) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "HLRTopoBRep::MakeIsoLines : Face " << FI << endl;
|
||||
cout << "U iso of parameter: " << UPrm;
|
||||
std::cout << "HLRTopoBRep::MakeIsoLines : Face " << FI << std::endl;
|
||||
std::cout << "U iso of parameter: " << UPrm;
|
||||
switch (Hatcher.Status (IndH)) {
|
||||
case HatchGen_NoProblem :
|
||||
cout << " No Problem" << endl;
|
||||
std::cout << " No Problem" << std::endl;
|
||||
break;
|
||||
case HatchGen_TrimFailure :
|
||||
cout << " Trim Failure" << endl;
|
||||
std::cout << " Trim Failure" << std::endl;
|
||||
break;
|
||||
case HatchGen_TransitionFailure :
|
||||
cout << " Transition Failure" << endl;
|
||||
std::cout << " Transition Failure" << std::endl;
|
||||
break;
|
||||
case HatchGen_IncoherentParity :
|
||||
cout << " Incoherent Parity" << endl;
|
||||
std::cout << " Incoherent Parity" << std::endl;
|
||||
break;
|
||||
case HatchGen_IncompatibleStates :
|
||||
cout << " Incompatible States" << endl;
|
||||
std::cout << " Incompatible States" << std::endl;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@@ -291,23 +291,23 @@ void HLRTopoBRep_FaceIsoLiner::Perform (const Standard_Integer FI,
|
||||
Hatcher.ComputeDomains (IndH);
|
||||
if (!Hatcher.IsDone (IndH)) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "HLRTopoBRep::MakeIsoLines : Face " << FI << endl;
|
||||
cout << "V iso of parameter: " << VPrm;
|
||||
std::cout << "HLRTopoBRep::MakeIsoLines : Face " << FI << std::endl;
|
||||
std::cout << "V iso of parameter: " << VPrm;
|
||||
switch (Hatcher.Status (IndH)) {
|
||||
case HatchGen_NoProblem :
|
||||
cout << " No Problem" << endl;
|
||||
std::cout << " No Problem" << std::endl;
|
||||
break;
|
||||
case HatchGen_TrimFailure :
|
||||
cout << " Trim Failure" << endl;
|
||||
std::cout << " Trim Failure" << std::endl;
|
||||
break;
|
||||
case HatchGen_TransitionFailure :
|
||||
cout << " Transition Failure" << endl;
|
||||
std::cout << " Transition Failure" << std::endl;
|
||||
break;
|
||||
case HatchGen_IncoherentParity :
|
||||
cout << " Incoherent Parity" << endl;
|
||||
std::cout << " Incoherent Parity" << std::endl;
|
||||
break;
|
||||
case HatchGen_IncompatibleStates :
|
||||
cout << " Incompatible States" << endl;
|
||||
std::cout << " Incompatible States" << std::endl;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
@@ -930,21 +930,19 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1,
|
||||
// 3. ts1 == ts2 == 0 <Param-Param>
|
||||
|
||||
// Geom - Geom
|
||||
const Standard_Boolean RestrictLine = Standard_True;
|
||||
if(ts1 == ts2 && ts1 == 1)
|
||||
{
|
||||
IntSurf_ListOfPntOn2S ListOfPnts;
|
||||
ListOfPnts.Clear();
|
||||
if(isGeomInt)
|
||||
{
|
||||
GeomGeomPerfom( theS1, theD1, theS2, theD2, TolArc,
|
||||
TolTang, ListOfPnts, RestrictLine,
|
||||
typs1, typs2, theIsReqToKeepRLine);
|
||||
GeomGeomPerfom(theS1, theD1, theS2, theD2, TolArc, TolTang,
|
||||
ListOfPnts, typs1, typs2, theIsReqToKeepRLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
ParamParamPerfom(theS1, theD1, theS2, theD2,
|
||||
TolArc, TolTang, ListOfPnts, RestrictLine, typs1, typs2);
|
||||
TolArc, TolTang, ListOfPnts, typs1, typs2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -961,7 +959,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1,
|
||||
ListOfPnts.Clear();
|
||||
|
||||
ParamParamPerfom(theS1, theD1, theS2, theD2, TolArc,
|
||||
TolTang, ListOfPnts, RestrictLine, typs1, typs2);
|
||||
TolTang, ListOfPnts, typs1, typs2);
|
||||
}
|
||||
|
||||
if(!theIsReqToPostWLProc)
|
||||
@@ -978,7 +976,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1,
|
||||
continue;
|
||||
|
||||
Handle(IntPatch_WLine) aRW =
|
||||
IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2, RestrictLine);
|
||||
IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2);
|
||||
|
||||
if(aRW.IsNull())
|
||||
continue;
|
||||
@@ -999,7 +997,6 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1,
|
||||
const Standard_Real TolArc,
|
||||
const Standard_Real TolTang,
|
||||
IntSurf_ListOfPntOn2S& ListOfPnts,
|
||||
const Standard_Boolean RestrictLine,
|
||||
const Standard_Boolean isGeomInt,
|
||||
const Standard_Boolean theIsReqToKeepRLine,
|
||||
const Standard_Boolean theIsReqToPostWLProc)
|
||||
@@ -1183,7 +1180,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1,
|
||||
if(!isGeomInt)
|
||||
{
|
||||
ParamParamPerfom(theS1, theD1, theS2, theD2,
|
||||
TolArc, TolTang, ListOfPnts, RestrictLine, typs1, typs2);
|
||||
TolArc, TolTang, ListOfPnts, typs1, typs2);
|
||||
}
|
||||
else if(ts1 != ts2)
|
||||
{
|
||||
@@ -1192,12 +1189,12 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1,
|
||||
else if (ts1 == 0)
|
||||
{
|
||||
ParamParamPerfom(theS1, theD1, theS2, theD2,
|
||||
TolArc, TolTang, ListOfPnts, RestrictLine, typs1, typs2);
|
||||
TolArc, TolTang, ListOfPnts, typs1, typs2);
|
||||
}
|
||||
else if(ts1 == 1)
|
||||
{
|
||||
GeomGeomPerfom(theS1, theD1, theS2, theD2, TolArc,
|
||||
TolTang, ListOfPnts, RestrictLine, typs1, typs2, theIsReqToKeepRLine);
|
||||
GeomGeomPerfom(theS1, theD1, theS2, theD2, TolArc, TolTang,
|
||||
ListOfPnts, typs1, typs2, theIsReqToKeepRLine);
|
||||
}
|
||||
|
||||
if(!theIsReqToPostWLProc)
|
||||
@@ -1214,7 +1211,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1,
|
||||
continue;
|
||||
|
||||
Handle(IntPatch_WLine) aRW =
|
||||
IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2, RestrictLine);
|
||||
IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2);
|
||||
|
||||
if(aRW.IsNull())
|
||||
continue;
|
||||
@@ -1235,7 +1232,6 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_HSurface)&
|
||||
const Standard_Real TolArc,
|
||||
const Standard_Real TolTang,
|
||||
IntSurf_ListOfPntOn2S& ListOfPnts,
|
||||
const Standard_Boolean RestrictLine,
|
||||
const GeomAbs_SurfaceType typs1,
|
||||
const GeomAbs_SurfaceType typs2)
|
||||
{
|
||||
@@ -1245,10 +1241,10 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_HSurface)&
|
||||
Standard_Boolean ClearFlag = Standard_True;
|
||||
if(!ListOfPnts.IsEmpty())
|
||||
{
|
||||
interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep, ListOfPnts, RestrictLine);
|
||||
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); //double call!!!!!!!
|
||||
interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep,ClearFlag);
|
||||
}
|
||||
else if((theD1->DomainIsInfinite()) ^ (theD2->DomainIsInfinite()))
|
||||
{
|
||||
@@ -1345,7 +1341,6 @@ void IntPatch_Intersection::GeomGeomPerfom(const Handle(Adaptor3d_HSurface)& the
|
||||
const Standard_Real TolArc,
|
||||
const Standard_Real TolTang,
|
||||
IntSurf_ListOfPntOn2S& ListOfPnts,
|
||||
const Standard_Boolean RestrictLine,
|
||||
const GeomAbs_SurfaceType theTyps1,
|
||||
const GeomAbs_SurfaceType theTyps2,
|
||||
const Standard_Boolean theIsReqToKeepRLine)
|
||||
@@ -1357,7 +1352,7 @@ void IntPatch_Intersection::GeomGeomPerfom(const Handle(Adaptor3d_HSurface)& the
|
||||
{
|
||||
done = Standard_False;
|
||||
ParamParamPerfom(theS1, theD1, theS2, theD2,
|
||||
TolArc, TolTang, ListOfPnts, RestrictLine, theTyps1, theTyps2);
|
||||
TolArc, TolTang, ListOfPnts, theTyps1, theTyps2);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1604,7 +1599,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& S1,
|
||||
continue;
|
||||
|
||||
Handle(IntPatch_WLine) aRW =
|
||||
IntPatch_WLineTool::ComputePurgedWLine(aWL, S1, S2, D1, D2, Standard_True);
|
||||
IntPatch_WLineTool::ComputePurgedWLine(aWL, S1, S2, D1, D2);
|
||||
|
||||
if(aRW.IsNull())
|
||||
continue;
|
||||
|
@@ -70,16 +70,16 @@ public:
|
||||
//!
|
||||
//! UVMaxStep is a parameter used in the walking
|
||||
//! algorithms to compute the distance between to
|
||||
//! points in their respective parametrtic spaces.
|
||||
//! points in their respective parametric spaces.
|
||||
Standard_EXPORT void SetTolerances (const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Real UVMaxStep, const Standard_Real Fleche);
|
||||
|
||||
//! Flag theIsReqToKeepRLine has been enterred only for
|
||||
//! Flag theIsReqToKeepRLine has been entered only for
|
||||
//! compatibility with TopOpeBRep package. It shall be deleted
|
||||
//! after deleting TopOpeBRep.
|
||||
//! When intersection result returns IntPatch_RLine and another
|
||||
//! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
|
||||
//! will always keep both lines even if they are coincided.
|
||||
//! Flag theIsReqToPostWLProc has been enterred only for
|
||||
//! Flag theIsReqToPostWLProc has been entered only for
|
||||
//! compatibility with TopOpeBRep package. It shall be deleted
|
||||
//! after deleting TopOpeBRep.
|
||||
//! If theIsReqToPostWLProc == FALSE, then we will work with Walking-line
|
||||
@@ -88,18 +88,18 @@ public:
|
||||
|
||||
//! If isGeomInt == Standard_False, then method
|
||||
//! Param-Param intersection will be used.
|
||||
//! Flag theIsReqToKeepRLine has been enterred only for
|
||||
//! Flag theIsReqToKeepRLine has been entered only for
|
||||
//! compatibility with TopOpeBRep package. It shall be deleted
|
||||
//! after deleting TopOpeBRep.
|
||||
//! When intersection result returns IntPatch_RLine and another
|
||||
//! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
|
||||
//! will always keep both lines even if they are coincided.
|
||||
//! Flag theIsReqToPostWLProc has been enterred only for
|
||||
//! Flag theIsReqToPostWLProc has been entered only for
|
||||
//! compatibility with TopOpeBRep package. It shall be deleted
|
||||
//! after deleting TopOpeBRep.
|
||||
//! If theIsReqToPostWLProc == FALSE, then we will work with Walking-line
|
||||
//! obtained after intersection algorithm directly (wothout any post-processing).
|
||||
Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const Standard_Boolean RestrictLine = Standard_True, const Standard_Boolean isGeomInt = Standard_True, const Standard_Boolean theIsReqToKeepRLine = Standard_False, const Standard_Boolean theIsReqToPostWLProc = Standard_True);
|
||||
//! obtained after intersection algorithm directly (without any post-processing).
|
||||
Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const Standard_Boolean isGeomInt = Standard_True, const Standard_Boolean theIsReqToKeepRLine = Standard_False, const Standard_Boolean theIsReqToPostWLProc = Standard_True);
|
||||
|
||||
//! Perform with start point
|
||||
Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real TolArc, const Standard_Real TolTang);
|
||||
@@ -107,14 +107,14 @@ public:
|
||||
//! Uses for finding self-intersected surfaces.
|
||||
Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Standard_Real TolArc, const Standard_Real TolTang);
|
||||
|
||||
//! Returns True if the calculus was succesfull.
|
||||
//! Returns True if the calculus was successful.
|
||||
Standard_Boolean IsDone() const;
|
||||
|
||||
//! Returns true if the is no intersection.
|
||||
Standard_Boolean IsEmpty() const;
|
||||
|
||||
//! Returns True if the two patches are considered as
|
||||
//! entierly tangent, i-e every restriction arc of one
|
||||
//! entirely tangent, i-e every restriction arc of one
|
||||
//! patch is inside the geometric base of the other patch.
|
||||
Standard_Boolean TangentFaces() const;
|
||||
|
||||
@@ -157,15 +157,15 @@ protected:
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT void ParamParamPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const Standard_Boolean RestrictLine, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2);
|
||||
Standard_EXPORT void ParamParamPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2);
|
||||
|
||||
//! Flag theIsReqToKeepRLine has been enterred only for
|
||||
//! Flag theIsReqToKeepRLine has been entered only for
|
||||
//! compatibility with TopOpeBRep package. It shall be deleted
|
||||
//! after deleting TopOpeBRep.
|
||||
//! When intersection result returns IntPatch_RLine and another
|
||||
//! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
|
||||
//! will always keep both lines even if they are coincided.
|
||||
Standard_EXPORT void GeomGeomPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const Standard_Boolean RestrictLine, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2, const Standard_Boolean theIsReqToKeepRLine = Standard_False);
|
||||
Standard_EXPORT void GeomGeomPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2, const Standard_Boolean theIsReqToKeepRLine);
|
||||
|
||||
Standard_EXPORT void GeomParamPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Boolean isNotAnalitical, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2);
|
||||
|
||||
|
@@ -1551,8 +1551,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)&
|
||||
const Standard_Real Epsilon,
|
||||
const Standard_Real Deflection,
|
||||
const Standard_Real Increment,
|
||||
IntSurf_ListOfPntOn2S& LOfPnts,
|
||||
const Standard_Boolean RestrictLine)
|
||||
IntSurf_ListOfPntOn2S& LOfPnts)
|
||||
{
|
||||
if (LOfPnts.IsEmpty()){
|
||||
done = Standard_True;
|
||||
@@ -1788,15 +1787,13 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)&
|
||||
|
||||
Standard_Real TolTang = TolTangency;
|
||||
Handle(IntPatch_WLine) wline = new IntPatch_WLine(PW.Line(),Standard_False,trans1,trans2);
|
||||
if (RestrictLine){
|
||||
//the method PutVertexOnLine can reduce the number of points in <wline>
|
||||
IntPatch_RstInt::PutVertexOnLine(wline,Surf1,D1,Surf2,Standard_True,TolTang);
|
||||
if (wline->NbPnts() < 2)
|
||||
continue;
|
||||
IntPatch_RstInt::PutVertexOnLine(wline,Surf2,D2,Surf1,Standard_False,TolTang);
|
||||
if (wline->NbPnts() < 2)
|
||||
continue;
|
||||
}
|
||||
//the method PutVertexOnLine can reduce the number of points in <wline>
|
||||
IntPatch_RstInt::PutVertexOnLine(wline, Surf1, D1, Surf2, Standard_True, TolTang);
|
||||
if (wline->NbPnts() < 2)
|
||||
continue;
|
||||
IntPatch_RstInt::PutVertexOnLine(wline, Surf2, D2, Surf1, Standard_False, TolTang);
|
||||
if (wline->NbPnts() < 2)
|
||||
continue;
|
||||
|
||||
if(wline->NbVertex() == 0) {
|
||||
IntPatch_Point vtx;
|
||||
|
@@ -68,7 +68,7 @@ public:
|
||||
//! Performs the intersection between <Caro1> and
|
||||
//! <Caro2>. The method computes the polyhedron on
|
||||
//! each surface.
|
||||
Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_HSurface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment, IntSurf_ListOfPntOn2S& ListOfPnts, const Standard_Boolean RestrictLine);
|
||||
Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_HSurface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment, IntSurf_ListOfPntOn2S& ListOfPnts);
|
||||
|
||||
//! Performs the intersection between <Caro1> and
|
||||
//! <Caro2>. The method computes the polyhedron on
|
||||
|
@@ -234,40 +234,6 @@ static void GetLinePoint2d (const Handle(IntPatch_Line)& L,
|
||||
V = (1.-par)*vs1+par*vs2;
|
||||
}
|
||||
|
||||
static void GetWLinePoint (const Handle(IntPatch_WLine)& wlin,
|
||||
const Standard_Real param,
|
||||
Standard_Real& U1, Standard_Real& V1,
|
||||
Standard_Real& U2, Standard_Real& V2,
|
||||
gp_Pnt& P)
|
||||
{
|
||||
Standard_Integer Nbptlin = wlin->NbPnts();
|
||||
Standard_Real par = IntegerPart(param);
|
||||
Standard_Integer Irang = Standard_Integer(par);
|
||||
if (Irang == Nbptlin) {
|
||||
Irang--;
|
||||
par = 1.0;
|
||||
}
|
||||
else
|
||||
par = Abs(param-par);
|
||||
|
||||
const IntSurf_PntOn2S& p2s1 = wlin->Point(Irang);
|
||||
const IntSurf_PntOn2S& p2s2 = wlin->Point(Irang+1);
|
||||
const gp_Pnt& p1 = p2s1.Value();
|
||||
const gp_Pnt& p2 = p2s2.Value();
|
||||
P.ChangeCoord().SetLinearForm(1.-par, p1.XYZ(), par, p2.XYZ());
|
||||
|
||||
Standard_Real us1,vs1,us2,vs2;
|
||||
p2s1.ParametersOnS1(us1,vs1);
|
||||
p2s2.ParametersOnS1(us2,vs2);
|
||||
U1 = (1.-par)*us1+par*us2;
|
||||
V1 = (1.-par)*vs1+par*vs2;
|
||||
|
||||
p2s1.ParametersOnS2(us1,vs1);
|
||||
p2s2.ParametersOnS2(us2,vs2);
|
||||
U2 = (1.-par)*us1+par*us2;
|
||||
V2 = (1.-par)*vs1+par*vs2;
|
||||
}
|
||||
|
||||
static Standard_Boolean FindParameter(const Handle(IntPatch_Line)& L,
|
||||
const Handle(Adaptor3d_HSurface)& OtherSurf,
|
||||
const Standard_Real Tol,
|
||||
@@ -394,50 +360,6 @@ inline Standard_Boolean ArePnt2dEqual(const gp_Pnt2d& p1, const gp_Pnt2d& p2,
|
||||
return Abs(p1.X()-p2.X()) < tolU && Abs(p1.Y()-p2.Y()) < tolV;
|
||||
}
|
||||
|
||||
static gp_Pnt2d GetPointOnPolygo(const IntPatch_Polygo& Pol,
|
||||
const Standard_Real param)
|
||||
{
|
||||
Standard_Real par = IntegerPart(param);
|
||||
Standard_Integer irang = Standard_Integer(par) + 1;
|
||||
if (irang == Pol.NbPoints()) {
|
||||
irang--;
|
||||
par = 1.;
|
||||
}
|
||||
else {
|
||||
par = Abs(param-par);
|
||||
}
|
||||
gp_Pnt2d p1 = Pol.Point(irang);
|
||||
gp_Pnt2d p2 = Pol.Point(irang+1);
|
||||
gp_Pnt2d p;
|
||||
p.ChangeCoord().SetLinearForm(1.-par,p1.XY(),par,p2.XY());
|
||||
return p;
|
||||
}
|
||||
|
||||
static Standard_Boolean IsSegment2dSmall(const IntPatch_Polygo& Pol,
|
||||
const Standard_Real parmin,
|
||||
const Standard_Real parmax,
|
||||
const Standard_Real URes,
|
||||
const Standard_Real VRes)
|
||||
{
|
||||
Standard_Integer irang1 = Standard_Integer(IntegerPart(parmin)) + 2;
|
||||
Standard_Integer irang2 = Standard_Integer(IntegerPart(parmax)) + 1;
|
||||
gp_Pnt2d p1,p2;
|
||||
Standard_Real du=0.,dv=0.;
|
||||
p1 = GetPointOnPolygo(Pol,parmin);
|
||||
for (Standard_Integer i=irang1; i <= irang2 && du <= URes && dv <= VRes; i++) {
|
||||
p2 = Pol.Point(i);
|
||||
du += Abs(p2.X()-p1.X());
|
||||
dv += Abs(p2.Y()-p1.Y());
|
||||
p1 = p2;
|
||||
}
|
||||
if (du <= URes && dv <= VRes) {
|
||||
p2 = GetPointOnPolygo(Pol,parmax);
|
||||
du += Abs(p2.X()-p1.X());
|
||||
dv += Abs(p2.Y()-p1.Y());
|
||||
}
|
||||
return du <= URes && dv <= VRes;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : PutVertexOnLine
|
||||
//purpose :
|
||||
@@ -467,7 +389,6 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L,
|
||||
Handle(IntPatch_RLine) rlin (Handle(IntPatch_RLine)::DownCast (L)); //-- aucune verification n est
|
||||
Handle(IntPatch_WLine) wlin (Handle(IntPatch_WLine)::DownCast (L)); //-- faite au cast.
|
||||
Standard_Integer Nbvtx =0;
|
||||
Standard_Integer Nbptlin =0;
|
||||
Standard_Real tolPLin = Surf->UResolution(Precision::Confusion());
|
||||
tolPLin = Max (tolPLin, Surf->VResolution(Precision::Confusion()));
|
||||
tolPLin = Min (tolPLin, Precision::Confusion());
|
||||
@@ -491,12 +412,10 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L,
|
||||
if (typL == IntPatch_Walking) {
|
||||
Nbvtx = wlin->NbVertex();
|
||||
PLin.SetWLine(OnFirst,wlin);
|
||||
Nbptlin = wlin->NbPnts();
|
||||
}
|
||||
else if ( typL == IntPatch_Restriction) {
|
||||
Nbvtx = rlin->NbVertex();
|
||||
PLin.SetRLine(OnFirst,rlin);
|
||||
Nbptlin = rlin->NbPnts();
|
||||
}
|
||||
else {
|
||||
throw Standard_DomainError();
|
||||
@@ -553,8 +472,6 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L,
|
||||
|
||||
// MSV Oct 15, 2001: use tolerance of this edge if possible
|
||||
Standard_Real edgeTol = Tol3d(arc,Domain,Tol);
|
||||
Standard_Real URes = Surf->UResolution(edgeTol);
|
||||
Standard_Real VRes = Surf->VResolution(edgeTol);
|
||||
|
||||
IntPatch_HInterTool::Bounds(arc,PFirst,PLast);
|
||||
if(Precision::IsNegativeInfinite(PFirst))
|
||||
@@ -567,26 +484,16 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L,
|
||||
// return;
|
||||
//}
|
||||
|
||||
Standard_Boolean isVFirst = Standard_False, isVLast = Standard_False;
|
||||
gp_Pnt2d p2dFirst,p2dLast;
|
||||
Standard_Real tolUFirst=0.,tolVFirst=0.,tolULast=0.,tolVLast=0.;
|
||||
Domain->Initialize(arc);
|
||||
for (Domain->InitVertexIterator(); Domain->MoreVertex(); Domain->NextVertex()) {
|
||||
Handle(Adaptor3d_HVertex) vtx = Domain->Vertex();
|
||||
Standard_Real prm = IntPatch_HInterTool::Parameter(vtx,arc);
|
||||
if (Abs(prm - PFirst) < Precision::PConfusion()) {
|
||||
arc->D0(PFirst,p2dFirst);
|
||||
Standard_Real tol3d = Max (Tol3d(vtx,Domain), edgeTol);
|
||||
tolUFirst = Surf->UResolution(tol3d);
|
||||
tolVFirst = Surf->VResolution(tol3d);
|
||||
isVFirst = Standard_True;
|
||||
}
|
||||
else if (Abs(prm - PLast) < Precision::PConfusion()) {
|
||||
arc->D0(PLast,p2dLast);
|
||||
Standard_Real tol3d = Max (edgeTol, Tol3d(vtx,Domain));
|
||||
tolULast = Surf->UResolution(tol3d);
|
||||
tolVLast = Surf->VResolution(tol3d);
|
||||
isVLast = Standard_True;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -697,473 +604,378 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L,
|
||||
Commun.Perform(PLin,Brise);
|
||||
locpt.Clear();
|
||||
locpt2.Clear();
|
||||
Standard_Integer Commun_NbSectionPoints = Commun.NbSectionPoints();
|
||||
Standard_Integer Commun_NbTangentZones = Commun.NbTangentZones();
|
||||
Standard_Integer Commun_Section_Tangent = Commun_NbSectionPoints
|
||||
+ Commun_NbTangentZones;
|
||||
for (i=1;i<=Commun_Section_Tangent;i++) {
|
||||
Standard_Real W1[2],W2[2];
|
||||
Standard_Boolean refine[2],useWL[2];
|
||||
Standard_Integer nbpt = 1;
|
||||
if(i<=Commun_NbSectionPoints) {
|
||||
// intersection point
|
||||
W1[0] = Commun.PntValue(i).ParamOnFirst();
|
||||
W2[0] = Commun.PntValue(i).ParamOnSecond();
|
||||
refine[0] = Standard_True;
|
||||
}
|
||||
else {
|
||||
// tangent zone
|
||||
Standard_Real UMinCh,UMaxCh; //-- ligne de cheminement 0..(Nbptlin-1)
|
||||
Standard_Real UMinAr,UMaxAr; //-- polyline of arc 0..(NbEchant-1)
|
||||
Commun.ZoneValue(i-Commun_NbSectionPoints).ParamOnFirst(UMinCh,UMaxCh);
|
||||
Commun.ZoneValue(i-Commun_NbSectionPoints).ParamOnSecond(UMinAr,UMaxAr);
|
||||
gp_Pnt2d p1Ar = GetPointOnPolygo(Brise,UMinAr);
|
||||
gp_Pnt2d p2Ar = GetPointOnPolygo(Brise,UMaxAr);
|
||||
Standard_Real tolU = URes*2.;
|
||||
Standard_Real tolV = VRes*2.;
|
||||
if (isVFirst && ArePnt2dEqual(p1Ar,p2dFirst,tolUFirst,tolVFirst)) {
|
||||
tolU = Max(tolUFirst,tolU); tolV = Max(tolVFirst,tolV);
|
||||
}
|
||||
if (isVLast && ArePnt2dEqual(p2Ar,p2dLast,tolULast,tolVLast)) {
|
||||
tolU = Max(tolULast,tolU); tolV = Max(tolVLast,tolV);
|
||||
}
|
||||
Standard_Real nptCh = UMaxCh-UMinCh;
|
||||
Standard_Boolean isNptLow = (nptCh < 10. && nptCh < Nbptlin/100.) ||
|
||||
(!Domain->Has3d() && Standard_Integer(nptCh)+1 < Nbptlin);
|
||||
if (!isNptLow && !IsSegment2dSmall(Brise,UMinAr,UMaxAr,tolU,tolV)) {
|
||||
// treat both ends
|
||||
Standard_Real UMinChP,UMinArP,UMaxArP;
|
||||
UMinChP = IntegerPart(UMinCh);
|
||||
UMinArP = IntegerPart(UMinAr);
|
||||
UMaxArP = IntegerPart(UMaxAr);
|
||||
Standard_Integer irangAr1,irangAr2;
|
||||
irangAr1 = Standard_Integer(UMinArP)+1;
|
||||
irangAr2 = Standard_Integer(UMaxArP)+1;
|
||||
UMinChP = UMinCh - UMinChP;
|
||||
UMinArP = UMinAr - UMinArP;
|
||||
//UMaxChP = UMaxCh - UMaxChP; UMaxArP = UMaxAr - UMaxArP;
|
||||
const Standard_Real eps = 1e-10;
|
||||
// Standard_Boolean isChExtr1 = irangCh1==1 && UMinChP<eps;
|
||||
// Standard_Boolean isChExtr2 = irangCh2==Nbptlin;
|
||||
Standard_Boolean isArExtr1 = irangAr1==1 && UMinArP<eps;
|
||||
Standard_Boolean isArExtr2 = irangAr2==NbEchant;
|
||||
// detect orientation
|
||||
gp_Pnt2d p1Ch = GetPointOnPolygo(PLin,UMinCh);
|
||||
Standard_Real d11 = p1Ch.SquareDistance(p1Ar);
|
||||
Standard_Real d12 = p1Ch.SquareDistance(p2Ar);
|
||||
Standard_Boolean sameOri = d11 < d12;
|
||||
if (!sameOri) {
|
||||
Standard_Boolean itmp=isArExtr1; isArExtr1=isArExtr2; isArExtr2=itmp;
|
||||
Standard_Real dtmp=UMinAr; UMinAr=UMaxAr; UMaxAr=dtmp;
|
||||
}
|
||||
W1[0] = UMinCh; W1[1] = UMaxCh;
|
||||
W2[0] = UMinAr; W2[1] = UMaxAr;
|
||||
//refine[0] = ! (isChExtr1 || isArExtr1);
|
||||
//refine[1] = ! (isChExtr2 || isArExtr2);
|
||||
refine[0] = refine[1] = Standard_False;
|
||||
useWL[0] = !isArExtr1;
|
||||
useWL[1] = !isArExtr2;
|
||||
nbpt = 2;
|
||||
}
|
||||
else {
|
||||
// treat the middle point as an intersection point
|
||||
W1[0] = 0.5*(UMinCh+UMaxCh);
|
||||
W2[0] = 0.5*(UMinAr+UMaxAr);
|
||||
refine[0] = Standard_True;
|
||||
}
|
||||
}
|
||||
|
||||
Standard_Integer nbTreated = 0;
|
||||
for (Standard_Integer ip=0; ip < nbpt; ip++) {
|
||||
GetLinePoint2d (L, W1[ip]+1, !OnFirst, U,V);
|
||||
// We do not need in putting vertex into tangent zone(s).
|
||||
// Therefore, only section points are interested by us.
|
||||
// Boundary of WLine (its first/last points) will be
|
||||
// marked by some vertex later. See bug #29494.
|
||||
const Standard_Integer aNbSectionPts = Commun.NbSectionPoints();
|
||||
for (i = 1; i <= aNbSectionPts; i++)
|
||||
{
|
||||
const Standard_Real aW1 = Commun.PntValue(i).ParamOnFirst(),
|
||||
aW2 = Commun.PntValue(i).ParamOnSecond();
|
||||
|
||||
if (!refine[ip] && useWL[ip]) {
|
||||
Standard_Real aU1,aV1;
|
||||
GetLinePoint2d (L, W1[ip]+1, OnFirst, aU1,aV1);
|
||||
p2d.SetCoord(aU1,aV1);
|
||||
Standard_Real paramProj;
|
||||
if (!IntPatch_HInterTool::Project(arc,p2d,paramProj,p2d)) continue;
|
||||
W = paramProj;
|
||||
}
|
||||
else {
|
||||
Standard_Real par = IntegerPart(W2[ip]);
|
||||
Standard_Integer Irang = Standard_Integer(par) + 1;
|
||||
if (Irang == Brise.NbPoints()) {
|
||||
Irang--;
|
||||
par = 1.;
|
||||
}
|
||||
else {
|
||||
par =Abs(W2[ip]-par);
|
||||
}
|
||||
W = (1.-par)*Brise.Parameter(Irang) + par*Brise.Parameter(Irang+1);
|
||||
}
|
||||
Standard_Integer nbTreated = 0;
|
||||
GetLinePoint2d (L, aW1+1, !OnFirst, U,V);
|
||||
|
||||
Standard_Boolean refined = Standard_False;
|
||||
if (refine[ip])
|
||||
Standard_Real par = IntegerPart(aW2);
|
||||
Standard_Integer Irang = Standard_Integer(par) + 1;
|
||||
if (Irang == Brise.NbPoints())
|
||||
{
|
||||
Irang--;
|
||||
par = 1.;
|
||||
}
|
||||
else
|
||||
{
|
||||
par = Abs(aW2 - par);
|
||||
}
|
||||
|
||||
W = (1. - par)*Brise.Parameter(Irang) + par*Brise.Parameter(Irang + 1);
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
//-- On a trouve un point 2d approche Ua,Va intersection de la ligne
|
||||
//-- de cheminement et de la restriction.
|
||||
//--
|
||||
//-- On injecte ce point ds les intersections Courbe-Surface
|
||||
//--
|
||||
IntPatch_CSFunction thefunc(OtherSurf,arc,Surf);
|
||||
// MSV: extend UV bounds to not miss solution near the boundary
|
||||
const Standard_Real margCoef = 0.004;
|
||||
Standard_Boolean refined = Standard_False;
|
||||
IntPatch_CurvIntSurf IntCS(U,V,W,thefunc,edgeTol,margCoef);
|
||||
if (IntCS.IsDone() && !IntCS.IsEmpty())
|
||||
{
|
||||
ptsommet = IntCS.Point();
|
||||
IntCS.ParameterOnSurface(U2,V2);
|
||||
gp_Pnt anOldPnt, aNewPnt;
|
||||
OtherSurf->D0(U,V, anOldPnt);
|
||||
OtherSurf->D0(U2,V2, aNewPnt);
|
||||
if (anOldPnt.SquareDistance(aNewPnt) < Precision::SquareConfusion())
|
||||
{
|
||||
//------------------------------------------------------------------------
|
||||
//-- On a trouve un point 2d approche Ua,Va intersection de la ligne
|
||||
//-- de cheminement et de la restriction.
|
||||
//--
|
||||
//-- On injecte ce point ds les intersections Courbe-Surface
|
||||
//--
|
||||
IntPatch_CSFunction thefunc(OtherSurf,arc,Surf);
|
||||
// MSV: extend UV bounds to not miss solution near the boundary
|
||||
Standard_Real margCoef = 0.004;
|
||||
IntPatch_CurvIntSurf IntCS(U,V,W,thefunc,edgeTol,margCoef);
|
||||
if (IntCS.IsDone())
|
||||
{
|
||||
if (!IntCS.IsEmpty())
|
||||
{
|
||||
ptsommet = IntCS.Point();
|
||||
IntCS.ParameterOnSurface(U2,V2);
|
||||
gp_Pnt anOldPnt, aNewPnt;
|
||||
OtherSurf->D0(U,V, anOldPnt);
|
||||
OtherSurf->D0(U2,V2, aNewPnt);
|
||||
if (anOldPnt.SquareDistance(aNewPnt) < Precision::Confusion()
|
||||
* Precision::Confusion())
|
||||
{
|
||||
U2 = U;
|
||||
V2 = V;
|
||||
}
|
||||
paramarc = IntCS.ParameterOnCurve();
|
||||
refined = Standard_True;
|
||||
}
|
||||
}
|
||||
U2 = U;
|
||||
V2 = V;
|
||||
}
|
||||
else {
|
||||
U2 = U; V2 = V;
|
||||
paramarc = W;
|
||||
arc->D0(paramarc,p2d);
|
||||
Surf->D0(p2d.X(),p2d.Y(),ptsommet);
|
||||
paramarc = IntCS.ParameterOnCurve();
|
||||
refined = Standard_True;
|
||||
}
|
||||
|
||||
if (refined) {
|
||||
duplicate = Standard_False;
|
||||
for (j=1; j<=locpt.Length();j++) {
|
||||
if (ptsommet.Distance(locpt(j)) <= edgeTol) {
|
||||
if (possiblyClosed) {
|
||||
locpt2(j).Coord(U,V);
|
||||
if ((OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed) ||
|
||||
(OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed))
|
||||
continue;
|
||||
}
|
||||
duplicate = Standard_True;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!refine[ip] || refined) {
|
||||
duplicate = Standard_False;
|
||||
for (j=1; j<=locpt.Length();j++) {
|
||||
if (ptsommet.Distance(locpt(j)) <= edgeTol) {
|
||||
if (possiblyClosed) {
|
||||
locpt2(j).Coord(U,V);
|
||||
if ((OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed) ||
|
||||
(OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed))
|
||||
continue;
|
||||
}
|
||||
duplicate = Standard_True;
|
||||
break;
|
||||
if (!duplicate) {
|
||||
Standard_Integer ParamApproxOnLine = Standard_Integer(aW1)+1;
|
||||
|
||||
arc->D1(paramarc,p2d,d2d);
|
||||
U1 = p2d.X(); V1 = p2d.Y();
|
||||
if (typL == IntPatch_Walking && SurfaceIsPeriodic) {
|
||||
if (OnFirst)
|
||||
Recadre(TypeS1,TypeS2,wlin,ParamApproxOnLine,U1,V1,U2,V2);
|
||||
else
|
||||
Recadre(TypeS1,TypeS2,wlin,ParamApproxOnLine,U2,V2,U1,V1);
|
||||
}
|
||||
locpt.Append(ptsommet);
|
||||
locpt2.Append(gp_Pnt2d(U2,V2));
|
||||
|
||||
found = FindParameter(L,OtherSurf,edgeTol,ptsommet,gp_Pnt2d(U2,V2),
|
||||
paramline,tgline,ParamApproxOnLine,OnFirst);
|
||||
|
||||
if (typL == IntPatch_Walking && found && possiblyClosed) {
|
||||
// check in 2d
|
||||
if (SurfaceIsUClosed || SurfaceIsVClosed) {
|
||||
GetLinePoint2d (L, paramline, OnFirst, U,V);
|
||||
if ((SurfaceIsUClosed && Abs(U-U1) > tolUClosed) ||
|
||||
(SurfaceIsVClosed && Abs(V-V1) > tolVClosed))
|
||||
found = Standard_False;
|
||||
}
|
||||
if (found && (OSurfaceIsUClosed || OSurfaceIsVClosed)) {
|
||||
GetLinePoint2d (L, paramline, !OnFirst, U,V);
|
||||
if ((OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed) ||
|
||||
(OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed))
|
||||
found = Standard_False;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!duplicate) {
|
||||
Standard_Integer ParamApproxOnLine = Standard_Integer(W1[ip])+1;
|
||||
VtxOnArc = CoincideOnArc(ptsommet,arc,Surf,edgeTol,Domain,vtxarc);
|
||||
Standard_Real vtxTol;
|
||||
if (VtxOnArc) {
|
||||
vtxTol = Tol3d(vtxarc,Domain);
|
||||
if (edgeTol > vtxTol) vtxTol = edgeTol;
|
||||
}
|
||||
else vtxTol = edgeTol;
|
||||
|
||||
arc->D1(paramarc,p2d,d2d);
|
||||
U1 = p2d.X(); V1 = p2d.Y();
|
||||
if (typL == IntPatch_Walking && SurfaceIsPeriodic) {
|
||||
if (OnFirst)
|
||||
Recadre(TypeS1,TypeS2,wlin,ParamApproxOnLine,U1,V1,U2,V2);
|
||||
else
|
||||
Recadre(TypeS1,TypeS2,wlin,ParamApproxOnLine,U2,V2,U1,V1);
|
||||
}
|
||||
locpt.Append(ptsommet);
|
||||
locpt2.Append(gp_Pnt2d(U2,V2));
|
||||
|
||||
found = FindParameter(L,OtherSurf,edgeTol,ptsommet,gp_Pnt2d(U2,V2),
|
||||
paramline,tgline,ParamApproxOnLine,OnFirst);
|
||||
|
||||
if (typL == IntPatch_Walking && found && possiblyClosed) {
|
||||
// check in 2d
|
||||
if (SurfaceIsUClosed || SurfaceIsVClosed) {
|
||||
GetLinePoint2d (L, paramline, OnFirst, U,V);
|
||||
if ((SurfaceIsUClosed && Abs(U-U1) > tolUClosed) ||
|
||||
(SurfaceIsVClosed && Abs(V-V1) > tolVClosed))
|
||||
found = Standard_False;
|
||||
}
|
||||
if (found && (OSurfaceIsUClosed || OSurfaceIsVClosed)) {
|
||||
GetLinePoint2d (L, paramline, !OnFirst, U,V);
|
||||
if ((OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed) ||
|
||||
(OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed))
|
||||
found = Standard_False;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
continue;
|
||||
}
|
||||
|
||||
VtxOnArc = CoincideOnArc(ptsommet,arc,Surf,edgeTol,Domain,vtxarc);
|
||||
Standard_Real vtxTol;
|
||||
if (VtxOnArc) {
|
||||
vtxTol = Tol3d(vtxarc,Domain);
|
||||
if (edgeTol > vtxTol) vtxTol = edgeTol;
|
||||
}
|
||||
else vtxTol = edgeTol;
|
||||
|
||||
//-- It is necessary to test that the point does not already exist
|
||||
//-- - It can be already a point on arc
|
||||
//-- BUT on a different arc
|
||||
// MSV 27.03.2002: find the nearest point; add check in 2d
|
||||
Standard_Integer ivtx = 0;
|
||||
Standard_Real dmin = RealLast();
|
||||
for (j=1; j<=Nbvtx; j++) {
|
||||
const IntPatch_Point& Rptline = (typL == IntPatch_Walking
|
||||
? wlin->Vertex(j)
|
||||
: rlin->Vertex(j));
|
||||
Standard_Boolean APointOnRstStillExist =
|
||||
((OnFirst && Rptline.IsOnDomS1() && Rptline.ArcOnS1() == arc) ||
|
||||
(!OnFirst && Rptline.IsOnDomS2() && Rptline.ArcOnS2() == arc));
|
||||
if(!APointOnRstStillExist) {
|
||||
if (possiblyClosed) {
|
||||
if (SurfaceIsUClosed || SurfaceIsVClosed) {
|
||||
if (OnFirst) Rptline.ParametersOnS1(U,V);
|
||||
else Rptline.ParametersOnS2(U,V);
|
||||
if ((SurfaceIsUClosed && Abs(U-U1) > tolUClosed) ||
|
||||
(SurfaceIsVClosed && Abs(V-V1) > tolVClosed))
|
||||
continue;
|
||||
}
|
||||
if (OSurfaceIsUClosed || OSurfaceIsVClosed) {
|
||||
if (OnFirst) Rptline.ParametersOnS2(U,V);
|
||||
else Rptline.ParametersOnS1(U,V);
|
||||
if ((OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed) ||
|
||||
(OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed))
|
||||
continue;
|
||||
}
|
||||
//-- It is necessary to test that the point does not already exist
|
||||
//-- - It can be already a point on arc
|
||||
//-- BUT on a different arc
|
||||
// MSV 27.03.2002: find the nearest point; add check in 2d
|
||||
Standard_Integer ivtx = 0;
|
||||
Standard_Real dmin = RealLast();
|
||||
for (j=1; j<=Nbvtx; j++) {
|
||||
const IntPatch_Point& Rptline = (typL == IntPatch_Walking
|
||||
? wlin->Vertex(j)
|
||||
: rlin->Vertex(j));
|
||||
Standard_Boolean APointOnRstStillExist =
|
||||
((OnFirst && Rptline.IsOnDomS1() && Rptline.ArcOnS1() == arc) ||
|
||||
(!OnFirst && Rptline.IsOnDomS2() && Rptline.ArcOnS2() == arc));
|
||||
if(!APointOnRstStillExist) {
|
||||
if (possiblyClosed) {
|
||||
if (SurfaceIsUClosed || SurfaceIsVClosed) {
|
||||
if (OnFirst) Rptline.ParametersOnS1(U,V);
|
||||
else Rptline.ParametersOnS2(U,V);
|
||||
if ((SurfaceIsUClosed && Abs(U-U1) > tolUClosed) ||
|
||||
(SurfaceIsVClosed && Abs(V-V1) > tolVClosed))
|
||||
continue;
|
||||
}
|
||||
Standard_Real dist = ptsommet.Distance(Rptline.Value());
|
||||
Standard_Real dt = Max(vtxTol, Rptline.Tolerance());
|
||||
if (dist < dmin) {
|
||||
if (dist <= dt) {
|
||||
ptline = Rptline;
|
||||
ivtx = j;
|
||||
if( surfacetype == GeomAbs_Cone ) {
|
||||
ivtx = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// cancel previous solution because this point is better
|
||||
// but its tolerance is not large enough
|
||||
if (OSurfaceIsUClosed || OSurfaceIsVClosed) {
|
||||
if (OnFirst) Rptline.ParametersOnS2(U,V);
|
||||
else Rptline.ParametersOnS1(U,V);
|
||||
if ((OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed) ||
|
||||
(OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Standard_Real dist = ptsommet.Distance(Rptline.Value());
|
||||
Standard_Real dt = Max(vtxTol, Rptline.Tolerance());
|
||||
if (dist < dmin) {
|
||||
if (dist <= dt) {
|
||||
ptline = Rptline;
|
||||
ivtx = j;
|
||||
if( surfacetype == GeomAbs_Cone ) {
|
||||
ivtx = 0;
|
||||
}
|
||||
dmin = dist;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ivtx) {
|
||||
if (ptline.Tolerance() > vtxTol) {
|
||||
vtxTol = ptline.Tolerance();
|
||||
if (!VtxOnArc) {
|
||||
// now we should repeat attempt to coincide on a bound of arc
|
||||
VtxOnArc = CoincideOnArc(ptsommet,arc,Surf,vtxTol,Domain,vtxarc);
|
||||
if (VtxOnArc) {
|
||||
Standard_Real tol = Tol3d(vtxarc,Domain);
|
||||
if (tol > vtxTol) vtxTol = tol;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (typL == IntPatch_Walking)
|
||||
VerifyTgline(wlin,(Standard_Integer)paramline,edgeTol,tgline);
|
||||
|
||||
Surf->D1(U1,V1,ptbid,d1u,d1v);
|
||||
tgrst.SetLinearForm(d2d.X(),d1u,d2d.Y(),d1v);
|
||||
|
||||
normsurf = d1u.Crossed(d1v);
|
||||
if (normsurf.Magnitude() < gp::Resolution()) {
|
||||
transline.SetValue(Standard_True,IntSurf_Undecided);
|
||||
transarc.SetValue(Standard_True,IntSurf_Undecided);
|
||||
}
|
||||
else
|
||||
IntSurf::MakeTransition(tgline,tgrst,normsurf,transline,transarc);
|
||||
|
||||
if (typL == IntPatch_Walking && !refine[ip]) {
|
||||
// for new vertex use coordinates from Line
|
||||
if (OnFirst)
|
||||
GetWLinePoint (wlin, paramline, U1,V1,U2,V2,ptsommet);
|
||||
else
|
||||
GetWLinePoint (wlin, paramline, U2,V2,U1,V1,ptsommet);
|
||||
}
|
||||
|
||||
nbTreated++;
|
||||
if (!ivtx) {
|
||||
Sommet.SetValue(ptsommet,vtxTol,Standard_False); // pour tangence
|
||||
if (OnFirst)
|
||||
Sommet.SetParameters(U1,V1,U2,V2);
|
||||
else
|
||||
Sommet.SetParameters(U2,V2,U1,V1);
|
||||
|
||||
if (VtxOnArc)
|
||||
Sommet.SetVertex(OnFirst,vtxarc);
|
||||
|
||||
//---------------------------------------------------------
|
||||
//-- lbr : On remplace le point d indice paramline sur la -
|
||||
//-- ligne par le vertex . -
|
||||
//---------------------------------------------------------
|
||||
Sommet.SetParameter(paramline); // sur ligne d intersection
|
||||
Sommet.SetArc(OnFirst,arc,paramarc,transline,transarc);
|
||||
|
||||
if (typL == IntPatch_Walking) {
|
||||
wlin->AddVertex(Sommet);
|
||||
Nbvtx++;
|
||||
}
|
||||
else {
|
||||
rlin->AddVertex(Sommet);
|
||||
Nbvtx++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// CAS DE FIGURE : en appelant s1 la surf sur laquelle on
|
||||
// connait les pts sur restriction, et s2 celle sur laquelle
|
||||
// on les cherche. Le point trouve verifie necessairement
|
||||
// IsOnDomS1 = True.
|
||||
// Pas vtxS1, pas vtxS2 :
|
||||
// on recupere le point et on applique SetArcOnS2 et
|
||||
// eventuellement SetVertexOnS2. Si on a deja IsOnDomS2,
|
||||
// on considere que le point est deja traite, mais ne devrait
|
||||
// pas se produire.
|
||||
// vtxS1, pas vtxS2 :
|
||||
// si pas IsOnDomS2 : pour chaque occurrence, faire SetArcOnS2,
|
||||
// et eventuellement SetVertexOnS2.
|
||||
// si IsOnDomS2 : impossible, on doit avoir IsVtxOnS2.
|
||||
// vtxS1,vtxS2 :
|
||||
// on doit avoir VtxOnArc = True. On duplique chaque occurrence
|
||||
// "sur S1" du point en changeant ArcOnS2.
|
||||
// pas vtxS1, vtxS2 :
|
||||
// on doit avoir VtxOnArc = True. On duplique le point sur S1
|
||||
// en changeant ArcOnS2.
|
||||
Standard_Boolean OnDifferentRst =
|
||||
((OnFirst && ptline.IsOnDomS1() && ptline.ArcOnS1() != arc) ||
|
||||
(!OnFirst && ptline.IsOnDomS2() && ptline.ArcOnS2() != arc));
|
||||
ptline.SetTolerance(vtxTol);
|
||||
if ( (!ptline.IsVertexOnS1() && OnFirst)
|
||||
|| (!ptline.IsVertexOnS2() && !OnFirst)
|
||||
|| (OnDifferentRst)) {
|
||||
if ( (!ptline.IsOnDomS2() && !OnFirst)
|
||||
||(!ptline.IsOnDomS1() && OnFirst)
|
||||
||(OnDifferentRst)) {
|
||||
ptline.SetArc(OnFirst,arc,paramarc,transline,transarc);
|
||||
//ptline.SetParameter(paramline); //-- rajout lbr le 20 nov 97
|
||||
if (VtxOnArc)
|
||||
ptline.SetVertex(OnFirst,vtxarc);
|
||||
if (typL == IntPatch_Walking) {
|
||||
if(OnDifferentRst) {
|
||||
wlin->AddVertex(ptline);
|
||||
Nbvtx++;
|
||||
}
|
||||
else {
|
||||
wlin->Replace(ivtx,ptline);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(OnDifferentRst) {
|
||||
rlin->AddVertex(ptline);
|
||||
Nbvtx++;
|
||||
}
|
||||
else {
|
||||
rlin->Replace(ivtx,ptline);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( ( OnFirst && ptline.IsVertexOnS2())
|
||||
||(!OnFirst && ptline.IsVertexOnS1())) {
|
||||
Sommet = ptline;
|
||||
Sommet.SetArc(OnFirst,arc,paramarc,transline,transarc);
|
||||
if (VtxOnArc)
|
||||
Sommet.SetVertex(OnFirst,vtxarc);
|
||||
if (typL == IntPatch_Walking) {
|
||||
wlin->AddVertex(Sommet);
|
||||
Nbvtx++;
|
||||
}
|
||||
else {
|
||||
rlin->AddVertex(Sommet);
|
||||
Nbvtx++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
//-- cout << "pb dans RstInt Type 1 " << endl;
|
||||
// cancel previous solution because this point is better
|
||||
// but its tolerance is not large enough
|
||||
ivtx = 0;
|
||||
}
|
||||
dmin = dist;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ivtx) {
|
||||
if (ptline.Tolerance() > vtxTol) {
|
||||
vtxTol = ptline.Tolerance();
|
||||
if (!VtxOnArc) {
|
||||
// now we should repeat attempt to coincide on a bound of arc
|
||||
VtxOnArc = CoincideOnArc(ptsommet,arc,Surf,vtxTol,Domain,vtxarc);
|
||||
if (VtxOnArc) {
|
||||
Standard_Real tol = Tol3d(vtxarc,Domain);
|
||||
if (tol > vtxTol) vtxTol = tol;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Handle(Adaptor3d_HVertex) vtxref = (OnFirst)? (ptline.VertexOnS1()) : (ptline.VertexOnS2()) ;
|
||||
if ( ( OnFirst && !ptline.IsOnDomS2())
|
||||
||(!OnFirst && !ptline.IsOnDomS1())) {
|
||||
ptline.SetArc(OnFirst,arc,paramarc,transline,transarc);
|
||||
if (VtxOnArc)
|
||||
ptline.SetVertex(OnFirst,vtxarc);
|
||||
if (typL == IntPatch_Walking) {
|
||||
}
|
||||
}
|
||||
|
||||
if (typL == IntPatch_Walking)
|
||||
VerifyTgline(wlin,(Standard_Integer)paramline,edgeTol,tgline);
|
||||
|
||||
Surf->D1(U1,V1,ptbid,d1u,d1v);
|
||||
tgrst.SetLinearForm(d2d.X(),d1u,d2d.Y(),d1v);
|
||||
|
||||
normsurf = d1u.Crossed(d1v);
|
||||
if (normsurf.Magnitude() < gp::Resolution()) {
|
||||
transline.SetValue(Standard_True,IntSurf_Undecided);
|
||||
transarc.SetValue(Standard_True,IntSurf_Undecided);
|
||||
}
|
||||
else
|
||||
IntSurf::MakeTransition(tgline,tgrst,normsurf,transline,transarc);
|
||||
|
||||
nbTreated++;
|
||||
if (!ivtx) {
|
||||
Sommet.SetValue(ptsommet,vtxTol,Standard_False); // pour tangence
|
||||
if (OnFirst)
|
||||
Sommet.SetParameters(U1,V1,U2,V2);
|
||||
else
|
||||
Sommet.SetParameters(U2,V2,U1,V1);
|
||||
|
||||
if (VtxOnArc)
|
||||
Sommet.SetVertex(OnFirst,vtxarc);
|
||||
|
||||
//---------------------------------------------------------
|
||||
//-- lbr : On remplace le point d indice paramline sur la -
|
||||
//-- ligne par le vertex . -
|
||||
//---------------------------------------------------------
|
||||
Sommet.SetParameter(paramline); // sur ligne d intersection
|
||||
Sommet.SetArc(OnFirst,arc,paramarc,transline,transarc);
|
||||
|
||||
if (typL == IntPatch_Walking) {
|
||||
wlin->AddVertex(Sommet);
|
||||
Nbvtx++;
|
||||
}
|
||||
else {
|
||||
rlin->AddVertex(Sommet);
|
||||
Nbvtx++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// CAS DE FIGURE : en appelant s1 la surf sur laquelle on
|
||||
// connait les pts sur restriction, et s2 celle sur laquelle
|
||||
// on les cherche. Le point trouve verifie necessairement
|
||||
// IsOnDomS1 = True.
|
||||
// Pas vtxS1, pas vtxS2 :
|
||||
// on recupere le point et on applique SetArcOnS2 et
|
||||
// eventuellement SetVertexOnS2. Si on a deja IsOnDomS2,
|
||||
// on considere que le point est deja traite, mais ne devrait
|
||||
// pas se produire.
|
||||
// vtxS1, pas vtxS2 :
|
||||
// si pas IsOnDomS2 : pour chaque occurrence, faire SetArcOnS2,
|
||||
// et eventuellement SetVertexOnS2.
|
||||
// si IsOnDomS2 : impossible, on doit avoir IsVtxOnS2.
|
||||
// vtxS1,vtxS2 :
|
||||
// on doit avoir VtxOnArc = True. On duplique chaque occurrence
|
||||
// "sur S1" du point en changeant ArcOnS2.
|
||||
// pas vtxS1, vtxS2 :
|
||||
// on doit avoir VtxOnArc = True. On duplique le point sur S1
|
||||
// en changeant ArcOnS2.
|
||||
Standard_Boolean OnDifferentRst =
|
||||
((OnFirst && ptline.IsOnDomS1() && ptline.ArcOnS1() != arc) ||
|
||||
(!OnFirst && ptline.IsOnDomS2() && ptline.ArcOnS2() != arc));
|
||||
ptline.SetTolerance(vtxTol);
|
||||
if ( (!ptline.IsVertexOnS1() && OnFirst)
|
||||
|| (!ptline.IsVertexOnS2() && !OnFirst)
|
||||
|| (OnDifferentRst)) {
|
||||
if ( (!ptline.IsOnDomS2() && !OnFirst)
|
||||
||(!ptline.IsOnDomS1() && OnFirst)
|
||||
||(OnDifferentRst)) {
|
||||
ptline.SetArc(OnFirst,arc,paramarc,transline,transarc);
|
||||
//ptline.SetParameter(paramline); //-- rajout lbr le 20 nov 97
|
||||
if (VtxOnArc)
|
||||
ptline.SetVertex(OnFirst,vtxarc);
|
||||
if (typL == IntPatch_Walking) {
|
||||
if(OnDifferentRst) {
|
||||
wlin->AddVertex(ptline);
|
||||
Nbvtx++;
|
||||
}
|
||||
else {
|
||||
wlin->Replace(ivtx,ptline);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(OnDifferentRst) {
|
||||
rlin->AddVertex(ptline);
|
||||
Nbvtx++;
|
||||
}
|
||||
else {
|
||||
rlin->Replace(ivtx,ptline);
|
||||
}
|
||||
|
||||
for (k=1; k<=Nbvtx; k++) if (k != ivtx) {
|
||||
if (typL == IntPatch_Walking) {
|
||||
ptline = wlin->Vertex(k);
|
||||
}
|
||||
else {
|
||||
ptline = rlin->Vertex(k);
|
||||
}
|
||||
if ( ( OnFirst && ptline.IsVertexOnS1())
|
||||
|| (!OnFirst && ptline.IsVertexOnS2())) {
|
||||
if (Domain->Identical(vtxref, (OnFirst)? (ptline.VertexOnS1()) : (ptline.VertexOnS2()))) {
|
||||
if (ptline.Tolerance() < vtxTol) ptline.SetTolerance(vtxTol);
|
||||
ptline.SetArc(OnFirst,arc,paramarc,transline,transarc);
|
||||
if (VtxOnArc)
|
||||
ptline.SetVertex(OnFirst,vtxarc);
|
||||
if (typL == IntPatch_Walking) {
|
||||
wlin->Replace(k,ptline);
|
||||
}
|
||||
else {
|
||||
rlin->Replace(k,ptline);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( ( OnFirst && ptline.IsVertexOnS2())
|
||||
|| (!OnFirst && ptline.IsVertexOnS1())) {
|
||||
// on doit avoir vtxons2 = vtxarc... pas de verif...
|
||||
Sommet = ptline;
|
||||
Sommet.SetArc(OnFirst,arc,paramarc,transline,transarc);
|
||||
if (typL == IntPatch_Walking) {
|
||||
wlin->AddVertex(Sommet);
|
||||
Nbvtx++;
|
||||
}
|
||||
else {
|
||||
rlin->AddVertex(Sommet);
|
||||
Nbvtx++;
|
||||
}
|
||||
for (k=1; k<=Nbvtx; k++) if (k != ivtx) {
|
||||
if (typL == IntPatch_Walking) {
|
||||
ptline = wlin->Vertex(k);
|
||||
}
|
||||
else {
|
||||
ptline = rlin->Vertex(k);
|
||||
}
|
||||
if ( ( OnFirst && ptline.IsVertexOnS1())
|
||||
||(!OnFirst && ptline.IsVertexOnS2())) {
|
||||
if (Domain->Identical(vtxref,(OnFirst)? (ptline.VertexOnS1()) : (ptline.VertexOnS2()))) {
|
||||
if (ptline.Tolerance() < vtxTol) ptline.SetTolerance(vtxTol);
|
||||
Sommet = ptline;
|
||||
Sommet.SetArc(OnFirst,arc,paramarc,transline,transarc);
|
||||
if (typL == IntPatch_Walking) {
|
||||
wlin->Replace(k,ptline);
|
||||
wlin->AddVertex(Sommet);
|
||||
Nbvtx++;
|
||||
}
|
||||
else {
|
||||
rlin->Replace(k,ptline);
|
||||
rlin->AddVertex(Sommet);
|
||||
Nbvtx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if ( ( OnFirst && ptline.IsVertexOnS2())
|
||||
||(!OnFirst && ptline.IsVertexOnS1())) {
|
||||
Sommet = ptline;
|
||||
Sommet.SetArc(OnFirst,arc,paramarc,transline,transarc);
|
||||
if (VtxOnArc)
|
||||
Sommet.SetVertex(OnFirst,vtxarc);
|
||||
if (typL == IntPatch_Walking) {
|
||||
wlin->AddVertex(Sommet);
|
||||
Nbvtx++;
|
||||
}
|
||||
else {
|
||||
//-- cout << "pb dans RstInt Type 2 " << endl;
|
||||
rlin->AddVertex(Sommet);
|
||||
Nbvtx++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
//-- cout << "pb dans RstInt Type 1 " << endl;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Handle(Adaptor3d_HVertex) vtxref = (OnFirst)? (ptline.VertexOnS1()) : (ptline.VertexOnS2()) ;
|
||||
if ( ( OnFirst && !ptline.IsOnDomS2())
|
||||
||(!OnFirst && !ptline.IsOnDomS1())) {
|
||||
ptline.SetArc(OnFirst,arc,paramarc,transline,transarc);
|
||||
if (VtxOnArc)
|
||||
ptline.SetVertex(OnFirst,vtxarc);
|
||||
if (typL == IntPatch_Walking) {
|
||||
wlin->Replace(ivtx,ptline);
|
||||
}
|
||||
else {
|
||||
rlin->Replace(ivtx,ptline);
|
||||
}
|
||||
|
||||
for (k=1; k<=Nbvtx; k++) if (k != ivtx) {
|
||||
if (typL == IntPatch_Walking) {
|
||||
ptline = wlin->Vertex(k);
|
||||
}
|
||||
else {
|
||||
ptline = rlin->Vertex(k);
|
||||
}
|
||||
if ( ( OnFirst && ptline.IsVertexOnS1())
|
||||
|| (!OnFirst && ptline.IsVertexOnS2())) {
|
||||
if (Domain->Identical(vtxref, (OnFirst)? (ptline.VertexOnS1()) : (ptline.VertexOnS2()))) {
|
||||
if (ptline.Tolerance() < vtxTol) ptline.SetTolerance(vtxTol);
|
||||
ptline.SetArc(OnFirst,arc,paramarc,transline,transarc);
|
||||
if (VtxOnArc)
|
||||
ptline.SetVertex(OnFirst,vtxarc);
|
||||
if (typL == IntPatch_Walking) {
|
||||
wlin->Replace(k,ptline);
|
||||
}
|
||||
else {
|
||||
rlin->Replace(k,ptline);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( ( OnFirst && ptline.IsVertexOnS2())
|
||||
|| (!OnFirst && ptline.IsVertexOnS1())) {
|
||||
// on doit avoir vtxons2 = vtxarc... pas de verif...
|
||||
Sommet = ptline;
|
||||
Sommet.SetArc(OnFirst,arc,paramarc,transline,transarc);
|
||||
if (typL == IntPatch_Walking) {
|
||||
wlin->AddVertex(Sommet);
|
||||
Nbvtx++;
|
||||
}
|
||||
else {
|
||||
rlin->AddVertex(Sommet);
|
||||
Nbvtx++;
|
||||
}
|
||||
for (k=1; k<=Nbvtx; k++) if (k != ivtx) {
|
||||
if (typL == IntPatch_Walking) {
|
||||
ptline = wlin->Vertex(k);
|
||||
}
|
||||
else {
|
||||
ptline = rlin->Vertex(k);
|
||||
}
|
||||
if ( ( OnFirst && ptline.IsVertexOnS1())
|
||||
||(!OnFirst && ptline.IsVertexOnS2())) {
|
||||
if (Domain->Identical(vtxref,(OnFirst)? (ptline.VertexOnS1()) : (ptline.VertexOnS2()))) {
|
||||
if (ptline.Tolerance() < vtxTol) ptline.SetTolerance(vtxTol);
|
||||
Sommet = ptline;
|
||||
Sommet.SetArc(OnFirst,arc,paramarc,transline,transarc);
|
||||
if (typL == IntPatch_Walking) {
|
||||
wlin->Replace(k,ptline);
|
||||
wlin->AddVertex(Sommet);
|
||||
Nbvtx++;
|
||||
}
|
||||
else {
|
||||
rlin->Replace(k,ptline);
|
||||
rlin->AddVertex(Sommet);
|
||||
Nbvtx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
//-- cout << "pb dans RstInt Type 2 " << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1218,8 +1218,7 @@ Handle(IntPatch_WLine) IntPatch_WLineTool::
|
||||
const Handle(Adaptor3d_HSurface) &theS1,
|
||||
const Handle(Adaptor3d_HSurface) &theS2,
|
||||
const Handle(Adaptor3d_TopolTool) &theDom1,
|
||||
const Handle(Adaptor3d_TopolTool) &theDom2,
|
||||
const Standard_Boolean theRestrictLine)
|
||||
const Handle(Adaptor3d_TopolTool) &theDom2)
|
||||
{
|
||||
Standard_Integer i, k, v, nb, nbvtx;
|
||||
Handle(IntPatch_WLine) aResult;
|
||||
@@ -1322,11 +1321,8 @@ Handle(IntPatch_WLine) IntPatch_WLineTool::
|
||||
return aLocalWLine;
|
||||
}
|
||||
|
||||
if (theRestrictLine)
|
||||
{
|
||||
// II: Delete out of borders points.
|
||||
aLocalWLine = DeleteOuterPoints(aLocalWLine, theS1, theS2, theDom1, theDom2);
|
||||
}
|
||||
// II: Delete out of borders points.
|
||||
aLocalWLine = DeleteOuterPoints(aLocalWLine, theS1, theS2, theDom1, theDom2);
|
||||
|
||||
// III: Delete points by tube criteria.
|
||||
Handle(IntPatch_WLine) aLocalWLineTube =
|
||||
|
@@ -34,7 +34,6 @@ public:
|
||||
//!
|
||||
//! II
|
||||
//! Removes point out of borders in case of non periodic surfaces.
|
||||
//! This step is done only if theRestrictLine is true.
|
||||
//!
|
||||
//! III
|
||||
//! Removes exceed points using tube criteria:
|
||||
@@ -48,8 +47,7 @@ public:
|
||||
const Handle(Adaptor3d_HSurface) &theS1,
|
||||
const Handle(Adaptor3d_HSurface) &theS2,
|
||||
const Handle(Adaptor3d_TopolTool) &theDom1,
|
||||
const Handle(Adaptor3d_TopolTool) &theDom2,
|
||||
const Standard_Boolean theRestrictLine);
|
||||
const Handle(Adaptor3d_TopolTool) &theDom2);
|
||||
|
||||
//! Joins all WLines from theSlin to one if it is possible and records
|
||||
//! the result into theSlin again. Lines will be kept to be splitted if:
|
||||
|
@@ -358,8 +358,6 @@ static Standard_Boolean isTreatAnalityc(const BRepAdaptor_Surface& theBAS1,
|
||||
void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
|
||||
const TopoDS_Face& aF2)
|
||||
{
|
||||
Standard_Boolean RestrictLine = Standard_False;
|
||||
|
||||
if (myContext.IsNull()) {
|
||||
myContext=new IntTools_Context;
|
||||
}
|
||||
@@ -509,14 +507,6 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
|
||||
myIntersector.SetTolerances(TolArc, TolTang, UVMaxStep, Deflection);
|
||||
}
|
||||
|
||||
if((myHS1->IsUClosed() && !myHS1->IsUPeriodic()) ||
|
||||
(myHS1->IsVClosed() && !myHS1->IsVPeriodic()) ||
|
||||
(myHS2->IsUClosed() && !myHS2->IsUPeriodic()) ||
|
||||
(myHS2->IsVClosed() && !myHS2->IsVPeriodic()))
|
||||
{
|
||||
RestrictLine = Standard_True;
|
||||
}
|
||||
//
|
||||
if((aType1 != GeomAbs_BSplineSurface) &&
|
||||
(aType1 != GeomAbs_BezierSurface) &&
|
||||
(aType1 != GeomAbs_OtherSurface) &&
|
||||
@@ -524,8 +514,6 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
|
||||
(aType2 != GeomAbs_BezierSurface) &&
|
||||
(aType2 != GeomAbs_OtherSurface))
|
||||
{
|
||||
RestrictLine = Standard_True;
|
||||
|
||||
if ((aType1 == GeomAbs_Torus) ||
|
||||
(aType2 == GeomAbs_Torus))
|
||||
{
|
||||
@@ -533,27 +521,6 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if(!RestrictLine)
|
||||
{
|
||||
TopExp_Explorer aExp;
|
||||
for(Standard_Integer i = 0; (!RestrictLine) && (i < 2); i++)
|
||||
{
|
||||
const TopoDS_Face& aF=(!i) ? myFace1 : myFace2;
|
||||
aExp.Init(aF, TopAbs_EDGE);
|
||||
for(; aExp.More(); aExp.Next())
|
||||
{
|
||||
const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current());
|
||||
|
||||
if(BRep_Tool::Degenerated(aE))
|
||||
{
|
||||
RestrictLine = Standard_True;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef INTTOOLS_FACEFACE_DEBUG
|
||||
if(!myListOfPnts.IsEmpty()) {
|
||||
char aBuff[10000];
|
||||
@@ -581,7 +548,7 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
|
||||
myIntersector.Perform(myHS1, dom1, TolArc, TolTang);
|
||||
else
|
||||
myIntersector.Perform(myHS1, dom1, myHS2, dom2, TolArc, TolTang,
|
||||
myListOfPnts, RestrictLine, isGeomInt);
|
||||
myListOfPnts, isGeomInt);
|
||||
|
||||
myIsDone = myIntersector.IsDone();
|
||||
|
||||
@@ -592,10 +559,6 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
|
||||
return;
|
||||
}
|
||||
//
|
||||
if(RestrictLine) {
|
||||
myListOfPnts.Clear(); // to use LineConstructor
|
||||
}
|
||||
//
|
||||
const Standard_Integer aNbLinIntersector = myIntersector.NbLines();
|
||||
for (Standard_Integer i=1; i <= aNbLinIntersector; ++i) {
|
||||
MakeCurve(i, dom1, dom2, TolArc);
|
||||
|
@@ -2361,7 +2361,16 @@ SeekPointOnBoundary(const Handle(Adaptor3d_HSurface)& theASurf1,
|
||||
{
|
||||
aP1.SetXYZ(line->Value(aPInd).Value().XYZ());
|
||||
if (aP1.SquareDistance(aPInt) > Precision::SquareConfusion())
|
||||
{
|
||||
break;
|
||||
}
|
||||
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++)
|
||||
@@ -2402,7 +2411,16 @@ SeekPointOnBoundary(const Handle(Adaptor3d_HSurface)& theASurf1,
|
||||
{
|
||||
aPCurr.SetXYZ(line->Value(aPInd).Value().XYZ());
|
||||
if (aPCurr.SquareDistance(aPInt) > Precision::SquareConfusion())
|
||||
{
|
||||
break;
|
||||
}
|
||||
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--)
|
||||
|
@@ -887,7 +887,7 @@ Standard_Boolean LocOpe_SplitShape::AddOpenWire(const TopoDS_Wire& W,
|
||||
aLocalFace = FaceRef.Oriented(wfirst.Orientation());
|
||||
GetDirection(LastEdge, TopoDS::Face(aLocalFace),plast , dlast, Standard_False);
|
||||
|
||||
Standard_Boolean cond;
|
||||
Standard_Boolean cond = Standard_True;
|
||||
|
||||
if(IsPeriodic) {
|
||||
|
||||
@@ -1511,7 +1511,7 @@ Standard_Boolean ChoixUV(const TopoDS_Edge& Last,
|
||||
|
||||
BRepAdaptor_Surface surf(F,Standard_False); // no restriction
|
||||
surf.D0 (plst.X(), plst.Y(), aPlst);
|
||||
|
||||
|
||||
gp_Dir2d ref2d(dlst);
|
||||
|
||||
Handle(Geom2d_Curve) C2d;
|
||||
@@ -1524,6 +1524,8 @@ Standard_Boolean ChoixUV(const TopoDS_Edge& Last,
|
||||
TopoDS_Edge anEdge = TopoDS::Edge (Poss.FindKey (index));
|
||||
|
||||
GetDirection(anEdge, F, p2d, v2d, Standard_True);
|
||||
if(!SameUV(plst,p2d,surf))
|
||||
continue;
|
||||
|
||||
surf.D0 (p2d.X(), p2d.Y(), aPCur);
|
||||
|
||||
|
@@ -2531,6 +2531,139 @@ static Standard_Integer OCC28131 (Draw_Interpretor&, Standard_Integer theNbArgs,
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OCC30708_1
|
||||
//purpose : Tests initialization of the TopoDS_Iterator with null shape
|
||||
//=======================================================================
|
||||
static Standard_Integer OCC30708_1 (Draw_Interpretor& di, Standard_Integer, const char**)
|
||||
{
|
||||
TopoDS_Iterator it;
|
||||
try
|
||||
{
|
||||
OCC_CATCH_SIGNALS
|
||||
|
||||
TopoDS_Shape empty;
|
||||
it.Initialize (empty);
|
||||
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
di << "Cannot initialize TopoDS_Iterator with null shape\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (it.More())
|
||||
di << "Incorrect Iterator initialization: method More() returns true on null shape\n";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OCC30708_2
|
||||
//purpose : Tests initialization of the BRepLib_MakeWire with null wire
|
||||
//=======================================================================
|
||||
static Standard_Integer OCC30708_2 (Draw_Interpretor& di, Standard_Integer, const char**)
|
||||
{
|
||||
try
|
||||
{
|
||||
OCC_CATCH_SIGNALS
|
||||
|
||||
TopoDS_Wire empty;
|
||||
BRepLib_MakeWire aWBuilder (empty);
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
di << "Cannot initialize BRepLib_MakeWire with null wire\n";
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include <GC_MakeArcOfCircle.hxx>
|
||||
#include <BRepAdaptor_CompCurve.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
//=======================================================================
|
||||
//function : OCC29430
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
static Standard_Integer OCC29430(Draw_Interpretor& theDI,
|
||||
Standard_Integer /*theNArg*/,
|
||||
const char** theArgVal)
|
||||
{
|
||||
const Standard_Real r45 = M_PI / 4.0, r225 = 3.0*M_PI / 4.0;
|
||||
|
||||
GC_MakeArcOfCircle arcMaker(gp_Circ(gp_Ax2(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(0.0, 0.0, 1.0), gp_Dir(1.0, 0.0, 0.0)), 1.0), r45, r225, Standard_True);
|
||||
BRepBuilderAPI_MakeEdge edgeMaker(arcMaker.Value());
|
||||
BRepBuilderAPI_MakeWire wireMaker(edgeMaker.Edge());
|
||||
const TopoDS_Wire circle = wireMaker.Wire();
|
||||
|
||||
DBRep::Set(theArgVal[1], circle);
|
||||
|
||||
BRepAdaptor_CompCurve curve(circle);
|
||||
theDI << "Curve.FirstParameter() = " << curve.FirstParameter() << "\n";
|
||||
theDI << "Curve.LastParameter() = " << curve.LastParameter() << "\n";
|
||||
theDI << "Curve.Period() = " << (curve.IsPeriodic()? curve.Period() : 0.0) << "\n";
|
||||
const gp_Pnt aStartPt = curve.Value(curve.FirstParameter());
|
||||
const gp_Pnt anEndPt = curve.Value(curve.LastParameter());
|
||||
|
||||
DrawTrSurf::Set(theArgVal[2], aStartPt);
|
||||
DrawTrSurf::Set(theArgVal[3], anEndPt);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OCC30869
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
static Standard_Integer OCC30869 (Draw_Interpretor& theDI, Standard_Integer theArgc, const char** theArgv)
|
||||
{
|
||||
if (theArgc != 2)
|
||||
{
|
||||
theDI.PrintHelp (theArgv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
TopoDS_Shape aWire = DBRep::Get (theArgv[1]);
|
||||
if (aWire.IsNull() || aWire.ShapeType() != TopAbs_WIRE)
|
||||
{
|
||||
theDI << theArgv[1] << " is not a wire.\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
BRepAdaptor_CompCurve aBACC (TopoDS::Wire (aWire));
|
||||
|
||||
Standard_Real aFirst = aBACC.FirstParameter();
|
||||
Standard_Real aLast = aBACC.LastParameter();
|
||||
|
||||
gp_Pnt aPFirst, aPLast;
|
||||
gp_Vec aVFirst, aVLast;
|
||||
|
||||
aBACC.D1 (aFirst, aPFirst, aVFirst);
|
||||
aBACC.D1 (aLast, aPLast, aVLast);
|
||||
|
||||
if (aVFirst.SquareMagnitude() > gp::Resolution())
|
||||
aVFirst.Normalize();
|
||||
if (aVLast.SquareMagnitude() > gp::Resolution())
|
||||
aVLast.Normalize();
|
||||
|
||||
theDI << aFirst << ": point " << aPFirst.X() << " "
|
||||
<< aPFirst.Y() << " "
|
||||
<< aPFirst.Z()
|
||||
<< ", tangent " << aVFirst.X() << " "
|
||||
<< aVFirst.Y() << " "
|
||||
<< aVFirst.Z() << "\n";
|
||||
|
||||
theDI << aLast << ": point " << aPLast.X() << " "
|
||||
<< aPLast.Y() << " "
|
||||
<< aPLast.Z()
|
||||
<< ", tangent " << aVLast.X() << " "
|
||||
<< aVLast.Y() << " "
|
||||
<< aVLast.Z() << "\n";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void QABugs::Commands_20(Draw_Interpretor& theCommands) {
|
||||
const char *group = "QABugs";
|
||||
|
||||
@@ -2560,5 +2693,19 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) {
|
||||
__FILE__, OCC28887, group);
|
||||
theCommands.Add("OCC28131", "OCC28131 name: creates face problematic for offset", __FILE__, OCC28131, group);
|
||||
|
||||
theCommands.Add ("OCC30708_1", "Tests initialization of the TopoDS_Iterator with null shape",
|
||||
__FILE__, OCC30708_1, group);
|
||||
|
||||
theCommands.Add ("OCC30708_2", "Tests initialization of the BRepLib_MakeWire with null shape",
|
||||
__FILE__, OCC30708_2, group);
|
||||
|
||||
theCommands.Add("OCC29430", "OCC29430 <result wire> "
|
||||
"<result first point> <result last point>",
|
||||
__FILE__, OCC29430, group);
|
||||
|
||||
theCommands.Add ("OCC30869", "Prints bounding points of the given wire and tangent vectors at these points.\n"
|
||||
"Usage: OCC30869 wire",
|
||||
__FILE__, OCC30869, group);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@@ -38,13 +38,16 @@ void TopoDS_Iterator::Initialize(const TopoDS_Shape& S,
|
||||
myOrientation = S.Orientation();
|
||||
else
|
||||
myOrientation = TopAbs_FORWARD;
|
||||
myShapes.Initialize(S.TShape()->Shapes());
|
||||
|
||||
if (S.IsNull())
|
||||
myShapes = TopoDS_ListIteratorOfListOfShape();
|
||||
else
|
||||
myShapes.Initialize(S.TShape()->myShapes);
|
||||
|
||||
if (More()) {
|
||||
myShape = myShapes.Value();
|
||||
myShape.Orientation(TopAbs::Compose(myOrientation,myShape.Orientation()));
|
||||
//modified by NIZNHY-PKV Fri Jan 16 07:42:30 2009f
|
||||
if (!myLocation.IsIdentity())
|
||||
//modified by NIZNHY-PKV Fri Jan 16 07:42:37 2009t
|
||||
myShape.Move(myLocation);
|
||||
}
|
||||
}
|
||||
@@ -60,9 +63,7 @@ void TopoDS_Iterator::Next()
|
||||
if (More()) {
|
||||
myShape = myShapes.Value();
|
||||
myShape.Orientation(TopAbs::Compose(myOrientation,myShape.Orientation()));
|
||||
//modified by NIZNHY-PKV Fri Jan 16 07:42:30 2009f
|
||||
if (!myLocation.IsIdentity())
|
||||
//modified by NIZNHY-PKV Fri Jan 16 07:42:37 2009t
|
||||
myShape.Move(myLocation);
|
||||
}
|
||||
}
|
||||
|
@@ -18,4 +18,5 @@
|
||||
018 mesh
|
||||
019 heal
|
||||
020 stlvrml
|
||||
021 splitshape
|
||||
021 splitshape
|
||||
022 splitshape1
|
||||
|
@@ -6,17 +6,16 @@ puts ""
|
||||
# Cannot project point on curve
|
||||
#########################################################################
|
||||
|
||||
cpulimit 1500
|
||||
|
||||
bsplinecurve r3 2 6 1 3 2 1 3 1 4 1 5 1 6 3 2 5 3 1 3 7 3 1 4 8 3 1 4 8 3 1 4 8 3 1 5 9 3 1 9 7 3 1
|
||||
bsplinecurve r4 2 6 2 3 2.5 1 3 1 3.5 1 4 1 4.5 3 -1 2 3 1 1 11 3 1 3 9 3 1 3 9 3 1 3 9 3 1 5 7 3 1 7 4 3 1
|
||||
|
||||
set info [extrema r3 r4]
|
||||
|
||||
regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} $info full dist
|
||||
|
||||
if { $dist > 4.0e-13 } {
|
||||
puts "Error : Extrema distance is too big"
|
||||
if {[regexp "ext_1" $info]} {
|
||||
set dist [lindex [length ext_1] end]
|
||||
if { $dist > 4.0e-13 } {
|
||||
puts "Error: Extrema distance is too big"
|
||||
}
|
||||
} else {
|
||||
puts "OK: Extrema distance is good"
|
||||
puts "Error: Extrema is not found"
|
||||
}
|
||||
|
@@ -6,6 +6,10 @@ puts ""
|
||||
## Wrong section curves
|
||||
###############################
|
||||
|
||||
puts "TODO OCC29501 ALL: Error in ii12_22"
|
||||
|
||||
set MaxToler 1.5e-4
|
||||
|
||||
restore [locate_data_file bug24472_Pipe_1.brep] b1
|
||||
|
||||
explode b1 f
|
||||
@@ -19,43 +23,51 @@ mksurface s3 f3
|
||||
puts ""
|
||||
puts "First test"
|
||||
# 1.1 geometry
|
||||
intersect i s1 s2
|
||||
intersect ii12 s1 s2
|
||||
|
||||
#donly i_22; fit
|
||||
|
||||
xdistcs i_22 s1 0 1 10 1e-7
|
||||
foreach c [directory ii12*] {
|
||||
bounds $c U1 U2
|
||||
|
||||
if {[dval U2-U1] < 1.0e-9} {
|
||||
puts "Error: Wrong curve's range!"
|
||||
}
|
||||
|
||||
xdistcs $c s1 U1 U2 10 $MaxToler
|
||||
xdistcs $c s2 U1 U2 10 $MaxToler
|
||||
}
|
||||
|
||||
puts ""
|
||||
puts "Second test"
|
||||
# 1.2 topology
|
||||
bsection r f1 f2
|
||||
bopcheck r
|
||||
# r is self interfered
|
||||
explode r e
|
||||
mkcurve c r_1
|
||||
bsection r12 f1 f2
|
||||
bopcheck r12
|
||||
# OK
|
||||
|
||||
#donly r_1; fit
|
||||
|
||||
xdistcs c s1 0.0714822451660209 1 10 1e-12 1e-7
|
||||
regexp {Tolerance MAX=([-0-9.+eE]+)} [tolerance r12] full toler
|
||||
if { $toler > $MaxToler } { puts "Error: Tolerance of the section r12 is too large" }
|
||||
|
||||
puts ""
|
||||
puts "Third test"
|
||||
# 2.1 geometry
|
||||
intersect i s1 s3
|
||||
intersect ii13 s1 s3
|
||||
|
||||
#donly i_4; fit
|
||||
|
||||
xdistcs i_4 s1 0 1 10 1e-6 1e-7
|
||||
foreach c [directory ii13*] {
|
||||
bounds $c U1 U2
|
||||
|
||||
if {[dval U2-U1] < 1.0e-9} {
|
||||
puts "Error: Wrong curve's range!"
|
||||
}
|
||||
|
||||
xdistcs $c s1 U1 U2 10 $MaxToler
|
||||
xdistcs $c s2 U1 U2 10 $MaxToler
|
||||
}
|
||||
|
||||
puts ""
|
||||
puts "Fourth test"
|
||||
# 2.2 topology
|
||||
bsection r f1 f3
|
||||
bopcheck r
|
||||
#r is self interfered
|
||||
explode r
|
||||
mkcurve c r_1
|
||||
bsection r13 f1 f3
|
||||
bopcheck r13
|
||||
# OK
|
||||
|
||||
#donly r_1; fit
|
||||
|
||||
xdistcs c s1 0.0714822451660209 1 10 1e-12 1e-7
|
||||
regexp {Tolerance MAX=([-0-9.+eE]+)} [tolerance r13] full toler
|
||||
if { $toler > $MaxToler } { puts "Error: Tolerance of the section r13 is too large" }
|
||||
|
@@ -6,35 +6,50 @@ puts ""
|
||||
## Intersection algorithm produces curves overlaped
|
||||
###############################
|
||||
|
||||
set ExpToler 1.0422975608071429e-007
|
||||
set ExpLen 5.0363617398558773
|
||||
|
||||
restore [locate_data_file bug25890_f1.brep] f1
|
||||
restore [locate_data_file bug25890_f2.brep] f2
|
||||
|
||||
set log [bopcurves f1 f2]
|
||||
set log [ bopcurves f1 f2 -2d ]
|
||||
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
|
||||
|
||||
if { ${NbCurv} != 5 } {
|
||||
puts "Error : NbCurv is bad"
|
||||
}
|
||||
checkreal TolReached $Toler $ExpToler 0.0 0.1
|
||||
|
||||
set nbshapes_expected "
|
||||
Number of shapes in shape
|
||||
VERTEX : 0
|
||||
EDGE : 0
|
||||
WIRE : 0
|
||||
FACE : 0
|
||||
SHELL : 0
|
||||
SOLID : 0
|
||||
COMPSOLID : 0
|
||||
COMPOUND : 1
|
||||
SHAPE : 1
|
||||
"
|
||||
if { ${NbCurv} != 1 } {
|
||||
puts "Error : NbCurv is bad"
|
||||
|
||||
set nbshapes_expected "
|
||||
Number of shapes in shape
|
||||
VERTEX : 0
|
||||
EDGE : 0
|
||||
WIRE : 0
|
||||
FACE : 0
|
||||
SHELL : 0
|
||||
SOLID : 0
|
||||
COMPSOLID : 0
|
||||
COMPOUND : 1
|
||||
SHAPE : 1
|
||||
"
|
||||
|
||||
for {set i 1} {$i <= $NbCurv} {incr i} {
|
||||
for {set j [expr $i+1]} {$j <= $NbCurv} {incr j} {
|
||||
puts " Check c_$i and c_$j"
|
||||
mkedge e1 c_$i
|
||||
mkedge e2 c_$j
|
||||
bcommon rr e1 e2
|
||||
checknbshapes rr -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes"
|
||||
set SumLen 0.0
|
||||
|
||||
# Check for overlapping
|
||||
for {set i 1} {$i <= $NbCurv} {incr i} {
|
||||
regexp "The +length+ c_$i +is +(\[-0-9.+eE\]+)" [ length c_$i ] full m
|
||||
set SumLen [ expr $SumLen + $m]
|
||||
for {set j [expr $i+1]} {$j <= $NbCurv} {incr j} {
|
||||
puts " Check c_$i and c_$j"
|
||||
mkedge e1 c_$i
|
||||
mkedge e2 c_$j
|
||||
bcommon rr e1 e2
|
||||
checknbshapes rr -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes"
|
||||
}
|
||||
}
|
||||
|
||||
checkreal Length $SumLen $ExpLen 1.0e-7 0.0
|
||||
} else {
|
||||
checklength c_1 -l $ExpLen
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,7 @@ whatis result_1
|
||||
|
||||
checkshape result_1
|
||||
|
||||
checkprops result_1 -v 15041.2 -s 8245.4
|
||||
checkprops result_1 -v 15287.7 -s 8383.16
|
||||
|
||||
checkview -display result_1 -2d -path ${imagedir}/${test_image}.png
|
||||
|
||||
|
@@ -9,10 +9,28 @@ puts ""
|
||||
restore [locate_data_file bug25994_body.brep] body
|
||||
restore [locate_data_file bug25994_wing.brep] wing
|
||||
|
||||
bfuse result body wing
|
||||
bclearobjects
|
||||
bcleartools
|
||||
baddobjects body
|
||||
baddtools wing
|
||||
bfillds
|
||||
bbop rs 4
|
||||
|
||||
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full nbv
|
||||
if { $nbv != 0 } { puts "Error : Section is not closed" }
|
||||
|
||||
regexp {Tolerance MAX=([-0-9.+eE]+)} [tolerance rs] full toler
|
||||
if { $toler > 5.0e-5 } {
|
||||
puts "Error: Tolerance after section is too large"
|
||||
}
|
||||
|
||||
bbop result 1
|
||||
|
||||
checkshape result
|
||||
checknbshapes result -solid 1 -shell 1 -face 13 -wire 15
|
||||
|
||||
checkprops result -s 1.76161e+006 -v 1.07392e+008
|
||||
|
||||
smallview
|
||||
fit
|
||||
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
||||
|
46
tests/bugs/modalg_7/bug29430
Normal file
46
tests/bugs/modalg_7/bug29430
Normal file
@@ -0,0 +1,46 @@
|
||||
puts "========"
|
||||
puts "OCC29430"
|
||||
puts "========"
|
||||
puts ""
|
||||
#################################################
|
||||
# [Regression] Curve evaluation at boundary point.
|
||||
#################################################
|
||||
|
||||
pload QAcommands
|
||||
|
||||
# After launching the command below we will obtain
|
||||
# some wire (stored in "result" variable) containing
|
||||
# a single edge based on arc of circle and its first and last
|
||||
# 3D-points (p1 and p2 correspondingly) taken from
|
||||
# composite curve (BRepAdaptor_CompCurve) built on this wire.
|
||||
|
||||
OCC29430 result p1 p2
|
||||
|
||||
vertex v1 p1
|
||||
vertex v2 p2
|
||||
|
||||
explode result v
|
||||
|
||||
# Now, let's check
|
||||
# 1. whether p1 and p2 match the vertices of the wire;
|
||||
# 2. whether p1 and p2 are different points.
|
||||
|
||||
distmini d11 result_1 v1
|
||||
distmini d12 result_1 v2
|
||||
distmini d21 result_2 v1
|
||||
distmini d22 result_2 v2
|
||||
distmini dv12 v1 v2
|
||||
|
||||
|
||||
if { ([dval d11_val] > 1.0e-7) && ([dval d21_val] > 1.0e-7) } {
|
||||
puts "Error: Start point of the wire does not match any its vertex."
|
||||
}
|
||||
if { ([dval d12_val] > 1.0e-7) && ([dval d22_val] > 1.0e-7) } {
|
||||
puts "Error: End point of the wire does not match any its vertex."
|
||||
}
|
||||
|
||||
if { [dval dv12_val] < 1.0e-7 } {
|
||||
puts "Error: Start and End points of the wire are the same."
|
||||
}
|
||||
|
||||
|
26
tests/bugs/modalg_7/bug29488_1
Normal file
26
tests/bugs/modalg_7/bug29488_1
Normal file
@@ -0,0 +1,26 @@
|
||||
puts "========"
|
||||
puts "OCC29488"
|
||||
puts "========"
|
||||
puts ""
|
||||
#################################################
|
||||
# Regression: boolean operation " general fuse" creates solid containing 5 not connected shells lying on the one level
|
||||
#################################################
|
||||
|
||||
restore [locate_data_file bug29488_shapes.brep] s
|
||||
eval mkvolume result [lrange [explode s] 1 end]
|
||||
|
||||
checkshape result
|
||||
checknbshapes result -wire 74 -face 74 -shell 1 -solid 1
|
||||
checkprops result -s 3073.39 -v 10240.8
|
||||
|
||||
set MinArea 0.001
|
||||
foreach f [explode result f] {
|
||||
regexp {Mass +: +([-0-9.+eE]+)} [sprops $f 1.0e-4] full anArea
|
||||
if { $anArea == 0.0 } {
|
||||
puts "Error in area computation: it is equal to 0"
|
||||
} elseif {$anArea < $MinArea} {
|
||||
puts "Error: Too small face has been created (S < $MinArea)"
|
||||
}
|
||||
}
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
31
tests/bugs/modalg_7/bug29488_2
Normal file
31
tests/bugs/modalg_7/bug29488_2
Normal file
@@ -0,0 +1,31 @@
|
||||
puts "========"
|
||||
puts "OCC29488"
|
||||
puts "========"
|
||||
puts ""
|
||||
#################################################
|
||||
# Regression: boolean operation " general fuse" creates solid containing 5 not connected shells lying on the one level
|
||||
#################################################
|
||||
|
||||
restore [locate_data_file bug29488_shapes.brep] s
|
||||
|
||||
bclearobjects
|
||||
bcleartools
|
||||
eval baddobjects [explode s]
|
||||
bfillds
|
||||
bbuild result
|
||||
|
||||
checkshape result
|
||||
checknbshapes result -wire 390 -face 366 -shell 10 -solid 2
|
||||
checkprops result -s 77135.9 -v 245074
|
||||
|
||||
set MinArea 0.001
|
||||
foreach f [explode result f] {
|
||||
regexp {Mass +: +([-0-9.+eE]+)} [sprops $f 1.0e-4] full anArea
|
||||
if { $anArea == 0.0 } {
|
||||
puts "Error in area computation: it is equal to 0"
|
||||
} elseif {$anArea < $MinArea} {
|
||||
puts "Error: Too small face has been created (S < $MinArea)"
|
||||
}
|
||||
}
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
35
tests/bugs/modalg_7/bug29494
Normal file
35
tests/bugs/modalg_7/bug29494
Normal file
@@ -0,0 +1,35 @@
|
||||
puts "========"
|
||||
puts "OCC29494"
|
||||
puts "========"
|
||||
puts ""
|
||||
#################################################
|
||||
# Intersection line between two parametric surfaces is restricted incorrectly if it matches
|
||||
# the surface boundary
|
||||
#################################################
|
||||
|
||||
restore [locate_data_file bug29488_shapes.brep] s
|
||||
explode s
|
||||
|
||||
explode s_4 f; copy s_4_13 f1
|
||||
explode s_6 f; copy s_6_18 f2
|
||||
|
||||
smallview
|
||||
clear
|
||||
bopcurves f1 f2 -2d
|
||||
|
||||
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves f1 f2 -2d] full Toler NbCurv
|
||||
|
||||
if {$Toler > 1.0e-7} {
|
||||
puts "Error: Big tolerance is returned by intersector"
|
||||
}
|
||||
|
||||
if {$NbCurv != 1} {
|
||||
puts "Error: Please check NbCurves for intersector"
|
||||
} else {
|
||||
checklength c_1 -l 19.2
|
||||
}
|
||||
|
||||
fit
|
||||
disp f1 f2
|
||||
|
||||
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
57
tests/bugs/modalg_7/bug29496
Normal file
57
tests/bugs/modalg_7/bug29496
Normal file
@@ -0,0 +1,57 @@
|
||||
puts "========"
|
||||
puts "OCC29496"
|
||||
puts "========"
|
||||
puts ""
|
||||
#################################################
|
||||
# No intersection curve between faces if starting points are given
|
||||
#################################################
|
||||
|
||||
restore [locate_data_file bug29488_shapes.brep] s
|
||||
explode s shell
|
||||
set i 1
|
||||
|
||||
explode s_2 f; copy s_2_27 f1
|
||||
explode s_6 f; copy s_6_20 f2
|
||||
bsection r$i f1 f2
|
||||
checknbshapes r$i -vertex 2 -edge 1
|
||||
checkprops r$i -l 2.14991
|
||||
|
||||
incr i
|
||||
|
||||
explode s_2 f; copy s_2_27 f1
|
||||
explode s_7 f; copy s_7_8 f2
|
||||
bsection r$i f1 f2
|
||||
checknbshapes r$i -vertex 2 -edge 1
|
||||
checkprops r$i -l 2.15901
|
||||
|
||||
incr i
|
||||
|
||||
explode s_3 f; copy s_3_27 f1
|
||||
explode s_7 f; copy s_7_8 f2
|
||||
bsection r$i f1 f2
|
||||
checknbshapes r$i -vertex 2 -edge 1
|
||||
checkprops r$i -l 2.15901
|
||||
|
||||
incr i
|
||||
|
||||
explode s_3 f; copy s_3_27 f1
|
||||
explode s_6 f; copy s_6_16 f2
|
||||
bsection r$i f1 f2
|
||||
checknbshapes r$i -vertex 2 -edge 1
|
||||
checkprops r$i -l 2.14991
|
||||
|
||||
incr i
|
||||
|
||||
explode s_2 f; copy s_2_26 f1
|
||||
explode s_7 f; copy s_7_2 f2
|
||||
bsection r$i f1 f2
|
||||
checknbshapes r$i -vertex 2 -edge 1
|
||||
checkprops r$i -l 2.22733
|
||||
|
||||
incr i
|
||||
|
||||
explode s_3 f; copy s_3_26 f1
|
||||
explode s_7 f; copy s_7_2 f2
|
||||
bsection r$i f1 f2
|
||||
checknbshapes r$i -vertex 2 -edge 1
|
||||
checkprops r$i -l 2.22733
|
24
tests/bugs/modalg_7/bug29887_1
Normal file
24
tests/bugs/modalg_7/bug29887_1
Normal file
@@ -0,0 +1,24 @@
|
||||
puts "========"
|
||||
puts "OCC29887: Wrong result of CUT operation due to incorrect point-face classification"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
brestore [locate_data_file bug29887_ar_shape_to_cuts.brep] s1
|
||||
brestore [locate_data_file bug29887_ar_cutting_shapes.brep] s2
|
||||
|
||||
bcut result s1 s2
|
||||
checknbshapes result -face 2 -wire 2
|
||||
|
||||
checkshape result
|
||||
|
||||
if {[regexp "Faulties" [bopargcheck result]]} {
|
||||
puts "Error: bopargcheck has found some faulties in result"
|
||||
}
|
||||
|
||||
checkprops result -s 319.71
|
||||
|
||||
smallview
|
||||
don result
|
||||
fit
|
||||
|
||||
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
28
tests/bugs/modalg_7/bug29887_2
Normal file
28
tests/bugs/modalg_7/bug29887_2
Normal file
@@ -0,0 +1,28 @@
|
||||
puts "========"
|
||||
puts "OCC29887: Wrong result of CUT operation due to incorrect point-face classification"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
brestore [locate_data_file bug29887_ar_shape_to_cuts.brep] s1
|
||||
|
||||
point p 11.633693861603586 -0.88940231049090079
|
||||
|
||||
if { ![regexp {IN} [ b2dclassifx s1 p ] ] } {
|
||||
puts "Error : Wrong result of 2d classifier algorithm"
|
||||
} else {
|
||||
puts "OK : Good result of 2d classifier algorithm"
|
||||
}
|
||||
|
||||
if { ![regexp {IN} [ b2dclassify s1 p ] ] } {
|
||||
puts "Error : Wrong result of 2d classifier algorithm"
|
||||
} else {
|
||||
puts "OK : Good result of 2d classifier algorithm"
|
||||
}
|
||||
|
||||
smallview -2D-
|
||||
2dclear
|
||||
display p
|
||||
pcurve s1
|
||||
2dfit
|
||||
|
||||
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
30
tests/bugs/modalg_7/bug30522
Normal file
30
tests/bugs/modalg_7/bug30522
Normal file
@@ -0,0 +1,30 @@
|
||||
puts "REQUIRED All: error:"
|
||||
|
||||
puts "========"
|
||||
puts "0030522: Modeling Algorithms - BRepBuilderAPI_MakeWire produces different wires depending on the order of parameters"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug30522_w_line12.brep] w1
|
||||
restore [locate_data_file bug30522_w_line21.brep] w2
|
||||
|
||||
if {![regexp "Wire not done with an error" [wire r12 w1 w2]]} {
|
||||
if {[lindex [nbshapes r12] 10] != 8} {
|
||||
puts "Error: The wires have been unified incorrectly"
|
||||
}
|
||||
}
|
||||
|
||||
wire r21 w2 w1
|
||||
|
||||
wire r12u -unsorted w1 w2
|
||||
|
||||
wire r21u -unsorted w2 w1
|
||||
|
||||
foreach r {r21 r12u r21u} {
|
||||
checkshape $r
|
||||
checknbshapes $r -edge 8 -vertex 8
|
||||
}
|
||||
|
||||
smallview +Y+Z
|
||||
donly r21; fit
|
||||
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
55
tests/bugs/modalg_7/bug30869
Normal file
55
tests/bugs/modalg_7/bug30869
Normal file
@@ -0,0 +1,55 @@
|
||||
puts "========"
|
||||
puts "0030869: Modeling Data - BRepAdaptor_CompCurve incorrectly evaluates the boundary points"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
pload QAcommands
|
||||
|
||||
# create wire consisting of a single edge based on a trimmed circle
|
||||
circle c 1 0 0 0 -1 0 0 0 -1 1
|
||||
trim c c 1.5707963267949 4.71238898038469
|
||||
mkedge e c
|
||||
orientation e R
|
||||
wire w e
|
||||
|
||||
# compute boundary points using BRepAdaptor_CompCurve
|
||||
set log [OCC30869 w]
|
||||
|
||||
set lines [split $log "\n"]
|
||||
|
||||
if {![regexp {([-0-9.+eE]*): point ([-0-9.+eE]*) ([-0-9.+eE]*) ([-0-9.+eE]*), tangent ([-0-9.+eE]*) ([-0-9.+eE]*) ([-0-9.+eE]*)} [lindex $lines 0] full t1 x1 y1 z1 dx1 dy1 dz1]} {
|
||||
puts "Error: first point is not computed"
|
||||
}
|
||||
|
||||
if {![regexp {([-0-9.+eE]*): point ([-0-9.+eE]*) ([-0-9.+eE]*) ([-0-9.+eE]*), tangent ([-0-9.+eE]*) ([-0-9.+eE]*) ([-0-9.+eE]*)} [lindex $lines 1] full t2 x2 y2 z2 dx2 dy2 dz2]} {
|
||||
puts "Error: last point is not computed"
|
||||
}
|
||||
|
||||
# compute reference values
|
||||
|
||||
# inverse the curve as the edge in the wire is reversed
|
||||
circle ci 1 0 0 0 1 0 0 0 -1 1
|
||||
trim ci ci 1.5707963267949 4.71238898038469
|
||||
|
||||
cvalue ci 1.5707963267949 x1_ref y1_ref z1_ref dx1_ref dy1_ref dz1_ref
|
||||
cvalue ci 4.71238898038469 x2_ref y2_ref z2_ref dx2_ref dy2_ref dz2_ref
|
||||
|
||||
# compare the values
|
||||
set tol_abs 1.e-7
|
||||
set tol_rel 1.e-7
|
||||
|
||||
checkreal first_pnt_x $x1 [dval x1_ref] $tol_abs $tol_rel
|
||||
checkreal first_pnt_y $y1 [dval y1_ref] $tol_abs $tol_rel
|
||||
checkreal first_pnt_z $z1 [dval z1_ref] $tol_abs $tol_rel
|
||||
|
||||
checkreal first_tgt_x $dx1 [dval dx1_ref] $tol_abs $tol_rel
|
||||
checkreal first_tgt_y $dy1 [dval dy1_ref] $tol_abs $tol_rel
|
||||
checkreal first_tgt_z $dz1 [dval dz1_ref] $tol_abs $tol_rel
|
||||
|
||||
checkreal last_pnt_x $x2 [dval x2_ref] $tol_abs $tol_rel
|
||||
checkreal last_pnt_y $y2 [dval y2_ref] $tol_abs $tol_rel
|
||||
checkreal last_pnt_z $z2 [dval z2_ref] $tol_abs $tol_rel
|
||||
|
||||
checkreal last_tgt_x $dx2 [dval dx2_ref] $tol_abs $tol_rel
|
||||
checkreal last_tgt_y $dy2 [dval dy2_ref] $tol_abs $tol_rel
|
||||
checkreal last_tgt_z $dz2 [dval dz2_ref] $tol_abs $tol_rel
|
8
tests/bugs/moddata_3/bug30708_1
Normal file
8
tests/bugs/moddata_3/bug30708_1
Normal file
@@ -0,0 +1,8 @@
|
||||
puts "================"
|
||||
puts "0030708: Modeling Data - Crash while initializing TopoDS_Iterator with null shape"
|
||||
puts "================"
|
||||
puts ""
|
||||
|
||||
if { [regexp "Cannot initialize" [OCC30708_1]]} {
|
||||
puts "Error: Cannot initialize TopoDS_Iterator with null shape"
|
||||
}
|
8
tests/bugs/moddata_3/bug30708_2
Normal file
8
tests/bugs/moddata_3/bug30708_2
Normal file
@@ -0,0 +1,8 @@
|
||||
puts "================"
|
||||
puts "0030708: Modeling Data - Crash while initializing TopoDS_Iterator with null shape"
|
||||
puts "================"
|
||||
puts ""
|
||||
|
||||
if { [regexp "Cannot initialize" [OCC30708_2]]} {
|
||||
puts "Error: Cannot initialize BRepLib_MakeWire with null wire"
|
||||
}
|
19
tests/bugs/splitshape_1/bug29473
Normal file
19
tests/bugs/splitshape_1/bug29473
Normal file
@@ -0,0 +1,19 @@
|
||||
puts "=============="
|
||||
puts " splitshape_1 "
|
||||
puts " "
|
||||
puts "=============="
|
||||
puts ""
|
||||
#puts " 0029473 "
|
||||
###################################################
|
||||
# Operation "splitshape" in the Test Harness give invalid result on the attached case.
|
||||
###################################################
|
||||
restore [locate_data_file bug29473_Split.brep] a
|
||||
explode a
|
||||
explode a_1
|
||||
explode a_2
|
||||
wire w1 a_2_1 a_2_2 a_2_3
|
||||
wire w2 a_2_4 a_2_5
|
||||
explode a_1_5 e
|
||||
splitshape r1 a_1 a_1_1 w1 a_1_3 w2 a_1_4 a_2_6 a_1_5 a_2_7 @ a_1_5_4 a_2_8
|
||||
explode r1 f
|
||||
copy r1_1 result
|
11
tests/bugs/splitshape_1/end
Normal file
11
tests/bugs/splitshape_1/end
Normal file
@@ -0,0 +1,11 @@
|
||||
# test script to check validity of shape
|
||||
|
||||
########################################################################
|
||||
|
||||
checkshape result
|
||||
maxtolerance result
|
||||
|
||||
smallview
|
||||
display result
|
||||
fit
|
||||
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
14
tests/lowalgos/begin
Normal file
14
tests/lowalgos/begin
Normal file
@@ -0,0 +1,14 @@
|
||||
if { [array get Draw_Groups "TOPOLOGY Check commands"] == "" } {
|
||||
pload TOPTEST
|
||||
pload AISV
|
||||
}
|
||||
# To prevent loops limit to 1 minutes
|
||||
cpulimit 60
|
||||
|
||||
if { [info exists imagedir] == 0 } {
|
||||
set imagedir .
|
||||
}
|
||||
|
||||
if { [info exists test_image ] == 0 } {
|
||||
set test_image photo
|
||||
}
|
21
tests/lowalgos/bnd/bug29463
Normal file
21
tests/lowalgos/bnd/bug29463
Normal file
@@ -0,0 +1,21 @@
|
||||
puts "========"
|
||||
puts "OCC29463"
|
||||
puts "========"
|
||||
puts ""
|
||||
#################################################
|
||||
# Method BndBox::IsOut() returns true for point lying on the planar face
|
||||
#################################################
|
||||
|
||||
restore [locate_data_file bug29463_face13_691.brep] f
|
||||
|
||||
set x 165.16888924444618
|
||||
set y 16.119975403493935
|
||||
set z 6.6799998283386177
|
||||
|
||||
# check that vertex with coordinates (x, y, z) is inside the bounding box of f
|
||||
|
||||
boundingstr f xmin ymin zmin xmax ymax zmax
|
||||
|
||||
if {$x < [dval xmin] || $x > [dval xmax] || $y < [dval ymin] || $y > [dval ymax] || $z < [dval zmin] || $z > [dval zmax]} {
|
||||
puts "Error: bounding box works incorrect"
|
||||
}
|
2
tests/lowalgos/end
Normal file
2
tests/lowalgos/end
Normal file
@@ -0,0 +1,2 @@
|
||||
# to end a test script
|
||||
puts "TEST COMPLETED"
|
12
tests/lowalgos/extcc/begin
Normal file
12
tests/lowalgos/extcc/begin
Normal file
@@ -0,0 +1,12 @@
|
||||
proc CheckExtResult {info ref_dist} {
|
||||
global ext_1
|
||||
if {[regexp "ext_1" $info]} {
|
||||
set dist [lindex [length ext_1] end]
|
||||
if { $dist > $ref_dist } {
|
||||
puts "Error: Extrema distance is too big"
|
||||
}
|
||||
} else {
|
||||
puts "Error: Extrema is not found"
|
||||
}
|
||||
}
|
||||
|
29
tests/lowalgos/extcc/bug29465_1
Normal file
29
tests/lowalgos/extcc/bug29465_1
Normal file
@@ -0,0 +1,29 @@
|
||||
puts "============"
|
||||
puts "OCC29465"
|
||||
puts "============"
|
||||
puts ""
|
||||
#########################################################################
|
||||
# Regression relation to 691 version: Extrema_ExtCC returns IsParallel equal to true for not parallel curves
|
||||
#########################################################################
|
||||
|
||||
set dist 3.e-5
|
||||
|
||||
restore [locate_data_file bug29465.brep] ce
|
||||
explode ce e
|
||||
mkcurve c1 ce_1
|
||||
mkcurve c2 ce_2
|
||||
|
||||
CheckExtResult [extrema c1 c2] $dist
|
||||
CheckExtResult [extrema c2 c1] $dist
|
||||
|
||||
reverse c1
|
||||
CheckExtResult [extrema c1 c2] $dist
|
||||
CheckExtResult [extrema c2 c1] $dist
|
||||
|
||||
reverse c2
|
||||
CheckExtResult [extrema c1 c2] $dist
|
||||
CheckExtResult [extrema c2 c1] $dist
|
||||
|
||||
reverse c1
|
||||
CheckExtResult [extrema c1 c2] $dist
|
||||
CheckExtResult [extrema c2 c1] $dist
|
31
tests/lowalgos/extcc/bug29465_2
Normal file
31
tests/lowalgos/extcc/bug29465_2
Normal file
@@ -0,0 +1,31 @@
|
||||
puts "============"
|
||||
puts "OCC29465"
|
||||
puts "============"
|
||||
puts ""
|
||||
#########################################################################
|
||||
# Regression relation to 691 version: Extrema_ExtCC returns IsParallel equal to true for not parallel curves
|
||||
#########################################################################
|
||||
|
||||
set dist 0.2
|
||||
|
||||
restore [locate_data_file bug27371.brep] s
|
||||
explode s
|
||||
explode s_1 e
|
||||
mkcurve c1 s_1_1
|
||||
explode s_2 e
|
||||
mkcurve c2 s_2_20
|
||||
|
||||
CheckExtResult [extrema c1 c2] $dist
|
||||
CheckExtResult [extrema c2 c1] $dist
|
||||
|
||||
reverse c1
|
||||
CheckExtResult [extrema c1 c2] $dist
|
||||
CheckExtResult [extrema c2 c1] $dist
|
||||
|
||||
reverse c2
|
||||
CheckExtResult [extrema c1 c2] $dist
|
||||
CheckExtResult [extrema c2 c1] $dist
|
||||
|
||||
reverse c1
|
||||
CheckExtResult [extrema c1 c2] $dist
|
||||
CheckExtResult [extrema c2 c1] $dist
|
3
tests/lowalgos/grids.list
Normal file
3
tests/lowalgos/grids.list
Normal file
@@ -0,0 +1,3 @@
|
||||
001 2dinter
|
||||
002 bnd
|
||||
003 extcc
|
1
tests/lowalgos/parse.rules
Normal file
1
tests/lowalgos/parse.rules
Normal file
@@ -0,0 +1 @@
|
||||
FAILED /\bFaulty\b/ bad shape
|
Reference in New Issue
Block a user