-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: GEOMAlgo_FinderShapeOn1.cxx
+
+// File: GEOMAlgo_FinderShapeOn2.cxx
// Created: Fri Mar 4 10:31:06 2005
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <GEOMAlgo_FinderShapeOn2.ixx>
+#include <GEOMAlgo_FinderShapeOn2.hxx>
#include <math.h>
//=======================================================================
//function : GEOMAlgo_FinderShapeOn1
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_FinderShapeOn2::GEOMAlgo_FinderShapeOn2()
:
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_FinderShapeOn2::~GEOMAlgo_FinderShapeOn2()
{
}
//=======================================================================
//function : SetClsf
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::SetClsf(const Handle(GEOMAlgo_Clsf)& aClsf)
{
}
//=======================================================================
//function : Clsf
-//purpose :
+//purpose :
//=======================================================================
const Handle(GEOMAlgo_Clsf)& GEOMAlgo_FinderShapeOn2::Clsf() const
{
}
//=======================================================================
//function : SetShapeType
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::SetShapeType(const TopAbs_ShapeEnum aType)
{
}
//=======================================================================
//function : ShapeType
-//purpose :
+//purpose :
//=======================================================================
TopAbs_ShapeEnum GEOMAlgo_FinderShapeOn2::ShapeType()const
{
}
//=======================================================================
//function : SetState
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::SetState(const GEOMAlgo_State aState)
{
}
//=======================================================================
//function : State
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_State GEOMAlgo_FinderShapeOn2::State() const
{
}
//=======================================================================
//function : SetNbPntsMin
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::SetNbPntsMin(const Standard_Integer aNb)
{
}
//=======================================================================
//function : NbPntsMin
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_FinderShapeOn2::NbPntsMin()const
{
}
//=======================================================================
//function : SetNbPntsMax
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::SetNbPntsMax(const Standard_Integer aNb)
{
}
//=======================================================================
//function : NbPntsMax
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_FinderShapeOn2::NbPntsMax()const
{
}
//=======================================================================
// function: MSS
-// purpose:
+// purpose:
//=======================================================================
const GEOMAlgo_IndexedDataMapOfShapeState& GEOMAlgo_FinderShapeOn2::MSS() const
{
}
//=======================================================================
// function: Shapes
-// purpose:
+// purpose:
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn2::Shapes() const
{
}
//=======================================================================
//function : Perform
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::Perform()
{
return;
}
//
+ // Initialize the context
+ GEOMAlgo_ShapeAlgo::Perform();
+ //
myClsf->SetTolerance(myTolerance);
//
// 1
}
//
// 4
- ProcessSolids();
+ ProcessSolids();
//
}
//=======================================================================
//function : CheckData
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::CheckData()
{
myShapeType==TopAbs_EDGE ||
myShapeType==TopAbs_FACE ||
myShapeType==TopAbs_SOLID)) {
- myErrorStatus=12; // unallowed subshape type
+ myErrorStatus=12; // unallowed sub-shape type
return;
}
//
- if (myState==GEOMAlgo_ST_UNKNOWN ||
+ if (myState==GEOMAlgo_ST_UNKNOWN ||
myState==GEOMAlgo_ST_INOUT) {
myErrorStatus=13; // unallowed state type
return;
}
//=======================================================================
//function : ProcessVertices
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::ProcessVertices()
{
}
//=======================================================================
//function : ProcessEdges
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::ProcessEdges()
{
}
//
if (BRep_Tool::Degenerated(aE)) {
- myMSS.Add(aE, aSt);
+ myMSS.Add(aE, aSt);
continue;
}
//
if (myState==GEOMAlgo_ST_ON) {
Standard_Boolean bCanBeON;
Standard_Real aT1, aT2;
- Handle(Geom_Curve) aC;
+ Handle(Geom_Curve) aC;
//
aC=BRep_Tool::Curve(aE, aT1, aT2);
bCanBeON=myClsf->CanBeON(aC);
//
InnerPoints(aE, aLP);
if (myErrorStatus) {
- return;
+ return;
}
//
bIsConformState=Standard_True;
}
}
//
- aSt=aSC.State();
+ aSt=aSC.State();
//
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
if (myShapeType==TopAbs_EDGE) {
else if (bIsConformState || aSt==TopAbs_ON) {
myMSS.Add(aE, aSt);
}
- } // for (i=1; i<=aNb; ++i) next edge
+ } // for (i=1; i<=aNb; ++i) next edge
}
//=======================================================================
//function : ProcessFaces
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::ProcessFaces()
{
}
}
//
- aSt=aSC.State();
+ aSt=aSC.State();
//
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
if (myShapeType==TopAbs_FACE) {
else if (bIsConformState || aSt==TopAbs_ON) {
myMSS.Add(aF, aSt);
}
- }// for (i=1; i<=aNb; ++i) next face
+ }// for (i=1; i<=aNb; ++i) next face
}
//=======================================================================
//function : ProcessSolids
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::ProcessSolids()
{
continue; // face has non-conformed state,skip solid
}
//
- aSt=aSC.State();
+ aSt=aSC.State();
//
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
if (bIsConformState) {
//
//=======================================================================
//function : InnerPoints
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
GEOMAlgo_ListOfPnt& aLP)
}
}
//
- // inner nodes=all_nodes - boundary_nodes
+ // inner nodes=all_nodes - boundary_nodes
j1=aNodes.Lower();
j2=aNodes.Upper();
for (j=j1; j<=j2; ++j) {
//
aNb=aLP.Extent();
//
- if (!aNb && myNbPntsMin) {
+ if (!aNb && myNbPntsMin) {
// try to fill it yourself
Standard_Boolean bIsDone;
Standard_Integer aN1, aN2;
break;
}// if (iCnt>1)
}// for (; aIt.More(); aIt.Next())
- }// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder)
- }// if (!aNb && myNbPntsMin) {
+ }// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder)
+ }// if (!aNb && myNbPntsMin) {
}
//=======================================================================
//function : InnerPoints
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE,
GEOMAlgo_ListOfPnt& aLP)
}
//
aNb=aLP.Extent();
- if (!aNb && myNbPntsMin) {
+ if (!aNb && myNbPntsMin) {
// try to fill it yourself
InnerPoints(aE, myNbPntsMin, aLP);
aNb=aLP.Extent();
}
//=======================================================================
//function : InnerPoints
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE,
const Standard_Integer aNbPntsMin,
//
// 10 -myClsf=NULL
// 11 -myShape=NULL
-// 12 -unallowed type of subshapes
-// 13 -unallowed state
+// 12 -unallowed type of sub-shapes
+// 13 -unallowed state
// 15 -unallowed surface type
// 20- no triangulation found
// 30- can not obtain the line from the link