IntTools,
BOPTools,
BOP,
- --||
+
TColStd,
BOPTColStd,
BRepAlgo,
NMTDS,
NMTTools
- --||
-
+
is
--
-- enumerations
ST_ONIN,
ST_ONOUT,
ST_INOUT
- end State;
+ end State;
+ --
+ deferred class HAlgo;
+ deferred class Clsf;
+ class ClsfSurf;
+ class ClsfBox;
+ class FinderShapeOn2;
+ class PassKeyShapeMapHasher;
--
-- classes
- --
+ --
deferred class Algo;
deferred class ShapeAlgo;
--
class PassKey;
class PassKeyMapHasher;
class PassKeyShape;
+
class SurfaceTools;
class Tools;
--
class FinderShapeOn;
--
class FinderShapeOn1;
- class StateCollector;
+ class StateCollector;
+
--
-- Builder/Splitter
deferred class BuilderShape;
MapRealHasher from TColStd);
--
-- instantiations
- class IndexedDataMapOfPassKeyShapeListOfShape
- instantiates IndexedDataMap from TCollection (PassKeyShape from GEOMAlgo,
- ListOfShape from TopTools,
- PassKeyMapHasher from GEOMAlgo);
+
class IndexedDataMapOfShapeBox
instantiates IndexedDataMap from TCollection (Shape from TopoDS,
class ListOfPnt
instantiates List from TCollection (Pnt from gp);
-
-
class DataMapOfPassKeyInteger
instantiates DataMap from TCollection (PassKey from GEOMAlgo,
Integer from Standard,
- PassKeyMapHasher from GEOMAlgo);
+ PassKeyMapHasher from GEOMAlgo);
+
+ class IndexedDataMapOfPassKeyShapeListOfShape
+ instantiates IndexedDataMap from TCollection (PassKeyShape from GEOMAlgo,
+ ListOfShape from TopTools,
+ PassKeyShapeMapHasher from GEOMAlgo);
+
end GEOMAlgo;
--- /dev/null
+-- Copyright (C) 2005 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 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
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
+-- File: GEOMAlgo_Clsf.cdl
+-- Created: Wed Nov 22 10:19:29 2006
+-- Author: Peter KURNEV
+-- <pkv@irinox>
+
+
+deferred class Clsf from GEOMAlgo
+ inherits HAlgo from GEOMAlgo
+
+ ---Purpose:
+
+uses
+ State from TopAbs,
+ Pnt from gp,
+ Curve from Geom,
+ Surface from Geom
+
+--raises
+
+is
+ Initialize
+ returns mutable Clsf from GEOMAlgo;
+ ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_Clsf();"
+
+ SetPnt(me:mutable;
+ aP:Pnt from gp);
+
+ Pnt(me)
+ returns Pnt from gp;
+ ---C++:return const&
+
+ SetTolerance(me:mutable;
+ aT:Real from Standard);
+
+ Tolerance(me)
+ returns Real from Standard;
+
+ State(me)
+ returns State from TopAbs;
+
+ CanBeON(me;
+ aCT:Curve from Geom)
+ returns Boolean from Standard
+ is virtual;
+
+ CanBeON(me;
+ aST:Surface from Geom)
+ returns Boolean from Standard
+ is virtual;
+
+fields
+ myState :State from TopAbs is protected;
+ myPnt :Pnt from gp is protected;
+ myTolerance:Real from Standard is protected;
+
+end Clsf;
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File: GEOMAlgo_Classifier.cxx
+// Created: Wed Nov 22 10:23:04 2006
+// Author: Peter KURNEV
+// <pkv@irinox>
+
+
+#include <GEOMAlgo_Clsf.ixx>
+
+//=======================================================================
+//function :
+//purpose :
+//=======================================================================
+ GEOMAlgo_Clsf::GEOMAlgo_Clsf()
+:
+ GEOMAlgo_HAlgo()
+{
+ myState=TopAbs_UNKNOWN;
+ myPnt.SetCoord(99.,99.,99.);
+ myTolerance=0.0001;
+}
+//=======================================================================
+//function : ~
+//purpose :
+//=======================================================================
+ GEOMAlgo_Clsf::~GEOMAlgo_Clsf()
+{
+}
+//=======================================================================
+//function : SetTolerance
+//purpose :
+//=======================================================================
+ void GEOMAlgo_Clsf::SetTolerance(const Standard_Real aT)
+{
+ myTolerance=aT;
+}
+//=======================================================================
+//function : Tolerance
+//purpose :
+//=======================================================================
+ Standard_Real GEOMAlgo_Clsf::Tolerance()const
+{
+ return myTolerance;
+}
+//=======================================================================
+//function : SetPnt
+//purpose :
+//=======================================================================
+ void GEOMAlgo_Clsf::SetPnt(const gp_Pnt& aP)
+{
+ myPnt=aP;
+}
+//=======================================================================
+//function : Pnt
+//purpose :
+//=======================================================================
+ const gp_Pnt& GEOMAlgo_Clsf::Pnt()const
+{
+ return myPnt;
+}
+//=======================================================================
+//function : State
+//purpose :
+//=======================================================================
+ TopAbs_State GEOMAlgo_Clsf::State() const
+{
+ return myState;
+}
+//=======================================================================
+//function : CanBeON
+//purpose :
+//=======================================================================
+ Standard_Boolean GEOMAlgo_Clsf::CanBeON(const Handle(Geom_Curve)& ) const
+{
+ return Standard_True;
+}
+//=======================================================================
+//function : CanBeON
+//purpose :
+//=======================================================================
+ Standard_Boolean GEOMAlgo_Clsf::CanBeON(const Handle(Geom_Surface)& ) const
+{
+ return Standard_True;
+}
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _GEOMAlgo_Clsf_HeaderFile
+#define _GEOMAlgo_Clsf_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Handle_GEOMAlgo_Clsf_HeaderFile
+#include <Handle_GEOMAlgo_Clsf.hxx>
+#endif
+
+#ifndef _TopAbs_State_HeaderFile
+#include <TopAbs_State.hxx>
+#endif
+#ifndef _gp_Pnt_HeaderFile
+#include <gp_Pnt.hxx>
+#endif
+#ifndef _Standard_Real_HeaderFile
+#include <Standard_Real.hxx>
+#endif
+#ifndef _GEOMAlgo_HAlgo_HeaderFile
+#include <GEOMAlgo_HAlgo.hxx>
+#endif
+#ifndef _Standard_Boolean_HeaderFile
+#include <Standard_Boolean.hxx>
+#endif
+#ifndef _Handle_Geom_Curve_HeaderFile
+#include <Handle_Geom_Curve.hxx>
+#endif
+#ifndef _Handle_Geom_Surface_HeaderFile
+#include <Handle_Geom_Surface.hxx>
+#endif
+class gp_Pnt;
+class Geom_Curve;
+class Geom_Surface;
+
+
+
+class GEOMAlgo_Clsf : public GEOMAlgo_HAlgo {
+
+public:
+ // Methods PUBLIC
+ //
+
+
+Standard_EXPORT void SetPnt(const gp_Pnt& aP) ;
+
+
+Standard_EXPORT const gp_Pnt& Pnt() const;
+
+
+Standard_EXPORT void SetTolerance(const Standard_Real aT) ;
+
+
+Standard_EXPORT Standard_Real Tolerance() const;
+
+
+Standard_EXPORT TopAbs_State State() const;
+
+
+Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aCT) const;
+
+
+Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
+//Standard_EXPORT ~GEOMAlgo_Clsf();
+
+
+
+
+ // Type management
+ //
+ Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+
+protected:
+
+ // Methods PROTECTED
+ //
+
+
+Standard_EXPORT GEOMAlgo_Clsf();
+Standard_EXPORT virtual ~GEOMAlgo_Clsf();
+
+
+ // Fields PROTECTED
+ //
+TopAbs_State myState;
+gp_Pnt myPnt;
+Standard_Real myTolerance;
+
+
+private:
+
+ // Methods PRIVATE
+ //
+
+
+ // Fields PRIVATE
+ //
+
+
+};
+
+
+
+
+
+// other Inline functions and methods (like "C++: function call" methods)
+//
+
+
+#endif
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#include <GEOMAlgo_Clsf.jxx>
+
+#ifndef _Standard_TypeMismatch_HeaderFile
+#include <Standard_TypeMismatch.hxx>
+#endif
+
+//GEOMAlgo_Clsf::~GEOMAlgo_Clsf() {}
+
+
+
+Standard_EXPORT Handle_Standard_Type& GEOMAlgo_Clsf_Type_()
+{
+
+ static Handle_Standard_Type aType1 = STANDARD_TYPE(GEOMAlgo_HAlgo);
+ static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
+ static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
+
+
+ static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
+ static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_Clsf",
+ sizeof(GEOMAlgo_Clsf),
+ 1,
+ (Standard_Address)_Ancestors,
+ (Standard_Address)NULL);
+
+ return _aType;
+}
+
+
+// DownCast method
+// allow safe downcasting
+//
+const Handle(GEOMAlgo_Clsf) Handle(GEOMAlgo_Clsf)::DownCast(const Handle(Standard_Transient)& AnObject)
+{
+ Handle(GEOMAlgo_Clsf) _anOtherObject;
+
+ if (!AnObject.IsNull()) {
+ if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_Clsf))) {
+ _anOtherObject = Handle(GEOMAlgo_Clsf)((Handle(GEOMAlgo_Clsf)&)AnObject);
+ }
+ }
+
+ return _anOtherObject ;
+}
+const Handle(Standard_Type)& GEOMAlgo_Clsf::DynamicType() const
+{
+ return STANDARD_TYPE(GEOMAlgo_Clsf) ;
+}
+//Standard_Boolean GEOMAlgo_Clsf::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(GEOMAlgo_Clsf) == AType || GEOMAlgo_HAlgo::IsKind(AType));
+//}
+//Handle_GEOMAlgo_Clsf::~Handle_GEOMAlgo_Clsf() {}
+
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _gp_Pnt_HeaderFile
+#include <gp_Pnt.hxx>
+#endif
+#ifndef _Geom_Curve_HeaderFile
+#include <Geom_Curve.hxx>
+#endif
+#ifndef _Geom_Surface_HeaderFile
+#include <Geom_Surface.hxx>
+#endif
+#ifndef _GEOMAlgo_Clsf_HeaderFile
+#include <GEOMAlgo_Clsf.hxx>
+#endif
--- /dev/null
+-- Copyright (C) 2005 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 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
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
+-- File: GEOMAlgo_ClsfBox.cdl
+-- Created: Wed Nov 22 10:19:29 2006
+-- Author: Peter KURNEV
+-- <pkv@irinox>
+
+
+class ClsfBox from GEOMAlgo
+ inherits Clsf from GEOMAlgo
+
+ ---Purpose:
+
+uses
+ Shape from TopoDS,
+ Curve from Geom,
+ Surface from Geom,
+ Surface from GeomAdaptor
+
+--raises
+
+is
+ Create
+ returns mutable ClsfBox from GEOMAlgo;
+ ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ClsfBox();"
+
+ SetBox(me:mutable;
+ aS:Shape from TopoDS);
+
+ Box(me)
+ returns Shape from TopoDS;
+ ---C++: return const &
+
+ Perform(me:mutable)
+ is redefined;
+
+ CheckData(me:mutable)
+ is redefined;
+
+ CanBeON(me;
+ aC:Curve from Geom)
+ returns Boolean from Standard
+ is redefined;
+
+ CanBeON(me;
+ aST:Surface from Geom)
+ returns Boolean from Standard
+ is redefined;
+
+fields
+ myBox : Shape from TopoDS is protected;
+ myGAS : Surface from GeomAdaptor [6] is protected;
+end ClsfBox;
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File: GEOMAlgo_ClsfSurf.cxx
+// Created: Wed Nov 22 10:41:47 2006
+// Author: Peter KURNEV
+// <pkv@irinox>
+
+
+#include <GEOMAlgo_ClsfBox.ixx>
+#include <GeomAbs_SurfaceType.hxx>
+#include <GEOMAlgo_SurfaceTools.hxx>
+#include <TopAbs_ShapeEnum.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopExp.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS.hxx>
+#include <Geom_Surface.hxx>
+#include <BRep_Tool.hxx>
+#include <Geom_Plane.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Ax1.hxx>
+#include <Geom_Plane.hxx>
+
+//=======================================================================
+//function :
+//purpose :
+//=======================================================================
+ GEOMAlgo_ClsfBox::GEOMAlgo_ClsfBox()
+:
+ GEOMAlgo_Clsf()
+{
+}
+//=======================================================================
+//function : ~
+//purpose :
+//=======================================================================
+ GEOMAlgo_ClsfBox::~GEOMAlgo_ClsfBox()
+{
+}
+//=======================================================================
+//function : SetBox
+//purpose :
+//=======================================================================
+ void GEOMAlgo_ClsfBox::SetBox(const TopoDS_Shape& aBox)
+{
+ myBox=aBox;
+}
+//=======================================================================
+//function : Box
+//purpose :
+//=======================================================================
+ const TopoDS_Shape& GEOMAlgo_ClsfBox::Box() const
+{
+ return myBox;
+}
+//=======================================================================
+//function : CheckData
+//purpose :
+//=======================================================================
+ void GEOMAlgo_ClsfBox::CheckData()
+{
+ Standard_Integer i, aNbF;
+ TopAbs_ShapeEnum aTypeShape;
+ TopAbs_Orientation aOr;
+ GeomAbs_SurfaceType aType;
+ Handle(Geom_Surface) aS;
+ TopTools_IndexedMapOfShape aMF;
+ //
+ myErrorStatus=0;
+ //
+ if(myBox.IsNull()) {
+ myErrorStatus=10; // myBox=NULL
+ return;
+ }
+ //
+ aTypeShape=myBox.ShapeType();
+ if (aTypeShape!=TopAbs_SOLID) {
+ myErrorStatus=11; // unallowed shape type
+ return;
+ }
+ //
+ TopExp::MapShapes(myBox, TopAbs_FACE, aMF);
+ aNbF=aMF.Extent();
+ if (aNbF!=6) {
+ myErrorStatus=12; // wrong number of faces
+ return;
+ }
+ //
+ for (i=1; i<=aNbF; ++i) {
+ const TopoDS_Face& aF=TopoDS::Face(aMF(i));
+ aOr=aF.Orientation();
+ if (!(aOr==TopAbs_FORWARD || aOr==TopAbs_REVERSED)) {
+ myErrorStatus=12; // unallowed orientation of face
+ return;
+ }
+ //
+ aS=BRep_Tool::Surface(aF);
+ myGAS[i-1].Load(aS);
+ aType=myGAS[i-1].GetType();
+ if (!aType==GeomAbs_Plane) {
+ myErrorStatus=13; // unallowed surface type
+ return;
+ }
+ //
+ if(aOr==TopAbs_REVERSED) {
+ gp_Ax1 aAx1;
+ gp_Pln aPln;
+ gp_Pnt aP;
+ gp_Dir aD;
+ Handle(Geom_Plane) aSR;
+ //
+ aPln=myGAS[i-1].Plane();
+ aAx1=aPln.Axis();
+ aP=aAx1.Location();
+ aD=aAx1.Direction();
+ aD.Reverse();
+ aSR=new Geom_Plane(aP, aD);
+ myGAS[i-1].Load(aSR);
+ }
+ }
+}
+//=======================================================================
+//function : Perform
+//purpose :
+//=======================================================================
+ void GEOMAlgo_ClsfBox::Perform()
+{
+ myErrorStatus=0;
+ //
+ const Standard_Integer aNbS=6;
+ Standard_Integer i, aNbON, aNbIN, iNext;
+ TopAbs_State aSt;
+ /*
+ CheckData();
+ if(myErrorStatus) {
+ return;
+ }
+ */
+ iNext=1;
+ aNbON=0;
+ aNbIN=0;
+ for(i=0; i<aNbS && iNext; i++) {
+ GEOMAlgo_SurfaceTools::GetState(myPnt, myGAS[i], myTolerance, aSt);
+ //
+ switch (aSt) {
+ case TopAbs_OUT:
+ myState=aSt;
+ iNext=0;
+ break;
+ case TopAbs_ON:
+ ++aNbON;
+ break;
+ case TopAbs_IN:
+ ++aNbIN;
+ break;
+ default:
+ myState=TopAbs_UNKNOWN;
+ iNext=0;
+ break;
+ }
+ }
+ //
+ if (iNext) {
+ myState=TopAbs_UNKNOWN;
+ //
+ if (aNbON && aNbIN) {
+ myState=TopAbs_ON;
+ }
+ else if (aNbIN==aNbS){
+ myState=TopAbs_IN;
+ }
+ }
+}
+//=======================================================================
+//function : CanBeON
+//purpose :
+//=======================================================================
+ Standard_Boolean GEOMAlgo_ClsfBox::CanBeON(const Handle(Geom_Curve)& aC) const
+{
+ return GEOMAlgo_Clsf::CanBeON(aC);
+}
+//=======================================================================
+//function : CanBeON
+//purpose :
+//=======================================================================
+ Standard_Boolean GEOMAlgo_ClsfBox::CanBeON(const Handle(Geom_Surface)& aS1) const
+{
+ Standard_Boolean bRet;
+ GeomAbs_SurfaceType aST1;
+ GeomAdaptor_Surface aGAS1;
+ //
+ aGAS1.Load(aS1);
+ aST1=aGAS1.GetType();
+ bRet=(aST1==GeomAbs_Plane);
+ //
+ return bRet;
+}
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _GEOMAlgo_ClsfBox_HeaderFile
+#define _GEOMAlgo_ClsfBox_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Handle_GEOMAlgo_ClsfBox_HeaderFile
+#include <Handle_GEOMAlgo_ClsfBox.hxx>
+#endif
+
+#ifndef _TopoDS_Shape_HeaderFile
+#include <TopoDS_Shape.hxx>
+#endif
+#ifndef _GeomAdaptor_Surface_HeaderFile
+#include <GeomAdaptor_Surface.hxx>
+#endif
+#ifndef _GEOMAlgo_Clsf_HeaderFile
+#include <GEOMAlgo_Clsf.hxx>
+#endif
+#ifndef _Standard_Boolean_HeaderFile
+#include <Standard_Boolean.hxx>
+#endif
+#ifndef _Handle_Geom_Curve_HeaderFile
+#include <Handle_Geom_Curve.hxx>
+#endif
+#ifndef _Handle_Geom_Surface_HeaderFile
+#include <Handle_Geom_Surface.hxx>
+#endif
+class TopoDS_Shape;
+class Geom_Curve;
+class Geom_Surface;
+
+
+
+class GEOMAlgo_ClsfBox : public GEOMAlgo_Clsf {
+
+public:
+ // Methods PUBLIC
+ //
+
+
+Standard_EXPORT GEOMAlgo_ClsfBox();
+Standard_EXPORT virtual ~GEOMAlgo_ClsfBox();
+
+
+Standard_EXPORT void SetBox(const TopoDS_Shape& aS) ;
+
+
+Standard_EXPORT const TopoDS_Shape& Box() const;
+
+
+Standard_EXPORT virtual void Perform() ;
+
+
+Standard_EXPORT virtual void CheckData() ;
+
+
+Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aC) const;
+
+
+Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
+//Standard_EXPORT ~GEOMAlgo_ClsfBox();
+
+
+
+
+ // Type management
+ //
+ Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+
+protected:
+
+ // Methods PROTECTED
+ //
+
+
+ // Fields PROTECTED
+ //
+TopoDS_Shape myBox;
+GeomAdaptor_Surface myGAS[6];
+
+
+private:
+
+ // Methods PRIVATE
+ //
+
+
+ // Fields PRIVATE
+ //
+
+
+};
+
+
+
+
+
+// other Inline functions and methods (like "C++: function call" methods)
+//
+
+
+#endif
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#include <GEOMAlgo_ClsfBox.jxx>
+
+#ifndef _Standard_TypeMismatch_HeaderFile
+#include <Standard_TypeMismatch.hxx>
+#endif
+
+//GEOMAlgo_ClsfBox::~GEOMAlgo_ClsfBox() {}
+
+
+
+Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ClsfBox_Type_()
+{
+
+ static Handle_Standard_Type aType1 = STANDARD_TYPE(GEOMAlgo_Clsf);
+ static Handle_Standard_Type aType2 = STANDARD_TYPE(GEOMAlgo_HAlgo);
+ static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
+ static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
+
+
+ static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
+ static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ClsfBox",
+ sizeof(GEOMAlgo_ClsfBox),
+ 1,
+ (Standard_Address)_Ancestors,
+ (Standard_Address)NULL);
+
+ return _aType;
+}
+
+
+// DownCast method
+// allow safe downcasting
+//
+const Handle(GEOMAlgo_ClsfBox) Handle(GEOMAlgo_ClsfBox)::DownCast(const Handle(Standard_Transient)& AnObject)
+{
+ Handle(GEOMAlgo_ClsfBox) _anOtherObject;
+
+ if (!AnObject.IsNull()) {
+ if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_ClsfBox))) {
+ _anOtherObject = Handle(GEOMAlgo_ClsfBox)((Handle(GEOMAlgo_ClsfBox)&)AnObject);
+ }
+ }
+
+ return _anOtherObject ;
+}
+const Handle(Standard_Type)& GEOMAlgo_ClsfBox::DynamicType() const
+{
+ return STANDARD_TYPE(GEOMAlgo_ClsfBox) ;
+}
+//Standard_Boolean GEOMAlgo_ClsfBox::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(GEOMAlgo_ClsfBox) == AType || GEOMAlgo_Clsf::IsKind(AType));
+//}
+//Handle_GEOMAlgo_ClsfBox::~Handle_GEOMAlgo_ClsfBox() {}
+
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _TopoDS_Shape_HeaderFile
+#include <TopoDS_Shape.hxx>
+#endif
+#ifndef _Geom_Curve_HeaderFile
+#include <Geom_Curve.hxx>
+#endif
+#ifndef _Geom_Surface_HeaderFile
+#include <Geom_Surface.hxx>
+#endif
+#ifndef _GEOMAlgo_ClsfBox_HeaderFile
+#include <GEOMAlgo_ClsfBox.hxx>
+#endif
--- /dev/null
+-- Copyright (C) 2005 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 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
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
+-- File: GEOMAlgo_ClsfSurf.cdl
+-- Created: Wed Nov 22 10:19:29 2006
+-- Author: Peter KURNEV
+-- <pkv@irinox>
+
+
+class ClsfSurf from GEOMAlgo
+ inherits Clsf from GEOMAlgo
+
+ ---Purpose:
+
+uses
+ Curve from Geom,
+ Surface from Geom,
+ Surface from GeomAdaptor
+
+--raises
+
+is
+ Create
+ returns mutable ClsfSurf from GEOMAlgo;
+ ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ClsfSurf();"
+
+ SetSurface(me:mutable;
+ aS:Surface from Geom);
+
+ Surface(me)
+ returns Surface from Geom;
+ ---C++: return const &
+
+ Perform(me:mutable)
+ is redefined;
+
+ CheckData(me:mutable)
+ is redefined;
+
+ CanBeON(me;
+ aC:Curve from Geom)
+ returns Boolean from Standard
+ is redefined;
+
+ CanBeON(me;
+ aST:Surface from Geom)
+ returns Boolean from Standard
+ is redefined;
+
+fields
+ myS : Surface from Geom is protected;
+ myGAS : Surface from GeomAdaptor is protected;
+
+end ClsfSurf;
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File: GEOMAlgo_ClsfSurf.cxx
+// Created: Wed Nov 22 10:41:47 2006
+// Author: Peter KURNEV
+// <pkv@irinox>
+
+
+#include <GEOMAlgo_ClsfSurf.ixx>
+#include <GeomAbs_SurfaceType.hxx>
+#include <GEOMAlgo_SurfaceTools.hxx>
+#include <GeomAdaptor_Curve.hxx>
+
+//=======================================================================
+//function :
+//purpose :
+//=======================================================================
+ GEOMAlgo_ClsfSurf::GEOMAlgo_ClsfSurf()
+:
+ GEOMAlgo_Clsf()
+{
+}
+//=======================================================================
+//function : ~
+//purpose :
+//=======================================================================
+ GEOMAlgo_ClsfSurf::~GEOMAlgo_ClsfSurf()
+{
+}
+//=======================================================================
+//function : SetSurface
+//purpose :
+//=======================================================================
+ void GEOMAlgo_ClsfSurf::SetSurface(const Handle(Geom_Surface)& aS)
+{
+ myS=aS;
+}
+//=======================================================================
+//function : Surface
+//purpose :
+//=======================================================================
+ const Handle(Geom_Surface)& GEOMAlgo_ClsfSurf::Surface() const
+{
+ return myS;
+}
+//=======================================================================
+//function : CheckData
+//purpose :
+//=======================================================================
+ void GEOMAlgo_ClsfSurf::CheckData()
+{
+ GeomAbs_SurfaceType aType;
+ //
+ myErrorStatus=0;
+ //
+ if(myS.IsNull()) {
+ myErrorStatus=10; // mySurface=NULL
+ return;
+ }
+ //
+ myGAS.Load(myS);
+ aType=myGAS.GetType();
+ if (!(aType==GeomAbs_Plane ||
+ aType==GeomAbs_Cylinder ||
+ aType==GeomAbs_Sphere)) {
+ myErrorStatus=11; // unallowed surface type
+ }
+}
+//=======================================================================
+//function : Perform
+//purpose :
+//=======================================================================
+ void GEOMAlgo_ClsfSurf::Perform()
+{
+ myErrorStatus=0;
+ /*
+ CheckData();
+ if(myErrorStatus) {
+ return;
+ }
+ */
+ GEOMAlgo_SurfaceTools::GetState(myPnt, myGAS, myTolerance, myState);
+}
+//=======================================================================
+//function : CanBeON
+//purpose :
+//=======================================================================
+ Standard_Boolean GEOMAlgo_ClsfSurf::CanBeON(const Handle(Geom_Curve)& aC) const
+{
+ GeomAbs_SurfaceType aST;
+ GeomAbs_CurveType aCT;
+ GeomAdaptor_Curve aGAC;
+ //
+ aGAC.Load(aC);
+ aCT=aGAC.GetType();
+ //
+ aST=myGAS.GetType();
+ if (aCT==GeomAbs_Line && aST==GeomAbs_Sphere) {
+ return Standard_False;
+ }
+ return Standard_True;
+}
+//=======================================================================
+//function : CanBeON
+//purpose :
+//=======================================================================
+ Standard_Boolean GEOMAlgo_ClsfSurf::CanBeON(const Handle(Geom_Surface)& aS1) const
+{
+ Standard_Boolean bRet;
+ GeomAbs_SurfaceType aST, aST1;
+ GeomAdaptor_Surface aGAS1;
+ //
+ aST=myGAS.GetType();
+ aGAS1.Load(aS1);
+ aST1=aGAS1.GetType();
+ bRet=(aST1==aST);
+ //
+ return bRet;
+}
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _GEOMAlgo_ClsfSurf_HeaderFile
+#define _GEOMAlgo_ClsfSurf_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Handle_GEOMAlgo_ClsfSurf_HeaderFile
+#include <Handle_GEOMAlgo_ClsfSurf.hxx>
+#endif
+
+#ifndef _Handle_Geom_Surface_HeaderFile
+#include <Handle_Geom_Surface.hxx>
+#endif
+#ifndef _GeomAdaptor_Surface_HeaderFile
+#include <GeomAdaptor_Surface.hxx>
+#endif
+#ifndef _GEOMAlgo_Clsf_HeaderFile
+#include <GEOMAlgo_Clsf.hxx>
+#endif
+#ifndef _Standard_Boolean_HeaderFile
+#include <Standard_Boolean.hxx>
+#endif
+#ifndef _Handle_Geom_Curve_HeaderFile
+#include <Handle_Geom_Curve.hxx>
+#endif
+class Geom_Surface;
+class Geom_Curve;
+
+
+
+class GEOMAlgo_ClsfSurf : public GEOMAlgo_Clsf {
+
+public:
+ // Methods PUBLIC
+ //
+
+
+Standard_EXPORT GEOMAlgo_ClsfSurf();
+Standard_EXPORT virtual ~GEOMAlgo_ClsfSurf();
+
+
+Standard_EXPORT void SetSurface(const Handle(Geom_Surface)& aS) ;
+
+
+Standard_EXPORT const Handle_Geom_Surface& Surface() const;
+
+
+Standard_EXPORT virtual void Perform() ;
+
+
+Standard_EXPORT virtual void CheckData() ;
+
+
+Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aC) const;
+
+
+Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
+//Standard_EXPORT ~GEOMAlgo_ClsfSurf();
+
+
+
+
+ // Type management
+ //
+ Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+
+protected:
+
+ // Methods PROTECTED
+ //
+
+
+ // Fields PROTECTED
+ //
+Handle_Geom_Surface myS;
+GeomAdaptor_Surface myGAS;
+
+
+private:
+
+ // Methods PRIVATE
+ //
+
+
+ // Fields PRIVATE
+ //
+
+
+};
+
+
+
+
+
+// other Inline functions and methods (like "C++: function call" methods)
+//
+
+
+#endif
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#include <GEOMAlgo_ClsfSurf.jxx>
+
+#ifndef _Standard_TypeMismatch_HeaderFile
+#include <Standard_TypeMismatch.hxx>
+#endif
+
+//GEOMAlgo_ClsfSurf::~GEOMAlgo_ClsfSurf() {}
+
+
+
+Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ClsfSurf_Type_()
+{
+
+ static Handle_Standard_Type aType1 = STANDARD_TYPE(GEOMAlgo_Clsf);
+ static Handle_Standard_Type aType2 = STANDARD_TYPE(GEOMAlgo_HAlgo);
+ static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
+ static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
+
+
+ static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
+ static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ClsfSurf",
+ sizeof(GEOMAlgo_ClsfSurf),
+ 1,
+ (Standard_Address)_Ancestors,
+ (Standard_Address)NULL);
+
+ return _aType;
+}
+
+
+// DownCast method
+// allow safe downcasting
+//
+const Handle(GEOMAlgo_ClsfSurf) Handle(GEOMAlgo_ClsfSurf)::DownCast(const Handle(Standard_Transient)& AnObject)
+{
+ Handle(GEOMAlgo_ClsfSurf) _anOtherObject;
+
+ if (!AnObject.IsNull()) {
+ if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_ClsfSurf))) {
+ _anOtherObject = Handle(GEOMAlgo_ClsfSurf)((Handle(GEOMAlgo_ClsfSurf)&)AnObject);
+ }
+ }
+
+ return _anOtherObject ;
+}
+const Handle(Standard_Type)& GEOMAlgo_ClsfSurf::DynamicType() const
+{
+ return STANDARD_TYPE(GEOMAlgo_ClsfSurf) ;
+}
+//Standard_Boolean GEOMAlgo_ClsfSurf::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(GEOMAlgo_ClsfSurf) == AType || GEOMAlgo_Clsf::IsKind(AType));
+//}
+//Handle_GEOMAlgo_ClsfSurf::~Handle_GEOMAlgo_ClsfSurf() {}
+
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _Geom_Surface_HeaderFile
+#include <Geom_Surface.hxx>
+#endif
+#ifndef _Geom_Curve_HeaderFile
+#include <Geom_Curve.hxx>
+#endif
+#ifndef _GEOMAlgo_ClsfSurf_HeaderFile
+#include <GEOMAlgo_ClsfSurf.hxx>
+#endif
#include <BRepLib_MakeEdge.hxx>
#include <GEOMAlgo_ListIteratorOfListOfPnt.hxx>
-#include <GEOMAlgo_PassKey.hxx>
-#include <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
+
#include <GEOMAlgo_SurfaceTools.hxx>
#include <GEOMAlgo_StateCollector.hxx>
+#include <GEOMAlgo_PassKey.hxx>
+#include <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
+#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
//=======================================================================
//function : GEOMAlgo_FinderShapeOn1
{
myErrorStatus=0;
//
- Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNbMax, aNb;
- Standard_Integer iCnt, *pIds;
+ Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNb, iCnt;//, aNbMax, *pIds;
TopLoc_Location aLoc;
Handle(Poly_Triangulation) aTRF;
TColStd_MapOfInteger aMBN;
iCnt=aIt.Value();
if (iCnt==1) {
const GEOMAlgo_PassKey& aPK=aIt.Key();
+ //qf
+ /*
aNbMax=aPK.NbMax();
pIds=(Standard_Integer*)aPK.Key();
for (k=1; k<3; ++k) {
aNx=*(pIds+aNbMax-k);
aMBN.Add(aNx);
}
+ */
+ aNx=(Standard_Integer)aPK.Id(1);
+ aMBN.Add(aNx);
+ aNx=(Standard_Integer)aPK.Id(2);
+ aMBN.Add(aNx);
+ //qt
}
}
//
// take the first having occured inner link
// and discretize it
const GEOMAlgo_PassKey& aPK=aIt.Key();
+ //qf
+ /*
aNbMax=aPK.NbMax();
pIds=(Standard_Integer*)aPK.Key();
aN1=*(pIds+aNbMax-1);
aN2=*(pIds+aNbMax-2);
+ */
+ //
+ aN1=(Standard_Integer)aPK.Id(1);
+ aN2=(Standard_Integer)aPK.Id(2);
+ //qt
aP1=aNodes(aN1).Transformed(aTrsf);
aP2=aNodes(aN2).Transformed(aTrsf);
//
--- /dev/null
+-- Copyright (C) 2005 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 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
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
+-- File: GEOMAlgo_FinderShapeOn1.cdl
+-- Created: Fri Mar 4 10:26:54 2005
+-- Author: Peter KURNEV
+-- <pkv@irinox>
+
+
+class FinderShapeOn2 from GEOMAlgo
+ inherits ShapeAlgo from GEOMAlgo
+
+ ---Purpose:
+
+uses
+ Pnt from gp,
+ ShapeEnum from TopAbs,
+ State from TopAbs,
+ Face from TopoDS,
+ Edge from TopoDS,
+ ListOfShape from TopTools,
+
+ State from GEOMAlgo,
+ ListOfPnt from GEOMAlgo,
+ IndexedDataMapOfShapeState from GEOMAlgo,
+ Clsf from GEOMAlgo
+
+--raises
+
+is
+ Create
+ returns FinderShapeOn2 from GEOMAlgo;
+ ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn2();"
+
+ SetClsf(me:out;
+ aClsf:Clsf from GEOMAlgo);
+
+ Clsf(me)
+ returns Clsf from GEOMAlgo;
+ ---C++: return const &
+
+ SetShapeType(me:out;
+ aST:ShapeEnum from TopAbs);
+
+ ShapeType(me)
+ returns ShapeEnum from TopAbs;
+
+ SetState(me:out;
+ aSF:State from GEOMAlgo);
+
+ State(me)
+ returns State from GEOMAlgo;
+
+ SetNbPntsMin(me:out;
+ aNb:Integer from Standard);
+
+ NbPntsMin(me)
+ returns Integer from Standard;
+
+ SetNbPntsMax(me:out;
+ aNb:Integer from Standard);
+
+ NbPntsMax(me)
+ returns Integer from Standard;
+
+ Perform(me:out)
+ is redefined;
+
+ Shapes(me)
+ returns ListOfShape from TopTools;
+ ---C++: return const &
+ --
+ -- protected methods
+ --
+ CheckData(me:out)
+ is redefined protected;
+
+ ProcessVertices(me:out)
+ is protected;
+
+ ProcessEdges(me:out)
+ is protected;
+
+ ProcessFaces(me:out)
+ is protected;
+
+ ProcessSolids(me:out)
+ is protected;
+
+ InnerPoints(me:out;
+ aF :Face from TopoDS;
+ aLP:out ListOfPnt from GEOMAlgo)
+ is protected;
+
+ InnerPoints(me:out;
+ aE :Edge from TopoDS;
+ aLP:out ListOfPnt from GEOMAlgo)
+ is protected;
+
+ InnerPoints(me:out;
+ aE :Edge from TopoDS;
+ aNbPnts: Integer from Standard;
+ aLP:out ListOfPnt from GEOMAlgo)
+ is protected;
+
+ MSS (me)
+ returns IndexedDataMapOfShapeState from GEOMAlgo;
+ ---C++:return const &
+
+
+fields
+ myShapeType : ShapeEnum from TopAbs is protected;
+ myState : State from GEOMAlgo is protected;
+ myNbPntsMin : Integer from Standard is protected;
+ myNbPntsMax : Integer from Standard is protected;
+ myClsf : Clsf from GEOMAlgo is protected;
+ --
+ myLS : ListOfShape from TopTools is protected;
+ --
+ myMSS : IndexedDataMapOfShapeState from GEOMAlgo is protected;
+
+end FinderShapeOn2;
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File: GEOMAlgo_FinderShapeOn1.cxx
+// Created: Fri Mar 4 10:31:06 2005
+// Author: Peter KURNEV
+// <pkv@irinox>
+
+
+#include <GEOMAlgo_FinderShapeOn2.ixx>
+#include <math.h>
+
+
+#include <Precision.hxx>
+#include <TColStd_Array1OfInteger.hxx>
+#include <TColStd_MapOfInteger.hxx>
+
+#include <gp_Trsf.hxx>
+#include <gp_Cylinder.hxx>
+#include <gp_Pnt.hxx>
+
+#include <TColgp_Array1OfPnt.hxx>
+
+#include <Poly_Array1OfTriangle.hxx>
+#include <Poly_Triangle.hxx>
+#include <Poly_PolygonOnTriangulation.hxx>
+#include <Poly_Triangulation.hxx>
+
+#include <Geom_Curve.hxx>
+#include <Geom_Surface.hxx>
+#include <GeomAdaptor_Surface.hxx>
+#include <GeomAbs_SurfaceType.hxx>
+#include <GeomAdaptor_Curve.hxx>
+#include <GeomAbs_CurveType.hxx>
+
+#include <TopAbs_State.hxx>
+
+#include <TopLoc_Location.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Vertex.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Edge.hxx>
+
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
+
+#include <TopTools_IndexedMapOfShape.hxx>
+
+#include <BRep_Tool.hxx>
+#include <BRepLib_MakeEdge.hxx>
+
+#include <GEOMAlgo_ListIteratorOfListOfPnt.hxx>
+
+#include <GEOMAlgo_SurfaceTools.hxx>
+#include <GEOMAlgo_StateCollector.hxx>
+
+#include <GEOMAlgo_PassKey.hxx>
+#include <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
+#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
+
+//=======================================================================
+//function : GEOMAlgo_FinderShapeOn1
+//purpose :
+//=======================================================================
+ GEOMAlgo_FinderShapeOn2::GEOMAlgo_FinderShapeOn2()
+:
+ GEOMAlgo_ShapeAlgo()
+{
+ myTolerance=0.0001;
+ myShapeType=TopAbs_VERTEX;
+ myState=GEOMAlgo_ST_UNKNOWN;
+ myNbPntsMin=3;
+ myNbPntsMax=0;
+}
+//=======================================================================
+//function : ~
+//purpose :
+//=======================================================================
+ GEOMAlgo_FinderShapeOn2::~GEOMAlgo_FinderShapeOn2()
+{
+}
+//=======================================================================
+//function : SetClsf
+//purpose :
+//=======================================================================
+ void GEOMAlgo_FinderShapeOn2::SetClsf(const Handle(GEOMAlgo_Clsf)& aClsf)
+{
+ myClsf=aClsf;
+}
+//=======================================================================
+//function : Clsf
+//purpose :
+//=======================================================================
+ const Handle(GEOMAlgo_Clsf)& GEOMAlgo_FinderShapeOn2::Clsf() const
+{
+ return myClsf;
+}
+//=======================================================================
+//function : SetShapeType
+//purpose :
+//=======================================================================
+ void GEOMAlgo_FinderShapeOn2::SetShapeType(const TopAbs_ShapeEnum aType)
+{
+ myShapeType=aType;
+}
+//=======================================================================
+//function : ShapeType
+//purpose :
+//=======================================================================
+ TopAbs_ShapeEnum GEOMAlgo_FinderShapeOn2::ShapeType()const
+{
+ return myShapeType;
+}
+//=======================================================================
+//function : SetState
+//purpose :
+//=======================================================================
+ void GEOMAlgo_FinderShapeOn2::SetState(const GEOMAlgo_State aState)
+{
+ myState=aState;
+}
+//=======================================================================
+//function : State
+//purpose :
+//=======================================================================
+ GEOMAlgo_State GEOMAlgo_FinderShapeOn2::State() const
+{
+ return myState;
+}
+//=======================================================================
+//function : SetNbPntsMin
+//purpose :
+//=======================================================================
+ void GEOMAlgo_FinderShapeOn2::SetNbPntsMin(const Standard_Integer aNb)
+{
+ myNbPntsMin=aNb;
+}
+//=======================================================================
+//function : NbPntsMin
+//purpose :
+//=======================================================================
+ Standard_Integer GEOMAlgo_FinderShapeOn2::NbPntsMin()const
+{
+ return myNbPntsMin;
+}
+//=======================================================================
+//function : SetNbPntsMax
+//purpose :
+//=======================================================================
+ void GEOMAlgo_FinderShapeOn2::SetNbPntsMax(const Standard_Integer aNb)
+{
+ myNbPntsMax=aNb;
+}
+//=======================================================================
+//function : NbPntsMax
+//purpose :
+//=======================================================================
+ Standard_Integer GEOMAlgo_FinderShapeOn2::NbPntsMax()const
+{
+ return myNbPntsMax;
+}
+//=======================================================================
+// function: MSS
+// purpose:
+//=======================================================================
+ const GEOMAlgo_IndexedDataMapOfShapeState& GEOMAlgo_FinderShapeOn2::MSS() const
+{
+ return myMSS;
+}
+//=======================================================================
+// function: Shapes
+// purpose:
+//=======================================================================
+ const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn2::Shapes() const
+{
+ Standard_Integer i, aNb;
+ TopTools_ListOfShape* pL;
+ //
+ pL=(TopTools_ListOfShape*) &myLS;
+ pL->Clear();
+ //
+ aNb=myMSS.Extent();
+ for (i=1; i<=aNb; ++i) {
+ const TopoDS_Shape& aS=myMSS.FindKey(i);
+ if (aS.ShapeType()==myShapeType) {
+ pL->Append(aS);
+ }
+ }
+ return myLS;
+}
+//=======================================================================
+//function : Perform
+//purpose :
+//=======================================================================
+ void GEOMAlgo_FinderShapeOn2::Perform()
+{
+ myErrorStatus=0;
+ myWarningStatus=0;
+ myLS.Clear();
+ myMSS.Clear();
+ //
+ CheckData();
+ if(myErrorStatus) {
+ return;
+ }
+ //
+ myClsf->SetTolerance(myTolerance);
+ //
+ // 1
+ ProcessVertices();
+ if(myErrorStatus) {
+ return;
+ }
+ if (myShapeType==TopAbs_VERTEX) {
+ return;
+ }
+ //
+ // 2
+ ProcessEdges();
+ if(myErrorStatus) {
+ return;
+ }
+ if (myShapeType==TopAbs_EDGE) {
+ return;
+ }
+ //
+ // 3
+ ProcessFaces();
+ if(myErrorStatus) {
+ return;
+ }
+ if (myShapeType==TopAbs_FACE) {
+ return;
+ }
+ //
+ // 4
+ ProcessSolids();
+ //
+}
+//=======================================================================
+//function : CheckData
+//purpose :
+//=======================================================================
+ void GEOMAlgo_FinderShapeOn2::CheckData()
+{
+ Standard_Integer iErr;
+ //
+ myErrorStatus=0;
+ //
+ if(myClsf.IsNull()) {
+ myErrorStatus=10; // myClsf=NULL
+ return;
+ }
+ //
+ myClsf->CheckData();
+ iErr=myClsf->ErrorStatus();
+ if (iErr) {
+ myErrorStatus=41; // invalid data for classifier
+ return;
+ }
+ //
+ if (myShape.IsNull()) {
+ myErrorStatus=11; // myShape=NULL
+ return;
+ }
+ //
+ if (!(myShapeType==TopAbs_VERTEX ||
+ myShapeType==TopAbs_EDGE ||
+ myShapeType==TopAbs_FACE ||
+ myShapeType==TopAbs_SOLID)) {
+ myErrorStatus=12; // unallowed subshape type
+ return;
+ }
+ //
+ if (myState==GEOMAlgo_ST_UNKNOWN ||
+ myState==GEOMAlgo_ST_INOUT) {
+ myErrorStatus=13; // unallowed state type
+ return;
+ }
+}
+//=======================================================================
+//function : ProcessVertices
+//purpose :
+//=======================================================================
+ void GEOMAlgo_FinderShapeOn2::ProcessVertices()
+{
+ myErrorStatus=0;
+ //
+ Standard_Boolean bIsConformState;
+ Standard_Integer i, aNb, iErr;
+ gp_Pnt aP;
+ TopTools_IndexedMapOfShape aM;
+ TopAbs_State aSt;
+ //
+ TopExp::MapShapes(myShape, TopAbs_VERTEX, aM);
+ aNb=aM.Extent();
+ for (i=1; i<=aNb; ++i) {
+ const TopoDS_Vertex& aV=TopoDS::Vertex(aM(i));
+ aP=BRep_Tool::Pnt(aV);
+ //
+ myClsf->SetPnt(aP);
+ myClsf->Perform();
+ iErr=myClsf->ErrorStatus();
+ if (iErr) {
+ myErrorStatus=40; // point can not be classified
+ return;
+ }
+ //
+ aSt=myClsf->State();
+ bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
+ //
+ if (myShapeType==TopAbs_VERTEX){
+ if (bIsConformState) {
+ myMSS.Add(aV, aSt);
+ }
+ }
+ else if (bIsConformState || aSt==TopAbs_ON) {
+ myMSS.Add(aV, aSt);
+ }
+ }
+}
+//=======================================================================
+//function : ProcessEdges
+//purpose :
+//=======================================================================
+ void GEOMAlgo_FinderShapeOn2::ProcessEdges()
+{
+ myErrorStatus=0;
+ //
+ Standard_Boolean bIsConformState, bIsToBreak;
+ Standard_Integer i, aNb, iCnt, iErr;
+ TopAbs_State aSt;
+ TopTools_IndexedMapOfShape aM;
+ TopExp_Explorer aExp;
+ GEOMAlgo_ListIteratorOfListOfPnt aIt;
+ //
+ TopExp::MapShapes(myShape, TopAbs_EDGE, aM);
+ aNb=aM.Extent();
+ for (i=1; i<=aNb; ++i) {
+ GEOMAlgo_ListOfPnt aLP;
+ GEOMAlgo_StateCollector aSC;
+ //
+ const TopoDS_Edge& aE=TopoDS::Edge(aM(i));
+ //
+ aExp.Init(aE, TopAbs_VERTEX);
+ for (; aExp.More(); aExp.Next()) {
+ const TopoDS_Shape& aV=aExp.Current();
+ //
+ bIsConformState=myMSS.Contains(aV);
+ if (!bIsConformState) {
+ break;// vertex has non-conformed state
+ }
+ else {
+ aSt=myMSS.FindFromKey(aV);
+ aSC.AppendState(aSt);
+ }
+ }
+ //
+ if (!bIsConformState) {
+ continue; // vertex has non-conformed state,skip edge
+ }
+ //
+ if (BRep_Tool::Degenerated(aE)) {
+ myMSS.Add(aE, aSt);
+ continue;
+ }
+ //
+ if (myState==GEOMAlgo_ST_ON) {
+ Standard_Boolean bCanBeON;
+ Standard_Real aT1, aT2;
+ Handle(Geom_Curve) aC;
+ //
+ aC=BRep_Tool::Curve(aE, aT1, aT2);
+ bCanBeON=myClsf->CanBeON(aC);
+ if(!bCanBeON) {
+ continue;
+ }
+ }
+ //
+ InnerPoints(aE, aLP);
+ if (myErrorStatus) {
+ return;
+ }
+ //
+ bIsConformState=Standard_True;
+ aIt.Initialize(aLP);
+ for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) {
+ if (myNbPntsMax) {
+ if (iCnt > myNbPntsMax) {
+ break;
+ }
+ }
+ //
+ const gp_Pnt& aP=aIt.Value();
+ //
+ myClsf->SetPnt(aP);
+ myClsf->Perform();
+ iErr=myClsf->ErrorStatus();
+ if (iErr) {
+ myErrorStatus=40; // point can not be classified
+ return;
+ }
+ //
+ aSt=myClsf->State();
+ //
+ bIsToBreak=aSC.AppendState(aSt);
+ if (bIsToBreak) {
+ break;
+ }
+ }
+ //
+ aSt=aSC.State();
+ //
+ bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
+ if (myShapeType==TopAbs_EDGE) {
+ if (bIsConformState) {
+ myMSS.Add(aE, aSt);
+ }
+ }
+ else if (bIsConformState || aSt==TopAbs_ON) {
+ myMSS.Add(aE, aSt);
+ }
+ } // for (i=1; i<=aNb; ++i) next edge
+}
+//=======================================================================
+//function : ProcessFaces
+//purpose :
+//=======================================================================
+ void GEOMAlgo_FinderShapeOn2::ProcessFaces()
+{
+ myErrorStatus=0;
+ //
+ Standard_Boolean bIsConformState, bIsToBreak, bCanBeON;
+ Standard_Integer i, aNbF, iCnt, iErr;
+ TopAbs_State aSt;
+ TopTools_IndexedMapOfShape aM;
+ TopExp_Explorer aExp;
+ GEOMAlgo_ListIteratorOfListOfPnt aIt;
+ //
+ TopExp::MapShapes(myShape, TopAbs_FACE, aM);
+ aNbF=aM.Extent();
+ for (i=1; i<=aNbF; ++i) {
+ GEOMAlgo_StateCollector aSC;
+ GEOMAlgo_ListOfPnt aLP;
+ //
+ const TopoDS_Face& aF=TopoDS::Face(aM(i));
+ //
+ if (myState==GEOMAlgo_ST_ON) {
+ Handle(Geom_Surface) aS;
+ //
+ aS=BRep_Tool::Surface(aF);
+ bCanBeON=myClsf->CanBeON(aS);
+ if(!bCanBeON) {
+ continue;
+ }
+ }
+ //
+ aExp.Init(aF, TopAbs_EDGE);
+ for (; aExp.More(); aExp.Next()) {
+ const TopoDS_Shape& aE=aExp.Current();
+ bIsConformState=myMSS.Contains(aE);
+ if (!bIsConformState) {
+ break;// edge has non-conformed state
+ }
+ else {
+ aSt=myMSS.FindFromKey(aE);
+ aSC.AppendState(aSt);
+ }
+ }
+ //
+ if (!bIsConformState) {
+ continue; // edge has non-conformed state,skip face
+ }
+ //
+ InnerPoints(aF, aLP);
+ if (myErrorStatus) {
+ return;
+ }
+ //
+ bIsConformState=Standard_True;
+ aIt.Initialize(aLP);
+ for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) {
+ if (myNbPntsMax) {
+ if (iCnt > myNbPntsMax) {
+ break;
+ }
+ }
+ //
+ const gp_Pnt& aP=aIt.Value();
+ //
+ myClsf->SetPnt(aP);
+ myClsf->Perform();
+ iErr=myClsf->ErrorStatus();
+ if (iErr) {
+ myErrorStatus=40; // point can not be classified
+ return;
+ }
+ //
+ aSt=myClsf->State();
+ //
+ bIsToBreak=aSC.AppendState(aSt);
+ if (bIsToBreak) {
+ break;
+ }
+ }
+ //
+ aSt=aSC.State();
+ //
+ bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
+ if (myShapeType==TopAbs_FACE) {
+ if (bIsConformState) {
+ myMSS.Add(aF, aSt);
+ }
+ }
+ else if (bIsConformState || aSt==TopAbs_ON) {
+ myMSS.Add(aF, aSt);
+ }
+ }// for (i=1; i<=aNb; ++i) next face
+}
+//=======================================================================
+//function : ProcessSolids
+//purpose :
+//=======================================================================
+ void GEOMAlgo_FinderShapeOn2::ProcessSolids()
+{
+ myErrorStatus=0;
+ //
+ Standard_Boolean bIsConformState;
+ Standard_Integer i, aNbS, j, aNbF;
+ TopTools_IndexedMapOfShape aM, aMF;
+ TopAbs_State aSt;
+ //
+ TopExp::MapShapes(myShape, TopAbs_SOLID, aM);
+ aNbS=aM.Extent();
+ for (i=1; i<=aNbS; ++i) {
+ GEOMAlgo_StateCollector aSC;
+ //
+ const TopoDS_Shape& aSd=aM(i);
+ aMF.Clear();
+ TopExp::MapShapes(aSd, TopAbs_FACE, aMF);
+ aNbF=aMF.Extent();
+ for (j=1; j<=aNbF; ++j) {
+ const TopoDS_Shape& aF=aMF(j);
+ bIsConformState=myMSS.Contains(aF);
+ if (!bIsConformState) {
+ break;// face has non-conformed state
+ }
+ else {
+ aSt=myMSS.FindFromKey(aF);
+ aSC.AppendState(aSt);
+ }
+ }
+ //
+ if (!bIsConformState) {
+ continue; // face has non-conformed state,skip solid
+ }
+ //
+ aSt=aSC.State();
+ //
+ bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
+ if (bIsConformState) {
+ myMSS.Add(aSd, aSt);
+ }
+ }
+}
+//
+//=======================================================================
+//function : InnerPoints
+//purpose :
+//=======================================================================
+ void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
+ GEOMAlgo_ListOfPnt& aLP)
+{
+ myErrorStatus=0;
+ //
+ Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNb, iCnt;//, aNbMax, *pIds;
+ TopLoc_Location aLoc;
+ Handle(Poly_Triangulation) aTRF;
+ TColStd_MapOfInteger aMBN;
+ GEOMAlgo_DataMapOfPassKeyInteger aMPKI;
+ GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger aIt;
+ gp_Pnt aP, aP1, aP2;
+ //
+ aLP.Clear();
+ //
+ aTRF=BRep_Tool::Triangulation(aF, aLoc);
+ if (aTRF.IsNull()) {
+ myErrorStatus=20; // no triangulation found
+ return;
+ }
+ //
+ const gp_Trsf& aTrsf=aLoc.Transformation();
+ const Poly_Array1OfTriangle& aTrs=aTRF->Triangles();
+ const TColgp_Array1OfPnt& aNodes=aTRF->Nodes();
+ //
+ // map link/nbtriangles
+ j1=aTrs.Lower();
+ j2=aTrs.Upper();
+ for (j=j1; j<=j2; ++j) {
+ const Poly_Triangle& aTr=aTrs(j);
+ aTr.Get(n[0], n[1], n[2]);
+ n[3]=n[0];
+ for (k=0; k<3; ++k) {
+ GEOMAlgo_PassKey aPK;
+ //
+ aPK.SetIds(n[k], n[k+1]);
+ if (aMPKI.IsBound(aPK)) {
+ Standard_Integer& iCntX=aMPKI.ChangeFind(aPK);
+ ++iCntX;
+ }
+ else {
+ aMPKI.Bind(aPK, 1);
+ }
+ }
+ }
+ //
+ // boundary nodes aMBN
+ aNbLinks=aMPKI.Extent();
+ aIt.Initialize(aMPKI);
+ for (; aIt.More(); aIt.Next()) {
+ iCnt=aIt.Value();
+ if (iCnt==1) {
+ const GEOMAlgo_PassKey& aPK=aIt.Key();
+ //qf
+ /*
+ aNbMax=aPK.NbMax();
+ pIds=(Standard_Integer*)aPK.Key();
+ for (k=1; k<3; ++k) {
+ aNx=*(pIds+aNbMax-k);
+ aMBN.Add(aNx);
+ }
+ */
+ aNx=(Standard_Integer)aPK.Id(1);
+ aMBN.Add(aNx);
+ aNx=(Standard_Integer)aPK.Id(2);
+ aMBN.Add(aNx);
+ //qt
+ }
+ }
+ //
+ // inner nodes=all_nodes - boundary_nodes
+ j1=aNodes.Lower();
+ j2=aNodes.Upper();
+ for (j=j1; j<=j2; ++j) {
+ if (!aMBN.Contains(j)) {
+ aP=aNodes(j).Transformed(aTrsf);
+ aLP.Append(aP);
+ }
+ }
+ //
+ aNb=aLP.Extent();
+ //
+ if (!aNb && myNbPntsMin) {
+ // try to fill it yourself
+ Standard_Boolean bIsDone;
+ Standard_Integer aN1, aN2;
+ Handle(Geom_Surface) aS;
+ GeomAdaptor_Surface aGAS;
+ GeomAbs_SurfaceType aType;
+ //
+ aS=BRep_Tool::Surface(aF);
+ aGAS.Load(aS);
+ aType=aGAS.GetType();
+ if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder) {
+ // inner links
+ aNbLinks=aMPKI.Extent();
+ aIt.Initialize(aMPKI);
+ for (; aIt.More(); aIt.Next()) {
+ iCnt=aIt.Value();
+ if (iCnt>1) {
+ // take the first having occured inner link
+ // and discretize it
+ const GEOMAlgo_PassKey& aPK=aIt.Key();
+ //qf
+ /*
+ aNbMax=aPK.NbMax();
+ pIds=(Standard_Integer*)aPK.Key();
+ aN1=*(pIds+aNbMax-1);
+ aN2=*(pIds+aNbMax-2);
+ */
+ //
+ aN1=(Standard_Integer)aPK.Id(1);
+ aN2=(Standard_Integer)aPK.Id(2);
+ //qt
+ aP1=aNodes(aN1).Transformed(aTrsf);
+ aP2=aNodes(aN2).Transformed(aTrsf);
+ //
+ if (aType==GeomAbs_Cylinder) {
+ Standard_Real aTolSM;
+ gp_Cylinder aCyl;
+ //
+ aTolSM=1.523e-6;//~1.-cos(0.1 deg)
+ aCyl=aGAS.Cylinder();
+ if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) {
+ continue;
+ }
+ }
+ //
+ BRepLib_MakeEdge aBME(aP1, aP2);
+ bIsDone=aBME.IsDone();
+ if (!bIsDone) {
+ myErrorStatus=30; //can not obtain the line fron the link
+ return;
+ }
+ //
+ const TopoDS_Shape& aSx=aBME.Shape();
+ const TopoDS_Edge& aE=TopoDS::Edge(aSx);
+ //
+ InnerPoints(aE, myNbPntsMin, aLP);
+ break;
+ }// if (iCnt>1)
+ }// for (; aIt.More(); aIt.Next())
+ }// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder)
+ }// if (!aNb && myNbPntsMin) {
+}
+//=======================================================================
+//function : InnerPoints
+//purpose :
+//=======================================================================
+ void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE,
+ GEOMAlgo_ListOfPnt& aLP)
+{
+ myErrorStatus=0;
+ //
+ Standard_Integer j, aNbNodes, aIndex, aNb;
+ Handle(Poly_PolygonOnTriangulation) aPTE;
+ Handle(Poly_Triangulation) aTRE;
+ TopLoc_Location aLoc;
+ gp_Pnt aP;
+ //
+ aLP.Clear();
+ BRep_Tool::PolygonOnTriangulation(aE, aPTE, aTRE, aLoc);
+ if (aTRE.IsNull() || aPTE.IsNull()) {
+ myErrorStatus=20; // no triangulation found
+ return;
+ }
+ //
+ const gp_Trsf& aTrsf=aLoc.Transformation();
+ const TColgp_Array1OfPnt& aNodes=aTRE->Nodes();
+ //
+ aNbNodes=aPTE->NbNodes();
+ const TColStd_Array1OfInteger& aInds=aPTE->Nodes();
+ for (j=2; j<aNbNodes; ++j) {
+ aIndex=aInds(j);
+ aP=aNodes(aIndex).Transformed(aTrsf);
+ aLP.Append(aP);
+ }
+ //
+ aNb=aLP.Extent();
+ if (!aNb && myNbPntsMin) {
+ // try to fill it yourself
+ InnerPoints(aE, myNbPntsMin, aLP);
+ aNb=aLP.Extent();
+
+ }
+}
+//=======================================================================
+//function : InnerPoints
+//purpose :
+//=======================================================================
+ void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE,
+ const Standard_Integer aNbPntsMin,
+ GEOMAlgo_ListOfPnt& aLP)
+{
+ // try to fill it yourself
+ Standard_Boolean bInf1, bInf2;
+ Standard_Integer j, aNbT;
+ Standard_Real dT, aT, aT1, aT2;
+ gp_Pnt aP;
+ Handle(Geom_Curve) aC3D;
+ //
+ aC3D=BRep_Tool::Curve(aE, aT1, aT2);
+ if (aC3D.IsNull()) {
+ return;
+ }
+ //
+ bInf1=Precision::IsNegativeInfinite(aT1);
+ bInf2=Precision::IsPositiveInfinite(aT2);
+ if (bInf1 || bInf2) {
+ return;
+ }
+ //
+ aNbT=myNbPntsMin+1;
+ dT=(aT2-aT1)/aNbT;
+ for (j=1; j<=aNbPntsMin; ++j) {
+ aT=aT1+j*dT;
+ aC3D->D0(aT, aP);
+ aLP.Append(aP);
+ }
+}
+
+//
+// myErrorStatus :
+//
+// 10 -myClsf=NULL
+// 11 -myShape=NULL
+// 12 -unallowed type of subshapes
+// 13 -unallowed state
+// 15 -unallowed surface type
+// 20- no triangulation found
+// 30- can not obtain the line from the link
+// 40- point can not be classified
+// 41- invalid data for classifier
+
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _GEOMAlgo_FinderShapeOn2_HeaderFile
+#define _GEOMAlgo_FinderShapeOn2_HeaderFile
+
+#ifndef _TopAbs_ShapeEnum_HeaderFile
+#include <TopAbs_ShapeEnum.hxx>
+#endif
+#ifndef _GEOMAlgo_State_HeaderFile
+#include <GEOMAlgo_State.hxx>
+#endif
+#ifndef _Standard_Integer_HeaderFile
+#include <Standard_Integer.hxx>
+#endif
+#ifndef _Handle_GEOMAlgo_Clsf_HeaderFile
+#include <Handle_GEOMAlgo_Clsf.hxx>
+#endif
+#ifndef _TopTools_ListOfShape_HeaderFile
+#include <TopTools_ListOfShape.hxx>
+#endif
+#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
+#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
+#endif
+#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
+#include <GEOMAlgo_ShapeAlgo.hxx>
+#endif
+class GEOMAlgo_Clsf;
+class TopTools_ListOfShape;
+class TopoDS_Face;
+class GEOMAlgo_ListOfPnt;
+class TopoDS_Edge;
+class GEOMAlgo_IndexedDataMapOfShapeState;
+
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
+
+class GEOMAlgo_FinderShapeOn2 : public GEOMAlgo_ShapeAlgo {
+
+public:
+
+ void* operator new(size_t,void* anAddress)
+ {
+ return anAddress;
+ }
+ void* operator new(size_t size)
+ {
+ return Standard::Allocate(size);
+ }
+ void operator delete(void *anAddress)
+ {
+ if (anAddress) Standard::Free((Standard_Address&)anAddress);
+ }
+ // Methods PUBLIC
+ //
+
+
+Standard_EXPORT GEOMAlgo_FinderShapeOn2();
+Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn2();
+
+
+Standard_EXPORT void SetClsf(const Handle(GEOMAlgo_Clsf)& aClsf) ;
+
+
+Standard_EXPORT const Handle_GEOMAlgo_Clsf& Clsf() const;
+
+
+Standard_EXPORT void SetShapeType(const TopAbs_ShapeEnum aST) ;
+
+
+Standard_EXPORT TopAbs_ShapeEnum ShapeType() const;
+
+
+Standard_EXPORT void SetState(const GEOMAlgo_State aSF) ;
+
+
+Standard_EXPORT GEOMAlgo_State State() const;
+
+
+Standard_EXPORT void SetNbPntsMin(const Standard_Integer aNb) ;
+
+
+Standard_EXPORT Standard_Integer NbPntsMin() const;
+
+
+Standard_EXPORT void SetNbPntsMax(const Standard_Integer aNb) ;
+
+
+Standard_EXPORT Standard_Integer NbPntsMax() const;
+
+
+Standard_EXPORT virtual void Perform() ;
+
+
+Standard_EXPORT const TopTools_ListOfShape& Shapes() const;
+
+
+Standard_EXPORT const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const;
+
+
+
+
+
+protected:
+
+ // Methods PROTECTED
+ //
+
+
+Standard_EXPORT virtual void CheckData() ;
+
+
+Standard_EXPORT void ProcessVertices() ;
+
+
+Standard_EXPORT void ProcessEdges() ;
+
+
+Standard_EXPORT void ProcessFaces() ;
+
+
+Standard_EXPORT void ProcessSolids() ;
+
+
+Standard_EXPORT void InnerPoints(const TopoDS_Face& aF,GEOMAlgo_ListOfPnt& aLP) ;
+
+
+Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,GEOMAlgo_ListOfPnt& aLP) ;
+
+
+Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,const Standard_Integer aNbPnts,GEOMAlgo_ListOfPnt& aLP) ;
+
+
+ // Fields PROTECTED
+ //
+TopAbs_ShapeEnum myShapeType;
+GEOMAlgo_State myState;
+Standard_Integer myNbPntsMin;
+Standard_Integer myNbPntsMax;
+Handle_GEOMAlgo_Clsf myClsf;
+TopTools_ListOfShape myLS;
+GEOMAlgo_IndexedDataMapOfShapeState myMSS;
+
+
+private:
+
+ // Methods PRIVATE
+ //
+
+
+ // Fields PRIVATE
+ //
+
+
+};
+
+
+
+
+
+// other Inline functions and methods (like "C++: function call" methods)
+//
+
+
+#endif
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#include <GEOMAlgo_FinderShapeOn2.jxx>
+
+
+
+
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _GEOMAlgo_Clsf_HeaderFile
+#include <GEOMAlgo_Clsf.hxx>
+#endif
+#ifndef _TopTools_ListOfShape_HeaderFile
+#include <TopTools_ListOfShape.hxx>
+#endif
+#ifndef _TopoDS_Face_HeaderFile
+#include <TopoDS_Face.hxx>
+#endif
+#ifndef _GEOMAlgo_ListOfPnt_HeaderFile
+#include <GEOMAlgo_ListOfPnt.hxx>
+#endif
+#ifndef _TopoDS_Edge_HeaderFile
+#include <TopoDS_Edge.hxx>
+#endif
+#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
+#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
+#endif
+#ifndef _GEOMAlgo_FinderShapeOn2_HeaderFile
+#include <GEOMAlgo_FinderShapeOn2.hxx>
+#endif
-- Created: Wed Dec 15 11:03:03 2004
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright: Matra Datavision 2004
class GlueAnalyser from GEOMAlgo
for (i=1; i<=aNbF; ++i) {
const TopoDS_Shape& aS=aMF(i);
//
- aPKF.Clear();
+ //aPKF.Clear();//qft
if (aType==TopAbs_FACE) {
const TopoDS_Face& aF=TopoDS::Face(aS);
FacePassKey(aF, aPKF);
TopTools_IndexedDataMapOfShapeListOfShape aMFS;
TopTools_IndexedMapOfShape aMx, aMS;
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
+ GEOMAlgo_CoupleOfShapes aCS;
+ //
GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLS;
GEOMAlgo_PassKeyShape aPKSx;
- GEOMAlgo_CoupleOfShapes aCS;
//
aBB.MakeCompound(aCmp);
//
continue;
}
//
- aPKSx.Clear();
- aPKSx.SetIds(aSx[0], aSx[1]);
+ //aPKSx.Clear();//qft
+ //qf
+ //aPKSx.SetIds(aSx[0], aSx[1]);
+ aPKSx.SetShapes(aSx[0], aSx[1]);
+ //qt
//
if (!aMPKLS.Contains(aPKSx)) {
TopTools_ListOfShape aLSx;
-- Created: Sat Dec 04 12:41:32 2004
-- Author: Peter KURNEV
-- <peter@PREFEX>
----Copyright: Matra Datavision 2004
class Gluer from GEOMAlgo
EdgePassKey(me:out;
aE:Edge from TopoDS;
- aPK:out PassKeyShape from GEOMAlgo)
+ aPK:out PassKeyShape from GEOMAlgo)
is protected;
FacePassKey(me:out;
aF:Face from TopoDS;
- aPK:out PassKeyShape from GEOMAlgo)
+ aPK:out PassKeyShape from GEOMAlgo)
is protected;
MakeVertex(me:out;
#include <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
#include <GEOMAlgo_IndexedDataMapOfShapeBox.hxx>
-#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-#include <GEOMAlgo_PassKeyShape.hxx>
+#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx> //qft
+#include <GEOMAlgo_PassKeyShape.hxx>//qft
#include <GEOMAlgo_Tools.hxx>
//
TopoDS_Shape aNewShape;
TopTools_IndexedMapOfShape aMF;
TopTools_ListIteratorOfListOfShape aItS;
- GEOMAlgo_PassKeyShape aPKF;
- GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF;
+ GEOMAlgo_PassKeyShape aPKF;//qft
+ GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF;//qft
//
TopExp::MapShapes(myShape, aType, aMF);
//
for (i=1; i<=aNbF; ++i) {
const TopoDS_Shape& aS=aMF(i);
//
- aPKF.Clear();
+ //aPKF.Clear();//qft
if (aType==TopAbs_FACE) {
const TopoDS_Face& aF=TopoDS::Face(aS);
FacePassKey(aF, aPKF);
void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF,
GEOMAlgo_PassKeyShape& aPK)
{
- Standard_Integer i, aNbE, aNbMax;
+ Standard_Integer i, aNbE;//, aNbMax;//qft
TopTools_ListOfShape aLE;
TopTools_IndexedMapOfShape aME;
//
TopExp::MapShapes(aF, TopAbs_EDGE, aME);
aNbE=aME.Extent();
+ //qf
+ /*
aNbMax=aPK.NbMax();
if (!aNbE || aNbE>aNbMax) {
- myErrorStatus=101; // temprorary
- return;
+ myErrorStatus=101; // temprorary
+ return;
}
+ */
+ //qt
//
for (i=1; i<=aNbE; ++i) {
const TopoDS_Shape& aE=aME(i);
const TopoDS_Shape& aER=myOrigins.Find(aE);
aLE.Append(aER);
}
- aPK.SetIds(aLE);
+ //qf
+ //aPK.SetIds(aLE);
+ aPK.SetShapes(aLE);
+ //qt
}
//=======================================================================
//function : EdgePassKey
}
const TopoDS_Shape& aVR1=myOrigins.Find(aV1);
const TopoDS_Shape& aVR2=myOrigins.Find(aV2);
- aPK.SetIds(aVR1, aVR2);
+ //qf
+ //aPK.SetIds(aVR1, aVR2);
+ aPK.SetShapes(aVR1, aVR2);
+ //qt
}
//=======================================================================
//function : MakeVertex
--- /dev/null
+-- Copyright (C) 2005 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 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
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
+-- File: GEOMAlgo_Algo.cdl
+-- Created: Sat Dec 04 12:37:56 2004
+-- Author: Peter KURNEV
+-- <peter@PREFEX>
+
+
+deferred class HAlgo from GEOMAlgo
+ inherits TShared from MMgt
+ ---Purpose:
+
+--uses
+--raises
+
+is
+ Initialize
+ returns mutable HAlgo from GEOMAlgo;
+ ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_HAlgo();"
+
+ Perform(me:mutable)
+ is deferred;
+
+ CheckData(me:mutable)
+ is virtual;
+
+ CheckResult(me:mutable)
+ is virtual;
+
+ ErrorStatus (me)
+ returns Integer from Standard;
+
+ WarningStatus (me)
+ returns Integer from Standard;
+
+fields
+ myErrorStatus : Integer from Standard is protected;
+ myWarningStatus : Integer from Standard is protected;
+
+end HAlgo;
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File: GEOMAlgo_Algo.cxx
+// Created: Sat Dec 04 12:39:47 2004
+// Author: Peter KURNEV
+// <peter@PREFEX>
+
+
+#include <GEOMAlgo_HAlgo.ixx>
+
+//=======================================================================
+// function:
+// purpose:
+//=======================================================================
+ GEOMAlgo_HAlgo::GEOMAlgo_HAlgo()
+:
+ myErrorStatus(1),
+ myWarningStatus(0)
+{}
+//=======================================================================
+// function: ~
+// purpose:
+//=======================================================================
+ GEOMAlgo_HAlgo::~GEOMAlgo_HAlgo()
+{
+}
+//=======================================================================
+// function: CheckData
+// purpose:
+//=======================================================================
+ void GEOMAlgo_HAlgo::CheckData()
+{
+ myErrorStatus=0;
+}
+//=======================================================================
+// function: CheckResult
+// purpose:
+//=======================================================================
+ void GEOMAlgo_HAlgo::CheckResult()
+{
+ myErrorStatus=0;
+}
+//=======================================================================
+// function: ErrorStatus
+// purpose:
+//=======================================================================
+ Standard_Integer GEOMAlgo_HAlgo::ErrorStatus()const
+{
+ return myErrorStatus;
+}
+//=======================================================================
+// function: WarningStatus
+// purpose:
+//=======================================================================
+ Standard_Integer GEOMAlgo_HAlgo::WarningStatus()const
+{
+ return myWarningStatus;
+}
+// myErrorStatus
+//
+// 1 - object is just initialized
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _GEOMAlgo_HAlgo_HeaderFile
+#define _GEOMAlgo_HAlgo_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Handle_GEOMAlgo_HAlgo_HeaderFile
+#include <Handle_GEOMAlgo_HAlgo.hxx>
+#endif
+
+#ifndef _Standard_Integer_HeaderFile
+#include <Standard_Integer.hxx>
+#endif
+#ifndef _MMgt_TShared_HeaderFile
+#include <MMgt_TShared.hxx>
+#endif
+
+
+
+class GEOMAlgo_HAlgo : public MMgt_TShared {
+
+public:
+ // Methods PUBLIC
+ //
+
+
+Standard_EXPORT virtual void Perform() = 0;
+
+
+Standard_EXPORT virtual void CheckData() ;
+
+
+Standard_EXPORT virtual void CheckResult() ;
+
+
+Standard_EXPORT Standard_Integer ErrorStatus() const;
+
+
+Standard_EXPORT Standard_Integer WarningStatus() const;
+//Standard_EXPORT ~GEOMAlgo_HAlgo();
+
+
+
+
+ // Type management
+ //
+ Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+
+protected:
+
+ // Methods PROTECTED
+ //
+
+
+Standard_EXPORT GEOMAlgo_HAlgo();
+Standard_EXPORT virtual ~GEOMAlgo_HAlgo();
+
+
+ // Fields PROTECTED
+ //
+Standard_Integer myErrorStatus;
+Standard_Integer myWarningStatus;
+
+
+private:
+
+ // Methods PRIVATE
+ //
+
+
+ // Fields PRIVATE
+ //
+
+
+};
+
+
+
+
+
+// other Inline functions and methods (like "C++: function call" methods)
+//
+
+
+#endif
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#include <GEOMAlgo_HAlgo.jxx>
+
+#ifndef _Standard_TypeMismatch_HeaderFile
+#include <Standard_TypeMismatch.hxx>
+#endif
+
+//GEOMAlgo_HAlgo::~GEOMAlgo_HAlgo() {}
+
+
+
+Standard_EXPORT Handle_Standard_Type& GEOMAlgo_HAlgo_Type_()
+{
+
+ static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared);
+ static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
+
+
+ static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
+ static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_HAlgo",
+ sizeof(GEOMAlgo_HAlgo),
+ 1,
+ (Standard_Address)_Ancestors,
+ (Standard_Address)NULL);
+
+ return _aType;
+}
+
+
+// DownCast method
+// allow safe downcasting
+//
+const Handle(GEOMAlgo_HAlgo) Handle(GEOMAlgo_HAlgo)::DownCast(const Handle(Standard_Transient)& AnObject)
+{
+ Handle(GEOMAlgo_HAlgo) _anOtherObject;
+
+ if (!AnObject.IsNull()) {
+ if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_HAlgo))) {
+ _anOtherObject = Handle(GEOMAlgo_HAlgo)((Handle(GEOMAlgo_HAlgo)&)AnObject);
+ }
+ }
+
+ return _anOtherObject ;
+}
+const Handle(Standard_Type)& GEOMAlgo_HAlgo::DynamicType() const
+{
+ return STANDARD_TYPE(GEOMAlgo_HAlgo) ;
+}
+//Standard_Boolean GEOMAlgo_HAlgo::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(GEOMAlgo_HAlgo) == AType || MMgt_TShared::IsKind(AType));
+//}
+//Handle_GEOMAlgo_HAlgo::~Handle_GEOMAlgo_HAlgo() {}
+
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _GEOMAlgo_HAlgo_HeaderFile
+#include <GEOMAlgo_HAlgo.hxx>
+#endif
#endif
class GEOMAlgo_PassKeyShape;
class TopTools_ListOfShape;
-class GEOMAlgo_PassKeyMapHasher;
+class GEOMAlgo_PassKeyShapeMapHasher;
class GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape;
#define TheKey_hxx <GEOMAlgo_PassKeyShape.hxx>
#define TheItem TopTools_ListOfShape
#define TheItem_hxx <TopTools_ListOfShape.hxx>
-#define Hasher GEOMAlgo_PassKeyMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyMapHasher.hxx>
+#define Hasher GEOMAlgo_PassKeyShapeMapHasher
+#define Hasher_hxx <GEOMAlgo_PassKeyShapeMapHasher.hxx>
#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape
#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx>
#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape
#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
#endif
-#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile
-#include <GEOMAlgo_PassKeyMapHasher.hxx>
+#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile
+#include <GEOMAlgo_PassKeyShapeMapHasher.hxx>
#endif
#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
#define TheKey_hxx <GEOMAlgo_PassKeyShape.hxx>
#define TheItem TopTools_ListOfShape
#define TheItem_hxx <TopTools_ListOfShape.hxx>
-#define Hasher GEOMAlgo_PassKeyMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyMapHasher.hxx>
+#define Hasher GEOMAlgo_PassKeyShapeMapHasher
+#define Hasher_hxx <GEOMAlgo_PassKeyShapeMapHasher.hxx>
#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape
#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx>
#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape
class Standard_NoSuchObject;
class GEOMAlgo_PassKeyShape;
class TopTools_ListOfShape;
-class GEOMAlgo_PassKeyMapHasher;
+class GEOMAlgo_PassKeyShapeMapHasher;
class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape;
#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
#endif
-#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile
-#include <GEOMAlgo_PassKeyMapHasher.hxx>
+#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile
+#include <GEOMAlgo_PassKeyShapeMapHasher.hxx>
#endif
#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
#include <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx>
#define TheKey_hxx <GEOMAlgo_PassKeyShape.hxx>
#define TheItem TopTools_ListOfShape
#define TheItem_hxx <TopTools_ListOfShape.hxx>
-#define Hasher GEOMAlgo_PassKeyMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyMapHasher.hxx>
+#define Hasher GEOMAlgo_PassKeyShapeMapHasher
+#define Hasher_hxx <GEOMAlgo_PassKeyShapeMapHasher.hxx>
#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape
#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx>
#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
+--
-- File: GEOMAlgo_PassKey.cdl
--- Created:
+-- Created: Mon Nov 20 12:16:13 2006
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright:
class PassKey from GEOMAlgo
uses
Shape from TopoDS,
- ListOfInteger from TColStd
-
+ IndexedMapOfInteger from TColStd,
+ ListOfInteger from TColStd
+
--raises
is
Create
returns PassKey from GEOMAlgo;
+ ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_PassKey();"
+
+ Create(Other:PassKey from GEOMAlgo)
+ returns PassKey from GEOMAlgo;
Assign(me:out;
Other : PassKey from GEOMAlgo)
returns PassKey from GEOMAlgo;
---C++: alias operator =
---C++: return &
+
+ Clear(me:out);
--
SetIds(me:out;
aI1 :Integer from Standard);
SetIds(me:out;
- aI1 :Integer from Standard;
+ aI1 :Integer from Standard;
aI2 :Integer from Standard);
SetIds(me:out;
SetIds(me:out;
aLS :ListOfInteger from TColStd);
-
- NbMax(me)
+
+ NbIds(me)
returns Integer from Standard;
-
- Clear(me:out);
-
- Compute(me:out);
IsEqual(me;
aOther:PassKey from GEOMAlgo)
returns Boolean from Standard;
-
- Key(me)
- returns Address from Standard;
HashCode(me;
Upper : Integer from Standard)
Id(me;
aIndex: Integer from Standard)
- returns Integer from Standard;
+ returns Integer from Standard;
- Dump(me);
-
+ Dump(me;
+ aHex:Integer from Standard=0);
+
+
fields
-
myNbIds: Integer from Standard is protected;
- myNbMax: Integer from Standard is protected;
- mySum : Integer from Standard is protected;
- myIds : Integer from Standard [8] is protected;
+ mySum : Integer from Standard is protected;
+ myMap : IndexedMapOfInteger from TColStd is protected;
end PassKey;
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: GEOMAlgo_PassKey.cxx
-// Created:
+//
+// File: GEOMAlgo_Algo.cxx
+// Created: Sat Dec 04 12:39:47 2004
// Author: Peter KURNEV
-// <pkv@irinox>
+// <peter@PREFEX>
#include <GEOMAlgo_PassKey.ixx>
#include <stdio.h>
#include <string.h>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
+#include <TColStd_ListOfInteger.hxx>
#ifdef WNT
#pragma warning( disable : 4101)
#endif
-static
- void SortShell(const int n, int* a);
static
Standard_Integer NormalizedId(const Standard_Integer aId,
const Standard_Integer aDiv);
//=======================================================================
GEOMAlgo_PassKey::GEOMAlgo_PassKey()
{
- Clear();
+ Clear();
+}
+//=======================================================================
+//function :
+//purpose :
+//=======================================================================
+ GEOMAlgo_PassKey::GEOMAlgo_PassKey(const GEOMAlgo_PassKey& aOther)
+{
+ myNbIds=aOther.myNbIds;
+ mySum=aOther.mySum;
+ myMap=aOther.myMap;
}
//=======================================================================
//function :Assign
//purpose :
//=======================================================================
- GEOMAlgo_PassKey& GEOMAlgo_PassKey::Assign(const GEOMAlgo_PassKey& anOther)
+ GEOMAlgo_PassKey& GEOMAlgo_PassKey::Assign(const GEOMAlgo_PassKey& aOther)
{
- myNbIds=anOther.myNbIds;
- myNbMax=anOther.myNbMax;
- mySum=anOther.mySum;
- memcpy(myIds, anOther.myIds, sizeof(myIds));
+ myNbIds=aOther.myNbIds;
+ mySum=aOther.mySum;
+ myMap=aOther.myMap;
return *this;
}
//=======================================================================
+//function :~
+//purpose :
+//=======================================================================
+ GEOMAlgo_PassKey::~GEOMAlgo_PassKey()
+{
+}
+//=======================================================================
//function :Clear
//purpose :
//=======================================================================
void GEOMAlgo_PassKey::Clear()
{
- Standard_Integer i;
- //
myNbIds=0;
- myNbMax=8;
mySum=0;
- for (i=0; i<myNbMax; ++i) {
- myIds[i]=0;
- }
+ myMap.Clear();
}
//=======================================================================
//function :SetIds
//purpose :
//=======================================================================
- void GEOMAlgo_PassKey::SetIds(const Standard_Integer anId1)
+ void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1)
{
+ Clear();
myNbIds=1;
- myIds[myNbMax-1]=anId1;
- mySum=anId1;
+ myMap.Add(aId1);
+ mySum=NormalizedId(aId1, myNbIds);
}
//=======================================================================
//function :SetIds
//purpose :
//=======================================================================
- void GEOMAlgo_PassKey::SetIds(const Standard_Integer anId1,
- const Standard_Integer anId2)
+ void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1,
+ const Standard_Integer aId2)
{
- Standard_Integer aIdN1, aIdN2;
+ TColStd_ListOfInteger aLI;
//
- myNbIds=2;
- aIdN1=NormalizedId(anId1, myNbIds);
- aIdN2=NormalizedId(anId2, myNbIds);
- mySum=aIdN1+aIdN2;
- //
- if (anId1<anId2) {
- myIds[myNbMax-2]=anId1;
- myIds[myNbMax-1]=anId2;
- return;
- }
- myIds[myNbMax-2]=anId2;
- myIds[myNbMax-1]=anId1;
+ aLI.Append(aId1);
+ aLI.Append(aId2);
+ SetIds(aLI);
}
-
//=======================================================================
//function :SetIds
//purpose :
//=======================================================================
- void GEOMAlgo_PassKey::SetIds(const Standard_Integer anId1,
- const Standard_Integer anId2,
- const Standard_Integer anId3)
+ void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1,
+ const Standard_Integer aId2,
+ const Standard_Integer aId3)
{
- Standard_Integer aIdN1, aIdN2, aIdN3;
- //
- myNbIds=3;
- aIdN1=NormalizedId(anId1, myNbIds);
- aIdN2=NormalizedId(anId2, myNbIds);
- aIdN3=NormalizedId(anId3, myNbIds);
- mySum=aIdN1+aIdN2+aIdN3;
- //
- myIds[myNbMax-3]=anId1;
- myIds[myNbMax-2]=anId2;
- myIds[myNbMax-1]=anId3;
+ TColStd_ListOfInteger aLI;
//
- Compute();
+ aLI.Append(aId1);
+ aLI.Append(aId2);
+ aLI.Append(aId3);
+ SetIds(aLI);
}
//=======================================================================
//function :SetIds
//purpose :
//=======================================================================
- void GEOMAlgo_PassKey::SetIds(const Standard_Integer anId1,
- const Standard_Integer anId2,
- const Standard_Integer anId3,
- const Standard_Integer anId4)
-{
- Standard_Integer aIdN1, aIdN2, aIdN3, aIdN4;
- //
- myNbIds=4;
- aIdN1=NormalizedId(anId1, myNbIds);
- aIdN2=NormalizedId(anId2, myNbIds);
- aIdN3=NormalizedId(anId3, myNbIds);
- aIdN4=NormalizedId(anId4, myNbIds);
- mySum=aIdN1+aIdN2+aIdN3+aIdN4;
+ void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1,
+ const Standard_Integer aId2,
+ const Standard_Integer aId3,
+ const Standard_Integer aId4)
+{
+ TColStd_ListOfInteger aLI;
//
- myIds[myNbMax-4]=anId1;
- myIds[myNbMax-3]=anId2;
- myIds[myNbMax-2]=anId3;
- myIds[myNbMax-1]=anId4;
- //
- Compute();
+ aLI.Append(aId1);
+ aLI.Append(aId2);
+ aLI.Append(aId3);
+ aLI.Append(aId4);
+ SetIds(aLI);
}
//=======================================================================
//function :SetIds
//=======================================================================
void GEOMAlgo_PassKey::SetIds(const TColStd_ListOfInteger& aLI)
{
- Standard_Integer aNb, i, anId, aIdN;
+ Standard_Integer i, aId, aIdN;
TColStd_ListIteratorOfListOfInteger aIt;
//
- aNb=aLI.Extent();
- if (!aNb || aNb > myNbMax) {
- return;
- }
- //
- myNbIds=aNb;
- mySum=0;
- i=myNbMax-myNbIds;
+ Clear();
aIt.Initialize(aLI);
- for (; aIt.More(); aIt.Next(), ++i) {
- anId=aIt.Value();
- myIds[i]=anId;
- aIdN=NormalizedId(anId, myNbIds);
- mySum+=aIdN;
+ for (; aIt.More(); aIt.Next()) {
+ aId=aIt.Value();
+ myMap.Add(aId);
}
- //
- Compute();
-}
-//=======================================================================
-//function :Id
-//purpose :
-//=======================================================================
- Standard_Integer GEOMAlgo_PassKey::Id(const Standard_Integer aIndex)const
-{
- if (aIndex < 0 || aIndex >= myNbMax) {
- return 0;
+ myNbIds=myMap.Extent();
+ for(i=1; i<=myNbIds; ++i) {
+ aId=myMap(i);
+ aIdN=NormalizedId(aId, myNbIds);
+ mySum+=aIdN;
}
- return myIds[aIndex];
}
//=======================================================================
-//function :NbMax
+//function :NbIds
//purpose :
//=======================================================================
- Standard_Integer GEOMAlgo_PassKey::NbMax()const
+ Standard_Integer GEOMAlgo_PassKey::NbIds()const
{
- return myNbMax;
+ return myNbIds;
}
//=======================================================================
-//function :Compute
+//function :Id
//purpose :
//=======================================================================
- void GEOMAlgo_PassKey::Compute()
+ Standard_Integer GEOMAlgo_PassKey::Id(const Standard_Integer aIndex) const
{
- SortShell(myNbIds, myIds+myNbMax-myNbIds);
+ if (aIndex<1 || aIndex>myNbIds) {
+ return -1;
+ }
+ return myMap(aIndex);
}
//=======================================================================
//function :IsEqual
//purpose :
//=======================================================================
- Standard_Boolean GEOMAlgo_PassKey::IsEqual(const GEOMAlgo_PassKey& anOther) const
+ Standard_Boolean GEOMAlgo_PassKey::IsEqual(const GEOMAlgo_PassKey& aOther) const
{
- Standard_Integer iIsEqual;
- Standard_Boolean bIsEqual;
+ Standard_Boolean bRet;
+ Standard_Integer i, aId;
//
- iIsEqual=memcmp(myIds, anOther.myIds, sizeof(myIds));
- bIsEqual=Standard_False;
- if (!iIsEqual) {
- bIsEqual=!bIsEqual;
+ bRet=Standard_False;
+ //
+ if (myNbIds!=aOther.myNbIds) {
+ return bRet;
}
- return bIsEqual;
-}
-//=======================================================================
-//function :Key
-//purpose :
-//=======================================================================
- Standard_Address GEOMAlgo_PassKey::Key()const
-{
- return (Standard_Address)myIds;
+ for (i=1; i<=myNbIds; ++i) {
+ aId=myMap(i);
+ if (!aOther.myMap.Contains(aId)) {
+ return bRet;
+ }
+ }
+ return !bRet;
}
//=======================================================================
//function : HashCode
//purpose :
//=======================================================================
- Standard_Integer GEOMAlgo_PassKey::HashCode(const Standard_Integer Upper) const
+ Standard_Integer GEOMAlgo_PassKey::HashCode(const Standard_Integer aUpper) const
{
- //return (mySum % Upper);
- return ::HashCode(mySum, Upper);
+ return ::HashCode(mySum, aUpper);
}
//=======================================================================
//function : Dump
//purpose :
//=======================================================================
- void GEOMAlgo_PassKey::Dump()const
+ void GEOMAlgo_PassKey::Dump(const Standard_Integer )const
{
- Standard_Integer i;
- //
- printf(" PassKey: {");
- for (i=0; i<myNbMax; ++i) {
- printf(" %d", myIds[i]);
- }
- printf(" }");
}
//=======================================================================
// function: NormalizedId
}
return aIdRet;
}
-//=======================================================================
-// function: SortShell
-// purpose :
-//=======================================================================
-void SortShell(const int n, int* a)
-{
- int x, nd, i, j, l, d=1;
- //
- while(d<=n) {
- d*=2;
- }
- //
- while (d) {
- d=(d-1)/2;
- //
- nd=n-d;
- for (i=0; i<nd; ++i) {
- j=i;
- m30:;
- l=j+d;
- if (a[l] < a[j]){
- x=a[j];
- a[j]=a[l];
- a[l]=x;
- j-=d;
- if (j > -1) goto m30;
- }//if (a[l] < a[j]){
- }//for (i=0; i<nd; ++i)
- }//while (1)
-}
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
+#ifndef _TColStd_IndexedMapOfInteger_HeaderFile
+#include <TColStd_IndexedMapOfInteger.hxx>
+#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
-#ifndef _Standard_Address_HeaderFile
-#include <Standard_Address.hxx>
-#endif
class TColStd_ListOfInteger;
Standard_EXPORT GEOMAlgo_PassKey();
+Standard_EXPORT virtual ~GEOMAlgo_PassKey();
+
+
+Standard_EXPORT GEOMAlgo_PassKey(const GEOMAlgo_PassKey& Other);
Standard_EXPORT GEOMAlgo_PassKey& Assign(const GEOMAlgo_PassKey& Other) ;
+Standard_EXPORT void Clear() ;
+
+
Standard_EXPORT void SetIds(const Standard_Integer aI1) ;
Standard_EXPORT void SetIds(const TColStd_ListOfInteger& aLS) ;
-Standard_EXPORT Standard_Integer NbMax() const;
-
-
-Standard_EXPORT void Clear() ;
-
-
-Standard_EXPORT void Compute() ;
+Standard_EXPORT Standard_Integer NbIds() const;
Standard_EXPORT Standard_Boolean IsEqual(const GEOMAlgo_PassKey& aOther) const;
-Standard_EXPORT Standard_Address Key() const;
-
-
Standard_EXPORT Standard_Integer HashCode(const Standard_Integer Upper) const;
Standard_EXPORT Standard_Integer Id(const Standard_Integer aIndex) const;
-Standard_EXPORT void Dump() const;
+Standard_EXPORT void Dump(const Standard_Integer aHex = 0) const;
// Fields PROTECTED
//
Standard_Integer myNbIds;
-Standard_Integer myNbMax;
Standard_Integer mySum;
-Standard_Integer myIds[8];
+TColStd_IndexedMapOfInteger myMap;
private:
-- Created:
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright:
class PassKeyMapHasher from GEOMAlgo
//function : HashCode
//purpose :
//=======================================================================
- Standard_Integer GEOMAlgo_PassKeyMapHasher::HashCode(const GEOMAlgo_PassKey& aPKey,
+ Standard_Integer GEOMAlgo_PassKeyMapHasher::HashCode(const GEOMAlgo_PassKey& aPK,
const Standard_Integer Upper)
{
- return aPKey.HashCode(Upper);
+ return aPK.HashCode(Upper);
}
//=======================================================================
//function :IsEqual
//purpose :
//=======================================================================
- Standard_Boolean GEOMAlgo_PassKeyMapHasher::IsEqual(const GEOMAlgo_PassKey& aPKey1,
- const GEOMAlgo_PassKey& aPKey2)
+ Standard_Boolean GEOMAlgo_PassKeyMapHasher::IsEqual(const GEOMAlgo_PassKey& aPK1,
+ const GEOMAlgo_PassKey& aPK2)
{
- return aPKey1.IsEqual(aPKey2);
+ return aPK1.IsEqual(aPK2);
}
-- Created:
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright:
class PassKeyShape from GEOMAlgo
- inherits PassKey from GEOMAlgo
-
+
---Purpose:
uses
Shape from TopoDS,
- ListOfShape from TopTools
-
+ ListOfShape from TopTools,
+ IndexedMapOfShape from TopTools
+
--raises
is
Create
returns PassKeyShape from GEOMAlgo;
-
- SetIds(me:out;
+ ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_PassKeyShape();"
+
+ Create(Other:PassKeyShape from GEOMAlgo)
+ returns PassKeyShape from GEOMAlgo;
+
+ Assign(me:out;
+ Other : PassKeyShape from GEOMAlgo)
+ returns PassKeyShape from GEOMAlgo;
+ ---C++: alias operator =
+ ---C++: return &
+
+ SetShapes(me:out;
aS :Shape from TopoDS);
- SetIds(me:out;
+ SetShapes(me:out;
aS1 :Shape from TopoDS;
aS2 :Shape from TopoDS);
- SetIds(me:out;
+ SetShapes(me:out;
aS1 :Shape from TopoDS;
aS2 :Shape from TopoDS;
aS3 :Shape from TopoDS);
- SetIds(me:out;
+ SetShapes(me:out;
aS1 :Shape from TopoDS;
aS2 :Shape from TopoDS;
aS3 :Shape from TopoDS;
aS4 :Shape from TopoDS);
- SetIds(me:out;
+ SetShapes(me:out;
aLS :ListOfShape from TopTools);
-
+
+ Clear(me:out);
+
+ NbIds(me)
+ returns Integer from Standard;
+
+ IsEqual(me;
+ aOther:PassKeyShape from GEOMAlgo)
+ returns Boolean from Standard;
+
+ HashCode(me;
+ Upper : Integer from Standard)
+ returns Integer from Standard;
+
+ Dump(me;
+ aHex:Integer from Standard=0);
+
fields
- myUpper : Integer from Standard is protected;
+ myNbIds:Integer from Standard is protected;
+ mySum :Integer from Standard is protected;
+ myUpper:Integer from Standard is protected;
+ myMap :IndexedMapOfShape from TopTools is protected;
end PassKeyShape;
#include <GEOMAlgo_PassKeyShape.ixx>
-#include <stdio.h>
-#include <string.h>
-
+#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TColStd_ListOfInteger.hxx>
+
+static
+ Standard_Integer NormalizedId(const Standard_Integer aId,
+ const Standard_Integer aDiv);
//=======================================================================
//function :
//purpose :
//=======================================================================
GEOMAlgo_PassKeyShape::GEOMAlgo_PassKeyShape()
-:
- GEOMAlgo_PassKey()
{
myUpper=432123;
- GEOMAlgo_PassKey::Clear();
}
//=======================================================================
-//function :SetIds
+//function :
+//purpose :
+//=======================================================================
+ GEOMAlgo_PassKeyShape::GEOMAlgo_PassKeyShape(const GEOMAlgo_PassKeyShape& aOther)
+{
+ myUpper=432123;
+ myNbIds=aOther.myNbIds;
+ mySum=aOther.mySum;
+ myMap=aOther.myMap;
+}
+//=======================================================================
+//function :~
+//purpose :
+//=======================================================================
+ GEOMAlgo_PassKeyShape::~GEOMAlgo_PassKeyShape()
+{
+}
+//=======================================================================
+//function :Assign
+//purpose :
+//=======================================================================
+ GEOMAlgo_PassKeyShape& GEOMAlgo_PassKeyShape::Assign(const GEOMAlgo_PassKeyShape& aOther)
+{
+ myUpper=432123;
+ myNbIds=aOther.myNbIds;
+ mySum=aOther.mySum;
+ myMap=aOther.myMap;
+ return *this;
+}
+//=======================================================================
+//function :Clear
//purpose :
//=======================================================================
- void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1)
+ void GEOMAlgo_PassKeyShape::Clear()
+{
+ myNbIds=0;
+ mySum=0;
+ myMap.Clear();
+}
+//=======================================================================
+//function :SetShapes
+//purpose :
+//=======================================================================
+ void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1)
{
- Standard_Integer anId1;
+ Standard_Integer aHC;
//
- anId1=aS1.HashCode(myUpper);
- GEOMAlgo_PassKey::SetIds(anId1);
+ Clear();
+ myNbIds=1;
+ myMap.Add(aS1);
+ aHC=aS1.HashCode(myUpper);
+ mySum=NormalizedId(aHC, myNbIds);
}
//=======================================================================
-//function :SetIds
+//function :SetShapes
//purpose :
//=======================================================================
- void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2)
+ void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
+ const TopoDS_Shape& aS2)
{
- Standard_Integer anId1, anId2;
+ TopTools_ListOfShape aLS;
//
- anId1=aS1.HashCode(myUpper);
- anId2=aS2.HashCode(myUpper);
- //
- GEOMAlgo_PassKey::SetIds(anId1, anId2);
+ aLS.Append(aS1);
+ aLS.Append(aS2);
+ SetShapes(aLS);
}
//=======================================================================
-//function :SetIds
+//function :SetShapes
//purpose :
//=======================================================================
- void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2,
- const TopoDS_Shape& aS3)
+ void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
+ const TopoDS_Shape& aS2,
+ const TopoDS_Shape& aS3)
{
- Standard_Integer anId1, anId2, anId3;
- //
- anId1=aS1.HashCode(myUpper);
- anId2=aS2.HashCode(myUpper);
- anId3=aS3.HashCode(myUpper);
+ TopTools_ListOfShape aLS;
//
- GEOMAlgo_PassKey::SetIds(anId1, anId2, anId3);
+ aLS.Append(aS1);
+ aLS.Append(aS2);
+ aLS.Append(aS3);
+ SetShapes(aLS);
}
//=======================================================================
-//function :SetIds
+//function :SetShapes
//purpose :
//=======================================================================
- void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2,
- const TopoDS_Shape& aS3,
- const TopoDS_Shape& aS4)
+ void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
+ const TopoDS_Shape& aS2,
+ const TopoDS_Shape& aS3,
+ const TopoDS_Shape& aS4)
{
- Standard_Integer anId1, anId2, anId3, anId4;
+ TopTools_ListOfShape aLS;
//
- anId1=aS1.HashCode(myUpper);
- anId2=aS2.HashCode(myUpper);
- anId3=aS3.HashCode(myUpper);
- anId4=aS4.HashCode(myUpper);
- //
- GEOMAlgo_PassKey::SetIds(anId1, anId2, anId3, anId4);
+ aLS.Append(aS1);
+ aLS.Append(aS2);
+ aLS.Append(aS3);
+ aLS.Append(aS4);
+ SetShapes(aLS);
}
//=======================================================================
-//function :SetIds
+//function :SetShapes
//purpose :
//=======================================================================
- void GEOMAlgo_PassKeyShape::SetIds(const TopTools_ListOfShape& aLS)
+ void GEOMAlgo_PassKeyShape::SetShapes(const TopTools_ListOfShape& aLS)
{
- Standard_Integer anId;
+ Standard_Integer i, aId, aIdN;
TopTools_ListIteratorOfListOfShape aIt;
- TColStd_ListOfInteger aLI;
- //
- //aNb=aLS.Extent();
- //if (aNb<1 || aNb > myNbMax) {
- // return;
- //}
//
- //myNbIds=aNb;
- //mySum=0;
- //i=myNbMax-myNbIds;
-
+ Clear();
aIt.Initialize(aLS);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
- anId=aS.HashCode(myUpper);
- aLI.Append(anId);
+ myMap.Add(aS);
+ }
+ myNbIds=myMap.Extent();
+ for(i=1; i<=myNbIds; ++i) {
+ const TopoDS_Shape& aS=myMap(i);
+ aId=aS.HashCode(myUpper);
+ aIdN=NormalizedId(aId, myNbIds);
+ mySum+=aIdN;
+ }
+}
+//=======================================================================
+//function :NbIds
+//purpose :
+//=======================================================================
+ Standard_Integer GEOMAlgo_PassKeyShape::NbIds()const
+{
+ return myNbIds;
+}
+//=======================================================================
+//function :IsEqual
+//purpose :
+//=======================================================================
+ Standard_Boolean GEOMAlgo_PassKeyShape::IsEqual(const GEOMAlgo_PassKeyShape& aOther) const
+{
+ Standard_Boolean bRet;
+ Standard_Integer i;
+ //
+ bRet=Standard_False;
+ //
+ if (myNbIds!=aOther.myNbIds) {
+ return bRet;
+ }
+ for (i=1; i<=myNbIds; ++i) {
+ const TopoDS_Shape& aS=myMap(i);
+ if (!aOther.myMap.Contains(aS)) {
+ return bRet;
+ }
+ }
+ return !bRet;
+}
+//=======================================================================
+//function : HashCode
+//purpose :
+//=======================================================================
+ Standard_Integer GEOMAlgo_PassKeyShape::HashCode(const Standard_Integer aUpper) const
+{
+ return ::HashCode(mySum, aUpper);
+}
+//=======================================================================
+//function : Dump
+//purpose :
+//=======================================================================
+ void GEOMAlgo_PassKeyShape::Dump(const Standard_Integer)const
+{
+}
+//=======================================================================
+// function: NormalizedId
+// purpose :
+//=======================================================================
+Standard_Integer NormalizedId(const Standard_Integer aId,
+ const Standard_Integer aDiv)
+{
+ Standard_Integer aMax, aTresh, aIdRet;
+ //
+ aIdRet=aId;
+ aMax=::IntegerLast();
+ aTresh=aMax/aDiv;
+ if (aId>aTresh) {
+ aIdRet=aId%aTresh;
}
- GEOMAlgo_PassKey::SetIds(aLI);
+ return aIdRet;
}
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
-#ifndef _GEOMAlgo_PassKey_HeaderFile
-#include <GEOMAlgo_PassKey.hxx>
+#ifndef _TopTools_IndexedMapOfShape_HeaderFile
+#include <TopTools_IndexedMapOfShape.hxx>
+#endif
+#ifndef _Standard_Boolean_HeaderFile
+#include <Standard_Boolean.hxx>
#endif
class TopoDS_Shape;
class TopTools_ListOfShape;
#endif
-class GEOMAlgo_PassKeyShape : public GEOMAlgo_PassKey {
+class GEOMAlgo_PassKeyShape {
public:
Standard_EXPORT GEOMAlgo_PassKeyShape();
+Standard_EXPORT virtual ~GEOMAlgo_PassKeyShape();
+
+
+Standard_EXPORT GEOMAlgo_PassKeyShape(const GEOMAlgo_PassKeyShape& Other);
+
+
+Standard_EXPORT GEOMAlgo_PassKeyShape& Assign(const GEOMAlgo_PassKeyShape& Other) ;
+ GEOMAlgo_PassKeyShape& operator =(const GEOMAlgo_PassKeyShape& Other)
+{
+ return Assign(Other);
+}
+
+
+
+Standard_EXPORT void SetShapes(const TopoDS_Shape& aS) ;
+
+
+Standard_EXPORT void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ;
+
+
+Standard_EXPORT void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3) ;
+
+
+Standard_EXPORT void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3,const TopoDS_Shape& aS4) ;
+
+
+Standard_EXPORT void SetShapes(const TopTools_ListOfShape& aLS) ;
-Standard_EXPORT void SetIds(const TopoDS_Shape& aS) ;
+Standard_EXPORT void Clear() ;
-Standard_EXPORT void SetIds(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ;
+Standard_EXPORT Standard_Integer NbIds() const;
-Standard_EXPORT void SetIds(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3) ;
+Standard_EXPORT Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aOther) const;
-Standard_EXPORT void SetIds(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3,const TopoDS_Shape& aS4) ;
+Standard_EXPORT Standard_Integer HashCode(const Standard_Integer Upper) const;
-Standard_EXPORT void SetIds(const TopTools_ListOfShape& aLS) ;
+Standard_EXPORT void Dump(const Standard_Integer aHex = 0) const;
// Fields PROTECTED
//
+Standard_Integer myNbIds;
+Standard_Integer mySum;
Standard_Integer myUpper;
+TopTools_IndexedMapOfShape myMap;
private:
--- /dev/null
+-- Copyright (C) 2005 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 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
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
+-- File: GEOMAlgo_PassKeyMapHasher.cdl
+-- Created:
+-- Author: Peter KURNEV
+-- <pkv@irinox>
+
+
+class PassKeyShapeMapHasher from GEOMAlgo
+
+ ---Purpose:
+
+uses
+ PassKeyShape from GEOMAlgo
+
+--raises
+
+is
+ HashCode(myclass;
+ aPKey : PassKeyShape from GEOMAlgo;
+ Upper : Integer from Standard)
+ returns Integer from Standard;
+
+
+ IsEqual(myclass;
+ aPKey1 : PassKeyShape from GEOMAlgo;
+ aPKey2 : PassKeyShape from GEOMAlgo)
+ returns Boolean from Standard;
+
+end PassKeyShapeMapHasher;
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File: GEOMAlgo_PassKeyMapHasher.cxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+
+
+#include <GEOMAlgo_PassKeyShapeMapHasher.ixx>
+
+//=======================================================================
+//function : HashCode
+//purpose :
+//=======================================================================
+ Standard_Integer GEOMAlgo_PassKeyShapeMapHasher::HashCode(const GEOMAlgo_PassKeyShape& aPK,
+ const Standard_Integer Upper)
+{
+ return aPK.HashCode(Upper);
+}
+//=======================================================================
+//function :IsEqual
+//purpose :
+//=======================================================================
+ Standard_Boolean GEOMAlgo_PassKeyShapeMapHasher::IsEqual(const GEOMAlgo_PassKeyShape& aPK1,
+ const GEOMAlgo_PassKeyShape& aPK2)
+{
+ return aPK1.IsEqual(aPK2);
+}
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile
+#define _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile
+
+#ifndef _Standard_Integer_HeaderFile
+#include <Standard_Integer.hxx>
+#endif
+#ifndef _Standard_Boolean_HeaderFile
+#include <Standard_Boolean.hxx>
+#endif
+class GEOMAlgo_PassKeyShape;
+
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
+
+class GEOMAlgo_PassKeyShapeMapHasher {
+
+public:
+
+ void* operator new(size_t,void* anAddress)
+ {
+ return anAddress;
+ }
+ void* operator new(size_t size)
+ {
+ return Standard::Allocate(size);
+ }
+ void operator delete(void *anAddress)
+ {
+ if (anAddress) Standard::Free((Standard_Address&)anAddress);
+ }
+ // Methods PUBLIC
+ //
+
+
+Standard_EXPORT static Standard_Integer HashCode(const GEOMAlgo_PassKeyShape& aPKey,const Standard_Integer Upper) ;
+
+
+Standard_EXPORT static Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aPKey1,const GEOMAlgo_PassKeyShape& aPKey2) ;
+
+
+
+
+
+protected:
+
+ // Methods PROTECTED
+ //
+
+
+ // Fields PROTECTED
+ //
+
+
+private:
+
+ // Methods PRIVATE
+ //
+
+
+ // Fields PRIVATE
+ //
+
+
+};
+
+
+
+
+
+// other Inline functions and methods (like "C++: function call" methods)
+//
+
+
+#endif
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#include <GEOMAlgo_PassKeyShapeMapHasher.jxx>
+
+
+
+
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _GEOMAlgo_PassKeyShape_HeaderFile
+#include <GEOMAlgo_PassKeyShape.hxx>
+#endif
+#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile
+#include <GEOMAlgo_PassKeyShapeMapHasher.hxx>
+#endif
-- Created: Mon Dec 6 11:26:02 2004
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright: Matra Datavision 2004
class Tools from GEOMAlgo
ListOfShape from TopTools,
IndexedDataMapOfShapeListOfShape from TopTools,
Context from IntTools,
- IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo
+ IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo --qft
--raises
returns Boolean from Standard;
RefineSDShapes(myclass;
- aMSD:out IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo;
+ aMSD:out IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo; --qft
aTol:Real from Standard;
aCtx:out Context from IntTools)
returns Integer from Standard;
#include <BOPTools_Tools2D.hxx>
#include <IntTools_Context.hxx>
-#include <GEOMAlgo_PassKeyShape.hxx>
-#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
+#include <GEOMAlgo_PassKeyShape.hxx>//qft
+#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>//qft
static
void GetCount(const TopoDS_Shape& aS,
//function : RefineSDShapes
//purpose :
//=======================================================================
-Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape &aMPKLE,
- const Standard_Real aTol,
- IntTools_Context& aCtx)
+ Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE,
+ const Standard_Real aTol,
+ IntTools_Context& aCtx)
{
Standard_Integer i, aNbE, iErr, j, aNbEE, aNbToAdd;
TopTools_IndexedDataMapOfShapeListOfShape aMEE, aMSDE, aMEToAdd;
const TopoDS_Shape& aE1=aMEToAdd.FindKey(i);
const TopTools_ListOfShape& aLE=aMEToAdd(i);
//
- aPKE1.SetIds(aE1);
+ //qf
+ //aPKE1.SetIds(aE1);
+ aPKE1.SetShapes(aE1);
+ //qt
aMPKLE.Add(aPKE1, aLE);
}
//
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _Handle_GEOMAlgo_Clsf_HeaderFile
+#define _Handle_GEOMAlgo_Clsf_HeaderFile
+
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+
+#ifndef _Handle_GEOMAlgo_HAlgo_HeaderFile
+#include <Handle_GEOMAlgo_HAlgo.hxx>
+#endif
+
+class Standard_Transient;
+class Handle_Standard_Type;
+class Handle(GEOMAlgo_HAlgo);
+class GEOMAlgo_Clsf;
+Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_Clsf);
+
+class Handle(GEOMAlgo_Clsf) : public Handle(GEOMAlgo_HAlgo) {
+ public:
+ Handle(GEOMAlgo_Clsf)():Handle(GEOMAlgo_HAlgo)() {}
+ Handle(GEOMAlgo_Clsf)(const Handle(GEOMAlgo_Clsf)& aHandle) : Handle(GEOMAlgo_HAlgo)(aHandle)
+ {
+ }
+
+ Handle(GEOMAlgo_Clsf)(const GEOMAlgo_Clsf* anItem) : Handle(GEOMAlgo_HAlgo)((GEOMAlgo_HAlgo *)anItem)
+ {
+ }
+
+ Handle(GEOMAlgo_Clsf)& operator=(const Handle(GEOMAlgo_Clsf)& aHandle)
+ {
+ Assign(aHandle.Access());
+ return *this;
+ }
+
+ Handle(GEOMAlgo_Clsf)& operator=(const GEOMAlgo_Clsf* anItem)
+ {
+ Assign((Standard_Transient *)anItem);
+ return *this;
+ }
+
+ GEOMAlgo_Clsf* operator->() const
+ {
+ return (GEOMAlgo_Clsf *)ControlAccess();
+ }
+
+// Standard_EXPORT ~Handle(GEOMAlgo_Clsf)();
+
+ Standard_EXPORT static const Handle(GEOMAlgo_Clsf) DownCast(const Handle(Standard_Transient)& AnObject);
+};
+#endif
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _Handle_GEOMAlgo_ClsfBox_HeaderFile
+#define _Handle_GEOMAlgo_ClsfBox_HeaderFile
+
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+
+#ifndef _Handle_GEOMAlgo_Clsf_HeaderFile
+#include <Handle_GEOMAlgo_Clsf.hxx>
+#endif
+
+class Standard_Transient;
+class Handle_Standard_Type;
+class Handle(GEOMAlgo_Clsf);
+class GEOMAlgo_ClsfBox;
+Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_ClsfBox);
+
+class Handle(GEOMAlgo_ClsfBox) : public Handle(GEOMAlgo_Clsf) {
+ public:
+ Handle(GEOMAlgo_ClsfBox)():Handle(GEOMAlgo_Clsf)() {}
+ Handle(GEOMAlgo_ClsfBox)(const Handle(GEOMAlgo_ClsfBox)& aHandle) : Handle(GEOMAlgo_Clsf)(aHandle)
+ {
+ }
+
+ Handle(GEOMAlgo_ClsfBox)(const GEOMAlgo_ClsfBox* anItem) : Handle(GEOMAlgo_Clsf)((GEOMAlgo_Clsf *)anItem)
+ {
+ }
+
+ Handle(GEOMAlgo_ClsfBox)& operator=(const Handle(GEOMAlgo_ClsfBox)& aHandle)
+ {
+ Assign(aHandle.Access());
+ return *this;
+ }
+
+ Handle(GEOMAlgo_ClsfBox)& operator=(const GEOMAlgo_ClsfBox* anItem)
+ {
+ Assign((Standard_Transient *)anItem);
+ return *this;
+ }
+
+ GEOMAlgo_ClsfBox* operator->() const
+ {
+ return (GEOMAlgo_ClsfBox *)ControlAccess();
+ }
+
+// Standard_EXPORT ~Handle(GEOMAlgo_ClsfBox)();
+
+ Standard_EXPORT static const Handle(GEOMAlgo_ClsfBox) DownCast(const Handle(Standard_Transient)& AnObject);
+};
+#endif
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _Handle_GEOMAlgo_ClsfSurf_HeaderFile
+#define _Handle_GEOMAlgo_ClsfSurf_HeaderFile
+
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+
+#ifndef _Handle_GEOMAlgo_Clsf_HeaderFile
+#include <Handle_GEOMAlgo_Clsf.hxx>
+#endif
+
+class Standard_Transient;
+class Handle_Standard_Type;
+class Handle(GEOMAlgo_Clsf);
+class GEOMAlgo_ClsfSurf;
+Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_ClsfSurf);
+
+class Handle(GEOMAlgo_ClsfSurf) : public Handle(GEOMAlgo_Clsf) {
+ public:
+ Handle(GEOMAlgo_ClsfSurf)():Handle(GEOMAlgo_Clsf)() {}
+ Handle(GEOMAlgo_ClsfSurf)(const Handle(GEOMAlgo_ClsfSurf)& aHandle) : Handle(GEOMAlgo_Clsf)(aHandle)
+ {
+ }
+
+ Handle(GEOMAlgo_ClsfSurf)(const GEOMAlgo_ClsfSurf* anItem) : Handle(GEOMAlgo_Clsf)((GEOMAlgo_Clsf *)anItem)
+ {
+ }
+
+ Handle(GEOMAlgo_ClsfSurf)& operator=(const Handle(GEOMAlgo_ClsfSurf)& aHandle)
+ {
+ Assign(aHandle.Access());
+ return *this;
+ }
+
+ Handle(GEOMAlgo_ClsfSurf)& operator=(const GEOMAlgo_ClsfSurf* anItem)
+ {
+ Assign((Standard_Transient *)anItem);
+ return *this;
+ }
+
+ GEOMAlgo_ClsfSurf* operator->() const
+ {
+ return (GEOMAlgo_ClsfSurf *)ControlAccess();
+ }
+
+// Standard_EXPORT ~Handle(GEOMAlgo_ClsfSurf)();
+
+ Standard_EXPORT static const Handle(GEOMAlgo_ClsfSurf) DownCast(const Handle(Standard_Transient)& AnObject);
+};
+#endif
--- /dev/null
+// Copyright (C) 2005 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 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
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _Handle_GEOMAlgo_HAlgo_HeaderFile
+#define _Handle_GEOMAlgo_HAlgo_HeaderFile
+
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+
+#ifndef _Handle_MMgt_TShared_HeaderFile
+#include <Handle_MMgt_TShared.hxx>
+#endif
+
+class Standard_Transient;
+class Handle_Standard_Type;
+class Handle(MMgt_TShared);
+class GEOMAlgo_HAlgo;
+Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_HAlgo);
+
+class Handle(GEOMAlgo_HAlgo) : public Handle(MMgt_TShared) {
+ public:
+ Handle(GEOMAlgo_HAlgo)():Handle(MMgt_TShared)() {}
+ Handle(GEOMAlgo_HAlgo)(const Handle(GEOMAlgo_HAlgo)& aHandle) : Handle(MMgt_TShared)(aHandle)
+ {
+ }
+
+ Handle(GEOMAlgo_HAlgo)(const GEOMAlgo_HAlgo* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem)
+ {
+ }
+
+ Handle(GEOMAlgo_HAlgo)& operator=(const Handle(GEOMAlgo_HAlgo)& aHandle)
+ {
+ Assign(aHandle.Access());
+ return *this;
+ }
+
+ Handle(GEOMAlgo_HAlgo)& operator=(const GEOMAlgo_HAlgo* anItem)
+ {
+ Assign((Standard_Transient *)anItem);
+ return *this;
+ }
+
+ GEOMAlgo_HAlgo* operator->() const
+ {
+ return (GEOMAlgo_HAlgo *)ControlAccess();
+ }
+
+// Standard_EXPORT ~Handle(GEOMAlgo_HAlgo)();
+
+ Standard_EXPORT static const Handle(GEOMAlgo_HAlgo) DownCast(const Handle(Standard_Transient)& AnObject);
+};
+#endif
GEOMAlgo_BuilderShape.cxx \
GEOMAlgo_BuilderSolid.cxx \
GEOMAlgo_BuilderTools.cxx \
+ GEOMAlgo_ClsfBox.cxx \
+ GEOMAlgo_Clsf.cxx \
+ GEOMAlgo_ClsfSurf.cxx \
GEOMAlgo_CoupleOfShapes.cxx \
GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx \
GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_0.cxx \
GEOMAlgo_DataMapOfShapeReal_0.cxx \
GEOMAlgo_DataMapOfShapeShapeSet_0.cxx \
GEOMAlgo_FinderShapeOn1.cxx \
+ GEOMAlgo_FinderShapeOn2.cxx \
GEOMAlgo_FinderShapeOn.cxx \
GEOMAlgo_FinderShapeOnQuad.cxx \
GEOMAlgo_GlueAnalyser.cxx \
GEOMAlgo_Gluer.cxx \
+ GEOMAlgo_HAlgo.cxx \
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx \
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx \
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx \
GEOMAlgo_PassKey.cxx \
GEOMAlgo_PassKeyMapHasher.cxx \
GEOMAlgo_PassKeyShape.cxx \
+ GEOMAlgo_PassKeyShapeMapHasher.cxx \
GEOMAlgo_ShapeAlgo.cxx \
GEOMAlgo_ShapeSet.cxx \
GEOMAlgo_ShapeSolid.cxx \
GEOMAlgo_BuilderShape.hxx \
GEOMAlgo_BuilderSolid.hxx \
GEOMAlgo_BuilderTools.hxx \
+ GEOMAlgo_ClsfBox.hxx \
+ GEOMAlgo_Clsf.hxx \
+ GEOMAlgo_ClsfSurf.hxx \
GEOMAlgo_CoupleOfShapes.hxx \
GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx \
GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx \
GEOMAlgo_DataMapOfShapeReal.hxx \
GEOMAlgo_DataMapOfShapeShapeSet.hxx \
GEOMAlgo_FinderShapeOn1.hxx \
+ GEOMAlgo_FinderShapeOn2.hxx \
GEOMAlgo_FinderShapeOn.hxx \
GEOMAlgo_FinderShapeOnQuad.hxx \
GEOMAlgo_GlueAnalyser.hxx \
GEOMAlgo_Gluer.hxx \
+ GEOMAlgo_HAlgo.hxx \
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx \
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx \
GEOMAlgo_PassKey.hxx \
GEOMAlgo_PassKeyMapHasher.hxx \
GEOMAlgo_PassKeyShape.hxx \
+ GEOMAlgo_PassKeyShapeMapHasher.hxx \
GEOMAlgo_PWireEdgeSet.hxx \
GEOMAlgo_ShapeAlgo.hxx \
GEOMAlgo_ShapeSet.hxx \
GEOMAlgo_WireEdgeSet.hxx \
GEOMAlgo_WireSolid.hxx \
GEOMAlgo_WireSplitter.hxx \
+ Handle_GEOMAlgo_ClsfBox.hxx \
+ Handle_GEOMAlgo_Clsf.hxx \
+ Handle_GEOMAlgo_ClsfSurf.hxx \
Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx \
Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx \
Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx \
Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx \
+ Handle_GEOMAlgo_HAlgo.hxx \
Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \
Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx \
Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx \