// Created on: 1997-04-10
// Created by: Prestataire Mary FABIEN
// Copyright (c) 1997-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
+// This file is part of Open CASCADE Technology software library.
//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+// 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.
//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
#include <TCollection_AsciiString.hxx>
#include <TopOpeBRepDS_Check.ixx>
//=======================================================================
TopOpeBRepDS_Check::TopOpeBRepDS_Check(const Handle(TopOpeBRepDS_HDataStructure)& HDS)
-: mySurfaceDone(Standard_False),
- myCurveDone(Standard_False),
- myPointDone(Standard_False),
- myShapeDone (Standard_False),
- myDone(Standard_False)
{
myHDS = HDS;
myMapSurfaceStatus.Clear();
//=======================================================================
TopOpeBRepDS_Check::TopOpeBRepDS_Check()
-: mySurfaceDone(Standard_False),
- myCurveDone(Standard_False),
- myPointDone(Standard_False),
- myShapeDone (Standard_False),
- myDone(Standard_False)
{
myMapSurfaceStatus.Clear();
myMapCurveStatus.Clear();
bI = bI && ChkIntgInterf(LI);
}
-#ifdef DEB
+#ifdef OCCT_DEBUG
PrintIntg(cout);
#endif
// CheckEdgeParameter();
case TopOpeBRepDS_SURFACE :
{
if(myHDS->NbSurfaces() < I) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
cout<<"Surpassed index of TopOpeBRepDS_SURFACE. actual index : "<<I;
cout<<". Index max : "<<myHDS->NbSurfaces();
#endif
case TopOpeBRepDS_CURVE :
{
if(myHDS->NbCurves() < I) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
cout<<"Surpassed index of TopOpeBRepDS_CURVE. actual index : "<<I;
cout<<". Index max : "<<myHDS->NbCurves();
#endif
case TopOpeBRepDS_POINT :
{
if(myHDS->NbPoints() < I) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
cout<<"Surpassed index of TopOpeBRepDS_POINT : actual index : "<<I;
cout<<". Index max : "<<myHDS->NbPoints()<<endl;
#endif
// topology
if(myHDS->NbShapes() < I) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
cout<<"Surpassed index of TopOpeBRepDS_Shape_. actual index : "<<I;
cout<<". Index max : "<<myHDS->NbShapes();
#endif
return Standard_False;
}
const TopoDS_Shape& S =myHDS->Shape(I);
-#ifdef DEB
- TopAbs_ShapeEnum se;
-#else
+
TopAbs_ShapeEnum se=TopAbs_COMPOUND;
-#endif
+
switch (K) {
case TopOpeBRepDS_SOLID : se = TopAbs_SOLID; break;
case TopOpeBRepDS_SHELL : se = TopAbs_SHELL; break;
break ;
}
if(S.ShapeType() != se) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
cout<<"Error : Shape "<<I<<" is a ";
TopOpeBRepDS::Print(TopOpeBRepDS::ShapeToKind(S.ShapeType()), cout);
cout<<" and not a ";
const TopoDS_Shape& Sind = myHDS->Shape(i);
const TopTools_ListOfShape& losi = BDS.ShapeSameDomain(Sind);
if(!CheckShapes(losi)) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
cout<<"Shape of ShapeSameDomain (n*n "<<i;
cout<<") is not defined in the DS"<<endl;
#endif
Curr = BDS.SameDomainRef(i);
Loc = BDS.SameDomainRef(Curr);
if(Curr && (Curr != Loc)) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
cout<<"SameDomaineRef of Shape "<<i<<" = "<<Curr;
cout<<". SameDomaineRef of Shape "<<Curr<<" = "<<Loc<<endl;
#endif
// Verification du type des differents Shapes SameDomain
const TopoDS_Shape& Sref = myHDS->Shape(Curr);
if(Sind.ShapeType() != Sref.ShapeType()) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
cout<<"Shapes n*n "<<i<<" and "<<Curr<<" are SameDomain."<<endl;
cout<<"Type of Shape n*n "<<i<<" = ";
PrintShape(Sind.ShapeType(),cout);
liolos.Next();
}
if(!bb) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
cout<<"Shapes n*n "<<i<<" and "<<Curr<<" are SameDomain. ";
cout<<"The reference of "<<i<<", is "<<Curr<<"."<<endl;
cout<<"However, Shape n*n "<<i;
Dist = P1.Distance(P2);
if(Dist <= tol1 + tol2) {
if(sdr1 != sdr2) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
cout<<"Pb Vertex n+n"<<Curr1<<" and n*n"<<Curr2;
cout<<" : same place, not SameDomain"<<endl;
cout<<" Tol of Vertex n*n"<<Curr1<<" = "<<tol1<<endl;
}
}
else if(sdr1 == sdr2) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
cout<<"Pb Vertex "<<Curr1<<" and "<<Curr2;
cout<<" : SameDomain, not same place"<<endl;
cout<<" Tol of Vertex n*n"<<Curr1<<" = "<<tol1<<endl;
const gp_Pnt& Pnt2 = TopOpeBRepTool_ShapeTool::Pnt(S1);
Dist = Pnt1.Distance(Pnt2);
if(Dist <= tol1 + tol2) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
cout<<"Attention : Vertex "<<Curr1<<" and Point "<<PE.Index();
cout<<" are confused"<<endl;
cout<<" Tol of Vertex n*n"<<Curr1<<" = "<<tol1<<endl;
for(j = i+1;j < NbPo;j++) {
const TopOpeBRepDS_Point& dsPnt2 = myHDS->Point(j);
if(dsPnt1.IsEqual(dsPnt2)) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
cout<<"Attention : points "<<i<<" and "<<j<<" are confused"<<endl;
cout<<" Tol of Point n*n"<<i<<" = "<<dsPnt1.Tolerance()<<endl;
cout<<" Tol of Point n*n"<<j<<" = "<<dsPnt1.Tolerance()<<endl;
Handle(TopOpeBRepDS_EdgeVertexInterference) EVI =
Handle(TopOpeBRepDS_EdgeVertexInterference)::DownCast(I1);
if(!EVI.IsNull()) {
-//#ifdef DEB
+//#ifdef OCCT_DEBUG
// Standard_Integer Param = EVI->Parameter();
//#else
Standard_Integer Param = (Standard_Integer ) EVI->Parameter();
it1.Initialize(LI);
while (it1.More() ) {
const Handle(TopOpeBRepDS_Interference)& I1 = it1.Value();
- const Handle(TopOpeBRepDS_CurvePointInterference)& CPI =
- Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I1);
+ Handle(TopOpeBRepDS_CurvePointInterference) CPI (Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I1));
if(!CPI.IsNull()) {
Standard_Integer Param =
-//#ifdef DEB
+//#ifdef OCCT_DEBUG
// TopOpeBRepDS_InterferenceTool::Parameter(CPI);
//#else
(Standard_Integer ) TopOpeBRepDS_InterferenceTool::Parameter(CPI);
return OS;
}
OS<<" ";
-#ifdef DEB
+#ifdef OCCT_DEBUG
const TopoDS_Shape& S =
#endif
myHDS->Shape(index);
-#ifdef DEB
+#ifdef OCCT_DEBUG
PrintShape(S.ShapeType(),cout);
OS<<" "<<index<<" = ";
Print(myMapShapeStatus.Find(index), cout);