CHECK_CAS
-echo "OCC_VERSION_DEVELOPMENT = ${OCC_VERSION_DEVELOPMENT}"
-NMTDS_VAR=NMTDS_NEW
-NMTTools_VAR=NMTTools_NEW
-GEOMAlgo_VAR=GEOMAlgo_NEW
-#if test "${OCC_VERSION_FULL}" == "6.5.3"; then
-# NMTDS_VAR=NMTDS_NEW
-# NMTTools_VAR=NMTTools_NEW
-# GEOMAlgo_VAR=GEOMAlgo_NEW
-#fi
-AC_SUBST(NMTDS_VAR)
-AC_SUBST(NMTTools_VAR)
-AC_SUBST(GEOMAlgo_VAR)
-
echo
echo ---------------------------------------------
echo Testing html generators
src/EntityGUI/Makefile \
src/GEOM/Makefile \
src/GEOMAlgo/Makefile \
- src/GEOMAlgo_NEW/Makefile \
src/GEOMBase/Makefile \
src/GEOMClient/Makefile \
src/GEOMFiltersSelection/Makefile \
src/IGESImport/Makefile \
src/MeasureGUI/Makefile \
src/NMTDS/Makefile \
- src/NMTDS_NEW/Makefile \
src/NMTTools/Makefile \
- src/NMTTools_NEW/Makefile \
src/OBJECT/Makefile \
src/OCC2VTK/Makefile \
src/OperationGUI/Makefile \
is
class SphereSpaceModifier;
-
+
class UnionFaces;
-
+
class UnionEdges;
-
+
class BlockFixAPI;
---Purpose: API class to perform the fixing of the
-- block
-
+
class PeriodicSurfaceModifier;
class CheckTool;
-
+
RotateSphereSpace (S: Shape from TopoDS; Tol: Real)
returns Shape from TopoDS;
// 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: BlockFix.cxx
// Created: Tue Dec 7 11:59:05 2004
// Author: Pavel DURANDIN
-//
+
#include <BlockFix.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopTools_DataMapOfShapeShape.hxx>
-#include <ShapeCustom.hxx>
-#include <BRepTools.hxx>
-#include <ShapeBuild_ReShape.hxx>
-#include <TopoDS_Face.hxx>
+
+#include <BlockFix_SphereSpaceModifier.hxx>
+#include <BlockFix_PeriodicSurfaceModifier.hxx>
+
+#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
-#include <TopoDS.hxx>
+
#include <TopLoc_Location.hxx>
-#include <Geom_Surface.hxx>
-#include <Geom_CylindricalSurface.hxx>
-#include <Geom_ConicalSurface.hxx>
-#include <ShapeFix_Wire.hxx>
+
+#include <TopoDS.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Face.hxx>
#include <TopoDS_Wire.hxx>
-#include <BRepTools_Modifier.hxx>
-#include <Geom_SphericalSurface.hxx>
-#include <Geom_ToroidalSurface.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Solid.hxx>
+#include <TopoDS_Vertex.hxx>
+
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_DataMapOfShapeShape.hxx>
+#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
+
#include <BRep_Tool.hxx>
-#include <TopoDS_Edge.hxx>
-#include <Geom2d_Curve.hxx>
#include <BRep_Builder.hxx>
-#include <ShapeAnalysis_Edge.hxx>
-#include <ShapeFix_Edge.hxx>
+
+#include <BRepAdaptor_Surface.hxx>
+
+#include <BRepTools.hxx>
+#include <BRepTools_Modifier.hxx>
+#include <BRepTools_Substitution.hxx>
+
+#include <BRepOffsetAPI_MakeFilling.hxx>
+
#include <ShapeFix.hxx>
+#include <ShapeFix_Edge.hxx>
#include <ShapeFix_Face.hxx>
-#include <ShapeAnalysis.hxx>
-#include <TColgp_SequenceOfPnt2d.hxx>
+#include <ShapeAnalysis.hxx>
+#include <ShapeAnalysis_Edge.hxx>
#include <ShapeAnalysis_Curve.hxx>
-#include <TopoDS_Vertex.hxx>
+#include <ShapeAnalysis_Surface.hxx>
+
+#include <ShapeCustom.hxx>
+
#include <ShapeBuild_Edge.hxx>
+#include <ShapeBuild_ReShape.hxx>
-#include <BlockFix_SphereSpaceModifier.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <BlockFix_PeriodicSurfaceModifier.hxx>
+#include <ShapeFix_Wire.hxx>
-#include <TopoDS_Solid.hxx>
+#include <Geom_Surface.hxx>
+#include <Geom_CylindricalSurface.hxx>
+#include <Geom_ConicalSurface.hxx>
+#include <Geom_SphericalSurface.hxx>
+#include <Geom_ToroidalSurface.hxx>
+
+#include <Geom2d_Curve.hxx>
+#include <TColgp_SequenceOfPnt2d.hxx>
//=======================================================================
//function : FixResult
TopoDS_Face aFace = TopoDS::Face(aShape);
TopLoc_Location L;
Handle(Geom_Surface) Surf = BRep_Tool::Surface(aFace,L);
-
+
if( Surf->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ||
Surf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) ) {
-
+
Standard_Integer nbWires = 0;
for (TopExp_Explorer ex_w(aFace,TopAbs_WIRE); ex_w.More(); ex_w.Next()) {
nbWires++;
- Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire(TopoDS::Wire(ex_w.Current()),
- aFace,
+ Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire(TopoDS::Wire(ex_w.Current()),
+ aFace,
Precision::Confusion());
sfw->FixReorder();
if(sfw->StatusReorder ( ShapeExtend_FAIL ))
continue;
-
+
sfw->SetPrecision(2.*Tol);
sfw->FixShifted();
-
+
Standard_Boolean isDone = sfw->LastFixStatus ( ShapeExtend_DONE );
isDone |= sfw->FixDegenerated();
-
+
// remove degenerated edges from not degenerated points
ShapeAnalysis_Edge sae;
Handle(ShapeExtend_WireData) sewd = sfw->WireData();
i--;
}
}
-
+
//isDone |= sfw->FixLacking(); // commented by skl 22.03.2005 (PAL8395)
-
- // remove neighbour seam edges
+
+ // remove neighbour seam edges
if(isDone) {
for( i = 1; i<sewd->NbEdges();i++) {
if(sewd->IsSeam(i) && sewd->IsSeam(i+1)) {
sewd->Remove(sewd->NbEdges());
}
}
-
-
+
if(isDone) {
TopoDS_Wire ResWire = sfw->Wire();
Context->Replace(ex_w.Current(), ResWire);
if(sff->FixOrientation())
Context->Replace(aFixedFace,sff->Face());
}
-
}
}
}
-
-
-
-
//=======================================================================
-//function : ConvertToAnalytical
-//purpose :
+//function : RotateSphereSpace
+//purpose :
//=======================================================================
-
TopoDS_Shape BlockFix::RotateSphereSpace (const TopoDS_Shape& S,
- const Standard_Real Tol)
+ const Standard_Real Tol)
{
-
// Create a modification description
Handle(BlockFix_SphereSpaceModifier) SR = new BlockFix_SphereSpaceModifier;
SR->SetTolerance(Tol);
TopTools_DataMapOfShapeShape context;
BRepTools_Modifier MD;
TopoDS_Shape result = ShapeCustom::ApplyModifier ( S, SR, context,MD );
-
+
Handle(ShapeBuild_ReShape) RS = new ShapeBuild_ReShape;
FixResult(result,RS,Tol);
result = RS->Apply(result);
-
+
ShapeFix_Edge sfe;
for(TopExp_Explorer exp(result,TopAbs_EDGE); exp.More(); exp.Next()) {
TopoDS_Edge E = TopoDS::Edge(exp.Current());
sfe.FixVertexTolerance (E);
}
-
+
ShapeFix::SameParameter(result,Standard_False);
return result;
}
+//=======================================================================
+//function : RefillProblemFaces
+//purpose :
+//=======================================================================
+TopoDS_Shape BlockFix::RefillProblemFaces (const TopoDS_Shape& aShape)
+{
+ Standard_Integer NbSamples = 10;
+
+ TopTools_ListOfShape theFaces;
+
+ TopExp_Explorer Explo(aShape, TopAbs_FACE);
+ for (; Explo.More(); Explo.Next())
+ {
+ TopoDS_Face aFace = TopoDS::Face(Explo.Current());
+ BRepAdaptor_Surface BAsurf(aFace);
+ GeomAbs_SurfaceType SurfType = BAsurf.GetType();
+ if (SurfType >= GeomAbs_BezierSurface)
+ {
+ TopExp_Explorer fexp(aFace, TopAbs_EDGE);
+ for (; fexp.More(); fexp.Next())
+ {
+ const TopoDS_Edge& anEdge = TopoDS::Edge(fexp.Current());
+ if (BRep_Tool::Degenerated(anEdge))
+ {
+ TopoDS_Vertex V1, V2;
+ TopExp::Vertices(anEdge, V1, V2);
+ if (V1.IsSame(V2))
+ {
+ gp_Pnt aPnt = BRep_Tool::Pnt(V1);
+ Standard_Real TolV = BRep_Tool::Tolerance(V1);
+ Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
+ Handle(ShapeAnalysis_Surface) Analyser = new ShapeAnalysis_Surface(aSurf);
+ if (Analyser->IsDegenerated(aPnt, TolV))
+ {
+ theFaces.Append(aFace);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ //Now all problem faces are collected in the list "theFaces"
+ BRepTools_Substitution aSubst;
+ TopTools_ListIteratorOfListOfShape itl(theFaces);
+ for (; itl.More(); itl.Next())
+ {
+ const TopoDS_Face& aFace = TopoDS::Face(itl.Value());
+ BRepOffsetAPI_MakeFilling Filler;
+ for (Explo.Init(aFace, TopAbs_EDGE); Explo.More(); Explo.Next())
+ {
+ const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current());
+ if (!BRep_Tool::Degenerated(anEdge))
+ Filler.Add(anEdge, GeomAbs_C0);
+ }
+ Standard_Real Umin, Umax, Vmin, Vmax;
+ BRepTools::UVBounds(aFace, Umin, Umax, Vmin, Vmax);
+ //Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
+ Standard_Integer i, j;
+ for (i = 1; i < NbSamples; i++)
+ for (j = 1; j < NbSamples; j++) {
+ /*
+ gp_Pnt aPoint = aSurf->Value(Umin + i*(Umax-Umin)/NbSamples,
+ Vmin + j*(Vmax-Vmin)/NbSamples);
+ Filler.Add(aPoint);
+ */
+ Filler.Add(Umin + i*(Umax-Umin)/NbSamples,
+ Vmin + j*(Vmax-Vmin)/NbSamples,
+ aFace, GeomAbs_G1);
+ }
+
+ Filler.Build();
+ if (Filler.IsDone())
+ {
+ for (Explo.Init(aFace, TopAbs_EDGE); Explo.More(); Explo.Next())
+ {
+ const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current());
+ TopTools_ListOfShape Ledge;
+ if (!BRep_Tool::Degenerated(anEdge))
+ {
+ const TopTools_ListOfShape& Ledges = Filler.Generated(anEdge);
+ if (!Ledges.IsEmpty()) {
+ TopoDS_Shape NewEdge = Ledges.First();
+ Ledge.Append(NewEdge.Oriented(TopAbs_FORWARD));
+ }
+ }
+ aSubst.Substitute(anEdge, Ledge);
+ }
+ TopTools_ListOfShape Lface;
+ TopoDS_Face NewFace = TopoDS::Face(Filler.Shape());
+ NewFace.Orientation(TopAbs_FORWARD);
+ BRepAdaptor_Surface NewBAsurf(NewFace);
+ gp_Pnt MidPnt;
+ gp_Vec D1U, D1V, Normal, NewNormal;
+ Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
+ aSurf->D1((Umin+Umax)*0.5, (Vmin+Vmax)*0.5, MidPnt, D1U, D1V);
+ Normal = D1U ^ D1V;
+ NewBAsurf.D1((NewBAsurf.FirstUParameter() + NewBAsurf.LastUParameter())*0.5,
+ (NewBAsurf.FirstVParameter() + NewBAsurf.LastVParameter())*0.5,
+ MidPnt, D1U, D1V);
+ NewNormal = D1U ^ D1V;
+ if (Normal * NewNormal < 0.)
+ NewFace.Reverse();
+ Lface.Append(NewFace);
+ aSubst.Substitute(aFace, Lface);
+ }
+ }
+ aSubst.Build(aShape);
+
+ TopoDS_Shape Result = aShape;
+ if (aSubst.IsCopied(aShape))
+ Result = aSubst.Copy(aShape).First();
+
+ BRepTools::RemoveUnusedPCurves(Result);
+
+ return Result;
+}
//=======================================================================
//function : FixRanges
-//purpose :
+//purpose :
//=======================================================================
-
TopoDS_Shape BlockFix::FixRanges (const TopoDS_Shape& S,
- const Standard_Real Tol)
+ const Standard_Real Tol)
{
// Create a modification description
Handle(BlockFix_PeriodicSurfaceModifier) SR = new BlockFix_PeriodicSurfaceModifier;
TopTools_DataMapOfShapeShape context;
BRepTools_Modifier MD;
TopoDS_Shape result = ShapeCustom::ApplyModifier ( S, SR, context,MD );
-
+
Handle(ShapeBuild_ReShape) RS = new ShapeBuild_ReShape;
FixResult(result,RS,Tol);
result = RS->Apply(result);
-
+
ShapeFix_Edge sfe;
for(TopExp_Explorer exp(result,TopAbs_EDGE); exp.More(); exp.Next()) {
TopoDS_Edge E = TopoDS::Edge(exp.Current());
sfe.FixVertexTolerance (E);
}
-
+
ShapeFix::SameParameter(result,Standard_False);
return result;
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
+
class TopoDS_Shape;
class BlockFix_SphereSpaceModifier;
class BlockFix_UnionFaces;
class BlockFix_PeriodicSurfaceModifier;
class BlockFix_CheckTool;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
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 TopoDS_Shape RotateSphereSpace(const TopoDS_Shape& S,const Standard_Real Tol) ;
-Standard_EXPORT static TopoDS_Shape FixRanges(const TopoDS_Shape& S,const Standard_Real Tol) ;
-
-
-
-
+ 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);
+ }
+
+ Standard_EXPORT static TopoDS_Shape RotateSphereSpace(const TopoDS_Shape& S,const Standard_Real Tol);
+ Standard_EXPORT static TopoDS_Shape RefillProblemFaces(const TopoDS_Shape& S);
+ Standard_EXPORT static TopoDS_Shape FixRanges(const TopoDS_Shape& S,const Standard_Real Tol);
protected:
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
+private:
friend class BlockFix_SphereSpaceModifier;
friend class BlockFix_UnionFaces;
};
-
-
-
-
// other Inline functions and methods (like "C++: function call" methods)
-//
-
#endif
#include <BlockFix.jxx>
-
+
--
class BlockFixAPI from BlockFix inherits TShared from MMgt
- ---Purpose:
+ ---Purpose:
uses
Shape from TopoDS,
- ReShape from ShapeBuild
+ ReShape from ShapeBuild
is
Create returns BlockFixAPI from BlockFix;
---Purpose: Empty constructor
-
+
SetShape(me: mutable; Shape: Shape from TopoDS);
---Purpose: Sets the shape to be operated on
---C++: inline
Perform(me: mutable);
- ---Purpose:
-
+ ---Purpose:
+
Shape(me) returns Shape from TopoDS;
---Purpose: Returns resulting shape.
---C++: inline
-
+
Context(me:mutable) returns ReShape from ShapeBuild;
- ---Purpose: Returns modifiable context for storing the
+ ---Purpose: Returns modifiable context for storing the
-- mofifications
---C++: inline
---C++: return &
-
+
Tolerance (me:mutable) returns Real;
---Purpose: Returns modifiable tolerance of recognition
---C++: inline
---C++: return &
fields
-
+
myContext : ReShape from ShapeBuild;
myShape : Shape from TopoDS;
myTolerance : Real from Standard;
-
+
end BlockFixAPI from BlockFix;
// 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: BlockFix_BlockFixAPI.cxx
// Created: Tue Dec 7 11:59:05 2004
// Author: Pavel DURANDIN
-//
+
#include <BlockFix_BlockFixAPI.ixx>
+
#include <BlockFix.hxx>
#include <BlockFix_UnionFaces.hxx>
#include <BlockFix_UnionEdges.hxx>
+
+#include <Basics_OCCTVersion.hxx>
+
+#include <ShapeUpgrade_RemoveLocations.hxx>
+
#include <Precision.hxx>
//=======================================================================
TopoDS_Shape aShape = Shape();
myShape = BlockFix::RotateSphereSpace(aShape,myTolerance);
+ // try to approximate non-canonic surfaces
+ // with singularities on boundaries by filling
+ myShape = BlockFix::RefillProblemFaces(myShape);
+
// faces unification
BlockFix_UnionFaces aFaceUnifier;
aFaceUnifier.GetTolerance() = myTolerance;
aFaceUnifier.GetOptimumNbFaces() = myOptimumNbFaces;
TopoDS_Shape aResult = aFaceUnifier.Perform(myShape);
+ // avoid problem with degenerated edges appearance
+ // due to shape quality regress
+ ShapeUpgrade_RemoveLocations RemLoc;
+ RemLoc.Remove(aResult);
+ aResult = RemLoc.GetResult();
+
+ // edges unification
BlockFix_UnionEdges anEdgeUnifier;
myShape = anEdgeUnifier.Perform(aResult,myTolerance);
class BlockFix_BlockFixAPI : public MMgt_TShared
{
public:
- void* operator new(size_t,void* anAddress)
+ void* operator new(size_t,void* anAddress)
{
return anAddress;
}
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
+ void* operator new(size_t size)
+ {
+ return Standard::Allocate(size);
}
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
+ void operator delete(void *anAddress)
+ {
+ if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC
- //
+ //
Standard_EXPORT BlockFix_BlockFixAPI();
void SetShape(const TopoDS_Shape& Shape);
Standard_EXPORT void Perform();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-private:
+private:
// Fields PRIVATE
//
Handle_ShapeBuild_ReShape myContext;
#endif
BlockFix_BlockFixAPI::~BlockFix_BlockFixAPI() {}
-
+
Standard_EXPORT Handle_Standard_Type& BlockFix_BlockFixAPI_Type_()
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);
-
+
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_BlockFixAPI",
// DownCast method
// allow safe downcasting
//
-const Handle(BlockFix_BlockFixAPI) Handle(BlockFix_BlockFixAPI)::DownCast(const Handle(Standard_Transient)& AnObject)
+const Handle(BlockFix_BlockFixAPI) Handle(BlockFix_BlockFixAPI)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(BlockFix_BlockFixAPI) _anOtherObject;
return _anOtherObject ;
}
-const Handle(Standard_Type)& BlockFix_BlockFixAPI::DynamicType() const
-{
- return STANDARD_TYPE(BlockFix_BlockFixAPI) ;
+const Handle(Standard_Type)& BlockFix_BlockFixAPI::DynamicType() const
+{
+ return STANDARD_TYPE(BlockFix_BlockFixAPI) ;
}
-Standard_Boolean BlockFix_BlockFixAPI::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(BlockFix_BlockFixAPI) == AType || MMgt_TShared::IsKind(AType));
+Standard_Boolean BlockFix_BlockFixAPI::IsKind(const Handle(Standard_Type)& AType) const
+{
+ return (STANDARD_TYPE(BlockFix_BlockFixAPI) == AType || MMgt_TShared::IsKind(AType));
}
Handle_BlockFix_BlockFixAPI::~Handle_BlockFix_BlockFixAPI() {}
//=======================================================================
//function : SetShape
-//purpose :
+//purpose :
//=======================================================================
inline void BlockFix_BlockFixAPI::SetShape(const TopoDS_Shape& Shape)
//=======================================================================
//function : Shape
-//purpose :
+//purpose :
//=======================================================================
inline TopoDS_Shape BlockFix_BlockFixAPI::Shape() const
//=======================================================================
//function : Context
-//purpose :
+//purpose :
//=======================================================================
inline Handle(ShapeBuild_ReShape)& BlockFix_BlockFixAPI::Context()
//=======================================================================
//function : Tolerance
-//purpose :
+//purpose :
//=======================================================================
inline Standard_Real& BlockFix_BlockFixAPI::Tolerance()
//=======================================================================
//function : OptimumNbFaces
-//purpose :
+//purpose :
//=======================================================================
inline Standard_Integer& BlockFix_BlockFixAPI::OptimumNbFaces()
class CheckTool from BlockFix
---Purpose:
-
+
uses
Shape from TopoDS,
Create returns CheckTool from BlockFix;
---Purpose: Empty constructor
-
+
SetShape(me: in out; aShape: Shape from TopoDS);
Perform(me: in out);
- ---Purpose:
-
+ ---Purpose:
+
NbPossibleBlocks(me) returns Integer;
-
+
PossibleBlock(me; num: Integer) returns Shape from TopoDS;
DumpCheckResult(me; S : in out OStream);
- ---Purpose: Dumps results of checking
+ ---Purpose: Dumps results of checking
fields
myNbUE : Integer;
myNbUFUE : Integer;
myBadRanges : Integer;
-
+
end CheckTool;
//=======================================================================
//function : SetShape
-//purpose :
+//purpose :
//=======================================================================
void BlockFix_CheckTool::SetShape(const TopoDS_Shape& aShape)
//=======================================================================
//function : Perform
-//purpose :
+//purpose :
//=======================================================================
-void BlockFix_CheckTool::Perform()
+void BlockFix_CheckTool::Perform()
{
myNbSolids=0;
myNbBlocks=0;
}
}
- if (IsBlock)
+ if (IsBlock)
myNbBlocks++;
else {
if (MayBeUF) {
//=======================================================================
//function : NbPossibleBlocks
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer BlockFix_CheckTool::NbPossibleBlocks() const
//=======================================================================
//function : PossibleBlock
-//purpose :
+//purpose :
//=======================================================================
TopoDS_Shape BlockFix_CheckTool::PossibleBlock(const Standard_Integer num) const
{
TopoDS_Shape res;
- if( num>0 && num<=myPossibleBlocks.Length() )
+ if( num>0 && num<=myPossibleBlocks.Length() )
res = myPossibleBlocks.Value(num);
return res;
}
//=======================================================================
//function : DumpCheckResult
-//purpose :
+//purpose :
//=======================================================================
void BlockFix_CheckTool::DumpCheckResult(Standard_OStream& S) const
public:
- void* operator new(size_t,void* anAddress)
+ void* operator new(size_t,void* anAddress)
{
return anAddress;
}
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
+ void* operator new(size_t size)
+ {
+ return Standard::Allocate(size);
}
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
+ void operator delete(void *anAddress)
+ {
+ if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC
- //
+ //
Standard_EXPORT BlockFix_CheckTool();
Standard_EXPORT void SetShape(const TopoDS_Shape& aShape) ;
Standard_EXPORT void Perform() ;
protected:
// Methods PROTECTED
- //
+ //
// Fields PROTECTED
//
-private:
+private:
// Methods PRIVATE
- //
+ //
// Fields PRIVATE
#include <BlockFix_CheckTool.jxx>
-
+
-- Created: Wed Dec 15 10:03:50 2004
-- Author: Sergey KUUL
--
-class PeriodicSurfaceModifier from BlockFix inherits Modification from BRepTools
+class PeriodicSurfaceModifier from BlockFix inherits Modification from BRepTools
- ---Purpose:
+ ---Purpose:
uses
- Vertex from TopoDS,
+ Vertex from TopoDS,
Edge from TopoDS,
Face from TopoDS,
Location from TopLoc,
DataMapOfShapeInteger from TopTools
is
-
+
Create returns mutable PeriodicSurfaceModifier from BlockFix;
-
+
SetTolerance(me: mutable; Toler: Real);
---Purpose: Sets the tolerance for recognition of geometry
-- the new tolerance. Otherwise, returns
-- Standard_False, and <S>, <L>, <Tol> are not
-- significant.
-
+
NewCurve(me: mutable; E : Edge from TopoDS;
C : out Curve from Geom;
L : out Location from TopLoc;
-- curve on surface on the face <F>.In this case, <C>
-- is the new geometric support of the edge, <L> the
-- new location, <Tol> the new tolerance.
- --
+ --
-- Otherwise, returns Standard_False, and <C>, <L>,
-- <Tol> are not significant.
- --
+ --
-- <NewE> is the new edge created from <E>. <NewF>
-- is the new face created from <F>. They may be usefull.
returns Shape from GeomAbs;
---Purpose: Returns the continuity of <NewE> between <NewF1>
-- and <NewF2>.
- --
+ --
-- <NewE> is the new edge created from <E>. <NewF1>
-- (resp. <NewF2>) is the new face created from <F1>
-- (resp. <F2>).
-
-fields
-
+
+fields
+
myTolerance : Real;
myMapOfFaces : DataMapOfShapeInteger from TopTools;
myMapOfSurfaces: IndexedMapOfTransient from TColStd;
//=======================================================================
//function : SetTolerance
-//purpose :
+//purpose :
//=======================================================================
void BlockFix_PeriodicSurfaceModifier::SetTolerance(const Standard_Real Tol)
Handle(Geom_Surface) S = aSurface;
if(S->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) {
- Handle(Geom_CylindricalSurface) aCyl =
+ Handle(Geom_CylindricalSurface) aCyl =
Handle(Geom_CylindricalSurface)::DownCast(S);
Standard_Real Umin, Umax, Vmin, Vmax;
BRepTools::UVBounds(aFace, Umin, Umax, Vmin, Vmax);
return Standard_True;
}
}
-
+
if(S->IsKind(STANDARD_TYPE(Geom_SphericalSurface))) {
Handle(Geom_SphericalSurface) aSphere = Handle(Geom_SphericalSurface)::DownCast(S);
Standard_Real Umin, Umax, Vmin, Vmax;
return Standard_False;
}
-
+
//=======================================================================
//function : NewSurface
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewSurface(const TopoDS_Face& F,
Handle(Geom_Surface)& S,
TopLoc_Location& L,Standard_Real& Tol,
Standard_Boolean& RevWires,
- Standard_Boolean& RevFace)
+ Standard_Boolean& RevFace)
{
TopLoc_Location LS;
Handle(Geom_Surface) SIni = BRep_Tool::Surface(F, LS);
-
+
if(ModifySurface(F, SIni, S)) {
-
+
RevWires = Standard_False;
RevFace = Standard_False;
-
+
L = LS;
Tol = BRep_Tool::Tolerance(F);
-
+
Standard_Integer anIndex = myMapOfSurfaces.Add(S);
myMapOfFaces.Bind(F,anIndex);
return Standard_True;
//=======================================================================
//function : NewCurve
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve(const TopoDS_Edge& /*E*/,
Handle(Geom_Curve)& /*C*/,
TopLoc_Location& /*L*/,
- Standard_Real& /*Tol*/)
+ Standard_Real& /*Tol*/)
{
return Standard_False;
}
//=======================================================================
//function : NewPoint
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewPoint(const TopoDS_Vertex& /*V*/,
gp_Pnt& /*P*/,
- Standard_Real& /*Tol*/)
+ Standard_Real& /*Tol*/)
{
return Standard_False;
}
//=======================================================================
//function : NewCurve2d
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve2d(const TopoDS_Edge& E,
const TopoDS_Edge& /*NewE*/,
const TopoDS_Face& /*NewF*/,
Handle(Geom2d_Curve)& C,
- Standard_Real& Tol)
+ Standard_Real& Tol)
{
//check if undelying surface of the face was modified
if(myMapOfFaces.IsBound(F)) {
Standard_Integer anIndex = myMapOfFaces.Find(F);
-
+
Handle(Geom_Surface) aNewSurf = Handle(Geom_Surface)::DownCast(myMapOfSurfaces.FindKey(anIndex));
-
+
Standard_Real f,l;
TopLoc_Location LC, LS;
Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l );
Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS);
-
+
//taking into accound the orientation of the seam
C = BRep_Tool::CurveOnSurface(E,F,f,l);
Tol = BRep_Tool::Tolerance(E);
-
+
BRep_Builder B;
TopoDS_Edge TempE;
B.MakeEdge(TempE);
B.Add(TempE, TopExp::FirstVertex(E));
B.Add(TempE, TopExp::LastVertex(E));
- if(!C3d.IsNull())
+ if(!C3d.IsNull())
B.UpdateEdge(TempE, Handle(Geom_Curve)::DownCast(C3d->Transformed(LC.Transformation())), Precision::Confusion());
B.Range(TempE, f, l);
-
+
Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge;
Handle(Geom_Surface) STemp = Handle(Geom_Surface)::DownCast(aNewSurf->Transformed(LS.Transformation()));
TopLoc_Location LTemp;
LTemp.Identity();
-
+
Standard_Boolean isClosed = BRep_Tool::IsClosed (E, F);
Standard_Real aWorkTol = 2*myTolerance+Tol;
sfe->FixAddPCurve(TempE, STemp, LTemp, isClosed, Max(Precision::Confusion(), aWorkTol));
sfe->FixSameParameter(TempE);
-
+
//keep the orientation of original edge
TempE.Orientation(E.Orientation());
C = BRep_Tool::CurveOnSurface(TempE, STemp, LTemp, f, l);
-
+
//surface was modified
return Standard_True;
}
//=======================================================================
//function : NewParameter
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewParameter(const TopoDS_Vertex& /*V*/,
const TopoDS_Edge& /*E*/,
Standard_Real& /*P*/,
- Standard_Real& /*Tol*/)
+ Standard_Real& /*Tol*/)
{
return Standard_False;
}
//=======================================================================
//function : Continuity
-//purpose :
+//purpose :
//=======================================================================
GeomAbs_Shape BlockFix_PeriodicSurfaceModifier::Continuity(const TopoDS_Edge& E,
const TopoDS_Face& F2,
const TopoDS_Edge& /*NewE*/,
const TopoDS_Face& /*NewF1*/,
- const TopoDS_Face& /*NewF2*/)
+ const TopoDS_Face& /*NewF2*/)
{
return BRep_Tool::Continuity(E,F1,F2);
}
public:
- void* operator new(size_t,void* anAddress)
+ void* operator new(size_t,void* anAddress)
{
return anAddress;
}
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
+ void* operator new(size_t size)
+ {
+ return Standard::Allocate(size);
}
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
+ void operator delete(void *anAddress)
+ {
+ if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC
- //
+ //
Standard_EXPORT BlockFix_PeriodicSurfaceModifier();
Standard_EXPORT void SetTolerance(const Standard_Real Toler) ;
Standard_EXPORT Standard_Boolean NewSurface(const TopoDS_Face& F,Handle(Geom_Surface)& S,TopLoc_Location& L,Standard_Real& Tol,Standard_Boolean& RevWires,Standard_Boolean& RevFace) ;
protected:
// Methods PROTECTED
- //
+ //
// Fields PROTECTED
//
-private:
+private:
// Methods PRIVATE
- //
+ //
// Fields PRIVATE
#endif
BlockFix_PeriodicSurfaceModifier::~BlockFix_PeriodicSurfaceModifier() {}
-
+
Standard_EXPORT Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_()
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
+
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_PeriodicSurfaceModifier",
// DownCast method
// allow safe downcasting
//
-const Handle(BlockFix_PeriodicSurfaceModifier) Handle(BlockFix_PeriodicSurfaceModifier)::DownCast(const Handle(Standard_Transient)& AnObject)
+const Handle(BlockFix_PeriodicSurfaceModifier) Handle(BlockFix_PeriodicSurfaceModifier)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(BlockFix_PeriodicSurfaceModifier) _anOtherObject;
return _anOtherObject ;
}
-const Handle(Standard_Type)& BlockFix_PeriodicSurfaceModifier::DynamicType() const
-{
- return STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) ;
+const Handle(Standard_Type)& BlockFix_PeriodicSurfaceModifier::DynamicType() const
+{
+ return STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) ;
}
-Standard_Boolean BlockFix_PeriodicSurfaceModifier::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) == AType || BRepTools_Modification::IsKind(AType));
+Standard_Boolean BlockFix_PeriodicSurfaceModifier::IsKind(const Handle(Standard_Type)& AType) const
+{
+ return (STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) == AType || BRepTools_Modification::IsKind(AType));
}
Handle_BlockFix_PeriodicSurfaceModifier::~Handle_BlockFix_PeriodicSurfaceModifier() {}
-- Created: Tue Dec 7 12:01:49 2004
-- Author: Pavel Durandin
--
-class SphereSpaceModifier from BlockFix inherits Modification from BRepTools
+class SphereSpaceModifier from BlockFix inherits Modification from BRepTools
---Purpose: Rotation of the parametric space of the sphere in order
-- to avoid the seam and degenerared edge within it
uses
- Vertex from TopoDS,
+ Vertex from TopoDS,
Edge from TopoDS,
Face from TopoDS,
Location from TopLoc,
DataMapOfShapeInteger from TopTools
is
-
+
Create returns mutable SphereSpaceModifier from BlockFix;
-
+
SetTolerance(me: mutable; Toler: Real);
---Purpose: Sets the tolerance for recognition of geometry
-- the new tolerance. Otherwise, returns
-- Standard_False, and <S>, <L>, <Tol> are not
-- significant.
-
+
NewCurve(me: mutable; E : Edge from TopoDS;
C : out Curve from Geom;
L : out Location from TopLoc;
-- curve on surface on the face <F>.In this case, <C>
-- is the new geometric support of the edge, <L> the
-- new location, <Tol> the new tolerance.
- --
+ --
-- Otherwise, returns Standard_False, and <C>, <L>,
-- <Tol> are not significant.
- --
+ --
-- <NewE> is the new edge created from <E>. <NewF>
-- is the new face created from <F>. They may be usefull.
returns Shape from GeomAbs;
---Purpose: Returns the continuity of <NewE> between <NewF1>
-- and <NewF2>.
- --
+ --
-- <NewE> is the new edge created from <E>. <NewF1>
-- (resp. <NewF2>) is the new face created from <F1>
-- (resp. <F2>).
-
+
ForRotation(me: mutable; F: Face from TopoDS) returns Boolean;
-
-fields
-
+
+fields
+
myTolerance : Real;
myMapOfFaces : DataMapOfShapeInteger from TopTools;
myMapOfSpheres: IndexedMapOfTransient from TColStd;
//=======================================================================
//function : BlockFix_SphereSpaceModifier
-//purpose :
+//purpose :
//=======================================================================
BlockFix_SphereSpaceModifier::BlockFix_SphereSpaceModifier()
//=======================================================================
//function : SetTolerance
-//purpose :
+//purpose :
//=======================================================================
void BlockFix_SphereSpaceModifier::SetTolerance(const Standard_Real Tol)
//=======================================================================
//function : NewSurface
-//purpose :
+//purpose :
//=======================================================================
{
Handle(Geom_Surface) S = aSurface;
if(S->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
- Handle(Geom_RectangularTrimmedSurface) RTS =
+ Handle(Geom_RectangularTrimmedSurface) RTS =
Handle(Geom_RectangularTrimmedSurface)::DownCast(S);
S = RTS->BasisSurface();
}
-
+
if(S->IsKind(STANDARD_TYPE(Geom_SphericalSurface))) {
Standard_Real Umin, Umax, Vmin, Vmax;
ShapeAnalysis::GetFaceUVBounds(aFace,Umin, Umax, Vmin, Vmax);
}
return Standard_False;
}
-
+
Standard_Boolean BlockFix_SphereSpaceModifier::NewSurface(const TopoDS_Face& F,
Handle(Geom_Surface)& S,
TopLoc_Location& L,Standard_Real& Tol,
Standard_Boolean& RevWires,
- Standard_Boolean& RevFace)
+ Standard_Boolean& RevFace)
{
TopLoc_Location LS;
Handle(Geom_Surface) SIni = BRep_Tool::Surface(F, LS);
-
+
//check if pole of the sphere in the parametric space
if(ModifySurface(F, SIni, S)) {
-
+
RevWires = Standard_False;
RevFace = Standard_False;
-
+
L = LS;
Tol = BRep_Tool::Tolerance(F);
-
+
Standard_Integer anIndex = myMapOfSpheres.Add(S);
myMapOfFaces.Bind(F,anIndex);
return Standard_True;
}
-
+
return Standard_False;
}
//=======================================================================
//function : NewCurve
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve(const TopoDS_Edge& /*E*/,Handle(Geom_Curve)& /*C*/,
- TopLoc_Location& /*L*/,Standard_Real& /*Tol*/)
+ TopLoc_Location& /*L*/,Standard_Real& /*Tol*/)
{
return Standard_False;
}
//=======================================================================
//function : NewPoint
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean BlockFix_SphereSpaceModifier::NewPoint(const TopoDS_Vertex& /*V*/,
gp_Pnt& /*P*/,
- Standard_Real& /*Tol*/)
+ Standard_Real& /*Tol*/)
{
return Standard_False;
}
//=======================================================================
//function : NewCurve2d
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve2d(const TopoDS_Edge& E,const TopoDS_Face& F,
const TopoDS_Edge& /*NewE*/,const TopoDS_Face& /*NewF*/,
- Handle(Geom2d_Curve)& C,Standard_Real& Tol)
+ Handle(Geom2d_Curve)& C,Standard_Real& Tol)
{
//check if undelying surface of the face was modified
if(myMapOfFaces.IsBound(F)) {
Standard_Integer anIndex = myMapOfFaces.Find(F);
-
+
Handle(Geom_Surface) aNewSphere = Handle(Geom_Surface)::DownCast(myMapOfSpheres.FindKey(anIndex));
-
+
Standard_Real f,l;
TopLoc_Location LC, LS;
Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l );
Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS);
-
+
//taking into accound the orientation of the seam
C = BRep_Tool::CurveOnSurface(E,F,f,l);
Tol = BRep_Tool::Tolerance(E);
-
+
BRep_Builder B;
TopoDS_Edge TempE;
B.MakeEdge(TempE);
B.Add(TempE, TopExp::FirstVertex(E));
B.Add(TempE, TopExp::LastVertex(E));
- if(!C3d.IsNull())
+ if(!C3d.IsNull())
B.UpdateEdge(TempE, Handle(Geom_Curve)::DownCast(C3d->Transformed(LC.Transformation())), Precision::Confusion());
B.Range(TempE, f, l);
-
+
Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge;
Handle(Geom_Surface) STemp = Handle(Geom_Surface)::DownCast(aNewSphere->Transformed(LS.Transformation()));
TopLoc_Location LTemp;
LTemp.Identity();
-
+
Standard_Boolean isClosed = BRep_Tool::IsClosed (E, F);
Standard_Real aWorkTol = 2*myTolerance+Tol;
sfe->FixAddPCurve(TempE, STemp, LTemp, isClosed, Max(Precision::Confusion(), aWorkTol));
sfe->FixSameParameter(TempE);
-
+
//keep the orientation of original edge
TempE.Orientation(E.Orientation());
C = BRep_Tool::CurveOnSurface(TempE, STemp, LTemp, f, l);
-
+
// shifting seam of sphere
if(isClosed && !C.IsNull()) {
Standard_Real f2,l2;
- Handle(Geom2d_Curve) c22 =
+ Handle(Geom2d_Curve) c22 =
BRep_Tool::CurveOnSurface(TopoDS::Edge(TempE.Reversed()),STemp, LTemp,f2,l2);
Standard_Real dPreci = Precision::PConfusion()*Precision::PConfusion();
if((C->Value(f).SquareDistance(c22->Value(f2)) < dPreci)
//=======================================================================
//function : NewParameter
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean BlockFix_SphereSpaceModifier::NewParameter(const TopoDS_Vertex& /*V*/,const TopoDS_Edge& /*E*/,
- Standard_Real& /*P*/,Standard_Real& /*Tol*/)
+ Standard_Real& /*P*/,Standard_Real& /*Tol*/)
{
return Standard_False;
}
//=======================================================================
//function : Continuity
-//purpose :
+//purpose :
//=======================================================================
GeomAbs_Shape BlockFix_SphereSpaceModifier::Continuity(const TopoDS_Edge& E,const TopoDS_Face& F1,
const TopoDS_Face& F2,const TopoDS_Edge& /*NewE*/,
- const TopoDS_Face& /*NewF1*/,const TopoDS_Face& /*NewF2*/)
+ const TopoDS_Face& /*NewF1*/,const TopoDS_Face& /*NewF2*/)
{
return BRep_Tool::Continuity(E,F1,F2);
}
public:
- void* operator new(size_t,void* anAddress)
+ void* operator new(size_t,void* anAddress)
{
return anAddress;
}
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
+ void* operator new(size_t size)
+ {
+ return Standard::Allocate(size);
}
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
+ void operator delete(void *anAddress)
+ {
+ if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC
- //
+ //
Standard_EXPORT BlockFix_SphereSpaceModifier();
Standard_EXPORT void SetTolerance(const Standard_Real Toler) ;
Standard_EXPORT Standard_Boolean NewSurface(const TopoDS_Face& F,Handle(Geom_Surface)& S,TopLoc_Location& L,Standard_Real& Tol,Standard_Boolean& RevWires,Standard_Boolean& RevFace) ;
protected:
// Methods PROTECTED
- //
+ //
// Fields PROTECTED
//
-private:
+private:
// Methods PRIVATE
- //
+ //
// Fields PRIVATE
#endif
BlockFix_SphereSpaceModifier::~BlockFix_SphereSpaceModifier() {}
-
+
Standard_EXPORT Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_()
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
+
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_SphereSpaceModifier",
// DownCast method
// allow safe downcasting
//
-const Handle(BlockFix_SphereSpaceModifier) Handle(BlockFix_SphereSpaceModifier)::DownCast(const Handle(Standard_Transient)& AnObject)
+const Handle(BlockFix_SphereSpaceModifier) Handle(BlockFix_SphereSpaceModifier)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(BlockFix_SphereSpaceModifier) _anOtherObject;
return _anOtherObject ;
}
-const Handle(Standard_Type)& BlockFix_SphereSpaceModifier::DynamicType() const
-{
- return STANDARD_TYPE(BlockFix_SphereSpaceModifier) ;
+const Handle(Standard_Type)& BlockFix_SphereSpaceModifier::DynamicType() const
+{
+ return STANDARD_TYPE(BlockFix_SphereSpaceModifier) ;
}
-Standard_Boolean BlockFix_SphereSpaceModifier::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(BlockFix_SphereSpaceModifier) == AType || BRepTools_Modification::IsKind(AType));
+Standard_Boolean BlockFix_SphereSpaceModifier::IsKind(const Handle(Standard_Type)& AType) const
+{
+ return (STANDARD_TYPE(BlockFix_SphereSpaceModifier) == AType || BRepTools_Modification::IsKind(AType));
}
Handle_BlockFix_SphereSpaceModifier::~Handle_BlockFix_SphereSpaceModifier() {}
--
class UnionEdges from BlockFix
- ---Purpose:
-
+ ---Purpose:
+
uses
-
+
Shape from TopoDS,
ReShape from ShapeBuild
is
Create returns UnionEdges from BlockFix;
-
+
Perform(me: in out; Shape: Shape from TopoDS;
Tol : Real)
- returns Shape from TopoDS;
-
+ returns Shape from TopoDS;
+
fields
myTolerance : Real;
myContext : ReShape from ShapeBuild;
-
+
end UnionEdges;
// 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: BlockFix_UnionEdges.cxx
// Created: 07.12.04 15:27:30
#include <BlockFix_UnionEdges.ixx>
-#include <Approx_Curve3d.hxx>
-#include <BRepAdaptor_HCompCurve.hxx>
-#include <BRep_Builder.hxx>
-#include <BRep_Tool.hxx>
-#include <GC_MakeCircle.hxx>
-#include <Geom_BSplineCurve.hxx>
-#include <Geom_Circle.hxx>
-#include <Geom_Curve.hxx>
-#include <Geom_Line.hxx>
-#include <Geom_TrimmedCurve.hxx>
#include <ShapeAnalysis_Edge.hxx>
+
#include <ShapeFix_Edge.hxx>
#include <ShapeFix_Face.hxx>
#include <ShapeFix_Shell.hxx>
-#include <TColgp_SequenceOfPnt.hxx>
-#include <TColStd_MapOfInteger.hxx>
+
+#include <BRep_Builder.hxx>
+#include <BRep_CurveRepresentation.hxx>
+#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
+#include <BRep_TEdge.hxx>
+#include <BRep_Tool.hxx>
+#include <BRepAdaptor_HCompCurve.hxx>
+#include <BRepLib.hxx>
+#include <BRepLib_MakeEdge.hxx>
+
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
+
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
+
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Iterator.hxx>
+#include <Approx_Curve3d.hxx>
+
+#include <GC_MakeCircle.hxx>
+
+#include <Geom_BSplineCurve.hxx>
+#include <Geom_Circle.hxx>
+#include <Geom_Curve.hxx>
+#include <Geom_Line.hxx>
+#include <Geom_TrimmedCurve.hxx>
+#include <GeomConvert.hxx>
+#include <GeomConvert_CompCurveToBSplineCurve.hxx>
+
+#include <Geom2dConvert.hxx>
+#include <Geom2dConvert_CompCurveToBSplineCurve.hxx>
+#include <Geom2d_TrimmedCurve.hxx>
+#include <Geom2d_BSplineCurve.hxx>
+
+#include <TColGeom_SequenceOfSurface.hxx>
+#include <TColGeom_Array1OfBSplineCurve.hxx>
+#include <TColGeom_HArray1OfBSplineCurve.hxx>
+#include <TColGeom2d_Array1OfBSplineCurve.hxx>
+#include <TColGeom2d_HArray1OfBSplineCurve.hxx>
+#include <TColGeom2d_SequenceOfBoundedCurve.hxx>
+#include <TColgp_SequenceOfPnt.hxx>
+#include <TColStd_Array1OfReal.hxx>
+#include <TColStd_MapOfInteger.hxx>
+
#include "utilities.h"
//=======================================================================
//function : BlockFix_UnionEdges()
//purpose : Constructor
//=======================================================================
-
BlockFix_UnionEdges::BlockFix_UnionEdges ( )
{
}
+//=======================================================================
+//function : GlueEdgesWithPCurves
+//purpose : Glues the pcurves of the sequence of edges
+// and glues their 3d curves
+//=======================================================================
+static TopoDS_Edge GlueEdgesWithPCurves(const TopTools_SequenceOfShape& aChain,
+ const TopoDS_Vertex& FirstVertex,
+ const TopoDS_Vertex& LastVertex)
+{
+ Standard_Integer i, j;
+
+ TopoDS_Edge FirstEdge = TopoDS::Edge(aChain(1));
+ //TColGeom2d_SequenceOfCurve PCurveSeq;
+ TColGeom_SequenceOfSurface SurfSeq;
+ //TopTools_SequenceOfShape LocSeq;
+
+ BRep_ListIteratorOfListOfCurveRepresentation itr( (Handle(BRep_TEdge)::DownCast(FirstEdge.TShape()))->Curves() );
+ for (; itr.More(); itr.Next())
+ {
+ Handle(BRep_CurveRepresentation) CurveRep = itr.Value();
+ if (CurveRep->IsCurveOnSurface())
+ {
+ //PCurveSeq.Append(CurveRep->PCurve());
+ SurfSeq.Append(CurveRep->Surface());
+ /*
+ TopoDS_Shape aLocShape;
+ aLocShape.Location(CurveRep->Location());
+ LocSeq.Append(aLocShape);
+ */
+ }
+ }
+
+ Standard_Real fpar, lpar;
+ BRep_Tool::Range(FirstEdge, fpar, lpar);
+ TopoDS_Edge PrevEdge = FirstEdge;
+ TopoDS_Vertex CV;
+ Standard_Real MaxTol = 0.;
+
+ TopoDS_Edge ResEdge;
+ BRep_Builder BB;
+
+ Standard_Integer nb_curve = aChain.Length(); //number of curves
+ TColGeom_Array1OfBSplineCurve tab_c3d(0,nb_curve-1); //array of the curves
+ TColStd_Array1OfReal tabtolvertex(0,nb_curve-1); //(0,nb_curve-2); //array of the tolerances
+
+ TopoDS_Vertex PrevVertex = FirstVertex;
+ for (i = 1; i <= nb_curve; i++)
+ {
+ TopoDS_Edge anEdge = TopoDS::Edge(aChain(i));
+ TopoDS_Vertex VF, VL;
+ TopExp::Vertices(anEdge, VF, VL);
+ Standard_Boolean ToReverse = (!VF.IsSame(PrevVertex));
+
+ Standard_Real Tol1 = BRep_Tool::Tolerance(VF);
+ Standard_Real Tol2 = BRep_Tool::Tolerance(VL);
+ if (Tol1 > MaxTol)
+ MaxTol = Tol1;
+ if (Tol2 > MaxTol)
+ MaxTol = Tol2;
+
+ if (i > 1)
+ {
+ TopExp::CommonVertex(PrevEdge, anEdge, CV);
+ Standard_Real Tol = BRep_Tool::Tolerance(CV);
+ tabtolvertex(i-2) = Tol;
+ }
+
+ Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar);
+ Handle(Geom_TrimmedCurve) aTrCurve = new Geom_TrimmedCurve(aCurve, fpar, lpar);
+ tab_c3d(i-1) = GeomConvert::CurveToBSplineCurve(aTrCurve);
+ GeomConvert::C0BSplineToC1BSplineCurve(tab_c3d(i-1), Precision::Confusion());
+ if (ToReverse)
+ tab_c3d(i-1)->Reverse();
+ PrevVertex = (ToReverse)? VF : VL;
+ PrevEdge = anEdge;
+ }
+ Handle(TColGeom_HArray1OfBSplineCurve) concatcurve; //array of the concatenated curves
+ Handle(TColStd_HArray1OfInteger) ArrayOfIndices; //array of the remining Vertex
+ GeomConvert::ConcatC1(tab_c3d,
+ tabtolvertex,
+ ArrayOfIndices,
+ concatcurve,
+ Standard_False,
+ Precision::Confusion()); //C1 concatenation
+
+ if (concatcurve->Length() > 1)
+ {
+ GeomConvert_CompCurveToBSplineCurve Concat(concatcurve->Value(concatcurve->Lower()));
+
+ for (i = concatcurve->Lower()+1; i <= concatcurve->Upper(); i++)
+ Concat.Add( concatcurve->Value(i), MaxTol, Standard_True );
+
+ concatcurve->SetValue(concatcurve->Lower(), Concat.BSplineCurve());
+ }
+ Handle(Geom_BSplineCurve) ResCurve = concatcurve->Value(concatcurve->Lower());
+
+ TColGeom2d_SequenceOfBoundedCurve ResPCurves;
+ TopLoc_Location aLoc;
+ for (j = 1; j <= SurfSeq.Length(); j++)
+ {
+ TColGeom2d_Array1OfBSplineCurve tab_c2d(0,nb_curve-1); //array of the pcurves
+
+ PrevVertex = FirstVertex;
+ PrevEdge = FirstEdge;
+ //TopLoc_Location theLoc = LocSeq(j).Location();
+ for (i = 1; i <= nb_curve; i++)
+ {
+ TopoDS_Edge anEdge = TopoDS::Edge(aChain(i));
+ TopoDS_Vertex VF, VL;
+ TopExp::Vertices(anEdge, VF, VL);
+ Standard_Boolean ToReverse = (!VF.IsSame(PrevVertex));
+
+ /*
+ Handle(Geom2d_Curve) aPCurve =
+ BRep_Tool::CurveOnSurface(anEdge, SurfSeq(j), anEdge.Location()*theLoc, fpar, lpar);
+ */
+ Handle(Geom2d_Curve) aPCurve =
+ BRep_Tool::CurveOnSurface(anEdge, SurfSeq(j), aLoc, fpar, lpar);
+ Handle(Geom2d_TrimmedCurve) aTrPCurve = new Geom2d_TrimmedCurve(aPCurve, fpar, lpar);
+ tab_c2d(i-1) = Geom2dConvert::CurveToBSplineCurve(aTrPCurve);
+ Geom2dConvert::C0BSplineToC1BSplineCurve(tab_c2d(i-1), Precision::Confusion());
+ if (ToReverse)
+ tab_c2d(i-1)->Reverse();
+ PrevVertex = (ToReverse)? VF : VL;
+ PrevEdge = anEdge;
+ }
+ Handle(TColGeom2d_HArray1OfBSplineCurve) concatc2d; //array of the concatenated curves
+ Handle(TColStd_HArray1OfInteger) ArrayOfInd2d; //array of the remining Vertex
+ Geom2dConvert::ConcatC1(tab_c2d,
+ tabtolvertex,
+ ArrayOfInd2d,
+ concatc2d,
+ Standard_False,
+ Precision::Confusion()); //C1 concatenation
+
+ if (concatc2d->Length() > 1)
+ {
+ Geom2dConvert_CompCurveToBSplineCurve Concat2d(concatc2d->Value(concatc2d->Lower()));
+
+ for (i = concatc2d->Lower()+1; i <= concatc2d->Upper(); i++)
+ Concat2d.Add( concatc2d->Value(i), MaxTol, Standard_True );
+
+ concatc2d->SetValue(concatc2d->Lower(), Concat2d.BSplineCurve());
+ }
+ Handle(Geom2d_BSplineCurve) aResPCurve = concatc2d->Value(concatc2d->Lower());
+ ResPCurves.Append(aResPCurve);
+ }
+
+ ResEdge = BRepLib_MakeEdge(ResCurve,
+ FirstVertex, LastVertex,
+ ResCurve->FirstParameter(), ResCurve->LastParameter());
+ BB.SameRange(ResEdge, Standard_False);
+ BB.SameParameter(ResEdge, Standard_False);
+ for (j = 1; j <= ResPCurves.Length(); j++)
+ {
+ BB.UpdateEdge(ResEdge, ResPCurves(j), SurfSeq(j), aLoc, MaxTol);
+ BB.Range(ResEdge, SurfSeq(j), aLoc, ResPCurves(j)->FirstParameter(), ResPCurves(j)->LastParameter());
+ }
+
+ BRepLib::SameParameter(ResEdge, MaxTol, Standard_True);
+
+ return ResEdge;
+}
//=======================================================================
//function : MergeEdges
Handle(Geom_Line) L2 = Handle(Geom_Line)::DownCast(c3d2);
gp_Dir Dir1 = L1->Position().Direction();
gp_Dir Dir2 = L2->Position().Direction();
- //if(!Dir1.IsEqual(Dir2,Precision::Angular())) {
- //if(!Dir1.IsParallel(Dir2,Precision::Angular())) {
- if(!Dir1.IsParallel(Dir2,Tol)) {
+ //if(!Dir1.IsEqual(Dir2,Precision::Angular())) {
+ //if(!Dir1.IsParallel(Dir2,Precision::Angular())) {
+ if(!Dir1.IsParallel(Dir2,Tol)) {
continue;
}
// can union lines => create new edge
}
if(NeedUnion) {
MESSAGE ("can not make analitical union => make approximation");
+ TopoDS_Edge E = GlueEdgesWithPCurves(aChain, VF, VL);
+ /*
TopoDS_Wire W;
B.MakeWire(W);
for(j=1; j<=aChain.Length(); j++) {
B.MakeEdge (E,bc,Precision::Confusion());
B.Add (E,VF);
B.Add (E,VL);
+ */
aChain.SetValue(1,E);
}
else {
return Standard_True;
}
-
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
-
TopoDS_Shape BlockFix_UnionEdges::Perform(const TopoDS_Shape& Shape,
const Standard_Real Tol)
{
public:
- void* operator new(size_t,void* anAddress)
+ void* operator new(size_t,void* anAddress)
{
return anAddress;
}
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
+ void* operator new(size_t size)
+ {
+ return Standard::Allocate(size);
}
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
+ void operator delete(void *anAddress)
+ {
+ if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC
- //
+ //
Standard_EXPORT BlockFix_UnionEdges();
Standard_EXPORT TopoDS_Shape Perform(const TopoDS_Shape& Shape,const Standard_Real Tol) ;
protected:
// Methods PROTECTED
- //
+ //
// Fields PROTECTED
//
-private:
+private:
// Methods PRIVATE
- //
+ //
// Fields PRIVATE
#include <BlockFix_UnionEdges.jxx>
-
+
Create returns UnionFaces from BlockFix;
---Purpose: Empty constructor
-
+
GetTolerance(me: in out) returns Real;
---Purpose: Returns modifiable tolerance
- ---C++: return&
-
+ ---C++: return&
+
Perform (me: in out; Shape: Shape from TopoDS) returns Shape from TopoDS;
---Purpose: Performs the unification of the fsces
-- whith the same geometry
-
+
IsSameDomain(me; aFace : Face from TopoDS;
aChekedFace: Face from TopoDS)
returns Boolean is virtual;
---Purpose: Returns true is surfaces have same geometrically domain
-- with given tolerance
-
+
MovePCurves(me; aTarget: in out Face from TopoDS;
aSource: Face from TopoDS)
is virtual;
- ---Purpose: Creates pcurves on aTarget face for each edge from
+ ---Purpose: Creates pcurves on aTarget face for each edge from
-- aSource one.
fields
myTolerance: Real;
-
+
end;
-
+
class BlockFix_UnionFaces
{
public:
- void* operator new(size_t,void* anAddress)
+ void* operator new(size_t,void* anAddress)
{
return anAddress;
}
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
+ void* operator new(size_t size)
+ {
+ return Standard::Allocate(size);
}
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
+ void operator delete(void *anAddress)
+ {
+ if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC
- //
+ //
Standard_EXPORT BlockFix_UnionFaces();
Standard_EXPORT Standard_Real& GetTolerance();
Standard_EXPORT virtual void MovePCurves(TopoDS_Face& aTarget,
const TopoDS_Face& aSource) const;
-private:
+private:
// Fields PRIVATE
//
Standard_Real myTolerance;
#include <BlockFix_UnionFaces.jxx>
-
+
--- /dev/null
+GEOMAlgo_Builder_0.cxx
+GEOMAlgo_Builder_1.cxx
+GEOMAlgo_Builder_2.cxx
+GEOMAlgo_Builder_3.cxx
+GEOMAlgo_Builder_4.cxx
+GEOMAlgo_ShapeInfoFiller_1.cxx
+GEOMAlgo_Tools_1.cxx
+
+GEOMAlgo_Gluer2.hxx
+GEOMAlgo_Gluer2.cxx
+GEOMAlgo_Gluer2_1.cxx
+GEOMAlgo_Gluer2_2.cxx
+GEOMAlgo_Gluer2_3.cxx
+
+GEOMAlgo_GluerAlgo.hxx
+GEOMAlgo_GluerAlgo.cxx
+
+GEOMAlgo_GlueDetector.hxx
+GEOMAlgo_GlueDetector.cxx
+
+GEOMAlgo_GetInPlace.hxx
+GEOMAlgo_GetInPlace.cxx
+GEOMAlgo_GetInPlace_1.cxx
+GEOMAlgo_GetInPlace_2.cxx
+GEOMAlgo_GetInPlace_3.cxx
+
+GEOMAlgo_FinderShapeOnQuad.hxx
+GEOMAlgo_FinderShapeOnQuad.cxx
+
+GEOMAlgo_WireSplitter.hxx
+GEOMAlgo_WireSplitter.cxx
+GEOMAlgo_WESScaler.hxx
+GEOMAlgo_WESScaler.cxx
+GEOMAlgo_WESCorrector.hxx
+GEOMAlgo_WESCorrector.cxx
+GEOMAlgo_WireEdgeSet.hxx
+GEOMAlgo_WireEdgeSet.cxx
+GEOMAlgo_GlueAnalyser.hxx
+GEOMAlgo_GlueAnalyser.cxx
+GEOMAlgo_Gluer.hxx
+GEOMAlgo_Gluer.cxx
+GEOMAlgo_FinderShapeOn2.hxx
+GEOMAlgo_FinderShapeOn2.cxx
+GEOMAlgo_FinderShapeOn1.hxx
+GEOMAlgo_FinderShapeOn1.cxx
+GEOMAlgo_FinderShapeOn.hxx
+GEOMAlgo_FinderShapeOn.cxx
+GEOMAlgo_ShapeAlgo.hxx
+GEOMAlgo_ShapeAlgo.cxx
+GEOMAlgo_SolidSolid.hxx
+GEOMAlgo_SolidSolid.cxx
+GEOMAlgo_ShellSolid.hxx
+GEOMAlgo_ShellSolid.cxx
+GEOMAlgo_VertexSolid.hxx
+GEOMAlgo_VertexSolid.cxx
+GEOMAlgo_WireSolid.hxx
+GEOMAlgo_WireSolid.cxx
+GEOMAlgo_ShapeSolid.hxx
+GEOMAlgo_ShapeSolid.cxx
+GEOMAlgo_Splitter.hxx
+GEOMAlgo_Splitter.cxx
+GEOMAlgo_Builder.hxx
+GEOMAlgo_Builder.cxx
+GEOMAlgo_BuilderShape.hxx
+GEOMAlgo_BuilderShape.cxx
+GEOMAlgo_BuilderArea.hxx
+GEOMAlgo_BuilderArea.cxx
+GEOMAlgo_BuilderFace.hxx
+GEOMAlgo_BuilderFace.cxx
+GEOMAlgo_BuilderSolid.hxx
+GEOMAlgo_BuilderSolid.cxx
+GEOMAlgo_ShapeInfoFiller.hxx
+GEOMAlgo_ShapeInfoFiller.cxx
+GEOMAlgo_Algo.hxx
+GEOMAlgo_Algo.cxx
+GEOMAlgo_ShapeSet.hxx
+GEOMAlgo_ShapeSet.cxx
+GEOMAlgo_SurfaceTools.hxx
+GEOMAlgo_SurfaceTools.cxx
+GEOMAlgo_State.hxx
+GEOMAlgo_KindOfBounds.hxx
+GEOMAlgo_KindOfClosed.hxx
+GEOMAlgo_KindOfName.hxx
+GEOMAlgo_KindOfShape.hxx
+GEOMAlgo_ShapeInfo.hxx
+GEOMAlgo_ShapeInfo.cxx
+GEOMAlgo_CoupleOfShapes.hxx
+GEOMAlgo_CoupleOfShapes.cxx
+GEOMAlgo_BuilderTools.hxx
+GEOMAlgo_BuilderTools.cxx
+GEOMAlgo_Tools3D.hxx
+GEOMAlgo_Tools3D.cxx
+GEOMAlgo_Tools.hxx
+GEOMAlgo_Tools.cxx
+GEOMAlgo_PWireEdgeSet.hxx
+GEOMAlgo_StateCollector.cxx
+GEOMAlgo_StateCollector.hxx
+GEOMAlgo_PassKey.hxx
+GEOMAlgo_PassKey.cxx
+GEOMAlgo_PassKeyMapHasher.hxx
+GEOMAlgo_PassKeyMapHasher.cxx
+GEOMAlgo_PassKeyShape.hxx
+GEOMAlgo_PassKeyShape.cxx
+GEOMAlgo_PassKeyShapeMapHasher.hxx
+GEOMAlgo_PassKeyShapeMapHasher.cxx
+GEOMAlgo_ClsfBox.hxx
+GEOMAlgo_ClsfBox.cxx
+GEOMAlgo_ClsfSolid.hxx
+GEOMAlgo_ClsfSolid.cxx
+GEOMAlgo_ClsfSurf.hxx
+GEOMAlgo_ClsfSurf.cxx
+GEOMAlgo_Clsf.hxx
+GEOMAlgo_Clsf.cxx
+GEOMAlgo_HAlgo.hxx
+GEOMAlgo_HAlgo.cxx
+
+GEOMAlgo_ListOfCoupleOfShapes.hxx
+GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx
+GEOMAlgo_ListOfPnt.hxx
+GEOMAlgo_ListIteratorOfListOfPnt.hxx
+GEOMAlgo_DataMapOfShapeShapeSet.hxx
+GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx
+GEOMAlgo_DataMapOfShapeReal.hxx
+GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx
+GEOMAlgo_DataMapOfRealListOfShape.hxx
+GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx
+GEOMAlgo_DataMapOfPassKeyInteger.hxx
+GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx
+GEOMAlgo_DataMapOfPassKeyShapeShape.hxx
+GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx
+GEOMAlgo_DataMapOfOrientedShapeShape.hxx
+GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx
+GEOMAlgo_DataMapOfShapeMapOfShape.hxx
+GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx
+GEOMAlgo_DataMapOfShapePnt.hxx
+GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx
+GEOMAlgo_IndexedDataMapOfShapeBox.hxx
+
+GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx
+GEOMAlgo_IndexedDataMapOfShapeState.hxx
+GEOMAlgo_IndexedDataMapOfIntegerShape.hxx
+GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-- Created: Sat Dec 04 12:36:22 2004
-- Author: Peter KURNEV
-package GEOMAlgo
+package GEOMAlgo
- ---Purpose:
+ ---Purpose:
-uses
- TCollection,
-
- TColgp,
- Geom,
- Bnd,
- gp,
+uses
+ TCollection,
+
+ TColgp,
+ Geom,
+ Bnd,
+ gp,
GeomAdaptor,
TopAbs,
- TopoDS,
- TopTools,
- IntTools,
- BOPTools,
- BOP,
-
- TColStd,
- BOPTColStd,
- BRepAlgo,
- NMTDS,
- NMTTools
-
-is
+ TopoDS,
+ TopTools,
+ IntTools,
+ BOPTools,
+ BOP,
+
+ TColStd,
+ BOPTColStd,
+ BRepAlgo,
+ NMTDS,
+ NMTTools
+
+is
+ -- Enumerations
+ imported State from GEOMAlgo;
+ imported KindOfShape from GEOMAlgo;
+ imported KindOfName from GEOMAlgo;
+ imported KindOfBounds from GEOMAlgo;
+ imported KindOfClosed from GEOMAlgo;
+ --
+ -- Gluer / GetInPlace
+ imported Gluer2 from GEOMAlgo;
+ imported GlueDetector from GEOMAlgo;
+ imported GluerAlgo from GEOMAlgo;
+ imported GetInPlace from GEOMAlgo;
+ -- Algos
+ imported WireSplitter from GEOMAlgo;
+ imported WESScaler from GEOMAlgo;
+ imported WESCorrector from GEOMAlgo;
+ imported WireEdgeSet from GEOMAlgo;
+ imported GlueAnalyser from GEOMAlgo;
+ imported Gluer from GEOMAlgo;
+ imported FinderShapeOn2 from GEOMAlgo;
+ imported FinderShapeOn1 from GEOMAlgo;
+ imported FinderShapeOn from GEOMAlgo;
+ imported ShapeAlgo from GEOMAlgo;
+ imported SolidSolid from GEOMAlgo;
+ imported ShellSolid from GEOMAlgo;
+ imported VertexSolid from GEOMAlgo;
+ imported WireSolid from GEOMAlgo;
+ imported ShapeSolid from GEOMAlgo;
+ imported Splitter from GEOMAlgo;
+ imported Builder from GEOMAlgo;
+ imported BuilderShape from GEOMAlgo;
+ imported BuilderSolid from GEOMAlgo;
+ imported BuilderFace from GEOMAlgo;
+ imported BuilderArea from GEOMAlgo;
+ imported ShapeInfoFiller from GEOMAlgo;
+ imported Algo from GEOMAlgo;
+ -- Data / Tools
+ imported ShapeSet from GEOMAlgo;
+ imported SurfaceTools from GEOMAlgo;
+ imported ShapeInfo from GEOMAlgo;
+ imported CoupleOfShapes from GEOMAlgo;
+ imported BuilderTools from GEOMAlgo;
+ imported Tools3D from GEOMAlgo;
+ imported Tools from GEOMAlgo;
+ imported PWireEdgeSet from GEOMAlgo;
+ imported StateCollector from GEOMAlgo;
+ imported PassKey from GEOMAlgo;
+ imported PassKeyMapHasher from GEOMAlgo;
+ imported PassKeyShape from GEOMAlgo;
+ imported PassKeyShapeMapHasher from GEOMAlgo;
+ imported ClsfBox from GEOMAlgo;
+ imported ClsfSurf from GEOMAlgo;
+ imported ClsfSolid from GEOMAlgo;
+ imported Clsf from GEOMAlgo;
+ imported HAlgo from GEOMAlgo;
+
+ imported ListOfCoupleOfShapes from GEOMAlgo;
+ imported ListIteratorOfListOfCoupleOfShapes from GEOMAlgo;
+ imported ListOfPnt from GEOMAlgo;
+ imported ListIteratorOfListOfPnt from GEOMAlgo;
+ imported DataMapOfShapeShapeSet from GEOMAlgo;
+ imported DataMapIteratorOfDataMapOfShapeShapeSet from GEOMAlgo;
+ imported DataMapOfShapeReal from GEOMAlgo;
+ imported DataMapIteratorOfDataMapOfShapeReal from GEOMAlgo;
+ imported DataMapOfRealListOfShape from GEOMAlgo;
+ imported DataMapIteratorOfDataMapOfRealListOfShape from GEOMAlgo;
+ imported DataMapOfPassKeyInteger from GEOMAlgo;
+ imported DataMapIteratorOfDataMapOfPassKeyInteger from GEOMAlgo;
+ imported DataMapOfPassKeyShapeShape from GEOMAlgo;
+ imported DataMapIteratorOfDataMapOfPassKeyShapeShape from GEOMAlgo;
+ imported DataMapOfOrientedShapeShape from GEOMAlgo;
+ imported DataMapIteratorOfDataMapOfOrientedShapeShape from GEOMAlgo;
+ imported DataMapOfShapeMapOfShape from GEOMAlgo;
+ imported DataMapIteratorOfDataMapOfShapeMapOfShape from GEOMAlgo;
+ imported DataMapOfShapePnt from GEOMAlgo;
+ imported DataMapIteratorOfDataMapOfShapePnt from GEOMAlgo;
+ imported IndexedDataMapOfShapeBox from GEOMAlgo;
+ imported IndexedDataMapOfShapeShapeInfo from GEOMAlgo;
+ imported IndexedDataMapOfShapeState from GEOMAlgo;
+ imported IndexedDataMapOfIntegerShape from GEOMAlgo;
+ imported IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo;
+
+
+ -- Instantiations
+
+ --class ListOfCoupleOfShapes
+ -- instantiates List from TCollection (CoupleOfShapes from GEOMAlgo);
+
+ --class ListOfPnt
+ -- instantiates List from TCollection (Pnt from gp);
+ --
+
+ --class DataMapOfShapeShapeSet instantiates
+ -- DataMap from TCollection(Shape from TopoDS,
+ -- ShapeSet from GEOMAlgo,
+ -- ShapeMapHasher from TopTools);
+
+ --class DataMapOfShapeReal instantiates
+ -- DataMap from TCollection(Shape from TopoDS,
+ -- Real from Standard,
+ -- ShapeMapHasher from TopTools);
+
+
+ --class DataMapOfRealListOfShape instantiates
+ -- DataMap from TCollection(Real from Standard,
+ -- ListOfShape from TopTools,
+ -- MapRealHasher from TColStd);
+
+
+ --class DataMapOfPassKeyInteger
+ -- instantiates DataMap from TCollection (PassKey from GEOMAlgo,
+ -- Integer from Standard,
+ -- PassKeyMapHasher from GEOMAlgo);
+
+ --class DataMapOfPassKeyShapeShape
+ -- instantiates DataMap from TCollection (PassKeyShape from GEOMAlgo,
+ -- Shape from TopoDS,
+ -- PassKeyShapeMapHasher from GEOMAlgo);
+
+ --class DataMapOfOrientedShapeShape instantiates
+ -- DataMap from TCollection (Shape from TopoDS,
+ -- Shape from TopoDS,
+ -- OrientedShapeMapHasher from TopTools);
+
+
+ --class DataMapOfShapeMapOfShape instantiates
+ -- DataMap from TCollection (Shape from TopoDS,
+ -- MapOfShape from TopTools,
+ -- ShapeMapHasher from TopTools);
+
+ --class DataMapOfShapePnt instantiates
+ -- DataMap from TCollection (Shape from TopoDS,
+ -- Pnt from gp,
+ -- ShapeMapHasher from TopTools);
+
+ --
+ --class IndexedDataMapOfShapeBox
+ -- instantiates IndexedDataMap from TCollection (Shape from TopoDS,
+-- Box from Bnd,
+-- ShapeMapHasher from TopTools);
+
+-- class IndexedDataMapOfShapeShapeInfo
+-- instantiates IndexedDataMap from TCollection (Shape from TopoDS,
+-- ShapeInfo from GEOMAlgo,
+-- ShapeMapHasher from TopTools);
+-- class IndexedDataMapOfShapeState
+-- instantiates IndexedDataMap from TCollection (Shape from TopoDS,
+-- State from TopAbs,
+-- ShapeMapHasher from TopTools);
+
+
+--
+-- class IndexedDataMapOfIntegerShape
+-- instantiates IndexedDataMap from TCollection (Integer from Standard,
+-- Shape from TopoDS,
+-- MapIntegerHasher from TColStd);
+
+
+-- class IndexedDataMapOfPassKeyShapeListOfShape
+-- instantiates IndexedDataMap from TCollection (PassKeyShape from GEOMAlgo,
+-- ListOfShape from TopTools,
+-- PassKeyShapeMapHasher from GEOMAlgo);
+
+
+
+
+
+
+end GEOMAlgo;
+ --
+ -- enumerations
--
- -- enumerations
+ --enumeration State is
+ -- ST_UNKNOWN,
+-- ST_IN,
+-- ST_OUT,
+-- ST_ON,
+-- ST_ONIN,
+-- ST_ONOUT,
+-- ST_INOUT
+-- end State;
--
- enumeration State is
- ST_UNKNOWN,
- ST_IN,
- ST_OUT,
- ST_ON,
- ST_ONIN,
- ST_ONOUT,
- ST_INOUT
- end State;
+-- enumeration KindOfShape is
+-- KS_UNKNOWN,
+-- KS_SPHERE,
+-- KS_CYLINDER,
+-- KS_BOX,
+-- KS_TORUS,
+-- KS_CONE,
+-- KS_ELLIPSE,
+-- KS_PLANE,
+-- KS_CIRCLE,
+-- KS_LINE,
+-- KS_DEGENERATED
+-- end KindOfShape;
--
- enumeration KindOfShape is
- KS_UNKNOWN,
- KS_SPHERE,
- KS_CYLINDER,
- KS_BOX,
- KS_TORUS,
- KS_CONE,
- KS_ELLIPSE,
- KS_PLANE,
- KS_CIRCLE,
- KS_LINE,
- KS_DEGENERATED
- end KindOfShape;
- --
- enumeration KindOfName is
- KN_UNKNOWN,
- KN_SPHERE,
- KN_CYLINDER,
- KN_TORUS,
- KN_CONE,
- KN_ELLIPSE,
- KN_CIRCLE,
- KN_PLANE,
- KN_LINE,
- KN_BOX,
- KN_SEGMENT,
- KN_ARCCIRCLE,
- KN_POLYGON,
- KN_POLYHEDRON,
- KN_DISKCIRCLE,
- KN_DISKELLIPSE,
- KN_RECTANGLE,
- KN_TRIANGLE,
- KN_QUADRANGLE,
- KN_ARCELLIPSE
- end KindOfName;
+-- enumeration KindOfName is
+-- KN_UNKNOWN,
+-- KN_SPHERE,
+-- KN_CYLINDER,
+-- KN_TORUS,
+-- KN_CONE,
+-- KN_ELLIPSE,
+-- KN_CIRCLE,
+-- KN_PLANE,
+-- KN_LINE,
+-- KN_BOX,
+-- KN_SEGMENT,
+-- KN_ARCCIRCLE,
+-- KN_POLYGON,
+-- KN_POLYHEDRON,
+-- KN_DISKCIRCLE,
+-- KN_DISKELLIPSE,
+-- KN_RECTANGLE,
+-- KN_TRIANGLE,
+-- KN_QUADRANGLE,
+-- KN_ARCELLIPSE
+-- end KindOfName;
--
- enumeration KindOfBounds is
- KB_UNKNOWN,
- KB_TRIMMED,
- KB_INFINITE
- end KindOfBounds;
+ -- enumeration KindOfBounds is
+ -- KB_UNKNOWN,
+-- KB_TRIMMED,
+ -- KB_INFINITE
+-- end KindOfBounds;
--
- enumeration KindOfClosed is
- KC_UNKNOWN,
- KC_CLOSED,
- KC_NOTCLOSED
- end KindOfClosed;
+-- enumeration KindOfClosed is
+-- KC_UNKNOWN,
+-- KC_CLOSED,
+-- KC_NOTCLOSED
+-- end KindOfClosed;
--
- deferred class HAlgo;
- deferred class Clsf;
- class ClsfSurf;
- class ClsfBox;
- --class FinderShapeOn2;
- class PassKeyShapeMapHasher;
- --
- -- classes
- --
- deferred class Algo;
- deferred class ShapeAlgo;
- --
- class ShapeInfo;
- class ShapeInfoFiller;
- --
- -- Gluer / GetInPlace
---modified by NIZNHY-PKV Mon Feb 21 10:07:22 2011f
--- class Gluer1;
- class Gluer;
-
- imported Gluer2 from GEOMAlgo;
- imported GlueDetector from GEOMAlgo;
- imported GluerAlgo from GEOMAlgo;
- imported GetInPlace from GEOMAlgo;
---modified by NIZNHY-PKV Mon Feb 21 10:07:27 2011t
-
- class GlueAnalyser;
-
- class CoupleOfShapes;
- class PassKey;
- class PassKeyMapHasher;
- class PassKeyShape;
- class SurfaceTools;
- class Tools;
- --
- -- finder on
- deferred class ShapeSolid;
- class WireSolid;
- class ShellSolid;
- class VertexSolid;
- class SolidSolid;
- --class FinderShapeOn;
- --
+
+ --deferred class HAlgo;
+ --deferred class Clsf;
+ --class ClsfSurf;
+ --class ClsfBox;
+ --class ClsfSolid;
+
+ --
+ -- classes
+ --
+ --deferred class Algo;
+ --deferred class ShapeAlgo;
+ --
+ --class ShapeInfo;
+ --class ShapeInfoFiller;
+ --class CoupleOfShapes;
+ --class SurfaceTools;
+ --class Tools;
+ --class PassKey;
+ --class PassKeyMapHasher;
+ --class PassKeyShape;
+ --class PassKeyShapeMapHasher;
+ --
+ -- finder on
+ --deferred class ShapeSolid;
+ --class WireSolid;
+ --class ShellSolid;
+ --class VertexSolid;
+ --class SolidSolid;
+ --class StateCollector;
+
+ --
+ --class Gluer;
+ --class GlueAnalyser;
+ --class FinderShapeOn;
--class FinderShapeOn1;
- class StateCollector;
+ --class FinderShapeOn2;
+ --
+ -- Builder/Splitter
+ --deferred class BuilderShape;
+ --class Builder;
+ --class Splitter;
+ --class Tools3D;
+ --class BuilderTools;
+ --class ShapeSet;
+
+ --deferred class BuilderArea;
+ --class BuilderFace;
+ --class BuilderSolid;
- class ClsfSolid;
- -- class FinderShapeOn2;
- -- class PassKeyShapeMapHasher;
+ --class WireSplitter;
+ --class WireEdgeSet;
+ --class WESCorrector;
+ --class WESScaler;
--
- -- Builder/Splitter
- deferred class BuilderShape;
-
- class Builder;
- class Splitter;
- class Tools3D;
- class BuilderTools;
- class ShapeSet;
-
- deferred class BuilderArea;
- class BuilderFace;
- class BuilderSolid;
-
- class WireSplitter;
- class WireEdgeSet;
- class WESCorrector;
- class WESScaler;
- --
-- Pointers
- --
- pointer PWireEdgeSet to WireEdgeSet from GEOMAlgo;
- --
- --
- -- Instantiations
- class DataMapOfShapeShapeSet instantiates
- DataMap from TCollection(Shape from TopoDS,
- ShapeSet from GEOMAlgo,
- ShapeMapHasher from TopTools);
-
- class DataMapOfShapeReal instantiates
- DataMap from TCollection(Shape from TopoDS,
- Real from Standard,
- ShapeMapHasher from TopTools);
-
-
- class DataMapOfRealListOfShape instantiates
- DataMap from TCollection(Real from Standard,
- ListOfShape from TopTools,
- MapRealHasher from TColStd);
--
- -- instantiations
-
-
- class IndexedDataMapOfShapeBox
- instantiates IndexedDataMap from TCollection (Shape from TopoDS,
- Box from Bnd,
- ShapeMapHasher from TopTools);
- class IndexedDataMapOfIntegerShape
- instantiates IndexedDataMap from TCollection (Integer from Standard,
- Shape from TopoDS,
- MapIntegerHasher from TColStd);
-
- class ListOfCoupleOfShapes
- instantiates List from TCollection (CoupleOfShapes from GEOMAlgo);
-
-
- class IndexedDataMapOfShapeState
- instantiates IndexedDataMap from TCollection (Shape from TopoDS,
- State from TopAbs,
- ShapeMapHasher from TopTools);
- class ListOfPnt
- instantiates List from TCollection (Pnt from gp);
-
- class DataMapOfPassKeyInteger
- instantiates DataMap from TCollection (PassKey from GEOMAlgo,
- Integer from Standard,
- PassKeyMapHasher from GEOMAlgo);
-
- class IndexedDataMapOfPassKeyShapeListOfShape
- instantiates IndexedDataMap from TCollection (PassKeyShape from GEOMAlgo,
- ListOfShape from TopTools,
- PassKeyShapeMapHasher from GEOMAlgo);
-
- class IndexedDataMapOfShapeShapeInfo
- instantiates IndexedDataMap from TCollection (Shape from TopoDS,
- ShapeInfo from GEOMAlgo,
- ShapeMapHasher from TopTools);
-
- class DataMapOfPassKeyShapeShape
- instantiates DataMap from TCollection (PassKeyShape from GEOMAlgo,
- Shape from TopoDS,
- PassKeyShapeMapHasher from GEOMAlgo);
-
- class DataMapOfOrientedShapeShape instantiates
- DataMap from TCollection (Shape from TopoDS,
- Shape from TopoDS,
- OrientedShapeMapHasher from TopTools);
-
- --modified by NIZNHY-PKV Thu Apr 28 08:25:36 2011f
- class DataMapOfShapeMapOfShape instantiates
- DataMap from TCollection (Shape from TopoDS,
- MapOfShape from TopTools,
- ShapeMapHasher from TopTools);
- class DataMapOfShapePnt instantiates
- DataMap from TCollection (Shape from TopoDS,
- Pnt from gp,
- ShapeMapHasher from TopTools);
- --modified by NIZNHY-PKV Thu Apr 28 08:25:39 2011t
-
-end GEOMAlgo;
+ --pointer PWireEdgeSet to WireEdgeSet from GEOMAlgo;
+ --
+ --
+++ /dev/null
-# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# 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
-#
-
-TEMPLATE = lib
-TARGET = GEOMAlgo
-DESTDIR = ../../lib
-MOC_DIR = ../../moc
-OBJECTS_DIR = ../../obj/$$TARGET
-
-CASROOT = $$(CASROOT)
-CAS_CPPFLAGS = $${CASROOT}/inc
-
-KERNEL_CXXFLAGS = $$(KERNEL_ROOT_DIR)/include/salome
-
-STDLIB = -lstdc++
-
-CAS_LDPATH = -L$$(CASROOT)/Linux/lib
-
-INCLUDEPATH += $${CAS_CPPFLAGS} $${KERNEL_CXXFLAGS} ../NMTDS ../NMTTools
-
-LIBS += -L$$(GEOM_ROOT_DIR)/lib -lNMTTools $${STDLIB} $${CAS_LDPATH} -lTKBO -lTKShHealing -lTKBool -lTKMesh
-
-CONFIG -= debug release debug_and_release
-CONFIG += qt thread debug dll shared
-
-win32:DEFINES += WIN32
-DEFINES += OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS
-
-HEADERS = BlockFix_BlockFixAPI.hxx
-HEADERS += BlockFix_BlockFixAPI.lxx
-HEADERS += BlockFix_CheckTool.hxx
-HEADERS += Handle_BlockFix_BlockFixAPI.hxx
-HEADERS += GEOMAlgo_Algo.hxx
-HEADERS += GEOMAlgo_BuilderArea.hxx
-HEADERS += GEOMAlgo_BuilderFace.hxx
-HEADERS += GEOMAlgo_Builder.hxx
-HEADERS += GEOMAlgo_BuilderShape.hxx
-HEADERS += GEOMAlgo_BuilderSolid.hxx
-HEADERS += GEOMAlgo_BuilderTools.hxx
-HEADERS += GEOMAlgo_ClsfBox.hxx
-HEADERS += GEOMAlgo_Clsf.hxx
-HEADERS += GEOMAlgo_ClsfSurf.hxx
-HEADERS += GEOMAlgo_CoupleOfShapes.hxx
-HEADERS += GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx
-HEADERS += GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx
-HEADERS += GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx
-HEADERS += GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx
-HEADERS += GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx
-HEADERS += GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx
-HEADERS += GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx
-HEADERS += GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx
-HEADERS += GEOMAlgo_DataMapOfPassKeyInteger.hxx
-HEADERS += GEOMAlgo_DataMapOfRealListOfShape.hxx
-HEADERS += GEOMAlgo_DataMapOfShapeReal.hxx
-HEADERS += GEOMAlgo_DataMapOfShapeShapeSet.hxx
-HEADERS += GEOMAlgo_FinderShapeOn1.hxx
-HEADERS += GEOMAlgo_FinderShapeOn2.hxx
-HEADERS += GEOMAlgo_FinderShapeOn.hxx
-HEADERS += GEOMAlgo_FinderShapeOnQuad.hxx
-HEADERS += GEOMAlgo_GlueAnalyser.hxx
-HEADERS += GEOMAlgo_Gluer.hxx
-HEADERS += GEOMAlgo_HAlgo.hxx
-HEADERS += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx
-HEADERS += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx
-HEADERS += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx
-HEADERS += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx
-HEADERS += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx
-HEADERS += GEOMAlgo_IndexedDataMapOfIntegerShape.hxx
-HEADERS += GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx
-HEADERS += GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx
-HEADERS += GEOMAlgo_IndexedDataMapOfShapeBox.hxx
-HEADERS += GEOMAlgo_IndexedDataMapOfShapeState.hxx
-HEADERS += GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx
-HEADERS += GEOMAlgo_ListIteratorOfListOfPnt.hxx
-HEADERS += GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx
-HEADERS += GEOMAlgo_ListNodeOfListOfPnt.hxx
-HEADERS += GEOMAlgo_ListOfCoupleOfShapes.hxx
-HEADERS += GEOMAlgo_ListOfPnt.hxx
-HEADERS += GEOMAlgo_PassKey.hxx
-HEADERS += GEOMAlgo_PassKeyMapHasher.hxx
-HEADERS += GEOMAlgo_PassKeyShape.hxx
-HEADERS += GEOMAlgo_PassKeyShapeMapHasher.hxx
-HEADERS += GEOMAlgo_PWireEdgeSet.hxx
-HEADERS += GEOMAlgo_ShapeAlgo.hxx
-HEADERS += GEOMAlgo_ShapeSet.hxx
-HEADERS += GEOMAlgo_ShapeSolid.hxx
-HEADERS += GEOMAlgo_ShellSolid.hxx
-HEADERS += GEOMAlgo_SolidSolid.hxx
-HEADERS += GEOMAlgo_Splitter.hxx
-HEADERS += GEOMAlgo_StateCollector.hxx
-HEADERS += GEOMAlgo_State.hxx
-HEADERS += GEOMAlgo_SurfaceTools.hxx
-HEADERS += GEOMAlgo_Tools3D.hxx
-HEADERS += GEOMAlgo_Tools.hxx
-HEADERS += GEOMAlgo_VertexSolid.hxx
-HEADERS += GEOMAlgo_WESCorrector.hxx
-HEADERS += GEOMAlgo_WireEdgeSet.hxx
-HEADERS += GEOMAlgo_WireSolid.hxx
-HEADERS += GEOMAlgo_WireSplitter.hxx
-HEADERS += Handle_GEOMAlgo_ClsfBox.hxx
-HEADERS += Handle_GEOMAlgo_Clsf.hxx
-HEADERS += Handle_GEOMAlgo_ClsfSurf.hxx
-HEADERS += Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx
-HEADERS += Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx
-HEADERS += Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx
-HEADERS += Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx
-HEADERS += Handle_GEOMAlgo_HAlgo.hxx
-HEADERS += Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx
-HEADERS += Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx
-HEADERS += Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx
-HEADERS += Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx
-HEADERS += Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx
-HEADERS += Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx
-HEADERS += Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx
-HEADERS += GEOMAlgo_ClsfSolid.hxx
-HEADERS += GEOMAlgo_ClsfSolid.ixx
-HEADERS += GEOMAlgo_ClsfSolid.jxx
-HEADERS += GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx
-HEADERS += GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx
-HEADERS += GEOMAlgo_DataMapOfPassKeyShapeShape.hxx
-HEADERS += GEOMAlgo_Gluer1.cxx
-HEADERS += GEOMAlgo_Gluer1.hxx
-HEADERS += GEOMAlgo_Gluer1.ixx
-HEADERS += GEOMAlgo_Gluer1.jxx
-HEADERS += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx
-HEADERS += GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx
-HEADERS += GEOMAlgo_KindOfBounds.hxx
-HEADERS += GEOMAlgo_KindOfClosed.hxx
-HEADERS += GEOMAlgo_KindOfName.hxx
-HEADERS += GEOMAlgo_KindOfShape.hxx
-HEADERS += GEOMAlgo_ShapeInfo.hxx
-HEADERS += GEOMAlgo_ShapeInfo.ixx
-HEADERS += GEOMAlgo_ShapeInfo.jxx
-HEADERS += GEOMAlgo_ShapeInfoFiller.hxx
-HEADERS += GEOMAlgo_ShapeInfoFiller.ixx
-HEADERS += GEOMAlgo_ShapeInfoFiller.jxx
-HEADERS += Handle_GEOMAlgo_ClsfSolid.hxx
-HEADERS += Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx
-HEADERS += Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx
-
-SOURCES = BlockFix.cxx
-SOURCES += BlockFix_BlockFixAPI.cxx
-SOURCES += BlockFix_CheckTool.cxx
-SOURCES += BlockFix_PeriodicSurfaceModifier.cxx
-SOURCES += BlockFix_SphereSpaceModifier.cxx
-SOURCES += BlockFix_UnionEdges.cxx
-SOURCES += BlockFix_UnionFaces.cxx
-SOURCES += GEOMAlgo_Algo.cxx
-SOURCES += GEOMAlgo_Builder_0.cxx
-SOURCES += GEOMAlgo_Builder_1.cxx
-SOURCES += GEOMAlgo_Builder_2.cxx
-SOURCES += GEOMAlgo_Builder_3.cxx
-SOURCES += GEOMAlgo_Builder_4.cxx
-SOURCES += GEOMAlgo_BuilderArea.cxx
-SOURCES += GEOMAlgo_Builder.cxx
-SOURCES += GEOMAlgo_BuilderFace.cxx
-SOURCES += GEOMAlgo_BuilderShape.cxx
-SOURCES += GEOMAlgo_BuilderSolid.cxx
-SOURCES += GEOMAlgo_BuilderTools.cxx
-SOURCES += GEOMAlgo_ClsfBox.cxx
-SOURCES += GEOMAlgo_Clsf.cxx
-SOURCES += GEOMAlgo_ClsfSurf.cxx
-SOURCES += GEOMAlgo_CoupleOfShapes.cxx
-SOURCES += GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx
-SOURCES += GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_0.cxx
-SOURCES += GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_0.cxx
-SOURCES += GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_0.cxx
-SOURCES += GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx
-SOURCES += GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_0.cxx
-SOURCES += GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_0.cxx
-SOURCES += GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_0.cxx
-SOURCES += GEOMAlgo_DataMapOfPassKeyInteger_0.cxx
-SOURCES += GEOMAlgo_DataMapOfRealListOfShape_0.cxx
-SOURCES += GEOMAlgo_DataMapOfShapeReal_0.cxx
-SOURCES += GEOMAlgo_DataMapOfShapeShapeSet_0.cxx
-SOURCES += GEOMAlgo_FinderShapeOn1.cxx
-SOURCES += GEOMAlgo_FinderShapeOn2.cxx
-SOURCES += GEOMAlgo_FinderShapeOn.cxx
-SOURCES += GEOMAlgo_FinderShapeOnQuad.cxx
-SOURCES += GEOMAlgo_GlueAnalyser.cxx
-SOURCES += GEOMAlgo_Gluer.cxx
-SOURCES += GEOMAlgo_HAlgo.cxx
-SOURCES += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx
-SOURCES += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx
-SOURCES += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx
-SOURCES += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx
-SOURCES += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx
-SOURCES += GEOMAlgo_IndexedDataMapOfIntegerShape_0.cxx
-SOURCES += GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_0.cxx
-SOURCES += GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx
-SOURCES += GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx
-SOURCES += GEOMAlgo_IndexedDataMapOfShapeState_0.cxx
-SOURCES += GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_0.cxx
-SOURCES += GEOMAlgo_ListIteratorOfListOfPnt_0.cxx
-SOURCES += GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx
-SOURCES += GEOMAlgo_ListNodeOfListOfPnt_0.cxx
-SOURCES += GEOMAlgo_ListOfCoupleOfShapes_0.cxx
-SOURCES += GEOMAlgo_ListOfPnt_0.cxx
-SOURCES += GEOMAlgo_PassKey.cxx
-SOURCES += GEOMAlgo_PassKeyMapHasher.cxx
-SOURCES += GEOMAlgo_PassKeyShape.cxx
-SOURCES += GEOMAlgo_PassKeyShapeMapHasher.cxx
-SOURCES += GEOMAlgo_ShapeAlgo.cxx
-SOURCES += GEOMAlgo_ShapeSet.cxx
-SOURCES += GEOMAlgo_ShapeSolid.cxx
-SOURCES += GEOMAlgo_ShellSolid.cxx
-SOURCES += GEOMAlgo_SolidSolid.cxx
-SOURCES += GEOMAlgo_Splitter.cxx
-SOURCES += GEOMAlgo_StateCollector.cxx
-SOURCES += GEOMAlgo_SurfaceTools.cxx
-SOURCES += GEOMAlgo_Tools3D.cxx
-SOURCES += GEOMAlgo_Tools.cxx
-SOURCES += GEOMAlgo_VertexSolid.cxx
-SOURCES += GEOMAlgo_WESCorrector.cxx
-SOURCES += GEOMAlgo_WireEdgeSet.cxx
-SOURCES += GEOMAlgo_WireSolid.cxx
-SOURCES += GEOMAlgo_WireSplitter.cxx
-SOURCES += GEOMAlgo_ClsfSolid.cxx
-SOURCES += GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_0.cxx
-SOURCES += GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_0.cxx
-SOURCES += GEOMAlgo_DataMapOfPassKeyShapeShape_0.cxx
-SOURCES += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_0.cxx
-SOURCES += GEOMAlgo_ShapeInfoFiller_1.cxx
-SOURCES += GEOMAlgo_IndexedDataMapOfShapeShapeInfo_0.cxx
-SOURCES += GEOMAlgo_ShapeInfo.cxx
-SOURCES += GEOMAlgo_ShapeInfoFiller.cxx
-
-includes.files = $$HEADERS
-includes.path = ../../include
-
-INSTALLS += includes
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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 Algo from GEOMAlgo
-
- ---Purpose:
-
---uses
---raises
-
-is
- Initialize
- returns Algo from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_Algo();"
-
- Perform(me:out)
- is deferred;
-
- CheckData(me:out)
- is virtual protected;
-
- CheckResult(me:out)
- is virtual protected;
-
- ErrorStatus (me)
- returns Integer from Standard;
-
- WarningStatus (me)
- returns Integer from Standard;
-
- ComputeInternalShapes(me : in out; theFlag : Boolean from Standard);
- ---Purpose: Allows to omit of creation of internal shapes (manifold topology).
- -- Needed for the SALOME/TRIPOLI module.
-
-fields
- myErrorStatus : Integer from Standard is protected;
- myWarningStatus : Integer from Standard is protected;
- myComputeInternalShapes : Boolean from Standard is protected;
-
-end Algo;
// Author: Peter KURNEV
// <peter@PREFEX>
//
-#include <GEOMAlgo_Algo.ixx>
+#include <GEOMAlgo_Algo.hxx>
//=======================================================================
-// function:
-// purpose:
+// function:
+// purpose:
//=======================================================================
GEOMAlgo_Algo::GEOMAlgo_Algo()
:
{}
//=======================================================================
// function: ~
-// purpose:
+// purpose:
//=======================================================================
GEOMAlgo_Algo::~GEOMAlgo_Algo()
{
}
//=======================================================================
// function: CheckData
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_Algo::CheckData()
{
}
//=======================================================================
// function: CheckResult
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_Algo::CheckResult()
{
}
//=======================================================================
// function: ErrorStatus
-// purpose:
+// purpose:
//=======================================================================
Standard_Integer GEOMAlgo_Algo::ErrorStatus()const
{
}
//=======================================================================
// function: WarningStatus
-// purpose:
+// purpose:
//=======================================================================
Standard_Integer GEOMAlgo_Algo::WarningStatus()const
{
//=======================================================================
//function : ComputeInternalShapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Algo::ComputeInternalShapes(const Standard_Boolean theFlag)
{
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_Algo.hxx
+// Created: Sat Dec 04 12:39:47 2004
+// Author: Peter KURNEV
+// <peter@PREFEX>
+//
#ifndef _GEOMAlgo_Algo_HeaderFile
#define _GEOMAlgo_Algo_HeaderFile
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_Algo {
-
-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 virtual void Perform() = 0;
-
-
-Standard_EXPORT Standard_Integer ErrorStatus() const;
-
-
-Standard_EXPORT Standard_Integer WarningStatus() const;
+#include <Standard_Integer.hxx>
+#include <Standard_Boolean.hxx>
-Standard_EXPORT void ComputeInternalShapes(const Standard_Boolean theFlag);
+//=======================================================================
+//class : GEOMAlgo_Algo
+//purpose :
+//=======================================================================
+class GEOMAlgo_Algo
+{
+ public:
+ Standard_EXPORT
+ virtual void Perform() = 0;
+ Standard_EXPORT
+ Standard_Integer ErrorStatus() const;
+ Standard_EXPORT
+ Standard_Integer WarningStatus() const;
+ //! Allows to omit of creation of internal shapes (manifold topology). <br>
+ //! Needed for the SALOME/TRIPOLI module. <br>
+ Standard_EXPORT
+ void ComputeInternalShapes(const Standard_Boolean theFlag) ;
protected:
+ Standard_EXPORT
+ GEOMAlgo_Algo();
- // Methods PROTECTED
- //
-
+ Standard_EXPORT
+ virtual ~GEOMAlgo_Algo();
-Standard_EXPORT GEOMAlgo_Algo();
-Standard_EXPORT virtual ~GEOMAlgo_Algo();
+ Standard_EXPORT
+ virtual void CheckData() ;
-
-Standard_EXPORT virtual void CheckData() ;
-
-
-Standard_EXPORT virtual void CheckResult() ;
-
-
- // Fields PROTECTED
- //
-Standard_Integer myErrorStatus;
-Standard_Integer myWarningStatus;
-Standard_Boolean myComputeInternalShapes;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
+ Standard_EXPORT
+ virtual void CheckResult() ;
+ Standard_Integer myErrorStatus;
+ Standard_Integer myWarningStatus;
+ Standard_Boolean myComputeInternalShapes;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Algo.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Algo_HeaderFile
-#include <GEOMAlgo_Algo.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_Builder.cdl
--- Created:
--- Author: Peter KURNEV
---
-class Builder from GEOMAlgo
- inherits BuilderShape from GEOMAlgo
-
- ---Purpose:
-
-uses
- ShapeEnum from TopAbs,
- Shape from TopoDS,
-
- ListOfShape from TopTools,
- IndexedDataMapOfShapeListOfShape from TopTools,
- IndexedDataMapOfShapeShape from TopTools,
- MapOfShape from TopTools,
- Image from BRepAlgo,
-
- PaveFiller from NMTTools,
- PPaveFiller from NMTTools
-
---raises
-
-is
-
- Create
- ---Purpose: Empty constructor
- returns Builder from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_Builder();"
-
- Perform(me:out)
- ---Purpose: Performs calculations
- is redefined;
-
- PerformWithFiller(me:out;
- theDSF: PaveFiller from NMTTools)
- ---Purpose: Performs calculations using prepared PaveFiller
- -- object theDSF
- is virtual;
-
- AddShape (me:out;
- theShape: Shape from TopoDS)
- ---Purpose: Adds argument theShape of the operation
- is virtual;
-
- Clear(me:out)
- ---Purpose: Clears internal fields and arguments
- is virtual;
-
- Shapes(me)
- ---Purpose: Returns the arguments of the operation
- returns ListOfShape from TopTools;
- ---C++: return const &
- --
- -- History support
- --
- Generated (me:out;
- theS : Shape from TopoDS)
- ---Purpose: Returns the list of shapes generated from the
- -- shape theS.
- returns ListOfShape from TopTools
- is redefined;
- ---C++: return const &
-
- Modified (me:out;
- theS : Shape from TopoDS)
- ---Purpose: Returns the list of shapes modified from the shape
- -- theS.
- returns ListOfShape from TopTools
- is redefined;
- ---C++: return const &
-
- IsDeleted (me:out;
- theS : Shape from TopoDS)
- ---Purpose: Returns true if the shape theS has been deleted.
- returns Boolean from Standard
- is redefined;
- --
- -- protected methods
- --
- PerformInternal(me:out;
- theDSF: PaveFiller from NMTTools)
- ---Purpose: Performs calculations using prepared DSFiller
- -- object theDSF
- is virtual protected;
-
- PrepareHistory (me:out)
- ---Purpose: Prepare information for history support
- is redefined protected;
-
- ClearInternals(me:out)
- ---Purpose: Clears internal fields
- is virtual protected;
-
- Prepare(me:out)
- ---Purpose: Provides preparing actions
- is virtual protected;
-
- PostTreat(me:out)
- ---Purpose: Provides post-tratment actions
- is virtual protected;
-
- AddShape1 (me:out;
- theShape: Shape from TopoDS)
- ---Purpose: Append the argument theShape to
- -- typified lists of arguments myShapes1
- is protected;
-
- BuildResult(me:out;
- theType: ShapeEnum from TopAbs)
- ---Purpose: Build the resulting shapes of type theType
- is virtual protected;
-
- -- Vertices
- FillImagesVertices(me:out)
- ---Purpose: Fill Images for vertices
- is protected;
-
- -- Edges
- FillImagesEdges(me:out)
- ---Purpose: Fill Images for edges
- is protected;
- --
- -- Faces
- FillImagesFaces(me:out)
- ---Purpose: Fill Images for faces
- is protected;
-
- FillIn2DParts(me:out)
- ---Purpose: For each interferred face find split edges
- -- that are in 2-D domain of the face
- is protected;
-
- BuildSplitFaces(me:out)
- ---Purpose: Build draft faces
- is protected;
-
- FillSameDomainFaces(me:out)
- ---Purpose: Among draft faces find same domain faces
- is protected;
-
- FillImagesFaces1(me:out)
- ---Purpose: Fill Images for faces
- -- taking into account same domain faces
- is protected;
-
- FillInternalVertices(me:out)
- ---Purpose: Update Images for faces by
- -- internal vertices
- is protected;
- --
- -- Wires, Shells, Compsolids, Compounds
- FillImagesContainers(me:out;
- theType:ShapeEnum from TopAbs)
- ---Purpose: Fill Images for Wires, Shells, Compsolids, Compounds
- is protected;
- --
- -- Solids
- FillImagesSolids(me:out)
- ---Purpose: Fill Images for solids
- is protected;
-
- FillIn3DParts(me:out)
- ---Purpose: For each interferred solid find split faces
- -- that are in 3-D domain of the solid
- is protected;
-
- BuildSplitSolids(me:out)
- ---Purpose: Build draft solids
- is protected;
-
- FillInternalShapes(me:out)
- ---Purpose: Update draft solids by
- -- internal shells, edges, vertices
- is protected;
-
- BuildDraftSolid(me:out;
- theSolid: Shape from TopoDS;
- theDraftSolid: out Shape from TopoDS;
- theInternalFaces: out ListOfShape from TopTools)
- ---Purpose: Build solid theDraftSolid that consists of
- -- non-internal split faces of the solid
- -- theSolid.
- -- All splits of internal faces of
- -- theSolid are in the list: theInternalFaces
- is protected;
- --
- -- debug methods
- --
- AddCompound (me:out;
- theShape: Shape from TopoDS);
- ---Purpose: Adds arguments of the operation as
- -- shapes of upper level of container shape theShape
- Shapes1(me;
- theType: Integer from Standard)
- ---Purpose: Returns list of arguments of type theType
- returns ListOfShape from TopTools;
- ---C++: return const &
-
- Images(me)
- ---Purpose: Returns image shapes
- returns Image from BRepAlgo;
- ---C++: return const &
-
- InParts(me;
- theShape:Shape from TopoDS)
- ---Purpose: Returns split-parts of shapes that have
- -- state IN for the domain of shape theShape
- returns ListOfShape from TopTools;
- ---C++: return const &
-
- -- =====================================================
-
-fields
- myPaveFiller : PPaveFiller from NMTTools is protected;
- myShapes : ListOfShape from TopTools is protected;
- -- Common usage
- myNbTypes : Integer from Standard is protected;
- myMapFence : MapOfShape from TopTools is protected;
- myShapes1 : ListOfShape from TopTools[9] is protected;
- myImages : Image from BRepAlgo is protected;
- myInParts : IndexedDataMapOfShapeListOfShape from TopTools is protected;
-
- -- Faces
- mySplitFaces : Image from BRepAlgo is protected;
- mySameDomainShapes: IndexedDataMapOfShapeShape from TopTools is protected;
- -- solids
- myDraftSolids : IndexedDataMapOfShapeShape from TopTools is protected;
- myEntryPoint : Integer from Standard is protected;
- --
-end Builder;
-
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_Builder.cxx
-// Created:
-// Author: Peter KURNEV
+// Created:
+// Author: Peter KURNEV
//
-#include <GEOMAlgo_Builder.ixx>
+#include <GEOMAlgo_Builder.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <GEOMAlgo_Tools.hxx>
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
GEOMAlgo_Builder::GEOMAlgo_Builder()
:
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_Builder::~GEOMAlgo_Builder()
{
}
//=======================================================================
//function : AddCompound
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Builder::AddCompound(const TopoDS_Shape& theShape)
{
}
//=======================================================================
//function : AddShape
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Builder::AddShape(const TopoDS_Shape& theShape)
{
}
//=======================================================================
//function : Shapes
-//purpose :
+//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_Builder::Shapes()const
{
}
//=======================================================================
//function : Clear
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Builder::Clear()
{
}
//=======================================================================
//function : ClearInternals
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Builder::ClearInternals()
{
}
//=======================================================================
//function : Prepare
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Builder::Prepare()
{
//=======================================================================
//function : AddShape1
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Builder::AddShape1(const TopoDS_Shape& theShape)
{
}
//=======================================================================
//function : BuildResult
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Builder::BuildResult(const TopAbs_ShapeEnum theType)
{
}
//=======================================================================
//function : Perform
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Builder::Perform()
{
}
//=======================================================================
//function : PerformWithFiller
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Builder::PerformWithFiller(const NMTTools_PaveFiller& theDSF)
{
}
//=======================================================================
//function : PerformInternal
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Builder::PerformInternal(const NMTTools_PaveFiller& pPF)
{
if (myErrorStatus) {
return;
}
-
+
BuildResult(TopAbs_EDGE);
if (myErrorStatus) {
return;
if (myErrorStatus) {
return;
}
-
+
BuildResult(TopAbs_WIRE);
if (myErrorStatus) {
return;
}
-
+
// 3.4 Faces
FillImagesFaces();
if (myErrorStatus) {
return;
}
-
+
BuildResult(TopAbs_FACE);
if (myErrorStatus) {
return;
}
// 3.5 Shells
-
+
FillImagesContainers(TopAbs_SHELL);
if (myErrorStatus) {
return;
}
-
+
BuildResult(TopAbs_SHELL);
if (myErrorStatus) {
return;
if (myErrorStatus) {
return;
}
-
+
BuildResult(TopAbs_SOLID);
if (myErrorStatus) {
return;
if (myErrorStatus) {
return;
}
-
+
BuildResult(TopAbs_COMPSOLID);
if (myErrorStatus) {
return;
if (myErrorStatus) {
return;
}
-
+
BuildResult(TopAbs_COMPOUND);
if (myErrorStatus) {
return;
// 4.History
PrepareHistory();
//
- // 5 Post-treatment
+ // 5 Post-treatment
PostTreat();
}
//
-// static
+// static
// void CorrectWires(const TopoDS_Shape& aS);
//
//=======================================================================
//function : PostTreat
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Builder::PostTreat()
{
if (aNbS==1) {
myShape=aLS.First();
}
-
+
BRepLib::SameParameter(myShape, 1.e-7, Standard_True);
//
GEOMAlgo_Tools::CorrectWires(myShape);
}
//
// myErrorStatus
-//
+//
// 0 - Ok
// 1 - The object is just initialized
// 2 - PaveFiller is failed
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
+// File: GEOMAlgo_Builder.cxx
+// Created:
+// Author: Peter KURNEV
+//
#ifndef _GEOMAlgo_Builder_HeaderFile
#define _GEOMAlgo_Builder_HeaderFile
-#ifndef _NMTTools_PPaveFiller_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <NMTTools_PPaveFiller.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
-#endif
-#ifndef _TopTools_MapOfShape_HeaderFile
#include <TopTools_MapOfShape.hxx>
-#endif
-#ifndef _BRepAlgo_Image_HeaderFile
#include <BRepAlgo_Image.hxx>
-#endif
-#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#endif
-#ifndef _TopTools_IndexedDataMapOfShapeShape_HeaderFile
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
-#endif
-#ifndef _GEOMAlgo_BuilderShape_HeaderFile
#include <GEOMAlgo_BuilderShape.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
+#include <NMTTools_PaveFiller.hxx>
#include <Standard_Boolean.hxx>
-#endif
-#ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx>
-#endif
-class NMTTools_PaveFiller;
-class TopoDS_Shape;
-class TopTools_ListOfShape;
-class BRepAlgo_Image;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_Builder : public GEOMAlgo_BuilderShape {
-
-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
- //
-
-//! Empty constructor <br>
-Standard_EXPORT GEOMAlgo_Builder();
-Standard_EXPORT virtual ~GEOMAlgo_Builder();
-
-//! Performs calculations <br>
-Standard_EXPORT virtual void Perform() ;
-
-//! Performs calculations using prepared PaveFiller <br>
-//! object theDSF <br>
-Standard_EXPORT virtual void PerformWithFiller(const NMTTools_PaveFiller& theDSF) ;
-
-//! Adds argument theShape of the operation <br>
-Standard_EXPORT virtual void AddShape(const TopoDS_Shape& theShape) ;
-
-//! Clears internal fields and arguments <br>
-Standard_EXPORT virtual void Clear() ;
-
-//! Returns the arguments of the operation <br>
-Standard_EXPORT const TopTools_ListOfShape& Shapes() const;
-
-//! Returns the list of shapes generated from the <br>
-//! shape theS. <br>
-Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
-
-//! Returns the list of shapes modified from the shape <br>
-//! theS. <br>
-Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
-
-//! Returns true if the shape theS has been deleted. <br>
-Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
-
-//! Adds arguments of the operation as <br>
-//! shapes of upper level of container shape theShape <br>
-Standard_EXPORT void AddCompound(const TopoDS_Shape& theShape) ;
-
-//! Returns list of arguments of type theType <br>
-Standard_EXPORT const TopTools_ListOfShape& Shapes1(const Standard_Integer theType) const;
-
-//! Returns image shapes <br>
-Standard_EXPORT const BRepAlgo_Image& Images() const;
-
-//! Returns split-parts of shapes that have <br>
-//! state IN for the domain of shape theShape <br>
-Standard_EXPORT const TopTools_ListOfShape& InParts(const TopoDS_Shape& theShape) const;
-
-
-
+#include <TopoDS_Shape.hxx>
+#include <BRepAlgo_Image.hxx>
+//=======================================================================
+//function : GEOMAlgo_Builder
+//purpose :
+//=======================================================================
+class GEOMAlgo_Builder : public GEOMAlgo_BuilderShape
+{
+ public:
+ //! Empty constructor <br>
+ Standard_EXPORT
+ GEOMAlgo_Builder();
+
+ Standard_EXPORT
+ virtual ~GEOMAlgo_Builder();
+
+ //! Performs calculations <br>
+ Standard_EXPORT
+ virtual void Perform() ;
+
+ //! Performs calculations using prepared PaveFiller <br>
+ //! object theDSF <br>
+ Standard_EXPORT
+ virtual void PerformWithFiller(const NMTTools_PaveFiller& theDSF) ;
+
+ //! Adds argument theShape of the operation <br>
+ Standard_EXPORT
+ virtual void AddShape(const TopoDS_Shape& theShape) ;
+
+ //! Clears internal fields and arguments <br>
+ Standard_EXPORT
+ virtual void Clear() ;
+
+ //! Returns the arguments of the operation <br>
+ Standard_EXPORT
+ const TopTools_ListOfShape& Shapes() const;
+
+ //! Returns the list of shapes generated from the <br>
+ //! shape theS. <br>
+ Standard_EXPORT
+ virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
+
+ //! Returns the list of shapes modified from the shape <br>
+ //! theS. <br>
+ Standard_EXPORT
+ virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
+
+ //! Returns true if the shape theS has been deleted. <br>
+ Standard_EXPORT
+ virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
+
+ //! Adds arguments of the operation as <br>
+ //! shapes of upper level of container shape theShape <br>
+ Standard_EXPORT
+ void AddCompound(const TopoDS_Shape& theShape) ;
+
+ //! Returns list of arguments of type theType <br>
+ Standard_EXPORT
+ const TopTools_ListOfShape& Shapes1(const Standard_Integer theType) const;
+
+ //! Returns image shapes <br>
+ Standard_EXPORT
+ const BRepAlgo_Image& Images() const;
+
+ //! Returns split-parts of shapes that have <br>
+ //! state IN for the domain of shape theShape <br>
+ Standard_EXPORT
+ const TopTools_ListOfShape& InParts(const TopoDS_Shape& theShape) const;
protected:
-
- // Methods PROTECTED
- //
-
-//! Performs calculations using prepared DSFiller <br>
-//! object theDSF <br>
-Standard_EXPORT virtual void PerformInternal(const NMTTools_PaveFiller& theDSF) ;
-
-//! Prepare information for history support <br>
-Standard_EXPORT virtual void PrepareHistory() ;
-
-//! Clears internal fields <br>
-Standard_EXPORT virtual void ClearInternals() ;
-
-//! Provides preparing actions <br>
-Standard_EXPORT virtual void Prepare() ;
-
-//! Provides post-tratment actions <br>
-Standard_EXPORT virtual void PostTreat() ;
-
-//! Append the argument theShape to <br>
-//! typified lists of arguments myShapes1 <br>
-Standard_EXPORT void AddShape1(const TopoDS_Shape& theShape) ;
-
-//! Build the resulting shapes of type theType <br>
-Standard_EXPORT virtual void BuildResult(const TopAbs_ShapeEnum theType) ;
-
-//! Fill Images for vertices <br>
-Standard_EXPORT void FillImagesVertices() ;
-
-//! Fill Images for edges <br>
-Standard_EXPORT void FillImagesEdges() ;
-
-//! Fill Images for faces <br>
-Standard_EXPORT void FillImagesFaces() ;
-
-//! For each interferred face find split edges <br>
-//! that are in 2-D domain of the face <br>
-Standard_EXPORT void FillIn2DParts() ;
-
-//! Build draft faces <br>
-Standard_EXPORT void BuildSplitFaces() ;
-
-//! Among draft faces find same domain faces <br>
-Standard_EXPORT void FillSameDomainFaces() ;
-
-//! Fill Images for faces <br>
-//! taking into account same domain faces <br>
-Standard_EXPORT void FillImagesFaces1() ;
-
-//! Update Images for faces by <br>
-//! internal vertices <br>
-Standard_EXPORT void FillInternalVertices() ;
-
-//! Fill Images for Wires, Shells, Compsolids, Compounds <br>
-Standard_EXPORT void FillImagesContainers(const TopAbs_ShapeEnum theType) ;
-
-//! Fill Images for solids <br>
-Standard_EXPORT void FillImagesSolids() ;
-
-//! For each interferred solid find split faces <br>
-//! that are in 3-D domain of the solid <br>
-Standard_EXPORT void FillIn3DParts() ;
-
-//! Build draft solids <br>
-Standard_EXPORT void BuildSplitSolids() ;
-
-//! Update draft solids by <br>
-//! internal shells, edges, vertices <br>
-Standard_EXPORT void FillInternalShapes() ;
-
-//! Build solid theDraftSolid that consists of <br>
-//! non-internal split faces of the solid <br>
-//! theSolid. <br>
-//! All splits of internal faces of <br>
-//! theSolid are in the list: theInternalFaces <br>
-Standard_EXPORT void BuildDraftSolid(const TopoDS_Shape& theSolid,TopoDS_Shape& theDraftSolid,TopTools_ListOfShape& theInternalFaces) ;
-
-
- // Fields PROTECTED
- //
-NMTTools_PPaveFiller myPaveFiller;
-TopTools_ListOfShape myShapes;
-Standard_Integer myNbTypes;
-TopTools_MapOfShape myMapFence;
-TopTools_ListOfShape myShapes1[9];
-BRepAlgo_Image myImages;
-TopTools_IndexedDataMapOfShapeListOfShape myInParts;
-BRepAlgo_Image mySplitFaces;
-TopTools_IndexedDataMapOfShapeShape mySameDomainShapes;
-TopTools_IndexedDataMapOfShapeShape myDraftSolids;
-Standard_Integer myEntryPoint;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
+ //! Performs calculations using prepared DSFiller <br>
+ //! object theDSF <br>
+ Standard_EXPORT
+ virtual void PerformInternal(const NMTTools_PaveFiller& theDSF) ;
+
+ //! Prepare information for history support <br>
+ Standard_EXPORT
+ virtual void PrepareHistory() ;
+
+ //! Clears internal fields <br>
+ Standard_EXPORT
+ virtual void ClearInternals() ;
+
+ //! Provides preparing actions <br>
+ Standard_EXPORT
+ virtual void Prepare() ;
+
+ //! Provides post-tratment actions <br>
+ Standard_EXPORT
+ virtual void PostTreat() ;
+
+ //! Append the argument theShape to <br>
+ //! typified lists of arguments myShapes1 <br>
+ Standard_EXPORT
+ void AddShape1(const TopoDS_Shape& theShape) ;
+
+ //! Build the resulting shapes of type theType <br>
+ Standard_EXPORT
+ virtual void BuildResult(const TopAbs_ShapeEnum theType) ;
+
+ //! Fill Images for vertices <br>
+ Standard_EXPORT
+ void FillImagesVertices() ;
+
+ //! Fill Images for edges <br>
+ Standard_EXPORT
+ void FillImagesEdges() ;
+
+ //! Fill Images for faces <br>
+ Standard_EXPORT
+ void FillImagesFaces() ;
+
+ //! For each interferred face find split edges <br>
+ //! that are in 2-D domain of the face <br>
+ Standard_EXPORT
+ void FillIn2DParts() ;
+
+ //! Build draft faces <br>
+ Standard_EXPORT
+ void BuildSplitFaces() ;
+
+ //! Among draft faces find same domain faces <br>
+ Standard_EXPORT
+ void FillSameDomainFaces() ;
+
+ //! Fill Images for faces <br>
+ //! taking into account same domain faces <br>
+ Standard_EXPORT
+ void FillImagesFaces1() ;
+
+ //! Update Images for faces by <br>
+ //! internal vertices <br>
+ Standard_EXPORT
+ void FillInternalVertices() ;
+
+ //! Fill Images for Wires, Shells, Compsolids, Compounds <br>
+ Standard_EXPORT
+ void FillImagesContainers(const TopAbs_ShapeEnum theType) ;
+
+ //! Fill Images for solids <br>
+ Standard_EXPORT
+ void FillImagesSolids() ;
+
+ //! For each interferred solid find split faces <br>
+ //! that are in 3-D domain of the solid <br>
+ Standard_EXPORT
+ void FillIn3DParts() ;
+
+ //! Build draft solids <br>
+ Standard_EXPORT
+ void BuildSplitSolids() ;
+
+ //! Update draft solids by <br>
+ //! internal shells, edges, vertices <br>
+ Standard_EXPORT
+ void FillInternalShapes() ;
+
+ //! Build solid theDraftSolid that consists of <br>
+ //! non-internal split faces of the solid <br>
+ //! theSolid. <br>
+ //! All splits of internal faces of <br>
+ //! theSolid are in the list: theInternalFaces <br>
+ Standard_EXPORT
+ void BuildDraftSolid(const TopoDS_Shape& theSolid,
+ TopoDS_Shape& theDraftSolid,
+ TopTools_ListOfShape& theInternalFaces) ;
+
+
+ NMTTools_PPaveFiller myPaveFiller;
+ TopTools_ListOfShape myShapes;
+ Standard_Integer myNbTypes;
+ TopTools_MapOfShape myMapFence;
+ TopTools_ListOfShape myShapes1[9];
+ BRepAlgo_Image myImages;
+ TopTools_IndexedDataMapOfShapeListOfShape myInParts;
+ BRepAlgo_Image mySplitFaces;
+ TopTools_IndexedDataMapOfShapeShape mySameDomainShapes;
+ TopTools_IndexedDataMapOfShapeShape myDraftSolids;
+ Standard_Integer myEntryPoint;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Builder.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTTools_PaveFiller_HeaderFile
-#include <NMTTools_PaveFiller.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _BRepAlgo_Image_HeaderFile
-#include <BRepAlgo_Image.hxx>
-#endif
-#ifndef _GEOMAlgo_Builder_HeaderFile
-#include <GEOMAlgo_Builder.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: ModGlue_BuilderArea.cdl
--- Author: Peter KURNEV
-
-deferred class BuilderArea from GEOMAlgo
- inherits Algo from GEOMAlgo
-
- ---Purpose: The root class for algorithms to build
- -- faces/solids from set of edges/faces
-
-uses
- Shape from TopoDS,
- ListOfShape from TopTools,
- MapOfOrientedShape from TopTools,
- Context from IntTools
-
---raises
-
-is
- Initialize
- ---Purpose: Empty constructor
- returns BuilderArea from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_BuilderArea();"
-
- SetContext(me:out;
- theContext:Context from IntTools);
- ---Purpose: Sets cashed geometrical tools
-
- Context(me)
- returns Context from IntTools;
- ---Purpose: Returns cashed geometrical tools
- ---C++: return const &
-
- SetShapes(me:out;
- theLS:ListOfShape from TopTools);
- ---Purpose: Sets edges/faces to process
-
- Shapes(me)
- ---Purpose: Returns edges/faces to process
- returns ListOfShape from TopTools;
- ---C++: return const &
-
- Loops(me)
- ---Purpose: Returns wires/shells that have been built
- returns ListOfShape from TopTools;
- ---C++: return const &
-
- Areas(me)
- ---Purpose: Returns faces/solids that have been built
- returns ListOfShape from TopTools;
- ---C++: return const &
-
- Perform(me:out)
- is redefined;
-
- PerformShapesToAvoid(me:out)
- ---Purpose: Collect the edges/faces that
- -- a) are internal
- -- b) are the same and have different orientation
- is virtual protected;
-
- PerformLoops(me:out)
- ---Purpose: Build draft faces/shells
- -- a)myLoops - draft faces/shells that consist of
- -- boundary edges/faces
- -- b)myLoopsInternal - draft faces/shells that contains
- -- inner edges/faces
- is virtual protected;
-
- PerformAreas(me:out)
- ---Purpose: Build draft faces/solids that contains boundary faces
- is virtual protected;
-
- PerformInternalShapes(me:out)
- ---Purpose: Build finalized faces/solids with internal wires/shells
- is virtual protected;
-
-fields
- myShapes : ListOfShape from TopTools is protected;
- myLoops : ListOfShape from TopTools is protected;
- myLoopsInternal : ListOfShape from TopTools is protected;
- myShapesToAvoid : MapOfOrientedShape from TopTools is protected;
- myAreas : ListOfShape from TopTools is protected;
- --
- myContext : Context from IntTools is protected;
-
-end BuilderArea;
//
// File: GEOMAlgo_BuilderArea.cxx
+// Created:
// Author: Peter KURNEV
-
-#include <GEOMAlgo_BuilderArea.ixx>
-
-#include <Basics_OCCTVersion.hxx>
+//
+#include <GEOMAlgo_BuilderArea.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
-
#include <TopoDS_Shape.hxx>
-
#include <IntTools_Context.hxx>
//=======================================================================
//purpose :
//=======================================================================
GEOMAlgo_BuilderArea::GEOMAlgo_BuilderArea()
- : GEOMAlgo_Algo()
+:
+ GEOMAlgo_Algo()
{
-#if OCC_VERSION_LARGE <= 0x06050200
- myContext=NULL;
-#endif
}
//=======================================================================
//function : ~
//function : SetContext
//purpose :
//=======================================================================
-#if OCC_VERSION_LARGE > 0x06050200
void GEOMAlgo_BuilderArea::SetContext(const Handle(IntTools_Context)& theContext)
-#else
-void GEOMAlgo_BuilderArea::SetContext(const IntTools_Context& theContext)
-#endif
{
-#if OCC_VERSION_LARGE > 0x06050200
myContext=theContext;
-#else
- myContext=(IntTools_Context*)&theContext;
-#endif
}
-
-#if OCC_VERSION_LARGE > 0x06050200
//=======================================================================
//function : Context
//purpose :
myContext=new IntTools_Context;
}
}
-#endif
-
//=======================================================================
//function : SetShapes
//purpose :
void GEOMAlgo_BuilderArea::PerformInternalShapes()
{
}
+
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_BuilderArea.hxx
+// Created:
+// Author: Peter KURNEV
+//
+
#ifndef _GEOMAlgo_BuilderArea_HeaderFile
#define _GEOMAlgo_BuilderArea_HeaderFile
-#include <Basics_OCCTVersion.hxx>
-
-#ifndef _TopTools_ListOfShape_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TopTools_MapOfOrientedShape_HeaderFile
#include <TopTools_MapOfOrientedShape.hxx>
-#endif
-
-#if OCC_VERSION_LARGE > 0x06050200
#include <Handle_IntTools_Context.hxx>
-#else
-#include <IntTools_PContext.hxx>
-#endif
-
-#ifndef _GEOMAlgo_Algo_HeaderFile
#include <GEOMAlgo_Algo.hxx>
-#endif
-class IntTools_Context;
-class TopTools_ListOfShape;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
+#include <IntTools_Context.hxx>
//! The root class for algorithms to build <br>
//! faces/solids from set of edges/faces <br>
-class GEOMAlgo_BuilderArea : public GEOMAlgo_Algo {
-
-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);
- }
-
-//! Sets cashed geometrical tools <br>
-#if OCC_VERSION_LARGE > 0x06050200
- Standard_EXPORT void SetContext(const Handle(IntTools_Context)& theContext) ;
-#else
-Standard_EXPORT void SetContext(const IntTools_Context& theContext) ;
-#endif
+//=======================================================================
+//class : GEOMAlgo_BuilderArea
+//purpose :
+//=======================================================================
+class GEOMAlgo_BuilderArea : public GEOMAlgo_Algo
+{
+ public:
+ //! Sets cashed geometrical tools <br>
+ Standard_EXPORT
+ void SetContext(const Handle(IntTools_Context)& theContext) ;
-#if OCC_VERSION_LARGE > 0x06050200
//! Returns cashed geometrical tools <br>
- Standard_EXPORT const Handle_IntTools_Context& Context() const;
-#endif
-
-//! Sets edges/faces to process <br>
-Standard_EXPORT void SetShapes(const TopTools_ListOfShape& theLS) ;
+ Standard_EXPORT
+ const Handle_IntTools_Context& Context() const;
-//! Returns edges/faces to process <br>
-Standard_EXPORT const TopTools_ListOfShape& Shapes() const;
+ //! Sets edges/faces to process <br>
+ Standard_EXPORT
+ void SetShapes(const TopTools_ListOfShape& theLS) ;
-//! Returns wires/shells that have been built <br>
-Standard_EXPORT const TopTools_ListOfShape& Loops() const;
+ //! Returns edges/faces to process <br>
+ Standard_EXPORT
+ const TopTools_ListOfShape& Shapes() const;
-//! Returns faces/solids that have been built <br>
-Standard_EXPORT const TopTools_ListOfShape& Areas() const;
+ //! Returns wires/shells that have been built <br>
+ Standard_EXPORT
+ const TopTools_ListOfShape& Loops() const;
-#if OCC_VERSION_LARGE > 0x06050200
- Standard_EXPORT virtual void Perform() ;
-#endif
+ //! Returns faces/solids that have been built <br>
+ Standard_EXPORT
+ const TopTools_ListOfShape& Areas() const;
-protected:
+ Standard_EXPORT
+ virtual void Perform() ;
+ protected:
//! Empty constructor <br>
- Standard_EXPORT GEOMAlgo_BuilderArea();
-Standard_EXPORT virtual ~GEOMAlgo_BuilderArea();
+ Standard_EXPORT
+ GEOMAlgo_BuilderArea();
+
+ Standard_EXPORT
+ virtual ~GEOMAlgo_BuilderArea();
//! Collect the edges/faces that <br>
-//! a) are internal <br>
-//! b) are the same and have different orientation <br>
- Standard_EXPORT virtual void PerformShapesToAvoid() ;
+ //! a) are internal <br>
+ //! b) are the same and have different orientation <br>
+
+ Standard_EXPORT
+ virtual void PerformShapesToAvoid() ;
+
//! Build draft faces/shells <br>
-//! a)myLoops - draft faces/shells that consist of <br>
-//! boundary edges/faces <br>
-//! b)myLoopsInternal - draft faces/shells that contains <br>
-//! inner edges/faces <br>
- Standard_EXPORT virtual void PerformLoops() ;
+ //! a)myLoops - draft faces/shells that consist of <br>
+ //! boundary edges/faces <br>
+ //! b)myLoopsInternal - draft faces/shells that contains <br>
+ //! inner edges/faces <br>
+ Standard_EXPORT
+ virtual void PerformLoops() ;
//! Build draft faces/solids that contains boundary faces <br>
- Standard_EXPORT virtual void PerformAreas() ;
- //! Build finalized faces/solids with internal wires/shells <br>
- Standard_EXPORT virtual void PerformInternalShapes() ;
-
-
-TopTools_ListOfShape myShapes;
-TopTools_ListOfShape myLoops;
-TopTools_ListOfShape myLoopsInternal;
-TopTools_MapOfOrientedShape myShapesToAvoid;
-TopTools_ListOfShape myAreas;
-#if OCC_VERSION_LARGE > 0x06050200
-Handle_IntTools_Context myContext;
-#else
-IntTools_PContext myContext;
-#endif
-
-private:
+ Standard_EXPORT
+ virtual void PerformAreas() ;
+ //! Build finalized faces/solids with internal wires/shells <br>
+ Standard_EXPORT
+ virtual void PerformInternalShapes() ;
+
+ TopTools_ListOfShape myShapes;
+ TopTools_ListOfShape myLoops;
+ TopTools_ListOfShape myLoopsInternal;
+ TopTools_MapOfOrientedShape myShapesToAvoid;
+ TopTools_ListOfShape myAreas;
+ Handle_IntTools_Context myContext;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BuilderArea.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _IntTools_Context_HeaderFile
-#include <IntTools_Context.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_BuilderArea_HeaderFile
-#include <GEOMAlgo_BuilderArea.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_BuilderFace.cdl
--- Created:
--- Author: Peter KURNEV
---
-class BuilderFace from GEOMAlgo
- inherits BuilderArea from GEOMAlgo
-
- ---Purpose: The algorithm to build faces from set of edges
-
-uses
- Face from TopoDS
-
---raises
-
-is
- Create
- ---Purpose: Empty constructor
- returns BuilderFace from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_BuilderFace();"
-
- SetFace(me:out;
- theFace:Face from TopoDS);
- ---Purpose: Sets the face generatix
-
- Face(me)
- ---Purpose: Returns the face generatix
- returns Face from TopoDS;
- ---C++: return const &
-
- Perform(me:out)
- ---Purpose: Performs the algorithm
- is redefined;
-
- PerformShapesToAvoid(me:out)
- ---Purpose: Collect the edges that
- -- a) are internal
- -- b) are the same and have different orientation
- is redefined protected;
-
- PerformLoops(me:out)
- ---Purpose: Build draft wires
- -- a)myLoops - draft wires that consist of
- -- boundary edges
- -- b)myLoopsInternal - draft wires that contains
- -- inner edges
- is redefined protected;
-
- PerformAreas(me:out)
- ---Purpose: Build draft faces that contains boundary edges
- is redefined protected;
-
- PerformInternalShapes(me:out)
- ---Purpose: Build finalized faces with internals
- is redefined protected;
-
-
-fields
- myFace : Face from TopoDS is protected;
-
-end BuilderFace;
-
//
// File: GEOMAlgo_BuilderFace.cxx
+// Created:
// Author: Peter KURNEV
-
-#include <GEOMAlgo_BuilderFace.ixx>
-
-#include <GEOMAlgo_Tools3D.hxx>
-#include <GEOMAlgo_BuilderTools.hxx>
-#include <GEOMAlgo_WireEdgeSet.hxx>
-#include <GEOMAlgo_WESCorrector.hxx>
-
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#include <NMTTools_CoupleOfShape.hxx>
-#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-
-#include <Basics_OCCTVersion.hxx>
+//
+#include <GEOMAlgo_BuilderFace.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Pln.hxx>
#include <BOP_WireEdgeSet.hxx>
#include <BOP_WESCorrector.hxx>
+#include <NMTTools_ListOfCoupleOfShape.hxx>
+#include <NMTTools_CoupleOfShape.hxx>
+#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
+
+#include <GEOMAlgo_Tools3D.hxx>
+#include <GEOMAlgo_BuilderTools.hxx>
+#include <GEOMAlgo_WireEdgeSet.hxx>
+#include <GEOMAlgo_WESCorrector.hxx>
+
//
static
Standard_Boolean IsGrowthWire(const TopoDS_Shape& ,
const TopTools_IndexedMapOfShape& );
-static
+static
Standard_Boolean IsInside(const TopoDS_Shape& ,
const TopoDS_Shape& ,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& );
-#else
- IntTools_PContext& );
-#endif
-
static
void MakeInternalWires(const TopTools_MapOfShape& ,
TopTools_ListOfShape& );
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
GEOMAlgo_BuilderFace::GEOMAlgo_BuilderFace()
:
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_BuilderFace::~GEOMAlgo_BuilderFace()
{
}
//=======================================================================
//function : SetFace
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_BuilderFace::SetFace(const TopoDS_Face& theFace)
{
}
//=======================================================================
//function : Face
-//purpose :
+//purpose :
//=======================================================================
const TopoDS_Face& GEOMAlgo_BuilderFace::Face()const
{
}
//=======================================================================
//function : Perform
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_BuilderFace::Perform()
{
myErrorStatus=0;
//
-#if OCC_VERSION_LARGE <= 0x06050200
- if (myContext==NULL) {
- myErrorStatus=11;// Null Context
- return;
- }
-#endif
- //
if (myFace.IsNull()) {
myErrorStatus=12;// Null face generix
return;
}
- //
-#if OCC_VERSION_LARGE > 0x06050200
// Initialize the context
GEOMAlgo_BuilderArea::Perform();
-#endif
//
PerformShapesToAvoid();
if (myErrorStatus) {
}
//=======================================================================
//function :PerformShapesToAvoid
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_BuilderFace::PerformShapesToAvoid()
{
break;
}
//
- }//while (1)
+ }//while (1)
//printf(" EdgesToAvoid=%d, iCnt=%d\n", EdgesToAvoid.Extent(), iCnt);
-}
+}
//=======================================================================
//function : PerformLoops
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_BuilderFace::PerformLoops()
{
TopTools_IndexedDataMapOfShapeListOfShape aVEMap;
TopTools_MapOfOrientedShape aMAdded;
TopoDS_Iterator aItW;
- BRep_Builder aBB;
+ BRep_Builder aBB;
GEOMAlgo_WireEdgeSet aWES;
GEOMAlgo_WESCorrector aWESCor;
//
- // 1. Usual Wires
+ // 1. Usual Wires
myLoops.Clear();
aWES.SetFace(myFace);
//
//modified by NIZNHY-PKV Tue Aug 5 15:09:29 2008f
// Post Treatment
TopTools_MapOfOrientedShape aMEP;
- //
+ //
// a. collect all edges that are in loops
aIt.Initialize (myLoops);
for (; aIt.More(); aIt.Next()) {
aMEP.Add(aE);
}
}
- //
+ //
// b. collect all edges that are to avoid
aItM.Initialize(myShapesToAvoid);
for (; aItM.More(); aItM.Next()) {
const TopoDS_Vertex& aV = TopoDS::Vertex(aItE.Value());
const TopTools_ListOfShape& aLE=aVEMap.FindFromKey(aV);
aIt.Initialize(aLE);
- for (; aIt.More()&&bFlag; aIt.Next()) {
+ for (; aIt.More()&&bFlag; aIt.Next()) {
const TopoDS_Shape& aEx=aIt.Value();
if (aMAdded.Add(aEx)) {
aBB.Add(aW, aEx);
bFlag=!bFlag;
}
}
- }//for (; aIt.More(); aIt.Next()) {
+ }//for (; aIt.More(); aIt.Next()) {
}//for (; aItE.More(); aItE.Next()) {
}//for (; aItW.More(); aItW.Next()) {
myLoopsInternal.Append(aW);
}
//=======================================================================
//function : PerformAreas
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_BuilderFace::PerformAreas()
{
//
Standard_Boolean bIsGrowth, bIsHole;
Standard_Real aTol;
- TopTools_ListOfShape aNewFaces, aHoleWires;
+ TopTools_ListOfShape aNewFaces, aHoleWires;
TopoDS_Shape anInfinitePointShape;
TopTools_DataMapOfShapeShape aInOutMap;
TopTools_DataMapOfShapeListOfShape aMSH;
aNewFaces.Append (aFace);
}
else{
- // check if a wire is a hole
+ // check if a wire is a hole
//XX
//bIsHole=IsHole(aWire, myFace, myContext);
bIsHole=GEOMAlgo_BuilderTools::IsHole(aWire, myFace);
aBB.Add (aF, aHole);
}
//
- // update classifier
+ // update classifier
aTol=BRep_Tool::Tolerance(aF);
IntTools_FClass2d& aClsf=myContext->FClass2d(aF);
aClsf.Init(aF, aTol);
}
//
- // These aNewFaces are draft faces that
+ // These aNewFaces are draft faces that
// do not contain any internal shapes
//
myAreas.Append(aNewFaces);
}
//=======================================================================
//function : PerformInternalShapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_BuilderFace::PerformInternalShapes()
{
if (!aNbWI) {// nothing to do
return;
}
- //
+ //
//Standard_Real aTol;
BRep_Builder aBB;
TopTools_ListIteratorOfListOfShape aIt1, aIt2;
- TopoDS_Iterator aIt;
+ TopoDS_Iterator aIt;
TopTools_MapOfShape aME, aMEP;
TopTools_MapIteratorOfMapOfShape aItME;
TopTools_IndexedDataMapOfShapeListOfShape aMVE;
}
//=======================================================================
//function : MakeInternalWires
-//purpose :
+//purpose :
//=======================================================================
void MakeInternalWires(const TopTools_MapOfShape& theME,
TopTools_ListOfShape& theWires)
//
// make a new shell
TopoDS_Wire aW;
- aBB.MakeWire(aW);
+ aBB.MakeWire(aW);
aEE.Orientation(TopAbs_INTERNAL);
aBB.Add(aW, aEE);
//
const TopoDS_Shape& aV =aExp.Current();
const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV);
aItE.Initialize(aLE);
- for (; aItE.More(); aItE.Next()) {
+ for (; aItE.More(); aItE.Next()) {
TopoDS_Shape aEL=aItE.Value();
if (aAddedMap.Add(aEL)){
aEL.Orientation(TopAbs_INTERNAL);
}
//=======================================================================
//function : IsInside
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean IsInside(const TopoDS_Shape& theHole,
const TopoDS_Shape& theF2,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& theContext)
-#else
- IntTools_PContext& theContext)
-#endif
{
Standard_Boolean bRet;
Standard_Real aT, aU, aV;
-
+
TopAbs_State aState;
TopExp_Explorer aExp;
TopTools_IndexedMapOfShape aME2;
//=======================================================================
//function : IsGrowthWire
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire,
const TopTools_IndexedMapOfShape& theMHE)
{
Standard_Boolean bRet;
TopoDS_Iterator aIt;
- //
+ //
bRet=Standard_False;
if (theMHE.Extent()) {
aIt.Initialize(theWire);
/*
//=======================================================================
//function : IsInside
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean IsInside(const TopoDS_Shape& theHole,
const TopoDS_Shape& theF2,
+
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_BuilderFace.hxx
+// Created:
+// Author: Peter KURNEV
+//
#ifndef _GEOMAlgo_BuilderFace_HeaderFile
#define _GEOMAlgo_BuilderFace_HeaderFile
-#ifndef _TopoDS_Face_HeaderFile
-#include <TopoDS_Face.hxx>
-#endif
-#ifndef _GEOMAlgo_BuilderArea_HeaderFile
-#include <GEOMAlgo_BuilderArea.hxx>
-#endif
-class TopoDS_Face;
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
+#include <TopoDS_Face.hxx>
+#include <GEOMAlgo_BuilderArea.hxx>
//! The algorithm to build faces from set of edges <br>
-class GEOMAlgo_BuilderFace : public GEOMAlgo_BuilderArea {
-
-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
- //
-
-//! Empty constructor <br>
-Standard_EXPORT GEOMAlgo_BuilderFace();
-Standard_EXPORT virtual ~GEOMAlgo_BuilderFace();
-
-//! Sets the face generatix <br>
-Standard_EXPORT void SetFace(const TopoDS_Face& theFace) ;
-
-//! Returns the face generatix <br>
-Standard_EXPORT const TopoDS_Face& Face() const;
-
-//! Performs the algorithm <br>
-Standard_EXPORT virtual void Perform() ;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-//! Collect the edges that <br>
-//! a) are internal <br>
-//! b) are the same and have different orientation <br>
-Standard_EXPORT virtual void PerformShapesToAvoid() ;
-
-//! Build draft wires <br>
-//! a)myLoops - draft wires that consist of <br>
-//! boundary edges <br>
-//! b)myLoopsInternal - draft wires that contains <br>
-//! inner edges <br>
-Standard_EXPORT virtual void PerformLoops() ;
-
-//! Build draft faces that contains boundary edges <br>
-Standard_EXPORT virtual void PerformAreas() ;
-
-//! Build finalized faces with internals <br>
-Standard_EXPORT virtual void PerformInternalShapes() ;
-
-
- // Fields PROTECTED
- //
-TopoDS_Face myFace;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+//=======================================================================
+//class : GEOMAlgo_BuilderFace
+//purpose :
+//=======================================================================
+class GEOMAlgo_BuilderFace : public GEOMAlgo_BuilderArea
+{
+ public:
+
+ //! Empty constructor <br>
+ Standard_EXPORT
+ GEOMAlgo_BuilderFace();
+
+ Standard_EXPORT
+ virtual ~GEOMAlgo_BuilderFace();
+
+ //! Sets the face generatix <br>
+ Standard_EXPORT
+ void SetFace(const TopoDS_Face& theFace) ;
+
+ //! Returns the face generatix <br>
+ Standard_EXPORT
+ const TopoDS_Face& Face() const;
+
+ //! Performs the algorithm <br>
+ Standard_EXPORT
+ virtual void Perform() ;
+
+ protected:
+ //! Collect the edges that <br>
+ //! a) are internal <br>
+ //! b) are the same and have different orientation <br>
+ Standard_EXPORT
+ virtual void PerformShapesToAvoid() ;
+
+ //! Build draft wires <br>
+ //! a)myLoops - draft wires that consist of <br>
+ //! boundary edges <br>
+ //! b)myLoopsInternal - draft wires that contains <br>
+ //! inner edges <br>
+ Standard_EXPORT
+ virtual void PerformLoops() ;
+
+ //! Build draft faces that contains boundary edges <br>
+ Standard_EXPORT
+ virtual void PerformAreas() ;
+
+ //! Build finalized faces with internals <br>
+ Standard_EXPORT
+ virtual void PerformInternalShapes() ;
+
+
+ TopoDS_Face myFace;
};
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BuilderFace.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Face_HeaderFile
-#include <TopoDS_Face.hxx>
-#endif
-#ifndef _GEOMAlgo_BuilderFace_HeaderFile
-#include <GEOMAlgo_BuilderFace.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_BuilderShape.cdl
--- Created:
--- Author: Peter KURNEV
---
-deferred class BuilderShape from GEOMAlgo
- inherits Algo from GEOMAlgo
-
- ---Purpose: Root class for algorithms that has shape as result
-
-uses
- Shape from TopoDS,
- ListOfShape from TopTools,
- MapOfShape from TopTools,
- IndexedDataMapOfShapeListOfShape from TopTools
-
---raises
-
-is
- Initialize
- ---Purpose: Empty constructor
- returns BuilderShape from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_BuilderShape();"
-
- Shape(me)
- ---Purpose: Returns the result of algorithm
- returns Shape from TopoDS;
- ---C++: return const &
-
-
- ------------------------------------------------------------------
- --- The following methods are not implemented at this level.
- -- An empty list is returned.
- --- They are optional and can be redefined.
- ------------------------------------------------------------------
- Generated (me:out;
- theS : Shape from TopoDS)
- ---Purpose: Returns the list of shapes generated from the
- -- shape theS.
- returns ListOfShape from TopTools
- is virtual;
- ---C++: return const &
-
- Modified (me:out;
- theS : Shape from TopoDS)
- ---Purpose: Returns the list of shapes modified from the
- -- shape theS.
- returns ListOfShape from TopTools
- is virtual;
- ---C++: return const &
-
- IsDeleted (me:out;
- theS : Shape from TopoDS)
- ---Purpose: Returns true if the shape theS has been deleted.
- returns Boolean from Standard
- is virtual;
-
- HasDeleted (me)
- ---Purpose: Returns true if the at least one shape(or sub-shape)
- -- of arguments has been deleted.
- returns Boolean from Standard;
-
- HasGenerated (me)
- ---Purpose: Returns true if the at least one shape(or sub-shape)
- -- of arguments has generated shapes.
- returns Boolean from Standard;
-
- HasModified (me)
- ---Purpose: Returns true if the at least one shape(or sub-shape)
- -- of arguments has modified shapes.
- returns Boolean from Standard;
-
- PrepareHistory (me:out)
- ---Purpose: Prepare information for history support
- is virtual protected;
-
---modified by NIZNHY-PKV Thu Dec 7 11:13:17 2006f
- ImagesResult(me)
- returns IndexedDataMapOfShapeListOfShape from TopTools;
- ---C++: return const &
---modified by NIZNHY-PKV Thu Dec 7 11:13:20 2006t
-fields
- myShape : Shape from TopoDS is protected;
- --
- myHistShapes : ListOfShape from TopTools is protected;
- myMapShape : MapOfShape from TopTools is protected;
- myHasDeleted : Boolean from Standard is protected;
- myHasGenerated : Boolean from Standard is protected;
- myHasModified : Boolean from Standard is protected;
---modified by NIZNHY-PKV Thu Dec 7 11:13:10 2006f
- myImagesResult : IndexedDataMapOfShapeListOfShape from TopTools is protected;
---modified by NIZNHY-PKV Thu Dec 7 11:13:13 2006t
-end BuilderShape;
-
//
// File: GEOMAlgo_BuilderShape.cxx
-// Created:
-// Author: Peter KURNEV
+// Created:
+// Author: Peter KURNEV
//
-#include <GEOMAlgo_BuilderShape.ixx>
+#include <GEOMAlgo_BuilderShape.hxx>
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
GEOMAlgo_BuilderShape::GEOMAlgo_BuilderShape()
:
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_BuilderShape::~GEOMAlgo_BuilderShape()
{
}
//=======================================================================
//function : Shape
-//purpose :
+//purpose :
//=======================================================================
const TopoDS_Shape& GEOMAlgo_BuilderShape::Shape() const
{
//
//=======================================================================
//function : Generated
-//purpose :
+//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Generated(const TopoDS_Shape& )
{
}
//=======================================================================
//function : Modified
-//purpose :
+//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Modified(const TopoDS_Shape& )
{
}
//=======================================================================
//function : IsDeleted
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_BuilderShape::IsDeleted(const TopoDS_Shape& theS)
{
Standard_Boolean bRet;
//
bRet=!myMapShape.Contains(theS);
- return bRet;
+ return bRet;
}
//=======================================================================
//function : HasDeleted
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_BuilderShape::HasDeleted()const
{
}
//=======================================================================
//function : HasGenerated
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_BuilderShape::HasGenerated()const
{
}
//=======================================================================
//function : HasModified
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_BuilderShape::HasModified()const
{
}
//=======================================================================
//function : PrepareHistory
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_BuilderShape::PrepareHistory()
{
//modified by NIZNHY-PKV Thu Dec 7 11:57:00 2006f
//=======================================================================
//function : ImagesResult
-//purpose :
+//purpose :
//=======================================================================
const TopTools_IndexedDataMapOfShapeListOfShape& GEOMAlgo_BuilderShape::ImagesResult()const
{
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_BuilderShape.hxx
+// Created:
+// Author: Peter KURNEV
+//
#ifndef _GEOMAlgo_BuilderShape_HeaderFile
#define _GEOMAlgo_BuilderShape_HeaderFile
-#ifndef _TopoDS_Shape_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TopTools_MapOfShape_HeaderFile
#include <TopTools_MapOfShape.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_Algo_HeaderFile
#include <GEOMAlgo_Algo.hxx>
-#endif
-class TopoDS_Shape;
-class TopTools_ListOfShape;
-class TopTools_IndexedDataMapOfShapeListOfShape;
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
//! Root class for algorithms that has shape as result <br>
-class GEOMAlgo_BuilderShape : public GEOMAlgo_Algo {
-
-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
- //
-
-//! Returns the result of algorithm <br>
-Standard_EXPORT const TopoDS_Shape& Shape() const;
-
-//! Returns the list of shapes generated from the <br>
-//! shape theS. <br>
-Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
-
-//! Returns the list of shapes modified from the <br>
-//! shape theS. <br>
-Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
-
-//! Returns true if the shape theS has been deleted. <br>
-Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
-
-//! Returns true if the at least one shape(or sub-shape) <br>
-//! of arguments has been deleted. <br>
-Standard_EXPORT Standard_Boolean HasDeleted() const;
-
-//! Returns true if the at least one shape(or sub-shape) <br>
-//! of arguments has generated shapes. <br>
-Standard_EXPORT Standard_Boolean HasGenerated() const;
-
-//! Returns true if the at least one shape(or sub-shape) <br>
-//! of arguments has modified shapes. <br>
-Standard_EXPORT Standard_Boolean HasModified() const;
-
-
-Standard_EXPORT const TopTools_IndexedDataMapOfShapeListOfShape& ImagesResult() const;
-
-
-
-
+//=======================================================================
+//class : GEOMAlgo_BuilderShape
+//purpose :
+//=======================================================================
+class GEOMAlgo_BuilderShape : public GEOMAlgo_Algo
+{
+ public:
+ //! Returns the result of algorithm <br>
+ Standard_EXPORT
+ const TopoDS_Shape& Shape() const;
+
+ //! Returns the list of shapes generated from the <br>
+ //! shape theS. <br>
+ Standard_EXPORT
+ virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
+
+ //! Returns the list of shapes modified from the <br>
+ //! shape theS. <br>
+ Standard_EXPORT
+ virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
+
+ //! Returns true if the shape theS has been deleted. <br>
+ Standard_EXPORT
+ virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
+
+ //! Returns true if the at least one shape(or sub-shape) <br>
+ //! of arguments has been deleted. <br>
+ Standard_EXPORT
+ Standard_Boolean HasDeleted() const;
+
+ //! Returns true if the at least one shape(or sub-shape) <br>
+ //! of arguments has generated shapes. <br>
+ Standard_EXPORT
+ Standard_Boolean HasGenerated() const;
+
+ //! Returns true if the at least one shape(or sub-shape) <br>
+ //! of arguments has modified shapes. <br>
+ Standard_EXPORT
+ Standard_Boolean HasModified() const;
+
+ Standard_EXPORT
+ const TopTools_IndexedDataMapOfShapeListOfShape& ImagesResult() const;
protected:
+ //! Empty constructor <br>
+ Standard_EXPORT
+ GEOMAlgo_BuilderShape();
- // Methods PROTECTED
- //
-
-//! Empty constructor <br>
-Standard_EXPORT GEOMAlgo_BuilderShape();
-Standard_EXPORT virtual ~GEOMAlgo_BuilderShape();
-
-//! Prepare information for history support <br>
-Standard_EXPORT virtual void PrepareHistory() ;
-
-
- // Fields PROTECTED
- //
-TopoDS_Shape myShape;
-TopTools_ListOfShape myHistShapes;
-TopTools_MapOfShape myMapShape;
-Standard_Boolean myHasDeleted;
-Standard_Boolean myHasGenerated;
-Standard_Boolean myHasModified;
-TopTools_IndexedDataMapOfShapeListOfShape myImagesResult;
-
+ Standard_EXPORT
+ virtual ~GEOMAlgo_BuilderShape();
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
+ //! Prepare information for history support <br>
+ Standard_EXPORT
+ virtual void PrepareHistory() ;
+ TopoDS_Shape myShape;
+ TopTools_ListOfShape myHistShapes;
+ TopTools_MapOfShape myMapShape;
+ Standard_Boolean myHasDeleted;
+ Standard_Boolean myHasGenerated;
+ Standard_Boolean myHasModified;
+ TopTools_IndexedDataMapOfShapeListOfShape myImagesResult;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BuilderShape.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_BuilderShape_HeaderFile
-#include <GEOMAlgo_BuilderShape.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_BuilderSolid.cdl
--- Created:
--- Author: Peter KURNEV
---
-class BuilderSolid from GEOMAlgo
- inherits BuilderArea from GEOMAlgo
-
- ---Purpose: The algorithm to build solids from set of faces
-
---uses
---raises
-
-is
- Create
- ---Purpose: Empty constructor
- returns BuilderSolid from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_BuilderSolid();"
-
-
- Perform(me:out)
- ---Purpose: Performs the algorithm
- is redefined;
-
- PerformShapesToAvoid(me:out)
- ---Purpose: Collect the faces that
- -- a) are internal
- -- b) are the same and have different orientation
- is redefined protected;
-
- PerformLoops(me:out)
- ---Purpose: Build draft shells
- -- a)myLoops - draft shells that consist of
- -- boundary faces
- -- b)myLoopsInternal - draft shells that contains
- -- inner faces
- is redefined protected;
-
- PerformAreas(me:out)
- ---Purpose: Build draft solids that contains boundary faces
- is redefined protected;
-
- PerformInternalShapes(me:out)
- ---Purpose: Build finalized solids with internal shells
- is redefined protected;
-
---fields
-
-end BuilderSolid;
//
// File: GEOMAlgo_BuilderSolid.cxx
+// Created:
// Author: Peter KURNEV
-
-#include <GEOMAlgo_BuilderSolid.ixx>
-
-#include <GEOMAlgo_Tools3D.hxx>
-#include <GEOMAlgo_BuilderTools.hxx>
-
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#include <NMTTools_CoupleOfShape.hxx>
-#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-
-#include <Basics_OCCTVersion.hxx>
+//
+#include <GEOMAlgo_BuilderSolid.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Pln.hxx>
#include <BOPTools_Tools2D.hxx>
#include <BOPTools_Tools3D.hxx>
+#include <NMTTools_ListOfCoupleOfShape.hxx>
+#include <NMTTools_CoupleOfShape.hxx>
+#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
+
+#include <GEOMAlgo_Tools3D.hxx>
+#include <GEOMAlgo_BuilderTools.hxx>
+
//
static
Standard_Boolean IsGrowthShell(const TopoDS_Shape& ,
const TopTools_IndexedMapOfShape& );
static
Standard_Boolean IsHole(const TopoDS_Shape& ,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& );
-#else
- IntTools_PContext& );
-#endif
-
static
Standard_Boolean IsInside(const TopoDS_Shape& ,
const TopoDS_Shape& ,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& );
-#else
- IntTools_PContext& );
-#endif
-
static
void MakeInternalShells(const TopTools_MapOfShape& ,
TopTools_ListOfShape& );
static
Standard_Boolean RefineShell(const TopoDS_Shell& ,
- TopoDS_Shell& );
+ TopoDS_Shell& );
//=======================================================================
//function :
{
myErrorStatus=0;
//
-#if OCC_VERSION_LARGE > 0x06050200
// Initialize the context
GEOMAlgo_BuilderArea::Perform();
-#endif
//
TopoDS_Compound aC;
BRep_Builder aBB;
aBB.Add(aC, aF);
}
//
-#if OCC_VERSION_LARGE <= 0x06050200
- if (myContext==NULL) {
- myErrorStatus=11;// Null Context
- return;
- }
-#endif
- //
PerformShapesToAvoid();
if (myErrorStatus) {
return;
}
/*
else {
- int a=0;
+ int a=0;
}
*/
}
if (IsClosedShell(aShell)) {
myLoops.Append(aShell);
}
- //modified by NIZNHY-PKV Wed Oct 27 07:10:41 2010f
else {
Standard_Boolean bRefine;
TopoDS_Shell aShx;
//
bRefine=RefineShell(aShell, aShx);
if (bRefine) {
- myLoops.Append(aShx);
+ myLoops.Append(aShx);
}
}
- //modified by NIZNHY-PKV Wed Oct 27 07:10:44 2010t
} // for (; aItF.More(); aItF.Next()) {
//
// Post Treatment
return;
}
//
+ Standard_Integer bFlag;
BRep_Builder aBB;
TopTools_ListIteratorOfListOfShape aShellIt, aSolidIt;
TopoDS_Iterator aIt;
- TopTools_MapOfShape aMF, aMFP;
+ TopTools_MapOfShape aMF, aMFP, aMFS;
TopTools_MapIteratorOfMapOfShape aItMF;
TopTools_IndexedDataMapOfShapeListOfShape aMEF;
TopTools_ListOfShape aLSI;
for ( ; aSolidIt.More(); aSolidIt.Next()) {
TopoDS_Solid& aSolid=*((TopoDS_Solid*)(&aSolidIt.Value()));
//
+ //modified by NIZNHY-PKV Wed Mar 07 08:52:18 2012f
+ aMFS.Clear();
+ {
+ TopExp_Explorer aExp(aSolid, TopAbs_FACE);
+ while (aExp.More()) {
+ aMFS.Add(aExp.Current());
+ aExp.Next();
+ }
+ }
+ //modified by NIZNHY-PKV Wed Mar 07 08:52:20 2012t
aMEF.Clear();
TopExp::MapShapesAndAncestors(aSolid, TopAbs_EDGE, TopAbs_FACE, aMEF);
//
aItMF.Initialize(aMF);
for (; aItMF.More(); aItMF.Next()) {
const TopoDS_Face& aF=*((TopoDS_Face*)(&aItMF.Key()));
-#if OCC_VERSION_LARGE > 0x06050200
- if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext)) {
-#else
- if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, *myContext)) {
-#endif
- aMFP.Add(aF);
+ //modified by NIZNHY-PKV Wed Mar 07 08:54:56 2012f
+ if (!aMFS.Contains(aF)) {
+ bFlag=GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext);
+ if (bFlag) {
+ aMFP.Add(aF);
+ }
}
+ //if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext)) {
+ // aMFP.Add(aF);
+ //}
+ //modified by NIZNHY-PKV Wed Mar 07 08:56:07 2012t
}
//
// 2.2 Make Internal Shells
//purpose :
//=======================================================================
Standard_Boolean IsHole(const TopoDS_Shape& theS2,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& theContext)
-#else
- IntTools_PContext& theContext)
-#endif
{
TopoDS_Solid *pS2=(TopoDS_Solid *)&theS2;
BRepClass3d_SolidClassifier& aClsf=theContext->SolidClassifier(*pS2);
//=======================================================================
Standard_Boolean IsInside(const TopoDS_Shape& theS1,
const TopoDS_Shape& theS2,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& theContext)
-#else
- IntTools_PContext& theContext)
-#endif
{
TopExp_Explorer aExp;
TopAbs_State aState;
else {
TopTools_IndexedMapOfShape aBounds;
const TopoDS_Face& aF = TopoDS::Face(aExp.Current());
-#if OCC_VERSION_LARGE > 0x06050200
aState=GEOMAlgo_Tools3D::ComputeState(aF, *pS2, 1.e-14, aBounds, theContext);
-#else
- aState=GEOMAlgo_Tools3D::ComputeState(aF, *pS2, 1.e-14, aBounds, *theContext);
-#endif
}
return (aState==TopAbs_IN);
}
}
return bRet;
}
-
//=======================================================================
//function : RefineShell
//purpose :
//=======================================================================
-Standard_Boolean RefineShell (const TopoDS_Shell& aShell,
- TopoDS_Shell& aShx)
+Standard_Boolean RefineShell(const TopoDS_Shell& aShell,
+ TopoDS_Shell& aShx)
+
{
Standard_Boolean bRet;
Standard_Integer i, aNbE, aNbF;
const TopoDS_Face& aF1=*((TopoDS_Face*)(&aLF.First()));
if (aNbF==1) {
if (aOrE==TopAbs_INTERNAL) {
- continue;
+ continue;
}
aMFx.Add(aF1);
}
else if (aNbF==2) {
const TopoDS_Face& aF2=*((TopoDS_Face*)(&aLF.Last()));
if (aF2.IsSame(aF1)) {
- if (BRep_Tool::IsClosed(aE, aF1)) {
- continue;
- }
- if (aOrE==TopAbs_INTERNAL) {
- continue;
- }
- aMFx.Add(aF1);
- aMFx.Add(aF2);
+ if (BRep_Tool::IsClosed(aE, aF1)) {
+ continue;
+ }
+ if (aOrE==TopAbs_INTERNAL) {
+ continue;
+ }
+ aMFx.Add(aF1);
+ aMFx.Add(aF2);
}
}
}
//
return bRet;
}
-
+//
// ErrorStatus :
// 11 - Null Context
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_BuilderSolid.hxx
+// Created:
+// Author: Peter KURNEV
+//
#ifndef _GEOMAlgo_BuilderSolid_HeaderFile
#define _GEOMAlgo_BuilderSolid_HeaderFile
-#ifndef _GEOMAlgo_BuilderArea_HeaderFile
-#include <GEOMAlgo_BuilderArea.hxx>
-#endif
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
+#include <GEOMAlgo_BuilderArea.hxx>
//! The algorithm to build solids from set of faces <br>
-class GEOMAlgo_BuilderSolid : public GEOMAlgo_BuilderArea {
-
-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
- //
-
-//! Empty constructor <br>
-Standard_EXPORT GEOMAlgo_BuilderSolid();
-Standard_EXPORT virtual ~GEOMAlgo_BuilderSolid();
-
-//! Performs the algorithm <br>
-Standard_EXPORT virtual void Perform() ;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-//! Collect the faces that <br>
-//! a) are internal <br>
-//! b) are the same and have different orientation <br>
-Standard_EXPORT virtual void PerformShapesToAvoid() ;
-
-//! Build draft shells <br>
-//! a)myLoops - draft shells that consist of <br>
-//! boundary faces <br>
-//! b)myLoopsInternal - draft shells that contains <br>
-//! inner faces <br>
-Standard_EXPORT virtual void PerformLoops() ;
-
-//! Build draft solids that contains boundary faces <br>
-Standard_EXPORT virtual void PerformAreas() ;
-
-//! Build finalized solids with internal shells <br>
-Standard_EXPORT virtual void PerformInternalShapes() ;
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
+//=======================================================================
+//function : GEOMAlgo_BuilderSolid
+//purpose :
+//=======================================================================
+class GEOMAlgo_BuilderSolid : public GEOMAlgo_BuilderArea
+{
+ public:
+ //! Empty constructor <br>
+ Standard_EXPORT
+ GEOMAlgo_BuilderSolid();
+
+ Standard_EXPORT
+ virtual ~GEOMAlgo_BuilderSolid();
+
+ //! Performs the algorithm <br>
+ Standard_EXPORT
+ virtual void Perform() ;
+
+ protected:
+ //! Collect the faces that <br>
+ //! a) are internal <br>
+ //! b) are the same and have different orientation <br>
+ Standard_EXPORT
+ virtual void PerformShapesToAvoid() ;
+
+ //! Build draft shells <br>
+ //! a)myLoops - draft shells that consist of <br>
+ //! boundary faces <br>
+ //! b)myLoopsInternal - draft shells that contains <br>
+ //! inner faces <br>
+ Standard_EXPORT
+ virtual void PerformLoops() ;
+
+ //! Build draft solids that contains boundary faces <br>
+ Standard_EXPORT
+ virtual void PerformAreas() ;
+
+ //! Build finalized solids with internal shells <br>
+ Standard_EXPORT
+ virtual void PerformInternalShapes() ;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BuilderSolid.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BuilderSolid_HeaderFile
-#include <GEOMAlgo_BuilderSolid.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_BuilderTools.cdl
--- Created:
--- Author: Peter KURNEV
--- <pkv@irinox>
---
-class BuilderTools from GEOMAlgo
-
- ---Purpose:
-
-uses
- Shape from TopoDS
-
---raises
-
-is
- IsHole(myclass;
- aW: Shape from TopoDS;
- aF: Shape from TopoDS)
- returns Boolean from Standard;
-
- IsHole(myclass;
- aShell: Shape from TopoDS)
- returns Boolean from Standard;
-
---fields
-
-end BuilderTools;
// File: GEOMAlgo_BuilderTools.cxx
// Author: Peter KURNEV
-#include <GEOMAlgo_BuilderTools.ixx>
+#include <GEOMAlgo_BuilderTools.hxx>
#include <Basics_OCCTVersion.hxx>
#include <Bnd_Box.hxx>
#include <BRepAdaptor_Curve2d.hxx>
-static
+static
Standard_Integer ComputeProps(const TopoDS_Face& aF,
Standard_Real& aA,
Standard_Real& aV);
//=======================================================================
//function : IsHole
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aW,
const TopoDS_Shape& aFace)
Standard_Real aU1, aU2, aU, dU;
Standard_Real aX1, aY1, aX0, aY0;
TopAbs_Orientation aOr;
-
+
gp_Pnt2d aP2D0, aP2D1;
Handle(Geom2d_Curve) aC2D;
TopoDS_Face aF, aFF;
//
aS=0.;
aItW.Initialize(aW);
- for (; aItW.More(); aItW.Next()) {
+ for (; aItW.More(); aItW.Next()) {
const TopoDS_Edge& aE=TopoDS::Edge(aItW.Value());
aOr=aE.Orientation();
- if (!(aOr==TopAbs_FORWARD ||
+ if (!(aOr==TopAbs_FORWARD ||
aOr==TopAbs_REVERSED)) {
continue;
}
aP2D0.Coord(aX0, aY0);
aP2D1.Coord(aX1, aY1);
//
- aS=aS+(aY0+aY1)*(aX1-aX0);
+ aS=aS+(aY0+aY1)*(aX1-aX0);
//
aP2D0=aP2D1;
}
- }//for (; aItW.More(); aItW.Next()) {
+ }//for (; aItW.More(); aItW.Next()) {
bIsHole=(aS>0.);
return bIsHole;
}
//=======================================================================
//function : IsHole
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aShell)
{
}
//=======================================================================
//function : ComputeProps
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer ComputeProps(const TopoDS_Face& aF,
Standard_Real& aA,
}
//=======================================================================
//function : BuildTriangulation
-//purpose :
+//purpose :
//=======================================================================
void BuildTriangulation(const TopoDS_Face& aF)
{
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_BuilderTools.hxx
+// Author: Peter KURNEV
+
#ifndef _GEOMAlgo_BuilderTools_HeaderFile
#define _GEOMAlgo_BuilderTools_HeaderFile
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class TopoDS_Shape;
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_BuilderTools {
-
-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_Boolean IsHole(const TopoDS_Shape& aW,const TopoDS_Shape& aF) ;
-
-
-Standard_EXPORT static Standard_Boolean IsHole(const TopoDS_Shape& aShell) ;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+#include <Standard_Boolean.hxx>
+#include <TopoDS_Shape.hxx>
+
+//=======================================================================
+//class : GEOMAlgo_BuilderTools
+//purpose :
+//=======================================================================
+class GEOMAlgo_BuilderTools
+{
+ public:
+ Standard_EXPORT
+ static Standard_Boolean IsHole(const TopoDS_Shape& aW,
+ const TopoDS_Shape& aF) ;
+
+ Standard_EXPORT
+ static Standard_Boolean IsHole(const TopoDS_Shape& aShell) ;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BuilderTools.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _GEOMAlgo_BuilderTools_HeaderFile
-#include <GEOMAlgo_BuilderTools.hxx>
-#endif
//=======================================================================
//function : Shapes1
-//purpose :
+//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_Builder::Shapes1(const Standard_Integer theType)const
{
}
//=======================================================================
//function : Images
-//purpose :
+//purpose :
//=======================================================================
const BRepAlgo_Image& GEOMAlgo_Builder::Images()const
{
}
//=======================================================================
//function : InParts
-//purpose :
+//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_Builder::InParts(const TopoDS_Shape& theS)const
{
//
// File: GEOMAlgo_Builder_1.cxx
-// Author: Peter KURNEV
-
+// Created:
+// Author: Peter KURNEV
+//
#include <GEOMAlgo_Builder.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
-#include <GEOMAlgo_Tools3D.hxx>
-
-#include <NMTTools_PaveFiller.hxx>
-#include <NMTTools_CommonBlockPool.hxx>
-#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-#include <NMTTools_CommonBlock.hxx>
-#include <NMTTools_CommonBlockPool.hxx>
-#include <NMTTools_ListOfCommonBlock.hxx>
-#include <NMTTools_CommonBlockAPI.hxx>
-
-#include <NMTDS_ShapesDataStructure.hxx>
-
+//
#include <TColStd_ListOfInteger.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Iterator.hxx>
-
+//
#include <TopTools_MapOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
-
+//
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
-
+//
#include <IntTools_Context.hxx>
-
#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
#include <BOPTools_ListOfPaveBlock.hxx>
#include <BOPTools_PaveBlock.hxx>
+//
+#include <NMTDS_ShapesDataStructure.hxx>
+//
+#include <NMTTools_PaveFiller.hxx>
+#include <NMTTools_CommonBlockPool.hxx>
+#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
+#include <NMTTools_CommonBlock.hxx>
+#include <NMTTools_CommonBlockPool.hxx>
+#include <NMTTools_ListOfCommonBlock.hxx>
+#include <NMTTools_CommonBlockAPI.hxx>
+//
+#include <GEOMAlgo_Tools3D.hxx>
+#include <TColStd_ListIteratorOfListOfInteger.hxx>
+
static
//=======================================================================
//function : FillImagesVertices
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Builder::FillImagesVertices()
{
}
//=======================================================================
// function: FillImagesEdges
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_Builder::FillImagesEdges()
{
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
NMTTools_PaveFiller* pPF=myPaveFiller;
const BOPTools_SplitShapesPool& aSSP=pPF->SplitShapesPool();
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aCtx=pPF->Context();
-#else
- IntTools_Context& aCtx=pPF->ChangeContext();
-#endif
//
Standard_Boolean bToReverse;
Standard_Integer i, aNb, aNbSp, nSp, nSpR, nSpx, aIsCB, aNbLB;
}
//
myImages.Bind(aE, aLSp);
-
+
}//for (i=1; i<=aNb; ++i)
}
//=======================================================================
// function: FillImagesContainers
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_Builder::FillImagesContainers(const TopAbs_ShapeEnum theType)
{
TopAbs_ShapeEnum aType;
BRep_Builder aBB;
TopoDS_Iterator aIt;
- TopTools_ListIteratorOfListOfShape aItIm;
+ TopTools_ListIteratorOfListOfShape aItIm;
TopTools_MapOfShape aMS;
TopTools_MapIteratorOfMapOfShape aItS;
//
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
NMTTools_PaveFiller* pPF=myPaveFiller;
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aCtx= pPF->Context();
-#else
- IntTools_Context& aCtx= pPF->ChangeContext();
-#endif
//
aNbS=aDS.NumberOfShapesOfTheObject();
for (i=1; i<=aNbS; ++i) {
aBB.Add(aCIm, aF);
}
}
- myImages.Bind(aC, aCIm);
+ myImages.Bind(aC, aCIm);
}// for (; aItS.More(); aItS.Next()) {
}
//=======================================================================
// function: FillImagesCompounds
-// purpose:
+// purpose:
//=======================================================================
void FillImagesCompounds(const TopTools_MapOfShape& theMS,
BRepAlgo_Image& theImages)
}
//=======================================================================
//function : FillImagesCompound
-//purpose :
+//purpose :
//=======================================================================
void FillImagesCompound(const TopoDS_Shape& theS,
BRepAlgo_Image& theImages,
TopTools_MapOfShape& theMFP)
-{
+{
Standard_Boolean bInterferred;
TopAbs_ShapeEnum aTypeX;
TopAbs_Orientation aOrX;
TopoDS_Iterator aIt;
BRep_Builder aBB;
- TopTools_ListIteratorOfListOfShape aItIm;
+ TopTools_ListIteratorOfListOfShape aItIm;
//
if (!theMFP.Add(theS)) {
return;
aBB.Add(aCIm, aSX);
}
}
- theImages.Bind(theS, aCIm);
+ theImages.Bind(theS, aCIm);
}
#include <GEOMAlgo_Builder.hxx>
-#include <Basics_OCCTVersion.hxx>
-
-#include <GEOMAlgo_Tools3D.hxx>
-#include <GEOMAlgo_WireEdgeSet.hxx>
-#include <GEOMAlgo_BuilderFace.hxx>
-#include <GEOMAlgo_ShapeSet.hxx>
-
-#include <NMTTools_PaveFiller.hxx>
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#include <NMTTools_Tools.hxx>
-#include <NMTTools_CoupleOfShape.hxx>
-#include <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#include <NMTTools_Tools.hxx>
-#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-#include <NMTTools_ListOfCommonBlock.hxx>
-#include <NMTTools_CommonBlock.hxx>
-#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
-
-#include <NMTDS_BoxBndTree.hxx>
-#include <NMTDS_ShapesDataStructure.hxx>
-#include <NMTDS_InterfPool.hxx>
+#include <TColStd_IndexedMapOfInteger.hxx>
+#include <TColStd_ListOfInteger.hxx>
#include <TopAbs_Orientation.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_DataMapOfIntegerShape.hxx>
-#include <TopTools_DataMapOfShapeInteger.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <IntTools_Context.hxx>
#include <IntTools_FClass2d.hxx>
-#include <Bnd_Box.hxx>
-#include <BRepBndLib.hxx>
-
#include <BooleanOperations_OnceExplorer.hxx>
-
#include <BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx>
-
#include <BOPTools_ListOfPaveBlock.hxx>
#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
#include <BOPTools_CArray1OfSSInterference.hxx>
#include <BOPTools_ESInterference.hxx>
#include <BOPTools_CArray1OfESInterference.hxx>
-#include <NCollection_UBTreeFiller.hxx>
+#include <NMTDS_ShapesDataStructure.hxx>
+#include <NMTDS_InterfPool.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NMTTools_PaveFiller.hxx>
+#include <NMTTools_ListOfCoupleOfShape.hxx>
+#include <NMTTools_Tools.hxx>
+#include <NMTTools_CoupleOfShape.hxx>
+#include <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
+#include <NMTTools_Tools.hxx>
+#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
+#include <NMTTools_ListOfCommonBlock.hxx>
+#include <NMTTools_CommonBlock.hxx>
+#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
+//
+#include <GEOMAlgo_Tools3D.hxx>
+#include <GEOMAlgo_WireEdgeSet.hxx>
+#include <GEOMAlgo_BuilderFace.hxx>
+
+#include <GEOMAlgo_ShapeSet.hxx>
+//
+#include <NMTDS_BoxBndTree.hxx>
+#include <NCollection_UBTreeFiller.hxx>
+#include <Bnd_Box.hxx>
+#include <BRepBndLib.hxx>
+#include <TopTools_DataMapOfIntegerShape.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
+#include <TopTools_DataMapOfShapeInteger.hxx>
static
void UpdateCandidates(const Standard_Integer ,
//modified by NIZNHY-PKV Thu Feb 16 12:24:52 2012f
static
- Standard_Boolean IsClosed(const TopoDS_Edge& aE,
- const TopoDS_Face& aF);
+ Standard_Boolean IsClosed(const TopoDS_Edge& ,
+ const TopoDS_Face& );
//modified by NIZNHY-PKV Thu Feb 16 12:24:56 2012t
//=======================================================================
NMTTools_PaveFiller* pPF=myPaveFiller;
NMTDS_InterfPool* pIP=pPF->IP();
BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aCtx= pPF->Context();
-#else
- IntTools_Context& aCtx= pPF->ChangeContext();
-#endif
//
Standard_Boolean bToReverse, bIsClosed, bIsDegenerated;
Standard_Integer i, aNb, aNbF, nF;
}
//
bIsDegenerated=BRep_Tool::Degenerated(aE);
- //modified by NIZNHY-PKV Thu Feb 16 12:25:04 2012f
+ //modified by NIZNHY-PKV Wed Mar 07 07:46:09 2012f
bIsClosed=IsClosed(aE, aF);
//bIsClosed=BRep_Tool::IsClosed(aE, aF);
- //modified by NIZNHY-PKV Thu Feb 16 12:25:09 2012t
+ //modified by NIZNHY-PKV Wed Mar 07 07:46:13 2012t
//
const TopTools_ListOfShape& aLIE=myImages.Image(aE);
aIt.Initialize(aLIE);
NMTTools_PaveFiller* pPF=myPaveFiller;
NMTDS_InterfPool* pIP=pPF->IP();
BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& aCtx=pPF->Context();
-#else
- IntTools_Context& aCtx=pPF->ChangeContext();
-#endif
+ const Handle(IntTools_Context)& aCtx= pPF->Context();
//
//
//mySameDomainShapes.Clear();
// 2. Find Chains
NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMC;
//
- NMTTools_Tools::FindChains(aLCS, aMC);
+ NMTTools_Tools::FindChains(aLCS, aMC);
//
Standard_Boolean bIsImage;
Standard_Integer aIx, aIxMin, aNbMSDF, k, aNbMFj;
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
NMTTools_PaveFiller* pPF=myPaveFiller;
NMTDS_InterfPool* pIP=pPF->IP();
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aCtx= pPF->Context();
-#else
- IntTools_Context& aCtx= pPF->ChangeContext();
-#endif
//
BOPTools_CArray1OfVSInterference& aVFs=pIP->VSInterferences();
BOPTools_CArray1OfESInterference& aEFs=pIP->ESInterferences();
for (; aIt.More(); aIt.Next()) {
TopoDS_Face aFx=TopoDS::Face(aIt.Value());
// update classifier
-#if OCC_VERSION_LARGE > 0x06050200
IntTools_FClass2d& aClsf=aCtx->FClass2d(aFx);
-#else
- IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx);
-#endif
aClsf.Init(aFx, aTol);
//
-#if OCC_VERSION_LARGE > 0x06050200
iFlag=aCtx->ComputeVS (aV, aFx, aU1, aU2);
-#else
- iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2);
-#endif
if (!iFlag) {
aBB.Add(aFx, aV);
break;
else {
const TopoDS_Face& aFx=TopoDS::Face(aF);
// update classifier
-#if OCC_VERSION_LARGE > 0x06050200
IntTools_FClass2d& aClsf=aCtx->FClass2d(aFx);
-#else
- IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx);
-#endif
aClsf.Init(aFx, aTol);
//
-#if OCC_VERSION_LARGE > 0x06050200
iFlag=aCtx->ComputeVS (aV, aFx, aU1, aU2);
-#else
- iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2);
-#endif
if (!iFlag) {
TopoDS_Face aFz;
//
//modified by NIZNHY-PKV Thu Feb 16 12:25:16 2012f
//=======================================================================
//function : IsClosed
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean IsClosed(const TopoDS_Edge& aE,
const TopoDS_Face& aF)
const TopoDS_Shape& aEx=aExp.Current();
//
if (aM.Add(aEx)) {
- if (aEx.IsSame(aE)) {
+ bRet=aEx.IsSame(aE);
+ if (bRet) {
break;
}
}
}
- bRet=!bRet;
}
return bRet;
}
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
// File : GEOMAlgo_Builder_3.cxx
+// Created :
// Author : Peter KURNEV
#include <GEOMAlgo_Builder.hxx>
-#include <Basics_OCCTVersion.hxx>
-
-#include <GEOMAlgo_Tools3D.hxx>
-#include <GEOMAlgo_BuilderSolid.hxx>
-#include <GEOMAlgo_ShapeSet.hxx>
-#include <GEOMAlgo_DataMapOfShapeShapeSet.hxx>
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx>
-
-#include <NMTTools_PaveFiller.hxx>
-
-#include <NMTDS_ShapesDataStructure.hxx>
-
#include <TopAbs_State.hxx>
#include <TopoDS.hxx>
#include <IntTools_Context.hxx>
+#include <NMTDS_ShapesDataStructure.hxx>
+#include <NMTTools_PaveFiller.hxx>
+
+#include <GEOMAlgo_Tools3D.hxx>
+#include <GEOMAlgo_BuilderSolid.hxx>
+#include <GEOMAlgo_ShapeSet.hxx>
+#include <GEOMAlgo_DataMapOfShapeShapeSet.hxx>
+#include <GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx>
+
+
static
void OwnInternalShapes(const TopoDS_Shape& ,
myErrorStatus=0;
//
NMTTools_PaveFiller* pPF=myPaveFiller;
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& aCtx=pPF->Context();
-#else
- IntTools_Context& aCtx=pPF->ChangeContext();
-#endif
+ const Handle(IntTools_Context)& aCtx= pPF->Context();
//
Standard_Boolean bToReverse;
Standard_Integer iFlag;
//
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
NMTTools_PaveFiller* pPF=myPaveFiller;
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& aCtx=pPF->Context();
-#else
- IntTools_Context& aCtx=pPF->ChangeContext();
-#endif
+ const Handle(IntTools_Context)& aCtx= pPF->Context();
//
Standard_Boolean bIsIN, bHasImage;
Standard_Integer aNbS, aNbSolids, i, j, aNbFaces, aNbFP, aNbFPx, aNbFIN, aNbLIF;
//
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
NMTTools_PaveFiller* pPF=myPaveFiller;
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& aCtx=pPF->Context();
-#else
- IntTools_Context& aCtx=pPF->ChangeContext();
-#endif
+ const Handle(IntTools_Context)& aCtx= pPF->Context();
//
Standard_Integer i, aNbS, iErr;
TopExp_Explorer aExp;
//modified by NIZNHY-PKV Wed Oct 27 09:53:18 2010t
//
// 1.3 Build new solids
-#if OCC_VERSION_LARGE > 0x06050200
aSB.SetContext(aCtx);
-#endif
aSB.SetShapes(aSFS1);
aSB.Perform();
iErr=aSB.ErrorStatus();
//
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
NMTTools_PaveFiller* pPF=myPaveFiller;
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aCtx= pPF->Context();
-#else
- IntTools_Context& aCtx= pPF->ChangeContext();
-#endif
//
//Standard_Boolean bHasImage;
Standard_Integer i, j, jT, aNbS, aNbSI, aNbSx, aNbSd;
//
// File: GEOMAlgo_Builder_4.cxx
+// Created:
// Author: Peter KURNEV
-
+//
#include <GEOMAlgo_Builder.hxx>
-#include <GEOMAlgo_Tools3D.hxx>
-
-#include <NMTTools_PaveFiller.hxx>
-
-#include <NMTDS_ShapesDataStructure.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
#include <TopoDS_Iterator.hxx>
#include <TopTools_ListOfShape.hxx>
#include <IntTools_Context.hxx>
+#include <NMTDS_ShapesDataStructure.hxx>
+
+#include <NMTTools_PaveFiller.hxx>
+
+#include <GEOMAlgo_Tools3D.hxx>
+
static
void MapShapes(const TopoDS_Shape& aS,
TopTools_MapOfShape& aM);
const TopTools_ListOfShape& GEOMAlgo_Builder::Generated(const TopoDS_Shape& theS)
{
NMTTools_PaveFiller* pPF=myPaveFiller;
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aCtx=pPF->Context();
-#else
- IntTools_Context& aCtx=pPF->ChangeContext();
-#endif
//
Standard_Boolean bHasImage, bToReverse;
TopAbs_ShapeEnum aType;
const TopTools_ListOfShape& GEOMAlgo_Builder::Modified(const TopoDS_Shape& theS)
{
NMTTools_PaveFiller* pPF=myPaveFiller;
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aCtx=pPF->Context();
-#else
- IntTools_Context& aCtx=pPF->ChangeContext();
-#endif
//
Standard_Boolean bHasImage, bToReverse;
TopAbs_ShapeEnum aType;
}
}
}
+
}
//=======================================================================
//function : MapShapes
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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;
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: GEOMAlgo_Classifier.cxx
+// File: GEOMAlgo_Clsf.cxx
// Created: Wed Nov 22 10:23:04 2006
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <GEOMAlgo_Clsf.ixx>
+#include <GEOMAlgo_Clsf.hxx>
+
+IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_Clsf, GEOMAlgo_HAlgo);
+IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_Clsf, GEOMAlgo_HAlgo);
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
GEOMAlgo_Clsf::GEOMAlgo_Clsf()
:
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_Clsf::~GEOMAlgo_Clsf()
{
}
//=======================================================================
//function : SetTolerance
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Clsf::SetTolerance(const Standard_Real aT)
{
}
//=======================================================================
//function : Tolerance
-//purpose :
+//purpose :
//=======================================================================
Standard_Real GEOMAlgo_Clsf::Tolerance()const
{
}
//=======================================================================
//function : SetPnt
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Clsf::SetPnt(const gp_Pnt& aP)
{
}
//=======================================================================
//function : Pnt
-//purpose :
+//purpose :
//=======================================================================
const gp_Pnt& GEOMAlgo_Clsf::Pnt()const
{
}
//=======================================================================
//function : State
-//purpose :
+//purpose :
//=======================================================================
TopAbs_State GEOMAlgo_Clsf::State() const
{
}
//=======================================================================
//function : CanBeON
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_Clsf::CanBeON(const Handle(Geom_Curve)& ) const
{
}
//=======================================================================
//function : CanBeON
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_Clsf::CanBeON(const Handle(Geom_Surface)& ) const
{
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_Clsf.hxx
+// Created: Wed Nov 22 10:23:04 2006
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#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 <Standard_DefineHandle.hxx>
+//#include <Handle_GEOMAlgo_Clsf.hxx>
#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) ;
+#include <Geom_Curve.hxx>
+#include <Geom_Surface.hxx>
+DEFINE_STANDARD_HANDLE(GEOMAlgo_Clsf, GEOMAlgo_HAlgo);
-Standard_EXPORT Standard_Real Tolerance() const;
+//=======================================================================
+//class : GEOMAlgo_Clsf
+//purpose :
+//=======================================================================
+class GEOMAlgo_Clsf : public GEOMAlgo_HAlgo
+{
+ public:
+ Standard_EXPORT
+ void SetPnt(const gp_Pnt& aP) ;
+ Standard_EXPORT
+ const gp_Pnt& Pnt() const;
-Standard_EXPORT TopAbs_State State() const;
+ Standard_EXPORT
+ void SetTolerance(const Standard_Real aT) ;
+ Standard_EXPORT
+ Standard_Real Tolerance() const;
-Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aCT) 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();
+ Standard_EXPORT
+ virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
+ DEFINE_STANDARD_RTTI(GEOMAlgo_Clsf);
+ protected:
+ Standard_EXPORT
+ GEOMAlgo_Clsf();
+ Standard_EXPORT
+ virtual ~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
- //
-
-
+ TopAbs_State myState;
+ gp_Pnt myPnt;
+ Standard_Real myTolerance;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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;
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: GEOMAlgo_ClsfSurf.cxx
+// File: GEOMAlgo_ClsfBox.cxx
// Created: Wed Nov 22 10:41:47 2006
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <GEOMAlgo_ClsfBox.ixx>
+#include <GEOMAlgo_ClsfBox.hxx>
+
#include <GeomAbs_SurfaceType.hxx>
#include <GEOMAlgo_SurfaceTools.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <gp_Ax1.hxx>
#include <Geom_Plane.hxx>
+IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf)
+IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf)
+
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
GEOMAlgo_ClsfBox::GEOMAlgo_ClsfBox()
:
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_ClsfBox::~GEOMAlgo_ClsfBox()
{
}
//=======================================================================
//function : SetBox
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ClsfBox::SetBox(const TopoDS_Shape& aBox)
{
}
//=======================================================================
//function : Box
-//purpose :
+//purpose :
//=======================================================================
const TopoDS_Shape& GEOMAlgo_ClsfBox::Box() const
{
}
//=======================================================================
//function : CheckData
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ClsfBox::CheckData()
-{
+{
Standard_Integer i, aNbF;
TopAbs_ShapeEnum aTypeShape;
TopAbs_Orientation aOr;
aS=BRep_Tool::Surface(aF);
myGAS[i-1].Load(aS);
aType=myGAS[i-1].GetType();
- if (!aType==GeomAbs_Plane) {
+ if (!aType==GeomAbs_Plane) {
myErrorStatus=13; // unallowed surface type
return;
}
}
//=======================================================================
//function : Perform
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ClsfBox::Perform()
{
}
*/
iNext=1;
- aNbON=0;
+ aNbON=0;
aNbIN=0;
for(i=0; i<aNbS && iNext; i++) {
GEOMAlgo_SurfaceTools::GetState(myPnt, myGAS[i], myTolerance, aSt);
default:
myState=TopAbs_UNKNOWN;
iNext=0;
- break;
+ break;
}
}
//
}
//=======================================================================
//function : CanBeON
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_ClsfBox::CanBeON(const Handle(Geom_Curve)& aC) const
{
}
//=======================================================================
//function : CanBeON
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_ClsfBox::CanBeON(const Handle(Geom_Surface)& aS1) const
{
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_ClsfBox.hxx
+// Created: Wed Nov 22 10:41:47 2006
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#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 <Standard_DefineHandle.hxx>
+//#include <Handle_GEOMAlgo_ClsfBox.hxx>
#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
- //
+#include <Geom_Curve.hxx>
+#include <Geom_Surface.hxx>
+DEFINE_STANDARD_HANDLE(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf)
-Standard_EXPORT GEOMAlgo_ClsfBox();
-Standard_EXPORT virtual ~GEOMAlgo_ClsfBox();
+//=======================================================================
+//function : GEOMAlgo_ClsfBox
+//purpose :
+//=======================================================================
+class GEOMAlgo_ClsfBox : public GEOMAlgo_Clsf
+{
+ public:
+ Standard_EXPORT
+ GEOMAlgo_ClsfBox();
+ Standard_EXPORT
+ virtual ~GEOMAlgo_ClsfBox();
-Standard_EXPORT void SetBox(const TopoDS_Shape& aS) ;
+ Standard_EXPORT
+ void SetBox(const TopoDS_Shape& aS) ;
+ Standard_EXPORT
+ const TopoDS_Shape& Box() const;
-Standard_EXPORT const TopoDS_Shape& Box() const;
+ Standard_EXPORT
+ virtual void Perform() ;
+ Standard_EXPORT
+ virtual void CheckData() ;
-Standard_EXPORT virtual void Perform() ;
+ 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 virtual void CheckData() ;
+ DEFINE_STANDARD_RTTI(GEOMAlgo_ClsfBox)
+ protected:
+ TopoDS_Shape myBox;
+ GeomAdaptor_Surface myGAS[6];
-Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aC) const;
+private:
-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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- 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_ClsfSolid.cdl
--- Created: Mon Jan 29 10:28:07 2007
--- Author: Peter KURNEV
--- <pkv@irinox>
---
-class ClsfSolid from GEOMAlgo
- inherits Clsf from GEOMAlgo
-
- ---Purpose:
-
-uses
- Shape from TopoDS
-
---raises
-
-is
- Create
- returns mutable ClsfSolid from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ClsfSolid();"
-
- SetShape(me:mutable;
- aS:Shape from TopoDS);
-
- Shape(me)
- returns Shape from TopoDS;
- ---C++: return const &
-
- Perform(me:mutable)
- is redefined;
-
- CheckData(me:mutable)
- is redefined;
-
-
-fields
- myShape: Shape from TopoDS is protected;
- myPClsf: Address from Standard is protected;
-
-end ClsfSolid;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <GEOMAlgo_ClsfSolid.ixx>
+#include <GEOMAlgo_ClsfSolid.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopoDS.hxx>
#include <BRep_Builder.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
+IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf)
+IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf)
+
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
GEOMAlgo_ClsfSolid::GEOMAlgo_ClsfSolid()
:
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_ClsfSolid::~GEOMAlgo_ClsfSolid()
{
}
//=======================================================================
//function : SetShape
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ClsfSolid::SetShape(const TopoDS_Shape& aS)
{
}
//=======================================================================
//function : Shape
-//purpose :
+//purpose :
//=======================================================================
const TopoDS_Shape& GEOMAlgo_ClsfSolid::Shape()const
{
}
//=======================================================================
//function : CheckData
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ClsfSolid::CheckData()
{
//
aType=myShape.ShapeType();
if (!(aType==TopAbs_SOLID || aType==TopAbs_SHELL)) {
- myErrorStatus=12;
+ myErrorStatus=12;
return;
}
//
}
//=======================================================================
//function : Perform
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ClsfSolid::Perform()
{
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_ClsfSolid.hxx
+// Created: Mon Jan 29 10:35:46 2007
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _GEOMAlgo_ClsfSolid_HeaderFile
#define _GEOMAlgo_ClsfSolid_HeaderFile
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_ClsfSolid_HeaderFile
-#include <Handle_GEOMAlgo_ClsfSolid.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
+#include <Standard_DefineHandle.hxx>
+//#include <Handle_GEOMAlgo_ClsfSolid.hxx>
#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _Standard_Address_HeaderFile
#include <Standard_Address.hxx>
-#endif
-#ifndef _GEOMAlgo_Clsf_HeaderFile
#include <GEOMAlgo_Clsf.hxx>
-#endif
-class TopoDS_Shape;
-
-
-
-class GEOMAlgo_ClsfSolid : public GEOMAlgo_Clsf {
-
-public:
- // Methods PUBLIC
- //
-
-
-Standard_EXPORT GEOMAlgo_ClsfSolid();
-Standard_EXPORT virtual ~GEOMAlgo_ClsfSolid();
-
-
-Standard_EXPORT void SetShape(const TopoDS_Shape& aS) ;
-
-
-Standard_EXPORT const TopoDS_Shape& Shape() const;
+DEFINE_STANDARD_HANDLE(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf)
-Standard_EXPORT virtual void Perform() ;
+//=======================================================================
+//class : GEOMAlgo_ClsfSolid
+//purpose :
+//=======================================================================
+class GEOMAlgo_ClsfSolid : public GEOMAlgo_Clsf
+{
+ public:
+ Standard_EXPORT
+ GEOMAlgo_ClsfSolid();
+ Standard_EXPORT
+ virtual ~GEOMAlgo_ClsfSolid();
-Standard_EXPORT virtual void CheckData() ;
-//Standard_EXPORT ~GEOMAlgo_ClsfSolid();
+ Standard_EXPORT
+ void SetShape(const TopoDS_Shape& aS) ;
+ Standard_EXPORT
+ const TopoDS_Shape& Shape() const;
+ Standard_EXPORT
+ virtual void Perform() ;
+ Standard_EXPORT
+ virtual void CheckData() ;
- // 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 myShape;
-Standard_Address myPClsf;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
+ DEFINE_STANDARD_RTTI(GEOMAlgo_ClsfSolid)
+ protected:
+ TopoDS_Shape myShape;
+ Standard_Address myPClsf;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_ClsfSolid.jxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-//GEOMAlgo_ClsfSolid::~GEOMAlgo_ClsfSolid() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ClsfSolid_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_ClsfSolid",
- sizeof(GEOMAlgo_ClsfSolid),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(GEOMAlgo_ClsfSolid) Handle(GEOMAlgo_ClsfSolid)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(GEOMAlgo_ClsfSolid) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_ClsfSolid))) {
- _anOtherObject = Handle(GEOMAlgo_ClsfSolid)((Handle(GEOMAlgo_ClsfSolid)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& GEOMAlgo_ClsfSolid::DynamicType() const
-{
- return STANDARD_TYPE(GEOMAlgo_ClsfSolid) ;
-}
-//Standard_Boolean GEOMAlgo_ClsfSolid::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(GEOMAlgo_ClsfSolid) == AType || GEOMAlgo_Clsf::IsKind(AType));
-//}
-//Handle_GEOMAlgo_ClsfSolid::~Handle_GEOMAlgo_ClsfSolid() {}
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 _GEOMAlgo_ClsfSolid_HeaderFile
-#include <GEOMAlgo_ClsfSolid.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <GEOMAlgo_ClsfSurf.ixx>
+#include <GEOMAlgo_ClsfSurf.hxx>
#include <GeomAbs_SurfaceType.hxx>
#include <GEOMAlgo_SurfaceTools.hxx>
#include <GeomAdaptor_Curve.hxx>
+IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf);
+IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf);
+
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
GEOMAlgo_ClsfSurf::GEOMAlgo_ClsfSurf()
:
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_ClsfSurf::~GEOMAlgo_ClsfSurf()
{
}
//=======================================================================
//function : SetSurface
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ClsfSurf::SetSurface(const Handle(Geom_Surface)& aS)
{
}
//=======================================================================
//function : Surface
-//purpose :
+//purpose :
//=======================================================================
const Handle(Geom_Surface)& GEOMAlgo_ClsfSurf::Surface() const
{
}
//=======================================================================
//function : CheckData
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ClsfSurf::CheckData()
{
//
myGAS.Load(myS);
aType=myGAS.GetType();
- if (!(aType==GeomAbs_Plane ||
+ if (!(aType==GeomAbs_Plane ||
aType==GeomAbs_Cylinder ||
aType==GeomAbs_Sphere)) {
myErrorStatus=11; // unallowed surface type
}
//=======================================================================
//function : Perform
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ClsfSurf::Perform()
{
}
//=======================================================================
//function : CanBeON
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_ClsfSurf::CanBeON(const Handle(Geom_Curve)& aC) const
{
}
//=======================================================================
//function : CanBeON
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_ClsfSurf::CanBeON(const Handle(Geom_Surface)& aS1) const
{
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_ClsfSurf.hxx
+// Created: Wed Nov 22 10:41:47 2006
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#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 <Standard_DefineHandle.hxx>
+//#include <Handle_GEOMAlgo_ClsfSurf.hxx>
#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;
-
+#include <Geom_Surface.hxx>
+#include <Geom_Curve.hxx>
-Standard_EXPORT virtual void Perform() ;
+DEFINE_STANDARD_HANDLE(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf)
+//=======================================================================
+// class : GEOMAlgo_ClsfSurf
+//purpose :
+//=======================================================================
+class GEOMAlgo_ClsfSurf : public GEOMAlgo_Clsf
+{
+ public:
+ Standard_EXPORT
+ GEOMAlgo_ClsfSurf();
-Standard_EXPORT virtual void CheckData() ;
+ Standard_EXPORT
+ virtual ~GEOMAlgo_ClsfSurf();
+ Standard_EXPORT
+ void SetSurface(const Handle(Geom_Surface)& aS) ;
-Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aC) const;
+ Standard_EXPORT
+ const Handle_Geom_Surface& Surface() const;
+ Standard_EXPORT
+ virtual void Perform() ;
-Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
-//Standard_EXPORT ~GEOMAlgo_ClsfSurf();
+ 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;
+ DEFINE_STANDARD_RTTI(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
- //
-
-
+ protected:
+ Handle_Geom_Surface myS;
+ GeomAdaptor_Surface myGAS;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_CoupleOfShapes.cdl
--- Created: Wed Dec 15 13:00:10 2004
--- Author: Peter KURNEV
---
-class CoupleOfShapes from GEOMAlgo
-
- ---Purpose:
-
-uses
- Shape from TopoDS
-
---raises
-
-is
- Create
- returns CoupleOfShapes from GEOMAlgo;
-
- SetShapes(me:out;
- aS1: Shape from TopoDS;
- aS2: Shape from TopoDS);
-
- SetShape1(me:out;
- aS1: Shape from TopoDS);
-
- SetShape2(me:out;
- aS2: Shape from TopoDS);
-
- Shapes(me;
- aS1:out Shape from TopoDS;
- aS2:out Shape from TopoDS);
-
- Shape1(me)
- returns Shape from TopoDS;
- ---C++:return const &
-
- Shape2(me)
- returns Shape from TopoDS;
- ---C++:return const &
-
-fields
-
- myShape1: Shape from TopoDS is protected;
- myShape2: Shape from TopoDS is protected;
-
-end CoupleOfShapes;
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
// File: GEOMAlgo_CoupleOfShapes.cxx
// Created: Wed Dec 15 13:03:52 2004
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <GEOMAlgo_CoupleOfShapes.ixx>
+#include <GEOMAlgo_CoupleOfShapes.hxx>
//=======================================================================
//function : GEOMAlgo_CoupleOfShapes
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_CoupleOfShapes::GEOMAlgo_CoupleOfShapes()
{}
//=======================================================================
//function : SetShapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_CoupleOfShapes::SetShapes(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2)
}
//=======================================================================
//function : Shapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_CoupleOfShapes::Shapes(TopoDS_Shape& aS1,
TopoDS_Shape& aS2)const
}
//=======================================================================
//function : SetShape1
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_CoupleOfShapes::SetShape1(const TopoDS_Shape& aS1)
{
}
//=======================================================================
//function : SetShape2
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_CoupleOfShapes::SetShape2(const TopoDS_Shape& aS2)
{
}
//=======================================================================
//function : Shape1
-//purpose :
+//purpose :
//=======================================================================
const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape1()const
{
}
//=======================================================================
//function : Shape2
-//purpose :
+//purpose :
//=======================================================================
const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape2()const
{
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_CoupleOfShapes.hxx
+// Created: Wed Dec 15 13:03:52 2004
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _GEOMAlgo_CoupleOfShapes_HeaderFile
#define _GEOMAlgo_CoupleOfShapes_HeaderFile
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-class TopoDS_Shape;
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_CoupleOfShapes {
-
-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_CoupleOfShapes();
-
-
-Standard_EXPORT void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ;
-
-
-Standard_EXPORT void SetShape1(const TopoDS_Shape& aS1) ;
-
-
-Standard_EXPORT void SetShape2(const TopoDS_Shape& aS2) ;
-
-
-Standard_EXPORT void Shapes(TopoDS_Shape& aS1,TopoDS_Shape& aS2) const;
-
+#include <TopoDS_Shape.hxx>
-Standard_EXPORT const TopoDS_Shape& Shape1() const;
+//=======================================================================
+//class : GEOMAlgo_CoupleOfShapes
+//purpose :
+//=======================================================================
+class GEOMAlgo_CoupleOfShapes
+{
+ public:
+ Standard_EXPORT
+ GEOMAlgo_CoupleOfShapes();
+ Standard_EXPORT
+ void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ;
-Standard_EXPORT const TopoDS_Shape& Shape2() const;
+ Standard_EXPORT
+ void SetShape1(const TopoDS_Shape& aS1) ;
+ Standard_EXPORT
+ void SetShape2(const TopoDS_Shape& aS2) ;
+ Standard_EXPORT
+ void Shapes(TopoDS_Shape& aS1,TopoDS_Shape& aS2) const;
+ Standard_EXPORT
+ const TopoDS_Shape& Shape1() const;
+ Standard_EXPORT
+ const TopoDS_Shape& Shape2() const;
protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-TopoDS_Shape myShape1;
-TopoDS_Shape myShape2;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+ TopoDS_Shape myShape1;
+ TopoDS_Shape myShape2;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_CoupleOfShapes.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _GEOMAlgo_CoupleOfShapes_HeaderFile
-#include <GEOMAlgo_CoupleOfShapes.hxx>
-#endif
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx
+// Created: Wed Feb 22 11:05:01 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
-#define _GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
-
-#ifndef _TCollection_BasicMapIterator_HeaderFile
-#include <TCollection_BasicMapIterator.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
-#endif
-class Standard_NoSuchObject;
-class TopoDS_Shape;
-class TopTools_OrientedShapeMapHasher;
-class GEOMAlgo_DataMapOfOrientedShapeShape;
-class GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape;
+#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
+#define GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
+#ifndef GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
+#include <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape : public TCollection_BasicMapIterator {
-
-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_DataMapIteratorOfDataMapOfOrientedShapeShape();
-
-
-Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape(const GEOMAlgo_DataMapOfOrientedShapeShape& aMap);
-
-
-Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfOrientedShapeShape& aMap) ;
-
-
-Standard_EXPORT const TopoDS_Shape& Key() const;
-
-
-Standard_EXPORT const TopoDS_Shape& Value() const;
-
-
-
-
-
-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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopTools_OrientedShapeMapHasher_HeaderFile
-#include <TopTools_OrientedShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
-#include <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
-#include <GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
-#endif
-
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem TopoDS_Shape
-#define TheItem_hxx <TopoDS_Shape.hxx>
-#define Hasher TopTools_OrientedShapeMapHasher
-#define Hasher_hxx <TopTools_OrientedShapeMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfOrientedShapeShape
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
-#include <TCollection_DataMapIterator.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx
+// Created: Wed Feb 22 10:58:14 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile
-#define _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile
-
-#ifndef _TCollection_BasicMapIterator_HeaderFile
-#include <TCollection_BasicMapIterator.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx>
-#endif
-class Standard_NoSuchObject;
-class GEOMAlgo_PassKey;
-class GEOMAlgo_PassKeyMapHasher;
-class GEOMAlgo_DataMapOfPassKeyInteger;
-class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger;
+#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile
+#define GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
+#ifndef GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile
+#include <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
#endif
-
-
-class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger : public TCollection_BasicMapIterator {
-
-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_DataMapIteratorOfDataMapOfPassKeyInteger();
-
-
-Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger(const GEOMAlgo_DataMapOfPassKeyInteger& aMap);
-
-
-Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfPassKeyInteger& aMap) ;
-
-
-Standard_EXPORT const GEOMAlgo_PassKey& Key() const;
-
-
-Standard_EXPORT const Standard_Integer& Value() const;
-
-
-
-
-
-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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKey_HeaderFile
-#include <GEOMAlgo_PassKey.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile
-#include <GEOMAlgo_PassKeyMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile
-#include <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile
-#include <GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx>
-#endif
-
-
-#define TheKey GEOMAlgo_PassKey
-#define TheKey_hxx <GEOMAlgo_PassKey.hxx>
-#define TheItem Standard_Integer
-#define TheItem_hxx <Standard_Integer.hxx>
-#define Hasher GEOMAlgo_PassKeyMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyInteger
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
-#include <TCollection_DataMapIterator.gxx>
-
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx
+// Created: Wed Feb 22 11:01:34 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile
-#define _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile
-
-#ifndef _TCollection_BasicMapIterator_HeaderFile
-#include <TCollection_BasicMapIterator.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx>
-#endif
-class Standard_NoSuchObject;
-class GEOMAlgo_PassKeyShape;
-class TopoDS_Shape;
-class GEOMAlgo_PassKeyShapeMapHasher;
-class GEOMAlgo_DataMapOfPassKeyShapeShape;
-class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape;
+#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile
+#define GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
+#ifndef GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile
+#include <GEOMAlgo_DataMapOfPassKeyShapeShape.hxx>
#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape : public TCollection_BasicMapIterator {
-
-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_DataMapIteratorOfDataMapOfPassKeyShapeShape();
-
-
-Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape(const GEOMAlgo_DataMapOfPassKeyShapeShape& aMap);
-
-
-Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfPassKeyShapeShape& aMap) ;
-
-
-Standard_EXPORT const GEOMAlgo_PassKeyShape& Key() const;
-
-
-Standard_EXPORT const TopoDS_Shape& Value() const;
-
-
-
-
-
-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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKeyShape_HeaderFile
-#include <GEOMAlgo_PassKeyShape.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile
-#include <GEOMAlgo_PassKeyShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile
-#include <GEOMAlgo_DataMapOfPassKeyShapeShape.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile
-#include <GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx>
-#endif
-
-
-#define TheKey GEOMAlgo_PassKeyShape
-#define TheKey_hxx <GEOMAlgo_PassKeyShape.hxx>
-#define TheItem TopoDS_Shape
-#define TheItem_hxx <TopoDS_Shape.hxx>
-#define Hasher GEOMAlgo_PassKeyShapeMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyShapeMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyShapeShape
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfPassKeyShapeShape.hxx>
-#include <TCollection_DataMapIterator.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx
+// Created: Wed Feb 22 10:53:47 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile
-#define _GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile
-
-#ifndef _TCollection_BasicMapIterator_HeaderFile
-#include <TCollection_BasicMapIterator.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx>
-#endif
-class Standard_NoSuchObject;
-class TopTools_ListOfShape;
-class TColStd_MapRealHasher;
-class GEOMAlgo_DataMapOfRealListOfShape;
-class GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape;
+#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile
+#define GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
+#ifndef GEOMAlgo_DataMapOfRealListOfShape_HeaderFile
+#include <GEOMAlgo_DataMapOfRealListOfShape.hxx>
#endif
-
-
-class GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape : public TCollection_BasicMapIterator {
-
-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_DataMapIteratorOfDataMapOfRealListOfShape();
-
-
-Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape(const GEOMAlgo_DataMapOfRealListOfShape& aMap);
-
-
-Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfRealListOfShape& aMap) ;
-
-
-Standard_EXPORT const Standard_Real& Key() const;
-
-
-Standard_EXPORT const TopTools_ListOfShape& Value() const;
-
-
-
-
-
-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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapIteratorOfDataMapOfRealListOfShape.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TColStd_MapRealHasher_HeaderFile
-#include <TColStd_MapRealHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapOfRealListOfShape_HeaderFile
-#include <GEOMAlgo_DataMapOfRealListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile
-#include <GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx>
-#endif
-
-
-#define TheKey Standard_Real
-#define TheKey_hxx <Standard_Real.hxx>
-#define TheItem TopTools_ListOfShape
-#define TheItem_hxx <TopTools_ListOfShape.hxx>
-#define Hasher TColStd_MapRealHasher
-#define Hasher_hxx <TColStd_MapRealHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfRealListOfShape
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfRealListOfShape.hxx>
-#include <TCollection_DataMapIterator.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-\r
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile\r
-#define _GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_Macro_HeaderFile\r
-#include <Standard_Macro.hxx>\r
-#endif\r
-\r
-#ifndef _TCollection_BasicMapIterator_HeaderFile\r
-#include <TCollection_BasicMapIterator.hxx>\r
-#endif\r
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile\r
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx>\r
-#endif\r
-class Standard_NoSuchObject;\r
-class TopoDS_Shape;\r
-class TopTools_MapOfShape;\r
-class TopTools_ShapeMapHasher;\r
-class GEOMAlgo_DataMapOfShapeMapOfShape;\r
-class GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape;\r
-\r
-\r
-\r
-class GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape : public TCollection_BasicMapIterator {\r
-public:\r
-\r
- void* operator new(size_t,void* anAddress) \r
- {\r
- return anAddress;\r
- }\r
- void* operator new(size_t size) \r
- {\r
- return Standard::Allocate(size); \r
- }\r
- void operator delete(void *anAddress) \r
- {\r
- if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
- }\r
-\r
- \r
- Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape();\r
- \r
- Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape(const GEOMAlgo_DataMapOfShapeMapOfShape& aMap);\r
- \r
- Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfShapeMapOfShape& aMap) ;\r
- \r
- Standard_EXPORT const TopoDS_Shape& Key() const;\r
- \r
- Standard_EXPORT const TopTools_MapOfShape& Value() const;\r
-\r
-\r
-\r
-\r
-\r
-protected:\r
-\r
-\r
-\r
-\r
-\r
-private:\r
-\r
-\r
-\r
-\r
-\r
-};\r
-\r
-\r
-\r
-\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx
+// Created: Wed Feb 22 11:08:26 2012
+// Author:
+// <pkv@BDEURI37616>
+
+
+#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile
+#define GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile
+
+#ifndef GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile
+#include <GEOMAlgo_DataMapOfShapeMapOfShape.hxx>
+#endif
+#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx>\r
-\r
-#ifndef _Standard_NoSuchObject_HeaderFile\r
-#include <Standard_NoSuchObject.hxx>\r
-#endif\r
-#ifndef _TopoDS_Shape_HeaderFile\r
-#include <TopoDS_Shape.hxx>\r
-#endif\r
-#ifndef _TopTools_MapOfShape_HeaderFile\r
-#include <TopTools_MapOfShape.hxx>\r
-#endif\r
-#ifndef _TopTools_ShapeMapHasher_HeaderFile\r
-#include <TopTools_ShapeMapHasher.hxx>\r
-#endif\r
-#ifndef _GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile\r
-#include <GEOMAlgo_DataMapOfShapeMapOfShape.hxx>\r
-#endif\r
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile\r
-#include <GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx>\r
-#endif\r
- \r
-\r
-#define TheKey TopoDS_Shape\r
-#define TheKey_hxx <TopoDS_Shape.hxx>\r
-#define TheItem TopTools_MapOfShape\r
-#define TheItem_hxx <TopTools_MapOfShape.hxx>\r
-#define Hasher TopTools_ShapeMapHasher\r
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>\r
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape\r
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx>\r
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape\r
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx>\r
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape\r
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_Type_()\r
-#define TCollection_DataMap GEOMAlgo_DataMapOfShapeMapOfShape\r
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapeMapOfShape.hxx>\r
-#include <TCollection_DataMapIterator.gxx>\r
-\r
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-\r
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile\r
-#define _GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_Macro_HeaderFile\r
-#include <Standard_Macro.hxx>\r
-#endif\r
-\r
-#ifndef _TCollection_BasicMapIterator_HeaderFile\r
-#include <TCollection_BasicMapIterator.hxx>\r
-#endif\r
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile\r
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx>\r
-#endif\r
-class Standard_NoSuchObject;\r
-class TopoDS_Shape;\r
-class gp_Pnt;\r
-class TopTools_ShapeMapHasher;\r
-class GEOMAlgo_DataMapOfShapePnt;\r
-class GEOMAlgo_DataMapNodeOfDataMapOfShapePnt;\r
-\r
-\r
-\r
-class GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt : public TCollection_BasicMapIterator {\r
-public:\r
-\r
- void* operator new(size_t,void* anAddress) \r
- {\r
- return anAddress;\r
- }\r
- void* operator new(size_t size) \r
- {\r
- return Standard::Allocate(size); \r
- }\r
- void operator delete(void *anAddress) \r
- {\r
- if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
- }\r
-\r
- \r
- Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt();\r
- \r
- Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt(const GEOMAlgo_DataMapOfShapePnt& aMap);\r
- \r
- Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfShapePnt& aMap) ;\r
- \r
- Standard_EXPORT const TopoDS_Shape& Key() const;\r
- \r
- Standard_EXPORT const gp_Pnt& Value() const;\r
-\r
-\r
-\r
-\r
-\r
-protected:\r
-\r
-\r
-\r
-\r
-\r
-private:\r
-\r
-\r
-\r
-\r
-\r
-};\r
-\r
-\r
-\r
-\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx
+// Created: Wed Feb 22 11:11:09 2012
+// Author:
+// <pkv@BDEURI37616>
+
+
+#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile
+#define GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile
+
+#ifndef GEOMAlgo_DataMapOfShapePnt_HeaderFile
+#include <GEOMAlgo_DataMapOfShapePnt.hxx>
+#endif
+#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx>\r
-\r
-#ifndef _Standard_NoSuchObject_HeaderFile\r
-#include <Standard_NoSuchObject.hxx>\r
-#endif\r
-#ifndef _TopoDS_Shape_HeaderFile\r
-#include <TopoDS_Shape.hxx>\r
-#endif\r
-#ifndef _gp_Pnt_HeaderFile\r
-#include <gp_Pnt.hxx>\r
-#endif\r
-#ifndef _TopTools_ShapeMapHasher_HeaderFile\r
-#include <TopTools_ShapeMapHasher.hxx>\r
-#endif\r
-#ifndef _GEOMAlgo_DataMapOfShapePnt_HeaderFile\r
-#include <GEOMAlgo_DataMapOfShapePnt.hxx>\r
-#endif\r
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile\r
-#include <GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx>\r
-#endif\r
- \r
-\r
-#define TheKey TopoDS_Shape\r
-#define TheKey_hxx <TopoDS_Shape.hxx>\r
-#define TheItem gp_Pnt\r
-#define TheItem_hxx <gp_Pnt.hxx>\r
-#define Hasher TopTools_ShapeMapHasher\r
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>\r
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapePnt\r
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx>\r
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt\r
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx>\r
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt\r
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_Type_()\r
-#define TCollection_DataMap GEOMAlgo_DataMapOfShapePnt\r
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapePnt.hxx>\r
-#include <TCollection_DataMapIterator.gxx>\r
-\r
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx
+// Created: Wed Feb 22 10:49:11 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile
-#define _GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile
-
-#ifndef _TCollection_BasicMapIterator_HeaderFile
-#include <TCollection_BasicMapIterator.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx>
-#endif
-class Standard_NoSuchObject;
-class TopoDS_Shape;
-class TopTools_ShapeMapHasher;
-class GEOMAlgo_DataMapOfShapeReal;
-class GEOMAlgo_DataMapNodeOfDataMapOfShapeReal;
+#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile
+#define GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
+#ifndef GEOMAlgo_DataMapOfShapeReal_HeaderFile
+#include <GEOMAlgo_DataMapOfShapeReal.hxx>
#endif
-
-class GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal : public TCollection_BasicMapIterator {
-
-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_DataMapIteratorOfDataMapOfShapeReal();
-
-
-Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal(const GEOMAlgo_DataMapOfShapeReal& aMap);
-
-
-Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfShapeReal& aMap) ;
-
-
-Standard_EXPORT const TopoDS_Shape& Key() const;
-
-
-Standard_EXPORT const Standard_Real& Value() const;
-
-
-
-
-
-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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapIteratorOfDataMapOfShapeReal.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapOfShapeReal_HeaderFile
-#include <GEOMAlgo_DataMapOfShapeReal.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile
-#include <GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx>
-#endif
-
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem Standard_Real
-#define TheItem_hxx <Standard_Real.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeReal
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfShapeReal
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapeReal.hxx>
-#include <TCollection_DataMapIterator.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx
+// Created: Wed Feb 22 08:39:02 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile
-#define _GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile
-
-#ifndef _TCollection_BasicMapIterator_HeaderFile
-#include <TCollection_BasicMapIterator.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx>
-#endif
-class Standard_NoSuchObject;
-class TopoDS_Shape;
-class GEOMAlgo_ShapeSet;
-class TopTools_ShapeMapHasher;
-class GEOMAlgo_DataMapOfShapeShapeSet;
-class GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet;
+#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile
+#define GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
+#ifndef GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile
+#include <GEOMAlgo_DataMapOfShapeShapeSet.hxx>
#endif
-class GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet : public TCollection_BasicMapIterator
-{
-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);
- }
-
- Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet();
-
- Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet
- (const GEOMAlgo_DataMapOfShapeShapeSet& aMap);
-
- Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfShapeShapeSet& aMap);
-
- Standard_EXPORT const TopoDS_Shape& Key() const;
-
- Standard_EXPORT const GEOMAlgo_ShapeSet& Value() const;
-};
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapIteratorOfDataMapOfShapeShapeSet.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _GEOMAlgo_ShapeSet_HeaderFile
-#include <GEOMAlgo_ShapeSet.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile
-#include <GEOMAlgo_DataMapOfShapeShapeSet.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile
-#include <GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx>
-#endif
-
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem GEOMAlgo_ShapeSet
-#define TheItem_hxx <GEOMAlgo_ShapeSet.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfShapeShapeSet
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapeShapeSet.hxx>
-#include <TCollection_DataMapIterator.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
-#define _GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-
-class TopoDS_Shape;
-class TopTools_OrientedShapeMapHasher;
-class GEOMAlgo_DataMapOfOrientedShapeShape;
-class GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape;
-
-class GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape : public TCollection_MapNode {
-
-public:
- GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
- (const TopoDS_Shape& K, const TopoDS_Shape& I, const TCollection_MapNodePtr& n);
-
- TopoDS_Shape& Key() const;
- TopoDS_Shape& Value() const;
-
- DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)
-
-private:
- TopoDS_Shape myKey;
- TopoDS_Shape myValue;
-};
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem TopoDS_Shape
-#define TheItem_hxx <TopoDS_Shape.hxx>
-#define Hasher TopTools_OrientedShapeMapHasher
-#define Hasher_hxx <TopTools_OrientedShapeMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfOrientedShapeShape
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
-
-#include <TCollection_DataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_DataMapNode
-#undef TCollection_DataMapNode_hxx
-#undef TCollection_DataMapIterator
-#undef TCollection_DataMapIterator_hxx
-#undef Handle_TCollection_DataMapNode
-#undef TCollection_DataMapNode_Type_
-#undef TCollection_DataMap
-#undef TCollection_DataMap_hxx
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopTools_OrientedShapeMapHasher_HeaderFile
-#include <TopTools_OrientedShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
-#include <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx>
-#endif
-
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
-
-IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
- STANDARD_TYPE(TCollection_MapNode),
- STANDARD_TYPE(MMgt_TShared),
- STANDARD_TYPE(Standard_Transient),
-
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
-IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)
-
-IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape,Standard_Transient)
-IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)
-
-#else
-
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_Type_()
-{
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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_DataMapNodeOfDataMapOfOrientedShapeShape",
- sizeof(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape) Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape))) {
- _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)&)AnObject);
- }
- }
-
- return _anOtherObject;
-}
-
-const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape::DynamicType() const
-{
- return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape);
-}
-
-#endif
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem TopoDS_Shape
-#define TheItem_hxx <TopoDS_Shape.hxx>
-#define Hasher TopTools_OrientedShapeMapHasher
-#define Hasher_hxx <TopTools_OrientedShapeMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfOrientedShapeShape
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
-#include <TCollection_DataMapNode.gxx>
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile
-#define _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx>
-#endif
-
-#ifndef _GEOMAlgo_PassKey_HeaderFile
-#include <GEOMAlgo_PassKey.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-
-class GEOMAlgo_PassKey;
-class GEOMAlgo_PassKeyMapHasher;
-class GEOMAlgo_DataMapOfPassKeyInteger;
-class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger;
-
-class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger : public TCollection_MapNode {
-
-public:
- GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger
- (const GEOMAlgo_PassKey& K, const Standard_Integer& I, const TCollection_MapNodePtr& n);
-
- GEOMAlgo_PassKey& Key() const;
- Standard_Integer& Value() const;
-
- DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)
-
-private:
- GEOMAlgo_PassKey myKey;
- Standard_Integer myValue;
-};
-
-#define TheKey GEOMAlgo_PassKey
-#define TheKey_hxx <GEOMAlgo_PassKey.hxx>
-#define TheItem Standard_Integer
-#define TheItem_hxx <Standard_Integer.hxx>
-#define Hasher GEOMAlgo_PassKeyMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyInteger
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
-
-#include <TCollection_DataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_DataMapNode
-#undef TCollection_DataMapNode_hxx
-#undef TCollection_DataMapIterator
-#undef TCollection_DataMapIterator_hxx
-#undef Handle_TCollection_DataMapNode
-#undef TCollection_DataMapNode_Type_
-#undef TCollection_DataMap
-#undef TCollection_DataMap_hxx
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapNodeOfDataMapOfPassKeyInteger.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _GEOMAlgo_PassKey_HeaderFile
-#include <GEOMAlgo_PassKey.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile
-#include <GEOMAlgo_PassKeyMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile
-#include <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
-#endif
-
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
-
-IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
- STANDARD_TYPE(TCollection_MapNode),
- STANDARD_TYPE(MMgt_TShared),
- STANDARD_TYPE(Standard_Transient),
-
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
-IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)
-
-IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger,Standard_Transient)
-IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)
-
-#else
-
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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_DataMapNodeOfDataMapOfPassKeyInteger",
- sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger))) {
- _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::DynamicType() const
-{
- return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) ;
-}
-
-#endif
-
-#define TheKey GEOMAlgo_PassKey
-#define TheKey_hxx <GEOMAlgo_PassKey.hxx>
-#define TheItem Standard_Integer
-#define TheItem_hxx <Standard_Integer.hxx>
-#define Hasher GEOMAlgo_PassKeyMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyInteger
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
-#include <TCollection_DataMapNode.gxx>
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile
-#define _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx>
-#endif
-
-#ifndef _GEOMAlgo_PassKeyShape_HeaderFile
-#include <GEOMAlgo_PassKeyShape.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-
-class GEOMAlgo_PassKeyShape;
-class TopoDS_Shape;
-class GEOMAlgo_PassKeyShapeMapHasher;
-class GEOMAlgo_DataMapOfPassKeyShapeShape;
-class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape;
-
-class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape : public TCollection_MapNode {
-
-public:
- GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape
- (const GEOMAlgo_PassKeyShape& K, const TopoDS_Shape& I, const TCollection_MapNodePtr& n);
-
- GEOMAlgo_PassKeyShape& Key() const;
- TopoDS_Shape& Value() const;
-
- DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)
-
-private:
- GEOMAlgo_PassKeyShape myKey;
- TopoDS_Shape myValue;
-};
-
-#define TheKey GEOMAlgo_PassKeyShape
-#define TheKey_hxx <GEOMAlgo_PassKeyShape.hxx>
-#define TheItem TopoDS_Shape
-#define TheItem_hxx <TopoDS_Shape.hxx>
-#define Hasher GEOMAlgo_PassKeyShapeMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyShapeMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyShapeShape
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfPassKeyShapeShape.hxx>
-
-#include <TCollection_DataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_DataMapNode
-#undef TCollection_DataMapNode_hxx
-#undef TCollection_DataMapIterator
-#undef TCollection_DataMapIterator_hxx
-#undef Handle_TCollection_DataMapNode
-#undef TCollection_DataMapNode_Type_
-#undef TCollection_DataMap
-#undef TCollection_DataMap_hxx
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _GEOMAlgo_PassKeyShape_HeaderFile
-#include <GEOMAlgo_PassKeyShape.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile
-#include <GEOMAlgo_PassKeyShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile
-#include <GEOMAlgo_DataMapOfPassKeyShapeShape.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx>
-#endif
-
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
-
-IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
- STANDARD_TYPE(TCollection_MapNode),
- STANDARD_TYPE(MMgt_TShared),
- STANDARD_TYPE(Standard_Transient),
-
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
-IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)
-
-IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape,Standard_Transient)
-IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)
-
-#else
-
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_Type_()
-{
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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_DataMapNodeOfDataMapOfPassKeyShapeShape",
- sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape) Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape))) {
- _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)&)AnObject);
- }
- }
-
- return _anOtherObject;
-}
-
-const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape::DynamicType() const
-{
- return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape);
-}
-
-#endif
-
-#define TheKey GEOMAlgo_PassKeyShape
-#define TheKey_hxx <GEOMAlgo_PassKeyShape.hxx>
-#define TheItem TopoDS_Shape
-#define TheItem_hxx <TopoDS_Shape.hxx>
-#define Hasher GEOMAlgo_PassKeyShapeMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyShapeMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyShapeShape
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfPassKeyShapeShape.hxx>
-#include <TCollection_DataMapNode.gxx>
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile
-#define _GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx>
-#endif
-
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-
-class TopTools_ListOfShape;
-class TColStd_MapRealHasher;
-class GEOMAlgo_DataMapOfRealListOfShape;
-class GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape;
-
-class GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape : public TCollection_MapNode
-{
-public:
- GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape
- (const Standard_Real& K,const TopTools_ListOfShape& I,const TCollection_MapNodePtr& n);
-
- Standard_Real& Key() const;
- TopTools_ListOfShape& Value() const;
-
- DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)
-
-private:
- Standard_Real myKey;
- TopTools_ListOfShape myValue;
-};
-
-#define TheKey Standard_Real
-#define TheKey_hxx <Standard_Real.hxx>
-#define TheItem TopTools_ListOfShape
-#define TheItem_hxx <TopTools_ListOfShape.hxx>
-#define Hasher TColStd_MapRealHasher
-#define Hasher_hxx <TColStd_MapRealHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfRealListOfShape
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfRealListOfShape.hxx>
-
-#include <TCollection_DataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_DataMapNode
-#undef TCollection_DataMapNode_hxx
-#undef TCollection_DataMapIterator
-#undef TCollection_DataMapIterator_hxx
-#undef Handle_TCollection_DataMapNode
-#undef TCollection_DataMapNode_Type_
-#undef TCollection_DataMap
-#undef TCollection_DataMap_hxx
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapNodeOfDataMapOfRealListOfShape.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TColStd_MapRealHasher_HeaderFile
-#include <TColStd_MapRealHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapOfRealListOfShape_HeaderFile
-#include <GEOMAlgo_DataMapOfRealListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx>
-#endif
-
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
-
-IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
- STANDARD_TYPE(TCollection_MapNode),
- STANDARD_TYPE(MMgt_TShared),
- STANDARD_TYPE(Standard_Transient),
-
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
-IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)
-
-IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape,Standard_Transient)
-IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)
-
-#else
-
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_Type_()
-{
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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_DataMapNodeOfDataMapOfRealListOfShape",
- sizeof(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape) Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape))) {
- _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)&)AnObject);
- }
- }
-
- return _anOtherObject;
-}
-
-const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape::DynamicType() const
-{
- return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape);
-}
-
-#endif
-
-#define TheKey Standard_Real
-#define TheKey_hxx <Standard_Real.hxx>
-#define TheItem TopTools_ListOfShape
-#define TheItem_hxx <TopTools_ListOfShape.hxx>
-#define Hasher TColStd_MapRealHasher
-#define Hasher_hxx <TColStd_MapRealHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfRealListOfShape
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfRealListOfShape.hxx>
-#include <TCollection_DataMapNode.gxx>
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile\r
-#define _GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_DefineHandle_HeaderFile\r
-#include <Standard_DefineHandle.hxx>\r
-#endif\r
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile\r
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx>\r
-#endif\r
-\r
-#ifndef _TopoDS_Shape_HeaderFile\r
-#include <TopoDS_Shape.hxx>\r
-#endif\r
-#ifndef _TopTools_MapOfShape_HeaderFile\r
-#include <TopTools_MapOfShape.hxx>\r
-#endif\r
-#ifndef _TCollection_MapNode_HeaderFile\r
-#include <TCollection_MapNode.hxx>\r
-#endif\r
-#ifndef _TCollection_MapNodePtr_HeaderFile\r
-#include <TCollection_MapNodePtr.hxx>\r
-#endif\r
-\r
-class TopoDS_Shape;\r
-class TopTools_MapOfShape;\r
-class TopTools_ShapeMapHasher;\r
-class GEOMAlgo_DataMapOfShapeMapOfShape;\r
-class GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape;\r
-\r
-class GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape : public TCollection_MapNode {\r
-\r
-public:\r
- GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape\r
- (const TopoDS_Shape& K, const TopTools_MapOfShape& I, const TCollection_MapNodePtr& n);\r
-\r
- TopoDS_Shape& Key() const;\r
- TopTools_MapOfShape& Value() const;\r
-\r
- DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape)\r
-\r
-private:\r
- TopoDS_Shape myKey;\r
- TopTools_MapOfShape myValue;\r
-};\r
-\r
-#define TheKey TopoDS_Shape\r
-#define TheKey_hxx <TopoDS_Shape.hxx>\r
-#define TheItem TopTools_MapOfShape\r
-#define TheItem_hxx <TopTools_MapOfShape.hxx>\r
-#define Hasher TopTools_ShapeMapHasher\r
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>\r
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape\r
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx>\r
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape\r
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx>\r
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape\r
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_Type_()\r
-#define TCollection_DataMap GEOMAlgo_DataMapOfShapeMapOfShape\r
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapeMapOfShape.hxx>\r
-\r
-#include <TCollection_DataMapNode.lxx>\r
-\r
-#undef TheKey\r
-#undef TheKey_hxx\r
-#undef TheItem\r
-#undef TheItem_hxx\r
-#undef Hasher\r
-#undef Hasher_hxx\r
-#undef TCollection_DataMapNode\r
-#undef TCollection_DataMapNode_hxx\r
-#undef TCollection_DataMapIterator\r
-#undef TCollection_DataMapIterator_hxx\r
-#undef Handle_TCollection_DataMapNode\r
-#undef TCollection_DataMapNode_Type_\r
-#undef TCollection_DataMap\r
-#undef TCollection_DataMap_hxx\r
-\r
-#endif\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx>\r
-\r
-#include <Basics_OCCTVersion.hxx>\r
-\r
-#ifndef _Standard_TypeMismatch_HeaderFile\r
-#include <Standard_TypeMismatch.hxx>\r
-#endif\r
-\r
-#ifndef _TopoDS_Shape_HeaderFile\r
-#include <TopoDS_Shape.hxx>\r
-#endif\r
-#ifndef _TopTools_MapOfShape_HeaderFile\r
-#include <TopTools_MapOfShape.hxx>\r
-#endif\r
-#ifndef _TopTools_ShapeMapHasher_HeaderFile\r
-#include <TopTools_ShapeMapHasher.hxx>\r
-#endif\r
-#ifndef _GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile\r
-#include <GEOMAlgo_DataMapOfShapeMapOfShape.hxx>\r
-#endif\r
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile\r
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx>\r
-#endif\r
-\r
- \r
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1\r
-\r
-IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape)\r
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()\r
- STANDARD_TYPE(TCollection_MapNode),\r
- STANDARD_TYPE(MMgt_TShared),\r
- STANDARD_TYPE(Standard_Transient),\r
-\r
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()\r
-IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape)\r
-\r
-IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape,Standard_Transient)\r
-IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape)\r
-\r
-#else\r
-\r
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_Type_()\r
-{\r
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);\r
- static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);\r
- static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);\r
-\r
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};\r
- static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape",\r
- sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape),\r
- 1,\r
- (Standard_Address)_Ancestors,\r
- (Standard_Address)NULL);\r
-\r
- return _aType;\r
-}\r
-\r
-// DownCast method\r
-// allow safe downcasting\r
-//\r
-const Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape) Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape)::DownCast(const Handle(Standard_Transient)& AnObject) \r
-{\r
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape) _anOtherObject;\r
-\r
- if (!AnObject.IsNull()) {\r
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape))) {\r
- _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape)&)AnObject);\r
- }\r
- }\r
-\r
- return _anOtherObject;\r
-}\r
-\r
-const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape::DynamicType() const \r
-{ \r
- return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape); \r
-}\r
-\r
-#endif\r
-\r
-#define TheKey TopoDS_Shape\r
-#define TheKey_hxx <TopoDS_Shape.hxx>\r
-#define TheItem TopTools_MapOfShape\r
-#define TheItem_hxx <TopTools_MapOfShape.hxx>\r
-#define Hasher TopTools_ShapeMapHasher\r
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>\r
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape\r
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx>\r
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape\r
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx>\r
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape\r
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_Type_()\r
-#define TCollection_DataMap GEOMAlgo_DataMapOfShapeMapOfShape\r
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapeMapOfShape.hxx>\r
-#include <TCollection_DataMapNode.gxx>\r
-\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile\r
-#define _GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_DefineHandle_HeaderFile\r
-#include <Standard_DefineHandle.hxx>\r
-#endif\r
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile\r
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx>\r
-#endif\r
-\r
-#ifndef _TopoDS_Shape_HeaderFile\r
-#include <TopoDS_Shape.hxx>\r
-#endif\r
-#ifndef _gp_Pnt_HeaderFile\r
-#include <gp_Pnt.hxx>\r
-#endif\r
-#ifndef _TCollection_MapNode_HeaderFile\r
-#include <TCollection_MapNode.hxx>\r
-#endif\r
-#ifndef _TCollection_MapNodePtr_HeaderFile\r
-#include <TCollection_MapNodePtr.hxx>\r
-#endif\r
-\r
-class TopoDS_Shape;\r
-class gp_Pnt;\r
-class TopTools_ShapeMapHasher;\r
-class GEOMAlgo_DataMapOfShapePnt;\r
-class GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt;\r
-\r
-class GEOMAlgo_DataMapNodeOfDataMapOfShapePnt : public TCollection_MapNode\r
-{\r
-public:\r
- GEOMAlgo_DataMapNodeOfDataMapOfShapePnt\r
- (const TopoDS_Shape& K, const gp_Pnt& I, const TCollection_MapNodePtr& n);\r
-\r
- TopoDS_Shape& Key() const;\r
- gp_Pnt& Value() const;\r
-\r
- DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt)\r
-\r
-private: \r
- TopoDS_Shape myKey;\r
- gp_Pnt myValue;\r
-};\r
-\r
-#define TheKey TopoDS_Shape\r
-#define TheKey_hxx <TopoDS_Shape.hxx>\r
-#define TheItem gp_Pnt\r
-#define TheItem_hxx <gp_Pnt.hxx>\r
-#define Hasher TopTools_ShapeMapHasher\r
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>\r
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapePnt\r
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx>\r
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt\r
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx>\r
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt\r
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_Type_()\r
-#define TCollection_DataMap GEOMAlgo_DataMapOfShapePnt\r
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapePnt.hxx>\r
-\r
-#include <TCollection_DataMapNode.lxx>\r
-\r
-#undef TheKey\r
-#undef TheKey_hxx\r
-#undef TheItem\r
-#undef TheItem_hxx\r
-#undef Hasher\r
-#undef Hasher_hxx\r
-#undef TCollection_DataMapNode\r
-#undef TCollection_DataMapNode_hxx\r
-#undef TCollection_DataMapIterator\r
-#undef TCollection_DataMapIterator_hxx\r
-#undef Handle_TCollection_DataMapNode\r
-#undef TCollection_DataMapNode_Type_\r
-#undef TCollection_DataMap\r
-#undef TCollection_DataMap_hxx\r
-\r
-#endif\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx>\r
-\r
-#include <Basics_OCCTVersion.hxx>\r
-\r
-#ifndef _Standard_TypeMismatch_HeaderFile\r
-#include <Standard_TypeMismatch.hxx>\r
-#endif\r
-\r
-#ifndef _TopoDS_Shape_HeaderFile\r
-#include <TopoDS_Shape.hxx>\r
-#endif\r
-#ifndef _gp_Pnt_HeaderFile\r
-#include <gp_Pnt.hxx>\r
-#endif\r
-#ifndef _TopTools_ShapeMapHasher_HeaderFile\r
-#include <TopTools_ShapeMapHasher.hxx>\r
-#endif\r
-#ifndef _GEOMAlgo_DataMapOfShapePnt_HeaderFile\r
-#include <GEOMAlgo_DataMapOfShapePnt.hxx>\r
-#endif\r
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile\r
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx>\r
-#endif\r
-\r
- \r
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1\r
-\r
-IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt)\r
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()\r
- STANDARD_TYPE(TCollection_MapNode),\r
- STANDARD_TYPE(MMgt_TShared),\r
- STANDARD_TYPE(Standard_Transient),\r
-\r
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()\r
-IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt)\r
-\r
-IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt,Standard_Transient)\r
-IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt)\r
-\r
-#else\r
-\r
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_Type_()\r
-{\r
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);\r
- static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);\r
- static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);\r
-\r
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};\r
- static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapePnt",\r
- sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt),\r
- 1,\r
- (Standard_Address)_Ancestors,\r
- (Standard_Address)NULL);\r
-\r
- return _aType;\r
-}\r
-\r
-// DownCast method\r
-// allow safe downcasting\r
-//\r
-const Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt) Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt)::DownCast(const Handle(Standard_Transient)& AnObject) \r
-{\r
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt) _anOtherObject;\r
-\r
- if (!AnObject.IsNull()) {\r
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt))) {\r
- _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt)&)AnObject);\r
- }\r
- }\r
-\r
- return _anOtherObject;\r
-}\r
-\r
-const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfShapePnt::DynamicType() const \r
-{ \r
- return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt); \r
-}\r
-\r
-#endif\r
-\r
-#define TheKey TopoDS_Shape\r
-#define TheKey_hxx <TopoDS_Shape.hxx>\r
-#define TheItem gp_Pnt\r
-#define TheItem_hxx <gp_Pnt.hxx>\r
-#define Hasher TopTools_ShapeMapHasher\r
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>\r
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapePnt\r
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx>\r
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt\r
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx>\r
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt\r
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_Type_()\r
-#define TCollection_DataMap GEOMAlgo_DataMapOfShapePnt\r
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapePnt.hxx>\r
-#include <TCollection_DataMapNode.gxx>\r
-\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapNodeOfDataMapOfShapeReal_HeaderFile
-#define _GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-
-class TopoDS_Shape;
-class TopTools_ShapeMapHasher;
-class GEOMAlgo_DataMapOfShapeReal;
-class GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal;
-
-class GEOMAlgo_DataMapNodeOfDataMapOfShapeReal : public TCollection_MapNode
-{
-public:
- GEOMAlgo_DataMapNodeOfDataMapOfShapeReal
- (const TopoDS_Shape& K, const Standard_Real& I, const TCollection_MapNodePtr& n);
-
- TopoDS_Shape& Key() const;
- Standard_Real& Value() const;
-
- DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)
-
-private:
- TopoDS_Shape myKey;
- Standard_Real myValue;
-};
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem Standard_Real
-#define TheItem_hxx <Standard_Real.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeReal
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfShapeReal
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapeReal.hxx>
-
-#include <TCollection_DataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_DataMapNode
-#undef TCollection_DataMapNode_hxx
-#undef TCollection_DataMapIterator
-#undef TCollection_DataMapIterator_hxx
-#undef Handle_TCollection_DataMapNode
-#undef TCollection_DataMapNode_Type_
-#undef TCollection_DataMap
-#undef TCollection_DataMap_hxx
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapNodeOfDataMapOfShapeReal.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapOfShapeReal_HeaderFile
-#include <GEOMAlgo_DataMapOfShapeReal.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx>
-#endif
-
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
-
-IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
- STANDARD_TYPE(TCollection_MapNode),
- STANDARD_TYPE(MMgt_TShared),
- STANDARD_TYPE(Standard_Transient),
-
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
-IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)
-
-IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal,Standard_Transient)
-IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)
-
-#else
-
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_Type_()
-{
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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_DataMapNodeOfDataMapOfShapeReal",
- sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal) Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal))) {
- _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-
-const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfShapeReal::DynamicType() const
-{
- return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal) ;
-}
-
-#endif
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem Standard_Real
-#define TheItem_hxx <Standard_Real.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeReal
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfShapeReal
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapeReal.hxx>
-#include <TCollection_DataMapNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile
-#define _GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _GEOMAlgo_ShapeSet_HeaderFile
-#include <GEOMAlgo_ShapeSet.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-
-class TopoDS_Shape;
-class GEOMAlgo_ShapeSet;
-class TopTools_ShapeMapHasher;
-class GEOMAlgo_DataMapOfShapeShapeSet;
-class GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet;
-
-class GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet : public TCollection_MapNode
-{
-public:
- GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet
- (const TopoDS_Shape& K, const GEOMAlgo_ShapeSet& I, const TCollection_MapNodePtr& n);
-
- TopoDS_Shape& Key() const;
- GEOMAlgo_ShapeSet& Value() const;
-
- DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)
-
-private:
- TopoDS_Shape myKey;
- GEOMAlgo_ShapeSet myValue;
-};
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem GEOMAlgo_ShapeSet
-#define TheItem_hxx <GEOMAlgo_ShapeSet.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfShapeShapeSet
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapeShapeSet.hxx>
-
-#include <TCollection_DataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_DataMapNode
-#undef TCollection_DataMapNode_hxx
-#undef TCollection_DataMapIterator
-#undef TCollection_DataMapIterator_hxx
-#undef Handle_TCollection_DataMapNode
-#undef TCollection_DataMapNode_Type_
-#undef TCollection_DataMap
-#undef TCollection_DataMap_hxx
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapNodeOfDataMapOfShapeShapeSet.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _GEOMAlgo_ShapeSet_HeaderFile
-#include <GEOMAlgo_ShapeSet.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile
-#include <GEOMAlgo_DataMapOfShapeShapeSet.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx>
-#endif
-
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
-
-IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
- STANDARD_TYPE(TCollection_MapNode),
- STANDARD_TYPE(MMgt_TShared),
- STANDARD_TYPE(Standard_Transient),
-
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
-IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)
-
-IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet,Standard_Transient)
-IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)
-
-#else
-
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_Type_()
-{
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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_DataMapNodeOfDataMapOfShapeShapeSet",
- sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet) Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet))) {
- _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)&)AnObject);
- }
- }
-
- return _anOtherObject;
-}
-
-const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet::DynamicType() const
-{
- return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet);
-}
-
-#endif
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem GEOMAlgo_ShapeSet
-#define TheItem_hxx <GEOMAlgo_ShapeSet.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfShapeShapeSet
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapeShapeSet.hxx>
-#include <TCollection_DataMapNode.gxx>
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_DataMapOfOrientedShapeShape.hxx
+// Created: Wed Feb 22 11:03:36 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
-#define _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_NoSuchObject;
-class TopoDS_Shape;
-class TopTools_OrientedShapeMapHasher;
-class GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape;
-class GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class GEOMAlgo_DataMapOfOrientedShapeShape : public TCollection_BasicMap
-{
-public:
+#ifndef GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
+#define GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
- 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);
- }
+#include <TopoDS_Shape.hxx>
+#include <TopTools_OrientedShapeMapHasher.hxx>
- // Methods PUBLIC
- //
+#define _NCollection_MapHasher
+#include <NCollection_DataMap.hxx>
- Standard_EXPORT GEOMAlgo_DataMapOfOrientedShapeShape(const Standard_Integer NbBuckets = 1);
- Standard_EXPORT GEOMAlgo_DataMapOfOrientedShapeShape& Assign(const GEOMAlgo_DataMapOfOrientedShapeShape& Other) ;
- GEOMAlgo_DataMapOfOrientedShapeShape& operator =(const GEOMAlgo_DataMapOfOrientedShapeShape& Other)
- {
- return Assign(Other);
- }
+typedef NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_OrientedShapeMapHasher> GEOMAlgo_DataMapOfOrientedShapeShape;
+typedef GEOMAlgo_DataMapOfOrientedShapeShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape;
- Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
+#undef _NCollection_MapHasher
- Standard_EXPORT void Clear() ;
- ~GEOMAlgo_DataMapOfOrientedShapeShape()
- {
- Clear();
- }
- Standard_EXPORT Standard_Boolean Bind(const TopoDS_Shape& K,const TopoDS_Shape& I) ;
- Standard_EXPORT Standard_Boolean IsBound(const TopoDS_Shape& K) const;
- Standard_EXPORT Standard_Boolean UnBind(const TopoDS_Shape& K) ;
-
- Standard_EXPORT const TopoDS_Shape& Find(const TopoDS_Shape& K) const;
- const TopoDS_Shape& operator()(const TopoDS_Shape& K) const
- {
- return Find(K);
- }
-
- Standard_EXPORT TopoDS_Shape& ChangeFind(const TopoDS_Shape& K) ;
- TopoDS_Shape& operator()(const TopoDS_Shape& K)
- {
- return ChangeFind(K);
- }
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const;
- Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K);
-#endif
-
-private:
-
- // Methods PRIVATE
- //
-Standard_EXPORT GEOMAlgo_DataMapOfOrientedShapeShape(const GEOMAlgo_DataMapOfOrientedShapeShape& Other);
-
-};
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapOfOrientedShapeShape.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopTools_OrientedShapeMapHasher_HeaderFile
-#include <TopTools_OrientedShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
-#include <GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx>
-#endif
-
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem TopoDS_Shape
-#define TheItem_hxx <TopoDS_Shape.hxx>
-#define Hasher TopTools_OrientedShapeMapHasher
-#define Hasher_hxx <TopTools_OrientedShapeMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfOrientedShapeShape
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
-#include <TCollection_DataMap.gxx>
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_DataMapOfPassKeyInteger.hxx
+// Created: Wed Feb 22 10:55:55 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile
-#define _GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_NoSuchObject;
-class GEOMAlgo_PassKey;
-class GEOMAlgo_PassKeyMapHasher;
-class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger;
-class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class GEOMAlgo_DataMapOfPassKeyInteger : public TCollection_BasicMap {
-public:
+#ifndef GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile
+#define GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile
- 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_DataMapOfPassKeyInteger(const Standard_Integer NbBuckets = 1);
-
-Standard_EXPORT GEOMAlgo_DataMapOfPassKeyInteger& Assign(const GEOMAlgo_DataMapOfPassKeyInteger& Other) ;
- GEOMAlgo_DataMapOfPassKeyInteger& operator =(const GEOMAlgo_DataMapOfPassKeyInteger& Other)
-{
- return Assign(Other);
-}
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-Standard_EXPORT void Clear() ;
-~GEOMAlgo_DataMapOfPassKeyInteger()
-{
- Clear();
-}
-
-Standard_EXPORT Standard_Boolean Bind(const GEOMAlgo_PassKey& K,const Standard_Integer& I) ;
-Standard_EXPORT Standard_Boolean IsBound(const GEOMAlgo_PassKey& K) const;
-Standard_EXPORT Standard_Boolean UnBind(const GEOMAlgo_PassKey& K) ;
-
-Standard_EXPORT const Standard_Integer& Find(const GEOMAlgo_PassKey& K) const;
- const Standard_Integer& operator()(const GEOMAlgo_PassKey& K) const
-{
- return Find(K);
-}
-
-Standard_EXPORT Standard_Integer& ChangeFind(const GEOMAlgo_PassKey& K) ;
- Standard_Integer& operator()(const GEOMAlgo_PassKey& K)
-{
- return ChangeFind(K);
-}
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address Find1 (const GEOMAlgo_PassKey& K) const;
- Standard_EXPORT Standard_Address ChangeFind1 (const GEOMAlgo_PassKey& K);
-#endif
+#include <GEOMAlgo_PassKey.hxx>
+#include <Standard_Integer.hxx>
+#include <GEOMAlgo_PassKeyMapHasher.hxx>
-private:
+#define _NCollection_MapHasher
+#include <NCollection_DataMap.hxx>
- // Methods PRIVATE
- //
-Standard_EXPORT GEOMAlgo_DataMapOfPassKeyInteger(const GEOMAlgo_DataMapOfPassKeyInteger& Other);
+typedef NCollection_DataMap<GEOMAlgo_PassKey, Standard_Integer, GEOMAlgo_PassKeyMapHasher> GEOMAlgo_DataMapOfPassKeyInteger;
+typedef GEOMAlgo_DataMapOfPassKeyInteger::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger;
-};
+#undef _NCollection_MapHasher
-// other Inline functions and methods (like "C++: function call" methods)
-//
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapOfPassKeyInteger.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKey_HeaderFile
-#include <GEOMAlgo_PassKey.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile
-#include <GEOMAlgo_PassKeyMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile
-#include <GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
-#endif
-
-
-#define TheKey GEOMAlgo_PassKey
-#define TheKey_hxx <GEOMAlgo_PassKey.hxx>
-#define TheItem Standard_Integer
-#define TheItem_hxx <Standard_Integer.hxx>
-#define Hasher GEOMAlgo_PassKeyMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyInteger
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
-#include <TCollection_DataMap.gxx>
-
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_DataMapOfPassKeyShapeShape.hxx
+// Created: Wed Feb 22 11:00:16 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile
-#define _GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_NoSuchObject;
-class GEOMAlgo_PassKeyShape;
-class TopoDS_Shape;
-class GEOMAlgo_PassKeyShapeMapHasher;
-class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape;
-class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class GEOMAlgo_DataMapOfPassKeyShapeShape : public TCollection_BasicMap {
-
-public:
+#ifndef GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile
+#define GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile
- 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);
- }
+#include <GEOMAlgo_PassKey.hxx>
+#include <TopoDS_Shape.hxx>
+#include <GEOMAlgo_PassKeyMapHasher.hxx>
- // Methods PUBLIC
- //
+#define _NCollection_MapHasher
+#include <NCollection_DataMap.hxx>
-Standard_EXPORT GEOMAlgo_DataMapOfPassKeyShapeShape(const Standard_Integer NbBuckets = 1);
-Standard_EXPORT GEOMAlgo_DataMapOfPassKeyShapeShape& Assign(const GEOMAlgo_DataMapOfPassKeyShapeShape& Other) ;
- GEOMAlgo_DataMapOfPassKeyShapeShape& operator =(const GEOMAlgo_DataMapOfPassKeyShapeShape& Other)
-{
- return Assign(Other);
-}
+typedef NCollection_DataMap<GEOMAlgo_PassKey, TopoDS_Shape, GEOMAlgo_PassKeyMapHasher> GEOMAlgo_DataMapOfPassKeyShapeShape;
+typedef GEOMAlgo_DataMapOfPassKeyShapeShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape;
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-Standard_EXPORT void Clear() ;
-~GEOMAlgo_DataMapOfPassKeyShapeShape()
-{
- Clear();
-}
-
-Standard_EXPORT Standard_Boolean Bind(const GEOMAlgo_PassKeyShape& K,const TopoDS_Shape& I) ;
-Standard_EXPORT Standard_Boolean IsBound(const GEOMAlgo_PassKeyShape& K) const;
-Standard_EXPORT Standard_Boolean UnBind(const GEOMAlgo_PassKeyShape& K) ;
-
-Standard_EXPORT const TopoDS_Shape& Find(const GEOMAlgo_PassKeyShape& K) const;
- const TopoDS_Shape& operator()(const GEOMAlgo_PassKeyShape& K) const
-{
- return Find(K);
-}
-
-Standard_EXPORT TopoDS_Shape& ChangeFind(const GEOMAlgo_PassKeyShape& K) ;
- TopoDS_Shape& operator()(const GEOMAlgo_PassKeyShape& K)
-{
- return ChangeFind(K);
-}
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address Find1 (const GEOMAlgo_PassKeyShape& K) const;
- Standard_EXPORT Standard_Address ChangeFind1 (const GEOMAlgo_PassKeyShape& K);
-#endif
-
-private:
-
- // Methods PRIVATE
- //
-Standard_EXPORT GEOMAlgo_DataMapOfPassKeyShapeShape(const GEOMAlgo_DataMapOfPassKeyShapeShape& Other);
-
-};
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapOfPassKeyShapeShape.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKeyShape_HeaderFile
-#include <GEOMAlgo_PassKeyShape.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile
-#include <GEOMAlgo_PassKeyShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile
-#include <GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx>
-#endif
-
-
-#define TheKey GEOMAlgo_PassKeyShape
-#define TheKey_hxx <GEOMAlgo_PassKeyShape.hxx>
-#define TheItem TopoDS_Shape
-#define TheItem_hxx <TopoDS_Shape.hxx>
-#define Hasher GEOMAlgo_PassKeyShapeMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyShapeMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyShapeShape
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfPassKeyShapeShape.hxx>
-#include <TCollection_DataMap.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_DataMapOfRealListOfShape.hxx
+// Created: Wed Feb 22 10:51:48 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_DataMapOfRealListOfShape_HeaderFile
-#define _GEOMAlgo_DataMapOfRealListOfShape_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_NoSuchObject;
-class TopTools_ListOfShape;
-class TColStd_MapRealHasher;
-class GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape;
-class GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-class GEOMAlgo_DataMapOfRealListOfShape : public TCollection_BasicMap {
+#ifndef GEOMAlgo_DataMapOfRealListOfShape_HeaderFile
+#define GEOMAlgo_DataMapOfRealListOfShape_HeaderFile
-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_DataMapOfRealListOfShape(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT GEOMAlgo_DataMapOfRealListOfShape& Assign(const GEOMAlgo_DataMapOfRealListOfShape& Other) ;
- GEOMAlgo_DataMapOfRealListOfShape& operator =(const GEOMAlgo_DataMapOfRealListOfShape& Other)
-{
- return Assign(Other);
-}
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~GEOMAlgo_DataMapOfRealListOfShape()
-{
- Clear();
-}
-
-Standard_EXPORT Standard_Boolean Bind(const Standard_Real& K,const TopTools_ListOfShape& I) ;
-Standard_EXPORT Standard_Boolean IsBound(const Standard_Real& K) const;
-Standard_EXPORT Standard_Boolean UnBind(const Standard_Real& K) ;
-
-Standard_EXPORT const TopTools_ListOfShape& Find(const Standard_Real& K) const;
- const TopTools_ListOfShape& operator()(const Standard_Real& K) const
-{
- return Find(K);
-}
+#include <Standard_Real.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TColStd_MapRealHasher.hxx>
-Standard_EXPORT TopTools_ListOfShape& ChangeFind(const Standard_Real& K) ;
- TopTools_ListOfShape& operator()(const Standard_Real& K)
-{
- return ChangeFind(K);
-}
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address Find1 (const Standard_Real& K) const;
- Standard_EXPORT Standard_Address ChangeFind1 (const Standard_Real& K);
-#endif
+#define _NCollection_MapHasher
+#include <NCollection_DataMap.hxx>
-private:
+typedef NCollection_DataMap<Standard_Real, TopTools_ListOfShape, TColStd_MapRealHasher> GEOMAlgo_DataMapOfRealListOfShape;
+typedef GEOMAlgo_DataMapOfRealListOfShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape;
- // Methods PRIVATE
- //
-Standard_EXPORT GEOMAlgo_DataMapOfRealListOfShape(const GEOMAlgo_DataMapOfRealListOfShape& Other);
+#undef _NCollection_MapHasher
-};
-// other Inline functions and methods (like "C++: function call" methods)
-//
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapOfRealListOfShape.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TColStd_MapRealHasher_HeaderFile
-#include <TColStd_MapRealHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile
-#include <GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx>
-#endif
-
-
-#define TheKey Standard_Real
-#define TheKey_hxx <Standard_Real.hxx>
-#define TheItem TopTools_ListOfShape
-#define TheItem_hxx <TopTools_ListOfShape.hxx>
-#define Hasher TColStd_MapRealHasher
-#define Hasher_hxx <TColStd_MapRealHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfRealListOfShape
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfRealListOfShape.hxx>
-#include <TCollection_DataMap.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-\r
-#ifndef _GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile\r
-#define _GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_Macro_HeaderFile\r
-#include <Standard_Macro.hxx>\r
-#endif\r
-\r
-#ifndef _TCollection_BasicMap_HeaderFile\r
-#include <TCollection_BasicMap.hxx>\r
-#endif\r
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile\r
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx>\r
-#endif\r
-#ifndef _Standard_Integer_HeaderFile\r
-#include <Standard_Integer.hxx>\r
-#endif\r
-#ifndef _Standard_Boolean_HeaderFile\r
-#include <Standard_Boolean.hxx>\r
-#endif\r
-\r
-class Standard_DomainError;\r
-class Standard_NoSuchObject;\r
-class TopoDS_Shape;\r
-class TopTools_MapOfShape;\r
-class TopTools_ShapeMapHasher;\r
-class GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape;\r
-class GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape;\r
-\r
-#include <Basics_OCCTVersion.hxx>\r
-\r
-class GEOMAlgo_DataMapOfShapeMapOfShape : public TCollection_BasicMap {\r
-public:\r
-\r
- void* operator new(size_t,void* anAddress) \r
- {\r
- return anAddress;\r
- }\r
- void* operator new(size_t size) \r
- {\r
- return Standard::Allocate(size); \r
- }\r
- void operator delete(void *anAddress) \r
- {\r
- if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
- }\r
-\r
- \r
- Standard_EXPORT GEOMAlgo_DataMapOfShapeMapOfShape(const Standard_Integer NbBuckets = 1);\r
- \r
- Standard_EXPORT GEOMAlgo_DataMapOfShapeMapOfShape& Assign(const GEOMAlgo_DataMapOfShapeMapOfShape& Other) ;\r
- GEOMAlgo_DataMapOfShapeMapOfShape& operator =(const GEOMAlgo_DataMapOfShapeMapOfShape& Other) \r
-{\r
- return Assign(Other);\r
-}\r
- \r
- Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;\r
- \r
- Standard_EXPORT void Clear() ;\r
-~GEOMAlgo_DataMapOfShapeMapOfShape()\r
-{\r
- Clear();\r
-}\r
- \r
- Standard_EXPORT Standard_Boolean Bind(const TopoDS_Shape& K,const TopTools_MapOfShape& I) ;\r
- \r
- Standard_EXPORT Standard_Boolean IsBound(const TopoDS_Shape& K) const;\r
- \r
- Standard_EXPORT Standard_Boolean UnBind(const TopoDS_Shape& K) ;\r
- \r
- Standard_EXPORT const TopTools_MapOfShape& Find(const TopoDS_Shape& K) const;\r
- const TopTools_MapOfShape& operator()(const TopoDS_Shape& K) const\r
-{\r
- return Find(K);\r
-}\r
- \r
- Standard_EXPORT TopTools_MapOfShape& ChangeFind(const TopoDS_Shape& K) ;\r
- TopTools_MapOfShape& operator()(const TopoDS_Shape& K) \r
-{\r
- return ChangeFind(K);\r
-}\r
-\r
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version\r
- Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const;\r
- Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K);\r
-#endif\r
-\r
-private:\r
- \r
- Standard_EXPORT GEOMAlgo_DataMapOfShapeMapOfShape(const GEOMAlgo_DataMapOfShapeMapOfShape& Other);\r
-\r
-};\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-#endif\r
+// File: GEOMAlgo_DataMapOfShapeMapOfShape.hxx
+// Created: Wed Feb 22 11:07:16 2012
+// Author:
+// <pkv@BDEURI37616>
+
+
+#ifndef GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile
+#define GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile
+
+
+#include <TopoDS_Shape.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_ShapeMapHasher.hxx>
+
+#define _NCollection_MapHasher
+#include <NCollection_DataMap.hxx>
+
+
+typedef NCollection_DataMap<TopoDS_Shape, TopTools_MapOfShape, TopTools_ShapeMapHasher> GEOMAlgo_DataMapOfShapeMapOfShape;
+typedef GEOMAlgo_DataMapOfShapeMapOfShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape;
+
+#undef _NCollection_MapHasher
+
+
+
+#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <GEOMAlgo_DataMapOfShapeMapOfShape.hxx>\r
-\r
-#ifndef _Standard_DomainError_HeaderFile\r
-#include <Standard_DomainError.hxx>\r
-#endif\r
-#ifndef _Standard_NoSuchObject_HeaderFile\r
-#include <Standard_NoSuchObject.hxx>\r
-#endif\r
-#ifndef _TopoDS_Shape_HeaderFile\r
-#include <TopoDS_Shape.hxx>\r
-#endif\r
-#ifndef _TopTools_MapOfShape_HeaderFile\r
-#include <TopTools_MapOfShape.hxx>\r
-#endif\r
-#ifndef _TopTools_ShapeMapHasher_HeaderFile\r
-#include <TopTools_ShapeMapHasher.hxx>\r
-#endif\r
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile\r
-#include <GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx>\r
-#endif\r
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile\r
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx>\r
-#endif\r
- \r
-\r
-#define TheKey TopoDS_Shape\r
-#define TheKey_hxx <TopoDS_Shape.hxx>\r
-#define TheItem TopTools_MapOfShape\r
-#define TheItem_hxx <TopTools_MapOfShape.hxx>\r
-#define Hasher TopTools_ShapeMapHasher\r
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>\r
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape\r
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx>\r
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape\r
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx>\r
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape\r
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_Type_()\r
-#define TCollection_DataMap GEOMAlgo_DataMapOfShapeMapOfShape\r
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapeMapOfShape.hxx>\r
-#include <TCollection_DataMap.gxx>\r
-\r
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-\r
-#ifndef _GEOMAlgo_DataMapOfShapePnt_HeaderFile\r
-#define _GEOMAlgo_DataMapOfShapePnt_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_Macro_HeaderFile\r
-#include <Standard_Macro.hxx>\r
-#endif\r
-\r
-#ifndef _TCollection_BasicMap_HeaderFile\r
-#include <TCollection_BasicMap.hxx>\r
-#endif\r
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile\r
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx>\r
-#endif\r
-#ifndef _Standard_Integer_HeaderFile\r
-#include <Standard_Integer.hxx>\r
-#endif\r
-#ifndef _Standard_Boolean_HeaderFile\r
-#include <Standard_Boolean.hxx>\r
-#endif\r
-\r
-class Standard_DomainError;\r
-class Standard_NoSuchObject;\r
-class TopoDS_Shape;\r
-class gp_Pnt;\r
-class TopTools_ShapeMapHasher;\r
-class GEOMAlgo_DataMapNodeOfDataMapOfShapePnt;\r
-class GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt;\r
-\r
-#include <Basics_OCCTVersion.hxx>\r
-\r
-class GEOMAlgo_DataMapOfShapePnt : public TCollection_BasicMap {\r
-public:\r
-\r
- void* operator new(size_t,void* anAddress) \r
- {\r
- return anAddress;\r
- }\r
- void* operator new(size_t size) \r
- {\r
- return Standard::Allocate(size); \r
- }\r
- void operator delete(void *anAddress) \r
- {\r
- if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
- }\r
-\r
- \r
- Standard_EXPORT GEOMAlgo_DataMapOfShapePnt(const Standard_Integer NbBuckets = 1);\r
- \r
- Standard_EXPORT GEOMAlgo_DataMapOfShapePnt& Assign(const GEOMAlgo_DataMapOfShapePnt& Other) ;\r
- GEOMAlgo_DataMapOfShapePnt& operator =(const GEOMAlgo_DataMapOfShapePnt& Other) \r
-{\r
- return Assign(Other);\r
-}\r
- \r
- Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;\r
- \r
- Standard_EXPORT void Clear() ;\r
-~GEOMAlgo_DataMapOfShapePnt()\r
-{\r
- Clear();\r
-}\r
- \r
- Standard_EXPORT Standard_Boolean Bind(const TopoDS_Shape& K,const gp_Pnt& I) ;\r
- \r
- Standard_EXPORT Standard_Boolean IsBound(const TopoDS_Shape& K) const;\r
- \r
- Standard_EXPORT Standard_Boolean UnBind(const TopoDS_Shape& K) ;\r
- \r
- Standard_EXPORT const gp_Pnt& Find(const TopoDS_Shape& K) const;\r
- const gp_Pnt& operator()(const TopoDS_Shape& K) const\r
-{\r
- return Find(K);\r
-}\r
- \r
- Standard_EXPORT gp_Pnt& ChangeFind(const TopoDS_Shape& K) ;\r
- gp_Pnt& operator()(const TopoDS_Shape& K) \r
-{\r
- return ChangeFind(K);\r
-}\r
-\r
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version\r
- Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const;\r
- Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K);\r
-#endif\r
-\r
-private:\r
- \r
- Standard_EXPORT GEOMAlgo_DataMapOfShapePnt(const GEOMAlgo_DataMapOfShapePnt& Other);\r
-\r
-};\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-#endif\r
+// File: GEOMAlgo_DataMapOfShapePnt.hxx
+// Created: Wed Feb 22 11:10:15 2012
+// Author:
+// <pkv@BDEURI37616>
+
+
+#ifndef GEOMAlgo_DataMapOfShapePnt_HeaderFile
+#define GEOMAlgo_DataMapOfShapePnt_HeaderFile
+
+
+#include <TopoDS_Shape.hxx>
+#include <gp_Pnt.hxx>
+#include <TopTools_ShapeMapHasher.hxx>
+
+#define _NCollection_MapHasher
+#include <NCollection_DataMap.hxx>
+#include <gp_Pnt.hxx>
+
+typedef NCollection_DataMap<TopoDS_Shape, gp_Pnt, TopTools_ShapeMapHasher> GEOMAlgo_DataMapOfShapePnt;
+typedef GEOMAlgo_DataMapOfShapePnt::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt;
+
+#undef _NCollection_MapHasher
+
+
+
+#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <GEOMAlgo_DataMapOfShapePnt.hxx>\r
-\r
-#ifndef _Standard_DomainError_HeaderFile\r
-#include <Standard_DomainError.hxx>\r
-#endif\r
-#ifndef _Standard_NoSuchObject_HeaderFile\r
-#include <Standard_NoSuchObject.hxx>\r
-#endif\r
-#ifndef _TopoDS_Shape_HeaderFile\r
-#include <TopoDS_Shape.hxx>\r
-#endif\r
-#ifndef _gp_Pnt_HeaderFile\r
-#include <gp_Pnt.hxx>\r
-#endif\r
-#ifndef _TopTools_ShapeMapHasher_HeaderFile\r
-#include <TopTools_ShapeMapHasher.hxx>\r
-#endif\r
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile\r
-#include <GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx>\r
-#endif\r
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile\r
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx>\r
-#endif\r
- \r
-\r
-#define TheKey TopoDS_Shape\r
-#define TheKey_hxx <TopoDS_Shape.hxx>\r
-#define TheItem gp_Pnt\r
-#define TheItem_hxx <gp_Pnt.hxx>\r
-#define Hasher TopTools_ShapeMapHasher\r
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>\r
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapePnt\r
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx>\r
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt\r
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx>\r
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt\r
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_Type_()\r
-#define TCollection_DataMap GEOMAlgo_DataMapOfShapePnt\r
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapePnt.hxx>\r
-#include <TCollection_DataMap.gxx>\r
-\r
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_DataMapOfShapeReal.hxx
+// Created: Wed Feb 22 10:47:23 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_DataMapOfShapeReal_HeaderFile
-#define _GEOMAlgo_DataMapOfShapeReal_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_NoSuchObject;
-class TopoDS_Shape;
-class TopTools_ShapeMapHasher;
-class GEOMAlgo_DataMapNodeOfDataMapOfShapeReal;
-class GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class GEOMAlgo_DataMapOfShapeReal : public TCollection_BasicMap {
-
-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_DataMapOfShapeReal(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT GEOMAlgo_DataMapOfShapeReal& Assign(const GEOMAlgo_DataMapOfShapeReal& Other) ;
- GEOMAlgo_DataMapOfShapeReal& operator =(const GEOMAlgo_DataMapOfShapeReal& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
+#ifndef GEOMAlgo_DataMapOfShapeReal_HeaderFile
+#define GEOMAlgo_DataMapOfShapeReal_HeaderFile
-Standard_EXPORT void Clear() ;
-~GEOMAlgo_DataMapOfShapeReal()
-{
- Clear();
-}
-
-
-
-Standard_EXPORT Standard_Boolean Bind(const TopoDS_Shape& K,const Standard_Real& I) ;
-
-
-Standard_EXPORT Standard_Boolean IsBound(const TopoDS_Shape& K) const;
-
-
-Standard_EXPORT Standard_Boolean UnBind(const TopoDS_Shape& K) ;
-
-
-Standard_EXPORT const Standard_Real& Find(const TopoDS_Shape& K) const;
- const Standard_Real& operator()(const TopoDS_Shape& K) const
-{
- return Find(K);
-}
-
-
-
-Standard_EXPORT Standard_Real& ChangeFind(const TopoDS_Shape& K) ;
- Standard_Real& operator()(const TopoDS_Shape& K)
-{
- return ChangeFind(K);
-}
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const;
- Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K);
-#endif
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT GEOMAlgo_DataMapOfShapeReal(const GEOMAlgo_DataMapOfShapeReal& Other);
-
-
- // Fields PRIVATE
- //
+#include <TopoDS_Shape.hxx>
+#include <Standard_Real.hxx>
+#include <TopTools_ShapeMapHasher.hxx>
+#define _NCollection_MapHasher
+#include <NCollection_DataMap.hxx>
-};
+typedef NCollection_DataMap<TopoDS_Shape, Standard_Real, TopTools_ShapeMapHasher> GEOMAlgo_DataMapOfShapeReal;
+typedef GEOMAlgo_DataMapOfShapeReal::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal;
-// other Inline functions and methods (like "C++: function call" methods)
-//
+#undef _NCollection_MapHasher
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapOfShapeReal.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile
-#include <GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx>
-#endif
-
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem Standard_Real
-#define TheItem_hxx <Standard_Real.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeReal
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfShapeReal
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapeReal.hxx>
-#include <TCollection_DataMap.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_DataMapOfShapeShapeSet.hxx
+// Created: Wed Feb 22 08:36:15 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile
-#define _GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile
-#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_NoSuchObject;
-class TopoDS_Shape;
-class GEOMAlgo_ShapeSet;
-class TopTools_ShapeMapHasher;
-class GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet;
-class GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class GEOMAlgo_DataMapOfShapeShapeSet : public TCollection_BasicMap {
-
-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);
- }
-
- Standard_EXPORT GEOMAlgo_DataMapOfShapeShapeSet(const Standard_Integer NbBuckets = 1);
+#ifndef GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile
+#define GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile
- Standard_EXPORT GEOMAlgo_DataMapOfShapeShapeSet& Assign(const GEOMAlgo_DataMapOfShapeShapeSet& Other) ;
- GEOMAlgo_DataMapOfShapeShapeSet& operator =(const GEOMAlgo_DataMapOfShapeShapeSet& Other)
- {
- return Assign(Other);
- }
+#include <TopoDS_Shape.hxx>
+#include <GEOMAlgo_ShapeSet.hxx>
+#include <TopTools_ShapeMapHasher.hxx>
- Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
+#define _NCollection_MapHasher
+#include <NCollection_DataMap.hxx>
- Standard_EXPORT void Clear() ;
- ~GEOMAlgo_DataMapOfShapeShapeSet()
- {
- Clear();
- }
- Standard_EXPORT Standard_Boolean Bind(const TopoDS_Shape& K,const GEOMAlgo_ShapeSet& I) ;
+typedef NCollection_DataMap<TopoDS_Shape, GEOMAlgo_ShapeSet, TopTools_ShapeMapHasher> GEOMAlgo_DataMapOfShapeShapeSet;
+typedef GEOMAlgo_DataMapOfShapeShapeSet::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet;
- Standard_EXPORT Standard_Boolean IsBound(const TopoDS_Shape& K) const;
-
- Standard_EXPORT Standard_Boolean UnBind(const TopoDS_Shape& K) ;
-
- Standard_EXPORT const GEOMAlgo_ShapeSet& Find(const TopoDS_Shape& K) const;
- const GEOMAlgo_ShapeSet& operator()(const TopoDS_Shape& K) const
- {
- return Find(K);
- }
-
- Standard_EXPORT GEOMAlgo_ShapeSet& ChangeFind(const TopoDS_Shape& K) ;
- GEOMAlgo_ShapeSet& operator()(const TopoDS_Shape& K)
- {
- return ChangeFind(K);
- }
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const;
- Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K);
-#endif
+#undef _NCollection_MapHasher
-private:
- Standard_EXPORT GEOMAlgo_DataMapOfShapeShapeSet(const GEOMAlgo_DataMapOfShapeShapeSet& Other);
-};
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapOfShapeShapeSet.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _GEOMAlgo_ShapeSet_HeaderFile
-#include <GEOMAlgo_ShapeSet.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile
-#include <GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx>
-#endif
-
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem GEOMAlgo_ShapeSet
-#define TheItem_hxx <GEOMAlgo_ShapeSet.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet
-#define TCollection_DataMapNode_hxx <GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx>
-#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet
-#define TCollection_DataMapIterator_hxx <GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx>
-#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet
-#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_Type_()
-#define TCollection_DataMap GEOMAlgo_DataMapOfShapeShapeSet
-#define TCollection_DataMap_hxx <GEOMAlgo_DataMapOfShapeShapeSet.hxx>
-#include <TCollection_DataMap.gxx>
-
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_FinderShapeOn.cdl
--- Created: Tue Jan 11 14:35:52 2005
--- Author: Peter KURNEV
-
-class FinderShapeOn from GEOMAlgo
- inherits ShapeAlgo from GEOMAlgo
-
- ---Purpose:
-
-uses
- Surface from Geom,
- ShapeEnum from TopAbs,
- ListOfShape from TopTools,
- DataMapOfShapeShape from TopTools,
- Shape from TopoDS,
- State from GEOMAlgo,
- IndexedDataMapOfShapeState from GEOMAlgo
-
---raises
-
-is
- Create
- returns FinderShapeOn from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn();"
-
- Perform(me:out)
- is redefined;
-
- SetSurface(me:out;
- aS:Surface from Geom);
-
- SetShapeType(me:out;
- aST:ShapeEnum from TopAbs);
-
- SetState(me:out;
- aSF:State from GEOMAlgo);
-
- Surface(me)
- returns Surface from Geom;
- ---C++: return const &
-
- ShapeType(me)
- returns ShapeEnum from TopAbs;
-
- State(me)
- returns State from GEOMAlgo;
-
- Shapes(me)
- returns ListOfShape from TopTools;
- ---C++: return const &
-
- --
- -- protected methods
- --
- CheckData(me:out)
- is redefined protected;
-
- MakeArgument1(me:out)
- is protected;
-
- MakeArgument2(me:out)
- is protected;
-
- Find(me:out)
- is protected;
-
- Find(me:out;
- aS:Shape from TopoDS)
- is protected;
-
- FindVertices(me:out)
- is protected;
-
- CopySource(myclass;
- aS :Shape from TopoDS;
- aImages : out DataMapOfShapeShape from TopTools;
- aOriginals: out DataMapOfShapeShape from TopTools;
- aSC : out Shape from TopoDS);
-
- BuildTriangulation(myclass;
- aS :Shape from TopoDS)
- returns Boolean from Standard;
-
-
-fields
- mySurface : Surface from Geom is protected;
- myShapeType : ShapeEnum from TopAbs is protected;
- myState : State from GEOMAlgo is protected;
- myArg1 : Shape from TopoDS is protected;
- myArg2 : Shape from TopoDS is protected;
- myLS : ListOfShape from TopTools is protected;
- myImages : DataMapOfShapeShape from TopTools is protected;
- myMSS : IndexedDataMapOfShapeState from GEOMAlgo is protected;
- myIsAnalytic : Boolean from Standard is protected;
-
-end FinderShapeOn;
// Created: Tue Jan 11 14:44:31 2005
// Author: Peter KURNEV
-#include <GEOMAlgo_FinderShapeOn.ixx>
+#include <GEOMAlgo_FinderShapeOn.hxx>
#include <Basics_OCCTVersion.hxx>
//=======================================================================
//function : GEOMAlgo_FinderShapeOn
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_FinderShapeOn::GEOMAlgo_FinderShapeOn()
:
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_FinderShapeOn::~GEOMAlgo_FinderShapeOn()
{
}
//=======================================================================
//function : SetSurface
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn::SetSurface(const Handle(Geom_Surface)& aS)
{
}
//=======================================================================
//function : Surface
-//purpose :
+//purpose :
//=======================================================================
const Handle(Geom_Surface)& GEOMAlgo_FinderShapeOn::Surface() const
{
}
//=======================================================================
//function : SetShapeType
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn::SetShapeType(const TopAbs_ShapeEnum aType)
{
}
//=======================================================================
//function : ShapeType
-//purpose :
+//purpose :
//=======================================================================
TopAbs_ShapeEnum GEOMAlgo_FinderShapeOn::ShapeType()const
{
}
//=======================================================================
//function : SetState
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn::SetState(const GEOMAlgo_State aState)
{
}
//=======================================================================
//function : State
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_State GEOMAlgo_FinderShapeOn::State() const
{
}
//=======================================================================
// function: Shapes
-// purpose:
+// purpose:
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn::Shapes() const
{
}
//=======================================================================
//function : Perform
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn::Perform()
{
return;
}
//
-#if OCC_VERSION_LARGE > 0x06050200
// Initialize the context
GEOMAlgo_ShapeAlgo::Perform();
-#endif
//
myIsAnalytic=GEOMAlgo_SurfaceTools::IsAnalytic(mySurface);
//
}
//=======================================================================
//function : FindVertices
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn::FindVertices()
-{
+{
Standard_Integer i, aNb, iErr;
TopAbs_State aSt;
TopAbs_Orientation aOr;
}
//=======================================================================
//function : Find
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn::Find()
{
}
//=======================================================================
//function : Find
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn::Find(const TopoDS_Shape& aS)
{
myErrorStatus=31; // DSFiller failed
return;
}
- //
+ //
// 2. Find shapes
GEOMAlgo_ShapeSolid* pSS;
GEOMAlgo_VertexSolid aVXS;
const TopTools_ListOfShape& aLS=pSS->Shapes(aSts[i]);
aIt.Initialize(aLS);
for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSImage=aIt.Value();
- if (myImages.IsBound(aSImage)) {
- const TopoDS_Shape& aSx=myImages.Find(aSImage);
+ const TopoDS_Shape& aSImage=aIt.Value();
+ if (myImages.IsBound(aSImage)) {
+ const TopoDS_Shape& aSx=myImages.Find(aSImage);
myMSS.Add(aSx, aSts[i]);
}
else {
myErrorStatus=33;// can not find original shape
- return;
+ return;
}
}
}
}
//=======================================================================
//function : MakeArgument1
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn::MakeArgument1()
{
break;
}
}
- } //
+ } //
else {
aBB.MakeFace(aFace, mySurface, myTolerance);
}
}
//=======================================================================
//function : MakeArgument2
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn::MakeArgument2()
{
}
//=======================================================================
//function : CheckData
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn::CheckData()
{
return;
}
//
- if (myState==GEOMAlgo_ST_UNKNOWN ||
+ if (myState==GEOMAlgo_ST_UNKNOWN ||
myState==GEOMAlgo_ST_INOUT) {
myErrorStatus=13; // unallowed state type
return;
//
//=======================================================================
//function : CopySource
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn::CopySource(const TopoDS_Shape& aE,
TopTools_DataMapOfShapeShape& aImages,
const TopoDS_Shape& aV=aIt.Value();
TopoDS_Shape aVx;
//
- CopySource (aV, aImages, aOriginals, aVx);
+ CopySource (aV, aImages, aOriginals, aVx);
//
aVx.Orientation(aV.Orientation());
BB.Add(aEx, aVx);
//function : BuildTriangulation
//purpose :
//=======================================================================
-Standard_Boolean GEOMAlgo_FinderShapeOn::BuildTriangulation (const TopoDS_Shape& theShape)
+Standard_Boolean
+ GEOMAlgo_FinderShapeOn::BuildTriangulation (const TopoDS_Shape& theShape)
{
// calculate deflection
Standard_Real aDeviationCoefficient = 0.001;
//
// 10 -mySurface=NULL
// 11 -myShape=NULL
-// 12 -unallowed type of sub-shapes
-// 13 -unallowed state
+// 12 -unallowed type of sub-shapes
+// 13 -unallowed state
// 20 -can not build the face
// 30 -wrong args are used for DSFiller
// 31 -DSFiller failed
+
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_FinderShapeOn.hxx
+// Created: Tue Jan 11 14:44:31 2005
+// Author: Peter KURNEV
+
#ifndef _GEOMAlgo_FinderShapeOn_HeaderFile
#define _GEOMAlgo_FinderShapeOn_HeaderFile
-#ifndef _Handle_Geom_Surface_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <Handle_Geom_Surface.hxx>
-#endif
-#ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx>
-#endif
-#ifndef _GEOMAlgo_State_HeaderFile
#include <GEOMAlgo_State.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TopTools_DataMapOfShapeShape_HeaderFile
#include <TopTools_DataMapOfShapeShape.hxx>
-#endif
-#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
#include <GEOMAlgo_ShapeAlgo.hxx>
-#endif
-class Geom_Surface;
-class TopTools_ListOfShape;
-class TopoDS_Shape;
-class TopTools_DataMapOfShapeShape;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_FinderShapeOn : 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);
- }
-
+#include <Geom_Surface.hxx>
+#include <TopoDS_Shape.hxx>
- Standard_EXPORT GEOMAlgo_FinderShapeOn();
- Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn();
+//=======================================================================
+//function : GEOMAlgo_FinderShapeOn
+//purpose :
+//=======================================================================
+class GEOMAlgo_FinderShapeOn : public GEOMAlgo_ShapeAlgo
+{
+ public:
+ Standard_EXPORT
+ GEOMAlgo_FinderShapeOn();
- Standard_EXPORT virtual void Perform();
+ Standard_EXPORT
+ virtual ~GEOMAlgo_FinderShapeOn();
- Standard_EXPORT void SetSurface(const Handle(Geom_Surface)& aS) ;
+ Standard_EXPORT
+ virtual void Perform() ;
- Standard_EXPORT void SetShapeType(const TopAbs_ShapeEnum aST) ;
+ Standard_EXPORT
+ void SetSurface(const Handle(Geom_Surface)& aS) ;
- Standard_EXPORT void SetState(const GEOMAlgo_State aSF) ;
+ Standard_EXPORT
+ void SetShapeType(const TopAbs_ShapeEnum aST) ;
- Standard_EXPORT const Handle_Geom_Surface& Surface() const;
+ Standard_EXPORT
+ void SetState(const GEOMAlgo_State aSF) ;
- Standard_EXPORT TopAbs_ShapeEnum ShapeType() const;
+ Standard_EXPORT
+ const Handle_Geom_Surface& Surface() const;
- Standard_EXPORT GEOMAlgo_State State() const;
+ Standard_EXPORT
+ TopAbs_ShapeEnum ShapeType() const;
- Standard_EXPORT const TopTools_ListOfShape& Shapes() const;
+ Standard_EXPORT
+ GEOMAlgo_State State() const;
- Standard_EXPORT static void CopySource (const TopoDS_Shape& aS,
- TopTools_DataMapOfShapeShape& aImages,
- TopTools_DataMapOfShapeShape& aOriginals,
- TopoDS_Shape& aSC) ;
+ Standard_EXPORT
+ const TopTools_ListOfShape& Shapes() const;
- Standard_EXPORT static Standard_Boolean BuildTriangulation (const TopoDS_Shape& theShape);
+ Standard_EXPORT
+ static void CopySource(const TopoDS_Shape& aS,
+ TopTools_DataMapOfShapeShape& aImages,
+ TopTools_DataMapOfShapeShape& aOriginals,
+ TopoDS_Shape& aSC) ;
+ Standard_EXPORT
+ static Standard_Boolean BuildTriangulation(const TopoDS_Shape& aS) ;
protected:
+ Standard_EXPORT
+ virtual void CheckData() ;
+ Standard_EXPORT
+ void MakeArgument1() ;
- Standard_EXPORT virtual void CheckData() ;
+ Standard_EXPORT
+ void MakeArgument2() ;
- Standard_EXPORT void MakeArgument1() ;
+ Standard_EXPORT
+ void Find() ;
- Standard_EXPORT void MakeArgument2() ;
+ Standard_EXPORT
+ void Find(const TopoDS_Shape& aS) ;
- Standard_EXPORT void Find() ;
-
- Standard_EXPORT void Find(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT void FindVertices() ;
-
-
-Handle_Geom_Surface mySurface;
-TopAbs_ShapeEnum myShapeType;
-GEOMAlgo_State myState;
-TopoDS_Shape myArg1;
-TopoDS_Shape myArg2;
-TopTools_ListOfShape myLS;
-TopTools_DataMapOfShapeShape myImages;
-GEOMAlgo_IndexedDataMapOfShapeState myMSS;
-Standard_Boolean myIsAnalytic;
-
-
-private:
+ Standard_EXPORT
+ void FindVertices() ;
+ Handle_Geom_Surface mySurface;
+ TopAbs_ShapeEnum myShapeType;
+ GEOMAlgo_State myState;
+ TopoDS_Shape myArg1;
+ TopoDS_Shape myArg2;
+ TopTools_ListOfShape myLS;
+ TopTools_DataMapOfShapeShape myImages;
+ GEOMAlgo_IndexedDataMapOfShapeState myMSS;
+ Standard_Boolean myIsAnalytic;
};
-
-// other Inline functions and methods (like "C++: function call" methods)
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_FinderShapeOn.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopTools_DataMapOfShapeShape_HeaderFile
-#include <TopTools_DataMapOfShapeShape.hxx>
-#endif
-#ifndef _GEOMAlgo_FinderShapeOn_HeaderFile
-#include <GEOMAlgo_FinderShapeOn.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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
---
-class FinderShapeOn1 from GEOMAlgo
- inherits ShapeAlgo from GEOMAlgo
-
- ---Purpose:
-
-uses
- Pnt from gp,--
- Surface from Geom,
- Surface from GeomAdaptor,
-
- ShapeEnum from TopAbs,
- State from TopAbs,
- Face from TopoDS,
- Edge from TopoDS,
- ListOfShape from TopTools,
-
- State from GEOMAlgo,
- ListOfPnt from GEOMAlgo,
- IndexedDataMapOfShapeState from GEOMAlgo
-
---raises
-
-is
- Create
- returns FinderShapeOn1 from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn1();"
-
- SetSurface(me:out;
- aS:Surface from Geom);
-
- SetShapeType(me:out;
- aST:ShapeEnum from TopAbs);
-
- SetState(me:out;
- aSF: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;
-
- Surface(me)
- returns Surface from Geom;
- ---C++: return const &
-
- ShapeType(me)
- returns ShapeEnum from TopAbs;
-
- State(me)
- returns State from GEOMAlgo;
-
- 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 &
-
- GetPointState(me:out; aP: Pnt from gp)
- returns State from TopAbs is virtual protected;
-
-fields
- mySurface : Surface from Geom is protected;
- myShapeType : ShapeEnum from TopAbs is protected;
- myState : State from GEOMAlgo is protected;
- myNbPntsMin : Integer from Standard is protected;
- myNbPntsMax : Integer from Standard is protected;
- --
- myGAS : Surface from GeomAdaptor is protected;
- myLS : ListOfShape from TopTools is protected;
- --
- myMSS : IndexedDataMapOfShapeState from GEOMAlgo is protected;
-
-end FinderShapeOn1;
// Created: Fri Mar 4 10:31:06 2005
// Author: Peter KURNEV
-#include <GEOMAlgo_FinderShapeOn1.ixx>
-
-#include <GEOMAlgo_ListIteratorOfListOfPnt.hxx>
-
-#include <GEOMAlgo_SurfaceTools.hxx>
-#include <GEOMAlgo_StateCollector.hxx>
-#include <GEOMAlgo_FinderShapeOn.hxx>
-
-#include <GEOMAlgo_PassKey.hxx>
-#include <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
-
-#include <Basics_OCCTVersion.hxx>
+#include <GEOMAlgo_FinderShapeOn1.hxx>
#include <math.h>
#include <BRep_Tool.hxx>
#include <BRepLib_MakeEdge.hxx>
+#include <GEOMAlgo_ListIteratorOfListOfPnt.hxx>
+
+#include <GEOMAlgo_SurfaceTools.hxx>
+#include <GEOMAlgo_StateCollector.hxx>
+#include <GEOMAlgo_FinderShapeOn.hxx>
+
+#include <GEOMAlgo_PassKey.hxx>
+#include <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
+#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
+
//=======================================================================
//function : GEOMAlgo_FinderShapeOn1
//purpose :
return;
}
//
-#if OCC_VERSION_LARGE > 0x06050200
// Initialize the context
GEOMAlgo_ShapeAlgo::Perform();
-#endif
//
// 1
ProcessVertices();
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_FinderShapeOn1.hxx
+// Created: Fri Mar 4 10:31:06 2005
+// Author: Peter KURNEV
+
#ifndef _GEOMAlgo_FinderShapeOn1_HeaderFile
#define _GEOMAlgo_FinderShapeOn1_HeaderFile
-#ifndef _Handle_Geom_Surface_HeaderFile
-#include <Handle_Geom_Surface.hxx>
-#endif
-#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 _GeomAdaptor_Surface_HeaderFile
-#include <GeomAdaptor_Surface.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
-#ifndef _TopAbs_State_HeaderFile
+#include <GEOMAlgo_ListOfPnt.hxx>
+
#include <TopAbs_State.hxx>
-#endif
-class Geom_Surface;
-class TopTools_ListOfShape;
-class TopoDS_Face;
-class GEOMAlgo_ListOfPnt;
-class TopoDS_Edge;
-class GEOMAlgo_IndexedDataMapOfShapeState;
-class gp_Pnt;
+#include <TopAbs_ShapeEnum.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <Geom_Surface.hxx>
+#include <Handle_Geom_Surface.hxx>
+#include <GeomAdaptor_Surface.hxx>
+
+#include <gp_Pnt.hxx>
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_FinderShapeOn1 : 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_FinderShapeOn1();
-Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn1();
-
-
-Standard_EXPORT void SetSurface(const Handle(Geom_Surface)& aS) ;
-
-
-Standard_EXPORT void SetShapeType(const TopAbs_ShapeEnum aST) ;
-
-
-Standard_EXPORT void SetState(const GEOMAlgo_State aSF) ;
-
-
-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 const Handle_Geom_Surface& Surface() const;
-
-
-Standard_EXPORT TopAbs_ShapeEnum ShapeType() const;
-
-
-Standard_EXPORT GEOMAlgo_State State() const;
-
-
-Standard_EXPORT virtual void Perform() ;
-
-
-Standard_EXPORT const TopTools_ListOfShape& Shapes() const;
-
-
-Standard_EXPORT const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
+#include <Standard_Integer.hxx>
-Standard_EXPORT virtual void CheckData() ;
+//=======================================================================
+//function : GEOMAlgo_FinderShapeOn1
+//purpose :
+//=======================================================================
+class GEOMAlgo_FinderShapeOn1 : public GEOMAlgo_ShapeAlgo
+{
+ public:
+ Standard_EXPORT
+ GEOMAlgo_FinderShapeOn1();
+ Standard_EXPORT
+ virtual ~GEOMAlgo_FinderShapeOn1();
-Standard_EXPORT void ProcessVertices() ;
+ Standard_EXPORT
+ void SetSurface(const Handle(Geom_Surface)& aS) ;
+ Standard_EXPORT
+ void SetShapeType(const TopAbs_ShapeEnum aST) ;
-Standard_EXPORT void ProcessEdges() ;
+ Standard_EXPORT
+ void SetState(const GEOMAlgo_State aSF) ;
+ Standard_EXPORT
+ void SetNbPntsMin(const Standard_Integer aNb) ;
-Standard_EXPORT void ProcessFaces() ;
+ Standard_EXPORT
+ Standard_Integer NbPntsMin() const;
+ Standard_EXPORT
+ void SetNbPntsMax(const Standard_Integer aNb) ;
-Standard_EXPORT void ProcessSolids() ;
+ Standard_EXPORT
+ Standard_Integer NbPntsMax() const;
+ Standard_EXPORT
+ const Handle_Geom_Surface& Surface() const;
-Standard_EXPORT void InnerPoints(const TopoDS_Face& aF,GEOMAlgo_ListOfPnt& aLP) ;
+ Standard_EXPORT
+ TopAbs_ShapeEnum ShapeType() const;
+ Standard_EXPORT
+ GEOMAlgo_State State() const;
-Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,GEOMAlgo_ListOfPnt& aLP) ;
+ Standard_EXPORT
+ virtual void Perform() ;
+ Standard_EXPORT
+ const TopTools_ListOfShape& Shapes() const;
-Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,const Standard_Integer aNbPnts,GEOMAlgo_ListOfPnt& aLP) ;
+ Standard_EXPORT
+ const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const;
+ protected:
+ Standard_EXPORT
+ virtual void CheckData() ;
-Standard_EXPORT virtual TopAbs_State GetPointState(const gp_Pnt& aP) ;
+ Standard_EXPORT
+ void ProcessVertices() ;
+ Standard_EXPORT
+ void ProcessEdges() ;
- // Fields PROTECTED
- //
-Handle_Geom_Surface mySurface;
-TopAbs_ShapeEnum myShapeType;
-GEOMAlgo_State myState;
-Standard_Integer myNbPntsMin;
-Standard_Integer myNbPntsMax;
-GeomAdaptor_Surface myGAS;
-TopTools_ListOfShape myLS;
-GEOMAlgo_IndexedDataMapOfShapeState myMSS;
+ Standard_EXPORT
+ void ProcessFaces() ;
+ Standard_EXPORT
+ void ProcessSolids() ;
-private:
+ Standard_EXPORT
+ void InnerPoints(const TopoDS_Face& aF,
+ GEOMAlgo_ListOfPnt& aLP) ;
- // Methods PRIVATE
- //
+ 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 PRIVATE
- //
+ Standard_EXPORT
+ virtual TopAbs_State GetPointState(const gp_Pnt& aP) ;
+ Handle_Geom_Surface mySurface;
+ TopAbs_ShapeEnum myShapeType;
+ GEOMAlgo_State myState;
+ Standard_Integer myNbPntsMin;
+ Standard_Integer myNbPntsMax;
+ GeomAdaptor_Surface myGAS;
+ TopTools_ListOfShape myLS;
+ GEOMAlgo_IndexedDataMapOfShapeState myMSS;
};
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_FinderShapeOn1.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _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 _gp_Pnt_HeaderFile
-#include <gp_Pnt.hxx>
-#endif
-#ifndef _GEOMAlgo_FinderShapeOn1_HeaderFile
-#include <GEOMAlgo_FinderShapeOn1.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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;
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: GEOMAlgo_FinderShapeOn1.cxx
+// File: GEOMAlgo_FinderShapeOn2.cxx
// Created: Fri Mar 4 10:31:06 2005
// Author: Peter KURNEV
-
-#include <GEOMAlgo_FinderShapeOn2.ixx>
-
-#include <GEOMAlgo_ListIteratorOfListOfPnt.hxx>
-
-#include <GEOMAlgo_SurfaceTools.hxx>
-#include <GEOMAlgo_StateCollector.hxx>
-#include <GEOMAlgo_FinderShapeOn.hxx>
-
-#include <GEOMAlgo_PassKey.hxx>
-#include <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
+// <pkv@irinox>
+//
+#include <GEOMAlgo_FinderShapeOn2.hxx>
#include <math.h>
+
#include <Precision.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_MapOfInteger.hxx>
#include <BRep_Tool.hxx>
#include <BRepLib_MakeEdge.hxx>
+#include <GEOMAlgo_ListIteratorOfListOfPnt.hxx>
+
+#include <GEOMAlgo_SurfaceTools.hxx>
+#include <GEOMAlgo_StateCollector.hxx>
+#include <GEOMAlgo_FinderShapeOn.hxx>
+
+#include <GEOMAlgo_PassKey.hxx>
+#include <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
+#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
+
//=======================================================================
//function : GEOMAlgo_FinderShapeOn1
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_FinderShapeOn2::GEOMAlgo_FinderShapeOn2()
:
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_FinderShapeOn2::~GEOMAlgo_FinderShapeOn2()
{
}
//=======================================================================
//function : SetClsf
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::SetClsf(const Handle(GEOMAlgo_Clsf)& aClsf)
{
}
//=======================================================================
//function : Clsf
-//purpose :
+//purpose :
//=======================================================================
const Handle(GEOMAlgo_Clsf)& GEOMAlgo_FinderShapeOn2::Clsf() const
{
}
//=======================================================================
//function : SetShapeType
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::SetShapeType(const TopAbs_ShapeEnum aType)
{
}
//=======================================================================
//function : ShapeType
-//purpose :
+//purpose :
//=======================================================================
TopAbs_ShapeEnum GEOMAlgo_FinderShapeOn2::ShapeType()const
{
}
//=======================================================================
//function : SetState
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::SetState(const GEOMAlgo_State aState)
{
}
//=======================================================================
//function : State
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_State GEOMAlgo_FinderShapeOn2::State() const
{
}
//=======================================================================
//function : SetNbPntsMin
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::SetNbPntsMin(const Standard_Integer aNb)
{
}
//=======================================================================
//function : NbPntsMin
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_FinderShapeOn2::NbPntsMin()const
{
}
//=======================================================================
//function : SetNbPntsMax
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::SetNbPntsMax(const Standard_Integer aNb)
{
}
//=======================================================================
//function : NbPntsMax
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_FinderShapeOn2::NbPntsMax()const
{
}
//=======================================================================
// function: MSS
-// purpose:
+// purpose:
//=======================================================================
const GEOMAlgo_IndexedDataMapOfShapeState& GEOMAlgo_FinderShapeOn2::MSS() const
{
}
//=======================================================================
// function: Shapes
-// purpose:
+// purpose:
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn2::Shapes() const
{
}
//=======================================================================
//function : Perform
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::Perform()
{
return;
}
//
-#if OCC_VERSION_LARGE > 0x06050200
// Initialize the context
GEOMAlgo_ShapeAlgo::Perform();
-#endif
//
myClsf->SetTolerance(myTolerance);
//
}
//
// 4
- ProcessSolids();
+ ProcessSolids();
//
}
//=======================================================================
//function : CheckData
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::CheckData()
{
return;
}
//
- if (myState==GEOMAlgo_ST_UNKNOWN ||
+ if (myState==GEOMAlgo_ST_UNKNOWN ||
myState==GEOMAlgo_ST_INOUT) {
myErrorStatus=13; // unallowed state type
return;
}
//=======================================================================
//function : ProcessVertices
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::ProcessVertices()
{
}
//=======================================================================
//function : ProcessEdges
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::ProcessEdges()
{
}
//
if (BRep_Tool::Degenerated(aE)) {
- myMSS.Add(aE, aSt);
+ myMSS.Add(aE, aSt);
continue;
}
//
if (myState==GEOMAlgo_ST_ON) {
Standard_Boolean bCanBeON;
Standard_Real aT1, aT2;
- Handle(Geom_Curve) aC;
+ Handle(Geom_Curve) aC;
//
aC=BRep_Tool::Curve(aE, aT1, aT2);
bCanBeON=myClsf->CanBeON(aC);
//
InnerPoints(aE, aLP);
if (myErrorStatus) {
- return;
+ return;
}
//
bIsConformState=Standard_True;
}
}
//
- aSt=aSC.State();
+ aSt=aSC.State();
//
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
if (myShapeType==TopAbs_EDGE) {
else if (bIsConformState || aSt==TopAbs_ON) {
myMSS.Add(aE, aSt);
}
- } // for (i=1; i<=aNb; ++i) next edge
+ } // for (i=1; i<=aNb; ++i) next edge
}
//=======================================================================
//function : ProcessFaces
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::ProcessFaces()
{
}
}
//
- aSt=aSC.State();
+ aSt=aSC.State();
//
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
if (myShapeType==TopAbs_FACE) {
else if (bIsConformState || aSt==TopAbs_ON) {
myMSS.Add(aF, aSt);
}
- }// for (i=1; i<=aNb; ++i) next face
+ }// for (i=1; i<=aNb; ++i) next face
}
//=======================================================================
//function : ProcessSolids
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::ProcessSolids()
{
continue; // face has non-conformed state,skip solid
}
//
- aSt=aSC.State();
+ aSt=aSC.State();
//
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
if (bIsConformState) {
//
//=======================================================================
//function : InnerPoints
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
GEOMAlgo_ListOfPnt& aLP)
}
}
//
- // inner nodes=all_nodes - boundary_nodes
+ // inner nodes=all_nodes - boundary_nodes
j1=aNodes.Lower();
j2=aNodes.Upper();
for (j=j1; j<=j2; ++j) {
//
aNb=aLP.Extent();
//
- if (!aNb && myNbPntsMin) {
+ if (!aNb && myNbPntsMin) {
// try to fill it yourself
Standard_Boolean bIsDone;
Standard_Integer aN1, aN2;
break;
}// if (iCnt>1)
}// for (; aIt.More(); aIt.Next())
- }// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder)
- }// if (!aNb && myNbPntsMin) {
+ }// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder)
+ }// if (!aNb && myNbPntsMin) {
}
//=======================================================================
//function : InnerPoints
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE,
GEOMAlgo_ListOfPnt& aLP)
}
//
aNb=aLP.Extent();
- if (!aNb && myNbPntsMin) {
+ if (!aNb && myNbPntsMin) {
// try to fill it yourself
InnerPoints(aE, myNbPntsMin, aLP);
aNb=aLP.Extent();
}
//=======================================================================
//function : InnerPoints
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE,
const Standard_Integer aNbPntsMin,
//
// 10 -myClsf=NULL
// 11 -myShape=NULL
-// 12 -unallowed type of sub-shapes
-// 13 -unallowed state
+// 12 -unallowed type of sub-shapes
+// 13 -unallowed state
// 15 -unallowed surface type
// 20- no triangulation found
// 30- can not obtain the line from the link
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
+// File: GEOMAlgo_FinderShapeOn2.hxx
+// Created: Fri Mar 4 10:31:06 2005
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _GEOMAlgo_FinderShapeOn2_HeaderFile
#define _GEOMAlgo_FinderShapeOn2_HeaderFile
-#ifndef _TopAbs_ShapeEnum_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#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 <Handle_GEOMAlgo_Clsf.hxx>
+#include <GEOMAlgo_Clsf.hxx>
#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;
+#include <GEOMAlgo_Clsf.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Edge.hxx>
+#include <GEOMAlgo_ListOfPnt.hxx>
+//=======================================================================
+//function : GEOMAlgo_FinderShapeOn2
+//purpose :
+//=======================================================================
+class GEOMAlgo_FinderShapeOn2 : public GEOMAlgo_ShapeAlgo
+{
+ public:
+ Standard_EXPORT
+ GEOMAlgo_FinderShapeOn2();
-Standard_EXPORT void SetState(const GEOMAlgo_State aSF) ;
+ Standard_EXPORT
+ virtual ~GEOMAlgo_FinderShapeOn2();
+ Standard_EXPORT
+ void SetClsf(const Handle(GEOMAlgo_Clsf)& aClsf) ;
-Standard_EXPORT GEOMAlgo_State State() const;
+ Standard_EXPORT
+ const Handle_GEOMAlgo_Clsf& Clsf() const;
+ Standard_EXPORT
+ void SetShapeType(const TopAbs_ShapeEnum aST) ;
-Standard_EXPORT void SetNbPntsMin(const Standard_Integer aNb) ;
+ Standard_EXPORT
+ TopAbs_ShapeEnum ShapeType() const;
+ Standard_EXPORT
+ void SetState(const GEOMAlgo_State aSF) ;
-Standard_EXPORT Standard_Integer NbPntsMin() const;
+ Standard_EXPORT
+ GEOMAlgo_State State() const;
+ Standard_EXPORT
+ void SetNbPntsMin(const Standard_Integer aNb) ;
-Standard_EXPORT void SetNbPntsMax(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;
-
+ 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:
+ Standard_EXPORT
+ virtual void CheckData() ;
- // Methods PROTECTED
- //
-
-
-Standard_EXPORT virtual void CheckData() ;
-
-
-Standard_EXPORT void ProcessVertices() ;
-
-
-Standard_EXPORT void ProcessEdges() ;
-
-
-Standard_EXPORT void ProcessFaces() ;
-
+ Standard_EXPORT
+ void ProcessVertices() ;
-Standard_EXPORT void ProcessSolids() ;
+ Standard_EXPORT
+ void ProcessEdges() ;
+ Standard_EXPORT
+ void ProcessFaces() ;
-Standard_EXPORT void InnerPoints(const TopoDS_Face& aF,GEOMAlgo_ListOfPnt& aLP) ;
+ 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,
+ 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
- //
+ Standard_EXPORT
+ void InnerPoints(const TopoDS_Edge& aE,
+ const Standard_Integer aNbPnts,
+ GEOMAlgo_ListOfPnt& aLP) ;
+ TopAbs_ShapeEnum myShapeType;
+ GEOMAlgo_State myState;
+ Standard_Integer myNbPntsMin;
+ Standard_Integer myNbPntsMax;
+ Handle_GEOMAlgo_Clsf myClsf;
+ TopTools_ListOfShape myLS;
+ GEOMAlgo_IndexedDataMapOfShapeState myMSS;
};
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
//=======================================================================
//function : CheckData
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOnQuad::CheckData()
//=======================================================================
//function : GetPointState
-//purpose :
+//purpose :
//=======================================================================
-TopAbs_State GEOMAlgo_FinderShapeOnQuad::GetPointState(const gp_Pnt& aP)
+TopAbs_State GEOMAlgo_FinderShapeOnQuad::GetPointState(const gp_Pnt& aP)
{
// Return IN if aP has TopAbs_IN with all sides.
// In the case of concave quadrangle, return IN if
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
// File: GEOMAlgo_GetInPlace.cxx
+// Created:
// Author: Peter KURNEV
#include <GEOMAlgo_GetInPlace.hxx>
-#include <GEOMAlgo_Tools.hxx>
-
-#include <NMTTools_CoupleOfShape.hxx>
-
#include <NMTDS_BoxBndTree.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
#include <NCollection_UBTreeFiller.hxx>
#include <Bnd_Box.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
+#include <NMTTools_CoupleOfShape.hxx>
+#include <GEOMAlgo_Tools.hxx>
+
+
static
void MapBRepShapes(const TopoDS_Shape& aS,
TopTools_IndexedMapOfShape& aM);
return;
}
//
-#if OCC_VERSION_LARGE > 0x06050200
// Initialize the context
GEOMAlgo_GluerAlgo::Perform();
-#endif
//
Intersect();
if (myErrorStatus) {
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_GetInPlace.hxx
-// Created:
+// Created:
// Author: Peter KURNEV
#ifndef _GEOMAlgo_GetInPlace_HeaderFile
//=======================================================================
/**
- * The implementation of iterator of intersected shapes
+ * The implementation of iterator of intersected shapes
* for Get In Place Algorithm.
* The intersection is in terms of 3D bounding boxes.
*/
//=======================================================================
//class : GEOMAlgo_GetInPlaceIterator
-//purpose :
+//purpose :
//=======================================================================
class GEOMAlgo_GetInPlaceIterator {
public:
*/
//Standard_EXPORT
GEOMAlgo_GetInPlaceIterator();
-
+
/**
* Destructor.
*/
//Standard_EXPORT
virtual ~GEOMAlgo_GetInPlaceIterator();
-
+
/**
* Clear the internal content.
*/
//Standard_EXPORT
void Clear() ;
-
+
/**
* Append the pair of intersected shapes.
* @param theCS
*/
//Standard_EXPORT
void AppendPair(const NMTTools_CoupleOfShape& theCS) ;
-
+
/**
* Initialize the iterator.
* @param theT1
* @param theT2
* The type of (sub)shape Where.
*/
- //Standard_EXPORT
+ //Standard_EXPORT
void Initialize(const TopAbs_ShapeEnum theT1,
const TopAbs_ShapeEnum theT2) ;
/**
* @return
* Standard_True if there are pairs to iterare.
*/
- //Standard_EXPORT
+ //Standard_EXPORT
Standard_Boolean More() const;
-
+
/**
* Shift to the next pair.
*/
//Standard_EXPORT
void Next() ;
-
+
/**
* Returns the pair of intersected shapes.
- * @return
+ * @return
* The pair of intersected shapes.
*/
//Standard_EXPORT
NMTTools_ListOfCoupleOfShape myLists[10];
NMTTools_ListOfCoupleOfShape myEmptyList;
NMTTools_ListIteratorOfListOfCoupleOfShape myIterator;
-
+
private:
};
//=======================================================================
/**
* The implementation of Get In Place Algorithm.
- * The algorithm provides the search the argument [What]
- * in the shape [Where].
+ * The algorithm provides the search the argument [What]
+ * in the shape [Where].
*/
//=======================================================================
//class : GEOMAlgo_GetInPlace
-//purpose :
+//purpose :
//=======================================================================
class GEOMAlgo_GetInPlace : public GEOMAlgo_GluerAlgo,
public GEOMAlgo_Algo
virtual ~GEOMAlgo_GetInPlace();
/**
* Modifier. Sets the shape where the search is intended.
- * @param theShape
+ * @param theShape
* The shape where the search is intended.
*/
Standard_EXPORT
virtual void SetShapeWhere(const TopoDS_Shape& theShape) ;
-
+
/**
* Selector. Returns the shape where the search is intended.
- * @return
+ * @return
* The shape where the search is intended.
*/
Standard_EXPORT
const TopoDS_Shape& ShapeWhere() const;
-
+
/**
* Modifier. Sets the tolerance of mass.
- * @param theTol
+ * @param theTol
* The value tolerance of mass.
*/
Standard_EXPORT
void SetTolMass(const Standard_Real theTol) ;
-
+
/**
* Selector. Returns the value tolerance of mass.
- * @return
+ * @return
* The value tolerance of mass.
*/
Standard_EXPORT
Standard_Real TolMass() const;
-
+
/**
* Modifier. Sets the tolerance of center of gravily.
- * @param theTol
+ * @param theTol
* The value tolerance of center of gravily.
*/
Standard_EXPORT
void SetTolCG(const Standard_Real theTol) ;
-
+
/**
* Selector. Returns the tolerance of center of gravily.
- * @return
+ * @return
* The value tolerance of center of gravily.
*/
Standard_EXPORT
Standard_Real TolCG() const;
-
+
/**
* Perform the algorithm.
*/
Standard_EXPORT
virtual void Perform() ;
-
+
/**
* Returns state of the search.
- * @return
+ * @return
* Standard_True if the argument is found.
*/
Standard_EXPORT
Standard_Boolean IsFound() const;
-
+
/**
* Checks data
*/
- Standard_EXPORT
+ Standard_EXPORT
virtual void CheckData() ;
-
+
/**
* Clear the internal content.
*/
Standard_EXPORT
virtual void Clear() ;
-
+
/**
* Returns the map of shapes IN.
- * @return
+ * @return
** Returns the map of shapes IN.
* The Key - the (sub)shape of the argument [What].
* The Item- the (sub)shapes of the shape [Where] that have
*/
Standard_EXPORT
const GEOMAlgo_DataMapOfShapeMapOfShape& ShapesIn() const;
-
+
/**
* Returns the map of shapes ON.
- * @return
+ * @return
* Returns the map of shapes ON.
* The Key - the (sub)shape of the argument [What].
* The Item- the (sub)shapes of the shape [Where] that have
protected:
Standard_EXPORT
void Intersect() ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void PerformVV() ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void PerformVE() ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void PerformEE() ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void PerformVF() ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void PerformEF() ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void PerformFF() ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void FillEdgesOn() ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void FillFacesOn() ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void FillSolidsOn() ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void PerformZF() ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void PerformZZ() ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void FillImages() ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void FillImagesCompound(const TopoDS_Shape& theS) ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void CheckGProps() ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void CheckGProps(const TopoDS_Shape& theS) ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void FillShapesIn(const TopoDS_Shape& theS1,
const TopoDS_Shape& theS2) ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void FillShapesOn(const TopoDS_Shape& theS1,
const TopoDS_Shape& theS2) ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
Standard_Boolean CheckCoincidence(const TopoDS_Shape& theS1,
const TopoDS_Shape& theS2);
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: GEOMAlgo_GetInPlace_1.cxx
-// Author: Peter KURNEV
+// File: GEOMAlgo_GetInPlace_1.cxx
+// Author: Peter KURNEV
#include <GEOMAlgo_GetInPlace.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <math.h>
#include <gp_Pnt.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dHatch_Hatcher.hxx>
#include <Geom2dHatch_Intersector.hxx>
-#include <GeomAPI_ProjectPointOnCurve.hxx>
-
#include <HatchGen_Domain.hxx>
+#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <TopAbs_State.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Face.hxx>
+#include <BRep_Tool.hxx>
#include <TopExp_Explorer.hxx>
-#include <BRep_Tool.hxx>
#include <BRepTools.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <BOPTools_Tools2D.hxx>
+
static
Standard_Integer PntInEdge(const TopoDS_Edge& aF,
- gp_Pnt& aP);
+ gp_Pnt& aP);
static
Standard_Integer PntInEdge(const TopoDS_Edge& aF,
- gp_Pnt& aP,
- Standard_Real& aT);
+ gp_Pnt& aP,
+ Standard_Real& aT);
static
Standard_Integer PntInFace(const TopoDS_Face& aF,
- gp_Pnt& aP);
+ gp_Pnt& aP);
static
Standard_Integer PntInFace(const TopoDS_Face& aF,
- gp_Pnt& aP,
- gp_Pnt2d& theP2D);
+ gp_Pnt& aP,
+ gp_Pnt2d& theP2D);
static
Standard_Integer PntInSolid(const TopoDS_Solid& aZ,
- const Standard_Real aTol,
- gp_Pnt& aP);
+ const Standard_Real aTol,
+ gp_Pnt& aP);
+
//=======================================================================
//function : CheckCoincidence
//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2)
+ const TopoDS_Shape& aS2)
{
Standard_Boolean bOk;
Standard_Integer iErr;
//
const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aS1);
//
-#if OCC_VERSION_LARGE > 0x06050200
GeomAPI_ProjectPointOnCurve& aPPC=myContext->ProjPC(aE1);
-#else
- GeomAPI_ProjectPointOnCurve& aPPC=myContext.ProjPC(aE1);
-#endif
aPPC.Perform(aP2);
aNbPoints=aPPC.NbPoints();
if (aNbPoints) {
aDmin=aPPC.LowerDistance();
aT=aPPC.LowerDistanceParameter();
if (aDmin < myTolerance) {
- dT=1.e-12;
- BRep_Tool::Curve(aE1, aT1, aT2);
+ dT=1.e-12;
+ BRep_Tool::Curve(aE1, aT1, aT2);
if(aT > (aT1-dT) && aT < (aT2+dT)) {
- bOk=Standard_True;
- }
+ bOk=Standard_True;
+ }
}
}
//else {
else if (aType1==TopAbs_FACE) {
const TopoDS_Face& aF1=*((TopoDS_Face*)&aS1);
//
-#if OCC_VERSION_LARGE > 0x06050200
bOk=myContext->IsValidPointForFace(aP2, aF1, myTolerance);
-#else
- bOk=myContext.IsValidPointForFace(aP2, aF1, myTolerance);
-#endif
}
//
else if (aType1==TopAbs_SOLID) {
const TopoDS_Solid& aZ1=*((TopoDS_Solid*)&aS1);
//
-#if OCC_VERSION_LARGE > 0x06050200
BRepClass3d_SolidClassifier& aSC=myContext->SolidClassifier(aZ1);
-#else
- BRepClass3d_SolidClassifier& aSC=myContext.SolidClassifier(aZ1);
-#endif
aSC.Perform(aP2, myTolerance);
aState=aSC.State();
bOk=(aState==TopAbs_IN);
//purpose :
//=======================================================================
Standard_Integer PntInEdge(const TopoDS_Edge& aE,
- gp_Pnt& aP)
+ gp_Pnt& aP)
+
{
Standard_Integer iErr;
Standard_Real aT;
//purpose :
//=======================================================================
Standard_Integer PntInEdge(const TopoDS_Edge& aE,
- gp_Pnt& aP,
- Standard_Real& aT)
+ gp_Pnt& aP,
+ Standard_Real& aT)
{
Standard_Integer iErr;
Standard_Real aT1, aT2;
//purpose :
//=======================================================================
Standard_Integer PntInSolid(const TopoDS_Solid& aZ,
- const Standard_Real aTol,
- gp_Pnt& aP)
+ const Standard_Real aTol,
+ gp_Pnt& aP)
{
Standard_Integer iErr;
Standard_Real aUx, aVx, aCoef;
//purpose :
//=======================================================================
Standard_Integer PntInFace(const TopoDS_Face& aF,
- gp_Pnt& aP)
+ gp_Pnt& aP)
{
Standard_Integer iErr;
//
//purpose :
//=======================================================================
Standard_Integer PntInFace(const TopoDS_Face& aF,
- gp_Pnt& theP,
- gp_Pnt2d& theP2D)
+ gp_Pnt& theP,
+ gp_Pnt2d& theP2D)
{
Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint;
Standard_Integer iErr, aIx, aNbDomains, i;
//
Geom2dHatch_Intersector aIntr(aTotArcIntr, aTolTangfIntr);
Geom2dHatch_Hatcher aHatcher(aIntr,
- aTolHatch2D, aTolHatch3D,
- Standard_True, Standard_False);
+ aTolHatch2D, aTolHatch3D,
+ Standard_True, Standard_False);
//
iErr=0;
aEpsT=1.e-12;
//
return iErr;
}
+
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_GetInPlace_2.cxx
-// Created:
+// Created:
// Author: Peter KURNEV
#include <GEOMAlgo_GetInPlace.hxx>
static
Standard_Integer Dimension(const TopAbs_ShapeEnum aType);
static
- void PointProperties(const TopoDS_Shape& aS,
+ void PointProperties(const TopoDS_Shape& aS,
GProp_GProps& aGProps);
//=======================================================================
//function : CheckGProps
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GetInPlace::CheckGProps()
{
}
//=======================================================================
//function : CheckGProps
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GetInPlace::CheckGProps(const TopoDS_Shape& aS1)
{
}
//=======================================================================
//function : Dimension
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer Dimension(const TopAbs_ShapeEnum aType)
{
}
//=======================================================================
//class : GEOMAlgo_GProps
-//purpose :
+//purpose :
//=======================================================================
class GEOMAlgo_GProps : public GProp_GProps {
- public:
+ public:
GEOMAlgo_GProps() : GProp_GProps() {
};
//
};
//=======================================================================
//function : PointProperties
-//purpose :
+//purpose :
//=======================================================================
void PointProperties(const TopoDS_Shape& aS, GProp_GProps& aGProps)
-{
+{
Standard_Integer i, aNbS;
Standard_Real aDensity;
gp_Pnt aPX;
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_GetInPlaceIterator.cxx
-// Created:
+// Created:
// Author: Peter KURNEV
#include <GEOMAlgo_GetInPlace.hxx>
const TopAbs_ShapeEnum aType2);
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
GEOMAlgo_GetInPlaceIterator::GEOMAlgo_GetInPlaceIterator()
{
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_GetInPlaceIterator::~GEOMAlgo_GetInPlaceIterator()
{
}
//=======================================================================
//function : Clear
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GetInPlaceIterator::Clear()
{
}
//=======================================================================
//function : AppendPair
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GetInPlaceIterator::AppendPair(const NMTTools_CoupleOfShape& theCS)
{
}
//=======================================================================
//function : ShapeWhere
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GetInPlaceIterator::Initialize(const TopAbs_ShapeEnum aType1,
const TopAbs_ShapeEnum aType2)
}
//=======================================================================
// function: More
-// purpose:
+// purpose:
//=======================================================================
Standard_Boolean GEOMAlgo_GetInPlaceIterator::More()const
{
}
//=======================================================================
// function: Next
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_GetInPlaceIterator::Next()
{
}
//=======================================================================
// function: Value
-// purpose:
+// purpose:
//=======================================================================
const NMTTools_CoupleOfShape& GEOMAlgo_GetInPlaceIterator::Value()const
{
}
//=======================================================================
//function : TypeToInteger
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1,
const TopAbs_ShapeEnum aType2)
iRet=9;
}
}
- return iRet;
+ return iRet;
}
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_GlueAnalyser.cdl
--- Created: Wed Dec 15 11:03:03 2004
--- Author: Peter KURNEV
--- <pkv@irinox>
---
-class GlueAnalyser from GEOMAlgo
- inherits Gluer from GEOMAlgo
- ---Purpose:
-
-uses
- ShapeEnum from TopAbs,
- ListOfShape from TopTools,
- ListOfCoupleOfShapes from GEOMAlgo
-
---raises
-
-is
- Create
- returns GlueAnalyser from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_GlueAnalyser();"
-
- Perform(me:out)
- is redefined;
-
- HasSolidsToGlue(me)
- returns Boolean from Standard;
-
- SolidsToGlue(me)
- returns ListOfCoupleOfShapes from GEOMAlgo;
- ---C++:return const &
-
- HasSolidsAlone(me)
- returns Boolean from Standard;
-
- SolidsAlone(me)
- returns ListOfShape from TopTools;
- ---C++:return const &
-
- DetectVertices(me:out)
- is protected;
-
- DetectEdges(me:out)
- is protected;
-
- DetectFaces(me:out)
- is protected;
-
- DetectShapes(me:out;
- aType:ShapeEnum from TopAbs)
- is protected;
-
- DetectSolids (me:out)
- is protected;
-
-
-
-fields
- mySolidsToGlue : ListOfCoupleOfShapes from GEOMAlgo is protected;
- mySolidsAlone : ListOfShape from TopTools is protected;
-
-end GlueAnalyser;
// Created: Wed Dec 15 11:08:09 2004
// Author: Peter KURNEV
-#include <GEOMAlgo_GlueAnalyser.ixx>
-
-#include <GEOMAlgo_PassKeyShape.hxx>
-#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-#include <GEOMAlgo_Tools.hxx>
-#include <GEOMAlgo_CoupleOfShapes.hxx>
-#include <GEOMAlgo_Gluer.hxx>
-#include <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
-#include <GEOMAlgo_IndexedDataMapOfShapeBox.hxx>
-
-#include <Basics_OCCTVersion.hxx>
+#include <GEOMAlgo_GlueAnalyser.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Compound.hxx>
-#include <TopoDS_Vertex.hxx>
#include <BRep_Builder.hxx>
#include <TopExp.hxx>
-#include <TopTools_MapOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
+#include <GEOMAlgo_PassKeyShape.hxx>
+#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
+#include <GEOMAlgo_Tools.hxx>
+#include <GEOMAlgo_CoupleOfShapes.hxx>
+#include <GEOMAlgo_ListOfCoupleOfShapes.hxx>
+
+#include <GEOMAlgo_Gluer.hxx>
#include <Bnd_HArray1OfBox.hxx>
#include <Bnd_BoundSortBox.hxx>
+#include <TopoDS_Vertex.hxx>
+#include <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
+#include <GEOMAlgo_IndexedDataMapOfShapeBox.hxx>
#include <Bnd_Box.hxx>
-
-#include <BRepBndLib.hxx>
-
#include <TColStd_ListOfInteger.hxx>
+#include <TopTools_MapOfShape.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
+#include <BRepBndLib.hxx>
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
-GEOMAlgo_GlueAnalyser::GEOMAlgo_GlueAnalyser()
- : GEOMAlgo_Gluer()
+ GEOMAlgo_GlueAnalyser::GEOMAlgo_GlueAnalyser()
+:
+ GEOMAlgo_Gluer()
{}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
-GEOMAlgo_GlueAnalyser::~GEOMAlgo_GlueAnalyser()
+ GEOMAlgo_GlueAnalyser::~GEOMAlgo_GlueAnalyser()
{}
//=======================================================================
//function : HasSolidsToGlue
-//purpose :
+//purpose :
//=======================================================================
-Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsToGlue()const
+ Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsToGlue()const
{
return !mySolidsToGlue.IsEmpty();
}
//=======================================================================
//function : HasSolidsAlone
-//purpose :
+//purpose :
//=======================================================================
-Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const
+ Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const
{
return !mySolidsAlone.IsEmpty();
}
//=======================================================================
//function : SolidsToGlue
-//purpose :
+//purpose :
//=======================================================================
const GEOMAlgo_ListOfCoupleOfShapes& GEOMAlgo_GlueAnalyser::SolidsToGlue()const
{
}
//=======================================================================
//function : SolidsAlone
-//purpose :
+//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_GlueAnalyser::SolidsAlone()const
{
}
//=======================================================================
//function : Perform
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GlueAnalyser::Perform()
{
return;
}
//
-#if OCC_VERSION_LARGE > 0x06050200
// Initialize the context
GEOMAlgo_ShapeAlgo::Perform();
-#endif
//
InnerTolerance();
if (myErrorStatus) {
}
//=======================================================================
//function : DetectVertices
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GlueAnalyser::DetectVertices()
{
const TopoDS_Shape& aV=aMV(i);
Bnd_Box aBox;
//
- aBox.SetGap(myTol);
+ aBox.SetGap(myTol);
BRepBndLib::Add(aV, aBox);
aHAB->SetValue(i, aBox);
aMIS.Add(i, aV);
- aMSB.Add(aV, aBox);
+ aMSB.Add(aV, aBox);
}
//
aBSB.Initialize(aHAB);
const TColStd_ListOfInteger& aLI=aBSB.Compare(aBoxV);
aNbVSD=aLI.Extent();
if (!aNbVSD) {
- myErrorStatus=3; // it must not be
+ myErrorStatus=3; // it must not be
return;
}
//
}
//=======================================================================
//function : DetectFaces
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GlueAnalyser::DetectFaces()
{
}
//=======================================================================
//function : DetectEdges
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GlueAnalyser::DetectEdges()
{
}
//=======================================================================
//function : DetectShapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GlueAnalyser::DetectShapes(const TopAbs_ShapeEnum aType)
{
aNbF=aMF.Extent();
for (i=1; i<=aNbF; ++i) {
const TopoDS_Shape& aS=aMF(i);
- //
+ //
//aPKF.Clear();//qft
if (aType==TopAbs_FACE) {
const TopoDS_Face& aF=TopoDS::Face(aS);
}
//=======================================================================
//function : DetectSolids
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GlueAnalyser::DetectSolids()
{
//
mySolidsToGlue.Clear();
mySolidsAlone.Clear();
-
+
//
aNbC=aMPKLS.Extent();
if (!aNbC) {
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_GlueDetector.hxx
+// Created: Wed Dec 15 11:08:09 2004
+// Author: Peter KURNEV
+
#ifndef _GEOMAlgo_GlueAnalyser_HeaderFile
#define _GEOMAlgo_GlueAnalyser_HeaderFile
-#ifndef _GEOMAlgo_ListOfCoupleOfShapes_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <GEOMAlgo_ListOfCoupleOfShapes.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_Gluer_HeaderFile
#include <GEOMAlgo_Gluer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-#ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx>
-#endif
-class GEOMAlgo_ListOfCoupleOfShapes;
-class TopTools_ListOfShape;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_GlueAnalyser : public GEOMAlgo_Gluer {
-
-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_GlueAnalyser();
-Standard_EXPORT virtual ~GEOMAlgo_GlueAnalyser();
-
-
-Standard_EXPORT virtual void Perform() ;
-
-
-Standard_EXPORT Standard_Boolean HasSolidsToGlue() const;
+//=======================================================================
+//function : GEOMAlgo_GlueAnalyser
+//purpose :
+//=======================================================================
+class GEOMAlgo_GlueAnalyser : public GEOMAlgo_Gluer
+{
+ public:
+ Standard_EXPORT
+ GEOMAlgo_GlueAnalyser();
-Standard_EXPORT const GEOMAlgo_ListOfCoupleOfShapes& SolidsToGlue() const;
+ Standard_EXPORT
+ virtual ~GEOMAlgo_GlueAnalyser();
+ Standard_EXPORT
+ virtual void Perform() ;
-Standard_EXPORT Standard_Boolean HasSolidsAlone() const;
+ Standard_EXPORT
+ Standard_Boolean HasSolidsToGlue() const;
+ Standard_EXPORT
+ const GEOMAlgo_ListOfCoupleOfShapes& SolidsToGlue() const;
-Standard_EXPORT const TopTools_ListOfShape& SolidsAlone() const;
+ Standard_EXPORT
+ Standard_Boolean HasSolidsAlone() const;
+ Standard_EXPORT
+ const TopTools_ListOfShape& SolidsAlone() const;
+ protected:
+ Standard_EXPORT
+ void DetectVertices() ;
+ Standard_EXPORT
+ void DetectEdges() ;
+ Standard_EXPORT
+ void DetectFaces() ;
-protected:
+ Standard_EXPORT
+ void DetectShapes(const TopAbs_ShapeEnum aType) ;
- // Methods PROTECTED
- //
-
-
-Standard_EXPORT void DetectVertices() ;
-
-
-Standard_EXPORT void DetectEdges() ;
-
-
-Standard_EXPORT void DetectFaces() ;
-
-
-Standard_EXPORT void DetectShapes(const TopAbs_ShapeEnum aType) ;
-
-
-Standard_EXPORT void DetectSolids() ;
-
-
- // Fields PROTECTED
- //
-GEOMAlgo_ListOfCoupleOfShapes mySolidsToGlue;
-TopTools_ListOfShape mySolidsAlone;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
+ Standard_EXPORT
+ void DetectSolids() ;
+ GEOMAlgo_ListOfCoupleOfShapes mySolidsToGlue;
+ TopTools_ListOfShape mySolidsAlone;
};
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_GlueAnalyser.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ListOfCoupleOfShapes_HeaderFile
-#include <GEOMAlgo_ListOfCoupleOfShapes.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_GlueAnalyser_HeaderFile
-#include <GEOMAlgo_GlueAnalyser.hxx>
-#endif
#include <GEOMAlgo_GlueDetector.hxx>
-#include <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
-#include <GEOMAlgo_PassKeyShape.hxx>
-#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-#include <GEOMAlgo_Tools.hxx>
-
-#include <NMTDS_BndSphereTree.hxx>
-#include <NMTDS_BndSphere.hxx>
-#include <NMTDS_IndexedDataMapOfShapeBndSphere.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
+#include <Bnd_Box.hxx>
#include <NCollection_UBTreeFiller.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopExp.hxx>
-
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <BRepBndLib.hxx>
-#include <Bnd_Box.hxx>
+#include <NMTDS_BndSphereTree.hxx>
+#include <NMTDS_BndSphere.hxx>
+#include <NMTDS_IndexedDataMapOfShapeBndSphere.hxx>
+
+#include <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
+#include <GEOMAlgo_PassKeyShape.hxx>
+#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
+#include <GEOMAlgo_Tools.hxx>
+//
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopTools_MapOfShape.hxx>
+
+//modified by NIZNHY-PKV Tue Mar 13 10:25:47 2012f
+static
+ Standard_Integer CheckAncesstors
+ (const TopoDS_Shape& aVSD,
+ const TopTools_MapOfShape& aMVSD,
+ const TopTools_IndexedDataMapOfShapeListOfShape& aMVE,
+ const TopTools_IndexedDataMapOfShapeListOfShape& aMEV,
+ TopTools_IndexedDataMapOfShapeListOfShape& aMEVZ);
+//modified by NIZNHY-PKV Tue Mar 13 10:25:50 2012t
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
GEOMAlgo_GlueDetector::GEOMAlgo_GlueDetector()
- : GEOMAlgo_GluerAlgo(),
- GEOMAlgo_Algo()
+:
+ GEOMAlgo_GluerAlgo(),
+ GEOMAlgo_Algo()
{}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_GlueDetector::~GEOMAlgo_GlueDetector()
{}
+//modified by NIZNHY-PKV Tue Mar 13 12:26:50 2012f
+//=======================================================================
+//function : StickedShapes
+//purpose :
+//=======================================================================
+const TopTools_IndexedDataMapOfShapeListOfShape&
+ GEOMAlgo_GlueDetector::StickedShapes()
+{
+ return myStickedShapes;
+}
+//modified by NIZNHY-PKV Tue Mar 13 12:26:54 2012t
//=======================================================================
//function : Perform
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GlueDetector::Perform()
{
myErrorStatus=0;
myWarningStatus=0;
+ myStickedShapes.Clear();
//
CheckData();
if (myErrorStatus) {
return;
}
//
-#if OCC_VERSION_LARGE > 0x06050200
// Initialize the context
GEOMAlgo_GluerAlgo::Perform();
-#endif
//
DetectVertices();
if (myErrorStatus) {
return;
}
//
+ //modified by NIZNHY-PKV Wed Mar 14 08:00:09 2012f
+ CheckDetected();
+ if (myErrorStatus) {
+ return;
+ }
+ //modified by NIZNHY-PKV Wed Mar 14 08:00:12 2012t
+ //
DetectEdges();
if (myErrorStatus) {
return;
}
//=======================================================================
//function : DetectVertices
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GlueDetector::DetectVertices()
{
TopTools_DataMapOfShapeListOfShape aMVV;
GEOMAlgo_IndexedDataMapOfIntegerShape aMIS;
NMTDS_IndexedDataMapOfShapeBndSphere aMSB;
- //
NMTDS_BndSphereTreeSelector aSelector;
NMTDS_BndSphereTree aBBTree;
NCollection_UBTreeFiller <Standard_Integer, NMTDS_BndSphere> aTreeFiller(aBBTree);
aTreeFiller.Add(i, aBox);
//
aMIS.Add(i, aV);
- aMSB.Add(aV, aBox);
+ aMSB.Add(aV, aBox);
}
//
aTreeFiller.Fill();
aNbIP=aMIP.Extent();
aIt1.Initialize(aMIP);
for(; aIt1.More(); aIt1.Next()) {
- aIP=aIt1.Key();
- if (aMIPC.Contains(aIP)) {
- continue;
- }
- //
- const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
- const NMTDS_BndSphere& aBoxVP=aMSB.FindFromKey(aVP);
- //
- aSelector.Clear();
- aSelector.SetBox(aBoxVP);
- //
- aNbVSD=aBBTree.Select(aSelector);
- if (!aNbVSD) {
- continue; // it shoild not be so [at least IP itself]
- }
- //
- const TColStd_ListOfInteger& aLI=aSelector.Indices();
- aIt.Initialize(aLI);
- for (; aIt.More(); aIt.Next()) {
- aIP1=aIt.Value();
- if (aMIP.Contains(aIP1)) {
- continue;
- }
- aMIP1.Add(aIP1);
- } //for (; aIt.More(); aIt.Next()) {
+ aIP=aIt1.Key();
+ if (aMIPC.Contains(aIP)) {
+ continue;
+ }
+ //
+ const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
+ const NMTDS_BndSphere& aBoxVP=aMSB.FindFromKey(aVP);
+ //
+ aSelector.Clear();
+ aSelector.SetBox(aBoxVP);
+ //
+ aNbVSD=aBBTree.Select(aSelector);
+ if (!aNbVSD) {
+ continue; // it shoild not be so [at least IP itself]
+ }
+ //
+ const TColStd_ListOfInteger& aLI=aSelector.Indices();
+ aIt.Initialize(aLI);
+ for (; aIt.More(); aIt.Next()) {
+ aIP1=aIt.Value();
+ if (aMIP.Contains(aIP1)) {
+ continue;
+ }
+ aMIP1.Add(aIP1);
+ } //for (; aIt.More(); aIt.Next()) {
}//for(; aIt1.More(); aIt1.Next()) {
//
aNbIP1=aMIP1.Extent();
if (!aNbIP1) {
- break;
+ break;
}
//
aIt1.Initialize(aMIP);
for(; aIt1.More(); aIt1.Next()) {
- aIP=aIt1.Key();
- aMIPC.Add(aIP);
+ aIP=aIt1.Key();
+ aMIPC.Add(aIP);
}
//
aMIP.Clear();
aIt1.Initialize(aMIP1);
for(; aIt1.More(); aIt1.Next()) {
- aIP=aIt1.Key();
- aMIP.Add(aIP);
+ aIP=aIt1.Key();
+ aMIP.Add(aIP);
}
aMIP1.Clear();
}// while(1)
aIP=aIt1.Key();
const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
if (!j) {
- aVF=aVP;
+ aVF=aVP;
}
aLVSD.Append(aVP);
aMVProcessed.Add(aVP);
for (; aItS.More(); aItS.Next()) {
const TopoDS_Shape& aVSD=aItS.Value();
if (!myOrigins.IsBound(aVSD)) {
- myOrigins.Bind(aVSD, aV);
+ myOrigins.Bind(aVSD, aV);
}
}
}
}
//=======================================================================
//function : DetectFaces
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GlueDetector::DetectFaces()
{
}
//=======================================================================
//function : DetectEdges
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GlueDetector::DetectEdges()
{
}
//=======================================================================
//function : DetectShapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GlueDetector::DetectShapes(const TopAbs_ShapeEnum aType)
{
aNbF=aMF.Extent();
for (i=1; i<=aNbF; ++i) {
const TopoDS_Shape& aS=aMF(i);
- //
+ //
if (aType==TopAbs_FACE) {
const TopoDS_Face& aF=*((TopoDS_Face*)&aS);
FacePassKey(aF, aPKF);
continue;
}
//
- const TopoDS_Shape& aS1=aLSDF.First();
+ const TopoDS_Shape& aS1=aLSDF.First();
//
if (aType==TopAbs_EDGE) {
const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aS1);
bDegenerated=BRep_Tool::Degenerated(aE1);
if (bDegenerated) {
- continue;
+ continue;
}
}
//
myImages.Bind(aS1, aLSDF);
+ //
// origins
aItLS.Initialize(aLSDF);
for (; aItLS.More(); aItLS.Next()) {
}
//=======================================================================
//function : FacePassKey
-//purpose :
+//purpose :
//=======================================================================
-void GEOMAlgo_GlueDetector::FacePassKey(const TopoDS_Face& aF,
- GEOMAlgo_PassKeyShape& aPK)
+void GEOMAlgo_GlueDetector::FacePassKey(const TopoDS_Face& aF,
+ GEOMAlgo_PassKeyShape& aPK)
{
Standard_Integer i, aNbE;
TopoDS_Shape aER;
if (BRep_Tool::Degenerated(aEE)) {
continue;
}
- //
+ //
if (myOrigins.IsBound(aE)) {
aER=myOrigins.Find(aE);
}
}
//=======================================================================
//function : EdgePassKey
-//purpose :
+//purpose :
//=======================================================================
-void GEOMAlgo_GlueDetector::EdgePassKey(const TopoDS_Edge& aE,
- GEOMAlgo_PassKeyShape& aPK)
+void GEOMAlgo_GlueDetector::EdgePassKey(const TopoDS_Edge& aE,
+ GEOMAlgo_PassKeyShape& aPK)
{
TopAbs_Orientation aOr;
TopoDS_Shape aVR;
aOr=aV.Orientation();
if (aOr==TopAbs_FORWARD || aOr==TopAbs_REVERSED) {
if (myOrigins.IsBound(aV)) {
- aVR=myOrigins.Find(aV);
+ aVR=myOrigins.Find(aV);
}
else {
- aVR=aV;
+ aVR=aV;
}
aLV.Append(aVR);
}
//
aPK.SetShapes(aLV);
}
+//modified by NIZNHY-PKV Tue Mar 13 09:54:18 2012f
+//=======================================================================
+//function : CheckDetected
+//purpose :
+//=======================================================================
+void GEOMAlgo_GlueDetector::CheckDetected()
+{
+ TopoDS_Iterator aItA;
+ TopExp_Explorer aExp;
+ TopTools_ListOfShape aLV;
+ TopTools_MapOfShape aMFence;
+ TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
+ TopTools_IndexedDataMapOfShapeListOfShape aMVE, aMEV;
+ //
+ // 1. aMVE, aMEV
+ TopExp::MapShapesAndAncestors(myArgument, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
+ //
+ aExp.Init(myArgument, TopAbs_EDGE);
+ for (; aExp.More(); aExp.Next()) {
+ const TopoDS_Shape& aE=aExp.Current();
+ //
+ aLV.Clear();
+ aMFence.Clear();
+ aItA.Initialize(aE);
+ for (; aItA.More(); aItA.Next()) {
+ const TopoDS_Shape& aV=aItA.Value();
+ if (aMFence.Add(aV)) {
+ aLV.Append(aV);
+ }
+ }
+ //
+ aMEV.Add(aE, aLV);
+ }
+ // 2. Checking
+ aItIm.Initialize(myImages);
+ for (; aItIm.More(); aItIm.Next()) {
+ //const TopoDS_Shape& aV=aItIm.Key();
+ const TopTools_ListOfShape& aLVSD=aItIm.Value();
+ CheckDetected(aLVSD, aMVE, aMEV);
+ }
+}
+//=======================================================================
+//function : CheckDetected
+//purpose :
+//=======================================================================
+void GEOMAlgo_GlueDetector::CheckDetected
+ (const TopTools_ListOfShape& aLVSD,
+ const TopTools_IndexedDataMapOfShapeListOfShape& aMVE,
+ const TopTools_IndexedDataMapOfShapeListOfShape& aMEV)
+{
+ Standard_Integer i, aNbVSD, aNbA, iRet;
+ TopAbs_ShapeEnum aTypeS, aTypeA[2];
+ TopExp_Explorer aExp, aExpA;
+ TopTools_MapOfShape aMFence, aMVSD;
+ TopTools_ListOfShape aLV;
+ TopTools_ListIteratorOfListOfShape aItLS;
+ //
+ myErrorStatus=0;
+ //
+ aNbVSD=aLVSD.Extent();
+ if (aNbVSD < 2) {
+ return ;
+ }
+ //
+ aItLS.Initialize(aLVSD);
+ for (; aItLS.More(); aItLS.Next()) {
+ const TopoDS_Shape& aVSD=aItLS.Value();
+ aMVSD.Add(aVSD);
+ }
+ //
+ aItLS.Initialize(aLVSD);
+ for (; aItLS.More(); aItLS.Next()) {
+ const TopoDS_Shape& aVSD=aItLS.Value();
+ //
+ iRet=CheckAncesstors(aVSD, aMVSD, aMVE, aMEV, myStickedShapes);
+ if (iRet) {
+ // Sticked shapes detected
+ myWarningStatus=2;
+ }
+ }
+}
+//=======================================================================
+//function : CheckAncesstors
+//purpose :
+//=======================================================================
+Standard_Integer CheckAncesstors
+ (const TopoDS_Shape& aVSD,
+ const TopTools_MapOfShape& aMVSD,
+ const TopTools_IndexedDataMapOfShapeListOfShape& aMVE,
+ const TopTools_IndexedDataMapOfShapeListOfShape& aMEV,
+ TopTools_IndexedDataMapOfShapeListOfShape& aMEVZ)
+{
+ Standard_Address pLE, pLV, pLVZ;
+ Standard_Integer iRet, aNbVX;
+ TopTools_ListIteratorOfListOfShape aItLE, aItLV;
+ TopTools_MapOfShape aMFence;
+ TopTools_ListOfShape aLVX;
+ //
+ iRet=0;
+ //
+ pLE=aMVE.FindFromKey1(aVSD);
+ if (!pLE) {
+ return iRet;
+ }
+ //
+ const TopTools_ListOfShape& aLE=*((TopTools_ListOfShape*)pLE);
+ aItLE.Initialize(aLE);
+ for (; aItLE.More(); aItLE.Next()) {
+ const TopoDS_Shape& aE=aItLE.Value();
+ //
+ pLV=aMEV.FindFromKey1(aE);
+ if (!pLV) {
+ continue; // it should be not so
+ }
+ //
+ aLVX.Clear();
+ const TopTools_ListOfShape& aLV=*((TopTools_ListOfShape*)pLV);
+ aItLV.Initialize(aLV);
+ for (; aItLV.More(); aItLV.Next()) {
+ const TopoDS_Shape& aV=aItLV.Value();
+ if (!aV.IsSame(aVSD)) {
+ if (aMVSD.Contains(aV)) {
+ if (aMFence.Add(aV)) {
+ aLVX.Append(aV);
+ }
+ }
+ }
+ }
+ //
+ aNbVX=aLVX.Extent();
+ if (!aNbVX) {
+ continue;
+ }
+ //
+ iRet=1;
+ //
+ pLVZ=aMEVZ.FindFromKey1(aE);
+ if (!pLVZ) {
+ aMEVZ.Add(aE, aLVX);
+ }
+ else {
+ TopTools_ListOfShape& aLVZ=*((TopTools_ListOfShape*)pLVZ);
+ aLVZ.Append(aLVX);
+ }
+ }
+ //
+ return iRet;
+}
+//modified by NIZNHY-PKV Tue Mar 13 09:54:59 2012t
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: GEOMAlgo_GlueDetector.hxx
-// Created:
// Author: Peter KURNEV
-// <pkv@irinox>
-//
+
#ifndef _GEOMAlgo_GlueDetector_HeaderFile
#define _GEOMAlgo_GlueDetector_HeaderFile
#include <Standard.hxx>
#include <Standard_Macro.hxx>
-#include <GEOMAlgo_GluerAlgo.hxx>
+
#include <TopAbs_ShapeEnum.hxx>
-#include <GEOMAlgo_PassKeyShape.hxx>
+
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+
+#include <GEOMAlgo_GluerAlgo.hxx>
#include <GEOMAlgo_Algo.hxx>
+#include <GEOMAlgo_PassKeyShape.hxx>
//=======================================================================
//function : GEOMAlgo_GlueDetector
-//purpose :
+//purpose :
//=======================================================================
-class GEOMAlgo_GlueDetector : public GEOMAlgo_GluerAlgo,
- public GEOMAlgo_Algo {
+class GEOMAlgo_GlueDetector : public GEOMAlgo_GluerAlgo,
+ public GEOMAlgo_Algo
+{
public:
- Standard_EXPORT GEOMAlgo_GlueDetector();
-
- Standard_EXPORT virtual ~GEOMAlgo_GlueDetector();
-
- Standard_EXPORT virtual void Perform() ;
+ Standard_EXPORT
+ GEOMAlgo_GlueDetector();
+
+ Standard_EXPORT virtual
+ ~GEOMAlgo_GlueDetector();
+ Standard_EXPORT virtual
+ void Perform() ;
+
+//modified by NIZNHY-PKV Tue Mar 13 12:23:20 2012f
+ Standard_EXPORT
+ const TopTools_IndexedDataMapOfShapeListOfShape& StickedShapes();
+//modified by NIZNHY-PKV Tue Mar 13 12:23:26 2012t
+//------------------------------------------------
protected:
- Standard_EXPORT void DetectVertices() ;
-
- Standard_EXPORT void DetectEdges() ;
-
- Standard_EXPORT void DetectFaces() ;
-
- Standard_EXPORT void DetectShapes(const TopAbs_ShapeEnum aType) ;
-
- Standard_EXPORT void EdgePassKey(const TopoDS_Edge& aE,
- GEOMAlgo_PassKeyShape& aPK) ;
-
- Standard_EXPORT void FacePassKey(const TopoDS_Face& aF,
- GEOMAlgo_PassKeyShape& aPK) ;
-
-private:
+ Standard_EXPORT
+ void DetectVertices() ;
+
+ Standard_EXPORT
+ void DetectEdges() ;
+
+ Standard_EXPORT
+ void DetectFaces() ;
+
+ Standard_EXPORT
+ void DetectShapes(const TopAbs_ShapeEnum aType) ;
+
+ Standard_EXPORT
+ void EdgePassKey(const TopoDS_Edge& aE,
+ GEOMAlgo_PassKeyShape& aPK) ;
+
+ Standard_EXPORT
+ void FacePassKey(const TopoDS_Face& aF,
+ GEOMAlgo_PassKeyShape& aPK) ;
+
+ //modified by NIZNHY-PKV Tue Mar 13 09:53:03 2012f
+ Standard_EXPORT
+ void CheckDetected();
+ //
+ Standard_EXPORT
+ void CheckDetected
+ (const TopTools_ListOfShape& aLVSD,
+ const TopTools_IndexedDataMapOfShapeListOfShape& aMVE,
+ const TopTools_IndexedDataMapOfShapeListOfShape& aMEV);
+
+
+ protected:
+ TopTools_IndexedDataMapOfShapeListOfShape myStickedShapes;
+ //modified by NIZNHY-PKV Tue Mar 13 09:53:08 2012t
+
};
#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_Gluer.cdl
--- Created: Sat Dec 04 12:41:32 2004
--- Author: Peter KURNEV
--- <peter@PREFEX>
---
-class Gluer from GEOMAlgo
- inherits ShapeAlgo from GEOMAlgo
-
- ---Purpose:
-
-uses
- ShapeEnum from TopAbs,
- Shape from TopoDS,
- Edge from TopoDS,
- Face from TopoDS,
- Vertex from TopoDS,
- ListOfShape from TopTools,
- DataMapOfShapeShape from TopTools,
- DataMapOfShapeListOfShape from TopTools,
- Context from IntTools,
- PassKeyShape from GEOMAlgo
-
---raises
-
-is
- Create
- returns Gluer from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_Gluer();"
-
- SetCheckGeometry (me:out;
- aFlag:Boolean from Standard);
-
- CheckGeometry (me)
- returns Boolean from Standard;
-
- Perform(me:out)
- is redefined;
-
- AloneShapes(me)
- returns Integer from Standard;
-
- --modified by NIZNHY-PKV Fri Jan 21 14:16:58 2005f-
- Modified(me:out;
- S : Shape from TopoDS)
- returns ListOfShape from TopTools;
- ---C++: return const &
-
- Generated(me:out;
- S : Shape from TopoDS)
- returns ListOfShape from TopTools;
- ---C++: return const &
-
- IsDeleted (me:out;
- S : Shape from TopoDS)
- returns Boolean from Standard;
- --modified by NIZNHY-PKV Fri Jan 21 14:17:04 2005t
-
- CheckData(me:out)
- is redefined protected;
-
- CheckResult (me:out)
- is redefined protected;
-
- MakeVertices(me:out)
- is protected;
-
- MakeEdges(me:out)
- is protected;
-
- MakeFaces(me:out)
- is protected;
-
- MakeShapes(me:out;
- aType:ShapeEnum from TopAbs)
- is protected;
-
- MakeShells(me:out)
- is protected;
-
- MakeSolids(me:out)
- is protected;
-
- InnerTolerance(me:out)
- is protected;
-
- EdgePassKey(me:out;
- aE:Edge from TopoDS;
- aPK:out PassKeyShape from GEOMAlgo)
- is protected;
-
- FacePassKey(me:out;
- aF:Face from TopoDS;
- aPK:out PassKeyShape from GEOMAlgo)
- is protected;
-
- MakeVertex(me:out;
- aLV : ListOfShape from TopTools;
- aNewV: out Vertex from TopoDS)
- is protected;
- MakeEdge(me:out;
- aEdge : Edge from TopoDS;
- aNewEdge: out Edge from TopoDS)
- is protected;
-
- MakeFace(me:out;
- aFace : Face from TopoDS;
- aNewEdge: out Face from TopoDS)
- is protected;
-
- IsToReverse(me:out;
- aFR : Face from TopoDS;
- aF : Face from TopoDS)
- returns Boolean from Standard
- is protected;
-
- HasNewSubShape(me;
- aS : Shape from TopoDS)
- returns Boolean from Standard
- is protected;
---
- Images(me)
- returns DataMapOfShapeListOfShape from TopTools;
- ---C++:return const &
-
- Origins(me)
- returns DataMapOfShapeShape from TopTools;
- ---C++:return const &
-
-fields
- myCheckGeometry : Boolean from Standard is protected;
- myTol : Real from Standard is protected;
- myImages : DataMapOfShapeListOfShape from TopTools is protected;
- myOrigins : DataMapOfShapeShape from TopTools is protected;
- myNbAlone : Integer from Standard is protected;
-----
- myGenerated : ListOfShape from TopTools is protected;
-----
-
-end Gluer;
// File: GEOMAlgo_Gluer.cxx
// Created: Sat Dec 04 12:45:53 2004
// Author: Peter KURNEV
-
-#include <GEOMAlgo_Gluer.ixx>
-
-#include <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
-#include <GEOMAlgo_IndexedDataMapOfShapeBox.hxx>
-#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-#include <GEOMAlgo_PassKeyShape.hxx>
-#include <GEOMAlgo_Tools.hxx>
+// <peter@PREFEX>
+//
+#include <GEOMAlgo_Gluer.hxx>
#include <NMTDS_BoxBndTree.hxx>
-#include <NMTDS_BndSphereTree.hxx>
-#include <NMTDS_BndSphere.hxx>
-#include <NMTDS_IndexedDataMapOfShapeBndSphere.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
#include <NCollection_UBTreeFiller.hxx>
#include <TColStd_MapIteratorOfMapOfInteger.hxx>
#include <BOPTools_Tools2D.hxx>
#include <BOP_CorrectTolerances.hxx>
-static
+#include <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
+#include <GEOMAlgo_IndexedDataMapOfShapeBox.hxx>
+#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
+#include <GEOMAlgo_PassKeyShape.hxx>
+#include <GEOMAlgo_Tools.hxx>
+//
+
+#include <NMTDS_BndSphereTree.hxx>
+#include <NMTDS_BndSphere.hxx>
+#include <NMTDS_IndexedDataMapOfShapeBndSphere.hxx>
+
+//
+static
void GetSubShapes(const TopoDS_Shape& aS,
TopTools_IndexedMapOfShape& aMSS);
//=======================================================================
//function : GEOMAlgo_Gluer
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_Gluer::GEOMAlgo_Gluer()
:
}
//=======================================================================
//function : ~GEOMAlgo_Gluer
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_Gluer::~GEOMAlgo_Gluer()
{
}
//=======================================================================
//function : SetCheckGeometry
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer::SetCheckGeometry(const Standard_Boolean aFlag)
{
}
//=======================================================================
//function : CheckGeometry
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_Gluer::CheckGeometry() const
{
}
//=======================================================================
//function : SetKeepNonSolids
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer::SetKeepNonSolids(const Standard_Boolean aFlag)
{
}
//=======================================================================
//function : KeepNonSolids
-//purpose :
+//purpose :
//=======================================================================
-//Standard_Boolean GEOMAlgo_Gluer::KeepNonSolids()const
-//{
-// return myKeepNonSolids;
-//}
+Standard_Boolean GEOMAlgo_Gluer::KeepNonSolids()const
+{
+ return myKeepNonSolids;
+}
//=======================================================================
//function : AloneShapes
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_Gluer::AloneShapes()const
{
}
//=======================================================================
//function : Images
-//purpose :
+//purpose :
//=======================================================================
const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer::Images()const
{
}
//=======================================================================
//function : Origins
-//purpose :
+//purpose :
//=======================================================================
const TopTools_DataMapOfShapeShape& GEOMAlgo_Gluer::Origins()const
{
}
//=======================================================================
//function : Perform
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer::Perform()
{
myErrorStatus=0;
myWarningStatus=0;
//
-#if OCC_VERSION_LARGE > 0x06050200
// Initialize the context
GEOMAlgo_ShapeAlgo::Perform();
-#endif
//
void (GEOMAlgo_Gluer::* pF[aNb])()={
&GEOMAlgo_Gluer::CheckData, &GEOMAlgo_Gluer::InnerTolerance,
//=======================================================================
//function : MakeVertices
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer::MakeVertices()
{
aTreeFiller.Add(i, aBox);
//
aMIS.Add(i, aV);
- aMSB.Add(aV, aBox);
+ aMSB.Add(aV, aBox);
}
//
aTreeFiller.Fill();
//
aNbVSD=aBBTree.Select(aSelector);
if (!aNbVSD) {
- continue; // it must not be
+ continue; // it must not be
}
//
const TColStd_ListOfInteger& aLI=aSelector.Indices();
}
//=======================================================================
//function : MakeSubShapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer::MakeSubShapes (const TopoDS_Shape& theShape,
TopTools_MapOfShape& theMS,
}
//=======================================================================
//function : MakeSolids
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer::MakeSolids()
{
}
//=======================================================================
//function : MakeShells
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer::MakeShells()
{
}
//=======================================================================
//function : MakeFaces
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer::MakeFaces()
{
}
//=======================================================================
//function : MakeEdges
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer::MakeEdges()
{
}
//=======================================================================
//function : MakeShapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType)
{
aNbF=aMF.Extent();
for (i=1; i<=aNbF; ++i) {
const TopoDS_Shape& aS=aMF(i);
- //
+ //
if (aType==TopAbs_FACE) {
const TopoDS_Face& aF=TopoDS::Face(aS);
FacePassKey(aF, aPKF);
}
// check geometric coincidence
if (myCheckGeometry) {
- iErr=GEOMAlgo_Tools::RefineSDShapes(aMPKLF, myTol, myContext);
+ iErr=GEOMAlgo_Tools::RefineSDShapes(aMPKLF, myTol, myContext);
if (iErr) {
myErrorStatus=200;
return;
}
}
//
- if (bHasNewSubShape) {
+ if (bHasNewSubShape) {
if (aType==TopAbs_FACE) {
TopoDS_Face aNewFace;
//
}
//=======================================================================
//function : CheckResult
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer::CheckResult()
{
//
if (myResult.IsNull()) {
myErrorStatus=6;
- return;
+ return;
}
- //
+ //
Standard_Boolean bFound;
Standard_Integer i, j, aNbS, aNbFS, aNbSx;
TopTools_IndexedMapOfShape aMS, aMFS;
TopExp::MapShapesAndAncestors(myResult, TopAbs_FACE, TopAbs_SOLID, aMFR);
TopExp::MapShapes(myResult, TopAbs_SOLID, aMS);
//
-
+
myNbAlone=0;
aNbS=aMS.Extent();
for (i=1; i<=aNbS; ++i) {
}
//=======================================================================
//function : CheckData
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer::CheckData()
{
//
if (myShape.IsNull()) {
myErrorStatus=5;
- return;
+ return;
}
}
//=======================================================================
//function : InnerTolerance
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer::InnerTolerance()
{
}
//=======================================================================
//function : FacePassKey
-//purpose :
+//purpose :
//=======================================================================
-void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF,
+void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF,
GEOMAlgo_PassKeyShape& aPK)
{
Standard_Integer i, aNbE;
}
//=======================================================================
//function : EdgePassKey
-//purpose :
+//purpose :
//=======================================================================
-void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE,
+void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE,
GEOMAlgo_PassKeyShape& aPK)
{
TopoDS_Vertex aV1, aV2;
}
//=======================================================================
//function : MakeVertex
-//purpose :
+//purpose :
//=======================================================================
-void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV,
+void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV,
TopoDS_Vertex& aNewVertex)
{
Standard_Integer aNbV;
}
//=======================================================================
//function : MakeEdge
-//purpose :
+//purpose :
//=======================================================================
-void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE,
+void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE,
TopoDS_Edge& aNewEdge)
{
myErrorStatus=0;
}
//
else {
- BOPTools_Tools::MakeSplitEdge(aEx, aVR1, aT1, aVR2, aT2, aNewEdge);
+ BOPTools_Tools::MakeSplitEdge(aEx, aVR1, aT1, aVR2, aT2, aNewEdge);
}
}
//=======================================================================
//function : MakeFace
-//purpose :
+//purpose :
//=======================================================================
-void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF,
+void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF,
TopoDS_Face& aNewFace)
{
myErrorStatus=0;
GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax);
}
BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD);
-
- // orient image
+
+ // orient image
bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext);
if (bIsToReverse) {
aER.Reverse();
}
//=======================================================================
//function : IsToReverse
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR,
const TopoDS_Face& aF)
aC3D=BRep_Tool::Curve(aE, aT1, aT2);
aT=BOPTools_Tools2D::IntermediatePoint(aT1, aT2);
aC3D->D0(aT, aP);
-#if OCC_VERSION_LARGE > 0x06050200
myContext->ProjectPointOnEdge(aP, aER, aTR);
-#else
- myContext.ProjectPointOnEdge(aP, aER, aTR);
-#endif
//
BOPTools_Tools3D::GetNormalToFaceOnEdge (aE, aF, aT, aDNF);
if (aF.Orientation()==TopAbs_REVERSED) {
}
//=======================================================================
//function : HasNewSubShape
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_Gluer::HasNewSubShape(const TopoDS_Shape& aS)const
{
}
//=======================================================================
//function : GetSubShapes
-//purpose :
+//purpose :
//=======================================================================
void GetSubShapes(const TopoDS_Shape& aS,
TopTools_IndexedMapOfShape& aMSS)
}
//=======================================================================
//function : Modified
-//purpose :
+//purpose :
//=======================================================================
-const TopTools_ListOfShape& GEOMAlgo_Gluer::Modified (const TopoDS_Shape& aS)
+const TopTools_ListOfShape& GEOMAlgo_Gluer::Modified (const TopoDS_Shape& aS)
{
TopAbs_ShapeEnum aType;
//
//
aType=aS.ShapeType();
if (aType==TopAbs_VERTEX ||
- aType==TopAbs_EDGE ||
- aType==TopAbs_WIRE ||
- aType==TopAbs_FACE ||
- aType==TopAbs_SHELL ||
- aType==TopAbs_SOLID) {
+ aType==TopAbs_EDGE ||
+ aType==TopAbs_WIRE ||
+ aType==TopAbs_FACE ||
+ aType==TopAbs_SHELL ||
+ aType==TopAbs_SOLID) {
if(myOrigins.IsBound(aS)) {
const TopoDS_Shape& aSnew=myOrigins.Find(aS);
if (!aSnew.IsSame(aS)) {
}
//=======================================================================
//function : Generated
-//purpose :
+//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_Gluer::Generated(const TopoDS_Shape& )
{
}
//=======================================================================
//function : IsDeleted
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_Gluer::IsDeleted (const TopoDS_Shape& aS)
{
//
// ErrorStatus
//
-// 1 - the object is just initialized
+// 1 - the object is just initialized
// 2 - no vertices found in source shape
// 3 - nb same domain vertices for the vertex Vi =0
// 4 - nb same domain edges(faces) for the edge Ei(face Fi) =0
+
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_Gluer.hxx
+// Created: Sat Dec 04 12:45:53 2004
+// Author: Peter KURNEV
+// <peter@PREFEX>
+//
#ifndef _GEOMAlgo_Gluer_HeaderFile
#define _GEOMAlgo_Gluer_HeaderFile
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
-#endif
-#ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
#include <TopTools_DataMapOfShapeListOfShape.hxx>
-#endif
-#ifndef _TopTools_DataMapOfShapeShape_HeaderFile
#include <TopTools_DataMapOfShapeShape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
#include <GEOMAlgo_ShapeAlgo.hxx>
-#endif
-#ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx>
-#endif
-class TopTools_ListOfShape;
-class TopoDS_Shape;
-class TopoDS_Edge;
-class GEOMAlgo_PassKeyShape;
-class TopoDS_Face;
-class TopoDS_Vertex;
-class TopTools_DataMapOfShapeListOfShape;
-class TopTools_DataMapOfShapeShape;
-class TopTools_MapOfShape;
-class TopoDS_Compound;
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Vertex.hxx>
+#include <GEOMAlgo_PassKeyShape.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopoDS_Compound.hxx>
+
+//=======================================================================
+//class : GEOMAlgo_Gluer
+//purpose :
+//=======================================================================
+class GEOMAlgo_Gluer : public GEOMAlgo_ShapeAlgo {
+public:
+ Standard_EXPORT
+ GEOMAlgo_Gluer();
+ Standard_EXPORT
+ virtual ~GEOMAlgo_Gluer();
+ Standard_EXPORT
+ void SetCheckGeometry(const Standard_Boolean aFlag) ;
-class GEOMAlgo_Gluer : public GEOMAlgo_ShapeAlgo {
-public:
+ Standard_EXPORT
+ Standard_Boolean CheckGeometry() const;
- 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);
- }
-
-
- Standard_EXPORT GEOMAlgo_Gluer();
-Standard_EXPORT virtual ~GEOMAlgo_Gluer();
-
- Standard_EXPORT void SetCheckGeometry(const Standard_Boolean aFlag) ;
-
- Standard_EXPORT Standard_Boolean CheckGeometry() const;
-
- Standard_EXPORT virtual void Perform() ;
-
- Standard_EXPORT Standard_Integer AloneShapes() const;
-
- Standard_EXPORT const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ;
-
- Standard_EXPORT const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) ;
-
- Standard_EXPORT Standard_Boolean IsDeleted(const TopoDS_Shape& S) ;
-
- Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Images() const;
-
- Standard_EXPORT const TopTools_DataMapOfShapeShape& Origins() const;
-
- Standard_EXPORT void MakeSubShapes(const TopoDS_Shape& aS,TopTools_MapOfShape& aM,TopoDS_Compound& aC) ;
-
- Standard_EXPORT void SetKeepNonSolids(const Standard_Boolean bFlag) ;
-
- Standard_EXPORT Standard_Boolean KeepNonSolids() const;
-
-
-
-
-
-protected:
-
-
- Standard_EXPORT virtual void CheckData() ;
-
- Standard_EXPORT virtual void CheckResult() ;
-
- Standard_EXPORT void MakeVertices() ;
-
- Standard_EXPORT void MakeEdges() ;
-
- Standard_EXPORT void MakeFaces() ;
-
- Standard_EXPORT void MakeShapes(const TopAbs_ShapeEnum aType) ;
-
- Standard_EXPORT void MakeShells() ;
-
- Standard_EXPORT void MakeSolids() ;
-
- Standard_EXPORT void InnerTolerance() ;
-
- Standard_EXPORT void EdgePassKey(const TopoDS_Edge& aE,GEOMAlgo_PassKeyShape& aPK) ;
-
- Standard_EXPORT void FacePassKey(const TopoDS_Face& aF,GEOMAlgo_PassKeyShape& aPK) ;
-
- Standard_EXPORT void MakeVertex(const TopTools_ListOfShape& aLV,TopoDS_Vertex& aNewV) ;
-
- Standard_EXPORT void MakeEdge(const TopoDS_Edge& aEdge,TopoDS_Edge& aNewEdge) ;
-
- Standard_EXPORT void MakeFace(const TopoDS_Face& aFace,TopoDS_Face& aNewEdge) ;
-
- Standard_EXPORT Standard_Boolean IsToReverse(const TopoDS_Face& aFR,const TopoDS_Face& aF) ;
-
- Standard_EXPORT Standard_Boolean HasNewSubShape(const TopoDS_Shape& aS) const;
-
-
-Standard_Boolean myCheckGeometry;
-Standard_Real myTol;
-TopTools_DataMapOfShapeListOfShape myImages;
-TopTools_DataMapOfShapeShape myOrigins;
-Standard_Integer myNbAlone;
-TopTools_ListOfShape myGenerated;
-Standard_Boolean myKeepNonSolids;
-
-
-private:
+ Standard_EXPORT
+ void SetKeepNonSolids(const Standard_Boolean aFlag) ;
+ Standard_EXPORT
+ Standard_Boolean KeepNonSolids() const;
+ Standard_EXPORT
+ virtual void Perform() ;
+ Standard_EXPORT
+ Standard_Integer AloneShapes() const;
+ Standard_EXPORT
+ const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ;
-};
+ Standard_EXPORT
+ const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) ;
+
+ Standard_EXPORT
+ Standard_Boolean IsDeleted(const TopoDS_Shape& S) ;
+
+ Standard_EXPORT
+ const TopTools_DataMapOfShapeListOfShape& Images() const;
+
+ Standard_EXPORT
+ const TopTools_DataMapOfShapeShape& Origins() const;
+
+ protected:
+ Standard_EXPORT
+ virtual void CheckData() ;
+
+ Standard_EXPORT
+ virtual void CheckResult() ;
+
+ Standard_EXPORT
+ void MakeVertices() ;
+
+ Standard_EXPORT
+ void MakeEdges() ;
+
+ Standard_EXPORT
+ void MakeFaces() ;
+ Standard_EXPORT
+ void MakeShapes(const TopAbs_ShapeEnum aType) ;
+ Standard_EXPORT
+ void MakeShells() ;
+ Standard_EXPORT
+ void MakeSolids() ;
+ Standard_EXPORT
+ void InnerTolerance() ;
-// other Inline functions and methods (like "C++: function call" methods)
+ Standard_EXPORT
+ void EdgePassKey(const TopoDS_Edge& aE,
+ GEOMAlgo_PassKeyShape& aPK) ;
+ Standard_EXPORT
+ void FacePassKey(const TopoDS_Face& aF,
+ GEOMAlgo_PassKeyShape& aPK) ;
+ Standard_EXPORT
+ void MakeVertex(const TopTools_ListOfShape& aLV,
+ TopoDS_Vertex& aNewV) ;
+
+ Standard_EXPORT
+ void MakeEdge(const TopoDS_Edge& aEdge,
+ TopoDS_Edge& aNewEdge) ;
+
+ Standard_EXPORT
+ void MakeFace(const TopoDS_Face& aFace,
+ TopoDS_Face& aNewEdge) ;
+
+ Standard_EXPORT
+ Standard_Boolean IsToReverse(const TopoDS_Face& aFR,
+ const TopoDS_Face& aF) ;
+
+ Standard_EXPORT
+ Standard_Boolean HasNewSubShape(const TopoDS_Shape& aS) const;
+
+ Standard_EXPORT
+ void MakeSubShapes(const TopoDS_Shape& aS,
+ TopTools_MapOfShape& aM,
+ TopoDS_Compound& aC) ;
+
+
+ Standard_Boolean myCheckGeometry;
+ Standard_Boolean myKeepNonSolids;
+ Standard_Real myTol;
+ TopTools_DataMapOfShapeListOfShape myImages;
+ TopTools_DataMapOfShapeShape myOrigins;
+ Standard_Integer myNbAlone;
+ TopTools_ListOfShape myGenerated;
+};
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Gluer.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopoDS_Edge_HeaderFile
-#include <TopoDS_Edge.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKeyShape_HeaderFile
-#include <GEOMAlgo_PassKeyShape.hxx>
-#endif
-#ifndef _TopoDS_Face_HeaderFile
-#include <TopoDS_Face.hxx>
-#endif
-#ifndef _TopoDS_Vertex_HeaderFile
-#include <TopoDS_Vertex.hxx>
-#endif
-#ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
-#include <TopTools_DataMapOfShapeListOfShape.hxx>
-#endif
-#ifndef _TopTools_DataMapOfShapeShape_HeaderFile
-#include <TopTools_DataMapOfShapeShape.hxx>
-#endif
-#ifndef _GEOMAlgo_Gluer_HeaderFile
-#include <GEOMAlgo_Gluer.hxx>
-#endif
#include <GEOMAlgo_Gluer2.hxx>
-#include <GEOMAlgo_GlueDetector.hxx>
-#include <GEOMAlgo_Tools3D.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
#include <TopAbs_ShapeEnum.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
-#include <TopExp.hxx>
-
#include <BRep_Builder.hxx>
+#include <TopExp.hxx>
#include <BRepLib.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
+#include <GEOMAlgo_GlueDetector.hxx>
+#include <GEOMAlgo_Tools3D.hxx>
+
//=======================================================================
//function : GEOMAlgo_Gluer2
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_Gluer2::GEOMAlgo_Gluer2()
:
}
//=======================================================================
//function : ~GEOMAlgo_Gluer2
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_Gluer2::~GEOMAlgo_Gluer2()
{
}
//=======================================================================
//function : Clear
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::Clear()
{
myImagesToWork.Clear();
myOriginsToWork.Clear();
myKeepNonSolids=Standard_False;
+ //modified by NIZNHY-PKV Tue Mar 13 13:38:28 2012f
+ myDetector.Clear();
+ //modified by NIZNHY-PKV Tue Mar 13 13:38:30 2012t
+}
+//modified by NIZNHY-PKV Tue Mar 13 12:26:50 2012f
+//=======================================================================
+//function : StickedShapes
+//purpose :
+//=======================================================================
+const TopTools_IndexedDataMapOfShapeListOfShape&
+ GEOMAlgo_Gluer2::StickedShapes()
+{
+ return myDetector.StickedShapes();
}
+//modified by NIZNHY-PKV Tue Mar 13 12:26:54 2012t
//=======================================================================
//function : SetShapesToGlue
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM)
{
}
//=======================================================================
//function : ShapesToGlue
-//purpose :
+//purpose :
//=======================================================================
const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer2::ShapesToGlue()const
{
}
//=======================================================================
//function : SetKeepNonSolids
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::SetKeepNonSolids(const Standard_Boolean aFlag)
{
}
//=======================================================================
//function : KeepNonSolids
-//purpose :
+//purpose :
//=======================================================================
-Standard_Boolean GEOMAlgo_Gluer2::KeepNonSolids()const
+Standard_Boolean GEOMAlgo_Gluer2::KeepNonSolids()const
{
return myKeepNonSolids;
}
//=======================================================================
//function : ShapesDetected
-//purpose :
+//purpose :
//=======================================================================
const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer2::ShapesDetected()const
{
}
//=======================================================================
//function : ImagesToWork
-//purpose :
+//purpose :
//=======================================================================
const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer2::ImagesToWork()const
{
}
//=======================================================================
//function : Perform
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::Perform()
{
myErrorStatus=0;
myWarningStatus=0;
- //
+ //
CheckData();
if (myErrorStatus) {
return;
}
//
-#if OCC_VERSION_LARGE > 0x06050200
// Initialize the context
GEOMAlgo_GluerAlgo::Perform();
-#endif
//
PerformShapesToWork();
if (myErrorStatus) {
return;
}
- if (myWarningStatus==1) {// no shapes to glue
+ if (myWarningStatus==1) {
+ // no shapes to glue
myShape=myArgument;
return;
}
}
//=======================================================================
//function : CheckData
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::CheckData()
{
aTypeX=aSG.ShapeType();
if (!i) {
aType=aTypeX;
- if (!(aType==TopAbs_VERTEX ||
- aType==TopAbs_EDGE ||
+ if (!(aType==TopAbs_VERTEX ||
+ aType==TopAbs_EDGE ||
aType==TopAbs_FACE)) {
myErrorStatus=21;// non-brep shapes
return;
}
//=======================================================================
//function : FillEdges
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::FillEdges()
{
FillBRepShapes(TopAbs_EDGE);
-}
+}
//=======================================================================
//function : FillFaces
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::FillFaces()
{
}
//=======================================================================
//function : FillWires
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::FillWires()
{
}
//=======================================================================
//function : FillShells
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::FillShells()
{
}
//=======================================================================
//function : FillSolids
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::FillSolids()
{
FillContainers(TopAbs_SOLID);
-}
+}
//=======================================================================
//function : FillCompSolids
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::FillCompSolids()
{
FillContainers(TopAbs_COMPSOLID);
-}
+}
//=======================================================================
//function : FillVertices
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::FillVertices()
{
}
//=======================================================================
//function : FillBRepShapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::FillBRepShapes(const TopAbs_ShapeEnum theType)
-{
+{
Standard_Boolean bHasImage, bIsToWork;
Standard_Integer i, aNbE;
TopoDS_Iterator aItS;
}
//=======================================================================
//function : FillContainers
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::FillContainers(const TopAbs_ShapeEnum aType)
{
}
//
GEOMAlgo_Tools3D::MakeContainer(aType, aWnew);
- //modified by NIZNHY-PKV Tue May 10 13:46:30 2011f
aWnew.Orientation(aW.Orientation());
- //modified by NIZNHY-PKV Tue May 10 13:46:32 2011t
//
aItS.Initialize(aW);
for (; aItS.More(); aItS.Next()) {
}
}
//
- //modified by NIZNHY-PKV Tue May 10 13:46:19 2011f
- //aWnew.Orientation(aW.Orientation());
- //modified by NIZNHY-PKV Tue May 10 13:46:22 2011t
- //
//myImages / myOrigins
TopTools_ListOfShape aLSD;
//
}
//=======================================================================
//function : FillCompounds
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::FillCompounds()
{
}
//=======================================================================
//function : FillCompound
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::FillCompound(const TopoDS_Shape& aC)
{
}
//=======================================================================
//function : HasImage
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_Gluer2::HasImage(const TopoDS_Shape& aC)
{
}
//=======================================================================
//function : BuildResult
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::BuildResult()
{
GEOMAlgo_Tools3D::MakeContainer(TopAbs_COMPOUND, aCnew1);
//
TopExp::MapShapes(aCnew, TopAbs_SOLID, aM);
-
+
aNb=aM.Extent();
for (i=1; i<=aNb; ++i) {
const TopoDS_Shape& aS=aM(i);
//
myShape=aCnew;
}
-
//--------------------------------------------------------
//
// ErrorStatus
// 14 - PerformImagesToWork failed
//
// WarningStatus
-// 1 - no shapes to glue
+// 1 - no shapes to glue
+// 2 - sticked shapes are detected.
+// The value of myTolerance is so large that
+// subshapes of a shape becomes intefere
+// (e.g. vertices of an edge).
+// In the case
+// the result is can not be obtained
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: GEOMAlgo_Gluer2.hxx
-// Created:
// Author: Peter KURNEV
-// <pkv@irinox>
#ifndef _GEOMAlgo_Gluer2_HeaderFile
#define _GEOMAlgo_Gluer2_HeaderFile
#include <Standard.hxx>
#include <Standard_Macro.hxx>
+#include <Standard_Boolean.hxx>
+
+#include <TopAbs_ShapeEnum.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
-#include <Standard_Boolean.hxx>
-#include <GEOMAlgo_GluerAlgo.hxx>
-#include <TopAbs_ShapeEnum.hxx>
+
#include <NMTTools_CoupleOfShape.hxx>
#include <NMTTools_ListOfCoupleOfShape.hxx>
+
+#include <GEOMAlgo_GluerAlgo.hxx>
#include <GEOMAlgo_BuilderShape.hxx>
+#include <GEOMAlgo_GlueDetector.hxx>
//=======================================================================
//class : GEOMAlgo_Gluer2
-//purpose :
+//purpose :
//=======================================================================
-class GEOMAlgo_Gluer2 : public GEOMAlgo_GluerAlgo,
+class GEOMAlgo_Gluer2 : public GEOMAlgo_GluerAlgo,
public GEOMAlgo_BuilderShape {
public:
-
- Standard_EXPORT GEOMAlgo_Gluer2();
-
- Standard_EXPORT virtual ~GEOMAlgo_Gluer2();
-
- Standard_EXPORT void SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM) ;
-
- Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& ShapesToGlue() const;
-
- Standard_EXPORT void SetKeepNonSolids(const Standard_Boolean theFlag) ;
-
- Standard_EXPORT Standard_Boolean KeepNonSolids() const;
-
+
+ Standard_EXPORT
+ GEOMAlgo_Gluer2();
+
+ Standard_EXPORT
+ virtual ~GEOMAlgo_Gluer2();
+
+ Standard_EXPORT
+ void SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM) ;
+
+ Standard_EXPORT
+ const TopTools_DataMapOfShapeListOfShape& ShapesToGlue() const;
+
+ Standard_EXPORT
+ void SetKeepNonSolids(const Standard_Boolean theFlag) ;
+
+ Standard_EXPORT
+ Standard_Boolean KeepNonSolids() const;
+
Standard_EXPORT virtual void Clear() ;
-
- Standard_EXPORT virtual void Perform() ;
-
- Standard_EXPORT virtual void CheckData() ;
-
- Standard_EXPORT void Detect() ;
-
- Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& ShapesDetected() const;
-
- Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& ImagesToWork() const;
-
- Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
-
- Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
-
- Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
-
- Standard_EXPORT static void MakeVertex(const TopTools_ListOfShape& theLV,
- TopoDS_Vertex& theV) ;
-
- Standard_EXPORT static void MapBRepShapes(const TopoDS_Shape& theS,
- TopTools_MapOfShape& theM) ;
-
- Standard_EXPORT static void MapShapes(const TopoDS_Shape& theS,
- TopTools_MapOfShape& theM) ;
+ Standard_EXPORT
+ virtual void Perform() ;
+
+ Standard_EXPORT
+ virtual void CheckData() ;
+
+ Standard_EXPORT
+ void Detect() ;
+
+ Standard_EXPORT
+ const TopTools_DataMapOfShapeListOfShape& ShapesDetected() const;
+
+ Standard_EXPORT
+ const TopTools_DataMapOfShapeListOfShape& ImagesToWork() const;
+
+ Standard_EXPORT
+ virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
+
+ Standard_EXPORT
+ virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
+ Standard_EXPORT
+ virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
+
+ Standard_EXPORT
+ static void MakeVertex(const TopTools_ListOfShape& theLV,
+ TopoDS_Vertex& theV) ;
+
+ Standard_EXPORT
+ static void MapBRepShapes(const TopoDS_Shape& theS,
+ TopTools_MapOfShape& theM) ;
+
+ Standard_EXPORT
+ static void MapShapes(const TopoDS_Shape& theS,
+ TopTools_MapOfShape& theM) ;
+
+//modified by NIZNHY-PKV Tue Mar 13 12:23:20 2012f
+ Standard_EXPORT
+ const TopTools_IndexedDataMapOfShapeListOfShape& StickedShapes();
+//modified by NIZNHY-PKV Tue Mar 13 12:23:26 2012t
+//------------------------------------------------
protected:
-
- Standard_EXPORT void PerformShapesToWork() ;
-
- Standard_EXPORT void FillVertices() ;
-
- Standard_EXPORT void FillEdges() ;
-
- Standard_EXPORT void FillWires() ;
-
- Standard_EXPORT void FillFaces() ;
-
- Standard_EXPORT void FillShells() ;
-
- Standard_EXPORT void FillSolids() ;
-
- Standard_EXPORT void FillCompSolids() ;
-
- Standard_EXPORT void FillCompounds() ;
-
- Standard_EXPORT void BuildResult() ;
-
- Standard_EXPORT void FillBRepShapes(const TopAbs_ShapeEnum theType) ;
-
- Standard_EXPORT void FillContainers(const TopAbs_ShapeEnum theType) ;
-
- Standard_EXPORT void FillCompound(const TopoDS_Shape& theC) ;
-
- Standard_EXPORT virtual void PrepareHistory() ;
-
- Standard_EXPORT Standard_Boolean HasImage(const TopoDS_Shape& theC) ;
-
- Standard_EXPORT void MakeBRepShapes(const TopoDS_Shape& theS,
- TopoDS_Shape& theSnew) ;
-
- Standard_EXPORT void MakeEdge(const TopoDS_Edge& theE,
- TopoDS_Edge& theEnew) ;
-
- Standard_EXPORT void MakeFace(const TopoDS_Face& theF,
- TopoDS_Face& theFnew) ;
-
- Standard_EXPORT void TreatPair(const NMTTools_CoupleOfShape& theCS,
- NMTTools_ListOfCoupleOfShape& theLCS) ;
+ Standard_EXPORT
+ void PerformShapesToWork() ;
+
+ Standard_EXPORT
+ void FillVertices() ;
+
+ Standard_EXPORT
+ void FillEdges() ;
+
+ Standard_EXPORT
+ void FillWires() ;
+
+ Standard_EXPORT
+ void FillFaces() ;
+
+ Standard_EXPORT
+ void FillShells() ;
+
+ Standard_EXPORT
+ void FillSolids() ;
+
+ Standard_EXPORT
+ void FillCompSolids() ;
+
+ Standard_EXPORT
+ void FillCompounds() ;
+
+ Standard_EXPORT
+ void BuildResult() ;
+
+ Standard_EXPORT
+ void FillBRepShapes(const TopAbs_ShapeEnum theType) ;
+
+ Standard_EXPORT
+ void FillContainers(const TopAbs_ShapeEnum theType) ;
+
+ Standard_EXPORT
+ void FillCompound(const TopoDS_Shape& theC) ;
+
+ Standard_EXPORT
+ virtual void PrepareHistory() ;
+
+ Standard_EXPORT
+ Standard_Boolean HasImage(const TopoDS_Shape& theC) ;
+
+ Standard_EXPORT
+ void MakeBRepShapes(const TopoDS_Shape& theS,
+ TopoDS_Shape& theSnew) ;
+
+ Standard_EXPORT
+ void MakeEdge(const TopoDS_Edge& theE,
+ TopoDS_Edge& theEnew) ;
+
+ Standard_EXPORT
+ void MakeFace(const TopoDS_Face& theF,
+ TopoDS_Face& theFnew) ;
+
+ Standard_EXPORT
+ void TreatPair(const NMTTools_CoupleOfShape& theCS,
+ NMTTools_ListOfCoupleOfShape& theLCS) ;
protected:
TopTools_DataMapOfShapeListOfShape myShapesToGlue;
TopTools_DataMapOfShapeListOfShape myImagesToWork;
TopTools_DataMapOfShapeShape myOriginsToWork;
Standard_Boolean myKeepNonSolids;
-
+ //modified by NIZNHY-PKV Tue Mar 13 13:30:40 2012f
+ GEOMAlgo_GlueDetector myDetector;
+ //modified by NIZNHY-PKV Tue Mar 13 13:30:43 2012t
private:
};
#endif
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_Gluer2_2.cxx
-// Created:
+// Created:
// Author: Peter KURNEV
// <peter@PREFEX>
//
//=======================================================================
//function : PrepareHistory
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::PrepareHistory()
{
//Standard_Boolean bHasImage, bContainsSD;
//
- // 1. Clearing
+ // 1. Clearing
GEOMAlgo_BuilderShape::PrepareHistory();
- //
+ //
if(myShape.IsNull()) {
return;
}
//
- GEOMAlgo_Gluer2::MapShapes(myShape, myMapShape);
+ GEOMAlgo_Gluer2::MapShapes(myShape, myMapShape);
//
}
//=======================================================================
//function : Generated
-//purpose :
+//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_Gluer2::Generated(const TopoDS_Shape& )
{
}
//=======================================================================
//function : Modified
-//purpose :
+//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_Gluer2::Modified(const TopoDS_Shape& theS)
{
myHistShapes.Clear();
//
aType=theS.ShapeType();
- if (!(aType==TopAbs_VERTEX || aType==TopAbs_EDGE ||
- aType==TopAbs_FACE || aType==TopAbs_SOLID)) {
+ if (!(aType==TopAbs_VERTEX || aType==TopAbs_EDGE ||
+ aType==TopAbs_FACE || aType==TopAbs_SOLID)) {
return myHistShapes;
}
//
}
//=======================================================================
//function : IsDeleted
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_Gluer2::IsDeleted(const TopoDS_Shape& theS)
{
}
//=======================================================================
//function : MapShapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::MapShapes(const TopoDS_Shape& theS,
TopTools_MapOfShape& theM)
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: GEOMAlgo_Gluer2_3.cxx
-// Created:
-// Author: Peter KURNEV
+
+// File: GEOMAlgo_Gluer2_3.cxx
+// Author: Peter KURNEV
#include <GEOMAlgo_Gluer2.hxx>
static
void MapShapes1(const TopoDS_Shape& aS,
- const TopAbs_ShapeEnum aType,
- TopTools_IndexedMapOfShape& aM);
+ const TopAbs_ShapeEnum aType,
+ TopTools_IndexedMapOfShape& aM);
//=======================================================================
//function : Detect
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::Detect()
{
Standard_Integer iErr, aNbSD;
TopTools_ListIteratorOfListOfShape aItLS;
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
- GEOMAlgo_GlueDetector aDetector;
+ //GEOMAlgo_GlueDetector aDetector;
//
myErrorStatus=0;
myWarningStatus=0;
myOriginsDetected.Clear();
//
bCheckGeometry=Standard_True;
- aDetector.SetArgument(myArgument);
- aDetector.SetTolerance(myTolerance);
- aDetector.SetCheckGeometry(bCheckGeometry);
//
- aDetector.Perform();
- iErr=aDetector.ErrorStatus();
+ //modified by NIZNHY-PKV Tue Mar 13 13:33:35 2012f
+ myDetector.Clear();
+ myDetector.SetContext(myContext);
+ //modified by NIZNHY-PKV Tue Mar 13 13:33:38 2012t
+ myDetector.SetArgument(myArgument);
+ myDetector.SetTolerance(myTolerance);
+ myDetector.SetCheckGeometry(bCheckGeometry);
+ //
+ myDetector.Perform();
+ iErr=myDetector.ErrorStatus();
if (iErr) {
- myErrorStatus=11;// Detector failed
+ // Detector is failed
+ myErrorStatus=11;
return;
}
+ //modified by NIZNHY-PKV Tue Mar 13 13:40:36 2012f
+ iErr=myDetector.WarningStatus();
+ if (iErr) {
+ // Sticked shapes are detected
+ myWarningStatus=2;
+ }
+ //modified by NIZNHY-PKV Tue Mar 13 13:40:39 2012t
//
- const TopTools_DataMapOfShapeListOfShape& aImages=aDetector.Images();
+ const TopTools_DataMapOfShapeListOfShape& aImages=myDetector.Images();
aItDMSLS.Initialize(aImages);
for (; aItDMSLS.More(); aItDMSLS.Next()) {
const TopoDS_Shape& aSkey=aItDMSLS.Key();
}
//=======================================================================
//function : PerformShapesToWork
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::PerformShapesToWork()
-{
- Standard_Integer aNbSG, i, j, aNbC, aNb, aNbSD;
+{
+ Standard_Integer aNbSG, i, j, k, aNbC, aNb, aNbSD;
TopTools_ListIteratorOfListOfShape aItLS1, aItLS2;
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
NMTTools_CoupleOfShape aCS;
NMTTools_ListOfCoupleOfShape aLCS;
- NMTTools_ListIteratorOfListOfCoupleOfShape aItCS;
+ NMTTools_ListIteratorOfListOfCoupleOfShape aItCS;
//
myErrorStatus=0;
myWarningStatus=0;
const TopTools_ListOfShape& aLSD=aItDMSLS.Value();
aItLS1.Initialize(aLSD);
for (; aItLS1.More(); aItLS1.Next()) {
- const TopoDS_Shape& aSx=aItLS1.Value();
- myOriginsToWork.Bind(aSx, aSkey);
+ const TopoDS_Shape& aSx=aItLS1.Value();
+ myOriginsToWork.Bind(aSx, aSkey);
}
}
return;
//
// 1. Make pairs
aItDMSLS.Initialize(myShapesToGlue);
- for (; aItDMSLS.More(); aItDMSLS.Next()) {
+ for (k=0; aItDMSLS.More(); aItDMSLS.Next(), ++k) {
//const TopoDS_Shape& aSkey=aItDMSLS.Key();
const TopTools_ListOfShape& aLSG=aItDMSLS.Value();
aItLS1.Initialize(aLSG);
for (i=0; aItLS1.More(); aItLS1.Next(), ++i) {
aItLS2.Initialize(aLSG);
for (j=0; aItLS2.More(); aItLS2.Next(), ++j) {
- if (j>i) {
- const TopoDS_Shape& aSG1=aItLS1.Value();
- const TopoDS_Shape& aSG2=aItLS2.Value();
- aCS.SetShape1(aSG1);
- aCS.SetShape2(aSG2);
- TreatPair(aCS, aLCS);
- }
+ if (j>i) {
+ const TopoDS_Shape& aSG1=aItLS1.Value();
+ const TopoDS_Shape& aSG2=aItLS2.Value();
+ aCS.SetShape1(aSG1);
+ aCS.SetShape2(aSG2);
+ TreatPair(aCS, aLCS);
+ }
}
}
}
}
//=======================================================================
//function : TreatPair
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::TreatPair(const NMTTools_CoupleOfShape& aCS,
- NMTTools_ListOfCoupleOfShape& aLCS)
+ NMTTools_ListOfCoupleOfShape& aLCS)
{
if (myErrorStatus) {
return;
}
//=======================================================================
//function : MapShapes1
-//purpose :
+//purpose :
//=======================================================================
void MapShapes1(const TopoDS_Shape& aS,
- const TopAbs_ShapeEnum aType,
- TopTools_IndexedMapOfShape& aM)
+ const TopAbs_ShapeEnum aType,
+ TopTools_IndexedMapOfShape& aM)
{
TopExp_Explorer aExp;
-
+
aExp.Init (aS, aType);
for ( ;aExp.More(); aExp.Next()) {
const TopoDS_Shape aSx=aExp.Current();
if (aType==TopAbs_EDGE) {
const TopoDS_Edge& aEx=*((TopoDS_Edge*)&aSx);
if (BRep_Tool::Degenerated(aEx)) {
- continue;
- }
- }
- aM.Add(aSx);
- }
-}
-/*
-//=======================================================================
-//function : MapShapes1
-//purpose :
-//=======================================================================
-void MapShapes1(const TopoDS_Shape& aS,
- const TopAbs_ShapeEnum aType,
- TopTools_IndexedMapOfShape& aM)
-{
- TopExp_Explorer aExp (aS, aType);
- while (aExp.More()) {
- const TopoDS_Shape aSx=aExp.Current();
- if (aType==TopAbs_EDGE) {
- const TopoDS_Edge& aEx=*((TopoDS_Edge*)&aSx);
- if (BRep_Tool::Degenerated(aEx)) {
- aExp.Next();
- continue;
+ continue;
}
}
aM.Add(aSx);
- aExp.Next();
}
}
-*/
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
// File: GEOMAlgo_GluerAlgo.cxx
+// Created:
// Author: Peter KURNEV
-
+// <peter@PREFEX>
+//
#include <GEOMAlgo_GluerAlgo.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
-#if OCC_VERSION_LARGE > 0x06050200
#include <IntTools_Context.hxx>
-#endif
+
//=======================================================================
//function : GEOMAlgo_GluerAlgo
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_GluerAlgo::GEOMAlgo_GluerAlgo()
{
myTolerance=0.0001;
myCheckGeometry=Standard_True;
}
-
//=======================================================================
//function : ~GEOMAlgo_GluerAlgo
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_GluerAlgo::~GEOMAlgo_GluerAlgo()
{
}
-
//=======================================================================
//function : SetArgument
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GluerAlgo::SetArgument(const TopoDS_Shape& theShape)
{
myArgument=theShape;
}
-
//=======================================================================
//function : Argument
-//purpose :
+//purpose :
//=======================================================================
const TopoDS_Shape& GEOMAlgo_GluerAlgo::Argument()const
{
return myArgument;
}
-
//=======================================================================
//function : SetTolerance
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GluerAlgo::SetTolerance(const Standard_Real aT)
{
myTolerance=aT;
}
-
//=======================================================================
//function : Tolerance
-//purpose :
+//purpose :
//=======================================================================
Standard_Real GEOMAlgo_GluerAlgo::Tolerance()const
{
//=======================================================================
//function : SetCheckGeometry
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GluerAlgo::SetCheckGeometry(const Standard_Boolean aFlag)
{
myCheckGeometry=aFlag;
}
-
//=======================================================================
//function : CheckGeometry
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_GluerAlgo::CheckGeometry() const
{
return myCheckGeometry;
}
-
-#if OCC_VERSION_LARGE > 0x06050200
//=======================================================================
//function : SetContext
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GluerAlgo::SetContext(const Handle(IntTools_Context)& theContext)
{
myContext=theContext;
}
-#endif
-
//=======================================================================
//function : Context
-//purpose :
+//purpose :
//=======================================================================
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& GEOMAlgo_GluerAlgo::Context()
-#else
-IntTools_Context& GEOMAlgo_GluerAlgo::Context()
-#endif
{
return myContext;
}
-
//=======================================================================
//function : Images
-//purpose :
+//purpose :
//=======================================================================
const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_GluerAlgo::Images()const
{
return myImages;
}
-
//=======================================================================
//function : Origins
-//purpose :
+//purpose :
//=======================================================================
const TopTools_DataMapOfShapeShape& GEOMAlgo_GluerAlgo::Origins()const
{
return myOrigins;
}
-
//=======================================================================
//function : Clear
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GluerAlgo::Clear()
{
myImages.Clear();
myOrigins.Clear();
}
-
//=======================================================================
//function : Perform
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_GluerAlgo::Perform()
{
-#if OCC_VERSION_LARGE > 0x06050200
if (myContext.IsNull()) {
myContext=new IntTools_Context;
}
-#endif
}
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
// File: GEOMAlgo_GluerAlgo.hxx
+// Created:
// Author: Peter KURNEV
-
+// <pkv@irinox>
+//
#ifndef _GEOMAlgo_GluerAlgo_HeaderFile
#define _GEOMAlgo_GluerAlgo_HeaderFile
#include <Standard_Macro.hxx>
+#include <TopoDS_Shape.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
-
-#include <TopoDS_Shape.hxx>
#include <IntTools_Context.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
-
#include <GEOMAlgo_BuilderShape.hxx>
-#include <Basics_OCCTVersion.hxx>
-
//=======================================================================
//class : GEOMAlgo_GluerAlgo
-//purpose :
+//purpose :
//=======================================================================
class GEOMAlgo_GluerAlgo {
public:
- Standard_EXPORT
+ Standard_EXPORT
GEOMAlgo_GluerAlgo();
- Standard_EXPORT
+ Standard_EXPORT
virtual ~GEOMAlgo_GluerAlgo();
- Standard_EXPORT
+ Standard_EXPORT
virtual void SetArgument(const TopoDS_Shape& theShape) ;
- Standard_EXPORT
+ Standard_EXPORT
const TopoDS_Shape& Argument() const;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void SetTolerance(const Standard_Real aT) ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
Standard_Real Tolerance() const;
-
- Standard_EXPORT
+
+ Standard_EXPORT
void SetCheckGeometry(const Standard_Boolean aFlag) ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
Standard_Boolean CheckGeometry() const;
-
- Standard_EXPORT
+
+ Standard_EXPORT
virtual void Perform() ;
-
- Standard_EXPORT
+
+ Standard_EXPORT
virtual void Clear() ;
-#if OCC_VERSION_LARGE > 0x06050200
- Standard_EXPORT void SetContext(const Handle(IntTools_Context)&);
- Standard_EXPORT const Handle(IntTools_Context)& Context();
-#else
- Standard_EXPORT IntTools_Context& Context();
-#endif
+ Standard_EXPORT
+ void SetContext(const Handle(IntTools_Context)&) ;
- Standard_EXPORT
+ Standard_EXPORT
+ const Handle(IntTools_Context)& Context() ;
+
+ Standard_EXPORT
const TopTools_DataMapOfShapeListOfShape& Images() const;
-
- Standard_EXPORT
+
+ Standard_EXPORT
const TopTools_DataMapOfShapeShape& Origins() const;
protected:
TopoDS_Shape myArgument;
Standard_Real myTolerance;
Standard_Boolean myCheckGeometry;
-#if OCC_VERSION_LARGE > 0x06050200
Handle(IntTools_Context) myContext;
-#else
- IntTools_Context myContext;
-#endif
TopTools_DataMapOfShapeListOfShape myImages;
TopTools_DataMapOfShapeShape myOrigins;
-
+
private:
};
#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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;
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: GEOMAlgo_Algo.cxx
+// File: GEOMAlgo_Hlgo.cxx
// Created: Sat Dec 04 12:39:47 2004
// Author: Peter KURNEV
// <peter@PREFEX>
//
-#include <GEOMAlgo_HAlgo.ixx>
+#include <GEOMAlgo_HAlgo.hxx>
+
+IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_HAlgo, MMgt_TShared);
+IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_HAlgo, MMgt_TShared);
//=======================================================================
-// function:
-// purpose:
+// function:
+// purpose:
//=======================================================================
GEOMAlgo_HAlgo::GEOMAlgo_HAlgo()
:
{}
//=======================================================================
// function: ~
-// purpose:
+// purpose:
//=======================================================================
GEOMAlgo_HAlgo::~GEOMAlgo_HAlgo()
{
}
//=======================================================================
// function: CheckData
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_HAlgo::CheckData()
{
}
//=======================================================================
// function: CheckResult
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_HAlgo::CheckResult()
{
}
//=======================================================================
// function: ErrorStatus
-// purpose:
+// purpose:
//=======================================================================
Standard_Integer GEOMAlgo_HAlgo::ErrorStatus()const
{
}
//=======================================================================
// function: WarningStatus
-// purpose:
+// purpose:
//=======================================================================
Standard_Integer GEOMAlgo_HAlgo::WarningStatus()const
{
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_HAlgo.hxx
+// Created: Sat Dec 04 12:39:47 2004
+// Author: Peter KURNEV
+// <peter@PREFEX>
+//
+
#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_DefineHandle.hxx>
+//#include <Handle_GEOMAlgo_HAlgo.hxx>
#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;
+DEFINE_STANDARD_HANDLE(GEOMAlgo_HAlgo, MMgt_TShared);
+//=======================================================================
+//class : GEOMAlgo_HAlgo
+//purpose :
+//=======================================================================
+class GEOMAlgo_HAlgo : public MMgt_TShared
+{
+ public:
+ Standard_EXPORT
+ virtual void Perform() = 0;
-Standard_EXPORT Standard_Integer WarningStatus() const;
-//Standard_EXPORT ~GEOMAlgo_HAlgo();
+ Standard_EXPORT
+ virtual void CheckData() ;
+ Standard_EXPORT
+ virtual void CheckResult() ;
+ Standard_EXPORT
+ Standard_Integer ErrorStatus() const;
+ Standard_EXPORT
+ Standard_Integer WarningStatus() const;
- // Type management
- //
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+ DEFINE_STANDARD_RTTI(GEOMAlgo_HAlgo);
-protected:
+ protected:
+ Standard_EXPORT
+ GEOMAlgo_HAlgo();
- // Methods PROTECTED
- //
-
-
-Standard_EXPORT GEOMAlgo_HAlgo();
-Standard_EXPORT virtual ~GEOMAlgo_HAlgo();
-
-
- // Fields PROTECTED
- //
-Standard_Integer myErrorStatus;
-Standard_Integer myWarningStatus;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
+ Standard_EXPORT
+ virtual ~GEOMAlgo_HAlgo();
+ Standard_Integer myErrorStatus;
+ Standard_Integer myWarningStatus;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile
-#define _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile
-#include <Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx>
-#endif
-
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-class TopoDS_Shape;
-class TColStd_MapIntegerHasher;
-class GEOMAlgo_IndexedDataMapOfIntegerShape;
-
-
-
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape(const Standard_Integer& K1,const Standard_Integer K2,const TopoDS_Shape& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
-
- Standard_Integer& Key1() const;
-
- Standard_Integer& Key2() const;
-
- TCollection_MapNodePtr& Next2() const;
-
- TopoDS_Shape& Value() const;
-//Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Integer myKey1;
-Standard_Integer myKey2;
-TopoDS_Shape myValue;
-TCollection_MapNodePtr myNext2;
-
-
-};
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem TopoDS_Shape
-#define TheItem_hxx <TopoDS_Shape.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
-
-#include <TCollection_IndexedDataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_hxx
-#undef Handle_TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_Type_
-#undef TCollection_IndexedDataMap
-#undef TCollection_IndexedDataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile
-#include <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
-#endif
-//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape",
- sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape))) {
- _anOtherObject = Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)((Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::DynamicType() const
-{
- return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) ;
-}
-//Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape() {}
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem TopoDS_Shape
-#define TheItem_hxx <TopoDS_Shape.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
-#include <TCollection_IndexedDataMapNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile
-#define _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile
-#include <Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx>
-#endif
-
-#ifndef _GEOMAlgo_PassKey_HeaderFile
-#include <GEOMAlgo_PassKey.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-class GEOMAlgo_PassKey;
-class TopTools_ListOfShape;
-class GEOMAlgo_PassKeyMapHasher;
-class GEOMAlgo_IndexedDataMapOfPassKeyListOfShape;
-
-
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape : public TCollection_MapNode {
-
-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
- //
-GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape(const GEOMAlgo_PassKey& K1,const Standard_Integer K2,const TopTools_ListOfShape& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
- GEOMAlgo_PassKey& Key1() const;
- Standard_Integer& Key2() const;
- TCollection_MapNodePtr& Next2() const;
- TopTools_ListOfShape& Value() const;
-Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-GEOMAlgo_PassKey myKey1;
-Standard_Integer myKey2;
-TopTools_ListOfShape myValue;
-TCollection_MapNodePtr myNext2;
-
-
-};
-
-#define TheKey GEOMAlgo_PassKey
-#define TheKey_hxx <GEOMAlgo_PassKey.hxx>
-#define TheItem TopTools_ListOfShape
-#define TheItem_hxx <TopTools_ListOfShape.hxx>
-#define Hasher GEOMAlgo_PassKeyMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyMapHasher.hxx>
-#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape
-#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyListOfShape
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx>
-
-#include <TCollection_IndexedDataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_hxx
-#undef Handle_TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_Type_
-#undef TCollection_IndexedDataMap
-#undef TCollection_IndexedDataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _GEOMAlgo_PassKey_HeaderFile
-#include <GEOMAlgo_PassKey.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile
-#include <GEOMAlgo_PassKeyMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_HeaderFile
-#include <GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx>
-#endif
-GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape",
- sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape))) {
- _anOtherObject = Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)((Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape::DynamicType() const
-{
- return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) ;
-}
-Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape() {}
-#define TheKey GEOMAlgo_PassKey
-#define TheKey_hxx <GEOMAlgo_PassKey.hxx>
-#define TheItem TopTools_ListOfShape
-#define TheItem_hxx <TopTools_ListOfShape.hxx>
-#define Hasher GEOMAlgo_PassKeyMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyMapHasher.hxx>
-#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape
-#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyListOfShape
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx>
-#include <TCollection_IndexedDataMapNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
-#define _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
-#include <Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx>
-#endif
-
-#ifndef _GEOMAlgo_PassKeyShape_HeaderFile
-#include <GEOMAlgo_PassKeyShape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-class GEOMAlgo_PassKeyShape;
-class TopTools_ListOfShape;
-class GEOMAlgo_PassKeyShapeMapHasher;
-class GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape;
-
-
-
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape(const GEOMAlgo_PassKeyShape& K1,const Standard_Integer K2,const TopTools_ListOfShape& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
-
- GEOMAlgo_PassKeyShape& Key1() const;
-
- Standard_Integer& Key2() const;
-
- TCollection_MapNodePtr& Next2() const;
-
- TopTools_ListOfShape& Value() const;
-//Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-GEOMAlgo_PassKeyShape myKey1;
-Standard_Integer myKey2;
-TopTools_ListOfShape myValue;
-TCollection_MapNodePtr myNext2;
-
-
-};
-
-#define TheKey GEOMAlgo_PassKeyShape
-#define TheKey_hxx <GEOMAlgo_PassKeyShape.hxx>
-#define TheItem TopTools_ListOfShape
-#define TheItem_hxx <TopTools_ListOfShape.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
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-
-#include <TCollection_IndexedDataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_hxx
-#undef Handle_TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_Type_
-#undef TCollection_IndexedDataMap
-#undef TCollection_IndexedDataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _GEOMAlgo_PassKeyShape_HeaderFile
-#include <GEOMAlgo_PassKeyShape.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile
-#include <GEOMAlgo_PassKeyShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
-#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-#endif
-//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape",
- sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape))) {
- _anOtherObject = Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)((Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::DynamicType() const
-{
- return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) ;
-}
-//Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape() {}
-#define TheKey GEOMAlgo_PassKeyShape
-#define TheKey_hxx <GEOMAlgo_PassKeyShape.hxx>
-#define TheItem TopTools_ListOfShape
-#define TheItem_hxx <TopTools_ListOfShape.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
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-#include <TCollection_IndexedDataMapNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile
-#define _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile
-#include <Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Bnd_Box_HeaderFile
-#include <Bnd_Box.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-class TopoDS_Shape;
-class Bnd_Box;
-class TopTools_ShapeMapHasher;
-class GEOMAlgo_IndexedDataMapOfShapeBox;
-
-
-
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox(const TopoDS_Shape& K1,const Standard_Integer K2,const Bnd_Box& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
-
- TopoDS_Shape& Key1() const;
-
- Standard_Integer& Key2() const;
-
- TCollection_MapNodePtr& Next2() const;
-
- Bnd_Box& Value() const;
-//Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-TopoDS_Shape myKey1;
-Standard_Integer myKey2;
-Bnd_Box myValue;
-TCollection_MapNodePtr myNext2;
-
-
-};
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem Bnd_Box
-#define TheItem_hxx <Bnd_Box.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfShapeBox.hxx>
-
-#include <TCollection_IndexedDataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_hxx
-#undef Handle_TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_Type_
-#undef TCollection_IndexedDataMap
-#undef TCollection_IndexedDataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _Bnd_Box_HeaderFile
-#include <Bnd_Box.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile
-#include <GEOMAlgo_IndexedDataMapOfShapeBox.hxx>
-#endif
-//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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_IndexedDataMapNodeOfIndexedDataMapOfShapeBox",
- sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox))) {
- _anOtherObject = Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)((Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::DynamicType() const
-{
- return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) ;
-}
-//Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox() {}
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem Bnd_Box
-#define TheItem_hxx <Bnd_Box.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfShapeBox.hxx>
-#include <TCollection_IndexedDataMapNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_HeaderFile
-#define _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_HeaderFile
-#include <Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _GEOMAlgo_ShapeInfo_HeaderFile
-#include <GEOMAlgo_ShapeInfo.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-class TopoDS_Shape;
-class GEOMAlgo_ShapeInfo;
-class TopTools_ShapeMapHasher;
-class GEOMAlgo_IndexedDataMapOfShapeShapeInfo;
-
-
-
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo(const TopoDS_Shape& K1,const Standard_Integer K2,const GEOMAlgo_ShapeInfo& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
-
- TopoDS_Shape& Key1() const;
-
- Standard_Integer& Key2() const;
-
- TCollection_MapNodePtr& Next2() const;
-
- GEOMAlgo_ShapeInfo& Value() const;
-//Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-TopoDS_Shape myKey1;
-Standard_Integer myKey2;
-GEOMAlgo_ShapeInfo myValue;
-TCollection_MapNodePtr myNext2;
-
-
-};
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem GEOMAlgo_ShapeInfo
-#define TheItem_hxx <GEOMAlgo_ShapeInfo.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo
-#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeShapeInfo
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx>
-
-#include <TCollection_IndexedDataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_hxx
-#undef Handle_TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_Type_
-#undef TCollection_IndexedDataMap
-#undef TCollection_IndexedDataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _GEOMAlgo_ShapeInfo_HeaderFile
-#include <GEOMAlgo_ShapeInfo.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile
-#include <GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx>
-#endif
-//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo",
- sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo) Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo))) {
- _anOtherObject = Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)((Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo::DynamicType() const
-{
- return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo) ;
-}
-//Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo() {}
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem GEOMAlgo_ShapeInfo
-#define TheItem_hxx <GEOMAlgo_ShapeInfo.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo
-#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeShapeInfo
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx>
-#include <TCollection_IndexedDataMapNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile
-#define _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile
-#include <Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _TopAbs_State_HeaderFile
-#include <TopAbs_State.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-class TopoDS_Shape;
-class TopTools_ShapeMapHasher;
-class GEOMAlgo_IndexedDataMapOfShapeState;
-
-
-
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState(const TopoDS_Shape& K1,const Standard_Integer K2,const TopAbs_State& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
-
- TopoDS_Shape& Key1() const;
-
- Standard_Integer& Key2() const;
-
- TCollection_MapNodePtr& Next2() const;
-
- TopAbs_State& Value() const;
-//Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-TopoDS_Shape myKey1;
-Standard_Integer myKey2;
-TopAbs_State myValue;
-TCollection_MapNodePtr myNext2;
-
-
-};
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem TopAbs_State
-#define TheItem_hxx <TopAbs_State.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState
-#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeState
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
-
-#include <TCollection_IndexedDataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_hxx
-#undef Handle_TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_Type_
-#undef TCollection_IndexedDataMap
-#undef TCollection_IndexedDataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
-#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
-#endif
-//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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_IndexedDataMapNodeOfIndexedDataMapOfShapeState",
- sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState))) {
- _anOtherObject = Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)((Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::DynamicType() const
-{
- return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) ;
-}
-//Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState() {}
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem TopAbs_State
-#define TheItem_hxx <TopAbs_State.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState
-#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeState
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
-#include <TCollection_IndexedDataMapNode.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_IndexedDataMapOfIntegerShape.hxx
+// Created: Wed Feb 22 11:22:18 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile
-#define _GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile
-#include <Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_OutOfRange;
-class Standard_NoSuchObject;
-class TopoDS_Shape;
-class TColStd_MapIntegerHasher;
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class GEOMAlgo_IndexedDataMapOfIntegerShape : public TCollection_BasicMap {
-public:
+#ifndef GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile
+#define GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile
- 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_IndexedDataMapOfIntegerShape(const Standard_Integer NbBuckets = 1);
-
-Standard_EXPORT GEOMAlgo_IndexedDataMapOfIntegerShape& Assign(const GEOMAlgo_IndexedDataMapOfIntegerShape& Other) ;
- GEOMAlgo_IndexedDataMapOfIntegerShape& operator =(const GEOMAlgo_IndexedDataMapOfIntegerShape& Other)
-{
- return Assign(Other);
-}
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-Standard_EXPORT void Clear() ;
-~GEOMAlgo_IndexedDataMapOfIntegerShape()
-{
- Clear();
-}
-
-Standard_EXPORT Standard_Integer Add(const Standard_Integer& K,const TopoDS_Shape& I) ;
-
-Standard_EXPORT void Substitute(const Standard_Integer I,const Standard_Integer& K,const TopoDS_Shape& T) ;
-
-Standard_EXPORT void RemoveLast() ;
-
-Standard_EXPORT Standard_Boolean Contains(const Standard_Integer& K) const;
-
-Standard_EXPORT const Standard_Integer& FindKey(const Standard_Integer I) const;
-
-Standard_EXPORT const TopoDS_Shape& FindFromIndex(const Standard_Integer I) const;
- const TopoDS_Shape& operator ()(const Standard_Integer I) const
-{
- return FindFromIndex(I);
-}
+#include <TopoDS_Shape.hxx>
+#include <Standard_Integer.hxx>
+#include <TColStd_MapIntegerHasher.hxx>
-Standard_EXPORT TopoDS_Shape& ChangeFromIndex(const Standard_Integer I) ;
- TopoDS_Shape& operator ()(const Standard_Integer I)
-{
- return ChangeFromIndex(I);
-}
+#define _NCollection_MapHasher
+#include <NCollection_IndexedDataMap.hxx>
-Standard_EXPORT Standard_Integer FindIndex(const Standard_Integer& K) const;
-Standard_EXPORT const TopoDS_Shape& FindFromKey(const Standard_Integer& K) const;
-Standard_EXPORT TopoDS_Shape& ChangeFromKey(const Standard_Integer& K) ;
+typedef NCollection_IndexedDataMap<Standard_Integer, TopoDS_Shape, TColStd_MapIntegerHasher> GEOMAlgo_IndexedDataMapOfIntegerShape;
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address FindFromKey1 (const Standard_Integer& K) const;
- Standard_EXPORT Standard_Address ChangeFromKey1 (const Standard_Integer& K);
-#endif
+#undef _NCollection_MapHasher
-private:
- // Methods PRIVATE
- //
-Standard_EXPORT GEOMAlgo_IndexedDataMapOfIntegerShape(const GEOMAlgo_IndexedDataMapOfIntegerShape& Other);
-};
-// other Inline functions and methods (like "C++: function call" methods)
-//
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapOfIntegerShape.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile
-#include <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx>
-#endif
-
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem TopoDS_Shape
-#define TheItem_hxx <TopoDS_Shape.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
-#include <TCollection_IndexedDataMap.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapOfPassKeyListOfShape_HeaderFile
-#define _GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile
-#include <Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_DomainError;
-class Standard_OutOfRange;
-class Standard_NoSuchObject;
-class GEOMAlgo_PassKey;
-class TopTools_ListOfShape;
-class GEOMAlgo_PassKeyMapHasher;
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class GEOMAlgo_IndexedDataMapOfPassKeyListOfShape : public TCollection_BasicMap {
-
-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_IndexedDataMapOfPassKeyListOfShape(const Standard_Integer NbBuckets = 1);
-Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& Assign(const GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& Other) ;
- GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& operator =(const GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& Other)
-{
- return Assign(Other);
-}
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-Standard_EXPORT void Clear() ;
-~GEOMAlgo_IndexedDataMapOfPassKeyListOfShape()
-{
- Clear();
-}
-
-Standard_EXPORT Standard_Integer Add(const GEOMAlgo_PassKey& K,const TopTools_ListOfShape& I) ;
-Standard_EXPORT void Substitute(const Standard_Integer I,const GEOMAlgo_PassKey& K,const TopTools_ListOfShape& T) ;
-Standard_EXPORT void RemoveLast() ;
-Standard_EXPORT Standard_Boolean Contains(const GEOMAlgo_PassKey& K) const;
-Standard_EXPORT const GEOMAlgo_PassKey& FindKey(const Standard_Integer I) const;
-Standard_EXPORT const TopTools_ListOfShape& FindFromIndex(const Standard_Integer I) const;
- const TopTools_ListOfShape& operator ()(const Standard_Integer I) const
-{
- return FindFromIndex(I);
-}
-
-Standard_EXPORT TopTools_ListOfShape& ChangeFromIndex(const Standard_Integer I) ;
- TopTools_ListOfShape& operator ()(const Standard_Integer I)
-{
- return ChangeFromIndex(I);
-}
-
-Standard_EXPORT Standard_Integer FindIndex(const GEOMAlgo_PassKey& K) const;
-Standard_EXPORT const TopTools_ListOfShape& FindFromKey(const GEOMAlgo_PassKey& K) const;
-Standard_EXPORT TopTools_ListOfShape& ChangeFromKey(const GEOMAlgo_PassKey& K) ;
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address FindFromKey1 (const GEOMAlgo_PassKey& K) const;
- Standard_EXPORT Standard_Address ChangeFromKey1 (const GEOMAlgo_PassKey& K);
-#endif
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyListOfShape(const GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapOfPassKeyListOfShape.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKey_HeaderFile
-#include <GEOMAlgo_PassKey.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile
-#include <GEOMAlgo_PassKeyMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile
-#include <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx>
-#endif
-
-
-#define TheKey GEOMAlgo_PassKey
-#define TheKey_hxx <GEOMAlgo_PassKey.hxx>
-#define TheItem TopTools_ListOfShape
-#define TheItem_hxx <TopTools_ListOfShape.hxx>
-#define Hasher GEOMAlgo_PassKeyMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyMapHasher.hxx>
-#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape
-#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyListOfShape
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx>
-#include <TCollection_IndexedDataMap.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx
+// Created: Wed Feb 22 11:24:27 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
-#define _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
-#include <Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_DomainError;
-class Standard_OutOfRange;
-class Standard_NoSuchObject;
-class GEOMAlgo_PassKeyShape;
-class TopTools_ListOfShape;
-class GEOMAlgo_PassKeyShapeMapHasher;
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape : public TCollection_BasicMap {
-
-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_IndexedDataMapOfPassKeyShapeListOfShape(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Assign(const GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Other) ;
- GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& operator =(const GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape()
-{
- Clear();
-}
-
-
-
-Standard_EXPORT Standard_Integer Add(const GEOMAlgo_PassKeyShape& K,const TopTools_ListOfShape& I) ;
-
-
-Standard_EXPORT void Substitute(const Standard_Integer I,const GEOMAlgo_PassKeyShape& K,const TopTools_ListOfShape& T) ;
-
-
-Standard_EXPORT void RemoveLast() ;
+#ifndef GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
+#define GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
-Standard_EXPORT Standard_Boolean Contains(const GEOMAlgo_PassKeyShape& K) const;
+#include <GEOMAlgo_PassKeyShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <GEOMAlgo_PassKeyShapeMapHasher.hxx>
-Standard_EXPORT const GEOMAlgo_PassKeyShape& FindKey(const Standard_Integer I) const;
+#define _NCollection_MapHasher
+#include <NCollection_IndexedDataMap.hxx>
-Standard_EXPORT const TopTools_ListOfShape& FindFromIndex(const Standard_Integer I) const;
- const TopTools_ListOfShape& operator ()(const Standard_Integer I) const
-{
- return FindFromIndex(I);
-}
+typedef NCollection_IndexedDataMap<GEOMAlgo_PassKeyShape, TopTools_ListOfShape, GEOMAlgo_PassKeyShapeMapHasher> GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape;
+#undef _NCollection_MapHasher
-Standard_EXPORT TopTools_ListOfShape& ChangeFromIndex(const Standard_Integer I) ;
- TopTools_ListOfShape& operator ()(const Standard_Integer I)
-{
- return ChangeFromIndex(I);
-}
-
-
-
-Standard_EXPORT Standard_Integer FindIndex(const GEOMAlgo_PassKeyShape& K) const;
-
-
-Standard_EXPORT const TopTools_ListOfShape& FindFromKey(const GEOMAlgo_PassKeyShape& K) const;
-
-
-Standard_EXPORT TopTools_ListOfShape& ChangeFromKey(const GEOMAlgo_PassKeyShape& K) ;
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address FindFromKey1 (const GEOMAlgo_PassKeyShape& K) const;
- Standard_EXPORT Standard_Address ChangeFromKey1 (const GEOMAlgo_PassKeyShape& K);
-#endif
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape(const GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKeyShape_HeaderFile
-#include <GEOMAlgo_PassKeyShape.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile
-#include <GEOMAlgo_PassKeyShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
-#include <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx>
-#endif
-
-
-#define TheKey GEOMAlgo_PassKeyShape
-#define TheKey_hxx <GEOMAlgo_PassKeyShape.hxx>
-#define TheItem TopTools_ListOfShape
-#define TheItem_hxx <TopTools_ListOfShape.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
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-#include <TCollection_IndexedDataMap.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_IndexedDataMapOfShapeBox.hxx
+// Created: Wed Feb 22 11:14:14 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile
-#define _GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile
-#include <Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_DomainError;
-class Standard_OutOfRange;
-class Standard_NoSuchObject;
-class TopoDS_Shape;
-class Bnd_Box;
-class TopTools_ShapeMapHasher;
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class GEOMAlgo_IndexedDataMapOfShapeBox : public TCollection_BasicMap {
-
-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_IndexedDataMapOfShapeBox(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeBox& Assign(const GEOMAlgo_IndexedDataMapOfShapeBox& Other) ;
- GEOMAlgo_IndexedDataMapOfShapeBox& operator =(const GEOMAlgo_IndexedDataMapOfShapeBox& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~GEOMAlgo_IndexedDataMapOfShapeBox()
-{
- Clear();
-}
-
-
-
-Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const Bnd_Box& I) ;
-
-
-Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const Bnd_Box& T) ;
+#ifndef GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile
+#define GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile
-Standard_EXPORT void RemoveLast() ;
+#include <TopoDS_Shape.hxx>
+#include <TopTools_ShapeMapHasher.hxx>
+#include <Bnd_Box.hxx>
-Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const;
+#define _NCollection_MapHasher
+#include <NCollection_IndexedDataMap.hxx>
-Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const;
+typedef NCollection_IndexedDataMap<TopoDS_Shape, Bnd_Box, TopTools_ShapeMapHasher> GEOMAlgo_IndexedDataMapOfShapeBox;
+#undef _NCollection_MapHasher
-Standard_EXPORT const Bnd_Box& FindFromIndex(const Standard_Integer I) const;
- const Bnd_Box& operator ()(const Standard_Integer I) const
-{
- return FindFromIndex(I);
-}
-Standard_EXPORT Bnd_Box& ChangeFromIndex(const Standard_Integer I) ;
- Bnd_Box& operator ()(const Standard_Integer I)
-{
- return ChangeFromIndex(I);
-}
-
-
-
-Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const;
-
-
-Standard_EXPORT const Bnd_Box& FindFromKey(const TopoDS_Shape& K) const;
-Standard_EXPORT Bnd_Box& ChangeFromKey(const TopoDS_Shape& K) ;
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const;
- Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K);
-#endif
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeBox(const GEOMAlgo_IndexedDataMapOfShapeBox& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapOfShapeBox.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _Bnd_Box_HeaderFile
-#include <Bnd_Box.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile
-#include <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx>
-#endif
-
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem Bnd_Box
-#define TheItem_hxx <Bnd_Box.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfShapeBox.hxx>
-#include <TCollection_IndexedDataMap.gxx>
-
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx
+// Created: Wed Feb 22 11:16:54 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile
-#define _GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_HeaderFile
-#include <Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_DomainError;
-class Standard_OutOfRange;
-class Standard_NoSuchObject;
-class TopoDS_Shape;
-class GEOMAlgo_ShapeInfo;
-class TopTools_ShapeMapHasher;
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class GEOMAlgo_IndexedDataMapOfShapeShapeInfo : public TCollection_BasicMap {
-
-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_IndexedDataMapOfShapeShapeInfo(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeShapeInfo& Assign(const GEOMAlgo_IndexedDataMapOfShapeShapeInfo& Other) ;
- GEOMAlgo_IndexedDataMapOfShapeShapeInfo& operator =(const GEOMAlgo_IndexedDataMapOfShapeShapeInfo& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~GEOMAlgo_IndexedDataMapOfShapeShapeInfo()
-{
- Clear();
-}
-
-
-
-Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const GEOMAlgo_ShapeInfo& I) ;
-
-
-Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const GEOMAlgo_ShapeInfo& T) ;
-
-
-Standard_EXPORT void RemoveLast() ;
+#ifndef GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile
+#define GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile
-Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const;
+#include <TopoDS_Shape.hxx>
+#include <TopTools_ShapeMapHasher.hxx>
+#include <GEOMAlgo_ShapeInfo.hxx>
-Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const;
+#define _NCollection_MapHasher
+#include <NCollection_IndexedDataMap.hxx>
+typedef NCollection_IndexedDataMap<TopoDS_Shape, GEOMAlgo_ShapeInfo, TopTools_ShapeMapHasher> GEOMAlgo_IndexedDataMapOfShapeShapeInfo;
-Standard_EXPORT const GEOMAlgo_ShapeInfo& FindFromIndex(const Standard_Integer I) const;
- const GEOMAlgo_ShapeInfo& operator ()(const Standard_Integer I) const
-{
- return FindFromIndex(I);
-}
+#undef _NCollection_MapHasher
-Standard_EXPORT GEOMAlgo_ShapeInfo& ChangeFromIndex(const Standard_Integer I) ;
- GEOMAlgo_ShapeInfo& operator ()(const Standard_Integer I)
-{
- return ChangeFromIndex(I);
-}
-
-
-
-Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const;
-
-
-Standard_EXPORT const GEOMAlgo_ShapeInfo& FindFromKey(const TopoDS_Shape& K) const;
-
-
-Standard_EXPORT GEOMAlgo_ShapeInfo& ChangeFromKey(const TopoDS_Shape& K) ;
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const;
- Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K);
-#endif
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeShapeInfo(const GEOMAlgo_IndexedDataMapOfShapeShapeInfo& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_IndexedDataMapOfShapeShapeInfo.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _GEOMAlgo_ShapeInfo_HeaderFile
-#include <GEOMAlgo_ShapeInfo.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_HeaderFile
-#include <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx>
-#endif
-
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem GEOMAlgo_ShapeInfo
-#define TheItem_hxx <GEOMAlgo_ShapeInfo.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo
-#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeShapeInfo
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx>
-#include <TCollection_IndexedDataMap.gxx>
-
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+/// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+///
+/// 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
+///
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_IndexedDataMapOfShapeState.hxx
+// Created: Wed Feb 22 11:19:56 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
-#define _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _TopAbs_State_HeaderFile
-#include <TopAbs_State.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile
-#include <Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_DomainError;
-class Standard_OutOfRange;
-class Standard_NoSuchObject;
-class TopoDS_Shape;
-class TopTools_ShapeMapHasher;
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class GEOMAlgo_IndexedDataMapOfShapeState : public TCollection_BasicMap {
-
-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_IndexedDataMapOfShapeState(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeState& Assign(const GEOMAlgo_IndexedDataMapOfShapeState& Other) ;
- GEOMAlgo_IndexedDataMapOfShapeState& operator =(const GEOMAlgo_IndexedDataMapOfShapeState& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~GEOMAlgo_IndexedDataMapOfShapeState()
-{
- Clear();
-}
-
-
-
-Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const TopAbs_State& I) ;
-
-
-Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const TopAbs_State& T) ;
+#ifndef GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
+#define GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
-Standard_EXPORT void RemoveLast() ;
-Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const;
-
-
-Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const;
-
-
-Standard_EXPORT const TopAbs_State& FindFromIndex(const Standard_Integer I) const;
- const TopAbs_State& operator ()(const Standard_Integer I) const
-{
- return FindFromIndex(I);
-}
-
-
-
-Standard_EXPORT TopAbs_State& ChangeFromIndex(const Standard_Integer I) ;
- TopAbs_State& operator ()(const Standard_Integer I)
-{
- return ChangeFromIndex(I);
-}
-
-
-
-Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const;
-
-
-Standard_EXPORT const TopAbs_State& FindFromKey(const TopoDS_Shape& K) const;
-Standard_EXPORT TopAbs_State& ChangeFromKey(const TopoDS_Shape& K) ;
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const;
- Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K);
-#endif
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeState(const GEOMAlgo_IndexedDataMapOfShapeState& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
-
+#include <TopoDS_Shape.hxx>
+#include <TopTools_ShapeMapHasher.hxx>
+#include <TopAbs_State.hxx>
+#define _NCollection_MapHasher
+#include <NCollection_IndexedDataMap.hxx>
+typedef NCollection_IndexedDataMap<TopoDS_Shape, TopAbs_State, TopTools_ShapeMapHasher> GEOMAlgo_IndexedDataMapOfShapeState;
+#undef _NCollection_MapHasher
-// other Inline functions and methods (like "C++: function call" methods)
-//
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapOfShapeState.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile
-#include <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx>
-#endif
-
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem TopAbs_State
-#define TheItem_hxx <TopAbs_State.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState
-#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState
-#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_Type_()
-#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeState
-#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
-#include <TCollection_IndexedDataMap.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
// 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
#define _GEOMAlgo_KindOfBounds_HeaderFile
-enum GEOMAlgo_KindOfBounds {
- GEOMAlgo_KB_UNKNOWN,
+enum GEOMAlgo_KindOfBounds {
+GEOMAlgo_KB_UNKNOWN,
GEOMAlgo_KB_TRIMMED,
GEOMAlgo_KB_INFINITE
};
-
#ifndef _Standard_PrimitiveTypes_HeaderFile
#include <Standard_PrimitiveTypes.hxx>
#endif
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
#ifndef _GEOMAlgo_KindOfClosed_HeaderFile
#define _GEOMAlgo_KindOfClosed_HeaderFile
-enum GEOMAlgo_KindOfClosed {
- GEOMAlgo_KC_UNKNOWN,
+enum GEOMAlgo_KindOfClosed {
+GEOMAlgo_KC_UNKNOWN,
GEOMAlgo_KC_CLOSED,
GEOMAlgo_KC_NOTCLOSED
};
-
#ifndef _Standard_PrimitiveTypes_HeaderFile
#include <Standard_PrimitiveTypes.hxx>
#endif
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
// 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
#define _GEOMAlgo_KindOfName_HeaderFile
-enum GEOMAlgo_KindOfName {
- GEOMAlgo_KN_UNKNOWN,
+enum GEOMAlgo_KindOfName {
+GEOMAlgo_KN_UNKNOWN,
GEOMAlgo_KN_SPHERE,
GEOMAlgo_KN_CYLINDER,
GEOMAlgo_KN_TORUS,
GEOMAlgo_KN_ARCELLIPSE
};
-
#ifndef _Standard_PrimitiveTypes_HeaderFile
#include <Standard_PrimitiveTypes.hxx>
#endif
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
#ifndef _GEOMAlgo_KindOfShape_HeaderFile
#define _GEOMAlgo_KindOfShape_HeaderFile
-enum GEOMAlgo_KindOfShape {
- GEOMAlgo_KS_UNKNOWN,
+enum GEOMAlgo_KindOfShape {
+GEOMAlgo_KS_UNKNOWN,
GEOMAlgo_KS_SPHERE,
GEOMAlgo_KS_CYLINDER,
GEOMAlgo_KS_BOX,
GEOMAlgo_KS_DEGENERATED
};
-
#ifndef _Standard_PrimitiveTypes_HeaderFile
#include <Standard_PrimitiveTypes.hxx>
#endif
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx
+// Created: Wed Feb 22 08:26:34 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile
-#define _GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile
-
-#ifndef _Standard_Address_HeaderFile
-#include <Standard_Address.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes_HeaderFile
-#include <Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_NoMoreObject;
-class Standard_NoSuchObject;
-class GEOMAlgo_ListOfCoupleOfShapes;
-class GEOMAlgo_CoupleOfShapes;
-class GEOMAlgo_ListNodeOfListOfCoupleOfShapes;
-
+#ifndef GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile
+#define GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
+#ifndef GEOMAlgo_ListOfCoupleOfShapes_HeaderFile
+#include <GEOMAlgo_ListOfCoupleOfShapes.hxx>
#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_ListIteratorOfListOfCoupleOfShapes {
-
-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_ListIteratorOfListOfCoupleOfShapes();
-
-
-Standard_EXPORT GEOMAlgo_ListIteratorOfListOfCoupleOfShapes(const GEOMAlgo_ListOfCoupleOfShapes& L);
-
-
-Standard_EXPORT void Initialize(const GEOMAlgo_ListOfCoupleOfShapes& L) ;
-
- Standard_Boolean More() const;
-
-
-Standard_EXPORT void Next() ;
-
-
-Standard_EXPORT GEOMAlgo_CoupleOfShapes& Value() const;
-
-
-friend class GEOMAlgo_ListOfCoupleOfShapes;
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Address current;
-Standard_Address previous;
-
-
-};
-
-#define Item GEOMAlgo_CoupleOfShapes
-#define Item_hxx <GEOMAlgo_CoupleOfShapes.hxx>
-#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfCoupleOfShapes
-#define TCollection_ListNode_hxx <GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx>
-#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes
-#define TCollection_ListIterator_hxx <GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx>
-#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes
-#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Type_()
-#define TCollection_List GEOMAlgo_ListOfCoupleOfShapes
-#define TCollection_List_hxx <GEOMAlgo_ListOfCoupleOfShapes.hxx>
-
-#include <TCollection_ListIterator.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ListIteratorOfListOfCoupleOfShapes.hxx>
-
-#ifndef _Standard_NoMoreObject_HeaderFile
-#include <Standard_NoMoreObject.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _GEOMAlgo_ListOfCoupleOfShapes_HeaderFile
-#include <GEOMAlgo_ListOfCoupleOfShapes.hxx>
-#endif
-#ifndef _GEOMAlgo_CoupleOfShapes_HeaderFile
-#include <GEOMAlgo_CoupleOfShapes.hxx>
-#endif
-#ifndef _GEOMAlgo_ListNodeOfListOfCoupleOfShapes_HeaderFile
-#include <GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx>
-#endif
-
-
-#define Item GEOMAlgo_CoupleOfShapes
-#define Item_hxx <GEOMAlgo_CoupleOfShapes.hxx>
-#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfCoupleOfShapes
-#define TCollection_ListNode_hxx <GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx>
-#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes
-#define TCollection_ListIterator_hxx <GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx>
-#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes
-#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Type_()
-#define TCollection_List GEOMAlgo_ListOfCoupleOfShapes
-#define TCollection_List_hxx <GEOMAlgo_ListOfCoupleOfShapes.hxx>
-#include <TCollection_ListIterator.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_ListIteratorOfListOfPnt.hxx
+// Created: Wed Feb 22 08:33:12 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile
-#define _GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile
-
-#ifndef _Standard_Address_HeaderFile
-#include <Standard_Address.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_ListNodeOfListOfPnt_HeaderFile
-#include <Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_NoMoreObject;
-class Standard_NoSuchObject;
-class GEOMAlgo_ListOfPnt;
-class gp_Pnt;
-class GEOMAlgo_ListNodeOfListOfPnt;
+#ifndef GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile
+#define GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
+#ifndef GEOMAlgo_ListOfPnt_HeaderFile
+#include <GEOMAlgo_ListOfPnt.hxx>
#endif
-
-class GEOMAlgo_ListIteratorOfListOfPnt {
-
-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_ListIteratorOfListOfPnt();
-
-
-Standard_EXPORT GEOMAlgo_ListIteratorOfListOfPnt(const GEOMAlgo_ListOfPnt& L);
-
-
-Standard_EXPORT void Initialize(const GEOMAlgo_ListOfPnt& L) ;
-
- Standard_Boolean More() const;
-
-
-Standard_EXPORT void Next() ;
-
-
-Standard_EXPORT gp_Pnt& Value() const;
-
-
-friend class GEOMAlgo_ListOfPnt;
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Address current;
-Standard_Address previous;
-
-
-};
-
-#define Item gp_Pnt
-#define Item_hxx <gp_Pnt.hxx>
-#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt
-#define TCollection_ListNode_hxx <GEOMAlgo_ListNodeOfListOfPnt.hxx>
-#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt
-#define TCollection_ListIterator_hxx <GEOMAlgo_ListIteratorOfListOfPnt.hxx>
-#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt
-#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_()
-#define TCollection_List GEOMAlgo_ListOfPnt
-#define TCollection_List_hxx <GEOMAlgo_ListOfPnt.hxx>
-
-#include <TCollection_ListIterator.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ListIteratorOfListOfPnt.hxx>
-
-#ifndef _Standard_NoMoreObject_HeaderFile
-#include <Standard_NoMoreObject.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _GEOMAlgo_ListOfPnt_HeaderFile
-#include <GEOMAlgo_ListOfPnt.hxx>
-#endif
-#ifndef _gp_Pnt_HeaderFile
-#include <gp_Pnt.hxx>
-#endif
-#ifndef _GEOMAlgo_ListNodeOfListOfPnt_HeaderFile
-#include <GEOMAlgo_ListNodeOfListOfPnt.hxx>
-#endif
-
-
-#define Item gp_Pnt
-#define Item_hxx <gp_Pnt.hxx>
-#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt
-#define TCollection_ListNode_hxx <GEOMAlgo_ListNodeOfListOfPnt.hxx>
-#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt
-#define TCollection_ListIterator_hxx <GEOMAlgo_ListIteratorOfListOfPnt.hxx>
-#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt
-#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_()
-#define TCollection_List GEOMAlgo_ListOfPnt
-#define TCollection_List_hxx <GEOMAlgo_ListOfPnt.hxx>
-#include <TCollection_ListIterator.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ListNodeOfListOfCoupleOfShapes_HeaderFile
-#define _GEOMAlgo_ListNodeOfListOfCoupleOfShapes_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes_HeaderFile
-#include <Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx>
-#endif
-
-#ifndef _GEOMAlgo_CoupleOfShapes_HeaderFile
-#include <GEOMAlgo_CoupleOfShapes.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-class GEOMAlgo_CoupleOfShapes;
-class GEOMAlgo_ListOfCoupleOfShapes;
-class GEOMAlgo_ListIteratorOfListOfCoupleOfShapes;
-
-
-
-class GEOMAlgo_ListNodeOfListOfCoupleOfShapes : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-GEOMAlgo_ListNodeOfListOfCoupleOfShapes(const GEOMAlgo_CoupleOfShapes& I,const TCollection_MapNodePtr& n);
-
- GEOMAlgo_CoupleOfShapes& Value() const;
-//Standard_EXPORT ~GEOMAlgo_ListNodeOfListOfCoupleOfShapes();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-GEOMAlgo_CoupleOfShapes myValue;
-
-
-};
-
-#define Item GEOMAlgo_CoupleOfShapes
-#define Item_hxx <GEOMAlgo_CoupleOfShapes.hxx>
-#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfCoupleOfShapes
-#define TCollection_ListNode_hxx <GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx>
-#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes
-#define TCollection_ListIterator_hxx <GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx>
-#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes
-#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Type_()
-#define TCollection_List GEOMAlgo_ListOfCoupleOfShapes
-#define TCollection_List_hxx <GEOMAlgo_ListOfCoupleOfShapes.hxx>
-
-#include <TCollection_ListNode.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ListNodeOfListOfCoupleOfShapes.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _GEOMAlgo_CoupleOfShapes_HeaderFile
-#include <GEOMAlgo_CoupleOfShapes.hxx>
-#endif
-#ifndef _GEOMAlgo_ListOfCoupleOfShapes_HeaderFile
-#include <GEOMAlgo_ListOfCoupleOfShapes.hxx>
-#endif
-#ifndef _GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile
-#include <GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx>
-#endif
-//GEOMAlgo_ListNodeOfListOfCoupleOfShapes::~GEOMAlgo_ListNodeOfListOfCoupleOfShapes() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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_ListNodeOfListOfCoupleOfShapes",
- sizeof(GEOMAlgo_ListNodeOfListOfCoupleOfShapes),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfCoupleOfShapes))) {
- _anOtherObject = Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)((Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& GEOMAlgo_ListNodeOfListOfCoupleOfShapes::DynamicType() const
-{
- return STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) ;
-}
-//Standard_Boolean GEOMAlgo_ListNodeOfListOfCoupleOfShapes::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes::~Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes() {}
-#define Item GEOMAlgo_CoupleOfShapes
-#define Item_hxx <GEOMAlgo_CoupleOfShapes.hxx>
-#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfCoupleOfShapes
-#define TCollection_ListNode_hxx <GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx>
-#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes
-#define TCollection_ListIterator_hxx <GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx>
-#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes
-#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Type_()
-#define TCollection_List GEOMAlgo_ListOfCoupleOfShapes
-#define TCollection_List_hxx <GEOMAlgo_ListOfCoupleOfShapes.hxx>
-#include <TCollection_ListNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ListNodeOfListOfPnt_HeaderFile
-#define _GEOMAlgo_ListNodeOfListOfPnt_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_ListNodeOfListOfPnt_HeaderFile
-#include <Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx>
-#endif
-
-#ifndef _gp_Pnt_HeaderFile
-#include <gp_Pnt.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-class gp_Pnt;
-class GEOMAlgo_ListOfPnt;
-class GEOMAlgo_ListIteratorOfListOfPnt;
-
-
-
-class GEOMAlgo_ListNodeOfListOfPnt : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-GEOMAlgo_ListNodeOfListOfPnt(const gp_Pnt& I,const TCollection_MapNodePtr& n);
-
- gp_Pnt& Value() const;
-//Standard_EXPORT ~GEOMAlgo_ListNodeOfListOfPnt();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-gp_Pnt myValue;
-
-
-};
-
-#define Item gp_Pnt
-#define Item_hxx <gp_Pnt.hxx>
-#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt
-#define TCollection_ListNode_hxx <GEOMAlgo_ListNodeOfListOfPnt.hxx>
-#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt
-#define TCollection_ListIterator_hxx <GEOMAlgo_ListIteratorOfListOfPnt.hxx>
-#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt
-#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_()
-#define TCollection_List GEOMAlgo_ListOfPnt
-#define TCollection_List_hxx <GEOMAlgo_ListOfPnt.hxx>
-
-#include <TCollection_ListNode.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ListNodeOfListOfPnt.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _gp_Pnt_HeaderFile
-#include <gp_Pnt.hxx>
-#endif
-#ifndef _GEOMAlgo_ListOfPnt_HeaderFile
-#include <GEOMAlgo_ListOfPnt.hxx>
-#endif
-#ifndef _GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile
-#include <GEOMAlgo_ListIteratorOfListOfPnt.hxx>
-#endif
-//GEOMAlgo_ListNodeOfListOfPnt::~GEOMAlgo_ListNodeOfListOfPnt() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ListNodeOfListOfPnt_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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_ListNodeOfListOfPnt",
- sizeof(GEOMAlgo_ListNodeOfListOfPnt),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(GEOMAlgo_ListNodeOfListOfPnt) Handle(GEOMAlgo_ListNodeOfListOfPnt)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(GEOMAlgo_ListNodeOfListOfPnt) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt))) {
- _anOtherObject = Handle(GEOMAlgo_ListNodeOfListOfPnt)((Handle(GEOMAlgo_ListNodeOfListOfPnt)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& GEOMAlgo_ListNodeOfListOfPnt::DynamicType() const
-{
- return STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt) ;
-}
-//Standard_Boolean GEOMAlgo_ListNodeOfListOfPnt::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_GEOMAlgo_ListNodeOfListOfPnt::~Handle_GEOMAlgo_ListNodeOfListOfPnt() {}
-#define Item gp_Pnt
-#define Item_hxx <gp_Pnt.hxx>
-#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt
-#define TCollection_ListNode_hxx <GEOMAlgo_ListNodeOfListOfPnt.hxx>
-#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt
-#define TCollection_ListIterator_hxx <GEOMAlgo_ListIteratorOfListOfPnt.hxx>
-#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt
-#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_()
-#define TCollection_List GEOMAlgo_ListOfPnt
-#define TCollection_List_hxx <GEOMAlgo_ListOfPnt.hxx>
-#include <TCollection_ListNode.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#ifndef _GEOMAlgo_ListOfCoupleOfShapes_HeaderFile
-#define _GEOMAlgo_ListOfCoupleOfShapes_HeaderFile
-
-#ifndef _Standard_Address_HeaderFile
-#include <Standard_Address.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes_HeaderFile
-#include <Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_NoSuchObject;
-class GEOMAlgo_ListIteratorOfListOfCoupleOfShapes;
-class GEOMAlgo_CoupleOfShapes;
-class GEOMAlgo_ListNodeOfListOfCoupleOfShapes;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_ListOfCoupleOfShapes {
-
-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_ListOfCoupleOfShapes();
-
-
-Standard_EXPORT void Assign(const GEOMAlgo_ListOfCoupleOfShapes& Other) ;
- void operator=(const GEOMAlgo_ListOfCoupleOfShapes& Other)
-{
- Assign(Other);
-}
-
-
-
-Standard_EXPORT Standard_Integer Extent() const;
-
-
-Standard_EXPORT void Clear() ;
-~GEOMAlgo_ListOfCoupleOfShapes()
-{
- Clear();
-}
-
-
- Standard_Boolean IsEmpty() const;
-
-
-Standard_EXPORT void Prepend(const GEOMAlgo_CoupleOfShapes& I) ;
-
-
-Standard_EXPORT void Prepend(const GEOMAlgo_CoupleOfShapes& I,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& theIt) ;
-
-
-Standard_EXPORT void Prepend(GEOMAlgo_ListOfCoupleOfShapes& Other) ;
-
-
-Standard_EXPORT void Append(const GEOMAlgo_CoupleOfShapes& I) ;
-
-
-Standard_EXPORT void Append(const GEOMAlgo_CoupleOfShapes& I,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& theIt) ;
-
-
-Standard_EXPORT void Append(GEOMAlgo_ListOfCoupleOfShapes& Other) ;
+// File: GEOMAlgo_ListOfCoupleOfShapes.hxx
+// Created: Wed Feb 22 08:23:27 2012
+// Author:
+// <pkv@BDEURI37616>
+#ifndef GEOMAlgo_ListOfCoupleOfShapes_HeaderFile
+#define GEOMAlgo_ListOfCoupleOfShapes_HeaderFile
-Standard_EXPORT GEOMAlgo_CoupleOfShapes& First() const;
-
-
-Standard_EXPORT GEOMAlgo_CoupleOfShapes& Last() const;
-
-
-Standard_EXPORT void RemoveFirst() ;
-
-
-Standard_EXPORT void Remove(GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& It) ;
-
-
-Standard_EXPORT void InsertBefore(const GEOMAlgo_CoupleOfShapes& I,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& It) ;
-
-
-Standard_EXPORT void InsertBefore(GEOMAlgo_ListOfCoupleOfShapes& Other,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& It) ;
-
-
-Standard_EXPORT void InsertAfter(const GEOMAlgo_CoupleOfShapes& I,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& It) ;
-
-
-Standard_EXPORT void InsertAfter(GEOMAlgo_ListOfCoupleOfShapes& Other,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& It) ;
-
-
-friend class GEOMAlgo_ListIteratorOfListOfCoupleOfShapes;
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT GEOMAlgo_ListOfCoupleOfShapes(const GEOMAlgo_ListOfCoupleOfShapes& Other);
-
-
- // Fields PRIVATE
- //
-Standard_Address myFirst;
-Standard_Address myLast;
-
-
-};
-
-#define Item GEOMAlgo_CoupleOfShapes
-#define Item_hxx <GEOMAlgo_CoupleOfShapes.hxx>
-#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfCoupleOfShapes
-#define TCollection_ListNode_hxx <GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx>
-#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes
-#define TCollection_ListIterator_hxx <GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx>
-#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes
-#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Type_()
-#define TCollection_List GEOMAlgo_ListOfCoupleOfShapes
-#define TCollection_List_hxx <GEOMAlgo_ListOfCoupleOfShapes.hxx>
-
-#include <TCollection_List.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
+#include <NCollection_List.hxx>
+#include <GEOMAlgo_CoupleOfShapes.hxx>
+typedef NCollection_List<GEOMAlgo_CoupleOfShapes> GEOMAlgo_ListOfCoupleOfShapes;
+typedef GEOMAlgo_ListOfCoupleOfShapes::Iterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes;
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ListOfCoupleOfShapes.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile
-#include <GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx>
-#endif
-#ifndef _GEOMAlgo_CoupleOfShapes_HeaderFile
-#include <GEOMAlgo_CoupleOfShapes.hxx>
-#endif
-#ifndef _GEOMAlgo_ListNodeOfListOfCoupleOfShapes_HeaderFile
-#include <GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx>
-#endif
-
-
-#define Item GEOMAlgo_CoupleOfShapes
-#define Item_hxx <GEOMAlgo_CoupleOfShapes.hxx>
-#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfCoupleOfShapes
-#define TCollection_ListNode_hxx <GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx>
-#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes
-#define TCollection_ListIterator_hxx <GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx>
-#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes
-#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Type_()
-#define TCollection_List GEOMAlgo_ListOfCoupleOfShapes
-#define TCollection_List_hxx <GEOMAlgo_ListOfCoupleOfShapes.hxx>
-#include <TCollection_List.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_ListOfPnt.hxx
+// Created: Wed Feb 22 08:31:47 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _GEOMAlgo_ListOfPnt_HeaderFile
-#define _GEOMAlgo_ListOfPnt_HeaderFile
-
-#ifndef _Standard_Address_HeaderFile
-#include <Standard_Address.hxx>
-#endif
-#ifndef _Handle_GEOMAlgo_ListNodeOfListOfPnt_HeaderFile
-#include <Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_NoSuchObject;
-class GEOMAlgo_ListIteratorOfListOfPnt;
-class gp_Pnt;
-class GEOMAlgo_ListNodeOfListOfPnt;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_ListOfPnt {
-
-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_ListOfPnt();
-
-
-Standard_EXPORT void Assign(const GEOMAlgo_ListOfPnt& Other) ;
- void operator=(const GEOMAlgo_ListOfPnt& Other)
-{
- Assign(Other);
-}
-
-
-
-Standard_EXPORT Standard_Integer Extent() const;
-
-
-Standard_EXPORT void Clear() ;
-~GEOMAlgo_ListOfPnt()
-{
- Clear();
-}
-
-
- Standard_Boolean IsEmpty() const;
-
-
-Standard_EXPORT void Prepend(const gp_Pnt& I) ;
-
-
-Standard_EXPORT void Prepend(const gp_Pnt& I,GEOMAlgo_ListIteratorOfListOfPnt& theIt) ;
-
-
-Standard_EXPORT void Prepend(GEOMAlgo_ListOfPnt& Other) ;
-
-
-Standard_EXPORT void Append(const gp_Pnt& I) ;
-
-
-Standard_EXPORT void Append(const gp_Pnt& I,GEOMAlgo_ListIteratorOfListOfPnt& theIt) ;
-
-
-Standard_EXPORT void Append(GEOMAlgo_ListOfPnt& Other) ;
+#ifndef GEOMAlgo_ListOfPnt_HeaderFile
+#define GEOMAlgo_ListOfPnt_HeaderFile
-Standard_EXPORT gp_Pnt& First() const;
+#include <NCollection_List.hxx>
+#include <gp_Pnt.hxx>
-
-Standard_EXPORT gp_Pnt& Last() const;
-
-
-Standard_EXPORT void RemoveFirst() ;
-
-
-Standard_EXPORT void Remove(GEOMAlgo_ListIteratorOfListOfPnt& It) ;
-
-
-Standard_EXPORT void InsertBefore(const gp_Pnt& I,GEOMAlgo_ListIteratorOfListOfPnt& It) ;
-
-
-Standard_EXPORT void InsertBefore(GEOMAlgo_ListOfPnt& Other,GEOMAlgo_ListIteratorOfListOfPnt& It) ;
-
-
-Standard_EXPORT void InsertAfter(const gp_Pnt& I,GEOMAlgo_ListIteratorOfListOfPnt& It) ;
-
-
-Standard_EXPORT void InsertAfter(GEOMAlgo_ListOfPnt& Other,GEOMAlgo_ListIteratorOfListOfPnt& It) ;
-
-
-friend class GEOMAlgo_ListIteratorOfListOfPnt;
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT GEOMAlgo_ListOfPnt(const GEOMAlgo_ListOfPnt& Other);
-
-
- // Fields PRIVATE
- //
-Standard_Address myFirst;
-Standard_Address myLast;
-
-
-};
-
-#define Item gp_Pnt
-#define Item_hxx <gp_Pnt.hxx>
-#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt
-#define TCollection_ListNode_hxx <GEOMAlgo_ListNodeOfListOfPnt.hxx>
-#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt
-#define TCollection_ListIterator_hxx <GEOMAlgo_ListIteratorOfListOfPnt.hxx>
-#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt
-#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_()
-#define TCollection_List GEOMAlgo_ListOfPnt
-#define TCollection_List_hxx <GEOMAlgo_ListOfPnt.hxx>
-
-#include <TCollection_List.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
+typedef NCollection_List<gp_Pnt> GEOMAlgo_ListOfPnt;
+typedef GEOMAlgo_ListOfPnt::Iterator GEOMAlgo_ListIteratorOfListOfPnt;
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ListOfPnt.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile
-#include <GEOMAlgo_ListIteratorOfListOfPnt.hxx>
-#endif
-#ifndef _gp_Pnt_HeaderFile
-#include <gp_Pnt.hxx>
-#endif
-#ifndef _GEOMAlgo_ListNodeOfListOfPnt_HeaderFile
-#include <GEOMAlgo_ListNodeOfListOfPnt.hxx>
-#endif
-
-
-#define Item gp_Pnt
-#define Item_hxx <gp_Pnt.hxx>
-#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt
-#define TCollection_ListNode_hxx <GEOMAlgo_ListNodeOfListOfPnt.hxx>
-#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt
-#define TCollection_ListIterator_hxx <GEOMAlgo_ListIteratorOfListOfPnt.hxx>
-#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt
-#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_()
-#define TCollection_List GEOMAlgo_ListOfPnt
-#define TCollection_List_hxx <GEOMAlgo_ListOfPnt.hxx>
-#include <TCollection_List.gxx>
-
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_PWireEdgeSet.hxx
+// Created:
+// Author: Peter KURNEV
+// <peter@PREFEX>
+//
#ifndef _GEOMAlgo_PWireEdgeSet_HeaderFile
#define _GEOMAlgo_PWireEdgeSet_HeaderFile
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_PassKey.cdl
--- Created: Mon Nov 20 12:16:13 2006
--- Author: Peter KURNEV
--- <pkv@irinox>
---
-class PassKey from GEOMAlgo
-
- ---Purpose:
-
-uses
- Shape from TopoDS,
- 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;
- aI2 :Integer from Standard);
-
- SetIds(me:out;
- aI1 :Integer from Standard;
- aI2 :Integer from Standard;
- aI3 :Integer from Standard);
-
- SetIds(me:out;
- aI1 :Integer from Standard;
- aI2 :Integer from Standard;
- aI3 :Integer from Standard;
- aI4 :Integer from Standard);
-
- SetIds(me:out;
- aLS :ListOfInteger from TColStd);
-
- NbIds(me)
- returns Integer from Standard;
-
- IsEqual(me;
- aOther:PassKey from GEOMAlgo)
- returns Boolean from Standard;
-
- HashCode(me;
- Upper : Integer from Standard)
- returns Integer from Standard;
-
- Id(me;
- aIndex: Integer from Standard)
- returns Integer from Standard;
-
-
- Dump(me;
- aHex:Integer from Standard=0);
-
-
-fields
- myNbIds: Integer from Standard 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_Algo.cxx
-// Created: Sat Dec 04 12:39:47 2004
+// File: GEOMAlgo_PassKey.cxx
+// Created:
// Author: Peter KURNEV
// <peter@PREFEX>
//
-#include <GEOMAlgo_PassKey.ixx>
+#include <GEOMAlgo_PassKey.hxx>
#include <stdio.h>
#include <string.h>
#include <TColStd_ListOfInteger.hxx>
#ifdef WNT
-#pragma warning( disable : 4101)
+#pragma warning( disable : 4101)
#endif
static
//=======================================================================
//function :
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_PassKey::GEOMAlgo_PassKey()
{
- Clear();
+ Clear();
}
//=======================================================================
//function :
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_PassKey::GEOMAlgo_PassKey(const GEOMAlgo_PassKey& aOther)
{
}
//=======================================================================
//function :Assign
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_PassKey& GEOMAlgo_PassKey::Assign(const GEOMAlgo_PassKey& aOther)
{
}
//=======================================================================
//function :~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_PassKey::~GEOMAlgo_PassKey()
{
}
//=======================================================================
//function :Clear
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_PassKey::Clear()
{
}
//=======================================================================
//function :SetIds
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1)
-
+
{
Clear();
myNbIds=1;
}
//=======================================================================
//function :SetIds
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1,
const Standard_Integer aId2)
}
//=======================================================================
//function :SetIds
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1,
const Standard_Integer aId2,
}
//=======================================================================
//function :SetIds
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1,
const Standard_Integer aId2,
const Standard_Integer aId3,
const Standard_Integer aId4)
-{
+{
TColStd_ListOfInteger aLI;
//
aLI.Append(aId1);
}
//=======================================================================
//function :SetIds
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_PassKey::SetIds(const TColStd_ListOfInteger& aLI)
{
}
//=======================================================================
//function :NbIds
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_PassKey::NbIds()const
{
}
//=======================================================================
//function :Id
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_PassKey::Id(const Standard_Integer aIndex) const
{
}
//=======================================================================
//function :IsEqual
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_PassKey::IsEqual(const GEOMAlgo_PassKey& aOther) const
{
}
//=======================================================================
//function : HashCode
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_PassKey::HashCode(const Standard_Integer aUpper) const
{
}
//=======================================================================
//function : Dump
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_PassKey::Dump(const Standard_Integer )const
{
}
//=======================================================================
// function: NormalizedId
-// purpose :
+// purpose :
//=======================================================================
Standard_Integer NormalizedId(const Standard_Integer aId,
const Standard_Integer aDiv)
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_PassKey.hxx
+// Created:
+// Author: Peter KURNEV
+// <peter@PREFEX>
+//
#ifndef _GEOMAlgo_PassKey_HeaderFile
#define _GEOMAlgo_PassKey_HeaderFile
-#ifndef _Standard_Integer_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <Standard_Integer.hxx>
-#endif
-#ifndef _TColStd_IndexedMapOfInteger_HeaderFile
#include <TColStd_IndexedMapOfInteger.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-class TColStd_ListOfInteger;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
+#include <TColStd_ListOfInteger.hxx>
+//=======================================================================
+//class : GEOMAlgo_PassKey
+//purpose :
+//=======================================================================
class GEOMAlgo_PassKey {
+ public:
+ Standard_EXPORT
+ GEOMAlgo_PassKey();
-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_PassKey();
-Standard_EXPORT virtual ~GEOMAlgo_PassKey();
-
-
-Standard_EXPORT GEOMAlgo_PassKey(const GEOMAlgo_PassKey& Other);
-
-
-Standard_EXPORT GEOMAlgo_PassKey& Assign(const GEOMAlgo_PassKey& Other) ;
- GEOMAlgo_PassKey& operator =(const GEOMAlgo_PassKey& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void Clear() ;
-
-
-Standard_EXPORT void SetIds(const Standard_Integer aI1) ;
-
+ Standard_EXPORT
+ virtual ~GEOMAlgo_PassKey();
-Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2) ;
+ Standard_EXPORT
+ GEOMAlgo_PassKey(const GEOMAlgo_PassKey& Other);
+ Standard_EXPORT
+ GEOMAlgo_PassKey& Assign(const GEOMAlgo_PassKey& Other) ;
-Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2,const Standard_Integer aI3) ;
+ GEOMAlgo_PassKey& operator =(const GEOMAlgo_PassKey& Other) {
+ return Assign(Other);
+ }
+ Standard_EXPORT
+ void Clear() ;
-Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2,const Standard_Integer aI3,const Standard_Integer aI4) ;
+ Standard_EXPORT
+ void SetIds(const Standard_Integer aI1) ;
+ Standard_EXPORT
+ void SetIds(const Standard_Integer aI1,
+ const Standard_Integer aI2) ;
-Standard_EXPORT void SetIds(const TColStd_ListOfInteger& aLS) ;
+ Standard_EXPORT
+ void SetIds(const Standard_Integer aI1,
+ const Standard_Integer aI2,
+ const Standard_Integer aI3) ;
+ Standard_EXPORT
+ void SetIds(const Standard_Integer aI1,
+ const Standard_Integer aI2,
+ const Standard_Integer aI3,
+ const Standard_Integer aI4) ;
-Standard_EXPORT Standard_Integer NbIds() const;
+ Standard_EXPORT
+ void SetIds(const TColStd_ListOfInteger& aLS) ;
+ Standard_EXPORT
+ Standard_Integer NbIds() const;
-Standard_EXPORT Standard_Boolean IsEqual(const GEOMAlgo_PassKey& aOther) const;
+ Standard_EXPORT
+ Standard_Boolean IsEqual(const GEOMAlgo_PassKey& aOther) const;
+ Standard_EXPORT
+ Standard_Integer HashCode(const Standard_Integer Upper) 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_Integer aHex = 0) const;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-Standard_Integer myNbIds;
-Standard_Integer mySum;
-TColStd_IndexedMapOfInteger myMap;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
+ Standard_EXPORT
+ Standard_Integer Id(const Standard_Integer aIndex) const;
+ Standard_EXPORT
+ void Dump(const Standard_Integer aHex = 0) const;
+ protected:
+ Standard_Integer myNbIds;
+ Standard_Integer mySum;
+ TColStd_IndexedMapOfInteger myMap;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_PassKey.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _TColStd_ListOfInteger_HeaderFile
-#include <TColStd_ListOfInteger.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKey_HeaderFile
-#include <GEOMAlgo_PassKey.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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 PassKeyMapHasher from GEOMAlgo
-
- ---Purpose:
-
-uses
- PassKey from GEOMAlgo
-
---raises
-
-is
- HashCode(myclass;
- aPKey : PassKey from GEOMAlgo;
- Upper : Integer from Standard)
- returns Integer from Standard;
-
-
- IsEqual(myclass;
- aPKey1 : PassKey from GEOMAlgo;
- aPKey2 : PassKey from GEOMAlgo)
- returns Boolean from Standard;
-
-end PassKeyMapHasher;
//
// File: GEOMAlgo_PassKeyMapHasher.cxx
-// Created:
+// Created:
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <GEOMAlgo_PassKeyMapHasher.ixx>
+#include <GEOMAlgo_PassKeyMapHasher.hxx>
//=======================================================================
//function : HashCode
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_PassKeyMapHasher::HashCode(const GEOMAlgo_PassKey& aPK,
const Standard_Integer Upper)
}
//=======================================================================
//function :IsEqual
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_PassKeyMapHasher::IsEqual(const GEOMAlgo_PassKey& aPK1,
const GEOMAlgo_PassKey& aPK2)
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_PassKeyMapHasher.hxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile
#define _GEOMAlgo_PassKeyMapHasher_HeaderFile
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class GEOMAlgo_PassKey;
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
+#include <Standard_Integer.hxx>
+#include <Standard_Boolean.hxx>
+#include <GEOMAlgo_PassKey.hxx>
+//=======================================================================
+//class : GEOMAlgo_PassKeyMapHasher
+//purpose :
+//=======================================================================
class GEOMAlgo_PassKeyMapHasher {
-
-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_PassKey& aPKey,const Standard_Integer Upper) ;
-
-
-Standard_EXPORT static Standard_Boolean IsEqual(const GEOMAlgo_PassKey& aPKey1,const GEOMAlgo_PassKey& aPKey2) ;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+ public:
+ Standard_EXPORT
+ static Standard_Integer HashCode(const GEOMAlgo_PassKey& aPKey,
+ const Standard_Integer Upper) ;
+
+ Standard_EXPORT
+ static Standard_Boolean IsEqual(const GEOMAlgo_PassKey& aPKey1,
+ const GEOMAlgo_PassKey& aPKey2) ;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_PassKeyMapHasher.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_PassKey_HeaderFile
-#include <GEOMAlgo_PassKey.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile
-#include <GEOMAlgo_PassKeyMapHasher.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_PassKeyShape.cdl
--- Created:
--- Author: Peter KURNEV
--- <pkv@irinox>
---
-class PassKeyShape from GEOMAlgo
-
- ---Purpose:
-
-uses
- Shape from TopoDS,
- ListOfShape from TopTools,
- IndexedMapOfShape from TopTools
-
---raises
-
-is
- Create
- returns PassKeyShape from GEOMAlgo;
- ---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);
-
- SetShapes(me:out;
- aS1 :Shape from TopoDS;
- aS2 :Shape from TopoDS);
-
- SetShapes(me:out;
- aS1 :Shape from TopoDS;
- aS2 :Shape from TopoDS;
- aS3 :Shape from TopoDS);
-
- SetShapes(me:out;
- aS1 :Shape from TopoDS;
- aS2 :Shape from TopoDS;
- aS3 :Shape from TopoDS;
- aS4 :Shape from TopoDS);
-
- 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
- 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;
//
// File: GEOMAlgo_PassKeyShape.cxx
-// Created:
+// Created:
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <GEOMAlgo_PassKeyShape.ixx>
+#include <GEOMAlgo_PassKeyShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
-static
+static
Standard_Integer NormalizedId(const Standard_Integer aId,
const Standard_Integer aDiv);
//=======================================================================
//function :
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_PassKeyShape::GEOMAlgo_PassKeyShape()
{
}
//=======================================================================
//function :
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_PassKeyShape::GEOMAlgo_PassKeyShape(const GEOMAlgo_PassKeyShape& aOther)
{
}
//=======================================================================
//function :~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_PassKeyShape::~GEOMAlgo_PassKeyShape()
{
}
//=======================================================================
//function :Assign
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_PassKeyShape& GEOMAlgo_PassKeyShape::Assign(const GEOMAlgo_PassKeyShape& aOther)
{
}
//=======================================================================
//function :Clear
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_PassKeyShape::Clear()
{
}
//=======================================================================
//function :SetShapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1)
-
+
{
Standard_Integer aHC;
//
}
//=======================================================================
//function :SetShapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2)
}
//=======================================================================
//function :SetShapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2,
}
//=======================================================================
//function :SetShapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2,
}
//=======================================================================
//function :SetShapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_PassKeyShape::SetShapes(const TopTools_ListOfShape& aLS)
{
}
//=======================================================================
//function :NbIds
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_PassKeyShape::NbIds()const
{
}
//=======================================================================
//function :IsEqual
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_PassKeyShape::IsEqual(const GEOMAlgo_PassKeyShape& aOther) const
{
}
//=======================================================================
//function : HashCode
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_PassKeyShape::HashCode(const Standard_Integer aUpper) const
{
}
//=======================================================================
//function : Dump
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_PassKeyShape::Dump(const Standard_Integer)const
{
}
//=======================================================================
// function: NormalizedId
-// purpose :
+// purpose :
//=======================================================================
Standard_Integer NormalizedId(const Standard_Integer aId,
const Standard_Integer aDiv)
+
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_PassKeyShape.hxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _GEOMAlgo_PassKeyShape_HeaderFile
#define _GEOMAlgo_PassKeyShape_HeaderFile
-#ifndef _Standard_Integer_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <Standard_Integer.hxx>
-#endif
-#ifndef _TopTools_IndexedMapOfShape_HeaderFile
#include <TopTools_IndexedMapOfShape.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-class TopoDS_Shape;
-class TopTools_ListOfShape;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
+#include <TopoDS_Shape.hxx>
+#include <TopTools_ListOfShape.hxx>
+//=======================================================================
+//class : GEOMAlgo_PassKeyShape
+//purpose :
+//=======================================================================
class GEOMAlgo_PassKeyShape {
+ public:
+ Standard_EXPORT
+ GEOMAlgo_PassKeyShape();
-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_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
+ virtual ~GEOMAlgo_PassKeyShape();
+ Standard_EXPORT
+ GEOMAlgo_PassKeyShape(const GEOMAlgo_PassKeyShape& Other);
-Standard_EXPORT void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3) ;
+ 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& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3,const TopoDS_Shape& aS4) ;
+ 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 TopTools_ListOfShape& aLS) ;
+ 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 Clear() ;
+ Standard_EXPORT
+ void SetShapes(const TopTools_ListOfShape& aLS) ;
+ Standard_EXPORT
+ void Clear() ;
-Standard_EXPORT Standard_Integer NbIds() const;
-
-
-Standard_EXPORT Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aOther) const;
-
-
-Standard_EXPORT Standard_Integer HashCode(const Standard_Integer Upper) const;
-
-
-Standard_EXPORT void Dump(const Standard_Integer aHex = 0) const;
-
+ Standard_EXPORT
+ Standard_Integer NbIds() const;
+ Standard_EXPORT
+ Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aOther) const;
+ Standard_EXPORT
+ Standard_Integer HashCode(const Standard_Integer Upper) const;
+ Standard_EXPORT
+ void Dump(const Standard_Integer aHex = 0) const;
protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-Standard_Integer myNbIds;
-Standard_Integer mySum;
-Standard_Integer myUpper;
-TopTools_IndexedMapOfShape myMap;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+ Standard_Integer myNbIds;
+ Standard_Integer mySum;
+ Standard_Integer myUpper;
+ TopTools_IndexedMapOfShape myMap;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_PassKeyShape.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_PassKeyShape_HeaderFile
-#include <GEOMAlgo_PassKeyShape.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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;
//
// File: GEOMAlgo_PassKeyMapHasher.cxx
-// Created:
+// Created:
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <GEOMAlgo_PassKeyShapeMapHasher.ixx>
+#include <GEOMAlgo_PassKeyShapeMapHasher.hxx>
//=======================================================================
//function : HashCode
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_PassKeyShapeMapHasher::HashCode(const GEOMAlgo_PassKeyShape& aPK,
const Standard_Integer Upper)
}
//=======================================================================
//function :IsEqual
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_PassKeyShapeMapHasher::IsEqual(const GEOMAlgo_PassKeyShape& aPK1,
const GEOMAlgo_PassKeyShape& aPK2)
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_PassKeyMapHasher.hxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#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
- //
-
-
+#include <Standard_Integer.hxx>
+#include <Standard_Boolean.hxx>
+#include <GEOMAlgo_PassKeyShape.hxx>
+
+//=======================================================================
+//class : GEOMAlgo_PassKeyShapeMapHasher
+//purpose :
+//=======================================================================
+class GEOMAlgo_PassKeyShapeMapHasher
+{
+ 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) ;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_ShapeAlgo.cdl
--- Created: Tue Dec 7 12:05:19 2004
--- Author: Peter KURNEV
---
-deferred class ShapeAlgo from GEOMAlgo
- inherits Algo from GEOMAlgo
-
- ---Purpose:
-
-uses
- Shape from TopoDS,
- Context from IntTools
-
---raises
-
-is
- Initialize
- returns ShapeAlgo from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ShapeAlgo();"
-
- SetContext(me:out;
- theContext:Context from IntTools);
- ---Purpose: Sets cashed geometrical tools
-
- Context(me)
- returns Context from IntTools;
- ---Purpose: Returns cashed geometrical tools
- ---C++: return const &
-
- SetShape(me:out;
- aS:Shape from TopoDS);
-
- SetTolerance(me:out;
- aT:Real from Standard);
-
- Shape(me)
- returns Shape from TopoDS;
- ---C++:return const &
-
- Tolerance(me)
- returns Real from Standard;
-
- Result(me)
- returns Shape from TopoDS;
- ---C++:return const &
-
- Perform(me:out)
- is redefined;
-
-fields
- myShape : Shape from TopoDS is protected;
- myTolerance : Real from Standard is protected;
- myResult : Shape from TopoDS is protected;
- myContext : Context from IntTools is protected;
-
-end ShapeAlgo;
// File: GEOMAlgo_ShapeAlgo.cxx
// Created: Tue Dec 7 12:06:54 2004
// Author: Peter KURNEV
-
-#include <GEOMAlgo_ShapeAlgo.ixx>
-
-#include <Basics_OCCTVersion.hxx>
+// <pkv@irinox>
+//
+#include <GEOMAlgo_ShapeAlgo.hxx>
+#include <IntTools_Context.hxx>
//=======================================================================
//function : GEOMAlgo_ShapeAlgo
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_ShapeAlgo::GEOMAlgo_ShapeAlgo()
- : GEOMAlgo_Algo()
+:
+ GEOMAlgo_Algo()
{
myTolerance=0.0001;
}
-
+
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_ShapeAlgo::~GEOMAlgo_ShapeAlgo()
{
}
-
-#if OCC_VERSION_LARGE > 0x06050200
//=======================================================================
//function : SetContext
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeAlgo::SetContext(const Handle(IntTools_Context)& theContext)
{
myContext=theContext;
}
-
//=======================================================================
//function : Context
-//purpose :
+//purpose :
//=======================================================================
-const Handle(IntTools_Context)& GEOMAlgo_ShapeAlgo::Context()const
+const Handle(IntTools_Context)& GEOMAlgo_ShapeAlgo::Context()const
{
return myContext;
}
-
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
-void GEOMAlgo_ShapeAlgo::Perform()
-{
- if (myContext.IsNull()) {
- myContext=new IntTools_Context;
- }
-}
-#endif
-
//=======================================================================
//function : SetShape
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeAlgo::SetShape(const TopoDS_Shape& aS)
{
}
//=======================================================================
//function : Shape
-//purpose :
+//purpose :
//=======================================================================
const TopoDS_Shape& GEOMAlgo_ShapeAlgo::Shape()const
{
}
//=======================================================================
//function : SetTolerance
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeAlgo::SetTolerance(const Standard_Real aT)
{
}
//=======================================================================
//function : Tolerance
-//purpose :
+//purpose :
//=======================================================================
Standard_Real GEOMAlgo_ShapeAlgo::Tolerance()const
{
}
//=======================================================================
//function : Result
-//purpose :
+//purpose :
//=======================================================================
const TopoDS_Shape& GEOMAlgo_ShapeAlgo::Result()const
{
return myResult;
}
+//=======================================================================
+//function : Perform
+//purpose :
+//=======================================================================
+void GEOMAlgo_ShapeAlgo::Perform()
+{
+ if (myContext.IsNull()) {
+ myContext=new IntTools_Context;
+ }
+}
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_ShapeAlgo.hxx
+// Created: Tue Dec 7 12:06:54 2004
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
#define _GEOMAlgo_ShapeAlgo_HeaderFile
-#include <GEOMAlgo_Algo.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
#include <Standard.hxx>
#include <Standard_Macro.hxx>
-
#include <TopoDS_Shape.hxx>
-
#include <Standard_Real.hxx>
-
-#if OCC_VERSION_LARGE > 0x06050200
#include <Handle_IntTools_Context.hxx>
-#else
-#include <IntTools_Context.hxx>
-#endif
-
-class IntTools_Context;
-class TopoDS_Shape;
-
-class GEOMAlgo_ShapeAlgo : public GEOMAlgo_Algo {
-
-public:
+#include <GEOMAlgo_Algo.hxx>
- 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);
- }
+//=======================================================================
+//class : GEOMAlgo_ShapeAlgo
+//purpose :
+//=======================================================================
+class GEOMAlgo_ShapeAlgo : public GEOMAlgo_Algo
+{
+ public:
-#if OCC_VERSION_LARGE > 0x06050200
//! Sets cashed geometrical tools <br>
- Standard_EXPORT void SetContext(const Handle(IntTools_Context)& theContext) ;
+ Standard_EXPORT
+ void SetContext(const Handle(IntTools_Context)& theContext) ;
+
//! Returns cashed geometrical tools <br>
- Standard_EXPORT const Handle_IntTools_Context& Context() const;
+ Standard_EXPORT
+ const Handle_IntTools_Context& Context() const;
- Standard_EXPORT virtual void Perform() ;
-#endif
+ Standard_EXPORT
+ void SetShape(const TopoDS_Shape& aS) ;
- Standard_EXPORT void SetShape(const TopoDS_Shape& aS) ;
+ Standard_EXPORT
+ void SetTolerance(const Standard_Real aT) ;
- Standard_EXPORT void SetTolerance(const Standard_Real aT) ;
+ Standard_EXPORT
+ const TopoDS_Shape& Shape() const;
- Standard_EXPORT const TopoDS_Shape& Shape() const;
+ Standard_EXPORT
+ Standard_Real Tolerance() const;
- Standard_EXPORT Standard_Real Tolerance() const;
+ Standard_EXPORT
+ const TopoDS_Shape& Result() const;
- Standard_EXPORT const TopoDS_Shape& Result() const;
+ Standard_EXPORT
+ virtual void Perform() ;
protected:
+ Standard_EXPORT
+ GEOMAlgo_ShapeAlgo();
-
- Standard_EXPORT GEOMAlgo_ShapeAlgo();
- Standard_EXPORT virtual ~GEOMAlgo_ShapeAlgo();
+ Standard_EXPORT
+ virtual ~GEOMAlgo_ShapeAlgo();
TopoDS_Shape myShape;
Standard_Real myTolerance;
TopoDS_Shape myResult;
-#if OCC_VERSION_LARGE > 0x06050200
Handle_IntTools_Context myContext;
-#else
- IntTools_Context myContext;
-#endif
-
-private:
-
};
-
-// other Inline functions and methods (like "C++: function call" methods)
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ShapeAlgo.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _IntTools_Context_HeaderFile
-#include <IntTools_Context.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
-#include <GEOMAlgo_ShapeAlgo.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- 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_ShapeInfo.cdl
--- Created: Mon Apr 2 14:04:24 2007
--- Author: Peter KURNEV
---
-class ShapeInfo from GEOMAlgo
-
- ---Purpose:
-
-uses
- Pnt from gp,
- Dir from gp,
- Ax2 from gp,
- Ax3 from gp,
-
- ShapeEnum from TopAbs,
- Shape from TopoDS,
-
- KindOfShape from GEOMAlgo,
- KindOfBounds from GEOMAlgo,
- KindOfClosed from GEOMAlgo,
- KindOfName from GEOMAlgo
---raises
-
-is
- Create
- returns ShapeInfo from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ShapeInfo();"
-
- Reset(me:out);
-
- SetType(me:out;
- aType:ShapeEnum from TopAbs);
-
- Type(me)
- returns ShapeEnum from TopAbs;
-
- SetNbSubShapes(me:out;
- aType:ShapeEnum from TopAbs;
- aNb :Integer from Standard);
-
- NbSubShapes(me;
- aType:ShapeEnum from TopAbs)
- returns Integer from Standard;
-
- SetKindOfShape (me:out;
- aT:KindOfShape from GEOMAlgo);
-
- KindOfShape (me)
- returns KindOfShape from GEOMAlgo;
-
- SetKindOfName (me:out;
- aT: KindOfName from GEOMAlgo);
-
- KindOfName(me)
- returns KindOfName from GEOMAlgo;
-
- SetKindOfBounds (me:out;
- aT:KindOfBounds from GEOMAlgo);
-
- KindOfBounds (me)
- returns KindOfBounds from GEOMAlgo;
-
- SetKindOfClosed (me:out;
- aT:KindOfClosed from GEOMAlgo);
-
- KindOfClosed(me)
- returns KindOfClosed from GEOMAlgo;
-
- SetLocation (me:out;
- aP: Pnt from gp);
-
- Location (me)
- returns Pnt from gp;
- ---C++: return const&
-
- SetDirection (me:out;
- aD:Dir from gp);
-
- Direction (me)
- returns Dir from gp;
- ---C++: return const&
-
- SetPosition (me:out;
- aAx2 : Ax2 from gp);
-
- SetPosition (me:out;
- aAx3 : Ax3 from gp);
-
- Position (me)
- returns Ax3 from gp;
- ---C++: return const&
-
- SetPnt1 (me:out;
- aP: Pnt from gp);
-
- Pnt1 (me)
- returns Pnt from gp;
- ---C++: return const&
-
- SetPnt2 (me:out;
- aP: Pnt from gp);
-
- Pnt2 (me)
- returns Pnt from gp;
- ---C++: return const&
-
- SetRadius1 (me:out;
- aR: Real from Standard);
-
- Radius1(me)
- returns Real from Standard;
-
- SetRadius2 (me:out;
- aR: Real from Standard);
-
- Radius2(me)
- returns Real from Standard;
-
- SetLength(me:out;
- aL: Real from Standard);
-
- Length(me)
- returns Real from Standard;
-
- SetWidth(me:out;
- aW: Real from Standard);
-
- Width(me)
- returns Real from Standard;
-
- SetHeight(me:out;
- aH: Real from Standard);
-
- Height(me)
- returns Real from Standard;
- --
- -- Dump
- --
- Dump(me);
-
- DumpVertex(me)
- is protected;
-
- DumpEdge(me)
- is protected;
-
- DumpWire(me)
- is protected;
-
- DumpFace(me)
- is protected;
-
- DumpShell(me)
- is protected;
-
- DumpSolid(me)
- is protected;
-
- DumpCompSolid(me)
- is protected;
-
- DumpCompound(me)
- is protected;
-
-fields
- myType : ShapeEnum from TopAbs is protected;
- myNbSubShapes : Integer from Standard[9] is protected;
- myKindOfShape : KindOfShape from GEOMAlgo is protected;
- myKindOfName : KindOfName from GEOMAlgo is protected;
- myKindOfBounds : KindOfBounds from GEOMAlgo is protected;
- myKindOfClosed : KindOfClosed from GEOMAlgo is protected;
- --
- myLocation : Pnt from gp is protected;
- myDirection : Dir from gp is protected;
- myPosition : Ax3 from gp is protected;
- --
- myRadius1 : Real from Standard is protected;
- myRadius2 : Real from Standard is protected;
- myLength : Real from Standard is protected;
- myWidth : Real from Standard is protected;
- myHeight : Real from Standard is protected;
- --
- myPnt1 : Pnt from gp is protected;
- myPnt2 : Pnt from gp is protected;
- --
- myNbTypes : Integer from Standard is protected;
-end ShapeInfo;
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#include <GEOMAlgo_ShapeInfo.ixx>
+#include <GEOMAlgo_ShapeInfo.hxx>
static
static
void DumpKindOfShape(const GEOMAlgo_KindOfShape aKS);
static
- void DumpKindOfClosed(const GEOMAlgo_KindOfClosed aKC);
+ void DumpKindOfClosed(const GEOMAlgo_KindOfClosed aKC);
static
void DumpKindOfBounds(const GEOMAlgo_KindOfBounds aKB);
static
void DumpKindOfName(const GEOMAlgo_KindOfName aKS);
static
- void DumpPosition(const gp_Ax3& aAx3);
+ void DumpPosition(const gp_Ax3& aAx3);
static
void DumpLocation(const gp_Pnt& aP);
static
void DumpDirection(const gp_Dir& aD);
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
GEOMAlgo_ShapeInfo::GEOMAlgo_ShapeInfo()
{
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_ShapeInfo::~GEOMAlgo_ShapeInfo()
{
}
//=======================================================================
//function : Reset
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeInfo::Reset()
{
}
//=======================================================================
//function : SetType
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfo::SetType(const TopAbs_ShapeEnum aType)
+ void GEOMAlgo_ShapeInfo::SetType(const TopAbs_ShapeEnum aType)
{
myType=aType;
}
//=======================================================================
//function : Type
-//purpose :
+//purpose :
//=======================================================================
TopAbs_ShapeEnum GEOMAlgo_ShapeInfo::Type() const
{
}
//=======================================================================
//function : SetNbSubShapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeInfo::SetNbSubShapes(const TopAbs_ShapeEnum aType,
- const Standard_Integer aNb)
+ const Standard_Integer aNb)
{
Standard_Integer iN;
-
+
iN=TypeToInteger(aType);
if (iN>=0 && iN<myNbTypes) {
myNbSubShapes[iN]=aNb;
}
//=======================================================================
//function : NbSubShapes
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_ShapeInfo::NbSubShapes(const TopAbs_ShapeEnum aType) const
{
Standard_Integer iN;
-
+
iN=TypeToInteger(aType);
if (iN>=0 && iN<myNbTypes) {
return myNbSubShapes[iN];
}
//=======================================================================
//function : SetKindOfShape
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfo::SetKindOfShape(const GEOMAlgo_KindOfShape aT)
+ void GEOMAlgo_ShapeInfo::SetKindOfShape(const GEOMAlgo_KindOfShape aT)
{
myKindOfShape=aT;
}
//=======================================================================
//function : KindOfShape
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_KindOfShape GEOMAlgo_ShapeInfo::KindOfShape() const
{
}
//=======================================================================
//function : SetKindOfName
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfo::SetKindOfName(const GEOMAlgo_KindOfName aT)
+ void GEOMAlgo_ShapeInfo::SetKindOfName(const GEOMAlgo_KindOfName aT)
{
myKindOfName=aT;
}
//=======================================================================
//function : KindOfName
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_KindOfName GEOMAlgo_ShapeInfo::KindOfName() const
{
}
//=======================================================================
//function : SetKindOfBounds
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfo::SetKindOfBounds(const GEOMAlgo_KindOfBounds aT)
+ void GEOMAlgo_ShapeInfo::SetKindOfBounds(const GEOMAlgo_KindOfBounds aT)
{
myKindOfBounds=aT;
}
//=======================================================================
//function : KindOfBounds
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_KindOfBounds GEOMAlgo_ShapeInfo::KindOfBounds() const
{
}
//=======================================================================
//function : SetKindOfClosed
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfo::SetKindOfClosed(const GEOMAlgo_KindOfClosed aT)
+ void GEOMAlgo_ShapeInfo::SetKindOfClosed(const GEOMAlgo_KindOfClosed aT)
{
myKindOfClosed=aT;
}
//=======================================================================
//function : KindOfClosed
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_KindOfClosed GEOMAlgo_ShapeInfo::KindOfClosed() const
{
}
//=======================================================================
//function : SetLocation
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfo::SetLocation(const gp_Pnt& aP)
+ void GEOMAlgo_ShapeInfo::SetLocation(const gp_Pnt& aP)
{
myLocation=aP;
}
//=======================================================================
//function : Location
-//purpose :
+//purpose :
//=======================================================================
const gp_Pnt& GEOMAlgo_ShapeInfo::Location() const
{
}
//=======================================================================
//function : SetDirection
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfo::SetDirection(const gp_Dir& aD)
+ void GEOMAlgo_ShapeInfo::SetDirection(const gp_Dir& aD)
{
myDirection=aD;
}
//=======================================================================
//function : Direction
-//purpose :
+//purpose :
//=======================================================================
const gp_Dir& GEOMAlgo_ShapeInfo::Direction() const
{
}
//=======================================================================
//function : SetPosition
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfo::SetPosition(const gp_Ax2& aAx2)
+ void GEOMAlgo_ShapeInfo::SetPosition(const gp_Ax2& aAx2)
{
gp_Ax3 aAx3(aAx2);
SetPosition(aAx3);
}
//=======================================================================
//function : SetPosition
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfo::SetPosition(const gp_Ax3& aAx3)
+ void GEOMAlgo_ShapeInfo::SetPosition(const gp_Ax3& aAx3)
{
myPosition=aAx3;
}
//=======================================================================
//function : Position
-//purpose :
+//purpose :
//=======================================================================
const gp_Ax3& GEOMAlgo_ShapeInfo::Position() const
{
//=======================================================================
//function : SetPnt1
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfo::SetPnt1(const gp_Pnt& aP)
+ void GEOMAlgo_ShapeInfo::SetPnt1(const gp_Pnt& aP)
{
myPnt1=aP;
}
//=======================================================================
//function : Pnt1
-//purpose :
+//purpose :
//=======================================================================
const gp_Pnt& GEOMAlgo_ShapeInfo::Pnt1() const
{
}
//=======================================================================
//function : SetPnt2
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfo::SetPnt2(const gp_Pnt& aP)
+ void GEOMAlgo_ShapeInfo::SetPnt2(const gp_Pnt& aP)
{
myPnt2=aP;
}
//=======================================================================
//function : Pnt2
-//purpose :
+//purpose :
//=======================================================================
const gp_Pnt& GEOMAlgo_ShapeInfo::Pnt2() const
{
}
//=======================================================================
//function : SetRadius1
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfo::SetRadius1(const Standard_Real aR)
+ void GEOMAlgo_ShapeInfo::SetRadius1(const Standard_Real aR)
{
myRadius1=aR;
}
//=======================================================================
//function : Radius1
-//purpose :
+//purpose :
//=======================================================================
Standard_Real GEOMAlgo_ShapeInfo::Radius1() const
{
}
//=======================================================================
//function : SetRadius2
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfo::SetRadius2(const Standard_Real aR)
+ void GEOMAlgo_ShapeInfo::SetRadius2(const Standard_Real aR)
{
myRadius2=aR;
}
//=======================================================================
//function : Radius2
-//purpose :
+//purpose :
//=======================================================================
Standard_Real GEOMAlgo_ShapeInfo::Radius2() const
{
}
//=======================================================================
//function : SetLength
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfo::SetLength(const Standard_Real aL)
+ void GEOMAlgo_ShapeInfo::SetLength(const Standard_Real aL)
{
myLength=aL;
}
//=======================================================================
//function : Length
-//purpose :
+//purpose :
//=======================================================================
Standard_Real GEOMAlgo_ShapeInfo::Length() const
{
}
//=======================================================================
//function : SetWidth
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfo::SetWidth(const Standard_Real aW)
+ void GEOMAlgo_ShapeInfo::SetWidth(const Standard_Real aW)
{
myWidth=aW;
}
//=======================================================================
//function : Width
-//purpose :
+//purpose :
//=======================================================================
Standard_Real GEOMAlgo_ShapeInfo::Width() const
{
}
//=======================================================================
//function : SetHeight
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfo::SetHeight(const Standard_Real aH)
+ void GEOMAlgo_ShapeInfo::SetHeight(const Standard_Real aH)
{
myHeight=aH;
}
//=======================================================================
//function : Height
-//purpose :
+//purpose :
//=======================================================================
Standard_Real GEOMAlgo_ShapeInfo::Height() const
{
}
//=======================================================================
//function : TypeToInteger
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
{
}
//=======================================================================
//function : Dump
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeInfo::Dump()const
{
}
//=======================================================================
//function : DumpCompound
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeInfo::DumpCompound()const
{
}
//=======================================================================
//function : DumpCompSolid
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeInfo::DumpCompSolid()const
{
//=======================================================================
//function : DumpSolid
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeInfo::DumpSolid()const
{
}
else if (aKN==GEOMAlgo_KN_BOX) {
DumpLocation (myLocation);
- DumpPosition (myPosition);
+ DumpPosition (myPosition);
printf(" Length : %.3lf\n", myLength);
printf(" Width : %.3lf\n", myWidth);
printf(" Height : %.3lf\n", myHeight);
//=======================================================================
//function : DumpFace
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeInfo::DumpFace()const
{
printf(" Radius1 : %.3lf\n", myRadius1);
printf(" Radius2 : %.3lf\n", myRadius2);
}
-
+
printf("\n");
}
//=======================================================================
//function : DumpShell
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeInfo::DumpShell()const
{
}
//=======================================================================
//function : DumpWire
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeInfo::DumpWire()const
{
}
//=======================================================================
//function : DumpEdge
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeInfo::DumpEdge()const
{
printf(" Pnt1 : %.3lf %.3lf %.3lf\n", aX, aY, aZ);
myPnt2.Coord(aX, aY, aZ);
printf(" Pnt2 : %.3lf %.3lf %.3lf\n", aX, aY, aZ);
-
+
}
else if (aKN==GEOMAlgo_KN_CIRCLE) {
DumpLocation (myLocation);
}
//=======================================================================
//function : DumpVertex
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeInfo::DumpVertex()const
{
}
//=======================================================================
//function : DumpLocation
-//purpose :
+//purpose :
//=======================================================================
void DumpLocation(const gp_Pnt& aP)
{
}
//=======================================================================
//function : DumpDirection
-//purpose :
+//purpose :
//=======================================================================
void DumpDirection(const gp_Dir& aD)
{
}
//=======================================================================
//function : DumpPosition
-//purpose :
+//purpose :
//=======================================================================
-void DumpPosition(const gp_Ax3& aAx3)
+void DumpPosition(const gp_Ax3& aAx3)
{
const gp_Dir& aDZ=aAx3.Axis().Direction();
const gp_Dir& aDX=aAx3.XDirection();
printf(" Axis: %.3lf %.3lf %.3lf \n", aDZ.X(), aDZ.Y(), aDZ.Z());
printf(" X : %.3lf %.3lf %.3lf \n", aDX.X(), aDX.Y(), aDX.Z());
printf(" Y : %.3lf %.3lf %.3lf \n", aDY.X(), aDY.Y(), aDY.Z());
-}
+}
//=======================================================================
//function : DumpKindOfBounds
-//purpose :
+//purpose :
//=======================================================================
void DumpKindOfBounds(const GEOMAlgo_KindOfBounds aKB)
{
const char *pStr[]={
- "KB_UNKNOWN",
- "KB_TRIMMED",
+ "KB_UNKNOWN",
+ "KB_TRIMMED",
"KB_INFINITE"
};
int i;
//
i=(Standard_Integer)aKB;
printf(" KindOfBounds: %s\n", pStr[i]);
-
+
}
//=======================================================================
//function : DumpKindOfClosed
-//purpose :
+//purpose :
//=======================================================================
void DumpKindOfClosed(const GEOMAlgo_KindOfClosed aKC)
{
const char *pStr[]={
- "KC_UNKNOWN",
- "KC_CLOSED",
+ "KC_UNKNOWN",
+ "KC_CLOSED",
"KC_NOTCLOSED"
};
int i;
//
i=(Standard_Integer)aKC;
printf(" KindOfClosed: %s\n", pStr[i]);
-
+
}
//=======================================================================
//function : DumpKindOfShape
-//purpose :
+//purpose :
//=======================================================================
void DumpKindOfShape(const GEOMAlgo_KindOfShape aKS)
{
const char *pStr[]={
- "KS_UNKNOWN",
+ "KS_UNKNOWN",
"KS_SPHERE",
"KS_CYLINDER",
"KS_BOX",
"KS_CONE",
"KS_ELLIPSE",
"KS_PLANE",
- "KS_CIRCLE",
- "KS_LINE",
- "KS_DEGENERATED"
+ "KS_CIRCLE",
+ "KS_LINE",
+ "KS_DEGENERATED"
};
int i;
//
}
//=======================================================================
//function : DumpKindOfName
-//purpose :
+//purpose :
//=======================================================================
void DumpKindOfName(const GEOMAlgo_KindOfName aKS)
{
const char *pStr[]={
- "KN_UNKNOWN",
+ "KN_UNKNOWN",
"KN_SPHERE",
"KN_CYLINDER",
"KN_TORUS",
"KN_ELLIPSE",
"KN_CIRCLE",
"KN_PLANE",
- "KN_LINE",
- "KN_BOX",
- "KN_SEGMENT",
- "KN_ARCCIRCLE",
- "KN_POLYGON",
+ "KN_LINE",
+ "KN_BOX",
+ "KN_SEGMENT",
+ "KN_ARCCIRCLE",
+ "KN_POLYGON",
"KN_POLYHEDRON",
"KN_DISKCIRCLE",
"KN_DISKELLIPSE",
"KN_RECTANGLE",
"KN_TRIANGLE",
- "KN_QUADRANGLE",
- "KN_ARCELLIPSE"
+ "KN_QUADRANGLE",
+ "KN_ARCELLIPSE"
};
int i;
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _GEOMAlgo_ShapeInfo_HeaderFile
#define _GEOMAlgo_ShapeInfo_HeaderFile
-#ifndef _TopAbs_ShapeEnum_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <TopAbs_ShapeEnum.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
-#endif
-#ifndef _GEOMAlgo_KindOfShape_HeaderFile
#include <GEOMAlgo_KindOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_KindOfName_HeaderFile
#include <GEOMAlgo_KindOfName.hxx>
-#endif
-#ifndef _GEOMAlgo_KindOfBounds_HeaderFile
#include <GEOMAlgo_KindOfBounds.hxx>
-#endif
-#ifndef _GEOMAlgo_KindOfClosed_HeaderFile
#include <GEOMAlgo_KindOfClosed.hxx>
-#endif
-#ifndef _gp_Pnt_HeaderFile
#include <gp_Pnt.hxx>
-#endif
-#ifndef _gp_Dir_HeaderFile
#include <gp_Dir.hxx>
-#endif
-#ifndef _gp_Ax3_HeaderFile
#include <gp_Ax3.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
-#endif
-class gp_Pnt;
-class gp_Dir;
-class gp_Ax2;
-class gp_Ax3;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_ShapeInfo {
-
-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_ShapeInfo();
-Standard_EXPORT virtual ~GEOMAlgo_ShapeInfo();
-
-
-Standard_EXPORT void Reset() ;
-
-
-Standard_EXPORT void SetType(const TopAbs_ShapeEnum aType) ;
-
-
-Standard_EXPORT TopAbs_ShapeEnum Type() const;
-
-
-Standard_EXPORT void SetNbSubShapes(const TopAbs_ShapeEnum aType,const Standard_Integer aNb) ;
-
-
-Standard_EXPORT Standard_Integer NbSubShapes(const TopAbs_ShapeEnum aType) const;
-
-
-Standard_EXPORT void SetKindOfShape(const GEOMAlgo_KindOfShape aT) ;
-
-
-Standard_EXPORT GEOMAlgo_KindOfShape KindOfShape() const;
-
-
-Standard_EXPORT void SetKindOfName(const GEOMAlgo_KindOfName aT) ;
-
-
-Standard_EXPORT GEOMAlgo_KindOfName KindOfName() const;
+#include <gp_Ax2.hxx>
-Standard_EXPORT void SetKindOfBounds(const GEOMAlgo_KindOfBounds aT) ;
+//=======================================================================
+//class : GEOMAlgo_ShapeInfo
+//purpose :
+//=======================================================================
+class GEOMAlgo_ShapeInfo
+{
+ public:
+ Standard_EXPORT
+ GEOMAlgo_ShapeInfo();
-Standard_EXPORT GEOMAlgo_KindOfBounds KindOfBounds() const;
+ Standard_EXPORT
+ virtual ~GEOMAlgo_ShapeInfo();
+ Standard_EXPORT
+ void Reset() ;
-Standard_EXPORT void SetKindOfClosed(const GEOMAlgo_KindOfClosed aT) ;
+ Standard_EXPORT
+ void SetType(const TopAbs_ShapeEnum aType) ;
+ Standard_EXPORT
+ TopAbs_ShapeEnum Type() const;
-Standard_EXPORT GEOMAlgo_KindOfClosed KindOfClosed() const;
+ Standard_EXPORT
+ void SetNbSubShapes(const TopAbs_ShapeEnum aType,const Standard_Integer aNb) ;
+ Standard_EXPORT
+ Standard_Integer NbSubShapes(const TopAbs_ShapeEnum aType) const;
-Standard_EXPORT void SetLocation(const gp_Pnt& aP) ;
+ Standard_EXPORT
+ void SetKindOfShape(const GEOMAlgo_KindOfShape aT) ;
+ Standard_EXPORT
+ GEOMAlgo_KindOfShape KindOfShape() const;
-Standard_EXPORT const gp_Pnt& Location() const;
+ Standard_EXPORT
+ void SetKindOfName(const GEOMAlgo_KindOfName aT) ;
+ Standard_EXPORT
+ GEOMAlgo_KindOfName KindOfName() const;
-Standard_EXPORT void SetDirection(const gp_Dir& aD) ;
+ Standard_EXPORT
+ void SetKindOfBounds(const GEOMAlgo_KindOfBounds aT) ;
+ Standard_EXPORT
+ GEOMAlgo_KindOfBounds KindOfBounds() const;
-Standard_EXPORT const gp_Dir& Direction() const;
+ Standard_EXPORT
+ void SetKindOfClosed(const GEOMAlgo_KindOfClosed aT) ;
+ Standard_EXPORT
+ GEOMAlgo_KindOfClosed KindOfClosed() const;
-Standard_EXPORT void SetPosition(const gp_Ax2& aAx2) ;
+ Standard_EXPORT
+ void SetLocation(const gp_Pnt& aP) ;
+ Standard_EXPORT
+ const gp_Pnt& Location() const;
-Standard_EXPORT void SetPosition(const gp_Ax3& aAx3) ;
+ Standard_EXPORT
+ void SetDirection(const gp_Dir& aD) ;
+ Standard_EXPORT
+ const gp_Dir& Direction() const;
-Standard_EXPORT const gp_Ax3& Position() const;
+ Standard_EXPORT
+ void SetPosition(const gp_Ax2& aAx2) ;
+ Standard_EXPORT
+ void SetPosition(const gp_Ax3& aAx3) ;
-Standard_EXPORT void SetPnt1(const gp_Pnt& aP) ;
+ Standard_EXPORT
+ const gp_Ax3& Position() const;
+ Standard_EXPORT
+ void SetPnt1(const gp_Pnt& aP) ;
-Standard_EXPORT const gp_Pnt& Pnt1() const;
+ Standard_EXPORT
+ const gp_Pnt& Pnt1() const;
+ Standard_EXPORT
+ void SetPnt2(const gp_Pnt& aP) ;
-Standard_EXPORT void SetPnt2(const gp_Pnt& aP) ;
+ Standard_EXPORT
+ const gp_Pnt& Pnt2() const;
+ Standard_EXPORT
+ void SetRadius1(const Standard_Real aR) ;
-Standard_EXPORT const gp_Pnt& Pnt2() const;
+ Standard_EXPORT
+ Standard_Real Radius1() const;
+ Standard_EXPORT
+ void SetRadius2(const Standard_Real aR) ;
-Standard_EXPORT void SetRadius1(const Standard_Real aR) ;
+ Standard_EXPORT
+ Standard_Real Radius2() const;
+ Standard_EXPORT
+ void SetLength(const Standard_Real aL) ;
-Standard_EXPORT Standard_Real Radius1() const;
+ Standard_EXPORT
+ Standard_Real Length() const;
+ Standard_EXPORT
+ void SetWidth(const Standard_Real aW) ;
-Standard_EXPORT void SetRadius2(const Standard_Real aR) ;
+ Standard_EXPORT
+ Standard_Real Width() const;
+ Standard_EXPORT
+ void SetHeight(const Standard_Real aH) ;
-Standard_EXPORT Standard_Real Radius2() const;
+ Standard_EXPORT
+ Standard_Real Height() const;
+ Standard_EXPORT
+ void Dump() const;
-Standard_EXPORT void SetLength(const Standard_Real aL) ;
+ protected:
+ Standard_EXPORT
+ void DumpVertex() const;
+ Standard_EXPORT
+ void DumpEdge() const;
-Standard_EXPORT Standard_Real Length() const;
+ Standard_EXPORT
+ void DumpWire() const;
+ Standard_EXPORT
+ void DumpFace() const;
-Standard_EXPORT void SetWidth(const Standard_Real aW) ;
+ Standard_EXPORT
+ void DumpShell() const;
+ Standard_EXPORT
+ void DumpSolid() const;
-Standard_EXPORT Standard_Real Width() const;
+ Standard_EXPORT
+ void DumpCompSolid() const;
-
-Standard_EXPORT void SetHeight(const Standard_Real aH) ;
-
-
-Standard_EXPORT Standard_Real Height() const;
-
-
-Standard_EXPORT void Dump() const;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
-Standard_EXPORT void DumpVertex() const;
-
-
-Standard_EXPORT void DumpEdge() const;
-
-
-Standard_EXPORT void DumpWire() const;
-
-
-Standard_EXPORT void DumpFace() const;
-
-
-Standard_EXPORT void DumpShell() const;
-
-
-Standard_EXPORT void DumpSolid() const;
-
-
-Standard_EXPORT void DumpCompSolid() const;
-
-
-Standard_EXPORT void DumpCompound() const;
-
-
- // Fields PROTECTED
- //
-TopAbs_ShapeEnum myType;
-Standard_Integer myNbSubShapes[9];
-GEOMAlgo_KindOfShape myKindOfShape;
-GEOMAlgo_KindOfName myKindOfName;
-GEOMAlgo_KindOfBounds myKindOfBounds;
-GEOMAlgo_KindOfClosed myKindOfClosed;
-gp_Pnt myLocation;
-gp_Dir myDirection;
-gp_Ax3 myPosition;
-Standard_Real myRadius1;
-Standard_Real myRadius2;
-Standard_Real myLength;
-Standard_Real myWidth;
-Standard_Real myHeight;
-gp_Pnt myPnt1;
-gp_Pnt myPnt2;
-Standard_Integer myNbTypes;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
+ Standard_EXPORT
+ void DumpCompound() const;
+ TopAbs_ShapeEnum myType;
+ Standard_Integer myNbSubShapes[9];
+ GEOMAlgo_KindOfShape myKindOfShape;
+ GEOMAlgo_KindOfName myKindOfName;
+ GEOMAlgo_KindOfBounds myKindOfBounds;
+ GEOMAlgo_KindOfClosed myKindOfClosed;
+ gp_Pnt myLocation;
+ gp_Dir myDirection;
+ gp_Ax3 myPosition;
+ Standard_Real myRadius1;
+ Standard_Real myRadius2;
+ Standard_Real myLength;
+ Standard_Real myWidth;
+ Standard_Real myHeight;
+ gp_Pnt myPnt1;
+ gp_Pnt myPnt2;
+ Standard_Integer myNbTypes;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_ShapeInfo.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 _gp_Dir_HeaderFile
-#include <gp_Dir.hxx>
-#endif
-#ifndef _gp_Ax2_HeaderFile
-#include <gp_Ax2.hxx>
-#endif
-#ifndef _gp_Ax3_HeaderFile
-#include <gp_Ax3.hxx>
-#endif
-#ifndef _GEOMAlgo_ShapeInfo_HeaderFile
-#include <GEOMAlgo_ShapeInfo.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- 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_ShapeInfoFiller.cdl
--- Created: Mon Apr 2 15:05:34 2007
--- Author: Peter KURNEV
---
-class ShapeInfoFiller from GEOMAlgo
- inherits Algo from GEOMAlgo
-
- ---Purpose:
-
-uses
- Pln from gp,
- Sphere from gp,
- Cylinder from gp,
- Cone from gp,
- Torus from gp,
-
- Shape from TopoDS,
- Face from TopoDS,
- Solid from TopoDS,
-
- ShapeInfo from GEOMAlgo,
- KindOfName from GEOMAlgo,
- IndexedDataMapOfShapeShapeInfo from GEOMAlgo
-
---raises
-
-is
-
- Create
- returns ShapeInfoFiller from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ShapeInfoFiller();"
-
- SetShape(me:out;
- aS:Shape from TopoDS);
-
- Shape(me)
- returns Shape from TopoDS;
- ---C++:return const &
-
- SetTolerance(me:out;
- aT:Real from Standard);
-
- Tolerance(me)
- returns Real from Standard;
-
- Info(me)
- returns ShapeInfo from GEOMAlgo;
- ---C++:return const &
-
- Info(me;
- aS:Shape from TopoDS)
- returns ShapeInfo from GEOMAlgo;
- ---C++:return const &
-
- Perform(me:out)
- is redefined;
-
- CheckData(me:out)
- is redefined protected;
-
- FillNbSubShapes(me:out;
- aS:Shape from TopoDS;
- aInfo: out ShapeInfo from GEOMAlgo)
- is protected;
-
- FillSubShapes(me:out;
- aS:Shape from TopoDS)
- is protected;
-
- FillShape(me:out;
- aS:Shape from TopoDS)
- is protected;
-
- FillVertex(me:out;
- aS:Shape from TopoDS)
- is protected;
-
- FillEdge(me:out;
- aS:Shape from TopoDS)
- is protected;
-
- FillFace(me:out;
- aS:Shape from TopoDS)
- is protected;
-
- FillSolid(me:out;
- aS:Shape from TopoDS)
- is protected;
-
- FillContainer(me:out;
- aS:Shape from TopoDS)
- is protected;
-
-
- FillDetails(me:out;
- aF:Face from TopoDS;
- aPln:Pln from gp)
- is protected;
-
- FillDetails(me:out;
- aF:Face from TopoDS;
- aSph:Sphere from gp)
- is protected;
-
- FillDetails(me:out;
- aF:Face from TopoDS;
- aCyl:Cylinder from gp)
- is protected;
-
- FillDetails(me:out;
- aF:Face from TopoDS;
- aCone:Cone from gp)
- is protected;
-
- FillDetails(me:out;
- aF:Face from TopoDS;
- aTorus:Torus from gp)
- is protected;
-
- FillDetails(me:out;
- aS:Solid from TopoDS)
- is protected;
-
-fields
- myShape : Shape from TopoDS is protected;
- myEmptyInfo : ShapeInfo from GEOMAlgo is protected;
- myMapInfo : IndexedDataMapOfShapeShapeInfo from GEOMAlgo is protected;
- myTolerance : Real from Standard is protected;
-end ShapeInfoFiller;
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#include <GEOMAlgo_ShapeInfoFiller.ixx>
+#include <GEOMAlgo_ShapeInfoFiller.hxx>
#include <Precision.hxx>
-static
+static
Standard_Boolean IsAllowedType(const GeomAbs_CurveType aCT);
static
Standard_Boolean IsAllowedType(const GeomAbs_SurfaceType aST);
Standard_Integer NbShells(const TopoDS_Solid& aS);
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
GEOMAlgo_ShapeInfoFiller::GEOMAlgo_ShapeInfoFiller()
:
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_ShapeInfoFiller::~GEOMAlgo_ShapeInfoFiller()
{
}
//=======================================================================
//function : SetTolerance
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeInfoFiller::SetTolerance(const Standard_Real aT)
{
}
//=======================================================================
//function : Tolerance
-//purpose :
+//purpose :
//=======================================================================
Standard_Real GEOMAlgo_ShapeInfoFiller::Tolerance()const
{
}
//=======================================================================
//function : SetShape
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::SetShape(const TopoDS_Shape& aS)
+ void GEOMAlgo_ShapeInfoFiller::SetShape(const TopoDS_Shape& aS)
{
myShape=aS;
}
//=======================================================================
//function : Shape
-//purpose :
+//purpose :
//=======================================================================
const TopoDS_Shape& GEOMAlgo_ShapeInfoFiller::Shape() const
{
}
//=======================================================================
//function : Info
-//purpose :
+//purpose :
//=======================================================================
const GEOMAlgo_ShapeInfo& GEOMAlgo_ShapeInfoFiller::Info() const
{
- return Info(myShape);
+ return Info(myShape);
}
//=======================================================================
//function : Info
-//purpose :
+//purpose :
//=======================================================================
const GEOMAlgo_ShapeInfo& GEOMAlgo_ShapeInfoFiller::Info(const TopoDS_Shape& aS) const
{
return aInfo;
}
}
- return myEmptyInfo;
+ return myEmptyInfo;
}
//=======================================================================
//function : CheckData
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeInfoFiller::CheckData()
{
}
//=======================================================================
//function : Perform
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::Perform()
+ void GEOMAlgo_ShapeInfoFiller::Perform()
{
myErrorStatus=0;
//
FillShape(myShape);
}
//=======================================================================
-//function :FillShape
-//purpose :
+//function :FillShape
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeInfoFiller::FillShape(const TopoDS_Shape& aS)
{
case TopAbs_VERTEX:
FillVertex(aS);
break;
- //
+ //
case TopAbs_EDGE:
FillEdge(aS);
break;
case TopAbs_COMPOUND:
FillContainer(aS);
break;
- //
+ //
default:
break;
}
}
//=======================================================================
-//function :FillSubShapes
-//purpose :
+//function :FillSubShapes
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeInfoFiller::FillSubShapes(const TopoDS_Shape& aS)
{
}
//=======================================================================
//function : FillContainer
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillContainer(const TopoDS_Shape& aS)
+ void GEOMAlgo_ShapeInfoFiller::FillContainer(const TopoDS_Shape& aS)
{
myErrorStatus=0;
//
}
//=======================================================================
//function : FillSolid
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillSolid(const TopoDS_Shape& aS)
+ void GEOMAlgo_ShapeInfoFiller::FillSolid(const TopoDS_Shape& aS)
{
Standard_Integer aNbShells;
TopoDS_Solid aSd;
FillDetails(aSd);
}
//=======================================================================
-//function :FillFace
-//purpose :
+//function :FillFace
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillFace(const TopoDS_Shape& aS)
+ void GEOMAlgo_ShapeInfoFiller::FillFace(const TopoDS_Shape& aS)
{
myErrorStatus=0;
//
Standard_Boolean bIsAllowedType;
- Standard_Integer aNbWires;//, iRet
+ Standard_Integer aNbWires;//, iRet
Standard_Boolean bInf, bInfU1, bInfU2, bInfV1, bInfV2;
Standard_Real aUMin, aUMax, aVMin, aVMax, aR1, aR2;
- gp_Pnt aP0;
+ gp_Pnt aP0;
gp_Dir aDN;
gp_Ax3 aAx3;
GeomAbs_SurfaceType aST;
//
FillDetails(aF, aSphere);
}// else if (aST==GeomAbs_Sphere) {
- //
+ //
// 3. Cylinder
else if (aST==GeomAbs_Cylinder) {
gp_Cylinder aCyl;
}
FillDetails(aF, aCyl);
}
- //
+ //
// 4. Cone
else if (aST==GeomAbs_Cone) {
gp_Cone aCone;
}
FillDetails(aF, aCone);
}
- //
+ //
// 5. Torus
else if (aST==GeomAbs_Torus) {
gp_Torus aTorus;
}
}
//=======================================================================
-//function :FillEdge
-//purpose :
+//function :FillEdge
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillEdge(const TopoDS_Shape& aS)
+ void GEOMAlgo_ShapeInfoFiller::FillEdge(const TopoDS_Shape& aS)
{
myErrorStatus=0;
//
aInfo.SetKindOfName(GEOMAlgo_KN_ARCCIRCLE);
//
gp_Vec aVecX(aP, aP1);
- gp_Dir aDirX(aVecX);
+ gp_Dir aDirX(aVecX);
gp_Ax2 aAx2new(aP, aAx2.Direction(), aDirX);
aInfo.SetPosition(aAx2new);
}
aInfo.SetKindOfName(GEOMAlgo_KN_ARCELLIPSE);
//
gp_Vec aVecX(aP, aP1);
- gp_Dir aDirX(aVecX);
+ gp_Dir aDirX(aVecX);
gp_Ax2 aAx2new(aP, aAx2.Direction(), aDirX);
aInfo.SetPosition(aAx2new);
}
FillSubShapes(aS);
}
//=======================================================================
-//function :FillVertex
-//purpose :
+//function :FillVertex
+//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillVertex(const TopoDS_Shape& aS)
+ void GEOMAlgo_ShapeInfoFiller::FillVertex(const TopoDS_Shape& aS)
{
myErrorStatus=0;
//
}
//=======================================================================
//function : FillNbSubshapes
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeInfoFiller::FillNbSubShapes(const TopoDS_Shape& aS,
GEOMAlgo_ShapeInfo& aInfo)
//
Standard_Integer i, aNb, aNbS;
TopTools_IndexedMapOfShape aM;
- TopAbs_ShapeEnum aST;
+ TopAbs_ShapeEnum aST;
TopAbs_ShapeEnum aTypes[]= {
//TopAbs_FACE, TopAbs_EDGE, TopAbs_VERTEX
TopAbs_COMPOUND,
TopAbs_EDGE,
TopAbs_VERTEX
};
-
+
//
aST=aS.ShapeType();
aNb=sizeof(aTypes)/sizeof(aTypes[0]);
}
}
//=======================================================================
-//function :NbShells
-//purpose :
+//function :NbShells
+//purpose :
//=======================================================================
Standard_Integer NbShells(const TopoDS_Solid& aSd)
{
}
//=======================================================================
//function : NbWires
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer NbWires(const TopoDS_Face& aF)
{
}
//=======================================================================
//function : IsAllowedType
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean IsAllowedType(const GeomAbs_CurveType aCT)
{
}
//=======================================================================
//function : IsAllowedType
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean IsAllowedType(const GeomAbs_SurfaceType aST)
{
Standard_Boolean bRet;
Standard_Integer i, aNb;
GeomAbs_SurfaceType aTypes[]={
- GeomAbs_Plane, GeomAbs_Cylinder,
+ GeomAbs_Plane, GeomAbs_Cylinder,
GeomAbs_Cone, GeomAbs_Sphere,
GeomAbs_Torus
};
}
//
// myErrorStatus
-//
+//
// 0 - Ok
// 1 - The object is just initialized
//
-// 10 - Null shape
+// 10 - Null shape
// 11 - circle/ellipse edge without vertices
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
#ifndef _GEOMAlgo_ShapeInfoFiller_HeaderFile
#define _GEOMAlgo_ShapeInfoFiller_HeaderFile
-#ifndef _TopoDS_Shape_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _GEOMAlgo_ShapeInfo_HeaderFile
#include <GEOMAlgo_ShapeInfo.hxx>
-#endif
-#ifndef _GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile
#include <GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
-#endif
-#ifndef _GEOMAlgo_Algo_HeaderFile
#include <GEOMAlgo_Algo.hxx>
-#endif
-class TopoDS_Shape;
-class GEOMAlgo_ShapeInfo;
-class TopoDS_Face;
-class gp_Pln;
-class gp_Sphere;
-class gp_Cylinder;
-class gp_Cone;
-class gp_Torus;
-class TopoDS_Solid;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_ShapeInfoFiller : public GEOMAlgo_Algo {
-
-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_ShapeInfoFiller();
-Standard_EXPORT virtual ~GEOMAlgo_ShapeInfoFiller();
-
-
-Standard_EXPORT void SetShape(const TopoDS_Shape& aS) ;
-
-
-Standard_EXPORT const TopoDS_Shape& Shape() const;
-
-
-Standard_EXPORT void SetTolerance(const Standard_Real aT) ;
-
-
-Standard_EXPORT Standard_Real Tolerance() const;
-
-
-Standard_EXPORT const GEOMAlgo_ShapeInfo& Info() const;
-
-
-Standard_EXPORT const GEOMAlgo_ShapeInfo& Info(const TopoDS_Shape& aS) const;
+#include <TopoDS_Face.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Sphere.hxx>
+#include <gp_Cylinder.hxx>
+#include <gp_Cone.hxx>
+#include <gp_Torus.hxx>
+#include <TopoDS_Solid.hxx>
+//=======================================================================
+//class : GEOMAlgo_ShapeInfoFiller
+//purpose :
+//=======================================================================
+class GEOMAlgo_ShapeInfoFiller : public GEOMAlgo_Algo
+{
+ public:
+ Standard_EXPORT
+ GEOMAlgo_ShapeInfoFiller();
-Standard_EXPORT virtual void Perform() ;
+ Standard_EXPORT
+ virtual ~GEOMAlgo_ShapeInfoFiller();
+ Standard_EXPORT
+ void SetShape(const TopoDS_Shape& aS) ;
+ Standard_EXPORT
+ const TopoDS_Shape& Shape() const;
+ Standard_EXPORT
+ void SetTolerance(const Standard_Real aT) ;
+ Standard_EXPORT
+ Standard_Real Tolerance() const;
-protected:
+ Standard_EXPORT
+ const GEOMAlgo_ShapeInfo& Info() const;
- // Methods PROTECTED
- //
+ Standard_EXPORT
+ const GEOMAlgo_ShapeInfo& Info(const TopoDS_Shape& aS) const;
+ Standard_EXPORT
+ virtual void Perform() ;
-Standard_EXPORT virtual void CheckData() ;
+ protected:
+ Standard_EXPORT
+ virtual void CheckData() ;
+ Standard_EXPORT
+ void FillNbSubShapes(const TopoDS_Shape& aS,GEOMAlgo_ShapeInfo& aInfo) ;
-Standard_EXPORT void FillNbSubShapes(const TopoDS_Shape& aS,GEOMAlgo_ShapeInfo& aInfo) ;
+ Standard_EXPORT
+ void FillSubShapes(const TopoDS_Shape& aS) ;
+ Standard_EXPORT
+ void FillShape(const TopoDS_Shape& aS) ;
-Standard_EXPORT void FillSubShapes(const TopoDS_Shape& aS) ;
+ Standard_EXPORT
+ void FillVertex(const TopoDS_Shape& aS) ;
+ Standard_EXPORT
+ void FillEdge(const TopoDS_Shape& aS) ;
-Standard_EXPORT void FillShape(const TopoDS_Shape& aS) ;
+ Standard_EXPORT
+ void FillFace(const TopoDS_Shape& aS) ;
+ Standard_EXPORT
+ void FillSolid(const TopoDS_Shape& aS) ;
-Standard_EXPORT void FillVertex(const TopoDS_Shape& aS) ;
+ Standard_EXPORT
+ void FillContainer(const TopoDS_Shape& aS) ;
+ Standard_EXPORT
+ void FillDetails(const TopoDS_Face& aF,const gp_Pln& aPln) ;
-Standard_EXPORT void FillEdge(const TopoDS_Shape& aS) ;
+ Standard_EXPORT
+ void FillDetails(const TopoDS_Face& aF,const gp_Sphere& aSph) ;
+ Standard_EXPORT
+ void FillDetails(const TopoDS_Face& aF,const gp_Cylinder& aCyl) ;
-Standard_EXPORT void FillFace(const TopoDS_Shape& aS) ;
+ Standard_EXPORT
+ void FillDetails(const TopoDS_Face& aF,const gp_Cone& aCone) ;
+ Standard_EXPORT
+ void FillDetails(const TopoDS_Face& aF,const gp_Torus& aTorus) ;
-Standard_EXPORT void FillSolid(const TopoDS_Shape& aS) ;
-
-
-Standard_EXPORT void FillContainer(const TopoDS_Shape& aS) ;
-
-
-Standard_EXPORT void FillDetails(const TopoDS_Face& aF,const gp_Pln& aPln) ;
-
-
-Standard_EXPORT void FillDetails(const TopoDS_Face& aF,const gp_Sphere& aSph) ;
-
-
-Standard_EXPORT void FillDetails(const TopoDS_Face& aF,const gp_Cylinder& aCyl) ;
-
-
-Standard_EXPORT void FillDetails(const TopoDS_Face& aF,const gp_Cone& aCone) ;
-
-
-Standard_EXPORT void FillDetails(const TopoDS_Face& aF,const gp_Torus& aTorus) ;
-
-
-Standard_EXPORT void FillDetails(const TopoDS_Solid& aS) ;
-
-
- // Fields PROTECTED
- //
-TopoDS_Shape myShape;
-GEOMAlgo_ShapeInfo myEmptyInfo;
-GEOMAlgo_IndexedDataMapOfShapeShapeInfo myMapInfo;
-Standard_Real myTolerance;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
+ Standard_EXPORT
+ void FillDetails(const TopoDS_Solid& aS) ;
+ TopoDS_Shape myShape;
+ GEOMAlgo_ShapeInfo myEmptyInfo;
+ GEOMAlgo_IndexedDataMapOfShapeShapeInfo myMapInfo;
+ Standard_Real myTolerance;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_ShapeInfoFiller.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 _GEOMAlgo_ShapeInfo_HeaderFile
-#include <GEOMAlgo_ShapeInfo.hxx>
-#endif
-#ifndef _TopoDS_Face_HeaderFile
-#include <TopoDS_Face.hxx>
-#endif
-#ifndef _gp_Pln_HeaderFile
-#include <gp_Pln.hxx>
-#endif
-#ifndef _gp_Sphere_HeaderFile
-#include <gp_Sphere.hxx>
-#endif
-#ifndef _gp_Cylinder_HeaderFile
-#include <gp_Cylinder.hxx>
-#endif
-#ifndef _gp_Cone_HeaderFile
-#include <gp_Cone.hxx>
-#endif
-#ifndef _gp_Torus_HeaderFile
-#include <gp_Torus.hxx>
-#endif
-#ifndef _TopoDS_Solid_HeaderFile
-#include <TopoDS_Solid.hxx>
-#endif
-#ifndef _GEOMAlgo_ShapeInfoFiller_HeaderFile
-#include <GEOMAlgo_ShapeInfoFiller.hxx>
-#endif
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#include <GEOMAlgo_ShapeInfoFiller.ixx>
+#include <GEOMAlgo_ShapeInfoFiller.hxx>
#include <Precision.hxx>
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_ShapeSet.cdl
--- Created:
--- Author: Peter KURNEV
---
-class ShapeSet from GEOMAlgo
-
- ---Purpose: Implementation some formal
- -- opereations with Set of shapes
-
-uses
- Shape from TopoDS,
- MapOfOrientedShape from TopTools,
- ListOfShape from TopTools,
- ShapeEnum from TopAbs
-
---raises
-
-is
- Create
- ---Purpose: Empty constructor
- returns ShapeSet from GEOMAlgo;
-
- Add(me:out;
- theLS:ListOfShape from TopTools);
- ---Purpose: Adds shapes from the list theLS to the Set
-
- Add(me:out;
- theShape:Shape from TopoDS);
- ---Purpose: Adds shape theShape to the Set
-
- Add(me:out;
- theShape:Shape from TopoDS;
- theType :ShapeEnum from TopAbs);
- ---Purpose: Adds sub-shapes of shape theShape,
- -- that have type theType to the Set
-
- Subtract(me:out;
- theSet:ShapeSet from GEOMAlgo);
- ---Purpose: Removes shapes of theSet from the Set
-
- Clear(me:out);
- ---Purpose: Clears internal fields
-
- Contains(me;
- theSet:ShapeSet from GEOMAlgo)
- ---Purpose: Returns True if the Set contains
- -- all shapes of theSet
- returns Boolean from Standard;
-
- GetSet(me)
- ---Purpose: Returns the Set
- returns ListOfShape from TopTools;
- ---C++: return const &
- --modified by NIZNHY-PKV Wed Oct 28 13:51:45 2010f
- IsEqual(me;
- theOther: ShapeSet from GEOMAlgo)
- ---Purpose: Returns True if the Set==theSet
- returns Boolean from Standard;
- ---C++: alias operator ==
- --modified by NIZNHY-PKV Wed Oct 28 13:51:50 2010t
-
-fields
- myMap : MapOfOrientedShape from TopTools is protected;
- myList : ListOfShape from TopTools is protected;
-
-end ShapeSet;
//
// File: GEOMAlgo_ShapeSet.cxx
-// Created:
-// Author: Peter KURNEV
+// Created:
+// Author: Peter KURNEV
//
-#include <GEOMAlgo_ShapeSet.ixx>
+#include <GEOMAlgo_ShapeSet.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_MapIteratorOfMapOfOrientedShape.hxx>
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
GEOMAlgo_ShapeSet::GEOMAlgo_ShapeSet()
{
}
//=======================================================================
//function : Clear
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeSet::Clear()
{
}
//=======================================================================
//function : Add
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeSet::Add(const TopoDS_Shape& theShape)
{
}
//=======================================================================
//function : Add
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeSet::Add(const TopoDS_Shape& theShape,
const TopAbs_ShapeEnum theType)
}
//=======================================================================
//function : Add
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeSet::Add(const TopTools_ListOfShape& theLS)
{
}
}
//=======================================================================
-//function :GetSet
-//purpose :
+//function :GetSet
+//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_ShapeSet::GetSet()const
{
}
//=======================================================================
//function : Contains
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_ShapeSet::Contains(const GEOMAlgo_ShapeSet& theOther)const
{
}
//=======================================================================
//function : Subtract
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeSet::Subtract(const GEOMAlgo_ShapeSet& theOther)
{
//modified by NIZNHY-PKV Wed Oct 28 13:51:36 2010f
//=======================================================================
//function : IsEqual
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_ShapeSet::IsEqual(const GEOMAlgo_ShapeSet& theOther)const
{
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_ShapeSet.hxx
+// Created:
+// Author: Peter KURNEV
+//
#ifndef _GEOMAlgo_ShapeSet_HeaderFile
#define _GEOMAlgo_ShapeSet_HeaderFile
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
-#ifndef _TopTools_MapOfOrientedShape_HeaderFile
#include <TopTools_MapOfOrientedShape.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-class TopTools_ListOfShape;
-class TopoDS_Shape;
-
+#include <TopoDS_Shape.hxx>
//! Implementation some formal <br>
//! opereations with Set of shapes <br>
-class GEOMAlgo_ShapeSet {
-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);
- }
-
+//=======================================================================
+//class : GEOMAlgo_ShapeSet
+//purpose :
+//=======================================================================
+class GEOMAlgo_ShapeSet
+{
+ public:
//! Empty constructor <br>
- Standard_EXPORT GEOMAlgo_ShapeSet();
+ Standard_EXPORT
+ GEOMAlgo_ShapeSet();
+
//! Adds shapes from the list theLS to the Set <br>
- Standard_EXPORT void Add(const TopTools_ListOfShape& theLS) ;
+ Standard_EXPORT
+ void Add(const TopTools_ListOfShape& theLS) ;
+
//! Adds shape theShape to the Set <br>
- Standard_EXPORT void Add(const TopoDS_Shape& theShape) ;
+ Standard_EXPORT
+ void Add(const TopoDS_Shape& theShape) ;
+
//! Adds sub-shapes of shape theShape, <br>
-//! that have type theType to the Set <br>
- Standard_EXPORT void Add(const TopoDS_Shape& theShape,const TopAbs_ShapeEnum theType) ;
+ //! that have type theType to the Set <br>
+ Standard_EXPORT
+ void Add(const TopoDS_Shape& theShape,const TopAbs_ShapeEnum theType) ;
+
//! Removes shapes of theSet from the Set <br>
- Standard_EXPORT void Subtract(const GEOMAlgo_ShapeSet& theSet) ;
+ Standard_EXPORT
+ void Subtract(const GEOMAlgo_ShapeSet& theSet) ;
+
//! Clears internal fields <br>
Standard_EXPORT void Clear() ;
- //! Returns True if the Set contains <br>
-//! all shapes of theSet <br>
- Standard_EXPORT Standard_Boolean Contains(const GEOMAlgo_ShapeSet& theSet) const;
- //! Returns the Set <br>
- Standard_EXPORT const TopTools_ListOfShape& GetSet() const;
- //! Returns True if the Set==theSet <br>
- Standard_EXPORT Standard_Boolean IsEqual(const GEOMAlgo_ShapeSet& theOther) const;
- Standard_Boolean operator ==(const GEOMAlgo_ShapeSet& theOther) const
-{
- return IsEqual(theOther);
-}
-
-
-
-
-
-protected:
-
-
-
-TopTools_MapOfOrientedShape myMap;
-TopTools_ListOfShape myList;
-
-
-private:
+ //! Returns True if the Set contains <br>
+ //! all shapes of theSet <br>
+ Standard_EXPORT
+ Standard_Boolean Contains(const GEOMAlgo_ShapeSet& theSet) const;
+ //! Returns the Set <br>
+ Standard_EXPORT
+ const TopTools_ListOfShape& GetSet() const;
+ //! Returns True if the Set==theSet <br>
+ Standard_EXPORT
+ Standard_Boolean IsEqual(const GEOMAlgo_ShapeSet& theOther) const;
+ Standard_Boolean operator ==(const GEOMAlgo_ShapeSet& theOther) const {
+ return IsEqual(theOther);
+ }
+ protected:
+ TopTools_MapOfOrientedShape myMap;
+ TopTools_ListOfShape myList;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ShapeSet.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _GEOMAlgo_ShapeSet_HeaderFile
-#include <GEOMAlgo_ShapeSet.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_ShapeSolid.cdl
--- Created: Thu Jan 13 12:44:07 2005
--- Author: Peter KURNEV
---
-deferred class ShapeSolid from GEOMAlgo
- inherits Algo from GEOMAlgo
-
- ---Purpose:
-
-uses
- State from TopAbs,
- ListOfShape from TopTools,
- PDSFiller from BOPTools,
- DSFiller from BOPTools
---raises
-
-is
- Initialize
- returns ShapeSolid from GEOMAlgo;
-
-
- SetFiller(me:out;
- aDSF:DSFiller from BOPTools);
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ShapeSolid();"
-
-
- Shapes(me;
- aState:State from TopAbs)
- returns ListOfShape from TopTools;
- ---C++: return const &
-
- BuildResult (me:out)
- is deferred protected;
-
- Prepare(me:out)
- is deferred protected;
-
-fields
- myLSIN : ListOfShape from TopTools is protected;
- myLSOUT : ListOfShape from TopTools is protected;
- myLSON : ListOfShape from TopTools is protected;
- myRank : Integer from Standard is protected;
- myDSFiller : PDSFiller from BOPTools is protected;
-
-end ShapeSolid;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <GEOMAlgo_ShapeSolid.ixx>
+#include <GEOMAlgo_ShapeSolid.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
//=======================================================================
//function : GEOMAlgo_ShapeSolid
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_ShapeSolid::GEOMAlgo_ShapeSolid()
:
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_ShapeSolid::~GEOMAlgo_ShapeSolid()
{
}
//=======================================================================
//function : SetFiller
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_ShapeSolid::SetFiller(const BOPTools_DSFiller& aDSFiller)
{
}
//=======================================================================
// function: Shapes
-// purpose:
+// purpose:
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_ShapeSolid::Shapes(const TopAbs_State aState) const
{
break;
case TopAbs_ON:
pL=&myLSON;
- break;
+ break;
default:
pL=&myLSON;
- break;
+ break;
}
return *pL;
}
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_ShapeSolid.hxx
+// Created: Thu Jan 13 12:54:48 2005
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _GEOMAlgo_ShapeSolid_HeaderFile
#define _GEOMAlgo_ShapeSolid_HeaderFile
-#ifndef _TopTools_ListOfShape_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
-#endif
-#ifndef _BOPTools_PDSFiller_HeaderFile
#include <BOPTools_PDSFiller.hxx>
-#endif
-#ifndef _GEOMAlgo_Algo_HeaderFile
#include <GEOMAlgo_Algo.hxx>
-#endif
-#ifndef _TopAbs_State_HeaderFile
#include <TopAbs_State.hxx>
-#endif
-class BOPTools_DSFiller;
-class TopTools_ListOfShape;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_ShapeSolid : public GEOMAlgo_Algo {
-
-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 void SetFiller(const BOPTools_DSFiller& aDSF) ;
-Standard_EXPORT virtual ~GEOMAlgo_ShapeSolid();
-
-
-Standard_EXPORT const TopTools_ListOfShape& Shapes(const TopAbs_State aState) const;
-
+#include <BOPTools_DSFiller.hxx>
+//=======================================================================
+//function : GEOMAlgo_ShapeSolid
+//purpose :
+//=======================================================================
+class GEOMAlgo_ShapeSolid : public GEOMAlgo_Algo
+{
+ public:
+ Standard_EXPORT
+ void SetFiller(const BOPTools_DSFiller& aDSF) ;
+ Standard_EXPORT
+ virtual ~GEOMAlgo_ShapeSolid();
+ Standard_EXPORT
+ const TopTools_ListOfShape& Shapes(const TopAbs_State aState) const;
protected:
+ Standard_EXPORT
+ GEOMAlgo_ShapeSolid();
- // Methods PROTECTED
- //
-
-
-Standard_EXPORT GEOMAlgo_ShapeSolid();
-
-
-Standard_EXPORT virtual void BuildResult() = 0;
-
-
-Standard_EXPORT virtual void Prepare() = 0;
-
-
- // Fields PROTECTED
- //
-TopTools_ListOfShape myLSIN;
-TopTools_ListOfShape myLSOUT;
-TopTools_ListOfShape myLSON;
-Standard_Integer myRank;
-BOPTools_PDSFiller myDSFiller;
-
-
-private:
+ Standard_EXPORT
+ virtual void BuildResult() = 0;
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
+ Standard_EXPORT
+ virtual void Prepare() = 0;
+ TopTools_ListOfShape myLSIN;
+ TopTools_ListOfShape myLSOUT;
+ TopTools_ListOfShape myLSON;
+ Standard_Integer myRank;
+ BOPTools_PDSFiller myDSFiller;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ShapeSolid.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _BOPTools_DSFiller_HeaderFile
-#include <BOPTools_DSFiller.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_ShapeSolid_HeaderFile
-#include <GEOMAlgo_ShapeSolid.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_ShellSolid.cdl
--- Created: Wed Jan 12 12:45:20 2005
--- Author: Peter KURNEV
---
-class ShellSolid from GEOMAlgo
- inherits ShapeSolid from GEOMAlgo
- ---Purpose:
-
---uses
---raises
-
-is
- Create
- returns ShellSolid from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ShellSolid();"
-
- Perform (me:out)
- is redefined;
-
- Prepare(me:out)
- is redefined protected;
-
- BuildResult (me:out)
- is redefined protected;
-
- DetectSDFaces(me:out)
- is protected;
-
---fields
-
-end ShellSolid;
// File: GEOMAlgo_ShellSolid.cxx
// Created: Wed Jan 12 12:49:45 2005
// Author: Peter KURNEV
-
-#include <GEOMAlgo_ShellSolid.ixx>
-
-#include <Basics_OCCTVersion.hxx>
+// <pkv@irinox>
+//
+#include <GEOMAlgo_ShellSolid.hxx>
#include <Standard_Failure.hxx>
//=======================================================================
//function : GEOMAlgo_ShellSolid
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_ShellSolid::GEOMAlgo_ShellSolid()
:
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_ShellSolid::~GEOMAlgo_ShellSolid()
{
}
//=======================================================================
-// function:
-// purpose:
+// function:
+// purpose:
//=======================================================================
-void GEOMAlgo_ShellSolid::Perform()
+void GEOMAlgo_ShellSolid::Perform()
{
myErrorStatus=0;
//
}
//=======================================================================
// function: Prepare
-// purpose:
+// purpose:
//=======================================================================
-void GEOMAlgo_ShellSolid::Prepare()
+void GEOMAlgo_ShellSolid::Prepare()
{
const BOPTools_PaveFiller& aPaveFiller=myDSFiller->PaveFiller();
- //
+ //
// 1 States
BOPTools_SolidStateFiller aStateFiller(aPaveFiller);
aStateFiller.Do();
}
//=================================================================================
// function: BuildResult
-// purpose:
+// purpose:
//=================================================================================
-void GEOMAlgo_ShellSolid::BuildResult()
+void GEOMAlgo_ShellSolid::BuildResult()
{
Standard_Boolean bIsTouchCase;
Standard_Integer i, j, nF1, nF2, aNbFFs, aNbS, aNbCurves, nSp, iRank1;
aTol=1.e-7;
//
BOPTools_Tools3D::PointNearEdge(aE, aF1, aP2D, aP3D);
- const TopoDS_Solid& aRefSolid=(myRank==1) ?
+ const TopoDS_Solid& aRefSolid=(myRank==1) ?
TopoDS::Solid(aDS.Tool()) : TopoDS::Solid(aDS.Object());
//
BOPTools_PaveFiller* pPF=(BOPTools_PaveFiller*)& aPaveFiller;
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aCtx=pPF->Context();
//
BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aRefSolid);
-#else
- IntTools_Context& aCtx=pPF->ChangeContext();
- //
- BRepClass3d_SolidClassifier& aSC=aCtx.SolidClassifier(aRefSolid);
-#endif
aSC.Perform(aP3D, aTol);
aSt=aSC.State();
if (aSt==TopAbs_IN) {
else if (aSt==TopAbs_OUT) {
myLSOUT.Append(aF1);
}
- }
- break;
- } // if (aNbPB<2) {
+ }
+ break;
+ } // if (aNbPB<2) {
} //for (; anExp.More(); anExp.Next())
- }
+ }
}
//=======================================================================
// function: DetectSDFaces
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_ShellSolid::DetectSDFaces()
{
aNb=aFFs.Extent();
for (i=1; i<=aNb; i++) {
bFlag=Standard_False;
-
+
BOPTools_SSInterference& aFF=aFFs(i);
-
+
nF1=aFF.Index1();
nF2=aFF.Index2();
const TopoDS_Face& aF1=TopoDS::Face(aDS.Shape(nF1));
if (!aNbSps) {
continue;
}
-
+
const BOPTools_PaveBlock& aPB=aLPB.First();
const TopoDS_Edge& aSpE=TopoDS::Edge(aDS.Shape(aPB.Edge()));
-
- BOPTools_Tools3D::GetNormalToFaceOnEdge (aSpE, aF1, aDNF1);
+
+ BOPTools_Tools3D::GetNormalToFaceOnEdge (aSpE, aF1, aDNF1);
BOPTools_Tools3D::GetNormalToFaceOnEdge (aSpE, aF2, aDNF2);
iSenseFlag=BOPTools_Tools3D::SenseFlag (aDNF1, aDNF2);
//
//
TopoDS_Face aF1FWD=aF1;
aF1FWD.Orientation (TopAbs_FORWARD);
-
+
BOP_WireEdgeSet aWES (aF1FWD);
BOP_SDFWESFiller aWESFiller(nF1, nF2, *myDSFiller);
aWESFiller.SetSenseFlag(iSenseFlag);
aWESFiller.SetOperation(BOP_COMMON);
aWESFiller.Do(aWES);
-
+
BOP_FaceBuilder aFB;
aFB.Do(aWES);
const TopTools_ListOfShape& aLF=aFB.NewFaces();
//
Standard_Boolean bIsValidIn2D, bNegativeFlag;
bIsValidIn2D=BOPTools_Tools3D::IsValidArea (aFaceResult, bNegativeFlag);
- if (bIsValidIn2D) {
+ if (bIsValidIn2D) {
//if(CheckSameDomainFaceInside(aFaceResult, aF2)) {
iZone=1;
break;
//
}
}
-
- if (iZone) {
+
+ if (iZone) {
bFlag=Standard_True;
aFF.SetStatesMap(aWESFiller.StatesMap());
}
-
+
}// if (iSenseFlag)
-
+
aFF.SetTangentFacesFlag(bFlag);
aFF.SetSenseFlag (iSenseFlag);
- }// end of for (i=1; i<=aNb; i++)
+ }// end of for (i=1; i<=aNb; i++)
}
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_ShellSolid.hxx
+// Created: Wed Jan 12 12:49:45 2005
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _GEOMAlgo_ShellSolid_HeaderFile
#define _GEOMAlgo_ShellSolid_HeaderFile
-#ifndef _GEOMAlgo_ShapeSolid_HeaderFile
-#include <GEOMAlgo_ShapeSolid.hxx>
-#endif
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_ShellSolid : public GEOMAlgo_ShapeSolid {
-
-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_ShellSolid();
-Standard_EXPORT virtual ~GEOMAlgo_ShellSolid();
-
-
-Standard_EXPORT virtual void Perform() ;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
-Standard_EXPORT virtual void Prepare() ;
-
-
-Standard_EXPORT virtual void BuildResult() ;
-
-
-Standard_EXPORT void DetectSDFaces() ;
-
-
- // Fields PROTECTED
- //
-
+#include <GEOMAlgo_ShapeSolid.hxx>
-private:
+//=======================================================================
+//class : GEOMAlgo_ShellSolid
+//purpose :
+//=======================================================================
+class GEOMAlgo_ShellSolid : public GEOMAlgo_ShapeSolid
+{
+ public:
+ Standard_EXPORT
+ GEOMAlgo_ShellSolid();
- // Methods PRIVATE
- //
+ Standard_EXPORT
+ virtual ~GEOMAlgo_ShellSolid();
+ Standard_EXPORT
+ virtual void Perform() ;
- // Fields PRIVATE
- //
+ protected:
+ Standard_EXPORT
+ virtual void Prepare() ;
+ Standard_EXPORT
+ virtual void BuildResult() ;
+ Standard_EXPORT
+ void DetectSDFaces() ;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ShellSolid.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ShellSolid_HeaderFile
-#include <GEOMAlgo_ShellSolid.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_SolidSolid.cdl
--- Created: Wed Jan 26 12:05:14 2005
--- Author: Peter KURNEV
---
-class SolidSolid from GEOMAlgo
- inherits ShellSolid from GEOMAlgo
-
- ---Purpose:
-
-uses
- Shape from TopoDS
-
---raises
-
-is
- Create
- returns SolidSolid from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_SolidSolid();"
-
- Perform (me:out)
- is redefined;
-
- BuildResult (me:out)
- is redefined protected;
-
- SetShape2 (me:out;
- aS: Shape from TopoDS);
-
- Shape2 (me)
- returns Shape from TopoDS;
- ---C++: return const &
-
-fields
- myS2: Shape from TopoDS is protected;
-
-end SolidSolid;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <GEOMAlgo_SolidSolid.ixx>
+#include <GEOMAlgo_SolidSolid.hxx>
#include <Standard_Failure.hxx>
//=======================================================================
//function : GEOMAlgo_SolidSolid
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_SolidSolid::GEOMAlgo_SolidSolid()
:
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_SolidSolid::~GEOMAlgo_SolidSolid()
{
}
//=======================================================================
// function: SetShape2
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_SolidSolid::SetShape2(const TopoDS_Shape& aS2)
{
myS2=aS2;
-}
+}
//=======================================================================
// function: Shape2
-// purpose:
+// purpose:
//=======================================================================
const TopoDS_Shape& GEOMAlgo_SolidSolid::Shape2()const
{
return myS2;
-}
+}
//=======================================================================
// function: Perform
-// purpose:
+// purpose:
//=======================================================================
-void GEOMAlgo_SolidSolid::Perform()
+void GEOMAlgo_SolidSolid::Perform()
{
myErrorStatus=0;
try {
}
//=================================================================================
// function: BuildResult
-// purpose:
+// purpose:
//=================================================================================
-void GEOMAlgo_SolidSolid::BuildResult()
+void GEOMAlgo_SolidSolid::BuildResult()
{
myErrorStatus=0;
//
GEOMAlgo_IndexedDataMapOfShapeState aMFS;
//
// 1. classify the faces
- GEOMAlgo_ShellSolid::BuildResult();
+ GEOMAlgo_ShellSolid::BuildResult();
//
// 2. fill Shape-State map
aIt.Initialize(myLSIN);
for(j=1; j<aNbF; ++j) {
const TopoDS_Shape& aF=aMF(j);
//
- if (!aMFS.Contains(aF)) {// the face is intesected
+ if (!aMFS.Contains(aF)) {// the face is intesected
++aNbFINTR;
- break;
+ break;
}
//
aState=aMFS.FindFromKey(aF);
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_SolidSolid.hxx
+// Created: Wed Jan 26 12:06:26 2005
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _GEOMAlgo_SolidSolid_HeaderFile
#define _GEOMAlgo_SolidSolid_HeaderFile
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _GEOMAlgo_ShellSolid_HeaderFile
-#include <GEOMAlgo_ShellSolid.hxx>
-#endif
-class TopoDS_Shape;
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_SolidSolid : public GEOMAlgo_ShellSolid {
-
-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_SolidSolid();
-Standard_EXPORT virtual ~GEOMAlgo_SolidSolid();
-
-
-Standard_EXPORT virtual void Perform() ;
-
-
-Standard_EXPORT void SetShape2(const TopoDS_Shape& aS) ;
-
+#include <TopoDS_Shape.hxx>
+#include <GEOMAlgo_ShellSolid.hxx>
-Standard_EXPORT const TopoDS_Shape& Shape2() const;
+//=======================================================================
+//function : GEOMAlgo_SolidSolid
+//purpose :
+//=======================================================================
+class GEOMAlgo_SolidSolid : public GEOMAlgo_ShellSolid
+{
+ public:
+ Standard_EXPORT
+ GEOMAlgo_SolidSolid();
+ Standard_EXPORT
+ virtual ~GEOMAlgo_SolidSolid();
+ Standard_EXPORT
+ virtual void Perform() ;
+ Standard_EXPORT
+ void SetShape2(const TopoDS_Shape& aS) ;
+ Standard_EXPORT
+ const TopoDS_Shape& Shape2() const;
protected:
-
- // Methods PROTECTED
- //
-
-
-Standard_EXPORT virtual void BuildResult() ;
-
-
- // Fields PROTECTED
- //
-TopoDS_Shape myS2;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
+ Standard_EXPORT
+ virtual void BuildResult() ;
+ TopoDS_Shape myS2;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_SolidSolid.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _GEOMAlgo_SolidSolid_HeaderFile
-#include <GEOMAlgo_SolidSolid.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_Splitter.cdl
--- Created:
--- Author: Peter KURNEV
---
-class Splitter from GEOMAlgo
- inherits Builder from GEOMAlgo
-
- ---Purpose: Implementation of Gluing Operation Algorithm (GA)
-
-uses
-
- ShapeEnum from TopAbs,
- Shape from TopoDS,
- ListOfShape from TopTools,
- MapOfShape from TopTools
-
---raises
-
-is
-
- Create
- ---Purpose: Empty constructor
- returns Splitter from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_Splitter();"
-
- Clear(me:out)
- ---Purpose: Clears internal fields and arguments
- is redefined;
-
- AddTool (me:out;
- theShape: Shape from TopoDS)
- ---Purpose: Adds Tool argument theShape of the operation
- is virtual;
-
- Tools(me)
- ---Purpose: Returns the arguments of the operation
- returns ListOfShape from TopTools;
- ---C++: return const &
-
- SetLimit(me:out;
- aLimit:ShapeEnum from TopAbs);
-
- Limit(me)
- returns ShapeEnum from TopAbs;
-
- SetLimitMode(me:out;
- aLimitMode:Integer from Standard);
-
- LimitMode(me)
- returns Integer from Standard;
-
- --
- -- Protected methods
- --
- BuildResult(me:out;
- theType: ShapeEnum from TopAbs)
- ---Purpose: Build the resulting shapes of type theType
- is redefined protected;
-
- PostTreat(me:out)
- ---Purpose: Provides post-tratment actions
- is redefined protected;
-
- -- =====================================================
- --
- -- Debug methods
- --
- AddToolCompound (me:out;
- theShape: Shape from TopoDS);
- ---Purpose: Adds Tool arguments of the operation as
- -- shapes of upper level of container shape theShape
- -- =====================================================
-
-fields
- myTools : ListOfShape from TopTools is protected;
- myMapTools : MapOfShape from TopTools is protected;
- myLimit : ShapeEnum from TopAbs is protected;
- myLimitMode : Integer from Standard is protected;
-
-end Splitter;
-
// File: GEOMAlgo_Splitter.cxx
// Author: Peter KURNEV
//
-#include <GEOMAlgo_Splitter.ixx>
+#include <GEOMAlgo_Splitter.hxx>
#include <TopAbs_ShapeEnum.hxx>
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
+// File: GEOMAlgo_Splitter.hxx
+//
+// Author: Peter KURNEV
+//
#ifndef _GEOMAlgo_Splitter_HeaderFile
#define _GEOMAlgo_Splitter_HeaderFile
-#ifndef _TopTools_ListOfShape_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TopTools_MapOfShape_HeaderFile
#include <TopTools_MapOfShape.hxx>
-#endif
-#ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
-#endif
-#ifndef _GEOMAlgo_Builder_HeaderFile
#include <GEOMAlgo_Builder.hxx>
-#endif
-class TopoDS_Shape;
-class TopTools_ListOfShape;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
+#include <TopoDS_Shape.hxx>
//! Implementation of Gluing Operation Algorithm (GA) <br>
-class GEOMAlgo_Splitter : public GEOMAlgo_Builder {
-
-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
- //
-
-//! Empty constructor <br>
-Standard_EXPORT GEOMAlgo_Splitter();
-Standard_EXPORT virtual ~GEOMAlgo_Splitter();
-
-//! Clears internal fields and arguments <br>
-Standard_EXPORT virtual void Clear() ;
-
-//! Adds Tool argument theShape of the operation <br>
-Standard_EXPORT virtual void AddTool(const TopoDS_Shape& theShape) ;
-
-//! Returns the arguments of the operation <br>
-Standard_EXPORT const TopTools_ListOfShape& Tools() const;
-
-
-Standard_EXPORT void SetLimit(const TopAbs_ShapeEnum aLimit) ;
-
-
-Standard_EXPORT TopAbs_ShapeEnum Limit() const;
-
-
-Standard_EXPORT void SetLimitMode(const Standard_Integer aLimitMode) ;
-
-
-Standard_EXPORT Standard_Integer LimitMode() const;
-
-//! Adds Tool arguments of the operation as <br>
-//! shapes of upper level of container shape theShape <br>
-//! ===================================================== <br>
-Standard_EXPORT void AddToolCompound(const TopoDS_Shape& theShape) ;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-//! Build the resulting shapes of type theType <br>
-Standard_EXPORT virtual void BuildResult(const TopAbs_ShapeEnum theType) ;
-
-//! Provides post-tratment actions <br>
-Standard_EXPORT virtual void PostTreat() ;
-
-
- // Fields PROTECTED
- //
-TopTools_ListOfShape myTools;
-TopTools_MapOfShape myMapTools;
-TopAbs_ShapeEnum myLimit;
-Standard_Integer myLimitMode;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+//=======================================================================
+//function : GEOMAlgo_Splitter
+//purpose :
+//=======================================================================
+class GEOMAlgo_Splitter : public GEOMAlgo_Builder
+{
+ public:
+
+ //! Empty constructor <br>
+ Standard_EXPORT
+ GEOMAlgo_Splitter();
+
+ Standard_EXPORT
+ virtual ~GEOMAlgo_Splitter();
+
+ //! Clears internal fields and arguments <br>
+ Standard_EXPORT
+ virtual void Clear() ;
+
+ //! Adds Tool argument theShape of the operation <br>
+ Standard_EXPORT
+ virtual void AddTool(const TopoDS_Shape& theShape) ;
+
+ //! Returns the arguments of the operation <br>
+ Standard_EXPORT
+ const TopTools_ListOfShape& Tools() const;
+
+ Standard_EXPORT
+ void SetLimit(const TopAbs_ShapeEnum aLimit) ;
+
+ Standard_EXPORT
+ TopAbs_ShapeEnum Limit() const;
+
+ Standard_EXPORT
+ void SetLimitMode(const Standard_Integer aLimitMode) ;
+
+ Standard_EXPORT
+ Standard_Integer LimitMode() const;
+ //! Adds Tool arguments of the operation as <br>
+ //! shapes of upper level of container shape theShape <br>
+ //! ===================================================== <br>
+ Standard_EXPORT
+ void AddToolCompound(const TopoDS_Shape& theShape) ;
+
+ protected:
+ //! Build the resulting shapes of type theType <br>
+ Standard_EXPORT
+ virtual void BuildResult(const TopAbs_ShapeEnum theType) ;
+ //! Provides post-tratment actions <br>
+ Standard_EXPORT
+ virtual void PostTreat() ;
+
+
+ TopTools_ListOfShape myTools;
+ TopTools_MapOfShape myMapTools;
+ TopAbs_ShapeEnum myLimit;
+ Standard_Integer myLimitMode;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Splitter.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_Splitter_HeaderFile
-#include <GEOMAlgo_Splitter.hxx>
-#endif
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef _GEOMAlgo_State_HeaderFile
#define _GEOMAlgo_State_HeaderFile
-
-
-enum GEOMAlgo_State {
- GEOMAlgo_ST_UNKNOWN,
-GEOMAlgo_ST_IN,
-GEOMAlgo_ST_OUT,
-GEOMAlgo_ST_ON,
-GEOMAlgo_ST_ONIN,
-GEOMAlgo_ST_ONOUT,
-GEOMAlgo_ST_INOUT
+enum GEOMAlgo_State {
+ GEOMAlgo_ST_UNKNOWN,
+ GEOMAlgo_ST_IN,
+ GEOMAlgo_ST_OUT,
+ GEOMAlgo_ST_ON,
+ GEOMAlgo_ST_ONIN,
+ GEOMAlgo_ST_ONOUT,
+ GEOMAlgo_ST_INOUT
};
-
#ifndef _Standard_PrimitiveTypes_HeaderFile
#include <Standard_PrimitiveTypes.hxx>
#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_StateCollector.cdl
--- Created: Thu Mar 10 09:39:25 2005
--- Author: Peter KURNEV
---
-class StateCollector from GEOMAlgo
-
- ---Purpose:
-
-uses
- State from TopAbs
-
---raises
-
-is
- Create
- returns StateCollector from GEOMAlgo;
-
- AppendState(me:out;
- aSt:State from TopAbs)
- returns Boolean from Standard;
-
- State(me)
- returns State from TopAbs;
-
-fields
- myCounter:Integer from Standard[3];
-
-end StateCollector;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <GEOMAlgo_StateCollector.ixx>
+#include <GEOMAlgo_StateCollector.hxx>
//=======================================================================
//function : GEOMAlgo_StateCollector
-//purpose :
+//purpose :
//=======================================================================
-GEOMAlgo_StateCollector::GEOMAlgo_StateCollector()
+GEOMAlgo_StateCollector::GEOMAlgo_StateCollector()
{
myCounter[0]=0;
myCounter[1]=0;
}
//=======================================================================
//function : AppendState
-//purpose :
+//purpose :
//=======================================================================
-Standard_Boolean GEOMAlgo_StateCollector::AppendState(const TopAbs_State aSt)
+Standard_Boolean GEOMAlgo_StateCollector::AppendState(const TopAbs_State aSt)
{
Standard_Boolean bIsToBreak;
//
break;
case TopAbs_OUT:
++myCounter[1];
- break;
+ break;
case TopAbs_ON:
++myCounter[2];
break;
}
//=======================================================================
//function : State
-//purpose :
+//purpose :
//=======================================================================
-TopAbs_State GEOMAlgo_StateCollector::State()const
+TopAbs_State GEOMAlgo_StateCollector::State()const
{
TopAbs_State aSt;
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_StateCollector.hxx
+// Created: Thu Mar 10 09:42:11 2005
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _GEOMAlgo_StateCollector_HeaderFile
#define _GEOMAlgo_StateCollector_HeaderFile
-#ifndef _Standard_Integer_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-#ifndef _TopAbs_State_HeaderFile
#include <TopAbs_State.hxx>
-#endif
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_StateCollector {
-
-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_StateCollector();
-
-
-Standard_EXPORT Standard_Boolean AppendState(const TopAbs_State aSt) ;
-
-Standard_EXPORT TopAbs_State State() const;
+//=======================================================================
+// class : GEOMAlgo_StateCollector
+//purpose :
+//=======================================================================
+class GEOMAlgo_StateCollector
+{
+ public:
+ Standard_EXPORT
+ GEOMAlgo_StateCollector();
+ Standard_EXPORT
+ Standard_Boolean AppendState(const TopAbs_State aSt) ;
+ Standard_EXPORT
+ TopAbs_State State() const;
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Integer myCounter[3];
-
-
+ protected:
+ Standard_Integer myCounter[3];
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_StateCollector.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_StateCollector_HeaderFile
-#include <GEOMAlgo_StateCollector.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_SurfaceTools.cdl
--- Created: Thu Jan 27 11:03:49 2005
--- Author: Peter KURNEV
---
-class SurfaceTools from GEOMAlgo
-
- ---Purpose:
-
-uses
- Pnt from gp,
- Pln from gp,
- Cylinder from gp,
- Sphere from gp,
- Surface from Geom,
- Surface from GeomAdaptor,
- State from TopAbs,
- State from GEOMAlgo
-
---raises
-
-is
-
-
- IsAnalytic(myclass;
- aS:Surface from Geom)
- returns Boolean from Standard;
-
- IsCoaxial(myclass;
- aP1 : Pnt from gp;
- aP2 : Pnt from gp;
- aCyl : Cylinder from gp;
- aTol : Real from Standard)
- returns Boolean from Standard;
-
- IsConformState(myclass;
- aST1:State from TopAbs;
- aST2:State from GEOMAlgo)
- returns Boolean from Standard;
-
- GetState(myclass;
- aP:Pnt from gp;
- aS:Surface from GeomAdaptor;
- aTol:Real from Standard;
- aSt:out State from TopAbs)
- returns Integer from Standard;
-
- GetState(myclass;
- aP:Pnt from gp;
- aS:Surface from Geom;
- aTol:Real from Standard;
- aSt:out State from TopAbs)
- returns Integer from Standard;
-
- Distance(myclass;
- aP:Pnt from gp;
- aPln:Pln from gp)
- returns Real from Standard;
-
- Distance(myclass;
- aP:Pnt from gp;
- aCyl:Cylinder from gp)
- returns Real from Standard;
-
- Distance(myclass;
- aP:Pnt from gp;
- aSph:Sphere from gp)
- returns Real from Standard;
-
- ReverseState(myclass;
- aSt: State from TopAbs)
- returns State from TopAbs;
-
---fields
-
-end SurfaceTools;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <GEOMAlgo_SurfaceTools.ixx>
+#include <GEOMAlgo_SurfaceTools.hxx>
#include <math.h>
//=======================================================================
//function : GetState
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_SurfaceTools::GetState(const gp_Pnt& aP,
const GeomAdaptor_Surface& aGAS,
aR=0.;
aDp=GEOMAlgo_SurfaceTools::Distance(aP, aPln);
break;
-
- case GeomAbs_Cylinder:
+
+ case GeomAbs_Cylinder:
aCyl=aGAS.Cylinder();
aR=aCyl.Radius();
aDp=GEOMAlgo_SurfaceTools::Distance(aP, aCyl);
- break;
+ break;
- case GeomAbs_Sphere:
+ case GeomAbs_Sphere:
aSph=aGAS.Sphere();
aR=aSph.Radius();
aDp=GEOMAlgo_SurfaceTools::Distance(aP, aSph);
break;
-
+
default:
iErr=1; // unprocessed surface type
break;
}
//=======================================================================
//function : GetState
-//purpose :
+//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_SurfaceTools::GetState(const gp_Pnt& aP,
const Handle(Geom_Surface)& aSurf,
}
//=======================================================================
//function : ReverseState
-//purpose :
+//purpose :
//=======================================================================
TopAbs_State GEOMAlgo_SurfaceTools::ReverseState(const TopAbs_State aState)
{
}
//=======================================================================
//function : Distance
-//purpose :
+//purpose :
//=======================================================================
-Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
+Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
const gp_Sphere& aSph)
{
Standard_Real aD;
}
//=======================================================================
//function : Distance
-//purpose :
+//purpose :
//=======================================================================
-Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
+Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
const gp_Cylinder& aCyl)
{
Standard_Real aD;
}
//=======================================================================
//function : Distance
-//purpose :
+//purpose :
//=======================================================================
-Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
+Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
const gp_Pln& aPL)
{
Standard_Real aD;
}
//=======================================================================
//function : IsCoaxial
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_SurfaceTools::IsCoaxial(const gp_Pnt& aP1,
const gp_Pnt& aP2,
}
//=======================================================================
//function : IsAnalytic
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_SurfaceTools::IsAnalytic(const Handle(Geom_Surface)& aSurf)
{
//
aGAS.Load(aSurf);
aType=aGAS.GetType();
- bRet=(aType==GeomAbs_Plane ||
+ bRet=(aType==GeomAbs_Plane ||
aType==GeomAbs_Cylinder ||
aType==GeomAbs_Sphere);
return bRet;
}
//=======================================================================
//function : IsConformState
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_SurfaceTools::IsConformState(const TopAbs_State aST1,
const GEOMAlgo_State aST2)
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_SurfaceTools.hxx
+// Created: Thu Jan 27 11:05:16 2005
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _GEOMAlgo_SurfaceTools_HeaderFile
#define _GEOMAlgo_SurfaceTools_HeaderFile
-#ifndef _Standard_Boolean_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Handle_Geom_Surface_HeaderFile
#include <Handle_Geom_Surface.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
-#endif
-#ifndef _TopAbs_State_HeaderFile
#include <TopAbs_State.hxx>
-#endif
-#ifndef _GEOMAlgo_State_HeaderFile
#include <GEOMAlgo_State.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
-#endif
-class Geom_Surface;
-class gp_Pnt;
-class gp_Cylinder;
-class GeomAdaptor_Surface;
-class gp_Pln;
-class gp_Sphere;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_SurfaceTools {
-
-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_Boolean IsAnalytic(const Handle(Geom_Surface)& aS) ;
-
-
-Standard_EXPORT static Standard_Boolean IsCoaxial(const gp_Pnt& aP1,const gp_Pnt& aP2,const gp_Cylinder& aCyl,const Standard_Real aTol) ;
-
-
-Standard_EXPORT static Standard_Boolean IsConformState(const TopAbs_State aST1,const GEOMAlgo_State aST2) ;
-
-
-Standard_EXPORT static Standard_Integer GetState(const gp_Pnt& aP,const GeomAdaptor_Surface& aS,const Standard_Real aTol,TopAbs_State& aSt) ;
-
-
-Standard_EXPORT static Standard_Integer GetState(const gp_Pnt& aP,const Handle(Geom_Surface)& aS,const Standard_Real aTol,TopAbs_State& aSt) ;
-
-
-Standard_EXPORT static Standard_Real Distance(const gp_Pnt& aP,const gp_Pln& aPln) ;
-
-
-Standard_EXPORT static Standard_Real Distance(const gp_Pnt& aP,const gp_Cylinder& aCyl) ;
-
-
-Standard_EXPORT static Standard_Real Distance(const gp_Pnt& aP,const gp_Sphere& aSph) ;
-
-
-Standard_EXPORT static TopAbs_State ReverseState(const TopAbs_State aSt) ;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
+#include <Geom_Surface.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_Cylinder.hxx>
+#include <GeomAdaptor_Surface.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Sphere.hxx>
+
+
+//=======================================================================
+//function : GEOMAlgo_SurfaceTools
+//purpose :
+//=======================================================================
+class GEOMAlgo_SurfaceTools
+{
+ public:
+ Standard_EXPORT
+ static Standard_Boolean IsAnalytic(const Handle(Geom_Surface)& aS) ;
+
+ Standard_EXPORT
+ static Standard_Boolean IsCoaxial(const gp_Pnt& aP1,
+ const gp_Pnt& aP2,
+ const gp_Cylinder& aCyl,
+ const Standard_Real aTol) ;
+
+ Standard_EXPORT
+ static Standard_Boolean IsConformState(const TopAbs_State aST1,
+ const GEOMAlgo_State aST2) ;
+
+ Standard_EXPORT
+ static Standard_Integer GetState(const gp_Pnt& aP,
+ const GeomAdaptor_Surface& aS,
+ const Standard_Real aTol,TopAbs_State& aSt) ;
+
+ Standard_EXPORT
+ static Standard_Integer GetState(const gp_Pnt& aP,
+ const Handle(Geom_Surface)& aS,
+ const Standard_Real aTol,
+ TopAbs_State& aSt) ;
+
+ Standard_EXPORT
+ static Standard_Real Distance(const gp_Pnt& aP,
+ const gp_Pln& aPln) ;
+
+ Standard_EXPORT
+ static Standard_Real Distance(const gp_Pnt& aP,
+ const gp_Cylinder& aCyl) ;
+
+ Standard_EXPORT
+ static Standard_Real Distance(const gp_Pnt& aP,
+ const gp_Sphere& aSph) ;
+
+ Standard_EXPORT
+ static TopAbs_State ReverseState(const TopAbs_State aSt) ;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_SurfaceTools.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _gp_Pnt_HeaderFile
-#include <gp_Pnt.hxx>
-#endif
-#ifndef _gp_Cylinder_HeaderFile
-#include <gp_Cylinder.hxx>
-#endif
-#ifndef _GeomAdaptor_Surface_HeaderFile
-#include <GeomAdaptor_Surface.hxx>
-#endif
-#ifndef _gp_Pln_HeaderFile
-#include <gp_Pln.hxx>
-#endif
-#ifndef _gp_Sphere_HeaderFile
-#include <gp_Sphere.hxx>
-#endif
-#ifndef _GEOMAlgo_SurfaceTools_HeaderFile
-#include <GEOMAlgo_SurfaceTools.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_Tools.cdl
--- Created: Mon Dec 6 11:26:02 2004
--- Author: Peter KURNEV
-
-class Tools from GEOMAlgo
-
- ---Purpose:
-
-uses
- Pnt from gp,
- Surface from Geom,
- ShapeEnum from TopAbs,
- Edge from TopoDS,
- Face from TopoDS,
- Shape from TopoDS,
- ListOfShape from TopTools,
- IndexedDataMapOfShapeListOfShape from TopTools,
- Context from IntTools,
- IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo --qft
-
---raises
-
-is
- IsCompositeShape(myclass;
- aS :Shape from TopoDS)
- returns Boolean from Standard;
-
- RefineSDShapes(myclass;
- aMSD:out IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo; --qft
- aTol:Real from Standard;
- aCtx: Context from IntTools)
- returns Integer from Standard;
-
- FindSDShapes(myclass;
- aLE :ListOfShape from TopTools;
- aTol:Real from Standard;
- aMEE:out IndexedDataMapOfShapeListOfShape from TopTools;
- aCtx: Context from IntTools)
- returns Integer from Standard;
-
- FindSDShapes(myclass;
- aE1 :Shape from TopoDS;
- aLE :ListOfShape from TopTools;
- aTol :Real from Standard;
- aLESD :out ListOfShape from TopTools;
- aCtx : Context from IntTools)
- returns Integer from Standard;
-
- ProjectPointOnShape(myclass;
- aP1: Pnt from gp;
- aS :Shape from TopoDS;
- aP2:out Pnt from gp;
- aCtx : Context from IntTools)
- returns Boolean from Standard;
-
- PointOnShape(myclass;
- aS :Shape from TopoDS;
- aP3D:out Pnt from gp);
-
- PointOnEdge(myclass;
- aE :Edge from TopoDS;
- aP3D:out Pnt from gp);
-
- PointOnEdge(myclass;
- aE :Edge from TopoDS;
- aT :Real from Standard;
- aP3D:out Pnt from gp);
-
- PointOnFace(myclass;
- aF :Face from TopoDS;
- aP3D:out Pnt from gp);
-
- PointOnFace(myclass;
- aF :Face from TopoDS;
- aU :Real from Standard;
- aV :Real from Standard;
- aP3D:out Pnt from gp);
-
- RefinePCurveForEdgeOnFace (myclass;
- aE : Edge from TopoDS;
- aF : Face from TopoDS;
- aU1 : Real from Standard;
- aU2 : Real from Standard);
-
- IsUPeriodic(myclass;
- aS:Surface from Geom)
- returns Boolean from Standard;
-
- CorrectWires(myclass;
- aS :Shape from TopoDS)
- returns Boolean from Standard;
-
- BuildPCurveForEdgeOnFace (myclass;
- aE : Edge from TopoDS;
- aEold: Edge from TopoDS;
- aF : Face from TopoDS;
- aCtx : Context from IntTools)
- returns Integer from Standard;
-
---fields
-
-end Tools;
// Created: Mon Dec 6 11:35:29 2004
// Author: Peter KURNEV
-#include <GEOMAlgo_Tools.ixx>
-
-#include <GEOMAlgo_PassKeyShape.hxx>
-#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-
-#include <Basics_OCCTVersion.hxx>
+#include <GEOMAlgo_Tools.hxx>
#include <gp.hxx>
#include <gp_Pnt.hxx>
#include <BOPTools_Tools2D.hxx>
#include <IntTools_Context.hxx>
+#include <GEOMAlgo_PassKeyShape.hxx>
+#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
+
static
void GetCount(const TopoDS_Shape& aS,
Standard_Integer& iCnt);
//function : RefineSDShapes
//purpose :
//=======================================================================
-Standard_Integer GEOMAlgo_Tools::RefineSDShapes (GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE,
- const Standard_Real aTol,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& aCtx)
-#else
- IntTools_Context& aCtx)
-#endif
+ Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE,
+ const Standard_Real aTol,
+ const Handle(IntTools_Context)& aCtx)
{
Standard_Integer i, aNbE, iErr, j, aNbEE, aNbToAdd;
TopTools_IndexedDataMapOfShapeListOfShape aMEE, aMSDE, aMEToAdd;
//function : FindSDShapes
//purpose :
//=======================================================================
-Standard_Integer GEOMAlgo_Tools::FindSDShapes (const TopTools_ListOfShape& aLE,
- const Standard_Real aTol,
- TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& aCtx)
-#else
- IntTools_Context& aCtx)
-#endif
+Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopTools_ListOfShape& aLE,
+ const Standard_Real aTol,
+ TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
+ const Handle(IntTools_Context)& aCtx)
{
Standard_Integer aNbE, aNbEProcessed, aNbESD, iErr;
TopTools_ListOfShape aLESD;
const TopTools_ListOfShape& aLE,
const Standard_Real aTol,
TopTools_ListOfShape& aLESD,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aCtx)
-#else
- IntTools_Context& aCtx)
-#endif
{
Standard_Boolean bIsDone;
Standard_Real aTol2, aD2;
Standard_Boolean GEOMAlgo_Tools::ProjectPointOnShape(const gp_Pnt& aP1,
const TopoDS_Shape& aS,
gp_Pnt& aP2,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aCtx)
-#else
- IntTools_Context& aCtx)
-#endif
{
Standard_Boolean bIsDone = Standard_False;
Standard_Real aT2;
if (aC3D.IsNull()) {
return Standard_True;
}
-#if OCC_VERSION_LARGE > 0x06050200
bIsDone = aCtx->ProjectPointOnEdge(aP1, aE2, aT2);
-#else
- bIsDone = aCtx.ProjectPointOnEdge(aP1, aE2, aT2);
-#endif
}
if (!bIsDone) {
return bIsDone;
case TopAbs_FACE:
{
const TopoDS_Face& aF2 = TopoDS::Face(aS);
-#if OCC_VERSION_LARGE > 0x06050200
GeomAPI_ProjectPointOnSurf& aProj = aCtx->ProjPS(aF2);
-#else
- GeomAPI_ProjectPointOnSurf& aProj = aCtx.ProjPS(aF2);
-#endif
//
aProj.Perform(aP1);
bIsDone = aProj.IsDone();
GEOMAlgo_Tools::BuildPCurveForEdgeOnFace(const TopoDS_Edge& aEold,
const TopoDS_Edge& aEnew,
const TopoDS_Face& aF,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aCtx)
-#else
- IntTools_Context& aCtx)
-#endif
{
Standard_Boolean bIsClosed, bUClosed, bHasOld;
Standard_Integer iRet, aNbPoints;
aS=BRep_Tool::Surface(aF);
aS->D0(aUS1, aVS1, aP);
//
-#if OCC_VERSION_LARGE > 0x06050200
GeomAPI_ProjectPointOnCurve& aProjPC=aCtx->ProjPC(aEnew);
-#else
- GeomAPI_ProjectPointOnCurve& aProjPC=aCtx.ProjPC(aEnew);
-#endif
//
aProjPC.Perform(aP);
aNbPoints=aProjPC.NbPoints();
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_Tools.hxx
+// Created: Mon Dec 6 11:35:29 2004
+// Author: Peter KURNEV
+
#ifndef _GEOMAlgo_Tools_HeaderFile
#define _GEOMAlgo_Tools_HeaderFile
-#include <Basics_OCCTVersion.hxx>
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
-#endif
-
-#if OCC_VERSION_LARGE > 0x06050200
-#ifndef _Handle_IntTools_Context_HeaderFile
#include <Handle_IntTools_Context.hxx>
-#endif
-#endif
-
-#ifndef _Handle_Geom_Surface_HeaderFile
#include <Handle_Geom_Surface.hxx>
-#endif
-
-class TopoDS_Shape;
-class GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape;
-class IntTools_Context;
-class TopTools_ListOfShape;
-class TopTools_IndexedDataMapOfShapeListOfShape;
-class gp_Pnt;
-class TopoDS_Edge;
-class TopoDS_Face;
-class Geom_Surface;
-
-
-class GEOMAlgo_Tools {
-
+#include <TopoDS_Shape.hxx>
+#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
+#include <IntTools_Context.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <gp_Pnt.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Face.hxx>
+#include <Geom_Surface.hxx>
+
+//=======================================================================
+//class : GEOMAlgo_Tools
+//purpose :
+//=======================================================================
+class GEOMAlgo_Tools
+ {
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);
- }
-
- Standard_EXPORT static Standard_Boolean IsCompositeShape(const TopoDS_Shape& aS);
-
- Standard_EXPORT static Standard_Integer RefineSDShapes (GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD,
- const Standard_Real aTol,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& aCtx);
-#else
- IntTools_Context& aCtx);
-#endif
-
- Standard_EXPORT static Standard_Integer FindSDShapes (const TopTools_ListOfShape& aLE,
- const Standard_Real aTol,
- TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& aCtx);
-#else
- IntTools_Context& aCtx);
-#endif
-
- Standard_EXPORT static Standard_Integer FindSDShapes (const TopoDS_Shape& aE1,
- const TopTools_ListOfShape& aLE,
- const Standard_Real aTol,
- TopTools_ListOfShape& aLESD,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& aCtx);
-#else
- IntTools_Context& aCtx);
-#endif
-
- Standard_EXPORT static Standard_Boolean ProjectPointOnShape (const gp_Pnt& aP1,
- const TopoDS_Shape& aS,
- gp_Pnt& aP2,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& aCtx);
-#else
- IntTools_Context& aCtx);
-#endif
-
- Standard_EXPORT static void PointOnShape(const TopoDS_Shape& aS,gp_Pnt& aP3D);
-
- Standard_EXPORT static void PointOnEdge(const TopoDS_Edge& aE,gp_Pnt& aP3D);
-
- Standard_EXPORT static void PointOnEdge(const TopoDS_Edge& aE,const Standard_Real aT,gp_Pnt& aP3D);
-
- Standard_EXPORT static void PointOnFace(const TopoDS_Face& aF,gp_Pnt& aP3D);
-
- Standard_EXPORT static void PointOnFace(const TopoDS_Face& aF,const Standard_Real aU,const Standard_Real aV,gp_Pnt& aP3D);
-
- Standard_EXPORT static void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,const TopoDS_Face& aF,const Standard_Real aU1,const Standard_Real aU2);
-
- Standard_EXPORT static Standard_Boolean IsUPeriodic(const Handle(Geom_Surface)& aS);
-
- Standard_EXPORT static Standard_Boolean CorrectWires(const TopoDS_Shape& aS);
-
- Standard_EXPORT static Standard_Integer BuildPCurveForEdgeOnFace (const TopoDS_Edge& aE,
- const TopoDS_Edge& aEold,
- const TopoDS_Face& aF,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& aCtx);
-#else
- IntTools_Context& aCtx);
-#endif
-
-protected:
-
-private:
+ Standard_EXPORT
+ static Standard_Boolean IsCompositeShape(const TopoDS_Shape& aS) ;
+
+ Standard_EXPORT
+ static Standard_Integer RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD,
+ const Standard_Real aTol,
+ const Handle(IntTools_Context)& aCtx) ;
+
+ Standard_EXPORT
+ static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,
+ const Standard_Real aTol,
+ TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
+ const Handle(IntTools_Context)& aCtx) ;
+
+ Standard_EXPORT
+ static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1,
+ const TopTools_ListOfShape& aLE,
+ const Standard_Real aTol,
+ TopTools_ListOfShape& aLESD,
+ const Handle(IntTools_Context)& aCtx) ;
+
+ Standard_EXPORT
+ static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1,
+ const TopoDS_Shape& aS,gp_Pnt& aP2,
+ const Handle(IntTools_Context)& aCtx) ;
+
+ Standard_EXPORT
+ static void PointOnShape(const TopoDS_Shape& aS,
+ gp_Pnt& aP3D) ;
+
+ Standard_EXPORT
+ static void PointOnEdge(const TopoDS_Edge& aE,
+ gp_Pnt& aP3D) ;
+
+ Standard_EXPORT
+ static void PointOnEdge(const TopoDS_Edge& aE,
+ const Standard_Real aT,gp_Pnt& aP3D) ;
+
+ Standard_EXPORT
+ static void PointOnFace(const TopoDS_Face& aF,
+ gp_Pnt& aP3D) ;
+
+ Standard_EXPORT
+ static void PointOnFace(const TopoDS_Face& aF,
+ const Standard_Real aU,
+ const Standard_Real aV,
+ gp_Pnt& aP3D) ;
+
+ Standard_EXPORT
+ static void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,
+ const TopoDS_Face& aF,
+ const Standard_Real aU1,
+ const Standard_Real aU2) ;
+
+ Standard_EXPORT
+ static Standard_Boolean IsUPeriodic(const Handle(Geom_Surface)& aS) ;
+
+ Standard_EXPORT
+ static Standard_Boolean CorrectWires(const TopoDS_Shape& aS) ;
+
+ Standard_EXPORT
+ static Standard_Integer BuildPCurveForEdgeOnFace(const TopoDS_Edge& aE,
+ const TopoDS_Edge& aEold,
+ const TopoDS_Face& aF,
+ const Handle(IntTools_Context)& aCtx) ;
};
-
-// other Inline functions and methods (like "C++: function call" methods)
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Tools.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
-#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-#endif
-#ifndef _IntTools_Context_HeaderFile
-#include <IntTools_Context.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#endif
-#ifndef _gp_Pnt_HeaderFile
-#include <gp_Pnt.hxx>
-#endif
-#ifndef _TopoDS_Edge_HeaderFile
-#include <TopoDS_Edge.hxx>
-#endif
-#ifndef _TopoDS_Face_HeaderFile
-#include <TopoDS_Face.hxx>
-#endif
-#ifndef _Geom_Surface_HeaderFile
-#include <Geom_Surface.hxx>
-#endif
-#ifndef _GEOMAlgo_Tools_HeaderFile
-#include <GEOMAlgo_Tools.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_Tools3D.cdl
--- Created:
--- Author: Peter KURNEV
---
-class Tools3D from GEOMAlgo
-
- ---Purpose: Auxiliary tools for Algorithms
-
-uses
- State from TopAbs,
- ShapeEnum from TopAbs,
- Pnt from gp,
- Pnt2d from gp,
- Shape from TopoDS,
- Vertex from TopoDS,
- Edge from TopoDS,
- Face from TopoDS,
- Solid from TopoDS,
-
- ListOfShape from TopTools,
- IndexedMapOfShape from TopTools,
- IndexedDataMapOfShapeListOfShape from TopTools,
- Context from IntTools,
- ListOfCoupleOfShape from NMTTools
-
---raises
-
-is
- IsSplitToReverse(myclass;
- theSplit : Shape from TopoDS;
- theShape : Shape from TopoDS;
- theContext: Context from IntTools)
- ---Purpose: Returns True if the shape theSplit has opposite
- -- direction than theShape
- -- theContext - cashed geometrical tools
- returns Boolean from Standard;
-
- IsSplitToReverse(myclass;
- theSplit : Face from TopoDS;
- theShape : Face from TopoDS;
- theContext: Context from IntTools)
- ---Purpose: Returns True if normal direction of the face
- -- theShape is not the same as for the face
- -- theSplit
- -- theContext - cashed geometrical tools
- returns Boolean from Standard;
-
- IsSplitToReverse(myclass;
- theEdge : Edge from TopoDS;
- theSplit : Edge from TopoDS;
- theContext: Context from IntTools)
- ---Purpose: Returns True if tangent direction of the edge
- -- theEdge is not the same as for the edge
- -- theSplit
- -- theContext - cashed geometrical tools
- returns Boolean from Standard;
-
- Sense (myclass;
- theF1: Face from TopoDS;
- theF2: Face from TopoDS)
- ---Purpose: For the couple of faces theF1, theF2
- -- computes sense value
- -- Returns 0 if the faces are not sensible
- -- Returns 1 if the faces have same sense
- -- Returns 2 if the faces have opposite sense
- returns Integer from Standard;
-
- CopyFace(myclass;
- theF1: Face from TopoDS;
- theF2:out Face from TopoDS);
- ---Purpose: Makes new face theF2 from surface and wires
- -- of the face theF1
-
- MakeContainer(myclass;
- theType:ShapeEnum from TopAbs;
- theShape:out Shape from TopoDS);
- ---Purpose: Makes empty shape theShape of the type theType
-
-
- MakeConnexityBlock(myclass;
- theLS :ListOfShape from TopTools;
- theMapAvoid:IndexedMapOfShape from TopTools;
- theLSCB :out ListOfShape from TopTools);
- ---Purpose: For the list of faces theLS build block
- -- theLSCB in terms of connexity by edges
- -- theMapAvoid - set of edges to avoid for
- -- the treatment
-
- ComputeStateByOnePoint(myclass;
- theShape :Shape from TopoDS;
- theSolid :Solid from TopoDS;
- theTol :Real from Standard;
- theContext: Context from IntTools)
- ---Purpose: Computes the 3-D state of the shape theShape
- -- toward solid theSolid.
- -- theTol - value of precision of computation
- -- theContext- cahed geometrical tools
- -- Returns 3-D state.
- returns State from TopAbs;
-
- ComputeState(myclass;
- thePoint :Pnt from gp;
- theSolid :Solid from TopoDS;
- theTol :Real from Standard;
- theContext: Context from IntTools)
- ---Purpose: Computes the 3-D state of the point thePoint
- -- toward solid theSolid.
- -- theTol - value of precision of computation
- -- theContext- cahed geometrical tools
- -- Returns 3-D state.
- returns State from TopAbs;
-
- ComputeState(myclass;
- theVertex:Vertex from TopoDS;
- theSolid :Solid from TopoDS;
- theTol :Real from Standard;
- theContext: Context from IntTools)
- ---Purpose: Computes the 3-D state of the vertex theVertex
- -- toward solid theSolid.
- -- theTol - value of precision of computation
- -- theContext- cahed geometrical tools
- -- Returns 3-D state.
- returns State from TopAbs;
-
- ComputeState(myclass;
- theEdge :Edge from TopoDS;
- theSolid :Solid from TopoDS;
- theTol :Real from Standard;
- theContext: Context from IntTools)
- ---Purpose: Computes the 3-D state of the edge theEdge
- -- toward solid theSolid.
- -- theTol - value of precision of computation
- -- theContext- cahed geometrical tools
- -- Returns 3-D state.
- returns State from TopAbs;
-
- ComputeState(myclass;
- theFace :Face from TopoDS;
- theSolid :Solid from TopoDS;
- theTol :Real from Standard;
- theBounds:IndexedMapOfShape from TopTools;
- theContext: Context from IntTools)
- ---Purpose: Computes the 3-D state of the face theFace
- -- toward solid theSolid.
- -- theTol - value of precision of computation
- -- theBounds - set of edges of theFace to avoid
- -- theContext- cahed geometrical tools
- -- Returns 3-D state.
- returns State from TopAbs;
-
- IsInternalFace(myclass;
- theFace :Face from TopoDS;
- theEdge :Edge from TopoDS;
- theFace1 :Face from TopoDS;
- theFace2 :Face from TopoDS;
- theContext: Context from IntTools)
- ---Purpose: Returns True if the face theFace is inside of the
- -- couple of faces theFace1, theFace2.
- -- The faces theFace, theFace1, theFace2 must
- -- share the edge theEdge
- returns Boolean from Standard;
-
- IsInternalFace(myclass;
- theFace :Face from TopoDS;
- theEdge :Edge from TopoDS;
- theLF :ListOfShape from TopTools;
- theContext: Context from IntTools)
- ---Purpose: Returns True if the face theFace is inside of the
- -- appropriate couple of faces (from the set theLF) .
- -- The faces of the set theLF and theFace must
- -- share the edge theEdge
- returns Boolean from Standard;
-
- IsInternalFace(myclass;
- theFace :Face from TopoDS;
- theSolid :Solid from TopoDS;
- theMEF :IndexedDataMapOfShapeListOfShape from TopTools;
- theTol :Real from Standard;
- theContext: Context from IntTools)
- ---Purpose: Returns True if the face theFace is inside the
- -- solid theSolid.
- -- theMEF - Map Edge/Faces for theSolid
- -- theTol - value of precision of computation
- -- theContext- cahed geometrical tools
- returns Boolean from Standard;
-
-
- GetFaceOff(myclass;
- theEdge :Edge from TopoDS;
- theFace :Face from TopoDS;
- theLCEF :ListOfCoupleOfShape from NMTTools;
- theFaceOff :out Face from TopoDS);
- ---Purpose: For the face theFace and its edge theEdge
- -- finds the face suitable to produce shell.
- -- theLCEF - set of faces to search. All faces
- -- from theLCEF must share edge theEdge
-
- GetEdgeOnFace (myclass;
- theEdge :Edge from TopoDS;
- theFace :Face from TopoDS;
- theEdgeOnF :out Edge from TopoDS)
- ---Purpose: For the face theFace gets the edge theEdgeOnF
- -- that is the same as theEdge
- -- Returns True if such edge exists
- -- Returns False if there is no such edge
- returns Boolean from Standard;
-
- GetEdgeOff (myclass;
- theEdge :Edge from TopoDS;
- theFace :Face from TopoDS;
- theEdgeOff :out Edge from TopoDS)
- ---Purpose: Returns True if the face theFace contains
- -- the edge theEdge but with opposite orientation.
- -- If the method returns True theEdgeOff is the
- -- edge founded
- returns Boolean from Standard;
-
---modified by NIZNHY-PKV Tue Nov 22 12:18:30 2011f
- PntInFace(myclass;
- theF : Face from TopoDS;
- theP :out Pnt from gp;
- theP2D:out Pnt2d from gp)
- ---Purpose: Computes a point <theP> inside the face <theF>.
- -- <theP2D> - 2D representation of <theP>
- -- on the surface of <theF>
- -- Returns 0 in case of success.
- returns Integer from Standard;
---modified by NIZNHY-PKV Tue Nov 22 12:18:36 2011t
-
---fields
-end Tools3D;
-
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
// File : GEOMAlgo_Tools3D.cxx
+// Created :
// Author : Peter KURNEV
-#include <GEOMAlgo_Tools3D.ixx>
-
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-#include <NMTTools_CoupleOfShape.hxx>
-
-#include <Basics_OCCTVersion.hxx>
+#include <GEOMAlgo_Tools3D.hxx>
#include <Precision.hxx>
#include <Geom2dHatch_Intersector.hxx>
#include <Geom2dHatch_Hatcher.hxx>
-
#include <HatchGen_Domain.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
-
+//
#include <TopTools_ListOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPTools_Tools2D.hxx>
#include <BOPTools_Tools.hxx>
+#include <NMTTools_ListOfCoupleOfShape.hxx>
+#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
+#include <NMTTools_CoupleOfShape.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
-
+//
#include <GeomAdaptor_Surface.hxx>
+//
static
Standard_Boolean FindFacePairs (const TopoDS_Edge& ,
const TopTools_ListOfShape& ,
Standard_Real aT,
gp_Pnt& aPF,
gp_Dir& aDNF,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aCtx);
-#else
- IntTools_Context& aCtx);
-#endif
//=======================================================================
//function : IsInternalFace
const TopoDS_Solid& theSolid,
const TopTools_IndexedDataMapOfShapeListOfShape& theMEF,
const Standard_Real theTol,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& theContext)
-#else
- IntTools_Context& theContext)
-#endif
{
Standard_Boolean bRet;
Standard_Integer aNbF;
Standard_Boolean GEOMAlgo_Tools3D::IsInternalFace(const TopoDS_Face& theFace,
const TopoDS_Edge& theEdge,
const TopTools_ListOfShape& theLF,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& theContext)
-#else
- IntTools_Context& theContext)
-#endif
{
Standard_Boolean bRet;
Standard_Boolean aNbF;
const TopoDS_Edge& theEdge,
const TopoDS_Face& theFace1,
const TopoDS_Face& theFace2,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& theContext)
-#else
- IntTools_Context& theContext)
-#endif
{
Standard_Boolean bRet;
Standard_Real aT1, aT2, aT, aDt2D, aDt2Dx;
const TopoDS_Solid& theRef,
const Standard_Real theTol,
const TopTools_IndexedMapOfShape& theBounds,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& theCtx)
-#else
- IntTools_Context& theCtx)
-#endif
{
TopAbs_State aState;
TopExp_Explorer aExp;
TopAbs_State GEOMAlgo_Tools3D::ComputeStateByOnePoint(const TopoDS_Shape& theS,
const TopoDS_Solid& theRef,
const Standard_Real theTol,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& theCtx)
-#else
- IntTools_Context& theCtx)
-#endif
{
TopAbs_State aState;
TopAbs_ShapeEnum aType;
TopAbs_State GEOMAlgo_Tools3D::ComputeState(const TopoDS_Vertex& theV,
const TopoDS_Solid& theRef,
const Standard_Real theTol,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& theCtx)
-#else
- IntTools_Context& theCtx)
-#endif
{
TopAbs_State aState;
gp_Pnt aP3D;
TopAbs_State GEOMAlgo_Tools3D::ComputeState(const TopoDS_Edge& theE,
const TopoDS_Solid& theRef,
const Standard_Real theTol,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& theCtx)
-#else
- IntTools_Context& theCtx)
-#endif
{
Standard_Real aT1, aT2, aT = 0.;
TopAbs_State aState;
TopAbs_State GEOMAlgo_Tools3D::ComputeState(const gp_Pnt& theP,
const TopoDS_Solid& theRef,
const Standard_Real theTol,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& theCtx)
-#else
- IntTools_Context& theCtx)
-#endif
{
TopAbs_State aState;
//
-#if OCC_VERSION_LARGE > 0x06050200
BRepClass3d_SolidClassifier& aSC=theCtx->SolidClassifier(theRef);
-#else
- BRepClass3d_SolidClassifier& aSC=theCtx.SolidClassifier(theRef);
-#endif
aSC.Perform(theP, theTol);
//
aState=aSC.State();
// function: IsSplitToReverse
// purpose:
//=======================================================================
-Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse (const TopoDS_Shape& theSp,
+ Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse(const TopoDS_Shape& theSp,
const TopoDS_Shape& theSr,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& theCtx)
-#else
- IntTools_Context& theCtx)
-#endif
{
Standard_Boolean bRet;
TopAbs_ShapeEnum aType;
//function :IsSplitToReverse
//purpose :
//=======================================================================
-Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse (const TopoDS_Face& theFSp,
+ Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse(const TopoDS_Face& theFSp,
const TopoDS_Face& theFSr,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& theContext)
-#else
- IntTools_Context& theContext)
-#endif
{
Standard_Boolean bRet, bFound, bInFace;
Standard_Real aT1, aT2, aT, aU, aV, aScPr;
//modified by NIZNHY-PKV Tue Nov 22 10:50:37 2011t
//
// Parts of theContext.ComputeVS(..)
-#if OCC_VERSION_LARGE > 0x06050200
GeomAPI_ProjectPointOnSurf& aProjector=theContext->ProjPS(theFSr);
-#else
- GeomAPI_ProjectPointOnSurf& aProjector=theContext.ProjPS(theFSr);
-#endif
aProjector.Perform(aPFSp);
if (!aProjector.IsDone()) {
return bRet;
//
aProjector.LowerDistanceParameters(aU, aV);
gp_Pnt2d aP2D(aU, aV);
-#if OCC_VERSION_LARGE > 0x06050200
bInFace=theContext->IsPointInFace (theFSr, aP2D);
-#else
- bInFace=theContext.IsPointInFace (theFSr, aP2D);
-#endif
if (!bInFace) {
return bRet;
}
//function :IsSplitToReverse
//purpose :
//=======================================================================
-Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse (const TopoDS_Edge& theSplit,
+ Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse(const TopoDS_Edge& theSplit,
const TopoDS_Edge& theEdge,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& theContext)
-#else
- IntTools_Context& theContext)
-#endif
{
Standard_Boolean bRet, aFlag, bIsDegenerated;
Standard_Real aTE, aTS, aScPr, aTa, aTb, aT1, aT2;
aFlag=BOPTools_Tools2D::EdgeTangent(theSplit, aTS, aVS);
gp_Dir aDTS(aVS);
//
-#if OCC_VERSION_LARGE > 0x06050200
aFlag=theContext->ProjectPointOnEdge(aP, theEdge, aTE);
-#else
- aFlag=theContext.ProjectPointOnEdge(aP, theEdge, aTE);
-#endif
aFlag=BOPTools_Tools2D::EdgeTangent(theEdge, aTE, aVE);
gp_Dir aDTE(aVE);
//
Standard_Real aT,
gp_Pnt& aPF,
gp_Dir& aDNF,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aCtx)
-#else
- IntTools_Context& aCtx)
-#endif
{
Standard_Boolean bReverse;
Standard_Real aT1, aT2, dT, aU, aV;
aDNF.Reverse();
}
//
-#if OCC_VERSION_LARGE > 0x06050200
GeomAPI_ProjectPointOnSurf& aProjector=aCtx->ProjPS(aF);
-#else
- GeomAPI_ProjectPointOnSurf& aProjector=aCtx.ProjPS(aF);
-#endif
//
aProjector.Perform(aPFx);
if(aProjector.IsDone()) {
//modified by NIZNHY-PKV Tue Nov 22 10:36:59 2011f
//=======================================================================
//function : PntInFace
-//purpose :
+//purpose :
//=======================================================================
-Standard_Integer GEOMAlgo_Tools3D::PntInFace(const TopoDS_Face& aF,
+Standard_Integer GEOMAlgo_Tools3D::PntInFace(const TopoDS_Face& aF,
gp_Pnt& theP,
gp_Pnt2d& theP2D)
{
aTolTangfIntr=1.e-10;
//
Geom2dHatch_Intersector aIntr(aTotArcIntr, aTolTangfIntr);
- Geom2dHatch_Hatcher aHatcher(aIntr,
- aTolHatch2D, aTolHatch3D,
+ Geom2dHatch_Hatcher aHatcher(aIntr,
+ aTolHatch2D, aTolHatch3D,
Standard_True, Standard_False);
//
iErr=0;
//
aFF=aF;
aFF.Orientation (TopAbs_FORWARD);
- //
+ //
aS=BRep_Tool::Surface(aFF);
BRepTools::UVBounds(aFF, aUMin, aUMax, aVMin, aVMax);
//
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File : GEOMAlgo_Tools3D.hxx
+// Created :
+// Author : Peter KURNEV
#ifndef _GEOMAlgo_Tools3D_HeaderFile
#define _GEOMAlgo_Tools3D_HeaderFile
-#include <Basics_OCCTVersion.hxx>
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-#if OCC_VERSION_LARGE > 0x06050200
-#ifndef _Handle_IntTools_Context_HeaderFile
#include <Handle_IntTools_Context.hxx>
-#endif
-#endif
-#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
-#endif
-#ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx>
-#endif
-#ifndef _TopAbs_State_HeaderFile
#include <TopAbs_State.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
-#endif
-
-class TopoDS_Shape;
-class IntTools_Context;
-class TopoDS_Face;
-class TopoDS_Edge;
-class TopTools_ListOfShape;
-class TopTools_IndexedMapOfShape;
-class TopoDS_Solid;
-class gp_Pnt;
-class gp_Pnt2d;
-class TopoDS_Vertex;
-class TopTools_IndexedDataMapOfShapeListOfShape;
-class NMTTools_ListOfCoupleOfShape;
+#include <NMTTools_ListOfCoupleOfShape.hxx>
+#include <TopoDS_Shape.hxx>
+#include <IntTools_Context.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopoDS_Solid.hxx>
+#include <gp_Pnt.hxx>
+#include <TopoDS_Vertex.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <gp_Pnt2d.hxx>
//! Auxiliary tools for Algorithms <br>
+//=======================================================================
+//class : GEOMAlgo_Tools3D
+//purpose :
+//=======================================================================
class GEOMAlgo_Tools3D {
-
-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);
- }
-
+ public:
//! Returns True if the shape theSplit has opposite <br>
//! direction than theShape <br>
//! theContext - cashed geometrical tools <br>
- Standard_EXPORT static Standard_Boolean IsSplitToReverse (const TopoDS_Shape& theSplit,
- const TopoDS_Shape& theShape,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& theContext);
-#else
- IntTools_Context& theContext);
-#endif
+ Standard_EXPORT
+ static Standard_Boolean IsSplitToReverse(const TopoDS_Shape& theSplit,
+ const TopoDS_Shape& theShape,
+ const Handle(IntTools_Context)& theContext) ;
//! Returns True if normal direction of the face <br>
//! theShape is not the same as for the face <br>
//! theSplit <br>
//! theContext - cashed geometrical tools <br>
- Standard_EXPORT static Standard_Boolean IsSplitToReverse (const TopoDS_Face& theSplit,
- const TopoDS_Face& theShape,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& theContext);
-#else
- IntTools_Context& theContext);
-#endif
+ Standard_EXPORT
+ static Standard_Boolean IsSplitToReverse(const TopoDS_Face& theSplit,
+ const TopoDS_Face& theShape,
+ const Handle(IntTools_Context)& theContext) ;
//! Returns True if tangent direction of the edge <br>
//! theEdge is not the same as for the edge <br>
//! theSplit <br>
//! theContext - cashed geometrical tools <br>
- Standard_EXPORT static Standard_Boolean IsSplitToReverse (const TopoDS_Edge& theEdge,
- const TopoDS_Edge& theSplit,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& theContext);
-#else
- IntTools_Context& theContext);
-#endif
+ Standard_EXPORT
+ static Standard_Boolean IsSplitToReverse(const TopoDS_Edge& theEdge,
+ const TopoDS_Edge& theSplit,
+ const Handle(IntTools_Context)& theContext) ;
//! For the couple of faces theF1, theF2 <br>
//! computes sense value <br>
//! Returns 0 if the faces are not sensible <br>
//! Returns 1 if the faces have same sense <br>
//! Returns 2 if the faces have opposite sense <br>
- Standard_EXPORT static Standard_Integer Sense (const TopoDS_Face& theF1, const TopoDS_Face& theF2);
+ Standard_EXPORT
+ static Standard_Integer Sense(const TopoDS_Face& theF1,
+ const TopoDS_Face& theF2) ;
//! Makes new face theF2 from surface and wires <br>
//! of the face theF1 <br>
- Standard_EXPORT static void CopyFace (const TopoDS_Face& theF1, TopoDS_Face& theF2);
+ Standard_EXPORT
+ static void CopyFace(const TopoDS_Face& theF1,
+ TopoDS_Face& theF2) ;
//! Makes empty shape theShape of the type theType <br>
- Standard_EXPORT static void MakeContainer (const TopAbs_ShapeEnum theType, TopoDS_Shape& theShape);
+ Standard_EXPORT
+ static void MakeContainer(const TopAbs_ShapeEnum theType,
+ TopoDS_Shape& theShape) ;
//! For the list of faces theLS build block <br>
//! theLSCB in terms of connexity by edges <br>
//! theMapAvoid - set of edges to avoid for <br>
//! the treatment <br>
- Standard_EXPORT static void MakeConnexityBlock (const TopTools_ListOfShape& theLS,
- const TopTools_IndexedMapOfShape& theMapAvoid,
- TopTools_ListOfShape& theLSCB);
+ Standard_EXPORT
+ static void MakeConnexityBlock(const TopTools_ListOfShape& theLS,
+ const TopTools_IndexedMapOfShape& theMapAvoid,
+ TopTools_ListOfShape& theLSCB) ;
//! Computes the 3-D state of the shape theShape <br>
//! toward solid theSolid. <br>
//! theTol - value of precision of computation <br>
//! theContext- cahed geometrical tools <br>
//! Returns 3-D state. <br>
- Standard_EXPORT static TopAbs_State ComputeStateByOnePoint (const TopoDS_Shape& theShape,
- const TopoDS_Solid& theSolid,
- const Standard_Real theTol,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& theContext);
-#else
- IntTools_Context& theContext);
-#endif
+ Standard_EXPORT
+ static TopAbs_State ComputeStateByOnePoint(const TopoDS_Shape& theShape,
+ const TopoDS_Solid& theSolid,
+ const Standard_Real theTol,
+ const Handle(IntTools_Context)& theContext) ;
//! Computes the 3-D state of the point thePoint <br>
//! toward solid theSolid. <br>
//! theTol - value of precision of computation <br>
//! theContext- cahed geometrical tools <br>
//! Returns 3-D state. <br>
- Standard_EXPORT static TopAbs_State ComputeState (const gp_Pnt& thePoint,
- const TopoDS_Solid& theSolid,
- const Standard_Real theTol,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& theContext);
-#else
- IntTools_Context& theContext);
-#endif
+ Standard_EXPORT
+ static TopAbs_State ComputeState(const gp_Pnt& thePoint,
+ const TopoDS_Solid& theSolid,
+ const Standard_Real theTol,
+ const Handle(IntTools_Context)& theContext) ;
//! Computes the 3-D state of the vertex theVertex <br>
//! toward solid theSolid. <br>
//! theTol - value of precision of computation <br>
//! theContext- cahed geometrical tools <br>
//! Returns 3-D state. <br>
- Standard_EXPORT static TopAbs_State ComputeState (const TopoDS_Vertex& theVertex,
- const TopoDS_Solid& theSolid,
- const Standard_Real theTol,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& theContext);
-#else
- IntTools_Context& theContext);
-#endif
+ Standard_EXPORT
+ static TopAbs_State ComputeState(const TopoDS_Vertex& theVertex,
+ const TopoDS_Solid& theSolid,
+ const Standard_Real theTol,
+ const Handle(IntTools_Context)& theContext) ;
//! Computes the 3-D state of the edge theEdge <br>
//! toward solid theSolid. <br>
//! theTol - value of precision of computation <br>
//! theContext- cahed geometrical tools <br>
//! Returns 3-D state. <br>
- Standard_EXPORT static TopAbs_State ComputeState (const TopoDS_Edge& theEdge,
- const TopoDS_Solid& theSolid,
- const Standard_Real theTol,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& theContext);
-#else
- IntTools_Context& theContext);
-#endif
+ Standard_EXPORT
+ static TopAbs_State ComputeState(const TopoDS_Edge& theEdge,
+ const TopoDS_Solid& theSolid,
+ const Standard_Real theTol,
+ const Handle(IntTools_Context)& theContext) ;
//! Computes the 3-D state of the face theFace <br>
//! toward solid theSolid. <br>
//! theBounds - set of edges of theFace to avoid <br>
//! theContext- cahed geometrical tools <br>
//! Returns 3-D state. <br>
- Standard_EXPORT static TopAbs_State ComputeState (const TopoDS_Face& theFace,
- const TopoDS_Solid& theSolid,
- const Standard_Real theTol,
- const TopTools_IndexedMapOfShape& theBounds,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& theContext);
-#else
- IntTools_Context& theContext);
-#endif
+ Standard_EXPORT
+ static TopAbs_State ComputeState(const TopoDS_Face& theFace,
+ const TopoDS_Solid& theSolid,
+ const Standard_Real theTol,
+ const TopTools_IndexedMapOfShape& theBounds,
+ const Handle(IntTools_Context)& theContext) ;
//! Returns True if the face theFace is inside of the <br>
//! couple of faces theFace1, theFace2. <br>
//! The faces theFace, theFace1, theFace2 must <br>
//! share the edge theEdge <br>
- Standard_EXPORT static Standard_Boolean IsInternalFace (const TopoDS_Face& theFace,
- const TopoDS_Edge& theEdge,
- const TopoDS_Face& theFace1,
- const TopoDS_Face& theFace2,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& theContext);
-#else
- IntTools_Context& theContext);
-#endif
+ Standard_EXPORT
+ static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace,
+ const TopoDS_Edge& theEdge,
+ const TopoDS_Face& theFace1,
+ const TopoDS_Face& theFace2,
+ const Handle(IntTools_Context)& theContext) ;
//! Returns True if the face theFace is inside of the <br>
//! appropriate couple of faces (from the set theLF) . <br>
//! The faces of the set theLF and theFace must <br>
//! share the edge theEdge <br>
- Standard_EXPORT static Standard_Boolean IsInternalFace (const TopoDS_Face& theFace,
- const TopoDS_Edge& theEdge,
- const TopTools_ListOfShape& theLF,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& theContext);
-#else
- IntTools_Context& theContext);
-#endif
+ Standard_EXPORT
+ static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace,
+ const TopoDS_Edge& theEdge,
+ const TopTools_ListOfShape& theLF,
+ const Handle(IntTools_Context)& theContext) ;
//! Returns True if the face theFace is inside the <br>
//! solid theSolid. <br>
//! theMEF - Map Edge/Faces for theSolid <br>
//! theTol - value of precision of computation <br>
//! theContext- cahed geometrical tools <br>
- Standard_EXPORT static Standard_Boolean IsInternalFace (const TopoDS_Face& theFace,
- const TopoDS_Solid& theSolid,
- const TopTools_IndexedDataMapOfShapeListOfShape& theMEF,
- const Standard_Real theTol,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& theContext);
-#else
- IntTools_Context& theContext);
-#endif
+ Standard_EXPORT
+ static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace,
+ const TopoDS_Solid& theSolid,
+ const TopTools_IndexedDataMapOfShapeListOfShape& theMEF,
+ const Standard_Real theTol,
+ const Handle(IntTools_Context)& theContext) ;
//! For the face theFace and its edge theEdge <br>
//! finds the face suitable to produce shell. <br>
//! theLCEF - set of faces to search. All faces <br>
//! from theLCEF must share edge theEdge <br>
- Standard_EXPORT static void GetFaceOff (const TopoDS_Edge& theEdge,
- const TopoDS_Face& theFace,
- const NMTTools_ListOfCoupleOfShape& theLCEF,
- TopoDS_Face& theFaceOff);
+ Standard_EXPORT
+ static void GetFaceOff(const TopoDS_Edge& theEdge,
+ const TopoDS_Face& theFace,
+ const NMTTools_ListOfCoupleOfShape& theLCEF,
+ TopoDS_Face& theFaceOff) ;
//! For the face theFace gets the edge theEdgeOnF <br>
//! that is the same as theEdge <br>
//! Returns True if such edge exists <br>
//! Returns False if there is no such edge <br>
- Standard_EXPORT static Standard_Boolean GetEdgeOnFace (const TopoDS_Edge& theEdge,
- const TopoDS_Face& theFace,
- TopoDS_Edge& theEdgeOnF);
+ Standard_EXPORT
+ static Standard_Boolean GetEdgeOnFace(const TopoDS_Edge& theEdge,
+ const TopoDS_Face& theFace,
+ TopoDS_Edge& theEdgeOnF) ;
//! Returns True if the face theFace contains <br>
//! the edge theEdge but with opposite orientation. <br>
//! If the method returns True theEdgeOff is the <br>
//! edge founded <br>
- Standard_EXPORT static Standard_Boolean GetEdgeOff (const TopoDS_Edge& theEdge,
- const TopoDS_Face& theFace,
- TopoDS_Edge& theEdgeOff);
+ Standard_EXPORT
+ static Standard_Boolean GetEdgeOff(const TopoDS_Edge& theEdge,
+ const TopoDS_Face& theFace,
+ TopoDS_Edge& theEdgeOff) ;
//! Computes a point <theP> inside the face <theF>. <br>
//! <theP2D> - 2D representation of <theP> <br>
//! on the surface of <theF> <br>
//! Returns 0 in case of success. <br>
- Standard_EXPORT static Standard_Integer PntInFace (const TopoDS_Face& theF,
- gp_Pnt& theP,
- gp_Pnt2d& theP2D);
-
-protected:
-
-private:
-
+ Standard_EXPORT
+ static Standard_Integer PntInFace(const TopoDS_Face& theF,
+ gp_Pnt& theP,
+ gp_Pnt2d& theP2D) ;
};
-
-// other Inline functions and methods (like "C++: function call" methods)
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Tools3D.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _IntTools_Context_HeaderFile
-#include <IntTools_Context.hxx>
-#endif
-#ifndef _TopoDS_Face_HeaderFile
-#include <TopoDS_Face.hxx>
-#endif
-#ifndef _TopoDS_Edge_HeaderFile
-#include <TopoDS_Edge.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TopTools_IndexedMapOfShape_HeaderFile
-#include <TopTools_IndexedMapOfShape.hxx>
-#endif
-#ifndef _TopoDS_Solid_HeaderFile
-#include <TopoDS_Solid.hxx>
-#endif
-#ifndef _gp_Pnt_HeaderFile
-#include <gp_Pnt.hxx>
-#endif
-#ifndef _TopoDS_Vertex_HeaderFile
-#include <TopoDS_Vertex.hxx>
-#endif
-#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#endif
-#ifndef _NMTTools_ListOfCoupleOfShape_HeaderFile
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#endif
-#ifndef _gp_Pnt2d_HeaderFile
-#include <gp_Pnt2d.hxx>
-#endif
-#ifndef _GEOMAlgo_Tools3D_HeaderFile
-#include <GEOMAlgo_Tools3D.hxx>
-#endif
// Author: Peter KURNEV
// <pkv@irinox>
-#include <GEOMAlgo_Tools.ixx>
+#include <GEOMAlgo_Tools.hxx>
//
#include <NCollection_DataMap.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <BRepTools.hxx>
-static
- inline Standard_Boolean IsEqual(const TopoDS_Shape& aS1,
+static
+ inline Standard_Boolean IsEqual(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2) {
return TopTools_ShapeMapHasher::IsEqual(aS1, aS2);
}
//=======================================================================
//function : CorrectWires
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_Tools::CorrectWires(const TopoDS_Shape& aShape)
{
TopTools_MapOfShape aMF;
GeomAdaptor_Surface aGAS;
GeomAbs_SurfaceType aTS;
- TopLoc_Location aLoc;
+ TopLoc_Location aLoc;
//
bRet=Standard_False;
//
}
//=======================================================================
//class: GEOMAlgo_InfoEdge
-//purpose :
+//purpose :
//=======================================================================
class GEOMAlgo_InfoEdge {
public:
~GEOMAlgo_InfoEdge(){
};
//
- void Init(const TopoDS_Edge& aE,
+ void Init(const TopoDS_Edge& aE,
const TopoDS_Face& aF);
//
void SetTolInt(const Standard_Real aTolInt) {
Handle(Geom_Curve) myC3D;
};
//
-typedef NCollection_DataMap<TopoDS_Shape, GEOMAlgo_InfoEdge> GEOMAlgo_DataMapOfShapeInfoEdge;
-typedef GEOMAlgo_DataMapOfShapeInfoEdge::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeInfoEdge;
+typedef NCollection_DataMap<TopoDS_Shape, GEOMAlgo_InfoEdge> GEOMAlgo_DataMapOfShapeInfoEdge;
+typedef GEOMAlgo_DataMapOfShapeInfoEdge::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeInfoEdge;
//=======================================================================
//function : Init
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_InfoEdge::Init(const TopoDS_Edge& aE,
+ void GEOMAlgo_InfoEdge::Init(const TopoDS_Edge& aE,
const TopoDS_Face& aF)
{
Standard_Real aT1, aT2, aT1x, aT2x;
}
//=======================================================================
//function : CorrectWire
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean CorrectWire(const TopoDS_Wire& aW,
const TopoDS_Face& aF)
aItW.Initialize(aW);
for (; aItW.More(); aItW.Next()) {
const TopoDS_Edge& aE=*((TopoDS_Edge*)&aItW.Value());
-
+
aItE.Initialize(aE);
for (aNbV=0; aItE.More(); aItE.Next(), ++aNbV) {
}
aTolV=BRep_Tool::Tolerance(aV);
//
const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aLE.First());
- const GEOMAlgo_InfoEdge& aIE1=aDMEIE.Find(aE1);
+ const GEOMAlgo_InfoEdge& aIE1=aDMEIE.Find(aE1);
const Geom2dAdaptor_Curve& aGAC1=aIE1.Adaptor();
const IntRes2d_Domain& aDomain1=aIE1.Domain();
//
- const TopoDS_Edge& aE2=*((TopoDS_Edge*)&aLE.Last());
+ const TopoDS_Edge& aE2=*((TopoDS_Edge*)&aLE.Last());
const GEOMAlgo_InfoEdge& aIE2=aDMEIE.Find(aE2);
const Geom2dAdaptor_Curve& aGAC2=aIE2.Adaptor();
const IntRes2d_Domain& aDomain2=aIE2.Domain();
//
aInter.Perform(aGAC1, aDomain1,aGAC2, aDomain2, aTolInt, aTolInt);
- if(!aInter.IsDone()) {
+ if(!aInter.IsDone()) {
continue;
}
//
aS->D0(aP2D1.X(), aP2D1.Y(), aP3D1);
}
//
- const Handle(Geom_Curve)& aC3D2=aIE2.Curve();
+ const Handle(Geom_Curve)& aC3D2=aIE2.Curve();
if (!aC3D2.IsNull()) {
aP3D2=aC3D2->Value(aIP_ParamOnSecond);
}
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_VertexSolid.cdl
--- Created: Wed Jan 12 16:34:53 2005
--- Author: Peter KURNEV
---
-class VertexSolid from GEOMAlgo
- inherits ShapeSolid from GEOMAlgo
-
- ---Purpose:
-
---uses
---raises
-
-is
- Create
- returns VertexSolid from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_VertexSolid();"
-
- Perform (me:out)
- is redefined;
-
- Prepare(me:out)
- is redefined protected;
-
- BuildResult (me:out)
- is redefined protected;
-
---fields
-
-end VertexSolid;
// File: GEOMAlgo_VertexSolid.cxx
// Created: Wed Jan 12 16:36:40 2005
// Author: Peter KURNEV
-
-#include <GEOMAlgo_VertexSolid.ixx>
-
-#include <Basics_OCCTVersion.hxx>
+// <pkv@irinox>
+//
+#include <GEOMAlgo_VertexSolid.hxx>
#include <gp_Pnt.hxx>
//=======================================================================
//function : GEOMAlgo_VertexSolid
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_VertexSolid::GEOMAlgo_VertexSolid()
:
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_VertexSolid::~GEOMAlgo_VertexSolid()
{
}
//=======================================================================
// function: Perform
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_VertexSolid::Perform()
{
myRank=(aNbF) ? 2 : 1;
//
bIsNewFiller=myDSFiller->IsNewFiller();
-
+
if (bIsNewFiller) {
Prepare();
myDSFiller->SetNewFiller(!bIsNewFiller);
catch (Standard_Failure) {
myErrorStatus = 12;
}
-}
+}
//=======================================================================
// function: Prepare
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_VertexSolid::Prepare()
{
BOPTools_InterferencePool* pIP=(BOPTools_InterferencePool*) &aIP;
BOPTools_CArray1OfVVInterference& aVVs=pIP->VVInterferences();
const BOPTools_PaveFiller& aPF=myDSFiller->PaveFiller();
- BOPTools_PaveFiller* pPF=(BOPTools_PaveFiller*)&aPF;
-#if OCC_VERSION_LARGE > 0x06050200
+ BOPTools_PaveFiller* pPF=(BOPTools_PaveFiller*)&aPF;
const Handle(IntTools_Context)& aCtx=pPF->Context();
-#else
- IntTools_Context& aCtx=pPF->ChangeContext();
-#endif
//
const TopoDS_Shape& aObj=aDS.Object();
const TopoDS_Shape& aTool=aDS.Tool();
//
const TopoDS_Solid& aSolid=(myRank==1) ? TopoDS::Solid(aTool) : TopoDS::Solid(aObj);
//
-#if OCC_VERSION_LARGE > 0x06050200
BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSolid);
-#else
- BRepClass3d_SolidClassifier& aSC=aCtx.SolidClassifier(aSolid);
-#endif
//
iBeg=1;
iEnd=aDS.NumberOfShapesOfTheObject();
pDS->SetState (n2, BooleanOperations_ON);
iFound=1;
break;
- }
+ }
}
if (iFound) {
continue;
}
- //
+ //
aP3D=BRep_Tool::Pnt(aV);
aTol=1.E-7;
aSC.Perform(aP3D, aTol);
}
//=======================================================================
// function: BuildResult
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_VertexSolid::BuildResult()
{
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_VertexSolid.hxx
+// Created: Wed Jan 12 16:36:40 2005
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _GEOMAlgo_VertexSolid_HeaderFile
#define _GEOMAlgo_VertexSolid_HeaderFile
-#ifndef _GEOMAlgo_ShapeSolid_HeaderFile
-#include <GEOMAlgo_ShapeSolid.hxx>
-#endif
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_VertexSolid : public GEOMAlgo_ShapeSolid {
-
-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_VertexSolid();
-Standard_EXPORT virtual ~GEOMAlgo_VertexSolid();
-
-
-Standard_EXPORT virtual void Perform() ;
-
+#include <GEOMAlgo_ShapeSolid.hxx>
+//=======================================================================
+//class : GEOMAlgo_VertexSolid
+//purpose :
+//=======================================================================
+class GEOMAlgo_VertexSolid : public GEOMAlgo_ShapeSolid
+{
+ public:
+ Standard_EXPORT
+ GEOMAlgo_VertexSolid();
+ Standard_EXPORT
+ virtual ~GEOMAlgo_VertexSolid();
+ Standard_EXPORT
+ virtual void Perform() ;
protected:
+ Standard_EXPORT
+ virtual void Prepare() ;
- // Methods PROTECTED
- //
-
-
-Standard_EXPORT virtual void Prepare() ;
-
-
-Standard_EXPORT virtual void BuildResult() ;
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+ Standard_EXPORT
+ virtual void BuildResult() ;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_VertexSolid.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_VertexSolid_HeaderFile
-#include <GEOMAlgo_VertexSolid.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_WESCorrector.cdl
--- Created:
--- Author: Peter KURNEV
---
-class WESCorrector from GEOMAlgo
- inherits Algo from GEOMAlgo
-
- ---Purpose:
- --- The algorithm to change the Wire Edges Set (WES) contents.
- -- The NewWES will contain only wires instead of wires and edges.
- --
-uses
- WireEdgeSet from GEOMAlgo,
- PWireEdgeSet from GEOMAlgo,
- ListOfConnexityBlock from BOP
-
-is
- Create
- returns WESCorrector from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_WESCorrector();"
- ---Purpose:
- -- Empty constructor;
- --
-
- SetWES (me:out;
- aWES: WireEdgeSet from GEOMAlgo);
- ---Purpose:
- -- Modifier
- --
- Perform (me:out)
- is redefined;
- ---Purpose:
- --- Performs the algorithm that consists of two steps
- --- 1. Make conexity blocks ( DoConnexityBlocks() )
- --- 2. Make corrections ( DoCorrections() )
- ---
-
- WES (me:out)
- returns WireEdgeSet from GEOMAlgo;
- ---C++: return &
- ---Purpose:
- --- Selector
- ---
- NewWES (me:out)
- returns WireEdgeSet from GEOMAlgo;
- ---C++: return &
- ---Purpose:
- --- Selector
- ---
- DoConnexityBlocks(me:out)
- is protected;
-
- DoCorrections(me:out)
- is protected;
-
-fields
-
- myWES : PWireEdgeSet from GEOMAlgo is protected;
- myNewWES : WireEdgeSet from GEOMAlgo is protected;
- myConnexityBlocks : ListOfConnexityBlock from BOP is protected;
-
-end WESCorrector;
// File: NMTAlgo_WESCorrector.cxx
// Author: Peter KURNEV
-#include <GEOMAlgo_WESCorrector.ixx>
+#include <GEOMAlgo_WESCorrector.hxx>
#include <Geom_Surface.hxx>
Standard_Real& aScale)
{
Standard_Boolean bRet;
+ Standard_Real aV1, aV2, dV, aTr;
GeomAbs_SurfaceType aType;
BRepAdaptor_Surface aBAS;
//
aBAS.Initialize(aF);
aType=aBAS.GetType();
if (aType==GeomAbs_Cylinder) {
- Standard_Real aV1, aV2, dV, dU, aTr, aC;
- //
aTr=1.e5;
aV1=aBAS.FirstVParameter();
aV2=aBAS.LastVParameter();
aScale=1./aTr;
return bRet;
}
- //modified by NIZNHY-PKV Fri Mar 30 10:54:34 2012f
- dU=M_PI;
- aC=dV/dU;
- aTr=25.;
- if(aC>aTr){
- bRet=!bRet;
- aScale=1./aC;
- return bRet;
- }
- //modified by NIZNHY-PKV Fri Mar 30 10:54:35 2012t
}
return bRet;
}
+
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
+// File: NMTAlgo_WESCorrector.hxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _GEOMAlgo_WESCorrector_HeaderFile
#define _GEOMAlgo_WESCorrector_HeaderFile
-#ifndef _GEOMAlgo_PWireEdgeSet_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <GEOMAlgo_PWireEdgeSet.hxx>
-#endif
-#ifndef _GEOMAlgo_WireEdgeSet_HeaderFile
#include <GEOMAlgo_WireEdgeSet.hxx>
-#endif
-#ifndef _BOP_ListOfConnexityBlock_HeaderFile
#include <BOP_ListOfConnexityBlock.hxx>
-#endif
-#ifndef _GEOMAlgo_Algo_HeaderFile
#include <GEOMAlgo_Algo.hxx>
-#endif
-class GEOMAlgo_WireEdgeSet;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
//! The algorithm to change the Wire Edges Set (WES) contents. <br>
//! The NewWES will contain only wires instead of wires and edges. <br>
-class GEOMAlgo_WESCorrector : public GEOMAlgo_Algo {
-
-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
- //
-
-
-//! Empty constructor; <br>
-//! <br>
-Standard_EXPORT GEOMAlgo_WESCorrector();
-Standard_EXPORT virtual ~GEOMAlgo_WESCorrector();
-
-
-//! Modifier <br>
-Standard_EXPORT void SetWES(const GEOMAlgo_WireEdgeSet& aWES) ;
-
-
-//! Performs the algorithm that consists of two steps <br>
-//! 1. Make conexity blocks ( DoConnexityBlocks() ) <br>
-//! 2. Make corrections ( DoCorrections() ) <br>
-Standard_EXPORT virtual void Perform() ;
-
-
-//! Selector <br>
-Standard_EXPORT GEOMAlgo_WireEdgeSet& WES() ;
-
-
-//! Selector <br>
-Standard_EXPORT GEOMAlgo_WireEdgeSet& NewWES() ;
-
-
-
-
+//=======================================================================
+//class : GEOMAlgo_WESCorrector
+//purpose :
+//=======================================================================
+class GEOMAlgo_WESCorrector : public GEOMAlgo_Algo
+{
+ public:
+ //! Empty constructor; <br>
+ //! <br>
+ Standard_EXPORT
+ GEOMAlgo_WESCorrector();
+
+ Standard_EXPORT
+ virtual ~GEOMAlgo_WESCorrector();
+
+ //! Modifier <br>
+ Standard_EXPORT
+ void SetWES(const GEOMAlgo_WireEdgeSet& aWES) ;
+
+ //! Performs the algorithm that consists of two steps <br>
+ //! 1. Make conexity blocks ( DoConnexityBlocks() ) <br>
+ //! 2. Make corrections ( DoCorrections() ) <br>
+ Standard_EXPORT
+ virtual void Perform() ;
+
+ //! Selector <br>
+ Standard_EXPORT
+ GEOMAlgo_WireEdgeSet& WES() ;
+
+ //! Selector <br>
+ Standard_EXPORT
+ GEOMAlgo_WireEdgeSet& NewWES() ;
protected:
+ Standard_EXPORT
+ void DoConnexityBlocks() ;
- // Methods PROTECTED
- //
-
-
-Standard_EXPORT void DoConnexityBlocks() ;
-
-
-Standard_EXPORT void DoCorrections() ;
-
-
- // Fields PROTECTED
- //
-GEOMAlgo_PWireEdgeSet myWES;
-GEOMAlgo_WireEdgeSet myNewWES;
-BOP_ListOfConnexityBlock myConnexityBlocks;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
+ Standard_EXPORT
+ void DoCorrections() ;
+ GEOMAlgo_PWireEdgeSet myWES;
+ GEOMAlgo_WireEdgeSet myNewWES;
+ BOP_ListOfConnexityBlock myConnexityBlocks;
};
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_WESCorrector.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_WireEdgeSet_HeaderFile
-#include <GEOMAlgo_WireEdgeSet.hxx>
-#endif
-#ifndef _GEOMAlgo_WESCorrector_HeaderFile
-#include <GEOMAlgo_WESCorrector.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- 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_WESScaler.cdl
--- Created:
--- Author:
--- <pkv@VORTEX>
-
-
-class WESScaler from GEOMAlgo
- inherits Algo from GEOMAlgo
-
- ---Purpose:
-
-uses
- Face from TopoDS,
- Shape from TopoDS,
- ListOfShape from TopTools,
- DataMapOfOrientedShapeShape from GEOMAlgo,
- WireEdgeSet from GEOMAlgo,
- PWireEdgeSet from GEOMAlgo
-
---raises
-
-is
- Create
- ---Purpose: Empty constructor
- returns WESScaler from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_WESScaler();"
-
- SetScale (me:out;
- aWES: Real from Standard);
- ---Purpose:
- -- Modifier
-
- Scale(me)
- returns Real from Standard;
- ---Purpose:
- -- Selector
-
- SetFace (me:out;
- aF: Face from TopoDS);
-
- Face (me)
- returns Face from TopoDS;
- ---C++: return const &
-
- SetEdges (me:out;
- aLE:ListOfShape from TopTools);
-
- Edges (me)
- returns ListOfShape from TopTools;
- ---C++: return const &
-
- Perform(me:out)
- ---Purpose: Performs the algorithm
- is redefined;
-
- FaceScaled (me)
- returns Face from TopoDS;
- ---C++: return const &
-
- EdgesScaled (me)
- returns ListOfShape from TopTools;
- ---C++: return const &
-
- Image(me;
- aS:Shape from TopoDS)
- returns Shape from TopoDS;
- ---C++: return const &
- ---Purpose:
-
- Origin(me;
- aS:Shape from TopoDS)
- returns Shape from TopoDS;
- ---C++: return const &
-
- ---Purpose:
- Images(me)
- returns DataMapOfOrientedShapeShape from GEOMAlgo;
- ---C++: return const &
- ---Purpose:
- --- Selector
-
- Origins(me)
- returns DataMapOfOrientedShapeShape from GEOMAlgo;
- ---C++: return const &
- ---Purpose:
- --- Selector
-
- CheckData(me:out)
- ---Purpose: Performs the algorithm
- is redefined protected;
-
-fields
- myScale : Real from Standard is protected;
- myFace : Face from TopoDS is protected;
-
- myEdges : ListOfShape from TopTools is protected;
- myFaceScaled : Face from TopoDS is protected;
- myEdgesScaled : ListOfShape from TopTools is protected;
- myImages : DataMapOfOrientedShapeShape from GEOMAlgo is protected;
- myOrigins : DataMapOfOrientedShapeShape from GEOMAlgo is protected;
- myShapeTmp : Shape from TopoDS is protected;
-end WESScaler;
-
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_WESScaler.cxx
-// Created:
-// Author:
+// Created:
+// Author:
// <pkv@VORTEX>
-#include <GEOMAlgo_WESScaler.ixx>
+#include <GEOMAlgo_WESScaler.hxx>
#include <gp_Pnt.hxx>
#include <gp_Trsf.hxx>
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
- GEOMAlgo_WESScaler::GEOMAlgo_WESScaler()
+ GEOMAlgo_WESScaler::GEOMAlgo_WESScaler()
:
GEOMAlgo_Algo()
{
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
- GEOMAlgo_WESScaler::~GEOMAlgo_WESScaler()
+ GEOMAlgo_WESScaler::~GEOMAlgo_WESScaler()
{
}
//=======================================================================
// function: SetScale
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_WESScaler::SetScale (const Standard_Real aScale)
{
}
//=======================================================================
// function: Scale
-// purpose:
+// purpose:
//=======================================================================
- Standard_Real GEOMAlgo_WESScaler::Scale()const
+ Standard_Real GEOMAlgo_WESScaler::Scale()const
{
return myScale;
}
//=======================================================================
// function: SetFace
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_WESScaler::SetFace(const TopoDS_Face& aF)
{
}
//=======================================================================
// function: Face
-// purpose:
+// purpose:
//=======================================================================
const TopoDS_Face& GEOMAlgo_WESScaler::Face()const
{
}
//=======================================================================
// function: SetEdges
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_WESScaler::SetEdges(const TopTools_ListOfShape& aLE)
{
}
//=======================================================================
// function: Edges
-// purpose:
+// purpose:
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_WESScaler::Edges()const
{
}
//=======================================================================
// function: FaceScaled
-// purpose:
+// purpose:
//=======================================================================
const TopoDS_Face& GEOMAlgo_WESScaler::FaceScaled()const
{
}
//=======================================================================
// function: EdgesScaled
-// purpose:
+// purpose:
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_WESScaler::EdgesScaled()const
{
}
//=======================================================================
// function: Image
-// purpose:
+// purpose:
//=======================================================================
const TopoDS_Shape& GEOMAlgo_WESScaler::Image (const TopoDS_Shape& aS) const
{
}
//=======================================================================
// function: Origin
-// purpose:
+// purpose:
//=======================================================================
const TopoDS_Shape& GEOMAlgo_WESScaler::Origin (const TopoDS_Shape& aS) const
{
}
//=======================================================================
// function: Images
-// purpose:
+// purpose:
//=======================================================================
const GEOMAlgo_DataMapOfOrientedShapeShape& GEOMAlgo_WESScaler::Images () const
{
}
//=======================================================================
// function: Origins
-// purpose:
+// purpose:
//=======================================================================
const GEOMAlgo_DataMapOfOrientedShapeShape& GEOMAlgo_WESScaler::Origins () const
{
}
//=======================================================================
// function: CheckData
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_WESScaler::CheckData()
{
}
//=======================================================================
// function: Perform
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_WESScaler::Perform()
{
//
const TopoDS_Shape& aSR=aBT.Shape();
//
- // Refined image face FR
+ // Refined image face FR
aFR=aSR.EmptyCopied();
aItS.Initialize(aSR);
for (i=0; aItS.More(); aItS.Next(),++i) {
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_WESScaler.hxx
+// Created:
+// Author:
+// <pkv@VORTEX>
#ifndef _GEOMAlgo_WESScaler_HeaderFile
#define _GEOMAlgo_WESScaler_HeaderFile
-#ifndef _Standard_Real_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <Standard_Real.hxx>
-#endif
-#ifndef _TopoDS_Face_HeaderFile
#include <TopoDS_Face.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
#include <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _GEOMAlgo_Algo_HeaderFile
#include <GEOMAlgo_Algo.hxx>
-#endif
-class TopoDS_Face;
-class TopTools_ListOfShape;
-class TopoDS_Shape;
-class GEOMAlgo_DataMapOfOrientedShapeShape;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_WESScaler : public GEOMAlgo_Algo {
+//=======================================================================
+//function : GEOMAlgo_WESScaler
+//purpose :
+//=======================================================================
+class GEOMAlgo_WESScaler : public GEOMAlgo_Algo
+{
public:
+ //! Empty constructor <br>
+ Standard_EXPORT
+ GEOMAlgo_WESScaler();
- 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
- //
-
-//! Empty constructor <br>
-Standard_EXPORT GEOMAlgo_WESScaler();
-Standard_EXPORT virtual ~GEOMAlgo_WESScaler();
-
-
-//! Modifier <br>
-Standard_EXPORT void SetScale(const Standard_Real aWES) ;
-
-
-//! Selector <br>
-Standard_EXPORT Standard_Real Scale() const;
-
-
-Standard_EXPORT void SetFace(const TopoDS_Face& aF) ;
-
+ Standard_EXPORT
+ virtual ~GEOMAlgo_WESScaler();
-Standard_EXPORT const TopoDS_Face& Face() const;
+ //! Modifier <br>
+ Standard_EXPORT
+ void SetScale(const Standard_Real aWES) ;
+ //! Selector <br>
+ Standard_EXPORT
+ Standard_Real Scale() const;
-Standard_EXPORT void SetEdges(const TopTools_ListOfShape& aLE) ;
+ Standard_EXPORT
+ void SetFace(const TopoDS_Face& aF) ;
+ Standard_EXPORT
+ const TopoDS_Face& Face() const;
-Standard_EXPORT const TopTools_ListOfShape& Edges() const;
+ Standard_EXPORT
+ void SetEdges(const TopTools_ListOfShape& aLE) ;
-//! Performs the algorithm <br>
-Standard_EXPORT virtual void Perform() ;
+ Standard_EXPORT
+ const TopTools_ListOfShape& Edges() const;
+ //! Performs the algorithm <br>
+ Standard_EXPORT
+ virtual void Perform() ;
-Standard_EXPORT const TopoDS_Face& FaceScaled() const;
+ Standard_EXPORT
+ const TopoDS_Face& FaceScaled() const;
+ Standard_EXPORT
+ const TopTools_ListOfShape& EdgesScaled() const;
-Standard_EXPORT const TopTools_ListOfShape& EdgesScaled() const;
+ Standard_EXPORT
+ const TopoDS_Shape& Image(const TopoDS_Shape& aS) const;
+ Standard_EXPORT
+ const TopoDS_Shape& Origin(const TopoDS_Shape& aS) const;
-Standard_EXPORT const TopoDS_Shape& Image(const TopoDS_Shape& aS) const;
+ //! Selector <br>
+ Standard_EXPORT
+ const GEOMAlgo_DataMapOfOrientedShapeShape& Images() const;
+ //! Selector <br>
+ Standard_EXPORT
+ const GEOMAlgo_DataMapOfOrientedShapeShape& Origins() const;
-Standard_EXPORT const TopoDS_Shape& Origin(const TopoDS_Shape& aS) const;
+ protected:
-
-//! Selector <br>
-Standard_EXPORT const GEOMAlgo_DataMapOfOrientedShapeShape& Images() const;
-
-
-//! Selector <br>
-Standard_EXPORT const GEOMAlgo_DataMapOfOrientedShapeShape& Origins() const;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-//! Performs the algorithm <br>
-Standard_EXPORT virtual void CheckData() ;
-
-
- // Fields PROTECTED
- //
-Standard_Real myScale;
-TopoDS_Face myFace;
-TopTools_ListOfShape myEdges;
-TopoDS_Face myFaceScaled;
-TopTools_ListOfShape myEdgesScaled;
-GEOMAlgo_DataMapOfOrientedShapeShape myImages;
-GEOMAlgo_DataMapOfOrientedShapeShape myOrigins;
-TopoDS_Shape myShapeTmp;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
+ //! Performs the algorithm <br>
+ Standard_EXPORT virtual void CheckData() ;
+ Standard_Real myScale;
+ TopoDS_Face myFace;
+ TopTools_ListOfShape myEdges;
+ TopoDS_Face myFaceScaled;
+ TopTools_ListOfShape myEdgesScaled;
+ GEOMAlgo_DataMapOfOrientedShapeShape myImages;
+ GEOMAlgo_DataMapOfOrientedShapeShape myOrigins;
+ TopoDS_Shape myShapeTmp;
};
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_WESScaler.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_Face_HeaderFile
-#include <TopoDS_Face.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
-#include <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
-#endif
-#ifndef _GEOMAlgo_WESScaler_HeaderFile
-#include <GEOMAlgo_WESScaler.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_WireEdgeSet.cdl
--- Created:
--- Author: Peter KURNEV
--- <pkv@irinox>
---
-class WireEdgeSet from GEOMAlgo
-
- ---Purpose:
-
-uses
- Face from TopoDS,
- Shape from TopoDS,
- ListOfShape from TopTools
---raises
-
-is
- Create
- returns WireEdgeSet from GEOMAlgo;
-
- Clear(me:out);
-
- SetFace(me:out;
- aF:Face from TopoDS);
-
- Face(me)
- returns Face from TopoDS;
- ---C++: return const &
-
- AddStartElement(me:out;
- sS: Shape from TopoDS);
-
- StartElements(me)
- returns ListOfShape from TopTools;
- ---C++: return const &
-
- AddShape(me:out;
- sS:Shape from TopoDS);
-
- Shapes(me)
- returns ListOfShape from TopTools;
- ---C++: return const &
-
-fields
- myFace : Face from TopoDS is protected;
- myStartShapes : ListOfShape from TopTools is protected;
- myShapes : ListOfShape from TopTools is protected;
-
-end WireEdgeSet;
//
// File: GEOMAlgo_WireEdgeSet.cxx
-// Created:
+// Created:
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <GEOMAlgo_WireEdgeSet.ixx>
+#include <GEOMAlgo_WireEdgeSet.hxx>
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
GEOMAlgo_WireEdgeSet::GEOMAlgo_WireEdgeSet()
{
//=======================================================================
//function : Clear
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_WireEdgeSet::Clear()
{
}
//=======================================================================
//function : SetFace
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_WireEdgeSet::SetFace(const TopoDS_Face& aF)
{
}
//=======================================================================
//function : Face
-//purpose :
+//purpose :
//=======================================================================
- const TopoDS_Face& GEOMAlgo_WireEdgeSet::Face()const
+ const TopoDS_Face& GEOMAlgo_WireEdgeSet::Face()const
{
return myFace;
}
//=======================================================================
//function : AddStartElement
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_WireEdgeSet::AddStartElement(const TopoDS_Shape& aE)
{
}
//=======================================================================
//function : StartElements
-//purpose :
+//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_WireEdgeSet::StartElements()const
{
}
//=======================================================================
//function : AddShape
-//purpose :
+//purpose :
//=======================================================================
void GEOMAlgo_WireEdgeSet::AddShape(const TopoDS_Shape& aW)
{
}
//=======================================================================
//function : Shapes
-//purpose :
+//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_WireEdgeSet::Shapes()const
{
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_WireEdgeSet.hxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
+
#ifndef _GEOMAlgo_WireEdgeSet_HeaderFile
#define _GEOMAlgo_WireEdgeSet_HeaderFile
-#ifndef _TopoDS_Face_HeaderFile
-#include <TopoDS_Face.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-class TopoDS_Face;
-class TopoDS_Shape;
-class TopTools_ListOfShape;
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
+#include <TopoDS_Face.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopoDS_Shape.hxx>
+//=======================================================================
+//function : GEOMAlgo_WireEdgeSet
+//purpose :
+//=======================================================================
class GEOMAlgo_WireEdgeSet {
+ public:
+ Standard_EXPORT
+ GEOMAlgo_WireEdgeSet();
-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_WireEdgeSet();
-
-
-Standard_EXPORT void Clear() ;
-
-
-Standard_EXPORT void SetFace(const TopoDS_Face& aF) ;
-
-
-Standard_EXPORT const TopoDS_Face& Face() const;
-
+ Standard_EXPORT
+ void Clear() ;
-Standard_EXPORT void AddStartElement(const TopoDS_Shape& sS) ;
+ Standard_EXPORT
+ void SetFace(const TopoDS_Face& aF) ;
+ Standard_EXPORT
+ const TopoDS_Face& Face() const;
-Standard_EXPORT const TopTools_ListOfShape& StartElements() const;
-
-
-Standard_EXPORT void AddShape(const TopoDS_Shape& sS) ;
-
-
-Standard_EXPORT const TopTools_ListOfShape& Shapes() const;
-
+ Standard_EXPORT
+ void AddStartElement(const TopoDS_Shape& sS) ;
+ Standard_EXPORT
+ const TopTools_ListOfShape& StartElements() const;
+ Standard_EXPORT
+ void AddShape(const TopoDS_Shape& sS) ;
+ Standard_EXPORT
+ const TopTools_ListOfShape& Shapes() const;
protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-TopoDS_Face myFace;
-TopTools_ListOfShape myStartShapes;
-TopTools_ListOfShape myShapes;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+ TopoDS_Face myFace;
+ TopTools_ListOfShape myStartShapes;
+ TopTools_ListOfShape myShapes;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_WireEdgeSet.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Face_HeaderFile
-#include <TopoDS_Face.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_WireEdgeSet_HeaderFile
-#include <GEOMAlgo_WireEdgeSet.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_WireSolid.cdl
--- Created: Wed Jan 12 10:17:00 2005
--- Author: Peter KURNEV
---
-class WireSolid from GEOMAlgo
- inherits ShapeSolid from GEOMAlgo
- ---Purpose:
-
---uses
---raises
-
-is
- Create
- returns WireSolid from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_WireSolid();"
-
- Perform (me:out)
- is redefined;
-
- Prepare(me:out)
- is redefined protected;
-
- BuildResult (me:out)
- is redefined protected;
-
---fields
-
-end WireSolid;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <GEOMAlgo_WireSolid.ixx>
+#include <GEOMAlgo_WireSolid.hxx>
#include <Standard_Failure.hxx>
//=======================================================================
//function : GEOMAlgo_WireSolid
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_WireSolid::GEOMAlgo_WireSolid()
-:
+:
GEOMAlgo_ShapeSolid()
{
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
GEOMAlgo_WireSolid::~GEOMAlgo_WireSolid()
{
}
//=======================================================================
// function: Perform
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_WireSolid::Perform()
{
Standard_Boolean bIsNewFiller;
//
bIsNewFiller=myDSFiller->IsNewFiller();
-
+
if (bIsNewFiller) {
Prepare();
myDSFiller->SetNewFiller(!bIsNewFiller);
catch (Standard_Failure) {
myErrorStatus= 12;
}
-}
+}
//=======================================================================
// function: Prepare
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_WireSolid::Prepare()
{
}
//=======================================================================
// function: BuildResult
-// purpose:
+// purpose:
//=======================================================================
void GEOMAlgo_WireSolid::BuildResult()
{
}
else if (aState==BooleanOperations_ON) {
myLSON.Append(aE);
- }
+ }
}
}
}
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_WireSolid.hxx
+// Created: Wed Jan 12 10:19:31 2005
+// Author: Peter KURNEV
+// <pkv@irinox>
+
#ifndef _GEOMAlgo_WireSolid_HeaderFile
#define _GEOMAlgo_WireSolid_HeaderFile
-#ifndef _GEOMAlgo_ShapeSolid_HeaderFile
-#include <GEOMAlgo_ShapeSolid.hxx>
-#endif
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
-
-class GEOMAlgo_WireSolid : public GEOMAlgo_ShapeSolid {
-
-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_WireSolid();
-Standard_EXPORT virtual ~GEOMAlgo_WireSolid();
-
-
-Standard_EXPORT virtual void Perform() ;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
-Standard_EXPORT virtual void Prepare() ;
-
-
-Standard_EXPORT virtual void BuildResult() ;
-
-
- // Fields PROTECTED
- //
-
-
-private:
+#include <GEOMAlgo_ShapeSolid.hxx>
- // Methods PRIVATE
- //
+//=======================================================================
+//class : GEOMAlgo_WireSolid
+//purpose :
+//=======================================================================
+class GEOMAlgo_WireSolid : public GEOMAlgo_ShapeSolid
+{
+ public:
+ Standard_EXPORT
+ GEOMAlgo_WireSolid();
+ Standard_EXPORT
+ virtual ~GEOMAlgo_WireSolid();
- // Fields PRIVATE
- //
+ Standard_EXPORT
+ virtual void Perform() ;
+ protected:
+ Standard_EXPORT
+ virtual void Prepare() ;
+ Standard_EXPORT
+ virtual void BuildResult() ;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_WireSolid.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_WireSolid_HeaderFile
-#include <GEOMAlgo_WireSolid.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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_WireSplitter.cdl
--- Created:
--- Author: Peter KURNEV
--- <pkv@irinox>
---
-class WireSplitter from GEOMAlgo
- inherits Algo from GEOMAlgo
-
- ---Purpose:
- --- the algorithm to split multiconnexed set of edges
- --- wires on a face onto simple connexed wires
- --- .
-uses
- Face from TopoDS,
- Vertex from TopoDS,
- Edge from TopoDS,
-
- SequenceOfPnt2d from TColgp,
- SequenceOfShape from TopTools,
- ListOfShape from TopTools,
-
- ListOfListOfShape from BOPTColStd,
-
- EdgeInfo from BOP,
- IndexedDataMapOfVertexListEdgeInfo from BOP
-
---raises
-
-is
- Create
- returns WireSplitter from GEOMAlgo;
- ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_WireSplitter();"
-
- SetFace (me:out;
- aF: Face from TopoDS);
-
- SetEdges (me:out;
- aLE:ListOfShape from TopTools);
-
- Edges (me)
- returns ListOfShape from TopTools;
- ---C++: return const &
-
- Perform (me:out)
- is redefined;
-
- IsNothingToDo (me)
- returns Boolean from Standard;
-
- Face (me)
- returns Face from TopoDS;
- ---C++: return const &
-
- Shapes (me)
- returns ListOfListOfShape from BOPTColStd;
- ---C++: return const &
-
-fields
- myFace : Face from TopoDS is protected;
- myIsDone : Boolean from Standard is protected;
- myNothingToDo: Boolean from Standard is protected;
- myShapes : ListOfListOfShape from BOPTColStd is protected;
- mySmartMap : IndexedDataMapOfVertexListEdgeInfo from BOP is protected;
- myEdges : ListOfShape from TopTools is protected;
-
-end WireSplitter;
-
// File: GEOMAlgo_WireSplitter.cxx
// Author: Peter KURNEV
-#include <GEOMAlgo_WireSplitter.ixx>
+#include <GEOMAlgo_WireSplitter.hxx>
#include <TColStd_SequenceOfReal.hxx>
#include <Precision.hxx>
Standard_Real Tolerance2D (const TopoDS_Vertex& aV,
const GeomAdaptor_Surface& aGAS);
+
+//modified by NIZNHY-PKV Thu Apr 19 09:04:59 2012f
static
- Standard_Integer NbWaysOut(const BOP_ListOfEdgeInfo& );
-//
+ Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta,
+ const BOP_ListOfEdgeInfo& aLEInfo);
+//static
+// Standard_Integer NbWaysOut(const BOP_ListOfEdgeInfo& );
+//modified by NIZNHY-PKV Thu Apr 19 09:04:53 2012t
//=======================================================================
// function:
BOPTColStd_ListOfListOfShape& myShapes,
BOP_IndexedDataMapOfVertexListEdgeInfo& mySmartMap)
{
- Standard_Integer i,j, aNb, aNbj;
+ Standard_Integer i,j, aNb, aNbj, iCnt;
Standard_Real aTol, anAngleIn, anAngleOut, anAngle, aMinAngle;
Standard_Real aTol2D, aTol2D2;
- Standard_Real aTol2, aD2;//, aTolUVb, aTolVVb;
+ Standard_Real aTol2, aD2;
Standard_Boolean anIsSameV2d, anIsSameV, anIsFound, anIsOut, anIsNotPassed;
BOP_ListIteratorOfListOfEdgeInfo anIt;
TopoDS_Vertex aVb;
GetNextVertex (pVa, aEOuta, aVb);
gp_Pnt2d aPb=Coord2d(aVb, aEOuta, myFace);
-
- //const BOP_ListOfEdgeInfo& aLEInfoVb=mySmartMap.FindFromKey(aVb);
//
aTol=2.*Tolerance2D(aVb, aGAS);
aTol2=10.*aTol*aTol;
aMinAngle=100.;
anIsFound=Standard_False;
-
- Standard_Integer aCurIndexE = 0;
-
+ //
+ //modified by NIZNHY-PKV Thu Apr 19 09:05:09 2012f
+ iCnt=NbWaysOut (aEOuta, aLEInfo);
+ //iCnt=NbWaysOut (aLEInfo);
+ //modified by NIZNHY-PKV Thu Apr 19 09:05:12 2012t
+ if (!iCnt) { // no way to go . (Error)
+ return ;
+ }
+ //
anIt.Initialize(aLEInfo);
for (; anIt.More(); anIt.Next()) {
BOP_EdgeInfo& anEI=anIt.Value();
const TopoDS_Edge& aE=anEI.Edge();
anIsOut=!anEI.IsIn();
anIsNotPassed=!anEI.Passed();
-
+ //
if (anIsOut && anIsNotPassed) {
- aCurIndexE++;
- //
- // Is there one way to go out of the vertex
- // we have to use it only.
- Standard_Integer iCnt;
- iCnt=NbWaysOut (aLEInfo);
- //
- if (!iCnt) {
- // no way to go . (Error)
- return ;
+ if (aE.IsSame(aEOuta)) {
+ continue;
}
//
if (iCnt==1) {
continue;
}
//
- //
anAngleOut=anEI.Angle();
//
anAngle=ClockWiseAngle(anAngleIn, anAngleOut);
// no way to go . (Error)
return;
}
-
+ //
aEOutb=pEdgeInfo->Edge();
//
Path (aGAS, myFace, aVb, aEOutb, *pEdgeInfo, aLS,
dA=A1-A2;
if (dA <= 0.) {
dA=aTwoPi+dA;
- //modified by NIZNHY-PKV Thu Feb 17 08:26:39 2011f
if (dA <= 1.e-14) {
dA=aTwoPi;
}
- //modified by NIZNHY-PKV Thu Feb 17 08:26:42 2011t
}
//xx
else if (dA <= 1.e-14) {
return anAngle;
}
-
+//modified by NIZNHY-PKV Thu Apr 19 09:02:04 2012f
+//=======================================================================
+// function: NbWaysOut
+// purpose:
+//=======================================================================
+Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta,
+ const BOP_ListOfEdgeInfo& aLEInfo)
+{
+ Standard_Boolean bIsOut, bIsNotPassed;
+ Standard_Integer iCnt=0;
+ BOP_ListIteratorOfListOfEdgeInfo anIt;
+ //
+ anIt.Initialize(aLEInfo);
+ for (; anIt.More(); anIt.Next()) {
+ BOP_EdgeInfo& aEI=anIt.Value();
+ const TopoDS_Edge& aE=aEI.Edge();
+ bIsOut=!aEI.IsIn();
+ bIsNotPassed=!aEI.Passed();
+ if (bIsOut && bIsNotPassed) {
+ if (!aE.IsSame(aEOuta)) {
+ iCnt++;
+ }
+ }
+ }
+ return iCnt;
+}
+/*
//=======================================================================
// function: NbWaysOut
// purpose:
}
return iCnt;
}
+*/
+//modified by NIZNHY-PKV Thu Apr 19 09:01:57 2012t
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: GEOMAlgo_WireSplitter.hxx
+// Author: Peter KURNEV
+
#ifndef _GEOMAlgo_WireSplitter_HeaderFile
#define _GEOMAlgo_WireSplitter_HeaderFile
-#ifndef _TopoDS_Face_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <TopoDS_Face.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-#ifndef _BOPTColStd_ListOfListOfShape_HeaderFile
#include <BOPTColStd_ListOfListOfShape.hxx>
-#endif
-#ifndef _BOP_IndexedDataMapOfVertexListEdgeInfo_HeaderFile
#include <BOP_IndexedDataMapOfVertexListEdgeInfo.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_Algo_HeaderFile
#include <GEOMAlgo_Algo.hxx>
-#endif
-class TopoDS_Face;
-class TopTools_ListOfShape;
-class BOPTColStd_ListOfListOfShape;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
//! the algorithm to split multiconnexed set of edges <br>
//! wires on a face onto simple connexed wires <br>
//! . <br>
-class GEOMAlgo_WireSplitter : public GEOMAlgo_Algo {
-
+//=======================================================================
+//class : GEOMAlgo_WireSplitter
+//purpose :
+//=======================================================================
+class GEOMAlgo_WireSplitter : public GEOMAlgo_Algo
+{
public:
+ Standard_EXPORT
+ GEOMAlgo_WireSplitter();
- 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_WireSplitter();
-Standard_EXPORT virtual ~GEOMAlgo_WireSplitter();
-
-
-Standard_EXPORT void SetFace(const TopoDS_Face& aF) ;
-
-
-Standard_EXPORT void SetEdges(const TopTools_ListOfShape& aLE) ;
-
+ Standard_EXPORT
+ virtual ~GEOMAlgo_WireSplitter();
-Standard_EXPORT const TopTools_ListOfShape& Edges() const;
+ Standard_EXPORT
+ void SetFace(const TopoDS_Face& aF) ;
+ Standard_EXPORT
+ void SetEdges(const TopTools_ListOfShape& aLE) ;
-Standard_EXPORT virtual void Perform() ;
-
-
-Standard_EXPORT Standard_Boolean IsNothingToDo() const;
-
-
-Standard_EXPORT const TopoDS_Face& Face() const;
-
-
-Standard_EXPORT const BOPTColStd_ListOfListOfShape& Shapes() const;
+ Standard_EXPORT
+ const TopTools_ListOfShape& Edges() const;
+ Standard_EXPORT
+ virtual void Perform() ;
+ Standard_EXPORT
+ Standard_Boolean IsNothingToDo() const;
+ Standard_EXPORT
+ const TopoDS_Face& Face() const;
+ Standard_EXPORT
+ const BOPTColStd_ListOfListOfShape& Shapes() const;
protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-TopoDS_Face myFace;
-Standard_Boolean myIsDone;
-Standard_Boolean myNothingToDo;
-BOPTColStd_ListOfListOfShape myShapes;
-BOP_IndexedDataMapOfVertexListEdgeInfo mySmartMap;
-TopTools_ListOfShape myEdges;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+ TopoDS_Face myFace;
+ Standard_Boolean myIsDone;
+ Standard_Boolean myNothingToDo;
+ BOPTColStd_ListOfListOfShape myShapes;
+ BOP_IndexedDataMapOfVertexListEdgeInfo mySmartMap;
+ TopTools_ListOfShape myEdges;
};
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_WireSplitter.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Face_HeaderFile
-#include <TopoDS_Face.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _BOPTColStd_ListOfListOfShape_HeaderFile
-#include <BOPTColStd_ListOfListOfShape.hxx>
-#endif
-#ifndef _GEOMAlgo_WireSplitter_HeaderFile
-#include <GEOMAlgo_WireSplitter.hxx>
-#endif
class Handle(BlockFix_BlockFixAPI) : public Handle(MMgt_TShared) {
public:
- void* operator new(size_t,void* anAddress)
+ void* operator new(size_t,void* anAddress)
{
return anAddress;
}
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
+ void* operator new(size_t size)
+ {
+ return Standard::Allocate(size);
}
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
+ void operator delete(void *anAddress)
+ {
+ if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
- Handle(BlockFix_BlockFixAPI)():Handle(MMgt_TShared)() {}
- Handle(BlockFix_BlockFixAPI)(const Handle(BlockFix_BlockFixAPI)& aHandle) : Handle(MMgt_TShared)(aHandle)
+ Handle(BlockFix_BlockFixAPI)():Handle(MMgt_TShared)() {}
+ Handle(BlockFix_BlockFixAPI)(const Handle(BlockFix_BlockFixAPI)& aHandle) : Handle(MMgt_TShared)(aHandle)
{
}
- Handle(BlockFix_BlockFixAPI)(const BlockFix_BlockFixAPI* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem)
+ Handle(BlockFix_BlockFixAPI)(const BlockFix_BlockFixAPI* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem)
{
}
return *this;
}
- BlockFix_BlockFixAPI* operator->()
+ BlockFix_BlockFixAPI* operator->()
{
return (BlockFix_BlockFixAPI *)ControlAccess();
}
- BlockFix_BlockFixAPI* operator->() const
+ BlockFix_BlockFixAPI* operator->() const
{
return (BlockFix_BlockFixAPI *)ControlAccess();
}
Standard_EXPORT ~Handle(BlockFix_BlockFixAPI)();
-
+
Standard_EXPORT static const Handle(BlockFix_BlockFixAPI) DownCast(const Handle(Standard_Transient)& AnObject);
};
#endif
class Handle(BlockFix_PeriodicSurfaceModifier) : public Handle(BRepTools_Modification) {
public:
- void* operator new(size_t,void* anAddress)
+ void* operator new(size_t,void* anAddress)
{
return anAddress;
}
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
+ void* operator new(size_t size)
+ {
+ return Standard::Allocate(size);
}
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
+ void operator delete(void *anAddress)
+ {
+ if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
- Handle(BlockFix_PeriodicSurfaceModifier)():Handle(BRepTools_Modification)() {}
- Handle(BlockFix_PeriodicSurfaceModifier)(const Handle(BlockFix_PeriodicSurfaceModifier)& aHandle) : Handle(BRepTools_Modification)(aHandle)
+ Handle(BlockFix_PeriodicSurfaceModifier)():Handle(BRepTools_Modification)() {}
+ Handle(BlockFix_PeriodicSurfaceModifier)(const Handle(BlockFix_PeriodicSurfaceModifier)& aHandle) : Handle(BRepTools_Modification)(aHandle)
{
}
- Handle(BlockFix_PeriodicSurfaceModifier)(const BlockFix_PeriodicSurfaceModifier* anItem) : Handle(BRepTools_Modification)((BRepTools_Modification *)anItem)
+ Handle(BlockFix_PeriodicSurfaceModifier)(const BlockFix_PeriodicSurfaceModifier* anItem) : Handle(BRepTools_Modification)((BRepTools_Modification *)anItem)
{
}
return *this;
}
- BlockFix_PeriodicSurfaceModifier* operator->()
+ BlockFix_PeriodicSurfaceModifier* operator->()
{
return (BlockFix_PeriodicSurfaceModifier *)ControlAccess();
}
- BlockFix_PeriodicSurfaceModifier* operator->() const
+ BlockFix_PeriodicSurfaceModifier* operator->() const
{
return (BlockFix_PeriodicSurfaceModifier *)ControlAccess();
}
Standard_EXPORT ~Handle(BlockFix_PeriodicSurfaceModifier)();
-
+
Standard_EXPORT static const Handle(BlockFix_PeriodicSurfaceModifier) DownCast(const Handle(Standard_Transient)& AnObject);
};
#endif
class Handle(BlockFix_SphereSpaceModifier) : public Handle(BRepTools_Modification) {
public:
- void* operator new(size_t,void* anAddress)
+ void* operator new(size_t,void* anAddress)
{
return anAddress;
}
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
+ void* operator new(size_t size)
+ {
+ return Standard::Allocate(size);
}
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
+ void operator delete(void *anAddress)
+ {
+ if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
- Handle(BlockFix_SphereSpaceModifier)():Handle(BRepTools_Modification)() {}
- Handle(BlockFix_SphereSpaceModifier)(const Handle(BlockFix_SphereSpaceModifier)& aHandle) : Handle(BRepTools_Modification)(aHandle)
+ Handle(BlockFix_SphereSpaceModifier)():Handle(BRepTools_Modification)() {}
+ Handle(BlockFix_SphereSpaceModifier)(const Handle(BlockFix_SphereSpaceModifier)& aHandle) : Handle(BRepTools_Modification)(aHandle)
{
}
- Handle(BlockFix_SphereSpaceModifier)(const BlockFix_SphereSpaceModifier* anItem) : Handle(BRepTools_Modification)((BRepTools_Modification *)anItem)
+ Handle(BlockFix_SphereSpaceModifier)(const BlockFix_SphereSpaceModifier* anItem) : Handle(BRepTools_Modification)((BRepTools_Modification *)anItem)
{
}
return *this;
}
- BlockFix_SphereSpaceModifier* operator->()
+ BlockFix_SphereSpaceModifier* operator->()
{
return (BlockFix_SphereSpaceModifier *)ControlAccess();
}
- BlockFix_SphereSpaceModifier* operator->() const
+ BlockFix_SphereSpaceModifier* operator->() const
{
return (BlockFix_SphereSpaceModifier *)ControlAccess();
}
Standard_EXPORT ~Handle(BlockFix_SphereSpaceModifier)();
-
+
Standard_EXPORT static const Handle(BlockFix_SphereSpaceModifier) DownCast(const Handle(Standard_Transient)& AnObject);
};
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_ClsfSolid_HeaderFile
-#define _Handle_GEOMAlgo_ClsfSolid_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_ClsfSolid;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_ClsfSolid);
-
-class Handle(GEOMAlgo_ClsfSolid) : public Handle(GEOMAlgo_Clsf) {
- public:
- Handle(GEOMAlgo_ClsfSolid)():Handle(GEOMAlgo_Clsf)() {}
- Handle(GEOMAlgo_ClsfSolid)(const Handle(GEOMAlgo_ClsfSolid)& aHandle) : Handle(GEOMAlgo_Clsf)(aHandle)
- {
- }
-
- Handle(GEOMAlgo_ClsfSolid)(const GEOMAlgo_ClsfSolid* anItem) : Handle(GEOMAlgo_Clsf)((GEOMAlgo_Clsf *)anItem)
- {
- }
-
- Handle(GEOMAlgo_ClsfSolid)& operator=(const Handle(GEOMAlgo_ClsfSolid)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(GEOMAlgo_ClsfSolid)& operator=(const GEOMAlgo_ClsfSolid* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- GEOMAlgo_ClsfSolid* operator->() const
- {
- return (GEOMAlgo_ClsfSolid *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(GEOMAlgo_ClsfSolid)();
-
- Standard_EXPORT static const Handle(GEOMAlgo_ClsfSolid) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
-#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle(Standard_Type);
-class Handle(TCollection_MapNode);
-class GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape;
-
-DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape,TCollection_MapNode)
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile
-#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle(Standard_Type);
-class Handle(TCollection_MapNode);
-class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger;
-
-DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger,TCollection_MapNode)
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile
-#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle(Standard_Type);
-class Handle(TCollection_MapNode);
-class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape;
-
-DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape,TCollection_MapNode)
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile
-#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle(Standard_Type);
-class Handle(TCollection_MapNode);
-class GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape;
-
-DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape,TCollection_MapNode)
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile\r
-#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_DefineHandle_HeaderFile\r
-#include <Standard_DefineHandle.hxx>\r
-#endif\r
-\r
-#ifndef _Handle_TCollection_MapNode_HeaderFile\r
-#include <Handle_TCollection_MapNode.hxx>\r
-#endif\r
-\r
-class Standard_Transient;\r
-class Handle(Standard_Type);\r
-class Handle(TCollection_MapNode);\r
-class GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape;\r
-\r
-DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape,TCollection_MapNode)\r
-\r
-#endif\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile\r
-#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_DefineHandle_HeaderFile\r
-#include <Standard_DefineHandle.hxx>\r
-#endif\r
-\r
-#ifndef _Handle_TCollection_MapNode_HeaderFile\r
-#include <Handle_TCollection_MapNode.hxx>\r
-#endif\r
-\r
-class Standard_Transient;\r
-class Handle(Standard_Type);\r
-class Handle(TCollection_MapNode);\r
-class GEOMAlgo_DataMapNodeOfDataMapOfShapePnt;\r
-\r
-DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt,TCollection_MapNode)\r
-\r
-#endif\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapNodeOfDataMapOfShapeReal_HeaderFile
-#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle(Standard_Type);
-class Handle(TCollection_MapNode);
-class GEOMAlgo_DataMapNodeOfDataMapOfShapeReal;
-
-DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal,TCollection_MapNode)
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile
-#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle(Standard_Type);
-class Handle(TCollection_MapNode);
-class GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet;
-
-DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet,TCollection_MapNode)
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile
-#define _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape);
-
-class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) : public Handle(TCollection_MapNode) {
- public:
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)():Handle(TCollection_MapNode)() {}
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& operator=(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& operator=(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* operator->() const
- {
- return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)();
-
- Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile
-#define _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape);
-
-class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) : public Handle(TCollection_MapNode) {
- 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);
- }
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)():Handle(TCollection_MapNode)() {}
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)& operator=(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)& operator=(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape* operator->()
- {
- return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape *)ControlAccess();
- }
-
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape* operator->() const
- {
- return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)();
-
- Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
-#define _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape);
-
-class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) : public Handle(TCollection_MapNode) {
- public:
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)():Handle(TCollection_MapNode)() {}
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)& operator=(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)& operator=(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape* operator->() const
- {
- return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)();
-
- Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile
-#define _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox);
-
-class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) : public Handle(TCollection_MapNode) {
- public:
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)():Handle(TCollection_MapNode)() {}
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& operator=(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& operator=(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* operator->() const
- {
- return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)();
-
- Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_HeaderFile
-#define _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo);
-
-class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo) : public Handle(TCollection_MapNode) {
- public:
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)():Handle(TCollection_MapNode)() {}
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)& operator=(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)& operator=(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo* operator->() const
- {
- return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)();
-
- Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile
-#define _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState);
-
-class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) : public Handle(TCollection_MapNode) {
- public:
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)():Handle(TCollection_MapNode)() {}
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)& operator=(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)& operator=(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState* operator->() const
- {
- return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)();
-
- Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ListNodeOfListOfCoupleOfShapes_HeaderFile
-#define _Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class GEOMAlgo_ListNodeOfListOfCoupleOfShapes;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfCoupleOfShapes);
-
-class Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) : public Handle(TCollection_MapNode) {
- public:
- Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)():Handle(TCollection_MapNode)() {}
- Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)(const Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)(const GEOMAlgo_ListNodeOfListOfCoupleOfShapes* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)& operator=(const Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)& operator=(const GEOMAlgo_ListNodeOfListOfCoupleOfShapes* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- GEOMAlgo_ListNodeOfListOfCoupleOfShapes* operator->() const
- {
- return (GEOMAlgo_ListNodeOfListOfCoupleOfShapes *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)();
-
- Standard_EXPORT static const Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ListNodeOfListOfPnt_HeaderFile
-#define _Handle_GEOMAlgo_ListNodeOfListOfPnt_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class GEOMAlgo_ListNodeOfListOfPnt;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt);
-
-class Handle(GEOMAlgo_ListNodeOfListOfPnt) : public Handle(TCollection_MapNode) {
- public:
- Handle(GEOMAlgo_ListNodeOfListOfPnt)():Handle(TCollection_MapNode)() {}
- Handle(GEOMAlgo_ListNodeOfListOfPnt)(const Handle(GEOMAlgo_ListNodeOfListOfPnt)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(GEOMAlgo_ListNodeOfListOfPnt)(const GEOMAlgo_ListNodeOfListOfPnt* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(GEOMAlgo_ListNodeOfListOfPnt)& operator=(const Handle(GEOMAlgo_ListNodeOfListOfPnt)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(GEOMAlgo_ListNodeOfListOfPnt)& operator=(const GEOMAlgo_ListNodeOfListOfPnt* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- GEOMAlgo_ListNodeOfListOfPnt* operator->() const
- {
- return (GEOMAlgo_ListNodeOfListOfPnt *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(GEOMAlgo_ListNodeOfListOfPnt)();
-
- Standard_EXPORT static const Handle(GEOMAlgo_ListNodeOfListOfPnt) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
lib_LTLIBRARIES = libGEOMAlgo.la
dist_libGEOMAlgo_la_SOURCES = \
- BlockFix.cxx \
BlockFix_BlockFixAPI.cxx \
BlockFix_CheckTool.cxx \
+ BlockFix.cxx \
BlockFix_PeriodicSurfaceModifier.cxx \
BlockFix_SphereSpaceModifier.cxx \
BlockFix_UnionEdges.cxx \
GEOMAlgo_ClsfSolid.cxx \
GEOMAlgo_ClsfSurf.cxx \
GEOMAlgo_CoupleOfShapes.cxx \
- GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_0.cxx \
- GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx \
- GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_0.cxx \
- GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_0.cxx \
- GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_0.cxx \
- GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_0.cxx \
- GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_0.cxx \
- GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_0.cxx \
- GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_0.cxx \
- GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx \
- GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_0.cxx \
- GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_0.cxx \
- GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_0.cxx \
- GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_0.cxx \
- GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_0.cxx \
- GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_0.cxx \
- GEOMAlgo_DataMapOfOrientedShapeShape_0.cxx \
- GEOMAlgo_DataMapOfPassKeyInteger_0.cxx \
- GEOMAlgo_DataMapOfPassKeyShapeShape_0.cxx \
- GEOMAlgo_DataMapOfRealListOfShape_0.cxx \
- GEOMAlgo_DataMapOfShapeMapOfShape_0.cxx \
- GEOMAlgo_DataMapOfShapePnt_0.cxx \
- GEOMAlgo_DataMapOfShapeReal_0.cxx \
- GEOMAlgo_DataMapOfShapeShapeSet_0.cxx \
GEOMAlgo_FinderShapeOn1.cxx \
GEOMAlgo_FinderShapeOn2.cxx \
GEOMAlgo_FinderShapeOn.cxx \
GEOMAlgo_FinderShapeOnQuad.cxx \
- GEOMAlgo_GetInPlace.cxx \
GEOMAlgo_GetInPlace_1.cxx \
GEOMAlgo_GetInPlace_2.cxx \
GEOMAlgo_GetInPlace_3.cxx \
+ GEOMAlgo_GetInPlace.cxx \
GEOMAlgo_GlueAnalyser.cxx \
- GEOMAlgo_Gluer.cxx \
GEOMAlgo_GlueDetector.cxx \
- GEOMAlgo_Gluer2.cxx \
GEOMAlgo_Gluer2_1.cxx \
GEOMAlgo_Gluer2_2.cxx \
GEOMAlgo_Gluer2_3.cxx \
+ GEOMAlgo_Gluer2.cxx \
GEOMAlgo_GluerAlgo.cxx \
+ GEOMAlgo_Gluer.cxx \
GEOMAlgo_HAlgo.cxx \
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx \
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx \
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx \
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx \
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_0.cxx \
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx \
- GEOMAlgo_IndexedDataMapOfIntegerShape_0.cxx \
- GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_0.cxx \
- GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx \
- GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx \
- GEOMAlgo_IndexedDataMapOfShapeShapeInfo_0.cxx \
- GEOMAlgo_IndexedDataMapOfShapeState_0.cxx \
- GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_0.cxx \
- GEOMAlgo_ListIteratorOfListOfPnt_0.cxx \
- GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx \
- GEOMAlgo_ListNodeOfListOfPnt_0.cxx \
- GEOMAlgo_ListOfCoupleOfShapes_0.cxx \
- GEOMAlgo_ListOfPnt_0.cxx \
GEOMAlgo_PassKey.cxx \
GEOMAlgo_PassKeyMapHasher.cxx \
GEOMAlgo_PassKeyShape.cxx \
GEOMAlgo_PassKeyShapeMapHasher.cxx \
GEOMAlgo_ShapeAlgo.cxx \
GEOMAlgo_ShapeInfo.cxx \
- GEOMAlgo_ShapeInfoFiller.cxx \
GEOMAlgo_ShapeInfoFiller_1.cxx \
+ GEOMAlgo_ShapeInfoFiller.cxx \
GEOMAlgo_ShapeSet.cxx \
GEOMAlgo_ShapeSolid.cxx \
GEOMAlgo_ShellSolid.cxx \
GEOMAlgo_Splitter.cxx \
GEOMAlgo_StateCollector.cxx \
GEOMAlgo_SurfaceTools.cxx \
+ GEOMAlgo_Tools_1.cxx \
GEOMAlgo_Tools3D.cxx \
GEOMAlgo_Tools.cxx \
- GEOMAlgo_Tools_1.cxx \
GEOMAlgo_VertexSolid.cxx \
GEOMAlgo_WESCorrector.cxx \
GEOMAlgo_WESScaler.cxx \
Handle_BlockFix_SphereSpaceModifier.hxx \
Handle_BlockFix_PeriodicSurfaceModifier.hxx \
GEOMAlgo_Algo.hxx \
- GEOMAlgo_Algo.ixx \
- GEOMAlgo_Algo.jxx \
GEOMAlgo_BuilderArea.hxx \
- GEOMAlgo_BuilderArea.ixx \
- GEOMAlgo_BuilderArea.jxx \
GEOMAlgo_BuilderFace.hxx \
- GEOMAlgo_BuilderFace.ixx \
- GEOMAlgo_BuilderFace.jxx \
GEOMAlgo_Builder.hxx \
- GEOMAlgo_Builder.ixx \
- GEOMAlgo_Builder.jxx \
GEOMAlgo_BuilderShape.hxx \
- GEOMAlgo_BuilderShape.ixx \
- GEOMAlgo_BuilderShape.jxx \
GEOMAlgo_BuilderSolid.hxx \
- GEOMAlgo_BuilderSolid.ixx \
- GEOMAlgo_BuilderSolid.jxx \
GEOMAlgo_BuilderTools.hxx \
- GEOMAlgo_BuilderTools.ixx \
- GEOMAlgo_BuilderTools.jxx \
GEOMAlgo_ClsfBox.hxx \
- GEOMAlgo_ClsfBox.ixx \
- GEOMAlgo_ClsfBox.jxx \
GEOMAlgo_Clsf.hxx \
- GEOMAlgo_Clsf.ixx \
- GEOMAlgo_Clsf.jxx \
GEOMAlgo_ClsfSolid.hxx \
- GEOMAlgo_ClsfSolid.ixx \
- GEOMAlgo_ClsfSolid.jxx \
GEOMAlgo_ClsfSurf.hxx \
- GEOMAlgo_ClsfSurf.ixx \
- GEOMAlgo_ClsfSurf.jxx \
GEOMAlgo_CoupleOfShapes.hxx \
- GEOMAlgo_CoupleOfShapes.ixx \
- GEOMAlgo_CoupleOfShapes.jxx \
GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx \
GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx \
GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx \
GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx \
GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx \
GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx \
- GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx \
- GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx \
- GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx \
- GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx \
- GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx \
- GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx \
- GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx \
- GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx \
GEOMAlgo_DataMapOfOrientedShapeShape.hxx \
GEOMAlgo_DataMapOfPassKeyInteger.hxx \
GEOMAlgo_DataMapOfPassKeyShapeShape.hxx \
GEOMAlgo_DataMapOfShapePnt.hxx \
GEOMAlgo_DataMapOfShapeReal.hxx \
GEOMAlgo_DataMapOfShapeShapeSet.hxx \
- GEOMAlgo_FinderShapeOn1.ixx \
GEOMAlgo_FinderShapeOn1.hxx \
- GEOMAlgo_FinderShapeOn1.jxx \
GEOMAlgo_FinderShapeOn2.hxx \
- GEOMAlgo_FinderShapeOn2.ixx \
- GEOMAlgo_FinderShapeOn2.jxx \
GEOMAlgo_FinderShapeOn.hxx \
- GEOMAlgo_FinderShapeOn.ixx \
- GEOMAlgo_FinderShapeOn.jxx \
GEOMAlgo_FinderShapeOnQuad.hxx \
GEOMAlgo_GetInPlace.hxx \
GEOMAlgo_GlueAnalyser.hxx \
- GEOMAlgo_GlueAnalyser.ixx \
- GEOMAlgo_GlueAnalyser.jxx \
- GEOMAlgo_Gluer.hxx \
- GEOMAlgo_Gluer.ixx \
- GEOMAlgo_Gluer.jxx \
GEOMAlgo_GlueDetector.hxx \
GEOMAlgo_Gluer2.hxx \
GEOMAlgo_GluerAlgo.hxx \
+ GEOMAlgo_Gluer.hxx \
GEOMAlgo_HAlgo.hxx \
- GEOMAlgo_HAlgo.ixx \
- GEOMAlgo_HAlgo.jxx \
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx \
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx \
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx \
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx \
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx \
GEOMAlgo_IndexedDataMapOfIntegerShape.hxx \
- GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx \
GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx \
GEOMAlgo_IndexedDataMapOfShapeBox.hxx \
GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx \
GEOMAlgo_KindOfShape.hxx \
GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx \
GEOMAlgo_ListIteratorOfListOfPnt.hxx \
- GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx \
- GEOMAlgo_ListNodeOfListOfPnt.hxx \
GEOMAlgo_ListOfCoupleOfShapes.hxx \
GEOMAlgo_ListOfPnt.hxx \
GEOMAlgo_PassKey.hxx \
- GEOMAlgo_PassKey.ixx \
- GEOMAlgo_PassKey.jxx \
GEOMAlgo_PassKeyMapHasher.hxx \
- GEOMAlgo_PassKeyMapHasher.ixx \
- GEOMAlgo_PassKeyMapHasher.jxx \
GEOMAlgo_PassKeyShape.hxx \
- GEOMAlgo_PassKeyShape.ixx \
- GEOMAlgo_PassKeyShape.jxx \
GEOMAlgo_PassKeyShapeMapHasher.hxx \
- GEOMAlgo_PassKeyShapeMapHasher.ixx \
- GEOMAlgo_PassKeyShapeMapHasher.jxx \
GEOMAlgo_PWireEdgeSet.hxx \
GEOMAlgo_ShapeAlgo.hxx \
- GEOMAlgo_ShapeAlgo.ixx \
- GEOMAlgo_ShapeAlgo.jxx \
GEOMAlgo_ShapeInfo.hxx \
- GEOMAlgo_ShapeInfo.ixx \
- GEOMAlgo_ShapeInfo.jxx \
GEOMAlgo_ShapeInfoFiller.hxx \
- GEOMAlgo_ShapeInfoFiller.ixx \
- GEOMAlgo_ShapeInfoFiller.jxx \
GEOMAlgo_ShapeSet.hxx \
- GEOMAlgo_ShapeSet.ixx \
- GEOMAlgo_ShapeSet.jxx \
GEOMAlgo_ShapeSolid.hxx \
- GEOMAlgo_ShapeSolid.ixx \
- GEOMAlgo_ShapeSolid.jxx \
GEOMAlgo_ShellSolid.hxx \
- GEOMAlgo_ShellSolid.ixx \
- GEOMAlgo_ShellSolid.jxx \
GEOMAlgo_SolidSolid.hxx \
- GEOMAlgo_SolidSolid.ixx \
- GEOMAlgo_SolidSolid.jxx \
GEOMAlgo_Splitter.hxx \
- GEOMAlgo_Splitter.ixx \
- GEOMAlgo_Splitter.jxx \
GEOMAlgo_StateCollector.hxx \
- GEOMAlgo_StateCollector.ixx \
- GEOMAlgo_StateCollector.jxx \
GEOMAlgo_State.hxx \
GEOMAlgo_SurfaceTools.hxx \
- GEOMAlgo_SurfaceTools.ixx \
- GEOMAlgo_SurfaceTools.jxx \
GEOMAlgo_Tools3D.hxx \
- GEOMAlgo_Tools3D.ixx \
- GEOMAlgo_Tools3D.jxx \
GEOMAlgo_Tools.hxx \
- GEOMAlgo_Tools.ixx \
- GEOMAlgo_Tools.jxx \
GEOMAlgo_VertexSolid.hxx \
- GEOMAlgo_VertexSolid.ixx \
- GEOMAlgo_VertexSolid.jxx \
GEOMAlgo_WESCorrector.hxx \
- GEOMAlgo_WESCorrector.ixx \
- GEOMAlgo_WESCorrector.jxx \
GEOMAlgo_WESScaler.hxx \
- GEOMAlgo_WESScaler.ixx \
- GEOMAlgo_WESScaler.jxx \
GEOMAlgo_WireEdgeSet.hxx \
- GEOMAlgo_WireEdgeSet.ixx \
- GEOMAlgo_WireEdgeSet.jxx \
GEOMAlgo_WireSolid.hxx \
- GEOMAlgo_WireSolid.ixx \
- GEOMAlgo_WireSolid.jxx \
- GEOMAlgo_WireSplitter.hxx \
- GEOMAlgo_WireSplitter.ixx \
- GEOMAlgo_WireSplitter.jxx \
- Handle_GEOMAlgo_ClsfBox.hxx \
- Handle_GEOMAlgo_Clsf.hxx \
- Handle_GEOMAlgo_ClsfSolid.hxx \
- Handle_GEOMAlgo_ClsfSurf.hxx \
- Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx \
- Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx \
- Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx \
- Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx \
- Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx \
- Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx \
- Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx \
- Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx \
- Handle_GEOMAlgo_HAlgo.hxx \
- Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \
- Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx \
- Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx \
- Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx \
- Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx \
- Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx \
- Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx \
- Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx
+ GEOMAlgo_WireSplitter.hxx
libGEOMAlgo_la_CPPFLAGS = \
$(CAS_CPPFLAGS) \
BlockFix_SphereSpaceModifier.cdl \
BlockFix_UnionEdges.cdl \
BlockFix_UnionFaces.cdl \
- GEOMAlgo.cdl \
- GEOMAlgo_Algo.cdl \
- GEOMAlgo_Builder.cdl \
- GEOMAlgo_BuilderArea.cdl \
- GEOMAlgo_BuilderFace.cdl \
- GEOMAlgo_BuilderShape.cdl \
- GEOMAlgo_BuilderSolid.cdl \
- GEOMAlgo_BuilderTools.cdl \
- GEOMAlgo_Clsf.cdl \
- GEOMAlgo_ClsfBox.cdl \
- GEOMAlgo_ClsfSolid.cdl \
- GEOMAlgo_ClsfSurf.cdl \
- GEOMAlgo_CoupleOfShapes.cdl \
- GEOMAlgo_FinderShapeOn.cdl \
- GEOMAlgo_FinderShapeOn1.cdl \
- GEOMAlgo_FinderShapeOn2.cdl \
- GEOMAlgo_GlueAnalyser.cdl \
- GEOMAlgo_Gluer.cdl \
- GEOMAlgo_HAlgo.cdl \
- GEOMAlgo_PassKey.cdl \
- GEOMAlgo_PassKeyMapHasher.cdl \
- GEOMAlgo_PassKeyShape.cdl \
- GEOMAlgo_PassKeyShapeMapHasher.cdl \
- GEOMAlgo_ShapeAlgo.cdl \
- GEOMAlgo_ShapeInfo.cdl \
- GEOMAlgo_ShapeInfoFiller.cdl \
- GEOMAlgo_ShapeSet.cdl \
- GEOMAlgo_ShapeSolid.cdl \
- GEOMAlgo_ShellSolid.cdl \
- GEOMAlgo_SolidSolid.cdl \
- GEOMAlgo_Splitter.cdl \
- GEOMAlgo_StateCollector.cdl \
- GEOMAlgo_SurfaceTools.cdl \
- GEOMAlgo_Tools.cdl \
- GEOMAlgo_Tools3D.cdl \
- GEOMAlgo_VertexSolid.cdl \
- GEOMAlgo_WESCorrector.cdl \
- GEOMAlgo_WESScaler.cdl \
- GEOMAlgo_WireEdgeSet.cdl \
- GEOMAlgo_WireSolid.cdl \
- GEOMAlgo_WireSplitter.cdl
+ GEOMAlgo.cdl
-EXTRA_DIST += $(CDL_FILES)
+EXTRA_DIST += \
+ $(CDL_FILES) \
+ FILES
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: BlockFix.cdl
--- Created: Tue Dec 7 11:59:05 2004
--- Author: Pavel Durandin
---
-package BlockFix
-
-uses
-
- TColStd,
- gp,
- Geom,
- Geom2d,
- GeomAbs,
- TopLoc,
- TopoDS,
- BRepTools,
- TopTools,
- ShapeBuild
-
-is
-
- class SphereSpaceModifier;
-
- class UnionFaces;
-
- class UnionEdges;
-
- class BlockFixAPI;
- ---Purpose: API class to perform the fixing of the
- -- block
-
- class PeriodicSurfaceModifier;
-
- class CheckTool;
-
- RotateSphereSpace (S: Shape from TopoDS; Tol: Real)
- returns Shape from TopoDS;
-
- FixRanges (S: Shape from TopoDS; Tol: Real)
- returns Shape from TopoDS;
- ---Purpose: checking and fixing cases where parametric
- -- boundaries of face based on periodic surface are not
- -- contained in the range of this surface.
-
-end BlockFix;
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: BlockFix.cxx
-// Created: Tue Dec 7 11:59:05 2004
-// Author: Pavel DURANDIN
-
-#include <BlockFix.hxx>
-
-#include <BlockFix_SphereSpaceModifier.hxx>
-#include <BlockFix_PeriodicSurfaceModifier.hxx>
-
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <TopLoc_Location.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Wire.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Solid.hxx>
-#include <TopoDS_Vertex.hxx>
-
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_DataMapOfShapeShape.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-
-#include <BRepAdaptor_Surface.hxx>
-
-#include <BRepTools.hxx>
-#include <BRepTools_Modifier.hxx>
-#include <BRepTools_Substitution.hxx>
-
-#include <BRepOffsetAPI_MakeFilling.hxx>
-
-#include <ShapeFix.hxx>
-#include <ShapeFix_Edge.hxx>
-#include <ShapeFix_Face.hxx>
-
-#include <ShapeAnalysis.hxx>
-#include <ShapeAnalysis_Edge.hxx>
-#include <ShapeAnalysis_Curve.hxx>
-#include <ShapeAnalysis_Surface.hxx>
-
-#include <ShapeCustom.hxx>
-
-#include <ShapeBuild_Edge.hxx>
-#include <ShapeBuild_ReShape.hxx>
-
-#include <ShapeFix_Wire.hxx>
-
-#include <Geom_Surface.hxx>
-#include <Geom_CylindricalSurface.hxx>
-#include <Geom_ConicalSurface.hxx>
-#include <Geom_SphericalSurface.hxx>
-#include <Geom_ToroidalSurface.hxx>
-
-#include <Geom2d_Curve.hxx>
-
-#include <TColgp_SequenceOfPnt2d.hxx>
-
-//=======================================================================
-//function : FixResult
-//purpose : auxilary
-//=======================================================================
-static void FixResult(const TopoDS_Shape& result,
- Handle(ShapeBuild_ReShape)& Context,
- const Standard_Real Tol)
-{
- for (TopExp_Explorer ex_f(result,TopAbs_FACE); ex_f.More(); ex_f.Next()) {
- TopoDS_Shape aShape = Context->Apply(ex_f.Current().Oriented(TopAbs_FORWARD));
- // face coud not be dropped or splitted on this step
- TopoDS_Face aFace = TopoDS::Face(aShape);
- TopLoc_Location L;
- Handle(Geom_Surface) Surf = BRep_Tool::Surface(aFace,L);
-
- if( Surf->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ||
- Surf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) ) {
-
- Standard_Integer nbWires = 0;
- for (TopExp_Explorer ex_w(aFace,TopAbs_WIRE); ex_w.More(); ex_w.Next()) {
- nbWires++;
- Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire(TopoDS::Wire(ex_w.Current()),
- aFace,
- Precision::Confusion());
- sfw->FixReorder();
- if(sfw->StatusReorder ( ShapeExtend_FAIL ))
- continue;
-
- sfw->SetPrecision(2.*Tol);
- sfw->FixShifted();
-
- Standard_Boolean isDone = sfw->LastFixStatus ( ShapeExtend_DONE );
- isDone |= sfw->FixDegenerated();
-
- // remove degenerated edges from not degenerated points
- ShapeAnalysis_Edge sae;
- Handle(ShapeExtend_WireData) sewd = sfw->WireData();
- Standard_Integer i;
- for( i = 1; i<=sewd->NbEdges();i++) {
- TopoDS_Edge E = sewd->Edge(i);
- if(BRep_Tool::Degenerated(E)&&!sae.HasPCurve(E,aFace)) {
- sewd->Remove(i);
- isDone = Standard_True;
- i--;
- }
- }
-
- //isDone |= sfw->FixLacking(); // commented by skl 22.03.2005 (PAL8395)
-
- // remove neighbour seam edges
- if(isDone) {
- for( i = 1; i<sewd->NbEdges();i++) {
- if(sewd->IsSeam(i) && sewd->IsSeam(i+1)) {
- isDone = Standard_True;
- sewd->Remove(i);
- sewd->Remove(i);
- i--;
- }
- }
- if(sewd->IsSeam(1) && sewd->IsSeam(sewd->NbEdges())) {
- sewd->Remove(1);
- sewd->Remove(sewd->NbEdges());
- }
- }
-
- if(isDone) {
- TopoDS_Wire ResWire = sfw->Wire();
- Context->Replace(ex_w.Current(), ResWire);
- };
- }
- // Implement fix orientation in case of several wires
- if(nbWires > 1) {
- TopoDS_Face aFixedFace = TopoDS::Face(Context->Apply(aFace));
- Handle(ShapeFix_Face) sff = new ShapeFix_Face(aFixedFace);
- if(sff->FixOrientation())
- Context->Replace(aFixedFace,sff->Face());
- }
- }
- }
-}
-
-//=======================================================================
-//function : RotateSphereSpace
-//purpose :
-//=======================================================================
-TopoDS_Shape BlockFix::RotateSphereSpace (const TopoDS_Shape& S,
- const Standard_Real Tol)
-{
- // Create a modification description
- Handle(BlockFix_SphereSpaceModifier) SR = new BlockFix_SphereSpaceModifier;
- SR->SetTolerance(Tol);
-
- TopTools_DataMapOfShapeShape context;
- BRepTools_Modifier MD;
- TopoDS_Shape result = ShapeCustom::ApplyModifier ( S, SR, context,MD );
-
- Handle(ShapeBuild_ReShape) RS = new ShapeBuild_ReShape;
- FixResult(result,RS,Tol);
- result = RS->Apply(result);
-
- ShapeFix_Edge sfe;
- for(TopExp_Explorer exp(result,TopAbs_EDGE); exp.More(); exp.Next()) {
- TopoDS_Edge E = TopoDS::Edge(exp.Current());
- sfe.FixVertexTolerance (E);
- }
-
- ShapeFix::SameParameter(result,Standard_False);
- return result;
-}
-
-//=======================================================================
-//function : RefillProblemFaces
-//purpose :
-//=======================================================================
-TopoDS_Shape BlockFix::RefillProblemFaces (const TopoDS_Shape& aShape)
-{
- Standard_Integer NbSamples = 10;
-
- TopTools_ListOfShape theFaces;
-
- TopExp_Explorer Explo(aShape, TopAbs_FACE);
- for (; Explo.More(); Explo.Next())
- {
- TopoDS_Face aFace = TopoDS::Face(Explo.Current());
- BRepAdaptor_Surface BAsurf(aFace);
- GeomAbs_SurfaceType SurfType = BAsurf.GetType();
- if (SurfType >= GeomAbs_BezierSurface)
- {
- TopExp_Explorer fexp(aFace, TopAbs_EDGE);
- for (; fexp.More(); fexp.Next())
- {
- const TopoDS_Edge& anEdge = TopoDS::Edge(fexp.Current());
- if (BRep_Tool::Degenerated(anEdge))
- {
- TopoDS_Vertex V1, V2;
- TopExp::Vertices(anEdge, V1, V2);
- if (V1.IsSame(V2))
- {
- gp_Pnt aPnt = BRep_Tool::Pnt(V1);
- Standard_Real TolV = BRep_Tool::Tolerance(V1);
- Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
- Handle(ShapeAnalysis_Surface) Analyser = new ShapeAnalysis_Surface(aSurf);
- if (Analyser->IsDegenerated(aPnt, TolV))
- {
- theFaces.Append(aFace);
- break;
- }
- }
- }
- }
- }
- }
-
- //Now all problem faces are collected in the list "theFaces"
- BRepTools_Substitution aSubst;
- TopTools_ListIteratorOfListOfShape itl(theFaces);
- for (; itl.More(); itl.Next())
- {
- const TopoDS_Face& aFace = TopoDS::Face(itl.Value());
- BRepOffsetAPI_MakeFilling Filler;
- for (Explo.Init(aFace, TopAbs_EDGE); Explo.More(); Explo.Next())
- {
- const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current());
- if (!BRep_Tool::Degenerated(anEdge))
- Filler.Add(anEdge, GeomAbs_C0);
- }
- Standard_Real Umin, Umax, Vmin, Vmax;
- BRepTools::UVBounds(aFace, Umin, Umax, Vmin, Vmax);
- //Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
- Standard_Integer i, j;
- for (i = 1; i < NbSamples; i++)
- for (j = 1; j < NbSamples; j++) {
- /*
- gp_Pnt aPoint = aSurf->Value(Umin + i*(Umax-Umin)/NbSamples,
- Vmin + j*(Vmax-Vmin)/NbSamples);
- Filler.Add(aPoint);
- */
- Filler.Add(Umin + i*(Umax-Umin)/NbSamples,
- Vmin + j*(Vmax-Vmin)/NbSamples,
- aFace, GeomAbs_G1);
- }
-
- Filler.Build();
- if (Filler.IsDone())
- {
- for (Explo.Init(aFace, TopAbs_EDGE); Explo.More(); Explo.Next())
- {
- const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current());
- TopTools_ListOfShape Ledge;
- if (!BRep_Tool::Degenerated(anEdge))
- {
- const TopTools_ListOfShape& Ledges = Filler.Generated(anEdge);
- if (!Ledges.IsEmpty()) {
- TopoDS_Shape NewEdge = Ledges.First();
- Ledge.Append(NewEdge.Oriented(TopAbs_FORWARD));
- }
- }
- aSubst.Substitute(anEdge, Ledge);
- }
- TopTools_ListOfShape Lface;
- TopoDS_Face NewFace = TopoDS::Face(Filler.Shape());
- NewFace.Orientation(TopAbs_FORWARD);
- BRepAdaptor_Surface NewBAsurf(NewFace);
- gp_Pnt MidPnt;
- gp_Vec D1U, D1V, Normal, NewNormal;
- Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
- aSurf->D1((Umin+Umax)*0.5, (Vmin+Vmax)*0.5, MidPnt, D1U, D1V);
- Normal = D1U ^ D1V;
- NewBAsurf.D1((NewBAsurf.FirstUParameter() + NewBAsurf.LastUParameter())*0.5,
- (NewBAsurf.FirstVParameter() + NewBAsurf.LastVParameter())*0.5,
- MidPnt, D1U, D1V);
- NewNormal = D1U ^ D1V;
- if (Normal * NewNormal < 0.)
- NewFace.Reverse();
- Lface.Append(NewFace);
- aSubst.Substitute(aFace, Lface);
- }
- }
- aSubst.Build(aShape);
-
- TopoDS_Shape Result = aShape;
- if (aSubst.IsCopied(aShape))
- Result = aSubst.Copy(aShape).First();
-
- BRepTools::RemoveUnusedPCurves(Result);
-
- return Result;
-}
-
-//=======================================================================
-//function : FixRanges
-//purpose :
-//=======================================================================
-TopoDS_Shape BlockFix::FixRanges (const TopoDS_Shape& S,
- const Standard_Real Tol)
-{
- // Create a modification description
- Handle(BlockFix_PeriodicSurfaceModifier) SR = new BlockFix_PeriodicSurfaceModifier;
- SR->SetTolerance(Tol);
-
- TopTools_DataMapOfShapeShape context;
- BRepTools_Modifier MD;
- TopoDS_Shape result = ShapeCustom::ApplyModifier ( S, SR, context,MD );
-
- Handle(ShapeBuild_ReShape) RS = new ShapeBuild_ReShape;
- FixResult(result,RS,Tol);
- result = RS->Apply(result);
-
- ShapeFix_Edge sfe;
- for(TopExp_Explorer exp(result,TopAbs_EDGE); exp.More(); exp.Next()) {
- TopoDS_Edge E = TopoDS::Edge(exp.Current());
- sfe.FixVertexTolerance (E);
- }
-
- ShapeFix::SameParameter(result,Standard_False);
-
- return result;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _BlockFix_HeaderFile
-#define _BlockFix_HeaderFile
-
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-
-class TopoDS_Shape;
-class BlockFix_SphereSpaceModifier;
-class BlockFix_UnionFaces;
-class BlockFix_UnionEdges;
-class BlockFix_BlockFixAPI;
-class BlockFix_PeriodicSurfaceModifier;
-class BlockFix_CheckTool;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-class BlockFix {
-
-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);
- }
-
- Standard_EXPORT static TopoDS_Shape RotateSphereSpace(const TopoDS_Shape& S,const Standard_Real Tol);
- Standard_EXPORT static TopoDS_Shape RefillProblemFaces(const TopoDS_Shape& S);
- Standard_EXPORT static TopoDS_Shape FixRanges(const TopoDS_Shape& S,const Standard_Real Tol);
-
-protected:
-
-private:
-
-friend class BlockFix_SphereSpaceModifier;
-friend class BlockFix_UnionFaces;
-friend class BlockFix_UnionEdges;
-friend class BlockFix_BlockFixAPI;
-friend class BlockFix_PeriodicSurfaceModifier;
-friend class BlockFix_CheckTool;
-
-};
-
-// other Inline functions and methods (like "C++: function call" methods)
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <BlockFix.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _BlockFix_HeaderFile
-#include <BlockFix.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: BlockFix_BlockFixAPI.cdl
--- Created: Tue Dec 7 17:56:09 2004
--- Author: Pavel Durandin
---
-class BlockFixAPI from BlockFix inherits TShared from MMgt
-
- ---Purpose:
-
-uses
-
- Shape from TopoDS,
- ReShape from ShapeBuild
-
-is
- Create returns BlockFixAPI from BlockFix;
- ---Purpose: Empty constructor
-
- SetShape(me: mutable; Shape: Shape from TopoDS);
- ---Purpose: Sets the shape to be operated on
- ---C++: inline
-
- Perform(me: mutable);
- ---Purpose:
-
- Shape(me) returns Shape from TopoDS;
- ---Purpose: Returns resulting shape.
- ---C++: inline
-
- Context(me:mutable) returns ReShape from ShapeBuild;
- ---Purpose: Returns modifiable context for storing the
- -- mofifications
- ---C++: inline
- ---C++: return &
-
- Tolerance (me:mutable) returns Real;
- ---Purpose: Returns modifiable tolerance of recognition
- ---C++: inline
- ---C++: return &
-
-fields
-
- myContext : ReShape from ShapeBuild;
- myShape : Shape from TopoDS;
- myTolerance : Real from Standard;
-
-end BlockFixAPI from BlockFix;
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: BlockFix_BlockFixAPI.cxx
-// Created: Tue Dec 7 11:59:05 2004
-// Author: Pavel DURANDIN
-
-#include <BlockFix_BlockFixAPI.ixx>
-
-#include <BlockFix.hxx>
-#include <BlockFix_UnionFaces.hxx>
-#include <BlockFix_UnionEdges.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
-#include <ShapeUpgrade_RemoveLocations.hxx>
-
-#include <Precision.hxx>
-
-//=======================================================================
-//function : ShapeConvert_CanonicAPI
-//purpose :
-//=======================================================================
-
-BlockFix_BlockFixAPI::BlockFix_BlockFixAPI()
-{
- myTolerance = Precision::Confusion();
- myOptimumNbFaces = 6;
-}
-
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
-
-void BlockFix_BlockFixAPI::Perform()
-{
- // processing spheres with degenerativities
- TopoDS_Shape aShape = Shape();
- myShape = BlockFix::RotateSphereSpace(aShape,myTolerance);
-
- // try to approximate non-canonic surfaces
- // with singularities on boundaries by filling
- myShape = BlockFix::RefillProblemFaces(myShape);
-
- // faces unification
- BlockFix_UnionFaces aFaceUnifier;
- aFaceUnifier.GetTolerance() = myTolerance;
- aFaceUnifier.GetOptimumNbFaces() = myOptimumNbFaces;
- TopoDS_Shape aResult = aFaceUnifier.Perform(myShape);
-
- // avoid problem with degenerated edges appearance
- // due to shape quality regress
- ShapeUpgrade_RemoveLocations RemLoc;
- RemLoc.Remove(aResult);
- aResult = RemLoc.GetResult();
-
- // edges unification
- BlockFix_UnionEdges anEdgeUnifier;
- myShape = anEdgeUnifier.Perform(aResult,myTolerance);
-
- TopoDS_Shape aRes = BlockFix::FixRanges(myShape,myTolerance);
- myShape = aRes;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _BlockFix_BlockFixAPI_HeaderFile
-#define _BlockFix_BlockFixAPI_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_BlockFix_BlockFixAPI_HeaderFile
-#include <Handle_BlockFix_BlockFixAPI.hxx>
-#endif
-
-#ifndef _Handle_ShapeBuild_ReShape_HeaderFile
-#include <Handle_ShapeBuild_ReShape.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _MMgt_TShared_HeaderFile
-#include <MMgt_TShared.hxx>
-#endif
-
-class ShapeBuild_ReShape;
-class TopoDS_Shape;
-
-
-class BlockFix_BlockFixAPI : public MMgt_TShared
-{
-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 BlockFix_BlockFixAPI();
- void SetShape(const TopoDS_Shape& Shape);
- Standard_EXPORT void Perform();
- TopoDS_Shape Shape() const;
- Handle_ShapeBuild_ReShape& Context();
- Standard_Real& Tolerance();
- Standard_Integer& OptimumNbFaces();
- Standard_EXPORT ~BlockFix_BlockFixAPI();
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& BlockFix_BlockFixAPI_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-private:
- // Fields PRIVATE
- //
- Handle_ShapeBuild_ReShape myContext;
- TopoDS_Shape myShape;
- Standard_Real myTolerance;
- Standard_Integer myOptimumNbFaces;
-};
-
-#include <BlockFix_BlockFixAPI.lxx>
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <BlockFix_BlockFixAPI.jxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-BlockFix_BlockFixAPI::~BlockFix_BlockFixAPI() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& BlockFix_BlockFixAPI_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("BlockFix_BlockFixAPI",
- sizeof(BlockFix_BlockFixAPI),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(BlockFix_BlockFixAPI) Handle(BlockFix_BlockFixAPI)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(BlockFix_BlockFixAPI) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(BlockFix_BlockFixAPI))) {
- _anOtherObject = Handle(BlockFix_BlockFixAPI)((Handle(BlockFix_BlockFixAPI)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& BlockFix_BlockFixAPI::DynamicType() const
-{
- return STANDARD_TYPE(BlockFix_BlockFixAPI) ;
-}
-Standard_Boolean BlockFix_BlockFixAPI::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(BlockFix_BlockFixAPI) == AType || MMgt_TShared::IsKind(AType));
-}
-Handle_BlockFix_BlockFixAPI::~Handle_BlockFix_BlockFixAPI() {}
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _ShapeBuild_ReShape_HeaderFile
-#include <ShapeBuild_ReShape.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _BlockFix_BlockFixAPI_HeaderFile
-#include <BlockFix_BlockFixAPI.hxx>
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <BlockFix_BlockFixAPI.hxx>
-
-//=======================================================================
-//function : SetShape
-//purpose :
-//=======================================================================
-
-inline void BlockFix_BlockFixAPI::SetShape(const TopoDS_Shape& Shape)
-{
- myShape = Shape;
-}
-
-//=======================================================================
-//function : Shape
-//purpose :
-//=======================================================================
-
-inline TopoDS_Shape BlockFix_BlockFixAPI::Shape() const
-{
- return myShape;
-}
-
-//=======================================================================
-//function : Context
-//purpose :
-//=======================================================================
-
-inline Handle(ShapeBuild_ReShape)& BlockFix_BlockFixAPI::Context()
-{
- return myContext;
-}
-
-//=======================================================================
-//function : Tolerance
-//purpose :
-//=======================================================================
-
-inline Standard_Real& BlockFix_BlockFixAPI::Tolerance()
-{
- return myTolerance;
-}
-
-//=======================================================================
-//function : OptimumNbFaces
-//purpose :
-//=======================================================================
-
-inline Standard_Integer& BlockFix_BlockFixAPI::OptimumNbFaces()
-{
- return myOptimumNbFaces;
-}
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: BlockFix_CheckTool.cdl
--- Created: Fri Dec 17 10:36:58 2004
--- Author: Sergey KUUL
---
-class CheckTool from BlockFix
-
- ---Purpose:
-
-uses
-
- Shape from TopoDS,
- SequenceOfShape from TopTools
-
-is
-
- Create returns CheckTool from BlockFix;
- ---Purpose: Empty constructor
-
- SetShape(me: in out; aShape: Shape from TopoDS);
-
- Perform(me: in out);
- ---Purpose:
-
- NbPossibleBlocks(me) returns Integer;
-
- PossibleBlock(me; num: Integer) returns Shape from TopoDS;
-
- DumpCheckResult(me; S : in out OStream);
- ---Purpose: Dumps results of checking
-
-
-fields
-
- myShape : Shape from TopoDS;
- myHasCheck : Boolean;
- myNbSolids : Integer;
- myNbBlocks : Integer;
- myPossibleBlocks : SequenceOfShape from TopTools;
- myNbDegen : Integer;
- myNbUF : Integer;
- myNbUE : Integer;
- myNbUFUE : Integer;
- myBadRanges : Integer;
-
-end CheckTool;
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: BlockFix_CheckTool.cxx
-// Created: 17.12.04 11:15:25
-// Author: Sergey KUUL
-//
-#include <BlockFix_CheckTool.ixx>
-
-//#include <BlockFix_UnionEdges.hxx>
-//#include <BlockFix_UnionFaces.hxx>
-
-#include <BRep_Tool.hxx>
-
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-#include <TopoDS.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Solid.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-
-
-//=======================================================================
-//function : BlockFix_CheckTool()
-//purpose : Constructor
-//=======================================================================
-
-BlockFix_CheckTool::BlockFix_CheckTool( )
-{
- myHasCheck = Standard_False;
- myPossibleBlocks.Clear();
-}
-
-
-//=======================================================================
-//function : SetShape
-//purpose :
-//=======================================================================
-
-void BlockFix_CheckTool::SetShape(const TopoDS_Shape& aShape)
-{
- myHasCheck = Standard_False;
- myShape = aShape;
- myPossibleBlocks.Clear();
-}
-
-
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
-
-void BlockFix_CheckTool::Perform()
-{
- myNbSolids=0;
- myNbBlocks=0;
- myNbDegen=0;
- myNbUF=0;
- myNbUE=0;
- myNbUFUE=0;
-
- TopExp_Explorer exps (myShape, TopAbs_SOLID);
- TopTools_MapOfShape mapS;
- for (; exps.More(); exps.Next()) {
- TopoDS_Solid aSolid = TopoDS::Solid(exps.Current());
- if (!mapS.Add(aSolid)) continue;
- myNbSolids++;
- Standard_Boolean IsBlock=Standard_True;
- Standard_Boolean MayBeUF=Standard_False;
- Standard_Boolean MayBeUE=Standard_False;
- Standard_Integer nf=0;
- TopExp_Explorer expf (aSolid, TopAbs_FACE);
- TopTools_MapOfShape mapF;
- for (; expf.More(); expf.Next()) {
- if (mapF.Add(expf.Current()))
- nf++;
- }
-
- if (nf < 6) {
- IsBlock = Standard_False;
- }
- else if (nf > 6) {
- IsBlock = Standard_False;
- // check faces unification
- TopTools_SequenceOfShape faces;
- mapF.Clear();
- for (expf.Init(aSolid, TopAbs_FACE); expf.More(); expf.Next()) {
- if (mapF.Add(expf.Current())) {
- TopoDS_Face aFace = TopoDS::Face(expf.Current());
- faces.Append(aFace);
- }
- }
- Standard_Boolean HasFacesForUnification = Standard_False;
- for (Standard_Integer i=1; i<faces.Length() && !HasFacesForUnification; i++) {
- TopoDS_Face F1 = TopoDS::Face(faces.Value(i));
- TopTools_MapOfShape Edges;
- for (TopExp_Explorer expe(F1,TopAbs_EDGE); expe.More(); expe.Next())
- Edges.Add(expe.Current().Oriented(TopAbs_FORWARD));
- TopLoc_Location L1;
- Handle(Geom_Surface) S1 = BRep_Tool::Surface(F1,L1);
- for(Standard_Integer j=i+1; j<=faces.Length() && !HasFacesForUnification; j++) {
- TopoDS_Face F2 = TopoDS::Face(faces.Value(j));
- TopLoc_Location L2;
- Handle(Geom_Surface) S2 = BRep_Tool::Surface(F2,L2);
- if( S1==S2 && L1==L2 ) {
- // faces have equal based surface
- // now check common edge
- for(TopExp_Explorer expe2(F2,TopAbs_EDGE); expe2.More(); expe2.Next()) {
- if(Edges.Contains(expe2.Current().Oriented(TopAbs_FORWARD))) {
- HasFacesForUnification = Standard_True;
- break;
- }
- }
- }
- }
- }
- if (HasFacesForUnification) {
- MayBeUF=Standard_True;
- }
- }
-
- Standard_Integer nbe=0;
- TopTools_MapOfShape DegenEdges;
- TopExp_Explorer expe (aSolid, TopAbs_EDGE);
- TopTools_MapOfShape mapE;
- for (; expe.More(); expe.Next()) {
- TopoDS_Edge E = TopoDS::Edge(expe.Current());
- if (!mapE.Add(E)) continue;
- if (BRep_Tool::Degenerated(E)) {
- DegenEdges.Add(E);
- }
- else {
- nbe++;
- }
- }
- if (nbe == 12 && DegenEdges.Extent() > 0) {
- IsBlock = Standard_False;
- myNbDegen++;
- myPossibleBlocks.Append(aSolid);
- continue;
- }
- if (nbe < 12)
- IsBlock = Standard_False;
- if (nbe > 12) {
- IsBlock = Standard_False;
- // check edges unification
- // creating map of edge faces
- TopTools_IndexedDataMapOfShapeListOfShape aMapEdgeFaces;
- TopExp::MapShapesAndAncestors(aSolid, TopAbs_EDGE, TopAbs_FACE, aMapEdgeFaces);
-
- mapF.Clear();
- for (expf.Init(aSolid, TopAbs_FACE); expf.More(); expf.Next()) {
- TopoDS_Face aFace = TopoDS::Face(expf.Current());
- if (!mapF.Add(aFace)) continue;
- TopTools_IndexedDataMapOfShapeListOfShape aMapFacesEdges;
-
- TopTools_MapOfShape mapEe;
- for (expe.Init(aFace, TopAbs_EDGE); expe.More(); expe.Next()) {
- TopoDS_Edge edge = TopoDS::Edge(expe.Current());
- if (!mapEe.Add(edge)) continue;
- if (!aMapEdgeFaces.Contains(edge)) continue;
- const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge);
- TopTools_ListIteratorOfListOfShape anIter (aList);
- for (; anIter.More(); anIter.Next()) {
- TopoDS_Face face = TopoDS::Face(anIter.Value());
- if (face.IsSame(aFace)) continue;
- if (aMapFacesEdges.Contains(face)) {
- aMapFacesEdges.ChangeFromKey(face).Append(edge);
- }
- else {
- TopTools_ListOfShape ListEdges;
- ListEdges.Append(edge);
- aMapFacesEdges.Add(face,ListEdges);
- }
- }
- }
- Standard_Integer i = 1;
- for (; i <= aMapFacesEdges.Extent(); i++) {
- const TopTools_ListOfShape& ListEdges = aMapFacesEdges.FindFromIndex(i);
- if (ListEdges.Extent() > 1) break;
- }
- if (i <= aMapFacesEdges.Extent()) {
- MayBeUE = Standard_True;
- break;
- }
- }
- }
-
- if (IsBlock)
- myNbBlocks++;
- else {
- if (MayBeUF) {
- myPossibleBlocks.Append(aSolid);
- if (MayBeUE)
- myNbUFUE++;
- else
- myNbUF++;
- }
- else if (MayBeUE) {
- myNbUE++;
- myPossibleBlocks.Append(aSolid);
- }
- }
- }
-
- myHasCheck = Standard_True;
-}
-
-
-//=======================================================================
-//function : NbPossibleBlocks
-//purpose :
-//=======================================================================
-
-Standard_Integer BlockFix_CheckTool::NbPossibleBlocks() const
-{
- return myPossibleBlocks.Length();
-}
-
-
-//=======================================================================
-//function : PossibleBlock
-//purpose :
-//=======================================================================
-
-TopoDS_Shape BlockFix_CheckTool::PossibleBlock(const Standard_Integer num) const
-{
- TopoDS_Shape res;
- if( num>0 && num<=myPossibleBlocks.Length() )
- res = myPossibleBlocks.Value(num);
- return res;
-}
-
-
-//=======================================================================
-//function : DumpCheckResult
-//purpose :
-//=======================================================================
-
-void BlockFix_CheckTool::DumpCheckResult(Standard_OStream& S) const
-{
- if(!myHasCheck)
- S<<"Check not performed!"<<endl;
- else {
- S<<"dump results of check:"<<endl;
- S<<" total number of solids = "<<myNbSolids<<endl;
- S<<" including: number of good blocks = "<<myNbBlocks<<endl;
- S<<" number of possible blocks = "<<NbPossibleBlocks()<<endl;
- S<<" including: need remove degenerative = "<<myNbDegen<<endl;
- S<<" need unionfaces = "<<myNbUF<<endl;
- S<<" need unionedges = "<<myNbUE<<endl;
- S<<" need both unionfaces and unionedges = "<<myNbUFUE<<endl;
- Standard_Integer nbtmp = myNbSolids - myNbBlocks - NbPossibleBlocks();
- S<<" number of impossible blocks = "<<nbtmp<<endl;
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _BlockFix_CheckTool_HeaderFile
-#define _BlockFix_CheckTool_HeaderFile
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _TopTools_SequenceOfShape_HeaderFile
-#include <TopTools_SequenceOfShape.hxx>
-#endif
-#ifndef _Standard_OStream_HeaderFile
-#include <Standard_OStream.hxx>
-#endif
-class TopoDS_Shape;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-class BlockFix_CheckTool {
-
-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 BlockFix_CheckTool();
-Standard_EXPORT void SetShape(const TopoDS_Shape& aShape) ;
-Standard_EXPORT void Perform() ;
-Standard_EXPORT Standard_Integer NbPossibleBlocks() const;
-Standard_EXPORT TopoDS_Shape PossibleBlock(const Standard_Integer num) const;
-Standard_EXPORT void DumpCheckResult(Standard_OStream& S) const;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-TopoDS_Shape myShape;
-Standard_Boolean myHasCheck;
-Standard_Integer myNbSolids;
-Standard_Integer myNbBlocks;
-TopTools_SequenceOfShape myPossibleBlocks;
-Standard_Integer myNbDegen;
-Standard_Integer myNbUF;
-Standard_Integer myNbUE;
-Standard_Integer myNbUFUE;
-Standard_Integer myBadRanges;
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <BlockFix_CheckTool.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _BlockFix_CheckTool_HeaderFile
-#include <BlockFix_CheckTool.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: BlockFix_PeriodicSurfaceModifier.cdl
--- Created: Wed Dec 15 10:03:50 2004
--- Author: Sergey KUUL
---
-class PeriodicSurfaceModifier from BlockFix inherits Modification from BRepTools
-
- ---Purpose:
-
-uses
- Vertex from TopoDS,
- Edge from TopoDS,
- Face from TopoDS,
- Location from TopLoc,
- Shape from GeomAbs,
- Pnt from gp,
- Curve from Geom,
- Curve from Geom2d,
- Surface from Geom,
- IndexedMapOfTransient from TColStd,
- DataMapOfShapeInteger from TopTools
-
-is
-
- Create returns mutable PeriodicSurfaceModifier from BlockFix;
-
- SetTolerance(me: mutable; Toler: Real);
- ---Purpose: Sets the tolerance for recognition of geometry
-
- NewSurface(me: mutable; F : Face from TopoDS;
- S : out Surface from Geom;
- L : out Location from TopLoc;
- Tol: out Real from Standard;
- RevWires : out Boolean from Standard;
- RevFace : out Boolean from Standard)
- returns Boolean from Standard;
- ---Purpose: Returns Standard_True if the face <F> has been
- -- modified. In this case, <S> is the new geometric
- -- support of the face, <L> the new location, <Tol>
- -- the new tolerance. Otherwise, returns
- -- Standard_False, and <S>, <L>, <Tol> are not
- -- significant.
-
- NewCurve(me: mutable; E : Edge from TopoDS;
- C : out Curve from Geom;
- L : out Location from TopLoc;
- Tol: out Real from Standard)
- returns Boolean from Standard;
- ---Purpose: Returns Standard_True if the edge <E> has been
- -- modified. In this case, <C> is the new geometric
- -- support of the edge, <L> the new location, <Tol>
- -- the new tolerance. Otherwise, returns
- -- Standard_False, and <C>, <L>, <Tol> are not
- -- significant.
-
- NewPoint(me: mutable; V : Vertex from TopoDS;
- P : out Pnt from gp;
- Tol: out Real from Standard)
- returns Boolean from Standard;
- ---Purpose: Returns Standard_True if the vertex <V> has been
- -- modified. In this case, <P> is the new geometric
- -- support of the vertex, <Tol> the new tolerance.
- -- Otherwise, returns Standard_False, and <P>, <Tol>
- -- are not significant.
-
- NewCurve2d(me: mutable; E : Edge from TopoDS;
- F : Face from TopoDS;
- NewE : Edge from TopoDS;
- NewF : Face from TopoDS;
- C : out Curve from Geom2d;
- Tol : out Real from Standard)
- returns Boolean from Standard;
- ---Purpose: Returns Standard_True if the edge <E> has a new
- -- curve on surface on the face <F>.In this case, <C>
- -- is the new geometric support of the edge, <L> the
- -- new location, <Tol> the new tolerance.
- --
- -- Otherwise, returns Standard_False, and <C>, <L>,
- -- <Tol> are not significant.
- --
- -- <NewE> is the new edge created from <E>. <NewF>
- -- is the new face created from <F>. They may be usefull.
-
- NewParameter(me: mutable; V : Vertex from TopoDS;
- E : Edge from TopoDS;
- P : out Real from Standard;
- Tol: out Real from Standard)
- returns Boolean from Standard;
- ---Purpose: Returns Standard_True if the Vertex <V> has a new
- -- parameter on the edge <E>. In this case, <P> is
- -- the parameter, <Tol> the new tolerance.
- -- Otherwise, returns Standard_False, and <P>, <Tol>
- -- are not significant.
-
- Continuity(me: mutable; E : Edge from TopoDS;
- F1,F2 : Face from TopoDS;
- NewE : Edge from TopoDS;
- NewF1,NewF2: Face from TopoDS)
- returns Shape from GeomAbs;
- ---Purpose: Returns the continuity of <NewE> between <NewF1>
- -- and <NewF2>.
- --
- -- <NewE> is the new edge created from <E>. <NewF1>
- -- (resp. <NewF2>) is the new face created from <F1>
- -- (resp. <F2>).
-
-
-fields
-
- myTolerance : Real;
- myMapOfFaces : DataMapOfShapeInteger from TopTools;
- myMapOfSurfaces: IndexedMapOfTransient from TColStd;
-
-end PeriodicSurfaceModifier;
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: BlockFix_PeriodicSurfaceModifier.cxx
-// Created: 15.12.04 10:08:50
-// Author: Sergey KUUL
-
-#include <BlockFix_PeriodicSurfaceModifier.ixx>
-
-#include <BRep_Builder.hxx>
-#include <BRep_Tool.hxx>
-#include <BRepTools.hxx>
-#include <Geom_CylindricalSurface.hxx>
-#include <Geom_SphericalSurface.hxx>
-#include <ShapeFix_Edge.hxx>
-#include <TopExp.hxx>
-
-
-//=======================================================================
-//function : BlockFix_PeriodicSurfaceModifier()
-//purpose : Constructor
-//=======================================================================
-
-BlockFix_PeriodicSurfaceModifier::BlockFix_PeriodicSurfaceModifier ( )
-{
- myMapOfFaces.Clear();
- myMapOfSurfaces.Clear();
-}
-
-
-//=======================================================================
-//function : SetTolerance
-//purpose :
-//=======================================================================
-
-void BlockFix_PeriodicSurfaceModifier::SetTolerance(const Standard_Real Tol)
-{
- myTolerance = Tol;
-}
-
-
-//=======================================================================
-//function : ModifySurface
-//purpose : auxilary
-//=======================================================================
-
-static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
- const Handle(Geom_Surface)& aSurface,
- Handle(Geom_Surface)& aNewSurface)
-{
- Handle(Geom_Surface) S = aSurface;
-
- if(S->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) {
- Handle(Geom_CylindricalSurface) aCyl =
- Handle(Geom_CylindricalSurface)::DownCast(S);
- Standard_Real Umin, Umax, Vmin, Vmax;
- BRepTools::UVBounds(aFace, Umin, Umax, Vmin, Vmax);
- if (Umin < -Precision::PConfusion() || Umax > 2*M_PI + Precision::PConfusion()) {
- gp_Ax3 ax3 = aCyl->Position();
- gp_Ax1 NDir = ax3.Axis();
- gp_Ax3 newax3 = ax3.Rotated(NDir,Umin-Precision::PConfusion());
- Handle(Geom_CylindricalSurface) aNewCyl =
- new Geom_CylindricalSurface(newax3,aCyl->Radius());
- aNewSurface = aNewCyl;
- return Standard_True;
- }
- }
-
- if(S->IsKind(STANDARD_TYPE(Geom_SphericalSurface))) {
- Handle(Geom_SphericalSurface) aSphere = Handle(Geom_SphericalSurface)::DownCast(S);
- Standard_Real Umin, Umax, Vmin, Vmax;
- BRepTools::UVBounds(aFace, Umin, Umax, Vmin, Vmax);
- if (Umin < -Precision::PConfusion() || Umax > 2*M_PI + Precision::PConfusion()) {
- gp_Ax3 ax3 = aSphere->Position();
- gp_Ax1 NDir = ax3.Axis();
- gp_Ax3 newax3 = ax3.Rotated(NDir,Umin-Precision::PConfusion());
- Handle(Geom_SphericalSurface) aNewSphere = new Geom_SphericalSurface(newax3,aSphere->Radius());
- aNewSurface = aNewSphere;
- return Standard_True;
- }
- }
-
- return Standard_False;
-}
-
-
-//=======================================================================
-//function : NewSurface
-//purpose :
-//=======================================================================
-
-Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewSurface(const TopoDS_Face& F,
- Handle(Geom_Surface)& S,
- TopLoc_Location& L,Standard_Real& Tol,
- Standard_Boolean& RevWires,
- Standard_Boolean& RevFace)
-{
- TopLoc_Location LS;
- Handle(Geom_Surface) SIni = BRep_Tool::Surface(F, LS);
-
- if(ModifySurface(F, SIni, S)) {
-
- RevWires = Standard_False;
- RevFace = Standard_False;
-
- L = LS;
- Tol = BRep_Tool::Tolerance(F);
-
- Standard_Integer anIndex = myMapOfSurfaces.Add(S);
- myMapOfFaces.Bind(F,anIndex);
- return Standard_True;
- }
-
- return Standard_False;
-}
-
-
-//=======================================================================
-//function : NewCurve
-//purpose :
-//=======================================================================
-
-Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve(const TopoDS_Edge& /*E*/,
- Handle(Geom_Curve)& /*C*/,
- TopLoc_Location& /*L*/,
- Standard_Real& /*Tol*/)
-{
- return Standard_False;
-}
-
-
-//=======================================================================
-//function : NewPoint
-//purpose :
-//=======================================================================
-
-Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewPoint(const TopoDS_Vertex& /*V*/,
- gp_Pnt& /*P*/,
- Standard_Real& /*Tol*/)
-{
- return Standard_False;
-}
-
-
-//=======================================================================
-//function : NewCurve2d
-//purpose :
-//=======================================================================
-
-Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve2d(const TopoDS_Edge& E,
- const TopoDS_Face& F,
- const TopoDS_Edge& /*NewE*/,
- const TopoDS_Face& /*NewF*/,
- Handle(Geom2d_Curve)& C,
- Standard_Real& Tol)
-{
- //check if undelying surface of the face was modified
- if(myMapOfFaces.IsBound(F)) {
- Standard_Integer anIndex = myMapOfFaces.Find(F);
-
- Handle(Geom_Surface) aNewSurf = Handle(Geom_Surface)::DownCast(myMapOfSurfaces.FindKey(anIndex));
-
- Standard_Real f,l;
- TopLoc_Location LC, LS;
- Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l );
- Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS);
-
- //taking into accound the orientation of the seam
- C = BRep_Tool::CurveOnSurface(E,F,f,l);
- Tol = BRep_Tool::Tolerance(E);
-
- BRep_Builder B;
- TopoDS_Edge TempE;
- B.MakeEdge(TempE);
- B.Add(TempE, TopExp::FirstVertex(E));
- B.Add(TempE, TopExp::LastVertex(E));
-
- if(!C3d.IsNull())
- B.UpdateEdge(TempE, Handle(Geom_Curve)::DownCast(C3d->Transformed(LC.Transformation())), Precision::Confusion());
- B.Range(TempE, f, l);
-
- Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge;
- Handle(Geom_Surface) STemp = Handle(Geom_Surface)::DownCast(aNewSurf->Transformed(LS.Transformation()));
- TopLoc_Location LTemp;
- LTemp.Identity();
-
- Standard_Boolean isClosed = BRep_Tool::IsClosed (E, F);
- Standard_Real aWorkTol = 2*myTolerance+Tol;
- sfe->FixAddPCurve(TempE, STemp, LTemp, isClosed, Max(Precision::Confusion(), aWorkTol));
- sfe->FixSameParameter(TempE);
-
- //keep the orientation of original edge
- TempE.Orientation(E.Orientation());
- C = BRep_Tool::CurveOnSurface(TempE, STemp, LTemp, f, l);
-
- //surface was modified
- return Standard_True;
- }
-
- return Standard_False;
-}
-
-
-//=======================================================================
-//function : NewParameter
-//purpose :
-//=======================================================================
-
-Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewParameter(const TopoDS_Vertex& /*V*/,
- const TopoDS_Edge& /*E*/,
- Standard_Real& /*P*/,
- Standard_Real& /*Tol*/)
-{
- return Standard_False;
-}
-
-
-//=======================================================================
-//function : Continuity
-//purpose :
-//=======================================================================
-
-GeomAbs_Shape BlockFix_PeriodicSurfaceModifier::Continuity(const TopoDS_Edge& E,
- const TopoDS_Face& F1,
- const TopoDS_Face& F2,
- const TopoDS_Edge& /*NewE*/,
- const TopoDS_Face& /*NewF1*/,
- const TopoDS_Face& /*NewF2*/)
-{
- return BRep_Tool::Continuity(E,F1,F2);
-}
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _BlockFix_PeriodicSurfaceModifier_HeaderFile
-#define _BlockFix_PeriodicSurfaceModifier_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_BlockFix_PeriodicSurfaceModifier_HeaderFile
-#include <Handle_BlockFix_PeriodicSurfaceModifier.hxx>
-#endif
-
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _TopTools_DataMapOfShapeInteger_HeaderFile
-#include <TopTools_DataMapOfShapeInteger.hxx>
-#endif
-#ifndef _TColStd_IndexedMapOfTransient_HeaderFile
-#include <TColStd_IndexedMapOfTransient.hxx>
-#endif
-#ifndef _BRepTools_Modification_HeaderFile
-#include <BRepTools_Modification.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Handle_Geom_Surface_HeaderFile
-#include <Handle_Geom_Surface.hxx>
-#endif
-#ifndef _Handle_Geom_Curve_HeaderFile
-#include <Handle_Geom_Curve.hxx>
-#endif
-#ifndef _Handle_Geom2d_Curve_HeaderFile
-#include <Handle_Geom2d_Curve.hxx>
-#endif
-#ifndef _GeomAbs_Shape_HeaderFile
-#include <GeomAbs_Shape.hxx>
-#endif
-class TopoDS_Face;
-class Geom_Surface;
-class TopLoc_Location;
-class TopoDS_Edge;
-class Geom_Curve;
-class TopoDS_Vertex;
-class gp_Pnt;
-class Geom2d_Curve;
-
-
-class BlockFix_PeriodicSurfaceModifier : public BRepTools_Modification {
-
-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 BlockFix_PeriodicSurfaceModifier();
-Standard_EXPORT void SetTolerance(const Standard_Real Toler) ;
-Standard_EXPORT Standard_Boolean NewSurface(const TopoDS_Face& F,Handle(Geom_Surface)& S,TopLoc_Location& L,Standard_Real& Tol,Standard_Boolean& RevWires,Standard_Boolean& RevFace) ;
-Standard_EXPORT Standard_Boolean NewCurve(const TopoDS_Edge& E,Handle(Geom_Curve)& C,TopLoc_Location& L,Standard_Real& Tol) ;
-Standard_EXPORT Standard_Boolean NewPoint(const TopoDS_Vertex& V,gp_Pnt& P,Standard_Real& Tol) ;
-Standard_EXPORT Standard_Boolean NewCurve2d(const TopoDS_Edge& E,const TopoDS_Face& F,const TopoDS_Edge& NewE,const TopoDS_Face& NewF,Handle(Geom2d_Curve)& C,Standard_Real& Tol) ;
-Standard_EXPORT Standard_Boolean NewParameter(const TopoDS_Vertex& V,const TopoDS_Edge& E,Standard_Real& P,Standard_Real& Tol) ;
-Standard_EXPORT GeomAbs_Shape Continuity(const TopoDS_Edge& E,const TopoDS_Face& F1,const TopoDS_Face& F2,const TopoDS_Edge& NewE,const TopoDS_Face& NewF1,const TopoDS_Face& NewF2) ;
-Standard_EXPORT ~BlockFix_PeriodicSurfaceModifier();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Real myTolerance;
-TopTools_DataMapOfShapeInteger myMapOfFaces;
-TColStd_IndexedMapOfTransient myMapOfSurfaces;
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <BlockFix_PeriodicSurfaceModifier.jxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-BlockFix_PeriodicSurfaceModifier::~BlockFix_PeriodicSurfaceModifier() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(BRepTools_Modification);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(BRepTools_Modification);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("BlockFix_PeriodicSurfaceModifier",
- sizeof(BlockFix_PeriodicSurfaceModifier),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(BlockFix_PeriodicSurfaceModifier) Handle(BlockFix_PeriodicSurfaceModifier)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(BlockFix_PeriodicSurfaceModifier) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier))) {
- _anOtherObject = Handle(BlockFix_PeriodicSurfaceModifier)((Handle(BlockFix_PeriodicSurfaceModifier)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& BlockFix_PeriodicSurfaceModifier::DynamicType() const
-{
- return STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) ;
-}
-Standard_Boolean BlockFix_PeriodicSurfaceModifier::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) == AType || BRepTools_Modification::IsKind(AType));
-}
-Handle_BlockFix_PeriodicSurfaceModifier::~Handle_BlockFix_PeriodicSurfaceModifier() {}
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Face_HeaderFile
-#include <TopoDS_Face.hxx>
-#endif
-#ifndef _Geom_Surface_HeaderFile
-#include <Geom_Surface.hxx>
-#endif
-#ifndef _TopLoc_Location_HeaderFile
-#include <TopLoc_Location.hxx>
-#endif
-#ifndef _TopoDS_Edge_HeaderFile
-#include <TopoDS_Edge.hxx>
-#endif
-#ifndef _Geom_Curve_HeaderFile
-#include <Geom_Curve.hxx>
-#endif
-#ifndef _TopoDS_Vertex_HeaderFile
-#include <TopoDS_Vertex.hxx>
-#endif
-#ifndef _gp_Pnt_HeaderFile
-#include <gp_Pnt.hxx>
-#endif
-#ifndef _Geom2d_Curve_HeaderFile
-#include <Geom2d_Curve.hxx>
-#endif
-#ifndef _BlockFix_PeriodicSurfaceModifier_HeaderFile
-#include <BlockFix_PeriodicSurfaceModifier.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: BlockFix_SphereSpaceModifier.cdl
--- Created: Tue Dec 7 12:01:49 2004
--- Author: Pavel Durandin
---
-class SphereSpaceModifier from BlockFix inherits Modification from BRepTools
-
- ---Purpose: Rotation of the parametric space of the sphere in order
- -- to avoid the seam and degenerared edge within it
-
-uses
- Vertex from TopoDS,
- Edge from TopoDS,
- Face from TopoDS,
- Location from TopLoc,
- Shape from GeomAbs,
- Pnt from gp,
- Curve from Geom,
- Curve from Geom2d,
- Surface from Geom,
- IndexedMapOfTransient from TColStd,
- DataMapOfShapeInteger from TopTools
-
-is
-
- Create returns mutable SphereSpaceModifier from BlockFix;
-
- SetTolerance(me: mutable; Toler: Real);
- ---Purpose: Sets the tolerance for recognition of geometry
-
- NewSurface(me: mutable; F : Face from TopoDS;
- S : out Surface from Geom;
- L : out Location from TopLoc;
- Tol: out Real from Standard;
- RevWires : out Boolean from Standard;
- RevFace : out Boolean from Standard)
- returns Boolean from Standard;
- ---Purpose: Returns Standard_True if the face <F> has been
- -- modified. In this case, <S> is the new geometric
- -- support of the face, <L> the new location, <Tol>
- -- the new tolerance. Otherwise, returns
- -- Standard_False, and <S>, <L>, <Tol> are not
- -- significant.
-
- NewCurve(me: mutable; E : Edge from TopoDS;
- C : out Curve from Geom;
- L : out Location from TopLoc;
- Tol: out Real from Standard)
- returns Boolean from Standard;
- ---Purpose: Returns Standard_True if the edge <E> has been
- -- modified. In this case, <C> is the new geometric
- -- support of the edge, <L> the new location, <Tol>
- -- the new tolerance. Otherwise, returns
- -- Standard_False, and <C>, <L>, <Tol> are not
- -- significant.
-
- NewPoint(me: mutable; V : Vertex from TopoDS;
- P : out Pnt from gp;
- Tol: out Real from Standard)
- returns Boolean from Standard;
- ---Purpose: Returns Standard_True if the vertex <V> has been
- -- modified. In this case, <P> is the new geometric
- -- support of the vertex, <Tol> the new tolerance.
- -- Otherwise, returns Standard_False, and <P>, <Tol>
- -- are not significant.
-
- NewCurve2d(me: mutable; E : Edge from TopoDS;
- F : Face from TopoDS;
- NewE : Edge from TopoDS;
- NewF : Face from TopoDS;
- C : out Curve from Geom2d;
- Tol : out Real from Standard)
- returns Boolean from Standard;
- ---Purpose: Returns Standard_True if the edge <E> has a new
- -- curve on surface on the face <F>.In this case, <C>
- -- is the new geometric support of the edge, <L> the
- -- new location, <Tol> the new tolerance.
- --
- -- Otherwise, returns Standard_False, and <C>, <L>,
- -- <Tol> are not significant.
- --
- -- <NewE> is the new edge created from <E>. <NewF>
- -- is the new face created from <F>. They may be usefull.
-
- NewParameter(me: mutable; V : Vertex from TopoDS;
- E : Edge from TopoDS;
- P : out Real from Standard;
- Tol: out Real from Standard)
- returns Boolean from Standard;
- ---Purpose: Returns Standard_True if the Vertex <V> has a new
- -- parameter on the edge <E>. In this case, <P> is
- -- the parameter, <Tol> the new tolerance.
- -- Otherwise, returns Standard_False, and <P>, <Tol>
- -- are not significant.
-
- Continuity(me: mutable; E : Edge from TopoDS;
- F1,F2 : Face from TopoDS;
- NewE : Edge from TopoDS;
- NewF1,NewF2: Face from TopoDS)
- returns Shape from GeomAbs;
- ---Purpose: Returns the continuity of <NewE> between <NewF1>
- -- and <NewF2>.
- --
- -- <NewE> is the new edge created from <E>. <NewF1>
- -- (resp. <NewF2>) is the new face created from <F1>
- -- (resp. <F2>).
-
- ForRotation(me: mutable; F: Face from TopoDS) returns Boolean;
-
-fields
-
- myTolerance : Real;
- myMapOfFaces : DataMapOfShapeInteger from TopTools;
- myMapOfSpheres: IndexedMapOfTransient from TColStd;
- --myMapOfGeom: MapOfShapeTransient from TColStd;
-
-end SphereSpaceModifier;
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: BlockFix.cxx
-// Created: Tue Dec 7 11:59:05 2004
-// Author: Pavel DURANDIN
-
-#include <BlockFix_SphereSpaceModifier.ixx>
-
-#include <TopLoc_Location.hxx>
-#include <BRep_Tool.hxx>
-#include <Geom_SphericalSurface.hxx>
-#include <Geom_RectangularTrimmedSurface.hxx>
-#include <ShapeAnalysis.hxx>
-#include <gp_Sphere.hxx>
-#include <BRep_Builder.hxx>
-#include <TopoDS.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopExp.hxx>
-#include <ShapeFix_Edge.hxx>
-#include <Geom_Curve.hxx>
-#include <Geom2d_Curve.hxx>
-
-
-//=======================================================================
-//function : BlockFix_SphereSpaceModifier
-//purpose :
-//=======================================================================
-
-BlockFix_SphereSpaceModifier::BlockFix_SphereSpaceModifier()
-{
- myMapOfFaces.Clear();
- myMapOfSpheres.Clear();
-}
-
-//=======================================================================
-//function : SetTolerance
-//purpose :
-//=======================================================================
-
-void BlockFix_SphereSpaceModifier::SetTolerance(const Standard_Real Tol)
-{
- myTolerance = Tol;
-}
-
-
-//=======================================================================
-//function : NewSurface
-//purpose :
-//=======================================================================
-
-
-static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
- const Handle(Geom_Surface)& aSurface,
- Handle(Geom_Surface)& aNewSurface)
-{
- Handle(Geom_Surface) S = aSurface;
- if(S->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
- Handle(Geom_RectangularTrimmedSurface) RTS =
- Handle(Geom_RectangularTrimmedSurface)::DownCast(S);
- S = RTS->BasisSurface();
- }
-
- if(S->IsKind(STANDARD_TYPE(Geom_SphericalSurface))) {
- Standard_Real Umin, Umax, Vmin, Vmax;
- ShapeAnalysis::GetFaceUVBounds(aFace,Umin, Umax, Vmin, Vmax);
- Standard_Real PI2 = M_PI/2.;
- if(Vmax > PI2 - Precision::PConfusion() || Vmin < -PI2+::Precision::PConfusion()) {
- Handle(Geom_SphericalSurface) aSphere = Handle(Geom_SphericalSurface)::DownCast(S);
- gp_Sphere sp = aSphere->Sphere();
- gp_Ax3 ax3 = sp.Position();
- if(Abs(Vmax-Vmin) < PI2) {
- gp_Ax3 axnew3(ax3.Axis().Location(), ax3.Direction()^ax3.XDirection(),ax3.XDirection());
- sp.SetPosition(axnew3);
- Handle(Geom_SphericalSurface) aNewSphere = new Geom_SphericalSurface(sp);
- aNewSurface = aNewSphere;
- return Standard_True;
- }
- else {
- gp_Pnt PC = ax3.Location();
- Standard_Real Vpar;
- if(fabs(PI2-Vmax)>fabs(-PI2-Vmin))
- Vpar = (PI2+Vmax)/2.;
- else
- Vpar = (-PI2+Vmin)/2.;
- Standard_Real Upar = (Umin+Umax)/2.;;
- gp_Pnt PN,PX;
- S->D0(Upar,Vpar,PN);
- S->D0(Upar+PI2,0.,PX);
- gp_Dir newNorm(gp_Vec(PC,PN));
- gp_Dir newDirX(gp_Vec(PC,PX));
- gp_Ax3 axnew3(ax3.Axis().Location(), newNorm, newDirX);
- sp.SetPosition(axnew3);
- Handle(Geom_SphericalSurface) aNewSphere = new Geom_SphericalSurface(sp);
- aNewSurface = aNewSphere;
- return Standard_True;
- }
- }
- }
- return Standard_False;
-}
-
-
-Standard_Boolean BlockFix_SphereSpaceModifier::NewSurface(const TopoDS_Face& F,
- Handle(Geom_Surface)& S,
- TopLoc_Location& L,Standard_Real& Tol,
- Standard_Boolean& RevWires,
- Standard_Boolean& RevFace)
-{
- TopLoc_Location LS;
- Handle(Geom_Surface) SIni = BRep_Tool::Surface(F, LS);
-
- //check if pole of the sphere in the parametric space
- if(ModifySurface(F, SIni, S)) {
-
- RevWires = Standard_False;
- RevFace = Standard_False;
-
- L = LS;
- Tol = BRep_Tool::Tolerance(F);
-
- Standard_Integer anIndex = myMapOfSpheres.Add(S);
- myMapOfFaces.Bind(F,anIndex);
- return Standard_True;
- }
-
- return Standard_False;
-}
-
-//=======================================================================
-//function : NewCurve
-//purpose :
-//=======================================================================
-
-Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve(const TopoDS_Edge& /*E*/,Handle(Geom_Curve)& /*C*/,
- TopLoc_Location& /*L*/,Standard_Real& /*Tol*/)
-{
- return Standard_False;
-}
-
-//=======================================================================
-//function : NewPoint
-//purpose :
-//=======================================================================
-
-Standard_Boolean BlockFix_SphereSpaceModifier::NewPoint(const TopoDS_Vertex& /*V*/,
- gp_Pnt& /*P*/,
- Standard_Real& /*Tol*/)
-{
- return Standard_False;
-}
-
-//=======================================================================
-//function : NewCurve2d
-//purpose :
-//=======================================================================
-
-Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve2d(const TopoDS_Edge& E,const TopoDS_Face& F,
- const TopoDS_Edge& /*NewE*/,const TopoDS_Face& /*NewF*/,
- Handle(Geom2d_Curve)& C,Standard_Real& Tol)
-{
- //check if undelying surface of the face was modified
- if(myMapOfFaces.IsBound(F)) {
- Standard_Integer anIndex = myMapOfFaces.Find(F);
-
- Handle(Geom_Surface) aNewSphere = Handle(Geom_Surface)::DownCast(myMapOfSpheres.FindKey(anIndex));
-
- Standard_Real f,l;
- TopLoc_Location LC, LS;
- Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l );
- Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS);
-
- //taking into accound the orientation of the seam
- C = BRep_Tool::CurveOnSurface(E,F,f,l);
- Tol = BRep_Tool::Tolerance(E);
-
- BRep_Builder B;
- TopoDS_Edge TempE;
- B.MakeEdge(TempE);
- B.Add(TempE, TopExp::FirstVertex(E));
- B.Add(TempE, TopExp::LastVertex(E));
-
- if(!C3d.IsNull())
- B.UpdateEdge(TempE, Handle(Geom_Curve)::DownCast(C3d->Transformed(LC.Transformation())), Precision::Confusion());
- B.Range(TempE, f, l);
-
- Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge;
- Handle(Geom_Surface) STemp = Handle(Geom_Surface)::DownCast(aNewSphere->Transformed(LS.Transformation()));
- TopLoc_Location LTemp;
- LTemp.Identity();
-
- Standard_Boolean isClosed = BRep_Tool::IsClosed (E, F);
- Standard_Real aWorkTol = 2*myTolerance+Tol;
- sfe->FixAddPCurve(TempE, STemp, LTemp, isClosed, Max(Precision::Confusion(), aWorkTol));
- sfe->FixSameParameter(TempE);
-
- //keep the orientation of original edge
- TempE.Orientation(E.Orientation());
- C = BRep_Tool::CurveOnSurface(TempE, STemp, LTemp, f, l);
-
- // shifting seam of sphere
- if(isClosed && !C.IsNull()) {
- Standard_Real f2,l2;
- Handle(Geom2d_Curve) c22 =
- BRep_Tool::CurveOnSurface(TopoDS::Edge(TempE.Reversed()),STemp, LTemp,f2,l2);
- Standard_Real dPreci = Precision::PConfusion()*Precision::PConfusion();
- if((C->Value(f).SquareDistance(c22->Value(f2)) < dPreci)
- ||(C->Value(l).SquareDistance(c22->Value(l2)) < dPreci)) {
- gp_Vec2d shift(S->UPeriod(),0.);
- C->Translate(shift);
- }
- }
- //sphere was modified
- return Standard_True;
- }
-
- return Standard_False;
-}
-
-
-//=======================================================================
-//function : NewParameter
-//purpose :
-//=======================================================================
-
-Standard_Boolean BlockFix_SphereSpaceModifier::NewParameter(const TopoDS_Vertex& /*V*/,const TopoDS_Edge& /*E*/,
- Standard_Real& /*P*/,Standard_Real& /*Tol*/)
-{
- return Standard_False;
-}
-
-
-//=======================================================================
-//function : Continuity
-//purpose :
-//=======================================================================
-
-GeomAbs_Shape BlockFix_SphereSpaceModifier::Continuity(const TopoDS_Edge& E,const TopoDS_Face& F1,
- const TopoDS_Face& F2,const TopoDS_Edge& /*NewE*/,
- const TopoDS_Face& /*NewF1*/,const TopoDS_Face& /*NewF2*/)
-{
- return BRep_Tool::Continuity(E,F1,F2);
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _BlockFix_SphereSpaceModifier_HeaderFile
-#define _BlockFix_SphereSpaceModifier_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_BlockFix_SphereSpaceModifier_HeaderFile
-#include <Handle_BlockFix_SphereSpaceModifier.hxx>
-#endif
-
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _TopTools_DataMapOfShapeInteger_HeaderFile
-#include <TopTools_DataMapOfShapeInteger.hxx>
-#endif
-#ifndef _TColStd_IndexedMapOfTransient_HeaderFile
-#include <TColStd_IndexedMapOfTransient.hxx>
-#endif
-#ifndef _BRepTools_Modification_HeaderFile
-#include <BRepTools_Modification.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Handle_Geom_Surface_HeaderFile
-#include <Handle_Geom_Surface.hxx>
-#endif
-#ifndef _Handle_Geom_Curve_HeaderFile
-#include <Handle_Geom_Curve.hxx>
-#endif
-#ifndef _Handle_Geom2d_Curve_HeaderFile
-#include <Handle_Geom2d_Curve.hxx>
-#endif
-#ifndef _GeomAbs_Shape_HeaderFile
-#include <GeomAbs_Shape.hxx>
-#endif
-class TopoDS_Face;
-class Geom_Surface;
-class TopLoc_Location;
-class TopoDS_Edge;
-class Geom_Curve;
-class TopoDS_Vertex;
-class gp_Pnt;
-class Geom2d_Curve;
-
-
-class BlockFix_SphereSpaceModifier : public BRepTools_Modification {
-
-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 BlockFix_SphereSpaceModifier();
-Standard_EXPORT void SetTolerance(const Standard_Real Toler) ;
-Standard_EXPORT Standard_Boolean NewSurface(const TopoDS_Face& F,Handle(Geom_Surface)& S,TopLoc_Location& L,Standard_Real& Tol,Standard_Boolean& RevWires,Standard_Boolean& RevFace) ;
-Standard_EXPORT Standard_Boolean NewCurve(const TopoDS_Edge& E,Handle(Geom_Curve)& C,TopLoc_Location& L,Standard_Real& Tol) ;
-Standard_EXPORT Standard_Boolean NewPoint(const TopoDS_Vertex& V,gp_Pnt& P,Standard_Real& Tol) ;
-Standard_EXPORT Standard_Boolean NewCurve2d(const TopoDS_Edge& E,const TopoDS_Face& F,const TopoDS_Edge& NewE,const TopoDS_Face& NewF,Handle(Geom2d_Curve)& C,Standard_Real& Tol) ;
-Standard_EXPORT Standard_Boolean NewParameter(const TopoDS_Vertex& V,const TopoDS_Edge& E,Standard_Real& P,Standard_Real& Tol) ;
-Standard_EXPORT GeomAbs_Shape Continuity(const TopoDS_Edge& E,const TopoDS_Face& F1,const TopoDS_Face& F2,const TopoDS_Edge& NewE,const TopoDS_Face& NewF1,const TopoDS_Face& NewF2) ;
-Standard_EXPORT Standard_Boolean ForRotation(const TopoDS_Face& F) ;
-Standard_EXPORT ~BlockFix_SphereSpaceModifier();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Real myTolerance;
-TopTools_DataMapOfShapeInteger myMapOfFaces;
-TColStd_IndexedMapOfTransient myMapOfSpheres;
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <BlockFix_SphereSpaceModifier.jxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-BlockFix_SphereSpaceModifier::~BlockFix_SphereSpaceModifier() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(BRepTools_Modification);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(BRepTools_Modification);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("BlockFix_SphereSpaceModifier",
- sizeof(BlockFix_SphereSpaceModifier),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(BlockFix_SphereSpaceModifier) Handle(BlockFix_SphereSpaceModifier)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(BlockFix_SphereSpaceModifier) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(BlockFix_SphereSpaceModifier))) {
- _anOtherObject = Handle(BlockFix_SphereSpaceModifier)((Handle(BlockFix_SphereSpaceModifier)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& BlockFix_SphereSpaceModifier::DynamicType() const
-{
- return STANDARD_TYPE(BlockFix_SphereSpaceModifier) ;
-}
-Standard_Boolean BlockFix_SphereSpaceModifier::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(BlockFix_SphereSpaceModifier) == AType || BRepTools_Modification::IsKind(AType));
-}
-Handle_BlockFix_SphereSpaceModifier::~Handle_BlockFix_SphereSpaceModifier() {}
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Face_HeaderFile
-#include <TopoDS_Face.hxx>
-#endif
-#ifndef _Geom_Surface_HeaderFile
-#include <Geom_Surface.hxx>
-#endif
-#ifndef _TopLoc_Location_HeaderFile
-#include <TopLoc_Location.hxx>
-#endif
-#ifndef _TopoDS_Edge_HeaderFile
-#include <TopoDS_Edge.hxx>
-#endif
-#ifndef _Geom_Curve_HeaderFile
-#include <Geom_Curve.hxx>
-#endif
-#ifndef _TopoDS_Vertex_HeaderFile
-#include <TopoDS_Vertex.hxx>
-#endif
-#ifndef _gp_Pnt_HeaderFile
-#include <gp_Pnt.hxx>
-#endif
-#ifndef _Geom2d_Curve_HeaderFile
-#include <Geom2d_Curve.hxx>
-#endif
-#ifndef _BlockFix_SphereSpaceModifier_HeaderFile
-#include <BlockFix_SphereSpaceModifier.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: BlockFix_UnionEdges.cdl
--- Created: Tue Dec 7 15:24:51 2004
--- Author: Sergey KUUL
---
-class UnionEdges from BlockFix
-
- ---Purpose:
-
-uses
-
- Shape from TopoDS,
- ReShape from ShapeBuild
-
-is
-
- Create returns UnionEdges from BlockFix;
-
- Perform(me: in out; Shape: Shape from TopoDS;
- Tol : Real)
- returns Shape from TopoDS;
-
-fields
-
- myTolerance : Real;
- myContext : ReShape from ShapeBuild;
-
-end UnionEdges;
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: BlockFix_UnionEdges.cxx
-// Created: 07.12.04 15:27:30
-// Author: Sergey KUUL
-
-#include <BlockFix_UnionEdges.ixx>
-
-#include <ShapeAnalysis_Edge.hxx>
-
-#include <ShapeFix_Edge.hxx>
-#include <ShapeFix_Face.hxx>
-#include <ShapeFix_Shell.hxx>
-
-#include <BRep_Builder.hxx>
-#include <BRep_CurveRepresentation.hxx>
-#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
-#include <BRep_TEdge.hxx>
-#include <BRep_Tool.hxx>
-#include <BRepAdaptor_HCompCurve.hxx>
-#include <BRepLib.hxx>
-#include <BRepLib_MakeEdge.hxx>
-
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_SequenceOfShape.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Shell.hxx>
-#include <TopoDS_Solid.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Iterator.hxx>
-
-#include <Approx_Curve3d.hxx>
-
-#include <GC_MakeCircle.hxx>
-
-#include <Geom_BSplineCurve.hxx>
-#include <Geom_Circle.hxx>
-#include <Geom_Curve.hxx>
-#include <Geom_Line.hxx>
-#include <Geom_TrimmedCurve.hxx>
-#include <GeomConvert.hxx>
-#include <GeomConvert_CompCurveToBSplineCurve.hxx>
-
-#include <Geom2dConvert.hxx>
-#include <Geom2dConvert_CompCurveToBSplineCurve.hxx>
-#include <Geom2d_TrimmedCurve.hxx>
-#include <Geom2d_BSplineCurve.hxx>
-
-#include <TColGeom_SequenceOfSurface.hxx>
-#include <TColGeom_Array1OfBSplineCurve.hxx>
-#include <TColGeom_HArray1OfBSplineCurve.hxx>
-#include <TColGeom2d_Array1OfBSplineCurve.hxx>
-#include <TColGeom2d_HArray1OfBSplineCurve.hxx>
-#include <TColGeom2d_SequenceOfBoundedCurve.hxx>
-#include <TColgp_SequenceOfPnt.hxx>
-#include <TColStd_Array1OfReal.hxx>
-#include <TColStd_MapOfInteger.hxx>
-
-#include "utilities.h"
-
-//=======================================================================
-//function : BlockFix_UnionEdges()
-//purpose : Constructor
-//=======================================================================
-BlockFix_UnionEdges::BlockFix_UnionEdges ( )
-{
-}
-
-//=======================================================================
-//function : GlueEdgesWithPCurves
-//purpose : Glues the pcurves of the sequence of edges
-// and glues their 3d curves
-//=======================================================================
-static TopoDS_Edge GlueEdgesWithPCurves(const TopTools_SequenceOfShape& aChain,
- const TopoDS_Vertex& FirstVertex,
- const TopoDS_Vertex& LastVertex)
-{
- Standard_Integer i, j;
-
- TopoDS_Edge FirstEdge = TopoDS::Edge(aChain(1));
- //TColGeom2d_SequenceOfCurve PCurveSeq;
- TColGeom_SequenceOfSurface SurfSeq;
- //TopTools_SequenceOfShape LocSeq;
-
- BRep_ListIteratorOfListOfCurveRepresentation itr( (Handle(BRep_TEdge)::DownCast(FirstEdge.TShape()))->Curves() );
- for (; itr.More(); itr.Next())
- {
- Handle(BRep_CurveRepresentation) CurveRep = itr.Value();
- if (CurveRep->IsCurveOnSurface())
- {
- //PCurveSeq.Append(CurveRep->PCurve());
- SurfSeq.Append(CurveRep->Surface());
- /*
- TopoDS_Shape aLocShape;
- aLocShape.Location(CurveRep->Location());
- LocSeq.Append(aLocShape);
- */
- }
- }
-
- Standard_Real fpar, lpar;
- BRep_Tool::Range(FirstEdge, fpar, lpar);
- TopoDS_Edge PrevEdge = FirstEdge;
- TopoDS_Vertex CV;
- Standard_Real MaxTol = 0.;
-
- TopoDS_Edge ResEdge;
- BRep_Builder BB;
-
- Standard_Integer nb_curve = aChain.Length(); //number of curves
- TColGeom_Array1OfBSplineCurve tab_c3d(0,nb_curve-1); //array of the curves
- TColStd_Array1OfReal tabtolvertex(0,nb_curve-1); //(0,nb_curve-2); //array of the tolerances
-
- TopoDS_Vertex PrevVertex = FirstVertex;
- for (i = 1; i <= nb_curve; i++)
- {
- TopoDS_Edge anEdge = TopoDS::Edge(aChain(i));
- TopoDS_Vertex VF, VL;
- TopExp::Vertices(anEdge, VF, VL);
- Standard_Boolean ToReverse = (!VF.IsSame(PrevVertex));
-
- Standard_Real Tol1 = BRep_Tool::Tolerance(VF);
- Standard_Real Tol2 = BRep_Tool::Tolerance(VL);
- if (Tol1 > MaxTol)
- MaxTol = Tol1;
- if (Tol2 > MaxTol)
- MaxTol = Tol2;
-
- if (i > 1)
- {
- TopExp::CommonVertex(PrevEdge, anEdge, CV);
- Standard_Real Tol = BRep_Tool::Tolerance(CV);
- tabtolvertex(i-2) = Tol;
- }
-
- Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar);
- Handle(Geom_TrimmedCurve) aTrCurve = new Geom_TrimmedCurve(aCurve, fpar, lpar);
- tab_c3d(i-1) = GeomConvert::CurveToBSplineCurve(aTrCurve);
- GeomConvert::C0BSplineToC1BSplineCurve(tab_c3d(i-1), Precision::Confusion());
- if (ToReverse)
- tab_c3d(i-1)->Reverse();
- PrevVertex = (ToReverse)? VF : VL;
- PrevEdge = anEdge;
- }
- Handle(TColGeom_HArray1OfBSplineCurve) concatcurve; //array of the concatenated curves
- Handle(TColStd_HArray1OfInteger) ArrayOfIndices; //array of the remining Vertex
- GeomConvert::ConcatC1(tab_c3d,
- tabtolvertex,
- ArrayOfIndices,
- concatcurve,
- Standard_False,
- Precision::Confusion()); //C1 concatenation
-
- if (concatcurve->Length() > 1)
- {
- GeomConvert_CompCurveToBSplineCurve Concat(concatcurve->Value(concatcurve->Lower()));
-
- for (i = concatcurve->Lower()+1; i <= concatcurve->Upper(); i++)
- Concat.Add( concatcurve->Value(i), MaxTol, Standard_True );
-
- concatcurve->SetValue(concatcurve->Lower(), Concat.BSplineCurve());
- }
- Handle(Geom_BSplineCurve) ResCurve = concatcurve->Value(concatcurve->Lower());
-
- TColGeom2d_SequenceOfBoundedCurve ResPCurves;
- TopLoc_Location aLoc;
- for (j = 1; j <= SurfSeq.Length(); j++)
- {
- TColGeom2d_Array1OfBSplineCurve tab_c2d(0,nb_curve-1); //array of the pcurves
-
- PrevVertex = FirstVertex;
- PrevEdge = FirstEdge;
- //TopLoc_Location theLoc = LocSeq(j).Location();
- for (i = 1; i <= nb_curve; i++)
- {
- TopoDS_Edge anEdge = TopoDS::Edge(aChain(i));
- TopoDS_Vertex VF, VL;
- TopExp::Vertices(anEdge, VF, VL);
- Standard_Boolean ToReverse = (!VF.IsSame(PrevVertex));
-
- /*
- Handle(Geom2d_Curve) aPCurve =
- BRep_Tool::CurveOnSurface(anEdge, SurfSeq(j), anEdge.Location()*theLoc, fpar, lpar);
- */
- Handle(Geom2d_Curve) aPCurve =
- BRep_Tool::CurveOnSurface(anEdge, SurfSeq(j), aLoc, fpar, lpar);
- Handle(Geom2d_TrimmedCurve) aTrPCurve = new Geom2d_TrimmedCurve(aPCurve, fpar, lpar);
- tab_c2d(i-1) = Geom2dConvert::CurveToBSplineCurve(aTrPCurve);
- Geom2dConvert::C0BSplineToC1BSplineCurve(tab_c2d(i-1), Precision::Confusion());
- if (ToReverse)
- tab_c2d(i-1)->Reverse();
- PrevVertex = (ToReverse)? VF : VL;
- PrevEdge = anEdge;
- }
- Handle(TColGeom2d_HArray1OfBSplineCurve) concatc2d; //array of the concatenated curves
- Handle(TColStd_HArray1OfInteger) ArrayOfInd2d; //array of the remining Vertex
- Geom2dConvert::ConcatC1(tab_c2d,
- tabtolvertex,
- ArrayOfInd2d,
- concatc2d,
- Standard_False,
- Precision::Confusion()); //C1 concatenation
-
- if (concatc2d->Length() > 1)
- {
- Geom2dConvert_CompCurveToBSplineCurve Concat2d(concatc2d->Value(concatc2d->Lower()));
-
- for (i = concatc2d->Lower()+1; i <= concatc2d->Upper(); i++)
- Concat2d.Add( concatc2d->Value(i), MaxTol, Standard_True );
-
- concatc2d->SetValue(concatc2d->Lower(), Concat2d.BSplineCurve());
- }
- Handle(Geom2d_BSplineCurve) aResPCurve = concatc2d->Value(concatc2d->Lower());
- ResPCurves.Append(aResPCurve);
- }
-
- ResEdge = BRepLib_MakeEdge(ResCurve,
- FirstVertex, LastVertex,
- ResCurve->FirstParameter(), ResCurve->LastParameter());
- BB.SameRange(ResEdge, Standard_False);
- BB.SameParameter(ResEdge, Standard_False);
- for (j = 1; j <= ResPCurves.Length(); j++)
- {
- BB.UpdateEdge(ResEdge, ResPCurves(j), SurfSeq(j), aLoc, MaxTol);
- BB.Range(ResEdge, SurfSeq(j), aLoc, ResPCurves(j)->FirstParameter(), ResPCurves(j)->LastParameter());
- }
-
- BRepLib::SameParameter(ResEdge, MaxTol, Standard_True);
-
- return ResEdge;
-}
-
-//=======================================================================
-//function : MergeEdges
-//purpose : auxilary
-//=======================================================================
-static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
- const TopoDS_Face& aFace,
- const Standard_Real Tol,
- TopoDS_Edge& anEdge)
-{
- // make chain for union
- BRep_Builder B;
- ShapeAnalysis_Edge sae;
- TopoDS_Edge FirstE = TopoDS::Edge(SeqEdges.Value(1));
- TopoDS_Edge LastE = FirstE;
- TopoDS_Vertex VF = sae.FirstVertex(FirstE);
- TopoDS_Vertex VL = sae.LastVertex(LastE);
- TopTools_SequenceOfShape aChain;
- aChain.Append(FirstE);
- TColStd_MapOfInteger IndUsedEdges;
- IndUsedEdges.Add(1);
- Standard_Integer j;
- for(j=2; j<=SeqEdges.Length(); j++) {
- for(Standard_Integer k=2; k<=SeqEdges.Length(); k++) {
- if(IndUsedEdges.Contains(k)) continue;
- TopoDS_Edge edge = TopoDS::Edge(SeqEdges.Value(k));
- TopoDS_Vertex VF2 = sae.FirstVertex(edge);
- TopoDS_Vertex VL2 = sae.LastVertex(edge);
- if(sae.FirstVertex(edge).IsSame(VL)) {
- aChain.Append(edge);
- LastE = edge;
- VL = sae.LastVertex(LastE);
- IndUsedEdges.Add(k);
- }
- else if(sae.LastVertex(edge).IsSame(VF)) {
- aChain.Prepend(edge);
- FirstE = edge;
- VF = sae.FirstVertex(FirstE);
- IndUsedEdges.Add(k);
- }
- }
- }
- if(aChain.Length()<SeqEdges.Length()) {
- MESSAGE ("can not create correct chain...");
- return Standard_False;
- }
- // union edges in chain
- // first step: union lines and circles
- TopLoc_Location Loc;
- Standard_Real fp1,lp1,fp2,lp2;
- for(j=1; j<aChain.Length(); j++) {
- TopoDS_Edge edge1 = TopoDS::Edge(aChain.Value(j));
- Handle(Geom_Curve) c3d1 = BRep_Tool::Curve(edge1,Loc,fp1,lp1);
- if(c3d1.IsNull()) break;
- while(c3d1->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
- Handle(Geom_TrimmedCurve) tc =
- Handle(Geom_TrimmedCurve)::DownCast(c3d1);
- c3d1 = tc->BasisCurve();
- }
- TopoDS_Edge edge2 = TopoDS::Edge(aChain.Value(j+1));
- Handle(Geom_Curve) c3d2 = BRep_Tool::Curve(edge2,Loc,fp2,lp2);
- if(c3d2.IsNull()) break;
- while(c3d2->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
- Handle(Geom_TrimmedCurve) tc =
- Handle(Geom_TrimmedCurve)::DownCast(c3d2);
- c3d2 = tc->BasisCurve();
- }
- if( c3d1->IsKind(STANDARD_TYPE(Geom_Line)) && c3d2->IsKind(STANDARD_TYPE(Geom_Line)) ) {
- // union lines
- Handle(Geom_Line) L1 = Handle(Geom_Line)::DownCast(c3d1);
- Handle(Geom_Line) L2 = Handle(Geom_Line)::DownCast(c3d2);
- gp_Dir Dir1 = L1->Position().Direction();
- gp_Dir Dir2 = L2->Position().Direction();
- //if(!Dir1.IsEqual(Dir2,Precision::Angular())) {
- //if(!Dir1.IsParallel(Dir2,Precision::Angular())) {
- if(!Dir1.IsParallel(Dir2,Tol)) {
- continue;
- }
- // can union lines => create new edge
- TopoDS_Vertex V1 = sae.FirstVertex(edge1);
- gp_Pnt PV1 = BRep_Tool::Pnt(V1);
- TopoDS_Vertex V2 = sae.LastVertex(edge2);
- gp_Pnt PV2 = BRep_Tool::Pnt(V2);
- gp_Vec Vec(PV1,PV2);
- Handle(Geom_Line) L = new Geom_Line(gp_Ax1(PV1,Vec));
- Standard_Real dist = PV1.Distance(PV2);
- Handle(Geom_TrimmedCurve) tc = new Geom_TrimmedCurve(L,0.0,dist);
- TopoDS_Edge E;
- B.MakeEdge (E,tc,Precision::Confusion());
- B.Add (E,V1); B.Add (E,V2);
- B.UpdateVertex(V1, 0., E, 0.);
- B.UpdateVertex(V2, dist, E, 0.);
- //ShapeFix_Edge sfe;
- //sfe.FixAddPCurve(E,aFace,Standard_False);
- //sfe.FixSameParameter(E);
- aChain.Remove(j);
- aChain.SetValue(j,E);
- j--;
- }
- if( c3d1->IsKind(STANDARD_TYPE(Geom_Circle)) && c3d2->IsKind(STANDARD_TYPE(Geom_Circle)) ) {
- // union circles
- Handle(Geom_Circle) C1 = Handle(Geom_Circle)::DownCast(c3d1);
- Handle(Geom_Circle) C2 = Handle(Geom_Circle)::DownCast(c3d2);
- gp_Pnt P01 = C1->Location();
- gp_Pnt P02 = C2->Location();
- if (P01.Distance(P02) > Precision::Confusion()) continue;
- // can union circles => create new edge
- TopoDS_Vertex V1 = sae.FirstVertex(edge1);
- gp_Pnt PV1 = BRep_Tool::Pnt(V1);
- TopoDS_Vertex V2 = sae.LastVertex(edge2);
- gp_Pnt PV2 = BRep_Tool::Pnt(V2);
- TopoDS_Vertex VM = sae.LastVertex(edge1);
- gp_Pnt PVM = BRep_Tool::Pnt(VM);
- GC_MakeCircle MC (PV1,PVM,PV2);
- Handle(Geom_Circle) C = MC.Value();
- TopoDS_Edge E;
- if (!MC.IsDone() || C.IsNull()) {
- // jfa for Mantis issue 0020228
- if (PV1.Distance(PV2) > Precision::Confusion()) continue;
- // closed chain
- C = C1;
- B.MakeEdge (E,C,Precision::Confusion());
- B.Add(E,V1);
- B.Add(E,V2);
- }
- else {
- gp_Pnt P0 = C->Location();
- gp_Dir D1(gp_Vec(P0,PV1));
- gp_Dir D2(gp_Vec(P0,PV2));
- Standard_Real fpar = C->XAxis().Direction().Angle(D1);
- if(fabs(fpar)>Precision::Confusion()) {
- // check orientation
- gp_Dir ND = C->XAxis().Direction().Crossed(D1);
- if(ND.IsOpposite(C->Axis().Direction(),Precision::Confusion())) {
- fpar = -fpar;
- }
- }
- Standard_Real lpar = C->XAxis().Direction().Angle(D2);
- if(fabs(lpar)>Precision::Confusion()) {
- // check orientation
- gp_Dir ND = C->XAxis().Direction().Crossed(D2);
- if(ND.IsOpposite(C->Axis().Direction(),Precision::Confusion())) {
- lpar = -lpar;
- }
- }
- if (lpar < fpar) lpar += 2*M_PI;
- Handle(Geom_TrimmedCurve) tc = new Geom_TrimmedCurve(C,fpar,lpar);
- B.MakeEdge (E,tc,Precision::Confusion());
- B.Add(E,V1);
- B.Add(E,V2);
- B.UpdateVertex(V1, fpar, E, 0.);
- B.UpdateVertex(V2, lpar, E, 0.);
- }
- aChain.Remove(j);
- aChain.SetValue(j,E);
- j--;
- }
- }
- if (j < aChain.Length()) {
- MESSAGE ("null curve3d in edge...");
- return Standard_False;
- }
- if (aChain.Length() > 1) {
- // second step: union edges with various curves
- // skl for bug 0020052 from Mantis: perform such unions
- // only if curves are bspline or bezier
- bool NeedUnion = true;
- for(j=1; j<=aChain.Length(); j++) {
- TopoDS_Edge edge = TopoDS::Edge(aChain.Value(j));
- Handle(Geom_Curve) c3d = BRep_Tool::Curve(edge,Loc,fp1,lp1);
- if(c3d.IsNull()) continue;
- while(c3d->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
- Handle(Geom_TrimmedCurve) tc =
- Handle(Geom_TrimmedCurve)::DownCast(c3d);
- c3d = tc->BasisCurve();
- }
- if( ( c3d->IsKind(STANDARD_TYPE(Geom_BSplineCurve)) ||
- c3d->IsKind(STANDARD_TYPE(Geom_BezierCurve)) ) ) continue;
- NeedUnion = false;
- break;
- }
- if(NeedUnion) {
- MESSAGE ("can not make analitical union => make approximation");
- TopoDS_Edge E = GlueEdgesWithPCurves(aChain, VF, VL);
- /*
- TopoDS_Wire W;
- B.MakeWire(W);
- for(j=1; j<=aChain.Length(); j++) {
- TopoDS_Edge edge = TopoDS::Edge(aChain.Value(j));
- B.Add(W,edge);
- }
- Handle(BRepAdaptor_HCompCurve) Adapt = new BRepAdaptor_HCompCurve(W);
- Approx_Curve3d Conv(Adapt,Tol,GeomAbs_C1,9,1000);
- Handle(Geom_BSplineCurve) bc = Conv.Curve();
- TopoDS_Edge E;
- B.MakeEdge (E,bc,Precision::Confusion());
- B.Add (E,VF);
- B.Add (E,VL);
- */
- aChain.SetValue(1,E);
- }
- else {
- MESSAGE ("can not make approximation for such types of curves");
- return Standard_False;
- }
- }
-
- anEdge = TopoDS::Edge(aChain.Value(1));
- return Standard_True;
-}
-
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
-TopoDS_Shape BlockFix_UnionEdges::Perform(const TopoDS_Shape& Shape,
- const Standard_Real Tol)
-{
- myContext = new ShapeBuild_ReShape;
- myTolerance = Tol;
- TopoDS_Shape aResult = myContext->Apply(Shape);
-
- // processing each solid
- TopAbs_ShapeEnum aType = TopAbs_SOLID;
- TopExp_Explorer exps (Shape, aType);
- if (!exps.More()) {
- aType = TopAbs_SHELL;
- exps.Init(Shape, aType);
- }
- for (; exps.More(); exps.Next()) {
- //TopoDS_Solid aSolid = TopoDS::Solid(exps.Current());
- TopoDS_Shape aSolid = exps.Current();
-
- TopTools_IndexedMapOfShape ChangedFaces;
-
- // creating map of edge faces
- TopTools_IndexedDataMapOfShapeListOfShape aMapEdgeFaces;
- TopExp::MapShapesAndAncestors(aSolid, TopAbs_EDGE, TopAbs_FACE, aMapEdgeFaces);
-
- Handle(ShapeBuild_ReShape) aContext = new ShapeBuild_ReShape;
- TopoDS_Shape aRes = aSolid;
- aRes = aContext->Apply(aSolid);
-
- // processing each face
- TopExp_Explorer exp;
- for (exp.Init(aRes, TopAbs_FACE); exp.More(); exp.Next()) {
- TopoDS_Face aFace =
- TopoDS::Face(aContext->Apply(exp.Current().Oriented(TopAbs_FORWARD)));
- TopTools_IndexedDataMapOfShapeListOfShape aMapFacesEdges;
-
- for (TopExp_Explorer expe(aFace,TopAbs_EDGE); expe.More(); expe.Next()) {
- TopoDS_Edge edge = TopoDS::Edge(expe.Current());
- if (!aMapEdgeFaces.Contains(edge)) continue;
- const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge);
- TopTools_ListIteratorOfListOfShape anIter(aList);
- for ( ; anIter.More(); anIter.Next()) {
- TopoDS_Face face = TopoDS::Face(anIter.Value());
- TopoDS_Face face1 = TopoDS::Face(aContext->Apply(anIter.Value()));
- if (face1.IsSame(aFace)) continue;
- if (aMapFacesEdges.Contains(face)) {
- aMapFacesEdges.ChangeFromKey(face).Append(edge);
- }
- else {
- TopTools_ListOfShape ListEdges;
- ListEdges.Append(edge);
- aMapFacesEdges.Add(face,ListEdges);
- }
- }
- }
-
- for (Standard_Integer i=1; i<=aMapFacesEdges.Extent(); i++) {
- const TopTools_ListOfShape& ListEdges = aMapFacesEdges.FindFromIndex(i);
- TopTools_SequenceOfShape SeqEdges;
- TopTools_ListIteratorOfListOfShape anIter(ListEdges);
- for ( ; anIter.More(); anIter.Next()) {
- SeqEdges.Append(anIter.Value());
- }
- if (SeqEdges.Length()==1) continue;
- TopoDS_Edge E;
- if ( MergeEdges(SeqEdges,aFace,Tol,E) ) {
- // now we have only one edge - aChain.Value(1)
- // we have to replace old ListEdges with this new edge
- aContext->Replace(SeqEdges(1),E);
- for (Standard_Integer j=2; j<=SeqEdges.Length(); j++) {
- aContext->Remove(SeqEdges(j));
- }
- TopoDS_Face tmpF = TopoDS::Face(exp.Current());
- if ( !ChangedFaces.Contains(tmpF) )
- ChangedFaces.Add(tmpF);
- tmpF = TopoDS::Face(aMapFacesEdges.FindKey(i));
- if ( !ChangedFaces.Contains(tmpF) )
- ChangedFaces.Add(tmpF);
- }
- }
-
- } // end processing each face
-
- // fix changed faces and replace them in the local context
- for (Standard_Integer i=1; i<=ChangedFaces.Extent(); i++) {
- TopoDS_Face aFace = TopoDS::Face(aContext->Apply(ChangedFaces.FindKey(i)));
- Handle(ShapeFix_Face) sff = new ShapeFix_Face(aFace);
- sff->SetContext(myContext);
- sff->SetPrecision(myTolerance);
- sff->SetMinTolerance(myTolerance);
- sff->SetMaxTolerance(Max(1.,myTolerance*1000.));
- sff->Perform();
- aContext->Replace(aFace,sff->Face());
- }
-
- if (ChangedFaces.Extent() > 0) {
- // fix changed shell and replace it in the local context
- TopoDS_Shape aRes1 = aContext->Apply(aRes);
- TopExp_Explorer expsh;
- for (expsh.Init(aRes1, TopAbs_SHELL); expsh.More(); expsh.Next()) {
- TopoDS_Shell aShell = TopoDS::Shell(expsh.Current());
- Handle(ShapeFix_Shell) sfsh = new ShapeFix_Shell;
- sfsh->FixFaceOrientation(aShell);
- aContext->Replace(aShell,sfsh->Shell());
- }
- TopoDS_Shape aRes2 = aContext->Apply(aRes1);
- // put new solid into global context
- myContext->Replace(aSolid,aRes2);
- }
-
- } // end processing each solid
-
- aResult = myContext->Apply(Shape);
- return aResult;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _BlockFix_UnionEdges_HeaderFile
-#define _BlockFix_UnionEdges_HeaderFile
-
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _Handle_ShapeBuild_ReShape_HeaderFile
-#include <Handle_ShapeBuild_ReShape.hxx>
-#endif
-class ShapeBuild_ReShape;
-class TopoDS_Shape;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-class BlockFix_UnionEdges {
-
-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 BlockFix_UnionEdges();
-Standard_EXPORT TopoDS_Shape Perform(const TopoDS_Shape& Shape,const Standard_Real Tol) ;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Real myTolerance;
-Handle_ShapeBuild_ReShape myContext;
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <BlockFix_UnionEdges.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _ShapeBuild_ReShape_HeaderFile
-#include <ShapeBuild_ReShape.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _BlockFix_UnionEdges_HeaderFile
-#include <BlockFix_UnionEdges.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: BlockFix_UnionFaces.cdl
--- Created: Tue Dec 7 17:15:42 2004
--- Author: Pavel Durandin
---
-class UnionFaces from BlockFix
-
-uses
-
- Face from TopoDS,
- Shape from TopoDS
-
-is
-
- Create returns UnionFaces from BlockFix;
- ---Purpose: Empty constructor
-
- GetTolerance(me: in out) returns Real;
- ---Purpose: Returns modifiable tolerance
- ---C++: return&
-
- Perform (me: in out; Shape: Shape from TopoDS) returns Shape from TopoDS;
- ---Purpose: Performs the unification of the fsces
- -- whith the same geometry
-
- IsSameDomain(me; aFace : Face from TopoDS;
- aChekedFace: Face from TopoDS)
- returns Boolean is virtual;
- ---Purpose: Returns true is surfaces have same geometrically domain
- -- with given tolerance
-
- MovePCurves(me; aTarget: in out Face from TopoDS;
- aSource: Face from TopoDS)
- is virtual;
- ---Purpose: Creates pcurves on aTarget face for each edge from
- -- aSource one.
-
-fields
-
- myTolerance: Real;
-
-end;
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: BlockFix_UnionFaces.cxx
-// Created: Tue Dec 7 17:15:42 2004
-// Author: Pavel DURANDIN
-
-#include <BlockFix_UnionFaces.ixx>
-
-#include <Basics_OCCTVersion.hxx>
-
-#include <ShapeAnalysis_WireOrder.hxx>
-#include <ShapeAnalysis_Edge.hxx>
-
-#include <ShapeBuild_Edge.hxx>
-#include <ShapeBuild_ReShape.hxx>
-
-#include <ShapeExtend_WireData.hxx>
-#include <ShapeExtend_CompositeSurface.hxx>
-
-#include <ShapeFix_Face.hxx>
-#include <ShapeFix_ComposeShell.hxx>
-#include <ShapeFix_SequenceOfWireSegment.hxx>
-#include <ShapeFix_WireSegment.hxx>
-#include <ShapeFix_Wire.hxx>
-#include <ShapeFix_Edge.hxx>
-
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
-#include <IntPatch_ImpImpIntersection.hxx>
-#else
-#include <IntPatch_TheIIIntOfIntersection.hxx>
-#endif
-
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-#include <BRepTools.hxx>
-#include <BRepTopAdaptor_TopolTool.hxx>
-
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <TopTools_SequenceOfShape.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Wire.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Solid.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Shell.hxx>
-#include <TopoDS_Iterator.hxx>
-
-#include <TColGeom_HArray2OfSurface.hxx>
-
-#include <GeomAdaptor_HSurface.hxx>
-#include <GeomLib_IsPlanarSurface.hxx>
-
-#include <Geom_Surface.hxx>
-#include <Geom_Plane.hxx>
-#include <Geom_OffsetSurface.hxx>
-#include <Geom_SphericalSurface.hxx>
-#include <Geom_CylindricalSurface.hxx>
-#include <Geom_SurfaceOfRevolution.hxx>
-#include <Geom_SurfaceOfLinearExtrusion.hxx>
-#include <Geom_RectangularTrimmedSurface.hxx>
-
-#include <Geom_Curve.hxx>
-#include <Geom_Line.hxx>
-#include <Geom_Circle.hxx>
-
-#include <Geom2d_Line.hxx>
-
-#include <gp_XY.hxx>
-#include <gp_Pnt2d.hxx>
-
-#include <Standard_Failure.hxx>
-#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
-
-//=======================================================================
-//function : BlockFix_UnionFaces
-//purpose :
-//=======================================================================
-
-BlockFix_UnionFaces::BlockFix_UnionFaces()
- : myTolerance(Precision::Confusion()),
- myOptimumNbFaces(6)
-{
-}
-
-
-//=======================================================================
-//function : GetTolerance
-//purpose :
-//=======================================================================
-
-Standard_Real& BlockFix_UnionFaces::GetTolerance()
-{
- return myTolerance;
-}
-
-
-//=======================================================================
-//function : GetOptimumNbFaces
-//purpose :
-//=======================================================================
-
-Standard_Integer& BlockFix_UnionFaces::GetOptimumNbFaces()
-{
- return myOptimumNbFaces;
-}
-
-
-//=======================================================================
-//function : AddOrdinaryEdges
-//purpose : auxilary
-//=======================================================================
-// adds edges from the shape to the sequence
-// seams and equal edges are dropped
-// Returns true if one of original edges dropped
-static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges,
- const TopoDS_Shape aShape,
- Standard_Integer& anIndex)
-{
- //map of edges
- TopTools_MapOfShape aNewEdges;
- //add edges without seams
- for(TopExp_Explorer exp(aShape,TopAbs_EDGE); exp.More(); exp.Next()) {
- TopoDS_Shape edge = exp.Current();
- if(aNewEdges.Contains(edge))
- aNewEdges.Remove(edge);
- else
- aNewEdges.Add(edge);
- }
-
- Standard_Boolean isDropped = Standard_False;
- //merge edges and drop seams
- for(Standard_Integer i = 1; i <= edges.Length(); i++) {
- TopoDS_Shape current = edges(i);
- if(aNewEdges.Contains(current)) {
-
- aNewEdges.Remove(current);
- edges.Remove(i);
- i--;
-
- if(!isDropped) {
- isDropped = Standard_True;
- anIndex = i;
- }
- }
- }
-
- //add edges to the sequemce
- for(TopTools_MapIteratorOfMapOfShape anIter(aNewEdges); anIter.More(); anIter.Next())
- edges.Append(anIter.Key());
-
- return isDropped;
-}
-
-
-//=======================================================================
-//function : ClearRts
-//purpose : auxilary
-//=======================================================================
-static Handle(Geom_Surface) ClearRts(const Handle(Geom_Surface)& aSurface)
-{
- if(aSurface->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
- Handle(Geom_RectangularTrimmedSurface) rts =
- Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurface);
- return rts->BasisSurface();
- }
- return aSurface;
-}
-
-
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
-
-TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
-{
- Handle(ShapeBuild_ReShape) myContext = new ShapeBuild_ReShape;
- TopoDS_Shape aResShape = myContext->Apply(Shape);
-
- // processing each solid
- TopExp_Explorer exps;
- for (exps.Init(Shape, TopAbs_SOLID); exps.More(); exps.Next()) {
- TopoDS_Solid aSolid = TopoDS::Solid(exps.Current());
-
- // creating map of edge faces
- TopTools_IndexedDataMapOfShapeListOfShape aMapEdgeFaces;
- TopExp::MapShapesAndAncestors(aSolid, TopAbs_EDGE, TopAbs_FACE, aMapEdgeFaces);
-
- // map of processed shapes
- TopTools_MapOfShape aProcessed;
-
- Handle(ShapeBuild_ReShape) aContext = new ShapeBuild_ReShape;
-
- Standard_Integer NbModif = 0;
- Standard_Boolean hasFailed = Standard_False;
- Standard_Real tol = Min(Max(Precision::Confusion(), myTolerance/10.), 0.1);
-
- // count faces
- int nbf = 0;
- TopExp_Explorer exp;
- TopTools_MapOfShape mapF;
- for (exp.Init(aSolid, TopAbs_FACE); exp.More(); exp.Next()) {
- if (mapF.Add(exp.Current()))
- nbf++;
- }
-
- bool doUnion = ((myOptimumNbFaces == 0) ||
- ((myOptimumNbFaces > 0) && (nbf > myOptimumNbFaces)));
-
- // processing each face
- mapF.Clear();
- for (exp.Init(aSolid, TopAbs_FACE); exp.More() && doUnion; exp.Next()) {
- TopoDS_Face aFace = TopoDS::Face(exp.Current().Oriented(TopAbs_FORWARD));
-
- if (aProcessed.Contains(aFace))
- continue;
-
- Standard_Integer dummy;
- TopTools_SequenceOfShape edges;
- AddOrdinaryEdges(edges,aFace,dummy);
-
- TopTools_SequenceOfShape faces;
- faces.Append(aFace);
-
- //surface and location to construct result
- TopLoc_Location aBaseLocation;
- Handle(Geom_Surface) aBaseSurface = BRep_Tool::Surface(aFace,aBaseLocation);
- aBaseSurface = ClearRts(aBaseSurface);
-
- // find adjacent faces to union
- Standard_Integer i;
- for (i = 1; i <= edges.Length(); i++) {
- TopoDS_Edge edge = TopoDS::Edge(edges(i));
- if (BRep_Tool::Degenerated(edge))
- continue;
-
- const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge);
- TopTools_ListIteratorOfListOfShape anIter(aList);
- for (; anIter.More(); anIter.Next()) {
- TopoDS_Face anCheckedFace = TopoDS::Face(anIter.Value().Oriented(TopAbs_FORWARD));
- if (anCheckedFace.IsSame(aFace))
- continue;
-
- if (aProcessed.Contains(anCheckedFace))
- continue;
-
- if (IsSameDomain(aFace,anCheckedFace)) {
-
- if (aList.Extent() != 2) {
- // non mainfold case is not processed
- continue;
- }
-
- // replacing pcurves
- TopoDS_Face aMockUpFace;
- BRep_Builder B;
- B.MakeFace(aMockUpFace,aBaseSurface,aBaseLocation,0.);
- MovePCurves(aMockUpFace,anCheckedFace);
-
- if (AddOrdinaryEdges(edges,aMockUpFace,dummy)) {
- // sequence edges is modified
- i = dummy;
- }
-
- faces.Append(anCheckedFace);
- aProcessed.Add(anCheckedFace);
- break;
- }
- }
- }
-
- // all faces collected in the sequence. Perform union of faces
- if (faces.Length() > 1) {
- NbModif++;
- TopoDS_Face aResult;
- BRep_Builder B;
- B.MakeFace(aResult,aBaseSurface,aBaseLocation,0);
- Standard_Integer nbWires = 0;
-
- // connecting wires
- while (edges.Length()>0) {
-
- Standard_Boolean isEdge3d = Standard_False;
- nbWires++;
- TopTools_MapOfShape aVertices;
- TopoDS_Wire aWire;
- B.MakeWire(aWire);
-
- TopoDS_Edge anEdge = TopoDS::Edge(edges(1));
- edges.Remove(1);
-
- isEdge3d |= !BRep_Tool::Degenerated(anEdge);
- B.Add(aWire,anEdge);
- TopoDS_Vertex V1,V2;
- TopExp::Vertices(anEdge,V1,V2);
- aVertices.Add(V1);
- aVertices.Add(V2);
-
- Standard_Boolean isNewFound = Standard_False;
- do {
- isNewFound = Standard_False;
- for(Standard_Integer j = 1; j <= edges.Length(); j++) {
- anEdge = TopoDS::Edge(edges(j));
- TopExp::Vertices(anEdge,V1,V2);
- if(aVertices.Contains(V1) || aVertices.Contains(V2)) {
- isEdge3d |= !BRep_Tool::Degenerated(anEdge);
- aVertices.Add(V1);
- aVertices.Add(V2);
- B.Add(aWire,anEdge);
- edges.Remove(j);
- j--;
- isNewFound = Standard_True;
- }
- }
- } while (isNewFound);
-
- // sorting any type of edges
- aWire = TopoDS::Wire(aContext->Apply(aWire));
-
- TopoDS_Face tmpF = TopoDS::Face(aContext->Apply(faces(1).Oriented(TopAbs_FORWARD)));
- Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire(aWire,tmpF,Precision::Confusion());
- sfw->FixReorder();
- Standard_Boolean isDegRemoved = Standard_False;
- if(!sfw->StatusReorder ( ShapeExtend_FAIL )) {
- // clear degenerated edges if at least one with 3d curve exist
- if(isEdge3d) {
- Handle(ShapeExtend_WireData) sewd = sfw->WireData();
- for(Standard_Integer j = 1; j<=sewd->NbEdges();j++) {
- TopoDS_Edge E = sewd->Edge(j);
- if(BRep_Tool::Degenerated(E)) {
- sewd->Remove(j);
- isDegRemoved = Standard_True;
- j--;
- }
- }
- }
- sfw->FixShifted();
- if(isDegRemoved)
- sfw->FixDegenerated();
- }
- TopoDS_Wire aWireFixed = sfw->Wire();
- aContext->Replace(aWire,aWireFixed);
- // add resulting wire
- if(isEdge3d) {
- B.Add(aResult,aWireFixed);
- }
- else {
- // sorting edges
- Handle(ShapeExtend_WireData) sbwd = sfw->WireData();
- Standard_Integer nbEdges = sbwd->NbEdges();
- // sort degenerated edges and create one edge instead of several ones
- ShapeAnalysis_WireOrder sawo(Standard_False, 0);
- ShapeAnalysis_Edge sae;
- Standard_Integer aLastEdge = nbEdges;
- for(Standard_Integer j = 1; j <= nbEdges; j++) {
- Standard_Real f,l;
- //smh protection on NULL pcurve
- Handle(Geom2d_Curve) c2d;
- if(!sae.PCurve(sbwd->Edge(j),tmpF,c2d,f,l)) {
- aLastEdge--;
- continue;
- }
- sawo.Add(c2d->Value(f).XY(),c2d->Value(l).XY());
- }
- sawo.Perform();
-
- // constructind one degenerative edge
- gp_XY aStart, anEnd, tmp;
- Standard_Integer nbFirst = sawo.Ordered(1);
- TopoDS_Edge anOrigE = TopoDS::Edge(sbwd->Edge(nbFirst).Oriented(TopAbs_FORWARD));
- ShapeBuild_Edge sbe;
- TopoDS_Vertex aDummyV;
- TopoDS_Edge E = sbe.CopyReplaceVertices(anOrigE,aDummyV,aDummyV);
- sawo.XY(nbFirst,aStart,tmp);
- sawo.XY(sawo.Ordered(aLastEdge),tmp,anEnd);
-
- gp_XY aVec = anEnd-aStart;
- Handle(Geom2d_Line) aLine = new Geom2d_Line(aStart,gp_Dir2d(anEnd-aStart));
-
- B.UpdateEdge(E,aLine,tmpF,0.);
- B.Range(E,tmpF,0.,aVec.Modulus());
- Handle(Geom_Curve) C3d;
- B.UpdateEdge(E,C3d,0.);
- B.Degenerated(E,Standard_True);
- TopoDS_Wire aW;
- B.MakeWire(aW);
- B.Add(aW,E);
- B.Add(aResult,aW);
- }
- }
-
- // perform substitution of face
- aContext->Replace(aContext->Apply(aFace),aResult);
-
- ShapeFix_Face sff (aResult);
- //Intializing by tolerances
- sff.SetPrecision(myTolerance);
- sff.SetMinTolerance(tol);
- sff.SetMaxTolerance(Max(1.,myTolerance*1000.));
- //Setting modes
- sff.FixOrientationMode() = 0;
- //sff.FixWireMode() = 0;
- sff.SetContext(aContext);
- // Applying the fixes
- sff.Perform();
- if(sff.Status(ShapeExtend_FAIL))
- hasFailed = Standard_True;
-
- // breaking down to several faces
- TopoDS_Shape theResult = aContext->Apply(aResult);
- for (TopExp_Explorer aFaceExp (theResult,TopAbs_FACE); aFaceExp.More(); aFaceExp.Next()) {
- TopoDS_Face aCurrent = TopoDS::Face(aFaceExp.Current().Oriented(TopAbs_FORWARD));
- Handle(TColGeom_HArray2OfSurface) grid = new TColGeom_HArray2OfSurface ( 1, 1, 1, 1 );
- grid->SetValue ( 1, 1, aBaseSurface );
- Handle(ShapeExtend_CompositeSurface) G = new ShapeExtend_CompositeSurface ( grid );
- ShapeFix_ComposeShell CompShell;
- CompShell.Init ( G, aBaseLocation, aCurrent, ::Precision::Confusion() );//myPrecision
- CompShell.SetContext( aContext );
-
- TopTools_SequenceOfShape parts;
- ShapeFix_SequenceOfWireSegment wires;
- for(TopExp_Explorer W_Exp(aCurrent,TopAbs_WIRE);W_Exp.More();W_Exp.Next()) {
- Handle(ShapeExtend_WireData) sbwd =
- new ShapeExtend_WireData ( TopoDS::Wire(W_Exp.Current() ));
- ShapeFix_WireSegment seg ( sbwd, TopAbs_REVERSED );
- wires.Append(seg);
- }
-
- CompShell.DispatchWires ( parts,wires );
- for (Standard_Integer j=1; j <= parts.Length(); j++ ) {
- ShapeFix_Face aFixOrient(TopoDS::Face(parts(j)));
- aFixOrient.SetContext(aContext);
- aFixOrient.FixOrientation();
- }
-
- TopoDS_Shape CompRes;
- if ( faces.Length() !=1 ) {
- TopoDS_Shell S;
- B.MakeShell ( S );
- for ( i=1; i <= parts.Length(); i++ )
- B.Add ( S, parts(i) );
- CompRes = S;
- }
- else CompRes = parts(1);
-
- aContext->Replace(aCurrent,CompRes);
- }
-
- // remove the remaining faces
- for(i = 2; i <= faces.Length(); i++)
- aContext->Remove(faces(i));
- }
- } // end processing each face
-
- //TopoDS_Shape aResult = Shape;
- if (NbModif > 0 && !hasFailed) {
- TopoDS_Shape aResult = aContext->Apply(aSolid);
-
- ShapeFix_Edge sfe;
- for (exp.Init(aResult,TopAbs_EDGE); exp.More(); exp.Next()) {
- TopoDS_Edge E = TopoDS::Edge(exp.Current());
- sfe.FixVertexTolerance (E);
- // ptv add fix same parameter
- sfe.FixSameParameter(E, myTolerance);
- }
-
- myContext->Replace(aSolid, aResult);
- }
- //else
- {
- for (exp.Init(aSolid, TopAbs_FACE); exp.More(); exp.Next()) {
- TopoDS_Face aFace = TopoDS::Face(exp.Current().Oriented(TopAbs_FORWARD));
- Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire;
- sfw->SetContext(myContext);
- sfw->SetPrecision(myTolerance);
- sfw->SetMinTolerance(myTolerance);
- sfw->SetMaxTolerance(Max(1.,myTolerance*1000.));
- sfw->SetFace(aFace);
- for (TopoDS_Iterator iter (aFace,Standard_False); iter.More(); iter.Next()) {
- TopoDS_Wire wire = TopoDS::Wire(iter.Value());
- sfw->Load(wire);
- sfw->FixReorder();
- sfw->FixShifted();
- }
- }
- }
- } // end processing each solid
-
- aResShape = myContext->Apply(Shape);
- return aResShape;
-}
-
-
-//=======================================================================
-//function : IsSameDomain
-//purpose :
-//=======================================================================
-
-bool getCylinder (Handle(Geom_Surface)& theInSurface, gp_Cylinder& theOutCylinder)
-{
- bool isCylinder = false;
-
- if (theInSurface->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) {
- Handle(Geom_CylindricalSurface) aGC = Handle(Geom_CylindricalSurface)::DownCast(theInSurface);
-
- theOutCylinder = aGC->Cylinder();
- isCylinder = true;
- }
- else if (theInSurface->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution))) {
- Handle(Geom_SurfaceOfRevolution) aRS =
- Handle(Geom_SurfaceOfRevolution)::DownCast(theInSurface);
- Handle(Geom_Curve) aBasis = aRS->BasisCurve();
- if (aBasis->IsKind(STANDARD_TYPE(Geom_Line))) {
- Handle(Geom_Line) aBasisLine = Handle(Geom_Line)::DownCast(aBasis);
- gp_Dir aDir = aRS->Direction();
- gp_Dir aBasisDir = aBasisLine->Position().Direction();
- if (aBasisDir.IsParallel(aDir, Precision::Confusion())) {
- // basis line is parallel to the revolution axis: it is a cylinder
- gp_Pnt aLoc = aRS->Location();
- Standard_Real aR = aBasisLine->Lin().Distance(aLoc);
- gp_Ax3 aCylAx (aLoc, aDir);
-
- theOutCylinder = gp_Cylinder(aCylAx, aR);
- isCylinder = true;
- }
- }
- }
- else if (theInSurface->IsKind(STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion))) {
- Handle(Geom_SurfaceOfLinearExtrusion) aLES =
- Handle(Geom_SurfaceOfLinearExtrusion)::DownCast(theInSurface);
- Handle(Geom_Curve) aBasis = aLES->BasisCurve();
- if (aBasis->IsKind(STANDARD_TYPE(Geom_Circle))) {
- Handle(Geom_Circle) aBasisCircle = Handle(Geom_Circle)::DownCast(aBasis);
- gp_Dir aDir = aLES->Direction();
- gp_Dir aBasisDir = aBasisCircle->Position().Direction();
- if (aBasisDir.IsParallel(aDir, Precision::Confusion())) {
- // basis circle is normal to the extrusion axis: it is a cylinder
- gp_Pnt aLoc = aBasisCircle->Location();
- Standard_Real aR = aBasisCircle->Radius();
- gp_Ax3 aCylAx (aLoc, aDir);
-
- theOutCylinder = gp_Cylinder(aCylAx, aR);
- isCylinder = true;
- }
- }
- }
- else {
- }
-
- return isCylinder;
-}
-
-Standard_Boolean BlockFix_UnionFaces::IsSameDomain(const TopoDS_Face& aFace,
- const TopoDS_Face& aCheckedFace) const
-{
- //checking the same handles
- TopLoc_Location L1, L2;
- Handle(Geom_Surface) S1, S2;
-
- S1 = BRep_Tool::Surface(aFace,L1);
- S2 = BRep_Tool::Surface(aCheckedFace,L2);
-
- if (S1 == S2 && L1 == L2)
- return true;
-
- // planar and cylindrical cases (IMP 20052)
- Standard_Real aPrec = Precision::Confusion();
-
- S1 = BRep_Tool::Surface(aFace);
- S2 = BRep_Tool::Surface(aCheckedFace);
-
- S1 = ClearRts(S1);
- S2 = ClearRts(S2);
-
- //Handle(Geom_OffsetSurface) aGOFS1, aGOFS2;
- //aGOFS1 = Handle(Geom_OffsetSurface)::DownCast(S1);
- //aGOFS2 = Handle(Geom_OffsetSurface)::DownCast(S2);
- //if (!aGOFS1.IsNull()) S1 = aGOFS1->BasisSurface();
- //if (!aGOFS2.IsNull()) S2 = aGOFS2->BasisSurface();
-
- // case of two elementary surfaces: use OCCT tool
- // elementary surfaces: ConicalSurface, CylindricalSurface,
- // Plane, SphericalSurface and ToroidalSurface
- if (S1->IsKind(STANDARD_TYPE(Geom_ElementarySurface)) &&
- S2->IsKind(STANDARD_TYPE(Geom_ElementarySurface)))
- {
- Handle(GeomAdaptor_HSurface) aGA1 = new GeomAdaptor_HSurface(S1);
- Handle(GeomAdaptor_HSurface) aGA2 = new GeomAdaptor_HSurface(S2);
-
- Handle(BRepTopAdaptor_TopolTool) aTT1 = new BRepTopAdaptor_TopolTool();
- Handle(BRepTopAdaptor_TopolTool) aTT2 = new BRepTopAdaptor_TopolTool();
-
- try {
-#if OCC_VERSION_LARGE > 0x06010000
- OCC_CATCH_SIGNALS;
-#endif
-
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
- IntPatch_ImpImpIntersection anIIInt (aGA1, aTT1, aGA2, aTT2, aPrec, aPrec);
-#else
- IntPatch_TheIIIntOfIntersection anIIInt (aGA1, aTT1, aGA2, aTT2, aPrec, aPrec);
-#endif
- if (!anIIInt.IsDone() || anIIInt.IsEmpty())
- return false;
-
- return anIIInt.TangentFaces();
- }
- catch (Standard_Failure) {
- return false;
- }
- }
-
- // case of two planar surfaces:
- // all kinds of surfaces checked, including b-spline and bezier
- GeomLib_IsPlanarSurface aPlanarityChecker1 (S1, aPrec);
- if (aPlanarityChecker1.IsPlanar()) {
- GeomLib_IsPlanarSurface aPlanarityChecker2 (S2, aPrec);
- if (aPlanarityChecker2.IsPlanar()) {
- gp_Pln aPln1 = aPlanarityChecker1.Plan();
- gp_Pln aPln2 = aPlanarityChecker2.Plan();
-
- if (aPln1.Position().Direction().IsParallel(aPln2.Position().Direction(), aPrec) &&
- aPln1.Distance(aPln2) < aPrec) {
- return true;
- }
- }
- }
-
- // case of two cylindrical surfaces, at least one of which is a swept surface
- // swept surfaces: SurfaceOfLinearExtrusion, SurfaceOfRevolution
- if ((S1->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) ||
- S1->IsKind(STANDARD_TYPE(Geom_SweptSurface))) &&
- (S2->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) ||
- S2->IsKind(STANDARD_TYPE(Geom_SweptSurface))))
- {
- gp_Cylinder aCyl1, aCyl2;
- if (getCylinder(S1, aCyl1) && getCylinder(S2, aCyl2)) {
- if (fabs(aCyl1.Radius() - aCyl2.Radius()) < aPrec) {
- gp_Dir aDir1 = aCyl1.Position().Direction();
- gp_Dir aDir2 = aCyl2.Position().Direction();
- if (aDir1.IsParallel(aDir2, aPrec)) {
- gp_Pnt aLoc1 = aCyl1.Location();
- gp_Pnt aLoc2 = aCyl2.Location();
- gp_Vec aVec12 (aLoc1, aLoc2);
- if (aVec12.SquareMagnitude() < aPrec*aPrec ||
- aVec12.IsParallel(aDir1, aPrec)) {
- return true;
- }
- }
- }
- }
- }
-
- return false;
-}
-
-
-//=======================================================================
-//function : MovePCurves
-//purpose :
-//=======================================================================
-
-void BlockFix_UnionFaces::MovePCurves(TopoDS_Face& aTarget,
- const TopoDS_Face& aSource) const
-{
- BRep_Builder B;
- for(TopExp_Explorer wexp(aSource,TopAbs_WIRE);wexp.More();wexp.Next()) {
- Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire(TopoDS::Wire(wexp.Current()),
- aTarget, Precision::Confusion());
- sfw->FixReorder();
- Standard_Boolean isReoredFailed = sfw->StatusReorder ( ShapeExtend_FAIL );
- sfw->FixEdgeCurves();
- if(isReoredFailed)
- continue;
-
- sfw->FixShifted();
- sfw->FixDegenerated();
-
- // remove degenerated edges from not degenerated points
- ShapeAnalysis_Edge sae;
- Handle(ShapeExtend_WireData) sewd = sfw->WireData();
- for(Standard_Integer i = 1; i<=sewd->NbEdges();i++) {
- TopoDS_Edge E = sewd->Edge(i);
- if(BRep_Tool::Degenerated(E)&&!sae.HasPCurve(E,aTarget)) {
- sewd->Remove(i);
- i--;
- }
- }
-
- TopoDS_Wire ResWire = sfw->Wire();
- B.Add(aTarget,ResWire);
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _BlockFix_UnionFaces_HeaderFile
-#define _BlockFix_UnionFaces_HeaderFile
-
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-class TopoDS_Shape;
-class TopoDS_Face;
-
-class BlockFix_UnionFaces
-{
-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 BlockFix_UnionFaces();
-
- Standard_EXPORT Standard_Real& GetTolerance();
-
- /* \brief To get/set the OptimumNbFaces parameter
- *
- * If a being processed solid has less than OptimumNbFaces
- * faces, no union will be performed.
- * By default this parameter is set to 6 (to correctly
- * process blocks - hexahedral solids)
- * Special values: 0 - do all possible unions, regardless the faces quantity,
- * negative - do not perform any unions, regardless the faces quantity.
- *
- */
- Standard_EXPORT Standard_Integer& GetOptimumNbFaces();
-
- Standard_EXPORT TopoDS_Shape Perform(const TopoDS_Shape& Shape);
-
- Standard_EXPORT virtual Standard_Boolean IsSameDomain(const TopoDS_Face& aFace,
- const TopoDS_Face& aChekedFace) const;
- Standard_EXPORT virtual void MovePCurves(TopoDS_Face& aTarget,
- const TopoDS_Face& aSource) const;
-
-private:
- // Fields PRIVATE
- //
- Standard_Real myTolerance;
- Standard_Integer myOptimumNbFaces;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <BlockFix_UnionFaces.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _TopoDS_Face_HeaderFile
-#include <TopoDS_Face.hxx>
-#endif
-#ifndef _BlockFix_UnionFaces_HeaderFile
-#include <BlockFix_UnionFaces.hxx>
-#endif
+++ /dev/null
-GEOMAlgo_Builder_0.cxx
-GEOMAlgo_Builder_1.cxx
-GEOMAlgo_Builder_2.cxx
-GEOMAlgo_Builder_3.cxx
-GEOMAlgo_Builder_4.cxx
-GEOMAlgo_ShapeInfoFiller_1.cxx
-GEOMAlgo_Tools_1.cxx
-
-GEOMAlgo_Gluer2.hxx
-GEOMAlgo_Gluer2.cxx
-GEOMAlgo_Gluer2_1.cxx
-GEOMAlgo_Gluer2_2.cxx
-GEOMAlgo_Gluer2_3.cxx
-
-GEOMAlgo_GluerAlgo.hxx
-GEOMAlgo_GluerAlgo.cxx
-
-GEOMAlgo_GlueDetector.hxx
-GEOMAlgo_GlueDetector.cxx
-
-GEOMAlgo_GetInPlace.hxx
-GEOMAlgo_GetInPlace.cxx
-GEOMAlgo_GetInPlace_1.cxx
-GEOMAlgo_GetInPlace_2.cxx
-GEOMAlgo_GetInPlace_3.cxx
-
-GEOMAlgo_FinderShapeOnQuad.hxx
-GEOMAlgo_FinderShapeOnQuad.cxx
-
-GEOMAlgo_WireSplitter.hxx
-GEOMAlgo_WireSplitter.cxx
-GEOMAlgo_WESScaler.hxx
-GEOMAlgo_WESScaler.cxx
-GEOMAlgo_WESCorrector.hxx
-GEOMAlgo_WESCorrector.cxx
-GEOMAlgo_WireEdgeSet.hxx
-GEOMAlgo_WireEdgeSet.cxx
-GEOMAlgo_GlueAnalyser.hxx
-GEOMAlgo_GlueAnalyser.cxx
-GEOMAlgo_Gluer.hxx
-GEOMAlgo_Gluer.cxx
-GEOMAlgo_FinderShapeOn2.hxx
-GEOMAlgo_FinderShapeOn2.cxx
-GEOMAlgo_FinderShapeOn1.hxx
-GEOMAlgo_FinderShapeOn1.cxx
-GEOMAlgo_FinderShapeOn.hxx
-GEOMAlgo_FinderShapeOn.cxx
-GEOMAlgo_ShapeAlgo.hxx
-GEOMAlgo_ShapeAlgo.cxx
-GEOMAlgo_SolidSolid.hxx
-GEOMAlgo_SolidSolid.cxx
-GEOMAlgo_ShellSolid.hxx
-GEOMAlgo_ShellSolid.cxx
-GEOMAlgo_VertexSolid.hxx
-GEOMAlgo_VertexSolid.cxx
-GEOMAlgo_WireSolid.hxx
-GEOMAlgo_WireSolid.cxx
-GEOMAlgo_ShapeSolid.hxx
-GEOMAlgo_ShapeSolid.cxx
-GEOMAlgo_Splitter.hxx
-GEOMAlgo_Splitter.cxx
-GEOMAlgo_Builder.hxx
-GEOMAlgo_Builder.cxx
-GEOMAlgo_BuilderShape.hxx
-GEOMAlgo_BuilderShape.cxx
-GEOMAlgo_BuilderArea.hxx
-GEOMAlgo_BuilderArea.cxx
-GEOMAlgo_BuilderFace.hxx
-GEOMAlgo_BuilderFace.cxx
-GEOMAlgo_BuilderSolid.hxx
-GEOMAlgo_BuilderSolid.cxx
-GEOMAlgo_ShapeInfoFiller.hxx
-GEOMAlgo_ShapeInfoFiller.cxx
-GEOMAlgo_Algo.hxx
-GEOMAlgo_Algo.cxx
-GEOMAlgo_ShapeSet.hxx
-GEOMAlgo_ShapeSet.cxx
-GEOMAlgo_SurfaceTools.hxx
-GEOMAlgo_SurfaceTools.cxx
-GEOMAlgo_State.hxx
-GEOMAlgo_KindOfBounds.hxx
-GEOMAlgo_KindOfClosed.hxx
-GEOMAlgo_KindOfName.hxx
-GEOMAlgo_KindOfShape.hxx
-GEOMAlgo_ShapeInfo.hxx
-GEOMAlgo_ShapeInfo.cxx
-GEOMAlgo_CoupleOfShapes.hxx
-GEOMAlgo_CoupleOfShapes.cxx
-GEOMAlgo_BuilderTools.hxx
-GEOMAlgo_BuilderTools.cxx
-GEOMAlgo_Tools3D.hxx
-GEOMAlgo_Tools3D.cxx
-GEOMAlgo_Tools.hxx
-GEOMAlgo_Tools.cxx
-GEOMAlgo_PWireEdgeSet.hxx
-GEOMAlgo_StateCollector.cxx
-GEOMAlgo_StateCollector.hxx
-GEOMAlgo_PassKey.hxx
-GEOMAlgo_PassKey.cxx
-GEOMAlgo_PassKeyMapHasher.hxx
-GEOMAlgo_PassKeyMapHasher.cxx
-GEOMAlgo_PassKeyShape.hxx
-GEOMAlgo_PassKeyShape.cxx
-GEOMAlgo_PassKeyShapeMapHasher.hxx
-GEOMAlgo_PassKeyShapeMapHasher.cxx
-GEOMAlgo_ClsfBox.hxx
-GEOMAlgo_ClsfBox.cxx
-GEOMAlgo_ClsfSolid.hxx
-GEOMAlgo_ClsfSolid.cxx
-GEOMAlgo_ClsfSurf.hxx
-GEOMAlgo_ClsfSurf.cxx
-GEOMAlgo_Clsf.hxx
-GEOMAlgo_Clsf.cxx
-GEOMAlgo_HAlgo.hxx
-GEOMAlgo_HAlgo.cxx
-
-GEOMAlgo_ListOfCoupleOfShapes.hxx
-GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx
-GEOMAlgo_ListOfPnt.hxx
-GEOMAlgo_ListIteratorOfListOfPnt.hxx
-GEOMAlgo_DataMapOfShapeShapeSet.hxx
-GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx
-GEOMAlgo_DataMapOfShapeReal.hxx
-GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx
-GEOMAlgo_DataMapOfRealListOfShape.hxx
-GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx
-GEOMAlgo_DataMapOfPassKeyInteger.hxx
-GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx
-GEOMAlgo_DataMapOfPassKeyShapeShape.hxx
-GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx
-GEOMAlgo_DataMapOfOrientedShapeShape.hxx
-GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx
-GEOMAlgo_DataMapOfShapeMapOfShape.hxx
-GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx
-GEOMAlgo_DataMapOfShapePnt.hxx
-GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx
-GEOMAlgo_IndexedDataMapOfShapeBox.hxx
-
-GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx
-GEOMAlgo_IndexedDataMapOfShapeState.hxx
-GEOMAlgo_IndexedDataMapOfIntegerShape.hxx
-GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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.cdl
--- Created: Sat Dec 04 12:36:22 2004
--- Author: Peter KURNEV
-
-package GEOMAlgo
-
- ---Purpose:
-
-uses
- TCollection,
-
- TColgp,
- Geom,
- Bnd,
- gp,
- GeomAdaptor,
- TopAbs,
- TopoDS,
- TopTools,
- IntTools,
- BOPTools,
- BOP,
-
- TColStd,
- BOPTColStd,
- BRepAlgo,
- NMTDS,
- NMTTools
-
-is
- -- Enumerations
- imported State from GEOMAlgo;
- imported KindOfShape from GEOMAlgo;
- imported KindOfName from GEOMAlgo;
- imported KindOfBounds from GEOMAlgo;
- imported KindOfClosed from GEOMAlgo;
- --
- -- Gluer / GetInPlace
- imported Gluer2 from GEOMAlgo;
- imported GlueDetector from GEOMAlgo;
- imported GluerAlgo from GEOMAlgo;
- imported GetInPlace from GEOMAlgo;
- -- Algos
- imported WireSplitter from GEOMAlgo;
- imported WESScaler from GEOMAlgo;
- imported WESCorrector from GEOMAlgo;
- imported WireEdgeSet from GEOMAlgo;
- imported GlueAnalyser from GEOMAlgo;
- imported Gluer from GEOMAlgo;
- imported FinderShapeOn2 from GEOMAlgo;
- imported FinderShapeOn1 from GEOMAlgo;
- imported FinderShapeOn from GEOMAlgo;
- imported ShapeAlgo from GEOMAlgo;
- imported SolidSolid from GEOMAlgo;
- imported ShellSolid from GEOMAlgo;
- imported VertexSolid from GEOMAlgo;
- imported WireSolid from GEOMAlgo;
- imported ShapeSolid from GEOMAlgo;
- imported Splitter from GEOMAlgo;
- imported Builder from GEOMAlgo;
- imported BuilderShape from GEOMAlgo;
- imported BuilderSolid from GEOMAlgo;
- imported BuilderFace from GEOMAlgo;
- imported BuilderArea from GEOMAlgo;
- imported ShapeInfoFiller from GEOMAlgo;
- imported Algo from GEOMAlgo;
- -- Data / Tools
- imported ShapeSet from GEOMAlgo;
- imported SurfaceTools from GEOMAlgo;
- imported ShapeInfo from GEOMAlgo;
- imported CoupleOfShapes from GEOMAlgo;
- imported BuilderTools from GEOMAlgo;
- imported Tools3D from GEOMAlgo;
- imported Tools from GEOMAlgo;
- imported PWireEdgeSet from GEOMAlgo;
- imported StateCollector from GEOMAlgo;
- imported PassKey from GEOMAlgo;
- imported PassKeyMapHasher from GEOMAlgo;
- imported PassKeyShape from GEOMAlgo;
- imported PassKeyShapeMapHasher from GEOMAlgo;
- imported ClsfBox from GEOMAlgo;
- imported ClsfSurf from GEOMAlgo;
- imported ClsfSolid from GEOMAlgo;
- imported Clsf from GEOMAlgo;
- imported HAlgo from GEOMAlgo;
-
- imported ListOfCoupleOfShapes from GEOMAlgo;
- imported ListIteratorOfListOfCoupleOfShapes from GEOMAlgo;
- imported ListOfPnt from GEOMAlgo;
- imported ListIteratorOfListOfPnt from GEOMAlgo;
- imported DataMapOfShapeShapeSet from GEOMAlgo;
- imported DataMapIteratorOfDataMapOfShapeShapeSet from GEOMAlgo;
- imported DataMapOfShapeReal from GEOMAlgo;
- imported DataMapIteratorOfDataMapOfShapeReal from GEOMAlgo;
- imported DataMapOfRealListOfShape from GEOMAlgo;
- imported DataMapIteratorOfDataMapOfRealListOfShape from GEOMAlgo;
- imported DataMapOfPassKeyInteger from GEOMAlgo;
- imported DataMapIteratorOfDataMapOfPassKeyInteger from GEOMAlgo;
- imported DataMapOfPassKeyShapeShape from GEOMAlgo;
- imported DataMapIteratorOfDataMapOfPassKeyShapeShape from GEOMAlgo;
- imported DataMapOfOrientedShapeShape from GEOMAlgo;
- imported DataMapIteratorOfDataMapOfOrientedShapeShape from GEOMAlgo;
- imported DataMapOfShapeMapOfShape from GEOMAlgo;
- imported DataMapIteratorOfDataMapOfShapeMapOfShape from GEOMAlgo;
- imported DataMapOfShapePnt from GEOMAlgo;
- imported DataMapIteratorOfDataMapOfShapePnt from GEOMAlgo;
- imported IndexedDataMapOfShapeBox from GEOMAlgo;
- imported IndexedDataMapOfShapeShapeInfo from GEOMAlgo;
- imported IndexedDataMapOfShapeState from GEOMAlgo;
- imported IndexedDataMapOfIntegerShape from GEOMAlgo;
- imported IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo;
-
-
- -- Instantiations
-
- --class ListOfCoupleOfShapes
- -- instantiates List from TCollection (CoupleOfShapes from GEOMAlgo);
-
- --class ListOfPnt
- -- instantiates List from TCollection (Pnt from gp);
- --
-
- --class DataMapOfShapeShapeSet instantiates
- -- DataMap from TCollection(Shape from TopoDS,
- -- ShapeSet from GEOMAlgo,
- -- ShapeMapHasher from TopTools);
-
- --class DataMapOfShapeReal instantiates
- -- DataMap from TCollection(Shape from TopoDS,
- -- Real from Standard,
- -- ShapeMapHasher from TopTools);
-
-
- --class DataMapOfRealListOfShape instantiates
- -- DataMap from TCollection(Real from Standard,
- -- ListOfShape from TopTools,
- -- MapRealHasher from TColStd);
-
-
- --class DataMapOfPassKeyInteger
- -- instantiates DataMap from TCollection (PassKey from GEOMAlgo,
- -- Integer from Standard,
- -- PassKeyMapHasher from GEOMAlgo);
-
- --class DataMapOfPassKeyShapeShape
- -- instantiates DataMap from TCollection (PassKeyShape from GEOMAlgo,
- -- Shape from TopoDS,
- -- PassKeyShapeMapHasher from GEOMAlgo);
-
- --class DataMapOfOrientedShapeShape instantiates
- -- DataMap from TCollection (Shape from TopoDS,
- -- Shape from TopoDS,
- -- OrientedShapeMapHasher from TopTools);
-
-
- --class DataMapOfShapeMapOfShape instantiates
- -- DataMap from TCollection (Shape from TopoDS,
- -- MapOfShape from TopTools,
- -- ShapeMapHasher from TopTools);
-
- --class DataMapOfShapePnt instantiates
- -- DataMap from TCollection (Shape from TopoDS,
- -- Pnt from gp,
- -- ShapeMapHasher from TopTools);
-
- --
- --class IndexedDataMapOfShapeBox
- -- instantiates IndexedDataMap from TCollection (Shape from TopoDS,
--- Box from Bnd,
--- ShapeMapHasher from TopTools);
-
--- class IndexedDataMapOfShapeShapeInfo
--- instantiates IndexedDataMap from TCollection (Shape from TopoDS,
--- ShapeInfo from GEOMAlgo,
--- ShapeMapHasher from TopTools);
--- class IndexedDataMapOfShapeState
--- instantiates IndexedDataMap from TCollection (Shape from TopoDS,
--- State from TopAbs,
--- ShapeMapHasher from TopTools);
-
-
---
--- class IndexedDataMapOfIntegerShape
--- instantiates IndexedDataMap from TCollection (Integer from Standard,
--- Shape from TopoDS,
--- MapIntegerHasher from TColStd);
-
-
--- class IndexedDataMapOfPassKeyShapeListOfShape
--- instantiates IndexedDataMap from TCollection (PassKeyShape from GEOMAlgo,
--- ListOfShape from TopTools,
--- PassKeyShapeMapHasher from GEOMAlgo);
-
-
-
-
-
-
-end GEOMAlgo;
- --
- -- enumerations
- --
- --enumeration State is
- -- ST_UNKNOWN,
--- ST_IN,
--- ST_OUT,
--- ST_ON,
--- ST_ONIN,
--- ST_ONOUT,
--- ST_INOUT
--- end State;
- --
--- enumeration KindOfShape is
--- KS_UNKNOWN,
--- KS_SPHERE,
--- KS_CYLINDER,
--- KS_BOX,
--- KS_TORUS,
--- KS_CONE,
--- KS_ELLIPSE,
--- KS_PLANE,
--- KS_CIRCLE,
--- KS_LINE,
--- KS_DEGENERATED
--- end KindOfShape;
- --
--- enumeration KindOfName is
--- KN_UNKNOWN,
--- KN_SPHERE,
--- KN_CYLINDER,
--- KN_TORUS,
--- KN_CONE,
--- KN_ELLIPSE,
--- KN_CIRCLE,
--- KN_PLANE,
--- KN_LINE,
--- KN_BOX,
--- KN_SEGMENT,
--- KN_ARCCIRCLE,
--- KN_POLYGON,
--- KN_POLYHEDRON,
--- KN_DISKCIRCLE,
--- KN_DISKELLIPSE,
--- KN_RECTANGLE,
--- KN_TRIANGLE,
--- KN_QUADRANGLE,
--- KN_ARCELLIPSE
--- end KindOfName;
- --
- -- enumeration KindOfBounds is
- -- KB_UNKNOWN,
--- KB_TRIMMED,
- -- KB_INFINITE
--- end KindOfBounds;
- --
--- enumeration KindOfClosed is
--- KC_UNKNOWN,
--- KC_CLOSED,
--- KC_NOTCLOSED
--- end KindOfClosed;
- --
-
- --deferred class HAlgo;
- --deferred class Clsf;
- --class ClsfSurf;
- --class ClsfBox;
- --class ClsfSolid;
-
- --
- -- classes
- --
- --deferred class Algo;
- --deferred class ShapeAlgo;
- --
- --class ShapeInfo;
- --class ShapeInfoFiller;
- --class CoupleOfShapes;
- --class SurfaceTools;
- --class Tools;
- --class PassKey;
- --class PassKeyMapHasher;
- --class PassKeyShape;
- --class PassKeyShapeMapHasher;
- --
- -- finder on
- --deferred class ShapeSolid;
- --class WireSolid;
- --class ShellSolid;
- --class VertexSolid;
- --class SolidSolid;
- --class StateCollector;
-
- --
- --class Gluer;
- --class GlueAnalyser;
- --class FinderShapeOn;
- --class FinderShapeOn1;
- --class FinderShapeOn2;
- --
- -- Builder/Splitter
- --deferred class BuilderShape;
- --class Builder;
- --class Splitter;
- --class Tools3D;
- --class BuilderTools;
- --class ShapeSet;
-
- --deferred class BuilderArea;
- --class BuilderFace;
- --class BuilderSolid;
-
- --class WireSplitter;
- --class WireEdgeSet;
- --class WESCorrector;
- --class WESScaler;
- --
- -- Pointers
- --
- --pointer PWireEdgeSet to WireEdgeSet from GEOMAlgo;
- --
- --
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Algo.hxx>
-
-//=======================================================================
-// function:
-// purpose:
-//=======================================================================
- GEOMAlgo_Algo::GEOMAlgo_Algo()
-:
- myErrorStatus(1),
- myWarningStatus(0),
- myComputeInternalShapes(Standard_True)
-{}
-//=======================================================================
-// function: ~
-// purpose:
-//=======================================================================
- GEOMAlgo_Algo::~GEOMAlgo_Algo()
-{
-}
-//=======================================================================
-// function: CheckData
-// purpose:
-//=======================================================================
- void GEOMAlgo_Algo::CheckData()
-{
- myErrorStatus=0;
-}
-//=======================================================================
-// function: CheckResult
-// purpose:
-//=======================================================================
- void GEOMAlgo_Algo::CheckResult()
-{
- myErrorStatus=0;
-}
-//=======================================================================
-// function: ErrorStatus
-// purpose:
-//=======================================================================
- Standard_Integer GEOMAlgo_Algo::ErrorStatus()const
-{
- return myErrorStatus;
-}
-//=======================================================================
-// function: WarningStatus
-// purpose:
-//=======================================================================
- Standard_Integer GEOMAlgo_Algo::WarningStatus()const
-{
- return myWarningStatus;
-}
-// myErrorStatus
-//
-// 1 - object is just initialized
-
-//=======================================================================
-//function : ComputeInternalShapes
-//purpose :
-//=======================================================================
- void GEOMAlgo_Algo::ComputeInternalShapes(const Standard_Boolean theFlag)
-{
- myComputeInternalShapes = theFlag;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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.hxx
-// Created: Sat Dec 04 12:39:47 2004
-// Author: Peter KURNEV
-// <peter@PREFEX>
-//
-#ifndef _GEOMAlgo_Algo_HeaderFile
-#define _GEOMAlgo_Algo_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Boolean.hxx>
-
-//=======================================================================
-//class : GEOMAlgo_Algo
-//purpose :
-//=======================================================================
-class GEOMAlgo_Algo
-{
- public:
- Standard_EXPORT
- virtual void Perform() = 0;
-
- Standard_EXPORT
- Standard_Integer ErrorStatus() const;
-
- Standard_EXPORT
- Standard_Integer WarningStatus() const;
-
- //! Allows to omit of creation of internal shapes (manifold topology). <br>
- //! Needed for the SALOME/TRIPOLI module. <br>
- Standard_EXPORT
- void ComputeInternalShapes(const Standard_Boolean theFlag) ;
-
-protected:
- Standard_EXPORT
- GEOMAlgo_Algo();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_Algo();
-
- Standard_EXPORT
- virtual void CheckData() ;
-
- Standard_EXPORT
- virtual void CheckResult() ;
-
-
- Standard_Integer myErrorStatus;
- Standard_Integer myWarningStatus;
- Standard_Boolean myComputeInternalShapes;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Builder.cxx
-// Created:
-// Author: Peter KURNEV
-//
-#include <GEOMAlgo_Builder.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Compound.hxx>
-#include <TopoDS_Iterator.hxx>
-
-#include <BRep_Builder.hxx>
-
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-
-#include <BOP_CorrectTolerances.hxx>
-
-#include <BRepLib.hxx>
-#include <NMTTools_PaveFiller.hxx>
-#include <GEOMAlgo_Tools.hxx>
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- GEOMAlgo_Builder::GEOMAlgo_Builder()
-:
- GEOMAlgo_BuilderShape()
-{
- myNbTypes=9;
- myPaveFiller=NULL;
- myEntryPoint=0; // Entry point through PerformWithFiller ()
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
- GEOMAlgo_Builder::~GEOMAlgo_Builder()
-{
- if (myEntryPoint==1) {
- if (myPaveFiller) {
- delete myPaveFiller;
- myPaveFiller=NULL;
- }
- }
-}
-//=======================================================================
-//function : AddCompound
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::AddCompound(const TopoDS_Shape& theShape)
-{
- TopoDS_Iterator aIt;
- //
- aIt.Initialize(theShape);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- AddShape(aS);
- }
-}
-//=======================================================================
-//function : AddShape
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::AddShape(const TopoDS_Shape& theShape)
-{
- if (myMapFence.Add(theShape)) {
- myShapes.Append(theShape);
- }
-}
-//=======================================================================
-//function : Shapes
-//purpose :
-//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_Builder::Shapes()const
-{
- return myShapes;
-}
-//=======================================================================
-//function : Clear
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::Clear()
-{
- myShapes.Clear();
- ClearInternals();
-}
-//=======================================================================
-//function : ClearInternals
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::ClearInternals()
-{
- Standard_Integer i;
- //
- for (i=0; i<myNbTypes; ++i){
- myShapes1[i].Clear();
- }
- myImages.Clear();
- //
- myInParts.Clear();
- mySplitFaces.Clear();
- mySameDomainShapes.Clear();
- myDraftSolids.Clear();
- myMapFence.Clear();
-}
-//=======================================================================
-//function : Prepare
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::Prepare()
-{
- myErrorStatus=0;
- //
- Standard_Integer aNb;
- BRep_Builder aBB;
- TopoDS_Compound aC;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- aNb=myShapes.Extent();
- if (aNb<2) {
- myErrorStatus=10; // No shapes to process
- return;
- }
- //
- // 1. myShape is empty compound
- aBB.MakeCompound(aC);
- myShape=aC;
- //
- // 2. myShapes1
- aIt.Initialize(myShapes);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- AddShape1(aS);
- }
-}
-
-//=======================================================================
-//function : AddShape1
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::AddShape1(const TopoDS_Shape& theShape)
-{
- Standard_Integer iType;
- TopAbs_ShapeEnum aType;
- TopoDS_Iterator aIt;
- TopTools_MapOfShape aM;
- //
- aType=theShape.ShapeType();
- if (aType==TopAbs_COMPOUND) {
- aIt.Initialize(theShape);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- AddShape1(aS);
- }
- }
- //
- iType=(Standard_Integer)aType;
- if (aM.Add(theShape)) {
- myShapes1[iType].Append(theShape);
- }
-}
-//=======================================================================
-//function : BuildResult
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::BuildResult(const TopAbs_ShapeEnum theType)
-{
- myErrorStatus=0;
- //
- TopAbs_ShapeEnum aType;
- BRep_Builder aBB;
- TopTools_MapOfShape aM;
- TopTools_ListIteratorOfListOfShape aIt, aItIm;
- //
- aIt.Initialize(myShapes);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- aType=aS.ShapeType();
- if (aType==theType) {
- if (myImages.HasImage(aS)){
- const TopTools_ListOfShape& aLSIm=myImages.Image(aS);
- aItIm.Initialize(aLSIm);
- for (; aItIm.More(); aItIm.Next()) {
- const TopoDS_Shape& aSIm=aItIm.Value();
- if (aM.Add(aSIm)) {
- aBB.Add(myShape, aSIm);
- }
- }
- }
- else {
- if (aM.Add(aS)) {
- aBB.Add(myShape, aS);
- }
- }
- }
- }
-}
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::Perform()
-{
- myErrorStatus=0;
- //
- BRep_Builder aBB;
- TopoDS_Compound aCS;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- aBB.MakeCompound(aCS);
- //
- aIt.Initialize(myShapes);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- aBB.Add(aCS, aS);
- }
- //
- NMTTools_PaveFiller* pPF=new NMTTools_PaveFiller;
- //
- pPF->SetCompositeShape(aCS);
- pPF->Perform();
- //
- myEntryPoint=1;
- PerformInternal(*pPF);
-}
-//=======================================================================
-//function : PerformWithFiller
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::PerformWithFiller(const NMTTools_PaveFiller& theDSF)
-{
- myEntryPoint=0;
- //
- PerformInternal(theDSF);
-}
-//=======================================================================
-//function : PerformInternal
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::PerformInternal(const NMTTools_PaveFiller& pPF)
-{
- myErrorStatus=0;
- //
- Standard_Boolean bIsDone;
- //
- // 0. myPaveFiller
- myPaveFiller=(NMTTools_PaveFiller *)&pPF;
- //
- bIsDone=myPaveFiller->IsDone();
- if (!bIsDone) {
- myErrorStatus=2; // PaveFiller is failed
- return;
- }
- //
- // 1. Clear Internal fields
- ClearInternals();
- //
- // 2. Prepare
- Prepare();
- if (myErrorStatus) {
- return;
- }
- //
- // 3. Fill Images
- //
- // 3.1 Vertices
- FillImagesVertices();
- if (myErrorStatus) {
- return;
- }
- //
- BuildResult(TopAbs_VERTEX);
- if (myErrorStatus) {
- return;
- }
- // 3.2 Edges
- FillImagesEdges();
- if (myErrorStatus) {
- return;
- }
-
- BuildResult(TopAbs_EDGE);
- if (myErrorStatus) {
- return;
- }
- // 3.3 Wires
- FillImagesContainers(TopAbs_WIRE);
- if (myErrorStatus) {
- return;
- }
-
- BuildResult(TopAbs_WIRE);
- if (myErrorStatus) {
- return;
- }
-
- // 3.4 Faces
- FillImagesFaces();
- if (myErrorStatus) {
- return;
- }
-
- BuildResult(TopAbs_FACE);
- if (myErrorStatus) {
- return;
- }
- // 3.5 Shells
-
- FillImagesContainers(TopAbs_SHELL);
- if (myErrorStatus) {
- return;
- }
-
- BuildResult(TopAbs_SHELL);
- if (myErrorStatus) {
- return;
- }
- // 3.6 Solids
- FillImagesSolids();
- if (myErrorStatus) {
- return;
- }
-
- BuildResult(TopAbs_SOLID);
- if (myErrorStatus) {
- return;
- }
- // 3.7 CompSolids
- FillImagesContainers(TopAbs_COMPSOLID);
- if (myErrorStatus) {
- return;
- }
-
- BuildResult(TopAbs_COMPSOLID);
- if (myErrorStatus) {
- return;
- }
- // 3.8 Compounds
- FillImagesContainers(TopAbs_COMPOUND);
- if (myErrorStatus) {
- return;
- }
-
- BuildResult(TopAbs_COMPOUND);
- if (myErrorStatus) {
- return;
- }
- //
- // 4.History
- PrepareHistory();
- //
- // 5 Post-treatment
- PostTreat();
-}
-//
-// static
-// void CorrectWires(const TopoDS_Shape& aS);
-//
-//=======================================================================
-//function : PostTreat
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::PostTreat()
-{
- Standard_Integer aNbS;
- TopoDS_Iterator aIt;
- TopTools_ListOfShape aLS;
- //
- aIt.Initialize(myShape);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- aLS.Append(aS);
- }
- aNbS=aLS.Extent();
- if (aNbS==1) {
- myShape=aLS.First();
- }
-
- BRepLib::SameParameter(myShape, 1.e-7, Standard_True);
- //
- GEOMAlgo_Tools::CorrectWires(myShape);
-}
-//
-// myErrorStatus
-//
-// 0 - Ok
-// 1 - The object is just initialized
-// 2 - PaveFiller is failed
-// 10 - No shapes to process
-// 30 - SolidBuilder failed
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Builder.cxx
-// Created:
-// Author: Peter KURNEV
-//
-#ifndef _GEOMAlgo_Builder_HeaderFile
-#define _GEOMAlgo_Builder_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <NMTTools_PPaveFiller.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <Standard_Integer.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <BRepAlgo_Image.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_IndexedDataMapOfShapeShape.hxx>
-#include <GEOMAlgo_BuilderShape.hxx>
-#include <NMTTools_PaveFiller.hxx>
-#include <Standard_Boolean.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <TopoDS_Shape.hxx>
-#include <BRepAlgo_Image.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_Builder
-//purpose :
-//=======================================================================
-class GEOMAlgo_Builder : public GEOMAlgo_BuilderShape
-{
- public:
- //! Empty constructor <br>
- Standard_EXPORT
- GEOMAlgo_Builder();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_Builder();
-
- //! Performs calculations <br>
- Standard_EXPORT
- virtual void Perform() ;
-
- //! Performs calculations using prepared PaveFiller <br>
- //! object theDSF <br>
- Standard_EXPORT
- virtual void PerformWithFiller(const NMTTools_PaveFiller& theDSF) ;
-
- //! Adds argument theShape of the operation <br>
- Standard_EXPORT
- virtual void AddShape(const TopoDS_Shape& theShape) ;
-
- //! Clears internal fields and arguments <br>
- Standard_EXPORT
- virtual void Clear() ;
-
- //! Returns the arguments of the operation <br>
- Standard_EXPORT
- const TopTools_ListOfShape& Shapes() const;
-
- //! Returns the list of shapes generated from the <br>
- //! shape theS. <br>
- Standard_EXPORT
- virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
-
- //! Returns the list of shapes modified from the shape <br>
- //! theS. <br>
- Standard_EXPORT
- virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
-
- //! Returns true if the shape theS has been deleted. <br>
- Standard_EXPORT
- virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
-
- //! Adds arguments of the operation as <br>
- //! shapes of upper level of container shape theShape <br>
- Standard_EXPORT
- void AddCompound(const TopoDS_Shape& theShape) ;
-
- //! Returns list of arguments of type theType <br>
- Standard_EXPORT
- const TopTools_ListOfShape& Shapes1(const Standard_Integer theType) const;
-
- //! Returns image shapes <br>
- Standard_EXPORT
- const BRepAlgo_Image& Images() const;
-
- //! Returns split-parts of shapes that have <br>
- //! state IN for the domain of shape theShape <br>
- Standard_EXPORT
- const TopTools_ListOfShape& InParts(const TopoDS_Shape& theShape) const;
-
-protected:
- //! Performs calculations using prepared DSFiller <br>
- //! object theDSF <br>
- Standard_EXPORT
- virtual void PerformInternal(const NMTTools_PaveFiller& theDSF) ;
-
- //! Prepare information for history support <br>
- Standard_EXPORT
- virtual void PrepareHistory() ;
-
- //! Clears internal fields <br>
- Standard_EXPORT
- virtual void ClearInternals() ;
-
- //! Provides preparing actions <br>
- Standard_EXPORT
- virtual void Prepare() ;
-
- //! Provides post-tratment actions <br>
- Standard_EXPORT
- virtual void PostTreat() ;
-
- //! Append the argument theShape to <br>
- //! typified lists of arguments myShapes1 <br>
- Standard_EXPORT
- void AddShape1(const TopoDS_Shape& theShape) ;
-
- //! Build the resulting shapes of type theType <br>
- Standard_EXPORT
- virtual void BuildResult(const TopAbs_ShapeEnum theType) ;
-
- //! Fill Images for vertices <br>
- Standard_EXPORT
- void FillImagesVertices() ;
-
- //! Fill Images for edges <br>
- Standard_EXPORT
- void FillImagesEdges() ;
-
- //! Fill Images for faces <br>
- Standard_EXPORT
- void FillImagesFaces() ;
-
- //! For each interferred face find split edges <br>
- //! that are in 2-D domain of the face <br>
- Standard_EXPORT
- void FillIn2DParts() ;
-
- //! Build draft faces <br>
- Standard_EXPORT
- void BuildSplitFaces() ;
-
- //! Among draft faces find same domain faces <br>
- Standard_EXPORT
- void FillSameDomainFaces() ;
-
- //! Fill Images for faces <br>
- //! taking into account same domain faces <br>
- Standard_EXPORT
- void FillImagesFaces1() ;
-
- //! Update Images for faces by <br>
- //! internal vertices <br>
- Standard_EXPORT
- void FillInternalVertices() ;
-
- //! Fill Images for Wires, Shells, Compsolids, Compounds <br>
- Standard_EXPORT
- void FillImagesContainers(const TopAbs_ShapeEnum theType) ;
-
- //! Fill Images for solids <br>
- Standard_EXPORT
- void FillImagesSolids() ;
-
- //! For each interferred solid find split faces <br>
- //! that are in 3-D domain of the solid <br>
- Standard_EXPORT
- void FillIn3DParts() ;
-
- //! Build draft solids <br>
- Standard_EXPORT
- void BuildSplitSolids() ;
-
- //! Update draft solids by <br>
- //! internal shells, edges, vertices <br>
- Standard_EXPORT
- void FillInternalShapes() ;
-
- //! Build solid theDraftSolid that consists of <br>
- //! non-internal split faces of the solid <br>
- //! theSolid. <br>
- //! All splits of internal faces of <br>
- //! theSolid are in the list: theInternalFaces <br>
- Standard_EXPORT
- void BuildDraftSolid(const TopoDS_Shape& theSolid,
- TopoDS_Shape& theDraftSolid,
- TopTools_ListOfShape& theInternalFaces) ;
-
-
- NMTTools_PPaveFiller myPaveFiller;
- TopTools_ListOfShape myShapes;
- Standard_Integer myNbTypes;
- TopTools_MapOfShape myMapFence;
- TopTools_ListOfShape myShapes1[9];
- BRepAlgo_Image myImages;
- TopTools_IndexedDataMapOfShapeListOfShape myInParts;
- BRepAlgo_Image mySplitFaces;
- TopTools_IndexedDataMapOfShapeShape mySameDomainShapes;
- TopTools_IndexedDataMapOfShapeShape myDraftSolids;
- Standard_Integer myEntryPoint;
-
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BuilderArea.cxx
-// Created:
-// Author: Peter KURNEV
-//
-#include <GEOMAlgo_BuilderArea.hxx>
-
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopoDS_Shape.hxx>
-#include <IntTools_Context.hxx>
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-GEOMAlgo_BuilderArea::GEOMAlgo_BuilderArea()
-:
- GEOMAlgo_Algo()
-{
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-GEOMAlgo_BuilderArea::~GEOMAlgo_BuilderArea()
-{
-}
-//=======================================================================
-//function : SetContext
-//purpose :
-//=======================================================================
-void GEOMAlgo_BuilderArea::SetContext(const Handle(IntTools_Context)& theContext)
-{
- myContext=theContext;
-}
-//=======================================================================
-//function : Context
-//purpose :
-//=======================================================================
-const Handle(IntTools_Context)& GEOMAlgo_BuilderArea::Context()const
-{
- return myContext;
-}
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
-void GEOMAlgo_BuilderArea::Perform()
-{
- if (myContext.IsNull()) {
- myContext=new IntTools_Context;
- }
-}
-//=======================================================================
-//function : SetShapes
-//purpose :
-//=======================================================================
-void GEOMAlgo_BuilderArea::SetShapes(const TopTools_ListOfShape& theLF)
-{
- TopTools_ListIteratorOfListOfShape aIt;
- //
- myShapes.Clear();
- aIt.Initialize(theLF);
- for(; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aF=aIt.Value();
- myShapes.Append(aF);
- }
-}
-//=======================================================================
-//function : Shapes
-//purpose :
-//=======================================================================
-const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Shapes()const
-{
- return myShapes;
-}
-//=======================================================================
-//function : Loops
-//purpose :
-//=======================================================================
-const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Loops()const
-{
- return myLoops;
-}
-//=======================================================================
-//function : Areas
-//purpose :
-//=======================================================================
-const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Areas()const
-{
- return myAreas;
-}
-//=======================================================================
-//function :PerformShapesToAvoid
-//purpose :
-//=======================================================================
-void GEOMAlgo_BuilderArea::PerformShapesToAvoid()
-{
-}
-//=======================================================================
-//function : PerformLoops
-//purpose :
-//=======================================================================
-void GEOMAlgo_BuilderArea::PerformLoops()
-{
-}
-//=======================================================================
-//function : PerformAreas
-//purpose :
-//=======================================================================
-void GEOMAlgo_BuilderArea::PerformAreas()
-{
-}
-//=======================================================================
-//function : PerformInternalShapes
-//purpose :
-//=======================================================================
-void GEOMAlgo_BuilderArea::PerformInternalShapes()
-{
-}
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BuilderArea.hxx
-// Created:
-// Author: Peter KURNEV
-//
-
-#ifndef _GEOMAlgo_BuilderArea_HeaderFile
-#define _GEOMAlgo_BuilderArea_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_MapOfOrientedShape.hxx>
-#include <Handle_IntTools_Context.hxx>
-#include <GEOMAlgo_Algo.hxx>
-#include <IntTools_Context.hxx>
-
-//! The root class for algorithms to build <br>
-//! faces/solids from set of edges/faces <br>
-//=======================================================================
-//class : GEOMAlgo_BuilderArea
-//purpose :
-//=======================================================================
-class GEOMAlgo_BuilderArea : public GEOMAlgo_Algo
-{
- public:
- //! Sets cashed geometrical tools <br>
- Standard_EXPORT
- void SetContext(const Handle(IntTools_Context)& theContext) ;
-
- //! Returns cashed geometrical tools <br>
- Standard_EXPORT
- const Handle_IntTools_Context& Context() const;
-
- //! Sets edges/faces to process <br>
- Standard_EXPORT
- void SetShapes(const TopTools_ListOfShape& theLS) ;
-
- //! Returns edges/faces to process <br>
- Standard_EXPORT
- const TopTools_ListOfShape& Shapes() const;
-
- //! Returns wires/shells that have been built <br>
- Standard_EXPORT
- const TopTools_ListOfShape& Loops() const;
-
- //! Returns faces/solids that have been built <br>
- Standard_EXPORT
- const TopTools_ListOfShape& Areas() const;
-
- Standard_EXPORT
- virtual void Perform() ;
-
- protected:
- //! Empty constructor <br>
- Standard_EXPORT
- GEOMAlgo_BuilderArea();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_BuilderArea();
- //! Collect the edges/faces that <br>
- //! a) are internal <br>
- //! b) are the same and have different orientation <br>
-
- Standard_EXPORT
- virtual void PerformShapesToAvoid() ;
-
- //! Build draft faces/shells <br>
- //! a)myLoops - draft faces/shells that consist of <br>
- //! boundary edges/faces <br>
- //! b)myLoopsInternal - draft faces/shells that contains <br>
- //! inner edges/faces <br>
- Standard_EXPORT
- virtual void PerformLoops() ;
- //! Build draft faces/solids that contains boundary faces <br>
-
- Standard_EXPORT
- virtual void PerformAreas() ;
-
- //! Build finalized faces/solids with internal wires/shells <br>
- Standard_EXPORT
- virtual void PerformInternalShapes() ;
-
- TopTools_ListOfShape myShapes;
- TopTools_ListOfShape myLoops;
- TopTools_ListOfShape myLoopsInternal;
- TopTools_MapOfOrientedShape myShapesToAvoid;
- TopTools_ListOfShape myAreas;
- Handle_IntTools_Context myContext;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BuilderFace.cxx
-// Created:
-// Author: Peter KURNEV
-//
-#include <GEOMAlgo_BuilderFace.hxx>
-
-#include <gp_Pnt2d.hxx>
-#include <gp_Pln.hxx>
-#include <gp_Vec.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Pnt.hxx>
-
-#include <Geom_Surface.hxx>
-
-#include <TopAbs.hxx>
-#include <TopLoc_Location.hxx>
-
-#include <TopoDS_Iterator.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Wire.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Vertex.hxx>
-
-#include <BRep_Builder.hxx>
-#include <BRep_Tool.hxx>
-#include <BRepTools.hxx>
-
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
-#include <TopTools_MapOfOrientedShape.hxx>
-#include <TopTools_MapIteratorOfMapOfOrientedShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_DataMapOfShapeShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_DataMapOfShapeListOfShape.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
-
-#include <IntTools_FClass2d.hxx>
-#include <IntTools_Context.hxx>
-
-#include <BOPTools_Tools2D.hxx>
-#include <BOP_WireEdgeSet.hxx>
-#include <BOP_WESCorrector.hxx>
-
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#include <NMTTools_CoupleOfShape.hxx>
-#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-
-#include <GEOMAlgo_Tools3D.hxx>
-#include <GEOMAlgo_BuilderTools.hxx>
-#include <GEOMAlgo_WireEdgeSet.hxx>
-#include <GEOMAlgo_WESCorrector.hxx>
-
-//
-static
- Standard_Boolean IsGrowthWire(const TopoDS_Shape& ,
-
- const TopTools_IndexedMapOfShape& );
-
-static
- Standard_Boolean IsInside(const TopoDS_Shape& ,
- const TopoDS_Shape& ,
- const Handle(IntTools_Context)& );
-static
- void MakeInternalWires(const TopTools_MapOfShape& ,
- TopTools_ListOfShape& );
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- GEOMAlgo_BuilderFace::GEOMAlgo_BuilderFace()
-:
- GEOMAlgo_BuilderArea()
-{
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
- GEOMAlgo_BuilderFace::~GEOMAlgo_BuilderFace()
-{
-}
-//=======================================================================
-//function : SetFace
-//purpose :
-//=======================================================================
- void GEOMAlgo_BuilderFace::SetFace(const TopoDS_Face& theFace)
-{
- myFace=theFace;
-}
-//=======================================================================
-//function : Face
-//purpose :
-//=======================================================================
- const TopoDS_Face& GEOMAlgo_BuilderFace::Face()const
-{
- return myFace;
-}
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
- void GEOMAlgo_BuilderFace::Perform()
-{
- myErrorStatus=0;
- //
- if (myFace.IsNull()) {
- myErrorStatus=12;// Null face generix
- return;
- }
- // Initialize the context
- GEOMAlgo_BuilderArea::Perform();
- //
- PerformShapesToAvoid();
- if (myErrorStatus) {
- return;
- }
- //
- PerformLoops();
- if (myErrorStatus) {
- return;
- }
- //
- PerformAreas();
- if (myErrorStatus) {
- return;
- }
- //
- PerformInternalShapes();
- if (myErrorStatus) {
- return;
- }
-}
-//=======================================================================
-//function :PerformShapesToAvoid
-//purpose :
-//=======================================================================
- void GEOMAlgo_BuilderFace::PerformShapesToAvoid()
-{
- Standard_Boolean bFound;
- Standard_Integer i, iCnt, aNbV, aNbE;
- TopTools_IndexedDataMapOfShapeListOfShape aMVE;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- myShapesToAvoid.Clear();
- //
- iCnt=0;
- while (1) {
- ++iCnt;
- bFound=Standard_False;
- //
- // 1. MEF
- aMVE.Clear();
- aIt.Initialize (myShapes);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aE=aIt.Value();
- if (!myShapesToAvoid.Contains(aE)) {
- TopExp::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
- }
-// else {
-// int a=0;
-// }
- }
- aNbV=aMVE.Extent();
- //
- // 2. myEdgesToAvoid
- for (i=1; i<=aNbV; ++i) {
- const TopoDS_Vertex& aV=TopoDS::Vertex(aMVE.FindKey(i));
- //
- TopTools_ListOfShape& aLE=aMVE.ChangeFromKey(aV);
- aNbE=aLE.Extent();
- if (!aNbE) {
- continue;
- }
- //
- const TopoDS_Edge& aE1=TopoDS::Edge(aLE.First());
- if (aNbE==1) {
- if (BRep_Tool::Degenerated(aE1)) {
- continue;
- }
- if (aV.Orientation()==TopAbs_INTERNAL) {
- continue;
- }
- bFound=Standard_True;
- myShapesToAvoid.Add(aE1);
- }
- else if (aNbE==2) {
- const TopoDS_Edge& aE2=TopoDS::Edge(aLE.Last());
- if (aE2.IsSame(aE1)) {
- TopoDS_Vertex aV1x, aV2x;
- //
- TopExp::Vertices(aE1, aV1x, aV2x);
- if (aV1x.IsSame(aV2x)) {
- continue;
- }
- bFound=Standard_True;
- myShapesToAvoid.Add(aE1);
- myShapesToAvoid.Add(aE2);
- }
- }
- }// for (i=1; i<=aNbE; ++i) {
- //
- if (!bFound) {
- break;
- }
- //
- }//while (1)
- //printf(" EdgesToAvoid=%d, iCnt=%d\n", EdgesToAvoid.Extent(), iCnt);
-}
-//=======================================================================
-//function : PerformLoops
-//purpose :
-//=======================================================================
- void GEOMAlgo_BuilderFace::PerformLoops()
-{
- myErrorStatus=0;
- //
- Standard_Boolean bFlag;
- Standard_Integer aNbEA;
- TopTools_ListIteratorOfListOfShape aIt;
- TopTools_MapIteratorOfMapOfOrientedShape aItM;
- TopTools_IndexedDataMapOfShapeListOfShape aVEMap;
- TopTools_MapOfOrientedShape aMAdded;
- TopoDS_Iterator aItW;
- BRep_Builder aBB;
- GEOMAlgo_WireEdgeSet aWES;
- GEOMAlgo_WESCorrector aWESCor;
- //
- // 1. Usual Wires
- myLoops.Clear();
- aWES.SetFace(myFace);
- //
- aIt.Initialize (myShapes);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aE=aIt.Value();
- if (!myShapesToAvoid.Contains(aE)) {
- aWES.AddStartElement(aE);
- }
- }
- //
- aWESCor.SetWES(aWES);
- aWESCor.Perform();
- //
- GEOMAlgo_WireEdgeSet& aWESN=aWESCor.NewWES();
- const TopTools_ListOfShape& aLW=aWESN.Shapes();
- //
- aIt.Initialize (aLW);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aW=aIt.Value();
- myLoops.Append(aW);
- }
- //modified by NIZNHY-PKV Tue Aug 5 15:09:29 2008f
- // Post Treatment
- TopTools_MapOfOrientedShape aMEP;
- //
- // a. collect all edges that are in loops
- aIt.Initialize (myLoops);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aW=aIt.Value();
- aItW.Initialize(aW);
- for (; aItW.More(); aItW.Next()) {
- const TopoDS_Shape& aE=aItW.Value();
- aMEP.Add(aE);
- }
- }
- //
- // b. collect all edges that are to avoid
- aItM.Initialize(myShapesToAvoid);
- for (; aItM.More(); aItM.Next()) {
- const TopoDS_Shape& aE=aItM.Key();
- aMEP.Add(aE);
- }
- //
- // c. add all edges that are not processed to myShapesToAvoid
- aIt.Initialize (myShapes);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aE=aIt.Value();
- if (!aMEP.Contains(aE)) {
- myShapesToAvoid.Add(aE);
- }
- }
- //modified by NIZNHY-PKV Tue Aug 5 15:09:35 2008t
- //
- // 2. Internal Wires
- myLoopsInternal.Clear();
- //
- aNbEA=myShapesToAvoid.Extent();
- aItM.Initialize(myShapesToAvoid);
- for (; aItM.More(); aItM.Next()) {
- const TopoDS_Shape& aEE=aItM.Key();
- TopExp::MapShapesAndAncestors(aEE, TopAbs_VERTEX, TopAbs_EDGE, aVEMap);
- }
- //
- bFlag=Standard_True;
- aItM.Initialize(myShapesToAvoid);
- for (; aItM.More()&&bFlag; aItM.Next()) {
- const TopoDS_Shape& aEE=aItM.Key();
- if (!aMAdded.Add(aEE)) {
- continue;
- }
- //
- // make new wire
- TopoDS_Wire aW;
- aBB.MakeWire(aW);
- aBB.Add(aW, aEE);
- //
- aItW.Initialize(aW);
- for (; aItW.More()&&bFlag; aItW.Next()) {
- const TopoDS_Edge& aE=TopoDS::Edge(aItW.Value());
- //
- TopoDS_Iterator aItE(aE);
- for (; aItE.More()&&bFlag; aItE.Next()) {
- const TopoDS_Vertex& aV = TopoDS::Vertex(aItE.Value());
- const TopTools_ListOfShape& aLE=aVEMap.FindFromKey(aV);
- aIt.Initialize(aLE);
- for (; aIt.More()&&bFlag; aIt.Next()) {
- const TopoDS_Shape& aEx=aIt.Value();
- if (aMAdded.Add(aEx)) {
- aBB.Add(aW, aEx);
- if(aMAdded.Extent()==aNbEA) {
- bFlag=!bFlag;
- }
- }
- }//for (; aIt.More(); aIt.Next()) {
- }//for (; aItE.More(); aItE.Next()) {
- }//for (; aItW.More(); aItW.Next()) {
- myLoopsInternal.Append(aW);
- }//for (; aItM.More(); aItM.Next()) {
-}
-//=======================================================================
-//function : PerformAreas
-//purpose :
-//=======================================================================
- void GEOMAlgo_BuilderFace::PerformAreas()
-{
- myErrorStatus=0;
- //
- Standard_Boolean bIsGrowth, bIsHole;
- Standard_Real aTol;
- TopTools_ListOfShape aNewFaces, aHoleWires;
- TopoDS_Shape anInfinitePointShape;
- TopTools_DataMapOfShapeShape aInOutMap;
- TopTools_DataMapOfShapeListOfShape aMSH;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItMSH;
- TopTools_ListIteratorOfListOfShape aIt1, aIt2;
- TopTools_IndexedMapOfShape aMHE;
- BRep_Builder aBB;
- Handle(Geom_Surface) aS;
- TopLoc_Location aLoc;
- //
- aTol=BRep_Tool::Tolerance(myFace);
- aS=BRep_Tool::Surface(myFace, aLoc);
- //
- myAreas.Clear();
- //
- // Draft faces [aNewFaces]
- aIt1.Initialize(myLoops);
- for ( ; aIt1.More(); aIt1.Next()) {
- const TopoDS_Shape& aWire=aIt1.Value();
- //
- bIsGrowth=IsGrowthWire(aWire, aMHE);
- if (bIsGrowth) {
- // make a growth face from a wire
- TopoDS_Face aFace;
- aBB.MakeFace(aFace, aS, aLoc, aTol);
- aBB.Add (aFace, aWire);
- //
- aNewFaces.Append (aFace);
- }
- else{
- // check if a wire is a hole
- //XX
- //bIsHole=IsHole(aWire, myFace, myContext);
- bIsHole=GEOMAlgo_BuilderTools::IsHole(aWire, myFace);
- //XX
- if (bIsHole) {
- aHoleWires.Append(aWire);
- TopExp::MapShapes(aWire, TopAbs_EDGE, aMHE);
- }
- else {
- // make a growth face from a wire
- TopoDS_Face aFace;
- aBB.MakeFace(aFace, aS, aLoc, aTol);
- aBB.Add (aFace, aWire);
- //
- aNewFaces.Append (aFace);
- }
- }
- }
- //
- // 2. Find outer growth shell that is most close to each hole shell
- aIt2.Initialize(aHoleWires);
- for (; aIt2.More(); aIt2.Next()) {
- const TopoDS_Shape& aHole = aIt2.Value();
- //
- aIt1.Initialize(aNewFaces);
- for ( ; aIt1.More(); aIt1.Next()) {
- const TopoDS_Shape& aF=aIt1.Value();
- //
- if (!IsInside(aHole, aF, myContext)){
- continue;
- }
- //
- if ( aInOutMap.IsBound (aHole)){
- const TopoDS_Shape& aF2=aInOutMap(aHole);
- if (IsInside(aF, aF2, myContext)) {
- aInOutMap.UnBind(aHole);
- aInOutMap.Bind (aHole, aF);
- }
- }
- else{
- aInOutMap.Bind (aHole, aF);
- }
- }
- //
- // Add aHole to a map Face/ListOfHoles [aMSH]
- if (aInOutMap.IsBound(aHole)){
- const TopoDS_Shape& aF=aInOutMap(aHole);
- if (aMSH.IsBound(aF)) {
- TopTools_ListOfShape& aLH=aMSH.ChangeFind(aF);
- aLH.Append(aHole);
- }
- else {
- TopTools_ListOfShape aLH;
- aLH.Append(aHole);
- aMSH.Bind(aF, aLH);
- }
- }
- }// for (; aIt2.More(); aIt2.Next())
- //
- // 3. Add aHoles to Faces
- aItMSH.Initialize(aMSH);
- for (; aItMSH.More(); aItMSH.Next()) {
- TopoDS_Face aF=TopoDS::Face(aItMSH.Key());
- //
- const TopTools_ListOfShape& aLH=aItMSH.Value();
- aIt2.Initialize(aLH);
- for (; aIt2.More(); aIt2.Next()) {
- const TopoDS_Shape& aHole = aIt2.Value();
- aBB.Add (aF, aHole);
- }
- //
- // update classifier
- aTol=BRep_Tool::Tolerance(aF);
- IntTools_FClass2d& aClsf=myContext->FClass2d(aF);
- aClsf.Init(aF, aTol);
- }
- //
- // These aNewFaces are draft faces that
- // do not contain any internal shapes
- //
- myAreas.Append(aNewFaces);
-}
-//=======================================================================
-//function : PerformInternalShapes
-//purpose :
-//=======================================================================
- void GEOMAlgo_BuilderFace::PerformInternalShapes()
-{
- myErrorStatus=0;
- //
- Standard_Integer aNbWI=myLoopsInternal.Extent();
- if (!aNbWI) {// nothing to do
- return;
- }
- //
- //Standard_Real aTol;
- BRep_Builder aBB;
- TopTools_ListIteratorOfListOfShape aIt1, aIt2;
- TopoDS_Iterator aIt;
- TopTools_MapOfShape aME, aMEP;
- TopTools_MapIteratorOfMapOfShape aItME;
- TopTools_IndexedDataMapOfShapeListOfShape aMVE;
- TopTools_ListOfShape aLSI;
- //
- // 1. All internal edges
- aIt1.Initialize(myLoopsInternal);
- for (; aIt1.More(); aIt1.Next()) {
- const TopoDS_Shape& aWire=aIt1.Value();
- aIt.Initialize(aWire);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aE=aIt.Value();
- aME.Add(aE);
- }
- }
- aNbWI=aME.Extent();
- //
- // 2 Process faces
- aIt2.Initialize(myAreas);
- for ( ; aIt2.More(); aIt2.Next()) {
- TopoDS_Face& aF=TopoDS::Face(aIt2.Value());
- //
- aMVE.Clear();
- TopExp::MapShapesAndAncestors(aF, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
- //
- // 2.1 Separate faces to process aMEP
- aMEP.Clear();
- aItME.Initialize(aME);
- for (; aItME.More(); aItME.Next()) {
- const TopoDS_Edge& aE=TopoDS::Edge(aItME.Key());
- if (IsInside(aE, aF, myContext)) {
- aMEP.Add(aE);
- }
- }
- //
- // 2.2 Make Internal Wires
- aLSI.Clear();
- MakeInternalWires(aMEP, aLSI);
- //
- // 2.3 Add them to aF
- aIt1.Initialize(aLSI);
- for (; aIt1.More(); aIt1.Next()) {
- const TopoDS_Shape& aSI=aIt1.Value();
- aBB.Add (aF, aSI);
- }
- //
- // 2.4 Remove faces aMFP from aMF
- aItME.Initialize(aMEP);
- for (; aItME.More(); aItME.Next()) {
- const TopoDS_Shape& aE=aItME.Key();
- aME.Remove(aE);
- }
- //
- aNbWI=aME.Extent();
- if (!aNbWI) {
- break;
- }
- } //for ( ; aIt2.More(); aIt2.Next()) {
-}
-//=======================================================================
-//function : MakeInternalWires
-//purpose :
-//=======================================================================
-void MakeInternalWires(const TopTools_MapOfShape& theME,
- TopTools_ListOfShape& theWires)
-{
- TopTools_MapIteratorOfMapOfShape aItM;
- TopTools_MapOfShape aAddedMap;
- TopTools_ListIteratorOfListOfShape aItE;
- TopTools_IndexedDataMapOfShapeListOfShape aMVE;
- BRep_Builder aBB;
- //
- aItM.Initialize(theME);
- for (; aItM.More(); aItM.Next()) {
- const TopoDS_Shape& aE=aItM.Key();
- TopExp::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
- }
- //
- aItM.Initialize(theME);
- for (; aItM.More(); aItM.Next()) {
- TopoDS_Shape aEE=aItM.Key();
- if (!aAddedMap.Add(aEE)) {
- continue;
- }
- //
- // make a new shell
- TopoDS_Wire aW;
- aBB.MakeWire(aW);
- aEE.Orientation(TopAbs_INTERNAL);
- aBB.Add(aW, aEE);
- //
- TopoDS_Iterator aItAdded (aW);
- for (; aItAdded.More(); aItAdded.Next()) {
- const TopoDS_Shape& aE =aItAdded.Value();
- //
- TopExp_Explorer aExp(aE, TopAbs_VERTEX);
- for (; aExp.More(); aExp.Next()) {
- const TopoDS_Shape& aV =aExp.Current();
- const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV);
- aItE.Initialize(aLE);
- for (; aItE.More(); aItE.Next()) {
- TopoDS_Shape aEL=aItE.Value();
- if (aAddedMap.Add(aEL)){
- aEL.Orientation(TopAbs_INTERNAL);
- aBB.Add(aW, aEL);
- }
- }
- }
- }
- theWires.Append(aW);
- }
-}
-//=======================================================================
-//function : IsInside
-//purpose :
-//=======================================================================
-Standard_Boolean IsInside(const TopoDS_Shape& theHole,
- const TopoDS_Shape& theF2,
- const Handle(IntTools_Context)& theContext)
-{
- Standard_Boolean bRet;
- Standard_Real aT, aU, aV;
-
- TopAbs_State aState;
- TopExp_Explorer aExp;
- TopTools_IndexedMapOfShape aME2;
- gp_Pnt2d aP2D;
- //
- bRet=Standard_False;
- aState=TopAbs_UNKNOWN;
- const TopoDS_Face& aF2=TopoDS::Face(theF2);
- //
- TopExp::MapShapes(aF2, TopAbs_EDGE, aME2);
- //
- aExp.Init(theHole, TopAbs_EDGE);
- if (aExp.More()) {
- const TopoDS_Edge& aE = TopoDS::Edge(aExp.Current());
- if (aME2.Contains(aE)) {
- return bRet;
- }
- //
- aT=BOPTools_Tools2D::IntermediatePoint(aE);
- BOPTools_Tools2D::PointOnSurface(aE, aF2, aT, aU, aV);
- aP2D.SetCoord(aU, aV);
- //
- IntTools_FClass2d& aClsf=theContext->FClass2d(aF2);
- aState=aClsf.Perform(aP2D);
- bRet=(aState==TopAbs_IN);
- }
- //
- return bRet;
-}
-
-//=======================================================================
-//function : IsGrowthWire
-//purpose :
-//=======================================================================
-Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire,
- const TopTools_IndexedMapOfShape& theMHE)
-{
- Standard_Boolean bRet;
- TopoDS_Iterator aIt;
- //
- bRet=Standard_False;
- if (theMHE.Extent()) {
- aIt.Initialize(theWire);
- for(; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aE=aIt.Value();
- if (theMHE.Contains(aE)) {
- return !bRet;
- }
- }
- }
- return bRet;
-}
-
-//BRepTools::Write(aFF, "ff");
-//
-// ErrorStatus :
-// 11 - Null Context
-// 12 - Null face generix
-
-/*
-//=======================================================================
-//function : IsInside
-//purpose :
-//=======================================================================
-Standard_Boolean IsInside(const TopoDS_Shape& theHole,
- const TopoDS_Shape& theF2,
- IntTools_PContext& theContext)
-{
- Standard_Real aT, aU, aV;
- TopExp_Explorer aExp;
- TopAbs_State aState=TopAbs_UNKNOWN;
- gp_Pnt2d aP2D;
- //
- const TopoDS_Face& aF2=TopoDS::Face(theF2);
- //
- aExp.Init(theHole, TopAbs_EDGE);
- if (aExp.More()){
- const TopoDS_Edge& aE = TopoDS::Edge(aExp.Current());
- aT=BOPTools_Tools2D::IntermediatePoint(aE);
- BOPTools_Tools2D::PointOnSurface(aE, aF2, aT, aU, aV);
- aP2D.SetCoord(aU, aV);
- //
- IntTools_FClass2d& aClsf=theContext->FClass2d(aF2);
- aState=aClsf.Perform(aP2D);
- }
- return (aState==TopAbs_IN);
-}
-*/
+++ /dev/null
-
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BuilderFace.hxx
-// Created:
-// Author: Peter KURNEV
-//
-#ifndef _GEOMAlgo_BuilderFace_HeaderFile
-#define _GEOMAlgo_BuilderFace_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <TopoDS_Face.hxx>
-#include <GEOMAlgo_BuilderArea.hxx>
-
-//! The algorithm to build faces from set of edges <br>
-//=======================================================================
-//class : GEOMAlgo_BuilderFace
-//purpose :
-//=======================================================================
-class GEOMAlgo_BuilderFace : public GEOMAlgo_BuilderArea
-{
- public:
-
- //! Empty constructor <br>
- Standard_EXPORT
- GEOMAlgo_BuilderFace();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_BuilderFace();
-
- //! Sets the face generatix <br>
- Standard_EXPORT
- void SetFace(const TopoDS_Face& theFace) ;
-
- //! Returns the face generatix <br>
- Standard_EXPORT
- const TopoDS_Face& Face() const;
-
- //! Performs the algorithm <br>
- Standard_EXPORT
- virtual void Perform() ;
-
- protected:
- //! Collect the edges that <br>
- //! a) are internal <br>
- //! b) are the same and have different orientation <br>
- Standard_EXPORT
- virtual void PerformShapesToAvoid() ;
-
- //! Build draft wires <br>
- //! a)myLoops - draft wires that consist of <br>
- //! boundary edges <br>
- //! b)myLoopsInternal - draft wires that contains <br>
- //! inner edges <br>
- Standard_EXPORT
- virtual void PerformLoops() ;
-
- //! Build draft faces that contains boundary edges <br>
- Standard_EXPORT
- virtual void PerformAreas() ;
-
- //! Build finalized faces with internals <br>
- Standard_EXPORT
- virtual void PerformInternalShapes() ;
-
-
- TopoDS_Face myFace;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BuilderShape.cxx
-// Created:
-// Author: Peter KURNEV
-//
-#include <GEOMAlgo_BuilderShape.hxx>
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- GEOMAlgo_BuilderShape::GEOMAlgo_BuilderShape()
-:
- GEOMAlgo_Algo()
-{
- myHasDeleted=Standard_False;
- myHasGenerated=Standard_False;
- myHasModified=Standard_False;
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
- GEOMAlgo_BuilderShape::~GEOMAlgo_BuilderShape()
-{
-}
-//=======================================================================
-//function : Shape
-//purpose :
-//=======================================================================
- const TopoDS_Shape& GEOMAlgo_BuilderShape::Shape() const
-{
- return myShape;
-}
-//
-//=======================================================================
-//function : Generated
-//purpose :
-//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Generated(const TopoDS_Shape& )
-{
- myHistShapes.Clear();
- return myHistShapes;
-}
-//=======================================================================
-//function : Modified
-//purpose :
-//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Modified(const TopoDS_Shape& )
-{
- myHistShapes.Clear();
- return myHistShapes;
-}
-//=======================================================================
-//function : IsDeleted
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_BuilderShape::IsDeleted(const TopoDS_Shape& theS)
-{
- Standard_Boolean bRet;
- //
- bRet=!myMapShape.Contains(theS);
- return bRet;
-}
-//=======================================================================
-//function : HasDeleted
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_BuilderShape::HasDeleted()const
-{
- return myHasDeleted;
-}
-//=======================================================================
-//function : HasGenerated
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_BuilderShape::HasGenerated()const
-{
- return myHasGenerated;
-}
-//=======================================================================
-//function : HasModified
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_BuilderShape::HasModified()const
-{
- return myHasModified;
-}
-//=======================================================================
-//function : PrepareHistory
-//purpose :
-//=======================================================================
- void GEOMAlgo_BuilderShape::PrepareHistory()
-{
- myHistShapes.Clear();
- myMapShape.Clear();
- myHasDeleted=Standard_False;
- myHasGenerated=Standard_False;
- myHasModified=Standard_False;
- //modified by NIZNHY-PKV Thu Dec 7 11:14:15 2006
- myImagesResult.Clear();
- //modified by NIZNHY-PKV Thu Dec 7 11:14:17 2006t
-}
-//modified by NIZNHY-PKV Thu Dec 7 11:57:00 2006f
-//=======================================================================
-//function : ImagesResult
-//purpose :
-//=======================================================================
- const TopTools_IndexedDataMapOfShapeListOfShape& GEOMAlgo_BuilderShape::ImagesResult()const
-{
- return myImagesResult;
-}
-//modified by NIZNHY-PKV Thu Dec 7 11:57:04 2006t
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BuilderShape.hxx
-// Created:
-// Author: Peter KURNEV
-//
-#ifndef _GEOMAlgo_BuilderShape_HeaderFile
-#define _GEOMAlgo_BuilderShape_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <Standard_Boolean.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <GEOMAlgo_Algo.hxx>
-
-
-//! Root class for algorithms that has shape as result <br>
-//=======================================================================
-//class : GEOMAlgo_BuilderShape
-//purpose :
-//=======================================================================
-class GEOMAlgo_BuilderShape : public GEOMAlgo_Algo
-{
- public:
- //! Returns the result of algorithm <br>
- Standard_EXPORT
- const TopoDS_Shape& Shape() const;
-
- //! Returns the list of shapes generated from the <br>
- //! shape theS. <br>
- Standard_EXPORT
- virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
-
- //! Returns the list of shapes modified from the <br>
- //! shape theS. <br>
- Standard_EXPORT
- virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
-
- //! Returns true if the shape theS has been deleted. <br>
- Standard_EXPORT
- virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
-
- //! Returns true if the at least one shape(or sub-shape) <br>
- //! of arguments has been deleted. <br>
- Standard_EXPORT
- Standard_Boolean HasDeleted() const;
-
- //! Returns true if the at least one shape(or sub-shape) <br>
- //! of arguments has generated shapes. <br>
- Standard_EXPORT
- Standard_Boolean HasGenerated() const;
-
- //! Returns true if the at least one shape(or sub-shape) <br>
- //! of arguments has modified shapes. <br>
- Standard_EXPORT
- Standard_Boolean HasModified() const;
-
- Standard_EXPORT
- const TopTools_IndexedDataMapOfShapeListOfShape& ImagesResult() const;
-
-protected:
- //! Empty constructor <br>
- Standard_EXPORT
- GEOMAlgo_BuilderShape();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_BuilderShape();
-
- //! Prepare information for history support <br>
- Standard_EXPORT
- virtual void PrepareHistory() ;
-
-
- TopoDS_Shape myShape;
- TopTools_ListOfShape myHistShapes;
- TopTools_MapOfShape myMapShape;
- Standard_Boolean myHasDeleted;
- Standard_Boolean myHasGenerated;
- Standard_Boolean myHasModified;
- TopTools_IndexedDataMapOfShapeListOfShape myImagesResult;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BuilderSolid.cxx
-// Created:
-// Author: Peter KURNEV
-//
-#include <GEOMAlgo_BuilderSolid.hxx>
-
-#include <gp_Pnt2d.hxx>
-#include <gp_Pln.hxx>
-#include <gp_Vec.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Pnt.hxx>
-
-#include <Geom_Curve.hxx>
-#include <Geom_Surface.hxx>
-#include <Geom2d_Curve.hxx>
-
-#include <TopAbs.hxx>
-
-#include <TopoDS_Iterator.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Shell.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Solid.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Compound.hxx>
-
-#include <BRep_Builder.hxx>
-#include <BRep_Tool.hxx>
-#include <BRepTools.hxx>
-#include <BRepClass3d_SolidClassifier.hxx>
-
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
-#include <TopTools_MapOfOrientedShape.hxx>
-#include <TopTools_MapIteratorOfMapOfOrientedShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_DataMapOfShapeShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_DataMapOfShapeListOfShape.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
-
-#include <IntTools_Context.hxx>
-
-#include <BOPTools_Tools2D.hxx>
-#include <BOPTools_Tools3D.hxx>
-
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#include <NMTTools_CoupleOfShape.hxx>
-#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-
-#include <GEOMAlgo_Tools3D.hxx>
-#include <GEOMAlgo_BuilderTools.hxx>
-
-//
-static
- Standard_Boolean IsGrowthShell(const TopoDS_Shape& ,
- const TopTools_IndexedMapOfShape& );
-static
- Standard_Boolean IsHole(const TopoDS_Shape& ,
- const Handle(IntTools_Context)& );
-static
- Standard_Boolean IsInside(const TopoDS_Shape& ,
- const TopoDS_Shape& ,
- const Handle(IntTools_Context)& );
-static
- void MakeInternalShells(const TopTools_MapOfShape& ,
- TopTools_ListOfShape& );
-
-static
- Standard_Boolean IsClosedShell(const TopoDS_Shell& );
-
-static
- Standard_Boolean RefineShell(const TopoDS_Shell& ,
- TopoDS_Shell& );
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-GEOMAlgo_BuilderSolid::GEOMAlgo_BuilderSolid()
-:
- GEOMAlgo_BuilderArea()
-{
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-GEOMAlgo_BuilderSolid::~GEOMAlgo_BuilderSolid()
-{
-}
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
-void GEOMAlgo_BuilderSolid::Perform()
-{
- myErrorStatus=0;
- //
- // Initialize the context
- GEOMAlgo_BuilderArea::Perform();
- //
- TopoDS_Compound aC;
- BRep_Builder aBB;
- TopTools_ListIteratorOfListOfShape aIt;
-
- aBB.MakeCompound(aC);
- aIt.Initialize(myShapes);
- for(; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aF=aIt.Value();
- aBB.Add(aC, aF);
- }
- //
- PerformShapesToAvoid();
- if (myErrorStatus) {
- return;
- }
- //
- PerformLoops();
- if (myErrorStatus) {
- return;
- }
- PerformAreas();
- if (myErrorStatus) {
- return;
- }
- if (myComputeInternalShapes) {
- PerformInternalShapes();
- if (myErrorStatus) {
- return;
- }
- }
-}
-//=======================================================================
-//function :PerformShapesToAvoid
-//purpose :
-//=======================================================================
-void GEOMAlgo_BuilderSolid::PerformShapesToAvoid()
-{
- Standard_Boolean bFound;
- Standard_Integer i, iCnt, aNbE, aNbF;
- TopAbs_Orientation aOrE;
- TopTools_IndexedDataMapOfShapeListOfShape aMEF;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- myShapesToAvoid.Clear();
- //
- iCnt=0;
- while (1) {
- ++iCnt;
- bFound=Standard_False;
- //
- // 1. MEF
- aMEF.Clear();
- aIt.Initialize (myShapes);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aF=aIt.Value();
- if (!myShapesToAvoid.Contains(aF)) {
- TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF);
- }
- /*
- else {
- int a=0;
- }
- */
- }
- aNbE=aMEF.Extent();
- //
- // 2. myFacesToAvoid
- for (i=1; i<=aNbE; ++i) {
- const TopoDS_Edge& aE=*((TopoDS_Edge*)(&aMEF.FindKey(i)));
- if (BRep_Tool::Degenerated(aE)) {
- continue;
- }
- //
- TopTools_ListOfShape& aLF=aMEF.ChangeFromKey(aE);
- //
- aNbF=aLF.Extent();
- if (!aNbF) {
- continue;
- }
- //
- aOrE=aE.Orientation();
- //
- const TopoDS_Face& aF1=*((TopoDS_Face*)(&aLF.First()));
- if (aNbF==1) {
- if (aOrE==TopAbs_INTERNAL) {
- continue;
- }
- bFound=Standard_True;
- myShapesToAvoid.Add(aF1);
- }
- else if (aNbF==2) {
- const TopoDS_Face& aF2=*((TopoDS_Face*)(&aLF.Last()));
- if (aF2.IsSame(aF1)) {
- if (BRep_Tool::IsClosed(aE, aF1)) {
- continue;
- }
- //
- if (aOrE==TopAbs_INTERNAL) {
- continue;
- }
- //
- bFound=Standard_True;
- myShapesToAvoid.Add(aF1);
- myShapesToAvoid.Add(aF2);
- }
- }
- /*//DEB
- else {
- TopTools_ListIteratorOfListOfShape aItLF;
- //
- aItLF.Initialize (aLF);
- for (; aItLF.More(); aItLF.Next()) {
- const TopoDS_Shape& aFx=aItLF.Value();
- int a=0;
- }
- }
- *///DEB
- }// for (i=1; i<=aNbE; ++i) {
- //
- if (!bFound) {
- break;
- }
- //
- }//while (1)
-}
-//=======================================================================
-//function : PerformLoops
-//purpose :
-//=======================================================================
-void GEOMAlgo_BuilderSolid::PerformLoops()
-{
- myErrorStatus=0;
- //
- myLoops.Clear();
- //
- Standard_Integer aNbLF, aNbOff, aNbFP;
- TopAbs_Orientation anOr;
- TopoDS_Edge aEL;
- BRep_Builder aBB;
- NMTTools_CoupleOfShape aCSOff;
- TopTools_MapOfOrientedShape AddedFacesMap;
- TopTools_IndexedDataMapOfShapeListOfShape aEFMap, aMEFP;
- TopTools_ListIteratorOfListOfShape aItF, aIt;
- TopTools_MapIteratorOfMapOfOrientedShape aItM;
- TopoDS_Iterator aItS;
- //
- //=================================================
- //
- // 1. Shells Usual
- //
- aItF.Initialize (myShapes);
- for (; aItF.More(); aItF.Next()) {
- const TopoDS_Shape& aFF = aItF.Value();
- TopExp::MapShapesAndAncestors(aFF, TopAbs_EDGE, TopAbs_FACE, aEFMap);
- }
- //
- aItF.Initialize (myShapes);
- for (; aItF.More(); aItF.Next()) {
- const TopoDS_Shape& aFF = aItF.Value();
- if (myShapesToAvoid.Contains(aFF)) {
- continue;
- }
- if (!AddedFacesMap.Add(aFF)) {
- continue;
- }
- //
- // make a new shell
- TopoDS_Shell aShell;
- aBB.MakeShell(aShell);
- aBB.Add(aShell, aFF);
- //
- aMEFP.Clear();
- TopExp::MapShapesAndAncestors(aFF, TopAbs_EDGE, TopAbs_FACE, aMEFP);
- //
- // loop on faces added to Shell; add their neighbor faces to Shell and so on
- TopoDS_Iterator aItAddedF (aShell);
- for (; aItAddedF.More(); aItAddedF.Next()) {
- const TopoDS_Face& aF = *((TopoDS_Face*)(&aItAddedF.Value()));
- //
- // loop on edges of aF; find a good neighbor face of aF by aE
- TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE);
- for (; aEdgeExp.More(); aEdgeExp.Next()) {
- const TopoDS_Edge& aE=*((TopoDS_Edge*)(&aEdgeExp.Current()));
- //
- //1
- if (aMEFP.Contains(aE)) {
- const TopTools_ListOfShape& aLFP=aMEFP.FindFromKey(aE);
- aNbFP=aLFP.Extent();
- if (aNbFP>1) {
- continue;
- }
- }
- //2
- anOr=aE.Orientation();
- if (anOr==TopAbs_INTERNAL) {
- continue;
- }
- //3
- if (BRep_Tool::Degenerated(aE)) {
- continue;
- }
- //
- // candidate faces list
- const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE);
- aNbLF=aLF.Extent();
- if (!aNbLF) {
- continue;
- }
- //
- // try to select one of neighbors
- // check if a face already added to Shell shares E
- Standard_Boolean bFound;
- TopTools_ListIteratorOfListOfShape aItLF;
- NMTTools_ListOfCoupleOfShape aLCSOff;
- //
- aItLF.Initialize(aLF);
- for (; aItLF.More(); aItLF.Next()) {
- const TopoDS_Face& aFL=*((TopoDS_Face*)(&aItLF.Value()));
- if (myShapesToAvoid.Contains(aFL)) {
- continue;
- }
- if (aF.IsSame(aFL)) {
- continue;
- }
- if (AddedFacesMap.Contains(aFL)){
- continue;
- }
- //
- bFound=GEOMAlgo_Tools3D::GetEdgeOff(aE, aFL, aEL);
- if (!bFound) {
- continue;
- }
- //
- aCSOff.SetShape1(aEL);
- aCSOff.SetShape2(aFL);
- aLCSOff.Append(aCSOff);
- }//for (; aItLF.More(); aItLF.Next()) {
- //
- aNbOff=aLCSOff.Extent();
- if (!aNbOff){
- continue;
- }
- //
- TopoDS_Face aSelF;
- if (aNbOff==1) {
- aSelF=*((TopoDS_Face*)(&aLCSOff.First().Shape2()));
- }
- else if (aNbOff>1){
- GEOMAlgo_Tools3D::GetFaceOff(aE, aF, aLCSOff, aSelF);
- }
- //
- if (!aSelF.IsNull() && AddedFacesMap.Add(aSelF)) {
- aBB.Add(aShell, aSelF);
- TopExp::MapShapesAndAncestors(aSelF, TopAbs_EDGE, TopAbs_FACE, aMEFP);
- }
- } // for (; aEdgeExp.More(); aEdgeExp.Next()) {
- } //for (; aItAddedF.More(); aItAddedF.Next()) {
- //
- if (IsClosedShell(aShell)) {
- myLoops.Append(aShell);
- }
- else {
- Standard_Boolean bRefine;
- TopoDS_Shell aShx;
- //
- bRefine=RefineShell(aShell, aShx);
- if (bRefine) {
- myLoops.Append(aShx);
- }
- }
- } // for (; aItF.More(); aItF.Next()) {
- //
- // Post Treatment
- TopTools_MapOfOrientedShape aMP;
- //
- // a. collect all edges that are in loops
- aIt.Initialize (myLoops);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- aItS.Initialize(aS);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aF=aItS.Value();
- aMP.Add(aF);
- }
- }
- //
- // b. collect all faces that are to avoid
- aItM.Initialize(myShapesToAvoid);
- for (; aItM.More(); aItM.Next()) {
- const TopoDS_Shape& aF=aItM.Key();
- aMP.Add(aF);
- }
- //
- // c. add all faces that are not processed to myShapesToAvoid
- aIt.Initialize (myShapes);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aF=aIt.Value();
- if (!aMP.Contains(aF)) {
- myShapesToAvoid.Add(aF);
- }
- }
- //=================================================
- //
- // 2.Internal Shells
- //
- myLoopsInternal.Clear();
- //
- aEFMap.Clear();
- AddedFacesMap.Clear();
- //
- if (myComputeInternalShapes) {
- aItM.Initialize(myShapesToAvoid);
- for (; aItM.More(); aItM.Next()) {
- const TopoDS_Shape& aFF=aItM.Key();
- TopExp::MapShapesAndAncestors(aFF, TopAbs_EDGE, TopAbs_FACE, aEFMap);
- }
- //
- aItM.Initialize(myShapesToAvoid);
- for (; aItM.More(); aItM.Next()) {
- const TopoDS_Shape& aFF=aItM.Key();
- if (!AddedFacesMap.Add(aFF)) {
- continue;
- }
- //
- // make a new shell
- TopoDS_Shell aShell;
- aBB.MakeShell(aShell);
- aBB.Add(aShell, aFF);
- //
- TopoDS_Iterator aItAddedF (aShell);
- for (; aItAddedF.More(); aItAddedF.Next()) {
- const TopoDS_Face& aF = *((TopoDS_Face*)(&aItAddedF.Value()));
- //
- TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE);
- for (; aEdgeExp.More(); aEdgeExp.Next()) {
- const TopoDS_Edge& aE = *((TopoDS_Edge*)(&aEdgeExp.Current()));
- const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE);
- aItF.Initialize(aLF);
- for (; aItF.More(); aItF.Next()) {
- const TopoDS_Face& aFL=*((TopoDS_Face*)(&aItF.Value()));
- if (AddedFacesMap.Add(aFL)){
- aBB.Add(aShell, aFL);
- }
- }
- }
- }
- myLoopsInternal.Append(aShell);
- }
- }
-}
-//=======================================================================
-//function : PerformAreas
-//purpose :
-//=======================================================================
-void GEOMAlgo_BuilderSolid::PerformAreas()
-{
- myErrorStatus=0;
- //
- Standard_Boolean bIsGrowthShell, bIsHole;
- TopTools_ListOfShape aNewSolids, aHoleShells;
- TopoDS_Shape anInfinitePointShape;
- TopTools_DataMapOfShapeShape aInOutMap;
- TopTools_DataMapOfShapeListOfShape aMSH;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItMSH;
- TopTools_ListIteratorOfListOfShape aShellIt, aSolidIt;
- TopTools_IndexedMapOfShape aMHF;
- BRep_Builder aBB;
- //
- myAreas.Clear();
- //
- // Draft solids [aNewSolids]
- aShellIt.Initialize(myLoops);
- for ( ; aShellIt.More(); aShellIt.Next()) {
- const TopoDS_Shape& aShell = aShellIt.Value();
- //
- bIsGrowthShell=IsGrowthShell(aShell, aMHF);
- if (bIsGrowthShell) {
- // make a growth solid from a shell
- TopoDS_Solid Solid;
- aBB.MakeSolid(Solid);
- aBB.Add (Solid, aShell);
- //
- aNewSolids.Append (Solid);
- }
- else{
- // check if a shell is a hole
- bIsHole=IsHole(aShell, myContext);
- //
- if (bIsHole) {
- aHoleShells.Append(aShell);
- TopExp::MapShapes(aShell, TopAbs_FACE, aMHF);
- }
- else {
- // make a growth solid from a shell
- TopoDS_Solid Solid;
- aBB.MakeSolid(Solid);
- aBB.Add (Solid, aShell);
- //
- aNewSolids.Append (Solid);
- }
- }
- }
- //
- // 2. Find outer growth shell that is most close to each hole shell
- aShellIt.Initialize(aHoleShells);
- for (; aShellIt.More(); aShellIt.Next()) {
- const TopoDS_Shape& aHole = aShellIt.Value();
- //
- aSolidIt.Initialize(aNewSolids);
- for ( ; aSolidIt.More(); aSolidIt.Next()) {
- const TopoDS_Shape& aSolid = aSolidIt.Value();
- //
- if (!IsInside(aHole, aSolid, myContext)){
- continue;
- }
- //
- if ( aInOutMap.IsBound (aHole)){
- const TopoDS_Shape& aSolid2 = aInOutMap(aHole);
- if (IsInside(aSolid, aSolid2, myContext)) {
- aInOutMap.UnBind(aHole);
- aInOutMap.Bind (aHole, aSolid);
- }
- }
- else{
- aInOutMap.Bind (aHole, aSolid);
- }
- }
- //
- // Add aHole to a map Solid/ListOfHoles [aMSH]
- if (aInOutMap.IsBound(aHole)){
- const TopoDS_Shape& aSolid=aInOutMap(aHole);
- if (aMSH.IsBound(aSolid)) {
- TopTools_ListOfShape& aLH=aMSH.ChangeFind(aSolid);
- aLH.Append(aHole);
- }
- else {
- TopTools_ListOfShape aLH;
- aLH.Append(aHole);
- aMSH.Bind(aSolid, aLH);
- }
- //aBB.Add (aSolid, aHole);
- }
- }// for (; aShellIt.More(); aShellIt.Next()) {
- //
- // 3. Add aHoles to Solids
- aItMSH.Initialize(aMSH);
- for (; aItMSH.More(); aItMSH.Next()) {
- TopoDS_Solid aSolid=*((TopoDS_Solid*)(&aItMSH.Key()));
- //
- const TopTools_ListOfShape& aLH=aItMSH.Value();
- aShellIt.Initialize(aLH);
- for (; aShellIt.More(); aShellIt.Next()) {
- const TopoDS_Shape& aHole = aShellIt.Value();
- aBB.Add (aSolid, aHole);
- }
- //
- // update classifier
- BRepClass3d_SolidClassifier& aSC=myContext->SolidClassifier(aSolid);
- aSC.Load(aSolid);
- //
- }
- //
- // These aNewSolids are draft solids that
- // do not contain any internal shapes
- //
- myAreas.Append(aNewSolids);
-}
-//=======================================================================
-//function : PerformInternalShapes
-//purpose :
-//=======================================================================
-void GEOMAlgo_BuilderSolid::PerformInternalShapes()
-{
- myErrorStatus=0;
- //
- Standard_Integer aNbFI=myLoopsInternal.Extent();
- if (!aNbFI) {// nothing to do
- return;
- }
- //
- Standard_Integer bFlag;
- BRep_Builder aBB;
- TopTools_ListIteratorOfListOfShape aShellIt, aSolidIt;
- TopoDS_Iterator aIt;
- TopTools_MapOfShape aMF, aMFP, aMFS;
- TopTools_MapIteratorOfMapOfShape aItMF;
- TopTools_IndexedDataMapOfShapeListOfShape aMEF;
- TopTools_ListOfShape aLSI;
- //
- // 1. All internal faces
- aShellIt.Initialize(myLoopsInternal);
- for (; aShellIt.More(); aShellIt.Next()) {
- const TopoDS_Shape& aShell=aShellIt.Value();
- aIt.Initialize(aShell);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aF=aIt.Value();
- aMF.Add(aF);
- }
- }
- aNbFI=aMF.Extent();
- //
- // 2 Process solids
- aSolidIt.Initialize(myAreas);
- for ( ; aSolidIt.More(); aSolidIt.Next()) {
- TopoDS_Solid& aSolid=*((TopoDS_Solid*)(&aSolidIt.Value()));
- //
- //modified by NIZNHY-PKV Wed Mar 07 08:52:18 2012f
- aMFS.Clear();
- {
- TopExp_Explorer aExp(aSolid, TopAbs_FACE);
- while (aExp.More()) {
- aMFS.Add(aExp.Current());
- aExp.Next();
- }
- }
- //modified by NIZNHY-PKV Wed Mar 07 08:52:20 2012t
- aMEF.Clear();
- TopExp::MapShapesAndAncestors(aSolid, TopAbs_EDGE, TopAbs_FACE, aMEF);
- //
- // 2.1 Separate faces to process aMFP
- aMFP.Clear();
- aItMF.Initialize(aMF);
- for (; aItMF.More(); aItMF.Next()) {
- const TopoDS_Face& aF=*((TopoDS_Face*)(&aItMF.Key()));
- //modified by NIZNHY-PKV Wed Mar 07 08:54:56 2012f
- if (!aMFS.Contains(aF)) {
- bFlag=GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext);
- if (bFlag) {
- aMFP.Add(aF);
- }
- }
- //if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext)) {
- // aMFP.Add(aF);
- //}
- //modified by NIZNHY-PKV Wed Mar 07 08:56:07 2012t
- }
- //
- // 2.2 Make Internal Shells
- aLSI.Clear();
- MakeInternalShells(aMFP, aLSI);
- //
- // 2.3 Add them to aSolid
- aShellIt.Initialize(aLSI);
- for (; aShellIt.More(); aShellIt.Next()) {
- const TopoDS_Shape& aSI=aShellIt.Value();
- aBB.Add (aSolid, aSI);
- }
- //
- // 2.4 Remove faces aMFP from aMF
- aItMF.Initialize(aMFP);
- for (; aItMF.More(); aItMF.Next()) {
- const TopoDS_Shape& aF=aItMF.Key();
- aMF.Remove(aF);
- }
- //
- aNbFI=aMF.Extent();
- if (!aNbFI) {
- break;
- }
- } //for ( ; aSolidIt.More(); aSolidIt.Next()) {
-}
-
-//=======================================================================
-//function : MakeInternalShells
-//purpose :
-//=======================================================================
-void MakeInternalShells(const TopTools_MapOfShape& theMF,
- TopTools_ListOfShape& theShells)
-{
- TopTools_MapIteratorOfMapOfShape aItM;
- TopTools_MapOfShape aAddedFacesMap;
- TopTools_ListIteratorOfListOfShape aItF;
- TopTools_IndexedDataMapOfShapeListOfShape aMEF;
- BRep_Builder aBB;
- //
- aItM.Initialize(theMF);
- for (; aItM.More(); aItM.Next()) {
- const TopoDS_Shape& aF=aItM.Key();
- TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF);
- }
- //
- aItM.Initialize(theMF);
- for (; aItM.More(); aItM.Next()) {
- TopoDS_Shape aFF=aItM.Key();
- if (!aAddedFacesMap.Add(aFF)) {
- continue;
- }
- //
- // make a new shell
- TopoDS_Shell aShell;
- aBB.MakeShell(aShell);
- aFF.Orientation(TopAbs_INTERNAL);
- aBB.Add(aShell, aFF);
- //
- TopoDS_Iterator aItAddedF (aShell);
- for (; aItAddedF.More(); aItAddedF.Next()) {
- const TopoDS_Shape& aF =aItAddedF.Value();
- //
- TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE);
- for (; aEdgeExp.More(); aEdgeExp.Next()) {
- const TopoDS_Shape& aE =aEdgeExp.Current();
- const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE);
- aItF.Initialize(aLF);
- for (; aItF.More(); aItF.Next()) {
- TopoDS_Shape aFL=aItF.Value();
- if (aAddedFacesMap.Add(aFL)){
- aFL.Orientation(TopAbs_INTERNAL);
- aBB.Add(aShell, aFL);
- }
- }
- }
- }
- theShells.Append(aShell);
- }
-}
-//=======================================================================
-//function : IsHole
-//purpose :
-//=======================================================================
-Standard_Boolean IsHole(const TopoDS_Shape& theS2,
- const Handle(IntTools_Context)& theContext)
-{
- TopoDS_Solid *pS2=(TopoDS_Solid *)&theS2;
- BRepClass3d_SolidClassifier& aClsf=theContext->SolidClassifier(*pS2);
- //
- aClsf.PerformInfinitePoint(::RealSmall());
- //
- return (aClsf.State()==TopAbs_IN);
-}
-//=======================================================================
-//function : IsInside
-//purpose :
-//=======================================================================
-Standard_Boolean IsInside(const TopoDS_Shape& theS1,
- const TopoDS_Shape& theS2,
- const Handle(IntTools_Context)& theContext)
-{
- TopExp_Explorer aExp;
- TopAbs_State aState;
- //
- TopoDS_Solid *pS2=(TopoDS_Solid *)&theS2;
- //
- aExp.Init(theS1, TopAbs_FACE);
- if (!aExp.More()){
- BRepClass3d_SolidClassifier& aClsf=theContext->SolidClassifier(*pS2);
- aClsf.PerformInfinitePoint(::RealSmall());
- aState=aClsf.State();
- }
- else {
- TopTools_IndexedMapOfShape aBounds;
- const TopoDS_Face& aF = TopoDS::Face(aExp.Current());
- aState=GEOMAlgo_Tools3D::ComputeState(aF, *pS2, 1.e-14, aBounds, theContext);
- }
- return (aState==TopAbs_IN);
-}
-//=======================================================================
-//function : IsGrowthShell
-//purpose :
-//=======================================================================
-Standard_Boolean IsGrowthShell(const TopoDS_Shape& theShell,
- const TopTools_IndexedMapOfShape& theMHF)
-{
- Standard_Boolean bRet;
- TopoDS_Iterator aIt;
- //
- bRet=Standard_False;
- if (theMHF.Extent()) {
- aIt.Initialize(theShell);
- for(; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aF=aIt.Value();
- if (theMHF.Contains(aF)) {
- return !bRet;
- }
- }
- }
- return bRet;
-}
-//=======================================================================
-//function : IsClosedShell
-//purpose :
-//=======================================================================
-Standard_Boolean IsClosedShell(const TopoDS_Shell& theShell)
-{
- Standard_Integer aNbE;
- Standard_Boolean bRet;
- TopoDS_Iterator aIt;
- TopExp_Explorer aExp;
- TopTools_MapOfShape aM;
- //
- bRet=Standard_False;
- aIt.Initialize(theShell);
- for(; aIt.More(); aIt.Next()) {
- const TopoDS_Face& aF=TopoDS::Face(aIt.Value());
- aExp.Init(aF, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- const TopoDS_Edge& aE=*((TopoDS_Edge*)(&aExp.Current()));
- if (BRep_Tool::Degenerated(aE)) {
- continue;
- }
- //
- if (aE.Orientation()==TopAbs_INTERNAL) {
- continue;
- }
- //
- if (!aM.Add(aE)) {
- aM.Remove(aE);
- }
- }
- }
- //
- aNbE=aM.Extent();
- if (!aNbE) {
- bRet=!bRet;
- }
- return bRet;
-}
-//=======================================================================
-//function : RefineShell
-//purpose :
-//=======================================================================
-Standard_Boolean RefineShell(const TopoDS_Shell& aShell,
- TopoDS_Shell& aShx)
-
-{
- Standard_Boolean bRet;
- Standard_Integer i, aNbE, aNbF;
- TopAbs_Orientation aOrE;
- TopTools_IndexedDataMapOfShapeListOfShape aMEF;
- TopTools_MapOfOrientedShape aMFx;
- //
- bRet=Standard_False;
- //
- TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEF);
- aNbE=aMEF.Extent();
- for (i=1; i<=aNbE; ++i) {
- const TopoDS_Edge &aE=*((TopoDS_Edge*)(&aMEF.FindKey(i)));
- //
- if (BRep_Tool::Degenerated(aE)) {
- continue;
- }
- //
- aOrE=aE.Orientation();
- //
- const TopTools_ListOfShape& aLF=aMEF(i);
- aNbF=aLF.Extent();
- if (!aNbF) {
- continue;
- }
- //
- const TopoDS_Face& aF1=*((TopoDS_Face*)(&aLF.First()));
- if (aNbF==1) {
- if (aOrE==TopAbs_INTERNAL) {
- continue;
- }
- aMFx.Add(aF1);
- }
- //
- else if (aNbF==2) {
- const TopoDS_Face& aF2=*((TopoDS_Face*)(&aLF.Last()));
- if (aF2.IsSame(aF1)) {
- if (BRep_Tool::IsClosed(aE, aF1)) {
- continue;
- }
- if (aOrE==TopAbs_INTERNAL) {
- continue;
- }
- aMFx.Add(aF1);
- aMFx.Add(aF2);
- }
- }
- }
- //
- aNbF=aMFx.Extent();
- if (!aNbF) {
- return bRet;
- }
- //
- BRep_Builder aBB;
- TopoDS_Iterator aIt;
- //
- aNbF=0;
- aBB.MakeShell(aShx);
- aIt.Initialize(aShell);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aF=aIt.Value();
- if (!aMFx.Contains(aF)) {
- aBB.Add(aShx, aF);
- ++aNbF;
- }
- }
- //
- if (aNbF) {
- bRet=IsClosedShell(aShx);
- }
- //
- return bRet;
-}
-//
-// ErrorStatus :
-// 11 - Null Context
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BuilderSolid.hxx
-// Created:
-// Author: Peter KURNEV
-//
-#ifndef _GEOMAlgo_BuilderSolid_HeaderFile
-#define _GEOMAlgo_BuilderSolid_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <GEOMAlgo_BuilderArea.hxx>
-
-//! The algorithm to build solids from set of faces <br>
-//=======================================================================
-//function : GEOMAlgo_BuilderSolid
-//purpose :
-//=======================================================================
-class GEOMAlgo_BuilderSolid : public GEOMAlgo_BuilderArea
-{
- public:
- //! Empty constructor <br>
- Standard_EXPORT
- GEOMAlgo_BuilderSolid();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_BuilderSolid();
-
- //! Performs the algorithm <br>
- Standard_EXPORT
- virtual void Perform() ;
-
- protected:
- //! Collect the faces that <br>
- //! a) are internal <br>
- //! b) are the same and have different orientation <br>
- Standard_EXPORT
- virtual void PerformShapesToAvoid() ;
-
- //! Build draft shells <br>
- //! a)myLoops - draft shells that consist of <br>
- //! boundary faces <br>
- //! b)myLoopsInternal - draft shells that contains <br>
- //! inner faces <br>
- Standard_EXPORT
- virtual void PerformLoops() ;
-
- //! Build draft solids that contains boundary faces <br>
- Standard_EXPORT
- virtual void PerformAreas() ;
-
- //! Build finalized solids with internal shells <br>
- Standard_EXPORT
- virtual void PerformInternalShapes() ;
-
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BuilderTools.cxx
-// Author: Peter KURNEV
-
-#include <GEOMAlgo_BuilderTools.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
-#include <TColStd_Array1OfReal.hxx>
-
-#include <gp_Pnt2d.hxx>
-#include <gp_Vec.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Pnt.hxx>
-
-#include <TColgp_Array1OfPnt.hxx>
-
-#include <Poly_Triangulation.hxx>
-#include <Poly_Array1OfTriangle.hxx>
-#include <Poly_Triangle.hxx>
-
-#include <Geom2d_Curve.hxx>
-#include <Geom2dInt_Geom2dCurveTool.hxx>
-
-#include <TopLoc_Location.hxx>
-#include <TopAbs_Orientation.hxx>
-
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Iterator.hxx>
-#include <TopoDS_Wire.hxx>
-#include <TopoDS.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopExp_Explorer.hxx>
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
-#include <TopExp.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#endif
-
-#include <BRep_Tool.hxx>
-#include <BRepBndLib.hxx>
-#include <BRepMesh_FastDiscret.hxx>
-#include <Bnd_Box.hxx>
-#include <BRepAdaptor_Curve2d.hxx>
-
-static
- Standard_Integer ComputeProps(const TopoDS_Face& aF,
- Standard_Real& aA,
- Standard_Real& aV);
-static
- void BuildTriangulation(const TopoDS_Face& aF);
-
-//=======================================================================
-//function : IsHole
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aW,
- const TopoDS_Shape& aFace)
-{
- Standard_Boolean bIsHole;
- Standard_Integer i, aNbS;
- Standard_Real aT1, aT2, aS;
- Standard_Real aU1, aU2, aU, dU;
- Standard_Real aX1, aY1, aX0, aY0;
- TopAbs_Orientation aOr;
-
- gp_Pnt2d aP2D0, aP2D1;
- Handle(Geom2d_Curve) aC2D;
- TopoDS_Face aF, aFF;
- TopoDS_Iterator aItW;
- //
- bIsHole=Standard_False;
- //
- aF=TopoDS::Face(aFace);
- aFF=aF;
- aFF.Orientation(TopAbs_FORWARD);
- //
- aS=0.;
- aItW.Initialize(aW);
- for (; aItW.More(); aItW.Next()) {
- const TopoDS_Edge& aE=TopoDS::Edge(aItW.Value());
- aOr=aE.Orientation();
- if (!(aOr==TopAbs_FORWARD ||
- aOr==TopAbs_REVERSED)) {
- continue;
- }
- //
- aC2D=BRep_Tool::CurveOnSurface(aE, aFF, aT1, aT2);
- if (aC2D.IsNull()) {
- break; //xx
- }
- //
- BRepAdaptor_Curve2d aBAC2D(aE, aFF);
- aNbS=Geom2dInt_Geom2dCurveTool::NbSamples(aBAC2D);
- if (aNbS>2) {
- aNbS*=4;
- }
- //
- dU=(aT2-aT1)/(Standard_Real)(aNbS-1);
- aU =aT1;
- aU1=aT1;
- aU2=aT2;
- if (aOr==TopAbs_REVERSED) {
- aU =aT2;
- aU1=aT2;
- aU2=aT1;
- dU=-dU;
- }
- //
- aC2D->D0(aU, aP2D0);
- for(i=2; i<=aNbS; i++) {
- aU=aU1+(i-1)*dU;
- aC2D->D0(aU, aP2D1);
- aP2D0.Coord(aX0, aY0);
- aP2D1.Coord(aX1, aY1);
- //
- aS=aS+(aY0+aY1)*(aX1-aX0);
- //
- aP2D0=aP2D1;
- }
- }//for (; aItW.More(); aItW.Next()) {
- bIsHole=(aS>0.);
- return bIsHole;
-}
-//=======================================================================
-//function : IsHole
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aShell)
-{
- Standard_Boolean bIsHole;
- Standard_Integer iRet;
- Standard_Real aAi, aA, aV, aVi;
- TopExp_Explorer aExp;
- //
- aA=0.;
- aV=0.;
- aExp.Init(aShell, TopAbs_FACE);
- for (; aExp.More(); aExp.Next()) {
- const TopoDS_Face& aF=TopoDS::Face(aExp.Current());
- iRet=ComputeProps(aF, aAi, aVi);
- if (!iRet) {
- aA+=aAi;
- aV+=aVi;
- }
- }
- //
- bIsHole=aV<0.;
- return bIsHole;
-}
-//=======================================================================
-//function : ComputeProps
-//purpose :
-//=======================================================================
-Standard_Integer ComputeProps(const TopoDS_Face& aF,
- Standard_Real& aA,
- Standard_Real& aV)
-{
- Standard_Integer j, i, i1, i2, aNbNodes, aNbTrigs, n[3];
- Standard_Real aAi, aVi;
- gp_Pnt aP[3], aGC, aGC1;
- TopLoc_Location aLoc;
- TopAbs_Orientation aOr;
- Handle(Poly_Triangulation) aTri;
- //
- aA=0.;
- aV=0.;
- //
- aTri=BRep_Tool::Triangulation(aF, aLoc);
- if(aTri.IsNull()) {
- BuildTriangulation(aF);
- aTri=BRep_Tool::Triangulation(aF, aLoc);
- if(aTri.IsNull()) {
- return 1;// a face is without triangulation
- }
- }
- //
- aNbNodes=aTri->NbNodes();
- aNbTrigs=aTri->NbTriangles();
- if (!aNbTrigs){
- return 2;//no triangles
- }
- //
- aOr=aF.Orientation();
- //
- const TColgp_Array1OfPnt& aNodes=aTri->Nodes();
- const Poly_Array1OfTriangle& aTriangles=aTri->Triangles();
- //
- i1=aTriangles.Lower();
- i2=aTriangles.Upper();
- //
- for (i=i1; i<=i2; ++i){
- const Poly_Triangle& aTriangle=aTriangles.Value(i);
- aTriangle.Get(n[0], n[1], n[2]);
- aGC.SetCoord(0.,0.,0.);
- for (j=0; j<3; ++j) {
- aP[j]=aNodes.Value(n[j]);
- aGC.ChangeCoord()+=aP[j].XYZ();
- }
- aGC.ChangeCoord()*=0.333333333333;
- //
- // Normal
- gp_Vec aV01(aP[0], aP[1]);
- gp_Vec aV12(aP[1], aP[2]);
- gp_Vec aVN=aV01^aV12;
- aAi=aVN.Magnitude();
- aA=aA+aAi;
- //
- if (aAi>0.0000001) {
- Standard_Real aSx, aZx;
- gp_Dir aDN(aVN);
- if (aOr==TopAbs_REVERSED) {
- aDN.Reverse();
- }
- //
- aSx=aAi*aDN.Z();
- aZx=aGC.Z();
- aVi=aZx*aSx;
- aV=aV+aVi;
- }
- }
- return 0;
-}
-//=======================================================================
-//function : BuildTriangulation
-//purpose :
-//=======================================================================
-void BuildTriangulation(const TopoDS_Face& aF)
-{
- Standard_Boolean bWithShare;
- Standard_Real aDiscret, aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
- Standard_Real dX, dY, dZ, dMax, aCoeff, aAngle;
- Bnd_Box aBox;
- //
- bWithShare=Standard_False;
- aAngle=0.5;
- //
- BRepBndLib::Add(aF, aBox);
- //
- // aDiscret
- aBox.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
- dX=aXmax-aXmin;
- dY=aYmax-aYmin;
- dZ=aZmax-aZmin;
- dMax=dX;
- if (dY>dMax) {
- dMax=dY;
- }
- if (dZ>dMax) {
- dMax=dZ;
- }
- //
- aCoeff=0.1;
- aDiscret=aCoeff*dMax;
- //
- BRepMesh_FastDiscret aMesher(aDiscret,
- aAngle,
- aBox,
- bWithShare,
- Standard_True,
- Standard_False,
- Standard_True);
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- TopTools_IndexedDataMapOfShapeListOfShape anAncestors;
- TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, anAncestors);
- aMesher.Add(aF, anAncestors);
-#else
- aMesher.Add(aF);
-#endif
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BuilderTools.hxx
-// Author: Peter KURNEV
-
-#ifndef _GEOMAlgo_BuilderTools_HeaderFile
-#define _GEOMAlgo_BuilderTools_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Boolean.hxx>
-#include <TopoDS_Shape.hxx>
-
-//=======================================================================
-//class : GEOMAlgo_BuilderTools
-//purpose :
-//=======================================================================
-class GEOMAlgo_BuilderTools
-{
- public:
- Standard_EXPORT
- static Standard_Boolean IsHole(const TopoDS_Shape& aW,
- const TopoDS_Shape& aF) ;
-
- Standard_EXPORT
- static Standard_Boolean IsHole(const TopoDS_Shape& aShell) ;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Builder.hxx>
-
-#include <NMTDS_ShapesDataStructure.hxx>
-//#include <NMTTools_DSFiller.hxx>
-#include <NMTTools_PaveFiller.hxx>
-#include <IntTools_Context.hxx>
-#include <TopoDS_Shape.hxx>
-#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <BOPTools_PaveBlock.hxx>
-
-//=======================================================================
-//function : Shapes1
-//purpose :
-//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_Builder::Shapes1(const Standard_Integer theType)const
-{
- return myShapes1[theType];
-}
-//=======================================================================
-//function : Images
-//purpose :
-//=======================================================================
- const BRepAlgo_Image& GEOMAlgo_Builder::Images()const
-{
- return myImages;
-}
-//=======================================================================
-//function : InParts
-//purpose :
-//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_Builder::InParts(const TopoDS_Shape& theS)const
-{
- static TopTools_ListOfShape sLS;
- //
- if (myInParts.Contains(theS)) {
- return myInParts.FindFromKey(theS);
- }
- return sLS;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Builder_1.cxx
-// Created:
-// Author: Peter KURNEV
-//
-#include <GEOMAlgo_Builder.hxx>
-//
-#include <TColStd_ListOfInteger.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Wire.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Shell.hxx>
-#include <TopoDS_Iterator.hxx>
-//
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
-//
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-//
-#include <IntTools_Context.hxx>
-#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <BOPTools_PaveBlock.hxx>
-//
-#include <NMTDS_ShapesDataStructure.hxx>
-//
-#include <NMTTools_PaveFiller.hxx>
-#include <NMTTools_CommonBlockPool.hxx>
-#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-#include <NMTTools_CommonBlock.hxx>
-#include <NMTTools_CommonBlockPool.hxx>
-#include <NMTTools_ListOfCommonBlock.hxx>
-#include <NMTTools_CommonBlockAPI.hxx>
-//
-#include <GEOMAlgo_Tools3D.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-
-
-
-static
- void FillImagesCompounds(const TopTools_MapOfShape& ,
- BRepAlgo_Image& );
-
-static
- void FillImagesCompound(const TopoDS_Shape& ,
- BRepAlgo_Image& ,
- TopTools_MapOfShape& );
-
-//=======================================================================
-//function : FillImagesVertices
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::FillImagesVertices()
-{
- myErrorStatus=0;
- //
- const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
- NMTTools_PaveFiller* pPF=myPaveFiller;
- //
- Standard_Integer i, aNb, iV;
- //
- aNb=aDS.NumberOfShapesOfTheObject();
- for (i=1; i<=aNb; ++i) {
- const TopoDS_Shape& aV=aDS.Shape(i);
- if (aV.ShapeType()==TopAbs_VERTEX) {
- iV=pPF->FindSDVertex(i);
- if (iV) {
- const TopoDS_Shape& aVSD=aDS.Shape(iV);
- if (!myImages.HasImage(aV)) {
- myImages.Bind(aV, aVSD);
- //
- mySameDomainShapes.Add(aV, aVSD);
- }
- }
- }
- }
-}
-//=======================================================================
-// function: FillImagesEdges
-// purpose:
-//=======================================================================
- void GEOMAlgo_Builder::FillImagesEdges()
-{
- myErrorStatus=0;
- //
- const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
- NMTTools_PaveFiller* pPF=myPaveFiller;
- const BOPTools_SplitShapesPool& aSSP=pPF->SplitShapesPool();
- const Handle(IntTools_Context)& aCtx=pPF->Context();
- //
- Standard_Boolean bToReverse;
- Standard_Integer i, aNb, aNbSp, nSp, nSpR, nSpx, aIsCB, aNbLB;
- TColStd_ListIteratorOfListOfInteger aItLB;
- TColStd_ListOfInteger aLB;
- TopoDS_Edge aEE, aESpR;
- TopTools_MapOfShape aMFence;
- TopTools_ListOfShape aLSp;
- TopTools_ListIteratorOfListOfShape aIt1;
- BOPTools_ListIteratorOfListOfPaveBlock aIt;
- //
- aNb=aDS.NumberOfShapesOfTheObject();
- for (i=1; i<=aNb; ++i) {
- const TopoDS_Shape& aE=aDS.Shape(i);
- if (aE.ShapeType()!=TopAbs_EDGE) {
- continue;
- }
- //
- if (!aMFence.Add(aE)) {
- continue;
- }
- //
- const BOPTools_ListOfPaveBlock& aLPB=aSSP(aDS.RefEdge(i));
- aNbSp=aLPB.Extent();
- if (!aNbSp) {
- continue;
- }
- //
- aEE=TopoDS::Edge(aE);
- aLSp.Clear();
- //
- if (aNbSp==1) {
- const BOPTools_PaveBlock& aPB=aLPB.First();
- nSp=aPB.Edge();
- const TopoDS_Shape& aSp=aDS.Shape(nSp);
- //
- const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB, aLB, aIsCB);
- //modified by NIZNHY-PKV Wed Oct 27 11:19:30 2010f
- aNbLB=aLB.Extent();
- if (aIsCB && aNbLB<2) {
- aIsCB=0;
- }
- //modified by NIZNHY-PKV Wed Oct 27 11:19:34 2010t
- //
- nSpR=aPBR.Edge();
- const TopoDS_Shape& aSpR=aDS.Shape(nSpR);
- if (aSpR.IsSame(aSp) && aSpR.IsSame(aE) && !aIsCB) {
- continue;
- }
- //
- aESpR=TopoDS::Edge(aSpR);
- bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aESpR, aEE, aCtx);
- if (bToReverse) {
- aESpR.Reverse();
- }
- aLSp.Append(aESpR);
- //
- aItLB.Initialize(aLB);
- for (; aItLB.More(); aItLB.Next()) {
- nSpx=aItLB.Value();
- const TopoDS_Shape& aSpx=aDS.Shape(nSpx);
- mySameDomainShapes.Add(aSpx ,aSpR);
- }
- //
- //
- }// if (aNbSp==1) {
- else {
- aIt.Initialize(aLPB);
- for (; aIt.More(); aIt.Next()) {
- const BOPTools_PaveBlock& aPB=aIt.Value();
- const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB, aLB, aIsCB);
- nSpR=aPBR.Edge();
- const TopoDS_Shape& aSpR=aDS.Shape(nSpR);
- //
- aESpR=TopoDS::Edge(aSpR);
- bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aESpR, aEE, aCtx);
- if (bToReverse) {
- aESpR.Reverse();
- }
- aLSp.Append(aESpR);
- //
- aItLB.Initialize(aLB);
- for (; aItLB.More(); aItLB.Next()) {
- nSpx=aItLB.Value();
- const TopoDS_Shape& aSpx=aDS.Shape(nSpx);
- mySameDomainShapes.Add(aSpx ,aSpR);
- }
- }
- }
- //
- myImages.Bind(aE, aLSp);
-
- }//for (i=1; i<=aNb; ++i)
-}
-//=======================================================================
-// function: FillImagesContainers
-// purpose:
-//=======================================================================
- void GEOMAlgo_Builder::FillImagesContainers(const TopAbs_ShapeEnum theType)
-{
- myErrorStatus=0;
- //
- Standard_Boolean bInterferred, bToReverse;
- Standard_Integer i, aNbS;
- TopAbs_ShapeEnum aType;
- BRep_Builder aBB;
- TopoDS_Iterator aIt;
- TopTools_ListIteratorOfListOfShape aItIm;
- TopTools_MapOfShape aMS;
- TopTools_MapIteratorOfMapOfShape aItS;
- //
- const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
- NMTTools_PaveFiller* pPF=myPaveFiller;
- const Handle(IntTools_Context)& aCtx= pPF->Context();
- //
- aNbS=aDS.NumberOfShapesOfTheObject();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aC=aDS.Shape(i);
- aType=aC.ShapeType();
- if (aType==theType) {
- aMS.Add(aC);
- }
- }
- //
- if (theType==TopAbs_COMPOUND) {
- FillImagesCompounds(aMS, myImages);
- return;
- }
- //
- aItS.Initialize(aMS);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aC=aItS.Key();
- // whether the shape has image
- bInterferred=Standard_False;
- aIt.Initialize(aC);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aF=aIt.Value();
- if (myImages.HasImage(aF)) {
- bInterferred=!bInterferred;
- break;
- }
- }
- if (!bInterferred){
- continue;
- }
- //
- TopoDS_Shape aCIm;
- GEOMAlgo_Tools3D::MakeContainer(theType, aCIm);
- //
- aIt.Initialize(aC);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aF=aIt.Value();
- if (myImages.HasImage(aF)) {
- const TopTools_ListOfShape& aLFIm=myImages.Image(aF);
- aItIm.Initialize(aLFIm);
- for (; aItIm.More(); aItIm.Next()) {
- TopoDS_Shape aFIm=aItIm.Value();
- //
- bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aFIm, aF, aCtx);
- if (bToReverse) {
- aFIm.Reverse();
- }
- aBB.Add(aCIm, aFIm);
- }
- }
- else {
- aBB.Add(aCIm, aF);
- }
- }
- myImages.Bind(aC, aCIm);
- }// for (; aItS.More(); aItS.Next()) {
-}
-//=======================================================================
-// function: FillImagesCompounds
-// purpose:
-//=======================================================================
-void FillImagesCompounds(const TopTools_MapOfShape& theMS,
- BRepAlgo_Image& theImages)
-{
- TopTools_MapOfShape aMFP;
- TopTools_MapIteratorOfMapOfShape aItS;
- //
- aItS.Initialize(theMS);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aC=aItS.Key();
- FillImagesCompound(aC, theImages, aMFP);
- }
-}
-//=======================================================================
-//function : FillImagesCompound
-//purpose :
-//=======================================================================
-void FillImagesCompound(const TopoDS_Shape& theS,
- BRepAlgo_Image& theImages,
- TopTools_MapOfShape& theMFP)
-{
- Standard_Boolean bInterferred;
- TopAbs_ShapeEnum aTypeX;
- TopAbs_Orientation aOrX;
- TopoDS_Iterator aIt;
- BRep_Builder aBB;
- TopTools_ListIteratorOfListOfShape aItIm;
- //
- if (!theMFP.Add(theS)) {
- return;
- }
- //
- bInterferred=Standard_False;
- aIt.Initialize(theS);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSX=aIt.Value();
- aTypeX=aSX.ShapeType();
- if (aTypeX==TopAbs_COMPOUND) {
- FillImagesCompound(aSX, theImages, theMFP);
- }
- if (theImages.HasImage(aSX)) {
- bInterferred=Standard_True;
- }
- }
- if (!bInterferred){
- return;
- }
- //
- TopoDS_Shape aCIm;
- GEOMAlgo_Tools3D::MakeContainer(TopAbs_COMPOUND, aCIm);
- //
- aIt.Initialize(theS);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSX=aIt.Value();
- aOrX=aSX.Orientation();
- if (theImages.HasImage(aSX)) {
- const TopTools_ListOfShape& aLFIm=theImages.Image(aSX);
- aItIm.Initialize(aLFIm);
- for (; aItIm.More(); aItIm.Next()) {
- TopoDS_Shape aSXIm=aItIm.Value();
- aSXIm.Orientation(aOrX);
- aBB.Add(aCIm, aSXIm);
- }
- }
- else {
- aBB.Add(aCIm, aSX);
- }
- }
- theImages.Bind(theS, aCIm);
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Builder_2.cxx
-// Author: Peter KURNEV
-
-#include <GEOMAlgo_Builder.hxx>
-
-#include <TColStd_IndexedMapOfInteger.hxx>
-#include <TColStd_ListOfInteger.hxx>
-
-#include <TopAbs_Orientation.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Compound.hxx>
-
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-#include <BRepAlgo_Image.hxx>
-#include <BRepTools.hxx>
-
-#include <IntTools_Context.hxx>
-#include <IntTools_FClass2d.hxx>
-
-#include <BooleanOperations_OnceExplorer.hxx>
-#include <BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
-#include <BOPTools_CArray1OfSSInterference.hxx>
-#include <BOPTools_SSInterference.hxx>
-#include <BOPTools_SequenceOfCurves.hxx>
-#include <BOPTools_Curve.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <BOPTools_PaveBlock.hxx>
-#include <BOPTools_Tools3D.hxx>
-#include <BOPTools_CArray1OfVSInterference.hxx>
-#include <BOPTools_VSInterference.hxx>
-#include <BOPTools_ESInterference.hxx>
-#include <BOPTools_CArray1OfESInterference.hxx>
-
-#include <NMTDS_ShapesDataStructure.hxx>
-#include <NMTDS_InterfPool.hxx>
-
-#include <NMTTools_PaveFiller.hxx>
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#include <NMTTools_Tools.hxx>
-#include <NMTTools_CoupleOfShape.hxx>
-#include <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#include <NMTTools_Tools.hxx>
-#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-#include <NMTTools_ListOfCommonBlock.hxx>
-#include <NMTTools_CommonBlock.hxx>
-#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
-//
-#include <GEOMAlgo_Tools3D.hxx>
-#include <GEOMAlgo_WireEdgeSet.hxx>
-#include <GEOMAlgo_BuilderFace.hxx>
-
-#include <GEOMAlgo_ShapeSet.hxx>
-//
-#include <NMTDS_BoxBndTree.hxx>
-#include <NCollection_UBTreeFiller.hxx>
-#include <Bnd_Box.hxx>
-#include <BRepBndLib.hxx>
-#include <TopTools_DataMapOfIntegerShape.hxx>
-#include <TColStd_ListOfInteger.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <TopTools_DataMapOfShapeInteger.hxx>
-
-static
- void UpdateCandidates(const Standard_Integer ,
- const Standard_Integer ,
- NMTTools_IndexedDataMapOfIndexedMapOfInteger& );
-
-//modified by NIZNHY-PKV Thu Feb 16 12:24:52 2012f
-static
- Standard_Boolean IsClosed(const TopoDS_Edge& ,
- const TopoDS_Face& );
-//modified by NIZNHY-PKV Thu Feb 16 12:24:56 2012t
-
-//=======================================================================
-//function : FillImagesFaces
-//purpose :
-//=======================================================================
-void GEOMAlgo_Builder::FillImagesFaces()
-{
- myErrorStatus=0;
- //
- FillIn2DParts();
- BuildSplitFaces();
- FillSameDomainFaces();
- FillImagesFaces1();
- FillInternalVertices();
-}
-
-//=======================================================================
-// function: FillIn2DParts
-// purpose:
-//=======================================================================
-void GEOMAlgo_Builder::FillIn2DParts()
-{
- const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
- NMTTools_PaveFiller* pPF=myPaveFiller;
- NMTDS_InterfPool* pIP=pPF->IP();
- BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
- NMTTools_CommonBlockPool& aCBP=pPF->ChangeCommonBlockPool();
- //
- Standard_Integer j, nSpIn, nSpSc, aNbCurves;
- Standard_Integer aNbS, nF, aNbCBP, n1, n2, aNbFFs, aNbSpIn;
- TopTools_MapOfShape aMFence;
- TopTools_ListOfShape aLSpIn;
- TopoDS_Face aF;
- NMTTools_ListIteratorOfListOfCommonBlock aItCB;
- BOPTools_ListIteratorOfListOfPaveBlock aItPB;
- //
- myInParts.Clear();
- //
- aNbFFs=aFFs.Extent();
- aNbCBP=aCBP.Extent();
- //
- aNbS=aDS.NumberOfShapesOfTheObject();
- for (nF=1; nF<=aNbS; ++nF) {
- if (aDS.GetShapeType(nF)!=TopAbs_FACE) {
- continue;
- }
- //
- aF=TopoDS::Face(aDS.Shape(nF));
- //
- aMFence.Clear();
- aLSpIn.Clear();
- //
- // 1. In Parts
- BOPTools_ListOfPaveBlock aLPBIn;
- //
- pPF->RealSplitsInFace(nF, aLPBIn);
- //
- aItPB.Initialize(aLPBIn);
- for (; aItPB.More(); aItPB.Next()) {
- const BOPTools_PaveBlock& aPB1=aItPB.Value();
- nSpIn=aPB1.Edge();
- const TopoDS_Shape& aSpIn=aDS.Shape(nSpIn);
- aLSpIn.Append(aSpIn);
- }
- //
- // 2. Section Parts
- for (j=1; j<=aNbFFs; ++j) {
- BOPTools_SSInterference& aFF=aFFs(j);
- aFF.Indices(n1, n2);
- if (!(n1==nF || n2==nF)) {
- continue;
- }
- BOPTools_SequenceOfCurves& aSC=aFF.Curves();
- aNbCurves=aSC.Length();
- if (!aNbCurves) {
- continue;
- }
- //
- const BOPTools_Curve& aBC=aSC(1);
- const BOPTools_ListOfPaveBlock& aLPB=aBC.NewPaveBlocks();
- aItPB.Initialize(aLPB);
- for (; aItPB.More(); aItPB.Next()) {
- const BOPTools_PaveBlock& aPBSc=aItPB.Value();
- nSpSc=aPBSc.Edge();
- const TopoDS_Shape& aSpSc=aDS.Shape(nSpSc);
- if (aMFence.Add(aSpSc)){
- aLSpIn.Append(aSpSc);
- }
- }
- }
- aNbSpIn=aLSpIn.Extent();
- if (aNbSpIn) {
- myInParts.Add(aF, aLSpIn);
- }
- }//for (nF=1; nF<=aNbS; ++nF) {
-}
-
-//=======================================================================
-// function: BuildSplitFaces
-// purpose:
-//=======================================================================
-void GEOMAlgo_Builder::BuildSplitFaces()
-{
- const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
- NMTTools_PaveFiller* pPF=myPaveFiller;
- NMTDS_InterfPool* pIP=pPF->IP();
- BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
- const Handle(IntTools_Context)& aCtx= pPF->Context();
- //
- Standard_Boolean bToReverse, bIsClosed, bIsDegenerated;
- Standard_Integer i, aNb, aNbF, nF;
- TopTools_MapOfShape aMFence;
- TColStd_IndexedMapOfInteger aMFP;
- TopExp_Explorer anExp;
- TopoDS_Face aFF;
- TopoDS_Edge aSp, aEE;
- TopTools_ListIteratorOfListOfShape aIt;
- TopAbs_Orientation anOriF, anOriE;
- //
- mySplitFaces.Clear();
- //
- // 1. Select Faces to process (MFP)
- aNb=aDS.NumberOfShapesOfTheObject();
- for (i=1; i<=aNb; ++i) {
- const TopoDS_Shape& aF=aDS.Shape(i);
- if (aF.ShapeType()!=TopAbs_FACE) {
- continue;
- }
- if (!aMFence.Add(aF)) {
- continue;
- }
- //
- if (myInParts.Contains(aF)) {
- aMFP.Add(i);
- continue;
- }
- //
- anExp.Init(aF, TopAbs_EDGE);
- for (; anExp.More(); anExp.Next()) {
- const TopoDS_Shape& aE=anExp.Current();
- if (myImages.HasImage(aE)) {
- aMFP.Add(i);
- break;
- }
- }
- //
- //===
- {
- Standard_Integer aNbFFs, aNbSE, j, n1, n2;
- //
- aNbFFs=aFFs.Extent();
- for (j=1; j<=aNbFFs; ++j) {
- BOPTools_SSInterference& aFFj=aFFs(j);
- aFFj.Indices(n1, n2);
- if (!(n1==i || n2==i)) {
- continue;
- }
- //
- const TColStd_ListOfInteger& aLSE=aFFj.SharedEdges();
- aNbSE=aLSE.Extent();
- if (aNbSE) {
- aMFP.Add(i);
- break;
- }
- }
- }
- //===
- //
- }// for (i=1; i<=aNb; ++i)
- //
- // 2. ProcessFaces
- aNbF=aMFP.Extent();
- for (i=1; i<=aNbF; ++i) {
- nF=aMFP(i);
- const TopoDS_Face& aF=TopoDS::Face(aDS.Shape(nF));
- anOriF=aF.Orientation();
- aFF=aF;
- aFF.Orientation(TopAbs_FORWARD);
- //
- aMFence.Clear();
- //
- // 2.1. Fill WES
- GEOMAlgo_WireEdgeSet aWES;
- aWES.SetFace(aFF);
- //
- // 2.1.1. Add Split parts
- anExp.Init(aFF, TopAbs_EDGE);
- for (; anExp.More(); anExp.Next()) {
- const TopoDS_Edge& aE=TopoDS::Edge(anExp.Current());
- anOriE=aE.Orientation();
- //
- if (!myImages.HasImage(aE)) {
- if (anOriE==TopAbs_INTERNAL) {
- aEE=aE;
- aEE.Orientation(TopAbs_FORWARD);
- aWES.AddStartElement(aEE);
- aEE.Orientation(TopAbs_REVERSED);
- aWES.AddStartElement(aEE);
- }
- else {
- aWES.AddStartElement(aE);
- }
- continue;
- }
- //
- bIsDegenerated=BRep_Tool::Degenerated(aE);
- //modified by NIZNHY-PKV Wed Mar 07 07:46:09 2012f
- bIsClosed=IsClosed(aE, aF);
- //bIsClosed=BRep_Tool::IsClosed(aE, aF);
- //modified by NIZNHY-PKV Wed Mar 07 07:46:13 2012t
- //
- const TopTools_ListOfShape& aLIE=myImages.Image(aE);
- aIt.Initialize(aLIE);
- for (; aIt.More(); aIt.Next()) {
- aSp=TopoDS::Edge(aIt.Value());
- //
- if (bIsDegenerated) {
- aSp.Orientation(anOriE);
- aWES.AddStartElement(aSp);
- continue;
- }
- //
- if (anOriE==TopAbs_INTERNAL) {
- aSp.Orientation(TopAbs_FORWARD);
- aWES.AddStartElement(aSp);
- aSp.Orientation(TopAbs_REVERSED);
- aWES.AddStartElement(aSp);
- continue;
- }
- //
- if (bIsClosed){
- if (aMFence.Add(aSp)) {
- //
- if (!BRep_Tool::IsClosed(aSp, aF)){
- BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF);
- }
- //
- aSp.Orientation(TopAbs_FORWARD);
- aWES.AddStartElement(aSp);
- aSp.Orientation(TopAbs_REVERSED);
- aWES.AddStartElement(aSp);
- }
- continue;
- }// if (aMFence.Add(aSp))
- //
- aSp.Orientation(anOriE);
- bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx);
- if (bToReverse) {
- aSp.Reverse();
- }
- aWES.AddStartElement(aSp);
- }// for (; aIt.More(); aIt.Next()) {
- }// for (; anExp.More(); anExp.Next()) {
- //
- // 2.1.2. Add In2D Parts
- if (myInParts.Contains(aF)) {
- const TopTools_ListOfShape& aLE=myInParts.FindFromKey(aF);
- aIt.Initialize(aLE);
- for (; aIt.More(); aIt.Next()) {
- aSp=TopoDS::Edge(aIt.Value());
- //
- aSp.Orientation(TopAbs_FORWARD);
- aWES.AddStartElement(aSp);
- //
- aSp.Orientation(TopAbs_REVERSED);
- aWES.AddStartElement(aSp);
- }
- }
- //
- // 2.2. Build images Faces
- TopTools_ListOfShape aLFR;
- GEOMAlgo_ShapeSet aS1, aS2;
- //
- const TopTools_ListOfShape& aSE=aWES.StartElements();
- aS1.Add(aSE);
- aS2.Add(aFF, TopAbs_EDGE);
- if (aS1.IsEqual(aS2)) {
- aLFR.Append(aF);
- }
- else {
- GEOMAlgo_BuilderFace aBF;
- //
- aBF.SetFace(aFF);
- aBF.SetContext(aCtx);
- aBF.SetShapes(aSE);
- // <-DEB
- aBF.Perform();
- //
- const TopTools_ListOfShape& aLF=aBF.Areas();
- aIt.Initialize(aLF);
- for (; aIt.More(); aIt.Next()) {
- TopoDS_Shape& aFR=aIt.Value();
- if (anOriF==TopAbs_REVERSED) {
- aFR.Orientation(TopAbs_REVERSED);
- }
- aLFR.Append(aFR);
- }
- }
- //
- // 2.3. Collect draft images Faces
- mySplitFaces.Bind(aF, aLFR);
- }//for (i=1; i<=aNbF; ++i)
-}
-
-//=======================================================================
-// function: FillSameDomainFaces
-// purpose:
-//=======================================================================
-void GEOMAlgo_Builder::FillSameDomainFaces()
-{
- Standard_Boolean bIsSDF, bHasImage1, bHasImage2, bForward;
- Standard_Integer i, j, aNbFF, nF1, nF2, aNbPBInOn, aNbC, aNbSE;
- Standard_Integer aNbF1, aNbF2, i2s, aNbSD;
- TopTools_MapOfShape aMFence;
- TopTools_ListOfShape aLX1, aLX2;
- TopTools_ListIteratorOfListOfShape aItF1, aItF2;
- NMTTools_ListOfCoupleOfShape aLCS;
- //
- const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
- NMTTools_PaveFiller* pPF=myPaveFiller;
- NMTDS_InterfPool* pIP=pPF->IP();
- BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
- const Handle(IntTools_Context)& aCtx= pPF->Context();
- //
- //
- //mySameDomainShapes.Clear();
- //
- // 1. For each FF find among images of faces
- // all pairs of same domain faces (SDF) [=> aLCS]
- aNbFF=aFFs.Extent();
- for (i=1; i<=aNbFF; ++i) {
- BOPTools_SSInterference& aFF=aFFs(i);
- aFF.Indices(nF1, nF2);
- //
- const TopoDS_Face& aF1=TopoDS::Face(aDS.Shape(nF1));
- const TopoDS_Face& aF2=TopoDS::Face(aDS.Shape(nF2));
- //
- // if there are no in/on 2D split parts the faces nF1, nF2
- // can not be SDF
- const BOPTools_ListOfPaveBlock& aLPBInOn=aFF.PaveBlocks();
- aNbPBInOn=aLPBInOn.Extent();
- //
- //===
- const TColStd_ListOfInteger& aLSE=aFF.SharedEdges();
- aNbSE=aLSE.Extent();
- if (!aNbPBInOn && !aNbSE) {
- continue;
- }
- //===
- //
- // if there is at least one section edge between faces nF1, nF2
- // they can not be SDF
- BOPTools_SequenceOfCurves& aSC=aFF.Curves();
- aNbC=aSC.Length();
- if (aNbC) {
- continue;
- }
- //
- // the faces are suspected to be SDF.
- // Try to find SDF among images of nF1, nF2
- aMFence.Clear();
- //
- //--------------------------------------------------------
- bHasImage1=mySplitFaces.HasImage(aF1);
- bHasImage2=mySplitFaces.HasImage(aF2);
- //
- aLX1.Clear();
- if (!bHasImage1) {
- aLX1.Append(aF1);
- }
- //
- aLX2.Clear();
- if (!bHasImage2) {
- aLX2.Append(aF2);
- }
- //
- const TopTools_ListOfShape& aLF1r=(bHasImage1)? mySplitFaces.Image(aF1) : aLX1;
- const TopTools_ListOfShape& aLF2r=(bHasImage2)? mySplitFaces.Image(aF2) : aLX2;
- //
- TopTools_DataMapOfIntegerShape aMIS;
- TColStd_ListIteratorOfListOfInteger aItLI;
- NMTDS_BoxBndTreeSelector aSelector;
- NMTDS_BoxBndTree aBBTree;
- NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
- //
- aNbF1=aLF1r.Extent();
- aNbF2=aLF2r.Extent();
- bForward=(aNbF1<aNbF2);
- //
- const TopTools_ListOfShape& aLF1=bForward ? aLF1r : aLF2r;
- const TopTools_ListOfShape& aLF2=bForward ? aLF2r : aLF1r;
- //
- // 1. aTreeFiller
- aItF2.Initialize(aLF2);
- for (i2s=1; aItF2.More(); aItF2.Next(), ++i2s) {
- Bnd_Box aBoxF2s;
- //
- const TopoDS_Face& aF2s=*((TopoDS_Face*)(&aItF2.Value()));
- //
- BRepBndLib::Add(aF2s, aBoxF2s);
- //
- aMIS.Bind(i2s, aF2s);
- //
- aTreeFiller.Add(i2s, aBoxF2s);
- }//for (i2s=1; aItF2.More(); aItF2.Next(), ++i2s) {
- //
- aTreeFiller.Fill();
- //
- // 2.
- aItF1.Initialize(aLF1);
- for (j=1; aItF1.More(); aItF1.Next(), ++j) {
- Bnd_Box aBoxF1x;
- //
- const TopoDS_Face& aF1x=*((TopoDS_Face*)(&aItF1.Value()));
- //
- BRepBndLib::Add(aF1x, aBoxF1x);
- //
- aSelector.Clear();
- aSelector.SetBox(aBoxF1x);
- aNbSD=aBBTree.Select(aSelector);
- if (!aNbSD) {
- continue;
- }
- //
- const TColStd_ListOfInteger& aLI=aSelector.Indices();
- aItLI.Initialize(aLI);
- for (; aItLI.More(); aItLI.Next()) {
- i2s=aItLI.Value();
- const TopoDS_Face& aF2y=*((TopoDS_Face*)(&aMIS.Find(i2s)));
- //
- bIsSDF=NMTTools_Tools::AreFacesSameDomain(aF1x, aF2y, aCtx);
- if (bIsSDF) {
- if (aMFence.Contains(aF1x) || aMFence.Contains(aF2y)) {
- continue;
- }
- aMFence.Add(aF1x);
- aMFence.Add(aF2y);
- //
- NMTTools_CoupleOfShape aCS;
- //
- aCS.SetShape1(aF1x);
- aCS.SetShape2(aF2y);
- aLCS.Append(aCS);
- //
- if (bForward) {
- if (aF1x==aF1) {
- if (!mySplitFaces.HasImage(aF1)) {
- mySplitFaces.Bind(aF1, aF1);
- }
- }
- if (aF2y==aF2) {
- if (!mySplitFaces.HasImage(aF2)) {
- mySplitFaces.Bind(aF2, aF2);
- }
- }
- }
- else {
- if (aF1x==aF2) {
- if (!mySplitFaces.HasImage(aF2)) {
- mySplitFaces.Bind(aF2, aF2);
- }
- }
- if (aF2y==aF1) {
- if (!mySplitFaces.HasImage(aF1)) {
- mySplitFaces.Bind(aF1, aF1);
- }
- }
- }
- //
- break;
- }//if (bIsSDF) {
- }//for (; aItLI.More(); aItLI.Next()) {
- }//for (; aItF1.More(); aItF1.Next()) {
- }//for (i=1; i<=aNbFF; ++i)
- //-------------------------------------------------------------
- aNbC=aLCS.Extent();
- if (!aNbC) {
- return;
- }
- //
- // 2. Find Chains
- NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMC;
- //
- NMTTools_Tools::FindChains(aLCS, aMC);
- //
- Standard_Boolean bIsImage;
- Standard_Integer aIx, aIxMin, aNbMSDF, k, aNbMFj;
- TopoDS_Shape aFOld, aFSDmin;
- TopTools_IndexedMapOfShape aMFj;
- TopTools_DataMapOfShapeInteger aDMSI;
- //
- aItF1.Initialize(myShapes);
- for (j=1; aItF1.More(); aItF1.Next(), ++j) {
- const TopoDS_Shape& aSj=aItF1.Value();
- aMFj.Clear();
- TopExp::MapShapes(aSj, TopAbs_FACE, aMFj);
- aNbMFj=aMFj.Extent();
- for (k=1; k<=aNbMFj; ++k) {
- const TopoDS_Shape& aFk=aMFj(k);
- if (!aDMSI.IsBound(aFk)) {
- aDMSI.Bind(aFk, j);
- }
- }
- }
- //
- // 3. Fill the map of SDF mySameDomainFaces
- aNbC=aMC.Extent();
- for (i=1; i<=aNbC; ++i) {
- // const TopoDS_Shape& aF=aMC.FindKey(i);
- const TopTools_IndexedMapOfShape& aMSDF=aMC(i);
- //
- aNbMSDF=aMSDF.Extent();
- for (j=1; j<=aNbMSDF; ++j) {
- const TopoDS_Shape& aFSD=aMSDF(j);
- bIsImage=mySplitFaces.IsImage(aFSD);
- aFOld=aFSD;
- if (bIsImage) {
- aFOld=mySplitFaces.ImageFrom(aFSD);
- }
- //
- aIx=aDMSI.Find(aFOld);
- if (j==1) {
- aIxMin=aIx;
- aFSDmin=aFSD;
- continue;
- }
- else {
- if (aIx<aIxMin) {
- aIxMin=aIx;
- aFSDmin=aFSD;
- }
- }
- }
- //
- for (j=1; j<=aNbMSDF; ++j) {
- const TopoDS_Shape& aFSD=aMSDF(j);
- mySameDomainShapes.Add(aFSD, aFSDmin);
- }
- }
- //
-}
-
-//=======================================================================
-// function: FillImagesFaces1
-// purpose:
-//=======================================================================
-void GEOMAlgo_Builder::FillImagesFaces1()
-{
- Standard_Integer i, aNb, iSense, aNbLFx;
- TopoDS_Face aF, aFSp, aFSD;
- TopTools_ListOfShape aLFx;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
- //
- aNb=aDS.NumberOfShapesOfTheObject();
- for (i=1; i<=aNb; ++i) {
- const TopoDS_Shape& aS=aDS.Shape(i);
- if (aS.ShapeType()!=TopAbs_FACE) {
- continue;
- }
- //
- if (!mySplitFaces.HasImage(aS)) {
- continue;
- }
- //
- aF=*((TopoDS_Face*)&aS);
- //
- aLFx.Clear();
- const TopTools_ListOfShape& aLF=mySplitFaces.Image(aF);
- aIt.Initialize(aLF);
- for (; aIt.More(); aIt.Next()) {
- aFSp=*((TopoDS_Face*)(&aIt.Value()));
- if (!mySameDomainShapes.Contains(aFSp)) {
- aLFx.Append(aFSp);
- }
- else {
- const TopoDS_Shape& aSx=mySameDomainShapes.FindFromKey(aFSp);
- aFSD=*((TopoDS_Face*)(&aSx));
- iSense=GEOMAlgo_Tools3D::Sense(aFSp, aFSD);
- if (iSense<0) {
- aFSD.Reverse();
- }
- aLFx.Append(aFSD);
- }
- }
- //
- if (!myImages.HasImage(aF)) {
- aNbLFx=aLFx.Extent();
- if (aNbLFx==1) {
- const TopoDS_Shape& aFx=aLFx.First();
- if (aF.IsSame(aFx)) {
- continue;
- }
- }
- myImages.Bind(aF, aLFx);
- }
- }
-}
-
-//=======================================================================
-// function: FillInternalVertices
-// purpose:
-//=======================================================================
-void GEOMAlgo_Builder::FillInternalVertices()
-{
- const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
- NMTTools_PaveFiller* pPF=myPaveFiller;
- NMTDS_InterfPool* pIP=pPF->IP();
- const Handle(IntTools_Context)& aCtx= pPF->Context();
- //
- BOPTools_CArray1OfVSInterference& aVFs=pIP->VSInterferences();
- BOPTools_CArray1OfESInterference& aEFs=pIP->ESInterferences();
- const NMTTools_IndexedDataMapOfIndexedMapOfInteger& aMAV=pPF->AloneVertices();
- //
- Standard_Boolean bHasImage;
- Standard_Integer i, j, nF, aNbS, nV, nVSD, n1, n2, iFlag;
- Standard_Integer aNbVFs, aNbAVF, aNbEFs, aNbVC, aNbE, aNbV;
- Standard_Real aU1, aU2, aTol;
- NMTTools_IndexedDataMapOfIndexedMapOfInteger aMFMV;
- TopTools_MapOfShape aMFence;
- TopTools_ListIteratorOfListOfShape aIt, aItV;
- BRep_Builder aBB;
- //
- // 1. Collect face-vertex candidates [aMFMV]
- //
- // 1.1. VFs
- aNbVFs=aVFs.Extent();
- for (i=1; i<=aNbVFs; ++i) {
- const BOPTools_VSInterference& aVS=aVFs(i);
- aVS.Indices(n1, n2);
- nF=n2;
- nV=n1;
- if (aDS.Shape(n1).ShapeType()==TopAbs_FACE) {
- nF=n1;
- nV=n2;
- }
- nVSD=pPF->FindSDVertex(nV);
- if (nVSD) {
- nV=nVSD;
- }
- //
- UpdateCandidates(nF, nV, aMFMV);
- }
- //
- // 1.2 EFs
- aNbEFs=aEFs.Extent();
- for (i=1; i<=aNbEFs; ++i) {
- const BOPTools_ESInterference& aEF=aEFs(i);
- aEF.Indices(n1, n2);
- nV=aEF.NewShape();
- if (!nV) {
- continue;
- }
- const TopoDS_Shape& aSnew=aDS.Shape(nV);
- if (aSnew.ShapeType()!=TopAbs_VERTEX) {
- continue;
- }
- //
- nF=(aDS.Shape(n1).ShapeType()==TopAbs_FACE) ? n1 : n2;
- nVSD=pPF->FindSDVertex(nV);
- if (nVSD) {
- nV=nVSD;
- }
- UpdateCandidates(nF, nV, aMFMV);
- }
- //
- aNbS=aDS.NumberOfShapesOfTheObject();
- for (nF=1; nF<=aNbS; ++nF) {
- const TopoDS_Shape& aF=aDS.Shape(nF);
- //
- if (aF.ShapeType()!=TopAbs_FACE) {
- continue;
- }
- if (!aMFence.Add(aF)) {
- continue;
- }
- //
- const TopoDS_Face& aFF=TopoDS::Face(aF);
- aTol=BRep_Tool::Tolerance(aFF);
- //
- // 1.3 FFs
- if (aMAV.Contains(nF)) {
- const TColStd_IndexedMapOfInteger& aMAVF=aMAV.FindFromKey(nF);
- aNbAVF=aMAVF.Extent();
- for (j=1; j<=aNbAVF; ++j) {
- nV=aMAVF(j);
- nVSD=pPF->FindSDVertex(nV);
- if (nVSD) {
- nV=nVSD;
- }
- //
- UpdateCandidates(nF, nV, aMFMV);
- }
- }
- //
- // 1.4 Internal vertices of the face nF
- BooleanOperations_OnceExplorer aExp(aDS);
- aExp.Init(nF, TopAbs_VERTEX);
- for (; aExp.More(); aExp.Next()) {
- nV=aExp.Current();
- const TopoDS_Shape& aV=aDS.Shape(nV);
- if (aV.Orientation()==TopAbs_INTERNAL) {
- nVSD=pPF->FindSDVertex(nV);
- if (nVSD) {
- nV=nVSD;
- }
- //
- UpdateCandidates(nF, nV, aMFMV);
- }
- }
- //
- // 2. Process face nF
- if (!aMFMV.Contains(nF)) {
- continue;
- }
- //
- const TColStd_IndexedMapOfInteger& aMVC=aMFMV.FindFromKey(nF);
- aNbVC=aMVC.Extent();
- if (!aNbVC) {
- continue;
- }
- //
- // 2.1 Refine candidates
- TopTools_IndexedDataMapOfShapeListOfShape aMVE;
- TopTools_ListOfShape aLV;
- //
- bHasImage=myImages.HasImage(aF);
- if (bHasImage) {
- const TopTools_ListOfShape& aLFx=myImages.Image(aF);
- aIt.Initialize(aLFx);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aFx=aIt.Value();
- TopExp::MapShapesAndAncestors(aFx, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
- }
- }
- else {
- Standard_Boolean bFaceToProcess;
- //
- TopExp::MapShapesAndAncestors(aF, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
- bFaceToProcess=Standard_False;
- for (j=1; j<=aNbVC; ++j) {
- nV=aMVC(j);
- const TopoDS_Shape& aV=aDS.Shape(nV);
- if (!aMVE.Contains(aV)) {
- bFaceToProcess=!bFaceToProcess;
- break;
- }
- }
- if (!bFaceToProcess) {
- continue;
- }
- }// else
- //
- for (j=1; j<=aNbVC; ++j) {
- nV=aMVC(j);
- const TopoDS_Shape& aV=aDS.Shape(nV);
- if (aMVE.Contains(aV)) {
- const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV);
- aNbE=aLE.Extent();
- if (aNbE) {
- continue;
- }
- }
- aLV.Append(aV);
- }
- //
- aNbV=aLV.Extent();
- if (aNbV) {
- // 3. Try to put vertices into the face(s)
- aItV.Initialize(aLV);
- for (; aItV.More(); aItV.Next()) {
- TopoDS_Vertex aV=TopoDS::Vertex(aItV.Value());
- aV.Orientation(TopAbs_INTERNAL);
- //
- bHasImage=myImages.HasImage(aF);
- if (bHasImage) {
- const TopTools_ListOfShape& aLFx=myImages.Image(aF);
- aIt.Initialize(aLFx);
- for (; aIt.More(); aIt.Next()) {
- TopoDS_Face aFx=TopoDS::Face(aIt.Value());
- // update classifier
- IntTools_FClass2d& aClsf=aCtx->FClass2d(aFx);
- aClsf.Init(aFx, aTol);
- //
- iFlag=aCtx->ComputeVS (aV, aFx, aU1, aU2);
- if (!iFlag) {
- aBB.Add(aFx, aV);
- break;
- }
- }
- }
- else {
- const TopoDS_Face& aFx=TopoDS::Face(aF);
- // update classifier
- IntTools_FClass2d& aClsf=aCtx->FClass2d(aFx);
- aClsf.Init(aFx, aTol);
- //
- iFlag=aCtx->ComputeVS (aV, aFx, aU1, aU2);
- if (!iFlag) {
- TopoDS_Face aFz;
- //
- GEOMAlgo_Tools3D::CopyFace(aFx, aFz);
- aBB.Add(aFz, aV);
- myImages.Bind(aF, aFz);
- }
- }
- }// for (; aItV.More(); aItV.Next()) {
- }// if (aNbV) {
- }// for (nF=1; nF<=aNb; ++nF) {
-}
-
-//=======================================================================
-// function: UpdateCandidates
-// purpose:
-//=======================================================================
-void UpdateCandidates(const Standard_Integer theNF,
- const Standard_Integer theNV,
- NMTTools_IndexedDataMapOfIndexedMapOfInteger& theMFMV)
-{
- if (theMFMV.Contains(theNF)) {
- TColStd_IndexedMapOfInteger& aMV=theMFMV.ChangeFromKey(theNF);
- aMV.Add(theNV);
- }
- else {
- TColStd_IndexedMapOfInteger aMV;
- aMV.Add(theNV);
- theMFMV.Add(theNF, aMV);
- }
-}
-
-//modified by NIZNHY-PKV Thu Feb 16 12:25:16 2012f
-//=======================================================================
-//function : IsClosed
-//purpose :
-//=======================================================================
-Standard_Boolean IsClosed(const TopoDS_Edge& aE,
- const TopoDS_Face& aF)
-{
- Standard_Boolean bRet;
- //
- bRet=BRep_Tool::IsClosed(aE, aF);
- if (bRet) {
- TopTools_MapOfShape aM;
- TopExp_Explorer aExp(aF, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- const TopoDS_Shape& aEx=aExp.Current();
- //
- if (aM.Add(aEx)) {
- bRet=aEx.IsSame(aE);
- if (bRet) {
- break;
- }
- }
- }
- }
- return bRet;
-}
-//modified by NIZNHY-PKV Thu Feb 16 12:25:25 2012t
-
-/*
- {
- TopoDS_Compound aCx;
- BRep_Builder aBBx;
- TopTools_ListIteratorOfListOfShape aItx;
- //
- aBBx.MakeCompound(aCx);
- aBBx.Add(aCx, aFF);
- aItx.Initialize(aSE);
- for (; aItx.More(); aItx.Next()) {
- TopoDS_Shape& aEx=aItx.Value();
- aBBx.Add(aCx, aEx);
- }
- int a=0;
- }
- */
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Builder_3.cxx
-// Created :
-// Author : Peter KURNEV
-
-#include <GEOMAlgo_Builder.hxx>
-
-#include <TopAbs_State.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Iterator.hxx>
-#include <TopoDS_Solid.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Solid.hxx>
-#include <TopoDS_Iterator.hxx>
-#include <TopoDS_Shell.hxx>
-#include <TopoDS_Compound.hxx>
-
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <BRep_Builder.hxx>
-#include <BRepTools.hxx>
-#include <BRepClass3d_SolidClassifier.hxx>
-
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
-#include <TopTools_DataMapOfShapeShape.hxx>
-#include <TopTools_DataMapOfShapeInteger.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeInteger.hxx>
-#include <TopTools_MapOfShape.hxx>
-
-#include <IntTools_Context.hxx>
-
-#include <NMTDS_ShapesDataStructure.hxx>
-#include <NMTTools_PaveFiller.hxx>
-
-#include <GEOMAlgo_Tools3D.hxx>
-#include <GEOMAlgo_BuilderSolid.hxx>
-#include <GEOMAlgo_ShapeSet.hxx>
-#include <GEOMAlgo_DataMapOfShapeShapeSet.hxx>
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx>
-
-
-
-static
- void OwnInternalShapes(const TopoDS_Shape& ,
- TopTools_IndexedMapOfShape& );
-
-//=======================================================================
-//function : FillImagesSolids
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::FillImagesSolids()
-{
- myErrorStatus=0;
- //
- FillIn3DParts();
- BuildSplitSolids();
- FillInternalShapes();
-}
-//=======================================================================
-//function : BuildDraftSolid
-//purpose :
-//=======================================================================
-void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid,
- TopoDS_Shape& theDraftSolid,
- TopTools_ListOfShape& theLIF)
-{
- myErrorStatus=0;
- //
- NMTTools_PaveFiller* pPF=myPaveFiller;
- const Handle(IntTools_Context)& aCtx= pPF->Context();
- //
- Standard_Boolean bToReverse;
- Standard_Integer iFlag;
- TopAbs_Orientation aOrF, aOrSh, aOrSd;
- TopoDS_Iterator aIt1, aIt2;
- TopTools_ListIteratorOfListOfShape aItS;
- BRep_Builder aBB;
- TopoDS_Shell aShD;
- TopoDS_Shape aFSDx, aFx;
- //
- aOrSd=theSolid.Orientation();
- theDraftSolid.Orientation(aOrSd);
- //
- aIt1.Initialize(theSolid);
- for (; aIt1.More(); aIt1.Next()) {
- const TopoDS_Shape& aSh=aIt1.Value();
- if(aSh.ShapeType()!=TopAbs_SHELL) {
- continue; // mb internal edges,vertices
- }
- //
- aOrSh=aSh.Orientation();
- aBB.MakeShell(aShD);
- aShD.Orientation(aOrSh);
- iFlag=0;
- //
- aIt2.Initialize(aSh);
- for (; aIt2.More(); aIt2.Next()) {
- const TopoDS_Shape& aF=aIt2.Value();
- aOrF=aF.Orientation();
- //
- if (myImages.HasImage(aF)) {
- const TopTools_ListOfShape& aLSp=myImages.Image(aF);
- aItS.Initialize(aLSp);
- for (; aItS.More(); aItS.Next()) {
- aFx=aItS.Value();
- //
- if (mySameDomainShapes.Contains(aFx)) {
- aFSDx=mySameDomainShapes.FindFromKey(aFx);
- //
- if (aOrF==TopAbs_INTERNAL) {
- aFSDx.Orientation(aOrF);
- theLIF.Append(aFSDx);
- }
- else {
- bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aFSDx, aF, aCtx);
- if (bToReverse) {
- aFSDx.Reverse();
- }
- //
- iFlag=1;
- aBB.Add(aShD, aFSDx);
- }
- }// if (mySameDomainShapes.Contains(aFx)) {
- else {
- aFx.Orientation(aOrF);
- if (aOrF==TopAbs_INTERNAL) {
- theLIF.Append(aFx);
- }
- else{
- iFlag=1;
- aBB.Add(aShD, aFx);
- }
- }
- }
- } //if (myImages.HasImage(aF)) {
- //
- else {
- if (aOrF==TopAbs_INTERNAL) {
- theLIF.Append(aF);
- }
- else{
- iFlag=1;
- aBB.Add(aShD, aF);
- }
- }
- } //for (; aIt2.More(); aIt2.Next()) {
- //
- if (iFlag) {
- aBB.Add(theDraftSolid, aShD);
- }
- } //for (; aIt1.More(); aIt1.Next()) {
-}
-//=======================================================================
-//function : FillIn3DParts
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::FillIn3DParts()
-{
- myErrorStatus=0;
- //
- const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
- NMTTools_PaveFiller* pPF=myPaveFiller;
- const Handle(IntTools_Context)& aCtx= pPF->Context();
- //
- Standard_Boolean bIsIN, bHasImage;
- Standard_Integer aNbS, aNbSolids, i, j, aNbFaces, aNbFP, aNbFPx, aNbFIN, aNbLIF;
- TopAbs_ShapeEnum aType;
- TopAbs_State aState;
- TopTools_IndexedMapOfShape aMSolids, aMS, aMFaces, aMFIN;
- TopTools_MapOfShape aMFDone;
- TopTools_IndexedDataMapOfShapeListOfShape aMEF;
- TopTools_ListIteratorOfListOfShape aItS;
- TopoDS_Iterator aIt, aItF;
- BRep_Builder aBB;
- TopoDS_Solid aSolidSp;
- TopoDS_Face aFP;
- //
- myDraftSolids.Clear();
- //
- aNbS=aDS.NumberOfShapesOfTheObject();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aS=aDS.Shape(i);
- //
- aType=aS.ShapeType();
- if (aType==TopAbs_SOLID) {
- // all solids from DS
- aMSolids.Add(aS);
- }
- else if (aType==TopAbs_FACE) {
- // all faces (originals from DS or theirs images)
- if (myImages.HasImage(aS)) {
- const TopTools_ListOfShape& aLS=myImages.Image(aS);
- aItS.Initialize(aLS);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aFx=aItS.Value();
- //
- if (mySameDomainShapes.Contains(aFx)) {
- const TopoDS_Shape& aFSDx=mySameDomainShapes.FindFromKey(aFx);
- aMFaces.Add(aFSDx);
- }
- else {
- aMFaces.Add(aFx);
- }
- }
- }
- else {
- if (mySameDomainShapes.Contains(aS)) {
- const TopoDS_Shape& aFSDx=mySameDomainShapes.FindFromKey(aS);
- aMFaces.Add(aFSDx);
- }
- else {
- aMFaces.Add(aS);
- }
- }
- }
- }
- //
- aNbFaces=aMFaces.Extent();
- aNbSolids=aMSolids.Extent();
- //
- for (i=1; i<=aNbSolids; ++i) {
- const TopoDS_Solid& aSolid=TopoDS::Solid(aMSolids(i));
- aMFDone.Clear();
- aMFIN.Clear();
- aMEF.Clear();
- //
- aBB.MakeSolid(aSolidSp);
- //
- TopTools_ListOfShape aLIF;
- //
- BuildDraftSolid(aSolid, aSolidSp, aLIF);
- aNbLIF=aLIF.Extent();
- //
- // 1 all faces/edges from aSolid [ aMS ]
- bHasImage=Standard_False;
- aMS.Clear();
- aIt.Initialize(aSolid);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aShell=aIt.Value();
- //
- if (myImages.HasImage(aShell)) {
- bHasImage=Standard_True;
- //
- const TopTools_ListOfShape& aLS=myImages.Image(aShell);
- aItS.Initialize(aLS);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aSx=aItS.Value();
- aMS.Add(aSx);
- TopExp::MapShapes(aSx, TopAbs_FACE, aMS);
- TopExp::MapShapes(aSx, TopAbs_EDGE, aMS);
- TopExp::MapShapesAndAncestors(aSx, TopAbs_EDGE, TopAbs_FACE, aMEF);
- }
- }
- else {
- //aMS.Add(aShell);
- TopExp::MapShapes(aShell, TopAbs_FACE, aMS);
- //modified by NIZNHY-PKV Fri Dec 03 11:18:45 2010f
- TopExp::MapShapes(aShell, TopAbs_EDGE, aMS);
- //modified by NIZNHY-PKV Fri Dec 03 11:18:51 2010t
- TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEF);
- }
- }
- //
- // 2 all faces that are not from aSolid [ aLFP1 ]
- Standard_Integer aNbEFP;
- TopTools_IndexedDataMapOfShapeListOfShape aMEFP;
- TopTools_ListIteratorOfListOfShape aItFP, aItEx;
- TopTools_MapOfShape aMFence;
- TopTools_ListOfShape aLFP1, aLFP2, aLFP, aLCBF, aLFIN, aLEx;//*pLFP,
- //
- // for all non-solid faces build EF map [ aMEFP ]
- for (j=1; j<=aNbFaces; ++j) {
- const TopoDS_Shape& aFace=aMFaces(j);
- if (!aMS.Contains(aFace)) {
- TopExp::MapShapesAndAncestors(aFace, TopAbs_EDGE, TopAbs_FACE, aMEFP);
- }
- }
- //
- // among all faces from aMEFP select these that have same edges
- // with the solid (i.e aMEF). These faces will be treated first
- // to prevent the usage of 3D classifier.
- // The full list of faces to process is aLFP1.
- aNbEFP=aMEFP.Extent();
- for (j=1; j<=aNbEFP; ++j) {
- const TopoDS_Shape& aE=aMEFP.FindKey(j);
- //
- if (aMEF.Contains(aE)) { // !!
- const TopTools_ListOfShape& aLF=aMEFP(j);
- aItFP.Initialize(aLF);
- for (; aItFP.More(); aItFP.Next()) {
- const TopoDS_Shape& aF=aItFP.Value();
- if (aMFence.Add(aF)) {
- aLFP1.Append(aF);
- }
- }
- }
- else {
- aLEx.Append(aE);
- }
- }
- //
- aItEx.Initialize(aLEx);
- for (; aItEx.More(); aItEx.Next()) {
- const TopoDS_Shape& aE=aItEx.Value();
- const TopTools_ListOfShape& aLF=aMEFP.FindFromKey(aE);
- aItFP.Initialize(aLF);
- for (; aItFP.More(); aItFP.Next()) {
- const TopoDS_Shape& aF=aItFP.Value();
- if (aMFence.Add(aF)) {
- aLFP2.Append(aF);
- }
- }
- }
- aLFP1.Append(aLFP2);
- //==========
- //
- // 3 Process faces aLFP1
- aNbFP=aLFP1.Extent();
- aItFP.Initialize(aLFP1);
- for (; aItFP.More(); aItFP.Next()) {
- const TopoDS_Shape& aSP=aItFP.Value();
- if (!aMFDone.Add(aSP)) {
- continue;
- }
-
- //
- // first face to process
- aFP=TopoDS::Face(aSP);
- bIsIN= GEOMAlgo_Tools3D::IsInternalFace(aFP, aSolidSp, aMEF, 1.e-14, aCtx);
- aState=(bIsIN) ? TopAbs_IN : TopAbs_OUT;
- //
- // collect faces to process [ aFP is the first ]
- aLFP.Clear();
- aLFP.Append(aFP);
- aItS.Initialize(aLFP1);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aSk=aItS.Value();
- if (!aMFDone.Contains(aSk)) {
- aLFP.Append(aSk);
- }
- }
- //
- // Connexity Block that spreads from aFP the Bound
- // or till the end of the block itself
- aLCBF.Clear();
- GEOMAlgo_Tools3D::MakeConnexityBlock(aLFP, aMS, aLCBF);
- //
- // fill states for the Connexity Block
- aItS.Initialize(aLCBF);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aSx=aItS.Value();
- aMFDone.Add(aSx);
- if (aState==TopAbs_IN) {
- aMFIN.Add(aSx);
- }
- }
- //
- aNbFPx=aMFDone.Extent();
- if (aNbFPx==aNbFP) {
- break;
- }
- }//for (; aItFP.More(); aItFP.Next())
- //
- // faces Inside aSolid
- aLFIN.Clear();
- aNbFIN=aMFIN.Extent();
- if (aNbFIN || aNbLIF) {
- for (j=1; j<=aNbFIN; ++j) {
- const TopoDS_Shape& aFIN=aMFIN(j);
- aLFIN.Append(aFIN);
- }
- //
- aItS.Initialize(aLIF);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aFIN=aItS.Value();
- aLFIN.Append(aFIN);
- }
- //
- myInParts.Add(aSolid, aLFIN);
- }
- if (aNbFIN || bHasImage) {
- myDraftSolids.Add(aSolid, aSolidSp);
- }
- }//for (i=1; i<=aNbSolids; ++i) { // next solid
-}
-//=======================================================================
-//function : BuildSplitSolids
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::BuildSplitSolids()
-{
- myErrorStatus=0;
- //
- const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
- NMTTools_PaveFiller* pPF=myPaveFiller;
- const Handle(IntTools_Context)& aCtx= pPF->Context();
- //
- Standard_Integer i, aNbS, iErr;
- TopExp_Explorer aExp;
- TopTools_ListOfShape aSFS, aLSEmpty;
- TopTools_MapOfShape aMFence;
- TopTools_ListIteratorOfListOfShape aIt;
- GEOMAlgo_BuilderSolid aSB;
- GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet aItSS;
- GEOMAlgo_DataMapOfShapeShapeSet aMSS;
- GEOMAlgo_ShapeSet aSSi;
- //
- // 0. Find same domain solids for non-interferred solids
- aNbS=aDS.NumberOfShapesOfTheObject();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aS=aDS.Shape(i);
- if (aS.ShapeType()!=TopAbs_SOLID) {
- continue;
- }
- if (!aMFence.Add(aS)) {
- continue;
- }
- if(myDraftSolids.Contains(aS)) {
- continue;
- }
- //
- aSSi.Clear();
- aSSi.Add(aS, TopAbs_FACE);
- //
- aMSS.Bind(aS, aSSi);
- } //for (i=1; i<=aNbS; ++i)
- //
- // 1. Build solids for interferred source solids
- aSB.SetContext(aCtx);
- aSB.ComputeInternalShapes(myComputeInternalShapes);
- aNbS=myDraftSolids.Extent();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aS =myDraftSolids.FindKey(i);
- const TopoDS_Shape& aSD=myDraftSolids.FindFromIndex(i);
- const TopTools_ListOfShape& aLFIN=
- (myInParts.Contains(aS)) ? myInParts.FindFromKey(aS) : aLSEmpty;
- //
- // 1.1 Fill Shell Faces Set
- aSFS.Clear();
-
- aExp.Init(aSD, TopAbs_FACE);
- for (; aExp.More(); aExp.Next()) {
- const TopoDS_Shape& aF=aExp.Current();
- aSFS.Append(aF);
- }
- //
- aIt.Initialize(aLFIN);
- for (; aIt.More(); aIt.Next()) {
- TopoDS_Shape aF=aIt.Value();
- //
- aF.Orientation(TopAbs_FORWARD);
- aSFS.Append(aF);
- aF.Orientation(TopAbs_REVERSED);
- aSFS.Append(aF);
- }
- //
- Standard_Integer aNbSFS;
- aNbSFS=aSFS.Extent();
- //
- // 1.2
- // Check whether aSFS contains a subsets of faces
- // of solids that have been already built.
- // If yes, shrink aSFS by these subsets.
- aSSi.Clear();
- aSSi.Add(aSFS);
- //
- aItSS.Initialize(aMSS);
- for (; aItSS.More(); aItSS.Next()) {
- const TopoDS_Shape& aSR=aItSS.Key();
- const GEOMAlgo_ShapeSet& aSSR=aItSS.Value();
- if (aSSi.Contains(aSSR)) {
- // the aSR is SD solid for aS
- aSSi.Subtract(aSSR);
- // update images
- if(myImages.HasImage(aS)) {
- myImages.Add(aS, aSR);
- }
- else {
- myImages.Bind(aS, aSR);
- }
- //
- // update SD Shapes
- mySameDomainShapes.Add(aSR, aSR);
- }
- }
- const TopTools_ListOfShape& aSFS1=aSSi.GetSet();
- aNbSFS=aSFS1.Extent();
- //modified by NIZNHY-PKV Wed Oct 27 09:53:15 2010f
- if (!aNbSFS) {
- continue;
- }
- //modified by NIZNHY-PKV Wed Oct 27 09:53:18 2010t
- //
- // 1.3 Build new solids
- aSB.SetContext(aCtx);
- aSB.SetShapes(aSFS1);
- aSB.Perform();
- iErr=aSB.ErrorStatus();
- if (iErr) {
- myErrorStatus=30; // SolidBuilder failed
- return;
- }
- //
- const TopTools_ListOfShape& aLSR=aSB.Areas();
- //
- // 1.4 Collect resulting solids and theirs set of faces
- aIt.Initialize(aLSR);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSR=aIt.Value();
- //
- aSSi.Clear();
- aExp.Init(aSR, TopAbs_FACE);
- for (; aExp.More(); aExp.Next()) {
- const TopoDS_Shape& aF=aExp.Current();
- aSSi.Add(aF);
- }
- aMSS.Bind(aSR, aSSi);
- }
- //
- // Update images
- if (myImages.HasImage(aS)) {
- myImages.Add(aS, aLSR);
- }
- else {
- myImages.Bind(aS, aLSR);
- }
- } // for (i=1; i<=aNbS; ++i) {
-}
-//=======================================================================
-//function :FillInternalShapes
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::FillInternalShapes()
-{
- myErrorStatus=0;
- //
- const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
- NMTTools_PaveFiller* pPF=myPaveFiller;
- const Handle(IntTools_Context)& aCtx= pPF->Context();
- //
- //Standard_Boolean bHasImage;
- Standard_Integer i, j, jT, aNbS, aNbSI, aNbSx, aNbSd;
- TopAbs_ShapeEnum aType, aT[]={ TopAbs_VERTEX, TopAbs_EDGE };
- TopAbs_State aState;
- TopTools_ListIteratorOfListOfShape aIt, aIt1;
- TopTools_IndexedDataMapOfShapeListOfShape aMSx;
- TopTools_IndexedMapOfShape aMx;
- TopTools_MapOfShape aMSI, aMFence, aMSOr;
- TopTools_MapIteratorOfMapOfShape aItM;
- TopTools_ListOfShape aLSI, aLSd;
- TopoDS_Iterator aItS;
- BRep_Builder aBB;
- //
- // 1. Shapes to process
- //
- // 1.1 Shapes from pure arguments aMSI
- // 1.1.1 vertex, edge
- for (i=0; i<2; ++i) {
- jT=(Standard_Integer)aT[i];
- const TopTools_ListOfShape &aLS=myShapes1[jT];
- aIt.Initialize(aLS);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- if (aMFence.Add(aS)) {
- aLSI.Append(aS);
- }
- }
- }
- // 1.1.2 wire
- {
- jT=(Standard_Integer)TopAbs_WIRE;
- const TopTools_ListOfShape &aLW=myShapes1[jT];
- aIt.Initialize(aLW);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aW=aIt.Value();
- aItS.Initialize(aW);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aE=aItS.Value();
- if (aMFence.Add(aE)) {
- aLSI.Append(aE);
- }
- }
- }
- }
- // 1.1.3 theirs images/sources
- aIt1.Initialize(aLSI);
- for (; aIt1.More(); aIt1.Next()) {
- const TopoDS_Shape& aS=aIt1.Value();
- if (myImages.HasImage(aS)) {
- const TopTools_ListOfShape &aLSp=myImages.Image(aS);
- aIt.Initialize(aLSp);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSI=aIt.Value();
- aMSI.Add(aSI);
- }
- }
- else {
- aMSI.Add(aS);
- }
- }
- aLSI.Clear();
- aNbSI=aMSI.Extent();
- //
- // 2. Internal vertices, edges from source solids
- aMFence.Clear();
- aLSd.Clear();
- //
- aNbS=aDS.NumberOfShapesOfTheObject();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aS=aDS.Shape(i);
- aType=aS.ShapeType();
- if (aType==TopAbs_SOLID) {
- //
- aMx.Clear();
- OwnInternalShapes(aS, aMx);
- //
- aNbSx=aMx.Extent();
- for (j=1; j<=aNbSx; ++j) {
- const TopoDS_Shape& aSI=aMx(j);
- if (myImages.HasImage(aSI)) {
- const TopTools_ListOfShape &aLSp=myImages.Image(aSI);
- aIt.Initialize(aLSp);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSp=aIt.Value();
- aMSI.Add(aSp);
- }
- }
- else {
- aMSI.Add(aSI);
- }
- }
- //
- // build aux map from splits of solids
- if (myImages.HasImage(aS)) {
- const TopTools_ListOfShape &aLSp=myImages.Image(aS);
- aIt.Initialize(aLSp);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSp=aIt.Value();
- if (aMFence.Add(aSp)) {
- TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_EDGE, aMSx);
- TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_FACE, aMSx);
- TopExp::MapShapesAndAncestors(aSp, TopAbs_EDGE , TopAbs_FACE, aMSx);
- aLSd.Append(aSp);
- }
- }
- }
- else {
- if (aMFence.Add(aS)) {
- TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_EDGE, aMSx);
- TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_FACE, aMSx);
- TopExp::MapShapesAndAncestors(aS, TopAbs_EDGE , TopAbs_FACE, aMSx);
- aLSd.Append(aS);
- aMSOr.Add(aS);
- }
- }
- }//if (aType==TopAbs_SOLID)
- }
- //
- aNbSd=aLSd.Extent();
- //
- // 3. Some shapes of aMSI can be already tied with faces of
- // split solids
- aItM.Initialize(aMSI);
- for (; aItM.More(); aItM.Next()) {
- const TopoDS_Shape& aSI=aItM.Key();
- if (aMSx.Contains(aSI)) {
- const TopTools_ListOfShape &aLSx=aMSx.FindFromKey(aSI);
- aNbSx=aLSx.Extent();
- if (aNbSx) {
- aMSI.Remove(aSI);
- }
- }
- }
- //
- // 4. Just check it
- aNbSI=aMSI.Extent();
- if (!aNbSI) {
- return;
- }
- //
- // 5 Settle internal vertices and edges into solids
- aMx.Clear();
- aIt.Initialize(aLSd);
- for (; aIt.More(); aIt.Next()) {
- TopoDS_Solid aSd=TopoDS::Solid(aIt.Value());
- //
- aItM.Initialize(aMSI);
- for (; aItM.More(); aItM.Next()) {
- TopoDS_Shape aSI=aItM.Key();
- aSI.Orientation(TopAbs_INTERNAL);
- //
- aState=GEOMAlgo_Tools3D::ComputeStateByOnePoint(aSI, aSd, 1.e-11, aCtx);
- if (aState==TopAbs_IN) {
- //
- if(aMSOr.Contains(aSd)) {
- //
- TopoDS_Solid aSdx;
- //
- aBB.MakeSolid(aSdx);
- aItS.Initialize(aSd);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aSh=aItS.Value();
- aBB.Add(aSdx, aSh);
- }
- //
- aBB.Add(aSdx, aSI);
- //
- myImages.Bind(aSd, aSdx);
- aMSOr.Remove(aSd);
- aSd=aSdx;
- }
- else {
- aBB.Add(aSd, aSI);
- }
- //
- aMSI.Remove(aSI);
- } //if (aState==TopAbs_IN) {
- }// for (; aItM.More(); aItM.Next()) {
- }//for (; aIt1.More(); aIt1.Next()) {
-}
-//=======================================================================
-//function : OwnInternalShapes
-//purpose :
-//=======================================================================
- void OwnInternalShapes(const TopoDS_Shape& theS,
- TopTools_IndexedMapOfShape& theMx)
-{
- TopoDS_Iterator aIt;
- //
- aIt.Initialize(theS);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSx=aIt.Value();
- if (aSx.ShapeType()!=TopAbs_SHELL) {
- theMx.Add(aSx);
- }
- }
-}
-//
-// ErrorStatus
-// 30 - SolidBuilder failed
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Builder_4.cxx
-// Created:
-// Author: Peter KURNEV
-//
-#include <GEOMAlgo_Builder.hxx>
-
-#include <TopoDS_Iterator.hxx>
-
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
-
-#include <IntTools_Context.hxx>
-
-#include <NMTDS_ShapesDataStructure.hxx>
-
-#include <NMTTools_PaveFiller.hxx>
-
-#include <GEOMAlgo_Tools3D.hxx>
-
-static
- void MapShapes(const TopoDS_Shape& aS,
- TopTools_MapOfShape& aM);
-
-//=======================================================================
-//function : Generated
-//purpose :
-//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_Builder::Generated(const TopoDS_Shape& theS)
-{
- NMTTools_PaveFiller* pPF=myPaveFiller;
- const Handle(IntTools_Context)& aCtx=pPF->Context();
- //
- Standard_Boolean bHasImage, bToReverse;
- TopAbs_ShapeEnum aType;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- myHistShapes.Clear();
- //
- if (theS.IsNull()) {
- return myHistShapes;
- }
- //
- bHasImage=myImages.HasImage(theS);
- if (!bHasImage) {
- return myHistShapes;
- }
- //
- aType=theS.ShapeType();
- //
- if (aType==TopAbs_EDGE || aType==TopAbs_FACE ||
- aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
- const TopTools_ListOfShape& aLSp=myImages.Image(theS);
- aIt.Initialize(aLSp);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSp=aIt.Value();
- if (mySameDomainShapes.Contains(aSp)) {
- if (myMapShape.Contains(aSp)) {
- TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp);
- //
- if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
- aSpR.Orientation(theS.Orientation());
- }
- else {
- bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSpR, theS, aCtx);
- if (bToReverse) {
- aSpR.Reverse();
- }
- }
- //
- myHistShapes.Append(aSpR);
- }
- }
- }
- }
- //
- return myHistShapes;
-}
-//=======================================================================
-//function : Modified
-//purpose :
-//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_Builder::Modified(const TopoDS_Shape& theS)
-{
- NMTTools_PaveFiller* pPF=myPaveFiller;
- const Handle(IntTools_Context)& aCtx=pPF->Context();
- //
- Standard_Boolean bHasImage, bToReverse;
- TopAbs_ShapeEnum aType;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- myHistShapes.Clear();
- //
- if (theS.IsNull()) {
- return myHistShapes;
- }
- //
- bHasImage=myImages.HasImage(theS);
- if (!bHasImage) {
- return myHistShapes;
- }
- //
- aType=theS.ShapeType();
- //
- if (aType==TopAbs_EDGE || aType==TopAbs_FACE ||
- aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
- const TopTools_ListOfShape& aLSp=myImages.Image(theS);
- aIt.Initialize(aLSp);
- for (; aIt.More(); aIt.Next()) {
- TopoDS_Shape aSp=aIt.Value();
- if (!mySameDomainShapes.Contains(aSp)) {
- if (myMapShape.Contains(aSp)) {
- //
- if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
- aSp.Orientation(theS.Orientation());
- }
- else {
- bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSp, theS, aCtx);
- if (bToReverse) {
- aSp.Reverse();
- }
- }
- //
- myHistShapes.Append(aSp);
- }
- }
- }
- }
- //
- return myHistShapes;
-}
-//=======================================================================
-//function : IsDeleted
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_Builder::IsDeleted(const TopoDS_Shape& theS)
-{
- Standard_Boolean bRet, bHasImage, bContains;
- TopAbs_ShapeEnum aType;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- bRet=Standard_False;
- //
- if (theS.IsNull()) {
- return !bRet; //true
- }
- //
- bContains=myMapShape.Contains(theS);
- if (bContains) {
- return bRet; //false
- }
- //
- bHasImage=myImages.HasImage(theS);
- if (!bHasImage) {
- return !bRet; //true
- }
- //
- aType=theS.ShapeType();
- if (aType==TopAbs_EDGE || aType==TopAbs_FACE ||
- aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
- const TopTools_ListOfShape& aLSp=myImages.Image(theS);
- aIt.Initialize(aLSp);
- for (; aIt.More(); aIt.Next()) {
- TopoDS_Shape aSp=aIt.Value();
- //
- if (!mySameDomainShapes.Contains(aSp)) {
- if (myMapShape.Contains(aSp)) {
- return bRet; //false
- }
- }
- else {
- TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp);
- if (myMapShape.Contains(aSpR)) {
- return bRet; //false
- }
- }
- }
- }
- return !bRet; // true
-}
-//=======================================================================
-//function : PrepareHistory
-//purpose :
-//=======================================================================
- void GEOMAlgo_Builder::PrepareHistory()
-{
- if(myShape.IsNull()) {
- return;
- }
- //
- Standard_Boolean bHasImage, bContainsSD;
- TopAbs_ShapeEnum aType;
- TopTools_MapOfShape aMS;
- TopTools_ListIteratorOfListOfShape aIt;
- TopTools_MapIteratorOfMapOfShape aItM;
- //
- // 1. Clearing
- GEOMAlgo_BuilderShape::PrepareHistory();
- //
- // 2. myMapShape - all shapes of result with theirs sub-shapes
- MapShapes(myShape, myMapShape);
- //
- // 3. MS - all argument shapes with theirs sub-shapes
- aIt.Initialize(myShapes);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSx=aIt.Value();
- MapShapes(aSx, aMS);
- }
- //
- // 4. Treatment
- aItM.Initialize(aMS);
- for (; aItM.More(); aItM.Next()) {
- const TopoDS_Shape& aSx=aItM.Key();
- aType=aSx.ShapeType();
- //modified by NIZNHY-PKV Thu Dec 7 11:34:05 2006f
- //
- // 4.1 .myImagesResult
- TopTools_ListOfShape aLSx;
- //
- bHasImage=myImages.HasImage(aSx);
- if (!bHasImage) {
- if (myMapShape.Contains(aSx)) {
- aLSx.Append(aSx);
- myImagesResult.Add(aSx, aLSx);
- }
- }
- else {
- const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
- aIt.Initialize(aLSp);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSp=aIt.Value();
- if (myMapShape.Contains(aSp)) {
- aLSx.Append(aSp);
- }
- }
- myImagesResult.Add(aSx, aLSx);
- }
- //
- //modified by NIZNHY-PKV Thu Dec 7 11:34:10 2006t
- //
- // 4.2 As it was
- if (!myHasDeleted) {
- myHasDeleted=IsDeleted(aSx);//xx
- }
- //
- if (!myHasGenerated || !myHasModified) {
- if (aType==TopAbs_EDGE || aType==TopAbs_FACE ||
- aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
- //modified by NIZNHY-PKV Thu Dec 7 11:53:01 2006f
- //bHasImage=myImages.HasImage(aSx);
- //modified by NIZNHY-PKV Thu Dec 7 11:53:04 2006t
- if (bHasImage) {
- const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
- aIt.Initialize(aLSp);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSp=aIt.Value();
- //
- if (myMapShape.Contains(aSp)) {
- bContainsSD=mySameDomainShapes.Contains(aSp);
- //
- if (!myHasGenerated) {
- if (bContainsSD) {
- myHasGenerated=Standard_True;
- }
- }
- if (!myHasModified) {
- if (!bContainsSD) {
- myHasModified=Standard_True;
- }
- }
- } // if (myMapShape.Contains(aSp))
- }
- }
- }
- }
- }
-
-}
-//=======================================================================
-//function : MapShapes
-//purpose :
-//=======================================================================
- void MapShapes(const TopoDS_Shape& theS,
- TopTools_MapOfShape& theM)
-{
- theM.Add(theS);
- TopoDS_Iterator anIt;
- anIt.Initialize(theS);
- for (; anIt.More(); anIt.Next()) {
- const TopoDS_Shape& aSx=anIt.Value();
- MapShapes(aSx, theM);
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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.cxx
-// Created: Wed Nov 22 10:23:04 2006
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <GEOMAlgo_Clsf.hxx>
-
-IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_Clsf, GEOMAlgo_HAlgo);
-IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_Clsf, GEOMAlgo_HAlgo);
-
-//=======================================================================
-//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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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.hxx
-// Created: Wed Nov 22 10:23:04 2006
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_Clsf_HeaderFile
-#define _GEOMAlgo_Clsf_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_DefineHandle.hxx>
-//#include <Handle_GEOMAlgo_Clsf.hxx>
-#include <TopAbs_State.hxx>
-#include <gp_Pnt.hxx>
-#include <Standard_Real.hxx>
-#include <GEOMAlgo_HAlgo.hxx>
-#include <Standard_Boolean.hxx>
-#include <Handle_Geom_Curve.hxx>
-#include <Handle_Geom_Surface.hxx>
-#include <Geom_Curve.hxx>
-#include <Geom_Surface.hxx>
-
-DEFINE_STANDARD_HANDLE(GEOMAlgo_Clsf, GEOMAlgo_HAlgo);
-
-//=======================================================================
-//class : GEOMAlgo_Clsf
-//purpose :
-//=======================================================================
-class GEOMAlgo_Clsf : public GEOMAlgo_HAlgo
-{
- 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;
-
- DEFINE_STANDARD_RTTI(GEOMAlgo_Clsf);
-
- protected:
- Standard_EXPORT
- GEOMAlgo_Clsf();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_Clsf();
-
- TopAbs_State myState;
- gp_Pnt myPnt;
- Standard_Real myTolerance;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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.cxx
-// Created: Wed Nov 22 10:41:47 2006
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <GEOMAlgo_ClsfBox.hxx>
-
-#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>
-
-IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf)
-IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf)
-
-//=======================================================================
-//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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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.hxx
-// Created: Wed Nov 22 10:41:47 2006
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_ClsfBox_HeaderFile
-#define _GEOMAlgo_ClsfBox_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_DefineHandle.hxx>
-//#include <Handle_GEOMAlgo_ClsfBox.hxx>
-#include <TopoDS_Shape.hxx>
-#include <GeomAdaptor_Surface.hxx>
-#include <GEOMAlgo_Clsf.hxx>
-#include <Standard_Boolean.hxx>
-#include <Handle_Geom_Curve.hxx>
-#include <Handle_Geom_Surface.hxx>
-#include <Geom_Curve.hxx>
-#include <Geom_Surface.hxx>
-
-DEFINE_STANDARD_HANDLE(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf)
-
-//=======================================================================
-//function : GEOMAlgo_ClsfBox
-//purpose :
-//=======================================================================
-class GEOMAlgo_ClsfBox : public GEOMAlgo_Clsf
-{
- 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;
-
- DEFINE_STANDARD_RTTI(GEOMAlgo_ClsfBox)
-
- protected:
- TopoDS_Shape myBox;
- GeomAdaptor_Surface myGAS[6];
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_ClsfSolid.cxx
-// Created: Mon Jan 29 10:35:46 2007
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <GEOMAlgo_ClsfSolid.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-#include <TopoDS.hxx>
-#include <TopoDS_Solid.hxx>
-#include <BRep_Builder.hxx>
-#include <BRepClass3d_SolidClassifier.hxx>
-
-IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf)
-IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf)
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- GEOMAlgo_ClsfSolid::GEOMAlgo_ClsfSolid()
-:
- GEOMAlgo_Clsf()
-{
- myPClsf=NULL;
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
- GEOMAlgo_ClsfSolid::~GEOMAlgo_ClsfSolid()
-{
- if (myPClsf) {
- BRepClass3d_SolidClassifier* pSC;
- //
- pSC=(BRepClass3d_SolidClassifier*)myPClsf;
- delete pSC;
- }
-}
-//=======================================================================
-//function : SetShape
-//purpose :
-//=======================================================================
- void GEOMAlgo_ClsfSolid::SetShape(const TopoDS_Shape& aS)
-{
- myShape=aS;
-}
-//=======================================================================
-//function : Shape
-//purpose :
-//=======================================================================
- const TopoDS_Shape& GEOMAlgo_ClsfSolid::Shape()const
-{
- return myShape;
-}
-//=======================================================================
-//function : CheckData
-//purpose :
-//=======================================================================
- void GEOMAlgo_ClsfSolid::CheckData()
-{
- myErrorStatus=0;
- //
- BRepClass3d_SolidClassifier* pSC;
- TopAbs_ShapeEnum aType;
- BRep_Builder aBB;
- TopoDS_Solid aS;
- //
- if (myShape.IsNull()) {
- myErrorStatus=10; // mySolid=NULL
- return;
- }
- //
- aType=myShape.ShapeType();
- if (!(aType==TopAbs_SOLID || aType==TopAbs_SHELL)) {
- myErrorStatus=12;
- return;
- }
- //
- //===
- if (aType==TopAbs_SOLID) {
- aS=TopoDS::Solid(myShape);
- }
- else {
- aBB.MakeSolid(aS);
- aBB.Add(aS, myShape);
- }
- //
- if (myPClsf) {
- pSC=(BRepClass3d_SolidClassifier*)myPClsf;
- delete pSC;
- }
- //
- pSC=new BRepClass3d_SolidClassifier(aS);
- myPClsf=pSC;
-}
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
- void GEOMAlgo_ClsfSolid::Perform()
-{
- myErrorStatus=0;
- //
- if (!myPClsf) {
- myErrorStatus=11;
- return;
- }
- //
- BRepClass3d_SolidClassifier* pSC;
- //
- pSC=(BRepClass3d_SolidClassifier*)myPClsf;
- pSC->Perform(myPnt, myTolerance);
- myState=pSC->State();
-}
-//
-// myErrorStatus :
-//
-// 10 - mySolid=NULL
-// 11 - myPClsf=NULL
-// 12 - unallowed type of myShape
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_ClsfSolid.hxx
-// Created: Mon Jan 29 10:35:46 2007
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_ClsfSolid_HeaderFile
-#define _GEOMAlgo_ClsfSolid_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_DefineHandle.hxx>
-//#include <Handle_GEOMAlgo_ClsfSolid.hxx>
-#include <TopoDS_Shape.hxx>
-#include <Standard_Address.hxx>
-#include <GEOMAlgo_Clsf.hxx>
-
-DEFINE_STANDARD_HANDLE(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf)
-
-//=======================================================================
-//class : GEOMAlgo_ClsfSolid
-//purpose :
-//=======================================================================
-class GEOMAlgo_ClsfSolid : public GEOMAlgo_Clsf
-{
- public:
- Standard_EXPORT
- GEOMAlgo_ClsfSolid();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_ClsfSolid();
-
- Standard_EXPORT
- void SetShape(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- const TopoDS_Shape& Shape() const;
-
- Standard_EXPORT
- virtual void Perform() ;
-
- Standard_EXPORT
- virtual void CheckData() ;
-
- DEFINE_STANDARD_RTTI(GEOMAlgo_ClsfSolid)
-
- protected:
- TopoDS_Shape myShape;
- Standard_Address myPClsf;
-
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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.hxx>
-#include <GeomAbs_SurfaceType.hxx>
-#include <GEOMAlgo_SurfaceTools.hxx>
-#include <GeomAdaptor_Curve.hxx>
-
-IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf);
-IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf);
-
-//=======================================================================
-//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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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.hxx
-// Created: Wed Nov 22 10:41:47 2006
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_ClsfSurf_HeaderFile
-#define _GEOMAlgo_ClsfSurf_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_DefineHandle.hxx>
-//#include <Handle_GEOMAlgo_ClsfSurf.hxx>
-#include <Handle_Geom_Surface.hxx>
-#include <GeomAdaptor_Surface.hxx>
-#include <GEOMAlgo_Clsf.hxx>
-#include <Standard_Boolean.hxx>
-#include <Handle_Geom_Curve.hxx>
-#include <Geom_Surface.hxx>
-#include <Geom_Curve.hxx>
-
-DEFINE_STANDARD_HANDLE(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf)
-
-//=======================================================================
-// class : GEOMAlgo_ClsfSurf
-//purpose :
-//=======================================================================
-class GEOMAlgo_ClsfSurf : public GEOMAlgo_Clsf
-{
- 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;
-
- DEFINE_STANDARD_RTTI(GEOMAlgo_ClsfSurf);
-
- protected:
- Handle_Geom_Surface myS;
- GeomAdaptor_Surface myGAS;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_CoupleOfShapes.cxx
-// Created: Wed Dec 15 13:03:52 2004
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <GEOMAlgo_CoupleOfShapes.hxx>
-//=======================================================================
-//function : GEOMAlgo_CoupleOfShapes
-//purpose :
-//=======================================================================
-GEOMAlgo_CoupleOfShapes::GEOMAlgo_CoupleOfShapes()
-{}
-//=======================================================================
-//function : SetShapes
-//purpose :
-//=======================================================================
-void GEOMAlgo_CoupleOfShapes::SetShapes(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2)
-{
- myShape1=aS1;
- myShape2=aS2;
-}
-//=======================================================================
-//function : Shapes
-//purpose :
-//=======================================================================
-void GEOMAlgo_CoupleOfShapes::Shapes(TopoDS_Shape& aS1,
- TopoDS_Shape& aS2)const
-{
- aS1=myShape1;
- aS2=myShape2;
-}
-//=======================================================================
-//function : SetShape1
-//purpose :
-//=======================================================================
-void GEOMAlgo_CoupleOfShapes::SetShape1(const TopoDS_Shape& aS1)
-{
- myShape1=aS1;
-}
-//=======================================================================
-//function : SetShape2
-//purpose :
-//=======================================================================
-void GEOMAlgo_CoupleOfShapes::SetShape2(const TopoDS_Shape& aS2)
-{
- myShape2=aS2;
-}
-//=======================================================================
-//function : Shape1
-//purpose :
-//=======================================================================
-const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape1()const
-{
- return myShape1;
-}
-//=======================================================================
-//function : Shape2
-//purpose :
-//=======================================================================
-const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape2()const
-{
- return myShape2;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_CoupleOfShapes.hxx
-// Created: Wed Dec 15 13:03:52 2004
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-
-#ifndef _GEOMAlgo_CoupleOfShapes_HeaderFile
-#define _GEOMAlgo_CoupleOfShapes_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <TopoDS_Shape.hxx>
-
-//=======================================================================
-//class : GEOMAlgo_CoupleOfShapes
-//purpose :
-//=======================================================================
-class GEOMAlgo_CoupleOfShapes
-{
- public:
- Standard_EXPORT
- GEOMAlgo_CoupleOfShapes();
-
- Standard_EXPORT
- void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ;
-
- Standard_EXPORT
- void SetShape1(const TopoDS_Shape& aS1) ;
-
- Standard_EXPORT
- void SetShape2(const TopoDS_Shape& aS2) ;
-
- Standard_EXPORT
- void Shapes(TopoDS_Shape& aS1,TopoDS_Shape& aS2) const;
-
- Standard_EXPORT
- const TopoDS_Shape& Shape1() const;
-
- Standard_EXPORT
- const TopoDS_Shape& Shape2() const;
-
-protected:
- TopoDS_Shape myShape1;
- TopoDS_Shape myShape2;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx
-// Created: Wed Feb 22 11:05:01 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
-#define GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
-
-#ifndef GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
-#include <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapIteratorOfDataMapOfPassKeyInteger.hxx
-// Created: Wed Feb 22 10:58:14 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile
-#define GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile
-
-#ifndef GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile
-#include <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
-#endif
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx
-// Created: Wed Feb 22 11:01:34 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile
-#define GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile
-
-#ifndef GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile
-#include <GEOMAlgo_DataMapOfPassKeyShapeShape.hxx>
-#endif
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapIteratorOfDataMapOfRealListOfShape.hxx
-// Created: Wed Feb 22 10:53:47 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile
-#define GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile
-
-#ifndef GEOMAlgo_DataMapOfRealListOfShape_HeaderFile
-#include <GEOMAlgo_DataMapOfRealListOfShape.hxx>
-#endif
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx
-// Created: Wed Feb 22 11:08:26 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile
-#define GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile
-
-#ifndef GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile
-#include <GEOMAlgo_DataMapOfShapeMapOfShape.hxx>
-#endif
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapIteratorOfDataMapOfShapePnt.hxx
-// Created: Wed Feb 22 11:11:09 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile
-#define GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile
-
-#ifndef GEOMAlgo_DataMapOfShapePnt_HeaderFile
-#include <GEOMAlgo_DataMapOfShapePnt.hxx>
-#endif
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapIteratorOfDataMapOfShapeReal.hxx
-// Created: Wed Feb 22 10:49:11 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile
-#define GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile
-
-#ifndef GEOMAlgo_DataMapOfShapeReal_HeaderFile
-#include <GEOMAlgo_DataMapOfShapeReal.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapIteratorOfDataMapOfShapeShapeSet.hxx
-// Created: Wed Feb 22 08:39:02 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile
-#define GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile
-
-#ifndef GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile
-#include <GEOMAlgo_DataMapOfShapeShapeSet.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapOfOrientedShapeShape.hxx
-// Created: Wed Feb 22 11:03:36 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
-#define GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_OrientedShapeMapHasher.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_DataMap.hxx>
-
-
-typedef NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_OrientedShapeMapHasher> GEOMAlgo_DataMapOfOrientedShapeShape;
-typedef GEOMAlgo_DataMapOfOrientedShapeShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape;
-
-#undef _NCollection_MapHasher
-
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapOfPassKeyInteger.hxx
-// Created: Wed Feb 22 10:55:55 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile
-#define GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile
-
-#include <GEOMAlgo_PassKey.hxx>
-#include <Standard_Integer.hxx>
-#include <GEOMAlgo_PassKeyMapHasher.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_DataMap.hxx>
-
-typedef NCollection_DataMap<GEOMAlgo_PassKey, Standard_Integer, GEOMAlgo_PassKeyMapHasher> GEOMAlgo_DataMapOfPassKeyInteger;
-typedef GEOMAlgo_DataMapOfPassKeyInteger::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger;
-
-#undef _NCollection_MapHasher
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapOfPassKeyShapeShape.hxx
-// Created: Wed Feb 22 11:00:16 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile
-#define GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile
-
-#include <GEOMAlgo_PassKey.hxx>
-#include <TopoDS_Shape.hxx>
-#include <GEOMAlgo_PassKeyMapHasher.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_DataMap.hxx>
-
-
-typedef NCollection_DataMap<GEOMAlgo_PassKey, TopoDS_Shape, GEOMAlgo_PassKeyMapHasher> GEOMAlgo_DataMapOfPassKeyShapeShape;
-typedef GEOMAlgo_DataMapOfPassKeyShapeShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape;
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapOfRealListOfShape.hxx
-// Created: Wed Feb 22 10:51:48 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_DataMapOfRealListOfShape_HeaderFile
-#define GEOMAlgo_DataMapOfRealListOfShape_HeaderFile
-
-#include <Standard_Real.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TColStd_MapRealHasher.hxx>
-
-
-#define _NCollection_MapHasher
-#include <NCollection_DataMap.hxx>
-
-typedef NCollection_DataMap<Standard_Real, TopTools_ListOfShape, TColStd_MapRealHasher> GEOMAlgo_DataMapOfRealListOfShape;
-typedef GEOMAlgo_DataMapOfRealListOfShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape;
-
-#undef _NCollection_MapHasher
-
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapOfShapeMapOfShape.hxx
-// Created: Wed Feb 22 11:07:16 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile
-#define GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile
-
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_DataMap.hxx>
-
-
-typedef NCollection_DataMap<TopoDS_Shape, TopTools_MapOfShape, TopTools_ShapeMapHasher> GEOMAlgo_DataMapOfShapeMapOfShape;
-typedef GEOMAlgo_DataMapOfShapeMapOfShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape;
-
-#undef _NCollection_MapHasher
-
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapOfShapePnt.hxx
-// Created: Wed Feb 22 11:10:15 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_DataMapOfShapePnt_HeaderFile
-#define GEOMAlgo_DataMapOfShapePnt_HeaderFile
-
-
-#include <TopoDS_Shape.hxx>
-#include <gp_Pnt.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_DataMap.hxx>
-#include <gp_Pnt.hxx>
-
-typedef NCollection_DataMap<TopoDS_Shape, gp_Pnt, TopTools_ShapeMapHasher> GEOMAlgo_DataMapOfShapePnt;
-typedef GEOMAlgo_DataMapOfShapePnt::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt;
-
-#undef _NCollection_MapHasher
-
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapOfShapeReal.hxx
-// Created: Wed Feb 22 10:47:23 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_DataMapOfShapeReal_HeaderFile
-#define GEOMAlgo_DataMapOfShapeReal_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <Standard_Real.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_DataMap.hxx>
-
-typedef NCollection_DataMap<TopoDS_Shape, Standard_Real, TopTools_ShapeMapHasher> GEOMAlgo_DataMapOfShapeReal;
-typedef GEOMAlgo_DataMapOfShapeReal::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal;
-
-#undef _NCollection_MapHasher
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_DataMapOfShapeShapeSet.hxx
-// Created: Wed Feb 22 08:36:15 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile
-#define GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <GEOMAlgo_ShapeSet.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_DataMap.hxx>
-
-
-typedef NCollection_DataMap<TopoDS_Shape, GEOMAlgo_ShapeSet, TopTools_ShapeMapHasher> GEOMAlgo_DataMapOfShapeShapeSet;
-typedef GEOMAlgo_DataMapOfShapeShapeSet::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet;
-
-#undef _NCollection_MapHasher
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_FinderShapeOn.cxx
-// Created: Tue Jan 11 14:44:31 2005
-// Author: Peter KURNEV
-
-#include <GEOMAlgo_FinderShapeOn.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
-#include <Precision.hxx>
-#endif
-
-#include <gp_Pnt.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-#include <TopAbs_Orientation.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Compound.hxx>
-#include <TopoDS_Shell.hxx>
-#include <TopoDS_Solid.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Iterator.hxx>
-
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_DataMapOfShapeShape.hxx>
-
-#include <Bnd_Box.hxx>
-#include <BRepBndLib.hxx>
-#include <BRepMesh_IncrementalMesh.hxx>
-
-#include <BRep_Builder.hxx>
-#include <BRep_Tool.hxx>
-
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <BRepLib_MakeFace.hxx>
-#include <BRepLib_FaceError.hxx>
-
-#include <BOPTools_DSFiller.hxx>
-
-#include <GEOMAlgo_WireSolid.hxx>
-#include <GEOMAlgo_ShellSolid.hxx>
-#include <GEOMAlgo_VertexSolid.hxx>
-#include <GEOMAlgo_ShapeSolid.hxx>
-#include <GEOMAlgo_SolidSolid.hxx>
-#include <GEOMAlgo_SurfaceTools.hxx>
-#include <GEOMAlgo_Tools.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_FinderShapeOn
-//purpose :
-//=======================================================================
-GEOMAlgo_FinderShapeOn::GEOMAlgo_FinderShapeOn()
-:
- GEOMAlgo_ShapeAlgo()
-{
- myTolerance=0.0001;
- myShapeType=TopAbs_VERTEX;
- myState=GEOMAlgo_ST_UNKNOWN;
- myIsAnalytic=Standard_True;
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-GEOMAlgo_FinderShapeOn::~GEOMAlgo_FinderShapeOn()
-{
-}
-//=======================================================================
-//function : SetSurface
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn::SetSurface(const Handle(Geom_Surface)& aS)
-{
- mySurface=aS;
-}
-//=======================================================================
-//function : Surface
-//purpose :
-//=======================================================================
-const Handle(Geom_Surface)& GEOMAlgo_FinderShapeOn::Surface() const
-{
- return mySurface;
-}
-//=======================================================================
-//function : SetShapeType
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn::SetShapeType(const TopAbs_ShapeEnum aType)
-{
- myShapeType=aType;
-}
-//=======================================================================
-//function : ShapeType
-//purpose :
-//=======================================================================
-TopAbs_ShapeEnum GEOMAlgo_FinderShapeOn::ShapeType()const
-{
- return myShapeType;
-}
-//=======================================================================
-//function : SetState
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn::SetState(const GEOMAlgo_State aState)
-{
- myState=aState;
-}
-//=======================================================================
-//function : State
-//purpose :
-//=======================================================================
-GEOMAlgo_State GEOMAlgo_FinderShapeOn::State() const
-{
- return myState;
-}
-//=======================================================================
-// function: Shapes
-// purpose:
-//=======================================================================
-const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn::Shapes() const
-{
- Standard_Boolean bIsConformState;
- Standard_Integer i, aNb;
- TopAbs_State aSt;
- 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);
- aSt=myMSS.FindFromIndex(i);
- //
- bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
- if (bIsConformState) {
- pL->Append(aS);
- }
- }
- return myLS;
-}
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn::Perform()
-{
- myErrorStatus=0;
- myWarningStatus=0;
- myLS.Clear();
- myMSS.Clear();
- //
- if (!myResult.IsNull()){
- myResult.Nullify();
- }
- //
- CheckData();
- if(myErrorStatus) {
- return;
- }
- //
- // Initialize the context
- GEOMAlgo_ShapeAlgo::Perform();
- //
- myIsAnalytic=GEOMAlgo_SurfaceTools::IsAnalytic(mySurface);
- //
- MakeArgument1();
- if(myErrorStatus) {
- return;
- }
- //
- if (myIsAnalytic && myShapeType==TopAbs_VERTEX) {
- FindVertices();
- return;
- }
- //
- MakeArgument2();
- if(myErrorStatus) {
- return;
- }
- //
- Find();
- if(myErrorStatus || myWarningStatus) {
- return;
- }
- //
-}
-//=======================================================================
-//function : FindVertices
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn::FindVertices()
-{
- Standard_Integer i, aNb, iErr;
- TopAbs_State aSt;
- TopAbs_Orientation aOr;
- gp_Pnt aP;
- TopTools_IndexedMapOfShape aM;
- //
- TopExp::MapShapes(myArg1, TopAbs_FACE, aM);
- const TopoDS_Face& aF=TopoDS::Face(aM(1));
- aOr=aF.Orientation();
- //
- aM.Clear();
- TopExp::MapShapes(myShape, myShapeType, aM);
- aNb=aM.Extent();
- if (!aNb) {
- myWarningStatus=10; // No found sub-shapes of type myShapeType
- return;
- }
- //
- for (i=1; i<=aNb; ++i) {
- const TopoDS_Shape& aS=aM(i);
- const TopoDS_Vertex& aV=TopoDS::Vertex(aS);
- aP=BRep_Tool::Pnt(aV);
- iErr=GEOMAlgo_SurfaceTools::GetState(aP, mySurface, myTolerance, aSt);
- if (aOr==TopAbs_REVERSED) {
- aSt=GEOMAlgo_SurfaceTools::ReverseState(aSt);
- }
- myMSS.Add(aS, aSt);
- }
-}
-//=======================================================================
-//function : Find
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn::Find()
-{
- Standard_Integer i, aNb;
- Standard_Boolean bICS;
- TopTools_IndexedMapOfShape aM;
- //
- TopExp::MapShapes(myArg2, myShapeType, aM);
- //
- aNb=aM.Extent();
- if (!aNb) {
- myWarningStatus=10; // No found sub-shapes of type myShapeType
- return;
- }
- //
- bICS=GEOMAlgo_Tools::IsCompositeShape(myArg2);
- if (!bICS || myIsAnalytic) {
- TopoDS_Compound aCmp;
- BRep_Builder aBB;
- //
- aBB.MakeCompound(aCmp);
- for (i=1; i<=aNb; ++i) {
- const TopoDS_Shape& aSi=aM(i);
- aBB.Add(aCmp, aSi);
- }
- //
- aM.Clear();
- aM.Add(aCmp);
- aNb=1;
- }
- //
- for (i=1; i<=aNb; ++i) {
- const TopoDS_Shape& aS=aM(i);
- Find(aS);
- if (myErrorStatus) {
- return;
- }
- }
-}
-//=======================================================================
-//function : Find
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn::Find(const TopoDS_Shape& aS)
-{
- myErrorStatus=0;
- //
- Standard_Boolean bIsDone;
- Standard_Integer i, iErr;
- TopAbs_State aSts[]={TopAbs_IN, TopAbs_OUT, TopAbs_ON};
- TopTools_ListIteratorOfListOfShape aIt;
- BOPTools_DSFiller aDF;
- //
- // 1. Prepare DSFiller
- aDF.SetShapes (myArg1, aS);
- bIsDone=aDF.IsDone();
- if (!bIsDone) {
- myErrorStatus=30; // wrong args are used for DSFiller
- return;
- }
- aDF.Perform();
- bIsDone=aDF.IsDone();
- if (!bIsDone) {
- myErrorStatus=31; // DSFiller failed
- return;
- }
- //
- // 2. Find shapes
- GEOMAlgo_ShapeSolid* pSS;
- GEOMAlgo_VertexSolid aVXS;
- GEOMAlgo_WireSolid aWRS;
- GEOMAlgo_ShellSolid aSHS;
- GEOMAlgo_SolidSolid aSLS;
- //
- pSS=NULL;
- //
- switch (myShapeType) {
- case TopAbs_VERTEX:
- pSS=&aVXS;
- break;
- case TopAbs_EDGE:
- pSS=&aWRS;
- break;
- case TopAbs_FACE:
- pSS=&aSHS;
- break;
- case TopAbs_SOLID:
- aSLS.SetShape2(myArg2);
- pSS=&aSLS;
- break;
- default:
- myErrorStatus=12; // unallowed sub-shape type
- return;
- }
- //
- pSS->SetFiller(aDF);
- pSS->Perform();
- iErr=pSS->ErrorStatus();
- if (iErr) {
- myErrorStatus=32; // builder ShapeSolid failed
- return;
- }
- //
- for (i=0; i<3; ++i) {
- const TopTools_ListOfShape& aLS=pSS->Shapes(aSts[i]);
- aIt.Initialize(aLS);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSImage=aIt.Value();
- if (myImages.IsBound(aSImage)) {
- const TopoDS_Shape& aSx=myImages.Find(aSImage);
- myMSS.Add(aSx, aSts[i]);
- }
- else {
- myErrorStatus=33;// can not find original shape
- return;
- }
- }
- }
-}
-//=======================================================================
-//function : MakeArgument1
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn::MakeArgument1()
-{
- myErrorStatus=0;
- //
- Standard_Integer i, aNb;
- TopAbs_ShapeEnum aType;
- BRepLib_FaceError aFErr;
- BRepLib_MakeFace aMF;
- TopTools_IndexedMapOfShape aM;
- BRep_Builder aBB;
- TopoDS_Face aFace;
- TopoDS_Shell aSh;
- TopoDS_Solid aSd;
- //
- // Argument 1
- if (!myIsAnalytic) {
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- aMF.Init(mySurface, Standard_True, Precision::Confusion());
-#else
- aMF.Init(mySurface, Standard_True);
-#endif
- aFErr=aMF.Error();
- if (aFErr!=BRepLib_FaceDone) {
- myErrorStatus=20; // can not build the face
- return;
- }
- //
- const TopoDS_Shape& aF=aMF.Shape();
- aFace=TopoDS::Face(aF);
- //
- // update tolerances
- aM.Add(aF);
- TopExp::MapShapes(aF, TopAbs_VERTEX, aM);
- TopExp::MapShapes(aF, TopAbs_EDGE, aM);
- aNb=aM.Extent();
- for (i=1; i<=aNb; ++i) {
- const TopoDS_Shape& aS=aM(i);
- aType=aS.ShapeType();
- switch (aType) {
- case TopAbs_VERTEX: {
- const TopoDS_Vertex& aVx=TopoDS::Vertex(aS);
- aBB.UpdateVertex(aVx, myTolerance);
- }
- break;
- case TopAbs_EDGE: {
- const TopoDS_Edge& aEx=TopoDS::Edge(aS);
- aBB.UpdateEdge(aEx, myTolerance);
- }
- break;
- case TopAbs_FACE: {
- const TopoDS_Face& aFx=TopoDS::Face(aS);
- aBB.UpdateFace(aFx, myTolerance);
- }
- break;
- default:
- break;
- }
- }
- } //
- else {
- aBB.MakeFace(aFace, mySurface, myTolerance);
- }
- //
- // make solid
- aBB.MakeShell(aSh);
- aBB.Add(aSh, aFace);
- aBB.MakeSolid(aSd);
- aBB.Add(aSd, aSh);
- myArg1=aSd;
-}
-//=======================================================================
-//function : MakeArgument2
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn::MakeArgument2()
-{
- myErrorStatus=0;
- //
- TopoDS_Shape aSC;
- TopTools_DataMapOfShapeShape aOriginals;
- //
- myImages.Clear();
- //
- GEOMAlgo_FinderShapeOn::CopySource(myShape, myImages, aOriginals, aSC);
- //
- myArg2=aSC;
-}
-//=======================================================================
-//function : CheckData
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn::CheckData()
-{
- myErrorStatus=0;
- //
- if(mySurface.IsNull()) {
- myErrorStatus=10; // mySurface=NULL
- 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 sub-shape type
- return;
- }
- //
- if (myState==GEOMAlgo_ST_UNKNOWN ||
- myState==GEOMAlgo_ST_INOUT) {
- myErrorStatus=13; // unallowed state type
- return;
- }
-}
-//
-//=======================================================================
-//function : CopySource
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn::CopySource(const TopoDS_Shape& aE,
- TopTools_DataMapOfShapeShape& aImages,
- TopTools_DataMapOfShapeShape& aOriginals,
- TopoDS_Shape& aEx)
-{
- Standard_Boolean bFree;
- TopAbs_ShapeEnum aType;
- Standard_Integer aR;
- BRep_Builder BB;
- TopoDS_Iterator aIt;
- //
- aType=aE.ShapeType();
- //
- if (aOriginals.IsBound(aE)) {
- aEx=aOriginals.ChangeFind(aE);
- return;
- }
- else {
- aEx=aE.EmptyCopied();
- aOriginals.Bind(aE, aEx);
- aImages.Bind(aEx, aE);
- }
- //
- aR=(Standard_Integer)aType+1;
- if (aR>TopAbs_VERTEX) {
- return;
- }
- //
- bFree=aEx.Free();
- aEx.Free(Standard_True);
- //
- aType=(TopAbs_ShapeEnum) aR;
- //
- aIt.Initialize(aE);//, Standard_False);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aV=aIt.Value();
- TopoDS_Shape aVx;
- //
- CopySource (aV, aImages, aOriginals, aVx);
- //
- aVx.Orientation(aV.Orientation());
- BB.Add(aEx, aVx);
- }
- //
- aEx.Free(bFree);
-}
-//
-//=======================================================================
-//function : BuildTriangulation
-//purpose :
-//=======================================================================
-Standard_Boolean
- GEOMAlgo_FinderShapeOn::BuildTriangulation (const TopoDS_Shape& theShape)
-{
- // calculate deflection
- Standard_Real aDeviationCoefficient = 0.001;
-
- Bnd_Box B;
- BRepBndLib::Add(theShape, B);
- Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
- B.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
-
- Standard_Real dx = aXmax - aXmin, dy = aYmax - aYmin, dz = aZmax - aZmin;
- Standard_Real aDeflection = Max(Max(dx, dy), dz) * aDeviationCoefficient * 4;
- Standard_Real aHLRAngle = 0.349066;
-
- // build triangulation
- BRepMesh_IncrementalMesh Inc (theShape, aDeflection, Standard_False, aHLRAngle);
-
- // check triangulation
- bool isTriangulation = true;
-
- TopExp_Explorer exp (theShape, TopAbs_FACE);
- if (exp.More())
- {
- TopLoc_Location aTopLoc;
- Handle(Poly_Triangulation) aTRF;
- aTRF = BRep_Tool::Triangulation(TopoDS::Face(exp.Current()), aTopLoc);
- if (aTRF.IsNull()) {
- isTriangulation = false;
- }
- }
- else // no faces, try edges
- {
- TopExp_Explorer expe (theShape, TopAbs_EDGE);
- if (!expe.More()) {
- isTriangulation = false;
- }
- else {
- TopLoc_Location aLoc;
- Handle(Poly_Polygon3D) aPE = BRep_Tool::Polygon3D(TopoDS::Edge(expe.Current()), aLoc);
- if (aPE.IsNull()) {
- isTriangulation = false;
- }
- }
- }
-
- return isTriangulation;
-}
-
-//
-// myErrorStatus :
-//
-// 10 -mySurface=NULL
-// 11 -myShape=NULL
-// 12 -unallowed type of sub-shapes
-// 13 -unallowed state
-// 20 -can not build the face
-// 30 -wrong args are used for DSFiller
-// 31 -DSFiller failed
-// 32 -builder ShapeSolid failed
-// 33 -can not find original shape
-//
-// myWarningStatus
-//
-// 10 - sub-shapes of type myShapeType can not be fond in myShape
+++ /dev/null
-
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_FinderShapeOn.hxx
-// Created: Tue Jan 11 14:44:31 2005
-// Author: Peter KURNEV
-
-#ifndef _GEOMAlgo_FinderShapeOn_HeaderFile
-#define _GEOMAlgo_FinderShapeOn_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Handle_Geom_Surface.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <GEOMAlgo_State.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_DataMapOfShapeShape.hxx>
-#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
-#include <Standard_Boolean.hxx>
-#include <GEOMAlgo_ShapeAlgo.hxx>
-#include <Geom_Surface.hxx>
-#include <TopoDS_Shape.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_FinderShapeOn
-//purpose :
-//=======================================================================
-class GEOMAlgo_FinderShapeOn : public GEOMAlgo_ShapeAlgo
-{
- public:
- Standard_EXPORT
- GEOMAlgo_FinderShapeOn();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_FinderShapeOn();
-
- Standard_EXPORT
- virtual void Perform() ;
-
- Standard_EXPORT
- void SetSurface(const Handle(Geom_Surface)& aS) ;
-
- Standard_EXPORT
- void SetShapeType(const TopAbs_ShapeEnum aST) ;
-
- Standard_EXPORT
- void SetState(const GEOMAlgo_State aSF) ;
-
- Standard_EXPORT
- const Handle_Geom_Surface& Surface() const;
-
- Standard_EXPORT
- TopAbs_ShapeEnum ShapeType() const;
-
- Standard_EXPORT
- GEOMAlgo_State State() const;
-
- Standard_EXPORT
- const TopTools_ListOfShape& Shapes() const;
-
- Standard_EXPORT
- static void CopySource(const TopoDS_Shape& aS,
- TopTools_DataMapOfShapeShape& aImages,
- TopTools_DataMapOfShapeShape& aOriginals,
- TopoDS_Shape& aSC) ;
-
- Standard_EXPORT
- static Standard_Boolean BuildTriangulation(const TopoDS_Shape& aS) ;
-
-protected:
- Standard_EXPORT
- virtual void CheckData() ;
-
- Standard_EXPORT
- void MakeArgument1() ;
-
- Standard_EXPORT
- void MakeArgument2() ;
-
- Standard_EXPORT
- void Find() ;
-
- Standard_EXPORT
- void Find(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- void FindVertices() ;
-
-
- Handle_Geom_Surface mySurface;
- TopAbs_ShapeEnum myShapeType;
- GEOMAlgo_State myState;
- TopoDS_Shape myArg1;
- TopoDS_Shape myArg2;
- TopTools_ListOfShape myLS;
- TopTools_DataMapOfShapeShape myImages;
- GEOMAlgo_IndexedDataMapOfShapeState myMSS;
- Standard_Boolean myIsAnalytic;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-
-#include <GEOMAlgo_FinderShapeOn1.hxx>
-
-#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 <Poly_Polygon3D.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_FinderShapeOn.hxx>
-
-#include <GEOMAlgo_PassKey.hxx>
-#include <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_FinderShapeOn1
-//purpose :
-//=======================================================================
-GEOMAlgo_FinderShapeOn1::GEOMAlgo_FinderShapeOn1()
-:
- GEOMAlgo_ShapeAlgo()
-{
- myTolerance=0.0001;
- myShapeType=TopAbs_VERTEX;
- myState=GEOMAlgo_ST_UNKNOWN;
- myNbPntsMin=3;
- myNbPntsMax=0;
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-GEOMAlgo_FinderShapeOn1::~GEOMAlgo_FinderShapeOn1()
-{
-}
-//=======================================================================
-//function : SetSurface
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn1::SetSurface(const Handle(Geom_Surface)& aS)
-{
- mySurface=aS;
-}
-//=======================================================================
-//function : Surface
-//purpose :
-//=======================================================================
-const Handle(Geom_Surface)& GEOMAlgo_FinderShapeOn1::Surface() const
-{
- return mySurface;
-}
-//=======================================================================
-//function : SetShapeType
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn1::SetShapeType(const TopAbs_ShapeEnum aType)
-{
- myShapeType=aType;
-}
-//=======================================================================
-//function : ShapeType
-//purpose :
-//=======================================================================
-TopAbs_ShapeEnum GEOMAlgo_FinderShapeOn1::ShapeType()const
-{
- return myShapeType;
-}
-//=======================================================================
-//function : SetState
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn1::SetState(const GEOMAlgo_State aState)
-{
- myState=aState;
-}
-//=======================================================================
-//function : State
-//purpose :
-//=======================================================================
-GEOMAlgo_State GEOMAlgo_FinderShapeOn1::State() const
-{
- return myState;
-}
-//=======================================================================
-//function : SetNbPntsMin
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn1::SetNbPntsMin(const Standard_Integer aNb)
-{
- myNbPntsMin=aNb;
-}
-//=======================================================================
-//function : NbPntsMin
-//purpose :
-//=======================================================================
-Standard_Integer GEOMAlgo_FinderShapeOn1::NbPntsMin()const
-{
- return myNbPntsMin;
-}
-//=======================================================================
-//function : SetNbPntsMax
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn1::SetNbPntsMax(const Standard_Integer aNb)
-{
- myNbPntsMax=aNb;
-}
-//=======================================================================
-//function : NbPntsMax
-//purpose :
-//=======================================================================
-Standard_Integer GEOMAlgo_FinderShapeOn1::NbPntsMax()const
-{
- return myNbPntsMax;
-}
-//=======================================================================
-// function: MSS
-// purpose:
-//=======================================================================
-const GEOMAlgo_IndexedDataMapOfShapeState& GEOMAlgo_FinderShapeOn1::MSS() const
-{
- return myMSS;
-}
-//=======================================================================
-// function: Shapes
-// purpose:
-//=======================================================================
-const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn1::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_FinderShapeOn1::Perform()
-{
- myErrorStatus=0;
- myWarningStatus=0;
- myLS.Clear();
- myMSS.Clear();
- //
- CheckData();
- if(myErrorStatus) {
- return;
- }
- //
- // Initialize the context
- GEOMAlgo_ShapeAlgo::Perform();
- //
- // 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 : ProcessVertices
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn1::ProcessVertices()
-{
- myErrorStatus=0;
- //
- Standard_Boolean bIsConformState;
- Standard_Integer i, aNb;
- 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);
- //
- aSt = GetPointState( aP );
- 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_FinderShapeOn1::ProcessEdges()
-{
- myErrorStatus=0;
- //
- Standard_Boolean bIsConformState, bIsToBreak;
- Standard_Integer i, aNb, iCnt;
- TopAbs_State aSt;
- TopTools_IndexedMapOfShape aM;
- TopExp_Explorer aExp;
- GEOMAlgo_ListIteratorOfListOfPnt aIt;
- GeomAbs_SurfaceType aType1;
- //
- aType1=myGAS.GetType();
- //
- 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 && aType1==GeomAbs_Sphere) {
- Standard_Real aT1, aT2;
- Handle(Geom_Curve) aC;
- GeomAdaptor_Curve aGAC;
- GeomAbs_CurveType aType2;
- //
- aC=BRep_Tool::Curve(aE, aT1, aT2);
- aGAC.Load(aC);
- //
- aType2=aGAC.GetType();
- if (aType2==GeomAbs_Line) {
- 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();
- aSt = GetPointState( aP );
- 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_FinderShapeOn1::ProcessFaces()
-{
- myErrorStatus=0;
- //
- Standard_Boolean bIsConformState, bIsToBreak;
- Standard_Integer i, aNbF, iCnt;
- TopAbs_State aSt;
- TopTools_IndexedMapOfShape aM;
- TopExp_Explorer aExp;
- GEOMAlgo_ListIteratorOfListOfPnt aIt;
- GeomAbs_SurfaceType aType1, aType2;
- //
- aType1=myGAS.GetType();
- //
- 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;
- GeomAdaptor_Surface aGAS;
- //
- aS=BRep_Tool::Surface(aF);
- aGAS.Load(aS);
- aType2=aGAS.GetType();
- if (aType2!=aType1) {
- 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();
- aSt = GetPointState( aP );
- 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_FinderShapeOn1::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_FinderShapeOn1::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()) {
- if (!GEOMAlgo_FinderShapeOn::BuildTriangulation(aF)) {
- myWarningStatus=20; // no triangulation found
- return;
- }
- aTRF=BRep_Tool::Triangulation(aF, aLoc);
- }
- //
- 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();
- //
- aNx=(Standard_Integer)aPK.Id(1);
- aMBN.Add(aNx);
- aNx=(Standard_Integer)aPK.Id(2);
- aMBN.Add(aNx);
- }
- }
- //
- // 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();
- //
- aN1=(Standard_Integer)aPK.Id(1);
- aN2=(Standard_Integer)aPK.Id(2);
- //
- 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) {
-}
-//modified by NIZNHY-PKV Thu Jan 26 09:56:20 2012f
-//=======================================================================
-//function : InnerPoints
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE,
- GEOMAlgo_ListOfPnt& aLP)
-{
- Standard_Integer aNbPntsMin;
- //
- myErrorStatus=0;
- aNbPntsMin=21;
- //
- aLP.Clear();
- InnerPoints(aE, aNbPntsMin, aLP);
-}
-//modified by NIZNHY-PKV Thu Jan 26 09:56:32 2012t
-//=======================================================================
-//function : InnerPoints
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE,
- const Standard_Integer aNbPntsMin,
- GEOMAlgo_ListOfPnt& aLP)
-{
- 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;
- }
- //
- //modified by NIZNHY-PKV Thu Jan 26 09:51:20 2012f
- /*
- aNbT=myNbPntsMin+1;
- dT=(aT2-aT1)/aNbT;
- for (j=1; j<=aNbPntsMin; ++j) {
- aT=aT1+j*dT;
- aC3D->D0(aT, aP);
- aLP.Append(aP);
- }
- */
- aNbT=aNbPntsMin+1;
- dT=(aT2-aT1)/aNbT;
- for (j=1; j<aNbT; ++j) {
- aT=aT1+j*dT;
- aC3D->D0(aT, aP);
- aLP.Append(aP);
- }
- //modified by NIZNHY-PKV Thu Jan 26 09:51:24 2012t
-}
-
-//=======================================================================
-//function : CheckData
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn1::CheckData()
-{
- myErrorStatus=0;
- //
- if(mySurface.IsNull()) {
- myErrorStatus=10; // mySurface=NULL
- 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;
- }
- //
- GeomAbs_SurfaceType aType;
- //
- myGAS.Load(mySurface);
- aType=myGAS.GetType();
- if (!(aType==GeomAbs_Plane ||
- aType==GeomAbs_Cylinder ||
- aType==GeomAbs_Sphere)) {
- myErrorStatus=14; // unallowed surface type
- }
-}
-
-//=======================================================================
-//function : GetPointState
-//purpose :
-//=======================================================================
-
-TopAbs_State GEOMAlgo_FinderShapeOn1::GetPointState(const gp_Pnt& aP)
-{
- TopAbs_State aSt;
- GEOMAlgo_SurfaceTools::GetState(aP, myGAS, myTolerance, aSt);
- return aSt;
-}
-
-
-//
-// myErrorStatus :
-//
-// 10 -mySurface=NULL
-// 11 -myShape=NULL
-// 12 -unallowed type of subshapes
-// 13 -unallowed state
-// 14 -unallowed surface type
-// 15 -unallowed surface type
-// 20- no triangulation found
-// 30- can not obtain the line from the link
-
-//modified by NIZNHY-PKV Thu Jan 26 10:01:14 2012f
-/*
-//=======================================================================
-//function : InnerPoints
-//purpose :
-//=======================================================================
-void GEOMAlgo_FinderShapeOn1::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()) {
- Handle(Poly_Polygon3D) aPE = BRep_Tool::Polygon3D(aE, aLoc);
- if (aPE.IsNull()) {
- if (!GEOMAlgo_FinderShapeOn::BuildTriangulation(aE)) {
- myErrorStatus=20; // no triangulation found
- return;
- }
- aPE = BRep_Tool::Polygon3D(aE, aLoc);
- }
- const gp_Trsf& aTrsf=aLoc.Transformation();
- const TColgp_Array1OfPnt& aNodes=aPE->Nodes();
- //
- aNbNodes=aPE->NbNodes();
- Standard_Integer low = aNodes.Lower(), up = aNodes.Upper();
- for (j=low+1; j<up; ++j) {
- aP=aNodes(j).Transformed(aTrsf);
- aLP.Append(aP);
- }
- }
- else {
- 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();
- }
-}
-*/
-//modified by NIZNHY-PKV Thu Jan 26 10:01:17 2012t
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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.hxx
-// Created: Fri Mar 4 10:31:06 2005
-// Author: Peter KURNEV
-
-#ifndef _GEOMAlgo_FinderShapeOn1_HeaderFile
-#define _GEOMAlgo_FinderShapeOn1_HeaderFile
-
-#include <GEOMAlgo_State.hxx>
-#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
-#include <GEOMAlgo_ShapeAlgo.hxx>
-#include <GEOMAlgo_ListOfPnt.hxx>
-
-#include <TopAbs_State.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopTools_ListOfShape.hxx>
-
-#include <Geom_Surface.hxx>
-#include <Handle_Geom_Surface.hxx>
-#include <GeomAdaptor_Surface.hxx>
-
-#include <gp_Pnt.hxx>
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_FinderShapeOn1
-//purpose :
-//=======================================================================
-class GEOMAlgo_FinderShapeOn1 : public GEOMAlgo_ShapeAlgo
-{
- public:
- Standard_EXPORT
- GEOMAlgo_FinderShapeOn1();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_FinderShapeOn1();
-
- Standard_EXPORT
- void SetSurface(const Handle(Geom_Surface)& aS) ;
-
- Standard_EXPORT
- void SetShapeType(const TopAbs_ShapeEnum aST) ;
-
- Standard_EXPORT
- void SetState(const GEOMAlgo_State aSF) ;
-
- 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
- const Handle_Geom_Surface& Surface() const;
-
- Standard_EXPORT
- TopAbs_ShapeEnum ShapeType() const;
-
- Standard_EXPORT
- GEOMAlgo_State State() const;
-
- Standard_EXPORT
- virtual void Perform() ;
-
- Standard_EXPORT
- const TopTools_ListOfShape& Shapes() const;
-
- Standard_EXPORT
- const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const;
-
- 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) ;
-
- Standard_EXPORT
- virtual TopAbs_State GetPointState(const gp_Pnt& aP) ;
-
-
- Handle_Geom_Surface mySurface;
- TopAbs_ShapeEnum myShapeType;
- GEOMAlgo_State myState;
- Standard_Integer myNbPntsMin;
- Standard_Integer myNbPntsMax;
- GeomAdaptor_Surface myGAS;
- TopTools_ListOfShape myLS;
- GEOMAlgo_IndexedDataMapOfShapeState myMSS;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_FinderShapeOn2.cxx
-// Created: Fri Mar 4 10:31:06 2005
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <GEOMAlgo_FinderShapeOn2.hxx>
-#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 <Poly_Polygon3D.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_FinderShapeOn.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;
- }
- //
- // Initialize the context
- GEOMAlgo_ShapeAlgo::Perform();
- //
- 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 sub-shape 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()) {
- if (!GEOMAlgo_FinderShapeOn::BuildTriangulation(aF)) {
- myWarningStatus=20; // no triangulation found
- return;
- }
- aTRF=BRep_Tool::Triangulation(aF, aLoc);
- }
- //
- 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()) {
- Handle(Poly_Polygon3D) aPE = BRep_Tool::Polygon3D(aE, aLoc);
- if (aPE.IsNull()) {
- if (!GEOMAlgo_FinderShapeOn::BuildTriangulation(aE)) {
- myErrorStatus=20; // no triangulation found
- return;
- }
- aPE = BRep_Tool::Polygon3D(aE, aLoc);
- }
- const gp_Trsf& aTrsf=aLoc.Transformation();
- const TColgp_Array1OfPnt& aNodes=aPE->Nodes();
- //
- aNbNodes=aPE->NbNodes();
- Standard_Integer low = aNodes.Lower(), up = aNodes.Upper();
- for (j=low+1; j<up; ++j) {
- aP=aNodes(j).Transformed(aTrsf);
- aLP.Append(aP);
- }
- }
- else {
- 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 sub-shapes
-// 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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_FinderShapeOn2.hxx
-// Created: Fri Mar 4 10:31:06 2005
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_FinderShapeOn2_HeaderFile
-#define _GEOMAlgo_FinderShapeOn2_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <GEOMAlgo_State.hxx>
-#include <Standard_Integer.hxx>
-//#include <Handle_GEOMAlgo_Clsf.hxx>
-#include <GEOMAlgo_Clsf.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
-#include <GEOMAlgo_ShapeAlgo.hxx>
-#include <GEOMAlgo_Clsf.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Edge.hxx>
-#include <GEOMAlgo_ListOfPnt.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_FinderShapeOn2
-//purpose :
-//=======================================================================
-class GEOMAlgo_FinderShapeOn2 : public GEOMAlgo_ShapeAlgo
-{
- 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:
- 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) ;
-
-
- TopAbs_ShapeEnum myShapeType;
- GEOMAlgo_State myState;
- Standard_Integer myNbPntsMin;
- Standard_Integer myNbPntsMax;
- Handle_GEOMAlgo_Clsf myClsf;
- TopTools_ListOfShape myLS;
- GEOMAlgo_IndexedDataMapOfShapeState myMSS;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_FinderShapeOnQuad.cxx
-// Created : Mon Oct 17 17:31:45 2005
-// Author : Edward AGAPOV (eap)
-//
-#include "GEOMAlgo_FinderShapeOnQuad.hxx"
-#include "GEOMAlgo_SurfaceTools.hxx"
-
-#include <gp_Pnt.hxx>
-#include <gp_Vec.hxx>
-#include <Geom_Plane.hxx>
-
-
-GEOMAlgo_FinderShapeOnQuad::GEOMAlgo_FinderShapeOnQuad(const gp_Pnt & theTopLeftPoint,
- const gp_Pnt & theTopRigthPoint,
- const gp_Pnt & theBottomLeftPoint,
- const gp_Pnt & theBottomRigthPoint)
-{
- myPoints.resize(6);
- myPoints[0] = theTopLeftPoint ;
- myPoints[1] = theTopRigthPoint ;
- myPoints[2] = theBottomRigthPoint;
- myPoints[3] = theBottomLeftPoint ;
- myPoints[4] = myPoints[0];
- myPoints[5] = myPoints[1];
-
- // Find plane normal defined by corner points, it will be used to define a plane
- // for each quadrangle side.
- myQuadNormal.SetCoord (0,0,0);
- for ( int i = 1; i <= 4; ++i )
- myQuadNormal += gp_Vec( myPoints[i], myPoints[i+1] ) ^ gp_Vec( myPoints[i], myPoints[i-1] );
- //std::cout<<std::endl<<" X Vec : "<<myQuadNormal.X()<<" "<<myQuadNormal.Y()<<" "<<myQuadNormal.Z()<<" "<<endl;
-
- if ( myQuadNormal.SquareMagnitude() <= DBL_MIN ) {
- myErrorStatus = 101;
- return;
- }
-
- // detect concave quadrangle sides
- myConcaveQuad = false;
- myConcaveSide.resize (4, false);
- for ( int i = 1; i <= 4; ++i ) {
- gp_Vec localQN = gp_Vec( myPoints[i], myPoints[i+1] ) ^ gp_Vec( myPoints[i], myPoints[i-1] );
- if ( myQuadNormal * localQN < 0 )
- myConcaveSide[i-1] = myConcaveSide[i] = myConcaveQuad = true;
- }
-
- // loop on quadrangle sides
- myPlanes.reserve( 4 );
- for ( int i = 0; i < 4; ++i )
- {
- // point1 -> point2 vector
- gp_Vec aSideVec( myPoints[ i ], myPoints[ i + 1 ]);
- //std::cout<<" Y Vec : "<<aSideVec.X()<<" "<<aSideVec.Y()<<" "<<aSideVec.Z()<<" "<<endl;
-
- // plane normal
- gp_Vec aSideNorm = aSideVec ^ myQuadNormal;
- if ( aSideNorm.SquareMagnitude() <= DBL_MIN )
- continue;
- //std::cout<<" Z Vec : "<<aSideNorm.X()<<" "<<aSideNorm.Y()<<" "<<aSideNorm.Z()<<" "<<endl;
-
- // make plane
- Handle(Geom_Plane) aPlane = new Geom_Plane( myPoints[ i ], aSideNorm );
- myPlanes.push_back( GeomAdaptor_Surface() );
- myPlanes.back().Load( aPlane );
- }
-}
-
-//=======================================================================
-//function : CheckData
-//purpose :
-//=======================================================================
-
-void GEOMAlgo_FinderShapeOnQuad::CheckData()
-{
- if ( !myPlanes.empty() )
- mySurface = myPlanes[0].Surface();
- GEOMAlgo_FinderShapeOn1::CheckData();
-}
-
-//=======================================================================
-//function : GetPointState
-//purpose :
-//=======================================================================
-
-TopAbs_State GEOMAlgo_FinderShapeOnQuad::GetPointState(const gp_Pnt& aP)
-{
- // Return IN if aP has TopAbs_IN with all sides.
- // In the case of concave quadrangle, return IN if
- // aP is OUT of only one concave side
- double nbIn = 0.;
- for ( int i = 0; i < myPlanes.size(); ++i )
- {
- TopAbs_State aSt;
- GEOMAlgo_SurfaceTools::GetState(aP, myPlanes[i], myTolerance, aSt);
- if ( aSt == TopAbs_IN )
- {
- nbIn += myConcaveSide[i] ? 0.5 : 1.0;
- }
- else if ( aSt == TopAbs_ON )
- {
- // check that aP is between quadrangle corners
- Handle(Geom_Plane) aSidePlane = Handle(Geom_Plane)::DownCast( myPlanes[i].Surface() );
- gp_Vec aSideNorm = aSidePlane->Axis().Direction();
- gp_Vec aSideVec = myQuadNormal ^ aSideNorm;
- gp_Vec c1p ( myPoints[i], aP );
- gp_Vec pc2 ( aP, myPoints[i+1] );
- if ( aSideVec * c1p >= 0. && aSideVec * pc2 >= 0. )
- return TopAbs_ON;
- // consider to be IN (???????????)
- //nbIn += myConcaveSide[i] ? 0.5 : 1.0;
- }
- }
- Standard_Real inThreshold = myPlanes.size(); // usually 4.0
- if ( myConcaveQuad )
- inThreshold = 2.5; // 1.0 + 1.0 + 0.5
-
- if ( nbIn >= inThreshold )
- return TopAbs_IN;
-
- return TopAbs_OUT;
-}
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_FinderShapeOnQuad.hxx
-// Created : Mon Oct 17 17:15:59 2005
-// Author : Edward AGAPOV (eap)
-//
-#ifndef GEOMAlgo_FinderShapeOnQuad_HeaderFile
-#define GEOMAlgo_FinderShapeOnQuad_HeaderFile
-
-#include "GEOMAlgo_FinderShapeOn1.hxx"
-
-#include <gp_Vec.hxx>
-
-#include <vector>
-
-
-class GEOMAlgo_FinderShapeOnQuad: public GEOMAlgo_FinderShapeOn1
-{
-public:
-
- Standard_EXPORT
- GEOMAlgo_FinderShapeOnQuad(const gp_Pnt & theTopLeftPoint,
- const gp_Pnt & theTopRigthPoint,
- const gp_Pnt & theBottomLeftPoint,
- const gp_Pnt & theBottomRigthPoint);
-
-protected:
-
- virtual void CheckData() ;
-
- virtual TopAbs_State GetPointState(const gp_Pnt& aP) ;
-
-private:
-
- bool myConcaveQuad;
- std::vector<bool> myConcaveSide;
- std::vector<gp_Pnt> myPoints;
- std::vector<GeomAdaptor_Surface> myPlanes;
- gp_Vec myQuadNormal;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_GetInPlace.cxx
-// Created:
-// Author: Peter KURNEV
-
-#include <GEOMAlgo_GetInPlace.hxx>
-
-#include <NMTDS_BoxBndTree.hxx>
-#include <NCollection_UBTreeFiller.hxx>
-
-#include <Bnd_Box.hxx>
-#include <gp_Pnt.hxx>
-
-#include <TColStd_ListOfInteger.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-
-#include <TopoDS_Iterator.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Compound.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-
-#include <BRepBndLib.hxx>
-
-#include <TopExp.hxx>
-
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_DataMapOfShapeListOfShape.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
-
-
-#include <NMTTools_CoupleOfShape.hxx>
-#include <GEOMAlgo_Tools.hxx>
-
-
-static
- void MapBRepShapes(const TopoDS_Shape& aS,
- TopTools_IndexedMapOfShape& aM);
-
-
-//=======================================================================
-//function : GEOMAlgo_GetInPlace
-//purpose :
-//=======================================================================
-GEOMAlgo_GetInPlace::GEOMAlgo_GetInPlace()
-:
- GEOMAlgo_GluerAlgo(),
- GEOMAlgo_Algo()
-{
- myTolerance=0.0001;
- myTolMass=0.0001;
- myTolCG=0.0001;
- myFound=Standard_False;
- myCheckGeometry=Standard_True;
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-GEOMAlgo_GetInPlace::~GEOMAlgo_GetInPlace()
-{
-}
-//=======================================================================
-//function : SetTolMass
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::SetTolMass(const Standard_Real theTol)
-{
- myTolMass=theTol;
-}
-//=======================================================================
-//function : TolMass
-//purpose :
-//=======================================================================
-Standard_Real GEOMAlgo_GetInPlace::TolMass()const
-{
- return myTolMass;
-}
-//=======================================================================
-//function : SetTolCG
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::SetTolCG(const Standard_Real theTol)
-{
- myTolCG=theTol;
-}
-//=======================================================================
-//function : TolCG
-//purpose :
-//=======================================================================
-Standard_Real GEOMAlgo_GetInPlace::TolCG()const
-{
- return myTolCG;
-}
-//=======================================================================
-//function : IsFound
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_GetInPlace::IsFound()const
-{
- return myFound;
-}
-//=======================================================================
-//function : SetShapeWhere
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::SetShapeWhere(const TopoDS_Shape& theShape)
-{
- myShapeWhere=theShape;
-}
-//=======================================================================
-//function : ShapeWhere
-//purpose :
-//=======================================================================
-const TopoDS_Shape& GEOMAlgo_GetInPlace::ShapeWhere()const
-{
- return myShapeWhere;
-}
-//=======================================================================
-//function : ShapesIn
-//purpose :
-//=======================================================================
-const GEOMAlgo_DataMapOfShapeMapOfShape& GEOMAlgo_GetInPlace::ShapesIn()const
-{
- return myShapesIn;
-}
-//=======================================================================
-//function : ShapesOn
-//purpose :
-//=======================================================================
-const GEOMAlgo_DataMapOfShapeMapOfShape& GEOMAlgo_GetInPlace::ShapesOn()const
-{
- return myShapesOn;
-}
-//=======================================================================
-//function : Clear
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::Clear()
-{
- myErrorStatus=0;
- myWarningStatus=0;
- //
- GEOMAlgo_GluerAlgo::Clear();
- myIterator.Clear();
- myShapesIn.Clear();
- myShapesOn.Clear();
- myMapShapePnt.Clear();
-}
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::Perform()
-{
- myFound=Standard_False;
- myErrorStatus=0;
- myWarningStatus=0;
- //
- Clear();
- if (myErrorStatus) {
- return;
- }
- //
- CheckData();
- if (myErrorStatus) {
- return;
- }
- //
- // Initialize the context
- GEOMAlgo_GluerAlgo::Perform();
- //
- Intersect();
- if (myErrorStatus) {
- return;
- }
- //
- PerformVV();
- if (myErrorStatus) {
- return;
- }
- //
- FillEdgesOn();
- if (myErrorStatus) {
- return;
- }
- //
- PerformVE();
- if (myErrorStatus) {
- return;
- }
- //
- PerformEE();
- if (myErrorStatus) {
- return;
- }
- //
- PerformVF();
- if (myErrorStatus) {
- return;
- }
- //
- FillFacesOn();
- if (myErrorStatus) {
- return;
- }
- //
- PerformEF();
- if (myErrorStatus) {
- return;
- }
- //
- PerformFF();
- if (myErrorStatus) {
- return;
- }
- //
- FillSolidsOn();
- if (myErrorStatus) {
- return;
- }
- //
- PerformZF();
- if (myErrorStatus) {
- return;
- }
- //
- PerformZZ();
- if (myErrorStatus) {
- return;
- }
- //
- FillImages();
- if (myErrorStatus) {
- return;
- }
- //
- CheckGProps();
- if (myErrorStatus) {
- return;
- }
-}
-//=======================================================================
-//function : CheckData
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::CheckData()
-{
- myErrorStatus=0;
- myWarningStatus=0;
- //
- if (myArgument.IsNull()) {
- myErrorStatus=2;
- return;
- }
- //
- if (myShapeWhere.IsNull()) {
- myErrorStatus=3;
- return;
- }
-}
-//=======================================================================
-//function : Intersect
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::Intersect()
-{
- Standard_Integer i, j, aNbS1, aNbS2, aNbSD;
- TColStd_ListIteratorOfListOfInteger aItLI;
- TopTools_IndexedMapOfShape aMS1, aMS2;
- TopTools_DataMapOfShapeListOfShape aDMSLS;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
- TopTools_ListIteratorOfListOfShape aItLS;
- NMTTools_CoupleOfShape aCS;
- //
- NMTDS_BoxBndTreeSelector aSelector;
- NMTDS_BoxBndTree aBBTree;
- NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- myIterator.Clear();
- //
- MapBRepShapes(myArgument, aMS1);
- aNbS1=aMS1.Extent();
- for (i=1; i<=aNbS1; ++i) {
- Bnd_Box aBox1;
- //
- const TopoDS_Shape& aS1=aMS1(i);
- BRepBndLib::Add(aS1, aBox1);
- //modified by NIZNHY-PKV Fri Jun 10 08:20:03 2011f
- //aBox1.SetGap(myTolerance);
- aBox1.Enlarge(myTolerance);
- //modified by NIZNHY-PKV Fri Jun 10 08:20:06 2011t
- //
- aTreeFiller.Add(i, aBox1);
- }
- //
- aTreeFiller.Fill();
- //
- MapBRepShapes(myShapeWhere, aMS2);
- aNbS2=aMS2.Extent();
- for (j=1; j<=aNbS2; ++j) {
- Bnd_Box aBox2;
- //
- const TopoDS_Shape& aS2=aMS2(j);
- BRepBndLib::Add(aS2, aBox2);
- //modified by NIZNHY-PKV Fri Jun 10 08:20:23 2011f
- //aBox2.SetGap(myTolerance);
- aBox2.Enlarge(myTolerance);
- //modified by NIZNHY-PKV Fri Jun 10 08:20:25 2011t
- //
- aSelector.Clear();
- aSelector.SetBox(aBox2);
- aNbSD=aBBTree.Select(aSelector);
- if (!aNbSD) {
- continue; // it should not be
- }
- //
- const TColStd_ListOfInteger& aLI=aSelector.Indices();
- aItLI.Initialize(aLI);
- for (; aItLI.More(); aItLI.Next()) {
- i=aItLI.Value();
- const TopoDS_Shape& aS1=aMS1(i);
- //
- if (aDMSLS.IsBound(aS1)) {
- TopTools_ListOfShape& aLS=aDMSLS.ChangeFind(aS1);
- aLS.Append(aS2);
- }
- else {
- TopTools_ListOfShape aLS;
- //
- aLS.Append(aS2);
- aDMSLS.Bind(aS1, aLS);
- }
- }
- }// for (j=1; j<=aNbS2; ++j) {
- //
- aItDMSLS.Initialize(aDMSLS);
- for (; aItDMSLS.More(); aItDMSLS.Next()) {
- const TopoDS_Shape& aS1=aItDMSLS.Key();
- const TopTools_ListOfShape& aLS2=aItDMSLS.Value();
- aCS.SetShape1(aS1);
- aItLS.Initialize(aLS2);
- for (; aItLS.More(); aItLS.Next()) {
- const TopoDS_Shape& aS2=aItLS.Value();
- aCS.SetShape2(aS2);
- myIterator.AppendPair(aCS);
- }
- }
-}
-//=======================================================================
-//function : PerformVV
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::PerformVV()
-{
- myErrorStatus=0;
- myWarningStatus=0;
- //
- myIterator.Initialize(TopAbs_VERTEX, TopAbs_VERTEX);
- for (; myIterator.More(); myIterator.Next()) {
- const NMTTools_CoupleOfShape& aCS=myIterator.Value();
- const TopoDS_Shape& aV1=aCS.Shape1();
- const TopoDS_Shape& aV2=aCS.Shape2();
- //
- FillShapesOn(aV1, aV2);
- }
-}
-//=======================================================================
-//function : FillEdgesOn
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::FillEdgesOn()
-{
- Standard_Integer i, aNbE;
- TopoDS_Iterator aIt;
- TopTools_IndexedMapOfShape aME;
- TopTools_MapIteratorOfMapOfShape aItMS;
- //
- TopExp::MapShapes(myArgument, TopAbs_EDGE, aME);
- aNbE=aME.Extent();
- for (i=1; i<=aNbE; ++i) {
- const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aME(i));
- if (BRep_Tool::Degenerated(aE1)) {
- continue;
- }
- //
- aIt.Initialize(aE1);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aV1=aIt.Value();
- if (myShapesOn.IsBound(aV1)) {
- const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aV1);
- //aNbSOn=aMSOn.Extent();
- aItMS.Initialize(aMSOn);
- for (; aItMS.More(); aItMS.Next()) {
- const TopoDS_Shape& aV2=aItMS.Key();
- FillShapesOn(aE1, aV2);
- }
- }
- }
- }
-}
-//=======================================================================
-//function : PerformVE
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::PerformVE()
-{
- Standard_Boolean bFound;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- // 2. Fill Shapes In
- myIterator.Initialize(TopAbs_EDGE, TopAbs_VERTEX);
- for (; myIterator.More(); myIterator.Next()) {
- const NMTTools_CoupleOfShape& aCS=myIterator.Value();
- const TopoDS_Shape& aE1=aCS.Shape1();
- const TopoDS_Shape& aV2=aCS.Shape2();
- //
- if (myShapesOn.IsBound(aE1)) {
- const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aE1);
- if (aMSOn.Contains(aV2)) {
- continue;
- }
- }
- //
- bFound=CheckCoincidence(aE1, aV2);
- if (myErrorStatus) {
- return;
- }
- if (bFound) {
- FillShapesIn(aE1, aV2);
- }
- }
-}
-//=======================================================================
-//function : PerformEE
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::PerformEE()
-{
- Standard_Boolean bHasOn, bHasIn, bFound;
- TopoDS_Iterator aIt;
- TopTools_MapOfShape aMSX;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- myIterator.Initialize(TopAbs_EDGE, TopAbs_EDGE);
- for (; myIterator.More(); myIterator.Next()) {
- const NMTTools_CoupleOfShape& aCS=myIterator.Value();
- const TopoDS_Shape& aE1=aCS.Shape1();
- const TopoDS_Shape& aE2=aCS.Shape2();
- //
- bHasOn=myShapesOn.IsBound(aE1);
- bHasIn=myShapesIn.IsBound(aE1);
- const TopTools_MapOfShape& aMSOn=(bHasOn) ? myShapesOn.Find(aE1) : aMSX;
- const TopTools_MapOfShape& aMSIn=(bHasIn) ? myShapesIn.Find(aE1) : aMSX;
- //
- bFound=Standard_True;
- aIt.Initialize(aE2);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aV2=aIt.Value();
- if (!(aMSOn.Contains(aV2) || aMSIn.Contains(aV2))) {
- bFound=!bFound;
- break;
- }
- }
- if (!bFound) {
- continue;
- }
- //
- bFound=CheckCoincidence(aE1, aE2);
- if (myErrorStatus) {
- return;
- }
- if (bFound) {
- FillShapesIn(aE1, aE2);
- }
- }
-}
-//=======================================================================
-//function : PerformVF
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::PerformVF()
-{
- Standard_Boolean bHasOn, bHasIn, bFound;
- Standard_Integer i, aNbE;
- TopTools_MapOfShape aMSX;
- TopTools_IndexedMapOfShape aME;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- myIterator.Initialize(TopAbs_FACE, TopAbs_VERTEX);
- for (; myIterator.More(); myIterator.Next()) {
- const NMTTools_CoupleOfShape& aCS=myIterator.Value();
- const TopoDS_Shape& aF1=aCS.Shape1();
- const TopoDS_Shape& aV2=aCS.Shape2();
- //
- aME.Clear();
- TopExp::MapShapes(aF1, TopAbs_EDGE, aME);
- //
- bFound=Standard_False;
- aNbE=aME.Extent();
- for (i=1; i<=aNbE; ++i) {
- const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aME(i));
- if (BRep_Tool::Degenerated(aE1)) {
- continue;
- }
- //
- bHasOn=myShapesOn.IsBound(aE1);
- bHasIn=myShapesIn.IsBound(aE1);
- const TopTools_MapOfShape& aMSOn=(bHasOn) ? myShapesOn.Find(aE1) : aMSX;
- const TopTools_MapOfShape& aMSIn=(bHasIn) ? myShapesIn.Find(aE1) : aMSX;
- bFound= (aMSOn.Contains(aV2) || aMSIn.Contains(aV2));
- if (bFound) {
- break;
- }
- }
- //
- if (bFound) {
- continue;
- }
- //
- bFound=CheckCoincidence(aF1, aV2);
- if (myErrorStatus) {
- return;
- }
- if (bFound) {
- FillShapesIn(aF1, aV2);
- }
- }
-}
-//=======================================================================
-//function : FillFacesOn
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::FillFacesOn()
-{
- Standard_Integer i, j, aNbF, aNbE;
- TopoDS_Iterator aIt;
- TopTools_IndexedMapOfShape aMF, aME;
- TopTools_MapIteratorOfMapOfShape aItMS;
- //
- TopExp::MapShapes(myArgument, TopAbs_FACE, aMF);
- aNbF=aMF.Extent();
- for (i=1; i<=aNbF; ++i) {
- const TopoDS_Face& aF1=*((TopoDS_Face*)&aMF(i));
- //
- aME.Clear();
- TopExp::MapShapes(aF1, TopAbs_EDGE, aME);
- aNbE=aME.Extent();
- for (j=1; j<=aNbE; ++j) {
- const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aME(j));
- if (BRep_Tool::Degenerated(aE1)) {
- continue;
- }
- //
- if (myShapesOn.IsBound(aE1)) {
- const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aE1);
- aItMS.Initialize(aMSOn);
- for (; aItMS.More(); aItMS.Next()) {
- const TopoDS_Shape& aS2=aItMS.Key();
- FillShapesOn(aF1, aS2);
- }
- }
- //
- if (myShapesIn.IsBound(aE1)) {
- const TopTools_MapOfShape& aMSIn=myShapesIn.Find(aE1);
- aItMS.Initialize(aMSIn);
- for (; aItMS.More(); aItMS.Next()) {
- const TopoDS_Shape& aS2=aItMS.Key();
- FillShapesOn(aF1, aS2);
- }
- }
- }//for (j=1; j<=aNbE; ++j) {
- }//for (i=1; i<=aNbF; ++i) {
-}
-//=======================================================================
-//function : PerformEF
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::PerformEF()
-{
- Standard_Boolean bFound, bHasOnF, bHasInF;
- TopoDS_Iterator aIt;
- TopTools_MapOfShape aMSX;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- myIterator.Initialize(TopAbs_FACE, TopAbs_EDGE);
- for (; myIterator.More(); myIterator.Next()) {
- const NMTTools_CoupleOfShape& aCS=myIterator.Value();
- const TopoDS_Shape& aF1=aCS.Shape1();
- const TopoDS_Shape& aE2=aCS.Shape2();
- //
- // 1.
- bHasOnF=myShapesOn.IsBound(aF1);
- const TopTools_MapOfShape& aMSOnF=(bHasOnF) ? myShapesOn.Find(aF1) : aMSX;
- bFound=aMSOnF.Contains(aE2);
- if (bFound) {
- continue;
- }
- //
- // 2.
- bHasInF=myShapesIn.IsBound(aF1);
- const TopTools_MapOfShape& aMSInF=(bHasInF) ? myShapesIn.Find(aF1) : aMSX;
- //
- aIt.Initialize(aE2);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aV2=aIt.Value();
- bFound=(aMSOnF.Contains(aV2) || aMSInF.Contains(aV2));
- if (!bFound) {
- break;
- }
- }
- if (!bFound) {
- continue;
- }
- //------------------------------
- bFound=CheckCoincidence(aF1, aE2);
- if (myErrorStatus) {
- return;
- }
- if (bFound) {
- FillShapesIn(aF1, aE2);
- }
- }
-}
-//=======================================================================
-//function : PerformFF
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::PerformFF()
-{
- Standard_Boolean bFound, bHasOnF, bHasInF;
- Standard_Integer i, aNbS2;
- TopTools_MapOfShape aMSX;
- TopTools_IndexedMapOfShape aMS2;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- myIterator.Initialize(TopAbs_FACE, TopAbs_FACE);
- for (; myIterator.More(); myIterator.Next()) {
- const NMTTools_CoupleOfShape& aCS=myIterator.Value();
- const TopoDS_Shape& aF1=aCS.Shape1();
- const TopoDS_Shape& aF2=aCS.Shape2();
- //
- bHasOnF=myShapesOn.IsBound(aF1);
- const TopTools_MapOfShape& aMSOnF=(bHasOnF) ? myShapesOn.Find(aF1) : aMSX;
- //
- bHasInF=myShapesIn.IsBound(aF1);
- const TopTools_MapOfShape& aMSInF=(bHasInF) ? myShapesIn.Find(aF1) : aMSX;
- //
- aMS2.Clear();
- MapBRepShapes(aF2, aMS2);
- //
- bFound=Standard_False;
- aNbS2=aMS2.Extent();
- for (i=1; i<=aNbS2; ++i) {
- const TopoDS_Shape& aS2=aMS2(i);
- if (aS2.IsSame(aF2)) {
- continue;
- }
- bFound=(aMSOnF.Contains(aS2) || aMSInF.Contains(aS2));
- if (!bFound) {
- break;
- }
- }
- if (!bFound) {
- continue;
- }
- //
- bFound=CheckCoincidence(aF1, aF2);
- if (myErrorStatus) {
- return;
- }
- if (bFound) {
- FillShapesIn(aF1, aF2);
- }
- }
-}
-//=======================================================================
-//function : FillSolidsOn
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::FillSolidsOn()
-{
- Standard_Integer i, j, aNbS, aNbF;
- TopTools_IndexedMapOfShape aMS, aMF;
- TopTools_MapIteratorOfMapOfShape aItMS;
- //
- TopExp::MapShapes(myArgument, TopAbs_SOLID, aMS);
- //
- aNbS=aMS.Extent();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aSD1=aMS(i);
- //
- aMF.Clear();
- TopExp::MapShapes(aSD1, TopAbs_FACE, aMF);
- aNbF=aMF.Extent();
- for (j=1; j<=aNbF; ++j) {
- const TopoDS_Shape& aF1=aMF(j);
- //
- if (myShapesOn.IsBound(aF1)) {
- const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aF1);
- aItMS.Initialize(aMSOn);
- for (; aItMS.More(); aItMS.Next()) {
- const TopoDS_Shape& aS2=aItMS.Key();
- FillShapesOn(aSD1, aS2);
- }
- }
- //
- if (myShapesIn.IsBound(aF1)) {
- const TopTools_MapOfShape& aMSIn=myShapesIn.Find(aF1);
- aItMS.Initialize(aMSIn);
- for (; aItMS.More(); aItMS.Next()) {
- const TopoDS_Shape& aS2=aItMS.Key();
- FillShapesOn(aSD1, aS2);
- }
- }
- }//for (j=1; j<=aNbF; ++j) {
- }//for (i=1; i<=aNbS; ++i) {
-}
-//=======================================================================
-//function : PerformZF
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::PerformZF()
-{
- Standard_Boolean bFound, bHasOnF;
- TopTools_MapOfShape aMSX;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- myIterator.Initialize(TopAbs_SOLID, TopAbs_FACE);
- for (; myIterator.More(); myIterator.Next()) {
- const NMTTools_CoupleOfShape& aCS=myIterator.Value();
- const TopoDS_Shape& aSo1=aCS.Shape1();
- const TopoDS_Shape& aF2=aCS.Shape2();
- //
- bHasOnF=myShapesOn.IsBound(aSo1);
- const TopTools_MapOfShape& aMSOnF=(bHasOnF) ? myShapesOn.Find(aSo1) : aMSX;
- bFound=aMSOnF.Contains(aF2);
- if (bFound) {
- continue;
- }
- //------------------------------
- bFound=CheckCoincidence(aSo1, aF2);
- if (myErrorStatus) {
- return;
- }
- if (bFound) {
- FillShapesIn(aSo1, aF2);
- }
- }
-}
-//=======================================================================
-//function : PerformZZ
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::PerformZZ()
-{
- Standard_Boolean bFound, bHasOn, bHasIn;
- Standard_Integer i, aNbS2, iCntOn, iCntIn, iCntOut;
- TopTools_MapOfShape aMSX;
- TopTools_IndexedMapOfShape aMS2;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- myIterator.Initialize(TopAbs_SOLID, TopAbs_SOLID);
- for (; myIterator.More(); myIterator.Next()) {
- const NMTTools_CoupleOfShape& aCS=myIterator.Value();
- const TopoDS_Shape& aSo1=aCS.Shape1();
- const TopoDS_Shape& aSo2=aCS.Shape2();
- //
- bHasOn=myShapesOn.IsBound(aSo1);
- const TopTools_MapOfShape& aMSOn=(bHasOn) ? myShapesOn.Find(aSo1) : aMSX;
- //
- bHasIn=myShapesIn.IsBound(aSo1);
- const TopTools_MapOfShape& aMSIn=(bHasIn) ? myShapesIn.Find(aSo1) : aMSX;
- //
- aMS2.Clear();
- TopExp::MapShapes(aSo2, TopAbs_FACE, aMS2);
- //
- iCntIn=0;
- iCntOn=0;
- iCntOut=0;
- bFound=Standard_False;
- aNbS2=aMS2.Extent();
- for (i=1; i<=aNbS2; ++i) {
- const TopoDS_Shape& aF2=aMS2(i);
- //
- if (aMSIn.Contains(aF2)) {
- ++iCntIn;
- bFound=Standard_True;
- break;
- }
- else if (!aMSOn.Contains(aF2)) {
- ++iCntOut;
- bFound=Standard_False;// out
- break;
- }
- else {
- ++iCntOn; //on
- }
- }
- //
- if (!bFound && iCntOut) {
- continue;
- }
- //
- if (!iCntIn) {
- bFound=CheckCoincidence(aSo1, aSo2);
- if (myErrorStatus) {
- return;
- }
- }
- if (bFound) {
- FillShapesIn(aSo1, aSo2);
- }
- }// for (; myIterator.More(); myIterator.Next()) {
-}
-//=======================================================================
-//function : FillImages
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::FillImages()
-{
- Standard_Integer i, aNbS, aNbSx, aNbSi;
- TopAbs_ShapeEnum aType;
- TopoDS_Iterator aIt;
- TopTools_ListOfShape aLSx;
- TopTools_ListIteratorOfListOfShape aItLS;
- TopTools_IndexedMapOfShape aMS;
- TopTools_MapIteratorOfMapOfShape aItMS;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- myImages.Clear();
- //
- // 1. Vertices
- aMS.Clear();
- TopExp::MapShapes(myArgument, TopAbs_VERTEX, aMS);
- aNbS=aMS.Extent();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aV=aMS(i);
- if (myShapesOn.IsBound(aV)) {
- const TopTools_MapOfShape& aMSx=myShapesOn.Find(aV);
- aNbSx=aMSx.Extent();
- //
- aLSx.Clear();
- aItMS.Initialize(aMSx);
- for (; aItMS.More(); aItMS.Next()) {
- const TopoDS_Shape& aVx=aItMS.Key();
- aLSx.Append(aVx);
- }
- //
- myImages.Bind(aV, aLSx);
- }
- }
- //
- // 2. Edges
- aMS.Clear();
- TopExp::MapShapes(myArgument, TopAbs_EDGE, aMS);
- aNbS=aMS.Extent();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aE=aMS(i);
- if (myShapesIn.IsBound(aE)) {
- const TopTools_MapOfShape& aMSx=myShapesIn.Find(aE);
- aNbSx=aMSx.Extent();
- //
- aLSx.Clear();
- aItMS.Initialize(aMSx);
- for (; aItMS.More(); aItMS.Next()) {
- const TopoDS_Shape& aEx=aItMS.Key();
- aType=aEx.ShapeType();
- if (aType==TopAbs_EDGE){
- aLSx.Append(aEx);
- }
- }
- //
- myImages.Bind(aE, aLSx);
- }
- }
- //
- // 3. Wires
- aMS.Clear();
- TopExp::MapShapes(myArgument, TopAbs_WIRE, aMS);
- aNbS=aMS.Extent();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aW=aMS(i);
- aLSx.Clear();
- aIt.Initialize(aW);
- for(; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aE=aIt.Value();
- if (myImages.IsBound(aE)) {
- const TopTools_ListOfShape& aLSi=myImages.Find(aE);
- aNbSi=aLSi.Extent();
- //
- aItLS.Initialize(aLSi);
- for (; aItLS.More(); aItLS.Next()) {
- const TopoDS_Shape& aEi=aItLS.Value();
- aLSx.Append(aEi);
- }
- }
- }
- myImages.Bind(aW, aLSx);
- }
- //
- // 4. Faces
- aMS.Clear();
- TopExp::MapShapes(myArgument, TopAbs_FACE, aMS);
- aNbS=aMS.Extent();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aF=aMS(i);
- if (myShapesIn.IsBound(aF)) {
- const TopTools_MapOfShape& aMSx=myShapesIn.Find(aF);
- aNbSx=aMSx.Extent();
- //
- aLSx.Clear();
- aItMS.Initialize(aMSx);
- for (; aItMS.More(); aItMS.Next()) {
- const TopoDS_Shape& aFx=aItMS.Key();
- aType=aFx.ShapeType();
- if (aType==TopAbs_FACE){
- aLSx.Append(aFx);
- }
- }
- //
- myImages.Bind(aF, aLSx);
- }
- }
- //
- // 5. Shells
- aMS.Clear();
- TopExp::MapShapes(myArgument, TopAbs_SHELL, aMS);
- aNbS=aMS.Extent();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aSh=aMS(i);
- aLSx.Clear();
- aIt.Initialize(aSh);
- for(; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aF=aIt.Value();
- if (myImages.IsBound(aF)) {
- const TopTools_ListOfShape& aLSi=myImages.Find(aF);
- aNbSi=aLSi.Extent();
- //
- aItLS.Initialize(aLSi);
- for (; aItLS.More(); aItLS.Next()) {
- const TopoDS_Shape& aFi=aItLS.Value();
- aLSx.Append(aFi);
- }
- }
- }
- myImages.Bind(aSh, aLSx);
- }
- //
- // 6. Solids
- aMS.Clear();
- TopExp::MapShapes(myArgument, TopAbs_SOLID, aMS);
- aNbS=aMS.Extent();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aZ=aMS(i);
- if (myShapesIn.IsBound(aZ)) {
- const TopTools_MapOfShape& aMSx=myShapesIn.Find(aZ);
- aNbSx=aMSx.Extent();
- //
- aLSx.Clear();
- aItMS.Initialize(aMSx);
- for (; aItMS.More(); aItMS.Next()) {
- const TopoDS_Shape& aZx=aItMS.Key();
- aType=aZx.ShapeType();
- if (aType==TopAbs_SOLID){
- aLSx.Append(aZx);
- }
- }
- //
- myImages.Bind(aZ, aLSx);
- }
- }
- //
- // 7. CompSolids
- aMS.Clear();
- TopExp::MapShapes(myArgument, TopAbs_COMPSOLID, aMS);
- aNbS=aMS.Extent();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aCs=aMS(i);
- aLSx.Clear();
- aIt.Initialize(aCs);
- for(; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aZ=aIt.Value();
- if (myImages.IsBound(aZ)) {
- const TopTools_ListOfShape& aLSi=myImages.Find(aZ);
- aNbSi=aLSi.Extent();
- //
- aItLS.Initialize(aLSi);
- for (; aItLS.More(); aItLS.Next()) {
- const TopoDS_Shape& aZi=aItLS.Value();
- aLSx.Append(aZi);
- }
- }
- }
- myImages.Bind(aCs, aLSx);
- }
- //
- // 8. Compounds
- aType=myArgument.ShapeType();
- if (aType==TopAbs_COMPOUND) {
- FillImagesCompound(myArgument);
- }
-}
-//=======================================================================
-//function : FillImagesCompound
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::FillImagesCompound(const TopoDS_Shape& aS)
-{
- TopAbs_ShapeEnum aType;
- TopoDS_Iterator aIt;
- TopTools_ListOfShape aLSx;
- TopTools_ListIteratorOfListOfShape aItLS;
- //
- aIt.Initialize(aS);
- for(; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSx=aIt.Value();
- aType=aSx.ShapeType();
- //
- if (aType==TopAbs_COMPOUND) {
- FillImagesCompound(aSx);
- }
- //
- if (myImages.IsBound(aSx)) {
- const TopTools_ListOfShape& aLSi=myImages.Find(aSx);
- aItLS.Initialize(aLSi);
- for (; aItLS.More(); aItLS.Next()) {
- const TopoDS_Shape& aSi=aItLS.Value();
- aLSx.Append(aSi);
- }
- }
- }
- myImages.Bind(aS, aLSx);
-}
-
-//=======================================================================
-//function : FillShapesIn
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::FillShapesIn(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2)
-{
- if (myShapesIn.IsBound(aS1)) {
- TopTools_MapOfShape& aMS=myShapesIn.ChangeFind(aS1);
- aMS.Add(aS2);
- }
- else {
- TopTools_MapOfShape aMS;
- //
- aMS.Add(aS2);
- myShapesIn.Bind(aS1, aMS);
- }
-}
-//=======================================================================
-//function : FillShapesOn
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::FillShapesOn(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2)
-{
- if (myShapesOn.IsBound(aS1)) {
- TopTools_MapOfShape& aMS=myShapesOn.ChangeFind(aS1);
- aMS.Add(aS2);
- }
- else {
- TopTools_MapOfShape aMS;
- //
- aMS.Add(aS2);
- myShapesOn.Bind(aS1, aMS);
- }
-}
-//=======================================================================
-//function : MapBRepShapes
-//purpose :
-//=======================================================================
-void MapBRepShapes(const TopoDS_Shape& aS,
- TopTools_IndexedMapOfShape& aM)
-{
- Standard_Boolean bDegenerated;
- TopAbs_ShapeEnum aType;
- TopoDS_Iterator aIt;
- //
- aType=aS.ShapeType();
- if (aType==TopAbs_VERTEX || aType==TopAbs_EDGE ||
- aType==TopAbs_FACE || aType==TopAbs_SOLID) {
- bDegenerated=Standard_False;
- if (aType==TopAbs_EDGE) {
- TopoDS_Edge *pE=(TopoDS_Edge*)&aS;
- bDegenerated=BRep_Tool::Degenerated(*pE);
- }
- if (!bDegenerated) {
- aM.Add(aS);
- }
- }
- //
- aIt.Initialize(aS);
- for(; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSx=aIt.Value();
- aType=aSx.ShapeType();
- MapBRepShapes(aSx, aM);
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_GetInPlace.hxx
-// Created:
-// Author: Peter KURNEV
-
-#ifndef _GEOMAlgo_GetInPlace_HeaderFile
-#define _GEOMAlgo_GetInPlace_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Boolean.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-#include <TopoDS_Shape.hxx>
-
-#include <NMTTools_CoupleOfShape.hxx>
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-
-#include <GEOMAlgo_DataMapOfShapeMapOfShape.hxx>
-#include <GEOMAlgo_GluerAlgo.hxx>
-#include <GEOMAlgo_Algo.hxx>
-#include <GEOMAlgo_DataMapOfShapePnt.hxx>
-
-
-//=======================================================================
-/**
- * The implementation of iterator of intersected shapes
- * for Get In Place Algorithm.
- * The intersection is in terms of 3D bounding boxes.
- */
-//=======================================================================
-//class : GEOMAlgo_GetInPlaceIterator
-//purpose :
-//=======================================================================
-class GEOMAlgo_GetInPlaceIterator {
- public:
- /**
- * Constructor.
- */
- //Standard_EXPORT
- GEOMAlgo_GetInPlaceIterator();
-
- /**
- * Destructor.
- */
- //Standard_EXPORT
- virtual ~GEOMAlgo_GetInPlaceIterator();
-
- /**
- * Clear the internal content.
- */
- //Standard_EXPORT
- void Clear() ;
-
- /**
- * Append the pair of intersected shapes.
- * @param theCS
- * The pair of intersected shapes.
- */
- //Standard_EXPORT
- void AppendPair(const NMTTools_CoupleOfShape& theCS) ;
-
- /**
- * Initialize the iterator.
- * @param theT1
- * The type of (sub)shape What.
- * @param theT2
- * The type of (sub)shape Where.
- */
- //Standard_EXPORT
- void Initialize(const TopAbs_ShapeEnum theT1,
- const TopAbs_ShapeEnum theT2) ;
- /**
- * Check the existence of pairs to iterare.
- * @return
- * Standard_True if there are pairs to iterare.
- */
- //Standard_EXPORT
- Standard_Boolean More() const;
-
- /**
- * Shift to the next pair.
- */
- //Standard_EXPORT
- void Next() ;
-
- /**
- * Returns the pair of intersected shapes.
- * @return
- * The pair of intersected shapes.
- */
- //Standard_EXPORT
- const NMTTools_CoupleOfShape& Value() const;
-
-protected:
- Standard_Integer myDim;
- NMTTools_ListOfCoupleOfShape myLists[10];
- NMTTools_ListOfCoupleOfShape myEmptyList;
- NMTTools_ListIteratorOfListOfCoupleOfShape myIterator;
-
-private:
-};
-
-
-//=======================================================================
-/**
- * The implementation of Get In Place Algorithm.
- * The algorithm provides the search the argument [What]
- * in the shape [Where].
- */
-//=======================================================================
-//class : GEOMAlgo_GetInPlace
-//purpose :
-//=======================================================================
-class GEOMAlgo_GetInPlace : public GEOMAlgo_GluerAlgo,
- public GEOMAlgo_Algo
-{
- public:
- /**
- * Constructor.
- */
- Standard_EXPORT
- GEOMAlgo_GetInPlace();
- /**
- * Destructor.
- */
- Standard_EXPORT
- virtual ~GEOMAlgo_GetInPlace();
- /**
- * Modifier. Sets the shape where the search is intended.
- * @param theShape
- * The shape where the search is intended.
- */
- Standard_EXPORT
- virtual void SetShapeWhere(const TopoDS_Shape& theShape) ;
-
- /**
- * Selector. Returns the shape where the search is intended.
- * @return
- * The shape where the search is intended.
- */
- Standard_EXPORT
- const TopoDS_Shape& ShapeWhere() const;
-
- /**
- * Modifier. Sets the tolerance of mass.
- * @param theTol
- * The value tolerance of mass.
- */
- Standard_EXPORT
- void SetTolMass(const Standard_Real theTol) ;
-
- /**
- * Selector. Returns the value tolerance of mass.
- * @return
- * The value tolerance of mass.
- */
- Standard_EXPORT
- Standard_Real TolMass() const;
-
- /**
- * Modifier. Sets the tolerance of center of gravily.
- * @param theTol
- * The value tolerance of center of gravily.
- */
- Standard_EXPORT
- void SetTolCG(const Standard_Real theTol) ;
-
- /**
- * Selector. Returns the tolerance of center of gravily.
- * @return
- * The value tolerance of center of gravily.
- */
- Standard_EXPORT
- Standard_Real TolCG() const;
-
- /**
- * Perform the algorithm.
- */
- Standard_EXPORT
- virtual void Perform() ;
-
- /**
- * Returns state of the search.
- * @return
- * Standard_True if the argument is found.
- */
- Standard_EXPORT
- Standard_Boolean IsFound() const;
-
- /**
- * Checks data
- */
- Standard_EXPORT
- virtual void CheckData() ;
-
- /**
- * Clear the internal content.
- */
- Standard_EXPORT
- virtual void Clear() ;
-
- /**
- * Returns the map of shapes IN.
- * @return
- ** Returns the map of shapes IN.
- * The Key - the (sub)shape of the argument [What].
- * The Item- the (sub)shapes of the shape [Where] that have
- * the state IN in respect of [What].
- */
- Standard_EXPORT
- const GEOMAlgo_DataMapOfShapeMapOfShape& ShapesIn() const;
-
- /**
- * Returns the map of shapes ON.
- * @return
- * Returns the map of shapes ON.
- * The Key - the (sub)shape of the argument [What].
- * The Item- the (sub)shapes of the shape [Where] that have
- * the state ON in respect of [What].
- */
- Standard_EXPORT
- const GEOMAlgo_DataMapOfShapeMapOfShape& ShapesOn() const;
-
-protected:
- Standard_EXPORT
- void Intersect() ;
-
- Standard_EXPORT
- void PerformVV() ;
-
- Standard_EXPORT
- void PerformVE() ;
-
- Standard_EXPORT
- void PerformEE() ;
-
- Standard_EXPORT
- void PerformVF() ;
-
- Standard_EXPORT
- void PerformEF() ;
-
- Standard_EXPORT
- void PerformFF() ;
-
- Standard_EXPORT
- void FillEdgesOn() ;
-
- Standard_EXPORT
- void FillFacesOn() ;
-
- Standard_EXPORT
- void FillSolidsOn() ;
-
- Standard_EXPORT
- void PerformZF() ;
-
- Standard_EXPORT
- void PerformZZ() ;
-
- Standard_EXPORT
- void FillImages() ;
-
- Standard_EXPORT
- void FillImagesCompound(const TopoDS_Shape& theS) ;
-
- Standard_EXPORT
- void CheckGProps() ;
-
- Standard_EXPORT
- void CheckGProps(const TopoDS_Shape& theS) ;
-
- Standard_EXPORT
- void FillShapesIn(const TopoDS_Shape& theS1,
- const TopoDS_Shape& theS2) ;
-
- Standard_EXPORT
- void FillShapesOn(const TopoDS_Shape& theS1,
- const TopoDS_Shape& theS2) ;
-
- Standard_EXPORT
- Standard_Boolean CheckCoincidence(const TopoDS_Shape& theS1,
- const TopoDS_Shape& theS2);
-
-
- TopoDS_Shape myShapeWhere;
- GEOMAlgo_GetInPlaceIterator myIterator;
- GEOMAlgo_DataMapOfShapeMapOfShape myShapesIn;
- GEOMAlgo_DataMapOfShapeMapOfShape myShapesOn;
- Standard_Real myTolMass;
- Standard_Real myTolCG;
- Standard_Boolean myFound;
- GEOMAlgo_DataMapOfShapePnt myMapShapePnt;
-
-private:
-};
-
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_GetInPlace_1.cxx
-// Author: Peter KURNEV
-
-#include <GEOMAlgo_GetInPlace.hxx>
-
-#include <math.h>
-
-#include <gp_Pnt.hxx>
-#include <gp_Vec.hxx>
-#include <gp_Pnt2d.hxx>
-#include <gp_Dir2d.hxx>
-
-#include <Geom_Surface.hxx>
-#include <Geom2d_Curve.hxx>
-#include <Geom2d_Line.hxx>
-#include <Geom2d_TrimmedCurve.hxx>
-#include <Geom2dAdaptor_Curve.hxx>
-#include <Geom2dHatch_Hatcher.hxx>
-#include <Geom2dHatch_Intersector.hxx>
-#include <HatchGen_Domain.hxx>
-#include <GeomAPI_ProjectPointOnCurve.hxx>
-
-#include <TopAbs_State.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <TopAbs_Orientation.hxx>
-
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Solid.hxx>
-#include <TopoDS_Face.hxx>
-
-#include <BRep_Tool.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <BRepTools.hxx>
-#include <BRepClass3d_SolidClassifier.hxx>
-
-#include <IntTools_Tools.hxx>
-
-#include <BOPTools_Tools3D.hxx>
-#include <BOPTools_Tools2D.hxx>
-
-
-
-static
- Standard_Integer PntInEdge(const TopoDS_Edge& aF,
- gp_Pnt& aP);
-static
- Standard_Integer PntInEdge(const TopoDS_Edge& aF,
- gp_Pnt& aP,
- Standard_Real& aT);
-static
- Standard_Integer PntInFace(const TopoDS_Face& aF,
- gp_Pnt& aP);
-static
- Standard_Integer PntInFace(const TopoDS_Face& aF,
- gp_Pnt& aP,
- gp_Pnt2d& theP2D);
-static
- Standard_Integer PntInSolid(const TopoDS_Solid& aZ,
- const Standard_Real aTol,
- gp_Pnt& aP);
-
-
-//=======================================================================
-//function : CheckCoincidence
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2)
-{
- Standard_Boolean bOk;
- Standard_Integer iErr;
- Standard_Real aTol2;
- TopAbs_ShapeEnum aType1, aType2;
- TopAbs_State aState;
- gp_Pnt aP1, aP2;
- //
- myErrorStatus=0;
- //
- iErr=0;
- bOk=Standard_False;
- aTol2=myTolerance*myTolerance;
- aType1=aS1.ShapeType();
- aType2=aS2.ShapeType();
- //
- // 1. A point on shape #2 -> aP2
- if (myMapShapePnt.IsBound(aS2)) {
- aP2=myMapShapePnt.Find(aS2);
- }
- else {//else 1
- if (aType2==TopAbs_VERTEX) {
- const TopoDS_Vertex& aV2=*((TopoDS_Vertex*)&aS2);
- aP2=BRep_Tool::Pnt(aV2);
- }
- //
- else if (aType2==TopAbs_EDGE) {
- const TopoDS_Edge& aE2=*((TopoDS_Edge*)&aS2);
- iErr=PntInEdge(aE2, aP2);
- }
- //
- else if (aType2==TopAbs_FACE) {
- const TopoDS_Face& aF2=*((TopoDS_Face*)&aS2);
- iErr=PntInFace(aF2, aP2);
- }
- //
- else if (aType2==TopAbs_SOLID) {
- const TopoDS_Solid& aZ2=*((TopoDS_Solid*)&aS2);
- iErr=PntInSolid(aZ2, myTolerance, aP2);
- }
- //
- else {
- iErr=1;
- }
- //
- if (iErr) {
- myErrorStatus=50;
- return bOk;
- }
- //
- myMapShapePnt.Bind(aS2, aP2);
- } //else 1
- //
- // 2. Project the point aP2 on shape #1 and check
- if (aType1==TopAbs_EDGE) {
- Standard_Integer aNbPoints;
- Standard_Real aDmin, aT, aT1, aT2, dT;
- //
- const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aS1);
- //
- GeomAPI_ProjectPointOnCurve& aPPC=myContext->ProjPC(aE1);
- aPPC.Perform(aP2);
- aNbPoints=aPPC.NbPoints();
- if (aNbPoints) {
- aDmin=aPPC.LowerDistance();
- aT=aPPC.LowerDistanceParameter();
- if (aDmin < myTolerance) {
- dT=1.e-12;
- BRep_Tool::Curve(aE1, aT1, aT2);
- if(aT > (aT1-dT) && aT < (aT2+dT)) {
- bOk=Standard_True;
- }
- }
- }
- //else {
- // iErr=2;
- //}
- }//if (aType1==TopAbs_EDGE) {
- //
- else if (aType1==TopAbs_FACE) {
- const TopoDS_Face& aF1=*((TopoDS_Face*)&aS1);
- //
- bOk=myContext->IsValidPointForFace(aP2, aF1, myTolerance);
- }
- //
- else if (aType1==TopAbs_SOLID) {
- const TopoDS_Solid& aZ1=*((TopoDS_Solid*)&aS1);
- //
- BRepClass3d_SolidClassifier& aSC=myContext->SolidClassifier(aZ1);
- aSC.Perform(aP2, myTolerance);
- aState=aSC.State();
- bOk=(aState==TopAbs_IN);
- }
- //
- if (iErr) {
- myErrorStatus=50;
- }
- //
- return bOk;
-}
-//=======================================================================
-//
-//=======================================================================
-//function : PntInEdge
-//purpose :
-//=======================================================================
-Standard_Integer PntInEdge(const TopoDS_Edge& aE,
- gp_Pnt& aP)
-
-{
- Standard_Integer iErr;
- Standard_Real aT;
- //
- iErr=PntInEdge(aE, aP, aT);
- //
- return iErr;
-}
-//=======================================================================
-//function : PntInEdge
-//purpose :
-//=======================================================================
-Standard_Integer PntInEdge(const TopoDS_Edge& aE,
- gp_Pnt& aP,
- Standard_Real& aT)
-{
- Standard_Integer iErr;
- Standard_Real aT1, aT2;
- Handle(Geom_Curve) aC3D;
- //
- iErr=0;
- //
- aC3D=BRep_Tool::Curve(aE, aT1, aT2);
- aT=IntTools_Tools::IntermediatePoint(aT1, aT2);
- aC3D->D0(aT, aP);
- //
- return iErr;
-}
-//=======================================================================
-//function : PntInSolid
-//purpose :
-//=======================================================================
-Standard_Integer PntInSolid(const TopoDS_Solid& aZ,
- const Standard_Real aTol,
- gp_Pnt& aP)
-{
- Standard_Integer iErr;
- Standard_Real aUx, aVx, aCoef;
- gp_Pnt aPx;
- gp_Pnt2d aP2Dx;
- gp_Vec aDNx;
-
- TopoDS_Face aF;
- TopExp_Explorer aExp;
- //
- iErr=0;
- aCoef=10.;
- //
- aExp.Init (aZ, TopAbs_FACE);
- for (; aExp.More() ; aExp.Next()) {
- aF=*((TopoDS_Face*)&aExp.Current());
- break;
- }
- //
- iErr=PntInFace(aF, aPx, aP2Dx);
- if (iErr) {
- return iErr;
- }
- //
- aP2Dx.Coord(aUx, aVx);
- BOPTools_Tools2D::FaceNormal(aF, aUx, aVx, aDNx);
- aDNx.Reverse();
- //
- aP.SetXYZ(aPx.XYZ()+aCoef*aTol*aDNx.XYZ());
- //
- return iErr;
-}
-//=======================================================================
-//function : PntInFace
-//purpose :
-//=======================================================================
-Standard_Integer PntInFace(const TopoDS_Face& aF,
- gp_Pnt& aP)
-{
- Standard_Integer iErr;
- //
- gp_Pnt2d aP2Dx;
- //
- iErr=PntInFace(aF, aP, aP2Dx);
- //
- return iErr;
-}
-//=======================================================================
-//function : PntInFace
-//purpose :
-//=======================================================================
-Standard_Integer PntInFace(const TopoDS_Face& aF,
- gp_Pnt& theP,
- gp_Pnt2d& theP2D)
-{
- Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint;
- Standard_Integer iErr, aIx, aNbDomains, i;
- Standard_Real aUMin, aUMax, aVMin, aVMax;
- Standard_Real aVx, aUx, aV1, aV2, aU1, aU2, aEpsT;
- Standard_Real aTotArcIntr, aTolTangfIntr, aTolHatch2D, aTolHatch3D;
- gp_Dir2d aD2D (0., 1.);
- gp_Pnt2d aP2D;
- gp_Pnt aPx;
- Handle(Geom2d_Curve) aC2D;
- Handle(Geom2d_TrimmedCurve) aCT2D;
- Handle(Geom2d_Line) aL2D;
- Handle(Geom_Surface) aS;
- TopAbs_Orientation aOrE;
- TopoDS_Face aFF;
- TopExp_Explorer aExp;
- //
- aTolHatch2D=1.e-8;
- aTolHatch3D=1.e-8;
- aTotArcIntr=1.e-10;
- aTolTangfIntr=1.e-10;
- //
- Geom2dHatch_Intersector aIntr(aTotArcIntr, aTolTangfIntr);
- Geom2dHatch_Hatcher aHatcher(aIntr,
- aTolHatch2D, aTolHatch3D,
- Standard_True, Standard_False);
- //
- iErr=0;
- aEpsT=1.e-12;
- //
- aFF=aF;
- aFF.Orientation (TopAbs_FORWARD);
- //
- aS=BRep_Tool::Surface(aFF);
- BRepTools::UVBounds(aFF, aUMin, aUMax, aVMin, aVMax);
- //
- // 1
- aExp.Init (aFF, TopAbs_EDGE);
- for (; aExp.More() ; aExp.Next()) {
- const TopoDS_Edge& aE=*((TopoDS_Edge*)&aExp.Current());
- aOrE=aE.Orientation();
- //
- aC2D=BRep_Tool::CurveOnSurface (aE, aFF, aU1, aU2);
- if (aC2D.IsNull() ) {
- iErr=1;
- return iErr;
- }
- if (fabs(aU1-aU2) < aEpsT) {
- iErr=2;
- return iErr;
- }
- //
- aCT2D=new Geom2d_TrimmedCurve(aC2D, aU1, aU2);
- aHatcher.AddElement(aCT2D, aOrE);
- }// for (; aExp.More() ; aExp.Next()) {
- //
- // 2
- aUx=IntTools_Tools::IntermediatePoint(aUMin, aUMax);
- aP2D.SetCoord(aUx, 0.);
- aL2D=new Geom2d_Line (aP2D, aD2D);
- Geom2dAdaptor_Curve aHCur(aL2D);
- //
- aIx=aHatcher.AddHatching(aHCur) ;
- //
- // 3.
- aHatcher.Trim();
- bIsDone=aHatcher.TrimDone(aIx);
- if (!bIsDone) {
- iErr=3;
- return iErr;
- }
- //
- aHatcher.ComputeDomains(aIx);
- bIsDone=aHatcher.IsDone(aIx);
- if (!bIsDone) {
- iErr=4;
- return iErr;
- }
- //
- // 4.
- aNbDomains=aHatcher.NbDomains(aIx);
- for (i=1; i<=aNbDomains; ++i) {
- const HatchGen_Domain& aDomain=aHatcher.Domain (aIx, i) ;
- bHasFirstPoint=aDomain.HasFirstPoint();
- if (!bHasFirstPoint) {
- iErr=5;
- return iErr;
- }
- //
- aV1=aDomain.FirstPoint().Parameter();
- //
- bHasSecondPoint=aDomain.HasSecondPoint();
- if (!bHasSecondPoint) {
- iErr=6;
- return iErr;
- }
- //
- aV2=aDomain.SecondPoint().Parameter();
- //
- aVx=IntTools_Tools::IntermediatePoint(aV1, aV2);
- //
- break;
- }
- //
- aS->D0(aUx, aVx, aPx);
- //
- theP2D.SetCoord(aUx, aVx);
- theP=aPx;
- //
- return iErr;
-}
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_GetInPlace_2.cxx
-// Created:
-// Author: Peter KURNEV
-
-#include <GEOMAlgo_GetInPlace.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-
-#include <gp_Pnt.hxx>
-
-#include <TopoDS_Iterator.hxx>
-#include <TopoDS_Compound.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Vertex.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-
-#include <TopExp.hxx>
-
-#include <GProp_GProps.hxx>
-#include <BRepGProp.hxx>
-
-
-static
- Standard_Integer Dimension(const TopAbs_ShapeEnum aType);
-static
- void PointProperties(const TopoDS_Shape& aS,
- GProp_GProps& aGProps);
-
-//=======================================================================
-//function : CheckGProps
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::CheckGProps()
-{
- myFound=Standard_False;
- CheckGProps(myArgument);
-}
-//=======================================================================
-//function : CheckGProps
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlace::CheckGProps(const TopoDS_Shape& aS1)
-{
- Standard_Boolean bOnlyClosed;
- Standard_Integer iDim, aNbS2;
- Standard_Real aMass1, aMass2, aD2, aTolCG2, dM;
- TopAbs_ShapeEnum aType1;
- gp_Pnt aCG1, aCG2;
- TopoDS_Iterator aIt;
- TopoDS_Compound aC2;
- BRep_Builder aBB;
- TopTools_ListIteratorOfListOfShape aItLS;
- //
- myErrorStatus=0;
- //
- aType1=aS1.ShapeType();
- if (aType1==TopAbs_COMPOUND) {
- aIt.Initialize(aS1);
- for(; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS1x=aIt.Value();
- CheckGProps(aS1x);
- if (!myFound) {
- return;
- }
- }
- }
- //
- iDim=Dimension(aType1);
- //
- if (!myImages.IsBound(aS1)) {
- // it should not be.
- return;
- }
- const TopTools_ListOfShape& aLS2=myImages.Find(aS1);
- aNbS2=aLS2.Extent();
- if (!aNbS2) {
- // it should not be.
- return;
- }
- //
- aBB.MakeCompound(aC2);
- aItLS.Initialize(aLS2);
- for (; aItLS.More(); aItLS.Next()) {
- const TopoDS_Shape& aS2x=aItLS.Value();
- aBB.Add(aC2, aS2x);
- }
- //-------------------------
- GProp_GProps aG1, aG2;
- //
- aTolCG2=myTolCG*myTolCG;
- bOnlyClosed=Standard_False;
- //
- if (iDim==0) {
- PointProperties(aS1, aG1);
- PointProperties(aC2, aG2);
- }
- else if (iDim==1) {
- BRepGProp::LinearProperties(aS1, aG1);
- BRepGProp::LinearProperties(aC2, aG2);
- }
- else if (iDim==2) {
- BRepGProp::SurfaceProperties(aS1, aG1);
- BRepGProp::SurfaceProperties(aC2, aG2);
- }
- else if (iDim==3) {
- BRepGProp::VolumeProperties(aS1, aG1, bOnlyClosed);
- BRepGProp::VolumeProperties(aC2, aG2, bOnlyClosed);
- }
- //
- aMass1=aG1.Mass();
- aMass2=aG2.Mass();
- aCG1=aG1.CentreOfMass();
- aCG2=aG2.CentreOfMass();
- //
- dM=fabs(aMass1-aMass2);
- if (aMass1 > myTolMass) {
- dM=dM/aMass1;
- }
- //
- aD2=aCG1.SquareDistance(aCG2);
- //
- if ((dM > myTolMass) || (aD2 > aTolCG2)) {
- myFound=Standard_False;
- return;
- }
- myFound=Standard_True;
-}
-//=======================================================================
-//function : Dimension
-//purpose :
-//=======================================================================
-Standard_Integer Dimension(const TopAbs_ShapeEnum aType)
-{
- Standard_Integer iDim;
- //
- iDim=-1;
- switch (aType) {
- case TopAbs_VERTEX:
- iDim=0;
- break;
- case TopAbs_EDGE:
- case TopAbs_WIRE:
- iDim=1;
- break;
- case TopAbs_FACE:
- case TopAbs_SHELL:
- iDim=2;
- break;
- case TopAbs_SOLID:
- case TopAbs_COMPSOLID:
- iDim=3;
- break;
- default:
- break;
- }
- return iDim;
-}
-//=======================================================================
-//class : GEOMAlgo_GProps
-//purpose :
-//=======================================================================
-class GEOMAlgo_GProps : public GProp_GProps {
- public:
- GEOMAlgo_GProps() : GProp_GProps() {
- };
- //
- GEOMAlgo_GProps(const gp_Pnt& aPLoc) : GProp_GProps(aPLoc) {
- };
- //
- ~GEOMAlgo_GProps() {
- };
- //
- void SetMass(const Standard_Real aMass) {
- dim=aMass;
- }
- //
- void SetCG(const gp_Pnt& aPCG) {
- g=aPCG;
- }
-};
-//=======================================================================
-//function : PointProperties
-//purpose :
-//=======================================================================
-void PointProperties(const TopoDS_Shape& aS, GProp_GProps& aGProps)
-{
- Standard_Integer i, aNbS;
- Standard_Real aDensity;
- gp_Pnt aPX;
- TopTools_IndexedMapOfShape aMS;
- //
- aDensity=1.;
- //
- TopExp::MapShapes(aS, TopAbs_VERTEX, aMS);
- aNbS=aMS.Extent();
- for (i=1; i<=aNbS; ++i) {
- GEOMAlgo_GProps aGPropsX;
- //
- const TopoDS_Vertex& aVX=*((TopoDS_Vertex*)&aMS(i));
- aPX=BRep_Tool::Pnt(aVX);
- aGPropsX.SetMass(1.);
- aGPropsX.SetCG(aPX);
- aGProps.Add(aGPropsX, aDensity);
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_GetInPlaceIterator.cxx
-// Created:
-// Author: Peter KURNEV
-
-#include <GEOMAlgo_GetInPlace.hxx>
-
-#include <NMTTools_CoupleOfShape.hxx>
-
-static
- Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2);
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-GEOMAlgo_GetInPlaceIterator::GEOMAlgo_GetInPlaceIterator()
-{
- myDim=10;
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-GEOMAlgo_GetInPlaceIterator::~GEOMAlgo_GetInPlaceIterator()
-{
-}
-//=======================================================================
-//function : Clear
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlaceIterator::Clear()
-{
- Standard_Integer i;
- //
- for (i=0; i<myDim; ++i) {
- myLists[i].Clear();
- }
-}
-//=======================================================================
-//function : AppendPair
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlaceIterator::AppendPair(const NMTTools_CoupleOfShape& theCS)
-{
- Standard_Integer iX;
- TopAbs_ShapeEnum aType1, aType2;
- //
- const TopoDS_Shape& aS1=theCS.Shape1();
- const TopoDS_Shape& aS2=theCS.Shape2();
- aType1=aS1.ShapeType();
- aType2=aS2.ShapeType();
- //
- iX=TypeToInteger(aType1, aType2);
- if (iX>=0) {
- myLists[iX].Append(theCS);
- }
-}
-//=======================================================================
-//function : ShapeWhere
-//purpose :
-//=======================================================================
-void GEOMAlgo_GetInPlaceIterator::Initialize(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2)
-{
- Standard_Integer iX;
- //
- iX=TypeToInteger(aType1, aType2);
- if (iX>=0) {
- myIterator.Initialize(myLists[iX]);
- }
- else {
- myIterator.Initialize(myEmptyList);
- }
-}
-//=======================================================================
-// function: More
-// purpose:
-//=======================================================================
-Standard_Boolean GEOMAlgo_GetInPlaceIterator::More()const
-{
- return myIterator.More();
-}
-//=======================================================================
-// function: Next
-// purpose:
-//=======================================================================
-void GEOMAlgo_GetInPlaceIterator::Next()
-{
- myIterator.Next();
-}
-//=======================================================================
-// function: Value
-// purpose:
-//=======================================================================
-const NMTTools_CoupleOfShape& GEOMAlgo_GetInPlaceIterator::Value()const
-{
- return myIterator.Value();
-}
-//=======================================================================
-//function : TypeToInteger
-//purpose :
-//=======================================================================
-Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2)
-{
- Standard_Integer iRet, iT1, iT2, iX;
- //
- iRet=-1;
- //
- if (aType1==TopAbs_VERTEX) {
- if (aType2==TopAbs_VERTEX) {
- iRet=0;
- }
- }
- else if (aType1==TopAbs_EDGE) {
- if (aType2==TopAbs_VERTEX) {
- iRet=1;
- }
- else if (aType2==TopAbs_EDGE) {
- iRet=2;
- }
- }
- else if (aType1==TopAbs_FACE) {
- if (aType2==TopAbs_VERTEX) {
- iRet=3;
- }
- else if (aType2==TopAbs_EDGE) {
- iRet=4;
- }
- else if (aType2==TopAbs_FACE) {
- iRet=5;
- }
- }
- // So_1,*_2
- else if (aType1==TopAbs_SOLID) {
- if (aType2==TopAbs_VERTEX) {
- iRet=6;
- }
- else if (aType2==TopAbs_EDGE) {
- iRet=7;
- }
- else if (aType2==TopAbs_FACE) {
- iRet=8;
- }
- else if (aType2==TopAbs_SOLID) {
- iRet=9;
- }
- }
- return iRet;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_GlueDetector.cxx
-// Created: Wed Dec 15 11:08:09 2004
-// Author: Peter KURNEV
-
-#include <GEOMAlgo_GlueAnalyser.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Compound.hxx>
-
-#include <BRep_Builder.hxx>
-
-#include <TopExp.hxx>
-
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
-
-#include <GEOMAlgo_PassKeyShape.hxx>
-#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-#include <GEOMAlgo_Tools.hxx>
-#include <GEOMAlgo_CoupleOfShapes.hxx>
-#include <GEOMAlgo_ListOfCoupleOfShapes.hxx>
-
-#include <GEOMAlgo_Gluer.hxx>
-#include <Bnd_HArray1OfBox.hxx>
-#include <Bnd_BoundSortBox.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
-#include <GEOMAlgo_IndexedDataMapOfShapeBox.hxx>
-#include <Bnd_Box.hxx>
-#include <TColStd_ListOfInteger.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <BRepBndLib.hxx>
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- GEOMAlgo_GlueAnalyser::GEOMAlgo_GlueAnalyser()
-:
- GEOMAlgo_Gluer()
-{}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
- GEOMAlgo_GlueAnalyser::~GEOMAlgo_GlueAnalyser()
-{}
-//=======================================================================
-//function : HasSolidsToGlue
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsToGlue()const
-{
- return !mySolidsToGlue.IsEmpty();
-}
-//=======================================================================
-//function : HasSolidsAlone
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const
-{
- return !mySolidsAlone.IsEmpty();
-}
-//=======================================================================
-//function : SolidsToGlue
-//purpose :
-//=======================================================================
- const GEOMAlgo_ListOfCoupleOfShapes& GEOMAlgo_GlueAnalyser::SolidsToGlue()const
-{
- return mySolidsToGlue;
-}
-//=======================================================================
-//function : SolidsAlone
-//purpose :
-//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_GlueAnalyser::SolidsAlone()const
-{
- return mySolidsAlone;
-}
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
- void GEOMAlgo_GlueAnalyser::Perform()
-{
- myErrorStatus=0;
- myWarningStatus=0;
- //
- mySolidsToGlue.Clear();
- mySolidsAlone.Clear();
- //
- CheckData();
- if (myErrorStatus) {
- return;
- }
- //
- // Initialize the context
- GEOMAlgo_ShapeAlgo::Perform();
- //
- InnerTolerance();
- if (myErrorStatus) {
- return;
- }
- //
- DetectVertices();
- if (myErrorStatus) {
- return;
- }
- //
- DetectEdges();
- if (myErrorStatus) {
- return;
- }
- //
- DetectFaces();
- if (myErrorStatus) {
- return;
- }
- //
- DetectSolids();
- if (myErrorStatus) {
- return;
- }
-}
-//=======================================================================
-//function : DetectVertices
-//purpose :
-//=======================================================================
- void GEOMAlgo_GlueAnalyser::DetectVertices()
-{
- myErrorStatus=0;
- //
- Standard_Integer j, i, aNbV, aIndex, aNbVSD;
- TColStd_ListIteratorOfListOfInteger aIt;
- Handle(Bnd_HArray1OfBox) aHAB;
- Bnd_BoundSortBox aBSB;
- TopoDS_Shape aSTmp, aVF;
- TopoDS_Vertex aVnew;
- TopTools_IndexedMapOfShape aMV, aMVProcessed;
- TopTools_ListIteratorOfListOfShape aItS;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
- GEOMAlgo_IndexedDataMapOfIntegerShape aMIS;
- GEOMAlgo_IndexedDataMapOfShapeBox aMSB;
- //
- TopExp::MapShapes(myShape, TopAbs_VERTEX, aMV);
- aNbV=aMV.Extent();
- if (!aNbV) {
- myErrorStatus=2; // no vertices in source shape
- return;
- }
- //
- aHAB=new Bnd_HArray1OfBox(1, aNbV);
- //
- for (i=1; i<=aNbV; ++i) {
- const TopoDS_Shape& aV=aMV(i);
- Bnd_Box aBox;
- //
- aBox.SetGap(myTol);
- BRepBndLib::Add(aV, aBox);
- aHAB->SetValue(i, aBox);
- aMIS.Add(i, aV);
- aMSB.Add(aV, aBox);
- }
- //
- aBSB.Initialize(aHAB);
- //
- for (i=1; i<=aNbV; ++i) {
- const TopoDS_Shape& aV=aMV(i);
- //
- if (aMVProcessed.Contains(aV)) {
- continue;
- }
- //
- const Bnd_Box& aBoxV=aMSB.FindFromKey(aV);
- const TColStd_ListOfInteger& aLI=aBSB.Compare(aBoxV);
- aNbVSD=aLI.Extent();
- if (!aNbVSD) {
- myErrorStatus=3; // it must not be
- return;
- }
- //
- // Images
- TopTools_ListOfShape aLVSD;
- //
- aIt.Initialize(aLI);
- for (j=0; aIt.More(); aIt.Next(), ++j) {
- aIndex=aIt.Value();
- const TopoDS_Shape& aVx=aMIS.FindFromKey(aIndex);
- if(!j) {
- aVF=aVx;
- }
- aLVSD.Append(aVx);
- aMVProcessed.Add(aVx);
- }
- myImages.Bind(aVF, aLVSD);
- }
- // Origins
- aItIm.Initialize(myImages);
- for (; aItIm.More(); aItIm.Next()) {
- const TopoDS_Shape& aV=aItIm.Key();
- const TopTools_ListOfShape& aLVSD=aItIm.Value();
- //
- aItS.Initialize(aLVSD);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aVSD=aItS.Value();
- if (!myOrigins.IsBound(aVSD)) {
- myOrigins.Bind(aVSD, aV);
- }
- }
- }
-}
-//=======================================================================
-//function : DetectFaces
-//purpose :
-//=======================================================================
- void GEOMAlgo_GlueAnalyser::DetectFaces()
-{
- DetectShapes(TopAbs_FACE);
-}
-//=======================================================================
-//function : DetectEdges
-//purpose :
-//=======================================================================
- void GEOMAlgo_GlueAnalyser::DetectEdges()
-{
- DetectShapes(TopAbs_EDGE);
-}
-//=======================================================================
-//function : DetectShapes
-//purpose :
-//=======================================================================
- void GEOMAlgo_GlueAnalyser::DetectShapes(const TopAbs_ShapeEnum aType)
-{
- myErrorStatus=0;
- //
- Standard_Integer i, aNbF, aNbSDF, iErr;
- TopoDS_Shape aNewShape;
- TopTools_IndexedMapOfShape aMF;
- TopTools_ListIteratorOfListOfShape aItS;
- GEOMAlgo_PassKeyShape aPKF;
- GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF;
- //
- TopExp::MapShapes(myShape, aType, aMF);
- //
- aNbF=aMF.Extent();
- for (i=1; i<=aNbF; ++i) {
- const TopoDS_Shape& aS=aMF(i);
- //
- //aPKF.Clear();//qft
- if (aType==TopAbs_FACE) {
- const TopoDS_Face& aF=TopoDS::Face(aS);
- FacePassKey(aF, aPKF);
- }
- else if (aType==TopAbs_EDGE) {
- const TopoDS_Edge& aE=TopoDS::Edge(aS);
- EdgePassKey(aE, aPKF);
- }
- //
- if (myErrorStatus) {
- return;
- }
- //
- if (aMPKLF.Contains(aPKF)) {
- TopTools_ListOfShape& aLSDF=aMPKLF.ChangeFromKey(aPKF);
- aLSDF.Append(aS);
- }
- else {
- TopTools_ListOfShape aLSDF;
- //
- aLSDF.Append(aS);
- aMPKLF.Add(aPKF, aLSDF);
- }
- }
- // check geometric coincidence
- if (myCheckGeometry) {
- iErr=GEOMAlgo_Tools::RefineSDShapes(aMPKLF, myTol, myContext); //XX
- if (iErr) {
- myErrorStatus=200;
- return;
- }
- }
- //
- // Images/Origins
- aNbF=aMPKLF.Extent();
- for (i=1; i<=aNbF; ++i) {
- const TopTools_ListOfShape& aLSDF=aMPKLF(i);
- aNbSDF=aLSDF.Extent();
- if (!aNbSDF) {
- myErrorStatus=4; // it must not be
- }
- //
- const TopoDS_Shape& aS1=aLSDF.First();
- aNewShape=aS1;
- //
- myImages.Bind(aNewShape, aLSDF);
- // origins
- aItS.Initialize(aLSDF);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aFSD=aItS.Value();
- if (!myOrigins.IsBound(aFSD)) {
- myOrigins.Bind(aFSD, aNewShape);
- }
- }
- }
-}
-//=======================================================================
-//function : DetectSolids
-//purpose :
-//=======================================================================
- void GEOMAlgo_GlueAnalyser::DetectSolids()
-{
- myErrorStatus=0;
- //
- Standard_Integer i, aNbF, aNbS, aNbC, aNbX;
- TopoDS_Compound aCmp;
- BRep_Builder aBB;
- TopTools_IndexedDataMapOfShapeListOfShape aMFS;
- TopTools_IndexedMapOfShape aMx, aMS;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
- GEOMAlgo_CoupleOfShapes aCS;
- //
- GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLS;
- GEOMAlgo_PassKeyShape aPKSx;
- //
- aBB.MakeCompound(aCmp);
- //
- TopExp::MapShapesAndAncestors(myShape, TopAbs_FACE, TopAbs_SOLID, aMFS);
- //
- aItIm.Initialize(myImages);
- for (; aItIm.More(); aItIm.Next()) {
- const TopoDS_Shape& aIm=aItIm.Key();
- if (aIm.ShapeType()!=TopAbs_FACE) {
- continue;
- }
- //
- const TopTools_ListOfShape& aLF=aItIm.Value();
- aNbF=aLF.Extent();
- if (aNbF!=2) {
- continue;
- }
- //
- TopoDS_Shape aSx[2], aFx[2];
- //
- aFx[0]=aLF.First();
- aFx[1]=aLF.Last();
- for (i=0; i<2; ++i) {
- if (!aMFS.Contains(aFx[i])) {
- continue;// it must not be so
- }
- //
- const TopTools_ListOfShape& aLS=aMFS.FindFromKey(aFx[i]);
- aNbS=aLS.Extent();
- if (aNbS!=1) {
- continue;
- }
- aSx[i]=aLS.First();
- }
- //
- if (aSx[0].IsNull() || aSx[1].IsNull()) {
- continue;
- }
- //
- //aPKSx.Clear();//qft
- //qf
- //aPKSx.SetIds(aSx[0], aSx[1]);
- aPKSx.SetShapes(aSx[0], aSx[1]);
- //qt
- //
- if (!aMPKLS.Contains(aPKSx)) {
- TopTools_ListOfShape aLSx;
- //
- aLSx.Append(aSx[0]);
- aLSx.Append(aSx[1]);
- //
- aMPKLS.Add(aPKSx, aLSx);
- }
- }
- //
- mySolidsToGlue.Clear();
- mySolidsAlone.Clear();
-
- //
- aNbC=aMPKLS.Extent();
- if (!aNbC) {
- return;
- }
- //
- for (i=1; i<=aNbC; ++i) {
- const TopTools_ListOfShape& aLSx=aMPKLS(i);
- const TopoDS_Shape& aSx1=aLSx.First();
- const TopoDS_Shape& aSx2=aLSx.Last();
- aCS.SetShape1(aSx1);
- aCS.SetShape2(aSx2);
- mySolidsToGlue.Append(aCS);
- //
- if (!aMx.Contains(aSx1)) {
- aBB.Add(aCmp, aSx1);
- aMx.Add(aSx1);
- }
- if (!aMx.Contains(aSx2)) {
- aBB.Add(aCmp, aSx2);
- aMx.Add(aSx2);
- }
- }
- myResult=aCmp;
- //
- // check alone solids
- TopExp::MapShapes(myShape, TopAbs_SOLID, aMS);
- //
- aNbX=aMx.Extent();
- for (i=1; i<=aNbX; ++i) {
- const TopoDS_Shape& aSx=aMx(i);
- if (!aMS.Contains(aSx)) {
- mySolidsAlone.Append(aSx);
- }
- }
-}
-
-/*
-// A
- // Make vertices
- aMV.Clear();
- aItIm.Initialize(myImages);
- for (; aItIm.More(); aItIm.Next()) {
- const TopoDS_Shape& aV=aItIm.Key();
- aMV.Add(aV);
- const TopTools_ListOfShape& aLVSD=aItIm.Value();
- MakeVertex(aLVSD, aVnew);//ZZ
- myImages.Bind(aVnew, aLVSD);
- }
- //
- aNbV=aMV.Extent();
- for (i=1; i<=aNbV; ++i) {
- const TopoDS_Shape& aV=aMV(i);
- myImages.UnBind(aV);
- }
- //
- */
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_GlueDetector.hxx
-// Created: Wed Dec 15 11:08:09 2004
-// Author: Peter KURNEV
-
-#ifndef _GEOMAlgo_GlueAnalyser_HeaderFile
-#define _GEOMAlgo_GlueAnalyser_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <GEOMAlgo_ListOfCoupleOfShapes.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <GEOMAlgo_Gluer.hxx>
-#include <Standard_Boolean.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_GlueAnalyser
-//purpose :
-//=======================================================================
-class GEOMAlgo_GlueAnalyser : public GEOMAlgo_Gluer
-{
- public:
- Standard_EXPORT
- GEOMAlgo_GlueAnalyser();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_GlueAnalyser();
-
- Standard_EXPORT
- virtual void Perform() ;
-
- Standard_EXPORT
- Standard_Boolean HasSolidsToGlue() const;
-
- Standard_EXPORT
- const GEOMAlgo_ListOfCoupleOfShapes& SolidsToGlue() const;
-
- Standard_EXPORT
- Standard_Boolean HasSolidsAlone() const;
-
- Standard_EXPORT
- const TopTools_ListOfShape& SolidsAlone() const;
-
- protected:
- Standard_EXPORT
- void DetectVertices() ;
-
- Standard_EXPORT
- void DetectEdges() ;
-
- Standard_EXPORT
- void DetectFaces() ;
-
- Standard_EXPORT
- void DetectShapes(const TopAbs_ShapeEnum aType) ;
-
- Standard_EXPORT
- void DetectSolids() ;
-
-
- GEOMAlgo_ListOfCoupleOfShapes mySolidsToGlue;
- TopTools_ListOfShape mySolidsAlone;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_GlueDetector.cxx
-// Author: Peter KURNEV
-
-#include <GEOMAlgo_GlueDetector.hxx>
-
-#include <Bnd_Box.hxx>
-#include <NCollection_UBTreeFiller.hxx>
-
-#include <TColStd_ListOfInteger.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <TColStd_MapIteratorOfMapOfInteger.hxx>
-
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Compound.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Iterator.hxx>
-#include <TopoDS_Compound.hxx>
-
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
-
-#include <TopExp.hxx>
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-#include <BRepBndLib.hxx>
-
-#include <NMTDS_BndSphereTree.hxx>
-#include <NMTDS_BndSphere.hxx>
-#include <NMTDS_IndexedDataMapOfShapeBndSphere.hxx>
-
-#include <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
-#include <GEOMAlgo_PassKeyShape.hxx>
-#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-#include <GEOMAlgo_Tools.hxx>
-//
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-#include <TopTools_MapOfShape.hxx>
-
-//modified by NIZNHY-PKV Tue Mar 13 10:25:47 2012f
-static
- Standard_Integer CheckAncesstors
- (const TopoDS_Shape& aVSD,
- const TopTools_MapOfShape& aMVSD,
- const TopTools_IndexedDataMapOfShapeListOfShape& aMVE,
- const TopTools_IndexedDataMapOfShapeListOfShape& aMEV,
- TopTools_IndexedDataMapOfShapeListOfShape& aMEVZ);
-//modified by NIZNHY-PKV Tue Mar 13 10:25:50 2012t
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-GEOMAlgo_GlueDetector::GEOMAlgo_GlueDetector()
-:
- GEOMAlgo_GluerAlgo(),
- GEOMAlgo_Algo()
-{}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-GEOMAlgo_GlueDetector::~GEOMAlgo_GlueDetector()
-{}
-//modified by NIZNHY-PKV Tue Mar 13 12:26:50 2012f
-//=======================================================================
-//function : StickedShapes
-//purpose :
-//=======================================================================
-const TopTools_IndexedDataMapOfShapeListOfShape&
- GEOMAlgo_GlueDetector::StickedShapes()
-{
- return myStickedShapes;
-}
-//modified by NIZNHY-PKV Tue Mar 13 12:26:54 2012t
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
-void GEOMAlgo_GlueDetector::Perform()
-{
- myErrorStatus=0;
- myWarningStatus=0;
- myStickedShapes.Clear();
- //
- CheckData();
- if (myErrorStatus) {
- return;
- }
- //
- // Initialize the context
- GEOMAlgo_GluerAlgo::Perform();
- //
- DetectVertices();
- if (myErrorStatus) {
- return;
- }
- //
- //modified by NIZNHY-PKV Wed Mar 14 08:00:09 2012f
- CheckDetected();
- if (myErrorStatus) {
- return;
- }
- //modified by NIZNHY-PKV Wed Mar 14 08:00:12 2012t
- //
- DetectEdges();
- if (myErrorStatus) {
- return;
- }
- //
- DetectFaces();
- if (myErrorStatus) {
- return;
- }
-}
-//=======================================================================
-//function : DetectVertices
-//purpose :
-//=======================================================================
-void GEOMAlgo_GlueDetector::DetectVertices()
-{
- Standard_Integer j, i, aNbV, aNbVSD;
- Standard_Real aTolV;
- gp_Pnt aPV;
- TColStd_ListIteratorOfListOfInteger aIt;
- TopoDS_Shape aVF;
- TopTools_IndexedMapOfShape aMV;
- TopTools_MapOfShape aMVProcessed;
- TopTools_ListIteratorOfListOfShape aItS;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
- TopTools_DataMapOfShapeListOfShape aMVV;
- GEOMAlgo_IndexedDataMapOfIntegerShape aMIS;
- NMTDS_IndexedDataMapOfShapeBndSphere aMSB;
- NMTDS_BndSphereTreeSelector aSelector;
- NMTDS_BndSphereTree aBBTree;
- NCollection_UBTreeFiller <Standard_Integer, NMTDS_BndSphere> aTreeFiller(aBBTree);
- //
- myErrorStatus=0;
- //
- TopExp::MapShapes(myArgument, TopAbs_VERTEX, aMV);
- aNbV=aMV.Extent();
- if (!aNbV) {
- myErrorStatus=2; // no vertices in source shape
- return;
- }
- //
- for (i=1; i<=aNbV; ++i) {
- NMTDS_BndSphere aBox;
- //
- const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&aMV(i));
- aPV=BRep_Tool::Pnt(aV);
- aTolV=BRep_Tool::Tolerance(aV);
- //
- aBox.SetGap(myTolerance);
- aBox.SetCenter(aPV);
- aBox.SetRadius(aTolV);
- //
- aTreeFiller.Add(i, aBox);
- //
- aMIS.Add(i, aV);
- aMSB.Add(aV, aBox);
- }
- //
- aTreeFiller.Fill();
- //
- //---------------------------------------------------
- // Chains
- for (i=1; i<=aNbV; ++i) {
- const TopoDS_Shape& aV=aMV(i);
- //
- if (aMVProcessed.Contains(aV)) {
- continue;
- }
- //
- Standard_Integer aNbIP, aIP, aNbIP1, aIP1;
- TopTools_ListOfShape aLVSD;
- TColStd_MapOfInteger aMIP, aMIP1, aMIPC;
- TColStd_MapIteratorOfMapOfInteger aIt1;
- //
- aMIP.Add(i);
- while(1) {
- aNbIP=aMIP.Extent();
- aIt1.Initialize(aMIP);
- for(; aIt1.More(); aIt1.Next()) {
- aIP=aIt1.Key();
- if (aMIPC.Contains(aIP)) {
- continue;
- }
- //
- const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
- const NMTDS_BndSphere& aBoxVP=aMSB.FindFromKey(aVP);
- //
- aSelector.Clear();
- aSelector.SetBox(aBoxVP);
- //
- aNbVSD=aBBTree.Select(aSelector);
- if (!aNbVSD) {
- continue; // it shoild not be so [at least IP itself]
- }
- //
- const TColStd_ListOfInteger& aLI=aSelector.Indices();
- aIt.Initialize(aLI);
- for (; aIt.More(); aIt.Next()) {
- aIP1=aIt.Value();
- if (aMIP.Contains(aIP1)) {
- continue;
- }
- aMIP1.Add(aIP1);
- } //for (; aIt.More(); aIt.Next()) {
- }//for(; aIt1.More(); aIt1.Next()) {
- //
- aNbIP1=aMIP1.Extent();
- if (!aNbIP1) {
- break;
- }
- //
- aIt1.Initialize(aMIP);
- for(; aIt1.More(); aIt1.Next()) {
- aIP=aIt1.Key();
- aMIPC.Add(aIP);
- }
- //
- aMIP.Clear();
- aIt1.Initialize(aMIP1);
- for(; aIt1.More(); aIt1.Next()) {
- aIP=aIt1.Key();
- aMIP.Add(aIP);
- }
- aMIP1.Clear();
- }// while(1)
- //
- // Fill myImages
- aNbIP=aMIPC.Extent();
- //
- if (!aNbIP) {// no SD vertices is found
- aMVProcessed.Add(aV);
- continue;
- }
- //else { // SD vertices founded [ aMIPC ]
- aIt1.Initialize(aMIPC);
- for(j=0; aIt1.More(); aIt1.Next(), ++j) {
- aIP=aIt1.Key();
- const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
- if (!j) {
- aVF=aVP;
- }
- aLVSD.Append(aVP);
- aMVProcessed.Add(aVP);
- }
- //}
- myImages.Bind(aVF, aLVSD);
- }// for (i=1; i<=aNbV; ++i) {
- //------------------------------
- // Origins
- aItIm.Initialize(myImages);
- for (; aItIm.More(); aItIm.Next()) {
- const TopoDS_Shape& aV=aItIm.Key();
- const TopTools_ListOfShape& aLVSD=aItIm.Value();
- aItS.Initialize(aLVSD);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aVSD=aItS.Value();
- if (!myOrigins.IsBound(aVSD)) {
- myOrigins.Bind(aVSD, aV);
- }
- }
- }
-}
-//=======================================================================
-//function : DetectFaces
-//purpose :
-//=======================================================================
-void GEOMAlgo_GlueDetector::DetectFaces()
-{
- DetectShapes(TopAbs_FACE);
-}
-//=======================================================================
-//function : DetectEdges
-//purpose :
-//=======================================================================
-void GEOMAlgo_GlueDetector::DetectEdges()
-{
- DetectShapes(TopAbs_EDGE);
-}
-//=======================================================================
-//function : DetectShapes
-//purpose :
-//=======================================================================
-void GEOMAlgo_GlueDetector::DetectShapes(const TopAbs_ShapeEnum aType)
-{
- Standard_Boolean bDegenerated;
- Standard_Integer i, aNbF, aNbSDF, iErr;
- TopTools_IndexedMapOfShape aMF;
- TopTools_ListIteratorOfListOfShape aItLS;
- GEOMAlgo_PassKeyShape aPKF;
- GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF;
- //
- myErrorStatus=0;
- //
- TopExp::MapShapes(myArgument, aType, aMF);
- //
- aNbF=aMF.Extent();
- for (i=1; i<=aNbF; ++i) {
- const TopoDS_Shape& aS=aMF(i);
- //
- if (aType==TopAbs_FACE) {
- const TopoDS_Face& aF=*((TopoDS_Face*)&aS);
- FacePassKey(aF, aPKF);
- }
- else if (aType==TopAbs_EDGE) {
- const TopoDS_Edge& aE=*((TopoDS_Edge*)&aS);
- EdgePassKey(aE, aPKF);
- }
- //
- if (myErrorStatus) {
- return;
- }
- //
- if (aMPKLF.Contains(aPKF)) {
- TopTools_ListOfShape& aLSDF=aMPKLF.ChangeFromKey(aPKF);
- aLSDF.Append(aS);
- }
- else {
- TopTools_ListOfShape aLSDF;
- //
- aLSDF.Append(aS);
- aMPKLF.Add(aPKF, aLSDF);
- }
- }
- // check geometric coincidence
- if (myCheckGeometry) {
- iErr=GEOMAlgo_Tools::RefineSDShapes(aMPKLF, myTolerance, myContext);
- if (iErr) {
- myErrorStatus=200;
- return;
- }
- }
- //
- // Images/Origins
- aNbF=aMPKLF.Extent();
- for (i=1; i<=aNbF; ++i) {
- const TopTools_ListOfShape& aLSDF=aMPKLF(i);
- aNbSDF=aLSDF.Extent();
- if (!aNbSDF) {
- myErrorStatus=4; // it must not be
- }
- //
- if (aNbSDF==1) {
- continue;
- }
- //
- const TopoDS_Shape& aS1=aLSDF.First();
- //
- if (aType==TopAbs_EDGE) {
- const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aS1);
- bDegenerated=BRep_Tool::Degenerated(aE1);
- if (bDegenerated) {
- continue;
- }
- }
- //
- myImages.Bind(aS1, aLSDF);
- //
- // origins
- aItLS.Initialize(aLSDF);
- for (; aItLS.More(); aItLS.Next()) {
- const TopoDS_Shape& aFSD=aItLS.Value();
- if (!myOrigins.IsBound(aFSD)) {
- myOrigins.Bind(aFSD, aS1);
- }
- }
- }// for (i=1; i<=aNbF; ++i)
-}
-//=======================================================================
-//function : FacePassKey
-//purpose :
-//=======================================================================
-void GEOMAlgo_GlueDetector::FacePassKey(const TopoDS_Face& aF,
- GEOMAlgo_PassKeyShape& aPK)
-{
- Standard_Integer i, aNbE;
- TopoDS_Shape aER;
- TopTools_ListOfShape aLE;
- TopTools_IndexedMapOfShape aME;
- //
- TopExp::MapShapes(aF, TopAbs_EDGE, aME);
- //
- aNbE=aME.Extent();
- for (i=1; i<=aNbE; ++i) {
- const TopoDS_Shape& aE=aME(i);
- //
- const TopoDS_Edge& aEE=*((TopoDS_Edge*)&aE);
- if (BRep_Tool::Degenerated(aEE)) {
- continue;
- }
- //
- if (myOrigins.IsBound(aE)) {
- aER=myOrigins.Find(aE);
- }
- else {
- aER=aE;
- }
- aLE.Append(aER);
- }
- aPK.SetShapes(aLE);
-}
-//=======================================================================
-//function : EdgePassKey
-//purpose :
-//=======================================================================
-void GEOMAlgo_GlueDetector::EdgePassKey(const TopoDS_Edge& aE,
- GEOMAlgo_PassKeyShape& aPK)
-{
- TopAbs_Orientation aOr;
- TopoDS_Shape aVR;
- TopoDS_Iterator aIt;
- TopTools_ListOfShape aLV;
- //
- aIt.Initialize(aE);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aV=aIt.Value();
- aOr=aV.Orientation();
- if (aOr==TopAbs_FORWARD || aOr==TopAbs_REVERSED) {
- if (myOrigins.IsBound(aV)) {
- aVR=myOrigins.Find(aV);
- }
- else {
- aVR=aV;
- }
- aLV.Append(aVR);
- }
- }
- //
- aPK.SetShapes(aLV);
-}
-//modified by NIZNHY-PKV Tue Mar 13 09:54:18 2012f
-//=======================================================================
-//function : CheckDetected
-//purpose :
-//=======================================================================
-void GEOMAlgo_GlueDetector::CheckDetected()
-{
- TopoDS_Iterator aItA;
- TopExp_Explorer aExp;
- TopTools_ListOfShape aLV;
- TopTools_MapOfShape aMFence;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
- TopTools_IndexedDataMapOfShapeListOfShape aMVE, aMEV;
- //
- // 1. aMVE, aMEV
- TopExp::MapShapesAndAncestors(myArgument, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
- //
- aExp.Init(myArgument, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- const TopoDS_Shape& aE=aExp.Current();
- //
- aLV.Clear();
- aMFence.Clear();
- aItA.Initialize(aE);
- for (; aItA.More(); aItA.Next()) {
- const TopoDS_Shape& aV=aItA.Value();
- if (aMFence.Add(aV)) {
- aLV.Append(aV);
- }
- }
- //
- aMEV.Add(aE, aLV);
- }
- // 2. Checking
- aItIm.Initialize(myImages);
- for (; aItIm.More(); aItIm.Next()) {
- //const TopoDS_Shape& aV=aItIm.Key();
- const TopTools_ListOfShape& aLVSD=aItIm.Value();
- CheckDetected(aLVSD, aMVE, aMEV);
- }
-}
-//=======================================================================
-//function : CheckDetected
-//purpose :
-//=======================================================================
-void GEOMAlgo_GlueDetector::CheckDetected
- (const TopTools_ListOfShape& aLVSD,
- const TopTools_IndexedDataMapOfShapeListOfShape& aMVE,
- const TopTools_IndexedDataMapOfShapeListOfShape& aMEV)
-{
- Standard_Integer i, aNbVSD, aNbA, iRet;
- TopAbs_ShapeEnum aTypeS, aTypeA[2];
- TopExp_Explorer aExp, aExpA;
- TopTools_MapOfShape aMFence, aMVSD;
- TopTools_ListOfShape aLV;
- TopTools_ListIteratorOfListOfShape aItLS;
- //
- myErrorStatus=0;
- //
- aNbVSD=aLVSD.Extent();
- if (aNbVSD < 2) {
- return ;
- }
- //
- aItLS.Initialize(aLVSD);
- for (; aItLS.More(); aItLS.Next()) {
- const TopoDS_Shape& aVSD=aItLS.Value();
- aMVSD.Add(aVSD);
- }
- //
- aItLS.Initialize(aLVSD);
- for (; aItLS.More(); aItLS.Next()) {
- const TopoDS_Shape& aVSD=aItLS.Value();
- //
- iRet=CheckAncesstors(aVSD, aMVSD, aMVE, aMEV, myStickedShapes);
- if (iRet) {
- // Sticked shapes detected
- myWarningStatus=2;
- }
- }
-}
-//=======================================================================
-//function : CheckAncesstors
-//purpose :
-//=======================================================================
-Standard_Integer CheckAncesstors
- (const TopoDS_Shape& aVSD,
- const TopTools_MapOfShape& aMVSD,
- const TopTools_IndexedDataMapOfShapeListOfShape& aMVE,
- const TopTools_IndexedDataMapOfShapeListOfShape& aMEV,
- TopTools_IndexedDataMapOfShapeListOfShape& aMEVZ)
-{
- Standard_Address pLE, pLV, pLVZ;
- Standard_Integer iRet, aNbVX;
- TopTools_ListIteratorOfListOfShape aItLE, aItLV;
- TopTools_MapOfShape aMFence;
- TopTools_ListOfShape aLVX;
- //
- iRet=0;
- //
- pLE=aMVE.FindFromKey1(aVSD);
- if (!pLE) {
- return iRet;
- }
- //
- const TopTools_ListOfShape& aLE=*((TopTools_ListOfShape*)pLE);
- aItLE.Initialize(aLE);
- for (; aItLE.More(); aItLE.Next()) {
- const TopoDS_Shape& aE=aItLE.Value();
- //
- pLV=aMEV.FindFromKey1(aE);
- if (!pLV) {
- continue; // it should be not so
- }
- //
- aLVX.Clear();
- const TopTools_ListOfShape& aLV=*((TopTools_ListOfShape*)pLV);
- aItLV.Initialize(aLV);
- for (; aItLV.More(); aItLV.Next()) {
- const TopoDS_Shape& aV=aItLV.Value();
- if (!aV.IsSame(aVSD)) {
- if (aMVSD.Contains(aV)) {
- if (aMFence.Add(aV)) {
- aLVX.Append(aV);
- }
- }
- }
- }
- //
- aNbVX=aLVX.Extent();
- if (!aNbVX) {
- continue;
- }
- //
- iRet=1;
- //
- pLVZ=aMEVZ.FindFromKey1(aE);
- if (!pLVZ) {
- aMEVZ.Add(aE, aLVX);
- }
- else {
- TopTools_ListOfShape& aLVZ=*((TopTools_ListOfShape*)pLVZ);
- aLVZ.Append(aLVX);
- }
- }
- //
- return iRet;
-}
-//modified by NIZNHY-PKV Tue Mar 13 09:54:59 2012t
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_GlueDetector.hxx
-// Author: Peter KURNEV
-
-#ifndef _GEOMAlgo_GlueDetector_HeaderFile
-#define _GEOMAlgo_GlueDetector_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-
-#include <GEOMAlgo_GluerAlgo.hxx>
-#include <GEOMAlgo_Algo.hxx>
-#include <GEOMAlgo_PassKeyShape.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_GlueDetector
-//purpose :
-//=======================================================================
-class GEOMAlgo_GlueDetector : public GEOMAlgo_GluerAlgo,
- public GEOMAlgo_Algo
-{
-public:
- Standard_EXPORT
- GEOMAlgo_GlueDetector();
-
- Standard_EXPORT virtual
- ~GEOMAlgo_GlueDetector();
-
- Standard_EXPORT virtual
- void Perform() ;
-
-//modified by NIZNHY-PKV Tue Mar 13 12:23:20 2012f
- Standard_EXPORT
- const TopTools_IndexedDataMapOfShapeListOfShape& StickedShapes();
-//modified by NIZNHY-PKV Tue Mar 13 12:23:26 2012t
-//------------------------------------------------
-protected:
- Standard_EXPORT
- void DetectVertices() ;
-
- Standard_EXPORT
- void DetectEdges() ;
-
- Standard_EXPORT
- void DetectFaces() ;
-
- Standard_EXPORT
- void DetectShapes(const TopAbs_ShapeEnum aType) ;
-
- Standard_EXPORT
- void EdgePassKey(const TopoDS_Edge& aE,
- GEOMAlgo_PassKeyShape& aPK) ;
-
- Standard_EXPORT
- void FacePassKey(const TopoDS_Face& aF,
- GEOMAlgo_PassKeyShape& aPK) ;
-
- //modified by NIZNHY-PKV Tue Mar 13 09:53:03 2012f
- Standard_EXPORT
- void CheckDetected();
- //
- Standard_EXPORT
- void CheckDetected
- (const TopTools_ListOfShape& aLVSD,
- const TopTools_IndexedDataMapOfShapeListOfShape& aMVE,
- const TopTools_IndexedDataMapOfShapeListOfShape& aMEV);
-
-
- protected:
- TopTools_IndexedDataMapOfShapeListOfShape myStickedShapes;
- //modified by NIZNHY-PKV Tue Mar 13 09:53:08 2012t
-
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Gluer.cxx
-// Created: Sat Dec 04 12:45:53 2004
-// Author: Peter KURNEV
-// <peter@PREFEX>
-//
-#include <GEOMAlgo_Gluer.hxx>
-
-#include <NMTDS_BoxBndTree.hxx>
-#include <NCollection_UBTreeFiller.hxx>
-
-#include <TColStd_MapIteratorOfMapOfInteger.hxx>
-#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_ListOfInteger.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
-#include <gp_XYZ.hxx>
-
-#include <Geom_Curve.hxx>
-#include <Geom_Surface.hxx>
-
-#include <Bnd_Box.hxx>
-#include <Bnd_HArray1OfBox.hxx>
-#include <Bnd_BoundSortBox.hxx>
-
-#include <TopLoc_Location.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <TopAbs_Orientation.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Compound.hxx>
-#include <TopoDS_Wire.hxx>
-#include <TopoDS_Shell.hxx>
-#include <TopoDS_Solid.hxx>
-#include <TopoDS_Iterator.hxx>
-
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-#include <BRepLib.hxx>
-#include <BRepTools.hxx>
-#include <BRepBndLib.hxx>
-
-#include <IntTools_Context.hxx>
-#include <BOPTools_Tools.hxx>
-#include <BOPTools_Tools3D.hxx>
-#include <BOPTools_Tools2D.hxx>
-#include <BOP_CorrectTolerances.hxx>
-
-#include <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
-#include <GEOMAlgo_IndexedDataMapOfShapeBox.hxx>
-#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-#include <GEOMAlgo_PassKeyShape.hxx>
-#include <GEOMAlgo_Tools.hxx>
-//
-
-#include <NMTDS_BndSphereTree.hxx>
-#include <NMTDS_BndSphere.hxx>
-#include <NMTDS_IndexedDataMapOfShapeBndSphere.hxx>
-
-//
-static
- void GetSubShapes(const TopoDS_Shape& aS,
- TopTools_IndexedMapOfShape& aMSS);
-
-//=======================================================================
-//function : GEOMAlgo_Gluer
-//purpose :
-//=======================================================================
-GEOMAlgo_Gluer::GEOMAlgo_Gluer()
-:
- GEOMAlgo_ShapeAlgo()
-{
- myTolerance=0.0001;
- myTol=myTolerance;
- myCheckGeometry=Standard_True;
- myKeepNonSolids=Standard_False;
- myNbAlone=0;
-}
-//=======================================================================
-//function : ~GEOMAlgo_Gluer
-//purpose :
-//=======================================================================
-GEOMAlgo_Gluer::~GEOMAlgo_Gluer()
-{
-}
-//=======================================================================
-//function : SetCheckGeometry
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::SetCheckGeometry(const Standard_Boolean aFlag)
-{
- myCheckGeometry=aFlag;
-}
-//=======================================================================
-//function : CheckGeometry
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_Gluer::CheckGeometry() const
-{
- return myCheckGeometry;
-}
-//=======================================================================
-//function : SetKeepNonSolids
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::SetKeepNonSolids(const Standard_Boolean aFlag)
-{
- myKeepNonSolids=aFlag;
-}
-//=======================================================================
-//function : KeepNonSolids
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_Gluer::KeepNonSolids()const
-{
- return myKeepNonSolids;
-}
-//=======================================================================
-//function : AloneShapes
-//purpose :
-//=======================================================================
-Standard_Integer GEOMAlgo_Gluer::AloneShapes()const
-{
- return myNbAlone;
-}
-//=======================================================================
-//function : Images
-//purpose :
-//=======================================================================
-const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer::Images()const
-{
- return myImages;
-}
-//=======================================================================
-//function : Origins
-//purpose :
-//=======================================================================
-const TopTools_DataMapOfShapeShape& GEOMAlgo_Gluer::Origins()const
-{
- return myOrigins;
-}
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::Perform()
-{
- const Standard_Integer aNb=8;
- Standard_Integer i;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- // Initialize the context
- GEOMAlgo_ShapeAlgo::Perform();
- //
- void (GEOMAlgo_Gluer::* pF[aNb])()={
- &GEOMAlgo_Gluer::CheckData, &GEOMAlgo_Gluer::InnerTolerance,
- &GEOMAlgo_Gluer::MakeVertices, &GEOMAlgo_Gluer::MakeEdges,
- &GEOMAlgo_Gluer::MakeFaces, &GEOMAlgo_Gluer::MakeShells,
- &GEOMAlgo_Gluer::MakeSolids, &GEOMAlgo_Gluer::CheckResult
- };
- //
- for (i=0; i<aNb; ++i) {
- (this->*pF[i])();
- if (myErrorStatus) {
- return;
- }
- }
-}
-
-//=======================================================================
-//function : MakeVertices
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::MakeVertices()
-{
- myErrorStatus=0;
- //
- Standard_Integer j, i, aNbV, aNbVSD;
- Standard_Real aTolV;
- gp_Pnt aPV;
- TColStd_ListIteratorOfListOfInteger aIt;
- TopoDS_Shape aVF;
- TopoDS_Vertex aVnew;
- TopTools_IndexedMapOfShape aMV, aMVProcessed;
- TopTools_ListIteratorOfListOfShape aItS;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
- TopTools_DataMapOfShapeListOfShape aMVV;
- GEOMAlgo_IndexedDataMapOfIntegerShape aMIS;
- //modified by NIZNHY-PKV Thu Jan 21 10:03:07 2010f
- //GEOMAlgo_IndexedDataMapOfShapeBox aMSB;
- NMTDS_IndexedDataMapOfShapeBndSphere aMSB;
- //modified by NIZNHY-PKV Thu Jan 21 10:03:10 2010t
- //
- NMTDS_BndSphereTreeSelector aSelector;
- NMTDS_BndSphereTree aBBTree;
- NCollection_UBTreeFiller <Standard_Integer, NMTDS_BndSphere> aTreeFiller(aBBTree);
- //
- TopExp::MapShapes(myShape, TopAbs_VERTEX, aMV);
- aNbV=aMV.Extent();
- if (!aNbV) {
- myErrorStatus=2; // no vertices in source shape
- return;
- }
- //
- for (i=1; i<=aNbV; ++i) {
- NMTDS_BndSphere aBox;
- //
- const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&aMV(i));
- aPV=BRep_Tool::Pnt(aV);
- aTolV=BRep_Tool::Tolerance(aV);
- //
- aBox.SetGap(myTol);
- aBox.SetCenter(aPV);
- aBox.SetRadius(aTolV);
- //
- aTreeFiller.Add(i, aBox);
- //
- aMIS.Add(i, aV);
- aMSB.Add(aV, aBox);
- }
- //
- aTreeFiller.Fill();
- //
- //------------------------------
- // Chains
- for (i=1; i<=aNbV; ++i) {
- const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&aMV(i));
- //
- if (aMVProcessed.Contains(aV)) {
- continue;
- }
- //
- Standard_Integer aNbIP, aIP, aNbIP1, aIP1;
- TopTools_ListOfShape aLVSD;
- TColStd_MapOfInteger aMIP, aMIP1, aMIPC;
- TColStd_MapIteratorOfMapOfInteger aIt1;
- //
- aMIP.Add(i);
- while(1) {
- aNbIP=aMIP.Extent();
- aIt1.Initialize(aMIP);
- for(; aIt1.More(); aIt1.Next()) {
- aIP=aIt1.Key();
- if (aMIPC.Contains(aIP)) {
- continue;
- }
- //
- const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
- //modified by NIZNHY-PKV Thu Jan 21 10:04:09 2010f
- const NMTDS_BndSphere& aBoxVP=aMSB.FindFromKey(aVP);
- //const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP);
- //modified by NIZNHY-PKV Thu Jan 21 10:04:11 2010t
- //
- aSelector.Clear();
- aSelector.SetBox(aBoxVP);
- //
- aNbVSD=aBBTree.Select(aSelector);
- if (!aNbVSD) {
- continue; // it must not be
- }
- //
- const TColStd_ListOfInteger& aLI=aSelector.Indices();
- //
- aIt.Initialize(aLI);
- for (; aIt.More(); aIt.Next()) {
- aIP1=aIt.Value();
- if (aMIP.Contains(aIP1)) {
- continue;
- }
- aMIP1.Add(aIP1);
- } //for (; aIt.More(); aIt.Next()) {
- }//for(; aIt1.More(); aIt1.Next()) {
- //
- aNbIP1=aMIP1.Extent();
- if (!aNbIP1) {
- break;
- }
- //
- aIt1.Initialize(aMIP);
- for(; aIt1.More(); aIt1.Next()) {
- aIP=aIt1.Key();
- aMIPC.Add(aIP);
- }
- //
- aMIP.Clear();
- aIt1.Initialize(aMIP1);
- for(; aIt1.More(); aIt1.Next()) {
- aIP=aIt1.Key();
- aMIP.Add(aIP);
- }
- aMIP1.Clear();
- }// while(1)
- //
- // Fill myImages
- aNbIP=aMIPC.Extent();
- //
- if (!aNbIP) {// no SD vertices founded
- aVF=aV;
- aLVSD.Append(aV);
- aMVProcessed.Add(aV);
- }
- else { // SD vertices founded [ aMIPC ]
- aIt1.Initialize(aMIPC);
- for(j=0; aIt1.More(); aIt1.Next(), ++j) {
- aIP=aIt1.Key();
- const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
- if (!j) {
- aVF=aVP;
- }
- aLVSD.Append(aVP);
- aMVProcessed.Add(aVP);
- }
- }
- myImages.Bind(aVF, aLVSD);
- }// for (i=1; i<=aNbV; ++i) {
- //------------------------------
- //
- // Make new vertices
- aMV.Clear();
- aItIm.Initialize(myImages);
- for (; aItIm.More(); aItIm.Next()) {
- const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&aItIm.Key());
- const TopTools_ListOfShape& aLVSD=aItIm.Value();
- aNbVSD=aLVSD.Extent();
- if (aNbVSD>1) {
- aMV.Add(aV);
- MakeVertex(aLVSD, aVnew);
- aMVV.Bind(aVnew, aLVSD);
- }
- }
- //
- // UnBind old vertices
- aNbV=aMV.Extent();
- for (i=1; i<=aNbV; ++i) {
- const TopoDS_Shape& aV=aMV(i);
- myImages.UnBind(aV);
- }
- //
- // Bind new vertices
- aItIm.Initialize(aMVV);
- for (; aItIm.More(); aItIm.Next()) {
- const TopoDS_Shape& aV=aItIm.Key();
- const TopTools_ListOfShape& aLVSD=aItIm.Value();
- myImages.Bind(aV, aLVSD);
- }
- //
- // Origins
- aItIm.Initialize(myImages);
- for (; aItIm.More(); aItIm.Next()) {
- const TopoDS_Shape& aV=aItIm.Key();
- const TopTools_ListOfShape& aLVSD=aItIm.Value();
- aItS.Initialize(aLVSD);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aVSD=aItS.Value();
- if (!myOrigins.IsBound(aVSD)) {
- myOrigins.Bind(aVSD, aV);
- }
- }
- }
-}
-//=======================================================================
-//function : MakeSubShapes
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::MakeSubShapes (const TopoDS_Shape& theShape,
- TopTools_MapOfShape& theMS,
- TopoDS_Compound& theResult)
-{
- if (theMS.Contains(theShape))
- return;
- //
- BRep_Builder aBB;
- //
- theMS.Add(theShape);
- //
- if (theShape.ShapeType() == TopAbs_COMPOUND ||
- theShape.ShapeType() == TopAbs_COMPSOLID) {
- TopoDS_Iterator It (theShape, Standard_True, Standard_True);
- for (; It.More(); It.Next()) {
- MakeSubShapes(It.Value(), theMS, theResult);
- }
- }
- else if (theShape.ShapeType() == TopAbs_SOLID) {
- // build a solid
- TopoDS_Solid aNewSolid;
- TopExp_Explorer aExpS, aExp;
- //
- const TopoDS_Solid& aSolid = TopoDS::Solid(theShape);
- //
- TopAbs_Orientation anOr = aSolid.Orientation();
- //
- aBB.MakeSolid(aNewSolid);
- aNewSolid.Orientation(anOr);
- //
- aExp.Init(aSolid, TopAbs_SHELL);
- for (; aExp.More(); aExp.Next())
- {
- const TopoDS_Shape& aShell=aExp.Current();
- const TopoDS_Shape& aShellR=myOrigins.Find(aShell);
- aBB.Add(aNewSolid, aShellR);
- }
- //
- TopTools_ListOfShape aLS;
- //
- aLS.Append(aSolid);
- myImages.Bind(aNewSolid, aLS);
- myOrigins.Bind(aSolid, aNewSolid);
- //
- aBB.Add(theResult, aNewSolid);
- }
- else if (theShape.ShapeType() == TopAbs_WIRE) {
- if (myKeepNonSolids) {
- // just add image
- if (!myOrigins.IsBound(theShape)) {
- // build wire
- const TopoDS_Wire& aW=TopoDS::Wire(theShape);
- //
- TopoDS_Wire newWire;
- aBB.MakeWire(newWire);
- //
- TopExp_Explorer aExpE (aW, TopAbs_EDGE);
- for (; aExpE.More(); aExpE.Next()) {
- const TopoDS_Edge& aE=TopoDS::Edge(aExpE.Current());
- TopoDS_Edge aER=TopoDS::Edge(myOrigins.Find(aE));
- //
- aER.Orientation(TopAbs_FORWARD);
- if (!BRep_Tool::Degenerated(aER)) {
- // build p-curve
- //if (bIsUPeriodic) {
- // GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax);
- //}
- //BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD);
- //
- // orient image
- Standard_Boolean bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext);
- if (bIsToReverse) {
- aER.Reverse();
- }
- }
- else {
- aER.Orientation(aE.Orientation());
- }
- //
- aBB.Add(newWire, aER);
- }
- // xf
- TopTools_ListOfShape aLW;
- //
- aLW.Append(aW);
- myImages.Bind(newWire, aLW);
- myOrigins.Bind(aW, newWire);
- }
- const TopoDS_Shape& aShapeR = myOrigins.Find(theShape);
- aBB.Add(theResult, aShapeR);
- }
- }
- else
- {
- if (myKeepNonSolids) {
- // just add image
- const TopoDS_Shape& aShapeR = myOrigins.Find(theShape);
- aBB.Add(theResult, aShapeR);
- }
- }
-}
-//=======================================================================
-//function : MakeSolids
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::MakeSolids()
-{
- myErrorStatus=0;
- //
- BRep_Builder aBB;
- TopoDS_Compound aCmp;
- TopTools_MapOfShape aMS;
- //
- aBB.MakeCompound(aCmp);
- //
- // Add images of all initial sub-shapes in the result.
- // If myKeepNonSolids==false, add only solids images.
- MakeSubShapes(myShape, aMS, aCmp);
- //
- myResult=aCmp;
- //
- if (aMS.Extent()) {
- BOP_CorrectTolerances::CorrectCurveOnSurface(myResult);
- }
-}
-//=======================================================================
-//function : MakeShells
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::MakeShells()
-{
- myErrorStatus=0;
- //
- Standard_Boolean bIsToReverse;
- Standard_Integer i, aNbS;
- TopAbs_Orientation anOr;
- TopoDS_Shell aNewShell;
- TopoDS_Face aFR;
- TopTools_IndexedMapOfShape aMS;
- TopExp_Explorer aExp;
- BRep_Builder aBB;
- //
- TopExp::MapShapes(myShape, TopAbs_SHELL, aMS);
- //
- aNbS=aMS.Extent();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shell& aShell=TopoDS::Shell(aMS(i));
- anOr=aShell.Orientation();
- //
- aBB.MakeShell(aNewShell);
- aNewShell.Orientation(anOr);
- aExp.Init(aShell, TopAbs_FACE);
- for (; aExp.More(); aExp.Next()) {
- const TopoDS_Face& aF=TopoDS::Face(aExp.Current());
- aFR=TopoDS::Face(myOrigins.Find(aF));
- if (aFR.IsSame(aF)) {
- aBB.Add(aNewShell, aF);
- continue;
- }
- bIsToReverse=IsToReverse(aFR, aF);
- if (bIsToReverse) {
- aFR.Reverse();
- }
- aBB.Add(aNewShell, aFR);
- }
- //
- TopTools_ListOfShape aLS;
- //
- aLS.Append(aShell);
- myImages.Bind(aNewShell, aLS);
- myOrigins.Bind(aShell, aNewShell);
- }
-}
-//=======================================================================
-//function : MakeFaces
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::MakeFaces()
-{
- MakeShapes(TopAbs_FACE);
-}
-//=======================================================================
-//function : MakeEdges
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::MakeEdges()
-{
- MakeShapes(TopAbs_EDGE);
-}
-//=======================================================================
-//function : MakeShapes
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType)
-{
- myErrorStatus=0;
- //
- Standard_Boolean bHasNewSubShape;
- Standard_Integer i, aNbF, aNbSDF, iErr;
- TopoDS_Shape aNewShape;
- TopTools_IndexedMapOfShape aMF;
- TopTools_ListIteratorOfListOfShape aItS;
- GEOMAlgo_PassKeyShape aPKF;
- GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF;
- //
- TopExp::MapShapes(myShape, aType, aMF);
- //
- aNbF=aMF.Extent();
- for (i=1; i<=aNbF; ++i) {
- const TopoDS_Shape& aS=aMF(i);
- //
- if (aType==TopAbs_FACE) {
- const TopoDS_Face& aF=TopoDS::Face(aS);
- FacePassKey(aF, aPKF);
- }
- else if (aType==TopAbs_EDGE) {
- const TopoDS_Edge& aE=TopoDS::Edge(aS);
- EdgePassKey(aE, aPKF);
- }
- //
- if (myErrorStatus) {
- return;
- }
- //
- if (aMPKLF.Contains(aPKF)) {
- TopTools_ListOfShape& aLSDF=aMPKLF.ChangeFromKey(aPKF);
- aLSDF.Append(aS);
- }
- else {
- TopTools_ListOfShape aLSDF;
- //
- aLSDF.Append(aS);
- aMPKLF.Add(aPKF, aLSDF);
- }
- }
- // check geometric coincidence
- if (myCheckGeometry) {
- iErr=GEOMAlgo_Tools::RefineSDShapes(aMPKLF, myTol, myContext);
- if (iErr) {
- myErrorStatus=200;
- return;
- }
- }
- //
- // Images/Origins
- //
- aNbF=aMPKLF.Extent();
- for (i=1; i<=aNbF; ++i) {
- const TopTools_ListOfShape& aLSDF=aMPKLF(i);
- aNbSDF=aLSDF.Extent();
- if (!aNbSDF) {
- myErrorStatus=4; // it must not be
- }
- //
- const TopoDS_Shape& aS1=aLSDF.First();
- //
- bHasNewSubShape=Standard_True;
- // prevent creation of a new shape if there are not
- // new sub-shapes of aSS among the originals
- if (aNbSDF==1) {
- bHasNewSubShape=HasNewSubShape(aS1);
- if (!bHasNewSubShape) {
- aNewShape=aS1;
- aNewShape.Orientation(TopAbs_FORWARD);
- }
- }
- //
- if (bHasNewSubShape) {
- if (aType==TopAbs_FACE) {
- TopoDS_Face aNewFace;
- //
- const TopoDS_Face& aF1=TopoDS::Face(aS1);
- MakeFace(aF1, aNewFace);
- aNewShape=aNewFace;
- }
- else if (aType==TopAbs_EDGE) {
- TopoDS_Edge aNewEdge;
- //
- const TopoDS_Edge& aE1=TopoDS::Edge(aS1);
- MakeEdge(aE1, aNewEdge);
- aNewShape=aNewEdge;
- }
- }
- //
- myImages.Bind(aNewShape, aLSDF);
- // origins
- aItS.Initialize(aLSDF);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aFSD=aItS.Value();
- if (!myOrigins.IsBound(aFSD)) {
- myOrigins.Bind(aFSD, aNewShape);
- }
- }
- }
-}
-//=======================================================================
-//function : CheckResult
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::CheckResult()
-{
- myErrorStatus=0;
- //
- if (myResult.IsNull()) {
- myErrorStatus=6;
- return;
- }
- //
- Standard_Boolean bFound;
- Standard_Integer i, j, aNbS, aNbFS, aNbSx;
- TopTools_IndexedMapOfShape aMS, aMFS;
- TopTools_IndexedDataMapOfShapeListOfShape aMFR;
- //
- TopExp::MapShapesAndAncestors(myResult, TopAbs_FACE, TopAbs_SOLID, aMFR);
- TopExp::MapShapes(myResult, TopAbs_SOLID, aMS);
- //
-
- myNbAlone=0;
- aNbS=aMS.Extent();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aSolid=aMS(i);
- //
- aMFS.Clear();
- TopExp::MapShapes(aSolid, TopAbs_FACE, aMFS);
- //
- bFound=Standard_False;
- aNbFS=aMFS.Extent();
- for (j=1; j<=aNbFS; ++j) {
- const TopoDS_Shape& aFS=aMFS(j);
- if (aMFR.Contains(aFS)) {
- const TopTools_ListOfShape& aLSx=aMFR.FindFromKey(aFS);
- aNbSx=aLSx.Extent();
- if (aNbSx==2) {
- bFound=!bFound;
- break;
- }
- }
- }
- //
- if (!bFound) {
- myWarningStatus=1;
- ++myNbAlone;
- //break;
- }
- }
-}
-//=======================================================================
-//function : CheckData
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::CheckData()
-{
- myErrorStatus=0;
- //
- if (myShape.IsNull()) {
- myErrorStatus=5;
- return;
- }
-}
-//=======================================================================
-//function : InnerTolerance
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::InnerTolerance()
-{
- myErrorStatus=0;
- //
- /*
- Standard_Integer i;
- Standard_Real aX[3][2], dH, dHmin, aCoef, aTolTresh;
- Bnd_Box aBox;
- //
- BRepBndLib::Add(myShape, aBox);
- aBox.Get(aX[0][0], aX[1][0], aX[2][0], aX[0][1], aX[1][1], aX[2][1]);
- //
- dHmin=aX[0][1]-aX[0][0];
- for (i=1; i<3; ++i) {
- dH=aX[i][1]-aX[i][0];
- if (dH<dHmin) {
- dHmin=dH;
- }
- }
- //
- myTol=myTolerance;
- aCoef=0.01;
- aTolTresh=aCoef*dHmin;
- if (myTol>aTolTresh) {
- myTol=aTolTresh;
- }
- */
- myTol=myTolerance;
-}
-//=======================================================================
-//function : FacePassKey
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF,
- GEOMAlgo_PassKeyShape& aPK)
-{
- Standard_Integer i, aNbE;
- TopTools_ListOfShape aLE;
- TopTools_IndexedMapOfShape aME;
- //
- TopExp::MapShapes(aF, TopAbs_EDGE, aME);
- aNbE=aME.Extent();
- //
- for (i=1; i<=aNbE; ++i) {
- const TopoDS_Shape& aE=aME(i);
- if (!myOrigins.IsBound(aE)) {
- myErrorStatus=102;
- return;
- }
- const TopoDS_Shape& aER=myOrigins.Find(aE);
- aLE.Append(aER);
- }
- aPK.SetShapes(aLE);
-}
-//=======================================================================
-//function : EdgePassKey
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE,
- GEOMAlgo_PassKeyShape& aPK)
-{
- TopoDS_Vertex aV1, aV2;
- //
- TopExp::Vertices(aE, aV1, aV2);
- //
- if (!myOrigins.IsBound(aV1) || !myOrigins.IsBound(aV2) ) {
- myErrorStatus=100;
- return;
- }
- const TopoDS_Shape& aVR1=myOrigins.Find(aV1);
- const TopoDS_Shape& aVR2=myOrigins.Find(aV2);
- aPK.SetShapes(aVR1, aVR2);
-}
-//=======================================================================
-//function : MakeVertex
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV,
- TopoDS_Vertex& aNewVertex)
-{
- Standard_Integer aNbV;
- Standard_Real aTolV, aD, aDmax;
- gp_XYZ aGC;
- gp_Pnt aP3D, aPGC;
- TopoDS_Vertex aVx;
- BRep_Builder aBB;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- aNbV=aLV.Extent();
- if (!aNbV) {
- return;
- }
- //
- // center of gravity
- aGC.SetCoord(0.,0.,0.);
- aIt.Initialize(aLV);
- for (; aIt.More(); aIt.Next()) {
- aVx=TopoDS::Vertex(aIt.Value());
- aP3D=BRep_Tool::Pnt(aVx);
- aGC+=aP3D.XYZ();
- }
- aGC/=(Standard_Real)aNbV;
- aPGC.SetXYZ(aGC);
- //
- // tolerance value
- aDmax=-1.;
- aIt.Initialize(aLV);
- for (; aIt.More(); aIt.Next()) {
- aVx=TopoDS::Vertex(aIt.Value());
- aP3D=BRep_Tool::Pnt(aVx);
- aTolV=BRep_Tool::Tolerance(aVx);
- aD=aPGC.Distance(aP3D)+aTolV;
- if (aD>aDmax) {
- aDmax=aD;
- }
- }
- //
- aBB.MakeVertex (aNewVertex, aPGC, aDmax);
-}
-//=======================================================================
-//function : MakeEdge
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE,
- TopoDS_Edge& aNewEdge)
-{
- myErrorStatus=0;
- //
- Standard_Boolean bIsDE;
- Standard_Real aT1, aT2;
- TopoDS_Vertex aV1, aV2, aVR1, aVR2;
- TopoDS_Edge aEx;
- //
- bIsDE=BRep_Tool::Degenerated(aE);
- //
- aEx=aE;
- aEx.Orientation(TopAbs_FORWARD);
- //
- TopExp::Vertices(aEx, aV1, aV2);
- //
- aT1=BRep_Tool::Parameter(aV1, aEx);
- aT2=BRep_Tool::Parameter(aV2, aEx);
- //
- aVR1=TopoDS::Vertex(myOrigins.Find(aV1));
- aVR1.Orientation(TopAbs_FORWARD);
- aVR2=TopoDS::Vertex(myOrigins.Find(aV2));
- aVR2.Orientation(TopAbs_REVERSED);
- //
- if (bIsDE) {
- Standard_Real aTol;
- BRep_Builder aBB;
- TopoDS_Edge E;
- TopAbs_Orientation anOrE;
- //
- anOrE=aE.Orientation();
- aTol=BRep_Tool::Tolerance(aE);
- //
- E=aEx;
- E.EmptyCopy();
- //
- aBB.Add (E, aVR1);
- aBB.Add (E, aVR2);
- aBB.Range(E, aT1, aT2);
- aBB.Degenerated(E, Standard_True);
- aBB.UpdateEdge(E, aTol);
- //
- aNewEdge=E;
- }
- //
- else {
- BOPTools_Tools::MakeSplitEdge(aEx, aVR1, aT1, aVR2, aT2, aNewEdge);
- }
-}
-//=======================================================================
-//function : MakeFace
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF,
- TopoDS_Face& aNewFace)
-{
- myErrorStatus=0;
- //
- Standard_Boolean bIsToReverse, bIsUPeriodic;
- Standard_Real aTol, aUMin, aUMax, aVMin, aVMax;
- TopoDS_Edge aER;
- TopoDS_Wire newWire;
- TopoDS_Face aFFWD, newFace;
- TopLoc_Location aLoc;
- Handle(Geom_Surface) aS;
- Handle(Geom2d_Curve) aC2D;
- TopExp_Explorer aExpW, aExpE;
- BRep_Builder aBB;
- //
- aFFWD=aF;
- aFFWD.Orientation(TopAbs_FORWARD);
- //
- aS=BRep_Tool::Surface(aFFWD, aLoc);
- bIsUPeriodic=GEOMAlgo_Tools::IsUPeriodic(aS);
- aTol=BRep_Tool::Tolerance(aFFWD);
- BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax);
- //
- aBB.MakeFace (newFace, aS, aLoc, aTol);
- //
- aExpW.Init(aFFWD, TopAbs_WIRE);
- for (; aExpW.More(); aExpW.Next()) {
- aBB.MakeWire(newWire);
- const TopoDS_Wire& aW=TopoDS::Wire(aExpW.Current());
- aExpE.Init(aW, TopAbs_EDGE);
- for (; aExpE.More(); aExpE.Next()) {
- const TopoDS_Edge& aE=TopoDS::Edge(aExpE.Current());
- aER=TopoDS::Edge(myOrigins.Find(aE));
- //
- aER.Orientation(TopAbs_FORWARD);
- if (!BRep_Tool::Degenerated(aER)) {
- // build p-curve
- if (bIsUPeriodic) {
- GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax);
- }
- BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD);
-
- // orient image
- bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext);
- if (bIsToReverse) {
- aER.Reverse();
- }
- }
- else {
- aER.Orientation(aE.Orientation());
- }
- //
- aBB.Add(newWire, aER);
- }
- // xf
- TopTools_ListOfShape aLW;
- //
- aLW.Append(aW);
- myImages.Bind(newWire, aLW);
- myOrigins.Bind(aW, newWire);
- // xt
- aBB.Add(newFace, newWire);
- }
- aNewFace=newFace;
-}
-//=======================================================================
-//function : IsToReverse
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR,
- const TopoDS_Face& aF)
-{
- Standard_Boolean bRet;
- Standard_Real aT, aT1, aT2, aTR, aScPr;
- TopExp_Explorer aExp;
- Handle(Geom_Curve)aC3D;
- gp_Pnt aP;
- gp_Dir aDNF, aDNFR;
- //
- bRet=Standard_False;
- //
- aExp.Init(aF, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current());
- //
- if (BRep_Tool::Degenerated(aE)) {
- continue;
- }
- //
- const TopoDS_Edge& aER=TopoDS::Edge(myOrigins.Find(aE));
- //
- aC3D=BRep_Tool::Curve(aE, aT1, aT2);
- aT=BOPTools_Tools2D::IntermediatePoint(aT1, aT2);
- aC3D->D0(aT, aP);
- myContext->ProjectPointOnEdge(aP, aER, aTR);
- //
- BOPTools_Tools3D::GetNormalToFaceOnEdge (aE, aF, aT, aDNF);
- if (aF.Orientation()==TopAbs_REVERSED) {
- aDNF.Reverse();
- }
- //
- BOPTools_Tools3D::GetNormalToFaceOnEdge (aER, aFR, aTR, aDNFR);
- if (aFR.Orientation()==TopAbs_REVERSED) {
- aDNFR.Reverse();
- }
- //
- aScPr=aDNF*aDNFR;
- return (aScPr<0.);
- }
- return bRet;
-}
-//=======================================================================
-//function : HasNewSubShape
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_Gluer::HasNewSubShape(const TopoDS_Shape& aS)const
-{
- Standard_Boolean bRet;
- Standard_Integer i, aNbSS;
- TopTools_IndexedMapOfShape aMSS;
- //
- GetSubShapes(aS, aMSS);
- //
- bRet=Standard_False;
- aNbSS=aMSS.Extent();
- for (i=1; i<=aNbSS; ++i) {
- const TopoDS_Shape& aSS=aMSS(i);
- if (aSS.ShapeType()==TopAbs_WIRE) {
- continue;
- }
- //
- bRet=!myOrigins.IsBound(aSS);
- if (bRet) {
- return bRet;
- }
- //
- const TopoDS_Shape& aSSIm=myOrigins.Find(aSS);
- bRet=!aSSIm.IsSame(aSS);
- if (bRet) {
- return bRet;
- }
- }
- return bRet;
-}
-//=======================================================================
-//function : GetSubShapes
-//purpose :
-//=======================================================================
-void GetSubShapes(const TopoDS_Shape& aS,
- TopTools_IndexedMapOfShape& aMSS)
-{
- Standard_Integer aR;
- TopAbs_ShapeEnum aType;
- TopoDS_Iterator aIt;
- //
- aType=aS.ShapeType();
- aR=(Standard_Integer)aType+1;
- if (aR>TopAbs_VERTEX) {
- return;
- }
- //
- aIt.Initialize(aS);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSS=aIt.Value();
- aMSS.Add(aSS);
- GetSubShapes(aSS, aMSS);
- }
-}
-//=======================================================================
-//function : Modified
-//purpose :
-//=======================================================================
-const TopTools_ListOfShape& GEOMAlgo_Gluer::Modified (const TopoDS_Shape& aS)
-{
- TopAbs_ShapeEnum aType;
- //
- myGenerated.Clear();
- //
- aType=aS.ShapeType();
- if (aType==TopAbs_VERTEX ||
- aType==TopAbs_EDGE ||
- aType==TopAbs_WIRE ||
- aType==TopAbs_FACE ||
- aType==TopAbs_SHELL ||
- aType==TopAbs_SOLID) {
- if(myOrigins.IsBound(aS)) {
- const TopoDS_Shape& aSnew=myOrigins.Find(aS);
- if (!aSnew.IsSame(aS)) {
- myGenerated.Append(aSnew);
- }
- }
- }
- //
- return myGenerated;
-}
-//=======================================================================
-//function : Generated
-//purpose :
-//=======================================================================
-const TopTools_ListOfShape& GEOMAlgo_Gluer::Generated(const TopoDS_Shape& )
-{
- myGenerated.Clear();
- return myGenerated;
-}
-//=======================================================================
-//function : IsDeleted
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_Gluer::IsDeleted (const TopoDS_Shape& aS)
-{
- Standard_Boolean bRet=Standard_False;
- //
- const TopTools_ListOfShape& aL=Modified(aS);
- bRet=!aL.IsEmpty();
- //
- return bRet;
-}
-
-//
-// ErrorStatus
-//
-// 1 - the object is just initialized
-// 2 - no vertices found in source shape
-// 3 - nb same domain vertices for the vertex Vi =0
-// 4 - nb same domain edges(faces) for the edge Ei(face Fi) =0
-// 5 - source shape is Null
-// 6 - result shape is Null
-// 101 - nb edges > PassKey.NbMax() in FacesPassKey()
-// 102 - the edge Ei can not be found in myOrigins Map
-// 100 - the vertex Vi can not be found in myOrigins Map
-//
-// WarningStatus
-//
-// 1 - some shapes can not be glued by faces
-//
+++ /dev/null
-
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Gluer.hxx
-// Created: Sat Dec 04 12:45:53 2004
-// Author: Peter KURNEV
-// <peter@PREFEX>
-//
-#ifndef _GEOMAlgo_Gluer_HeaderFile
-#define _GEOMAlgo_Gluer_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Real.hxx>
-#include <TopTools_DataMapOfShapeListOfShape.hxx>
-#include <TopTools_DataMapOfShapeShape.hxx>
-#include <Standard_Integer.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <GEOMAlgo_ShapeAlgo.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <GEOMAlgo_PassKeyShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopoDS_Compound.hxx>
-
-//=======================================================================
-//class : GEOMAlgo_Gluer
-//purpose :
-//=======================================================================
-class GEOMAlgo_Gluer : public GEOMAlgo_ShapeAlgo {
-public:
- Standard_EXPORT
- GEOMAlgo_Gluer();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_Gluer();
-
- Standard_EXPORT
- void SetCheckGeometry(const Standard_Boolean aFlag) ;
-
- Standard_EXPORT
- Standard_Boolean CheckGeometry() const;
-
- Standard_EXPORT
- void SetKeepNonSolids(const Standard_Boolean aFlag) ;
-
- Standard_EXPORT
- Standard_Boolean KeepNonSolids() const;
-
- Standard_EXPORT
- virtual void Perform() ;
-
- Standard_EXPORT
- Standard_Integer AloneShapes() const;
-
- Standard_EXPORT
- const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ;
-
- Standard_EXPORT
- const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) ;
-
- Standard_EXPORT
- Standard_Boolean IsDeleted(const TopoDS_Shape& S) ;
-
- Standard_EXPORT
- const TopTools_DataMapOfShapeListOfShape& Images() const;
-
- Standard_EXPORT
- const TopTools_DataMapOfShapeShape& Origins() const;
-
- protected:
- Standard_EXPORT
- virtual void CheckData() ;
-
- Standard_EXPORT
- virtual void CheckResult() ;
-
- Standard_EXPORT
- void MakeVertices() ;
-
- Standard_EXPORT
- void MakeEdges() ;
-
- Standard_EXPORT
- void MakeFaces() ;
-
- Standard_EXPORT
- void MakeShapes(const TopAbs_ShapeEnum aType) ;
-
- Standard_EXPORT
- void MakeShells() ;
-
- Standard_EXPORT
- void MakeSolids() ;
-
- Standard_EXPORT
- void InnerTolerance() ;
-
- Standard_EXPORT
- void EdgePassKey(const TopoDS_Edge& aE,
- GEOMAlgo_PassKeyShape& aPK) ;
-
- Standard_EXPORT
- void FacePassKey(const TopoDS_Face& aF,
- GEOMAlgo_PassKeyShape& aPK) ;
-
- Standard_EXPORT
- void MakeVertex(const TopTools_ListOfShape& aLV,
- TopoDS_Vertex& aNewV) ;
-
- Standard_EXPORT
- void MakeEdge(const TopoDS_Edge& aEdge,
- TopoDS_Edge& aNewEdge) ;
-
- Standard_EXPORT
- void MakeFace(const TopoDS_Face& aFace,
- TopoDS_Face& aNewEdge) ;
-
- Standard_EXPORT
- Standard_Boolean IsToReverse(const TopoDS_Face& aFR,
- const TopoDS_Face& aF) ;
-
- Standard_EXPORT
- Standard_Boolean HasNewSubShape(const TopoDS_Shape& aS) const;
-
- Standard_EXPORT
- void MakeSubShapes(const TopoDS_Shape& aS,
- TopTools_MapOfShape& aM,
- TopoDS_Compound& aC) ;
-
-
- Standard_Boolean myCheckGeometry;
- Standard_Boolean myKeepNonSolids;
- Standard_Real myTol;
- TopTools_DataMapOfShapeListOfShape myImages;
- TopTools_DataMapOfShapeShape myOrigins;
- Standard_Integer myNbAlone;
- TopTools_ListOfShape myGenerated;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Gluer2.cxx
-// Author: Peter KURNEV
-
-#include <GEOMAlgo_Gluer2.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-
-#include <TopoDS_Compound.hxx>
-#include <TopoDS_Iterator.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Vertex.hxx>
-
-#include <BRep_Builder.hxx>
-#include <TopExp.hxx>
-#include <BRepLib.hxx>
-
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
-#include <TopTools_DataMapOfShapeShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-
-#include <GEOMAlgo_GlueDetector.hxx>
-#include <GEOMAlgo_Tools3D.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_Gluer2
-//purpose :
-//=======================================================================
-GEOMAlgo_Gluer2::GEOMAlgo_Gluer2()
-:
- GEOMAlgo_GluerAlgo(),
- GEOMAlgo_BuilderShape()
-{
- myTolerance=0.0001;
-}
-//=======================================================================
-//function : ~GEOMAlgo_Gluer2
-//purpose :
-//=======================================================================
-GEOMAlgo_Gluer2::~GEOMAlgo_Gluer2()
-{
-}
-//=======================================================================
-//function : Clear
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::Clear()
-{
- myErrorStatus=0;
- myWarningStatus=0;
- //
- GEOMAlgo_GluerAlgo::Clear();
- //
- myImagesDetected.Clear();
- myOriginsDetected.Clear();
- myShapesToGlue.Clear();
- myImagesToWork.Clear();
- myOriginsToWork.Clear();
- myKeepNonSolids=Standard_False;
- //modified by NIZNHY-PKV Tue Mar 13 13:38:28 2012f
- myDetector.Clear();
- //modified by NIZNHY-PKV Tue Mar 13 13:38:30 2012t
-}
-//modified by NIZNHY-PKV Tue Mar 13 12:26:50 2012f
-//=======================================================================
-//function : StickedShapes
-//purpose :
-//=======================================================================
-const TopTools_IndexedDataMapOfShapeListOfShape&
- GEOMAlgo_Gluer2::StickedShapes()
-{
- return myDetector.StickedShapes();
-}
-//modified by NIZNHY-PKV Tue Mar 13 12:26:54 2012t
-//=======================================================================
-//function : SetShapesToGlue
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM)
-{
- myShapesToGlue=aM;
-}
-//=======================================================================
-//function : ShapesToGlue
-//purpose :
-//=======================================================================
-const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer2::ShapesToGlue()const
-{
- return myShapesToGlue;
-}
-//=======================================================================
-//function : SetKeepNonSolids
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::SetKeepNonSolids(const Standard_Boolean aFlag)
-{
- myKeepNonSolids=aFlag;
-}
-//=======================================================================
-//function : KeepNonSolids
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_Gluer2::KeepNonSolids()const
-{
- return myKeepNonSolids;
-}
-//=======================================================================
-//function : ShapesDetected
-//purpose :
-//=======================================================================
-const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer2::ShapesDetected()const
-{
- return myImagesDetected;
-}
-//=======================================================================
-//function : ImagesToWork
-//purpose :
-//=======================================================================
-const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer2::ImagesToWork()const
-{
- return myImagesToWork;
-}
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::Perform()
-{
- myErrorStatus=0;
- myWarningStatus=0;
- //
- CheckData();
- if (myErrorStatus) {
- return;
- }
- //
- // Initialize the context
- GEOMAlgo_GluerAlgo::Perform();
- //
- PerformShapesToWork();
- if (myErrorStatus) {
- return;
- }
- if (myWarningStatus==1) {
- // no shapes to glue
- myShape=myArgument;
- return;
- }
- //
- FillVertices();
- if (myErrorStatus) {
- return;
- }
- //
- FillEdges();
- if (myErrorStatus) {
- return;
- }
- //
- FillWires();
- if (myErrorStatus) {
- return;
- }
- //
- FillFaces();
- if (myErrorStatus) {
- return;
- }
- //
- FillShells();
- if (myErrorStatus) {
- return;
- }
- //
- FillSolids();
- if (myErrorStatus) {
- return;
- }
- //
- FillCompSolids();
- if (myErrorStatus) {
- return;
- }
- //
- FillCompounds();
- if (myErrorStatus) {
- return;
- }
- //
- BuildResult();
- if (myErrorStatus) {
- return;
- }
- //
- PrepareHistory();
- if (myErrorStatus) {
- return;
- }
- //
- BRepLib::SameParameter(myShape, myTolerance, Standard_True);
-}
-//=======================================================================
-//function : CheckData
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::CheckData()
-{
- Standard_Integer aNbSG, i;
- TopAbs_ShapeEnum aType, aTypeX;
- TopTools_ListIteratorOfListOfShape aItLS;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- aNbSG=myShapesToGlue.Extent();
- if (aNbSG) {
- // Check myShapesToGlue
- aItDMSLS.Initialize(myShapesToGlue);
- for (; aItDMSLS.More(); aItDMSLS.Next()) {
- //const TopoDS_Shape& aSkey=aItDMSLS.Key();
- const TopTools_ListOfShape& aLSG=aItDMSLS.Value();
- aItLS.Initialize(aLSG);
- for (i=0; aItLS.More(); aItLS.Next(), ++i) {
- const TopoDS_Shape& aSG=aItLS.Value();
- aTypeX=aSG.ShapeType();
- if (!i) {
- aType=aTypeX;
- if (!(aType==TopAbs_VERTEX ||
- aType==TopAbs_EDGE ||
- aType==TopAbs_FACE)) {
- myErrorStatus=21;// non-brep shapes
- return;
- }
- continue;
- }
- if (aTypeX!=aType) {
- myErrorStatus=20;// non-homogeneous shapes
- return;
- }
- }
- }
- }// if (aNbSG) {
-}
-//=======================================================================
-//function : FillEdges
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::FillEdges()
-{
- FillBRepShapes(TopAbs_EDGE);
-}
-//=======================================================================
-//function : FillFaces
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::FillFaces()
-{
- FillBRepShapes(TopAbs_FACE);
-}
-//=======================================================================
-//function : FillWires
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::FillWires()
-{
- FillContainers(TopAbs_WIRE);
-}
-//=======================================================================
-//function : FillShells
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::FillShells()
-{
- FillContainers(TopAbs_SHELL);
-}
-//=======================================================================
-//function : FillSolids
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::FillSolids()
-{
- FillContainers(TopAbs_SOLID);
-}
-//=======================================================================
-//function : FillCompSolids
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::FillCompSolids()
-{
- FillContainers(TopAbs_COMPSOLID);
-}
-//=======================================================================
-//function : FillVertices
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::FillVertices()
-{
- TopAbs_ShapeEnum aType;
- TopoDS_Vertex aVnew;
- TopTools_ListIteratorOfListOfShape aItLS;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- aItDMSLS.Initialize(myImagesToWork);
- for (; aItDMSLS.More(); aItDMSLS.Next()) {
- const TopoDS_Shape& aSkey=aItDMSLS.Key();
- aType=aSkey.ShapeType();
- if (aType!=TopAbs_VERTEX) {
- continue;
- }
- //
- const TopTools_ListOfShape& aLSD=aItDMSLS.Value();
- //
- GEOMAlgo_Gluer2::MakeVertex(aLSD, aVnew);
- //
- myImages.Bind(aVnew, aLSD);
- //
- aItLS.Initialize(aLSD);
- for (; aItLS.More(); aItLS.Next()) {
- const TopoDS_Shape& aV=aItLS.Value();
- myOrigins.Bind(aV, aVnew);
- }
- }
-}
-//=======================================================================
-//function : FillBRepShapes
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::FillBRepShapes(const TopAbs_ShapeEnum theType)
-{
- Standard_Boolean bHasImage, bIsToWork;
- Standard_Integer i, aNbE;
- TopoDS_Iterator aItS;
- TopoDS_Shape aEnew;
- TopTools_IndexedMapOfShape aME;
- TopTools_MapOfShape aMFence;
- TopTools_ListIteratorOfListOfShape aItLS;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- TopExp::MapShapes(myArgument, theType, aME);
- //
- aNbE=aME.Extent();
- for (i=1; i<=aNbE; ++i) {
- const TopoDS_Shape& aE=aME(i);
- //
- if (!aMFence.Add(aE)) {
- continue;
- }
- //
- bIsToWork=myOriginsToWork.IsBound(aE);
- bHasImage=HasImage(aE);
- if (!bHasImage && !bIsToWork) {
- continue;
- }
- //
- MakeBRepShapes(aE, aEnew);
- //
- //myImages / myOrigins
- if (bIsToWork) {
- const TopoDS_Shape& aSkey=myOriginsToWork.Find(aE);
- const TopTools_ListOfShape& aLSD=myImagesToWork.Find(aSkey);
- //
- myImages.Bind(aEnew, aLSD);
- //
- aItLS.Initialize(aLSD);
- for (; aItLS.More(); aItLS.Next()) {
- const TopoDS_Shape& aEx=aItLS.Value();
- myOrigins.Bind(aEx, aEnew);
- //
- aMFence.Add(aEx);
- }
- }
- else {
- TopTools_ListOfShape aLSD;
- //
- aLSD.Append(aE);
- myImages.Bind(aEnew, aLSD);
- myOrigins.Bind(aE, aEnew);
- }
- }//for (i=1; i<=aNbF; ++i) {
-}
-//=======================================================================
-//function : FillContainers
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::FillContainers(const TopAbs_ShapeEnum aType)
-{
- Standard_Boolean bHasImage, bToReverse;
- Standard_Integer i, aNbW;
- TopoDS_Shape aWnew, aEnew;
- TopoDS_Iterator aItS;
- BRep_Builder aBB;
- TopTools_IndexedMapOfShape aMW;
- TopTools_MapOfShape aMFence;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- TopExp::MapShapes(myArgument, aType, aMW);
- //
- aNbW=aMW.Extent();
- for (i=1; i<=aNbW; ++i) {
- const TopoDS_Shape& aW=aMW(i);
- //
- if (!aMFence.Add(aW)) {
- continue;
- }
- //
- bHasImage=HasImage(aW);
- if (!bHasImage) {
- continue;
- }
- //
- GEOMAlgo_Tools3D::MakeContainer(aType, aWnew);
- aWnew.Orientation(aW.Orientation());
- //
- aItS.Initialize(aW);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aE=aItS.Value();
- if (myOrigins.IsBound(aE)) {
- aEnew=myOrigins.Find(aE);
- //
- bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aEnew, aE, myContext);
- if (bToReverse) {
- aEnew.Reverse();
- }
- //
- aBB.Add(aWnew, aEnew);
- }
- else {
- aBB.Add(aWnew, aE);
- }
- }
- //
- //myImages / myOrigins
- TopTools_ListOfShape aLSD;
- //
- aLSD.Append(aW);
- myImages.Bind(aWnew, aLSD);
- myOrigins.Bind(aW, aWnew);
- //
- }//for (i=1; i<=aNbE; ++i) {
-}
-//=======================================================================
-//function : FillCompounds
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::FillCompounds()
-{
- TopAbs_ShapeEnum aType;
- TopoDS_Iterator aItC;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- aItC.Initialize(myArgument);
- for (; aItC.More(); aItC.Next()) {
- const TopoDS_Shape& aCx=aItC.Value();
- aType=aCx.ShapeType();
- if (aType==TopAbs_COMPOUND) {
- FillCompound(aCx);
- }
- }
-}
-//=======================================================================
-//function : FillCompound
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::FillCompound(const TopoDS_Shape& aC)
-{
- Standard_Boolean bHasImage;
- TopAbs_ShapeEnum aType;
- TopoDS_Shape aCnew, aCXnew;
- TopoDS_Iterator aItC;
- BRep_Builder aBB;
- //
- bHasImage=HasImage(aC);
- if (!bHasImage) {
- return;
- }
- //
- GEOMAlgo_Tools3D::MakeContainer(TopAbs_COMPOUND, aCnew);
- //
- aItC.Initialize(aC);
- for (; aItC.More(); aItC.Next()) {
- const TopoDS_Shape& aCX=aItC.Value();
- aType=aCX.ShapeType();
- //
- if (aType==TopAbs_COMPOUND) {
- FillCompound(aCX);
- }
- //
- if (myOrigins.IsBound(aCX)) {
- aCXnew=myOrigins.Find(aCX);
- aCXnew.Orientation(aCX.Orientation());
- aBB.Add(aCnew, aCXnew);
- }
- else {
- aBB.Add(aCnew, aCX);
- }
- }
- //
- //myImages / myOrigins
- TopTools_ListOfShape aLSD;
- //
- aLSD.Append(aC);
- myImages.Bind(aCnew, aLSD);
- myOrigins.Bind(aC, aCnew);
-}
-//=======================================================================
-//function : HasImage
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_Gluer2::HasImage(const TopoDS_Shape& aC)
-{
- Standard_Boolean bRet;
- TopAbs_ShapeEnum aType;
- TopoDS_Iterator aItC;
- //
- bRet=Standard_False;
- aItC.Initialize(aC);
- for (; aItC.More(); aItC.Next()) {
- const TopoDS_Shape& aCx=aItC.Value();
- aType=aCx.ShapeType();
- //
- if (aType==TopAbs_COMPOUND) {
- bRet=HasImage(aCx);
- if (bRet) {
- return bRet;
- }
- }
- else {
- bRet=myOrigins.IsBound(aCx);
- if (bRet) {
- return bRet;
- }
- }
- }
- //
- bRet=myOrigins.IsBound(aC);
- //
- return bRet;
-}
-//=======================================================================
-//function : BuildResult
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::BuildResult()
-{
- Standard_Boolean bHasImage;
- TopoDS_Shape aCnew, aCXnew;
- TopoDS_Iterator aItC;
- BRep_Builder aBB;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- aItC.Initialize(myArgument);
- for (; aItC.More(); aItC.Next()) {
- const TopoDS_Shape& aCx=aItC.Value();
- bHasImage=HasImage(aCx);
- if (bHasImage) {
- break;
- }
- }
- //
- if (!bHasImage) {
- myShape=myArgument;
- return;
- }
- //
- GEOMAlgo_Tools3D::MakeContainer(TopAbs_COMPOUND, aCnew);
- //
- aItC.Initialize(myArgument);
- for (; aItC.More(); aItC.Next()) {
- const TopoDS_Shape& aCX=aItC.Value();
- if (myOrigins.IsBound(aCX)) {
- aCXnew=myOrigins.Find(aCX);
- aCXnew.Orientation(aCX.Orientation());
- aBB.Add(aCnew, aCXnew);
- }
- else {
- aBB.Add(aCnew, aCX);
- }
- }
- //
- if (!myKeepNonSolids) {
- Standard_Integer i, aNb;
- TopoDS_Shape aCnew1;
- TopTools_IndexedMapOfShape aM;
- //
- GEOMAlgo_Tools3D::MakeContainer(TopAbs_COMPOUND, aCnew1);
- //
- TopExp::MapShapes(aCnew, TopAbs_SOLID, aM);
-
- aNb=aM.Extent();
- for (i=1; i<=aNb; ++i) {
- const TopoDS_Shape& aS=aM(i);
- aBB.Add(aCnew1, aS);
- }
- aCnew=aCnew1;
- }
- //
- myShape=aCnew;
-}
-//--------------------------------------------------------
-//
-// ErrorStatus
-// 11 - GEOMAlgo_GlueDetector failed
-// 13 - PerformImagesToWork failed
-// 14 - PerformImagesToWork failed
-//
-// WarningStatus
-// 1 - no shapes to glue
-// 2 - sticked shapes are detected.
-// The value of myTolerance is so large that
-// subshapes of a shape becomes intefere
-// (e.g. vertices of an edge).
-// In the case
-// the result is can not be obtained
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Gluer2.hxx
-// Author: Peter KURNEV
-
-#ifndef _GEOMAlgo_Gluer2_HeaderFile
-#define _GEOMAlgo_Gluer2_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Boolean.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-
-#include <TopTools_DataMapOfShapeListOfShape.hxx>
-#include <TopTools_DataMapOfShapeShape.hxx>
-
-#include <NMTTools_CoupleOfShape.hxx>
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-
-#include <GEOMAlgo_GluerAlgo.hxx>
-#include <GEOMAlgo_BuilderShape.hxx>
-#include <GEOMAlgo_GlueDetector.hxx>
-
-//=======================================================================
-//class : GEOMAlgo_Gluer2
-//purpose :
-//=======================================================================
-class GEOMAlgo_Gluer2 : public GEOMAlgo_GluerAlgo,
- public GEOMAlgo_BuilderShape {
-public:
-
- Standard_EXPORT
- GEOMAlgo_Gluer2();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_Gluer2();
-
- Standard_EXPORT
- void SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM) ;
-
- Standard_EXPORT
- const TopTools_DataMapOfShapeListOfShape& ShapesToGlue() const;
-
- Standard_EXPORT
- void SetKeepNonSolids(const Standard_Boolean theFlag) ;
-
- Standard_EXPORT
- Standard_Boolean KeepNonSolids() const;
-
- Standard_EXPORT virtual void Clear() ;
-
- Standard_EXPORT
- virtual void Perform() ;
-
- Standard_EXPORT
- virtual void CheckData() ;
-
- Standard_EXPORT
- void Detect() ;
-
- Standard_EXPORT
- const TopTools_DataMapOfShapeListOfShape& ShapesDetected() const;
-
- Standard_EXPORT
- const TopTools_DataMapOfShapeListOfShape& ImagesToWork() const;
-
- Standard_EXPORT
- virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
-
- Standard_EXPORT
- virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
-
- Standard_EXPORT
- virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
-
- Standard_EXPORT
- static void MakeVertex(const TopTools_ListOfShape& theLV,
- TopoDS_Vertex& theV) ;
-
- Standard_EXPORT
- static void MapBRepShapes(const TopoDS_Shape& theS,
- TopTools_MapOfShape& theM) ;
-
- Standard_EXPORT
- static void MapShapes(const TopoDS_Shape& theS,
- TopTools_MapOfShape& theM) ;
-
-//modified by NIZNHY-PKV Tue Mar 13 12:23:20 2012f
- Standard_EXPORT
- const TopTools_IndexedDataMapOfShapeListOfShape& StickedShapes();
-//modified by NIZNHY-PKV Tue Mar 13 12:23:26 2012t
-//------------------------------------------------
-protected:
- Standard_EXPORT
- void PerformShapesToWork() ;
-
- Standard_EXPORT
- void FillVertices() ;
-
- Standard_EXPORT
- void FillEdges() ;
-
- Standard_EXPORT
- void FillWires() ;
-
- Standard_EXPORT
- void FillFaces() ;
-
- Standard_EXPORT
- void FillShells() ;
-
- Standard_EXPORT
- void FillSolids() ;
-
- Standard_EXPORT
- void FillCompSolids() ;
-
- Standard_EXPORT
- void FillCompounds() ;
-
- Standard_EXPORT
- void BuildResult() ;
-
- Standard_EXPORT
- void FillBRepShapes(const TopAbs_ShapeEnum theType) ;
-
- Standard_EXPORT
- void FillContainers(const TopAbs_ShapeEnum theType) ;
-
- Standard_EXPORT
- void FillCompound(const TopoDS_Shape& theC) ;
-
- Standard_EXPORT
- virtual void PrepareHistory() ;
-
- Standard_EXPORT
- Standard_Boolean HasImage(const TopoDS_Shape& theC) ;
-
- Standard_EXPORT
- void MakeBRepShapes(const TopoDS_Shape& theS,
- TopoDS_Shape& theSnew) ;
-
- Standard_EXPORT
- void MakeEdge(const TopoDS_Edge& theE,
- TopoDS_Edge& theEnew) ;
-
- Standard_EXPORT
- void MakeFace(const TopoDS_Face& theF,
- TopoDS_Face& theFnew) ;
-
- Standard_EXPORT
- void TreatPair(const NMTTools_CoupleOfShape& theCS,
- NMTTools_ListOfCoupleOfShape& theLCS) ;
-
-protected:
- TopTools_DataMapOfShapeListOfShape myShapesToGlue;
- TopTools_DataMapOfShapeListOfShape myImagesDetected;
- TopTools_DataMapOfShapeShape myOriginsDetected;
- TopTools_DataMapOfShapeListOfShape myImagesToWork;
- TopTools_DataMapOfShapeShape myOriginsToWork;
- Standard_Boolean myKeepNonSolids;
- //modified by NIZNHY-PKV Tue Mar 13 13:30:40 2012f
- GEOMAlgo_GlueDetector myDetector;
- //modified by NIZNHY-PKV Tue Mar 13 13:30:43 2012t
-private:
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Gluer2_1.cxx
-// Author: Peter KURNEV
-
-#include <GEOMAlgo_Gluer2.hxx>
-
-#include <gp_XYZ.hxx>
-#include <gp_Pnt.hxx>
-
-#include <TopLoc_Location.hxx>
-
-#include <Geom_Surface.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Wire.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Iterator.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-
-#include <BRepTools.hxx>
-#include <TopExp.hxx>
-
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-
-#include <BOPTools_Tools.hxx>
-#include <BOPTools_Tools2D.hxx>
-#include <BOPTools_Tools3D.hxx>
-
-#include <GEOMAlgo_Tools.hxx>
-
-//=======================================================================
-//function : MakeBRepShapes
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::MakeBRepShapes(const TopoDS_Shape& theS,
- TopoDS_Shape& theSnew)
-{
- TopAbs_ShapeEnum aType;
- //
- aType=theS.ShapeType();
- if (aType==TopAbs_EDGE) {
- TopoDS_Edge aEE, aEEnew;
- //
- aEE=*((TopoDS_Edge*)&theS);
- MakeEdge(aEE, aEEnew);
- if (myErrorStatus) {
- return;
- }
- //
- theSnew=aEEnew;
- }
- else if (aType==TopAbs_FACE) {
- TopoDS_Face aFF, aFFnew;
- //
- aFF=*((TopoDS_Face*)&theS);
- MakeFace(aFF, aFFnew);
- if (myErrorStatus) {
- return;
- }
- //
- theSnew=aFFnew;
- }
-}
-//=======================================================================
-//function : MakeFace
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::MakeFace(const TopoDS_Face& theF,
- TopoDS_Face& theFnew)
-{
- Standard_Boolean bIsToReverse, bIsUPeriodic;
- Standard_Integer iRet;
- Standard_Real aTol, aUMin, aUMax, aVMin, aVMax;
- TopAbs_Orientation aOrE;
- Handle(Geom_Surface) aS;
- TopLoc_Location aLoc;
- TopoDS_Shape aW, aWr;
- TopoDS_Edge aEx;
- TopoDS_Face aFF, aFnew;
- TopoDS_Iterator aItW, aItE;
- BRep_Builder aBB;
- TopTools_ListOfShape aLEr;
- TopTools_ListIteratorOfListOfShape aItLE;
- //
- myErrorStatus=0;
- //
- aFF=theF;
- aFF.Orientation(TopAbs_FORWARD);
- //
- aTol=BRep_Tool::Tolerance(aFF);
- aS=BRep_Tool::Surface(aFF, aLoc);
- bIsUPeriodic=GEOMAlgo_Tools::IsUPeriodic(aS);
- BRepTools::UVBounds(aFF, aUMin, aUMax, aVMin, aVMax);
- //
- aBB.MakeFace (aFnew, aS, aLoc, aTol);
- //
- aItW.Initialize(aFF);
- for (; aItW.More(); aItW.Next()) {
- const TopoDS_Shape& aW=aItW.Value();
- //
- if (!myOrigins.IsBound(aW)) {
- aBB.Add(aFnew, aW);
- continue;
- }
- //
- aWr=myOrigins.Find(aW);
- //
- // clear contents of Wr
- aLEr.Clear();
- aItE.Initialize(aWr);
- for (; aItE.More(); aItE.Next()) {
- const TopoDS_Shape& aEr=aItE.Value();
- aLEr.Append(aEr);
- }
- //
- aItLE.Initialize(aLEr);
- for (; aItLE.More(); aItLE.Next()) {
- const TopoDS_Shape& aEr=aItLE.Value();
- aBB.Remove(aWr, aEr);
- }
- //
- // refill contents of Wr
- aItE.Initialize(aW);
- for (; aItE.More(); aItE.Next()) {
- const TopoDS_Edge& aE=*((TopoDS_Edge*)(&aItE.Value()));
- //
- aEx=aE;
- if (myOrigins.IsBound(aE)) {
- aEx=*((TopoDS_Edge*)(&myOrigins.Find(aE)));
- }
- //
- if (!BRep_Tool::Degenerated(aEx)) {
- aEx.Orientation(TopAbs_FORWARD);
- if (bIsUPeriodic) {
- GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aEx, aFF, aUMin, aUMax);
- }
- //
- //modified by NIZNHY-PKV Fri Feb 03 11:18:17 2012f
- iRet=GEOMAlgo_Tools::BuildPCurveForEdgeOnFace(aE, aEx, aFF, myContext);
- if (iRet) {
- continue;
- }
- //BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aEx, aFF);
- //modified by NIZNHY-PKV Fri Feb 03 11:18:20 2012t
- //
- bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aEx, aE, myContext);
- if (bIsToReverse) {
- aEx.Reverse();
- }
- }
- else {
- aEx.Orientation(aE.Orientation());
- }
- aBB.Add(aWr, aEx);
- }// for (; aItE.More(); aItE.Next()) {
- //
- aBB.Add(aFnew, aWr);
- }// for (; aItW.More(); aItW.Next()) {
- theFnew=aFnew;
-}
-//=======================================================================
-//function : MakeEdge
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::MakeEdge(const TopoDS_Edge& aE,
- TopoDS_Edge& aNewEdge)
-{
- myErrorStatus=0;
- //
- Standard_Boolean bIsDE;
- Standard_Real aT1, aT2;
- TopoDS_Vertex aV1, aV2, aVR1, aVR2;
- TopoDS_Edge aEx;
- //
- bIsDE=BRep_Tool::Degenerated(aE);
- //
- aEx=aE;
- aEx.Orientation(TopAbs_FORWARD);
- //
- TopExp::Vertices(aEx, aV1, aV2);
- //
- aT1=BRep_Tool::Parameter(aV1, aEx);
- aT2=BRep_Tool::Parameter(aV2, aEx);
- //
- aVR1=aV1;
- if (myOrigins.IsBound(aV1)) {
- aVR1=*((TopoDS_Vertex*)&myOrigins.Find(aV1));
- }
- aVR1.Orientation(TopAbs_FORWARD);
- //
- aVR2=aV2;
- if (myOrigins.IsBound(aV2)) {
- aVR2=*((TopoDS_Vertex*)&myOrigins.Find(aV2));
- }
- aVR2.Orientation(TopAbs_REVERSED);
- //
- if (!bIsDE) {
- BOPTools_Tools::MakeSplitEdge(aEx, aVR1, aT1, aVR2, aT2, aNewEdge);
- }
- else {
- Standard_Real aTol;
- BRep_Builder aBB;
- TopoDS_Edge E;
- //
- aTol=BRep_Tool::Tolerance(aE);
- //
- E=aEx;
- E.EmptyCopy();
- //
- aBB.Add (E, aVR1);
- aBB.Add (E, aVR2);
- aBB.Range(E, aT1, aT2);
- aBB.Degenerated(E, Standard_True);
- aBB.UpdateEdge(E, aTol);
- //
- aNewEdge=E;
- }
-}
-//=======================================================================
-//function : MakeVertex
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::MakeVertex(const TopTools_ListOfShape& aLV,
- TopoDS_Vertex& aNewVertex)
-{
- Standard_Integer aNbV;
- Standard_Real aTolV, aD, aDmax;
- gp_XYZ aGC;
- gp_Pnt aP3D, aPGC;
- TopoDS_Vertex aVx;
- BRep_Builder aBB;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- aNbV=aLV.Extent();
- if (!aNbV) {
- return;
- }
- //
- // center of gravity
- aGC.SetCoord(0.,0.,0.);
- aIt.Initialize(aLV);
- for (; aIt.More(); aIt.Next()) {
- aVx=*((TopoDS_Vertex*)(&aIt.Value()));
- aP3D=BRep_Tool::Pnt(aVx);
- aGC+=aP3D.XYZ();
- }
- aGC/=(Standard_Real)aNbV;
- aPGC.SetXYZ(aGC);
- //
- // tolerance value
- aDmax=-1.;
- aIt.Initialize(aLV);
- for (; aIt.More(); aIt.Next()) {
- aVx=*((TopoDS_Vertex*)(&aIt.Value()));
- aP3D=BRep_Tool::Pnt(aVx);
- aTolV=BRep_Tool::Tolerance(aVx);
- aD=aPGC.Distance(aP3D)+aTolV;
- if (aD>aDmax) {
- aDmax=aD;
- }
- }
- //
- aBB.MakeVertex (aNewVertex, aPGC, aDmax);
-}
-//=======================================================================
-//function : MapBRepShapes
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::MapBRepShapes(const TopoDS_Shape& aS,
- TopTools_MapOfShape& aM)
-{
- //Standard_Boolean bHasBRep;
- TopAbs_ShapeEnum aType;
- TopoDS_Iterator aIt;
- //
- aType=aS.ShapeType();
- if (aType==TopAbs_VERTEX ||
- aType==TopAbs_EDGE ||
- aType==TopAbs_FACE) {
- aM.Add(aS);
- }
- //
- aIt.Initialize(aS);
- for(; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSx=aIt.Value();
- aType=aSx.ShapeType();
- GEOMAlgo_Gluer2::MapBRepShapes(aSx, aM);
- }
-}
-
-//
-// ErrorStatus
-//
-// 40 - GEOMAlgo_GlueDetector is failed
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Gluer2_2.cxx
-// Created:
-// Author: Peter KURNEV
-// <peter@PREFEX>
-//
-#include <GEOMAlgo_Gluer2.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-
-#include <TopoDS_Iterator.hxx>
-#include <TopoDS_Shape.hxx>
-
-#include <GEOMAlgo_BuilderShape.hxx>
-#include <GEOMAlgo_Tools3D.hxx>
-
-//=======================================================================
-//function : PrepareHistory
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::PrepareHistory()
-{
- //Standard_Boolean bHasImage, bContainsSD;
- //
- // 1. Clearing
- GEOMAlgo_BuilderShape::PrepareHistory();
- //
- if(myShape.IsNull()) {
- return;
- }
- //
- GEOMAlgo_Gluer2::MapShapes(myShape, myMapShape);
- //
-}
-//=======================================================================
-//function : Generated
-//purpose :
-//=======================================================================
-const TopTools_ListOfShape& GEOMAlgo_Gluer2::Generated(const TopoDS_Shape& )
-{
- myHistShapes.Clear();
- return myHistShapes;
-}
-//=======================================================================
-//function : Modified
-//purpose :
-//=======================================================================
-const TopTools_ListOfShape& GEOMAlgo_Gluer2::Modified(const TopoDS_Shape& theS)
-{
- Standard_Boolean bIsDeleted, bHasImage, bToReverse;
- TopAbs_ShapeEnum aType;
- TopoDS_Shape aSim;
- //
- myHistShapes.Clear();
- //
- aType=theS.ShapeType();
- if (!(aType==TopAbs_VERTEX || aType==TopAbs_EDGE ||
- aType==TopAbs_FACE || aType==TopAbs_SOLID)) {
- return myHistShapes;
- }
- //
- bIsDeleted=IsDeleted(theS);
- if (bIsDeleted) {
- return myHistShapes;
- }
- //
- bHasImage=myOrigins.IsBound(theS);
- if (!bHasImage) {
- return myHistShapes;
- }
- //
- aSim=myOrigins.Find(theS);
- if (aSim.IsSame(theS)){
- return myHistShapes;
- }
- //
- if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
- aSim.Orientation(theS.Orientation());
- }
- else {
- bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSim, theS, myContext);
- if (bToReverse) {
- aSim.Reverse();
- }
- }
- //
- myHistShapes.Append(aSim);
- //
- return myHistShapes;
-}
-//=======================================================================
-//function : IsDeleted
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_Gluer2::IsDeleted(const TopoDS_Shape& theS)
-{
- Standard_Boolean bRet, bContains, bHasImage;
- //
- bRet=Standard_False;
- //
- if (theS.IsNull()) {
- return !bRet; //true
- }
- //
- bContains=myMapShape.Contains(theS);
- if (bContains) {
- return bRet; //false
- }
- //
- bHasImage=myOrigins.IsBound(theS);
- if (bHasImage) {
- const TopoDS_Shape& aSim=myOrigins.Find(theS);
- bContains=myMapShape.Contains(aSim);
- if (bContains) {
- return bRet; //false
- }
- }
- //
- return !bRet; //true
-}
-//=======================================================================
-//function : MapShapes
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::MapShapes(const TopoDS_Shape& theS,
- TopTools_MapOfShape& theM)
-{
- TopoDS_Iterator aIt;
- //
- theM.Add(theS);
- aIt.Initialize(theS);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSx=aIt.Value();
- GEOMAlgo_Gluer2::MapShapes(aSx, theM);
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Gluer2_3.cxx
-// Author: Peter KURNEV
-
-#include <GEOMAlgo_Gluer2.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Edge.hxx>
-
-#include <BRep_Tool.hxx>
-
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
-#include <TopTools_DataMapOfShapeListOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-
-#include <NMTTools_CoupleOfShape.hxx>
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-#include <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#include <NMTTools_Tools.hxx>
-
-#include <GEOMAlgo_GlueDetector.hxx>
-
-
-static
- void MapShapes1(const TopoDS_Shape& aS,
- const TopAbs_ShapeEnum aType,
- TopTools_IndexedMapOfShape& aM);
-
-//=======================================================================
-//function : Detect
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::Detect()
-{
- Standard_Boolean bCheckGeometry;
- Standard_Integer iErr, aNbSD;
- TopTools_ListIteratorOfListOfShape aItLS;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
- //GEOMAlgo_GlueDetector aDetector;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- myImagesDetected.Clear();
- myOriginsDetected.Clear();
- //
- bCheckGeometry=Standard_True;
- //
- //modified by NIZNHY-PKV Tue Mar 13 13:33:35 2012f
- myDetector.Clear();
- myDetector.SetContext(myContext);
- //modified by NIZNHY-PKV Tue Mar 13 13:33:38 2012t
- myDetector.SetArgument(myArgument);
- myDetector.SetTolerance(myTolerance);
- myDetector.SetCheckGeometry(bCheckGeometry);
- //
- myDetector.Perform();
- iErr=myDetector.ErrorStatus();
- if (iErr) {
- // Detector is failed
- myErrorStatus=11;
- return;
- }
- //modified by NIZNHY-PKV Tue Mar 13 13:40:36 2012f
- iErr=myDetector.WarningStatus();
- if (iErr) {
- // Sticked shapes are detected
- myWarningStatus=2;
- }
- //modified by NIZNHY-PKV Tue Mar 13 13:40:39 2012t
- //
- const TopTools_DataMapOfShapeListOfShape& aImages=myDetector.Images();
- aItDMSLS.Initialize(aImages);
- for (; aItDMSLS.More(); aItDMSLS.Next()) {
- const TopoDS_Shape& aSkey=aItDMSLS.Key();
- const TopTools_ListOfShape& aLSD=aItDMSLS.Value();
- aNbSD=aLSD.Extent();
- myImagesDetected.Bind(aSkey, aLSD);
- }
- //
- aItDMSLS.Initialize(myImagesDetected);
- for (; aItDMSLS.More(); aItDMSLS.Next()) {
- const TopoDS_Shape& aSkey=aItDMSLS.Key();
- const TopTools_ListOfShape& aLSD=aItDMSLS.Value();
- aItLS.Initialize(aLSD);
- for (; aItLS.More(); aItLS.Next()) {
- const TopoDS_Shape& aSx=aItLS.Value();
- myOriginsDetected.Bind(aSx, aSkey);
- }
- }
-}
-//=======================================================================
-//function : PerformShapesToWork
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::PerformShapesToWork()
-{
- Standard_Integer aNbSG, i, j, k, aNbC, aNb, aNbSD;
- TopTools_ListIteratorOfListOfShape aItLS1, aItLS2;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
- NMTTools_CoupleOfShape aCS;
- NMTTools_ListOfCoupleOfShape aLCS;
- NMTTools_ListIteratorOfListOfCoupleOfShape aItCS;
- //
- myErrorStatus=0;
- myWarningStatus=0;
- //
- myImagesToWork.Clear();
- myOriginsToWork.Clear();
- //
- aNbSD=myImagesDetected.Extent();
- if (!aNbSD) {// no shapes to glue detected
- myWarningStatus=1;
- return;
- }
- //
- aNbSG=myShapesToGlue.Extent();
- if (!aNbSG) {
- // glue all possible
- myImagesToWork=myImagesDetected;
- //
- aItDMSLS.Initialize(myImagesToWork);
- for (; aItDMSLS.More(); aItDMSLS.Next()) {
- const TopoDS_Shape& aSkey=aItDMSLS.Key();
- const TopTools_ListOfShape& aLSD=aItDMSLS.Value();
- aItLS1.Initialize(aLSD);
- for (; aItLS1.More(); aItLS1.Next()) {
- const TopoDS_Shape& aSx=aItLS1.Value();
- myOriginsToWork.Bind(aSx, aSkey);
- }
- }
- return;
- }// if (!aNbSG) {
- //
- // 1. Make pairs
- aItDMSLS.Initialize(myShapesToGlue);
- for (k=0; aItDMSLS.More(); aItDMSLS.Next(), ++k) {
- //const TopoDS_Shape& aSkey=aItDMSLS.Key();
- const TopTools_ListOfShape& aLSG=aItDMSLS.Value();
- aItLS1.Initialize(aLSG);
- for (i=0; aItLS1.More(); aItLS1.Next(), ++i) {
- aItLS2.Initialize(aLSG);
- for (j=0; aItLS2.More(); aItLS2.Next(), ++j) {
- if (j>i) {
- const TopoDS_Shape& aSG1=aItLS1.Value();
- const TopoDS_Shape& aSG2=aItLS2.Value();
- aCS.SetShape1(aSG1);
- aCS.SetShape2(aSG2);
- TreatPair(aCS, aLCS);
- }
- }
- }
- }
- //
- // 2. Find Chains
- TopTools_ListOfShape aLSX;
- NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMC;
- //
- NMTTools_Tools::FindChains(aLCS, aMC);
- //
- // 3. myImagesToWork, myOriginsToWork
- aNbC=aMC.Extent();
- for (i=1; i<=aNbC; ++i) {
- const TopoDS_Shape& aSkey=aMC.FindKey(i);
- const TopTools_IndexedMapOfShape& aM=aMC(i);
- aLSX.Clear();
- aNb=aM.Extent();
- for (j=1; j<=aNb; ++j) {
- const TopoDS_Shape& aS=aM(j);
- aLSX.Append(aS);
- myOriginsToWork.Bind(aS, aSkey);
- }
- myImagesToWork.Bind(aSkey, aLSX);
- }
-}
-//=======================================================================
-//function : TreatPair
-//purpose :
-//=======================================================================
-void GEOMAlgo_Gluer2::TreatPair(const NMTTools_CoupleOfShape& aCS,
- NMTTools_ListOfCoupleOfShape& aLCS)
-{
- if (myErrorStatus) {
- return;
- }
- //
- Standard_Integer i, aNbS1, aNbS2, aNbS;
- TopAbs_ShapeEnum aType, aTypeS;
- TopTools_ListIteratorOfListOfShape aItLS;
- TopTools_IndexedMapOfShape aMS1, aMS2;
- TopTools_DataMapOfShapeListOfShape aDMSLS;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
- NMTTools_CoupleOfShape aCSS;
- //
- // 1. Checking the pair on whether it can be glued at all
- // 1.1
- const TopoDS_Shape& aS1=aCS.Shape1();
- if (!myOriginsDetected.IsBound(aS1)) {
- myErrorStatus=30;
- return;
- }
- const TopoDS_Shape& aSkey1=myOriginsDetected.Find(aS1);
- // 1.2
- const TopoDS_Shape& aS2=aCS.Shape2();
- if (!myOriginsDetected.IsBound(aS2)) {
- myErrorStatus=30;
- return;
- }
- const TopoDS_Shape& aSkey2=myOriginsDetected.Find(aS2);
- // 1.3
- if (!aSkey1.IsSame(aSkey2)) {
- myErrorStatus=33;
- return;
- }
- //
- // 2. Append the pair to the aLCS
- aLCS.Append(aCS);
- //
- // 3. Treatment the sub-shapes of the pair
- aType=aS1.ShapeType();
- if (aType==TopAbs_VERTEX) {
- return;
- }
- aTypeS=TopAbs_EDGE;
- if (aType==aTypeS) {
- aTypeS=TopAbs_VERTEX;
- }
- //
- MapShapes1(aS1, aTypeS, aMS1);
- MapShapes1(aS2, aTypeS, aMS2);
- //
- aNbS1=aMS1.Extent();
- aNbS2=aMS2.Extent();
- if (aNbS1!=aNbS2) {
- myErrorStatus=31;
- return;
- }
- //
- // 1.
- for (i=1; i<=aNbS1; ++i) {
- const TopoDS_Shape& aSS1=aMS1(i);
- if (aMS2.Contains(aSS1)) {
- continue;
- }
- //
- if (!myOriginsDetected.IsBound(aSS1)) {
- myErrorStatus=30;
- return;
- }
- //
- const TopoDS_Shape& aSkey=myOriginsDetected.Find(aSS1);
- if (aDMSLS.IsBound(aSkey)) {
- TopTools_ListOfShape& aLS=aDMSLS.ChangeFind(aSkey);
- aLS.Append(aSS1);
- }
- else {
- TopTools_ListOfShape aLS;
- //
- aLS.Append(aSS1);
- aDMSLS.Bind(aSkey, aLS);
- }
- }
- //
- // 2.
- for (i=1; i<=aNbS2; ++i) {
- const TopoDS_Shape& aSS2=aMS2(i);
- if (aMS1.Contains(aSS2)) {
- continue;
- }
- //
- if (!myOriginsDetected.IsBound(aSS2)) {
- myErrorStatus=30;
- return;
- }
- //
- const TopoDS_Shape& aSkey=myOriginsDetected.Find(aSS2);
- if (aDMSLS.IsBound(aSkey)) {
- TopTools_ListOfShape& aLS=aDMSLS.ChangeFind(aSkey);
- aLS.Append(aSS2);
- }
- else {
- TopTools_ListOfShape aLS;
- //
- aLS.Append(aSS2);
- aDMSLS.Bind(aSkey, aLS);
- }
- }
- //
- // 3.
- aItDMSLS.Initialize(aDMSLS);
- for (; aItDMSLS.More(); aItDMSLS.Next()) {
- //const TopoDS_Shape& aSkey=aItDMSLS.Key();
- const TopTools_ListOfShape& aLS=aItDMSLS.Value();
- aNbS=aLS.Extent();
- if (aNbS!=2) {
- myErrorStatus=32;
- return;
- }
- //
- const TopoDS_Shape& aSS1=aLS.First();
- const TopoDS_Shape& aSS2=aLS.Last();
- aCSS.SetShape1(aSS1);
- aCSS.SetShape2(aSS2);
- TreatPair(aCSS, aLCS);
- }
-}
-//=======================================================================
-//function : MapShapes1
-//purpose :
-//=======================================================================
-void MapShapes1(const TopoDS_Shape& aS,
- const TopAbs_ShapeEnum aType,
- TopTools_IndexedMapOfShape& aM)
-{
- TopExp_Explorer aExp;
-
- aExp.Init (aS, aType);
- for ( ;aExp.More(); aExp.Next()) {
- const TopoDS_Shape aSx=aExp.Current();
- if (aType==TopAbs_EDGE) {
- const TopoDS_Edge& aEx=*((TopoDS_Edge*)&aSx);
- if (BRep_Tool::Degenerated(aEx)) {
- continue;
- }
- }
- aM.Add(aSx);
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_GluerAlgo.cxx
-// Created:
-// Author: Peter KURNEV
-// <peter@PREFEX>
-//
-#include <GEOMAlgo_GluerAlgo.hxx>
-#include <IntTools_Context.hxx>
-
-
-//=======================================================================
-//function : GEOMAlgo_GluerAlgo
-//purpose :
-//=======================================================================
-GEOMAlgo_GluerAlgo::GEOMAlgo_GluerAlgo()
-{
- myTolerance=0.0001;
- myCheckGeometry=Standard_True;
-}
-//=======================================================================
-//function : ~GEOMAlgo_GluerAlgo
-//purpose :
-//=======================================================================
-GEOMAlgo_GluerAlgo::~GEOMAlgo_GluerAlgo()
-{
-}
-//=======================================================================
-//function : SetArgument
-//purpose :
-//=======================================================================
-void GEOMAlgo_GluerAlgo::SetArgument(const TopoDS_Shape& theShape)
-{
- myArgument=theShape;
-}
-//=======================================================================
-//function : Argument
-//purpose :
-//=======================================================================
-const TopoDS_Shape& GEOMAlgo_GluerAlgo::Argument()const
-{
- return myArgument;
-}
-//=======================================================================
-//function : SetTolerance
-//purpose :
-//=======================================================================
-void GEOMAlgo_GluerAlgo::SetTolerance(const Standard_Real aT)
-{
- myTolerance=aT;
-}
-//=======================================================================
-//function : Tolerance
-//purpose :
-//=======================================================================
-Standard_Real GEOMAlgo_GluerAlgo::Tolerance()const
-{
- return myTolerance;
-}
-
-//=======================================================================
-//function : SetCheckGeometry
-//purpose :
-//=======================================================================
-void GEOMAlgo_GluerAlgo::SetCheckGeometry(const Standard_Boolean aFlag)
-{
- myCheckGeometry=aFlag;
-}
-//=======================================================================
-//function : CheckGeometry
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_GluerAlgo::CheckGeometry() const
-{
- return myCheckGeometry;
-}
-//=======================================================================
-//function : SetContext
-//purpose :
-//=======================================================================
-void GEOMAlgo_GluerAlgo::SetContext(const Handle(IntTools_Context)& theContext)
-{
- myContext=theContext;
-}
-//=======================================================================
-//function : Context
-//purpose :
-//=======================================================================
-const Handle(IntTools_Context)& GEOMAlgo_GluerAlgo::Context()
-{
- return myContext;
-}
-//=======================================================================
-//function : Images
-//purpose :
-//=======================================================================
-const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_GluerAlgo::Images()const
-{
- return myImages;
-}
-//=======================================================================
-//function : Origins
-//purpose :
-//=======================================================================
-const TopTools_DataMapOfShapeShape& GEOMAlgo_GluerAlgo::Origins()const
-{
- return myOrigins;
-}
-//=======================================================================
-//function : Clear
-//purpose :
-//=======================================================================
-void GEOMAlgo_GluerAlgo::Clear()
-{
- myImages.Clear();
- myOrigins.Clear();
-}
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
-void GEOMAlgo_GluerAlgo::Perform()
-{
- if (myContext.IsNull()) {
- myContext=new IntTools_Context;
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_GluerAlgo.hxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_GluerAlgo_HeaderFile
-#define _GEOMAlgo_GluerAlgo_HeaderFile
-
-#include <Standard_Macro.hxx>
-#include <TopoDS_Shape.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Boolean.hxx>
-#include <IntTools_Context.hxx>
-#include <TopTools_DataMapOfShapeListOfShape.hxx>
-#include <TopTools_DataMapOfShapeShape.hxx>
-#include <GEOMAlgo_BuilderShape.hxx>
-
-//=======================================================================
-//class : GEOMAlgo_GluerAlgo
-//purpose :
-//=======================================================================
-class GEOMAlgo_GluerAlgo {
-public:
-
- Standard_EXPORT
- GEOMAlgo_GluerAlgo();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_GluerAlgo();
-
- Standard_EXPORT
- virtual void SetArgument(const TopoDS_Shape& theShape) ;
-
- Standard_EXPORT
- const TopoDS_Shape& Argument() const;
-
- Standard_EXPORT
- void SetTolerance(const Standard_Real aT) ;
-
- Standard_EXPORT
- Standard_Real Tolerance() const;
-
- Standard_EXPORT
- void SetCheckGeometry(const Standard_Boolean aFlag) ;
-
- Standard_EXPORT
- Standard_Boolean CheckGeometry() const;
-
- Standard_EXPORT
- virtual void Perform() ;
-
- Standard_EXPORT
- virtual void Clear() ;
-
- Standard_EXPORT
- void SetContext(const Handle(IntTools_Context)&) ;
-
- Standard_EXPORT
- const Handle(IntTools_Context)& Context() ;
-
- Standard_EXPORT
- const TopTools_DataMapOfShapeListOfShape& Images() const;
-
- Standard_EXPORT
- const TopTools_DataMapOfShapeShape& Origins() const;
-
-protected:
- TopoDS_Shape myArgument;
- Standard_Real myTolerance;
- Standard_Boolean myCheckGeometry;
- Handle(IntTools_Context) myContext;
- TopTools_DataMapOfShapeListOfShape myImages;
- TopTools_DataMapOfShapeShape myOrigins;
-
-private:
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Hlgo.cxx
-// Created: Sat Dec 04 12:39:47 2004
-// Author: Peter KURNEV
-// <peter@PREFEX>
-//
-#include <GEOMAlgo_HAlgo.hxx>
-
-IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_HAlgo, MMgt_TShared);
-IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_HAlgo, MMgt_TShared);
-
-//=======================================================================
-// 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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_HAlgo.hxx
-// Created: Sat Dec 04 12:39:47 2004
-// Author: Peter KURNEV
-// <peter@PREFEX>
-//
-
-#ifndef _GEOMAlgo_HAlgo_HeaderFile
-#define _GEOMAlgo_HAlgo_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_DefineHandle.hxx>
-//#include <Handle_GEOMAlgo_HAlgo.hxx>
-#include <Standard_Integer.hxx>
-#include <MMgt_TShared.hxx>
-
-DEFINE_STANDARD_HANDLE(GEOMAlgo_HAlgo, MMgt_TShared);
-
-//=======================================================================
-//class : GEOMAlgo_HAlgo
-//purpose :
-//=======================================================================
-class GEOMAlgo_HAlgo : public MMgt_TShared
-{
- 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;
-
- DEFINE_STANDARD_RTTI(GEOMAlgo_HAlgo);
-
- protected:
- Standard_EXPORT
- GEOMAlgo_HAlgo();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_HAlgo();
-
- Standard_Integer myErrorStatus;
- Standard_Integer myWarningStatus;
-
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_IndexedDataMapOfIntegerShape.hxx
-// Created: Wed Feb 22 11:22:18 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile
-#define GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile
-
-
-
-#include <TopoDS_Shape.hxx>
-#include <Standard_Integer.hxx>
-#include <TColStd_MapIntegerHasher.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_IndexedDataMap.hxx>
-
-
-typedef NCollection_IndexedDataMap<Standard_Integer, TopoDS_Shape, TColStd_MapIntegerHasher> GEOMAlgo_IndexedDataMapOfIntegerShape;
-
-#undef _NCollection_MapHasher
-
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_IndexedDataMapOfPassKeyShapeListOfShape.hxx
-// Created: Wed Feb 22 11:24:27 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
-#define GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
-
-#include <GEOMAlgo_PassKeyShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <GEOMAlgo_PassKeyShapeMapHasher.hxx>
-
-
-#define _NCollection_MapHasher
-#include <NCollection_IndexedDataMap.hxx>
-
-
-typedef NCollection_IndexedDataMap<GEOMAlgo_PassKeyShape, TopTools_ListOfShape, GEOMAlgo_PassKeyShapeMapHasher> GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape;
-
-#undef _NCollection_MapHasher
-
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_IndexedDataMapOfShapeBox.hxx
-// Created: Wed Feb 22 11:14:14 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile
-#define GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile
-
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-#include <Bnd_Box.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_IndexedDataMap.hxx>
-
-
-typedef NCollection_IndexedDataMap<TopoDS_Shape, Bnd_Box, TopTools_ShapeMapHasher> GEOMAlgo_IndexedDataMapOfShapeBox;
-
-#undef _NCollection_MapHasher
-
-
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_IndexedDataMapOfShapeShapeInfo.hxx
-// Created: Wed Feb 22 11:16:54 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile
-#define GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile
-
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-#include <GEOMAlgo_ShapeInfo.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_IndexedDataMap.hxx>
-
-typedef NCollection_IndexedDataMap<TopoDS_Shape, GEOMAlgo_ShapeInfo, TopTools_ShapeMapHasher> GEOMAlgo_IndexedDataMapOfShapeShapeInfo;
-
-#undef _NCollection_MapHasher
-
-
-
-
-#endif
+++ /dev/null
-/// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-///
-/// 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
-///
-//
-// 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_IndexedDataMapOfShapeState.hxx
-// Created: Wed Feb 22 11:19:56 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
-#define GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
-
-
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-#include <TopAbs_State.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_IndexedDataMap.hxx>
-
-typedef NCollection_IndexedDataMap<TopoDS_Shape, TopAbs_State, TopTools_ShapeMapHasher> GEOMAlgo_IndexedDataMapOfShapeState;
-
-#undef _NCollection_MapHasher
-
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_KindOfBounds_HeaderFile
-#define _GEOMAlgo_KindOfBounds_HeaderFile
-
-
-enum GEOMAlgo_KindOfBounds {
-GEOMAlgo_KB_UNKNOWN,
-GEOMAlgo_KB_TRIMMED,
-GEOMAlgo_KB_INFINITE
-};
-
-#ifndef _Standard_PrimitiveTypes_HeaderFile
-#include <Standard_PrimitiveTypes.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_KindOfClosed_HeaderFile
-#define _GEOMAlgo_KindOfClosed_HeaderFile
-
-
-enum GEOMAlgo_KindOfClosed {
-GEOMAlgo_KC_UNKNOWN,
-GEOMAlgo_KC_CLOSED,
-GEOMAlgo_KC_NOTCLOSED
-};
-
-#ifndef _Standard_PrimitiveTypes_HeaderFile
-#include <Standard_PrimitiveTypes.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_KindOfName_HeaderFile
-#define _GEOMAlgo_KindOfName_HeaderFile
-
-
-enum GEOMAlgo_KindOfName {
-GEOMAlgo_KN_UNKNOWN,
-GEOMAlgo_KN_SPHERE,
-GEOMAlgo_KN_CYLINDER,
-GEOMAlgo_KN_TORUS,
-GEOMAlgo_KN_CONE,
-GEOMAlgo_KN_ELLIPSE,
-GEOMAlgo_KN_CIRCLE,
-GEOMAlgo_KN_PLANE,
-GEOMAlgo_KN_LINE,
-GEOMAlgo_KN_BOX,
-GEOMAlgo_KN_SEGMENT,
-GEOMAlgo_KN_ARCCIRCLE,
-GEOMAlgo_KN_POLYGON,
-GEOMAlgo_KN_POLYHEDRON,
-GEOMAlgo_KN_DISKCIRCLE,
-GEOMAlgo_KN_DISKELLIPSE,
-GEOMAlgo_KN_RECTANGLE,
-GEOMAlgo_KN_TRIANGLE,
-GEOMAlgo_KN_QUADRANGLE,
-GEOMAlgo_KN_ARCELLIPSE
-};
-
-#ifndef _Standard_PrimitiveTypes_HeaderFile
-#include <Standard_PrimitiveTypes.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_KindOfShape_HeaderFile
-#define _GEOMAlgo_KindOfShape_HeaderFile
-
-
-enum GEOMAlgo_KindOfShape {
-GEOMAlgo_KS_UNKNOWN,
-GEOMAlgo_KS_SPHERE,
-GEOMAlgo_KS_CYLINDER,
-GEOMAlgo_KS_BOX,
-GEOMAlgo_KS_TORUS,
-GEOMAlgo_KS_CONE,
-GEOMAlgo_KS_ELLIPSE,
-GEOMAlgo_KS_PLANE,
-GEOMAlgo_KS_CIRCLE,
-GEOMAlgo_KS_LINE,
-GEOMAlgo_KS_DEGENERATED
-};
-
-#ifndef _Standard_PrimitiveTypes_HeaderFile
-#include <Standard_PrimitiveTypes.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_ListIteratorOfListOfCoupleOfShapes.hxx
-// Created: Wed Feb 22 08:26:34 2012
-// Author:
-// <pkv@BDEURI37616>
-
-#ifndef GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile
-#define GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile
-
-#ifndef GEOMAlgo_ListOfCoupleOfShapes_HeaderFile
-#include <GEOMAlgo_ListOfCoupleOfShapes.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_ListIteratorOfListOfPnt.hxx
-// Created: Wed Feb 22 08:33:12 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile
-#define GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile
-
-#ifndef GEOMAlgo_ListOfPnt_HeaderFile
-#include <GEOMAlgo_ListOfPnt.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_ListOfCoupleOfShapes.hxx
-// Created: Wed Feb 22 08:23:27 2012
-// Author:
-// <pkv@BDEURI37616>
-
-#ifndef GEOMAlgo_ListOfCoupleOfShapes_HeaderFile
-#define GEOMAlgo_ListOfCoupleOfShapes_HeaderFile
-
-#include <NCollection_List.hxx>
-#include <GEOMAlgo_CoupleOfShapes.hxx>
-
-typedef NCollection_List<GEOMAlgo_CoupleOfShapes> GEOMAlgo_ListOfCoupleOfShapes;
-typedef GEOMAlgo_ListOfCoupleOfShapes::Iterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes;
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_ListOfPnt.hxx
-// Created: Wed Feb 22 08:31:47 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef GEOMAlgo_ListOfPnt_HeaderFile
-#define GEOMAlgo_ListOfPnt_HeaderFile
-
-#include <NCollection_List.hxx>
-#include <gp_Pnt.hxx>
-
-typedef NCollection_List<gp_Pnt> GEOMAlgo_ListOfPnt;
-typedef GEOMAlgo_ListOfPnt::Iterator GEOMAlgo_ListIteratorOfListOfPnt;
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_PWireEdgeSet.hxx
-// Created:
-// Author: Peter KURNEV
-// <peter@PREFEX>
-//
-#ifndef _GEOMAlgo_PWireEdgeSet_HeaderFile
-#define _GEOMAlgo_PWireEdgeSet_HeaderFile
-
-class GEOMAlgo_WireEdgeSet;
-
-typedef GEOMAlgo_WireEdgeSet* GEOMAlgo_PWireEdgeSet;
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_PassKey.cxx
-// Created:
-// Author: Peter KURNEV
-// <peter@PREFEX>
-//
-#include <GEOMAlgo_PassKey.hxx>
-
-#include <stdio.h>
-#include <string.h>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <TColStd_ListOfInteger.hxx>
-
-#ifdef WNT
-#pragma warning( disable : 4101)
-#endif
-
-static
- Standard_Integer NormalizedId(const Standard_Integer aId,
- const Standard_Integer aDiv);
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- GEOMAlgo_PassKey::GEOMAlgo_PassKey()
-{
- 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& aOther)
-{
- myNbIds=aOther.myNbIds;
- mySum=aOther.mySum;
- myMap=aOther.myMap;
- return *this;
-}
-//=======================================================================
-//function :~
-//purpose :
-//=======================================================================
- GEOMAlgo_PassKey::~GEOMAlgo_PassKey()
-{
-}
-//=======================================================================
-//function :Clear
-//purpose :
-//=======================================================================
- void GEOMAlgo_PassKey::Clear()
-{
- myNbIds=0;
- mySum=0;
- myMap.Clear();
-}
-//=======================================================================
-//function :SetIds
-//purpose :
-//=======================================================================
- void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1)
-
-{
- Clear();
- myNbIds=1;
- myMap.Add(aId1);
- mySum=NormalizedId(aId1, myNbIds);
-}
-//=======================================================================
-//function :SetIds
-//purpose :
-//=======================================================================
- void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1,
- const Standard_Integer aId2)
-{
- TColStd_ListOfInteger aLI;
- //
- aLI.Append(aId1);
- aLI.Append(aId2);
- SetIds(aLI);
-}
-//=======================================================================
-//function :SetIds
-//purpose :
-//=======================================================================
- void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1,
- const Standard_Integer aId2,
- const Standard_Integer aId3)
-{
- TColStd_ListOfInteger aLI;
- //
- aLI.Append(aId1);
- aLI.Append(aId2);
- aLI.Append(aId3);
- SetIds(aLI);
-}
-//=======================================================================
-//function :SetIds
-//purpose :
-//=======================================================================
- void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1,
- const Standard_Integer aId2,
- const Standard_Integer aId3,
- const Standard_Integer aId4)
-{
- TColStd_ListOfInteger aLI;
- //
- aLI.Append(aId1);
- aLI.Append(aId2);
- aLI.Append(aId3);
- aLI.Append(aId4);
- SetIds(aLI);
-}
-//=======================================================================
-//function :SetIds
-//purpose :
-//=======================================================================
- void GEOMAlgo_PassKey::SetIds(const TColStd_ListOfInteger& aLI)
-{
- Standard_Integer i, aId, aIdN;
- TColStd_ListIteratorOfListOfInteger aIt;
- //
- Clear();
- aIt.Initialize(aLI);
- for (; aIt.More(); aIt.Next()) {
- aId=aIt.Value();
- myMap.Add(aId);
- }
- myNbIds=myMap.Extent();
- for(i=1; i<=myNbIds; ++i) {
- aId=myMap(i);
- aIdN=NormalizedId(aId, myNbIds);
- mySum+=aIdN;
- }
-}
-//=======================================================================
-//function :NbIds
-//purpose :
-//=======================================================================
- Standard_Integer GEOMAlgo_PassKey::NbIds()const
-{
- return myNbIds;
-}
-//=======================================================================
-//function :Id
-//purpose :
-//=======================================================================
- Standard_Integer GEOMAlgo_PassKey::Id(const Standard_Integer aIndex) const
-{
- if (aIndex<1 || aIndex>myNbIds) {
- return -1;
- }
- return myMap(aIndex);
-}
-//=======================================================================
-//function :IsEqual
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_PassKey::IsEqual(const GEOMAlgo_PassKey& aOther) const
-{
- Standard_Boolean bRet;
- Standard_Integer i, aId;
- //
- bRet=Standard_False;
- //
- if (myNbIds!=aOther.myNbIds) {
- return bRet;
- }
- 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 aUpper) const
-{
- return ::HashCode(mySum, aUpper);
-}
-//=======================================================================
-//function : Dump
-//purpose :
-//=======================================================================
- void GEOMAlgo_PassKey::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;
- }
- return aIdRet;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_PassKey.hxx
-// Created:
-// Author: Peter KURNEV
-// <peter@PREFEX>
-//
-#ifndef _GEOMAlgo_PassKey_HeaderFile
-#define _GEOMAlgo_PassKey_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
-#include <Standard_Boolean.hxx>
-#include <TColStd_ListOfInteger.hxx>
-
-//=======================================================================
-//class : GEOMAlgo_PassKey
-//purpose :
-//=======================================================================
-class GEOMAlgo_PassKey {
- public:
- 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) ;
-
- GEOMAlgo_PassKey& operator =(const GEOMAlgo_PassKey& Other) {
- return Assign(Other);
- }
-
- Standard_EXPORT
- void Clear() ;
-
- Standard_EXPORT
- void SetIds(const Standard_Integer aI1) ;
-
- Standard_EXPORT
- void SetIds(const Standard_Integer aI1,
- const Standard_Integer aI2) ;
-
- Standard_EXPORT
- void SetIds(const Standard_Integer aI1,
- const Standard_Integer aI2,
- const Standard_Integer aI3) ;
-
- Standard_EXPORT
- void SetIds(const Standard_Integer aI1,
- const Standard_Integer aI2,
- const Standard_Integer aI3,
- const Standard_Integer aI4) ;
-
- Standard_EXPORT
- void SetIds(const TColStd_ListOfInteger& aLS) ;
-
- Standard_EXPORT
- Standard_Integer NbIds() const;
-
- Standard_EXPORT
- Standard_Boolean IsEqual(const GEOMAlgo_PassKey& aOther) 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_Integer aHex = 0) const;
-
- protected:
- Standard_Integer myNbIds;
- Standard_Integer mySum;
- TColStd_IndexedMapOfInteger myMap;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_PassKeyMapHasher.hxx>
-
-//=======================================================================
-//function : HashCode
-//purpose :
-//=======================================================================
- Standard_Integer GEOMAlgo_PassKeyMapHasher::HashCode(const GEOMAlgo_PassKey& aPK,
- const Standard_Integer Upper)
-{
- return aPK.HashCode(Upper);
-}
-//=======================================================================
-//function :IsEqual
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_PassKeyMapHasher::IsEqual(const GEOMAlgo_PassKey& aPK1,
- const GEOMAlgo_PassKey& aPK2)
-{
- return aPK1.IsEqual(aPK2);
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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.hxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile
-#define _GEOMAlgo_PassKeyMapHasher_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Boolean.hxx>
-#include <GEOMAlgo_PassKey.hxx>
-
-//=======================================================================
-//class : GEOMAlgo_PassKeyMapHasher
-//purpose :
-//=======================================================================
-class GEOMAlgo_PassKeyMapHasher {
- public:
- Standard_EXPORT
- static Standard_Integer HashCode(const GEOMAlgo_PassKey& aPKey,
- const Standard_Integer Upper) ;
-
- Standard_EXPORT
- static Standard_Boolean IsEqual(const GEOMAlgo_PassKey& aPKey1,
- const GEOMAlgo_PassKey& aPKey2) ;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_PassKeyShape.cxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <GEOMAlgo_PassKeyShape.hxx>
-
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-
-
-static
- Standard_Integer NormalizedId(const Standard_Integer aId,
- const Standard_Integer aDiv);
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- GEOMAlgo_PassKeyShape::GEOMAlgo_PassKeyShape()
-{
- myUpper=432123;
-}
-//=======================================================================
-//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::Clear()
-{
- myNbIds=0;
- mySum=0;
- myMap.Clear();
-}
-//=======================================================================
-//function :SetShapes
-//purpose :
-//=======================================================================
- void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1)
-
-{
- Standard_Integer aHC;
- //
- Clear();
- myNbIds=1;
- myMap.Add(aS1);
- aHC=aS1.HashCode(myUpper);
- mySum=NormalizedId(aHC, myNbIds);
-}
-//=======================================================================
-//function :SetShapes
-//purpose :
-//=======================================================================
- void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2)
-{
- TopTools_ListOfShape aLS;
- //
- aLS.Append(aS1);
- aLS.Append(aS2);
- SetShapes(aLS);
-}
-//=======================================================================
-//function :SetShapes
-//purpose :
-//=======================================================================
- void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2,
- const TopoDS_Shape& aS3)
-{
- TopTools_ListOfShape aLS;
- //
- aLS.Append(aS1);
- aLS.Append(aS2);
- aLS.Append(aS3);
- SetShapes(aLS);
-}
-//=======================================================================
-//function :SetShapes
-//purpose :
-//=======================================================================
- void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2,
- const TopoDS_Shape& aS3,
- const TopoDS_Shape& aS4)
-{
- TopTools_ListOfShape aLS;
- //
- aLS.Append(aS1);
- aLS.Append(aS2);
- aLS.Append(aS3);
- aLS.Append(aS4);
- SetShapes(aLS);
-}
-//=======================================================================
-//function :SetShapes
-//purpose :
-//=======================================================================
- void GEOMAlgo_PassKeyShape::SetShapes(const TopTools_ListOfShape& aLS)
-{
- Standard_Integer i, aId, aIdN;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- Clear();
- aIt.Initialize(aLS);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- 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;
- }
- return aIdRet;
-}
+++ /dev/null
-
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_PassKeyShape.hxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_PassKeyShape_HeaderFile
-#define _GEOMAlgo_PassKeyShape_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <Standard_Boolean.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ListOfShape.hxx>
-
-
-//=======================================================================
-//class : GEOMAlgo_PassKeyShape
-//purpose :
-//=======================================================================
-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 Clear() ;
-
- Standard_EXPORT
- Standard_Integer NbIds() const;
-
- Standard_EXPORT
- Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aOther) const;
-
- Standard_EXPORT
- Standard_Integer HashCode(const Standard_Integer Upper) const;
-
- Standard_EXPORT
- void Dump(const Standard_Integer aHex = 0) const;
-
-protected:
- Standard_Integer myNbIds;
- Standard_Integer mySum;
- Standard_Integer myUpper;
- TopTools_IndexedMapOfShape myMap;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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.hxx>
-
-//=======================================================================
-//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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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.hxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile
-#define _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Boolean.hxx>
-#include <GEOMAlgo_PassKeyShape.hxx>
-
-//=======================================================================
-//class : GEOMAlgo_PassKeyShapeMapHasher
-//purpose :
-//=======================================================================
-class GEOMAlgo_PassKeyShapeMapHasher
-{
- 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) ;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ShapeAlgo.cxx
-// Created: Tue Dec 7 12:06:54 2004
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <GEOMAlgo_ShapeAlgo.hxx>
-#include <IntTools_Context.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_ShapeAlgo
-//purpose :
-//=======================================================================
-GEOMAlgo_ShapeAlgo::GEOMAlgo_ShapeAlgo()
-:
- GEOMAlgo_Algo()
-{
- myTolerance=0.0001;
-}
-
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-GEOMAlgo_ShapeAlgo::~GEOMAlgo_ShapeAlgo()
-{
-}
-//=======================================================================
-//function : SetContext
-//purpose :
-//=======================================================================
-void GEOMAlgo_ShapeAlgo::SetContext(const Handle(IntTools_Context)& theContext)
-{
- myContext=theContext;
-}
-//=======================================================================
-//function : Context
-//purpose :
-//=======================================================================
-const Handle(IntTools_Context)& GEOMAlgo_ShapeAlgo::Context()const
-{
- return myContext;
-}
-//=======================================================================
-//function : SetShape
-//purpose :
-//=======================================================================
-void GEOMAlgo_ShapeAlgo::SetShape(const TopoDS_Shape& aS)
-{
- myShape=aS;
-}
-//=======================================================================
-//function : Shape
-//purpose :
-//=======================================================================
-const TopoDS_Shape& GEOMAlgo_ShapeAlgo::Shape()const
-{
- return myShape;
-}
-//=======================================================================
-//function : SetTolerance
-//purpose :
-//=======================================================================
-void GEOMAlgo_ShapeAlgo::SetTolerance(const Standard_Real aT)
-{
- myTolerance=aT;
-}
-//=======================================================================
-//function : Tolerance
-//purpose :
-//=======================================================================
-Standard_Real GEOMAlgo_ShapeAlgo::Tolerance()const
-{
- return myTolerance;
-}
-//=======================================================================
-//function : Result
-//purpose :
-//=======================================================================
-const TopoDS_Shape& GEOMAlgo_ShapeAlgo::Result()const
-{
- return myResult;
-}
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
-void GEOMAlgo_ShapeAlgo::Perform()
-{
- if (myContext.IsNull()) {
- myContext=new IntTools_Context;
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ShapeAlgo.hxx
-// Created: Tue Dec 7 12:06:54 2004
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
-#define _GEOMAlgo_ShapeAlgo_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <TopoDS_Shape.hxx>
-#include <Standard_Real.hxx>
-#include <Handle_IntTools_Context.hxx>
-#include <GEOMAlgo_Algo.hxx>
-
-//=======================================================================
-//class : GEOMAlgo_ShapeAlgo
-//purpose :
-//=======================================================================
-class GEOMAlgo_ShapeAlgo : public GEOMAlgo_Algo
-{
- public:
-
- //! Sets cashed geometrical tools <br>
- Standard_EXPORT
- void SetContext(const Handle(IntTools_Context)& theContext) ;
-
- //! Returns cashed geometrical tools <br>
- Standard_EXPORT
- const Handle_IntTools_Context& Context() const;
-
- Standard_EXPORT
- void SetShape(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- void SetTolerance(const Standard_Real aT) ;
-
- Standard_EXPORT
- const TopoDS_Shape& Shape() const;
-
- Standard_EXPORT
- Standard_Real Tolerance() const;
-
- Standard_EXPORT
- const TopoDS_Shape& Result() const;
-
- Standard_EXPORT
- virtual void Perform() ;
-
-protected:
- Standard_EXPORT
- GEOMAlgo_ShapeAlgo();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_ShapeAlgo();
-
-
- TopoDS_Shape myShape;
- Standard_Real myTolerance;
- TopoDS_Shape myResult;
- Handle_IntTools_Context myContext;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_ShapeInfo.hxx>
-
-
-static
- Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType);
-static
- void DumpKindOfShape(const GEOMAlgo_KindOfShape aKS);
-static
- void DumpKindOfClosed(const GEOMAlgo_KindOfClosed aKC);
-static
- void DumpKindOfBounds(const GEOMAlgo_KindOfBounds aKB);
-static
- void DumpKindOfName(const GEOMAlgo_KindOfName aKS);
-static
- void DumpPosition(const gp_Ax3& aAx3);
-static
- void DumpLocation(const gp_Pnt& aP);
-static
- void DumpDirection(const gp_Dir& aD);
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- GEOMAlgo_ShapeInfo::GEOMAlgo_ShapeInfo()
-{
- Reset();
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
- GEOMAlgo_ShapeInfo::~GEOMAlgo_ShapeInfo()
-{
-}
-//=======================================================================
-//function : Reset
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::Reset()
-{
- Standard_Integer i;
- //
- myType=TopAbs_SHAPE;
- //
- myNbTypes=9;
- for (i=0; i<myNbTypes; ++i) {
- myNbSubShapes[i]=0;
- }
- //
- myKindOfShape=GEOMAlgo_KS_UNKNOWN;
- myKindOfBounds=GEOMAlgo_KB_UNKNOWN;
- myKindOfClosed=GEOMAlgo_KC_UNKNOWN;
- myKindOfName=GEOMAlgo_KN_UNKNOWN;
- //
- myLocation.SetCoord(99., 99., 99.);
- myDirection.SetCoord(1.,0.,0.);
- //
- myRadius1=-1.;
- myRadius2=-2.;
- myLength=-3.;
- myWidth=-3.;
- myHeight=-3.;
-}
-//=======================================================================
-//function : SetType
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetType(const TopAbs_ShapeEnum aType)
-{
- myType=aType;
-}
-//=======================================================================
-//function : Type
-//purpose :
-//=======================================================================
- TopAbs_ShapeEnum GEOMAlgo_ShapeInfo::Type() const
-{
- return myType;
-}
-//=======================================================================
-//function : SetNbSubShapes
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetNbSubShapes(const TopAbs_ShapeEnum aType,
- const Standard_Integer aNb)
-{
- Standard_Integer iN;
-
- iN=TypeToInteger(aType);
- if (iN>=0 && iN<myNbTypes) {
- myNbSubShapes[iN]=aNb;
- }
-}
-//=======================================================================
-//function : NbSubShapes
-//purpose :
-//=======================================================================
- Standard_Integer GEOMAlgo_ShapeInfo::NbSubShapes(const TopAbs_ShapeEnum aType) const
-{
- Standard_Integer iN;
-
- iN=TypeToInteger(aType);
- if (iN>=0 && iN<myNbTypes) {
- return myNbSubShapes[iN];
- }
- return 0;
-}
-//=======================================================================
-//function : SetKindOfShape
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetKindOfShape(const GEOMAlgo_KindOfShape aT)
-{
- myKindOfShape=aT;
-}
-//=======================================================================
-//function : KindOfShape
-//purpose :
-//=======================================================================
- GEOMAlgo_KindOfShape GEOMAlgo_ShapeInfo::KindOfShape() const
-{
- return myKindOfShape;
-}
-//=======================================================================
-//function : SetKindOfName
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetKindOfName(const GEOMAlgo_KindOfName aT)
-{
- myKindOfName=aT;
-}
-//=======================================================================
-//function : KindOfName
-//purpose :
-//=======================================================================
- GEOMAlgo_KindOfName GEOMAlgo_ShapeInfo::KindOfName() const
-{
- return myKindOfName;
-}
-//=======================================================================
-//function : SetKindOfBounds
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetKindOfBounds(const GEOMAlgo_KindOfBounds aT)
-{
- myKindOfBounds=aT;
-}
-//=======================================================================
-//function : KindOfBounds
-//purpose :
-//=======================================================================
- GEOMAlgo_KindOfBounds GEOMAlgo_ShapeInfo::KindOfBounds() const
-{
- return myKindOfBounds;
-}
-//=======================================================================
-//function : SetKindOfClosed
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetKindOfClosed(const GEOMAlgo_KindOfClosed aT)
-{
- myKindOfClosed=aT;
-}
-//=======================================================================
-//function : KindOfClosed
-//purpose :
-//=======================================================================
- GEOMAlgo_KindOfClosed GEOMAlgo_ShapeInfo::KindOfClosed() const
-{
- return myKindOfClosed;
-}
-//=======================================================================
-//function : SetLocation
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetLocation(const gp_Pnt& aP)
-{
- myLocation=aP;
-}
-//=======================================================================
-//function : Location
-//purpose :
-//=======================================================================
- const gp_Pnt& GEOMAlgo_ShapeInfo::Location() const
-{
- return myLocation;
-}
-//=======================================================================
-//function : SetDirection
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetDirection(const gp_Dir& aD)
-{
- myDirection=aD;
-}
-//=======================================================================
-//function : Direction
-//purpose :
-//=======================================================================
- const gp_Dir& GEOMAlgo_ShapeInfo::Direction() const
-{
- return myDirection;
-}
-//=======================================================================
-//function : SetPosition
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetPosition(const gp_Ax2& aAx2)
-{
- gp_Ax3 aAx3(aAx2);
- SetPosition(aAx3);
-}
-//=======================================================================
-//function : SetPosition
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetPosition(const gp_Ax3& aAx3)
-{
- myPosition=aAx3;
-}
-//=======================================================================
-//function : Position
-//purpose :
-//=======================================================================
- const gp_Ax3& GEOMAlgo_ShapeInfo::Position() const
-{
- return myPosition;
-}
-
-//=======================================================================
-//function : SetPnt1
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetPnt1(const gp_Pnt& aP)
-{
- myPnt1=aP;
-}
-//=======================================================================
-//function : Pnt1
-//purpose :
-//=======================================================================
- const gp_Pnt& GEOMAlgo_ShapeInfo::Pnt1() const
-{
- return myPnt1;
-}
-//=======================================================================
-//function : SetPnt2
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetPnt2(const gp_Pnt& aP)
-{
- myPnt2=aP;
-}
-//=======================================================================
-//function : Pnt2
-//purpose :
-//=======================================================================
- const gp_Pnt& GEOMAlgo_ShapeInfo::Pnt2() const
-{
- return myPnt2;
-}
-//=======================================================================
-//function : SetRadius1
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetRadius1(const Standard_Real aR)
-{
- myRadius1=aR;
-}
-//=======================================================================
-//function : Radius1
-//purpose :
-//=======================================================================
- Standard_Real GEOMAlgo_ShapeInfo::Radius1() const
-{
- return myRadius1;
-}
-//=======================================================================
-//function : SetRadius2
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetRadius2(const Standard_Real aR)
-{
- myRadius2=aR;
-}
-//=======================================================================
-//function : Radius2
-//purpose :
-//=======================================================================
- Standard_Real GEOMAlgo_ShapeInfo::Radius2() const
-{
- return myRadius2;
-}
-//=======================================================================
-//function : SetLength
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetLength(const Standard_Real aL)
-{
- myLength=aL;
-}
-//=======================================================================
-//function : Length
-//purpose :
-//=======================================================================
- Standard_Real GEOMAlgo_ShapeInfo::Length() const
-{
- return myLength;
-}
-//=======================================================================
-//function : SetWidth
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetWidth(const Standard_Real aW)
-{
- myWidth=aW;
-}
-//=======================================================================
-//function : Width
-//purpose :
-//=======================================================================
- Standard_Real GEOMAlgo_ShapeInfo::Width() const
-{
- return myWidth;
-}
-//=======================================================================
-//function : SetHeight
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::SetHeight(const Standard_Real aH)
-{
- myHeight=aH;
-}
-//=======================================================================
-//function : Height
-//purpose :
-//=======================================================================
- Standard_Real GEOMAlgo_ShapeInfo::Height() const
-{
- return myHeight;
-}
-//=======================================================================
-//function : TypeToInteger
-//purpose :
-//=======================================================================
-Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType)
-{
- Standard_Integer iN;
- //
- iN=(Standard_Integer)aType;
- return iN;
-}
-//=======================================================================
-//function : Dump
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::Dump()const
-{
- switch (myType) {
- //
- case TopAbs_VERTEX:
- DumpVertex();
- break;
- //
- case TopAbs_EDGE:
- DumpEdge();
- break;
- //
- case TopAbs_WIRE:
- DumpWire();
- break;
- //
- case TopAbs_FACE:
- DumpFace();
- break;
- //
- case TopAbs_SHELL:
- DumpShell();
- break;
- //
- case TopAbs_SOLID:
- DumpSolid();
- break;
- //
- case TopAbs_COMPSOLID:
- DumpCompSolid();
- break;
- //
- case TopAbs_COMPOUND:
- DumpCompound();
- break;
- //
- default:
- printf(" * not implememted yet\n");
- break;
- }
-}
-//=======================================================================
-//function : DumpCompound
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::DumpCompound()const
-{
- Standard_Integer aNbV, aNbE, aNbF, aNbS, aNbC, aNbP;
- GEOMAlgo_KindOfShape aKS;
- GEOMAlgo_KindOfName aKN;
- GEOMAlgo_KindOfBounds aKB;
- GEOMAlgo_KindOfClosed aKC;
- //
- aNbV=NbSubShapes(TopAbs_VERTEX);
- aNbE=NbSubShapes(TopAbs_EDGE);
- aNbF=NbSubShapes(TopAbs_FACE);
- aNbS=NbSubShapes(TopAbs_SOLID);
- aNbC=NbSubShapes(TopAbs_COMPSOLID);
- aNbP=NbSubShapes(TopAbs_COMPOUND);
- aKS=KindOfShape();
- aKN=KindOfName();
- aKB=KindOfBounds();
- aKC=KindOfClosed();
- //
- printf(" *COMPOUND\n");
- printf(" number of vertices : %d\n", aNbV);
- printf(" number of edges : %d\n", aNbE);
- printf(" number of faces : %d\n", aNbF);
- printf(" number of solids : %d\n", aNbS);
- printf(" number of compsolids : %d\n", aNbC);
- printf(" number of compounds : %d\n", aNbP);
- DumpKindOfShape (aKS);
- DumpKindOfName (aKN);
- DumpKindOfBounds(aKB);
- DumpKindOfClosed(aKC);
-}
-//=======================================================================
-//function : DumpCompSolid
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::DumpCompSolid()const
-{
- Standard_Integer aNbV, aNbE, aNbF, aNbS;
- GEOMAlgo_KindOfShape aKS;
- GEOMAlgo_KindOfName aKN;
- GEOMAlgo_KindOfBounds aKB;
- GEOMAlgo_KindOfClosed aKC;
- //
- aNbV=NbSubShapes(TopAbs_VERTEX);
- aNbE=NbSubShapes(TopAbs_EDGE);
- aNbF=NbSubShapes(TopAbs_FACE);
- aNbS=NbSubShapes(TopAbs_SOLID);
- aKS=KindOfShape();
- aKN=KindOfName();
- aKB=KindOfBounds();
- aKC=KindOfClosed();
- //
- printf(" *COMPSOLID\n");
- printf(" number of vertices: %d\n", aNbV);
- printf(" number of edges : %d\n", aNbE);
- printf(" number of faces : %d\n", aNbF);
- printf(" number of solids : %d\n", aNbS);
- DumpKindOfShape (aKS);
- DumpKindOfName (aKN);
- DumpKindOfBounds(aKB);
- DumpKindOfClosed(aKC);
-}
-
-//=======================================================================
-//function : DumpSolid
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::DumpSolid()const
-{
- Standard_Integer aNbV, aNbE, aNbF;
- GEOMAlgo_KindOfShape aKS;
- GEOMAlgo_KindOfName aKN;
- GEOMAlgo_KindOfBounds aKB;
- GEOMAlgo_KindOfClosed aKC;
- //
- aNbV=NbSubShapes(TopAbs_VERTEX);
- aNbE=NbSubShapes(TopAbs_EDGE);
- aNbF=NbSubShapes(TopAbs_FACE);
- aKS=KindOfShape();
- aKN=KindOfName();
- aKB=KindOfBounds();
- aKC=KindOfClosed();
- //
- printf(" *SOLID\n");
- printf(" number of vertices: %d\n", aNbV);
- printf(" number of edges : %d\n", aNbE);
- printf(" number of faces : %d\n", aNbF);
- DumpKindOfShape (aKS);
- DumpKindOfName (aKN);
- DumpKindOfBounds(aKB);
- DumpKindOfClosed(aKC);
- //
- if (aKN==GEOMAlgo_KN_SPHERE) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- printf(" Radius1 : %.3lf\n", myRadius1);
- }
- if (aKN==GEOMAlgo_KN_CYLINDER) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- printf(" Radius1 : %.3lf\n", myRadius1);
- printf(" Height : %.3lf\n", myHeight);
- }
- else if (aKN==GEOMAlgo_KN_CONE) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- printf(" Radius1 : %.3lf\n", myRadius1);
- printf(" Radius2 : %.3lf\n", myRadius2);
- printf(" Height : %.3lf\n", myHeight);
- }
- else if (aKN==GEOMAlgo_KN_TORUS) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- printf(" Radius1 : %.3lf\n", myRadius1);
- printf(" Radius2 : %.3lf\n", myRadius2);
- }
- else if (aKN==GEOMAlgo_KN_POLYHEDRON) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- }
- else if (aKN==GEOMAlgo_KN_BOX) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- printf(" Length : %.3lf\n", myLength);
- printf(" Width : %.3lf\n", myWidth);
- printf(" Height : %.3lf\n", myHeight);
- }
-}
-
-//=======================================================================
-//function : DumpFace
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::DumpFace()const
-{
- Standard_Integer aNbV, aNbE;
- GEOMAlgo_KindOfShape aKS;
- GEOMAlgo_KindOfName aKN;
- GEOMAlgo_KindOfBounds aKB;
- GEOMAlgo_KindOfClosed aKC;
- //
- aNbV=NbSubShapes(TopAbs_VERTEX);
- aNbE=NbSubShapes(TopAbs_EDGE);
- aKS=KindOfShape();
- aKN=KindOfName();
- aKB=KindOfBounds();
- aKC=KindOfClosed();
- //
- printf(" *FACE\n");
- printf(" number of vertices: %d\n", aNbV);
- printf(" number of edges : %d\n", aNbE);
- DumpKindOfShape (aKS);
- DumpKindOfName (aKN);
- DumpKindOfBounds(aKB);
- DumpKindOfClosed(aKC);
- //
- // PLANE
- if (aKN==GEOMAlgo_KN_PLANE) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- }
- else if (aKN==GEOMAlgo_KN_DISKCIRCLE) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- printf(" Radius1 : %.3lf\n", myRadius1);
- }
- else if (aKN==GEOMAlgo_KN_DISKELLIPSE) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- printf(" Radius1 : %.3lf\n", myRadius1);
- printf(" Radius2 : %.3lf\n", myRadius2);
- }
- else if (aKN==GEOMAlgo_KN_RECTANGLE) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- printf(" Length : %.3lf\n", myLength);
- printf(" Width : %.3lf\n", myWidth);
- }
- else if (aKN==GEOMAlgo_KN_TRIANGLE ||
- aKN==GEOMAlgo_KN_QUADRANGLE||
- aKN==GEOMAlgo_KN_POLYGON) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- }
- //
- // SPHERE
- else if (aKN==GEOMAlgo_KN_SPHERE) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- printf(" Radius1 : %.3lf", myRadius1);
- }
- //
- // CYLINDER
- else if (aKN==GEOMAlgo_KN_CYLINDER) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- printf(" Radius1 : %.3lf\n", myRadius1);
- printf(" Height : %.3lf\n", myHeight);
- }
- //
- // CONE
- else if (aKN==GEOMAlgo_KN_CONE) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- printf(" Radius1 : %.3lf\n", myRadius1);
- printf(" Radius2 : %.3lf\n", myRadius2);
- printf(" Height : %.3lf\n", myHeight);
- }
- //
- // TORUS
- else if (aKN==GEOMAlgo_KN_TORUS) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- printf(" Radius1 : %.3lf\n", myRadius1);
- printf(" Radius2 : %.3lf\n", myRadius2);
- }
-
-
- printf("\n");
-}
-//=======================================================================
-//function : DumpShell
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::DumpShell()const
-{
- Standard_Integer aNbV, aNbE, aNbF;
- GEOMAlgo_KindOfClosed aKC;
- //
- printf(" *SHELL\n");
- //
- aNbV=NbSubShapes(TopAbs_VERTEX);
- aNbE=NbSubShapes(TopAbs_EDGE);
- aNbF=NbSubShapes(TopAbs_FACE);
- printf(" number of vertices: %d\n", aNbV);
- printf(" number of edges : %d\n", aNbE);
- printf(" number of faces : %d\n", aNbF);
- aKC=KindOfClosed();
- DumpKindOfClosed(aKC);
- printf("\n");
-}
-//=======================================================================
-//function : DumpWire
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::DumpWire()const
-{
- Standard_Integer aNbV, aNbE;
- GEOMAlgo_KindOfClosed aKC;
- //
- printf(" *WIRE\n");
- //
- aNbV=NbSubShapes(TopAbs_VERTEX);
- aNbE=NbSubShapes(TopAbs_EDGE);
- printf(" number of vertices: %d\n", aNbV);
- printf(" number of edges : %d\n", aNbE);
-
- aKC=KindOfClosed();
- DumpKindOfClosed(aKC);
- printf("\n");
-}
-//=======================================================================
-//function : DumpEdge
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::DumpEdge()const
-{
- Standard_Integer aNbV;
- Standard_Real aX, aY, aZ;
- GEOMAlgo_KindOfShape aKS;
- GEOMAlgo_KindOfName aKN;
- GEOMAlgo_KindOfBounds aKB;
- GEOMAlgo_KindOfClosed aKC;
- //
- aNbV=NbSubShapes(TopAbs_VERTEX);
- aKS=KindOfShape();
- aKN=KindOfName();
- aKB=KindOfBounds();
- aKC=KindOfClosed();
- //
- printf(" *EDGE\n");
- printf(" number of vertices: %d\n", aNbV);
- DumpKindOfShape (aKS);
- DumpKindOfName (aKN);
- DumpKindOfBounds(aKB);
- DumpKindOfClosed(aKC);
- //
- // LINE
- if (aKN==GEOMAlgo_KN_LINE) {
- DumpLocation (myLocation);
- DumpDirection(myDirection);
- }
- else if (aKN==GEOMAlgo_KN_SEGMENT) {
- DumpLocation (myLocation);
- DumpDirection(myDirection);
- printf(" Length : %.3lf\n", myLength);
- myPnt1.Coord(aX, aY, aZ);
- printf(" Pnt1 : %.3lf %.3lf %.3lf\n", aX, aY, aZ);
- myPnt2.Coord(aX, aY, aZ);
- printf(" Pnt2 : %.3lf %.3lf %.3lf\n", aX, aY, aZ);
-
- }
- else if (aKN==GEOMAlgo_KN_CIRCLE) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- printf(" Radius1 : %.3lf\n", myRadius1);
- }
- else if (aKN==GEOMAlgo_KN_ARCCIRCLE) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- printf(" Radius1 : %.3lf\n", myRadius1);
- myPnt1.Coord(aX, aY, aZ);
- printf(" Pnt1 : %.3lf %.3lf %.3lf\n", aX, aY, aZ);
- myPnt2.Coord(aX, aY, aZ);
- printf(" Pnt2 : %.3lf %.3lf %.3lf\n", aX, aY, aZ);
- }
- else if (aKN==GEOMAlgo_KN_ELLIPSE) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- printf(" Radius1 : %.3lf\n", myRadius1);
- printf(" Radius2 : %.3lf\n", myRadius2);
- }
- else if (aKN==GEOMAlgo_KN_ARCELLIPSE) {
- DumpLocation (myLocation);
- DumpPosition (myPosition);
- printf(" Radius1 : %.3lf\n", myRadius1);
- printf(" Radius2 : %.3lf\n", myRadius2);
- myPnt1.Coord(aX, aY, aZ);
- printf(" Pnt1 : %.3lf %.3lf %.3lf\n", aX, aY, aZ);
- myPnt2.Coord(aX, aY, aZ);
- printf(" Pnt2 : %.3lf %.3lf %.3lf\n", aX, aY, aZ);
- }
- printf("\n");
-}
-//=======================================================================
-//function : DumpVertex
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfo::DumpVertex()const
-{
- printf(" *VERTEX\n");
- DumpLocation(myLocation);
-}
-//=======================================================================
-//function : DumpLocation
-//purpose :
-//=======================================================================
- void DumpLocation(const gp_Pnt& aP)
-{
- Standard_Real aX, aY, aZ;
- //
- aP.Coord(aX, aY, aZ);
- printf(" Location : %.3lf %.3lf %.3lf \n", aX, aY, aZ);
-}
-//=======================================================================
-//function : DumpDirection
-//purpose :
-//=======================================================================
- void DumpDirection(const gp_Dir& aD)
-{
- Standard_Real aX, aY, aZ;
- //
- aD.Coord(aX, aY, aZ);
- printf(" Direction: %.3lf %.3lf %.3lf \n", aX, aY, aZ);
-}
-//=======================================================================
-//function : DumpPosition
-//purpose :
-//=======================================================================
-void DumpPosition(const gp_Ax3& aAx3)
-{
- const gp_Dir& aDZ=aAx3.Axis().Direction();
- const gp_Dir& aDX=aAx3.XDirection();
- const gp_Dir& aDY=aAx3.YDirection();
- printf(" Position:\n");
- printf(" Axis: %.3lf %.3lf %.3lf \n", aDZ.X(), aDZ.Y(), aDZ.Z());
- printf(" X : %.3lf %.3lf %.3lf \n", aDX.X(), aDX.Y(), aDX.Z());
- printf(" Y : %.3lf %.3lf %.3lf \n", aDY.X(), aDY.Y(), aDY.Z());
-}
-//=======================================================================
-//function : DumpKindOfBounds
-//purpose :
-//=======================================================================
-void DumpKindOfBounds(const GEOMAlgo_KindOfBounds aKB)
-{
- const char *pStr[]={
- "KB_UNKNOWN",
- "KB_TRIMMED",
- "KB_INFINITE"
- };
- int i;
- //
- i=(Standard_Integer)aKB;
- printf(" KindOfBounds: %s\n", pStr[i]);
-
-}
-//=======================================================================
-//function : DumpKindOfClosed
-//purpose :
-//=======================================================================
-void DumpKindOfClosed(const GEOMAlgo_KindOfClosed aKC)
-{
- const char *pStr[]={
- "KC_UNKNOWN",
- "KC_CLOSED",
- "KC_NOTCLOSED"
- };
- int i;
- //
- i=(Standard_Integer)aKC;
- printf(" KindOfClosed: %s\n", pStr[i]);
-
-}
-//=======================================================================
-//function : DumpKindOfShape
-//purpose :
-//=======================================================================
-void DumpKindOfShape(const GEOMAlgo_KindOfShape aKS)
-{
- const char *pStr[]={
- "KS_UNKNOWN",
- "KS_SPHERE",
- "KS_CYLINDER",
- "KS_BOX",
- "KS_TORUS",
- "KS_CONE",
- "KS_ELLIPSE",
- "KS_PLANE",
- "KS_CIRCLE",
- "KS_LINE",
- "KS_DEGENERATED"
- };
- int i;
- //
- i=(Standard_Integer)aKS;
- printf(" KindOfShape : %s\n", pStr[i]);
-}
-//=======================================================================
-//function : DumpKindOfName
-//purpose :
-//=======================================================================
-void DumpKindOfName(const GEOMAlgo_KindOfName aKS)
-{
- const char *pStr[]={
- "KN_UNKNOWN",
- "KN_SPHERE",
- "KN_CYLINDER",
- "KN_TORUS",
- "KN_CONE",
- "KN_ELLIPSE",
- "KN_CIRCLE",
- "KN_PLANE",
- "KN_LINE",
- "KN_BOX",
- "KN_SEGMENT",
- "KN_ARCCIRCLE",
- "KN_POLYGON",
- "KN_POLYHEDRON",
- "KN_DISKCIRCLE",
- "KN_DISKELLIPSE",
- "KN_RECTANGLE",
- "KN_TRIANGLE",
- "KN_QUADRANGLE",
- "KN_ARCELLIPSE"
- };
- int i;
- //
- i=(Standard_Integer)aKS;
- printf(" KindOfName : %s\n", pStr[i]);
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_ShapeInfo_HeaderFile
-#define _GEOMAlgo_ShapeInfo_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <Standard_Integer.hxx>
-#include <GEOMAlgo_KindOfShape.hxx>
-#include <GEOMAlgo_KindOfName.hxx>
-#include <GEOMAlgo_KindOfBounds.hxx>
-#include <GEOMAlgo_KindOfClosed.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Ax3.hxx>
-#include <Standard_Real.hxx>
-#include <gp_Ax2.hxx>
-
-
-
-//=======================================================================
-//class : GEOMAlgo_ShapeInfo
-//purpose :
-//=======================================================================
-class GEOMAlgo_ShapeInfo
-{
- public:
- Standard_EXPORT
- GEOMAlgo_ShapeInfo();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_ShapeInfo();
-
- Standard_EXPORT
- void Reset() ;
-
- Standard_EXPORT
- void SetType(const TopAbs_ShapeEnum aType) ;
-
- Standard_EXPORT
- TopAbs_ShapeEnum Type() const;
-
- Standard_EXPORT
- void SetNbSubShapes(const TopAbs_ShapeEnum aType,const Standard_Integer aNb) ;
-
- Standard_EXPORT
- Standard_Integer NbSubShapes(const TopAbs_ShapeEnum aType) const;
-
- Standard_EXPORT
- void SetKindOfShape(const GEOMAlgo_KindOfShape aT) ;
-
- Standard_EXPORT
- GEOMAlgo_KindOfShape KindOfShape() const;
-
- Standard_EXPORT
- void SetKindOfName(const GEOMAlgo_KindOfName aT) ;
-
- Standard_EXPORT
- GEOMAlgo_KindOfName KindOfName() const;
-
- Standard_EXPORT
- void SetKindOfBounds(const GEOMAlgo_KindOfBounds aT) ;
-
- Standard_EXPORT
- GEOMAlgo_KindOfBounds KindOfBounds() const;
-
- Standard_EXPORT
- void SetKindOfClosed(const GEOMAlgo_KindOfClosed aT) ;
-
- Standard_EXPORT
- GEOMAlgo_KindOfClosed KindOfClosed() const;
-
- Standard_EXPORT
- void SetLocation(const gp_Pnt& aP) ;
-
- Standard_EXPORT
- const gp_Pnt& Location() const;
-
- Standard_EXPORT
- void SetDirection(const gp_Dir& aD) ;
-
- Standard_EXPORT
- const gp_Dir& Direction() const;
-
- Standard_EXPORT
- void SetPosition(const gp_Ax2& aAx2) ;
-
- Standard_EXPORT
- void SetPosition(const gp_Ax3& aAx3) ;
-
- Standard_EXPORT
- const gp_Ax3& Position() const;
-
- Standard_EXPORT
- void SetPnt1(const gp_Pnt& aP) ;
-
- Standard_EXPORT
- const gp_Pnt& Pnt1() const;
-
- Standard_EXPORT
- void SetPnt2(const gp_Pnt& aP) ;
-
- Standard_EXPORT
- const gp_Pnt& Pnt2() const;
-
- Standard_EXPORT
- void SetRadius1(const Standard_Real aR) ;
-
- Standard_EXPORT
- Standard_Real Radius1() const;
-
- Standard_EXPORT
- void SetRadius2(const Standard_Real aR) ;
-
- Standard_EXPORT
- Standard_Real Radius2() const;
-
- Standard_EXPORT
- void SetLength(const Standard_Real aL) ;
-
- Standard_EXPORT
- Standard_Real Length() const;
-
- Standard_EXPORT
- void SetWidth(const Standard_Real aW) ;
-
- Standard_EXPORT
- Standard_Real Width() const;
-
- Standard_EXPORT
- void SetHeight(const Standard_Real aH) ;
-
- Standard_EXPORT
- Standard_Real Height() const;
-
- Standard_EXPORT
- void Dump() const;
-
- protected:
- Standard_EXPORT
- void DumpVertex() const;
-
- Standard_EXPORT
- void DumpEdge() const;
-
- Standard_EXPORT
- void DumpWire() const;
-
- Standard_EXPORT
- void DumpFace() const;
-
- Standard_EXPORT
- void DumpShell() const;
-
- Standard_EXPORT
- void DumpSolid() const;
-
- Standard_EXPORT
- void DumpCompSolid() const;
-
- Standard_EXPORT
- void DumpCompound() const;
-
-
- TopAbs_ShapeEnum myType;
- Standard_Integer myNbSubShapes[9];
- GEOMAlgo_KindOfShape myKindOfShape;
- GEOMAlgo_KindOfName myKindOfName;
- GEOMAlgo_KindOfBounds myKindOfBounds;
- GEOMAlgo_KindOfClosed myKindOfClosed;
- gp_Pnt myLocation;
- gp_Dir myDirection;
- gp_Ax3 myPosition;
- Standard_Real myRadius1;
- Standard_Real myRadius2;
- Standard_Real myLength;
- Standard_Real myWidth;
- Standard_Real myHeight;
- gp_Pnt myPnt1;
- gp_Pnt myPnt2;
- Standard_Integer myNbTypes;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_ShapeInfoFiller.hxx>
-
-#include <Precision.hxx>
-
-#include <gp_Lin.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
-
-#include <Geom_Curve.hxx>
-#include <GeomAdaptor_Curve.hxx>
-
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS.hxx>
-#include <TopoDS_Edge.hxx>
-
-#include <BRep_Tool.hxx>
-#include <TopExp.hxx>
-
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <gp_Circ.hxx>
-#include <gp_Ax2.hxx>
-#include <gp_Elips.hxx>
-#include <TopoDS_Iterator.hxx>
-#include <TopoDS_Wire.hxx>
-#include <TopExp.hxx>
-#include <Geom_Surface.hxx>
-#include <TopoDS_Face.hxx>
-#include <GeomAdaptor_Surface.hxx>
-#include <gp_Pln.hxx>
-#include <gp_Sphere.hxx>
-#include <gp_Ax3.hxx>
-#include <BRepTools.hxx>
-#include <gp_Cylinder.hxx>
-#include <gp_Cone.hxx>
-#include <gp_Torus.hxx>
-#include <TopoDS_Solid.hxx>
-
-
-
-
-static
- Standard_Boolean IsAllowedType(const GeomAbs_CurveType aCT);
-static
- Standard_Boolean IsAllowedType(const GeomAbs_SurfaceType aST);
-static
- Standard_Integer NbWires(const TopoDS_Face& aF);
-static
- Standard_Integer NbShells(const TopoDS_Solid& aS);
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- GEOMAlgo_ShapeInfoFiller::GEOMAlgo_ShapeInfoFiller()
-:
- GEOMAlgo_Algo()
-{
- myTolerance=0.0001;
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
- GEOMAlgo_ShapeInfoFiller::~GEOMAlgo_ShapeInfoFiller()
-{
-}
-//=======================================================================
-//function : SetTolerance
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::SetTolerance(const Standard_Real aT)
-{
- myTolerance=aT;
-}
-//=======================================================================
-//function : Tolerance
-//purpose :
-//=======================================================================
- Standard_Real GEOMAlgo_ShapeInfoFiller::Tolerance()const
-{
- return myTolerance;
-}
-//=======================================================================
-//function : SetShape
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::SetShape(const TopoDS_Shape& aS)
-{
- myShape=aS;
-}
-//=======================================================================
-//function : Shape
-//purpose :
-//=======================================================================
- const TopoDS_Shape& GEOMAlgo_ShapeInfoFiller::Shape() const
-{
- return myShape;
-}
-//=======================================================================
-//function : Info
-//purpose :
-//=======================================================================
- const GEOMAlgo_ShapeInfo& GEOMAlgo_ShapeInfoFiller::Info() const
-{
- return Info(myShape);
-}
-//=======================================================================
-//function : Info
-//purpose :
-//=======================================================================
- const GEOMAlgo_ShapeInfo& GEOMAlgo_ShapeInfoFiller::Info(const TopoDS_Shape& aS) const
-{
- if (!aS.IsNull()) {
- if (myMapInfo.Contains(aS)) {
- const GEOMAlgo_ShapeInfo& aInfo=myMapInfo.FindFromKey(aS);
- return aInfo;
- }
- }
- return myEmptyInfo;
-}
-
-//=======================================================================
-//function : CheckData
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::CheckData()
-{
- myErrorStatus=0;
- //
- if (myShape.IsNull()) {
- myErrorStatus=10;
- return;
- }
-}
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::Perform()
-{
- myErrorStatus=0;
- //
- myMapInfo.Clear();
- //
- CheckData();
- if (myErrorStatus) {
- return;
- }
- //
- FillShape(myShape);
-}
-//=======================================================================
-//function :FillShape
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillShape(const TopoDS_Shape& aS)
-{
- TopAbs_ShapeEnum aType;
- //
- aType=aS.ShapeType();
- switch(aType) {
- //
- case TopAbs_VERTEX:
- FillVertex(aS);
- break;
- //
- case TopAbs_EDGE:
- FillEdge(aS);
- break;
- //
- case TopAbs_FACE:
- FillFace(aS);
- break;
- //
- case TopAbs_SOLID:
- FillSolid(aS);
- break;
- //
- case TopAbs_WIRE:
- case TopAbs_SHELL:
- case TopAbs_COMPSOLID:
- case TopAbs_COMPOUND:
- FillContainer(aS);
- break;
- //
- default:
- break;
- }
-}
-//=======================================================================
-//function :FillSubShapes
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillSubShapes(const TopoDS_Shape& aS)
-{
- TopoDS_Iterator aIt;
- //
- aIt.Initialize(aS);
- for (; aIt.More(); aIt.Next()){
- const TopoDS_Shape& aSx=aIt.Value();
- FillShape(aSx);
- }
-}
-//=======================================================================
-//function : FillContainer
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillContainer(const TopoDS_Shape& aS)
-{
- myErrorStatus=0;
- //
- Standard_Boolean bIsClosed;
- TopAbs_ShapeEnum aType;
- GEOMAlgo_KindOfClosed aKC;
- //
- aType=aS.ShapeType();
- //----------------------------------------------------
- if (myMapInfo.Contains(aS)) {
- return;
- }
- else {
- GEOMAlgo_ShapeInfo aInfoX;
- myMapInfo.Add(aS, aInfoX);
- }
- GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aS);
- //----------------------------------------------------
- aInfo.SetType(aType);
- FillNbSubShapes(aS, aInfo);
- //
- if (aType==TopAbs_SHELL) {
- bIsClosed=BRep_Tool::IsClosed(aS);
- aKC=(bIsClosed) ? GEOMAlgo_KC_CLOSED :GEOMAlgo_KC_NOTCLOSED;
- aInfo.SetKindOfClosed(aKC);
- }
- else if (aType==TopAbs_WIRE) {
- TopoDS_Wire aW;
- TopoDS_Vertex aV1, aV2;
- //
- aW=TopoDS::Wire(aS);
- TopExp::Vertices(aW, aV1, aV2);
- //
- bIsClosed=aV1.IsSame(aV2);
- aKC=(bIsClosed) ? GEOMAlgo_KC_CLOSED :GEOMAlgo_KC_NOTCLOSED;
- aInfo.SetKindOfClosed(aKC);
- }
- //
- FillSubShapes(aS);
-}
-//=======================================================================
-//function : FillSolid
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillSolid(const TopoDS_Shape& aS)
-{
- Standard_Integer aNbShells;
- TopoDS_Solid aSd;
- //
- myErrorStatus=0;
- //----------------------------------------------------
- if (myMapInfo.Contains(aS)) {
- return;
- }
- else {
- GEOMAlgo_ShapeInfo aInfoX;
- myMapInfo.Add(aS, aInfoX);
- }
- GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aS);
- //----------------------------------------------------
- aInfo.SetType(TopAbs_SOLID);
- FillNbSubShapes(aS, aInfo);
- FillSubShapes(aS);
- //
- aSd=TopoDS::Solid(aS);
- //
- aNbShells=NbShells(aSd);
- if (aNbShells>1) {
- return;
- }
- //
- FillDetails(aSd);
-}
-//=======================================================================
-//function :FillFace
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillFace(const TopoDS_Shape& aS)
-{
- myErrorStatus=0;
- //
- Standard_Boolean bIsAllowedType;
- Standard_Integer aNbWires;//, iRet
- Standard_Boolean bInf, bInfU1, bInfU2, bInfV1, bInfV2;
- Standard_Real aUMin, aUMax, aVMin, aVMax, aR1, aR2;
- gp_Pnt aP0;
- gp_Dir aDN;
- gp_Ax3 aAx3;
- GeomAbs_SurfaceType aST;
- Handle(Geom_Surface) aSurf;
- TopoDS_Face aF;
- //GEOMAlgo_KindOfName aKindOfName;
- //----------------------------------------------------
- if (myMapInfo.Contains(aS)) {
- return;
- }
- else {
- GEOMAlgo_ShapeInfo aInfoX;
- myMapInfo.Add(aS, aInfoX);
- }
- GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aS);
- //----------------------------------------------------
- aInfo.SetType(TopAbs_FACE);
- //
- FillNbSubShapes(aS, aInfo);
- //
- FillSubShapes(aS);
- //
- aF=TopoDS::Face(aS);
- //
- aNbWires=NbWires(aF);
- //
- aSurf=BRep_Tool::Surface(aF);
- GeomAdaptor_Surface aGAS(aSurf);
- aST=aGAS.GetType();
- bIsAllowedType=IsAllowedType(aST);
- if (!bIsAllowedType) {
- return;
- }
- //
- // 1. Plane
- if (aST==GeomAbs_Plane) {
- gp_Pln aPln;
- //
- aPln=aGAS.Plane();
- aP0=aPln.Location();
- aAx3=aPln.Position();
- //
- aInfo.SetKindOfShape(GEOMAlgo_KS_PLANE);
- aInfo.SetKindOfClosed(GEOMAlgo_KC_NOTCLOSED);
- aInfo.SetLocation(aP0);
- aInfo.SetPosition(aAx3);
- //
- if (aNbWires>1) return;
- //
- //aSurf->Bounds(aUMin, aUMax, aVMin, aVMax);
- BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax);
- bInfU1=Precision::IsNegativeInfinite(aUMin);
- bInfU2=Precision::IsPositiveInfinite(aUMax);
- bInfV1=Precision::IsNegativeInfinite(aVMin);
- bInfV2=Precision::IsPositiveInfinite(aVMax);
- //
- bInf=(bInfU1 || bInfU2 || bInfV1 || bInfV2);
- if (bInf) {
- aInfo.SetKindOfBounds(GEOMAlgo_KB_INFINITE);
- }
- else {
- aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
- }
- //
- FillDetails(aF, aPln);
- }// if (aCT==GeomAbs_Line) {
- //
- // 2. Sphere
- else if (aST==GeomAbs_Sphere) {
- gp_Sphere aSphere;
- //
- aSphere=aGAS.Sphere();
- aP0=aSphere.Location();
- aAx3=aSphere.Position();
- aR1=aSphere.Radius();
- //
- aInfo.SetKindOfShape(GEOMAlgo_KS_SPHERE);
- aInfo.SetLocation(aP0);
- aInfo.SetPosition(aAx3);
- aInfo.SetRadius1(aR1);
- //
- if (aNbWires>1) return;
- //
- aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
- aInfo.SetKindOfClosed(GEOMAlgo_KC_CLOSED);
- //
- FillDetails(aF, aSphere);
- }// else if (aST==GeomAbs_Sphere) {
- //
- // 3. Cylinder
- else if (aST==GeomAbs_Cylinder) {
- gp_Cylinder aCyl;
- //
- aCyl=aGAS.Cylinder();
- aP0=aCyl.Location();
- aAx3=aCyl.Position();
- aR1=aCyl.Radius();
- //
- aInfo.SetKindOfShape(GEOMAlgo_KS_CYLINDER);
- aInfo.SetLocation(aP0);
- aInfo.SetPosition(aAx3);
- aInfo.SetRadius1(aR1);
- //
- if (aNbWires>1) return;
- //
- BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax);
- bInfU1=Precision::IsNegativeInfinite(aUMin);
- bInfU2=Precision::IsPositiveInfinite(aUMax);
- bInfV1=Precision::IsNegativeInfinite(aVMin);
- bInfV2=Precision::IsPositiveInfinite(aVMax);
- //
- bInf=(bInfU1 || bInfU2 || bInfV1 || bInfV2);
- if (bInf) {
- aInfo.SetKindOfBounds(GEOMAlgo_KB_INFINITE);
- }
- else {
- aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
- }
- FillDetails(aF, aCyl);
- }
- //
- // 4. Cone
- else if (aST==GeomAbs_Cone) {
- gp_Cone aCone;
- //
- aCone=aGAS.Cone();
- aP0=aCone.Location();
- aAx3=aCone.Position();
- //aR1=aCyl.Radius();
- //
- aInfo.SetKindOfShape(GEOMAlgo_KS_CONE);
- aInfo.SetLocation(aP0);
- aInfo.SetPosition(aAx3);
- //aInfo.SetRadius1(aR1);
- //
- if (aNbWires>1) return;
- //
- BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax);
- bInfU1=Precision::IsNegativeInfinite(aUMin);
- bInfU2=Precision::IsPositiveInfinite(aUMax);
- bInfV1=Precision::IsNegativeInfinite(aVMin);
- bInfV2=Precision::IsPositiveInfinite(aVMax);
- //
- bInf=(bInfU1 || bInfU2 || bInfV1 || bInfV2);
- if (bInf) {
- aInfo.SetKindOfBounds(GEOMAlgo_KB_INFINITE);
- }
- else {
- aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
- }
- FillDetails(aF, aCone);
- }
- //
- // 5. Torus
- else if (aST==GeomAbs_Torus) {
- gp_Torus aTorus;
- //
- aTorus=aGAS.Torus();
- aP0=aTorus.Location();
- aAx3=aTorus.Position();
- aR1=aTorus.MajorRadius();
- aR2=aTorus.MinorRadius();
- //
- aInfo.SetKindOfShape(GEOMAlgo_KS_TORUS);
- aInfo.SetLocation(aP0);
- aInfo.SetPosition(aAx3);
- aInfo.SetRadius1(aR1);
- aInfo.SetRadius2(aR2);
- //
- if (aNbWires>1) return;
- //
- aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
- //
- FillDetails(aF, aTorus);
- }
-}
-//=======================================================================
-//function :FillEdge
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillEdge(const TopoDS_Shape& aS)
-{
- myErrorStatus=0;
- //
- Standard_Boolean bDegenerated, bIsAllowedType;
- Standard_Integer aNbV;
- Standard_Real aR1, aR2;
- gp_Pnt aP, aP1, aP2, aPc;
- gp_Dir aD;
- gp_Ax2 aAx2;
- Standard_Real aT1, aT2;
- GeomAbs_CurveType aCT;
- Handle(Geom_Curve) aC3D;
- TopoDS_Edge aE;
- //----------------------------------------------------
- if (myMapInfo.Contains(aS)) {
- return;
- }
- else {
- GEOMAlgo_ShapeInfo aInfoX;
- myMapInfo.Add(aS, aInfoX);
- }
- GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aS);
- //----------------------------------------------------
- aInfo.SetType(TopAbs_EDGE);
- //
- FillNbSubShapes(aS, aInfo);
- //
- aE=TopoDS::Edge(aS);
- //
- bDegenerated=BRep_Tool::Degenerated(aE);
- if (bDegenerated) {
- aInfo.SetKindOfShape(GEOMAlgo_KS_DEGENERATED);
- FillSubShapes(aS);
- return;
- }
- //
- aC3D=BRep_Tool::Curve(aE, aT1, aT2);
- GeomAdaptor_Curve aGAC(aC3D);
- aCT=aGAC.GetType();
- bIsAllowedType=IsAllowedType(aCT);
- if (!bIsAllowedType) {
- FillSubShapes(aS);
- return;
- }
- // Line
- if (aCT==GeomAbs_Line) {
- Standard_Boolean bInf1, bInf2;
- Standard_Real aLength;
- gp_Lin aLin;
- gp_XYZ aXYZ1, aXYZ2, aXYZc;
- //
- aLin=aGAC.Line();
- aP=aLin.Location();
- aD=aLin.Direction();
- //
- aInfo.SetKindOfShape(GEOMAlgo_KS_LINE);
- aInfo.SetKindOfClosed(GEOMAlgo_KC_NOTCLOSED);
- aInfo.SetLocation(aP);
- aInfo.SetDirection(aD);
- //
- bInf1=Precision::IsNegativeInfinite(aT1);
- bInf2=Precision::IsPositiveInfinite(aT2);
- if (bInf1||bInf2) {
- aInfo.SetKindOfBounds(GEOMAlgo_KB_INFINITE);
- aInfo.SetKindOfName(GEOMAlgo_KN_LINE);
- }
- else {
- aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
- aInfo.SetKindOfName(GEOMAlgo_KN_SEGMENT);
- aGAC.D0(aT1, aP1);
- aGAC.D0(aT2, aP2);
- aInfo.SetPnt1(aP1);
- aInfo.SetPnt2(aP2);
- //
- aLength=aP1.Distance(aP2);
- aXYZ1=aP1.XYZ();
- aXYZ2=aP2.XYZ();
- aXYZc=aXYZ1+aXYZ2;
- aXYZc.Multiply(0.5);
- //
- aPc.SetXYZ(aXYZc);
- gp_Vec aVec(aPc, aP2);
- gp_Dir aDir(aVec);
- //
- aInfo.SetLocation(aPc);
- aInfo.SetDirection(aDir);
- aInfo.SetLength(aLength);
- }
- }// if (aCT==GeomAbs_Line) {
- //
- // Circle
- else if (aCT==GeomAbs_Circle) {
- gp_Circ aCirc;
- //
- aCirc=aGAC.Circle();
- aP=aCirc.Location();
- aAx2=aCirc.Position();
- aR1=aCirc.Radius();
- //
- aInfo.SetKindOfShape(GEOMAlgo_KS_CIRCLE);
- aInfo.SetLocation(aP);
- aInfo.SetPosition(aAx2);
- aInfo.SetRadius1(aR1);
- //
- aNbV=aInfo.NbSubShapes(TopAbs_VERTEX);
- if (!aNbV) {
- myErrorStatus=11; // circle edge without vertices
- return;
- }
- aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
- aGAC.D0(aT1, aP1);
- aGAC.D0(aT2, aP2);
- aInfo.SetPnt1(aP1);
- aInfo.SetPnt2(aP2);
- //
- if (aNbV==1) {
- aInfo.SetKindOfClosed(GEOMAlgo_KC_CLOSED);
- aInfo.SetKindOfName(GEOMAlgo_KN_CIRCLE);
- }
- else {
- aInfo.SetKindOfClosed(GEOMAlgo_KC_NOTCLOSED);
- aInfo.SetKindOfName(GEOMAlgo_KN_ARCCIRCLE);
- //
- gp_Vec aVecX(aP, aP1);
- gp_Dir aDirX(aVecX);
- gp_Ax2 aAx2new(aP, aAx2.Direction(), aDirX);
- aInfo.SetPosition(aAx2new);
- }
- }// else if (aCT==GeomAbs_Circle) {
- //
- // Ellipse
- else if (aCT==GeomAbs_Ellipse) {
- gp_Elips aElips;
- //
- aElips=aGAC.Ellipse();
- aP=aElips.Location();
- aAx2=aElips.Position();
- aR1=aElips.MajorRadius();
- aR2=aElips.MinorRadius();
- //
- aInfo.SetKindOfShape(GEOMAlgo_KS_ELLIPSE);
- aInfo.SetLocation(aP);
- aInfo.SetPosition(aAx2);
- aInfo.SetRadius1(aR1);
- aInfo.SetRadius2(aR2);
- //
- aNbV=aInfo.NbSubShapes(TopAbs_VERTEX);
- if (!aNbV) {
- myErrorStatus=11; // ellipse edge without vertices
- return;
- }
- aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
- aGAC.D0(aT1, aP1);
- aGAC.D0(aT2, aP2);
- aInfo.SetPnt1(aP1);
- aInfo.SetPnt2(aP2);
- //
- if (aNbV==1) {
- aInfo.SetKindOfClosed(GEOMAlgo_KC_CLOSED);
- aInfo.SetKindOfName(GEOMAlgo_KN_ELLIPSE);
- }
- else {
- aInfo.SetKindOfClosed(GEOMAlgo_KC_NOTCLOSED);
- aInfo.SetKindOfName(GEOMAlgo_KN_ARCELLIPSE);
- //
- gp_Vec aVecX(aP, aP1);
- gp_Dir aDirX(aVecX);
- gp_Ax2 aAx2new(aP, aAx2.Direction(), aDirX);
- aInfo.SetPosition(aAx2new);
- }
- }// else if (aCT==GeomAbs_Ellipse) {
- //
- FillSubShapes(aS);
-}
-//=======================================================================
-//function :FillVertex
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillVertex(const TopoDS_Shape& aS)
-{
- myErrorStatus=0;
- //
- gp_Pnt aP;
- TopoDS_Vertex aV;
- //
- if (myMapInfo.Contains(aS)) {
- return;
- }
- else {
- GEOMAlgo_ShapeInfo aInfoX;
- myMapInfo.Add(aS, aInfoX);
- }
- GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aS);
- //
- aV=TopoDS::Vertex(aS);
- aP=BRep_Tool::Pnt(aV);
- //
- aInfo.SetType(TopAbs_VERTEX);
- aInfo.SetLocation(aP);
- myMapInfo.Add(aS, aInfo);
-}
-//=======================================================================
-//function : FillNbSubshapes
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillNbSubShapes(const TopoDS_Shape& aS,
- GEOMAlgo_ShapeInfo& aInfo)
-{
- myErrorStatus=0;
- //
- Standard_Integer i, aNb, aNbS;
- TopTools_IndexedMapOfShape aM;
- TopAbs_ShapeEnum aST;
- TopAbs_ShapeEnum aTypes[]= {
- //TopAbs_FACE, TopAbs_EDGE, TopAbs_VERTEX
- TopAbs_COMPOUND,
- TopAbs_COMPSOLID,
- TopAbs_SOLID,
- TopAbs_SHELL,
- TopAbs_FACE,
- TopAbs_WIRE,
- TopAbs_EDGE,
- TopAbs_VERTEX
- };
-
- //
- aST=aS.ShapeType();
- aNb=sizeof(aTypes)/sizeof(aTypes[0]);
- for (i=0; i<aNb; ++i) {
- if (aTypes[i]==aST) {
- continue;
- }
- aM.Clear();
- TopExp::MapShapes(aS, aTypes[i], aM);
- aNbS=aM.Extent();
- aInfo.SetNbSubShapes(aTypes[i], aNbS);
- }
-}
-//=======================================================================
-//function :NbShells
-//purpose :
-//=======================================================================
-Standard_Integer NbShells(const TopoDS_Solid& aSd)
-{
- Standard_Integer iCnt;
- TopoDS_Iterator aIt;
- //
- iCnt=0;
- //
- aIt.Initialize(aSd);
- for (; aIt.More(); aIt.Next()){
- //const TopoDS_Shape& aSh=aIt.Value();
- ++iCnt;
- }
- return iCnt;
-}
-//=======================================================================
-//function : NbWires
-//purpose :
-//=======================================================================
-Standard_Integer NbWires(const TopoDS_Face& aF)
-{
- Standard_Integer iCnt;
- TopoDS_Iterator aIt;
- //
- iCnt=0;
- //
- aIt.Initialize(aF);
- for (; aIt.More(); aIt.Next()){
- //const TopoDS_Shape& aW=aIt.Value();
- ++iCnt;
- }
- return iCnt;
-}
-//=======================================================================
-//function : IsAllowedType
-//purpose :
-//=======================================================================
-Standard_Boolean IsAllowedType(const GeomAbs_CurveType aCT)
-{
- Standard_Boolean bRet;
- Standard_Integer i, aNb;
- GeomAbs_CurveType aTypes[]={
- GeomAbs_Line, GeomAbs_Circle, GeomAbs_Ellipse
- };
- //
- bRet=Standard_False;
- aNb=sizeof(aTypes)/sizeof(aTypes[0]);
- for (i=0; i<aNb && !bRet; ++i) {
- bRet=(aCT==aTypes[i]);
- }
- //
- return bRet;
-}
-//=======================================================================
-//function : IsAllowedType
-//purpose :
-//=======================================================================
-Standard_Boolean IsAllowedType(const GeomAbs_SurfaceType aST)
-{
- Standard_Boolean bRet;
- Standard_Integer i, aNb;
- GeomAbs_SurfaceType aTypes[]={
- GeomAbs_Plane, GeomAbs_Cylinder,
- GeomAbs_Cone, GeomAbs_Sphere,
- GeomAbs_Torus
- };
- //
- bRet=Standard_False;
- aNb=sizeof(aTypes)/sizeof(aTypes[0]);
- for (i=0; i<aNb && !bRet; ++i) {
- bRet=(aST==aTypes[i]);
- }
- //
- return bRet;
-}
-//
-// myErrorStatus
-//
-// 0 - Ok
-// 1 - The object is just initialized
-//
-// 10 - Null shape
-// 11 - circle/ellipse edge without vertices
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_ShapeInfoFiller_HeaderFile
-#define _GEOMAlgo_ShapeInfoFiller_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <TopoDS_Shape.hxx>
-#include <GEOMAlgo_ShapeInfo.hxx>
-#include <GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx>
-#include <Standard_Real.hxx>
-#include <GEOMAlgo_Algo.hxx>
-#include <TopoDS_Face.hxx>
-#include <gp_Pln.hxx>
-#include <gp_Sphere.hxx>
-#include <gp_Cylinder.hxx>
-#include <gp_Cone.hxx>
-#include <gp_Torus.hxx>
-#include <TopoDS_Solid.hxx>
-
-//=======================================================================
-//class : GEOMAlgo_ShapeInfoFiller
-//purpose :
-//=======================================================================
-class GEOMAlgo_ShapeInfoFiller : public GEOMAlgo_Algo
-{
- public:
- Standard_EXPORT
- GEOMAlgo_ShapeInfoFiller();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_ShapeInfoFiller();
-
- Standard_EXPORT
- void SetShape(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- const TopoDS_Shape& Shape() const;
-
- Standard_EXPORT
- void SetTolerance(const Standard_Real aT) ;
-
- Standard_EXPORT
- Standard_Real Tolerance() const;
-
- Standard_EXPORT
- const GEOMAlgo_ShapeInfo& Info() const;
-
- Standard_EXPORT
- const GEOMAlgo_ShapeInfo& Info(const TopoDS_Shape& aS) const;
-
- Standard_EXPORT
- virtual void Perform() ;
-
- protected:
- Standard_EXPORT
- virtual void CheckData() ;
-
- Standard_EXPORT
- void FillNbSubShapes(const TopoDS_Shape& aS,GEOMAlgo_ShapeInfo& aInfo) ;
-
- Standard_EXPORT
- void FillSubShapes(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- void FillShape(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- void FillVertex(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- void FillEdge(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- void FillFace(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- void FillSolid(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- void FillContainer(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- void FillDetails(const TopoDS_Face& aF,const gp_Pln& aPln) ;
-
- Standard_EXPORT
- void FillDetails(const TopoDS_Face& aF,const gp_Sphere& aSph) ;
-
- Standard_EXPORT
- void FillDetails(const TopoDS_Face& aF,const gp_Cylinder& aCyl) ;
-
- Standard_EXPORT
- void FillDetails(const TopoDS_Face& aF,const gp_Cone& aCone) ;
-
- Standard_EXPORT
- void FillDetails(const TopoDS_Face& aF,const gp_Torus& aTorus) ;
-
- Standard_EXPORT
- void FillDetails(const TopoDS_Solid& aS) ;
-
-
- TopoDS_Shape myShape;
- GEOMAlgo_ShapeInfo myEmptyInfo;
- GEOMAlgo_IndexedDataMapOfShapeShapeInfo myMapInfo;
- Standard_Real myTolerance;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_ShapeInfoFiller.hxx>
-
-#include <Precision.hxx>
-
-#include <gp_Lin.hxx>
-#include <gp_XYZ.hxx>
-#include <gp_Ax1.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Vec.hxx>
-#include <gp_Ax2.hxx>
-#include <gp_Ax3.hxx>
-
-#include <ElCLib.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Wire.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Iterator.hxx>
-
-#include <BRep_Tool.hxx>
-
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <BRepTools_WireExplorer.hxx>
-
-#include <GEOMAlgo_ShapeInfo.hxx>
-#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
-
-//=======================================================================
-//function : FillDetails
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Solid& aSd)
-{
- Standard_Integer i, aNbF, aNbCyl, aNbCon, aNbPgn, aNbRct, aNbCrc, aNbX;
- TopoDS_Shape aFCyl, aFCon;
- TopTools_IndexedMapOfShape aMF;
- GEOMAlgo_KindOfName aKNF;
- //
- GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aSd);
- aInfo.SetKindOfName(GEOMAlgo_KN_UNKNOWN);
- //
- TopExp::MapShapes(aSd, TopAbs_FACE, aMF);
- //
- aNbF=aMF.Extent();
- if (!aNbF) {
- return;
- }
- //
- if (aNbF==1) {
- const TopoDS_Shape& aF=aMF(1);
- GEOMAlgo_ShapeInfo& aInfoF=myMapInfo.ChangeFromKey(aF);
- aKNF=aInfoF.KindOfName(); // mb: sphere, torus
- if (aKNF==GEOMAlgo_KN_SPHERE ||
- aKNF==GEOMAlgo_KN_TORUS) {
- aInfo.SetKindOfName(aKNF);
- aInfo.SetLocation(aInfoF.Location());
- aInfo.SetPosition(aInfoF.Position());
- aInfo.SetRadius1(aInfoF.Radius1());
- if(aKNF==GEOMAlgo_KN_TORUS) {
- aInfo.SetRadius2(aInfoF.Radius2());
- }
- return;
- }
- }
- //
- aNbCyl=0;
- aNbCon=0;
- aNbPgn=0;
- aNbRct=0;
- aNbCrc=0;
- for (i=1; i<=aNbF; ++i) {
- const TopoDS_Shape& aF=aMF(i);
- GEOMAlgo_ShapeInfo& aInfoF=myMapInfo.ChangeFromKey(aF);
- aKNF=aInfoF.KindOfName();
- if (aKNF==GEOMAlgo_KN_CYLINDER) {
- aFCyl=aF;
- ++aNbCyl;
- }
- else if (aKNF==GEOMAlgo_KN_CONE) {
- aFCon=aF;
- ++aNbCon;
- }
- else if (aKNF==GEOMAlgo_KN_DISKCIRCLE) {
- ++aNbCrc;
- }
- else if (aKNF==GEOMAlgo_KN_POLYGON ||
- aKNF==GEOMAlgo_KN_TRIANGLE ||
- aKNF==GEOMAlgo_KN_QUADRANGLE) {
- ++aNbPgn;
- }
- else if (aKNF==GEOMAlgo_KN_RECTANGLE) {
- ++aNbPgn;
- ++aNbRct;
- }
- }
- //
- aNbX=aNbCyl+aNbCrc;
- if (aNbCyl==1 && aNbCrc==2 && aNbX==aNbF) {
- // cylinder (as they understand it)
- GEOMAlgo_ShapeInfo& aInfoF=myMapInfo.ChangeFromKey(aFCyl);
- aKNF=aInfoF.KindOfName();
- aInfo.SetKindOfName(aKNF);
- aInfo.SetLocation(aInfoF.Location());
- aInfo.SetPosition(aInfoF.Position());
- aInfo.SetRadius1(aInfoF.Radius1());
- aInfo.SetHeight(aInfoF.Height());
- return;
- }
- //
- aNbX=aNbCon+aNbCrc;
- if (aNbCon==1 && (aNbCrc==1 || aNbCrc==2) && aNbX==aNbF) {
- // cone
- GEOMAlgo_ShapeInfo& aInfoF=myMapInfo.ChangeFromKey(aFCon);
- aKNF=aInfoF.KindOfName();
- aInfo.SetKindOfName(aKNF);
- aInfo.SetLocation(aInfoF.Location());
- aInfo.SetPosition(aInfoF.Position());
- aInfo.SetRadius1(aInfoF.Radius1());
- aInfo.SetRadius2(aInfoF.Radius2());
- aInfo.SetHeight(aInfoF.Height());
- return;
- }
- //
- //modified by NIZNHY-PKV Wed Jan 11 11:04:31 2012f
- if (aNbF!=aNbPgn) {
- return;// -> GEOMAlgo_KN_UNKNOWN
- }
- //modified by NIZNHY-PKV Wed Jan 11 11:04:37 2012t
- if (aNbPgn!=6) {
- aInfo.SetKindOfName(GEOMAlgo_KN_POLYHEDRON);
- return;
- }
- // aNbPgn==6
- if (aNbPgn!=aNbRct) {
- aInfo.SetKindOfName(GEOMAlgo_KN_POLYHEDRON);
- return;
- }
- //===================================================
- // aNbRct=6;
- // box
- Standard_Integer j, aNbFi, aNbV, iMax, iMin, iMid;
- Standard_Real aDot, aLength, aWidth, aHeight, aDist[3];
- Standard_Real aDistMin, aDistMax;
- gp_Pnt aPi, aPc;
- gp_Dir aDir[3];
- gp_XYZ aXYZc;
- TColStd_IndexedMapOfInteger aMp;
- TopTools_IndexedMapOfShape aMV, aMFi;
- //
- // barycenter aPc
- TopExp::MapShapes(aSd, TopAbs_VERTEX, aMV);
- aNbV=aMV.Extent();
- if (aNbV!=8) {
- return;
- }
- //
- aXYZc.SetCoord(0.,0.,0.);
- for (i=1; i<=aNbV; ++i) {
- const TopoDS_Vertex& aVi=TopoDS::Vertex(aMV(i));
- aPi=BRep_Tool::Pnt(aVi);
- const gp_XYZ& aXYZ=aPi.XYZ();
- aXYZc=aXYZc+aXYZ;
- }
- //
- aXYZc.Divide(aNbV);
- aPc.SetXYZ(aXYZc);
- //
- // 3 faces
- for (i=1; i<=aNbF; ++i) {
- if (aMp.Contains(i)) {
- continue;
- }
- //
- const TopoDS_Shape& aFi=aMF(i);
- const GEOMAlgo_ShapeInfo& aIFi=myMapInfo.FindFromKey(aFi);
- const gp_Dir& aDNi=aIFi.Position().Direction();
- //
- for (j=i+1; j<=aNbF; ++j) {
- if (aMp.Contains(j)) {
- continue;
- }
- //
- const TopoDS_Shape& aFj=aMF(j);
- const GEOMAlgo_ShapeInfo& aIFj=myMapInfo.FindFromKey(aFj);
- const gp_Dir& aDNj=aIFj.Position().Direction();
- //
- aDot=aDNi*aDNj;
- if (fabs(1.-aDot)<0.0001) {
- aMp.Add(i);
- aMp.Add(j);
- aMFi.Add(aFi);
- break;
- }
- //
- }
- }
- aNbFi=aMFi.Extent();
- if (aNbFi!=3) {
- return;
- }
- //
- aDistMin=1.e15;
- aDistMax=-aDistMin;
- for (i=0; i<aNbFi; ++i) {
- const TopoDS_Shape& aFi=aMFi(i+1);
- const GEOMAlgo_ShapeInfo& aIFi=myMapInfo.FindFromKey(aFi);
- aPi=aIFi.Location();
- aDist[i]=aPc.Distance(aPi);
- if (aDist[i]>aDistMax) {
- aDistMax=aDist[i];
- iMax=i;
- }
- if (aDist[i]<aDistMin) {
- aDistMin=aDist[i];
- iMin=i;
- }
- gp_Vec aVi(aPc, aPi);
- gp_Dir aDi(aVi);
- aDir[i]=aDi;
- }
- //
- if (iMax==iMin) {
- iMax=0;
- iMin=1;
- }
- iMid=3-iMax-iMin;
- //
- aLength=2.*aDist[iMax];
- aWidth=2.*aDist[iMid];
- aHeight=2.*aDist[iMin];
- //
- gp_Ax2 aAx2(aPc, aDir[iMin], aDir[iMax]);
- gp_Ax3 aAx3(aAx2);
- //
- aInfo.SetKindOfName(GEOMAlgo_KN_BOX);
- aInfo.SetLocation(aPc);
- aInfo.SetLength(aLength);
- aInfo.SetWidth(aWidth);
- aInfo.SetHeight(aHeight);
- aInfo.SetPosition(aAx3);
-}
-//=======================================================================
-//function : FillDetails
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF,
- const gp_Pln& aPln)
-{
- Standard_Integer aNbV, aNbE, i, j;
- Standard_Real aDot, aD0, aD1, aLength, aWidth;
- gp_Dir aDx[4], aDX;
- gp_Pnt aPx[4], aP, aPc;
- gp_XYZ aXYZc;
- TopExp_Explorer aExp;
- TopoDS_Shape aE;
- TopoDS_Wire aW;
- TopoDS_Edge aEx;
- TopoDS_Iterator aIt;
- TopTools_IndexedMapOfShape aMV;
- BRepTools_WireExplorer aWExp;
- GEOMAlgo_KindOfName aKN, aKNE;
- GEOMAlgo_KindOfShape aKS;
- //
- GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aF);
- aKN=GEOMAlgo_KN_UNKNOWN;
- aInfo.SetKindOfName(GEOMAlgo_KN_UNKNOWN);
- //
- aKS=aInfo.KindOfShape();
- if (aKS!=GEOMAlgo_KS_PLANE) {
- return;
- }
- //
- if (aInfo.KindOfBounds()==GEOMAlgo_KB_INFINITE) {
- aInfo.SetKindOfName(GEOMAlgo_KN_PLANE);
- return;
- }
- //
- aNbV=aInfo.NbSubShapes(TopAbs_VERTEX);
- aNbE=aInfo.NbSubShapes(TopAbs_EDGE);
- //
- // 1. may be it is circle/ellipse
- if (aNbV==1 && aNbE==1) {
- aExp.Init(aF, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- aE=aExp.Current();
- break;
- }
- //
- const GEOMAlgo_ShapeInfo& aInfoE=myMapInfo.FindFromKey(aE);
- aKNE=aInfoE.KindOfName();
- if (aKNE==GEOMAlgo_KN_CIRCLE) {
- aKN=GEOMAlgo_KN_DISKCIRCLE;
- aInfo.SetKindOfName(aKN);
- aInfo.SetRadius1(aInfoE.Radius1());
- aInfo.SetLocation(aInfoE.Location());
- aInfo.SetPosition(aInfoE.Position());
- }
- if (aKNE==GEOMAlgo_KN_ELLIPSE) {
- aKN=GEOMAlgo_KN_DISKELLIPSE;
- aInfo.SetKindOfName(aKN);
- aInfo.SetRadius1(aInfoE.Radius1());
- aInfo.SetRadius2(aInfoE.Radius2());
- aInfo.SetLocation(aInfoE.Location());
- aInfo.SetPosition(aInfoE.Position());
- }
- }
- //
- // 2. may be it is rectangle
- else {
- aExp.Init(aF, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- aE=aExp.Current();
- const GEOMAlgo_ShapeInfo& aInfoE=myMapInfo.FindFromKey(aE);
- aKNE=aInfoE.KindOfName();
- if (aKNE!=GEOMAlgo_KN_SEGMENT) {
- return;
- }
- }
- //
- aInfo.SetKindOfName(GEOMAlgo_KN_POLYGON);
- //
- if (aNbV==3 && aNbE==3) {
- aInfo.SetKindOfName(GEOMAlgo_KN_TRIANGLE);
- //
- aXYZc.SetCoord(0.,0.,0.);
- TopExp::MapShapes(aF, TopAbs_VERTEX, aMV);
- for (i=1; i<=aNbV; ++i) {
- const TopoDS_Vertex& aV=TopoDS::Vertex(aMV(i));
- aP=BRep_Tool::Pnt(aV);
- const gp_XYZ& aXYZ=aP.XYZ();
- aXYZc=aXYZc+aXYZ;
- aPx[i-1]=aP;
- }
- aXYZc.Divide(3.);
- //
- aPc.SetXYZ(aXYZc);
- gp_Vec aVX(aPc, aPx[0]);
- aVX.Normalize();
- aDX.SetXYZ(aVX.XYZ());
- const gp_Dir& aDZ=aPln.Axis().Direction();
- //
- gp_Ax2 aAx2(aPc, aDZ, aDX);
- gp_Ax3 aAx3(aAx2);
- //
- aInfo.SetLocation(aPc);
- aInfo.SetPosition(aAx3);
- //
- return;
- }
- //
- if (!(aNbV==4 && aNbE==4)) {
- return;
- }
- //
- // aNbV==4 && aNbE==4 and all edges are segments
- aIt.Initialize(aF);
- for (; aIt.More(); aIt.Next()){
- aW=TopoDS::Wire(aIt.Value());
- break;
- }
- //
- aWExp.Init(aW, aF);
- for (i=0; aWExp.More(); aWExp.Next(), ++i) {
- aEx=aWExp.Current();
- const GEOMAlgo_ShapeInfo& aInfoEx=myMapInfo.FindFromKey(aEx);
- aDx[i]=aInfoEx.Direction();
- aPx[i]=aInfoEx.Location();
- }
- //
- for (i=0; i<4; ++i) {
- j=(i==3) ? 0 : i+1;
- aDot=aDx[i]*aDx[j];
- if (fabs (aDot) > myTolerance) {
- aInfo.SetKindOfName(GEOMAlgo_KN_QUADRANGLE);
- return;
- }
- }
- //
- // rectangle
- aInfo.SetKindOfName(GEOMAlgo_KN_RECTANGLE);
- //
- // shift location to the center and calc. sizes
- aXYZc.SetCoord(0.,0.,0.);
- TopExp::MapShapes(aF, TopAbs_VERTEX, aMV);
- for (i=1; i<=aNbV; ++i) {
- const TopoDS_Vertex& aV=TopoDS::Vertex(aMV(i));
- aP=BRep_Tool::Pnt(aV);
- const gp_XYZ& aXYZ=aP.XYZ();
- aXYZc=aXYZc+aXYZ;
- }
- //
- // Location : aPc in center of rectangle
- // Position : 0z is plane normal
- // 0x is along length
- //
- aXYZc.Divide(4.);
- aPc.SetXYZ(aXYZc);
- //
- gp_Lin aL0(aPx[0], aDx[0]);
- gp_Lin aL1(aPx[1], aDx[1]);
- //
- aD0=aL0.Distance(aPc);
- aD1=aL1.Distance(aPc);
- //
- aLength=aD0;
- aWidth =aD1;
- aDX=aL1.Direction();
- if (aD0<aD1) {
- aLength=aD1;
- aWidth =aD0;
- aDX=aL0.Direction();
- }
- //
- aLength=2.*aLength;
- aWidth =2.*aWidth;
- //
- aInfo.SetLocation(aPc);
- aInfo.SetLength(aLength);
- aInfo.SetWidth(aWidth);
- //
- const gp_Dir& aDZ=aPln.Axis().Direction();
- gp_Ax2 aAx2(aPc, aDZ, aDX);
- gp_Ax3 aAx3(aAx2);
- aInfo.SetPosition(aAx3);
- }
-
- return;
-}
-//=======================================================================
-//function : FillDetails
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF,
- const gp_Sphere& )
-{
- Standard_Integer aNbV, aNbE, aNbSE, aNbDE;
- TopoDS_Edge aE;
- TopExp_Explorer aExp;
- TopTools_MapOfShape aM;
- GEOMAlgo_KindOfShape aKS, aKSE;
- //
- GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aF);
- aInfo.SetKindOfName(GEOMAlgo_KN_UNKNOWN);
- //
- aKS=aInfo.KindOfShape();
- if (aKS!=GEOMAlgo_KS_SPHERE) {
- return;
- }
- //
- aNbV=aInfo.NbSubShapes(TopAbs_VERTEX);
- aNbE=aInfo.NbSubShapes(TopAbs_EDGE);
- if (!(aNbV==2 && aNbE==3)) {
- return;
- }
- //
- aNbSE=0;
- aNbDE=0;
- aExp.Init(aF, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- aE=TopoDS::Edge(aExp.Current());
- if(aM.Add(aE)) {
- const GEOMAlgo_ShapeInfo& aInfoE=myMapInfo.FindFromKey(aE);
- aKSE=aInfoE.KindOfShape();
- //
- if (BRep_Tool::IsClosed(aE, aF)) {
- ++aNbSE;
- }
- else if (aKSE==GEOMAlgo_KS_DEGENERATED) {
- ++aNbDE;
- }
- }
- }
- //
- if (!(aNbSE==1 && aNbDE==2)) {
- return;
- }
- aInfo.SetKindOfName(GEOMAlgo_KN_SPHERE);
-}
-//=======================================================================
-//function : FillDetails
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF,
- const gp_Cone& )//aCone)
-{
- Standard_Integer aNbV, aNbE, aNbCE, aNbSE, aNbDE, i;
- Standard_Real aR[3], aHeight;
- gp_Pnt aPC[3], aPD, aPc, aPX[3];
- TopoDS_Vertex aVD;
- TopoDS_Edge aE;
- TopoDS_Iterator aIt;
- TopExp_Explorer aExp;
- TopTools_MapOfShape aM;
- GEOMAlgo_KindOfShape aKS, aKSE;
- GEOMAlgo_KindOfName aKN, aKNE;
- GEOMAlgo_KindOfClosed aKCE;
- //
- GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aF);
- aKN=GEOMAlgo_KN_UNKNOWN;
- aInfo.SetKindOfName(aKN);
- //
- aKS=aInfo.KindOfShape();
- if (aKS!=GEOMAlgo_KS_CONE) {
- return;
- }
- //
- if (aInfo.KindOfBounds()==GEOMAlgo_KB_INFINITE) {
- return;
- }
- //
- aNbV=aInfo.NbSubShapes(TopAbs_VERTEX);
- aNbE=aInfo.NbSubShapes(TopAbs_EDGE);
- if (!(aNbV==2 && aNbE==3)) {
- return;
- }
- //
- i=0;
- aNbCE=0;
- aNbSE=0;
- aNbDE=0;
- aExp.Init(aF, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- aE=TopoDS::Edge(aExp.Current());
- if(aM.Add(aE)) {
- const GEOMAlgo_ShapeInfo& aInfoE=myMapInfo.FindFromKey(aE);
- aKNE=aInfoE.KindOfName();
- aKCE=aInfoE.KindOfClosed();
- aKSE=aInfoE.KindOfShape();
- if (aKNE==GEOMAlgo_KN_CIRCLE && aKCE==GEOMAlgo_KC_CLOSED) {
- aPC[i]=aInfoE.Location();
- aR[i]=aInfoE.Radius1();
- //
- aIt.Initialize(aE);
- for (; aIt.More(); aIt.Next()) {
- aVD=TopoDS::Vertex(aIt.Value());
- break;
- }
- aPX[i]=BRep_Tool::Pnt(aVD);
- //
- ++i;
- ++aNbCE;
- }
- else if (aKNE==GEOMAlgo_KN_SEGMENT) {
- if (BRep_Tool::IsClosed(aE, aF)) {
- ++aNbSE;
- }
- }
- else if (aKSE==GEOMAlgo_KS_DEGENERATED) {
- aIt.Initialize(aE);
- for (; aIt.More(); aIt.Next()) {
- aVD=TopoDS::Vertex(aIt.Value());
- break;
- }
- //
- aPD=BRep_Tool::Pnt(aVD);
- //
- ++aNbDE;
- }
- }
- }
- //
- if (!((aNbCE==2 || (aNbCE==1 && aNbDE==1)) && aNbSE==1)) {
- return;
- }
- //
- if (aNbDE==1) {
- aPC[1]=aPD;
- aR[1]=0.;
- }
- //
- aHeight=aPC[0].Distance(aPC[1]);
- //
- Standard_Real aRmin, aRmax;
- gp_Ax2 aAx2new;
- //
- if (aR[0]>aR[1]) {
- aRmin=aR[1];
- aRmax=aR[0];
- aPc=aPC[0];
- gp_Vec aVz(aPC[0], aPC[1]);
- gp_Vec aVx(aPC[0], aPX[0]);
- gp_Dir aDz(aVz);
- gp_Dir aDx(aVx);
- gp_Ax2 aAx2(aPc, aDz, aDx);
- aAx2new=aAx2;
- }
- else {
- aRmin=aR[0];
- aRmax=aR[1];
- aPc=aPC[1];
- gp_Vec aVz(aPC[1], aPC[0]);
- gp_Vec aVx(aPC[1], aPX[1]);
- gp_Dir aDz(aVz);
- gp_Dir aDx(aVx);
- gp_Ax2 aAx2(aPc, aDz, aDx);
- aAx2new=aAx2;
- }
- //
- gp_Ax3 aAx3(aAx2new);
- aInfo.SetLocation(aPc);
- aInfo.SetPosition(aAx3);
- aInfo.SetRadius1(aRmax);
- aInfo.SetRadius2(aRmin);
- aInfo.SetHeight(aHeight);
- //
- aInfo.SetKindOfName(GEOMAlgo_KN_CONE);
-}
-//=======================================================================
-//function : FillDetails
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF,
- const gp_Cylinder& aCyl)
-{
- Standard_Integer i, aNbV, aNbE, aNbCE, aNbSE;
- Standard_Real aT0, aT1, aHeight;
- gp_Pnt aPC[3], aPc;
- TopoDS_Edge aE;
- TopExp_Explorer aExp;
- TopTools_MapOfShape aM;
- GEOMAlgo_KindOfShape aKS;
- GEOMAlgo_KindOfName aKN, aKNE;
- GEOMAlgo_KindOfClosed aKCE;
- //
- GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aF);
- aKN=GEOMAlgo_KN_UNKNOWN;
- aInfo.SetKindOfName(aKN);
- //
- aKS=aInfo.KindOfShape();
- if (aKS!=GEOMAlgo_KS_CYLINDER) {
- return;
- }
- //
- if (aInfo.KindOfBounds()==GEOMAlgo_KB_INFINITE) {
- return;
- }
- //
- aNbV=aInfo.NbSubShapes(TopAbs_VERTEX);
- aNbE=aInfo.NbSubShapes(TopAbs_EDGE);
- if (!(aNbV==2 && aNbE==3)) {
- return;
- }
- //
- i=0;
- aNbCE=0;
- aNbSE=0;
- aExp.Init(aF, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- aE=TopoDS::Edge(aExp.Current());
- if(aM.Add(aE)) {
- const GEOMAlgo_ShapeInfo& aInfoE=myMapInfo.FindFromKey(aE);
- aKNE=aInfoE.KindOfName();
- aKCE=aInfoE.KindOfClosed();
- if (aKNE==GEOMAlgo_KN_CIRCLE && aKCE==GEOMAlgo_KC_CLOSED) {
- aPC[aNbCE]=aInfoE.Location();
- ++aNbCE;
- }
- else if (aKNE==GEOMAlgo_KN_SEGMENT) {
- if (BRep_Tool::IsClosed(aE, aF)) {
- ++aNbSE;
- }
- }
- }
- }
- //
- if (!(aNbCE==2 && aNbSE==1)) {
- return;
- }
- //
- const gp_Ax1& aAx1=aCyl.Axis();
- const gp_Dir& aDir=aAx1.Direction();
- const gp_Pnt& aPLoc=aAx1.Location();
- gp_Lin aLin(aPLoc, aDir);
- //
- aT0=ElCLib::Parameter(aLin, aPC[0]);
- aT1=ElCLib::Parameter(aLin, aPC[1]);
- //
- aPc=aPC[0];;
- if (aT0>aT1) {
- aPc=aPC[1];
- }
- aHeight=aPC[0].Distance(aPC[1]);
- //
- gp_Ax3 aAx3=aCyl.Position();
- aAx3.SetLocation(aPc);
- //
- aInfo.SetKindOfName(GEOMAlgo_KN_CYLINDER);
- aInfo.SetPosition(aAx3);
- aInfo.SetLocation(aPc);
- aInfo.SetHeight(aHeight);
-}
-
-//=======================================================================
-//function : FillDetails
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF,
- const gp_Torus& )
-{
- Standard_Integer aNbV, aNbE, aNbSE;
- TopoDS_Edge aE;
- TopExp_Explorer aExp;
- TopTools_MapOfShape aM;
- GEOMAlgo_KindOfShape aKS;
- //
- GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aF);
- aInfo.SetKindOfName(GEOMAlgo_KN_UNKNOWN);
- //
- aKS=aInfo.KindOfShape();
- if (aKS!=GEOMAlgo_KS_TORUS) {
- return;
- }
- //
- aNbV=aInfo.NbSubShapes(TopAbs_VERTEX);
- aNbE=aInfo.NbSubShapes(TopAbs_EDGE);
- if (!(aNbV==1 && aNbE==2)) {
- return;
- }
- //
- aNbSE=0;
- aExp.Init(aF, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- aE=TopoDS::Edge(aExp.Current());
- if (aM.Add(aE)) {
- //const GEOMAlgo_ShapeInfo& aInfoE=myMapInfo.FindFromKey(aE);
- if (BRep_Tool::IsClosed(aE, aF)) {
- ++aNbSE;
- }
- }
- }
- //
- if (aNbSE!=2) {
- return;
- }
- aInfo.SetKindOfName(GEOMAlgo_KN_TORUS);
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ShapeSet.cxx
-// Created:
-// Author: Peter KURNEV
-//
-#include <GEOMAlgo_ShapeSet.hxx>
-
-#include <TopExp_Explorer.hxx>
-
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfOrientedShape.hxx>
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- GEOMAlgo_ShapeSet::GEOMAlgo_ShapeSet()
-{
-}
-//=======================================================================
-//function : Clear
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeSet::Clear()
-{
- myMap.Clear();
- myList.Clear();
-}
-//=======================================================================
-//function : Add
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeSet::Add(const TopoDS_Shape& theShape)
-{
- if (myMap.Add(theShape)) {
- myList.Append(theShape);
- }
-}
-//=======================================================================
-//function : Add
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeSet::Add(const TopoDS_Shape& theShape,
- const TopAbs_ShapeEnum theType)
-{
- TopExp_Explorer aExp;
- //
- aExp.Init(theShape, theType);
- for (; aExp.More(); aExp.Next()) {
- const TopoDS_Shape& aS=aExp.Current();
- if (myMap.Add(aS)) {
- myList.Append(aS);
- }
- }
-}
-//=======================================================================
-//function : Add
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeSet::Add(const TopTools_ListOfShape& theLS)
-{
- TopTools_ListIteratorOfListOfShape aIt;
- //
- aIt.Initialize(theLS);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- if (myMap.Add(aS)) {
- myList.Append(aS);
- }
- }
-}
-//=======================================================================
-//function :GetSet
-//purpose :
-//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_ShapeSet::GetSet()const
-{
- return myList;
-}
-//=======================================================================
-//function : Contains
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_ShapeSet::Contains(const GEOMAlgo_ShapeSet& theOther)const
-{
- Standard_Boolean bRet;
- TopAbs_Orientation aOr;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- bRet=Standard_True;
- const TopTools_ListOfShape& aLS=theOther.GetSet();
- aIt.Initialize(aLS);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aF=aIt.Value();
- aOr=aF.Orientation();
- if (aOr==TopAbs_FORWARD || aOr==TopAbs_REVERSED) {
- bRet=myMap.Contains(aF);
- if (!bRet) {
- break;
- }
- }
- }
- return bRet;
-}
-//=======================================================================
-//function : Subtract
-//purpose :
-//=======================================================================
- void GEOMAlgo_ShapeSet::Subtract(const GEOMAlgo_ShapeSet& theOther)
-{
- TopTools_ListIteratorOfListOfShape aIt;
- TopTools_ListOfShape aLS;
- //
- myMap.Clear();
- aIt.Initialize(myList);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- if (!theOther.myMap.Contains(aS)) {
- if(myMap.Add(aS)){
- aLS.Append(aS);
- }
- }
- }
- //
- myList=aLS;
-}
-//modified by NIZNHY-PKV Wed Oct 28 13:51:36 2010f
-//=======================================================================
-//function : IsEqual
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_ShapeSet::IsEqual(const GEOMAlgo_ShapeSet& theOther)const
-{
- Standard_Boolean bRet;
- Standard_Integer aNb1, aNb2;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- bRet=Standard_True;
- aNb1=myList.Extent();
- const TopTools_ListOfShape& aLS2=theOther.GetSet();
- aNb2=aLS2.Extent();
- if (aNb1!=aNb2) {
- return !bRet;
- }
- //
- aIt.Initialize(myList);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- if(!theOther.myMap.Contains(aS)) {
- bRet=!bRet;
- break;
- }
- }
- return bRet;
-}
-//modified by NIZNHY-PKV Wed Oct 28 13:51:38 2010t
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ShapeSet.hxx
-// Created:
-// Author: Peter KURNEV
-//
-#ifndef _GEOMAlgo_ShapeSet_HeaderFile
-#define _GEOMAlgo_ShapeSet_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <TopTools_MapOfOrientedShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <Standard_Boolean.hxx>
-#include <TopoDS_Shape.hxx>
-
-//! Implementation some formal <br>
-//! opereations with Set of shapes <br>
-//=======================================================================
-//class : GEOMAlgo_ShapeSet
-//purpose :
-//=======================================================================
-class GEOMAlgo_ShapeSet
-{
- public:
- //! Empty constructor <br>
- Standard_EXPORT
- GEOMAlgo_ShapeSet();
-
- //! Adds shapes from the list theLS to the Set <br>
- Standard_EXPORT
- void Add(const TopTools_ListOfShape& theLS) ;
-
- //! Adds shape theShape to the Set <br>
- Standard_EXPORT
- void Add(const TopoDS_Shape& theShape) ;
-
- //! Adds sub-shapes of shape theShape, <br>
- //! that have type theType to the Set <br>
- Standard_EXPORT
- void Add(const TopoDS_Shape& theShape,const TopAbs_ShapeEnum theType) ;
-
- //! Removes shapes of theSet from the Set <br>
- Standard_EXPORT
- void Subtract(const GEOMAlgo_ShapeSet& theSet) ;
-
- //! Clears internal fields <br>
- Standard_EXPORT void Clear() ;
-
- //! Returns True if the Set contains <br>
- //! all shapes of theSet <br>
- Standard_EXPORT
- Standard_Boolean Contains(const GEOMAlgo_ShapeSet& theSet) const;
-
- //! Returns the Set <br>
- Standard_EXPORT
- const TopTools_ListOfShape& GetSet() const;
-
- //! Returns True if the Set==theSet <br>
- Standard_EXPORT
- Standard_Boolean IsEqual(const GEOMAlgo_ShapeSet& theOther) const;
-
- Standard_Boolean operator ==(const GEOMAlgo_ShapeSet& theOther) const {
- return IsEqual(theOther);
- }
-
- protected:
- TopTools_MapOfOrientedShape myMap;
- TopTools_ListOfShape myList;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ShapeSolid.cxx
-// Created: Thu Jan 13 12:54:48 2005
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <GEOMAlgo_ShapeSolid.hxx>
-
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_ShapeSolid
-//purpose :
-//=======================================================================
-GEOMAlgo_ShapeSolid::GEOMAlgo_ShapeSolid()
-:
- GEOMAlgo_Algo(),
- myRank(0),
- myDSFiller(NULL)
-{
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-GEOMAlgo_ShapeSolid::~GEOMAlgo_ShapeSolid()
-{
-}
-//=======================================================================
-//function : SetFiller
-//purpose :
-//=======================================================================
-void GEOMAlgo_ShapeSolid::SetFiller(const BOPTools_DSFiller& aDSFiller)
-{
- myDSFiller=(BOPTools_DSFiller*) &aDSFiller;
-}
-//=======================================================================
-// function: Shapes
-// purpose:
-//=======================================================================
-const TopTools_ListOfShape& GEOMAlgo_ShapeSolid::Shapes(const TopAbs_State aState) const
-{
- const TopTools_ListOfShape *pL;
- //
- switch (aState) {
- case TopAbs_IN:
- pL=&myLSIN;
- break;
- case TopAbs_OUT:
- pL=&myLSOUT;
- break;
- case TopAbs_ON:
- pL=&myLSON;
- break;
- default:
- pL=&myLSON;
- break;
- }
- return *pL;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ShapeSolid.hxx
-// Created: Thu Jan 13 12:54:48 2005
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_ShapeSolid_HeaderFile
-#define _GEOMAlgo_ShapeSolid_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <Standard_Integer.hxx>
-#include <BOPTools_PDSFiller.hxx>
-#include <GEOMAlgo_Algo.hxx>
-#include <TopAbs_State.hxx>
-#include <BOPTools_DSFiller.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_ShapeSolid
-//purpose :
-//=======================================================================
-class GEOMAlgo_ShapeSolid : public GEOMAlgo_Algo
-{
- public:
- Standard_EXPORT
- void SetFiller(const BOPTools_DSFiller& aDSF) ;
-
- Standard_EXPORT
- virtual ~GEOMAlgo_ShapeSolid();
-
- Standard_EXPORT
- const TopTools_ListOfShape& Shapes(const TopAbs_State aState) const;
-
-protected:
- Standard_EXPORT
- GEOMAlgo_ShapeSolid();
-
- Standard_EXPORT
- virtual void BuildResult() = 0;
-
- Standard_EXPORT
- virtual void Prepare() = 0;
-
-
- TopTools_ListOfShape myLSIN;
- TopTools_ListOfShape myLSOUT;
- TopTools_ListOfShape myLSON;
- Standard_Integer myRank;
- BOPTools_PDSFiller myDSFiller;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ShellSolid.cxx
-// Created: Wed Jan 12 12:49:45 2005
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <GEOMAlgo_ShellSolid.hxx>
-
-#include <Standard_Failure.hxx>
-
-#include <gp_Pnt2d.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Solid.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRepTools.hxx>
-
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <BRepClass3d_SolidClassifier.hxx>
-
-#include <IntTools_Context.hxx>
-#include <BOPTColStd_Dump.hxx>
-#include <BooleanOperations_ShapesDataStructure.hxx>
-
-#include <BOPTools_PaveFiller.hxx>
-#include <BOPTools_SolidStateFiller.hxx>
-#include <BOPTools_PCurveMaker.hxx>
-#include <BOPTools_DEProcessor.hxx>
-#include <BOPTools_InterferencePool.hxx>
-#include <BOPTools_CArray1OfSSInterference.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
-#include <BOPTools_PaveBlock.hxx>
-#include <BOPTools_SSInterference.hxx>
-#include <BOPTools_SequenceOfCurves.hxx>
-#include <BOPTools_Curve.hxx>
-#include <BOPTools_PaveFiller.hxx>
-#include <BOPTools_SplitShapesPool.hxx>
-#include <BOPTools_Tools3D.hxx>
-#include <BOPTools_DSFiller.hxx>
-
-#include <BOP_WireEdgeSet.hxx>
-#include <BOP_SDFWESFiller.hxx>
-#include <BOP_FaceBuilder.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_ShellSolid
-//purpose :
-//=======================================================================
-GEOMAlgo_ShellSolid::GEOMAlgo_ShellSolid()
-:
- GEOMAlgo_ShapeSolid()
-{
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-GEOMAlgo_ShellSolid::~GEOMAlgo_ShellSolid()
-{
-}
-//=======================================================================
-// function:
-// purpose:
-//=======================================================================
-void GEOMAlgo_ShellSolid::Perform()
-{
- myErrorStatus=0;
- //
- try {
- if (myDSFiller==NULL) {
- myErrorStatus=10;
- return;
- }
- if(!myDSFiller->IsDone()) {
- myErrorStatus=11;
- return;
- }
- //
- Standard_Boolean bIsNewFiller;
- //
- bIsNewFiller=myDSFiller->IsNewFiller();
- if (bIsNewFiller) {
- Prepare();
- myDSFiller->SetNewFiller(!bIsNewFiller);
- }
- //
- myRank=(myDSFiller->DS().Object().ShapeType()==TopAbs_SHELL) ? 1 : 2;
- BuildResult();
- }
- catch (Standard_Failure) {
- myErrorStatus=12;
- }
-}
-//=======================================================================
-// function: Prepare
-// purpose:
-//=======================================================================
-void GEOMAlgo_ShellSolid::Prepare()
-{
- const BOPTools_PaveFiller& aPaveFiller=myDSFiller->PaveFiller();
- //
- // 1 States
- BOPTools_SolidStateFiller aStateFiller(aPaveFiller);
- aStateFiller.Do();
- //
- // 2 Project section edges on corresp. faces -> P-Curves on edges.
- BOPTools_PCurveMaker aPCurveMaker(aPaveFiller);
- aPCurveMaker.Do();
- //
- // 3. Degenerated Edges Processing
- BOPTools_DEProcessor aDEProcessor(aPaveFiller);
- aDEProcessor.Do();
- //
- // 4. Detect Same Domain Faces
- DetectSDFaces();
-}
-//=================================================================================
-// function: BuildResult
-// purpose:
-//=================================================================================
-void GEOMAlgo_ShellSolid::BuildResult()
-{
- Standard_Boolean bIsTouchCase;
- Standard_Integer i, j, nF1, nF2, aNbFFs, aNbS, aNbCurves, nSp, iRank1;
- Standard_Integer nE, nF, aNbPB, iBeg, iEnd;
- BooleanOperations_StateOfShape aState;
- TopExp_Explorer anExp;
- TopAbs_ShapeEnum aType;
- gp_Pnt2d aP2D;
- gp_Pnt aP3D;
- //
- const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS();
- const BOPTools_InterferencePool& anInterfPool=myDSFiller->InterfPool();
- BOPTools_InterferencePool* pInterfPool=(BOPTools_InterferencePool*) &anInterfPool;
- BOPTools_CArray1OfSSInterference& aFFs=pInterfPool->SSInterferences();
- const BOPTools_PaveFiller& aPaveFiller=myDSFiller->PaveFiller();
- const BOPTools_SplitShapesPool& aSplitShapesPool=aPaveFiller.SplitShapesPool();
- //
- // 1. process pf non-interferring faces
- iBeg=1;
- iEnd=aDS.NumberOfShapesOfTheObject();
- if (myRank==2) {
- iBeg=iEnd+1;
- iEnd=aDS.NumberOfSourceShapes();
- }
- //
- for (i=iBeg; i<=iEnd; ++i) {
- aType=aDS.GetShapeType(i);
- if (aType!=TopAbs_FACE) {
- continue;
- }
- //
- const TopoDS_Face& aF1=TopoDS::Face(aDS.Shape(i));
- aState=aDS.GetState(i);
- if (aState==BooleanOperations_IN) {
- myLSIN.Append(aF1);
- }
- else if (aState==BooleanOperations_OUT) {
- myLSOUT.Append(aF1);
- }
- }
- //
- // 2. process pf interferred faces
- aNbFFs=aFFs.Extent();
- for (i=1; i<=aNbFFs; ++i) {
- BOPTools_SSInterference& aFFi=aFFs(i);
- //
- nF1=aFFi.Index1();
- nF2=aFFi.Index2();
- iRank1=aDS.Rank(nF1);
- nF=(iRank1==myRank) ? nF1 : nF2;
- const TopoDS_Face& aF1=TopoDS::Face(aDS.Shape(nF));
- //
- bIsTouchCase=aFFi.IsTangentFaces();
- //
- if (bIsTouchCase) {
- myLSON.Append(aF1);
- continue;
- }
- //
- // Has section edges ?
- aNbS=0;
- BOPTools_SequenceOfCurves& aBCurves=aFFi.Curves();
- aNbCurves=aBCurves.Length();
- for (j=1; j<=aNbCurves; j++) {
- BOPTools_Curve& aBC=aBCurves(j);
- const BOPTools_ListOfPaveBlock& aSectEdges=aBC.NewPaveBlocks();
- aNbS=aSectEdges.Extent();
- if (aNbS) {
- break;
- }
- }
- //
- if (aNbS) { // it has
- continue;
- }
- //
- anExp.Init(aF1, TopAbs_EDGE);
- for (; anExp.More(); anExp.Next()) {
- const TopoDS_Edge& aE=TopoDS::Edge(anExp.Current());
- if (BRep_Tool::Degenerated(aE)) {
- continue;
- }
- //
- nE=aDS.ShapeIndex(aE, myRank);
- const BOPTools_ListOfPaveBlock& aLPB=aSplitShapesPool(aDS.RefEdge(nE));
- aNbPB=aLPB.Extent();
- //
- if (aNbPB<2) {
- nSp=nE;
- if (aNbPB) {
- const BOPTools_PaveBlock& aPB=aLPB.First();
- nSp=aPB.Edge();
- }
- /*const TopoDS_Shape& aSp=*/aDS.Shape(nSp);
- //
- aState=aDS.GetState(nSp);
- if (aState==BooleanOperations_IN) {
- myLSIN.Append(aF1);
- }
- else if (aState==BooleanOperations_OUT) {
- myLSOUT.Append(aF1);
- }
- else if (aState==BooleanOperations_ON) {
- Standard_Real aTol;
- TopAbs_State aSt;
- //
- //const TopoDS_Face& aF2=TopoDS::Face(aDS.Shape((iRank1==myRank)? nF2 : nF1));
- //aTol=BRep_Tool::Tolerance(aF2);
- aTol=1.e-7;
- //
- BOPTools_Tools3D::PointNearEdge(aE, aF1, aP2D, aP3D);
- const TopoDS_Solid& aRefSolid=(myRank==1) ?
- TopoDS::Solid(aDS.Tool()) : TopoDS::Solid(aDS.Object());
- //
- BOPTools_PaveFiller* pPF=(BOPTools_PaveFiller*)& aPaveFiller;
- const Handle(IntTools_Context)& aCtx=pPF->Context();
- //
- BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aRefSolid);
- aSC.Perform(aP3D, aTol);
- aSt=aSC.State();
- if (aSt==TopAbs_IN) {
- myLSIN.Append(aF1);
- }
- else if (aSt==TopAbs_OUT) {
- myLSOUT.Append(aF1);
- }
- }
- break;
- } // if (aNbPB<2) {
- } //for (; anExp.More(); anExp.Next())
- }
-}
-//=======================================================================
-// function: DetectSDFaces
-// purpose:
-//=======================================================================
-void GEOMAlgo_ShellSolid::DetectSDFaces()
-{
- const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS();
- BOPTools_InterferencePool* pIntrPool=(BOPTools_InterferencePool*)&myDSFiller->InterfPool();
- BOPTools_CArray1OfSSInterference& aFFs=pIntrPool->SSInterferences();
- //
- Standard_Boolean bFlag;
- Standard_Integer i, aNb, nF1, nF2, iZone, aNbSps, iSenseFlag;
- gp_Dir aDNF1, aDNF2;
-
- aNb=aFFs.Extent();
- for (i=1; i<=aNb; i++) {
- bFlag=Standard_False;
-
- BOPTools_SSInterference& aFF=aFFs(i);
-
- nF1=aFF.Index1();
- nF2=aFF.Index2();
- const TopoDS_Face& aF1=TopoDS::Face(aDS.Shape(nF1));
- const TopoDS_Face& aF2=TopoDS::Face(aDS.Shape(nF2));
- //
- // iSenseFlag;
- const BOPTools_ListOfPaveBlock& aLPB=aFF.PaveBlocks();
- aNbSps=aLPB.Extent();
-
- if (!aNbSps) {
- continue;
- }
-
- const BOPTools_PaveBlock& aPB=aLPB.First();
- const TopoDS_Edge& aSpE=TopoDS::Edge(aDS.Shape(aPB.Edge()));
-
- BOPTools_Tools3D::GetNormalToFaceOnEdge (aSpE, aF1, aDNF1);
- BOPTools_Tools3D::GetNormalToFaceOnEdge (aSpE, aF2, aDNF2);
- iSenseFlag=BOPTools_Tools3D::SenseFlag (aDNF1, aDNF2);
- //
- if (iSenseFlag==1 || iSenseFlag==-1) {
- //
- //
- TopoDS_Face aF1FWD=aF1;
- aF1FWD.Orientation (TopAbs_FORWARD);
-
- BOP_WireEdgeSet aWES (aF1FWD);
- BOP_SDFWESFiller aWESFiller(nF1, nF2, *myDSFiller);
- aWESFiller.SetSenseFlag(iSenseFlag);
- aWESFiller.SetOperation(BOP_COMMON);
- aWESFiller.Do(aWES);
-
- BOP_FaceBuilder aFB;
- aFB.Do(aWES);
- const TopTools_ListOfShape& aLF=aFB.NewFaces();
-
- iZone=0;
- TopTools_ListIteratorOfListOfShape anIt(aLF);
- for (; anIt.More(); anIt.Next()) {
- const TopoDS_Shape& aFR=anIt.Value();
-
- if (aFR.ShapeType()==TopAbs_FACE) {
- const TopoDS_Face& aFaceResult=TopoDS::Face(aFR);
- //
- Standard_Boolean bIsValidIn2D, bNegativeFlag;
- bIsValidIn2D=BOPTools_Tools3D::IsValidArea (aFaceResult, bNegativeFlag);
- if (bIsValidIn2D) {
- //if(CheckSameDomainFaceInside(aFaceResult, aF2)) {
- iZone=1;
- break;
- //}
- }
- //
- }
- }
-
- if (iZone) {
- bFlag=Standard_True;
- aFF.SetStatesMap(aWESFiller.StatesMap());
- }
-
- }// if (iSenseFlag)
-
- aFF.SetTangentFacesFlag(bFlag);
- aFF.SetSenseFlag (iSenseFlag);
- }// end of for (i=1; i<=aNb; i++)
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_ShellSolid.hxx
-// Created: Wed Jan 12 12:49:45 2005
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_ShellSolid_HeaderFile
-#define _GEOMAlgo_ShellSolid_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <GEOMAlgo_ShapeSolid.hxx>
-
-//=======================================================================
-//class : GEOMAlgo_ShellSolid
-//purpose :
-//=======================================================================
-class GEOMAlgo_ShellSolid : public GEOMAlgo_ShapeSolid
-{
- public:
- Standard_EXPORT
- GEOMAlgo_ShellSolid();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_ShellSolid();
-
- Standard_EXPORT
- virtual void Perform() ;
-
- protected:
- Standard_EXPORT
- virtual void Prepare() ;
-
- Standard_EXPORT
- virtual void BuildResult() ;
-
- Standard_EXPORT
- void DetectSDFaces() ;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_SolidSolid.cxx
-// Created: Wed Jan 26 12:06:26 2005
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <GEOMAlgo_SolidSolid.hxx>
-
-#include <Standard_Failure.hxx>
-
-#include <TopAbs_State.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopExp.hxx>
-
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-
-#include <BooleanOperations_ShapesDataStructure.hxx>
-#include <BOPTools_DSFiller.hxx>
-
-#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_SolidSolid
-//purpose :
-//=======================================================================
-GEOMAlgo_SolidSolid::GEOMAlgo_SolidSolid()
-:
- GEOMAlgo_ShellSolid()
-{
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-GEOMAlgo_SolidSolid::~GEOMAlgo_SolidSolid()
-{
-}
-//=======================================================================
-// function: SetShape2
-// purpose:
-//=======================================================================
-void GEOMAlgo_SolidSolid::SetShape2(const TopoDS_Shape& aS2)
-{
- myS2=aS2;
-}
-//=======================================================================
-// function: Shape2
-// purpose:
-//=======================================================================
-const TopoDS_Shape& GEOMAlgo_SolidSolid::Shape2()const
-{
- return myS2;
-}
-//=======================================================================
-// function: Perform
-// purpose:
-//=======================================================================
-void GEOMAlgo_SolidSolid::Perform()
-{
- myErrorStatus=0;
- try {
- if (myDSFiller==NULL) {
- myErrorStatus=10;
- return;
- }
- if(!myDSFiller->IsDone()) {
- myErrorStatus=11;
- return;
- }
- //
- Standard_Boolean bIsNewFiller;
- //
- bIsNewFiller=myDSFiller->IsNewFiller();
- if (bIsNewFiller) {
- Prepare();
- myDSFiller->SetNewFiller(!bIsNewFiller);
- }
- //
- myRank=2;
- BuildResult();
- }
- catch (Standard_Failure) {
- myErrorStatus=12;
- }
-}
-//=================================================================================
-// function: BuildResult
-// purpose:
-//=================================================================================
-void GEOMAlgo_SolidSolid::BuildResult()
-{
- myErrorStatus=0;
- //
- Standard_Integer i, j, aNbF, aNbS;
- Standard_Integer aNbFIN, aNbFOUT, aNbFON, aNbFINTR;
- TopAbs_State aState;
- TopTools_ListIteratorOfListOfShape aIt;
- TopTools_IndexedMapOfShape aMF, aMS;
- GEOMAlgo_IndexedDataMapOfShapeState aMFS;
- //
- // 1. classify the faces
- GEOMAlgo_ShellSolid::BuildResult();
- //
- // 2. fill Shape-State map
- aIt.Initialize(myLSIN);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aF=aIt.Value();
- aMFS.Add(aF, TopAbs_IN);
- }
- aIt.Initialize(myLSOUT);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aF=aIt.Value();
- aMFS.Add(aF, TopAbs_OUT);
- }
- aIt.Initialize(myLSON);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aF=aIt.Value();
- aMFS.Add(aF, TopAbs_ON);
- }
- myLSIN.Clear();
- myLSON.Clear();
- myLSOUT.Clear();
- //
- // 3. fill states for solids
- TopExp::MapShapes(myS2, TopAbs_SOLID, aMS);
- //
- aNbS=aMS.Extent();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aSolid=aMS(i);
- //
- aMF.Clear();
- TopExp::MapShapes(aSolid, TopAbs_FACE, aMF);
- //
- aNbFIN=0;
- aNbFOUT=0;
- aNbFON=0;
- aNbFINTR=0;
- //
- aNbF=aMF.Extent();
- for(j=1; j<aNbF; ++j) {
- const TopoDS_Shape& aF=aMF(j);
- //
- if (!aMFS.Contains(aF)) {// the face is intesected
- ++aNbFINTR;
- break;
- }
- //
- aState=aMFS.FindFromKey(aF);
- switch (aState) {
- case TopAbs_IN:
- ++aNbFIN;
- break;
- case TopAbs_OUT:
- ++aNbFOUT;
- break;
- case TopAbs_ON:
- ++aNbFON;
- break;
- default:
- break;
- }
- if (aNbFIN && aNbFOUT) {
- ++aNbFINTR;
- break;
- }
- }
- //
- if (!aNbFINTR) {
- if (aNbFON==aNbF) {
- myLSON.Append(aSolid);
- }
- else if (aNbFIN) {
- myLSIN.Append(aSolid);
- }
- else if (aNbFOUT) {
- myLSOUT.Append(aSolid);
- }
- }
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_SolidSolid.hxx
-// Created: Wed Jan 26 12:06:26 2005
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_SolidSolid_HeaderFile
-#define _GEOMAlgo_SolidSolid_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <TopoDS_Shape.hxx>
-#include <GEOMAlgo_ShellSolid.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_SolidSolid
-//purpose :
-//=======================================================================
-class GEOMAlgo_SolidSolid : public GEOMAlgo_ShellSolid
-{
- public:
- Standard_EXPORT
- GEOMAlgo_SolidSolid();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_SolidSolid();
-
- Standard_EXPORT
- virtual void Perform() ;
-
- Standard_EXPORT
- void SetShape2(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- const TopoDS_Shape& Shape2() const;
-
-protected:
- Standard_EXPORT
- virtual void BuildResult() ;
-
-
- TopoDS_Shape myS2;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Splitter.cxx
-// Author: Peter KURNEV
-//
-#include <GEOMAlgo_Splitter.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Compound.hxx>
-#include <TopoDS_Iterator.hxx>
-
-#include <TopExp.hxx>
-
-#include <BRep_Builder.hxx>
-#include <BRepLib.hxx>
-
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-
-#include <BOP_CorrectTolerances.hxx>
-
-
-static
- void TreatCompound(const TopoDS_Shape& aC,
- TopTools_ListOfShape& aLSX);
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- GEOMAlgo_Splitter::GEOMAlgo_Splitter()
-:
- GEOMAlgo_Builder()
-{
- myLimit=TopAbs_SHAPE;
- myLimitMode=0;
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
- GEOMAlgo_Splitter::~GEOMAlgo_Splitter()
-{
-}
-//=======================================================================
-//function : AddToolCompound
-//purpose :
-//=======================================================================
- void GEOMAlgo_Splitter::AddToolCompound(const TopoDS_Shape& theShape)
-{
- TopoDS_Iterator aIt;
- //
- aIt.Initialize(theShape);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- AddTool(aS);
- }
-}
-//=======================================================================
-//function : AddTool
-//purpose :
-//=======================================================================
- void GEOMAlgo_Splitter::AddTool(const TopoDS_Shape& theShape)
-{
- if (myMapTools.Add(theShape)) {
- myTools.Append(theShape);
- //
- AddShape(theShape);
- }
-}
-//=======================================================================
-//function : Tools
-//purpose :
-//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_Splitter::Tools()const
-{
- return myTools;
-}
-//=======================================================================
-//function : SetLimit
-//purpose :
-//=======================================================================
- void GEOMAlgo_Splitter::SetLimit(const TopAbs_ShapeEnum aLimit)
-{
- myLimit=aLimit;
-}
-//=======================================================================
-//function : Limit
-//purpose :
-//=======================================================================
- TopAbs_ShapeEnum GEOMAlgo_Splitter::Limit()const
-{
- return myLimit;
-}
-//=======================================================================
-//function : SetLimitMode
-//purpose :
-//=======================================================================
- void GEOMAlgo_Splitter::SetLimitMode(const Standard_Integer aMode)
-{
- myLimitMode=aMode;
-}
-//=======================================================================
-//function : LimitMode
-//purpose :
-//=======================================================================
- Standard_Integer GEOMAlgo_Splitter::LimitMode()const
-{
- return myLimitMode;
-}
-//=======================================================================
-//function : Clear
-//purpose :
-//=======================================================================
- void GEOMAlgo_Splitter::Clear()
-{
- myTools.Clear();
- myMapTools.Clear();
- myLimit=TopAbs_SHAPE;
- GEOMAlgo_Builder::Clear();
-}
-//=======================================================================
-//function : BuildResult
-//purpose :
-//=======================================================================
- void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType)
-{
- myErrorStatus=0;
- //
- TopAbs_ShapeEnum aType;
- BRep_Builder aBB;
- TopTools_MapOfShape aM;
- TopTools_ListIteratorOfListOfShape aIt, aItIm;
- //
- aIt.Initialize(myShapes);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- aType=aS.ShapeType();
- if (aType==theType && !myMapTools.Contains(aS)) {
- if (myImages.HasImage(aS)) {
- const TopTools_ListOfShape& aLSIm=myImages.Image(aS);
- aItIm.Initialize(aLSIm);
- for (; aItIm.More(); aItIm.Next()) {
- const TopoDS_Shape& aSIm=aItIm.Value();
- if (aM.Add(aSIm)) {
- aBB.Add(myShape, aSIm);
- }
- }
- }
- else {
- if (aM.Add(aS)) {
- aBB.Add(myShape, aS);
- }
- }
- }
- }
-}
-//=======================================================================
-//function : PostTreat
-//purpose :
-//=======================================================================
- void GEOMAlgo_Splitter::PostTreat()
-{
- if (myLimit!=TopAbs_SHAPE) {
- Standard_Integer i, aNbS;
- BRep_Builder aBB;
- TopoDS_Compound aC;
- TopTools_IndexedMapOfShape aMx;
- //
- aBB.MakeCompound(aC);
- //
- TopExp::MapShapes(myShape, myLimit, aMx);
- aNbS=aMx.Extent();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aS=aMx(i);
- aBB.Add(aC, aS);
- }
- //
- if (myLimitMode) {
- Standard_Integer iType, iLimit, iTypeX;
- TopAbs_ShapeEnum aType, aTypeX;
- TopTools_ListOfShape aLSP, aLSX;
- TopTools_ListIteratorOfListOfShape aIt, aItX, aItIm;
- TopTools_MapOfShape aM;
- //
- iLimit=(Standard_Integer)myLimit;
- //
- // 1. Collect the shapes to process aLSP
- aIt.Initialize(myShapes);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- if (myMapTools.Contains(aS)) {
- continue;
- }
- //
- aType=aS.ShapeType();
- iType=(Standard_Integer)aType;
- //
- if (iType>iLimit) {
- aLSP.Append(aS);
- }
- //
- else if (aType==TopAbs_COMPOUND) {
- aLSX.Clear();
- //
- TreatCompound(aS, aLSX);
- //
- aItX.Initialize(aLSX);
- for (; aItX.More(); aItX.Next()) {
- const TopoDS_Shape& aSX=aItX.Value();
- aTypeX=aSX.ShapeType();
- iTypeX=(Standard_Integer)aTypeX;
- //
- if (iTypeX>iLimit) {
- aLSP.Append(aSX);
- }
- }
- }
- }// for (; aIt.More(); aIt.Next()) {
- //
- //modified by NIZNHY-PKV Fri Oct 30 11:07:08 2009 f
- aMx.Clear();
- TopExp::MapShapes(aC, aMx);
- //modified by NIZNHY-PKV Fri Oct 30 11:12:30 2009t
- //
- // 2. Add them to aC
- aIt.Initialize(aLSP);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- if (myImages.HasImage(aS)) {
- const TopTools_ListOfShape& aLSIm=myImages.Image(aS);
- aItIm.Initialize(aLSIm);
- for (; aItIm.More(); aItIm.Next()) {
- const TopoDS_Shape& aSIm=aItIm.Value();
- if (aM.Add(aSIm)) {
- //modified by NIZNHY-PKV Fri Oct 30 11:09:57 2009f
- if (!aMx.Contains(aSIm)) {
- aBB.Add(aC, aSIm);
- }
- //aBB.Add(aC, aSIm);
- //modified by NIZNHY-PKV Fri Oct 30 11:10:02 2009
- }
- }
- }
- else {
- if (aM.Add(aS)) {
- //modified by NIZNHY-PKV Fri Oct 30 11:10:46 2009f
- if (!aMx.Contains(aS)) {
- aBB.Add(aC, aS);
- }
- //aBB.Add(aC, aS);
- //modified by NIZNHY-PKV Fri Oct 30 11:11:00 2009t
- }
- }
- }
- }// if (myLimitMode) {
- myShape=aC;
- }//if (myLimit!=TopAbs_SHAPE) {
- //
- GEOMAlgo_Builder::PostTreat();
-}
-//=======================================================================
-//function : TreatCompound
-//purpose :
-//=======================================================================
-void TreatCompound(const TopoDS_Shape& aC1,
- TopTools_ListOfShape& aLSX)
-{
- Standard_Integer aNbC1;
- TopAbs_ShapeEnum aType;
- TopTools_ListOfShape aLC, aLC1;
- TopTools_ListIteratorOfListOfShape aIt, aIt1;
- TopoDS_Iterator aItC;
- //
- aLC.Append (aC1);
- while(1) {
- aLC1.Clear();
- aIt.Initialize(aLC);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aC=aIt.Value(); //C is compound
- //
- aItC.Initialize(aC);
- for (; aItC.More(); aItC.Next()) {
- const TopoDS_Shape& aS=aItC.Value();
- aType=aS.ShapeType();
- if (aType==TopAbs_COMPOUND) {
- aLC1.Append(aS);
- }
- else {
- aLSX.Append(aS);
- }
- }
- }
- //
- aNbC1=aLC1.Extent();
- if (!aNbC1) {
- break;
- }
- //
- aLC.Clear();
- aIt.Initialize(aLC1);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSC=aIt.Value();
- aLC.Append(aSC);
- }
- }// while(1)
-}
-//
-// myErrorStatus
-//
-// 0 - Ok
-// 1 - The object is just initialized
-// 2 - PaveFiller is failed
-// 10 - No shapes to process
-// 30 - SolidBuilder failed
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Splitter.hxx
-//
-// Author: Peter KURNEV
-//
-#ifndef _GEOMAlgo_Splitter_HeaderFile
-#define _GEOMAlgo_Splitter_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <Standard_Integer.hxx>
-#include <GEOMAlgo_Builder.hxx>
-#include <TopoDS_Shape.hxx>
-
-//! Implementation of Gluing Operation Algorithm (GA) <br>
-//=======================================================================
-//function : GEOMAlgo_Splitter
-//purpose :
-//=======================================================================
-class GEOMAlgo_Splitter : public GEOMAlgo_Builder
-{
- public:
-
- //! Empty constructor <br>
- Standard_EXPORT
- GEOMAlgo_Splitter();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_Splitter();
-
- //! Clears internal fields and arguments <br>
- Standard_EXPORT
- virtual void Clear() ;
-
- //! Adds Tool argument theShape of the operation <br>
- Standard_EXPORT
- virtual void AddTool(const TopoDS_Shape& theShape) ;
-
- //! Returns the arguments of the operation <br>
- Standard_EXPORT
- const TopTools_ListOfShape& Tools() const;
-
- Standard_EXPORT
- void SetLimit(const TopAbs_ShapeEnum aLimit) ;
-
- Standard_EXPORT
- TopAbs_ShapeEnum Limit() const;
-
- Standard_EXPORT
- void SetLimitMode(const Standard_Integer aLimitMode) ;
-
- Standard_EXPORT
- Standard_Integer LimitMode() const;
- //! Adds Tool arguments of the operation as <br>
- //! shapes of upper level of container shape theShape <br>
- //! ===================================================== <br>
- Standard_EXPORT
- void AddToolCompound(const TopoDS_Shape& theShape) ;
-
- protected:
- //! Build the resulting shapes of type theType <br>
- Standard_EXPORT
- virtual void BuildResult(const TopAbs_ShapeEnum theType) ;
- //! Provides post-tratment actions <br>
- Standard_EXPORT
- virtual void PostTreat() ;
-
-
- TopTools_ListOfShape myTools;
- TopTools_MapOfShape myMapTools;
- TopAbs_ShapeEnum myLimit;
- Standard_Integer myLimitMode;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_State_HeaderFile
-#define _GEOMAlgo_State_HeaderFile
-enum GEOMAlgo_State {
- GEOMAlgo_ST_UNKNOWN,
- GEOMAlgo_ST_IN,
- GEOMAlgo_ST_OUT,
- GEOMAlgo_ST_ON,
- GEOMAlgo_ST_ONIN,
- GEOMAlgo_ST_ONOUT,
- GEOMAlgo_ST_INOUT
-};
-
-#ifndef _Standard_PrimitiveTypes_HeaderFile
-#include <Standard_PrimitiveTypes.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_StateCollector.cxx
-// Created: Thu Mar 10 09:42:11 2005
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <GEOMAlgo_StateCollector.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_StateCollector
-//purpose :
-//=======================================================================
-GEOMAlgo_StateCollector::GEOMAlgo_StateCollector()
-{
- myCounter[0]=0;
- myCounter[1]=0;
- myCounter[2]=0;
-}
-//=======================================================================
-//function : AppendState
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_StateCollector::AppendState(const TopAbs_State aSt)
-{
- Standard_Boolean bIsToBreak;
- //
- switch(aSt) {
- case TopAbs_IN:
- ++myCounter[0];
- break;
- case TopAbs_OUT:
- ++myCounter[1];
- break;
- case TopAbs_ON:
- ++myCounter[2];
- break;
- default:
- break;
- }
- bIsToBreak=(myCounter[0] && myCounter[1]);
- //
- return bIsToBreak;
-}
-//=======================================================================
-//function : State
-//purpose :
-//=======================================================================
-TopAbs_State GEOMAlgo_StateCollector::State()const
-{
- TopAbs_State aSt;
- //
- aSt=TopAbs_UNKNOWN;
- //
- if (myCounter[0] && myCounter[1]) {
- return aSt;
- }
- //
- else if (myCounter[0] && myCounter[2]>=0) {
- aSt=TopAbs_IN;
- }
- //
- else if (myCounter[1] && myCounter[2]>=0) {
- aSt=TopAbs_OUT;
- }
- //
- else if (!myCounter[0] && !myCounter[1] && myCounter[2]) {
- aSt=TopAbs_ON;
- }
- //
- return aSt;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_StateCollector.hxx
-// Created: Thu Mar 10 09:42:11 2005
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_StateCollector_HeaderFile
-#define _GEOMAlgo_StateCollector_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Boolean.hxx>
-#include <TopAbs_State.hxx>
-
-//=======================================================================
-// class : GEOMAlgo_StateCollector
-//purpose :
-//=======================================================================
-class GEOMAlgo_StateCollector
-{
- public:
- Standard_EXPORT
- GEOMAlgo_StateCollector();
-
- Standard_EXPORT
- Standard_Boolean AppendState(const TopAbs_State aSt) ;
-
- Standard_EXPORT
- TopAbs_State State() const;
-
- protected:
- Standard_Integer myCounter[3];
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_SurfaceTools.cxx
-// Created: Thu Jan 27 11:05:16 2005
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <GEOMAlgo_SurfaceTools.hxx>
-
-#include <math.h>
-
-#include <gp_Pln.hxx>
-#include <gp_Cylinder.hxx>
-#include <gp_Sphere.hxx>
-#include <gp_Ax1.hxx>
-#include <gp_Lin.hxx>
-#include <gp_Ax3.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Ax1.hxx>
-#include <gp_Vec.hxx>
-
-#include <GeomAbs_SurfaceType.hxx>
-#include <GeomAdaptor_Surface.hxx>
-
-
-//=======================================================================
-//function : GetState
-//purpose :
-//=======================================================================
- Standard_Integer GEOMAlgo_SurfaceTools::GetState(const gp_Pnt& aP,
- const GeomAdaptor_Surface& aGAS,
- const Standard_Real aTol,
- TopAbs_State& aState)
-{
- Standard_Integer iErr;
- Standard_Real aDp, aR;
- GeomAbs_SurfaceType aType;
- gp_Sphere aSph;
- gp_Cylinder aCyl;
- gp_Pln aPln;
- //
- iErr=0;
- aState=TopAbs_UNKNOWN;
- //
- aType=aGAS.GetType();
- switch (aType) {
- case GeomAbs_Plane:
- aPln=aGAS.Plane();
- aR=0.;
- aDp=GEOMAlgo_SurfaceTools::Distance(aP, aPln);
- break;
-
- case GeomAbs_Cylinder:
- aCyl=aGAS.Cylinder();
- aR=aCyl.Radius();
- aDp=GEOMAlgo_SurfaceTools::Distance(aP, aCyl);
- break;
-
- case GeomAbs_Sphere:
- aSph=aGAS.Sphere();
- aR=aSph.Radius();
- aDp=GEOMAlgo_SurfaceTools::Distance(aP, aSph);
- break;
-
- default:
- iErr=1; // unprocessed surface type
- break;
- }
- //
- if (!iErr) {
- aState=TopAbs_ON;
- if (aDp>aR+aTol) {
- aState=TopAbs_OUT;
- }
- else if (aDp<aR-aTol) {
- aState=TopAbs_IN;
- }
- }
- //
- return iErr;
-}
-//=======================================================================
-//function : GetState
-//purpose :
-//=======================================================================
- Standard_Integer GEOMAlgo_SurfaceTools::GetState(const gp_Pnt& aP,
- const Handle(Geom_Surface)& aSurf,
- const Standard_Real aTol,
- TopAbs_State& aState)
-{
- Standard_Integer iErr;
- GeomAdaptor_Surface aGAS;
- //
- aState=TopAbs_UNKNOWN;
- aGAS.Load(aSurf);
- //
- iErr=GEOMAlgo_SurfaceTools::GetState(aP, aGAS, aTol, aState);
- //
- return iErr;
-}
-//=======================================================================
-//function : ReverseState
-//purpose :
-//=======================================================================
- TopAbs_State GEOMAlgo_SurfaceTools::ReverseState(const TopAbs_State aState)
-{
- TopAbs_State aRSt=aState;
- //
- switch (aState) {
- case TopAbs_IN:
- aRSt=TopAbs_OUT;
- break;
- case TopAbs_OUT:
- aRSt=TopAbs_IN;
- break;
- default:
- break;
- }
- //
- return aRSt;
-}
-//=======================================================================
-//function : Distance
-//purpose :
-//=======================================================================
-Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
- const gp_Sphere& aSph)
-{
- Standard_Real aD;
- //
- const gp_Pnt& aLoc=aSph.Location();
- aD=aLoc.Distance(aP);
- //
- return aD;
-}
-//=======================================================================
-//function : Distance
-//purpose :
-//=======================================================================
-Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
- const gp_Cylinder& aCyl)
-{
- Standard_Real aD;
- //
- const gp_Ax1& aAxis=aCyl.Axis();
- gp_Lin aLin(aAxis);
- aD=aLin.Distance(aP);
- //
- return aD;
-}
-//=======================================================================
-//function : Distance
-//purpose :
-//=======================================================================
-Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
- const gp_Pln& aPL)
-{
- Standard_Real aD;
- //
- const gp_Ax3& aPos=aPL.Position();
- const gp_Pnt& aLoc=aPos.Location ();
- const gp_Dir& aDir=aPos.Direction();
- //
- aD= (aDir.X() * (aP.X() - aLoc.X()) +
- aDir.Y() * (aP.Y() - aLoc.Y()) +
- aDir.Z() * (aP.Z() - aLoc.Z()));
- return aD;
-}
-//=======================================================================
-//function : IsCoaxial
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_SurfaceTools::IsCoaxial(const gp_Pnt& aP1,
- const gp_Pnt& aP2,
- const gp_Cylinder& aCyl,
- const Standard_Real aTol)
-{
- Standard_Boolean bRet=Standard_False;
- Standard_Real aSM;
- //
- gp_Vec aV12(aP1, aP2);
- gp_Dir aD12(aV12);
- //
- const gp_Ax1& aAxis=aCyl.Axis();
- const gp_Dir& aDAxis=aAxis.Direction();
- //
- aSM=fabs(aD12*aDAxis);
- if (fabs(1.-aSM) > aTol) {
- return bRet;
- }
- //
- return !bRet;
-}
-//=======================================================================
-//function : IsAnalytic
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_SurfaceTools::IsAnalytic(const Handle(Geom_Surface)& aSurf)
-{
- Standard_Boolean bRet;
- GeomAbs_SurfaceType aType;
- GeomAdaptor_Surface aGAS;
- //
- aGAS.Load(aSurf);
- aType=aGAS.GetType();
- bRet=(aType==GeomAbs_Plane ||
- aType==GeomAbs_Cylinder ||
- aType==GeomAbs_Sphere);
- return bRet;
-}
-//=======================================================================
-//function : IsConformState
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_SurfaceTools::IsConformState(const TopAbs_State aST1,
- const GEOMAlgo_State aST2)
-{
- Standard_Boolean bRet=Standard_False;
- //
- switch (aST2) {
- case GEOMAlgo_ST_IN:
- if (aST1==TopAbs_IN) {
- bRet=!bRet;
- }
- break;
- case GEOMAlgo_ST_OUT:
- if (aST1==TopAbs_OUT) {
- bRet=!bRet;
- }
- break;
- case GEOMAlgo_ST_ON:
- if (aST1==TopAbs_ON) {
- bRet=!bRet;
- }
- break;
- case GEOMAlgo_ST_ONIN:
- if (aST1==TopAbs_ON || aST1==TopAbs_IN) {
- bRet=!bRet;
- }
- break;
- case GEOMAlgo_ST_ONOUT:
- if (aST1==TopAbs_ON || aST1==TopAbs_OUT) {
- bRet=!bRet;
- }
- break;
- default:
- break;
- }
- return bRet;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_SurfaceTools.hxx
-// Created: Thu Jan 27 11:05:16 2005
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_SurfaceTools_HeaderFile
-#define _GEOMAlgo_SurfaceTools_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Boolean.hxx>
-#include <Handle_Geom_Surface.hxx>
-#include <Standard_Real.hxx>
-#include <TopAbs_State.hxx>
-#include <GEOMAlgo_State.hxx>
-#include <Standard_Integer.hxx>
-#include <Geom_Surface.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Cylinder.hxx>
-#include <GeomAdaptor_Surface.hxx>
-#include <gp_Pln.hxx>
-#include <gp_Sphere.hxx>
-
-
-//=======================================================================
-//function : GEOMAlgo_SurfaceTools
-//purpose :
-//=======================================================================
-class GEOMAlgo_SurfaceTools
-{
- public:
- Standard_EXPORT
- static Standard_Boolean IsAnalytic(const Handle(Geom_Surface)& aS) ;
-
- Standard_EXPORT
- static Standard_Boolean IsCoaxial(const gp_Pnt& aP1,
- const gp_Pnt& aP2,
- const gp_Cylinder& aCyl,
- const Standard_Real aTol) ;
-
- Standard_EXPORT
- static Standard_Boolean IsConformState(const TopAbs_State aST1,
- const GEOMAlgo_State aST2) ;
-
- Standard_EXPORT
- static Standard_Integer GetState(const gp_Pnt& aP,
- const GeomAdaptor_Surface& aS,
- const Standard_Real aTol,TopAbs_State& aSt) ;
-
- Standard_EXPORT
- static Standard_Integer GetState(const gp_Pnt& aP,
- const Handle(Geom_Surface)& aS,
- const Standard_Real aTol,
- TopAbs_State& aSt) ;
-
- Standard_EXPORT
- static Standard_Real Distance(const gp_Pnt& aP,
- const gp_Pln& aPln) ;
-
- Standard_EXPORT
- static Standard_Real Distance(const gp_Pnt& aP,
- const gp_Cylinder& aCyl) ;
-
- Standard_EXPORT
- static Standard_Real Distance(const gp_Pnt& aP,
- const gp_Sphere& aSph) ;
-
- Standard_EXPORT
- static TopAbs_State ReverseState(const TopAbs_State aSt) ;
-
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Tools.cxx
-// Created: Mon Dec 6 11:35:29 2004
-// Author: Peter KURNEV
-
-#include <GEOMAlgo_Tools.hxx>
-
-#include <gp.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Pnt2d.hxx>
-#include <gp_Vec2d.hxx>
-#include <gp_Dir2d.hxx>
-
-#include <Geom2d_Curve.hxx>
-#include <Geom2d_TrimmedCurve.hxx>
-
-#include <Geom_Curve.hxx>
-#include <Geom_Surface.hxx>
-
-#include <GeomAdaptor_Surface.hxx>
-
-#include <GeomAPI_ProjectPointOnSurf.hxx>
-#include <GeomAPI_ProjectPointOnCurve.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Iterator.hxx>
-
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-#include <BRepTools.hxx>
-
-#include <BOPTools_Tools2D.hxx>
-#include <IntTools_Context.hxx>
-
-#include <GEOMAlgo_PassKeyShape.hxx>
-#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-
-static
- void GetCount(const TopoDS_Shape& aS,
- Standard_Integer& iCnt);
-
-//=======================================================================
-//function : IsCompositeShape
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_Tools::IsCompositeShape(const TopoDS_Shape& aS)
-{
- Standard_Boolean bRet;
- Standard_Integer iCnt;
- TopoDS_Iterator aIt;
- //
- iCnt=0;
- GetCount(aS, iCnt);
- bRet=(iCnt>1);
- //
- return bRet;
-}
-
-//=======================================================================
-//function : GetCount
-//purpose :
-//=======================================================================
-void GetCount(const TopoDS_Shape& aS,
- Standard_Integer& iCnt)
-{
- TopoDS_Iterator aIt;
- TopAbs_ShapeEnum aTS;
- //
- aTS=aS.ShapeType();
- //
- if (aTS==TopAbs_SHAPE) {
- return;
- }
- if (aTS!=TopAbs_COMPOUND) {
- ++iCnt;
- return;
- }
- //
- aIt.Initialize(aS);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aSx=aIt.Value();
- GetCount(aSx, iCnt);
- }
-}
-
-//=======================================================================
-//function : RefineSDShapes
-//purpose :
-//=======================================================================
- Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE,
- const Standard_Real aTol,
- const Handle(IntTools_Context)& aCtx)
-{
- Standard_Integer i, aNbE, iErr, j, aNbEE, aNbToAdd;
- TopTools_IndexedDataMapOfShapeListOfShape aMEE, aMSDE, aMEToAdd;
- //
- iErr=1;
- //
- aNbE=aMPKLE.Extent();
- for (i=1; i<=aNbE; ++i) {
- TopTools_ListOfShape& aLSDE=aMPKLE.ChangeFromIndex(i);
- //
- aMEE.Clear();
- iErr=GEOMAlgo_Tools::FindSDShapes(aLSDE, aTol, aMEE, aCtx);
- if (iErr) {
- return iErr;
- }
- //
- aNbEE=aMEE.Extent();
- if (aNbEE==1) {
- continue; // nothing to do
- }
- //
- for (j=1; j<=aNbEE; ++j) {
- TopTools_ListOfShape& aLEE=aMEE.ChangeFromIndex(j);
- //
- if (j==1) {
- aLSDE.Clear();
- aLSDE.Append(aLEE);
- }
- else {
- const TopoDS_Shape& aE1=aLEE.First();
- aMEToAdd.Add(aE1, aLEE);
- }
- }
- }
- //
- aNbToAdd=aMEToAdd.Extent();
- if (!aNbToAdd) {
- return aNbToAdd;
- }
- //
- for (i=1; i<=aNbToAdd; ++i) {
- GEOMAlgo_PassKeyShape aPKE1;
- //
- const TopoDS_Shape& aE1=aMEToAdd.FindKey(i);
- const TopTools_ListOfShape& aLE=aMEToAdd(i);
- //
- //qf
- //aPKE1.SetIds(aE1);
- aPKE1.SetShapes(aE1);
- //qt
- aMPKLE.Add(aPKE1, aLE);
- }
- //
- return 0;
-}
-//=======================================================================
-//function : FindSDShapes
-//purpose :
-//=======================================================================
-Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopTools_ListOfShape& aLE,
- const Standard_Real aTol,
- TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
- const Handle(IntTools_Context)& aCtx)
-{
- Standard_Integer aNbE, aNbEProcessed, aNbESD, iErr;
- TopTools_ListOfShape aLESD;
- TopTools_ListIteratorOfListOfShape aIt, aIt1;
- TopTools_IndexedMapOfShape aMProcessed;
- TopAbs_ShapeEnum aType;
- //
- aNbE=aLE.Extent();
- if (!aNbE) {
- return 3; // Err
- }
- //modified by NIZNHY-PKV Thu Dec 30 10:56:52 2004 f
- if (aNbE==1) {
- return 0; // Nothing to do
- }
- //modified by NIZNHY-PKV Thu Dec 30 10:56:56 2004 t
- //
- while(1) {
- aNbEProcessed=aMProcessed.Extent();
- if (aNbEProcessed==aNbE) {
- break;
- }
- //
- aIt.Initialize(aLE);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- //
- if (aMProcessed.Contains(aS)) {
- continue;
- }
- //
- //modified by NIZNHY-PKV Thu Dec 30 10:57:01 2004 f
- aType=aS.ShapeType();
- if (aType==TopAbs_EDGE) {
- const TopoDS_Edge& aE=TopoDS::Edge(aS);
- if (BRep_Tool::Degenerated(aE)) {
- aMProcessed.Add(aE);
- continue;
- }
- }
- //modified by NIZNHY-PKV Thu Dec 30 10:57:03 2004 t
- //
- aLESD.Clear();
- iErr=GEOMAlgo_Tools::FindSDShapes(aS, aLE, aTol, aLESD, aCtx);
- if (iErr) {
- return 2; // Err
- }
- //
- aNbESD=aLESD.Extent();
- if (!aNbESD) {
- return 1; // Err
- }
- //
- aMEE.Add(aS, aLESD);
- //
- aIt1.Initialize(aLESD);
- for (; aIt1.More(); aIt1.Next()) {
- const TopoDS_Shape& aE1=aIt1.Value();
- aMProcessed.Add(aE1);
- }
- }
- }
- return 0;
-}
-//=======================================================================
-//function : FindSDShapes
-//purpose :
-//=======================================================================
-Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopoDS_Shape& aE1,
- const TopTools_ListOfShape& aLE,
- const Standard_Real aTol,
- TopTools_ListOfShape& aLESD,
- const Handle(IntTools_Context)& aCtx)
-{
- Standard_Boolean bIsDone;
- Standard_Real aTol2, aD2;
- gp_Pnt aP1, aP2;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- aTol2=aTol*aTol;
- GEOMAlgo_Tools::PointOnShape(aE1, aP1);
- //
- aIt.Initialize(aLE);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aE2=aIt.Value();
- if (aE2.IsSame(aE1)) {
- aLESD.Append(aE2);
- }
- else {
- bIsDone=GEOMAlgo_Tools::ProjectPointOnShape(aP1, aE2, aP2, aCtx);
- if (!bIsDone) {
- //return 1;
- continue; // jfa BUG 20361
- }
- aD2=aP1.SquareDistance(aP2);
- if(aD2<aTol2) {
- aLESD.Append(aE2);
- }
- }
- }
- return 0;
-}
-
-//=======================================================================
-//function : ProjectPointOnShape
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_Tools::ProjectPointOnShape(const gp_Pnt& aP1,
- const TopoDS_Shape& aS,
- gp_Pnt& aP2,
- const Handle(IntTools_Context)& aCtx)
-{
- Standard_Boolean bIsDone = Standard_False;
- Standard_Real aT2;
- TopAbs_ShapeEnum aType;
- //
- aType = aS.ShapeType();
- switch (aType)
- {
- case TopAbs_EDGE:
- {
- const TopoDS_Edge& aE2 = TopoDS::Edge(aS);
- //
- if (BRep_Tool::Degenerated(aE2)) { // jfa
- return Standard_True;
- }
- else {
- Standard_Real f, l;
- Handle(Geom_Curve) aC3D = BRep_Tool::Curve (aE2, f, l);
- if (aC3D.IsNull()) {
- return Standard_True;
- }
- bIsDone = aCtx->ProjectPointOnEdge(aP1, aE2, aT2);
- }
- if (!bIsDone) {
- return bIsDone;
- }
- //
- GEOMAlgo_Tools::PointOnEdge(aE2, aT2, aP2);
- }
- break;
- //
- case TopAbs_FACE:
- {
- const TopoDS_Face& aF2 = TopoDS::Face(aS);
- GeomAPI_ProjectPointOnSurf& aProj = aCtx->ProjPS(aF2);
- //
- aProj.Perform(aP1);
- bIsDone = aProj.IsDone();
- if (!bIsDone) {
- return bIsDone;
- }
- //
- aP2 = aProj.NearestPoint();
- }
- break;
- //
- default:
- break; // Err
- }
- return bIsDone;
-}
-//=======================================================================
-//function : PointOnShape
-//purpose :
-//=======================================================================
-void GEOMAlgo_Tools::PointOnShape(const TopoDS_Shape& aS,
- gp_Pnt& aP3D)
-{
- TopAbs_ShapeEnum aType;
- //
- aP3D.SetCoord(99.,99.,99.);
- aType=aS.ShapeType();
- switch(aType) {
- case TopAbs_EDGE: {
- const TopoDS_Edge& aE=TopoDS::Edge(aS);
- GEOMAlgo_Tools::PointOnEdge(aE, aP3D);
- }
- break;
- //
- case TopAbs_FACE: {
- const TopoDS_Face& aF=TopoDS::Face(aS);
- GEOMAlgo_Tools::PointOnFace(aF, aP3D);
- }
- break;
- //
- default:
- break; // Err
- }
-}
-//=======================================================================
-//function : PointOnFace
-//purpose :
-//=======================================================================
-void GEOMAlgo_Tools::PointOnFace(const TopoDS_Face& aF,
- gp_Pnt& aP3D)
-{
- Standard_Real aU, aV, aUMin, aUMax, aVMin, aVMax;
- //
- BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax);
- //
- aU=BOPTools_Tools2D::IntermediatePoint(aUMin, aUMax);
- aV=BOPTools_Tools2D::IntermediatePoint(aVMin, aVMax);
- //
- GEOMAlgo_Tools::PointOnFace(aF, aU, aV, aP3D);
-}
-//=======================================================================
-//function : PointOnFace
-//purpose :
-//=======================================================================
-void GEOMAlgo_Tools::PointOnFace(const TopoDS_Face& aF,
- const Standard_Real aU,
- const Standard_Real aV,
- gp_Pnt& aP3D)
-{
- Handle(Geom_Surface) aS;
- //
- aS=BRep_Tool::Surface(aF);
- aS->D0(aU, aV, aP3D);
-}
-//=======================================================================
-//function : PointOnEdge
-//purpose :
-//=======================================================================
-void GEOMAlgo_Tools::PointOnEdge(const TopoDS_Edge& aE,
- gp_Pnt& aP3D)
-{
- Standard_Real aTx, aT1, aT2;
- //
- BRep_Tool::Curve(aE, aT1, aT2);
- aTx=BOPTools_Tools2D::IntermediatePoint(aT1, aT2);
- GEOMAlgo_Tools::PointOnEdge(aE, aTx, aP3D);
-}
-//=======================================================================
-//function : PointOnEdge
-//purpose :
-//=======================================================================
-void GEOMAlgo_Tools::PointOnEdge(const TopoDS_Edge& aE,
- const Standard_Real aT,
- gp_Pnt& aP3D)
-{
- Standard_Real aT1, aT2;
- Handle(Geom_Curve) aC3D;
- //
- aC3D=BRep_Tool::Curve(aE, aT1, aT2);
- aC3D->D0(aT, aP3D);
-}
-//=======================================================================
-//function : RefinePCurveForEdgeOnFace
-//purpose :
-//=======================================================================
-void GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
- const Standard_Real aUMin,
- const Standard_Real aUMax)
-{
- Standard_Real aT1, aT2, aTx, aUx, aTol;
- gp_Pnt2d aP2D;
- Handle(Geom_Surface) aS;
- Handle(Geom2d_Curve) aC2D;
- BRep_Builder aBB;
- //
- aC2D=BRep_Tool::CurveOnSurface(aE, aF, aT1, aT2);
- if (!aC2D.IsNull()) {
- if (BRep_Tool::IsClosed(aE, aF)) {
- return;
- }
- aTx=BOPTools_Tools2D::IntermediatePoint(aT1, aT2);
- aC2D->D0(aTx, aP2D);
- aUx=aP2D.X();
- if (aUx < aUMin || aUx > aUMax) {
- // need to rebuild
- Handle(Geom2d_Curve) aC2Dx;
- //
- aTol=BRep_Tool::Tolerance(aE);
- aBB.UpdateEdge(aE, aC2Dx, aF, aTol);
- }
- }
-}
-//=======================================================================
-//function : IsUPeriodic
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_Tools::IsUPeriodic(const Handle(Geom_Surface) &aS)
-{
- Standard_Boolean bRet;
- GeomAbs_SurfaceType aType;
- GeomAdaptor_Surface aGAS;
- //
- aGAS.Load(aS);
- aType=aGAS.GetType();
- bRet=(aType==GeomAbs_Cylinder||
- aType==GeomAbs_Cone ||
- aType==GeomAbs_Sphere);
- //
- return bRet;
-}
-
-//modified by NIZNHY-PKV Fri Feb 03 11:16:35 2012f
-//=======================================================================
-//function : BuildPCurveForEdgeOnFace
-//purpose :
-//=======================================================================
-Standard_Integer
- GEOMAlgo_Tools::BuildPCurveForEdgeOnFace(const TopoDS_Edge& aEold,
- const TopoDS_Edge& aEnew,
- const TopoDS_Face& aF,
- const Handle(IntTools_Context)& aCtx)
-{
- Standard_Boolean bIsClosed, bUClosed, bHasOld;
- Standard_Integer iRet, aNbPoints;
- Standard_Real aTS, aTS1, aTS2, aT, aT1, aT2, aScPr, aTol;
- Standard_Real aU, aV, aUS1, aVS1, aUS2, aVS2;
- gp_Pnt aP;
- gp_Pnt2d aP2DS1, aP2DS2, aP2D;
- gp_Vec2d aV2DS1, aV2DS2;
- Handle(Geom2d_Curve) aC2D, aC2DS1, aC2DS2;
- Handle(Geom_Surface) aS;
- TopoDS_Edge aES;
- //
- iRet=0;
- //
- bHasOld=BOPTools_Tools2D::HasCurveOnSurface(aEnew, aF, aC2D, aT1, aT2, aTol);
- if (bHasOld) {
- return iRet;
- }
- //
- BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aEnew, aF);
- aC2D=BRep_Tool::CurveOnSurface(aEnew, aF, aT1, aT2);
- if (aC2D.IsNull()){
- iRet=1;
- return iRet;
- }
- //
- bIsClosed=BRep_Tool::IsClosed(aEold, aF);
- if (!bIsClosed) {
- return iRet;
- }
- //
- aTol=1.e-7;
- //
- // 1. bUClosed - direction of closeness
- //
- aES=aEold;
- aES.Orientation(TopAbs_FORWARD);
- aC2DS1=BRep_Tool::CurveOnSurface(aES, aF, aTS1, aTS2);
- //
- aES.Orientation(TopAbs_REVERSED);
- aC2DS2=BRep_Tool::CurveOnSurface(aES, aF, aTS1, aTS2);
- //
- aTS=BOPTools_Tools2D::IntermediatePoint(aTS1, aTS2);
- //
- aC2DS1->D1(aTS, aP2DS1, aV2DS1);
- aC2DS2->D1(aTS, aP2DS2, aV2DS2);
- //
- gp_Vec2d aV2DS12(aP2DS1, aP2DS2);
- gp_Dir2d aD2DS12(aV2DS12);
- const gp_Dir2d& aD2DX=gp::DX2d();
- //
- aScPr=aD2DS12*aD2DX;
- bUClosed=Standard_True;
- if (fabs(aScPr) < aTol) {
- bUClosed=!bUClosed;
- }
- //
- // 2. aP2D - point on curve aC2D, that corresponds to aP2DS1
- aP2DS1.Coord(aUS1, aVS1);
- aP2DS2.Coord(aUS2, aVS2);
- //
- aS=BRep_Tool::Surface(aF);
- aS->D0(aUS1, aVS1, aP);
- //
- GeomAPI_ProjectPointOnCurve& aProjPC=aCtx->ProjPC(aEnew);
- //
- aProjPC.Perform(aP);
- aNbPoints=aProjPC.NbPoints();
- if (!aNbPoints) {
- iRet=2;
- return iRet;
- }
- //
- aT=aProjPC.LowerDistanceParameter();
-
- //
- // 3. Build the second 2D curve
- Standard_Boolean bRevOrder;
- gp_Vec2d aV2DT, aV2D;
- Handle(Geom2d_Curve) aC2Dnew;
- Handle(Geom2d_TrimmedCurve) aC2DTnew;
- BRep_Builder aBB;
- //
- aC2D->D1(aT, aP2D, aV2D);
- aP2D.Coord(aU, aV);
- //
- aC2Dnew=Handle(Geom2d_Curve)::DownCast(aC2D->Copy());
- aC2DTnew = new Geom2d_TrimmedCurve(aC2Dnew, aT1, aT2);
- //
- aV2DT=aV2DS12;
- if (!bUClosed) { // V Closed
- if (fabs(aV-aVS2)<aTol) {
- aV2DT.Reverse();
- }
- }
- else { // U Closed
- if (fabs(aU-aUS2)<aTol) {
- aV2DT.Reverse();
- }
- }
- //
- aC2DTnew->Translate(aV2DT);
- //
- // 4 Order the 2D curves
- bRevOrder=Standard_False;
- aScPr=aV2D*aV2DS1;
- if(aScPr<0.) {
- bRevOrder=!bRevOrder;
- }
- //
- // 5. Update the edge
- aTol=BRep_Tool::Tolerance(aEnew);
- if (!bRevOrder) {
- aBB.UpdateEdge(aEnew, aC2D, aC2DTnew, aF, aTol);
- }
- else {
- aBB.UpdateEdge(aEnew, aC2DTnew, aC2D , aF, aTol);
- }
- //
- return iRet;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Tools.hxx
-// Created: Mon Dec 6 11:35:29 2004
-// Author: Peter KURNEV
-
-#ifndef _GEOMAlgo_Tools_HeaderFile
-#define _GEOMAlgo_Tools_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Real.hxx>
-#include <Handle_IntTools_Context.hxx>
-#include <Handle_Geom_Surface.hxx>
-#include <TopoDS_Shape.hxx>
-#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-#include <IntTools_Context.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <gp_Pnt.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Face.hxx>
-#include <Geom_Surface.hxx>
-
-//=======================================================================
-//class : GEOMAlgo_Tools
-//purpose :
-//=======================================================================
-class GEOMAlgo_Tools
- {
-public:
- Standard_EXPORT
- static Standard_Boolean IsCompositeShape(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- static Standard_Integer RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD,
- const Standard_Real aTol,
- const Handle(IntTools_Context)& aCtx) ;
-
- Standard_EXPORT
- static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,
- const Standard_Real aTol,
- TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
- const Handle(IntTools_Context)& aCtx) ;
-
- Standard_EXPORT
- static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1,
- const TopTools_ListOfShape& aLE,
- const Standard_Real aTol,
- TopTools_ListOfShape& aLESD,
- const Handle(IntTools_Context)& aCtx) ;
-
- Standard_EXPORT
- static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1,
- const TopoDS_Shape& aS,gp_Pnt& aP2,
- const Handle(IntTools_Context)& aCtx) ;
-
- Standard_EXPORT
- static void PointOnShape(const TopoDS_Shape& aS,
- gp_Pnt& aP3D) ;
-
- Standard_EXPORT
- static void PointOnEdge(const TopoDS_Edge& aE,
- gp_Pnt& aP3D) ;
-
- Standard_EXPORT
- static void PointOnEdge(const TopoDS_Edge& aE,
- const Standard_Real aT,gp_Pnt& aP3D) ;
-
- Standard_EXPORT
- static void PointOnFace(const TopoDS_Face& aF,
- gp_Pnt& aP3D) ;
-
- Standard_EXPORT
- static void PointOnFace(const TopoDS_Face& aF,
- const Standard_Real aU,
- const Standard_Real aV,
- gp_Pnt& aP3D) ;
-
- Standard_EXPORT
- static void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
- const Standard_Real aU1,
- const Standard_Real aU2) ;
-
- Standard_EXPORT
- static Standard_Boolean IsUPeriodic(const Handle(Geom_Surface)& aS) ;
-
- Standard_EXPORT
- static Standard_Boolean CorrectWires(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- static Standard_Integer BuildPCurveForEdgeOnFace(const TopoDS_Edge& aE,
- const TopoDS_Edge& aEold,
- const TopoDS_Face& aF,
- const Handle(IntTools_Context)& aCtx) ;
-
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Tools3D.cxx
-// Created :
-// Author : Peter KURNEV
-
-#include <GEOMAlgo_Tools3D.hxx>
-
-#include <Precision.hxx>
-
-#include <gp_Vec.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Pnt2d.hxx>
-#include <gp_Pln.hxx>
-#include <gp_XYZ.hxx>
-#include <gp_Dir2d.hxx>
-
-#include <Geom_Curve.hxx>
-#include <Geom_Surface.hxx>
-
-#include <Geom2d_Curve.hxx>
-#include <Geom2d_TrimmedCurve.hxx>
-#include <Geom2d_Line.hxx>
-
-#include <Geom2dHatch_Intersector.hxx>
-#include <Geom2dHatch_Hatcher.hxx>
-#include <HatchGen_Domain.hxx>
-
-#include <GeomAPI_ProjectPointOnSurf.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-#include <TopAbs_State.hxx>
-
-#include <TopLoc_Location.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_CompSolid.hxx>
-#include <TopoDS_Wire.hxx>
-#include <TopoDS_Compound.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Solid.hxx>
-#include <TopoDS_Shell.hxx>
-#include <TopoDS_Iterator.hxx>
-
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <BRep_Builder.hxx>
-#include <BRep_Tool.hxx>
-//
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-
-#include <BRepClass3d_SolidClassifier.hxx>
-#include <BRepTools.hxx>
-
-#include <IntTools_Context.hxx>
-#include <IntTools_Tools.hxx>
-
-#include <BOPTools_Tools3D.hxx>
-#include <BOPTools_Tools2D.hxx>
-#include <BOPTools_Tools.hxx>
-
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-#include <NMTTools_CoupleOfShape.hxx>
-#include <TopTools_DataMapOfShapeListOfShape.hxx>
-#include <TopTools_DataMapOfShapeListOfShape.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
-//
-#include <GeomAdaptor_Surface.hxx>
-
-
-//
-static
- Standard_Boolean FindFacePairs (const TopoDS_Edge& ,
- const TopTools_ListOfShape& ,
- NMTTools_ListOfCoupleOfShape& );
-
-
-static
- Standard_Real AngleWithRef(const gp_Dir& ,
- const gp_Dir& ,
- const gp_Dir& );
-
-static
- void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
- Standard_Real aT,
- gp_Pnt& aPF,
- gp_Dir& aDNF,
- const Handle(IntTools_Context)& aCtx);
-
-//=======================================================================
-//function : IsInternalFace
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_Tools3D::IsInternalFace(const TopoDS_Face& theFace,
- const TopoDS_Solid& theSolid,
- const TopTools_IndexedDataMapOfShapeListOfShape& theMEF,
- const Standard_Real theTol,
- const Handle(IntTools_Context)& theContext)
-{
- Standard_Boolean bRet;
- Standard_Integer aNbF;
- TopoDS_Edge aEL;
- TopExp_Explorer aExp;
- TopTools_ListIteratorOfListOfShape aItF;
- //
- bRet=Standard_False;
- //
- // 1 Try to find an edge from theFace in theMEF
- aExp.Init(theFace, TopAbs_EDGE);
- for(; aExp.More(); aExp.Next()) {
- const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current());
- if (!theMEF.Contains(aE)) {
- continue;
- }
- //
- const TopTools_ListOfShape& aLF=theMEF.FindFromKey(aE);
- aNbF=aLF.Extent();
- if (!aNbF) {
- return bRet; // it can not be so
- }
- else if (aNbF==1) {
- // aE is internal edge on aLF.First()
- const TopoDS_Face& aF1=TopoDS::Face(aLF.First());
- bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, aE, aF1, aF1, theContext);
- return bRet;
- }
- else if (aNbF==2) {
- const TopoDS_Face& aF1=TopoDS::Face(aLF.First());
- const TopoDS_Face& aF2=TopoDS::Face(aLF.Last());
- //
- if (aF2.IsSame(aF1) && BRep_Tool::IsClosed(aE, aF1)) {
- // treat as it was for 1 face
- bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, aE, aF1, aF2, theContext);
- return bRet;
- }
- }
- if (aNbF%2) {
- return bRet; // it can not be so
- }
- else { // aNbF=2,4,6,8,...
- bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, aE, aLF, theContext);
- return bRet;
- }
- }//for(; aExp.More(); aExp.Next()) {
- //
- //========================================
- // 2. Classify face using classifier
- //
- TopAbs_State aState;
- TopTools_IndexedMapOfShape aBounds;
- //
- aState=GEOMAlgo_Tools3D::ComputeState(theFace, theSolid, theTol, aBounds, theContext);
- bRet=(aState==TopAbs_IN);
- //
- return bRet;
-}
-//=======================================================================
-//function : IsInternalFace
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_Tools3D::IsInternalFace(const TopoDS_Face& theFace,
- const TopoDS_Edge& theEdge,
- const TopTools_ListOfShape& theLF,
- const Handle(IntTools_Context)& theContext)
-{
- Standard_Boolean bRet;
- Standard_Boolean aNbF;
- //
- bRet=Standard_False;
- //
- aNbF=theLF.Extent();
- if (aNbF==2) {
- const TopoDS_Face& aF1=TopoDS::Face(theLF.First());
- const TopoDS_Face& aF2=TopoDS::Face(theLF.Last());
- bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, theEdge, aF1, aF2, theContext);
- return bRet;
- }
- //
- else {
- NMTTools_ListOfCoupleOfShape aLCFF;
- NMTTools_ListIteratorOfListOfCoupleOfShape aIt;
- //
- FindFacePairs(theEdge, theLF, aLCFF);
- //
- aIt.Initialize(aLCFF);
- for (; aIt.More(); aIt.Next()) {
- const NMTTools_CoupleOfShape& aCSFF=aIt.Value();
- //
- const TopoDS_Face& aF1=TopoDS::Face(aCSFF.Shape1());
- const TopoDS_Face& aF2=TopoDS::Face(aCSFF.Shape2());
- bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, theEdge, aF1, aF2, theContext);
- if (bRet) {
- return bRet;
- }
- }
- }
- return bRet;
-}
-//=======================================================================
-//function : IsInternalFace
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_Tools3D::IsInternalFace(const TopoDS_Face& theFace,
- const TopoDS_Edge& theEdge,
- const TopoDS_Face& theFace1,
- const TopoDS_Face& theFace2,
- const Handle(IntTools_Context)& theContext)
-{
- Standard_Boolean bRet;
- Standard_Real aT1, aT2, aT, aDt2D, aDt2Dx;
- Standard_Real aA12, aA1x, aTwoPI;
- gp_Pnt aPx, aPF, aPF1, aPF2;
- gp_Pnt2d aP2D, aPF2D;
- gp_Dir aDNF1, aDNF2;
- TopoDS_Edge aE1, aE2;
- Handle(Geom_Curve)aC3D;
- //
- aC3D =BRep_Tool::Curve(theEdge, aT1, aT2);
- aT=BOPTools_Tools2D::IntermediatePoint(aT1, aT2);
- aC3D->D0(aT, aPx);
- //
- // 1. PF
- aDt2D=BOPTools_Tools3D::MinStepIn2d();
- aDt2Dx=10.*aDt2D;
- BOPTools_Tools3D::PointNearEdge (theEdge, theFace, aT, aDt2Dx, aPF2D, aPF);
- //
- // 2. E1, E2
- GEOMAlgo_Tools3D::GetEdgeOnFace(theEdge, theFace1, aE1);
- if (aE1.Orientation()==TopAbs_INTERNAL) {
- aE2=aE1;
- aE1.Orientation(TopAbs_FORWARD);
- aE2.Orientation(TopAbs_REVERSED);
- }
- else if (theFace1==theFace2) {
- aE2=aE1;
- aE1.Orientation(TopAbs_FORWARD);
- aE2.Orientation(TopAbs_REVERSED);
- }
- else {
- GEOMAlgo_Tools3D::GetEdgeOnFace(theEdge, theFace2, aE2);
- }
- //
- // 3
- bRet=Standard_False;
- //
- GetApproxNormalToFaceOnEdge (aE1, theFace1, aT, aPF1, aDNF1, theContext);
- GetApproxNormalToFaceOnEdge (aE2, theFace2, aT, aPF2, aDNF2, theContext);
- //
- aTwoPI = 2.*M_PI;
- gp_Vec aVBF (aPx, aPF );
- gp_Vec aVBF1(aPx, aPF1);
- gp_Vec aVBF2(aPx, aPF2);
- //
- gp_Dir aDTF1;
- gp_Dir aDBF (aVBF);
- gp_Dir aDBF1(aVBF1);
- gp_Dir aDBF2(aVBF2);
- //
- aDTF1=aDNF1^aDBF1;
- aA12=AngleWithRef(aDBF1, aDBF2, aDTF1);
- if (aA12<0.) {
- aA12=aA12+aTwoPI;
- }
-
- aA1x=AngleWithRef(aDBF1, aDBF , aDTF1);
- if (aA1x<0.) {
- aA1x=aA1x+aTwoPI;
- }
- //
- if (aA1x<aA12) {
- bRet=!bRet; //TopAbs_IN;
- }
- //
- return bRet;
-}
-//=======================================================================
-//function : GetFaceOff
-//purpose :
-//=======================================================================
- void GEOMAlgo_Tools3D::GetFaceOff(const TopoDS_Edge& theE1,
- const TopoDS_Face& theF1,
- const NMTTools_ListOfCoupleOfShape& theLCSOff,
- TopoDS_Face& theFOff)
-{
- Standard_Real aT, aT1, aT2, aAngle, aTwoPI, aAngleMin;
- gp_Pnt aPn1, aPn2;
- gp_Vec aVTgt;
- gp_Dir aDN1, aDN2;
- NMTTools_ListIteratorOfListOfCoupleOfShape aIt;
- //
- aAngleMin=100.;
- aTwoPI = M_PI+M_PI;
- BRep_Tool::Range(theE1, aT1, aT2);
- aT=BOPTools_Tools2D::IntermediatePoint(aT1, aT2);
- // Ref
- BOPTools_Tools2D::EdgeTangent(theE1, aT, aVTgt);
- gp_Dir aDTtgt(aVTgt);
- aDTtgt.Reverse();
- // N1
- BOPTools_Tools3D::GetApproxNormalToFaceOnEdge(theE1, theF1, aT, aPn1, aDN1);
- //
- aIt.Initialize(theLCSOff);
- for (; aIt.More(); aIt.Next()) {
- const NMTTools_CoupleOfShape& aCS=aIt.Value();
- const TopoDS_Edge& aE2=TopoDS::Edge(aCS.Shape1());
- const TopoDS_Face& aF2=TopoDS::Face(aCS.Shape2());
- //
- if (aF2==theF1) {
- aAngle=M_PI;
- }
- else if (aF2.IsSame(theF1)) {
- aAngle=aTwoPI;
- }
- else {
- BOPTools_Tools3D::GetApproxNormalToFaceOnEdge (aE2, aF2, aT, aPn2, aDN2);
- aDN2.Reverse();
- // Angle
- aAngle=AngleWithRef(aDN1, aDN2, aDTtgt);
- if(aAngle<0.) {
- aAngle=aTwoPI+aAngle;
- }
- }
- //
- if (aAngle<aAngleMin){
- aAngleMin=aAngle;
- theFOff=aF2;
- }
- }
-}
-//=======================================================================
-//function : GetEdgeOnFace
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_Tools3D::GetEdgeOnFace(const TopoDS_Edge& theE1,
- const TopoDS_Face& theF2,
- TopoDS_Edge& theE2)
-{
- Standard_Boolean bFound;
- TopoDS_Iterator aItF, aItW;
- //
- bFound=Standard_False;
- //
- aItF.Initialize(theF2);
- for (; aItF.More(); aItF.Next()) {
- const TopoDS_Shape& aW=aItF.Value();
- aItW.Initialize(aW);
- for (; aItW.More(); aItW.Next()) {
- const TopoDS_Shape& aE=aItW.Value();
- if (aE.IsSame(theE1)) {
- theE2=TopoDS::Edge(aE);
- bFound=!bFound;
- return bFound;
- }
- }
- }
- return bFound;
-}
-//=======================================================================
-//function : GetEdgeOff
-//purpose :
-//=======================================================================
-Standard_Boolean GEOMAlgo_Tools3D::GetEdgeOff (const TopoDS_Edge& theE1,
- const TopoDS_Face& theF2,
- TopoDS_Edge& theE2)
-
-{
- Standard_Boolean bFound;
- TopAbs_Orientation aOr1, aOr1C, aOr2;
- TopExp_Explorer anExp;
- //
- bFound=Standard_False;
- aOr1=theE1.Orientation();
- aOr1C=TopAbs::Reverse(aOr1);
- //
- anExp.Init(theF2, TopAbs_EDGE);
- for (; anExp.More(); anExp.Next()) {
- const TopoDS_Edge& aEF2=TopoDS::Edge(anExp.Current());
- if (aEF2.IsSame(theE1)) {
- aOr2=aEF2.Orientation();
- if (aOr2==aOr1C) {
- theE2=aEF2;
- bFound=!bFound;
- return bFound;
- }
- }
- }
- return bFound;
-}
-//=======================================================================
-// function: ComputeState
-// purpose:
-//=======================================================================
- TopAbs_State GEOMAlgo_Tools3D::ComputeState(const TopoDS_Face& theF,
- const TopoDS_Solid& theRef,
- const Standard_Real theTol,
- const TopTools_IndexedMapOfShape& theBounds,
- const Handle(IntTools_Context)& theCtx)
-{
- TopAbs_State aState;
- TopExp_Explorer aExp;
- TopoDS_Edge aE1;
- gp_Pnt2d aP2D;
- gp_Pnt aP3D;
- //
- aState=TopAbs_UNKNOWN;
- //
- aExp.Init(theF, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- const TopoDS_Edge& aSE=TopoDS::Edge(aExp.Current());
- if (BRep_Tool::Degenerated(aSE)) {
- continue;
- }
- //
- if (!theBounds.Contains(aSE)) {
- const TopoDS_Edge& aE=TopoDS::Edge(aSE);
- aState= GEOMAlgo_Tools3D::ComputeState(aE, theRef, theTol, theCtx);
- return aState;
- }
- if (aE1.IsNull()) {
- aE1=TopoDS::Edge(aSE);
- }
- }
- // !!<- process edges that are all on theRef
- if (!aE1.IsNull()) {
- BOPTools_Tools3D::PointNearEdge(aE1, theF, aP2D, aP3D);
- aState=GEOMAlgo_Tools3D::ComputeState(aP3D, theRef, theTol, theCtx);
- }
- //
- return aState;
-}
-//=======================================================================
-// function: ComputeStateByOnePoint
-// purpose:
-//=======================================================================
- TopAbs_State GEOMAlgo_Tools3D::ComputeStateByOnePoint(const TopoDS_Shape& theS,
- const TopoDS_Solid& theRef,
- const Standard_Real theTol,
- const Handle(IntTools_Context)& theCtx)
-{
- TopAbs_State aState;
- TopAbs_ShapeEnum aType;
- //
- aState=TopAbs_UNKNOWN;
- aType=theS.ShapeType();
- if (aType==TopAbs_VERTEX) {
- const TopoDS_Vertex& aV=TopoDS::Vertex(theS);
- aState=GEOMAlgo_Tools3D::ComputeState(aV, theRef, theTol, theCtx);
- }
- else if (aType==TopAbs_EDGE) {
- const TopoDS_Edge& aE=TopoDS::Edge(theS);
- aState=GEOMAlgo_Tools3D::ComputeState(aE, theRef, theTol, theCtx);
- }
- return aState;
-}
-//=======================================================================
-// function: ComputeState
-// purpose:
-//=======================================================================
- TopAbs_State GEOMAlgo_Tools3D::ComputeState(const TopoDS_Vertex& theV,
- const TopoDS_Solid& theRef,
- const Standard_Real theTol,
- const Handle(IntTools_Context)& theCtx)
-{
- TopAbs_State aState;
- gp_Pnt aP3D;
- //
- aP3D=BRep_Tool::Pnt(theV);
- aState=GEOMAlgo_Tools3D::ComputeState(aP3D, theRef, theTol, theCtx);
- return aState;
-}
-//=======================================================================
-// function: ComputeState
-// purpose:
-//=======================================================================
- TopAbs_State GEOMAlgo_Tools3D::ComputeState(const TopoDS_Edge& theE,
- const TopoDS_Solid& theRef,
- const Standard_Real theTol,
- const Handle(IntTools_Context)& theCtx)
-{
- Standard_Real aT1, aT2, aT = 0.;
- TopAbs_State aState;
- Handle(Geom_Curve) aC3D;
- gp_Pnt aP3D;
- //
- aC3D = BRep_Tool::Curve(theE, aT1, aT2);
- //
- if(aC3D.IsNull()) {
- //it means that we are in degenerated edge
- const TopoDS_Vertex& aV = TopExp::FirstVertex(theE);
- if(aV.IsNull()){
- return TopAbs_UNKNOWN;
- }
- aP3D=BRep_Tool::Pnt(aV);
- }
- else {//usual case
- Standard_Boolean bF2Inf, bL2Inf;
- Standard_Real dT=10.;
- //
- bF2Inf = Precision::IsNegativeInfinite(aT1);
- bL2Inf = Precision::IsPositiveInfinite(aT2);
- //
- if (bF2Inf && !bL2Inf) {
- aT=aT2-dT;
- }
- else if (!bF2Inf && bL2Inf) {
- aT=aT1+dT;
- }
- else if (bF2Inf && bL2Inf) {
- aT=0.;
- }
- else {
- aT=IntTools_Tools::IntermediatePoint(aT1, aT2);
- }
- aC3D->D0(aT, aP3D);
- }
- //
- aState=GEOMAlgo_Tools3D::ComputeState(aP3D, theRef, theTol, theCtx);
- //
- return aState;
-}
-//=======================================================================
-// function: ComputeState
-// purpose:
-//=======================================================================
- TopAbs_State GEOMAlgo_Tools3D::ComputeState(const gp_Pnt& theP,
- const TopoDS_Solid& theRef,
- const Standard_Real theTol,
- const Handle(IntTools_Context)& theCtx)
-{
- TopAbs_State aState;
- //
- BRepClass3d_SolidClassifier& aSC=theCtx->SolidClassifier(theRef);
- aSC.Perform(theP, theTol);
- //
- aState=aSC.State();
- //
- return aState;
-}
-//=======================================================================
-// function: IsSplitToReverse
-// purpose:
-//=======================================================================
- Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse(const TopoDS_Shape& theSp,
- const TopoDS_Shape& theSr,
- const Handle(IntTools_Context)& theCtx)
-{
- Standard_Boolean bRet;
- TopAbs_ShapeEnum aType;
- //
- bRet=Standard_False;
- //
- aType=theSp.ShapeType();
- switch (aType) {
- case TopAbs_EDGE: {
- const TopoDS_Edge& aESp=TopoDS::Edge(theSp);
- const TopoDS_Edge& aESr=TopoDS::Edge(theSr);
- bRet=GEOMAlgo_Tools3D::IsSplitToReverse(aESp, aESr, theCtx);
- }
- break;
- //
- case TopAbs_FACE: {
- const TopoDS_Face& aFSp=TopoDS::Face(theSp);
- const TopoDS_Face& aFSr=TopoDS::Face(theSr);
- bRet=GEOMAlgo_Tools3D::IsSplitToReverse(aFSp, aFSr, theCtx);
- }
- break;
- //
- default:
- break;
- }
- return bRet;
-}
-//=======================================================================
-//function :IsSplitToReverse
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse(const TopoDS_Face& theFSp,
- const TopoDS_Face& theFSr,
- const Handle(IntTools_Context)& theContext)
-{
- Standard_Boolean bRet, bFound, bInFace;
- Standard_Real aT1, aT2, aT, aU, aV, aScPr;
- gp_Pnt aPFSp, aPFSr;
- gp_Dir aDNFSp;
- gp_Vec aD1U, aD1V;
- Handle(Geom_Surface) aSr, aSp;
- TopAbs_Orientation aOrSr, aOrSp;
- TopExp_Explorer anExp;
- TopoDS_Edge aESp;
- //
- bRet=Standard_False;
- //
- aSr=BRep_Tool::Surface(theFSr);
- aSp=BRep_Tool::Surface(theFSp);
- if (aSr==aSp) {
- aOrSr=theFSr.Orientation();
- aOrSp=theFSp.Orientation();
- bRet=(aOrSr!=aOrSp);
- return bRet;
- }
- //
- bFound=Standard_False;
- anExp.Init(theFSp, TopAbs_EDGE);
- for (; anExp.More(); anExp.Next()) {
- aESp=TopoDS::Edge(anExp.Current());
- if (!BRep_Tool::Degenerated(aESp)) {
- if (!BRep_Tool::IsClosed(aESp, theFSp)) {
- bFound=!bFound;
- break;
- }
- }
- }
- //
- //modified by NIZNHY-PKV Tue Nov 22 10:50:30 2011f
- if (!bFound) {
- Standard_Boolean bFlag;
- Standard_Integer iErr;
- gp_Pnt2d aP2DFSp;
- //
- iErr=GEOMAlgo_Tools3D::PntInFace(theFSp, aPFSp, aP2DFSp);
- if (iErr) {
- return bRet;
- }
- //
- aP2DFSp.Coord(aU, aV);
- bFlag=BOPTools_Tools3D::GetNormalToSurface(aSp, aU, aV, aDNFSp);
- if (!bFlag) {
- return bRet;
- }
- }
- else {
- BRep_Tool::Range(aESp, aT1, aT2);
- aT=BOPTools_Tools2D::IntermediatePoint(aT1, aT2);
- BOPTools_Tools3D::GetApproxNormalToFaceOnEdge(aESp, theFSp, aT, aPFSp, aDNFSp);
- }
- //
- /*
- if (!bFound) {
- return bRet;
- }
- BRep_Tool::Range(aESp, aT1, aT2);
- aT=BOPTools_Tools2D::IntermediatePoint(aT1, aT2);
- BOPTools_Tools3D::GetApproxNormalToFaceOnEdge(aESp, theFSp, aT, aPFSp, aDNFSp);
- */
- //modified by NIZNHY-PKV Tue Nov 22 10:50:37 2011t
- //
- // Parts of theContext.ComputeVS(..)
- GeomAPI_ProjectPointOnSurf& aProjector=theContext->ProjPS(theFSr);
- aProjector.Perform(aPFSp);
- if (!aProjector.IsDone()) {
- return bRet;
- }
- //
- aProjector.LowerDistanceParameters(aU, aV);
- gp_Pnt2d aP2D(aU, aV);
- bInFace=theContext->IsPointInFace (theFSr, aP2D);
- if (!bInFace) {
- return bRet;
- }
- //
- aSr->D1(aU, aV, aPFSr, aD1U, aD1V);
- gp_Dir aDD1U(aD1U);
- gp_Dir aDD1V(aD1V);
- gp_Dir aDNFSr=aDD1U^aDD1V;
- if (theFSr.Orientation()==TopAbs_REVERSED){
- aDNFSr.Reverse();
- }
- //
- aScPr=aDNFSp*aDNFSr;
- bRet=(aScPr<0.);
- //
- return bRet;
-}
-//=======================================================================
-//function :IsSplitToReverse
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse(const TopoDS_Edge& theSplit,
- const TopoDS_Edge& theEdge,
- const Handle(IntTools_Context)& theContext)
-{
- Standard_Boolean bRet, aFlag, bIsDegenerated;
- Standard_Real aTE, aTS, aScPr, aTa, aTb, aT1, aT2;
- TopAbs_Orientation aOrSr, aOrSp;
- Handle(Geom_Curve) aCEdge, aCSplit;
- gp_Vec aVE, aVS;
- gp_Pnt aP;
- //
- bRet=Standard_False;
- //
- bIsDegenerated=(BRep_Tool::Degenerated(theSplit) ||
- BRep_Tool::Degenerated(theEdge));
- if (bIsDegenerated) {
- return bRet;
- }
- //
- aCEdge =BRep_Tool::Curve(theEdge , aT1, aT2);
- aCSplit=BRep_Tool::Curve(theSplit, aTa, aTb);
- //
- if (aCEdge==aCSplit) {
- aOrSr=theEdge.Orientation();
- aOrSp=theSplit.Orientation();
- bRet=(aOrSr!=aOrSp);
- return bRet;
- }
- //
- aTS=BOPTools_Tools2D::IntermediatePoint(aTa, aTb);
- aCSplit->D0(aTS, aP);
- aFlag=BOPTools_Tools2D::EdgeTangent(theSplit, aTS, aVS);
- gp_Dir aDTS(aVS);
- //
- aFlag=theContext->ProjectPointOnEdge(aP, theEdge, aTE);
- aFlag=BOPTools_Tools2D::EdgeTangent(theEdge, aTE, aVE);
- gp_Dir aDTE(aVE);
- //
- aScPr=aDTS*aDTE;
- bRet=(aScPr<0.);
- //
- return bRet;
-}
-
-//=======================================================================
-// function: Sense
-// purpose:
-//=======================================================================
- Standard_Integer GEOMAlgo_Tools3D::Sense (const TopoDS_Face& theF1,
- const TopoDS_Face& theF2)
-{
- Standard_Integer iSense=0;
- gp_Dir aDNF1, aDNF2;
- TopoDS_Edge aE1, aE2;
- TopExp_Explorer anExp;
- //
- anExp.Init(theF1, TopAbs_EDGE);
- for (; anExp.More(); anExp.Next()) {
- aE1=TopoDS::Edge(anExp.Current());
- if (!BRep_Tool::Degenerated(aE1)) {
- if (!BRep_Tool::IsClosed(aE1, theF1)) {
- break;
- }
- }
- }
- //
- anExp.Init(theF2, TopAbs_EDGE);
- for (; anExp.More(); anExp.Next()) {
- aE2=TopoDS::Edge(anExp.Current());
- if (!BRep_Tool::Degenerated(aE2)) {
- if (!BRep_Tool::IsClosed(aE2, theF2)) {
- if (aE2.IsSame(aE1)) {
- iSense=1;
- break;
- }
- }
- }
- }
- //
- if (!iSense) {
- return iSense;
- }
- //
- BOPTools_Tools3D::GetNormalToFaceOnEdge(aE1, theF1, aDNF1);
- BOPTools_Tools3D::GetNormalToFaceOnEdge(aE2, theF2, aDNF2);
- //
- iSense=BOPTools_Tools3D::SenseFlag(aDNF1, aDNF2);
- //
- return iSense;
-}
-//=======================================================================
-// function: CopyFace
-// purpose:
-//=======================================================================
- void GEOMAlgo_Tools3D::CopyFace (const TopoDS_Face& theF1,
- TopoDS_Face& theF2)
-{
- Standard_Real aTol;
- TopLoc_Location aLoc;
- TopAbs_Orientation aOr;
- TopoDS_Iterator aIt;
- BRep_Builder aBB;
- //
- Handle(Geom_Surface) aSurface=BRep_Tool::Surface(theF1, aLoc);
- aTol=BRep_Tool::Tolerance(theF1);
- aOr=theF1.Orientation();
- //
- aBB.MakeFace (theF2, aSurface, aLoc, aTol);
- theF2.Orientation(aOr);
- //
- aIt.Initialize(theF1);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aW=aIt.Value();
- aBB.Add(theF2, aW);
- }
-}
-//=======================================================================
-// function: MakeContainer
-// purpose:
-//=======================================================================
- void GEOMAlgo_Tools3D::MakeContainer(const TopAbs_ShapeEnum theType,
- TopoDS_Shape& theC)
-{
- BRep_Builder aBB;
- //
- switch(theType) {
- case TopAbs_COMPOUND:{
- TopoDS_Compound aC;
- aBB.MakeCompound(aC);
- theC=aC;
- }
- break;
- //
- case TopAbs_COMPSOLID:{
- TopoDS_CompSolid aCS;
- aBB.MakeCompSolid(aCS);
- theC=aCS;
- }
- break;
- //
- case TopAbs_SOLID:{
- TopoDS_Solid aSolid;
- aBB.MakeSolid(aSolid);
- theC=aSolid;
- }
- break;
- //
- //
- case TopAbs_SHELL:{
- TopoDS_Shell aShell;
- aBB.MakeShell(aShell);
- theC=aShell;
- }
- break;
- //
- case TopAbs_WIRE: {
- TopoDS_Wire aWire;
- aBB.MakeWire(aWire);
- theC=aWire;
- }
- break;
- //
- default:
- break;
- }
-}
-//=======================================================================
-// function: MakeConnexityBlock.
-// purpose:
-//=======================================================================
- void GEOMAlgo_Tools3D::MakeConnexityBlock (const TopTools_ListOfShape& theLFIn,
- const TopTools_IndexedMapOfShape& theMEAvoid,
- TopTools_ListOfShape& theLCB)
-{
- Standard_Integer aNbF, aNbAdd1;
- TopExp_Explorer aExp;
- TopTools_IndexedDataMapOfShapeListOfShape aMEF;
- TopTools_MapIteratorOfMapOfShape aItM, aItM1;
- TopTools_MapOfShape aMCB, aMAdd, aMAdd1;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- // 1. aMEF
- aNbF=theLFIn.Extent();
- aIt.Initialize(theLFIn);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aF=aIt.Value();
- TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF);
- }
- //
- // 2. aMCB
- const TopoDS_Shape& aF1=theLFIn.First();
- aMAdd.Add(aF1);
- //
- while(1) {
- aMAdd1.Clear();
- aItM.Initialize(aMAdd);
- for (; aItM.More(); aItM.Next()) {
- const TopoDS_Shape& aF=aItM.Key();
- //
- //aMAdd1.Clear();
- aExp.Init(aF, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- const TopoDS_Shape& aE=aExp.Current();
- if (theMEAvoid.Contains(aE)){
- continue;
- }
- //
- const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE);
- aIt.Initialize(aLF);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aFx=aIt.Value();
- if (aFx.IsSame(aF)) {
- continue;
- }
- if (aMCB.Contains(aFx)) {
- continue;
- }
- aMAdd1.Add(aFx);
- }
- }//for (; aExp.More(); aExp.Next()){
- aMCB.Add(aF);
- }// for (; aItM.More(); aItM.Next()) {
- //
- aNbAdd1=aMAdd1.Extent();
- if (!aNbAdd1) {
- break;
- }
- //
- aMAdd.Clear();
- aItM1.Initialize(aMAdd1);
- for (; aItM1.More(); aItM1.Next()) {
- const TopoDS_Shape& aFAdd=aItM1.Key();
- aMAdd.Add(aFAdd);
- }
- //
- }//while(1) {
-
- //
- aNbF=aMCB.Extent();
- aItM.Initialize(aMCB);
- for (; aItM.More(); aItM.Next()) {
- const TopoDS_Shape& aF=aItM.Key();
- theLCB.Append(aF);
- }
-}
-//=======================================================================
-//function : FindFacePairs
-//purpose :
-//=======================================================================
-Standard_Boolean FindFacePairs (const TopoDS_Edge& theE,
- const TopTools_ListOfShape& thLF,
- NMTTools_ListOfCoupleOfShape& theLCFF)
-{
- Standard_Boolean bFound;
- Standard_Integer i, aNbCEF;
- TopAbs_Orientation aOr, aOrC;
- TopTools_MapOfShape aMFP;
- TopoDS_Face aF1, aF2;
- TopoDS_Edge aEL, aE1;
- TopTools_ListIteratorOfListOfShape aItLF;
- NMTTools_CoupleOfShape aCEF, aCFF;
- NMTTools_ListOfCoupleOfShape aLCEF, aLCEFx;
- NMTTools_ListIteratorOfListOfCoupleOfShape aIt;
- //
- bFound=Standard_True;
- //
- // Preface aLCEF
- aItLF.Initialize(thLF);
- for (; aItLF.More(); aItLF.Next()) {
- const TopoDS_Face& aFL=TopoDS::Face(aItLF.Value());
- //
- bFound=GEOMAlgo_Tools3D::GetEdgeOnFace(theE, aFL, aEL);
- if (!bFound) {
- return bFound; // it can not be so
- }
- //
- aCEF.SetShape1(aEL);
- aCEF.SetShape2(aFL);
- aLCEF.Append(aCEF);
- }
- //
- aNbCEF=aLCEF.Extent();
- while(aNbCEF) {
- //
- // aLCEFx
- aLCEFx.Clear();
- aIt.Initialize(aLCEF);
- for (i=0; aIt.More(); aIt.Next(), ++i) {
- const NMTTools_CoupleOfShape& aCSx=aIt.Value();
- const TopoDS_Shape& aEx=aCSx.Shape1();
- const TopoDS_Shape& aFx=aCSx.Shape2();
- //
- aOr=aEx.Orientation();
- //
- if (!i) {
- aOrC=TopAbs::Reverse(aOr);
- aE1=TopoDS::Edge(aEx);
- aF1=TopoDS::Face(aFx);
- aMFP.Add(aFx);
- continue;
- }
- //
- if (aOr==aOrC) {
- aLCEFx.Append(aCSx);
- aMFP.Add(aFx);
- }
- }
- //
- // F2
- GEOMAlgo_Tools3D::GetFaceOff(aE1, aF1, aLCEFx, aF2);
- //
- aCFF.SetShape1(aF1);
- aCFF.SetShape2(aF2);
- theLCFF.Append(aCFF);
- //
- aMFP.Add(aF1);
- aMFP.Add(aF2);
- //
- // refine aLCEF
- aLCEFx.Clear();
- aLCEFx=aLCEF;
- aLCEF.Clear();
- aIt.Initialize(aLCEFx);
- for (; aIt.More(); aIt.Next()) {
- const NMTTools_CoupleOfShape& aCSx=aIt.Value();
- const TopoDS_Shape& aFx=aCSx.Shape2();
- if (!aMFP.Contains(aFx)) {
- aLCEF.Append(aCSx);
- }
- }
- //
- aNbCEF=aLCEF.Extent();
- }//while(aNbCEF) {
- //
- return bFound;
-}
-//
-//=======================================================================
-//function : AngleWithRef
-//purpose :
-//=======================================================================
-Standard_Real AngleWithRef(const gp_Dir& theD1,
- const gp_Dir& theD2,
- const gp_Dir& theDRef)
-{
- Standard_Real aCosinus, aSinus, aBeta, aHalfPI, aScPr;
- gp_XYZ aXYZ;
- //
- aHalfPI=0.5*M_PI;
- //
- const gp_XYZ& aXYZ1=theD1.XYZ();
- const gp_XYZ& aXYZ2=theD2.XYZ();
- aXYZ=aXYZ1.Crossed(aXYZ2);
- aSinus=aXYZ.Modulus();
- aCosinus=theD1*theD2;
- //
- aBeta=0.;
- if (aSinus>=0.) {
- aBeta=aHalfPI*(1.-aCosinus);
- }
- else {
- aBeta=2.*M_PI-aHalfPI*(3.+aCosinus);
- }
- //
- aScPr=aXYZ.Dot(theDRef.XYZ());
- if (aScPr<0.) {
- aBeta=-aBeta;
- }
- return aBeta;
-}
-//=======================================================================
-//function : GetApproxNormalToFaceOnEdge
-//purpose :
-//=======================================================================
-void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aEx,
- const TopoDS_Face& aFx,
- Standard_Real aT,
- gp_Pnt& aPF,
- gp_Dir& aDNF,
- const Handle(IntTools_Context)& aCtx)
-{
- Standard_Boolean bReverse;
- Standard_Real aT1, aT2, dT, aU, aV;
- gp_Dir aDTT, aDNFT, aDBT;
- gp_Pnt aPFT, aPFx;
- Handle(Geom_Curve) aC3D;
- Handle(Geom_Surface) aS;
- GeomAdaptor_Surface aGAS;
- GeomAbs_SurfaceType aTS;
- TopoDS_Face aF;
- TopoDS_Edge aE;
- //
- bReverse=Standard_False;
- aF=aFx;
- aE=aEx;
- if (aF.Orientation()==TopAbs_REVERSED){
- bReverse=!bReverse;
- aE.Reverse();
- //
- aF.Orientation(TopAbs_FORWARD);
- }
- //
- // Point at aT
- aC3D =BRep_Tool::Curve(aE, aT1, aT2);
- aC3D->D0(aT, aPFT);
- //
- // Normal at aT
- BOPTools_Tools3D::GetNormalToFaceOnEdge (aE, aF, aT, aDNFT);
-
- // Tangent at aT
- BOPTools_Tools3D::GetTangentToEdge(aE, aT, aDTT);
- //
- // Binormal at aT
- aDBT=aDNFT^aDTT;
- //
- dT=BOPTools_Tools3D::MinStepIn2d();//~1.e-5;
- dT=10.*dT;
- //----------------------------------------------
- {
- aS=BRep_Tool::Surface(aF);
- aGAS.Load(aS);
- aTS=aGAS.GetType();
- if (aTS==GeomAbs_BSplineSurface ||
- aTS==GeomAbs_BezierSurface ||
- aTS==GeomAbs_Plane){
- Standard_Real aTolEx, aTolFx, aTol, dUR, dVR, dR;
- //
- aTolEx=BRep_Tool::Tolerance(aEx);
- aTolFx=BRep_Tool::Tolerance(aFx);
- aTol=2.*aTolEx+aTolFx;
- dUR=aGAS.UResolution(aTol);
- dVR=aGAS.VResolution(aTol);
- dR=(dUR>dVR)? dUR : dVR;
- if (dR>dT) {
- dT=dR;
- }
- }
- else if (GeomAbs_Torus ||
- aTS==GeomAbs_Cylinder){
- Standard_Real aTolEx, aTolFx, aTol;
- //
- aTolEx=BRep_Tool::Tolerance(aEx);
- aTolFx=BRep_Tool::Tolerance(aFx);
- aTol=2.*aTolEx+aTolFx;
- if (aTol>dT) {
- dT=aTol;
- }
- }
- }
- //----------------------------------------------
- //
- aPFx.SetXYZ(aPFT.XYZ()+dT*aDBT.XYZ());
- //
- aPF=aPFx;
- aDNF=aDNFT;
- if (bReverse) {
- aDNF.Reverse();
- }
- //
- GeomAPI_ProjectPointOnSurf& aProjector=aCtx->ProjPS(aF);
- //
- aProjector.Perform(aPFx);
- if(aProjector.IsDone()) {
- aProjector.LowerDistanceParameters (aU, aV);
- aS->D0(aU, aV, aPF);
- BOPTools_Tools3D::GetNormalToSurface (aS, aU, aV, aDNF);
- if (bReverse){
- aDNF.Reverse();
- }
- }
-}
-
-//modified by NIZNHY-PKV Tue Nov 22 10:36:59 2011f
-//=======================================================================
-//function : PntInFace
-//purpose :
-//=======================================================================
-Standard_Integer GEOMAlgo_Tools3D::PntInFace(const TopoDS_Face& aF,
- gp_Pnt& theP,
- gp_Pnt2d& theP2D)
-{
- Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint;
- Standard_Integer iErr, aIx, aNbDomains, i;
- Standard_Real aUMin, aUMax, aVMin, aVMax;
- Standard_Real aVx, aUx, aV1, aV2, aU1, aU2, aEpsT;
- Standard_Real aTotArcIntr, aTolTangfIntr, aTolHatch2D, aTolHatch3D;
- gp_Dir2d aD2D (0., 1.);
- gp_Pnt2d aP2D;
- gp_Pnt aPx;
- Handle(Geom2d_Curve) aC2D;
- Handle(Geom2d_TrimmedCurve) aCT2D;
- Handle(Geom2d_Line) aL2D;
- Handle(Geom_Surface) aS;
- TopAbs_Orientation aOrE;
- TopoDS_Face aFF;
- TopExp_Explorer aExp;
- //
- aTolHatch2D=1.e-8;
- aTolHatch3D=1.e-8;
- aTotArcIntr=1.e-10;
- aTolTangfIntr=1.e-10;
- //
- Geom2dHatch_Intersector aIntr(aTotArcIntr, aTolTangfIntr);
- Geom2dHatch_Hatcher aHatcher(aIntr,
- aTolHatch2D, aTolHatch3D,
- Standard_True, Standard_False);
- //
- iErr=0;
- aEpsT=1.e-12;
- //
- aFF=aF;
- aFF.Orientation (TopAbs_FORWARD);
- //
- aS=BRep_Tool::Surface(aFF);
- BRepTools::UVBounds(aFF, aUMin, aUMax, aVMin, aVMax);
- //
- // 1
- aExp.Init (aFF, TopAbs_EDGE);
- for (; aExp.More() ; aExp.Next()) {
- const TopoDS_Edge& aE=*((TopoDS_Edge*)&aExp.Current());
- aOrE=aE.Orientation();
- //
- aC2D=BRep_Tool::CurveOnSurface (aE, aFF, aU1, aU2);
- if (aC2D.IsNull() ) {
- iErr=1;
- return iErr;
- }
- if (fabs(aU1-aU2) < aEpsT) {
- iErr=2;
- return iErr;
- }
- //
- aCT2D=new Geom2d_TrimmedCurve(aC2D, aU1, aU2);
- aHatcher.AddElement(aCT2D, aOrE);
- }// for (; aExp.More() ; aExp.Next()) {
- //
- // 2
- aUx=IntTools_Tools::IntermediatePoint(aUMin, aUMax);
- aP2D.SetCoord(aUx, 0.);
- aL2D=new Geom2d_Line (aP2D, aD2D);
- Geom2dAdaptor_Curve aHCur(aL2D);
- //
- aIx=aHatcher.AddHatching(aHCur) ;
- //
- // 3.
- aHatcher.Trim();
- bIsDone=aHatcher.TrimDone(aIx);
- if (!bIsDone) {
- iErr=3;
- return iErr;
- }
- //
- aHatcher.ComputeDomains(aIx);
- bIsDone=aHatcher.IsDone(aIx);
- if (!bIsDone) {
- iErr=4;
- return iErr;
- }
- //
- // 4.
- aNbDomains=aHatcher.NbDomains(aIx);
- for (i=1; i<=aNbDomains; ++i) {
- const HatchGen_Domain& aDomain=aHatcher.Domain (aIx, i) ;
- bHasFirstPoint=aDomain.HasFirstPoint();
- if (!bHasFirstPoint) {
- iErr=5;
- return iErr;
- }
- //
- aV1=aDomain.FirstPoint().Parameter();
- //
- bHasSecondPoint=aDomain.HasSecondPoint();
- if (!bHasSecondPoint) {
- iErr=6;
- return iErr;
- }
- //
- aV2=aDomain.SecondPoint().Parameter();
- //
- aVx=IntTools_Tools::IntermediatePoint(aV1, aV2);
- //
- break;
- }
- //
- aS->D0(aUx, aVx, aPx);
- //
- theP2D.SetCoord(aUx, aVx);
- theP=aPx;
- //
- return iErr;
-}
-//modified by NIZNHY-PKV Tue Nov 22 10:37:01 2011t
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_Tools3D.hxx
-// Created :
-// Author : Peter KURNEV
-
-#ifndef _GEOMAlgo_Tools3D_HeaderFile
-#define _GEOMAlgo_Tools3D_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Boolean.hxx>
-#include <Handle_IntTools_Context.hxx>
-#include <Standard_Integer.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <TopAbs_State.hxx>
-#include <Standard_Real.hxx>
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#include <TopoDS_Shape.hxx>
-#include <IntTools_Context.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopoDS_Solid.hxx>
-#include <gp_Pnt.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <gp_Pnt2d.hxx>
-
-
-//! Auxiliary tools for Algorithms <br>
-//=======================================================================
-//class : GEOMAlgo_Tools3D
-//purpose :
-//=======================================================================
-class GEOMAlgo_Tools3D {
- public:
- //! Returns True if the shape theSplit has opposite <br>
- //! direction than theShape <br>
- //! theContext - cashed geometrical tools <br>
- Standard_EXPORT
- static Standard_Boolean IsSplitToReverse(const TopoDS_Shape& theSplit,
- const TopoDS_Shape& theShape,
- const Handle(IntTools_Context)& theContext) ;
-
- //! Returns True if normal direction of the face <br>
- //! theShape is not the same as for the face <br>
- //! theSplit <br>
- //! theContext - cashed geometrical tools <br>
- Standard_EXPORT
- static Standard_Boolean IsSplitToReverse(const TopoDS_Face& theSplit,
- const TopoDS_Face& theShape,
- const Handle(IntTools_Context)& theContext) ;
-
- //! Returns True if tangent direction of the edge <br>
- //! theEdge is not the same as for the edge <br>
- //! theSplit <br>
- //! theContext - cashed geometrical tools <br>
- Standard_EXPORT
- static Standard_Boolean IsSplitToReverse(const TopoDS_Edge& theEdge,
- const TopoDS_Edge& theSplit,
- const Handle(IntTools_Context)& theContext) ;
-
- //! For the couple of faces theF1, theF2 <br>
- //! computes sense value <br>
- //! Returns 0 if the faces are not sensible <br>
- //! Returns 1 if the faces have same sense <br>
- //! Returns 2 if the faces have opposite sense <br>
- Standard_EXPORT
- static Standard_Integer Sense(const TopoDS_Face& theF1,
- const TopoDS_Face& theF2) ;
-
- //! Makes new face theF2 from surface and wires <br>
- //! of the face theF1 <br>
- Standard_EXPORT
- static void CopyFace(const TopoDS_Face& theF1,
- TopoDS_Face& theF2) ;
-
- //! Makes empty shape theShape of the type theType <br>
- Standard_EXPORT
- static void MakeContainer(const TopAbs_ShapeEnum theType,
- TopoDS_Shape& theShape) ;
-
- //! For the list of faces theLS build block <br>
- //! theLSCB in terms of connexity by edges <br>
- //! theMapAvoid - set of edges to avoid for <br>
- //! the treatment <br>
- Standard_EXPORT
- static void MakeConnexityBlock(const TopTools_ListOfShape& theLS,
- const TopTools_IndexedMapOfShape& theMapAvoid,
- TopTools_ListOfShape& theLSCB) ;
-
- //! Computes the 3-D state of the shape theShape <br>
- //! toward solid theSolid. <br>
- //! theTol - value of precision of computation <br>
- //! theContext- cahed geometrical tools <br>
- //! Returns 3-D state. <br>
- Standard_EXPORT
- static TopAbs_State ComputeStateByOnePoint(const TopoDS_Shape& theShape,
- const TopoDS_Solid& theSolid,
- const Standard_Real theTol,
- const Handle(IntTools_Context)& theContext) ;
-
- //! Computes the 3-D state of the point thePoint <br>
- //! toward solid theSolid. <br>
- //! theTol - value of precision of computation <br>
- //! theContext- cahed geometrical tools <br>
- //! Returns 3-D state. <br>
- Standard_EXPORT
- static TopAbs_State ComputeState(const gp_Pnt& thePoint,
- const TopoDS_Solid& theSolid,
- const Standard_Real theTol,
- const Handle(IntTools_Context)& theContext) ;
-
- //! Computes the 3-D state of the vertex theVertex <br>
- //! toward solid theSolid. <br>
- //! theTol - value of precision of computation <br>
- //! theContext- cahed geometrical tools <br>
- //! Returns 3-D state. <br>
- Standard_EXPORT
- static TopAbs_State ComputeState(const TopoDS_Vertex& theVertex,
- const TopoDS_Solid& theSolid,
- const Standard_Real theTol,
- const Handle(IntTools_Context)& theContext) ;
-
- //! Computes the 3-D state of the edge theEdge <br>
- //! toward solid theSolid. <br>
- //! theTol - value of precision of computation <br>
- //! theContext- cahed geometrical tools <br>
- //! Returns 3-D state. <br>
- Standard_EXPORT
- static TopAbs_State ComputeState(const TopoDS_Edge& theEdge,
- const TopoDS_Solid& theSolid,
- const Standard_Real theTol,
- const Handle(IntTools_Context)& theContext) ;
-
- //! Computes the 3-D state of the face theFace <br>
- //! toward solid theSolid. <br>
- //! theTol - value of precision of computation <br>
- //! theBounds - set of edges of theFace to avoid <br>
- //! theContext- cahed geometrical tools <br>
- //! Returns 3-D state. <br>
- Standard_EXPORT
- static TopAbs_State ComputeState(const TopoDS_Face& theFace,
- const TopoDS_Solid& theSolid,
- const Standard_Real theTol,
- const TopTools_IndexedMapOfShape& theBounds,
- const Handle(IntTools_Context)& theContext) ;
-
- //! Returns True if the face theFace is inside of the <br>
- //! couple of faces theFace1, theFace2. <br>
- //! The faces theFace, theFace1, theFace2 must <br>
- //! share the edge theEdge <br>
- Standard_EXPORT
- static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace,
- const TopoDS_Edge& theEdge,
- const TopoDS_Face& theFace1,
- const TopoDS_Face& theFace2,
- const Handle(IntTools_Context)& theContext) ;
-
- //! Returns True if the face theFace is inside of the <br>
- //! appropriate couple of faces (from the set theLF) . <br>
- //! The faces of the set theLF and theFace must <br>
- //! share the edge theEdge <br>
- Standard_EXPORT
- static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace,
- const TopoDS_Edge& theEdge,
- const TopTools_ListOfShape& theLF,
- const Handle(IntTools_Context)& theContext) ;
-
- //! Returns True if the face theFace is inside the <br>
- //! solid theSolid. <br>
- //! theMEF - Map Edge/Faces for theSolid <br>
- //! theTol - value of precision of computation <br>
- //! theContext- cahed geometrical tools <br>
- Standard_EXPORT
- static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace,
- const TopoDS_Solid& theSolid,
- const TopTools_IndexedDataMapOfShapeListOfShape& theMEF,
- const Standard_Real theTol,
- const Handle(IntTools_Context)& theContext) ;
-
- //! For the face theFace and its edge theEdge <br>
- //! finds the face suitable to produce shell. <br>
- //! theLCEF - set of faces to search. All faces <br>
- //! from theLCEF must share edge theEdge <br>
- Standard_EXPORT
- static void GetFaceOff(const TopoDS_Edge& theEdge,
- const TopoDS_Face& theFace,
- const NMTTools_ListOfCoupleOfShape& theLCEF,
- TopoDS_Face& theFaceOff) ;
-
- //! For the face theFace gets the edge theEdgeOnF <br>
- //! that is the same as theEdge <br>
- //! Returns True if such edge exists <br>
- //! Returns False if there is no such edge <br>
- Standard_EXPORT
- static Standard_Boolean GetEdgeOnFace(const TopoDS_Edge& theEdge,
- const TopoDS_Face& theFace,
- TopoDS_Edge& theEdgeOnF) ;
-
- //! Returns True if the face theFace contains <br>
- //! the edge theEdge but with opposite orientation. <br>
- //! If the method returns True theEdgeOff is the <br>
- //! edge founded <br>
- Standard_EXPORT
- static Standard_Boolean GetEdgeOff(const TopoDS_Edge& theEdge,
- const TopoDS_Face& theFace,
- TopoDS_Edge& theEdgeOff) ;
-
- //! Computes a point <theP> inside the face <theF>. <br>
- //! <theP2D> - 2D representation of <theP> <br>
- //! on the surface of <theF> <br>
- //! Returns 0 in case of success. <br>
- Standard_EXPORT
- static Standard_Integer PntInFace(const TopoDS_Face& theF,
- gp_Pnt& theP,
- gp_Pnt2d& theP2D) ;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_Tools_1.cxx
-// Created: Thu May 6 10:46:21 2010
-// Author: Peter KURNEV
-// <pkv@irinox>
-
-#include <GEOMAlgo_Tools.hxx>
-//
-#include <NCollection_DataMap.hxx>
-
-#include <gp_Pnt2d.hxx>
-#include <gp_Pnt.hxx>
-
-#include <Geom2dAdaptor_Curve.hxx>
-#include <Geom2dInt_GInter.hxx>
-#include <Geom2d_Curve.hxx>
-#include <Geom_Curve.hxx>
-#include <Geom_Surface.hxx>
-#include <GeomAdaptor_Surface.hxx>
-
-#include <IntRes2d_Domain.hxx>
-#include <IntRes2d_IntersectionPoint.hxx>
-#include <IntRes2d_Transition.hxx>
-
-#include <TopoDS_Iterator.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Wire.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_DataMapOfShapeListOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
-#include <BRepTools.hxx>
-
-static
- inline Standard_Boolean IsEqual(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2) {
- return TopTools_ShapeMapHasher::IsEqual(aS1, aS2);
-}
-//
-static
- Standard_Boolean CorrectWire(const TopoDS_Wire& aW,
- const TopoDS_Face& aF);
-
-//=======================================================================
-//function : CorrectWires
-//purpose :
-//=======================================================================
- Standard_Boolean GEOMAlgo_Tools::CorrectWires(const TopoDS_Shape& aShape)
-{
- Standard_Boolean bRet;
- TopoDS_Iterator aItF;
- TopExp_Explorer aExp;
- TopTools_MapOfShape aMF;
- GeomAdaptor_Surface aGAS;
- GeomAbs_SurfaceType aTS;
- TopLoc_Location aLoc;
- //
- bRet=Standard_False;
- //
- aExp.Init(aShape, TopAbs_FACE);
- for (; aExp.More(); aExp.Next()) {
- const TopoDS_Face& aF=*((TopoDS_Face*)&aExp.Current());
- if (aMF.Add(aF)) {
- const Handle(Geom_Surface)& aS=BRep_Tool::Surface(aF, aLoc);
- aGAS.Load(aS);
- aTS=aGAS.GetType();
- if (aTS==GeomAbs_Cylinder || aTS==GeomAbs_Plane) {
- aItF.Initialize(aF);
- for (; aItF.More(); aItF.Next()) {
- const TopoDS_Wire& aW=*((TopoDS_Wire*)&aItF.Value());
- if (CorrectWire(aW, aF)) {
- bRet=Standard_True;
- }
- }
- }
- }
- }
- return bRet;
-}
-//=======================================================================
-//class: GEOMAlgo_InfoEdge
-//purpose :
-//=======================================================================
-class GEOMAlgo_InfoEdge {
- public:
- //
- GEOMAlgo_InfoEdge() {
- myErrorStatus=0;
- myTolInt=1.0e-10;
- };
- //
- ~GEOMAlgo_InfoEdge(){
- };
- //
- void Init(const TopoDS_Edge& aE,
- const TopoDS_Face& aF);
- //
- void SetTolInt(const Standard_Real aTolInt) {
- myTolInt=aTolInt;
- };
- //
- const Standard_Real TolInt() const {
- return myTolInt;
- }
- //
- const Geom2dAdaptor_Curve& Adaptor() const {
- return myGAC2D;
- }
- //
- const IntRes2d_Domain& Domain()const {
- return myDomain;
- }
- //
- const Handle(Geom2d_Curve)& CurveOnSurface()const {
- return myC2D;
- }
- //
- const Handle(Geom_Curve)& Curve()const {
- return myC3D;
- }
- //
- Standard_Integer ErrorStatus()const {
- return myErrorStatus;
- }
- //
- protected:
- Standard_Integer myErrorStatus;
- Standard_Real myTolInt;
- Geom2dAdaptor_Curve myGAC2D;
- IntRes2d_Domain myDomain;
- Handle(Geom2d_Curve) myC2D;
- Handle(Geom_Curve) myC3D;
-};
-//
-typedef NCollection_DataMap<TopoDS_Shape, GEOMAlgo_InfoEdge> GEOMAlgo_DataMapOfShapeInfoEdge;
-typedef GEOMAlgo_DataMapOfShapeInfoEdge::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeInfoEdge;
-
-//=======================================================================
-//function : Init
-//purpose :
-//=======================================================================
- void GEOMAlgo_InfoEdge::Init(const TopoDS_Edge& aE,
- const TopoDS_Face& aF)
-{
- Standard_Real aT1, aT2, aT1x, aT2x;
- gp_Pnt2d aP2D1, aP2D2;
- //
- myErrorStatus=0;
- //
- myC3D=BRep_Tool::Curve(aE, aT1, aT2);
- myC2D=BRep_Tool::CurveOnSurface(aE ,aF, aT1, aT2);
- if (!myC2D.IsNull() && aT2>aT1) {
- myGAC2D.Load(myC2D);
- if(!myGAC2D.IsPeriodic()) {
- aT1x=myGAC2D.FirstParameter();
- aT2x=myGAC2D.LastParameter();
- if(aT1x > aT1) {
- aT1=aT1x;
- }
- if(aT2x < aT2) {
- aT2=aT2x;
- }
- }
- //
- BRep_Tool::UVPoints(aE, aF, aP2D1, aP2D2);
- myDomain.SetValues(aP2D1, aT1, myTolInt, aP2D2, aT2, myTolInt);
- }
- else {
- myErrorStatus=10;
- return;
- }
-}
-//=======================================================================
-//function : CorrectWire
-//purpose :
-//=======================================================================
-Standard_Boolean CorrectWire(const TopoDS_Wire& aW,
- const TopoDS_Face& aF)
-{
- Standard_Boolean bRet;
- Standard_Real aTolInt;
- Standard_Integer iErr, aNbV, aNbE;
- TopoDS_Iterator aItW, aItE;
- Geom2dInt_GInter aInter;
- GEOMAlgo_DataMapOfShapeInfoEdge aDMEIE;
- TopTools_DataMapOfShapeListOfShape aDMVLE;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMVLE;
- //
- bRet=Standard_False;
- aTolInt=1.0e-10;
- //
- aItW.Initialize(aW);
- for (; aItW.More(); aItW.Next()) {
- const TopoDS_Edge& aE=*((TopoDS_Edge*)&aItW.Value());
-
- aItE.Initialize(aE);
- for (aNbV=0; aItE.More(); aItE.Next(), ++aNbV) {
- }
- if (aNbV<2) {
- return bRet; //
- }
- //
- if (!aDMEIE.IsBound(aE)) {
- GEOMAlgo_InfoEdge aInfoEdge;
- //
- aInfoEdge.Init (aE, aF);
- iErr=aInfoEdge.ErrorStatus();
- if (iErr) {
- return bRet; //
- }
- //
- aDMEIE.Bind(aE, aInfoEdge);
- }
- //
- aItE.Initialize(aE);
- for (; aItE.More(); aItE.Next()) {
- const TopoDS_Shape& aV=aItE.Value();
- if (aDMVLE.IsBound(aV)) {
- TopTools_ListOfShape& aLE=aDMVLE.ChangeFind(aV);
- aLE.Append(aE);
- }
- else {
- TopTools_ListOfShape aLE;
- aLE.Append(aE);
- aDMVLE.Bind(aV, aLE);
- }
- }
- }
- //
- // 2
- Standard_Real aTolV, aD1, aD2, aDmax, aCoeff;
- gp_Pnt aPV;
- Handle(Geom_Surface) aS;
- BRep_Builder aBB;
- //
- aCoeff=1.1;
- aS=BRep_Tool::Surface(aF);
- //
- aItDMVLE.Initialize(aDMVLE);
- for(; aItDMVLE.More(); aItDMVLE.Next()) {
- const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&aItDMVLE.Key());
- const TopTools_ListOfShape& aLE=aItDMVLE.Value();
- aNbE=aLE.Extent();
- if (aNbE!=2) {
- continue;
- }
- //
- aPV=BRep_Tool::Pnt(aV);
- aTolV=BRep_Tool::Tolerance(aV);
- //
- const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aLE.First());
- const GEOMAlgo_InfoEdge& aIE1=aDMEIE.Find(aE1);
- const Geom2dAdaptor_Curve& aGAC1=aIE1.Adaptor();
- const IntRes2d_Domain& aDomain1=aIE1.Domain();
- //
- const TopoDS_Edge& aE2=*((TopoDS_Edge*)&aLE.Last());
- const GEOMAlgo_InfoEdge& aIE2=aDMEIE.Find(aE2);
- const Geom2dAdaptor_Curve& aGAC2=aIE2.Adaptor();
- const IntRes2d_Domain& aDomain2=aIE2.Domain();
- //
- aInter.Perform(aGAC1, aDomain1,aGAC2, aDomain2, aTolInt, aTolInt);
- if(!aInter.IsDone()) {
- continue;
- }
- //
- Standard_Integer i, aNbP;
- Standard_Real aIP_ParamOnFirst, aIP_ParamOnSecond;
- gp_Pnt aP3D1, aP3D2;
- gp_Pnt2d aP2D1, aP2D2;
- IntRes2d_Transition aTr1, aTr2;
- //
- aNbP=aInter.NbPoints();
- for (i=1; i<=aNbP; ++i) {
- const IntRes2d_IntersectionPoint& aIP = aInter.Point(i);
- aIP_ParamOnFirst = aIP.ParamOnFirst();
- aIP_ParamOnSecond = aIP.ParamOnSecond();
- aTr1 =aIP.TransitionOfFirst();
- aTr2 =aIP.TransitionOfSecond();
- if(aTr1.PositionOnCurve()==IntRes2d_Middle ||
- aTr2.PositionOnCurve()==IntRes2d_Middle) {
- //
- const Handle(Geom_Curve)& aC3D1=aIE1.Curve();
- if (!aC3D1.IsNull()) {
- aP3D1=aC3D1->Value(aIP_ParamOnFirst);
- }
- else {
- aP2D1=aGAC1.Value(aIP_ParamOnFirst);
- aS->D0(aP2D1.X(), aP2D1.Y(), aP3D1);
- }
- //
- const Handle(Geom_Curve)& aC3D2=aIE2.Curve();
- if (!aC3D2.IsNull()) {
- aP3D2=aC3D2->Value(aIP_ParamOnSecond);
- }
- else {
- aP2D2=aGAC2.Value(aIP_ParamOnSecond);
- aS->D0(aP2D2.X(), aP2D2.Y(), aP3D2);
- }
- //
- aD1=aPV.Distance(aP3D1);
- aD2=aPV.Distance(aP3D2);
- aDmax=(aD1>aD2)? aD1 : aD2;
- if (aDmax>aCoeff*aTolV) {
- if (aDmax<10.*aTolV){
- aBB.UpdateVertex(aV, aDmax);
- bRet=Standard_True;
- }
- }
- }//
- }//for (i=1; i<=aNbP; ++i) {
- }//for(; aItDMVLE.More(); aItDMVLE.Next()) {
- return bRet;
-}
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_VertexSolid.cxx
-// Created: Wed Jan 12 16:36:40 2005
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <GEOMAlgo_VertexSolid.hxx>
-
-#include <gp_Pnt.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-#include <TopAbs_State.hxx>
-
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Solid.hxx>
-#include <TopoDS_Vertex.hxx>
-
-#include <TopExp.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRepClass3d_SolidClassifier.hxx>
-
-#include <BOPTColStd_Dump.hxx>
-
-#include <IntTools_Context.hxx>
-
-#include <BooleanOperations_StateOfShape.hxx>
-#include <BooleanOperations_ShapesDataStructure.hxx>
-
-#include <BOPTools_InterferencePool.hxx>
-#include <BOPTools_CArray1OfVVInterference.hxx>
-#include <BOPTools_VVInterference.hxx>
-#include <BOPTools_PaveFiller.hxx>
-#include <BOPTools_DSFiller.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_VertexSolid
-//purpose :
-//=======================================================================
-GEOMAlgo_VertexSolid::GEOMAlgo_VertexSolid()
-:
- GEOMAlgo_ShapeSolid()
-{
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-GEOMAlgo_VertexSolid::~GEOMAlgo_VertexSolid()
-{
-}
-//=======================================================================
-// function: Perform
-// purpose:
-//=======================================================================
-void GEOMAlgo_VertexSolid::Perform()
-{
- myErrorStatus=0;
- //
- try {
- if (myDSFiller==NULL) {
- myErrorStatus=10;
- return;
- }
- if(!myDSFiller->IsDone()) {
- myErrorStatus=11;
- return;
- }
- //
- Standard_Boolean bIsNewFiller;
- Standard_Integer aNbF;
- TopTools_IndexedMapOfShape aM;
- //
- const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS();
- const TopoDS_Shape& aObj=aDS.Object();
- //
- TopExp::MapShapes(aObj, TopAbs_FACE, aM);
- aNbF=aM.Extent();
- myRank=(aNbF) ? 2 : 1;
- //
- bIsNewFiller=myDSFiller->IsNewFiller();
-
- if (bIsNewFiller) {
- Prepare();
- myDSFiller->SetNewFiller(!bIsNewFiller);
- }
- BuildResult();
- }
- //
- catch (Standard_Failure) {
- myErrorStatus = 12;
- }
-}
-//=======================================================================
-// function: Prepare
-// purpose:
-//=======================================================================
-void GEOMAlgo_VertexSolid::Prepare()
-{
- Standard_Integer i, iBeg, iEnd, aNbVV, j, n1, n2, iFound;
- Standard_Real aTol;
- TopAbs_State aSt;
- TopAbs_ShapeEnum aType;
- BooleanOperations_StateOfShape aState;
- gp_Pnt aP3D;
- //
- const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS();
- BooleanOperations_ShapesDataStructure* pDS=(BooleanOperations_ShapesDataStructure*)&aDS;
- const BOPTools_InterferencePool& aIP=myDSFiller->InterfPool();
- BOPTools_InterferencePool* pIP=(BOPTools_InterferencePool*) &aIP;
- BOPTools_CArray1OfVVInterference& aVVs=pIP->VVInterferences();
- const BOPTools_PaveFiller& aPF=myDSFiller->PaveFiller();
- BOPTools_PaveFiller* pPF=(BOPTools_PaveFiller*)&aPF;
- const Handle(IntTools_Context)& aCtx=pPF->Context();
- //
- const TopoDS_Shape& aObj=aDS.Object();
- const TopoDS_Shape& aTool=aDS.Tool();
- //
- const TopoDS_Solid& aSolid=(myRank==1) ? TopoDS::Solid(aTool) : TopoDS::Solid(aObj);
- //
- BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSolid);
- //
- iBeg=1;
- iEnd=aDS.NumberOfShapesOfTheObject();
- if (myRank==2) {
- iBeg=iEnd+1;
- iEnd=aDS.NumberOfSourceShapes();
- }
- //
- for (i=iBeg; i<=iEnd; ++i) {
- aType=aDS.GetShapeType(i);
- if (aType!=TopAbs_VERTEX) {
- continue;
- }
- //
- const TopoDS_Vertex& aV=TopoDS::Vertex(aDS.Shape(i));
- //
- aState=aDS.GetState(i);
- if (aState==BooleanOperations_ON ||
- aState==BooleanOperations_IN ||
- aState==BooleanOperations_OUT) {
- continue;
- }
- //
- iFound=0;
- aNbVV=aVVs.Extent();
- for (j=1; j<=aNbVV; ++j) {
- BOPTools_VVInterference& aVV=aVVs(j);
- aVV.Indices(n1, n2);
- if (n1==i || n2==i) {
- pDS->SetState (n1, BooleanOperations_ON);
- pDS->SetState (n2, BooleanOperations_ON);
- iFound=1;
- break;
- }
- }
- if (iFound) {
- continue;
- }
- //
- aP3D=BRep_Tool::Pnt(aV);
- aTol=1.E-7;
- aSC.Perform(aP3D, aTol);
- aSt=aSC.State();
- if (aSt==TopAbs_IN) {
- pDS->SetState (i, BooleanOperations_IN);
- }
- else if (aSt==TopAbs_OUT) {
- pDS->SetState (i, BooleanOperations_OUT);
- }
- }
-}
-//=======================================================================
-// function: BuildResult
-// purpose:
-//=======================================================================
-void GEOMAlgo_VertexSolid::BuildResult()
-{
- const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS();
- //
- Standard_Integer i, iBeg, iEnd;
- TopAbs_ShapeEnum aType;
- BooleanOperations_StateOfShape aState;
- //
- myLSIN.Clear();
- myLSOUT.Clear();
- myLSON.Clear();
- //
- iBeg=1;
- iEnd=aDS.NumberOfShapesOfTheObject();
- if (myRank==2) {
- iBeg=iEnd+1;
- iEnd=aDS.NumberOfSourceShapes();
- }
- //
- for (i=iBeg; i<=iEnd; ++i) {
- aType=aDS.GetShapeType(i);
- if (aType!=TopAbs_VERTEX) {
- continue;
- }
- const TopoDS_Shape& aV=aDS.Shape(i);
- aState=aDS.GetState(i);
- //
- if (aState==BooleanOperations_IN) {
- myLSIN.Append(aV);
- }
- else if (aState==BooleanOperations_OUT) {
- myLSOUT.Append(aV);
- }
- else if (aState==BooleanOperations_ON) {
- myLSON.Append(aV);
- }
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_VertexSolid.hxx
-// Created: Wed Jan 12 16:36:40 2005
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_VertexSolid_HeaderFile
-#define _GEOMAlgo_VertexSolid_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <GEOMAlgo_ShapeSolid.hxx>
-
-//=======================================================================
-//class : GEOMAlgo_VertexSolid
-//purpose :
-//=======================================================================
-class GEOMAlgo_VertexSolid : public GEOMAlgo_ShapeSolid
-{
- public:
- Standard_EXPORT
- GEOMAlgo_VertexSolid();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_VertexSolid();
-
- Standard_EXPORT
- virtual void Perform() ;
-
-protected:
- Standard_EXPORT
- virtual void Prepare() ;
-
- Standard_EXPORT
- virtual void BuildResult() ;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTAlgo_WESCorrector.cxx
-// Author: Peter KURNEV
-
-#include <GEOMAlgo_WESCorrector.hxx>
-
-#include <Geom_Surface.hxx>
-
-#include <TopLoc_Location.hxx>
-#include <TopoDS.hxx>
-
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Wire.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Edge.hxx>
-
-#include <BRep_Builder.hxx>
-#include <BRep_Tool.hxx>
-#include <BRepAdaptor_Surface.hxx>
-
-#include <TopTools_IndexedMapOfOrientedShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-
-#include <BOP_ConnexityBlock.hxx>
-#include <BOP_ListIteratorOfListOfConnexityBlock.hxx>
-
-#include <BOPTColStd_ListOfListOfShape.hxx>
-#include <BOPTColStd_ListIteratorOfListOfListOfShape.hxx>
-
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#include <TopExp.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
-#include <TopoDS_Iterator.hxx>
-#include <GEOMAlgo_WireSplitter.hxx>
-#include <GEOMAlgo_WESScaler.hxx>
-
-static
- void MakeWire(const TopTools_ListOfShape& aLE,
- TopoDS_Wire& newWire);
-
-
-static
- Standard_Boolean IsToScale(const TopoDS_Face& aF,
- Standard_Real& aScale);
-
-//=======================================================================
-// function:
-// purpose:
-//=======================================================================
- GEOMAlgo_WESCorrector::GEOMAlgo_WESCorrector()
-:
- GEOMAlgo_Algo()
-{
-}
-//=======================================================================
-// function: ~
-// purpose:
-//=======================================================================
- GEOMAlgo_WESCorrector::~GEOMAlgo_WESCorrector()
-{
-}
-//=======================================================================
-// function: SetWES
-// purpose:
-//=======================================================================
- void GEOMAlgo_WESCorrector::SetWES (const GEOMAlgo_WireEdgeSet& aWES)
-{
- GEOMAlgo_WireEdgeSet* pWES=(GEOMAlgo_WireEdgeSet*) &aWES;
- myWES=pWES;
-}
-//=======================================================================
-// function: WES
-// purpose:
-//=======================================================================
- GEOMAlgo_WireEdgeSet& GEOMAlgo_WESCorrector::WES ()
-{
- return *myWES;
-}
-//=======================================================================
-// function: NewWES
-// purpose:
-//=======================================================================
- GEOMAlgo_WireEdgeSet& GEOMAlgo_WESCorrector::NewWES ()
-{
- return myNewWES;
-}
-//=======================================================================
-// function: Perform
-// purpose:
-//=======================================================================
- void GEOMAlgo_WESCorrector::Perform()
-{
- myErrorStatus=0;
- //
- DoConnexityBlocks();
- DoCorrections();
-}
-//=======================================================================
-// function: DoConnexityBlocks
-// purpose:
-//=======================================================================
- void GEOMAlgo_WESCorrector::DoConnexityBlocks()
-{
- Standard_Boolean bRegular, bClosed;
- Standard_Integer i, aNbV, j, aNbC, aNbVP, aNbVS;
- TopTools_ListIteratorOfListOfShape aIt;
- TopoDS_Iterator aItE;
- TopoDS_Shape aER;
- TopTools_IndexedMapOfShape aMER, aMEP, aMEC, aMVP;
- TopTools_IndexedMapOfShape aMVS, aMVAdd;
- TopTools_IndexedDataMapOfShapeListOfShape aMVE;
- //
- // 1. aMVE;
- const TopTools_ListOfShape& aLSE=myWES->StartElements();
- aIt.Initialize(aLSE);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aE=aIt.Value();
- if (!aMEP.Contains(aE)) {
- aMEP.Add(aE);
- TopExp::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
- }
- else {
- aMER.Add(aE);
- }
- }
- //
- // 2.
- aNbV=aMVE.Extent();
- for (i=1; i<=aNbV; ++i) {
- const TopoDS_Shape& aV=aMVE.FindKey(i);
- //
- aNbVS=aMVS.Extent();
- if (aNbVS==aNbV) {
- break;
- }
- //
- if (aMVS.Contains(aV)) {
- continue;
- }
- aMVS.Add(aV); // aMVS - globally processed vertices
- //
- //------------------------------------- goal: aMEC
- aMEC.Clear(); // aMEC - edges of CB
- aMVP.Clear(); // aMVP - vertices to process right now
- aMVAdd.Clear(); // aMVAdd vertices to process on next step of while(1)
- //
- aMVP.Add(aV);
- //
- while(1) {
- aNbVP=aMVP.Extent();
- for (j=1; j<=aNbVP; ++j) {
- const TopoDS_Shape& aVP=aMVP(j);
- const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aVP);
- aIt.Initialize(aLE);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aE=aIt.Value();
- if (aMEC.Contains(aE)) {
- continue;
- }
- aMEC.Add(aE);
- //
- aItE.Initialize(aE);
- for (; aItE.More(); aItE.Next()) {
- const TopoDS_Shape& aVE=aItE.Value();
- if (!aMVS.Contains(aVE)) {
- aMVS.Add(aVE);
- aMVAdd.Add(aVE);
- }
- }
- }
- }//for (j=1; j<=aNbVP; ++j)
- //
- aNbVP=aMVAdd.Extent();
- if (!aNbVP) {
- break; // from while(1)
- }
- //
- aMVP.Clear();
- for (j=1; j<=aNbVP; ++j) {
- const TopoDS_Shape& aVE=aMVAdd(j);
- aMVP.Add(aVE);
- }
- aMVAdd.Clear();
- }// while(1) {
- //-------------------------------------
- BOP_ConnexityBlock aCB;
- TopTools_ListOfShape aLEC;
- TopTools_IndexedDataMapOfShapeListOfShape aMVER;
- //
- bRegular=Standard_True;
- //
- aNbC=aMEC.Extent();
- for (j=1; j<=aNbC; ++j) {
- aER=aMEC(j);
- //
- if (aMER.Contains(aER)) {
- aER.Orientation(TopAbs_FORWARD);
- aLEC.Append(aER);
- aER.Orientation(TopAbs_REVERSED);
- aLEC.Append(aER);
- //
- bRegular=Standard_False;
- }
- else {
- aLEC.Append(aER);
- }
- //
- if (bRegular) {
- const TopoDS_Edge& aEx=*((TopoDS_Edge*)&aER);
- if (!BRep_Tool::Degenerated(aEx)) {
- TopExp::MapShapesAndAncestors(aER, TopAbs_VERTEX, TopAbs_EDGE, aMVER);
- }
- }
- }//for (j=1; j<=aNbC; ++j) {
- //
- if (bRegular) {
- Standard_Integer k, aNbVR, aNbER;
- //
- aNbVR=aMVER.Extent();
- for (k=1; k<=aNbVR; ++k) {
- const TopTools_ListOfShape& aLER=aMVER(k);
- aNbER=aLER.Extent();
- if (aNbER==1) {
- const TopoDS_Edge& aEx=TopoDS::Edge(aER);
- bClosed=BRep_Tool::IsClosed(aEx, myWES->Face());
- if (!bClosed) {
- bRegular=!bRegular;
- break;
- }
- }
- if (aNbER>2) {
- bRegular=!bRegular;
- break;
- }
- }
- }
- //
- aCB.SetShapes(aLEC);
- aCB.SetRegularity(bRegular);
- myConnexityBlocks.Append(aCB);
- aMEC.Clear();
- }//for (i=1; i<=aNbV; ++i) {
-}
-
-//=======================================================================
-// function: DoCorrections
-// purpose:
-//=======================================================================
- void GEOMAlgo_WESCorrector::DoCorrections()
-{
- Standard_Boolean bIsRegular, bIsNothingToDo, bToScale;
- Standard_Integer iErr;
- Standard_Real aScale;
- TopoDS_Wire aW;
- BOP_ListIteratorOfListOfConnexityBlock aCBIt;
- GEOMAlgo_WESScaler aWSC;
- //
- const TopoDS_Face& aF=myWES->Face();
- //
- bToScale=IsToScale(aF, aScale);
- //
- myNewWES.SetFace(aF);
- aCBIt.Initialize(myConnexityBlocks);
- for (; aCBIt.More(); aCBIt.Next()) {
- const BOP_ConnexityBlock& aCB=aCBIt.Value();
- const TopTools_ListOfShape& aLE=aCB.Shapes();
- //
- bIsRegular=aCB.IsRegular();
- if (bIsRegular) {
- MakeWire(aLE, aW);
- myNewWES.AddShape (aW);
- continue;
- }
- //
- GEOMAlgo_WireSplitter aWS;
- //
- if(bToScale) {
- TopoDS_Shape aE;
- TopTools_ListIteratorOfListOfShape aIt;
- BOPTColStd_ListIteratorOfListOfListOfShape aItLLSS;
- //
- aWSC.SetScale(aScale);
- aWSC.SetFace(aF);
- aWSC.SetEdges(aLE);
- //
- aWSC.Perform();
- iErr=aWSC.ErrorStatus();
- if (iErr) {
- return;
- }
- //
- const TopoDS_Face& aFS=aWSC.FaceScaled();
- const TopTools_ListOfShape& aLES=aWSC.EdgesScaled();
- //
- aWS.SetFace(aFS);
- aWS.SetEdges(aLES);
- //
- aWS.Perform();
- iErr=aWS.ErrorStatus();
- if (iErr) {
- continue;
- }
- //
- bIsNothingToDo=aWS.IsNothingToDo();
- if (bIsNothingToDo) {
- MakeWire(aLE, aW);
- myNewWES.AddShape (aW);
- continue;
- }
- //
- const BOPTColStd_ListOfListOfShape& aLLSS=aWS.Shapes();
- aItLLSS.Initialize(aLLSS);
- for (; aItLLSS.More(); aItLLSS.Next()) {
- TopTools_ListOfShape aLS;
- //
- const TopTools_ListOfShape& aLSS=aItLLSS.Value();
- aIt.Initialize(aLSS);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aES=aIt.Value();
- aE=aWSC.Origin(aES);
- aLS.Append(aE);
- }
- //
- MakeWire(aLS, aW);
- myNewWES.AddShape (aW);
- }
- }//if(bToScale)
- //
- else {
- aWS.SetFace(aF);
- aWS.SetEdges(aLE);
- //
- aWS.Perform();
- iErr=aWS.ErrorStatus();
- if (iErr) {
- continue;
- }
- bIsNothingToDo=aWS.IsNothingToDo();
- if (bIsNothingToDo) {
- MakeWire(aLE, aW);
- myNewWES.AddShape (aW);
- continue;
- }
- //
- const BOPTColStd_ListOfListOfShape& aSSS=aWS.Shapes();
- //
- BOPTColStd_ListIteratorOfListOfListOfShape aWireIt(aSSS);
- for (; aWireIt.More(); aWireIt.Next()) {
- const TopTools_ListOfShape& aLEx=aWireIt.Value();
- //
- MakeWire(aLEx, aW);
- myNewWES.AddShape (aW);
- }
- }// else
- }
-}
-
-//=======================================================================
-// function: MakeWire
-// purpose:
-//=======================================================================
- void MakeWire(const TopTools_ListOfShape& aLE,
- TopoDS_Wire& newWire)
-{
- BRep_Builder aBB;
- aBB.MakeWire(newWire);
-
- TopTools_ListIteratorOfListOfShape anIt(aLE);
- for (; anIt.More(); anIt.Next()){
- const TopoDS_Edge& aE=TopoDS::Edge(anIt.Value());
- aBB.Add(newWire, aE);
- }
-}
-
-//=======================================================================
-//function : IsToScale
-//purpose :
-//=======================================================================
-Standard_Boolean IsToScale(const TopoDS_Face& aF,
- Standard_Real& aScale)
-{
- Standard_Boolean bRet;
- Standard_Real aV1, aV2, dV, aTr;
- GeomAbs_SurfaceType aType;
- BRepAdaptor_Surface aBAS;
- //
- bRet=Standard_False;
- aScale=1.;
- //
- aBAS.Initialize(aF);
- aType=aBAS.GetType();
- if (aType==GeomAbs_Cylinder) {
- aTr=1.e5;
- aV1=aBAS.FirstVParameter();
- aV2=aBAS.LastVParameter();
- dV=aV2-aV1;
- //
- if (dV>aTr) {
- bRet=!bRet;
- aScale=1./aTr;
- return bRet;
- }
- }
- return bRet;
-}
+++ /dev/null
-
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTAlgo_WESCorrector.hxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _GEOMAlgo_WESCorrector_HeaderFile
-#define _GEOMAlgo_WESCorrector_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <GEOMAlgo_PWireEdgeSet.hxx>
-#include <GEOMAlgo_WireEdgeSet.hxx>
-#include <BOP_ListOfConnexityBlock.hxx>
-#include <GEOMAlgo_Algo.hxx>
-
-
-//! The algorithm to change the Wire Edges Set (WES) contents. <br>
-//! The NewWES will contain only wires instead of wires and edges. <br>
-//=======================================================================
-//class : GEOMAlgo_WESCorrector
-//purpose :
-//=======================================================================
-class GEOMAlgo_WESCorrector : public GEOMAlgo_Algo
-{
- public:
- //! Empty constructor; <br>
- //! <br>
- Standard_EXPORT
- GEOMAlgo_WESCorrector();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_WESCorrector();
-
- //! Modifier <br>
- Standard_EXPORT
- void SetWES(const GEOMAlgo_WireEdgeSet& aWES) ;
-
- //! Performs the algorithm that consists of two steps <br>
- //! 1. Make conexity blocks ( DoConnexityBlocks() ) <br>
- //! 2. Make corrections ( DoCorrections() ) <br>
- Standard_EXPORT
- virtual void Perform() ;
-
- //! Selector <br>
- Standard_EXPORT
- GEOMAlgo_WireEdgeSet& WES() ;
-
- //! Selector <br>
- Standard_EXPORT
- GEOMAlgo_WireEdgeSet& NewWES() ;
-
-protected:
- Standard_EXPORT
- void DoConnexityBlocks() ;
-
- Standard_EXPORT
- void DoCorrections() ;
-
-
- GEOMAlgo_PWireEdgeSet myWES;
- GEOMAlgo_WireEdgeSet myNewWES;
- BOP_ListOfConnexityBlock myConnexityBlocks;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_WESScaler.cxx
-// Created:
-// Author:
-// <pkv@VORTEX>
-
-
-#include <GEOMAlgo_WESScaler.hxx>
-
-#include <gp_Pnt.hxx>
-#include <gp_Trsf.hxx>
-
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Iterator.hxx>
-#include <TopoDS_Wire.hxx>
-#include <BRep_Builder.hxx>
-
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-
-#include <BRepBuilderAPI_Transform.hxx>
-
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- GEOMAlgo_WESScaler::GEOMAlgo_WESScaler()
-:
- GEOMAlgo_Algo()
-{
- myScale=1.;
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
- GEOMAlgo_WESScaler::~GEOMAlgo_WESScaler()
-{
-}
-//=======================================================================
-// function: SetScale
-// purpose:
-//=======================================================================
- void GEOMAlgo_WESScaler::SetScale (const Standard_Real aScale)
-{
- myScale=aScale;
-}
-//=======================================================================
-// function: Scale
-// purpose:
-//=======================================================================
- Standard_Real GEOMAlgo_WESScaler::Scale()const
-{
- return myScale;
-}
-//=======================================================================
-// function: SetFace
-// purpose:
-//=======================================================================
- void GEOMAlgo_WESScaler::SetFace(const TopoDS_Face& aF)
-{
- myFace=aF;
-}
-//=======================================================================
-// function: Face
-// purpose:
-//=======================================================================
- const TopoDS_Face& GEOMAlgo_WESScaler::Face()const
-{
- return myFace;
-}
-//=======================================================================
-// function: SetEdges
-// purpose:
-//=======================================================================
- void GEOMAlgo_WESScaler::SetEdges(const TopTools_ListOfShape& aLE)
-{
- myEdges=aLE;
-}
-//=======================================================================
-// function: Edges
-// purpose:
-//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_WESScaler::Edges()const
-{
- return myEdges;
-}
-//=======================================================================
-// function: FaceScaled
-// purpose:
-//=======================================================================
- const TopoDS_Face& GEOMAlgo_WESScaler::FaceScaled()const
-{
- return myFaceScaled;
-}
-//=======================================================================
-// function: EdgesScaled
-// purpose:
-//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_WESScaler::EdgesScaled()const
-{
- return myEdgesScaled;
-}
-//=======================================================================
-// function: Image
-// purpose:
-//=======================================================================
- const TopoDS_Shape& GEOMAlgo_WESScaler::Image (const TopoDS_Shape& aS) const
-{
- if (myImages.IsBound(aS)) {
- return myImages.Find(aS);
- }
- return myShapeTmp;
-}
-//=======================================================================
-// function: Origin
-// purpose:
-//=======================================================================
- const TopoDS_Shape& GEOMAlgo_WESScaler::Origin (const TopoDS_Shape& aS) const
-{
- if (myOrigins.IsBound(aS)) {
- return myOrigins.Find(aS);
- }
- return myShapeTmp;
-}
-//=======================================================================
-// function: Images
-// purpose:
-//=======================================================================
- const GEOMAlgo_DataMapOfOrientedShapeShape& GEOMAlgo_WESScaler::Images () const
-{
- return myImages;
-}
-//=======================================================================
-// function: Origins
-// purpose:
-//=======================================================================
- const GEOMAlgo_DataMapOfOrientedShapeShape& GEOMAlgo_WESScaler::Origins () const
-{
- return myOrigins;
-}
-//=======================================================================
-// function: CheckData
-// purpose:
-//=======================================================================
- void GEOMAlgo_WESScaler::CheckData()
-{
- myErrorStatus=0;
- //
- if(myFace.IsNull()) {
- myErrorStatus=2;
- return;
- }
- if(!myEdges.Extent()) {
- myErrorStatus=3;
- return;
- }
- if (myScale<=0.){
- myErrorStatus=4;
- }
-}
-//=======================================================================
-// function: Perform
-// purpose:
-//=======================================================================
- void GEOMAlgo_WESScaler::Perform()
-{
- Standard_Boolean bIsDone;
- Standard_Integer i;
- gp_Pnt aP;
- gp_Trsf aTrsf;
- TopAbs_Orientation aOr;
- TopoDS_Shape aFC, aFR, aER;
- TopoDS_Wire aWE;
- TopoDS_Iterator aItS;
- BRep_Builder aBB;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- // 0. CheckData
- CheckData();
- if(myErrorStatus) {
- return;
- }
- //
- myImages.Clear();
- myOrigins.Clear();
- myEdgesScaled.Clear();
- //
- // 1. aFC
- aFC=myFace.EmptyCopied();
- //
- aBB.MakeWire(aWE);
- aIt.Initialize(myEdges);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aE=aIt.Value();
- aBB.Add(aWE, aE);
- }
- aBB.Add(aFC, aWE);
- //
- aItS.Initialize(myFace);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aW=aItS.Value();
- aBB.Add(aFC, aW);
- }
- //
- // 2. Scale aFC
- aP.SetCoord(0.,0.,0.);
- aTrsf.SetScale(aP, myScale);
- //
- BRepBuilderAPI_Transform aBT(aTrsf);
- aBT.Perform(aFC);
- bIsDone=aBT.IsDone();
- if (!bIsDone) {
- myErrorStatus=10;
- return;
- }
- //
- const TopoDS_Shape& aSR=aBT.Shape();
- //
- // Refined image face FR
- aFR=aSR.EmptyCopied();
- aItS.Initialize(aSR);
- for (i=0; aItS.More(); aItS.Next(),++i) {
- const TopoDS_Shape& aWR=aItS.Value();
- if (i) {
- aBB.Add(aFR, aWR);
- }
- }
- myFaceScaled=*((TopoDS_Face*)&aFR);
- //
- // 3. Fill Images, Origins, EdgesScaled
- aIt.Initialize(myEdges);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aE=aIt.Value();
- aOr=aE.Orientation();
- //
- aER=aBT.ModifiedShape(aE);
- if(aER.IsNull()) {
- myErrorStatus=11;
- return;
- }
- //
- aER.Orientation(aOr);
- myImages.Bind(aE, aER);
- myOrigins.Bind(aER, aE);
- //
- myEdgesScaled.Append(aER);
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_WESScaler.hxx
-// Created:
-// Author:
-// <pkv@VORTEX>
-
-#ifndef _GEOMAlgo_WESScaler_HeaderFile
-#define _GEOMAlgo_WESScaler_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Real.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
-#include <TopoDS_Shape.hxx>
-#include <GEOMAlgo_Algo.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_WESScaler
-//purpose :
-//=======================================================================
-class GEOMAlgo_WESScaler : public GEOMAlgo_Algo
-{
-public:
- //! Empty constructor <br>
- Standard_EXPORT
- GEOMAlgo_WESScaler();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_WESScaler();
-
- //! Modifier <br>
- Standard_EXPORT
- void SetScale(const Standard_Real aWES) ;
-
- //! Selector <br>
- Standard_EXPORT
- Standard_Real Scale() const;
-
- Standard_EXPORT
- void SetFace(const TopoDS_Face& aF) ;
-
- Standard_EXPORT
- const TopoDS_Face& Face() const;
-
- Standard_EXPORT
- void SetEdges(const TopTools_ListOfShape& aLE) ;
-
- Standard_EXPORT
- const TopTools_ListOfShape& Edges() const;
-
- //! Performs the algorithm <br>
- Standard_EXPORT
- virtual void Perform() ;
-
- Standard_EXPORT
- const TopoDS_Face& FaceScaled() const;
-
- Standard_EXPORT
- const TopTools_ListOfShape& EdgesScaled() const;
-
- Standard_EXPORT
- const TopoDS_Shape& Image(const TopoDS_Shape& aS) const;
-
- Standard_EXPORT
- const TopoDS_Shape& Origin(const TopoDS_Shape& aS) const;
-
- //! Selector <br>
- Standard_EXPORT
- const GEOMAlgo_DataMapOfOrientedShapeShape& Images() const;
-
- //! Selector <br>
- Standard_EXPORT
- const GEOMAlgo_DataMapOfOrientedShapeShape& Origins() const;
-
- protected:
-
- //! Performs the algorithm <br>
- Standard_EXPORT virtual void CheckData() ;
-
-
- Standard_Real myScale;
- TopoDS_Face myFace;
- TopTools_ListOfShape myEdges;
- TopoDS_Face myFaceScaled;
- TopTools_ListOfShape myEdgesScaled;
- GEOMAlgo_DataMapOfOrientedShapeShape myImages;
- GEOMAlgo_DataMapOfOrientedShapeShape myOrigins;
- TopoDS_Shape myShapeTmp;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_WireEdgeSet.cxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <GEOMAlgo_WireEdgeSet.hxx>
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- GEOMAlgo_WireEdgeSet::GEOMAlgo_WireEdgeSet()
-{
- Clear();
-}
-
-//=======================================================================
-//function : Clear
-//purpose :
-//=======================================================================
- void GEOMAlgo_WireEdgeSet::Clear()
-{
- myStartShapes.Clear();
- myShapes.Clear();
-}
-//=======================================================================
-//function : SetFace
-//purpose :
-//=======================================================================
- void GEOMAlgo_WireEdgeSet::SetFace(const TopoDS_Face& aF)
-{
- myFace=aF;
-}
-//=======================================================================
-//function : Face
-//purpose :
-//=======================================================================
- const TopoDS_Face& GEOMAlgo_WireEdgeSet::Face()const
-{
- return myFace;
-}
-//=======================================================================
-//function : AddStartElement
-//purpose :
-//=======================================================================
- void GEOMAlgo_WireEdgeSet::AddStartElement(const TopoDS_Shape& aE)
-{
- myStartShapes.Append(aE);
-}
-//=======================================================================
-//function : StartElements
-//purpose :
-//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_WireEdgeSet::StartElements()const
-{
- return myStartShapes;
-}
-//=======================================================================
-//function : AddShape
-//purpose :
-//=======================================================================
- void GEOMAlgo_WireEdgeSet::AddShape(const TopoDS_Shape& aW)
-{
- myShapes.Append(aW);
-}
-//=======================================================================
-//function : Shapes
-//purpose :
-//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_WireEdgeSet::Shapes()const
-{
- return myShapes;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_WireEdgeSet.hxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-
-#ifndef _GEOMAlgo_WireEdgeSet_HeaderFile
-#define _GEOMAlgo_WireEdgeSet_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopoDS_Shape.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_WireEdgeSet
-//purpose :
-//=======================================================================
-class GEOMAlgo_WireEdgeSet {
- public:
- Standard_EXPORT
- GEOMAlgo_WireEdgeSet();
-
- Standard_EXPORT
- void Clear() ;
-
- Standard_EXPORT
- void SetFace(const TopoDS_Face& aF) ;
-
- Standard_EXPORT
- const TopoDS_Face& Face() const;
-
- Standard_EXPORT
- void AddStartElement(const TopoDS_Shape& sS) ;
-
- Standard_EXPORT
- const TopTools_ListOfShape& StartElements() const;
-
- Standard_EXPORT
- void AddShape(const TopoDS_Shape& sS) ;
-
- Standard_EXPORT
- const TopTools_ListOfShape& Shapes() const;
-
-protected:
- TopoDS_Face myFace;
- TopTools_ListOfShape myStartShapes;
- TopTools_ListOfShape myShapes;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_WireSolid.cxx
-// Created: Wed Jan 12 10:19:31 2005
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <GEOMAlgo_WireSolid.hxx>
-
-#include <Standard_Failure.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-
-#include <BOPTColStd_Dump.hxx>
-
-#include <BooleanOperations_ShapesDataStructure.hxx>
-#include <BooleanOperations_StateOfShape.hxx>
-
-#include <BOPTools_PaveFiller.hxx>
-#include <BOPTools_SplitShapesPool.hxx>
-#include <BOPTools_PaveBlock.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <BOPTools_DSFiller.hxx>
-#include <BOPTools_WireStateFiller.hxx>
-
-//=======================================================================
-//function : GEOMAlgo_WireSolid
-//purpose :
-//=======================================================================
-GEOMAlgo_WireSolid::GEOMAlgo_WireSolid()
-:
- GEOMAlgo_ShapeSolid()
-{
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-GEOMAlgo_WireSolid::~GEOMAlgo_WireSolid()
-{
-}
-//=======================================================================
-// function: Perform
-// purpose:
-//=======================================================================
-void GEOMAlgo_WireSolid::Perform()
-{
- myErrorStatus=0;
- //
- try {
- if (myDSFiller==NULL) {
- myErrorStatus=10;
- return;
- }
- if(!myDSFiller->IsDone()) {
- myErrorStatus=11;
- return;
- }
- //
- Standard_Boolean bIsNewFiller;
- //
- bIsNewFiller=myDSFiller->IsNewFiller();
-
- if (bIsNewFiller) {
- Prepare();
- myDSFiller->SetNewFiller(!bIsNewFiller);
- }
- BuildResult();
- }
- //
- catch (Standard_Failure) {
- myErrorStatus= 12;
- }
-}
-//=======================================================================
-// function: Prepare
-// purpose:
-//=======================================================================
-void GEOMAlgo_WireSolid::Prepare()
-{
- const BOPTools_PaveFiller& aPaveFiller=myDSFiller->PaveFiller();
- //
- BOPTools_WireStateFiller aStateFiller(aPaveFiller);
- aStateFiller.Do();
- //
-}
-//=======================================================================
-// function: BuildResult
-// purpose:
-//=======================================================================
-void GEOMAlgo_WireSolid::BuildResult()
-{
- const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS();
- const BOPTools_PaveFiller& aPaveFiller=myDSFiller->PaveFiller();
- const BOPTools_SplitShapesPool& aSplitShapesPool=aPaveFiller.SplitShapesPool();
- //
- Standard_Integer i, aNbPB, nSp, iBeg, iEnd;
- TopAbs_ShapeEnum aType;
- BooleanOperations_StateOfShape aState;
- //
- myLSIN.Clear();
- myLSOUT.Clear();
- myLSON.Clear();
- //
- iBeg=1;
- iEnd=aDS.NumberOfShapesOfTheObject();
- if (aDS.Tool().ShapeType()==TopAbs_WIRE) {
- iBeg=iEnd+1;
- iEnd=aDS.NumberOfSourceShapes();
- }
- //
- for (i=iBeg; i<=iEnd; ++i) {
- aType=aDS.GetShapeType(i);
- if (aType==TopAbs_EDGE) {
- const TopoDS_Shape& aE=aDS.Shape(i);
- const BOPTools_ListOfPaveBlock& aLPB=aSplitShapesPool(aDS.RefEdge(i));
- aNbPB=aLPB.Extent();
- //
- if (!aNbPB) {
- aState=aDS.GetState(i);
- //
- if (aState==BooleanOperations_IN) {
- myLSIN.Append(aE);
- }
- else if (aState==BooleanOperations_OUT) {
- myLSOUT.Append(aE);
- }
- else if (aState==BooleanOperations_ON) {
- myLSON.Append(aE);
- }
- }
- //
- else if (aNbPB==1) {
- const BOPTools_PaveBlock& aPB=aLPB.First();
- nSp=aPB.Edge();
- /*const TopoDS_Shape& aSp=*/aDS.Shape(nSp);
- aState=aDS.GetState(nSp);
- //
- if (aState==BooleanOperations_IN) {
- myLSIN.Append(aE);
- }
- else if (aState==BooleanOperations_OUT) {
- myLSOUT.Append(aE);
- }
- else if (aState==BooleanOperations_ON) {
- myLSON.Append(aE);
- }
- }
- }
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_WireSolid.hxx
-// Created: Wed Jan 12 10:19:31 2005
-// Author: Peter KURNEV
-// <pkv@irinox>
-
-#ifndef _GEOMAlgo_WireSolid_HeaderFile
-#define _GEOMAlgo_WireSolid_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <GEOMAlgo_ShapeSolid.hxx>
-
-//=======================================================================
-//class : GEOMAlgo_WireSolid
-//purpose :
-//=======================================================================
-class GEOMAlgo_WireSolid : public GEOMAlgo_ShapeSolid
-{
- public:
- Standard_EXPORT
- GEOMAlgo_WireSolid();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_WireSolid();
-
- Standard_EXPORT
- virtual void Perform() ;
-
- protected:
- Standard_EXPORT
- virtual void Prepare() ;
-
- Standard_EXPORT
- virtual void BuildResult() ;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_WireSplitter.cxx
-// Author: Peter KURNEV
-
-#include <GEOMAlgo_WireSplitter.hxx>
-
-#include <TColStd_SequenceOfReal.hxx>
-#include <Precision.hxx>
-
-#include <gp_Pnt2d.hxx>
-#include <gp_Vec2d.hxx>
-#include <TColgp_SequenceOfPnt2d.hxx>
-
-#include <Geom_Curve.hxx>
-#include <Geom2d_Curve.hxx>
-#include <GeomAdaptor_Surface.hxx>
-
-#include <TopAbs_Orientation.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Iterator.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRepAdaptor_Surface.hxx>
-#include <BRepAdaptor_Curve2d.hxx>
-
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <TopTools_SequenceOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-
-#include <BOPTColStd_ListOfListOfShape.hxx>
-#include <BOPTColStd_ListIteratorOfListOfListOfShape.hxx>
-
-#include <BOPTools_Tools2D.hxx>
-
-#include <BOP_EdgeInfo.hxx>
-#include <BOP_ListOfEdgeInfo.hxx>
-#include <BOP_ListIteratorOfListOfEdgeInfo.hxx>
-#include <BOP_IndexedDataMapOfVertexListEdgeInfo.hxx>
-
-static
- void Path (const GeomAdaptor_Surface& aGAS,
- const TopoDS_Face& myFace,
- const TopoDS_Vertex& aVa,
- const TopoDS_Edge& aEOuta,
- BOP_EdgeInfo& anEdgeInfo,
- TopTools_SequenceOfShape& aLS,
- TopTools_SequenceOfShape& aVertVa,
- TColgp_SequenceOfPnt2d& aCoordVa,
- BOPTColStd_ListOfListOfShape& myShapes,
- BOP_IndexedDataMapOfVertexListEdgeInfo& mySmartMap);
-
-
-static
- Standard_Real Angle (const gp_Dir2d& aDir2D);
-
-
-static
- void GetNextVertex(const TopoDS_Vertex& aV,
- const TopoDS_Edge& aE,
- TopoDS_Vertex& aV1);
-static
- Standard_Real ClockWiseAngle(const Standard_Real aAngleIn,
- const Standard_Real aAngleOut);
-
-static
- Standard_Real AngleIn(const TopoDS_Edge& aEIn,
- const BOP_ListOfEdgeInfo& aLEInfo);
-
-static
- Standard_Real Angle2D (const TopoDS_Vertex& aV,
- const TopoDS_Edge& anEdge,
- const TopoDS_Face& myFace,
- const GeomAdaptor_Surface& aGAS,
- const Standard_Boolean aFlag);
-static
- gp_Pnt2d Coord2d (const TopoDS_Vertex& aV1,
- const TopoDS_Edge& aE1,
- const TopoDS_Face& aF);
-static
- gp_Pnt2d Coord2dVf (const TopoDS_Edge& aE,
- const TopoDS_Face& aF);
-static
- Standard_Real Tolerance2D (const TopoDS_Vertex& aV,
- const GeomAdaptor_Surface& aGAS);
-
-
-//modified by NIZNHY-PKV Thu Apr 19 09:04:59 2012f
-static
- Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta,
- const BOP_ListOfEdgeInfo& aLEInfo);
-//static
-// Standard_Integer NbWaysOut(const BOP_ListOfEdgeInfo& );
-//modified by NIZNHY-PKV Thu Apr 19 09:04:53 2012t
-
-//=======================================================================
-// function:
-// purpose:
-//=======================================================================
- GEOMAlgo_WireSplitter::GEOMAlgo_WireSplitter()
-:
- GEOMAlgo_Algo(),
- myNothingToDo(Standard_False)
-{
-}
-//=======================================================================
-// function: ~
-// purpose:
-//=======================================================================
- GEOMAlgo_WireSplitter::~GEOMAlgo_WireSplitter()
-{
-}
-//=======================================================================
-// function: SetFace
-// purpose:
-//=======================================================================
- void GEOMAlgo_WireSplitter::SetFace(const TopoDS_Face& aFace)
-{
- myFace=aFace;
-}
-//=======================================================================
-// function: Face
-// purpose:
-//=======================================================================
- const TopoDS_Face& GEOMAlgo_WireSplitter::Face()const
-{
- return myFace;
-}
-//=======================================================================
-// function: SetEdges
-// purpose:
-//=======================================================================
- void GEOMAlgo_WireSplitter::SetEdges(const TopTools_ListOfShape& aLE)
-{
- TopTools_ListIteratorOfListOfShape anIt;
- //
- myEdges.Clear();
- anIt.Initialize(aLE);
- for (; anIt.More(); anIt.Next()) {
- const TopoDS_Shape& aE =anIt.Value();
- //
- if (aE.Orientation()==TopAbs_INTERNAL){
- continue;
- }
- //
- myEdges.Append(aE);
- }
-}
-//=======================================================================
-// function: Edges
-// purpose:
-//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_WireSplitter::Edges()const
-{
- return myEdges;
-}
-//=======================================================================
-// function: IsNothingToDo
-// purpose:
-//=======================================================================
- Standard_Boolean GEOMAlgo_WireSplitter::IsNothingToDo()const
-{
- return myNothingToDo;
-}
-//=======================================================================
-// function: Shapes
-// purpose:
-//=======================================================================
- const BOPTColStd_ListOfListOfShape& GEOMAlgo_WireSplitter::Shapes()const
-{
- return myShapes;
-}
-//=======================================================================
-// function: Perform
-// purpose:
-//=======================================================================
- void GEOMAlgo_WireSplitter::Perform()
-{
- myErrorStatus=2;
- myNothingToDo=Standard_True;
-
- Standard_Integer index, i, aNb, aCntIn, aCntOut;
- Standard_Boolean anIsIn;
- Standard_Real anAngle;
-
- BOP_ListOfEdgeInfo emptyInfo;
- TopTools_ListIteratorOfListOfShape anItList;
- //
- // 1.Filling mySmartMap
- mySmartMap.Clear();
-
- anItList.Initialize(myEdges);
- for (; anItList.More(); anItList.Next()) {
- const TopoDS_Edge& anEdge = TopoDS::Edge(anItList.Value());
- //
- if (!BOPTools_Tools2D::HasCurveOnSurface (anEdge, myFace)) {
- continue;
- }
- //
- TopExp_Explorer anExpVerts (anEdge, TopAbs_VERTEX);
- for (; anExpVerts.More(); anExpVerts.Next()) {
- const TopoDS_Shape& aVertex= anExpVerts.Current();
-
- index = mySmartMap.FindIndex(aVertex);
- if (!index) {
- index=mySmartMap.Add(aVertex, emptyInfo);
- }
-
- BOP_ListOfEdgeInfo& aListOfEInfo=mySmartMap(index);
-
- BOP_EdgeInfo aEInfo;
- aEInfo.SetEdge(anEdge);
-
- TopAbs_Orientation anOr=aVertex.Orientation();
-
- if (anOr==TopAbs_FORWARD) {
- aEInfo.SetInFlag(Standard_False);
- }
-
- else if (anOr==TopAbs_REVERSED) {
- aEInfo.SetInFlag(Standard_True);
- }
-
- aListOfEInfo.Append(aEInfo);
- }
- }
- //
- aNb=mySmartMap.Extent();
- //
- // 2. myNothingToDo
- myNothingToDo=Standard_True;
-
- for (i=1; i<=aNb; i++) {
- aCntIn=0;
- aCntOut=0;
- const BOP_ListOfEdgeInfo& aLEInfo= mySmartMap(i);
- BOP_ListIteratorOfListOfEdgeInfo anIt(aLEInfo);
- for (; anIt.More(); anIt.Next()) {
- const BOP_EdgeInfo& anEdgeInfo=anIt.Value();
- anIsIn=anEdgeInfo.IsIn();
- if (anIsIn) {
- aCntIn++;
- }
- else {
- aCntOut++;
- }
- }
- if (aCntIn!=1 || aCntOut!=1) {
- myNothingToDo=Standard_False;
- break;
- }
- }
- //
- // Each vertex has one edge In and one - Out. Good. But it is not enought
- // to consider that nothing to do with this. We must check edges on TShape
- // coinsidence. If there are such edges there is something to do with.
- //
- if (myNothingToDo) {
- Standard_Integer aNbE, aNbMapEE;
- TopTools_IndexedDataMapOfShapeListOfShape aMapEE;
- aNbE=myEdges.Extent();
-
- anItList.Initialize(myEdges);
- for (; anItList.More(); anItList.Next()) {
- const TopoDS_Shape& aE = anItList.Value();
-
- if (!aMapEE.Contains(aE)) {
- TopTools_ListOfShape aLEx;
- aLEx.Append(aE);
- aMapEE.Add(aE, aLEx);
- }
- else {
- TopTools_ListOfShape& aLEx=aMapEE.ChangeFromKey(aE);
- aLEx.Append(aE);
- }
- }
-
- Standard_Boolean bFlag;
- bFlag=Standard_True;
- aNbMapEE=aMapEE.Extent();
- for (i=1; i<=aNbMapEE; i++) {
- const TopTools_ListOfShape& aLEx=aMapEE(i);
- aNbE=aLEx.Extent();
- if (aNbE==1) {
- // usual case
- continue;
- }
- else if (aNbE==2){
- const TopoDS_Shape& aE1=aLEx.First();
- const TopoDS_Shape& aE2=aLEx.Last();
- if (aE1.IsSame(aE2)) {
- bFlag=Standard_False;
- break;
- }
- }
- else {
- bFlag=Standard_False;
- break;
- }
- }
- myNothingToDo=myNothingToDo && bFlag;
- }
- //
- //
- if (myNothingToDo) {
- myErrorStatus=0;
- return;
- }
- //
- // 3. Angles in mySmartMap
- BRepAdaptor_Surface aBAS(myFace);
- const GeomAdaptor_Surface& aGAS=aBAS.Surface();
- for (i=1; i<=aNb; i++) {
- const TopoDS_Vertex& aV=TopoDS::Vertex (mySmartMap.FindKey(i));
- const BOP_ListOfEdgeInfo& aLEInfo= mySmartMap(i);
-
- BOP_ListIteratorOfListOfEdgeInfo anIt(aLEInfo);
- for (; anIt.More(); anIt.Next()) {
- BOP_EdgeInfo& anEdgeInfo=anIt.Value();
- const TopoDS_Edge& aE=anEdgeInfo.Edge();
- //
- TopoDS_Vertex aVV=aV;
- //
- anIsIn=anEdgeInfo.IsIn();
- if (anIsIn) {
- //
- aVV.Orientation(TopAbs_REVERSED);
- anAngle=Angle2D (aVV, aE, myFace, aGAS, Standard_True);
- }
- //
- else { // OUT
- //
- aVV.Orientation(TopAbs_FORWARD);
- anAngle=Angle2D (aVV, aE, myFace, aGAS, Standard_False);
- }
- anEdgeInfo.SetAngle(anAngle);
-
- }
- }
- //
- // 4. Do
- //
- Standard_Boolean anIsOut, anIsNotPassed;
-
- TopTools_SequenceOfShape aLS, aVertVa;
- TColgp_SequenceOfPnt2d aCoordVa;
-
- BOP_ListIteratorOfListOfEdgeInfo anIt;
-
- for (i=1; i<=aNb; i++) {
- const TopoDS_Vertex aVa=TopoDS::Vertex (mySmartMap.FindKey(i));
- const BOP_ListOfEdgeInfo& aLEInfo=mySmartMap(i);
-
- anIt.Initialize(aLEInfo);
- for (; anIt.More(); anIt.Next()) {
- BOP_EdgeInfo& anEdgeInfo=anIt.Value();
- const TopoDS_Edge& aEOuta=anEdgeInfo.Edge();
-
- anIsOut=!anEdgeInfo.IsIn();
- anIsNotPassed=!anEdgeInfo.Passed();
-
- if (anIsOut && anIsNotPassed) {
- //
- aLS.Clear();
- aVertVa.Clear();
- aCoordVa.Clear();
- //
- Path(aGAS, myFace, aVa, aEOuta, anEdgeInfo, aLS,
- aVertVa, aCoordVa, myShapes, mySmartMap);
- }
- }
- }
- //
- {
- Standard_Integer aNbV, aNbE;
- TopoDS_Vertex aV1, aV2;
- BOPTColStd_ListOfListOfShape aShapes;
- BOPTColStd_ListIteratorOfListOfListOfShape anItW(myShapes);
-
- for (; anItW.More(); anItW.Next()) {
- TopTools_IndexedMapOfShape aMV, aME;
- const TopTools_ListOfShape& aLE=anItW.Value();
- TopTools_ListIteratorOfListOfShape anItE(aLE);
- for (; anItE.More(); anItE.Next()) {
- const TopoDS_Edge& aE=TopoDS::Edge(anItE.Value());
- aME.Add(aE);
- TopExp::Vertices(aE, aV1, aV2);
- aMV.Add(aV1);
- aMV.Add(aV2);
- }
- aNbV=aMV.Extent();
- aNbE=aME.Extent();
- if (aNbV<=aNbE) {
- aShapes.Append(aLE);
- }
- }
- //
- myShapes.Clear();
- anItW.Initialize(aShapes);
- for (; anItW.More(); anItW.Next()) {
- const TopTools_ListOfShape& aLE=anItW.Value();
- myShapes.Append(aLE);
- }
- }
- //
- myErrorStatus=0;
-}
-//=======================================================================
-// function: Path
-// purpose:
-//=======================================================================
- void Path (const GeomAdaptor_Surface& aGAS,
- const TopoDS_Face& myFace,
- const TopoDS_Vertex& aVa,
- const TopoDS_Edge& aEOuta,
- BOP_EdgeInfo& anEdgeInfo,
- TopTools_SequenceOfShape& aLS,
- TopTools_SequenceOfShape& aVertVa,
- TColgp_SequenceOfPnt2d& aCoordVa,
- BOPTColStd_ListOfListOfShape& myShapes,
- BOP_IndexedDataMapOfVertexListEdgeInfo& mySmartMap)
-{
- Standard_Integer i,j, aNb, aNbj, iCnt;
- Standard_Real aTol, anAngleIn, anAngleOut, anAngle, aMinAngle;
- Standard_Real aTol2D, aTol2D2;
- Standard_Real aTol2, aD2;
- Standard_Boolean anIsSameV2d, anIsSameV, anIsFound, anIsOut, anIsNotPassed;
- BOP_ListIteratorOfListOfEdgeInfo anIt;
- TopoDS_Vertex aVb;
- TopoDS_Edge aEOutb;
- //
- aTol=1.e-7;
- //
- // append block
- //
- // Do not escape through edge from which you enter
- aNb=aLS.Length();
- if (aNb==1) {
- const TopoDS_Shape& anEPrev=aLS(aNb);
- if (anEPrev.IsSame(aEOuta)) {
- return;
- }
- }
- //
- //
- anEdgeInfo.SetPassed(Standard_True);
- aLS.Append(aEOuta);
- aVertVa.Append(aVa);
-
- TopoDS_Vertex pVa=aVa;
- pVa.Orientation(TopAbs_FORWARD);
- gp_Pnt2d aPa=Coord2d(pVa, aEOuta, myFace);
- aCoordVa.Append(aPa);
-
- GetNextVertex (pVa, aEOuta, aVb);
-
- gp_Pnt2d aPb=Coord2d(aVb, aEOuta, myFace);
- //
- aTol=2.*Tolerance2D(aVb, aGAS);
- aTol2=10.*aTol*aTol;
- //
- aNb=aLS.Length();
- if (aNb>0) {
- //
- TopTools_ListOfShape aBuf;
- //
- for (i=aNb; i>0; i--) {
- const TopoDS_Shape& aVPrev=aVertVa(i);
- const gp_Pnt2d& aPaPrev=aCoordVa(i);
- const TopoDS_Shape& aEPrev=aLS(i);
-
- aBuf.Append(aEPrev);
-
- anIsSameV=aVPrev.IsSame(aVb);
- anIsSameV2d=Standard_False;
-
- if (anIsSameV) {
- anIsSameV2d = Standard_True;
- //
- aD2=aPaPrev.SquareDistance(aPb);
- anIsSameV2d =aD2<aTol2;
- }//if (anIsSameV) {
- //
- if (anIsSameV && anIsSameV2d) {
- myShapes.Append(aBuf);
- //
- TopTools_SequenceOfShape aLSt, aVertVat;
- TColgp_SequenceOfPnt2d aCoordVat;
- //
- aNbj=i-1;
- if (aNbj<1) {
- //
- aLS.Clear();
- aVertVa.Clear();
- aCoordVa.Clear();
- //
- return;
- }
-
- aVb=TopoDS::Vertex(aVertVa(i));
-
- for (j=1; j<=aNbj; j++) {
- aLSt.Append(aLS(j));
- aVertVat.Append(aVertVa(j));
- aCoordVat.Append(aCoordVa(j));
- }
- //
- aLS.Clear();
- aVertVa.Clear();
- aCoordVa.Clear();
-
- aLS=aLSt;
- aVertVa=aVertVat;
- aCoordVa=aCoordVat;
- //
- break;
- }
- }
- }
- //
- aTol2D=2.*Tolerance2D(aVb, aGAS);
- aTol2D2=100.*aTol2D*aTol2D;
- //
- // anAngleIn in Vb from edge aEOuta
- const BOP_ListOfEdgeInfo& aLEInfo=mySmartMap.FindFromKey(aVb);
- //
- anAngleIn=AngleIn(aEOuta, aLEInfo);
- //
- // aEOutb
- BOP_EdgeInfo *pEdgeInfo=NULL;
-
- aMinAngle=100.;
- anIsFound=Standard_False;
- //
- //modified by NIZNHY-PKV Thu Apr 19 09:05:09 2012f
- iCnt=NbWaysOut (aEOuta, aLEInfo);
- //iCnt=NbWaysOut (aLEInfo);
- //modified by NIZNHY-PKV Thu Apr 19 09:05:12 2012t
- if (!iCnt) { // no way to go . (Error)
- return ;
- }
- //
- anIt.Initialize(aLEInfo);
- for (; anIt.More(); anIt.Next()) {
- BOP_EdgeInfo& anEI=anIt.Value();
- const TopoDS_Edge& aE=anEI.Edge();
- anIsOut=!anEI.IsIn();
- anIsNotPassed=!anEI.Passed();
- //
- if (anIsOut && anIsNotPassed) {
- if (aE.IsSame(aEOuta)) {
- continue;
- }
- //
- if (iCnt==1) {
- // the one and only way to go out .
- pEdgeInfo=&anEI;
- anIsFound=Standard_True;
- break;
- }
- //
- // Look for minimal angle and make the choice.
- gp_Pnt2d aP2Dx;
- //
- aP2Dx=Coord2dVf(aE, myFace);
- //
- aD2=aP2Dx.SquareDistance(aPb);
- if (aD2 > aTol2D2){
- continue;
- }
- //
- anAngleOut=anEI.Angle();
- //
- anAngle=ClockWiseAngle(anAngleIn, anAngleOut);
- if (anAngle < aMinAngle) {
- aMinAngle=anAngle;
- pEdgeInfo=&anEI;
- anIsFound=Standard_True;
- }
- }
- } // for (; anIt.More(); anIt.Next())
- //
- if (!anIsFound) {
- // no way to go . (Error)
- return;
- }
- //
- aEOutb=pEdgeInfo->Edge();
- //
- Path (aGAS, myFace, aVb, aEOutb, *pEdgeInfo, aLS,
- aVertVa, aCoordVa, myShapes, mySmartMap);
-}
-//=======================================================================
-// function: Coord2dVf
-// purpose:
-//=======================================================================
- gp_Pnt2d Coord2dVf (const TopoDS_Edge& aE,
- const TopoDS_Face& aF)
-{
- Standard_Real aCoord=99.;
- gp_Pnt2d aP2D1(aCoord, aCoord);
- TopoDS_Iterator aIt;
- //
- aIt.Initialize(aE);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aVx=aIt.Value();
- if (aVx.Orientation()==TopAbs_FORWARD) {
- const TopoDS_Vertex& aVxx=TopoDS::Vertex(aVx);
- aP2D1=Coord2d(aVxx, aE, aF);
- return aP2D1;
- }
- }
- return aP2D1;
-}
-//=======================================================================
-// function: Tolerance2D
-// purpose:
-//=======================================================================
- Standard_Real Tolerance2D (const TopoDS_Vertex& aV,
- const GeomAdaptor_Surface& aGAS)
-{
- Standard_Real aTol2D, anUr, aVr, aTolV3D;
- GeomAbs_SurfaceType aType;
- //
- aType=aGAS.GetType();
- aTolV3D=BRep_Tool::Tolerance(aV);
-
- anUr=aGAS.UResolution(aTolV3D);
- aVr =aGAS.VResolution(aTolV3D);
- aTol2D=(aVr>anUr) ? aVr : anUr;
- //
- if (aType==GeomAbs_BSplineSurface||
- aType==GeomAbs_Sphere||
- GeomAbs_SurfaceOfRevolution) {
- if (aTol2D < aTolV3D) {
- aTol2D=aTolV3D;
- }
- }
- if (aType==GeomAbs_BSplineSurface) {
- aTol2D=1.1*aTol2D;
- }
- //
- return aTol2D;
-}
-
-//=======================================================================
-// function: Coord2d
-// purpose:
-//=======================================================================
- gp_Pnt2d Coord2d (const TopoDS_Vertex& aV1,
- const TopoDS_Edge& aE1,
- const TopoDS_Face& aF)
-{
- Standard_Real aT, aFirst, aLast;
- Handle(Geom2d_Curve) aC2D;
- gp_Pnt2d aP2D1;
- //
- aT=BRep_Tool::Parameter (aV1, aE1, aF);
- aC2D=BRep_Tool::CurveOnSurface(aE1, aF, aFirst, aLast);
- aC2D->D0 (aT, aP2D1);
- //
- return aP2D1;
-}
-//=======================================================================
-// function: AngleIn
-// purpose:
-//=======================================================================
- Standard_Real AngleIn(const TopoDS_Edge& aEIn,
- const BOP_ListOfEdgeInfo& aLEInfo)
-{
- Standard_Real anAngleIn;
- Standard_Boolean anIsIn;
- BOP_ListIteratorOfListOfEdgeInfo anIt;
-
- anIt.Initialize(aLEInfo);
- for (; anIt.More(); anIt.Next()) {
- BOP_EdgeInfo& anEdgeInfo=anIt.Value();
- const TopoDS_Edge& aE=anEdgeInfo.Edge();
- anIsIn=anEdgeInfo.IsIn();
- //
- if (anIsIn && aE==aEIn) {
- anAngleIn=anEdgeInfo.Angle();
- return anAngleIn;
- }
- }
- anAngleIn=0.;
- return anAngleIn;
-}
-//=======================================================================
-// function: ClockWiseAngle
-// purpose:
-//=======================================================================
- Standard_Real ClockWiseAngle(const Standard_Real aAngleIn,
- const Standard_Real aAngleOut)
-{
- Standard_Real aTwoPi = M_PI+M_PI;
- Standard_Real dA, A1, A2, AIn, AOut ;
-
- AIn=aAngleIn;
- AOut=aAngleOut;
- if (AIn >= aTwoPi) {
- AIn=AIn-aTwoPi;
- }
-
- if (AOut >= aTwoPi) {
- AOut=AOut-aTwoPi;
- }
-
- A1 = AIn + M_PI;
-
- if (A1 >= aTwoPi) {
- A1=A1-aTwoPi;
- }
-
- A2=AOut;
-
- dA=A1-A2;
- if (dA <= 0.) {
- dA=aTwoPi+dA;
- if (dA <= 1.e-14) {
- dA=aTwoPi;
- }
- }
- //xx
- else if (dA <= 1.e-14) {
- dA=aTwoPi;
- }
- return dA;
-}
-//=======================================================================
-// function: GetNextVertex
-// purpose:
-//=======================================================================
- void GetNextVertex(const TopoDS_Vertex& aV,
- const TopoDS_Edge& aE,
- TopoDS_Vertex& aV1)
-{
- TopoDS_Iterator aIt;
- //
- aIt.Initialize(aE);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aVx=aIt.Value();
- if (!aVx.IsEqual(aV)) {
- aV1=TopoDS::Vertex(aVx);
- return ;
- }
- }
- aV1=aV;
-}
-//=======================================================================
-// function: Angle2D
-// purpose:
-//=======================================================================
- Standard_Real Angle2D (const TopoDS_Vertex& aV,
- const TopoDS_Edge& anEdge,
- const TopoDS_Face& myFace,
- const GeomAdaptor_Surface& aGAS,
- const Standard_Boolean aFlag)
-{
- Standard_Real aFirst, aLast, aToler, dt, aTV, aTV1, anAngle, aTX;
- gp_Pnt2d aPV, aPV1;
- gp_Vec2d aV2D;
- Handle(Geom2d_Curve) aC2D;
- //
- aTV=BRep_Tool::Parameter (aV, anEdge, myFace);
- if (Precision::IsInfinite(aTV)) {
- return 0.;
- }
- //
- BOPTools_Tools2D::CurveOnSurface (anEdge, myFace, aC2D,
- aFirst, aLast, aToler, Standard_True);
- //dt=1.e-7;
- dt=2.*Tolerance2D(aV, aGAS);
- //
- aTX=0.25*(aLast - aFirst);
- if(dt > aTX) {
- // to save direction of the curve as much as it possible
- // in the case of big tolerances
- dt = aTX;
- }
- //
- if (fabs (aTV-aFirst) < fabs(aTV - aLast)) {
- aTV1=aTV + dt;
- }
- else {
- aTV1=aTV - dt;
- }
- //
- aC2D->D0 (aTV, aPV);
- aC2D->D0 (aTV1, aPV1);
- //
- if (aFlag) {//IN
- gp_Vec2d aV2DIn(aPV1, aPV);
- aV2D=aV2DIn;
- }
- else {
- gp_Vec2d aV2DOut(aPV, aPV1);
- aV2D=aV2DOut;
- }
- //
- gp_Dir2d aDir2D(aV2D);
- anAngle=Angle(aDir2D);
- //
- return anAngle;
-}
-//=======================================================================
-// function: Angle
-// purpose:
-//=======================================================================
-Standard_Real Angle (const gp_Dir2d& aDir2D)
-{
- gp_Dir2d aRefDir(1., 0.);
- Standard_Real anAngle = aRefDir.Angle(aDir2D);
-
- if (anAngle < 0.)
- anAngle += M_PI + M_PI;
-
- return anAngle;
-}
-//modified by NIZNHY-PKV Thu Apr 19 09:02:04 2012f
-//=======================================================================
-// function: NbWaysOut
-// purpose:
-//=======================================================================
-Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta,
- const BOP_ListOfEdgeInfo& aLEInfo)
-{
- Standard_Boolean bIsOut, bIsNotPassed;
- Standard_Integer iCnt=0;
- BOP_ListIteratorOfListOfEdgeInfo anIt;
- //
- anIt.Initialize(aLEInfo);
- for (; anIt.More(); anIt.Next()) {
- BOP_EdgeInfo& aEI=anIt.Value();
- const TopoDS_Edge& aE=aEI.Edge();
- bIsOut=!aEI.IsIn();
- bIsNotPassed=!aEI.Passed();
- if (bIsOut && bIsNotPassed) {
- if (!aE.IsSame(aEOuta)) {
- iCnt++;
- }
- }
- }
- return iCnt;
-}
-/*
-//=======================================================================
-// function: NbWaysOut
-// purpose:
-//=======================================================================
-Standard_Integer NbWaysOut(const BOP_ListOfEdgeInfo& aLEInfo)
-{
- Standard_Boolean bIsOut, bIsNotPassed;
- Standard_Integer iCnt=0;
- BOP_ListIteratorOfListOfEdgeInfo anIt;
- //
- anIt.Initialize(aLEInfo);
- for (; anIt.More(); anIt.Next()) {
- BOP_EdgeInfo& anEI=anIt.Value();
- //
- bIsOut=!anEI.IsIn();
- bIsNotPassed=!anEI.Passed();
- if (bIsOut && bIsNotPassed) {
- iCnt++;
- }
- }
- return iCnt;
-}
-*/
-//modified by NIZNHY-PKV Thu Apr 19 09:01:57 2012t
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_WireSplitter.hxx
-// Author: Peter KURNEV
-
-#ifndef _GEOMAlgo_WireSplitter_HeaderFile
-#define _GEOMAlgo_WireSplitter_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <TopoDS_Face.hxx>
-#include <Standard_Boolean.hxx>
-#include <BOPTColStd_ListOfListOfShape.hxx>
-#include <BOP_IndexedDataMapOfVertexListEdgeInfo.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <GEOMAlgo_Algo.hxx>
-
-//! the algorithm to split multiconnexed set of edges <br>
-//! wires on a face onto simple connexed wires <br>
-//! . <br>
-//=======================================================================
-//class : GEOMAlgo_WireSplitter
-//purpose :
-//=======================================================================
-class GEOMAlgo_WireSplitter : public GEOMAlgo_Algo
-{
-public:
- Standard_EXPORT
- GEOMAlgo_WireSplitter();
-
- Standard_EXPORT
- virtual ~GEOMAlgo_WireSplitter();
-
- Standard_EXPORT
- void SetFace(const TopoDS_Face& aF) ;
-
- Standard_EXPORT
- void SetEdges(const TopTools_ListOfShape& aLE) ;
-
- Standard_EXPORT
- const TopTools_ListOfShape& Edges() const;
-
- Standard_EXPORT
- virtual void Perform() ;
-
- Standard_EXPORT
- Standard_Boolean IsNothingToDo() const;
-
- Standard_EXPORT
- const TopoDS_Face& Face() const;
-
- Standard_EXPORT
- const BOPTColStd_ListOfListOfShape& Shapes() const;
-
-protected:
- TopoDS_Face myFace;
- Standard_Boolean myIsDone;
- Standard_Boolean myNothingToDo;
- BOPTColStd_ListOfListOfShape myShapes;
- BOP_IndexedDataMapOfVertexListEdgeInfo mySmartMap;
- TopTools_ListOfShape myEdges;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BlockFix_BlockFixAPI_HeaderFile
-#define _Handle_BlockFix_BlockFixAPI_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 BlockFix_BlockFixAPI;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(BlockFix_BlockFixAPI);
-
-class Handle(BlockFix_BlockFixAPI) : public Handle(MMgt_TShared) {
- 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);
- }
- Handle(BlockFix_BlockFixAPI)():Handle(MMgt_TShared)() {}
- Handle(BlockFix_BlockFixAPI)(const Handle(BlockFix_BlockFixAPI)& aHandle) : Handle(MMgt_TShared)(aHandle)
- {
- }
-
- Handle(BlockFix_BlockFixAPI)(const BlockFix_BlockFixAPI* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem)
- {
- }
-
- Handle(BlockFix_BlockFixAPI)& operator=(const Handle(BlockFix_BlockFixAPI)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(BlockFix_BlockFixAPI)& operator=(const BlockFix_BlockFixAPI* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- BlockFix_BlockFixAPI* operator->()
- {
- return (BlockFix_BlockFixAPI *)ControlAccess();
- }
-
- BlockFix_BlockFixAPI* operator->() const
- {
- return (BlockFix_BlockFixAPI *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(BlockFix_BlockFixAPI)();
-
- Standard_EXPORT static const Handle(BlockFix_BlockFixAPI) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BlockFix_PeriodicSurfaceModifier_HeaderFile
-#define _Handle_BlockFix_PeriodicSurfaceModifier_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_BRepTools_Modification_HeaderFile
-#include <Handle_BRepTools_Modification.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(BRepTools_Modification);
-class BlockFix_PeriodicSurfaceModifier;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier);
-
-class Handle(BlockFix_PeriodicSurfaceModifier) : public Handle(BRepTools_Modification) {
- 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);
- }
- Handle(BlockFix_PeriodicSurfaceModifier)():Handle(BRepTools_Modification)() {}
- Handle(BlockFix_PeriodicSurfaceModifier)(const Handle(BlockFix_PeriodicSurfaceModifier)& aHandle) : Handle(BRepTools_Modification)(aHandle)
- {
- }
-
- Handle(BlockFix_PeriodicSurfaceModifier)(const BlockFix_PeriodicSurfaceModifier* anItem) : Handle(BRepTools_Modification)((BRepTools_Modification *)anItem)
- {
- }
-
- Handle(BlockFix_PeriodicSurfaceModifier)& operator=(const Handle(BlockFix_PeriodicSurfaceModifier)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(BlockFix_PeriodicSurfaceModifier)& operator=(const BlockFix_PeriodicSurfaceModifier* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- BlockFix_PeriodicSurfaceModifier* operator->()
- {
- return (BlockFix_PeriodicSurfaceModifier *)ControlAccess();
- }
-
- BlockFix_PeriodicSurfaceModifier* operator->() const
- {
- return (BlockFix_PeriodicSurfaceModifier *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(BlockFix_PeriodicSurfaceModifier)();
-
- Standard_EXPORT static const Handle(BlockFix_PeriodicSurfaceModifier) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_BlockFix_SphereSpaceModifier_HeaderFile
-#define _Handle_BlockFix_SphereSpaceModifier_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_BRepTools_Modification_HeaderFile
-#include <Handle_BRepTools_Modification.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(BRepTools_Modification);
-class BlockFix_SphereSpaceModifier;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(BlockFix_SphereSpaceModifier);
-
-class Handle(BlockFix_SphereSpaceModifier) : public Handle(BRepTools_Modification) {
- 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);
- }
- Handle(BlockFix_SphereSpaceModifier)():Handle(BRepTools_Modification)() {}
- Handle(BlockFix_SphereSpaceModifier)(const Handle(BlockFix_SphereSpaceModifier)& aHandle) : Handle(BRepTools_Modification)(aHandle)
- {
- }
-
- Handle(BlockFix_SphereSpaceModifier)(const BlockFix_SphereSpaceModifier* anItem) : Handle(BRepTools_Modification)((BRepTools_Modification *)anItem)
- {
- }
-
- Handle(BlockFix_SphereSpaceModifier)& operator=(const Handle(BlockFix_SphereSpaceModifier)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(BlockFix_SphereSpaceModifier)& operator=(const BlockFix_SphereSpaceModifier* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- BlockFix_SphereSpaceModifier* operator->()
- {
- return (BlockFix_SphereSpaceModifier *)ControlAccess();
- }
-
- BlockFix_SphereSpaceModifier* operator->() const
- {
- return (BlockFix_SphereSpaceModifier *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(BlockFix_SphereSpaceModifier)();
-
- Standard_EXPORT static const Handle(BlockFix_SphereSpaceModifier) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# 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
-#
-
-# GEOM GEOMAlgo : tools for Glue Faces algorithm
-# File : Makefile.am
-# Author : Julia DOROVSKIKH
-# Module : GEOM
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-# Libraries targets
-lib_LTLIBRARIES = libGEOMAlgo.la
-
-dist_libGEOMAlgo_la_SOURCES = \
- BlockFix_BlockFixAPI.cxx \
- BlockFix_CheckTool.cxx \
- BlockFix.cxx \
- BlockFix_PeriodicSurfaceModifier.cxx \
- BlockFix_SphereSpaceModifier.cxx \
- BlockFix_UnionEdges.cxx \
- BlockFix_UnionFaces.cxx \
- GEOMAlgo_Algo.cxx \
- GEOMAlgo_Builder_0.cxx \
- GEOMAlgo_Builder_1.cxx \
- GEOMAlgo_Builder_2.cxx \
- GEOMAlgo_Builder_3.cxx \
- GEOMAlgo_Builder_4.cxx \
- GEOMAlgo_BuilderArea.cxx \
- GEOMAlgo_Builder.cxx \
- GEOMAlgo_BuilderFace.cxx \
- GEOMAlgo_BuilderShape.cxx \
- GEOMAlgo_BuilderSolid.cxx \
- GEOMAlgo_BuilderTools.cxx \
- GEOMAlgo_ClsfBox.cxx \
- GEOMAlgo_Clsf.cxx \
- GEOMAlgo_ClsfSolid.cxx \
- GEOMAlgo_ClsfSurf.cxx \
- GEOMAlgo_CoupleOfShapes.cxx \
- GEOMAlgo_FinderShapeOn1.cxx \
- GEOMAlgo_FinderShapeOn2.cxx \
- GEOMAlgo_FinderShapeOn.cxx \
- GEOMAlgo_FinderShapeOnQuad.cxx \
- GEOMAlgo_GetInPlace_1.cxx \
- GEOMAlgo_GetInPlace_2.cxx \
- GEOMAlgo_GetInPlace_3.cxx \
- GEOMAlgo_GetInPlace.cxx \
- GEOMAlgo_GlueAnalyser.cxx \
- GEOMAlgo_GlueDetector.cxx \
- GEOMAlgo_Gluer2_1.cxx \
- GEOMAlgo_Gluer2_2.cxx \
- GEOMAlgo_Gluer2_3.cxx \
- GEOMAlgo_Gluer2.cxx \
- GEOMAlgo_GluerAlgo.cxx \
- GEOMAlgo_Gluer.cxx \
- GEOMAlgo_HAlgo.cxx \
- GEOMAlgo_PassKey.cxx \
- GEOMAlgo_PassKeyMapHasher.cxx \
- GEOMAlgo_PassKeyShape.cxx \
- GEOMAlgo_PassKeyShapeMapHasher.cxx \
- GEOMAlgo_ShapeAlgo.cxx \
- GEOMAlgo_ShapeInfo.cxx \
- GEOMAlgo_ShapeInfoFiller_1.cxx \
- GEOMAlgo_ShapeInfoFiller.cxx \
- GEOMAlgo_ShapeSet.cxx \
- GEOMAlgo_ShapeSolid.cxx \
- GEOMAlgo_ShellSolid.cxx \
- GEOMAlgo_SolidSolid.cxx \
- GEOMAlgo_Splitter.cxx \
- GEOMAlgo_StateCollector.cxx \
- GEOMAlgo_SurfaceTools.cxx \
- GEOMAlgo_Tools_1.cxx \
- GEOMAlgo_Tools3D.cxx \
- GEOMAlgo_Tools.cxx \
- GEOMAlgo_VertexSolid.cxx \
- GEOMAlgo_WESCorrector.cxx \
- GEOMAlgo_WESScaler.cxx \
- GEOMAlgo_WireEdgeSet.cxx \
- GEOMAlgo_WireSolid.cxx \
- GEOMAlgo_WireSplitter.cxx
-
-# header files
-salomeinclude_HEADERS = \
- BlockFix.hxx \
- BlockFix.ixx \
- BlockFix.jxx \
- BlockFix_BlockFixAPI.hxx \
- BlockFix_BlockFixAPI.ixx \
- BlockFix_BlockFixAPI.jxx \
- BlockFix_BlockFixAPI.lxx \
- BlockFix_CheckTool.hxx \
- BlockFix_CheckTool.ixx \
- BlockFix_CheckTool.jxx \
- BlockFix_PeriodicSurfaceModifier.hxx \
- BlockFix_PeriodicSurfaceModifier.ixx \
- BlockFix_PeriodicSurfaceModifier.jxx \
- BlockFix_SphereSpaceModifier.hxx \
- BlockFix_SphereSpaceModifier.ixx \
- BlockFix_SphereSpaceModifier.jxx \
- BlockFix_UnionEdges.hxx \
- BlockFix_UnionEdges.ixx \
- BlockFix_UnionEdges.jxx \
- BlockFix_UnionFaces.hxx \
- BlockFix_UnionFaces.ixx \
- BlockFix_UnionFaces.jxx \
- Handle_BlockFix_BlockFixAPI.hxx \
- Handle_BlockFix_SphereSpaceModifier.hxx \
- Handle_BlockFix_PeriodicSurfaceModifier.hxx \
- GEOMAlgo_Algo.hxx \
- GEOMAlgo_BuilderArea.hxx \
- GEOMAlgo_BuilderFace.hxx \
- GEOMAlgo_Builder.hxx \
- GEOMAlgo_BuilderShape.hxx \
- GEOMAlgo_BuilderSolid.hxx \
- GEOMAlgo_BuilderTools.hxx \
- GEOMAlgo_ClsfBox.hxx \
- GEOMAlgo_Clsf.hxx \
- GEOMAlgo_ClsfSolid.hxx \
- GEOMAlgo_ClsfSurf.hxx \
- GEOMAlgo_CoupleOfShapes.hxx \
- GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx \
- GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx \
- GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx \
- GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx \
- GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx \
- GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx \
- GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx \
- GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx \
- GEOMAlgo_DataMapOfOrientedShapeShape.hxx \
- GEOMAlgo_DataMapOfPassKeyInteger.hxx \
- GEOMAlgo_DataMapOfPassKeyShapeShape.hxx \
- GEOMAlgo_DataMapOfRealListOfShape.hxx \
- GEOMAlgo_DataMapOfShapeMapOfShape.hxx \
- GEOMAlgo_DataMapOfShapePnt.hxx \
- GEOMAlgo_DataMapOfShapeReal.hxx \
- GEOMAlgo_DataMapOfShapeShapeSet.hxx \
- GEOMAlgo_FinderShapeOn1.hxx \
- GEOMAlgo_FinderShapeOn2.hxx \
- GEOMAlgo_FinderShapeOn.hxx \
- GEOMAlgo_FinderShapeOnQuad.hxx \
- GEOMAlgo_GetInPlace.hxx \
- GEOMAlgo_GlueAnalyser.hxx \
- GEOMAlgo_GlueDetector.hxx \
- GEOMAlgo_Gluer2.hxx \
- GEOMAlgo_GluerAlgo.hxx \
- GEOMAlgo_Gluer.hxx \
- GEOMAlgo_HAlgo.hxx \
- GEOMAlgo_IndexedDataMapOfIntegerShape.hxx \
- GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx \
- GEOMAlgo_IndexedDataMapOfShapeBox.hxx \
- GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx \
- GEOMAlgo_IndexedDataMapOfShapeState.hxx \
- GEOMAlgo_KindOfBounds.hxx \
- GEOMAlgo_KindOfClosed.hxx \
- GEOMAlgo_KindOfName.hxx \
- GEOMAlgo_KindOfShape.hxx \
- GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx \
- GEOMAlgo_ListIteratorOfListOfPnt.hxx \
- GEOMAlgo_ListOfCoupleOfShapes.hxx \
- GEOMAlgo_ListOfPnt.hxx \
- GEOMAlgo_PassKey.hxx \
- GEOMAlgo_PassKeyMapHasher.hxx \
- GEOMAlgo_PassKeyShape.hxx \
- GEOMAlgo_PassKeyShapeMapHasher.hxx \
- GEOMAlgo_PWireEdgeSet.hxx \
- GEOMAlgo_ShapeAlgo.hxx \
- GEOMAlgo_ShapeInfo.hxx \
- GEOMAlgo_ShapeInfoFiller.hxx \
- GEOMAlgo_ShapeSet.hxx \
- GEOMAlgo_ShapeSolid.hxx \
- GEOMAlgo_ShellSolid.hxx \
- GEOMAlgo_SolidSolid.hxx \
- GEOMAlgo_Splitter.hxx \
- GEOMAlgo_StateCollector.hxx \
- GEOMAlgo_State.hxx \
- GEOMAlgo_SurfaceTools.hxx \
- GEOMAlgo_Tools3D.hxx \
- GEOMAlgo_Tools.hxx \
- GEOMAlgo_VertexSolid.hxx \
- GEOMAlgo_WESCorrector.hxx \
- GEOMAlgo_WESScaler.hxx \
- GEOMAlgo_WireEdgeSet.hxx \
- GEOMAlgo_WireSolid.hxx \
- GEOMAlgo_WireSplitter.hxx
-
-libGEOMAlgo_la_CPPFLAGS = \
- $(CAS_CPPFLAGS) \
- $(KERNEL_CXXFLAGS) \
- -I$(srcdir)/../$(NMTDS_VAR) \
- -I$(srcdir)/../$(NMTTools_VAR)
-
-libGEOMAlgo_la_LDFLAGS = \
- ../$(NMTTools_VAR)/libNMTTools.la \
- $(STDLIB) \
- $(CAS_LDPATH) -lTKBO -lTKShHealing -lTKBool -lTKMesh \
- $(KERNEL_LDFLAGS) -lSALOMELocalTrace
-
-# extra distributed files
-CDL_FILES = \
- BlockFix.cdl \
- BlockFix_BlockFixAPI.cdl \
- BlockFix_CheckTool.cdl \
- BlockFix_PeriodicSurfaceModifier.cdl \
- BlockFix_SphereSpaceModifier.cdl \
- BlockFix_UnionEdges.cdl \
- BlockFix_UnionFaces.cdl \
- GEOMAlgo.cdl
-
-EXTRA_DIST += \
- $(CDL_FILES) \
- FILES
$(BOOST_CPPFLAGS) \
$(PYTHON_INCLUDES) \
-I$(srcdir)/../ShHealOper \
- -I$(srcdir)/../$(NMTDS_VAR) \
- -I$(srcdir)/../$(NMTTools_VAR) \
+ -I$(srcdir)/../NMTDS \
+ -I$(srcdir)/../NMTTools \
-I$(srcdir)/../GEOM \
- -I$(srcdir)/../$(GEOMAlgo_VAR) \
+ -I$(srcdir)/../GEOMAlgo \
-I$(srcdir)/../SKETCHER \
-I$(srcdir)/../ARCHIMEDE \
-I$(top_builddir)/idl
libGEOMimpl_la_LDFLAGS = \
../GEOM/libGEOMbasic.la \
- ../$(GEOMAlgo_VAR)/libGEOMAlgo.la \
+ ../GEOMAlgo/libGEOMAlgo.la \
../ShHealOper/libShHealOper.la \
../ARCHIMEDE/libGEOMArchimede.la \
../SKETCHER/libGEOMSketcher.la \
-I$(srcdir)/../SKETCHER \
-I$(srcdir)/../ARCHIMEDE \
-I$(srcdir)/../GEOMImpl \
- -I$(srcdir)/../$(GEOMAlgo_VAR) \
+ -I$(srcdir)/../GEOMAlgo \
-I$(srcdir)/../GEOM \
-I$(top_builddir)/idl
-I$(srcdir)/../GEOMImpl \
-I$(srcdir)/../GEOM \
-I$(srcdir)/../GEOM_I \
- -I$(srcdir)/../$(GEOMAlgo_VAR) \
+ -I$(srcdir)/../GEOMAlgo \
-I$(top_builddir)/idl
libGEOM_SupervEngine_la_LDFLAGS = \
# Author : Alexander BORODIN, Open CASCADE S.A.S. (alexander.borodin@opencascade.com)
# Package : src (source files directory)
-SUBDIRS = ARCHIMEDE $(NMTDS_VAR) $(NMTTools_VAR) $(GEOMAlgo_VAR) SKETCHER OCC2VTK GEOM \
+SUBDIRS = ARCHIMEDE NMTDS NMTTools GEOMAlgo SKETCHER OCC2VTK GEOM \
BREPExport BREPImport IGESExport IGESImport STEPExport \
STEPImport STLExport VTKExport ShHealOper GEOMImpl GEOM_I \
GEOMClient GEOM_I_Superv GEOM_SWIG GEOM_PY
-#if PARTITION_OLD_PACKAGING
-# SUBDIRS += NMTDS NMTTools GEOMAlgo
-#else
-# SUBDIRS += NMTDS_NEW NMTTools_NEW GEOMAlgo_NEW
-#endif
-#
-# SUBDIRS += SKETCHER OCC2VTK GEOM \
-# BREPExport BREPImport IGESExport IGESImport STEPExport \
-# STEPImport STLExport VTKExport ShHealOper GEOMImpl GEOM_I \
-# GEOMClient GEOM_I_Superv GEOM_SWIG GEOM_PY
-
if WITH_OPENCV
SUBDIRS += ShapeRecognition
endif
GroupGUI BlocksGUI AdvancedGUI GEOM_SWIG_WITHIHM
endif
-DIST_SUBDIRS = ARCHIMEDE NMTDS NMTTools GEOMAlgo NMTDS_NEW NMTTools_NEW GEOMAlgo_NEW \
- SKETCHER OCC2VTK GEOM BREPExport\
+DIST_SUBDIRS = ARCHIMEDE NMTDS NMTTools GEOMAlgo \
+ SKETCHER OCC2VTK GEOM BREPExport \
BREPImport IGESExport IGESImport STEPExport STEPImport STLExport \
VTKExport ShHealOper GEOMImpl GEOM_I GEOMClient GEOM_I_Superv \
GEOM_SWIG OBJECT DlgRef GEOMFiltersSelection Material GEOMGUI GEOMBase \
--- /dev/null
+Basics_OCCTVersion.hxx
+
+NMTDS_BoxBndTree.cxx
+NMTDS_BoxBndTree.hxx
+NMTDS_BndSphereTree.cxx
+NMTDS_BndSphereTree.hxx
+NMTDS_BndSphere.hxx
+NMTDS_BndSphere.cxx
+NMTDS_BndSphere.lxx
+NMTDS_IndexRange.hxx
+NMTDS_IndexRange.cxx
+NMTDS_InterfPool.hxx
+NMTDS_InterfPool.cxx
+NMTDS_Iterator.hxx
+NMTDS_Iterator.cxx
+NMTDS_IteratorCheckerSI.hxx
+NMTDS_IteratorCheckerSI.cxx
+NMTDS_Pair.hxx
+NMTDS_Pair.cxx
+NMTDS_PairBoolean.hxx
+NMTDS_PairBoolean.cxx
+NMTDS_PairMapHasher.hxx
+NMTDS_PairMapHasher.cxx
+NMTDS_PassKey.hxx
+NMTDS_PassKey.cxx
+NMTDS_PassKeyBoolean.hxx
+NMTDS_PassKeyBoolean.cxx
+NMTDS_PassKeyMapHasher.hxx
+NMTDS_PassKeyMapHasher.cxx
+NMTDS_PassKeyShape.hxx
+NMTDS_PassKeyShape.cxx
+NMTDS_PassKeyShapeMapHasher.hxx
+NMTDS_PassKeyShapeMapHasher.cxx
+NMTDS_Tools.hxx
+NMTDS_Tools.cxx
+NMTDS_ShapesDataStructure.hxx
+NMTDS_ShapesDataStructure.cxx
+NMTDS_InterfType.hxx
+NMTDS_PInterfPool.hxx
+NMTDS_PIterator.hxx
+NMTDS_PShapesDataStructure.hxx
+
+NMTDS_ListOfPassKey.hxx
+NMTDS_ListIteratorOfListOfPassKey.hxx
+NMTDS_ListOfPassKeyBoolean.hxx
+NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx
+NMTDS_ListOfPair.hxx
+NMTDS_ListIteratorOfListOfPair.hxx
+NMTDS_ListOfPairBoolean.hxx
+NMTDS_ListIteratorOfListOfPairBoolean.hxx
+NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
+NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
+NMTDS_MapOfPassKey.hxx
+NMTDS_MapIteratorOfMapOfPassKey.hxx
+NMTDS_MapOfPassKeyBoolean.hxx
+NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx
+NMTDS_MapOfPairBoolean.hxx
+NMTDS_MapIteratorOfMapOfPairBoolean.hxx
+NMTDS_IndexedDataMapOfShapeBox.hxx
+NMTDS_IndexedDataMapOfIntegerShape.hxx
+NMTDS_IndexedDataMapOfShapeBndSphere.hxx
+NMTDS_DataMapOfIntegerMapOfInteger.hxx
+NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx
+
+NMTDS_CArray1OfIndexRange.hxx
+NMTDS_CArray1OfIndexRange.cxx
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile
-#define _Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger);
-
-class Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)():Handle(TCollection_MapNode)() {}
- Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)(const Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)(const NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)& operator=(const Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)& operator=(const NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger* operator->() const
- {
- return (NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)();
-
- Standard_EXPORT static const Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile
-#define _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger);
-
-class Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)():Handle(TCollection_MapNode)() {}
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& operator=(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& operator=(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->() const
- {
- return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)();
-
- Standard_EXPORT static const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile
-#define _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape);
-
-class Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)():Handle(TCollection_MapNode)() {}
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& operator=(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& operator=(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* operator->() const
- {
- return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)();
-
- Standard_EXPORT static const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_HeaderFile
-#define _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere);
-
-class Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)():Handle(TCollection_MapNode)() {}
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)& operator=(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)& operator=(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere* operator->() const
- {
- return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)();
-
- Standard_EXPORT static const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile
-#define _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox);
-
-class Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)():Handle(TCollection_MapNode)() {}
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& operator=(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& operator=(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* operator->() const
- {
- return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)();
-
- Standard_EXPORT static const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#define _Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors);
-
-class Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)():Handle(TCollection_MapNode)() {}
- Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(const NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& operator=(const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& operator=(const NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->() const
- {
- return (NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)();
-
- Standard_EXPORT static const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#ifndef _Handle_NMTDS_ListNodeOfListOfPair_HeaderFile\r
-#define _Handle_NMTDS_ListNodeOfListOfPair_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_DefineHandle_HeaderFile\r
-#include <Standard_DefineHandle.hxx>\r
-#endif\r
-\r
-#ifndef _Handle_TCollection_MapNode_HeaderFile\r
-#include <Handle_TCollection_MapNode.hxx>\r
-#endif\r
-\r
-class Standard_Transient;\r
-class Handle(Standard_Type);\r
-class Handle(TCollection_MapNode);\r
-class NMTDS_ListNodeOfListOfPair;\r
-\r
-DEFINE_STANDARD_HANDLE(NMTDS_ListNodeOfListOfPair,TCollection_MapNode)\r
-\r
-#endif\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#ifndef _Handle_NMTDS_ListNodeOfListOfPairBoolean_HeaderFile\r
-#define _Handle_NMTDS_ListNodeOfListOfPairBoolean_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_DefineHandle_HeaderFile\r
-#include <Standard_DefineHandle.hxx>\r
-#endif\r
-\r
-#ifndef _Handle_TCollection_MapNode_HeaderFile\r
-#include <Handle_TCollection_MapNode.hxx>\r
-#endif\r
-\r
-class Standard_Transient;\r
-class Handle(Standard_Type);\r
-class Handle(TCollection_MapNode);\r
-class NMTDS_ListNodeOfListOfPairBoolean;\r
-\r
-DEFINE_STANDARD_HANDLE(NMTDS_ListNodeOfListOfPairBoolean,TCollection_MapNode)\r
-\r
-#endif\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_NMTDS_ListNodeOfListOfPassKey_HeaderFile
-#define _Handle_NMTDS_ListNodeOfListOfPassKey_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTDS_ListNodeOfListOfPassKey;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_ListNodeOfListOfPassKey);
-
-class Handle(NMTDS_ListNodeOfListOfPassKey) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTDS_ListNodeOfListOfPassKey)():Handle(TCollection_MapNode)() {}
- Handle(NMTDS_ListNodeOfListOfPassKey)(const Handle(NMTDS_ListNodeOfListOfPassKey)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTDS_ListNodeOfListOfPassKey)(const NMTDS_ListNodeOfListOfPassKey* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTDS_ListNodeOfListOfPassKey)& operator=(const Handle(NMTDS_ListNodeOfListOfPassKey)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTDS_ListNodeOfListOfPassKey)& operator=(const NMTDS_ListNodeOfListOfPassKey* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTDS_ListNodeOfListOfPassKey* operator->() const
- {
- return (NMTDS_ListNodeOfListOfPassKey *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTDS_ListNodeOfListOfPassKey)();
-
- Standard_EXPORT static const Handle(NMTDS_ListNodeOfListOfPassKey) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile
-#define _Handle_NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTDS_ListNodeOfListOfPassKeyBoolean;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_ListNodeOfListOfPassKeyBoolean);
-
-class Handle(NMTDS_ListNodeOfListOfPassKeyBoolean) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)():Handle(TCollection_MapNode)() {}
- Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)(const Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)(const NMTDS_ListNodeOfListOfPassKeyBoolean* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)& operator=(const Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)& operator=(const NMTDS_ListNodeOfListOfPassKeyBoolean* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTDS_ListNodeOfListOfPassKeyBoolean* operator->() const
- {
- return (NMTDS_ListNodeOfListOfPassKeyBoolean *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)();
-
- Standard_EXPORT static const Handle(NMTDS_ListNodeOfListOfPassKeyBoolean) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile\r
-#define _Handle_NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_DefineHandle_HeaderFile\r
-#include <Standard_DefineHandle.hxx>\r
-#endif\r
-\r
-#ifndef _Handle_TCollection_MapNode_HeaderFile\r
-#include <Handle_TCollection_MapNode.hxx>\r
-#endif\r
-\r
-class Standard_Transient;\r
-class Handle(Standard_Type);\r
-class Handle(TCollection_MapNode);\r
-class NMTDS_StdMapNodeOfMapOfPairBoolean;\r
-\r
-DEFINE_STANDARD_HANDLE(NMTDS_StdMapNodeOfMapOfPairBoolean,TCollection_MapNode)\r
-\r
-#endif\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile
-#define _Handle_NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTDS_StdMapNodeOfMapOfPassKey;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPassKey);
-
-class Handle(NMTDS_StdMapNodeOfMapOfPassKey) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTDS_StdMapNodeOfMapOfPassKey)():Handle(TCollection_MapNode)() {}
- Handle(NMTDS_StdMapNodeOfMapOfPassKey)(const Handle(NMTDS_StdMapNodeOfMapOfPassKey)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTDS_StdMapNodeOfMapOfPassKey)(const NMTDS_StdMapNodeOfMapOfPassKey* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTDS_StdMapNodeOfMapOfPassKey)& operator=(const Handle(NMTDS_StdMapNodeOfMapOfPassKey)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTDS_StdMapNodeOfMapOfPassKey)& operator=(const NMTDS_StdMapNodeOfMapOfPassKey* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTDS_StdMapNodeOfMapOfPassKey* operator->() const
- {
- return (NMTDS_StdMapNodeOfMapOfPassKey *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTDS_StdMapNodeOfMapOfPassKey)();
-
- Standard_EXPORT static const Handle(NMTDS_StdMapNodeOfMapOfPassKey) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile
-#define _Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTDS_StdMapNodeOfMapOfPassKeyBoolean;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPassKeyBoolean);
-
-class Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)():Handle(TCollection_MapNode)() {}
- Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)(const Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)(const NMTDS_StdMapNodeOfMapOfPassKeyBoolean* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)& operator=(const Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)& operator=(const NMTDS_StdMapNodeOfMapOfPassKeyBoolean* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTDS_StdMapNodeOfMapOfPassKeyBoolean* operator->() const
- {
- return (NMTDS_StdMapNodeOfMapOfPassKeyBoolean *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)();
-
- Standard_EXPORT static const Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
-# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
# GEOM NMTAlgo : partition algorithm
# File : Makefile.in
# header files
salomeinclude_HEADERS = \
- Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx \
- Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx \
- Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \
- Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx \
- Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \
- Handle_NMTDS_ListNodeOfListOfPair.hxx \
- Handle_NMTDS_ListNodeOfListOfPairBoolean.hxx \
- Handle_NMTDS_StdMapNodeOfMapOfPairBoolean.hxx \
- Handle_NMTDS_ListNodeOfListOfPassKeyBoolean.hxx \
- Handle_NMTDS_ListNodeOfListOfPassKey.hxx \
- Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx \
- Handle_NMTDS_StdMapNodeOfMapOfPassKey.hxx \
- Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx \
+ NMTDS_BndSphere.hxx \
+ NMTDS_BndSphere.lxx \
+ NMTDS_BndSphereTree.hxx \
+ NMTDS_BoxBndTree.hxx \
NMTDS_CArray1OfIndexRange.hxx \
NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx \
- NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx \
NMTDS_DataMapOfIntegerMapOfInteger.hxx \
- NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx \
- NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \
- NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx \
- NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx \
NMTDS_IndexedDataMapOfIntegerShape.hxx \
- NMTDS_IndexedDataMapOfShapeBox.hxx \
- NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx \
NMTDS_IndexedDataMapOfShapeBndSphere.hxx \
+ NMTDS_IndexedDataMapOfShapeBox.hxx \
NMTDS_IndexRange.hxx \
- NMTDS_IndexRange.ixx \
- NMTDS_IndexRange.jxx \
NMTDS_InterfPool.hxx \
- NMTDS_InterfPool.ixx \
- NMTDS_InterfPool.jxx \
NMTDS_InterfType.hxx \
- NMTDS_Iterator.hxx \
- NMTDS_Iterator.ixx \
- NMTDS_Iterator.jxx \
NMTDS_IteratorCheckerSI.hxx \
- NMTDS_IteratorCheckerSI.ixx \
- NMTDS_IteratorCheckerSI.jxx \
+ NMTDS_Iterator.hxx \
NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \
- NMTDS_ListIteratorOfListOfPair.hxx \
NMTDS_ListIteratorOfListOfPairBoolean.hxx \
- NMTDS_ListNodeOfListOfPair.hxx \
- NMTDS_ListNodeOfListOfPairBoolean.hxx \
- NMTDS_ListOfPair.hxx \
- NMTDS_ListOfPairBoolean.hxx \
- NMTDS_MapIteratorOfMapOfPairBoolean.hxx \
- NMTDS_MapOfPairBoolean.hxx \
- NMTDS_Pair.hxx \
- NMTDS_Pair.ixx \
- NMTDS_Pair.jxx \
- NMTDS_PairBoolean.hxx \
- NMTDS_PairBoolean.ixx \
- NMTDS_PairBoolean.jxx \
- NMTDS_PairMapHasher.hxx \
- NMTDS_PairMapHasher.ixx \
- NMTDS_PairMapHasher.jxx \
- NMTDS_StdMapNodeOfMapOfPairBoolean.hxx \
+ NMTDS_ListIteratorOfListOfPair.hxx \
NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx \
NMTDS_ListIteratorOfListOfPassKey.hxx \
- NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \
- NMTDS_ListNodeOfListOfPassKeyBoolean.hxx \
- NMTDS_ListNodeOfListOfPassKey.hxx \
NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \
+ NMTDS_ListOfPairBoolean.hxx \
+ NMTDS_ListOfPair.hxx \
NMTDS_ListOfPassKeyBoolean.hxx \
NMTDS_ListOfPassKey.hxx \
+ NMTDS_MapIteratorOfMapOfPairBoolean.hxx \
NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx \
NMTDS_MapIteratorOfMapOfPassKey.hxx \
+ NMTDS_MapOfPairBoolean.hxx \
NMTDS_MapOfPassKeyBoolean.hxx \
NMTDS_MapOfPassKey.hxx \
+ NMTDS_PairBoolean.hxx \
+ NMTDS_Pair.hxx \
+ NMTDS_PairMapHasher.hxx \
NMTDS_PassKeyBoolean.hxx \
- NMTDS_PassKeyBoolean.ixx \
- NMTDS_PassKeyBoolean.jxx \
- NMTDS_PInterfPool.hxx \
- NMTDS_PIterator.hxx \
NMTDS_PassKey.hxx \
- NMTDS_PassKey.ixx \
- NMTDS_PassKey.jxx \
NMTDS_PassKeyMapHasher.hxx \
- NMTDS_PassKeyMapHasher.ixx \
- NMTDS_PassKeyMapHasher.jxx \
NMTDS_PassKeyShape.hxx \
- NMTDS_PassKeyShape.ixx \
- NMTDS_PassKeyShape.jxx \
NMTDS_PassKeyShapeMapHasher.hxx \
- NMTDS_PassKeyShapeMapHasher.ixx \
- NMTDS_PassKeyShapeMapHasher.jxx \
+ NMTDS_PInterfPool.hxx \
+ NMTDS_PIterator.hxx \
NMTDS_PShapesDataStructure.hxx \
NMTDS_ShapesDataStructure.hxx \
- NMTDS_ShapesDataStructure.ixx \
- NMTDS_ShapesDataStructure.jxx \
- NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx \
- NMTDS_StdMapNodeOfMapOfPassKey.hxx \
- NMTDS_Tools.hxx \
- NMTDS_Tools.ixx \
- NMTDS_Tools.jxx \
- NMTDS_BndSphere.hxx \
- NMTDS_BndSphere.ixx \
- NMTDS_BndSphere.jxx \
- NMTDS_BndSphere.lxx \
- NMTDS_BndSphereTree.hxx \
- NMTDS_BoxBndTree.hxx
+ NMTDS_Tools.hxx
# Libraries targets
lib_LTLIBRARIES = libNMTDS.la
dist_libNMTDS_la_SOURCES = \
- NMTDS_CArray1OfIndexRange_0.cxx \
- NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_0.cxx \
- NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_0.cxx \
- NMTDS_DataMapOfIntegerMapOfInteger_0.cxx \
- NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx \
- NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx \
- NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx \
- NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx \
- NMTDS_IndexedDataMapOfIntegerShape_0.cxx \
- NMTDS_IndexedDataMapOfShapeBox_0.cxx \
- NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_0.cxx \
- NMTDS_IndexedDataMapOfShapeBndSphere_0.cxx \
+ NMTDS_BndSphere.cxx \
+ NMTDS_BndSphereTree.cxx \
+ NMTDS_BoxBndTree.cxx \
+ NMTDS_CArray1OfIndexRange.cxx \
NMTDS_IndexRange.cxx \
NMTDS_InterfPool.cxx \
- NMTDS_Iterator.cxx \
NMTDS_IteratorCheckerSI.cxx \
- NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx \
- NMTDS_ListIteratorOfListOfPairBoolean_0.cxx \
- NMTDS_ListIteratorOfListOfPair_0.cxx \
- NMTDS_ListNodeOfListOfPairBoolean_0.cxx \
- NMTDS_ListNodeOfListOfPair_0.cxx \
- NMTDS_ListOfPairBoolean_0.cxx \
- NMTDS_ListOfPair_0.cxx \
- NMTDS_MapIteratorOfMapOfPairBoolean_0.cxx \
- NMTDS_MapOfPairBoolean_0.cxx \
- NMTDS_Pair.cxx \
+ NMTDS_Iterator.cxx \
NMTDS_PairBoolean.cxx \
+ NMTDS_Pair.cxx \
NMTDS_PairMapHasher.cxx \
- NMTDS_StdMapNodeOfMapOfPairBoolean_0.cxx \
- NMTDS_ListIteratorOfListOfPassKey_0.cxx \
- NMTDS_ListIteratorOfListOfPassKeyBoolean_0.cxx \
- NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx \
- NMTDS_ListNodeOfListOfPassKey_0.cxx \
- NMTDS_ListNodeOfListOfPassKeyBoolean_0.cxx \
- NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx \
- NMTDS_ListOfPassKey_0.cxx \
- NMTDS_ListOfPassKeyBoolean_0.cxx \
- NMTDS_MapIteratorOfMapOfPassKey_0.cxx \
- NMTDS_MapIteratorOfMapOfPassKeyBoolean_0.cxx \
- NMTDS_MapOfPassKey_0.cxx \
- NMTDS_MapOfPassKeyBoolean_0.cxx \
NMTDS_PassKeyBoolean.cxx \
NMTDS_PassKey.cxx \
NMTDS_PassKeyMapHasher.cxx \
NMTDS_PassKeyShape.cxx \
NMTDS_PassKeyShapeMapHasher.cxx \
NMTDS_ShapesDataStructure.cxx \
- NMTDS_StdMapNodeOfMapOfPassKey_0.cxx \
- NMTDS_StdMapNodeOfMapOfPassKeyBoolean_0.cxx \
- NMTDS_Tools.cxx \
- NMTDS_BndSphere.cxx \
- NMTDS_BndSphereTree.cxx \
- NMTDS_BoxBndTree.cxx
+ NMTDS_Tools.cxx
# additional information to compile and link file
$(CAS_LDPATH) -lTKBool -lTKBO
# extra dist files
-CDL_FILES = \
- NMTDS.cdl \
- NMTDS_BndSphere.cdl \
- NMTDS_IndexRange.cdl \
- NMTDS_InterfPool.cdl \
- NMTDS_Iterator.cdl \
- NMTDS_IteratorCheckerSI.cdl \
- NMTDS_Pair.cdl \
- NMTDS_PairBoolean.cdl \
- NMTDS_PairMapHasher.cdl \
- NMTDS_PassKey.cdl \
- NMTDS_PassKeyBoolean.cdl \
- NMTDS_PassKeyMapHasher.cdl \
- NMTDS_PassKeyShape.cdl \
- NMTDS_PassKeyShapeMapHasher.cdl \
- NMTDS_ShapesDataStructure.cdl \
- NMTDS_Tools.cdl
+CDL_FILES = NMTDS.cdl
-EXTRA_DIST += $(CDL_FILES)
+EXTRA_DIST += \
+ $(CDL_FILES) \
+ FILES
---Purpose:
-uses
- TCollection,
- TColStd,
- gp,
- Bnd,
- TopoDS,
- TopAbs,
- TopTools,
- BooleanOperations,
- BOPTools,
- BOPTColStd
+--uses
+ --TCollection,
+ --TColStd,
+ --gp,
+ --Bnd,
+ --TopoDS,
+ --TopAbs,
+ --TopTools,
+ --BooleanOperations,
+ --BOPTools,
+ --BOPTColStd
is
- enumeration InterfType is
- TI_VV,
- TI_VE,
- TI_VF,
- TI_EE,
- TI_EF,
- TI_FF,
- TI_UNKNOWN
- end InterfType;
+ imported InterfType from NMTDS;
+ imported BndSphere from NMTDS;
+ imported IndexRange from NMTDS;
+ imported InterfPool from NMTDS;
+ imported Iterator from NMTDS;
+ imported IteratorCheckerSI from NMTDS;
+ imported Pair from NMTDS;
+ imported PairBoolean from NMTDS;
+ imported PairMapHasher from NMTDS;
+ imported PassKey from NMTDS;
+ imported PassKeyBoolean from NMTDS;
+ imported PassKeyMapHasher from NMTDS;
+ imported PassKeyShape from NMTDS;
+ imported PassKeyShapeMapHasher from NMTDS;
+ imported Tools from NMTDS;
+ imported ShapesDataStructure from NMTDS;
+ imported PShapesDataStructure from NMTDS;
+ imported PIterator from NMTDS;
+ imported PInterfPool from NMTDS;
--
- class ShapesDataStructure;
- class IndexRange;
-
- class Iterator;
-
- class PassKey;
- class PassKeyBoolean;
- class PassKeyMapHasher;
- class PassKeyShape;
- class PassKeyShapeMapHasher;
- class IteratorCheckerSI;
- class Tools;
- class InterfPool;
- class BndSphere;
- --modified by NIZNHY-PKV Mon Dec 12 08:39:27 2011f
- class Pair;
- class PairBoolean;
- class PairMapHasher;
- --modified by NIZNHY-PKV Mon Dec 12 08:39:30 2011t
- --
- pointer PShapesDataStructure to ShapesDataStructure from NMTDS;
- pointer PIterator to Iterator from NMTDS;
- pointer PInterfPool to InterfPool from NMTDS;
-
- class CArray1OfIndexRange instantiates
- CArray1 from BOPTColStd(IndexRange from NMTDS);
+ imported ListOfPassKey from NMTDS;
+ imported ListIteratorOfListOfPassKey from NMTDS;
+
+ imported ListOfPassKeyBoolean from NMTDS;
+ imported ListIteratorOfListOfPassKeyBoolean from NMTDS;
- class ListOfIndexedDataMapOfShapeAncestorsSuccessors instantiates
- List from TCollection(IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations);
-
- class ListOfPassKey instantiates
- List from TCollection(PassKey from NMTDS);
+ imported ListOfPair from NMTDS;
+ imported ListIteratorOfListOfPair from NMTDS;
+
+ imported ListOfPairBoolean from NMTDS;
+ imported ListIteratorOfListOfPairBoolean from NMTDS;
- class MapOfPassKey instantiates
- Map from TCollection(PassKey from NMTDS,
- PassKeyMapHasher from NMTDS);
-
- class ListOfPassKeyBoolean instantiates
- List from TCollection(PassKeyBoolean from NMTDS);
+ imported ListOfIndexedDataMapOfShapeAncestorsSuccessors from NMTDS;
+ imported ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors from NMTDS;
+
+ imported MapOfPassKey from NMTDS;
+ imported MapIteratorOfMapOfPassKey from NMTDS;
- class MapOfPassKeyBoolean instantiates
- Map from TCollection(PassKeyBoolean from NMTDS,
- PassKeyMapHasher from NMTDS);
-
- class IndexedDataMapOfShapeBox
- instantiates IndexedDataMap from TCollection (Shape from TopoDS,
- Box from Bnd,
- ShapeMapHasher from TopTools);
- class IndexedDataMapOfIntegerShape
- instantiates IndexedDataMap from TCollection (Integer from Standard,
- Shape from TopoDS,
- MapIntegerHasher from TColStd);
-
- class DataMapOfIntegerMapOfInteger
- instantiates DataMap from TCollection (Integer from Standard,
- MapOfInteger from TColStd,
- MapIntegerHasher from TColStd);
+ imported MapOfPairBoolean from NMTDS;
+ imported MapIteratorOfMapOfPairBoolean from NMTDS;
-
- class IndexedDataMapOfShapeBndSphere
- instantiates IndexedDataMap from TCollection(Shape from TopoDS,
- BndSphere from NMTDS,
- ShapeMapHasher from TopTools);
+ imported IndexedDataMapOfShapeBox from NMTDS;
+ imported IndexedDataMapOfIntegerShape from NMTDS;
+ imported IndexedDataMapOfShapeBndSphere from NMTDS;
+ imported DataMapOfIntegerMapOfInteger from NMTDS;
+ imported DataMapIteratorOfDataMapOfIntegerMapOfInteger from NMTDS;
- --modified by NIZNHY-PKV Mon Dec 12 08:41:50 2011f
- class ListOfPair instantiates
- List from TCollection(Pair from NMTDS);
-
- class ListOfPairBoolean instantiates
- List from TCollection(PairBoolean from NMTDS);
-
- class MapOfPairBoolean instantiates
- Map from TCollection(PairBoolean from NMTDS,
- PairMapHasher from NMTDS);
--- class IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger instantiates
--- IndexedDataMap from TCollection(Integer from Standard,
--- IndexedDataMapOfShapeInteger from BooleanOperations,
--- MapIntegerHasher from TColStd);
- --modified by NIZNHY-PKV Mon Dec 12 08:41:54 2011t
-
-
+ imported CArray1OfIndexRange from NMTDS;
+
end NMTDS;
+++ /dev/null
-# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# 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
-#
-
-TEMPLATE = lib
-TARGET = NMTDS
-DESTDIR = ../../lib
-MOC_DIR = ../../moc
-OBJECTS_DIR = ../../obj/$$TARGET
-
-CASROOT = $$(CASROOT)
-CAS_CPPFLAGS = $${CASROOT}/inc
-
-KERNEL_CXXFLAGS = $$(KERNEL_ROOT_DIR)/include/salome
-
-STDLIB = -lstdc++
-
-CAS_LDPATH = -L$$(CASROOT)/Linux/lib
-
-INCLUDEPATH += $${CAS_CPPFLAGS} $${KERNEL_CXXFLAGS}
-
-LIBS += $${STDLIB} $${CAS_LDPATH} -lTKBool -lTKBO
-
-CONFIG -= debug release debug_and_release
-CONFIG += qt thread debug dll shared
-
-win32:DEFINES += WIN32
-DEFINES += OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS
-
-HEADERS = Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx
-HEADERS += Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx
-HEADERS += Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx
-HEADERS += Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
-HEADERS += Handle_NMTDS_ListNodeOfListOfPassKeyBoolean.hxx
-HEADERS += Handle_NMTDS_ListNodeOfListOfPassKey.hxx
-HEADERS += Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx
-HEADERS += Handle_NMTDS_StdMapNodeOfMapOfPassKey.hxx
-HEADERS += NMTDS_CArray1OfIndexRange.hxx
-HEADERS += NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx
-HEADERS += NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx
-HEADERS += NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx
-HEADERS += NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx
-HEADERS += NMTDS_IndexedDataMapOfIntegerShape.hxx
-HEADERS += NMTDS_IndexedDataMapOfShapeBox.hxx
-HEADERS += NMTDS_IndexRange.hxx
-HEADERS += NMTDS_Iterator.hxx
-HEADERS += NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
-HEADERS += NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx
-HEADERS += NMTDS_ListIteratorOfListOfPassKey.hxx
-HEADERS += NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
-HEADERS += NMTDS_ListNodeOfListOfPassKeyBoolean.hxx
-HEADERS += NMTDS_ListNodeOfListOfPassKey.hxx
-HEADERS += NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
-HEADERS += NMTDS_ListOfPassKeyBoolean.hxx
-HEADERS += NMTDS_ListOfPassKey.hxx
-HEADERS += NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx
-HEADERS += NMTDS_MapIteratorOfMapOfPassKey.hxx
-HEADERS += NMTDS_MapOfPassKeyBoolean.hxx
-HEADERS += NMTDS_MapOfPassKey.hxx
-HEADERS += NMTDS_PassKeyBoolean.hxx
-HEADERS += NMTDS_PassKey.hxx
-HEADERS += NMTDS_PassKeyMapHasher.hxx
-HEADERS += NMTDS_PShapesDataStructure.hxx
-HEADERS += NMTDS_ShapesDataStructure.hxx
-HEADERS += NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx
-HEADERS += NMTDS_StdMapNodeOfMapOfPassKey.hxx
-HEADERS += NMTDS_BoxBndTree.hxx
-
-SOURCES = NMTDS_CArray1OfIndexRange_0.cxx
-SOURCES += NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx
-SOURCES += NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx
-SOURCES += NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx
-SOURCES += NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx
-SOURCES += NMTDS_IndexedDataMapOfIntegerShape_0.cxx
-SOURCES += NMTDS_IndexedDataMapOfShapeBox_0.cxx
-SOURCES += NMTDS_IndexRange.cxx
-SOURCES += NMTDS_Iterator.cxx
-SOURCES += NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx
-SOURCES += NMTDS_ListIteratorOfListOfPassKey_0.cxx
-SOURCES += NMTDS_ListIteratorOfListOfPassKeyBoolean_0.cxx
-SOURCES += NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx
-SOURCES += NMTDS_ListNodeOfListOfPassKey_0.cxx
-SOURCES += NMTDS_ListNodeOfListOfPassKeyBoolean_0.cxx
-SOURCES += NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx
-SOURCES += NMTDS_ListOfPassKey_0.cxx
-SOURCES += NMTDS_ListOfPassKeyBoolean_0.cxx
-SOURCES += NMTDS_MapIteratorOfMapOfPassKey_0.cxx
-SOURCES += NMTDS_MapIteratorOfMapOfPassKeyBoolean_0.cxx
-SOURCES += NMTDS_MapOfPassKey_0.cxx
-SOURCES += NMTDS_MapOfPassKeyBoolean_0.cxx
-SOURCES += NMTDS_PassKeyBoolean.cxx
-SOURCES += NMTDS_PassKey.cxx
-SOURCES += NMTDS_PassKeyMapHasher.cxx
-SOURCES += NMTDS_ShapesDataStructure.cxx
-SOURCES += NMTDS_StdMapNodeOfMapOfPassKey_0.cxx
-SOURCES += NMTDS_StdMapNodeOfMapOfPassKeyBoolean_0.cxx
-SOURCES += NMTDS_BoxBndTree.cxx
-
-includes.files = $$HEADERS
-includes.path = ../../include
-
-INSTALLS += includes
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- 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: NMTDS_BndSphere.cdl
--- Created:
--- Author: Peter KURNEV
--- <pkv@irinox>
---
-class BndSphere from NMTDS
-
- ---Purpose:
-
-uses
- Pnt from gp
-
-is
- Create
- returns BndSphere from NMTDS;
- ---C++: alias "Standard_EXPORT virtual ~NMTDS_BndSphere();"
-
- SetCenter(me:out;
- theP:Pnt from gp);
- ---C++: inline
-
- Center(me)
- returns Pnt from gp;
- ---C++:return const&
- ---C++: inline
-
- SetRadius(me:out;
- theR:Real from Standard);
- ---C++: inline
-
- Radius(me)
- returns Real from Standard;
- ---C++: inline
-
- SetGap(me:out;
- theGap:Real from Standard);
- ---C++: inline
-
- Gap(me)
- returns Real from Standard;
- ---C++: inline
-
- Add(me:out;
- theOther: BndSphere from NMTDS);
- ---C++: inline
-
- IsOut(me;
- theOther: BndSphere from NMTDS)
- returns Boolean from Standard;
-
- SquareExtent(me)
- returns Real from Standard;
- ---C++: inline
-fields
- myCenter: Pnt from gp is protected;
- myRadius: Real from Standard is protected;
- myGap : Real from Standard is protected;
-
-end BndSphere;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <NMTDS_BndSphere.ixx>
+#include <NMTDS_BndSphere.hxx>
//=======================================================================
//function :
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_BndSphere.hxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+
#ifndef _NMTDS_BndSphere_HeaderFile
#define _NMTDS_BndSphere_HeaderFile
-#ifndef _gp_Pnt_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <gp_Pnt.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-class gp_Pnt;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
+//=======================================================================
+//class : NMTDS_BndSphere
+//purpose :
+//=======================================================================
class NMTDS_BndSphere {
-
-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 NMTDS_BndSphere();
-Standard_EXPORT virtual ~NMTDS_BndSphere();
-
+ public:
+ Standard_EXPORT
+ NMTDS_BndSphere();
+
+ Standard_EXPORT
+ virtual ~NMTDS_BndSphere();
+
void SetCenter(const gp_Pnt& theP) ;
-
- const gp_Pnt& Center() const;
-
+
+ const gp_Pnt& Center() const;
+
void SetRadius(const Standard_Real theR) ;
-
+
Standard_Real Radius() const;
-
+
void SetGap(const Standard_Real theGap) ;
-
+
Standard_Real Gap() const;
-
+
void Add(const NMTDS_BndSphere& theOther) ;
-
-
-Standard_EXPORT Standard_Boolean IsOut(const NMTDS_BndSphere& theOther) const;
-
+
+ Standard_EXPORT
+ Standard_Boolean IsOut(const NMTDS_BndSphere& theOther) const;
+
Standard_Real SquareExtent() const;
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-gp_Pnt myCenter;
-Standard_Real myRadius;
-Standard_Real myGap;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+ protected:
+ gp_Pnt myCenter;
+ Standard_Real myRadius;
+ Standard_Real myGap;
};
-
#include <NMTDS_BndSphere.lxx>
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 <NMTDS_BndSphere.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 _NMTDS_BndSphere_HeaderFile
-#include <NMTDS_BndSphere.hxx>
-#endif
--- /dev/null
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// 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: NMTDS_CArray1OfIndexRange.hxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+
+#include <NMTDS_CArray1OfIndexRange.hxx>
+
+#ifndef _Standard_OutOfRange_HeaderFile
+#include <Standard_OutOfRange.hxx>
+#endif
+#ifndef _Standard_OutOfMemory_HeaderFile
+#include <Standard_OutOfMemory.hxx>
+#endif
+
+
+#define Array1Item NMTDS_IndexRange
+#define Array1Item_hxx <NMTDS_IndexRange.hxx>
+#define BOPTColStd_CArray1 NMTDS_CArray1OfIndexRange
+#define BOPTColStd_CArray1_hxx <NMTDS_CArray1OfIndexRange.hxx>
+#include <BOPTColStd_CArray1.gxx>
+
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_BndSphere.hxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+
#ifndef _NMTDS_CArray1OfIndexRange_HeaderFile
#define _NMTDS_CArray1OfIndexRange_HeaderFile
-#include <Basics_OCCTVersion.hxx>
-
-#ifndef _Standard_Address_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <Standard_Address.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
+#include <NMTDS_IndexRange.hxx>
class Standard_OutOfRange;
class Standard_OutOfMemory;
-class NMTDS_IndexRange;
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
+//=======================================================================
+//function : NMTDS_CArray1OfIndexRange
+//purpose :
+//=======================================================================
class NMTDS_CArray1OfIndexRange {
-
-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 NMTDS_CArray1OfIndexRange(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
-
-
-Standard_EXPORT void Resize(const Standard_Integer theNewLength) ;
-
-
-Standard_EXPORT void Destroy() ;
-~NMTDS_CArray1OfIndexRange()
-{
- Destroy();
-}
-
-
-
-Standard_EXPORT Standard_Integer Length() const;
-
-
-Standard_EXPORT Standard_Integer Extent() const;
-
-
-Standard_EXPORT Standard_Integer FactLength() const;
-
-
-Standard_EXPORT Standard_Integer Append(const NMTDS_IndexRange& Value) ;
-
-
-Standard_EXPORT void Remove(const Standard_Integer Index) ;
-
-
-Standard_EXPORT const NMTDS_IndexRange& Value(const Standard_Integer Index) const;
- const NMTDS_IndexRange& operator ()(const Standard_Integer Index) const
-{
- return Value(Index);
-}
-
-
-
-Standard_EXPORT NMTDS_IndexRange& ChangeValue(const Standard_Integer Index) ;
- NMTDS_IndexRange& operator ()(const Standard_Integer Index)
-{
- return ChangeValue(Index);
-}
-
-Standard_EXPORT void SetBlockLength(const Standard_Integer aBL) ;
-Standard_EXPORT Standard_Integer BlockLength() const;
-
-#if OCC_VERSION_LARGE > 0x06050200
-Standard_EXPORT void Purge();
-#endif
-
-protected:
-
- // Methods PROTECTED
- //
-
- // Fields PROTECTED
- //
-
-private:
-
- // Methods PRIVATE
- //
-Standard_EXPORT NMTDS_CArray1OfIndexRange(const NMTDS_CArray1OfIndexRange& AnArray);
-
-
-Standard_EXPORT NMTDS_CArray1OfIndexRange& Assign(const NMTDS_CArray1OfIndexRange& Other) ;
- NMTDS_CArray1OfIndexRange& operator =(const NMTDS_CArray1OfIndexRange& Other)
-{
- return Assign(Other);
-}
-
-Standard_EXPORT Standard_Boolean IsInvalidIndex(const Standard_Integer Index) const;
-
- // Fields PRIVATE
- //
-Standard_Address myStart;
-Standard_Integer myLength;
-Standard_Integer myFactLength;
-Standard_Integer myBlockLength;
-Standard_Boolean myIsAllocated;
+ public:
+
+ Standard_EXPORT
+ NMTDS_CArray1OfIndexRange(const Standard_Integer Length = 0,
+ const Standard_Integer BlockLength = 5);
+
+ Standard_EXPORT
+ void Resize(const Standard_Integer theNewLength) ;
+
+ Standard_EXPORT
+ void Destroy() ;
+
+ ~NMTDS_CArray1OfIndexRange() {
+ Destroy();
+ }
+
+ Standard_EXPORT
+ Standard_Integer Length() const;
+
+ Standard_EXPORT
+ Standard_Integer Extent() const;
+
+ Standard_EXPORT
+ Standard_Integer FactLength() const;
+
+ Standard_EXPORT
+ Standard_Integer Append(const NMTDS_IndexRange& Value) ;
+
+ Standard_EXPORT
+ void Remove(const Standard_Integer Index) ;
+
+ Standard_EXPORT
+ const NMTDS_IndexRange& Value(const Standard_Integer Index) const;
+
+ const NMTDS_IndexRange& operator ()(const Standard_Integer Index) const {
+ return Value(Index);
+ }
+
+ Standard_EXPORT
+ NMTDS_IndexRange& ChangeValue(const Standard_Integer Index) ;
+
+ NMTDS_IndexRange& operator ()(const Standard_Integer Index) {
+ return ChangeValue(Index);
+ }
+
+ Standard_EXPORT
+ void SetBlockLength(const Standard_Integer aBL) ;
+
+ Standard_EXPORT
+ Standard_Integer BlockLength() const;
+
+ Standard_EXPORT
+ void Purge() ;
+
+ private:
+ Standard_EXPORT
+ NMTDS_CArray1OfIndexRange(const NMTDS_CArray1OfIndexRange& AnArray);
+
+ Standard_EXPORT
+ NMTDS_CArray1OfIndexRange& Assign(const NMTDS_CArray1OfIndexRange& Other) ;
+
+ NMTDS_CArray1OfIndexRange& operator =(const NMTDS_CArray1OfIndexRange& Other) {
+ return Assign(Other);
+ }
+
+ Standard_EXPORT
+ Standard_Boolean IsInvalidIndex(const Standard_Integer Index) const;
+
+
+ Standard_Address myStart;
+ Standard_Integer myLength;
+ Standard_Integer myFactLength;
+ Standard_Integer myBlockLength;
+ Standard_Boolean myIsAllocated;
};
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_CArray1OfIndexRange.hxx>
-
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_OutOfMemory_HeaderFile
-#include <Standard_OutOfMemory.hxx>
-#endif
-#ifndef _NMTDS_IndexRange_HeaderFile
-#include <NMTDS_IndexRange.hxx>
-#endif
-
-
-#define Array1Item NMTDS_IndexRange
-#define Array1Item_hxx <NMTDS_IndexRange.hxx>
-#define BOPTColStd_CArray1 NMTDS_CArray1OfIndexRange
-#define BOPTColStd_CArray1_hxx <NMTDS_CArray1OfIndexRange.hxx>
-#include <BOPTColStd_CArray1.gxx>
-
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx
+// Created: Mon Feb 20 09:31:43 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile
-#define _NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile
-#ifndef _TCollection_BasicMapIterator_HeaderFile
-#include <TCollection_BasicMapIterator.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile
-#include <Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx>
-#endif
-class Standard_NoSuchObject;
-class TColStd_MapOfInteger;
-class TColStd_MapIntegerHasher;
-class NMTDS_DataMapOfIntegerMapOfInteger;
-class NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger;
+#ifndef NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile
+#define NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
+#ifndef NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile
+#include <NMTDS_DataMapOfIntegerMapOfInteger.hxx>
#endif
-
-class NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger : public TCollection_BasicMapIterator {
-
-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 NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger();
-
-
-Standard_EXPORT NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger(const NMTDS_DataMapOfIntegerMapOfInteger& aMap);
-
-
-Standard_EXPORT void Initialize(const NMTDS_DataMapOfIntegerMapOfInteger& aMap) ;
-
-
-Standard_EXPORT const Standard_Integer& Key() const;
-
-
-Standard_EXPORT const TColStd_MapOfInteger& Value() const;
-
-
-
-
-
-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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 <NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TColStd_MapOfInteger_HeaderFile
-#include <TColStd_MapOfInteger.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile
-#include <NMTDS_DataMapOfIntegerMapOfInteger.hxx>
-#endif
-#ifndef _NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile
-#include <NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx>
-#endif
-
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem TColStd_MapOfInteger
-#define TheItem_hxx <TColStd_MapOfInteger.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_DataMapNode NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger
-#define TCollection_DataMapNode_hxx <NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx>
-#define TCollection_DataMapIterator NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger
-#define TCollection_DataMapIterator_hxx <NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx>
-#define Handle_TCollection_DataMapNode Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger
-#define TCollection_DataMapNode_Type_() NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_Type_()
-#define TCollection_DataMap NMTDS_DataMapOfIntegerMapOfInteger
-#define TCollection_DataMap_hxx <NMTDS_DataMapOfIntegerMapOfInteger.hxx>
-#include <TCollection_DataMapIterator.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 _NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile
-#define _NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile
-#include <Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx>
-#endif
-
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _TColStd_MapOfInteger_HeaderFile
-#include <TColStd_MapOfInteger.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-class TColStd_MapOfInteger;
-class TColStd_MapIntegerHasher;
-class NMTDS_DataMapOfIntegerMapOfInteger;
-class NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger;
-
-
-
-class NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger(const Standard_Integer& K,const TColStd_MapOfInteger& I,const TCollection_MapNodePtr& n);
-
- Standard_Integer& Key() const;
-
- TColStd_MapOfInteger& Value() const;
-//Standard_EXPORT ~NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Integer myKey;
-TColStd_MapOfInteger myValue;
-
-
-};
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem TColStd_MapOfInteger
-#define TheItem_hxx <TColStd_MapOfInteger.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_DataMapNode NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger
-#define TCollection_DataMapNode_hxx <NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx>
-#define TCollection_DataMapIterator NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger
-#define TCollection_DataMapIterator_hxx <NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx>
-#define Handle_TCollection_DataMapNode Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger
-#define TCollection_DataMapNode_Type_() NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_Type_()
-#define TCollection_DataMap NMTDS_DataMapOfIntegerMapOfInteger
-#define TCollection_DataMap_hxx <NMTDS_DataMapOfIntegerMapOfInteger.hxx>
-
-#include <TCollection_DataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_DataMapNode
-#undef TCollection_DataMapNode_hxx
-#undef TCollection_DataMapIterator
-#undef TCollection_DataMapIterator_hxx
-#undef Handle_TCollection_DataMapNode
-#undef TCollection_DataMapNode_Type_
-#undef TCollection_DataMap
-#undef TCollection_DataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 <NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TColStd_MapOfInteger_HeaderFile
-#include <TColStd_MapOfInteger.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile
-#include <NMTDS_DataMapOfIntegerMapOfInteger.hxx>
-#endif
-#ifndef _NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile
-#include <NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx>
-#endif
-//NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger::~NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger",
- sizeof(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger) Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger))) {
- _anOtherObject = Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)((Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger::DynamicType() const
-{
- return STANDARD_TYPE(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger) ;
-}
-//Standard_Boolean NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger::~Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger() {}
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem TColStd_MapOfInteger
-#define TheItem_hxx <TColStd_MapOfInteger.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_DataMapNode NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger
-#define TCollection_DataMapNode_hxx <NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx>
-#define TCollection_DataMapIterator NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger
-#define TCollection_DataMapIterator_hxx <NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx>
-#define Handle_TCollection_DataMapNode Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger
-#define TCollection_DataMapNode_Type_() NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_Type_()
-#define TCollection_DataMap NMTDS_DataMapOfIntegerMapOfInteger
-#define TCollection_DataMap_hxx <NMTDS_DataMapOfIntegerMapOfInteger.hxx>
-#include <TCollection_DataMapNode.gxx>
-
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_DataMapOfIntegerMapOfInteger.hxx
+// Created: Mon Feb 20 09:27:40 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile
-#define _NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile
-#include <Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_NoSuchObject;
-class TColStd_MapOfInteger;
-class TColStd_MapIntegerHasher;
-class NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger;
-class NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class NMTDS_DataMapOfIntegerMapOfInteger : public TCollection_BasicMap
-{
-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
- //
+#ifndef NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile
+#define NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile
- Standard_EXPORT NMTDS_DataMapOfIntegerMapOfInteger(const Standard_Integer NbBuckets = 1);
+#include <TColStd_MapOfInteger.hxx>
+#include <TColStd_MapIntegerHasher.hxx>
- Standard_EXPORT NMTDS_DataMapOfIntegerMapOfInteger& Assign(const NMTDS_DataMapOfIntegerMapOfInteger& Other);
- NMTDS_DataMapOfIntegerMapOfInteger& operator =(const NMTDS_DataMapOfIntegerMapOfInteger& Other)
- {
- return Assign(Other);
- }
+#define _NCollection_MapHasher
+#include <NCollection_DataMap.hxx>
- Standard_EXPORT void ReSize(const Standard_Integer NbBuckets);
+typedef NCollection_DataMap<Standard_Integer, TColStd_MapOfInteger, TColStd_MapIntegerHasher> NMTDS_DataMapOfIntegerMapOfInteger;
+typedef NMTDS_DataMapOfIntegerMapOfInteger::Iterator NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger;
+
+#undef _NCollection_MapHasher
- Standard_EXPORT void Clear();
- ~NMTDS_DataMapOfIntegerMapOfInteger()
- {
- Clear();
- }
-
- Standard_EXPORT Standard_Boolean Bind (const Standard_Integer& K,const TColStd_MapOfInteger& I);
- Standard_EXPORT Standard_Boolean IsBound (const Standard_Integer& K) const;
- Standard_EXPORT Standard_Boolean UnBind (const Standard_Integer& K);
-
- Standard_EXPORT const TColStd_MapOfInteger& Find (const Standard_Integer& K) const;
- const TColStd_MapOfInteger& operator()(const Standard_Integer& K) const
- {
- return Find(K);
- }
-
- Standard_EXPORT TColStd_MapOfInteger& ChangeFind(const Standard_Integer& K);
- TColStd_MapOfInteger& operator()(const Standard_Integer& K)
- {
- return ChangeFind(K);
- }
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address Find1 (const Standard_Integer& K) const;
- Standard_EXPORT Standard_Address ChangeFind1 (const Standard_Integer& K);
-#endif
-
-private:
-
- // Methods PRIVATE
- //
-
- Standard_EXPORT NMTDS_DataMapOfIntegerMapOfInteger(const NMTDS_DataMapOfIntegerMapOfInteger& Other);
-
-};
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 <NMTDS_DataMapOfIntegerMapOfInteger.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TColStd_MapOfInteger_HeaderFile
-#include <TColStd_MapOfInteger.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile
-#include <NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx>
-#endif
-#ifndef _NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile
-#include <NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx>
-#endif
-
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem TColStd_MapOfInteger
-#define TheItem_hxx <TColStd_MapOfInteger.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_DataMapNode NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger
-#define TCollection_DataMapNode_hxx <NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx>
-#define TCollection_DataMapIterator NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger
-#define TCollection_DataMapIterator_hxx <NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx>
-#define Handle_TCollection_DataMapNode Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger
-#define TCollection_DataMapNode_Type_() NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_Type_()
-#define TCollection_DataMap NMTDS_DataMapOfIntegerMapOfInteger
-#define TCollection_DataMap_hxx <NMTDS_DataMapOfIntegerMapOfInteger.hxx>
-#include <TCollection_DataMap.gxx>
-
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTDS_IndexRange.cdl
--- Created: Fri Nov 28 10:31:05 2003
--- Author: Peter KURNEV
---
-class IndexRange from NMTDS
-
- ---Purpose:
-
---uses
---raises
-
-is
- Create
- returns IndexRange from NMTDS;
-
- SetFirst(me:out;
- aFirst:Integer from Standard);
-
- SetLast(me:out;
- aLast:Integer from Standard);
-
- First(me)
- returns Integer from Standard;
-
- Last(me)
- returns Integer from Standard;
-
- IsInRange(me;
- aIndex:Integer from Standard)
- returns Boolean from Standard;
-
-fields
- myFirst : Integer from Standard is protected;
- myLast : Integer from Standard is protected;
-
-end IndexRange;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <NMTDS_IndexRange.ixx>
+#include <NMTDS_IndexRange.hxx>
+
//=======================================================================
//function :NMTDS_IndexRange::NMTDS_IndexRange
//purpose :
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_IndexRange.hxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
+
#ifndef _NMTDS_IndexRange_HeaderFile
#define _NMTDS_IndexRange_HeaderFile
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
+#include <Standard_Integer.hxx>
+#include <Standard_Boolean.hxx>
+//=======================================================================
+//class : NMTDS_IndexRange
+//purpose :
+//=======================================================================
class NMTDS_IndexRange {
-
-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 NMTDS_IndexRange();
-
-
-Standard_EXPORT void SetFirst(const Standard_Integer aFirst) ;
-
-
-Standard_EXPORT void SetLast(const Standard_Integer aLast) ;
-
-
-Standard_EXPORT Standard_Integer First() const;
-
-
-Standard_EXPORT Standard_Integer Last() const;
-
-
-Standard_EXPORT Standard_Boolean IsInRange(const Standard_Integer aIndex) const;
-
-
-
-
+ public:
+
+ Standard_EXPORT
+ NMTDS_IndexRange();
+
+ Standard_EXPORT void SetFirst(const Standard_Integer aFirst) ;
+
+ Standard_EXPORT void SetLast(const Standard_Integer aLast) ;
+
+ Standard_EXPORT Standard_Integer First() const;
+
+ Standard_EXPORT Standard_Integer Last() const;
+
+ Standard_EXPORT Standard_Boolean IsInRange(const Standard_Integer aIndex) const;
protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-Standard_Integer myFirst;
-Standard_Integer myLast;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+ Standard_Integer myFirst;
+ Standard_Integer myLast;
};
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_IndexRange.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTDS_IndexRange_HeaderFile
-#include <NMTDS_IndexRange.hxx>
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile
-#define _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile
-#include <Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx>
-#endif
-
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _BooleanOperations_IndexedDataMapOfShapeInteger_HeaderFile
-#include <BooleanOperations_IndexedDataMapOfShapeInteger.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-class BooleanOperations_IndexedDataMapOfShapeInteger;
-class TColStd_MapIntegerHasher;
-class NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger;
-
-
-
-class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(const Standard_Integer& K1,const Standard_Integer K2,const BooleanOperations_IndexedDataMapOfShapeInteger& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
-
- Standard_Integer& Key1() const;
-
- Standard_Integer& Key2() const;
-
- TCollection_MapNodePtr& Next2() const;
-
- BooleanOperations_IndexedDataMapOfShapeInteger& Value() const;
-//Standard_EXPORT ~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Integer myKey1;
-Standard_Integer myKey2;
-BooleanOperations_IndexedDataMapOfShapeInteger myValue;
-TCollection_MapNodePtr myNext2;
-
-
-};
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem BooleanOperations_IndexedDataMapOfShapeInteger
-#define TheItem_hxx <BooleanOperations_IndexedDataMapOfShapeInteger.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger
-#define TCollection_IndexedDataMapNode_hxx <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger
-#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_Type_()
-#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger
-#define TCollection_IndexedDataMap_hxx <NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx>
-
-#include <TCollection_IndexedDataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_hxx
-#undef Handle_TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_Type_
-#undef TCollection_IndexedDataMap
-#undef TCollection_IndexedDataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _BooleanOperations_IndexedDataMapOfShapeInteger_HeaderFile
-#include <BooleanOperations_IndexedDataMapOfShapeInteger.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile
-#include <NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx>
-#endif
-//NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger",
- sizeof(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger))) {
- _anOtherObject = Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)((Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::DynamicType() const
-{
- return STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) ;
-}
-//Standard_Boolean NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::~Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger() {}
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem BooleanOperations_IndexedDataMapOfShapeInteger
-#define TheItem_hxx <BooleanOperations_IndexedDataMapOfShapeInteger.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger
-#define TCollection_IndexedDataMapNode_hxx <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger
-#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_Type_()
-#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger
-#define TCollection_IndexedDataMap_hxx <NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx>
-#include <TCollection_IndexedDataMapNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile
-#define _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile
-#include <Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx>
-#endif
-
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-class TopoDS_Shape;
-class TColStd_MapIntegerHasher;
-class NMTDS_IndexedDataMapOfIntegerShape;
-
-
-
-class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape(const Standard_Integer& K1,const Standard_Integer K2,const TopoDS_Shape& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
-
- Standard_Integer& Key1() const;
-
- Standard_Integer& Key2() const;
-
- TCollection_MapNodePtr& Next2() const;
-
- TopoDS_Shape& Value() const;
-//Standard_EXPORT ~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Integer myKey1;
-Standard_Integer myKey2;
-TopoDS_Shape myValue;
-TCollection_MapNodePtr myNext2;
-
-
-};
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem TopoDS_Shape
-#define TheItem_hxx <TopoDS_Shape.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMapNode_hxx <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_()
-#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMap_hxx <NMTDS_IndexedDataMapOfIntegerShape.hxx>
-
-#include <TCollection_IndexedDataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_hxx
-#undef Handle_TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_Type_
-#undef TCollection_IndexedDataMap
-#undef TCollection_IndexedDataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _NMTDS_IndexedDataMapOfIntegerShape_HeaderFile
-#include <NMTDS_IndexedDataMapOfIntegerShape.hxx>
-#endif
-//NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape",
- sizeof(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape))) {
- _anOtherObject = Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)((Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::DynamicType() const
-{
- return STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) ;
-}
-//Standard_Boolean NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::~Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape() {}
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem TopoDS_Shape
-#define TheItem_hxx <TopoDS_Shape.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMapNode_hxx <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_()
-#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMap_hxx <NMTDS_IndexedDataMapOfIntegerShape.hxx>
-#include <TCollection_IndexedDataMapNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_HeaderFile
-#define _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_HeaderFile
-#include <Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _NMTDS_BndSphere_HeaderFile
-#include <NMTDS_BndSphere.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-class TopoDS_Shape;
-class NMTDS_BndSphere;
-class TopTools_ShapeMapHasher;
-class NMTDS_IndexedDataMapOfShapeBndSphere;
-
-
-
-class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere(const TopoDS_Shape& K1,const Standard_Integer K2,const NMTDS_BndSphere& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
-
- TopoDS_Shape& Key1() const;
-
- Standard_Integer& Key2() const;
-
- TCollection_MapNodePtr& Next2() const;
-
- NMTDS_BndSphere& Value() const;
-//Standard_EXPORT ~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-TopoDS_Shape myKey1;
-Standard_Integer myKey2;
-NMTDS_BndSphere myValue;
-TCollection_MapNodePtr myNext2;
-
-
-};
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem NMTDS_BndSphere
-#define TheItem_hxx <NMTDS_BndSphere.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere
-#define TCollection_IndexedDataMapNode_hxx <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere
-#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_Type_()
-#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfShapeBndSphere
-#define TCollection_IndexedDataMap_hxx <NMTDS_IndexedDataMapOfShapeBndSphere.hxx>
-
-#include <TCollection_IndexedDataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_hxx
-#undef Handle_TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_Type_
-#undef TCollection_IndexedDataMap
-#undef TCollection_IndexedDataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _NMTDS_BndSphere_HeaderFile
-#include <NMTDS_BndSphere.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile
-#include <NMTDS_IndexedDataMapOfShapeBndSphere.hxx>
-#endif
-//NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere::~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere",
- sizeof(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere) Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere))) {
- _anOtherObject = Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)((Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere::DynamicType() const
-{
- return STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere) ;
-}
-//Standard_Boolean NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere::~Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere() {}
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem NMTDS_BndSphere
-#define TheItem_hxx <NMTDS_BndSphere.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere
-#define TCollection_IndexedDataMapNode_hxx <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere
-#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_Type_()
-#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfShapeBndSphere
-#define TCollection_IndexedDataMap_hxx <NMTDS_IndexedDataMapOfShapeBndSphere.hxx>
-#include <TCollection_IndexedDataMapNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile
-#define _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile
-#include <Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Bnd_Box_HeaderFile
-#include <Bnd_Box.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-class TopoDS_Shape;
-class Bnd_Box;
-class TopTools_ShapeMapHasher;
-class NMTDS_IndexedDataMapOfShapeBox;
-
-
-
-class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox(const TopoDS_Shape& K1,const Standard_Integer K2,const Bnd_Box& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
-
- TopoDS_Shape& Key1() const;
-
- Standard_Integer& Key2() const;
-
- TCollection_MapNodePtr& Next2() const;
-
- Bnd_Box& Value() const;
-//Standard_EXPORT ~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-TopoDS_Shape myKey1;
-Standard_Integer myKey2;
-Bnd_Box myValue;
-TCollection_MapNodePtr myNext2;
-
-
-};
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem Bnd_Box
-#define TheItem_hxx <Bnd_Box.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMapNode_hxx <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_()
-#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMap_hxx <NMTDS_IndexedDataMapOfShapeBox.hxx>
-
-#include <TCollection_IndexedDataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_hxx
-#undef Handle_TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_Type_
-#undef TCollection_IndexedDataMap
-#undef TCollection_IndexedDataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _Bnd_Box_HeaderFile
-#include <Bnd_Box.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _NMTDS_IndexedDataMapOfShapeBox_HeaderFile
-#include <NMTDS_IndexedDataMapOfShapeBox.hxx>
-#endif
-//NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox",
- sizeof(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox))) {
- _anOtherObject = Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)((Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::DynamicType() const
-{
- return STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) ;
-}
-//Standard_Boolean NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::~Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox() {}
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem Bnd_Box
-#define TheItem_hxx <Bnd_Box.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMapNode_hxx <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_()
-#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMap_hxx <NMTDS_IndexedDataMapOfShapeBox.hxx>
-#include <TCollection_IndexedDataMapNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile
-#define _NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile
-#include <Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_OutOfRange;
-class Standard_NoSuchObject;
-class BooleanOperations_IndexedDataMapOfShapeInteger;
-class TColStd_MapIntegerHasher;
-class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger : public TCollection_BasicMap {
-
-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 NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Assign(const NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Other) ;
- NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& operator =(const NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger()
-{
- Clear();
-}
-
-
-
-Standard_EXPORT Standard_Integer Add(const Standard_Integer& K,const BooleanOperations_IndexedDataMapOfShapeInteger& I) ;
-
-
-Standard_EXPORT void Substitute(const Standard_Integer I,const Standard_Integer& K,const BooleanOperations_IndexedDataMapOfShapeInteger& T) ;
-
-
-Standard_EXPORT void RemoveLast() ;
-
-
-Standard_EXPORT Standard_Boolean Contains(const Standard_Integer& K) const;
-
-
-Standard_EXPORT const Standard_Integer& FindKey(const Standard_Integer I) const;
-
-
-Standard_EXPORT const BooleanOperations_IndexedDataMapOfShapeInteger& FindFromIndex(const Standard_Integer I) const;
- const BooleanOperations_IndexedDataMapOfShapeInteger& operator ()(const Standard_Integer I) const
-{
- return FindFromIndex(I);
-}
-
-
-
-Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeInteger& ChangeFromIndex(const Standard_Integer I) ;
- BooleanOperations_IndexedDataMapOfShapeInteger& operator ()(const Standard_Integer I)
-{
- return ChangeFromIndex(I);
-}
-
-
-
-Standard_EXPORT Standard_Integer FindIndex(const Standard_Integer& K) const;
-
-
-Standard_EXPORT const BooleanOperations_IndexedDataMapOfShapeInteger& FindFromKey(const Standard_Integer& K) const;
-
-
-Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeInteger& ChangeFromKey(const Standard_Integer& K) ;
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address FindFromKey1 (const Standard_Integer& K) const;
- Standard_EXPORT Standard_Address ChangeFromKey1 (const Standard_Integer& K);
-#endif
-
-private:
-
- // Methods PRIVATE
- //
-
-Standard_EXPORT NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(const NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Other);
-
-};
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _BooleanOperations_IndexedDataMapOfShapeInteger_HeaderFile
-#include <BooleanOperations_IndexedDataMapOfShapeInteger.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile
-#include <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx>
-#endif
-
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem BooleanOperations_IndexedDataMapOfShapeInteger
-#define TheItem_hxx <BooleanOperations_IndexedDataMapOfShapeInteger.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger
-#define TCollection_IndexedDataMapNode_hxx <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger
-#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_Type_()
-#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger
-#define TCollection_IndexedDataMap_hxx <NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx>
-#include <TCollection_IndexedDataMap.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_IndexedDataMapOfIntegerShape.hxx
+// Created: Mon Feb 20 09:20:07 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTDS_IndexedDataMapOfIntegerShape_HeaderFile
-#define _NMTDS_IndexedDataMapOfIntegerShape_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile
-#include <Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_OutOfRange;
-class Standard_NoSuchObject;
-class TopoDS_Shape;
-class TColStd_MapIntegerHasher;
-class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class NMTDS_IndexedDataMapOfIntegerShape : public TCollection_BasicMap {
-
-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 NMTDS_IndexedDataMapOfIntegerShape(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT NMTDS_IndexedDataMapOfIntegerShape& Assign(const NMTDS_IndexedDataMapOfIntegerShape& Other) ;
- NMTDS_IndexedDataMapOfIntegerShape& operator =(const NMTDS_IndexedDataMapOfIntegerShape& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~NMTDS_IndexedDataMapOfIntegerShape()
-{
- Clear();
-}
-
-
-
-Standard_EXPORT Standard_Integer Add(const Standard_Integer& K,const TopoDS_Shape& I) ;
-
-
-Standard_EXPORT void Substitute(const Standard_Integer I,const Standard_Integer& K,const TopoDS_Shape& T) ;
+#ifndef NMTDS_IndexedDataMapOfIntegerShape_HeaderFile
+#define NMTDS_IndexedDataMapOfIntegerShape_HeaderFile
-Standard_EXPORT void RemoveLast() ;
-
-
-Standard_EXPORT Standard_Boolean Contains(const Standard_Integer& K) const;
-
-
-Standard_EXPORT const Standard_Integer& FindKey(const Standard_Integer I) const;
-
-
-Standard_EXPORT const TopoDS_Shape& FindFromIndex(const Standard_Integer I) const;
- const TopoDS_Shape& operator ()(const Standard_Integer I) const
-{
- return FindFromIndex(I);
-}
-
-
-
-Standard_EXPORT TopoDS_Shape& ChangeFromIndex(const Standard_Integer I) ;
- TopoDS_Shape& operator ()(const Standard_Integer I)
-{
- return ChangeFromIndex(I);
-}
-
-
-
-Standard_EXPORT Standard_Integer FindIndex(const Standard_Integer& K) const;
-
-
-Standard_EXPORT const TopoDS_Shape& FindFromKey(const Standard_Integer& K) const;
-
-
-Standard_EXPORT TopoDS_Shape& ChangeFromKey(const Standard_Integer& K) ;
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address FindFromKey1 (const Standard_Integer& K) const;
- Standard_EXPORT Standard_Address ChangeFromKey1 (const Standard_Integer& K);
-#endif
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT NMTDS_IndexedDataMapOfIntegerShape(const NMTDS_IndexedDataMapOfIntegerShape& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
-
+#include <TopoDS_Shape.hxx>
+#include <Standard_Integer.hxx>
+#include <TColStd_MapIntegerHasher.hxx>
+#define _NCollection_MapHasher
+#include <NCollection_IndexedDataMap.hxx>
+typedef NCollection_IndexedDataMap<Standard_Integer, TopoDS_Shape, TColStd_MapIntegerHasher> NMTDS_IndexedDataMapOfIntegerShape;
+
+#undef _NCollection_MapHasher
-// other Inline functions and methods (like "C++: function call" methods)
-//
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_IndexedDataMapOfIntegerShape.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile
-#include <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx>
-#endif
-
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem TopoDS_Shape
-#define TheItem_hxx <TopoDS_Shape.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMapNode_hxx <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_()
-#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerShape
-#define TCollection_IndexedDataMap_hxx <NMTDS_IndexedDataMapOfIntegerShape.hxx>
-#include <TCollection_IndexedDataMap.gxx>
-
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#ifndef _NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile
-#define _NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_HeaderFile
-#include <Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_OutOfRange;
-class Standard_NoSuchObject;
-class TopoDS_Shape;
-class NMTDS_BndSphere;
-class TopTools_ShapeMapHasher;
-class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class NMTDS_IndexedDataMapOfShapeBndSphere : public TCollection_BasicMap {
-
-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 NMTDS_IndexedDataMapOfShapeBndSphere(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT NMTDS_IndexedDataMapOfShapeBndSphere& Assign(const NMTDS_IndexedDataMapOfShapeBndSphere& Other) ;
- NMTDS_IndexedDataMapOfShapeBndSphere& operator =(const NMTDS_IndexedDataMapOfShapeBndSphere& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~NMTDS_IndexedDataMapOfShapeBndSphere()
-{
- Clear();
-}
+// File: NMTDS_IndexedDataMapOfShapeBndSphere.hxx
+// Created: Mon Feb 20 09:17:01 2012
+// Author:
+// <pkv@BDEURI37616>
+#ifndef NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile
+#define NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile
-Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const NMTDS_BndSphere& I) ;
+#include <TopoDS_Shape.hxx>
+#include <TopTools_ShapeMapHasher.hxx>
+#include <NMTDS_BndSphere.hxx>
+#define _NCollection_MapHasher
+#include <NCollection_IndexedDataMap.hxx>
-Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const NMTDS_BndSphere& T) ;
-Standard_EXPORT void RemoveLast() ;
+typedef NCollection_IndexedDataMap<TopoDS_Shape, NMTDS_BndSphere, TopTools_ShapeMapHasher> NMTDS_IndexedDataMapOfShapeBndSphere;
+
+#undef _NCollection_MapHasher
-Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const;
-Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const;
-
-
-Standard_EXPORT const NMTDS_BndSphere& FindFromIndex(const Standard_Integer I) const;
- const NMTDS_BndSphere& operator ()(const Standard_Integer I) const
-{
- return FindFromIndex(I);
-}
-
-
-
-Standard_EXPORT NMTDS_BndSphere& ChangeFromIndex(const Standard_Integer I) ;
- NMTDS_BndSphere& operator ()(const Standard_Integer I)
-{
- return ChangeFromIndex(I);
-}
-
-
-
-Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const;
-
-
-Standard_EXPORT const NMTDS_BndSphere& FindFromKey(const TopoDS_Shape& K) const;
-
-
-Standard_EXPORT NMTDS_BndSphere& ChangeFromKey(const TopoDS_Shape& K) ;
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const;
- Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K);
-#endif
-
-private:
-
- // Methods PRIVATE
- //
-
-Standard_EXPORT NMTDS_IndexedDataMapOfShapeBndSphere(const NMTDS_IndexedDataMapOfShapeBndSphere& Other);
-
-};
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 <NMTDS_IndexedDataMapOfShapeBndSphere.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _NMTDS_BndSphere_HeaderFile
-#include <NMTDS_BndSphere.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_HeaderFile
-#include <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx>
-#endif
-
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem NMTDS_BndSphere
-#define TheItem_hxx <NMTDS_BndSphere.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere
-#define TCollection_IndexedDataMapNode_hxx <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere
-#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_Type_()
-#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfShapeBndSphere
-#define TCollection_IndexedDataMap_hxx <NMTDS_IndexedDataMapOfShapeBndSphere.hxx>
-#include <TCollection_IndexedDataMap.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#ifndef _NMTDS_IndexedDataMapOfShapeBox_HeaderFile
-#define _NMTDS_IndexedDataMapOfShapeBox_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile
-#include <Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_OutOfRange;
-class Standard_NoSuchObject;
-class TopoDS_Shape;
-class Bnd_Box;
-class TopTools_ShapeMapHasher;
-class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class NMTDS_IndexedDataMapOfShapeBox : public TCollection_BasicMap {
-
-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 NMTDS_IndexedDataMapOfShapeBox(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT NMTDS_IndexedDataMapOfShapeBox& Assign(const NMTDS_IndexedDataMapOfShapeBox& Other) ;
- NMTDS_IndexedDataMapOfShapeBox& operator =(const NMTDS_IndexedDataMapOfShapeBox& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~NMTDS_IndexedDataMapOfShapeBox()
-{
- Clear();
-}
-
-
-
-Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const Bnd_Box& I) ;
-
-
-Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const Bnd_Box& T) ;
-
-
-Standard_EXPORT void RemoveLast() ;
+// File: NMTDS_IndexedDataMapOfShapeBox.hxx
+// Created: Mon Feb 20 09:17:01 2012
+// Author:
+// <pkv@BDEURI37616>
-Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const;
+#ifndef NMTDS_IndexedDataMapOfShapeBox_HeaderFile
+#define NMTDS_IndexedDataMapOfShapeBox_HeaderFile
+#include <TopoDS_Shape.hxx>
+#include <TopTools_ShapeMapHasher.hxx>
+#include <Bnd_Box.hxx>
-Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const;
+#define _NCollection_MapHasher
+#include <NCollection_IndexedDataMap.hxx>
-Standard_EXPORT const Bnd_Box& FindFromIndex(const Standard_Integer I) const;
- const Bnd_Box& operator ()(const Standard_Integer I) const
-{
- return FindFromIndex(I);
-}
+typedef NCollection_IndexedDataMap<TopoDS_Shape, Bnd_Box, TopTools_ShapeMapHasher> NMTDS_IndexedDataMapOfShapeBox;
+
+#undef _NCollection_MapHasher
-Standard_EXPORT Bnd_Box& ChangeFromIndex(const Standard_Integer I) ;
- Bnd_Box& operator ()(const Standard_Integer I)
-{
- return ChangeFromIndex(I);
-}
-
-
-
-Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const;
-
-
-Standard_EXPORT const Bnd_Box& FindFromKey(const TopoDS_Shape& K) const;
-
-
-Standard_EXPORT Bnd_Box& ChangeFromKey(const TopoDS_Shape& K) ;
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const;
- Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K);
-#endif
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT NMTDS_IndexedDataMapOfShapeBox(const NMTDS_IndexedDataMapOfShapeBox& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_IndexedDataMapOfShapeBox.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _Bnd_Box_HeaderFile
-#include <Bnd_Box.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile
-#include <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx>
-#endif
-
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem Bnd_Box
-#define TheItem_hxx <Bnd_Box.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMapNode_hxx <NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_()
-#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfShapeBox
-#define TCollection_IndexedDataMap_hxx <NMTDS_IndexedDataMapOfShapeBox.hxx>
-#include <TCollection_IndexedDataMap.gxx>
-
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- 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: NMTDS_InterfPool.cdl
--- Created:
--- Author: Peter KURNEV
---
-class InterfPool from NMTDS
-
- ---Purpose:
-
-uses
- MapOfPairBoolean from NMTDS,
- ListOfPairBoolean from NMTDS,
- PairBoolean from NMTDS,
- InterfType from NMTDS,
- --
- CArray1OfSSInterference from BOPTools,
- CArray1OfESInterference from BOPTools,
- CArray1OfVSInterference from BOPTools,
- CArray1OfEEInterference from BOPTools,
- CArray1OfVEInterference from BOPTools,
- CArray1OfVVInterference from BOPTools
-
---raises
-
-is
- Create
- returns InterfPool from NMTDS;
- ---C++: alias "Standard_EXPORT virtual ~NMTDS_InterfPool();"
-
-
- Add (me:out;
- aPKB : PairBoolean from NMTDS;
- aType: InterfType from NMTDS)
- returns Boolean from Standard;
-
- Add (me:out;
- aInd1 : Integer from Standard;
- aInd2 : Integer from Standard;
- aType : InterfType from NMTDS)
- returns Boolean from Standard;
-
- Add (me:out;
- aInd1 : Integer from Standard;
- aInd2 : Integer from Standard;
- bFlag : Boolean from Standard;
- aType : InterfType from NMTDS)
- returns Boolean from Standard;
-
- Contains(me;
- aPKB : PairBoolean from NMTDS)
- returns Boolean from Standard;
-
- Contains(me;
- aInd1 : Integer from Standard;
- aInd2 : Integer from Standard)
- returns Boolean from Standard;
-
- Get(me)
- returns ListOfPairBoolean from NMTDS;
- ---C++: return const &
-
- Get(me;
- aType : InterfType from NMTDS)
- returns ListOfPairBoolean from NMTDS;
- ---C++: return const &
-
- Get(me;
- aInd : Integer from Standard)
- returns ListOfPairBoolean from NMTDS;
- ---C++: return const &
-
- Get(me;
- aInd : Integer from Standard;
- aType: InterfType from NMTDS)
- returns ListOfPairBoolean from NMTDS;
- ---C++: return const &
-
- --
- -- Interferences
- --
- SSInterferences (me:out)
- returns CArray1OfSSInterference from BOPTools;
- ---C++: return &
- ---Purpose:
- --- Returns the reference to array Of F/F interferences
- ---
- ESInterferences (me:out)
- returns CArray1OfESInterference from BOPTools;
- ---C++: return &
- ---Purpose:
- --- Returns the reference to array Of E/F interferences
- ---
- VSInterferences (me:out)
- returns CArray1OfVSInterference from BOPTools;
- ---C++: return &
- ---Purpose:
- --- Returns the reference to array Of V/F interferences
- ---
- EEInterferences (me:out)
- returns CArray1OfEEInterference from BOPTools;
- ---C++: return &
- ---Purpose:
- --- Returns the reference to arrray Of E/E interferences
- ---
- VEInterferences (me:out)
- returns CArray1OfVEInterference from BOPTools;
- ---C++: return &
- ---Purpose:
- --- Returns the reference to arrray Of V/E interferences
- ---
- VVInterferences (me:out)
- returns CArray1OfVVInterference from BOPTools;
- ---C++: return &
- ---Purpose:
- --- Returns the reference to arrray Of V/V interferences
- ---
- --modified by NIZNHY-PKV Mon Dec 12 09:07:13 2011f
- Purge(me:out) ;
- --modified by NIZNHY-PKV Mon Dec 12 09:07:16 2011t
-fields
- myTable : MapOfPairBoolean from NMTDS [6] is protected;
- myList : ListOfPairBoolean from NMTDS is protected;
- myMaxInd: Integer from Standard is protected;
- --
- mySSInterferences : CArray1OfSSInterference from BOPTools is protected;
- myESInterferences : CArray1OfESInterference from BOPTools is protected;
- myVSInterferences : CArray1OfVSInterference from BOPTools is protected;
- myEEInterferences : CArray1OfEEInterference from BOPTools is protected;
- myVEInterferences : CArray1OfVEInterference from BOPTools is protected;
- myVVInterferences : CArray1OfVVInterference from BOPTools is protected;
-
-end InterfPool;
// File: NMTDS_InterfPool.cxx
// Author: Peter KURNEV
-#include <NMTDS_InterfPool.ixx>
+#include <NMTDS_InterfPool.hxx>
#include <NMTDS_PairBoolean.hxx>
#include <NMTDS_ListOfPairBoolean.hxx>
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-\r
-#ifndef _NMTDS_InterfPool_HeaderFile\r
-#define _NMTDS_InterfPool_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_Macro_HeaderFile\r
-#include <Standard_Macro.hxx>\r
-#endif\r
-\r
-#ifndef _NMTDS_MapOfPairBoolean_HeaderFile\r
-#include <NMTDS_MapOfPairBoolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_ListOfPairBoolean_HeaderFile\r
-#include <NMTDS_ListOfPairBoolean.hxx>\r
-#endif\r
-#ifndef _Standard_Integer_HeaderFile\r
-#include <Standard_Integer.hxx>\r
-#endif\r
-#ifndef _BOPTools_CArray1OfSSInterference_HeaderFile\r
-#include <BOPTools_CArray1OfSSInterference.hxx>\r
-#endif\r
-#ifndef _BOPTools_CArray1OfESInterference_HeaderFile\r
-#include <BOPTools_CArray1OfESInterference.hxx>\r
-#endif\r
-#ifndef _BOPTools_CArray1OfVSInterference_HeaderFile\r
-#include <BOPTools_CArray1OfVSInterference.hxx>\r
-#endif\r
-#ifndef _BOPTools_CArray1OfEEInterference_HeaderFile\r
-#include <BOPTools_CArray1OfEEInterference.hxx>\r
-#endif\r
-#ifndef _BOPTools_CArray1OfVEInterference_HeaderFile\r
-#include <BOPTools_CArray1OfVEInterference.hxx>\r
-#endif\r
-#ifndef _BOPTools_CArray1OfVVInterference_HeaderFile\r
-#include <BOPTools_CArray1OfVVInterference.hxx>\r
-#endif\r
-#ifndef _Standard_Boolean_HeaderFile\r
-#include <Standard_Boolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_InterfType_HeaderFile\r
-#include <NMTDS_InterfType.hxx>\r
-#endif\r
-class NMTDS_PairBoolean;\r
-class NMTDS_ListOfPairBoolean;\r
-class BOPTools_CArray1OfSSInterference;\r
-class BOPTools_CArray1OfESInterference;\r
-class BOPTools_CArray1OfVSInterference;\r
-class BOPTools_CArray1OfEEInterference;\r
-class BOPTools_CArray1OfVEInterference;\r
-class BOPTools_CArray1OfVVInterference;\r
-\r
-\r
-\r
-class NMTDS_InterfPool {\r
-public:\r
-\r
- void* operator new(size_t,void* anAddress) \r
- {\r
- return anAddress;\r
- }\r
- void* operator new(size_t size) \r
- {\r
- return Standard::Allocate(size); \r
- }\r
- void operator delete(void *anAddress) \r
- {\r
- if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
- }\r
-\r
- \r
- Standard_EXPORT NMTDS_InterfPool();\r
-Standard_EXPORT virtual ~NMTDS_InterfPool();\r
- \r
- Standard_EXPORT Standard_Boolean Add(const NMTDS_PairBoolean& aPKB,const NMTDS_InterfType aType) ;\r
- \r
- Standard_EXPORT Standard_Boolean Add(const Standard_Integer aInd1,const Standard_Integer aInd2,const NMTDS_InterfType aType) ;\r
- \r
- Standard_EXPORT Standard_Boolean Add(const Standard_Integer aInd1,const Standard_Integer aInd2,const Standard_Boolean bFlag,const NMTDS_InterfType aType) ;\r
- \r
- Standard_EXPORT Standard_Boolean Contains(const NMTDS_PairBoolean& aPKB) const;\r
- \r
- Standard_EXPORT Standard_Boolean Contains(const Standard_Integer aInd1,const Standard_Integer aInd2) const;\r
- \r
- Standard_EXPORT const NMTDS_ListOfPairBoolean& Get() const;\r
- \r
- Standard_EXPORT const NMTDS_ListOfPairBoolean& Get(const NMTDS_InterfType aType) const;\r
- \r
- Standard_EXPORT const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd) const;\r
- \r
- Standard_EXPORT const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd,const NMTDS_InterfType aType) const;\r
- \r
-//! Returns the reference to array Of F/F interferences <br>\r
- Standard_EXPORT BOPTools_CArray1OfSSInterference& SSInterferences() ;\r
- \r
-//! Returns the reference to array Of E/F interferences <br>\r
- Standard_EXPORT BOPTools_CArray1OfESInterference& ESInterferences() ;\r
- \r
-//! Returns the reference to array Of V/F interferences <br>\r
- Standard_EXPORT BOPTools_CArray1OfVSInterference& VSInterferences() ;\r
- \r
-//! Returns the reference to arrray Of E/E interferences <br>\r
- Standard_EXPORT BOPTools_CArray1OfEEInterference& EEInterferences() ;\r
- \r
-//! Returns the reference to arrray Of V/E interferences <br>\r
- Standard_EXPORT BOPTools_CArray1OfVEInterference& VEInterferences() ;\r
- \r
-//! Returns the reference to arrray Of V/V interferences <br>\r
- Standard_EXPORT BOPTools_CArray1OfVVInterference& VVInterferences() ;\r
- \r
- Standard_EXPORT void Purge() ;\r
-\r
-\r
-\r
-\r
-\r
-protected:\r
-\r
-\r
-\r
-NMTDS_MapOfPairBoolean myTable[6];\r
-NMTDS_ListOfPairBoolean myList;\r
-Standard_Integer myMaxInd;\r
-BOPTools_CArray1OfSSInterference mySSInterferences;\r
-BOPTools_CArray1OfESInterference myESInterferences;\r
-BOPTools_CArray1OfVSInterference myVSInterferences;\r
-BOPTools_CArray1OfEEInterference myEEInterferences;\r
-BOPTools_CArray1OfVEInterference myVEInterferences;\r
-BOPTools_CArray1OfVVInterference myVVInterferences;\r
-\r
-\r
-private:\r
-\r
-\r
-\r
-\r
-\r
-};\r
-\r
-\r
-\r
-\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+
+// File: NMTDS_InterfPool.hxx
+//
+// Author: Peter KURNEV
+
+#ifndef _NMTDS_InterfPool_HeaderFile
+#define _NMTDS_InterfPool_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
+
+#include <Standard_Integer.hxx>
+#include <BOPTools_CArray1OfSSInterference.hxx>
+#include <BOPTools_CArray1OfESInterference.hxx>
+#include <BOPTools_CArray1OfVSInterference.hxx>
+#include <BOPTools_CArray1OfEEInterference.hxx>
+#include <BOPTools_CArray1OfVEInterference.hxx>
+#include <BOPTools_CArray1OfVVInterference.hxx>
+#include <Standard_Boolean.hxx>
+#include <NMTDS_InterfType.hxx>
+#include <NMTDS_PairBoolean.hxx>
+#include <NMTDS_MapOfPairBoolean.hxx>
+#include <NMTDS_ListOfPairBoolean.hxx>
+
+//=======================================================================
+//class : NMTDS_InterfPool
+//purpose :
+//=======================================================================
+class NMTDS_InterfPool {
+ public:
+ Standard_EXPORT
+ NMTDS_InterfPool();
+ Standard_EXPORT
+ virtual ~NMTDS_InterfPool();
+
+ Standard_EXPORT
+ Standard_Boolean Add(const NMTDS_PairBoolean& aPKB,
+ const NMTDS_InterfType aType) ;
+
+ Standard_EXPORT
+ Standard_Boolean Add(const Standard_Integer aInd1,
+ const Standard_Integer aInd2,
+ const NMTDS_InterfType aType) ;
+
+ Standard_EXPORT
+ Standard_Boolean Add(const Standard_Integer aInd1,
+ const Standard_Integer aInd2,
+ const Standard_Boolean bFlag,
+ const NMTDS_InterfType aType) ;
+
+ Standard_EXPORT
+ Standard_Boolean Contains(const NMTDS_PairBoolean& aPKB) const;
+
+ Standard_EXPORT
+ Standard_Boolean Contains(const Standard_Integer aInd1,
+ const Standard_Integer aInd2) const;
+
+ Standard_EXPORT
+ const NMTDS_ListOfPairBoolean& Get() const;
+
+ Standard_EXPORT
+ const NMTDS_ListOfPairBoolean& Get(const NMTDS_InterfType aType) const;
+
+ Standard_EXPORT
+ const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd) const;
+
+ Standard_EXPORT
+ const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd,
+ const NMTDS_InterfType aType) const;
+
+ //! Returns the reference to array Of F/F interferences <br>
+ Standard_EXPORT BOPTools_CArray1OfSSInterference& SSInterferences() ;
+
+ //! Returns the reference to array Of E/F interferences <br>
+ Standard_EXPORT BOPTools_CArray1OfESInterference& ESInterferences() ;
+
+ //! Returns the reference to array Of V/F interferences <br>
+ Standard_EXPORT BOPTools_CArray1OfVSInterference& VSInterferences() ;
+
+ //! Returns the reference to arrray Of E/E interferences <br>
+ Standard_EXPORT BOPTools_CArray1OfEEInterference& EEInterferences() ;
+
+ //! Returns the reference to arrray Of V/E interferences <br>
+ Standard_EXPORT BOPTools_CArray1OfVEInterference& VEInterferences() ;
+
+ //! Returns the reference to arrray Of V/V interferences <br>
+ Standard_EXPORT BOPTools_CArray1OfVVInterference& VVInterferences() ;
+
+ Standard_EXPORT void Purge() ;
+
+protected:
+ NMTDS_MapOfPairBoolean myTable[6];
+ NMTDS_ListOfPairBoolean myList;
+ Standard_Integer myMaxInd;
+ BOPTools_CArray1OfSSInterference mySSInterferences;
+ BOPTools_CArray1OfESInterference myESInterferences;
+ BOPTools_CArray1OfVSInterference myVSInterferences;
+ BOPTools_CArray1OfEEInterference myEEInterferences;
+ BOPTools_CArray1OfVEInterference myVEInterferences;
+ BOPTools_CArray1OfVVInterference myVVInterferences;
+
+private:
+};
+
+#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 <NMTDS_InterfPool.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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
-//
-\r
-#ifndef _NMTDS_PairBoolean_HeaderFile\r
-#include <NMTDS_PairBoolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_ListOfPairBoolean_HeaderFile\r
-#include <NMTDS_ListOfPairBoolean.hxx>\r
-#endif\r
-#ifndef _BOPTools_CArray1OfSSInterference_HeaderFile\r
-#include <BOPTools_CArray1OfSSInterference.hxx>\r
-#endif\r
-#ifndef _BOPTools_CArray1OfESInterference_HeaderFile\r
-#include <BOPTools_CArray1OfESInterference.hxx>\r
-#endif\r
-#ifndef _BOPTools_CArray1OfVSInterference_HeaderFile\r
-#include <BOPTools_CArray1OfVSInterference.hxx>\r
-#endif\r
-#ifndef _BOPTools_CArray1OfEEInterference_HeaderFile\r
-#include <BOPTools_CArray1OfEEInterference.hxx>\r
-#endif\r
-#ifndef _BOPTools_CArray1OfVEInterference_HeaderFile\r
-#include <BOPTools_CArray1OfVEInterference.hxx>\r
-#endif\r
-#ifndef _BOPTools_CArray1OfVVInterference_HeaderFile\r
-#include <BOPTools_CArray1OfVVInterference.hxx>\r
-#endif\r
-#ifndef _NMTDS_InterfPool_HeaderFile\r
-#include <NMTDS_InterfPool.hxx>\r
-#endif\r
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_InterfType.hxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+
+
#ifndef _NMTDS_InterfType_HeaderFile
#define _NMTDS_InterfType_HeaderFile
-enum NMTDS_InterfType {
- NMTDS_TI_VV,
+enum NMTDS_InterfType {
+NMTDS_TI_VV,
NMTDS_TI_VE,
NMTDS_TI_VF,
NMTDS_TI_EE,
NMTDS_TI_UNKNOWN
};
-
#ifndef _Standard_PrimitiveTypes_HeaderFile
#include <Standard_PrimitiveTypes.hxx>
#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTDS_Iterator.cdl
--- Created:
--- Author: Peter KURNEV
---
-class Iterator from NMTDS
-
- ---Purpose:
-
-uses
- DataMapOfIntegerListOfInteger from TColStd,
- ShapeEnum from TopAbs,
- ShapesDataStructure from NMTDS,
- PShapesDataStructure from NMTDS,
- ListOfPairBoolean from NMTDS,
- ListIteratorOfListOfPairBoolean from NMTDS,
- PassKeyBoolean from NMTDS
-
---raises
-
-is
- Create
- returns Iterator from NMTDS;
- ---C++: alias "Standard_EXPORT virtual ~NMTDS_Iterator();"
-
-
- SetDS(me:out;
- pDS:PShapesDataStructure from NMTDS);
-
- DS(me)
- returns ShapesDataStructure from NMTDS;
- ---C++:return const &
-
- Initialize(me: out;
- aType1: ShapeEnum from TopAbs;
- aType2: ShapeEnum from TopAbs);
- More(me)
- returns Boolean from Standard;
-
- Next(me: out);
-
- Current(me; aIndex1:out Integer from Standard;
- aIndex2:out Integer from Standard;
- aWithSubShape: out Boolean from Standard);
-
- Prepare(me:out)
- is virtual;
-
- Intersect(me:out)
- is virtual protected;
-
- ExpectedLength(me)
- returns Integer from Standard;
-
- BlockLength(me)
- returns Integer from Standard;
-
- SDVertices(me)
- returns DataMapOfIntegerListOfInteger from TColStd;
- ---C++:return const &
-
- FillMVSD(myclass;
- aMVSD1:DataMapOfIntegerListOfInteger from TColStd;
- aMVSD2:out DataMapOfIntegerListOfInteger from TColStd);
-
-fields
- myDS :PShapesDataStructure from NMTDS is protected;
- myLists :ListOfPairBoolean from NMTDS [6] is protected;
- myIterator :ListIteratorOfListOfPairBoolean from NMTDS is protected;
- myEmptyList:ListOfPairBoolean from NMTDS is protected;
- myLength :Integer from Standard is protected;
- --
- myMVSD :DataMapOfIntegerListOfInteger from TColStd is protected;
-
-end Iterator;
// File: NMTDS_Iterator.cxx
// Author: Peter KURNEV
-#include <NMTDS_Iterator.ixx>
+#include <NMTDS_Iterator.hxx>
//
#include <Bnd_Box.hxx>
//
#include <NMTDS_Tools.hxx>
#include <NMTDS_DataMapOfIntegerMapOfInteger.hxx>
#include <NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx>
+#include <NMTDS_ShapesDataStructure.hxx>
//=======================================================================
//function : NMTDS_Iterator
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-\r
-#ifndef _NMTDS_Iterator_HeaderFile\r
-#define _NMTDS_Iterator_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_Macro_HeaderFile\r
-#include <Standard_Macro.hxx>\r
-#endif\r
-\r
-#ifndef _NMTDS_PShapesDataStructure_HeaderFile\r
-#include <NMTDS_PShapesDataStructure.hxx>\r
-#endif\r
-#ifndef _NMTDS_ListOfPairBoolean_HeaderFile\r
-#include <NMTDS_ListOfPairBoolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile\r
-#include <NMTDS_ListIteratorOfListOfPairBoolean.hxx>\r
-#endif\r
-#ifndef _Standard_Integer_HeaderFile\r
-#include <Standard_Integer.hxx>\r
-#endif\r
-#ifndef _TColStd_DataMapOfIntegerListOfInteger_HeaderFile\r
-#include <TColStd_DataMapOfIntegerListOfInteger.hxx>\r
-#endif\r
-#ifndef _TopAbs_ShapeEnum_HeaderFile\r
-#include <TopAbs_ShapeEnum.hxx>\r
-#endif\r
-#ifndef _Standard_Boolean_HeaderFile\r
-#include <Standard_Boolean.hxx>\r
-#endif\r
-class NMTDS_ShapesDataStructure;\r
-class TColStd_DataMapOfIntegerListOfInteger;\r
-\r
-\r
-\r
-class NMTDS_Iterator {\r
-public:\r
-\r
- void* operator new(size_t,void* anAddress) \r
- {\r
- return anAddress;\r
- }\r
- void* operator new(size_t size) \r
- {\r
- return Standard::Allocate(size); \r
- }\r
- void operator delete(void *anAddress) \r
- {\r
- if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
- }\r
-\r
- \r
- Standard_EXPORT NMTDS_Iterator();\r
-Standard_EXPORT virtual ~NMTDS_Iterator();\r
- \r
- Standard_EXPORT void SetDS(const NMTDS_PShapesDataStructure& pDS) ;\r
- \r
- Standard_EXPORT const NMTDS_ShapesDataStructure& DS() const;\r
- \r
- Standard_EXPORT void Initialize(const TopAbs_ShapeEnum aType1,const TopAbs_ShapeEnum aType2) ;\r
- \r
- Standard_EXPORT Standard_Boolean More() const;\r
- \r
- Standard_EXPORT void Next() ;\r
- \r
- Standard_EXPORT void Current(Standard_Integer& aIndex1,Standard_Integer& aIndex2,Standard_Boolean& aWithSubShape) const;\r
- \r
- Standard_EXPORT virtual void Prepare() ;\r
- \r
- Standard_EXPORT Standard_Integer ExpectedLength() const;\r
- \r
- Standard_EXPORT Standard_Integer BlockLength() const;\r
- \r
- Standard_EXPORT const TColStd_DataMapOfIntegerListOfInteger& SDVertices() const;\r
- \r
- Standard_EXPORT static void FillMVSD(const TColStd_DataMapOfIntegerListOfInteger& aMVSD1,TColStd_DataMapOfIntegerListOfInteger& aMVSD2) ;\r
-\r
-\r
-protected:\r
-\r
- \r
- Standard_EXPORT virtual void Intersect() ;\r
-\r
-\r
-NMTDS_PShapesDataStructure myDS;\r
-NMTDS_ListOfPairBoolean myLists[6];\r
-NMTDS_ListIteratorOfListOfPairBoolean myIterator;\r
-NMTDS_ListOfPairBoolean myEmptyList;\r
-Standard_Integer myLength;\r
-TColStd_DataMapOfIntegerListOfInteger myMVSD;\r
-\r
-\r
-private:\r
-\r
-};\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+
+// File: NMTDS_Iterator.hxx
+// Author: Peter KURNEV
+
+#ifndef _NMTDS_Iterator_HeaderFile
+#define _NMTDS_Iterator_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
+
+#include <Standard_Integer.hxx>
+#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
+#include <TopAbs_ShapeEnum.hxx>
+#include <Standard_Boolean.hxx>
+#include <NMTDS_PShapesDataStructure.hxx>
+#include <NMTDS_ListOfPairBoolean.hxx>
+#include <NMTDS_ListIteratorOfListOfPairBoolean.hxx>
+#include <NMTDS_ShapesDataStructure.hxx>
+
+//=======================================================================
+//class : NMTDS_Iterator
+//purpose :
+//=======================================================================
+class NMTDS_Iterator {
+ public:
+ Standard_EXPORT
+ NMTDS_Iterator();
+
+ Standard_EXPORT
+ virtual ~NMTDS_Iterator();
+
+ Standard_EXPORT
+ void SetDS(const NMTDS_PShapesDataStructure& pDS) ;
+
+ Standard_EXPORT
+ const NMTDS_ShapesDataStructure& DS() const;
+
+ Standard_EXPORT
+ void Initialize(const TopAbs_ShapeEnum aType1,
+ const TopAbs_ShapeEnum aType2) ;
+
+ Standard_EXPORT
+ Standard_Boolean More() const;
+
+ Standard_EXPORT
+ void Next() ;
+
+ Standard_EXPORT
+ void Current(Standard_Integer& aIndex1,
+ Standard_Integer& aIndex2,
+ Standard_Boolean& aWithSubShape) const;
+
+ Standard_EXPORT
+ virtual void Prepare() ;
+
+ Standard_EXPORT
+ Standard_Integer ExpectedLength() const;
+
+ Standard_EXPORT
+ Standard_Integer BlockLength() const;
+
+ Standard_EXPORT
+ const TColStd_DataMapOfIntegerListOfInteger& SDVertices() const;
+
+ Standard_EXPORT
+ static void FillMVSD(const TColStd_DataMapOfIntegerListOfInteger& aMVSD1,
+ TColStd_DataMapOfIntegerListOfInteger& aMVSD2) ;
+
+protected:
+ Standard_EXPORT
+ virtual void Intersect() ;
+ //
+
+ NMTDS_PShapesDataStructure myDS;
+ NMTDS_ListOfPairBoolean myLists[6];
+ NMTDS_ListIteratorOfListOfPairBoolean myIterator;
+ NMTDS_ListOfPairBoolean myEmptyList;
+ Standard_Integer myLength;
+ TColStd_DataMapOfIntegerListOfInteger myMVSD;
+};
+
+#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_Iterator.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTDS_ShapesDataStructure_HeaderFile
-#include <NMTDS_ShapesDataStructure.hxx>
-#endif
-#ifndef _TColStd_DataMapOfIntegerListOfInteger_HeaderFile
-#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
-#endif
-#ifndef _NMTDS_Iterator_HeaderFile
-#include <NMTDS_Iterator.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- 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: NMTDS_IteratorCheckerSI.cdl
--- Created: Tue Feb 6 10:18:27 2007
--- Author: Peter KURNEV
---
-class IteratorCheckerSI from NMTDS
- inherits Iterator from NMTDS
-
- ---Purpose:
-
---uses
---raises
-
-is
- Create
- returns IteratorCheckerSI from NMTDS;
- ---C++: alias "Standard_EXPORT virtual ~NMTDS_IteratorCheckerSI();"
-
- Intersect(me:out)
- is redefined protected;
-
---fields
-end IteratorCheckerSI;
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_IteratorChecker.cxx
+// File: NMTDS_IteratorChecker.hxx
// Author: Peter KURNEV
-#include <NMTDS_IteratorCheckerSI.ixx>
+#include <NMTDS_IteratorCheckerSI.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <gp_Pnt.hxx>
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_IteratorChecker.cxx
+// Author: Peter KURNEV
+
#ifndef _NMTDS_IteratorCheckerSI_HeaderFile
#define _NMTDS_IteratorCheckerSI_HeaderFile
-#ifndef _NMTDS_Iterator_HeaderFile
-#include <NMTDS_Iterator.hxx>
-#endif
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
+#include <NMTDS_Iterator.hxx>
+//=======================================================================
+//class : NMTDS_IteratorCheckerSI
+//purpose :
+//=======================================================================
class NMTDS_IteratorCheckerSI : public NMTDS_Iterator {
-
-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 NMTDS_IteratorCheckerSI();
-Standard_EXPORT virtual ~NMTDS_IteratorCheckerSI();
-
-
-
-
+ public:
+
+ Standard_EXPORT
+ NMTDS_IteratorCheckerSI();
+ Standard_EXPORT
+ virtual ~NMTDS_IteratorCheckerSI();
protected:
-
- // Methods PROTECTED
- //
-
-
-Standard_EXPORT virtual void Intersect() ;
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+ Standard_EXPORT
+ virtual void Intersect() ;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 <NMTDS_IteratorCheckerSI.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 _NMTDS_IteratorCheckerSI_HeaderFile
-#include <NMTDS_IteratorCheckerSI.hxx>
-#endif
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#define _NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-
-#ifndef _Standard_Address_HeaderFile
-#include <Standard_Address.hxx>
-#endif
-#ifndef _Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#include <Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_NoMoreObject;
-class Standard_NoSuchObject;
-class NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors;
-class BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors;
-class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors {
-
-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 NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors();
-
-
-Standard_EXPORT NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& L);
-
-
-Standard_EXPORT void Initialize(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& L) ;
-
- Standard_Boolean More() const;
-
-
-Standard_EXPORT void Next() ;
+#ifndef NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
+#define NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& Value() const;
-
-
-friend class NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors;
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Address current;
-Standard_Address previous;
-
-
-};
-
-#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors
-#define Item_hxx <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_()
-#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_List_hxx <NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-
-#include <TCollection_ListIterator.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
+#ifndef NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
+#include <NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
+#endif
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-
-#ifndef _Standard_NoMoreObject_HeaderFile
-#include <Standard_NoMoreObject.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#include <NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#endif
-#ifndef _BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#endif
-#ifndef _NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#include <NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#endif
-
-
-#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors
-#define Item_hxx <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_()
-#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_List_hxx <NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#include <TCollection_ListIterator.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-\r
-#ifndef _NMTDS_ListIteratorOfListOfPair_HeaderFile\r
-#define _NMTDS_ListIteratorOfListOfPair_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_Macro_HeaderFile\r
-#include <Standard_Macro.hxx>\r
-#endif\r
-\r
-#ifndef _Standard_Address_HeaderFile\r
-#include <Standard_Address.hxx>\r
-#endif\r
-#ifndef _Handle_NMTDS_ListNodeOfListOfPair_HeaderFile\r
-#include <Handle_NMTDS_ListNodeOfListOfPair.hxx>\r
-#endif\r
-#ifndef _Standard_Boolean_HeaderFile\r
-#include <Standard_Boolean.hxx>\r
-#endif\r
-class Standard_NoMoreObject;\r
-class Standard_NoSuchObject;\r
-class NMTDS_ListOfPair;\r
-class NMTDS_Pair;\r
-class NMTDS_ListNodeOfListOfPair;\r
-\r
-\r
-\r
-class NMTDS_ListIteratorOfListOfPair {\r
-public:\r
-\r
- void* operator new(size_t,void* anAddress) \r
- {\r
- return anAddress;\r
- }\r
- void* operator new(size_t size) \r
- {\r
- return Standard::Allocate(size); \r
- }\r
- void operator delete(void *anAddress) \r
- {\r
- if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
- }\r
-\r
- \r
- Standard_EXPORT NMTDS_ListIteratorOfListOfPair();\r
- \r
- Standard_EXPORT NMTDS_ListIteratorOfListOfPair(const NMTDS_ListOfPair& L);\r
- \r
- Standard_EXPORT void Initialize(const NMTDS_ListOfPair& L) ;\r
- \r
- Standard_Boolean More() const;\r
- \r
- Standard_EXPORT void Next() ;\r
- \r
- Standard_EXPORT NMTDS_Pair& Value() const;\r
-\r
-\r
-friend class NMTDS_ListOfPair;\r
-\r
-\r
-\r
-protected:\r
-\r
-\r
-\r
-\r
-\r
-private:\r
-\r
-\r
-\r
-Standard_Address current;\r
-Standard_Address previous;\r
-\r
-\r
-};\r
-\r
-#define Item NMTDS_Pair\r
-#define Item_hxx <NMTDS_Pair.hxx>\r
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPair\r
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPair.hxx>\r
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPair\r
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPair.hxx>\r
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPair\r
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPair_Type_()\r
-#define TCollection_List NMTDS_ListOfPair\r
-#define TCollection_List_hxx <NMTDS_ListOfPair.hxx>\r
-\r
-#include <TCollection_ListIterator.lxx>\r
-\r
-#undef Item\r
-#undef Item_hxx\r
-#undef TCollection_ListNode\r
-#undef TCollection_ListNode_hxx\r
-#undef TCollection_ListIterator\r
-#undef TCollection_ListIterator_hxx\r
-#undef Handle_TCollection_ListNode\r
-#undef TCollection_ListNode_Type_\r
-#undef TCollection_List\r
-#undef TCollection_List_hxx\r
-\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+// File: NMTDS_ListIteratorOfListOfPair.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
+
+
+#ifndef NMTDS_ListIteratorOfListOfPair_HeaderFile
+#define NMTDS_ListIteratorOfListOfPair_HeaderFile
+
+#ifndef NMTDS_ListOfPair_HeaderFile
+#include <NMTDS_ListOfPair.hxx>
+#endif
+
+#endif
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-\r
-#ifndef _NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile\r
-#define _NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_Macro_HeaderFile\r
-#include <Standard_Macro.hxx>\r
-#endif\r
-\r
-#ifndef _Standard_Address_HeaderFile\r
-#include <Standard_Address.hxx>\r
-#endif\r
-#ifndef _Handle_NMTDS_ListNodeOfListOfPairBoolean_HeaderFile\r
-#include <Handle_NMTDS_ListNodeOfListOfPairBoolean.hxx>\r
-#endif\r
-#ifndef _Standard_Boolean_HeaderFile\r
-#include <Standard_Boolean.hxx>\r
-#endif\r
-class Standard_NoMoreObject;\r
-class Standard_NoSuchObject;\r
-class NMTDS_ListOfPairBoolean;\r
-class NMTDS_PairBoolean;\r
-class NMTDS_ListNodeOfListOfPairBoolean;\r
-\r
-\r
-\r
-class NMTDS_ListIteratorOfListOfPairBoolean {\r
-public:\r
-\r
- void* operator new(size_t,void* anAddress) \r
- {\r
- return anAddress;\r
- }\r
- void* operator new(size_t size) \r
- {\r
- return Standard::Allocate(size); \r
- }\r
- void operator delete(void *anAddress) \r
- {\r
- if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
- }\r
-\r
- \r
- Standard_EXPORT NMTDS_ListIteratorOfListOfPairBoolean();\r
- \r
- Standard_EXPORT NMTDS_ListIteratorOfListOfPairBoolean(const NMTDS_ListOfPairBoolean& L);\r
- \r
- Standard_EXPORT void Initialize(const NMTDS_ListOfPairBoolean& L) ;\r
- \r
- Standard_Boolean More() const;\r
- \r
- Standard_EXPORT void Next() ;\r
- \r
- Standard_EXPORT NMTDS_PairBoolean& Value() const;\r
-\r
-\r
-friend class NMTDS_ListOfPairBoolean;\r
-\r
-\r
-\r
-protected:\r
-\r
-\r
-\r
-\r
-\r
-private:\r
-\r
-\r
-\r
-Standard_Address current;\r
-Standard_Address previous;\r
-\r
-\r
-};\r
-\r
-#define Item NMTDS_PairBoolean\r
-#define Item_hxx <NMTDS_PairBoolean.hxx>\r
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPairBoolean\r
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPairBoolean.hxx>\r
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPairBoolean\r
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPairBoolean.hxx>\r
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPairBoolean\r
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPairBoolean_Type_()\r
-#define TCollection_List NMTDS_ListOfPairBoolean\r
-#define TCollection_List_hxx <NMTDS_ListOfPairBoolean.hxx>\r
-\r
-#include <TCollection_ListIterator.lxx>\r
-\r
-#undef Item\r
-#undef Item_hxx\r
-#undef TCollection_ListNode\r
-#undef TCollection_ListNode_hxx\r
-#undef TCollection_ListIterator\r
-#undef TCollection_ListIterator_hxx\r
-#undef Handle_TCollection_ListNode\r
-#undef TCollection_ListNode_Type_\r
-#undef TCollection_List\r
-#undef TCollection_List_hxx\r
-\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+// File: NMTDS_ListIteratorOfListOfPairBoolean.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
+
+
+#ifndef NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile
+#define NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile
+
+#ifndef NMTDS_ListOfPairBoolean_HeaderFile
+#include <NMTDS_ListOfPairBoolean.hxx>
+#endif
+
+#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <NMTDS_ListIteratorOfListOfPairBoolean.hxx>\r
-\r
-#ifndef _Standard_NoMoreObject_HeaderFile\r
-#include <Standard_NoMoreObject.hxx>\r
-#endif\r
-#ifndef _Standard_NoSuchObject_HeaderFile\r
-#include <Standard_NoSuchObject.hxx>\r
-#endif\r
-#ifndef _NMTDS_ListOfPairBoolean_HeaderFile\r
-#include <NMTDS_ListOfPairBoolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_PairBoolean_HeaderFile\r
-#include <NMTDS_PairBoolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_ListNodeOfListOfPairBoolean_HeaderFile\r
-#include <NMTDS_ListNodeOfListOfPairBoolean.hxx>\r
-#endif\r
- \r
-\r
-#define Item NMTDS_PairBoolean\r
-#define Item_hxx <NMTDS_PairBoolean.hxx>\r
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPairBoolean\r
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPairBoolean.hxx>\r
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPairBoolean\r
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPairBoolean.hxx>\r
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPairBoolean\r
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPairBoolean_Type_()\r
-#define TCollection_List NMTDS_ListOfPairBoolean\r
-#define TCollection_List_hxx <NMTDS_ListOfPairBoolean.hxx>\r
-#include <TCollection_ListIterator.gxx>\r
-\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <NMTDS_ListIteratorOfListOfPair.hxx>\r
-\r
-#ifndef _Standard_NoMoreObject_HeaderFile\r
-#include <Standard_NoMoreObject.hxx>\r
-#endif\r
-#ifndef _Standard_NoSuchObject_HeaderFile\r
-#include <Standard_NoSuchObject.hxx>\r
-#endif\r
-#ifndef _NMTDS_ListOfPair_HeaderFile\r
-#include <NMTDS_ListOfPair.hxx>\r
-#endif\r
-#ifndef _NMTDS_Pair_HeaderFile\r
-#include <NMTDS_Pair.hxx>\r
-#endif\r
-#ifndef _NMTDS_ListNodeOfListOfPair_HeaderFile\r
-#include <NMTDS_ListNodeOfListOfPair.hxx>\r
-#endif\r
- \r
-\r
-#define Item NMTDS_Pair\r
-#define Item_hxx <NMTDS_Pair.hxx>\r
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPair\r
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPair.hxx>\r
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPair\r
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPair.hxx>\r
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPair\r
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPair_Type_()\r
-#define TCollection_List NMTDS_ListOfPair\r
-#define TCollection_List_hxx <NMTDS_ListOfPair.hxx>\r
-#include <TCollection_ListIterator.gxx>\r
-\r
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_ListIteratorOfListOfPassKey.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTDS_ListIteratorOfListOfPassKey_HeaderFile
-#define _NMTDS_ListIteratorOfListOfPassKey_HeaderFile
-
-#ifndef _Standard_Address_HeaderFile
-#include <Standard_Address.hxx>
-#endif
-#ifndef _Handle_NMTDS_ListNodeOfListOfPassKey_HeaderFile
-#include <Handle_NMTDS_ListNodeOfListOfPassKey.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_NoMoreObject;
-class Standard_NoSuchObject;
-class NMTDS_ListOfPassKey;
-class NMTDS_PassKey;
-class NMTDS_ListNodeOfListOfPassKey;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTDS_ListIteratorOfListOfPassKey {
-
-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 NMTDS_ListIteratorOfListOfPassKey();
-
-
-Standard_EXPORT NMTDS_ListIteratorOfListOfPassKey(const NMTDS_ListOfPassKey& L);
-
-
-Standard_EXPORT void Initialize(const NMTDS_ListOfPassKey& L) ;
-
- Standard_Boolean More() const;
-
-
-Standard_EXPORT void Next() ;
+#ifndef NMTDS_ListIteratorOfListOfPassKey_HeaderFile
+#define NMTDS_ListIteratorOfListOfPassKey_HeaderFile
-Standard_EXPORT NMTDS_PassKey& Value() const;
-
-
-friend class NMTDS_ListOfPassKey;
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Address current;
-Standard_Address previous;
-
-
-};
-
-#define Item NMTDS_PassKey
-#define Item_hxx <NMTDS_PassKey.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKey
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPassKey.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKey
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPassKey.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKey
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKey_Type_()
-#define TCollection_List NMTDS_ListOfPassKey
-#define TCollection_List_hxx <NMTDS_ListOfPassKey.hxx>
-
-#include <TCollection_ListIterator.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
+#ifndef NMTDS_ListOfPassKey_HeaderFile
+#include <NMTDS_ListOfPassKey.hxx>
+#endif
#endif
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile
-#define _NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile
-
-#ifndef _Standard_Address_HeaderFile
-#include <Standard_Address.hxx>
-#endif
-#ifndef _Handle_NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile
-#include <Handle_NMTDS_ListNodeOfListOfPassKeyBoolean.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_NoMoreObject;
-class Standard_NoSuchObject;
-class NMTDS_ListOfPassKeyBoolean;
-class NMTDS_PassKeyBoolean;
-class NMTDS_ListNodeOfListOfPassKeyBoolean;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTDS_ListIteratorOfListOfPassKeyBoolean {
-
-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 NMTDS_ListIteratorOfListOfPassKeyBoolean();
-
-
-Standard_EXPORT NMTDS_ListIteratorOfListOfPassKeyBoolean(const NMTDS_ListOfPassKeyBoolean& L);
-
-
-Standard_EXPORT void Initialize(const NMTDS_ListOfPassKeyBoolean& L) ;
-
- Standard_Boolean More() const;
-
-
-Standard_EXPORT void Next() ;
+#ifndef NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile
+#define NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile
-Standard_EXPORT NMTDS_PassKeyBoolean& Value() const;
-
-
-friend class NMTDS_ListOfPassKeyBoolean;
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Address current;
-Standard_Address previous;
-
-
-};
-
-#define Item NMTDS_PassKeyBoolean
-#define Item_hxx <NMTDS_PassKeyBoolean.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKeyBoolean
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPassKeyBoolean.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKeyBoolean
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKeyBoolean
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKeyBoolean_Type_()
-#define TCollection_List NMTDS_ListOfPassKeyBoolean
-#define TCollection_List_hxx <NMTDS_ListOfPassKeyBoolean.hxx>
-
-#include <TCollection_ListIterator.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
+#ifndef NMTDS_ListOfPassKeyBoolean_HeaderFile
+#include <NMTDS_ListOfPassKeyBoolean.hxx>
+#endif
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx>
-
-#ifndef _Standard_NoMoreObject_HeaderFile
-#include <Standard_NoMoreObject.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _NMTDS_ListOfPassKeyBoolean_HeaderFile
-#include <NMTDS_ListOfPassKeyBoolean.hxx>
-#endif
-#ifndef _NMTDS_PassKeyBoolean_HeaderFile
-#include <NMTDS_PassKeyBoolean.hxx>
-#endif
-#ifndef _NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile
-#include <NMTDS_ListNodeOfListOfPassKeyBoolean.hxx>
-#endif
-
-
-#define Item NMTDS_PassKeyBoolean
-#define Item_hxx <NMTDS_PassKeyBoolean.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKeyBoolean
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPassKeyBoolean.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKeyBoolean
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKeyBoolean
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKeyBoolean_Type_()
-#define TCollection_List NMTDS_ListOfPassKeyBoolean
-#define TCollection_List_hxx <NMTDS_ListOfPassKeyBoolean.hxx>
-#include <TCollection_ListIterator.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_ListIteratorOfListOfPassKey.hxx>
-
-#ifndef _Standard_NoMoreObject_HeaderFile
-#include <Standard_NoMoreObject.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _NMTDS_ListOfPassKey_HeaderFile
-#include <NMTDS_ListOfPassKey.hxx>
-#endif
-#ifndef _NMTDS_PassKey_HeaderFile
-#include <NMTDS_PassKey.hxx>
-#endif
-#ifndef _NMTDS_ListNodeOfListOfPassKey_HeaderFile
-#include <NMTDS_ListNodeOfListOfPassKey.hxx>
-#endif
-
-
-#define Item NMTDS_PassKey
-#define Item_hxx <NMTDS_PassKey.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKey
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPassKey.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKey
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPassKey.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKey
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKey_Type_()
-#define TCollection_List NMTDS_ListOfPassKey
-#define TCollection_List_hxx <NMTDS_ListOfPassKey.hxx>
-#include <TCollection_ListIterator.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#define _NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#include <Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#endif
-
-#ifndef _BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-class BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors;
-class NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors;
-class NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors;
-
-
-
-class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,const TCollection_MapNodePtr& n);
-
- BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& Value() const;
-//Standard_EXPORT ~NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors myValue;
-
-
-};
-
-#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors
-#define Item_hxx <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_()
-#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_List_hxx <NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-
-#include <TCollection_ListNode.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#endif
-#ifndef _NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#include <NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#endif
-#ifndef _NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#include <NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#endif
-//NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::~NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors",
- sizeof(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors))) {
- _anOtherObject = Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)((Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::DynamicType() const
-{
- return STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) ;
-}
-//Standard_Boolean NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::~Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors() {}
-#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors
-#define Item_hxx <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_()
-#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_List_hxx <NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#include <TCollection_ListNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#ifndef _NMTDS_ListNodeOfListOfPair_HeaderFile\r
-#define _NMTDS_ListNodeOfListOfPair_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_DefineHandle_HeaderFile\r
-#include <Standard_DefineHandle.hxx>\r
-#endif\r
-#ifndef _Handle_NMTDS_ListNodeOfListOfPair_HeaderFile\r
-#include <Handle_NMTDS_ListNodeOfListOfPair.hxx>\r
-#endif\r
-\r
-#ifndef _NMTDS_Pair_HeaderFile\r
-#include <NMTDS_Pair.hxx>\r
-#endif\r
-#ifndef _TCollection_MapNode_HeaderFile\r
-#include <TCollection_MapNode.hxx>\r
-#endif\r
-#ifndef _TCollection_MapNodePtr_HeaderFile\r
-#include <TCollection_MapNodePtr.hxx>\r
-#endif\r
-class NMTDS_Pair;\r
-class NMTDS_ListOfPair;\r
-class NMTDS_ListIteratorOfListOfPair;\r
-\r
-\r
-\r
-class NMTDS_ListNodeOfListOfPair : public TCollection_MapNode {\r
-\r
-public:\r
-\r
- \r
- NMTDS_ListNodeOfListOfPair(const NMTDS_Pair& I,const TCollection_MapNodePtr& n);\r
- \r
- NMTDS_Pair& Value() const;\r
-\r
-\r
-\r
-\r
- DEFINE_STANDARD_RTTI(NMTDS_ListNodeOfListOfPair)\r
-\r
-protected:\r
-\r
-\r
-\r
-\r
-private: \r
-\r
-\r
-NMTDS_Pair myValue;\r
-\r
-\r
-};\r
-\r
-#define Item NMTDS_Pair\r
-#define Item_hxx <NMTDS_Pair.hxx>\r
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPair\r
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPair.hxx>\r
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPair\r
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPair.hxx>\r
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPair\r
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPair_Type_()\r
-#define TCollection_List NMTDS_ListOfPair\r
-#define TCollection_List_hxx <NMTDS_ListOfPair.hxx>\r
-\r
-#include <TCollection_ListNode.lxx>\r
-\r
-#undef Item\r
-#undef Item_hxx\r
-#undef TCollection_ListNode\r
-#undef TCollection_ListNode_hxx\r
-#undef TCollection_ListIterator\r
-#undef TCollection_ListIterator_hxx\r
-#undef Handle_TCollection_ListNode\r
-#undef TCollection_ListNode_Type_\r
-#undef TCollection_List\r
-#undef TCollection_List_hxx\r
-\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#ifndef _NMTDS_ListNodeOfListOfPairBoolean_HeaderFile\r
-#define _NMTDS_ListNodeOfListOfPairBoolean_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_DefineHandle_HeaderFile\r
-#include <Standard_DefineHandle.hxx>\r
-#endif\r
-#ifndef _Handle_NMTDS_ListNodeOfListOfPairBoolean_HeaderFile\r
-#include <Handle_NMTDS_ListNodeOfListOfPairBoolean.hxx>\r
-#endif\r
-\r
-#ifndef _NMTDS_PairBoolean_HeaderFile\r
-#include <NMTDS_PairBoolean.hxx>\r
-#endif\r
-#ifndef _TCollection_MapNode_HeaderFile\r
-#include <TCollection_MapNode.hxx>\r
-#endif\r
-#ifndef _TCollection_MapNodePtr_HeaderFile\r
-#include <TCollection_MapNodePtr.hxx>\r
-#endif\r
-class NMTDS_PairBoolean;\r
-class NMTDS_ListOfPairBoolean;\r
-class NMTDS_ListIteratorOfListOfPairBoolean;\r
-\r
-\r
-\r
-class NMTDS_ListNodeOfListOfPairBoolean : public TCollection_MapNode {\r
-\r
-public:\r
-\r
- \r
- NMTDS_ListNodeOfListOfPairBoolean(const NMTDS_PairBoolean& I,const TCollection_MapNodePtr& n);\r
- \r
- NMTDS_PairBoolean& Value() const;\r
-\r
-\r
-\r
-\r
- DEFINE_STANDARD_RTTI(NMTDS_ListNodeOfListOfPairBoolean)\r
-\r
-protected:\r
-\r
-\r
-\r
-\r
-private: \r
-\r
-\r
-NMTDS_PairBoolean myValue;\r
-\r
-\r
-};\r
-\r
-#define Item NMTDS_PairBoolean\r
-#define Item_hxx <NMTDS_PairBoolean.hxx>\r
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPairBoolean\r
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPairBoolean.hxx>\r
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPairBoolean\r
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPairBoolean.hxx>\r
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPairBoolean\r
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPairBoolean_Type_()\r
-#define TCollection_List NMTDS_ListOfPairBoolean\r
-#define TCollection_List_hxx <NMTDS_ListOfPairBoolean.hxx>\r
-\r
-#include <TCollection_ListNode.lxx>\r
-\r
-#undef Item\r
-#undef Item_hxx\r
-#undef TCollection_ListNode\r
-#undef TCollection_ListNode_hxx\r
-#undef TCollection_ListIterator\r
-#undef TCollection_ListIterator_hxx\r
-#undef Handle_TCollection_ListNode\r
-#undef TCollection_ListNode_Type_\r
-#undef TCollection_List\r
-#undef TCollection_List_hxx\r
-\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <NMTDS_ListNodeOfListOfPairBoolean.hxx>\r
-\r
-#ifndef _Standard_Type_HeaderFile\r
-#include <Standard_Type.hxx>\r
-#endif\r
-\r
-#ifndef _NMTDS_PairBoolean_HeaderFile\r
-#include <NMTDS_PairBoolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_ListOfPairBoolean_HeaderFile\r
-#include <NMTDS_ListOfPairBoolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile\r
-#include <NMTDS_ListIteratorOfListOfPairBoolean.hxx>\r
-#endif\r
-\r
- \r
-\r
-\r
-IMPLEMENT_STANDARD_TYPE(NMTDS_ListNodeOfListOfPairBoolean)\r
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()\r
- STANDARD_TYPE(TCollection_MapNode),\r
- STANDARD_TYPE(MMgt_TShared),\r
- STANDARD_TYPE(Standard_Transient),\r
-\r
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()\r
-IMPLEMENT_STANDARD_TYPE_END(NMTDS_ListNodeOfListOfPairBoolean)\r
-\r
-\r
-IMPLEMENT_DOWNCAST(NMTDS_ListNodeOfListOfPairBoolean,Standard_Transient)\r
-IMPLEMENT_STANDARD_RTTI(NMTDS_ListNodeOfListOfPairBoolean)\r
-\r
-\r
-#define Item NMTDS_PairBoolean\r
-#define Item_hxx <NMTDS_PairBoolean.hxx>\r
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPairBoolean\r
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPairBoolean.hxx>\r
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPairBoolean\r
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPairBoolean.hxx>\r
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPairBoolean\r
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPairBoolean_Type_()\r
-#define TCollection_List NMTDS_ListOfPairBoolean\r
-#define TCollection_List_hxx <NMTDS_ListOfPairBoolean.hxx>\r
-#include <TCollection_ListNode.gxx>\r
-\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <NMTDS_ListNodeOfListOfPair.hxx>\r
-\r
-#ifndef _Standard_Type_HeaderFile\r
-#include <Standard_Type.hxx>\r
-#endif\r
-\r
-#ifndef _NMTDS_Pair_HeaderFile\r
-#include <NMTDS_Pair.hxx>\r
-#endif\r
-#ifndef _NMTDS_ListOfPair_HeaderFile\r
-#include <NMTDS_ListOfPair.hxx>\r
-#endif\r
-#ifndef _NMTDS_ListIteratorOfListOfPair_HeaderFile\r
-#include <NMTDS_ListIteratorOfListOfPair.hxx>\r
-#endif\r
-\r
- \r
-\r
-\r
-IMPLEMENT_STANDARD_TYPE(NMTDS_ListNodeOfListOfPair)\r
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()\r
- STANDARD_TYPE(TCollection_MapNode),\r
- STANDARD_TYPE(MMgt_TShared),\r
- STANDARD_TYPE(Standard_Transient),\r
-\r
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()\r
-IMPLEMENT_STANDARD_TYPE_END(NMTDS_ListNodeOfListOfPair)\r
-\r
-\r
-IMPLEMENT_DOWNCAST(NMTDS_ListNodeOfListOfPair,Standard_Transient)\r
-IMPLEMENT_STANDARD_RTTI(NMTDS_ListNodeOfListOfPair)\r
-\r
-\r
-#define Item NMTDS_Pair\r
-#define Item_hxx <NMTDS_Pair.hxx>\r
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPair\r
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPair.hxx>\r
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPair\r
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPair.hxx>\r
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPair\r
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPair_Type_()\r
-#define TCollection_List NMTDS_ListOfPair\r
-#define TCollection_List_hxx <NMTDS_ListOfPair.hxx>\r
-#include <TCollection_ListNode.gxx>\r
-\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTDS_ListNodeOfListOfPassKey_HeaderFile
-#define _NMTDS_ListNodeOfListOfPassKey_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTDS_ListNodeOfListOfPassKey_HeaderFile
-#include <Handle_NMTDS_ListNodeOfListOfPassKey.hxx>
-#endif
-
-#ifndef _NMTDS_PassKey_HeaderFile
-#include <NMTDS_PassKey.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-class NMTDS_PassKey;
-class NMTDS_ListOfPassKey;
-class NMTDS_ListIteratorOfListOfPassKey;
-
-
-
-class NMTDS_ListNodeOfListOfPassKey : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTDS_ListNodeOfListOfPassKey(const NMTDS_PassKey& I,const TCollection_MapNodePtr& n);
-
- NMTDS_PassKey& Value() const;
-//Standard_EXPORT ~NMTDS_ListNodeOfListOfPassKey();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-NMTDS_PassKey myValue;
-
-
-};
-
-#define Item NMTDS_PassKey
-#define Item_hxx <NMTDS_PassKey.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKey
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPassKey.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKey
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPassKey.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKey
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKey_Type_()
-#define TCollection_List NMTDS_ListOfPassKey
-#define TCollection_List_hxx <NMTDS_ListOfPassKey.hxx>
-
-#include <TCollection_ListNode.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile
-#define _NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile
-#include <Handle_NMTDS_ListNodeOfListOfPassKeyBoolean.hxx>
-#endif
-
-#ifndef _NMTDS_PassKeyBoolean_HeaderFile
-#include <NMTDS_PassKeyBoolean.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-class NMTDS_PassKeyBoolean;
-class NMTDS_ListOfPassKeyBoolean;
-class NMTDS_ListIteratorOfListOfPassKeyBoolean;
-
-
-
-class NMTDS_ListNodeOfListOfPassKeyBoolean : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTDS_ListNodeOfListOfPassKeyBoolean(const NMTDS_PassKeyBoolean& I,const TCollection_MapNodePtr& n);
-
- NMTDS_PassKeyBoolean& Value() const;
-//Standard_EXPORT ~NMTDS_ListNodeOfListOfPassKeyBoolean();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-NMTDS_PassKeyBoolean myValue;
-
-
-};
-
-#define Item NMTDS_PassKeyBoolean
-#define Item_hxx <NMTDS_PassKeyBoolean.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKeyBoolean
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPassKeyBoolean.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKeyBoolean
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKeyBoolean
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKeyBoolean_Type_()
-#define TCollection_List NMTDS_ListOfPassKeyBoolean
-#define TCollection_List_hxx <NMTDS_ListOfPassKeyBoolean.hxx>
-
-#include <TCollection_ListNode.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_ListNodeOfListOfPassKeyBoolean.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _NMTDS_PassKeyBoolean_HeaderFile
-#include <NMTDS_PassKeyBoolean.hxx>
-#endif
-#ifndef _NMTDS_ListOfPassKeyBoolean_HeaderFile
-#include <NMTDS_ListOfPassKeyBoolean.hxx>
-#endif
-#ifndef _NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile
-#include <NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx>
-#endif
-//NMTDS_ListNodeOfListOfPassKeyBoolean::~NMTDS_ListNodeOfListOfPassKeyBoolean() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTDS_ListNodeOfListOfPassKeyBoolean_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTDS_ListNodeOfListOfPassKeyBoolean",
- sizeof(NMTDS_ListNodeOfListOfPassKeyBoolean),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTDS_ListNodeOfListOfPassKeyBoolean) Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTDS_ListNodeOfListOfPassKeyBoolean) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTDS_ListNodeOfListOfPassKeyBoolean))) {
- _anOtherObject = Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)((Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTDS_ListNodeOfListOfPassKeyBoolean::DynamicType() const
-{
- return STANDARD_TYPE(NMTDS_ListNodeOfListOfPassKeyBoolean) ;
-}
-//Standard_Boolean NMTDS_ListNodeOfListOfPassKeyBoolean::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTDS_ListNodeOfListOfPassKeyBoolean) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTDS_ListNodeOfListOfPassKeyBoolean::~Handle_NMTDS_ListNodeOfListOfPassKeyBoolean() {}
-#define Item NMTDS_PassKeyBoolean
-#define Item_hxx <NMTDS_PassKeyBoolean.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKeyBoolean
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPassKeyBoolean.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKeyBoolean
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKeyBoolean
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKeyBoolean_Type_()
-#define TCollection_List NMTDS_ListOfPassKeyBoolean
-#define TCollection_List_hxx <NMTDS_ListOfPassKeyBoolean.hxx>
-#include <TCollection_ListNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_ListNodeOfListOfPassKey.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _NMTDS_PassKey_HeaderFile
-#include <NMTDS_PassKey.hxx>
-#endif
-#ifndef _NMTDS_ListOfPassKey_HeaderFile
-#include <NMTDS_ListOfPassKey.hxx>
-#endif
-#ifndef _NMTDS_ListIteratorOfListOfPassKey_HeaderFile
-#include <NMTDS_ListIteratorOfListOfPassKey.hxx>
-#endif
-//NMTDS_ListNodeOfListOfPassKey::~NMTDS_ListNodeOfListOfPassKey() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTDS_ListNodeOfListOfPassKey_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTDS_ListNodeOfListOfPassKey",
- sizeof(NMTDS_ListNodeOfListOfPassKey),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTDS_ListNodeOfListOfPassKey) Handle(NMTDS_ListNodeOfListOfPassKey)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTDS_ListNodeOfListOfPassKey) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTDS_ListNodeOfListOfPassKey))) {
- _anOtherObject = Handle(NMTDS_ListNodeOfListOfPassKey)((Handle(NMTDS_ListNodeOfListOfPassKey)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTDS_ListNodeOfListOfPassKey::DynamicType() const
-{
- return STANDARD_TYPE(NMTDS_ListNodeOfListOfPassKey) ;
-}
-//Standard_Boolean NMTDS_ListNodeOfListOfPassKey::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTDS_ListNodeOfListOfPassKey) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTDS_ListNodeOfListOfPassKey::~Handle_NMTDS_ListNodeOfListOfPassKey() {}
-#define Item NMTDS_PassKey
-#define Item_hxx <NMTDS_PassKey.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKey
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPassKey.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKey
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPassKey.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKey
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKey_Type_()
-#define TCollection_List NMTDS_ListOfPassKey
-#define TCollection_List_hxx <NMTDS_ListOfPassKey.hxx>
-#include <TCollection_ListNode.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#define _NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-
-#ifndef _Standard_Address_HeaderFile
-#include <Standard_Address.hxx>
-#endif
-#ifndef _Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#include <Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_NoSuchObject;
-class NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors;
-class BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors;
-class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors {
-
-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 NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors();
-
-
-Standard_EXPORT void Assign(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other) ;
- void operator=(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other)
-{
- Assign(Other);
-}
-
-
-
-Standard_EXPORT Standard_Integer Extent() const;
-
-
-Standard_EXPORT void Clear() ;
-~NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors()
-{
- Clear();
-}
-
-
- Standard_Boolean IsEmpty() const;
-
-
-Standard_EXPORT void Prepend(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I) ;
-
-
-Standard_EXPORT void Prepend(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& theIt) ;
-
-
-Standard_EXPORT void Prepend(NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other) ;
-
-
-Standard_EXPORT void Append(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I) ;
-
-
-Standard_EXPORT void Append(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& theIt) ;
-
-
-Standard_EXPORT void Append(NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other) ;
+#ifndef NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
+#define NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& First() const;
-
-
-Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& Last() const;
-
-
-Standard_EXPORT void RemoveFirst() ;
-
-
-Standard_EXPORT void Remove(NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ;
-
-
-Standard_EXPORT void InsertBefore(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ;
-
-
-Standard_EXPORT void InsertBefore(NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ;
-
-
-Standard_EXPORT void InsertAfter(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ;
-
-
-Standard_EXPORT void InsertAfter(NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ;
-
-
-friend class NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors;
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other);
-
-
- // Fields PRIVATE
- //
-Standard_Address myFirst;
-Standard_Address myLast;
-
-
-};
-
-#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors
-#define Item_hxx <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_()
-#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_List_hxx <NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-
-#include <TCollection_List.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
+#include <NCollection_List.hxx>
+#include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
+typedef NCollection_List<BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors> NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors;
+typedef NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors::Iterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors;
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#include <NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#endif
-#ifndef _BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#endif
-#ifndef _NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#include <NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#endif
-
-
-#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors
-#define Item_hxx <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_()
-#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors
-#define TCollection_List_hxx <NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#include <TCollection_List.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-\r
-#ifndef _NMTDS_ListOfPair_HeaderFile\r
-#define _NMTDS_ListOfPair_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_Macro_HeaderFile\r
-#include <Standard_Macro.hxx>\r
-#endif\r
-\r
-#ifndef _Standard_Address_HeaderFile\r
-#include <Standard_Address.hxx>\r
-#endif\r
-#ifndef _Handle_NMTDS_ListNodeOfListOfPair_HeaderFile\r
-#include <Handle_NMTDS_ListNodeOfListOfPair.hxx>\r
-#endif\r
-#ifndef _Standard_Integer_HeaderFile\r
-#include <Standard_Integer.hxx>\r
-#endif\r
-#ifndef _Standard_Boolean_HeaderFile\r
-#include <Standard_Boolean.hxx>\r
-#endif\r
-class Standard_NoSuchObject;\r
-class NMTDS_ListIteratorOfListOfPair;\r
-class NMTDS_Pair;\r
-class NMTDS_ListNodeOfListOfPair;\r
-\r
-\r
-\r
-class NMTDS_ListOfPair {\r
-public:\r
-\r
- void* operator new(size_t,void* anAddress) \r
- {\r
- return anAddress;\r
- }\r
- void* operator new(size_t size) \r
- {\r
- return Standard::Allocate(size); \r
- }\r
- void operator delete(void *anAddress) \r
- {\r
- if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
- }\r
-\r
- \r
- Standard_EXPORT NMTDS_ListOfPair();\r
- \r
- Standard_EXPORT void Assign(const NMTDS_ListOfPair& Other) ;\r
- void operator=(const NMTDS_ListOfPair& Other) \r
-{\r
- Assign(Other);\r
-}\r
- \r
- Standard_EXPORT Standard_Integer Extent() const;\r
- \r
- Standard_EXPORT void Clear() ;\r
-~NMTDS_ListOfPair()\r
-{\r
- Clear();\r
-}\r
- \r
- Standard_Boolean IsEmpty() const;\r
- \r
- Standard_EXPORT void Prepend(const NMTDS_Pair& I) ;\r
- \r
- Standard_EXPORT void Prepend(const NMTDS_Pair& I,NMTDS_ListIteratorOfListOfPair& theIt) ;\r
- \r
- Standard_EXPORT void Prepend(NMTDS_ListOfPair& Other) ;\r
- \r
- Standard_EXPORT void Append(const NMTDS_Pair& I) ;\r
- \r
- Standard_EXPORT void Append(const NMTDS_Pair& I,NMTDS_ListIteratorOfListOfPair& theIt) ;\r
- \r
- Standard_EXPORT void Append(NMTDS_ListOfPair& Other) ;\r
- \r
- Standard_EXPORT NMTDS_Pair& First() const;\r
- \r
- Standard_EXPORT NMTDS_Pair& Last() const;\r
- \r
- Standard_EXPORT void RemoveFirst() ;\r
- \r
- Standard_EXPORT void Remove(NMTDS_ListIteratorOfListOfPair& It) ;\r
- \r
- Standard_EXPORT void InsertBefore(const NMTDS_Pair& I,NMTDS_ListIteratorOfListOfPair& It) ;\r
- \r
- Standard_EXPORT void InsertBefore(NMTDS_ListOfPair& Other,NMTDS_ListIteratorOfListOfPair& It) ;\r
- \r
- Standard_EXPORT void InsertAfter(const NMTDS_Pair& I,NMTDS_ListIteratorOfListOfPair& It) ;\r
- \r
- Standard_EXPORT void InsertAfter(NMTDS_ListOfPair& Other,NMTDS_ListIteratorOfListOfPair& It) ;\r
-\r
-\r
-friend class NMTDS_ListIteratorOfListOfPair;\r
-\r
-\r
-\r
-protected:\r
-\r
-\r
-\r
-\r
-\r
-private:\r
-\r
- \r
- Standard_EXPORT NMTDS_ListOfPair(const NMTDS_ListOfPair& Other);\r
-\r
-\r
-Standard_Address myFirst;\r
-Standard_Address myLast;\r
-\r
-\r
-};\r
-\r
-#define Item NMTDS_Pair\r
-#define Item_hxx <NMTDS_Pair.hxx>\r
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPair\r
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPair.hxx>\r
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPair\r
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPair.hxx>\r
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPair\r
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPair_Type_()\r
-#define TCollection_List NMTDS_ListOfPair\r
-#define TCollection_List_hxx <NMTDS_ListOfPair.hxx>\r
-\r
-#include <TCollection_List.lxx>\r
-\r
-#undef Item\r
-#undef Item_hxx\r
-#undef TCollection_ListNode\r
-#undef TCollection_ListNode_hxx\r
-#undef TCollection_ListIterator\r
-#undef TCollection_ListIterator_hxx\r
-#undef Handle_TCollection_ListNode\r
-#undef TCollection_ListNode_Type_\r
-#undef TCollection_List\r
-#undef TCollection_List_hxx\r
-\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+// File: NMTDS_ListOfPair.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
+
+
+#ifndef NMTDS_ListOfPair_HeaderFile
+#define NMTDS_ListOfPair_HeaderFile
+
+#include <NCollection_List.hxx>
+#include <NMTDS_Pair.hxx>
+
+typedef NCollection_List<NMTDS_Pair> NMTDS_ListOfPair;
+typedef NMTDS_ListOfPair::Iterator NMTDS_ListIteratorOfListOfPair;
+
+#endif
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-\r
-#ifndef _NMTDS_ListOfPairBoolean_HeaderFile\r
-#define _NMTDS_ListOfPairBoolean_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_Macro_HeaderFile\r
-#include <Standard_Macro.hxx>\r
-#endif\r
-\r
-#ifndef _Standard_Address_HeaderFile\r
-#include <Standard_Address.hxx>\r
-#endif\r
-#ifndef _Handle_NMTDS_ListNodeOfListOfPairBoolean_HeaderFile\r
-#include <Handle_NMTDS_ListNodeOfListOfPairBoolean.hxx>\r
-#endif\r
-#ifndef _Standard_Integer_HeaderFile\r
-#include <Standard_Integer.hxx>\r
-#endif\r
-#ifndef _Standard_Boolean_HeaderFile\r
-#include <Standard_Boolean.hxx>\r
-#endif\r
-class Standard_NoSuchObject;\r
-class NMTDS_ListIteratorOfListOfPairBoolean;\r
-class NMTDS_PairBoolean;\r
-class NMTDS_ListNodeOfListOfPairBoolean;\r
-\r
-\r
-\r
-class NMTDS_ListOfPairBoolean {\r
-public:\r
-\r
- void* operator new(size_t,void* anAddress) \r
- {\r
- return anAddress;\r
- }\r
- void* operator new(size_t size) \r
- {\r
- return Standard::Allocate(size); \r
- }\r
- void operator delete(void *anAddress) \r
- {\r
- if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
- }\r
-\r
- \r
- Standard_EXPORT NMTDS_ListOfPairBoolean();\r
- \r
- Standard_EXPORT void Assign(const NMTDS_ListOfPairBoolean& Other) ;\r
- void operator=(const NMTDS_ListOfPairBoolean& Other) \r
-{\r
- Assign(Other);\r
-}\r
- \r
- Standard_EXPORT Standard_Integer Extent() const;\r
- \r
- Standard_EXPORT void Clear() ;\r
-~NMTDS_ListOfPairBoolean()\r
-{\r
- Clear();\r
-}\r
- \r
- Standard_Boolean IsEmpty() const;\r
- \r
- Standard_EXPORT void Prepend(const NMTDS_PairBoolean& I) ;\r
- \r
- Standard_EXPORT void Prepend(const NMTDS_PairBoolean& I,NMTDS_ListIteratorOfListOfPairBoolean& theIt) ;\r
- \r
- Standard_EXPORT void Prepend(NMTDS_ListOfPairBoolean& Other) ;\r
- \r
- Standard_EXPORT void Append(const NMTDS_PairBoolean& I) ;\r
- \r
- Standard_EXPORT void Append(const NMTDS_PairBoolean& I,NMTDS_ListIteratorOfListOfPairBoolean& theIt) ;\r
- \r
- Standard_EXPORT void Append(NMTDS_ListOfPairBoolean& Other) ;\r
- \r
- Standard_EXPORT NMTDS_PairBoolean& First() const;\r
- \r
- Standard_EXPORT NMTDS_PairBoolean& Last() const;\r
- \r
- Standard_EXPORT void RemoveFirst() ;\r
- \r
- Standard_EXPORT void Remove(NMTDS_ListIteratorOfListOfPairBoolean& It) ;\r
- \r
- Standard_EXPORT void InsertBefore(const NMTDS_PairBoolean& I,NMTDS_ListIteratorOfListOfPairBoolean& It) ;\r
- \r
- Standard_EXPORT void InsertBefore(NMTDS_ListOfPairBoolean& Other,NMTDS_ListIteratorOfListOfPairBoolean& It) ;\r
- \r
- Standard_EXPORT void InsertAfter(const NMTDS_PairBoolean& I,NMTDS_ListIteratorOfListOfPairBoolean& It) ;\r
- \r
- Standard_EXPORT void InsertAfter(NMTDS_ListOfPairBoolean& Other,NMTDS_ListIteratorOfListOfPairBoolean& It) ;\r
-\r
-\r
-friend class NMTDS_ListIteratorOfListOfPairBoolean;\r
-\r
-\r
-\r
-protected:\r
-\r
-\r
-\r
-\r
-\r
-private:\r
-\r
- \r
- Standard_EXPORT NMTDS_ListOfPairBoolean(const NMTDS_ListOfPairBoolean& Other);\r
-\r
-\r
-Standard_Address myFirst;\r
-Standard_Address myLast;\r
-\r
-\r
-};\r
-\r
-#define Item NMTDS_PairBoolean\r
-#define Item_hxx <NMTDS_PairBoolean.hxx>\r
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPairBoolean\r
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPairBoolean.hxx>\r
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPairBoolean\r
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPairBoolean.hxx>\r
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPairBoolean\r
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPairBoolean_Type_()\r
-#define TCollection_List NMTDS_ListOfPairBoolean\r
-#define TCollection_List_hxx <NMTDS_ListOfPairBoolean.hxx>\r
-\r
-#include <TCollection_List.lxx>\r
-\r
-#undef Item\r
-#undef Item_hxx\r
-#undef TCollection_ListNode\r
-#undef TCollection_ListNode_hxx\r
-#undef TCollection_ListIterator\r
-#undef TCollection_ListIterator_hxx\r
-#undef Handle_TCollection_ListNode\r
-#undef TCollection_ListNode_Type_\r
-#undef TCollection_List\r
-#undef TCollection_List_hxx\r
-\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+// File: NMTDS_ListOfPairBoolean.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
+
+
+#ifndef NMTDS_ListOfPairBoolean_HeaderFile
+#define NMTDS_ListOfPairBoolean_HeaderFile
+
+#include <NCollection_List.hxx>
+#include <NMTDS_PairBoolean.hxx>
+
+typedef NCollection_List<NMTDS_PairBoolean> NMTDS_ListOfPairBoolean;
+typedef NMTDS_ListOfPairBoolean::Iterator NMTDS_ListIteratorOfListOfPairBoolean;
+
+#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <NMTDS_ListOfPairBoolean.hxx>\r
-\r
-#ifndef _Standard_NoSuchObject_HeaderFile\r
-#include <Standard_NoSuchObject.hxx>\r
-#endif\r
-#ifndef _NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile\r
-#include <NMTDS_ListIteratorOfListOfPairBoolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_PairBoolean_HeaderFile\r
-#include <NMTDS_PairBoolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_ListNodeOfListOfPairBoolean_HeaderFile\r
-#include <NMTDS_ListNodeOfListOfPairBoolean.hxx>\r
-#endif\r
- \r
-\r
-#define Item NMTDS_PairBoolean\r
-#define Item_hxx <NMTDS_PairBoolean.hxx>\r
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPairBoolean\r
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPairBoolean.hxx>\r
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPairBoolean\r
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPairBoolean.hxx>\r
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPairBoolean\r
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPairBoolean_Type_()\r
-#define TCollection_List NMTDS_ListOfPairBoolean\r
-#define TCollection_List_hxx <NMTDS_ListOfPairBoolean.hxx>\r
-#include <TCollection_List.gxx>\r
-\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <NMTDS_ListOfPair.hxx>\r
-\r
-#ifndef _Standard_NoSuchObject_HeaderFile\r
-#include <Standard_NoSuchObject.hxx>\r
-#endif\r
-#ifndef _NMTDS_ListIteratorOfListOfPair_HeaderFile\r
-#include <NMTDS_ListIteratorOfListOfPair.hxx>\r
-#endif\r
-#ifndef _NMTDS_Pair_HeaderFile\r
-#include <NMTDS_Pair.hxx>\r
-#endif\r
-#ifndef _NMTDS_ListNodeOfListOfPair_HeaderFile\r
-#include <NMTDS_ListNodeOfListOfPair.hxx>\r
-#endif\r
- \r
-\r
-#define Item NMTDS_Pair\r
-#define Item_hxx <NMTDS_Pair.hxx>\r
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPair\r
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPair.hxx>\r
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPair\r
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPair.hxx>\r
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPair\r
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPair_Type_()\r
-#define TCollection_List NMTDS_ListOfPair\r
-#define TCollection_List_hxx <NMTDS_ListOfPair.hxx>\r
-#include <TCollection_List.gxx>\r
-\r
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_ListOfPassKey.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTDS_ListOfPassKey_HeaderFile
-#define _NMTDS_ListOfPassKey_HeaderFile
-
-#ifndef _Standard_Address_HeaderFile
-#include <Standard_Address.hxx>
-#endif
-#ifndef _Handle_NMTDS_ListNodeOfListOfPassKey_HeaderFile
-#include <Handle_NMTDS_ListNodeOfListOfPassKey.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_NoSuchObject;
-class NMTDS_ListIteratorOfListOfPassKey;
-class NMTDS_PassKey;
-class NMTDS_ListNodeOfListOfPassKey;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTDS_ListOfPassKey {
-
-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 NMTDS_ListOfPassKey();
-
-
-Standard_EXPORT void Assign(const NMTDS_ListOfPassKey& Other) ;
- void operator=(const NMTDS_ListOfPassKey& Other)
-{
- Assign(Other);
-}
-
-
-
-Standard_EXPORT Standard_Integer Extent() const;
-
-
-Standard_EXPORT void Clear() ;
-~NMTDS_ListOfPassKey()
-{
- Clear();
-}
-
-
- Standard_Boolean IsEmpty() const;
-
-
-Standard_EXPORT void Prepend(const NMTDS_PassKey& I) ;
-
-
-Standard_EXPORT void Prepend(const NMTDS_PassKey& I,NMTDS_ListIteratorOfListOfPassKey& theIt) ;
-
-
-Standard_EXPORT void Prepend(NMTDS_ListOfPassKey& Other) ;
-
-
-Standard_EXPORT void Append(const NMTDS_PassKey& I) ;
-
-
-Standard_EXPORT void Append(const NMTDS_PassKey& I,NMTDS_ListIteratorOfListOfPassKey& theIt) ;
-
-
-Standard_EXPORT void Append(NMTDS_ListOfPassKey& Other) ;
+#ifndef NMTDS_ListOfPassKey_HeaderFile
+#define NMTDS_ListOfPassKey_HeaderFile
-Standard_EXPORT NMTDS_PassKey& First() const;
-
-
-Standard_EXPORT NMTDS_PassKey& Last() const;
-
-
-Standard_EXPORT void RemoveFirst() ;
-
-
-Standard_EXPORT void Remove(NMTDS_ListIteratorOfListOfPassKey& It) ;
-
-
-Standard_EXPORT void InsertBefore(const NMTDS_PassKey& I,NMTDS_ListIteratorOfListOfPassKey& It) ;
-
-
-Standard_EXPORT void InsertBefore(NMTDS_ListOfPassKey& Other,NMTDS_ListIteratorOfListOfPassKey& It) ;
-
-
-Standard_EXPORT void InsertAfter(const NMTDS_PassKey& I,NMTDS_ListIteratorOfListOfPassKey& It) ;
-
-
-Standard_EXPORT void InsertAfter(NMTDS_ListOfPassKey& Other,NMTDS_ListIteratorOfListOfPassKey& It) ;
-
-
-friend class NMTDS_ListIteratorOfListOfPassKey;
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT NMTDS_ListOfPassKey(const NMTDS_ListOfPassKey& Other);
-
-
- // Fields PRIVATE
- //
-Standard_Address myFirst;
-Standard_Address myLast;
-
-
-};
-
-#define Item NMTDS_PassKey
-#define Item_hxx <NMTDS_PassKey.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKey
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPassKey.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKey
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPassKey.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKey
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKey_Type_()
-#define TCollection_List NMTDS_ListOfPassKey
-#define TCollection_List_hxx <NMTDS_ListOfPassKey.hxx>
-
-#include <TCollection_List.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
+#include <NCollection_List.hxx>
+#include <NMTDS_PassKey.hxx>
+typedef NCollection_List<NMTDS_PassKey> NMTDS_ListOfPassKey;
+typedef NMTDS_ListOfPassKey::Iterator NMTDS_ListIteratorOfListOfPassKey;
#endif
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_ListOfPassKeyBoolean.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTDS_ListOfPassKeyBoolean_HeaderFile
-#define _NMTDS_ListOfPassKeyBoolean_HeaderFile
-
-#ifndef _Standard_Address_HeaderFile
-#include <Standard_Address.hxx>
-#endif
-#ifndef _Handle_NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile
-#include <Handle_NMTDS_ListNodeOfListOfPassKeyBoolean.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_NoSuchObject;
-class NMTDS_ListIteratorOfListOfPassKeyBoolean;
-class NMTDS_PassKeyBoolean;
-class NMTDS_ListNodeOfListOfPassKeyBoolean;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTDS_ListOfPassKeyBoolean {
-
-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 NMTDS_ListOfPassKeyBoolean();
-
-
-Standard_EXPORT void Assign(const NMTDS_ListOfPassKeyBoolean& Other) ;
- void operator=(const NMTDS_ListOfPassKeyBoolean& Other)
-{
- Assign(Other);
-}
-
-
-
-Standard_EXPORT Standard_Integer Extent() const;
-
-
-Standard_EXPORT void Clear() ;
-~NMTDS_ListOfPassKeyBoolean()
-{
- Clear();
-}
-
-
- Standard_Boolean IsEmpty() const;
-
-
-Standard_EXPORT void Prepend(const NMTDS_PassKeyBoolean& I) ;
-
-
-Standard_EXPORT void Prepend(const NMTDS_PassKeyBoolean& I,NMTDS_ListIteratorOfListOfPassKeyBoolean& theIt) ;
-
-
-Standard_EXPORT void Prepend(NMTDS_ListOfPassKeyBoolean& Other) ;
-
-
-Standard_EXPORT void Append(const NMTDS_PassKeyBoolean& I) ;
-
-
-Standard_EXPORT void Append(const NMTDS_PassKeyBoolean& I,NMTDS_ListIteratorOfListOfPassKeyBoolean& theIt) ;
-
-
-Standard_EXPORT void Append(NMTDS_ListOfPassKeyBoolean& Other) ;
+#ifndef NMTDS_ListOfPassKeyBoolean_HeaderFile
+#define NMTDS_ListOfPassKeyBoolean_HeaderFile
-Standard_EXPORT NMTDS_PassKeyBoolean& First() const;
-
-
-Standard_EXPORT NMTDS_PassKeyBoolean& Last() const;
-
-
-Standard_EXPORT void RemoveFirst() ;
-
-
-Standard_EXPORT void Remove(NMTDS_ListIteratorOfListOfPassKeyBoolean& It) ;
-
-
-Standard_EXPORT void InsertBefore(const NMTDS_PassKeyBoolean& I,NMTDS_ListIteratorOfListOfPassKeyBoolean& It) ;
-
-
-Standard_EXPORT void InsertBefore(NMTDS_ListOfPassKeyBoolean& Other,NMTDS_ListIteratorOfListOfPassKeyBoolean& It) ;
-
-
-Standard_EXPORT void InsertAfter(const NMTDS_PassKeyBoolean& I,NMTDS_ListIteratorOfListOfPassKeyBoolean& It) ;
-
-
-Standard_EXPORT void InsertAfter(NMTDS_ListOfPassKeyBoolean& Other,NMTDS_ListIteratorOfListOfPassKeyBoolean& It) ;
-
-
-friend class NMTDS_ListIteratorOfListOfPassKeyBoolean;
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT NMTDS_ListOfPassKeyBoolean(const NMTDS_ListOfPassKeyBoolean& Other);
-
-
- // Fields PRIVATE
- //
-Standard_Address myFirst;
-Standard_Address myLast;
-
-
-};
-
-#define Item NMTDS_PassKeyBoolean
-#define Item_hxx <NMTDS_PassKeyBoolean.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKeyBoolean
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPassKeyBoolean.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKeyBoolean
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKeyBoolean
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKeyBoolean_Type_()
-#define TCollection_List NMTDS_ListOfPassKeyBoolean
-#define TCollection_List_hxx <NMTDS_ListOfPassKeyBoolean.hxx>
-
-#include <TCollection_List.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
+#include <NCollection_List.hxx>
+#include <NMTDS_PassKeyBoolean.hxx>
+typedef NCollection_List<NMTDS_PassKeyBoolean> NMTDS_ListOfPassKeyBoolean;
+typedef NMTDS_ListOfPassKeyBoolean::Iterator NMTDS_ListIteratorOfListOfPassKeyBoolean;
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_ListOfPassKeyBoolean.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile
-#include <NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx>
-#endif
-#ifndef _NMTDS_PassKeyBoolean_HeaderFile
-#include <NMTDS_PassKeyBoolean.hxx>
-#endif
-#ifndef _NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile
-#include <NMTDS_ListNodeOfListOfPassKeyBoolean.hxx>
-#endif
-
-
-#define Item NMTDS_PassKeyBoolean
-#define Item_hxx <NMTDS_PassKeyBoolean.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKeyBoolean
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPassKeyBoolean.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKeyBoolean
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKeyBoolean
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKeyBoolean_Type_()
-#define TCollection_List NMTDS_ListOfPassKeyBoolean
-#define TCollection_List_hxx <NMTDS_ListOfPassKeyBoolean.hxx>
-#include <TCollection_List.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_ListOfPassKey.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _NMTDS_ListIteratorOfListOfPassKey_HeaderFile
-#include <NMTDS_ListIteratorOfListOfPassKey.hxx>
-#endif
-#ifndef _NMTDS_PassKey_HeaderFile
-#include <NMTDS_PassKey.hxx>
-#endif
-#ifndef _NMTDS_ListNodeOfListOfPassKey_HeaderFile
-#include <NMTDS_ListNodeOfListOfPassKey.hxx>
-#endif
-
-
-#define Item NMTDS_PassKey
-#define Item_hxx <NMTDS_PassKey.hxx>
-#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKey
-#define TCollection_ListNode_hxx <NMTDS_ListNodeOfListOfPassKey.hxx>
-#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKey
-#define TCollection_ListIterator_hxx <NMTDS_ListIteratorOfListOfPassKey.hxx>
-#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKey
-#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKey_Type_()
-#define TCollection_List NMTDS_ListOfPassKey
-#define TCollection_List_hxx <NMTDS_ListOfPassKey.hxx>
-#include <TCollection_List.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-\r
-#ifndef _NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile\r
-#define _NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_Macro_HeaderFile\r
-#include <Standard_Macro.hxx>\r
-#endif\r
-\r
-#ifndef _TCollection_BasicMapIterator_HeaderFile\r
-#include <TCollection_BasicMapIterator.hxx>\r
-#endif\r
-#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile\r
-#include <Handle_NMTDS_StdMapNodeOfMapOfPairBoolean.hxx>\r
-#endif\r
-class Standard_NoSuchObject;\r
-class NMTDS_PairBoolean;\r
-class NMTDS_PairMapHasher;\r
-class NMTDS_MapOfPairBoolean;\r
-class NMTDS_StdMapNodeOfMapOfPairBoolean;\r
-\r
-\r
-\r
-class NMTDS_MapIteratorOfMapOfPairBoolean : public TCollection_BasicMapIterator {\r
-public:\r
-\r
- void* operator new(size_t,void* anAddress) \r
- {\r
- return anAddress;\r
- }\r
- void* operator new(size_t size) \r
- {\r
- return Standard::Allocate(size); \r
- }\r
- void operator delete(void *anAddress) \r
- {\r
- if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
- }\r
-\r
- \r
- Standard_EXPORT NMTDS_MapIteratorOfMapOfPairBoolean();\r
- \r
- Standard_EXPORT NMTDS_MapIteratorOfMapOfPairBoolean(const NMTDS_MapOfPairBoolean& aMap);\r
- \r
- Standard_EXPORT void Initialize(const NMTDS_MapOfPairBoolean& aMap) ;\r
- \r
- Standard_EXPORT const NMTDS_PairBoolean& Key() const;\r
-\r
-\r
-\r
-\r
-\r
-protected:\r
-\r
-\r
-\r
-\r
-\r
-private:\r
-\r
-\r
-\r
-\r
-\r
-};\r
-\r
-\r
-\r
-\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+
+// File: NMTDS_MapIteratorOfMapOfPairBoolean.hxx
+// Created: Mon Feb 20 08:22:39 2012
+// Author:
+// <pkv@BDEURI37616>
+
+
+#ifndef NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile
+#define NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile
+
+#ifndef NMTDS_MapOfPairBoolean_HeaderFile
+#include <NMTDS_MapOfPairBoolean.hxx>
+#endif
+
+#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <NMTDS_MapIteratorOfMapOfPairBoolean.hxx>\r
-\r
-#ifndef _Standard_NoSuchObject_HeaderFile\r
-#include <Standard_NoSuchObject.hxx>\r
-#endif\r
-#ifndef _NMTDS_PairBoolean_HeaderFile\r
-#include <NMTDS_PairBoolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_PairMapHasher_HeaderFile\r
-#include <NMTDS_PairMapHasher.hxx>\r
-#endif\r
-#ifndef _NMTDS_MapOfPairBoolean_HeaderFile\r
-#include <NMTDS_MapOfPairBoolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile\r
-#include <NMTDS_StdMapNodeOfMapOfPairBoolean.hxx>\r
-#endif\r
- \r
-\r
-#define TheKey NMTDS_PairBoolean\r
-#define TheKey_hxx <NMTDS_PairBoolean.hxx>\r
-#define Hasher NMTDS_PairMapHasher\r
-#define Hasher_hxx <NMTDS_PairMapHasher.hxx>\r
-#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPairBoolean\r
-#define TCollection_StdMapNode_hxx <NMTDS_StdMapNodeOfMapOfPairBoolean.hxx>\r
-#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPairBoolean\r
-#define TCollection_MapIterator_hxx <NMTDS_MapIteratorOfMapOfPairBoolean.hxx>\r
-#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPairBoolean\r
-#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPairBoolean_Type_()\r
-#define TCollection_Map NMTDS_MapOfPairBoolean\r
-#define TCollection_Map_hxx <NMTDS_MapOfPairBoolean.hxx>\r
-#include <TCollection_MapIterator.gxx>\r
-\r
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#ifndef _NMTDS_MapIteratorOfMapOfPassKey_HeaderFile
-#define _NMTDS_MapIteratorOfMapOfPassKey_HeaderFile
+// File: NMRCol_MapIteratorOfMapOfPassKey.hxx
+// Created: Mon Feb 20 08:22:39 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _TCollection_BasicMapIterator_HeaderFile
-#include <TCollection_BasicMapIterator.hxx>
-#endif
-#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile
-#include <Handle_NMTDS_StdMapNodeOfMapOfPassKey.hxx>
-#endif
-class Standard_NoSuchObject;
-class NMTDS_PassKey;
-class NMTDS_PassKeyMapHasher;
-class NMTDS_MapOfPassKey;
-class NMTDS_StdMapNodeOfMapOfPassKey;
+#ifndef NMRCol_MapIteratorOfMapOfPassKey_HeaderFile
+#define NMRCol_MapIteratorOfMapOfPassKey_HeaderFile
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
+#ifndef NMTDS_MapOfPassKey_HeaderFile
+#include <NMTDS_MapOfPassKey.hxx>
#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTDS_MapIteratorOfMapOfPassKey : public TCollection_BasicMapIterator {
-
-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 NMTDS_MapIteratorOfMapOfPassKey();
-
-
-Standard_EXPORT NMTDS_MapIteratorOfMapOfPassKey(const NMTDS_MapOfPassKey& aMap);
-
-
-Standard_EXPORT void Initialize(const NMTDS_MapOfPassKey& aMap) ;
-
-
-Standard_EXPORT const NMTDS_PassKey& Key() const;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
#endif
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#ifndef _NMTDS_MapIteratorOfMapOfPassKeyBoolean_HeaderFile
-#define _NMTDS_MapIteratorOfMapOfPassKeyBoolean_HeaderFile
+// File: NMRCol_MapIteratorOfMapOfPassKeyBoolean.hxx
+// Created: Mon Feb 20 08:22:39 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _TCollection_BasicMapIterator_HeaderFile
-#include <TCollection_BasicMapIterator.hxx>
-#endif
-#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile
-#include <Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx>
-#endif
-class Standard_NoSuchObject;
-class NMTDS_PassKeyBoolean;
-class NMTDS_PassKeyMapHasher;
-class NMTDS_MapOfPassKeyBoolean;
-class NMTDS_StdMapNodeOfMapOfPassKeyBoolean;
+#ifndef NMRCol_MapIteratorOfMapOfPassKeyBoolean_HeaderFile
+#define NMRCol_MapIteratorOfMapOfPassKeyBoolean_HeaderFile
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
+#ifndef NMTDS_MapOfPassKeyBoolean_HeaderFile
+#include <NMTDS_MapOfPassKeyBoolean.hxx>
#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTDS_MapIteratorOfMapOfPassKeyBoolean : public TCollection_BasicMapIterator {
-
-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 NMTDS_MapIteratorOfMapOfPassKeyBoolean();
-
-
-Standard_EXPORT NMTDS_MapIteratorOfMapOfPassKeyBoolean(const NMTDS_MapOfPassKeyBoolean& aMap);
-
-
-Standard_EXPORT void Initialize(const NMTDS_MapOfPassKeyBoolean& aMap) ;
-
-
-Standard_EXPORT const NMTDS_PassKeyBoolean& Key() const;
-
-
-
-
-
-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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _NMTDS_PassKeyBoolean_HeaderFile
-#include <NMTDS_PassKeyBoolean.hxx>
-#endif
-#ifndef _NMTDS_PassKeyMapHasher_HeaderFile
-#include <NMTDS_PassKeyMapHasher.hxx>
-#endif
-#ifndef _NMTDS_MapOfPassKeyBoolean_HeaderFile
-#include <NMTDS_MapOfPassKeyBoolean.hxx>
-#endif
-#ifndef _NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile
-#include <NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx>
-#endif
-
-
-#define TheKey NMTDS_PassKeyBoolean
-#define TheKey_hxx <NMTDS_PassKeyBoolean.hxx>
-#define Hasher NMTDS_PassKeyMapHasher
-#define Hasher_hxx <NMTDS_PassKeyMapHasher.hxx>
-#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPassKeyBoolean
-#define TCollection_MapIterator_hxx <NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx>
-#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPassKeyBoolean
-#define TCollection_StdMapNode_hxx <NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx>
-#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean
-#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPassKeyBoolean_Type_()
-#define TCollection_Map NMTDS_MapOfPassKeyBoolean
-#define TCollection_Map_hxx <NMTDS_MapOfPassKeyBoolean.hxx>
-#include <TCollection_MapIterator.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_MapIteratorOfMapOfPassKey.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _NMTDS_PassKey_HeaderFile
-#include <NMTDS_PassKey.hxx>
-#endif
-#ifndef _NMTDS_PassKeyMapHasher_HeaderFile
-#include <NMTDS_PassKeyMapHasher.hxx>
-#endif
-#ifndef _NMTDS_MapOfPassKey_HeaderFile
-#include <NMTDS_MapOfPassKey.hxx>
-#endif
-#ifndef _NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile
-#include <NMTDS_StdMapNodeOfMapOfPassKey.hxx>
-#endif
-
-
-#define TheKey NMTDS_PassKey
-#define TheKey_hxx <NMTDS_PassKey.hxx>
-#define Hasher NMTDS_PassKeyMapHasher
-#define Hasher_hxx <NMTDS_PassKeyMapHasher.hxx>
-#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPassKey
-#define TCollection_MapIterator_hxx <NMTDS_MapIteratorOfMapOfPassKey.hxx>
-#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPassKey
-#define TCollection_StdMapNode_hxx <NMTDS_StdMapNodeOfMapOfPassKey.hxx>
-#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPassKey
-#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPassKey_Type_()
-#define TCollection_Map NMTDS_MapOfPassKey
-#define TCollection_Map_hxx <NMTDS_MapOfPassKey.hxx>
-#include <TCollection_MapIterator.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-\r
-#ifndef _NMTDS_MapOfPairBoolean_HeaderFile\r
-#define _NMTDS_MapOfPairBoolean_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_Macro_HeaderFile\r
-#include <Standard_Macro.hxx>\r
-#endif\r
-\r
-#ifndef _TCollection_BasicMap_HeaderFile\r
-#include <TCollection_BasicMap.hxx>\r
-#endif\r
-#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile\r
-#include <Handle_NMTDS_StdMapNodeOfMapOfPairBoolean.hxx>\r
-#endif\r
-#ifndef _Standard_Integer_HeaderFile\r
-#include <Standard_Integer.hxx>\r
-#endif\r
-#ifndef _Standard_Boolean_HeaderFile\r
-#include <Standard_Boolean.hxx>\r
-#endif\r
-class Standard_DomainError;\r
-class NMTDS_PairBoolean;\r
-class NMTDS_PairMapHasher;\r
-class NMTDS_StdMapNodeOfMapOfPairBoolean;\r
-class NMTDS_MapIteratorOfMapOfPairBoolean;\r
-\r
-\r
-\r
-class NMTDS_MapOfPairBoolean : public TCollection_BasicMap {\r
-public:\r
-\r
- void* operator new(size_t,void* anAddress) \r
- {\r
- return anAddress;\r
- }\r
- void* operator new(size_t size) \r
- {\r
- return Standard::Allocate(size); \r
- }\r
- void operator delete(void *anAddress) \r
- {\r
- if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
- }\r
-\r
- \r
- Standard_EXPORT NMTDS_MapOfPairBoolean(const Standard_Integer NbBuckets = 1);\r
- \r
- Standard_EXPORT NMTDS_MapOfPairBoolean& Assign(const NMTDS_MapOfPairBoolean& Other) ;\r
- NMTDS_MapOfPairBoolean& operator =(const NMTDS_MapOfPairBoolean& Other) \r
-{\r
- return Assign(Other);\r
-}\r
- \r
- Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;\r
- \r
- Standard_EXPORT void Clear() ;\r
-~NMTDS_MapOfPairBoolean()\r
-{\r
- Clear();\r
-}\r
- \r
- Standard_EXPORT Standard_Boolean Add(const NMTDS_PairBoolean& aKey) ;\r
- \r
- Standard_EXPORT Standard_Boolean Contains(const NMTDS_PairBoolean& aKey) const;\r
- \r
- Standard_EXPORT Standard_Boolean Remove(const NMTDS_PairBoolean& aKey) ;\r
-\r
-\r
-\r
-\r
-\r
-protected:\r
-\r
-\r
-\r
-\r
-\r
-private:\r
-\r
- \r
- Standard_EXPORT NMTDS_MapOfPairBoolean(const NMTDS_MapOfPairBoolean& Other);\r
-\r
-\r
-\r
-\r
-};\r
-\r
-\r
-\r
-\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+
+// File: NMTDS_MapOfPairBoolean.hxx
+// Created: Mon Feb 20 08:19:07 2012
+// Author:
+// <pkv@BDEURI37616>
+
+
+#ifndef NMTDS_MapOfPairBoolean_HeaderFile
+#define NMTDS_MapOfPairBoolean_HeaderFile
+
+#include <NMTDS_PairBoolean.hxx>
+#include <NMTDS_PairMapHasher.hxx>
+
+#define _NCollection_MapHasher
+#include <NCollection_Map.hxx>
+
+typedef NCollection_Map<NMTDS_PairBoolean, NMTDS_PairMapHasher> NMTDS_MapOfPairBoolean;
+typedef NMTDS_MapOfPairBoolean::Iterator NMTDS_MapIteratorOfMapOfPairBoolean;
+
+#undef _NCollection_MapHasher
+
+#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <NMTDS_MapOfPairBoolean.hxx>\r
-\r
-#ifndef _Standard_DomainError_HeaderFile\r
-#include <Standard_DomainError.hxx>\r
-#endif\r
-#ifndef _NMTDS_PairBoolean_HeaderFile\r
-#include <NMTDS_PairBoolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_PairMapHasher_HeaderFile\r
-#include <NMTDS_PairMapHasher.hxx>\r
-#endif\r
-#ifndef _NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile\r
-#include <NMTDS_StdMapNodeOfMapOfPairBoolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile\r
-#include <NMTDS_MapIteratorOfMapOfPairBoolean.hxx>\r
-#endif\r
- \r
-\r
-#define TheKey NMTDS_PairBoolean\r
-#define TheKey_hxx <NMTDS_PairBoolean.hxx>\r
-#define Hasher NMTDS_PairMapHasher\r
-#define Hasher_hxx <NMTDS_PairMapHasher.hxx>\r
-#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPairBoolean\r
-#define TCollection_StdMapNode_hxx <NMTDS_StdMapNodeOfMapOfPairBoolean.hxx>\r
-#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPairBoolean\r
-#define TCollection_MapIterator_hxx <NMTDS_MapIteratorOfMapOfPairBoolean.hxx>\r
-#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPairBoolean\r
-#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPairBoolean_Type_()\r
-#define TCollection_Map NMTDS_MapOfPairBoolean\r
-#define TCollection_Map_hxx <NMTDS_MapOfPairBoolean.hxx>\r
-#include <TCollection_Map.gxx>\r
-\r
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#ifndef _NMTDS_MapOfPassKey_HeaderFile
-#define _NMTDS_MapOfPassKey_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile
-#include <Handle_NMTDS_StdMapNodeOfMapOfPassKey.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_DomainError;
-class NMTDS_PassKey;
-class NMTDS_PassKeyMapHasher;
-class NMTDS_MapIteratorOfMapOfPassKey;
-class NMTDS_StdMapNodeOfMapOfPassKey;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTDS_MapOfPassKey : public TCollection_BasicMap {
-
-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 NMTDS_MapOfPassKey(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT NMTDS_MapOfPassKey& Assign(const NMTDS_MapOfPassKey& Other) ;
- NMTDS_MapOfPassKey& operator =(const NMTDS_MapOfPassKey& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~NMTDS_MapOfPassKey()
-{
- Clear();
-}
-
+// File: NMTDS_MapOfPassKey.hxx
+// Created: Mon Feb 20 08:19:07 2012
+// Author:
+// <pkv@BDEURI37616>
-Standard_EXPORT Standard_Boolean Add(const NMTDS_PassKey& aKey) ;
+#ifndef NMTDS_MapOfPassKey_HeaderFile
+#define NMTDS_MapOfPassKey_HeaderFile
+#include <NMTDS_PassKey.hxx>
+#include <NMTDS_PassKeyMapHasher.hxx>
-Standard_EXPORT Standard_Boolean Contains(const NMTDS_PassKey& aKey) const;
+#define _NCollection_MapHasher
+#include <NCollection_Map.hxx>
+typedef NCollection_Map<NMTDS_PassKey, NMTDS_PassKeyMapHasher> NMTDS_MapOfPassKey;
+typedef NMTDS_MapOfPassKey::Iterator NMTDS_MapIteratorOfMapOfPassKey;
-Standard_EXPORT Standard_Boolean Remove(const NMTDS_PassKey& aKey) ;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT NMTDS_MapOfPassKey(const NMTDS_MapOfPassKey& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
+#undef _NCollection_MapHasher
#endif
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#ifndef _NMTDS_MapOfPassKeyBoolean_HeaderFile
-#define _NMTDS_MapOfPassKeyBoolean_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile
-#include <Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_DomainError;
-class NMTDS_PassKeyBoolean;
-class NMTDS_PassKeyMapHasher;
-class NMTDS_MapIteratorOfMapOfPassKeyBoolean;
-class NMTDS_StdMapNodeOfMapOfPassKeyBoolean;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTDS_MapOfPassKeyBoolean : public TCollection_BasicMap {
-
-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 NMTDS_MapOfPassKeyBoolean(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT NMTDS_MapOfPassKeyBoolean& Assign(const NMTDS_MapOfPassKeyBoolean& Other) ;
- NMTDS_MapOfPassKeyBoolean& operator =(const NMTDS_MapOfPassKeyBoolean& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~NMTDS_MapOfPassKeyBoolean()
-{
- Clear();
-}
-
+// File: NMTDS_MapOfPassKeyBoolean.hxx
+// Created: Mon Feb 20 08:19:07 2012
+// Author:
+// <pkv@BDEURI37616>
-Standard_EXPORT Standard_Boolean Add(const NMTDS_PassKeyBoolean& aKey) ;
+#ifndef NMTDS_MapOfPassKeyBoolean_HeaderFile
+#define NMTDS_MapOfPassKeyBoolean_HeaderFile
+#include <NMTDS_PassKeyBoolean.hxx>
+#include <NMTDS_PassKeyMapHasher.hxx>
-Standard_EXPORT Standard_Boolean Contains(const NMTDS_PassKeyBoolean& aKey) const;
+#define _NCollection_MapHasher
+#include <NCollection_Map.hxx>
+typedef NCollection_Map<NMTDS_PassKeyBoolean, NMTDS_PassKeyMapHasher> NMTDS_MapOfPassKeyBoolean;
+typedef NMTDS_MapOfPassKeyBoolean::Iterator NMTDS_MapIteratorOfMapOfPassKeyBoolean;
-Standard_EXPORT Standard_Boolean Remove(const NMTDS_PassKeyBoolean& aKey) ;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT NMTDS_MapOfPassKeyBoolean(const NMTDS_MapOfPassKeyBoolean& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
+#undef _NCollection_MapHasher
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_MapOfPassKeyBoolean.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _NMTDS_PassKeyBoolean_HeaderFile
-#include <NMTDS_PassKeyBoolean.hxx>
-#endif
-#ifndef _NMTDS_PassKeyMapHasher_HeaderFile
-#include <NMTDS_PassKeyMapHasher.hxx>
-#endif
-#ifndef _NMTDS_MapIteratorOfMapOfPassKeyBoolean_HeaderFile
-#include <NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx>
-#endif
-#ifndef _NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile
-#include <NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx>
-#endif
-
-
-#define TheKey NMTDS_PassKeyBoolean
-#define TheKey_hxx <NMTDS_PassKeyBoolean.hxx>
-#define Hasher NMTDS_PassKeyMapHasher
-#define Hasher_hxx <NMTDS_PassKeyMapHasher.hxx>
-#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPassKeyBoolean
-#define TCollection_MapIterator_hxx <NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx>
-#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPassKeyBoolean
-#define TCollection_StdMapNode_hxx <NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx>
-#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean
-#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPassKeyBoolean_Type_()
-#define TCollection_Map NMTDS_MapOfPassKeyBoolean
-#define TCollection_Map_hxx <NMTDS_MapOfPassKeyBoolean.hxx>
-#include <TCollection_Map.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_MapOfPassKey.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _NMTDS_PassKey_HeaderFile
-#include <NMTDS_PassKey.hxx>
-#endif
-#ifndef _NMTDS_PassKeyMapHasher_HeaderFile
-#include <NMTDS_PassKeyMapHasher.hxx>
-#endif
-#ifndef _NMTDS_MapIteratorOfMapOfPassKey_HeaderFile
-#include <NMTDS_MapIteratorOfMapOfPassKey.hxx>
-#endif
-#ifndef _NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile
-#include <NMTDS_StdMapNodeOfMapOfPassKey.hxx>
-#endif
-
-
-#define TheKey NMTDS_PassKey
-#define TheKey_hxx <NMTDS_PassKey.hxx>
-#define Hasher NMTDS_PassKeyMapHasher
-#define Hasher_hxx <NMTDS_PassKeyMapHasher.hxx>
-#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPassKey
-#define TCollection_MapIterator_hxx <NMTDS_MapIteratorOfMapOfPassKey.hxx>
-#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPassKey
-#define TCollection_StdMapNode_hxx <NMTDS_StdMapNodeOfMapOfPassKey.hxx>
-#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPassKey
-#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPassKey_Type_()
-#define TCollection_Map NMTDS_MapOfPassKey
-#define TCollection_Map_hxx <NMTDS_MapOfPassKey.hxx>
-#include <TCollection_Map.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
// 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
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_PInterfPool.hxx
+// Author: Peter KURNEV
+
#ifndef _NMTDS_PInterfPool_HeaderFile
#define _NMTDS_PInterfPool_HeaderFile
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
// 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
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_PIterator.hxx
+// Author: Peter KURNEV
+
#ifndef _NMTDS_PIterator_HeaderFile
#define _NMTDS_PIterator_HeaderFile
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_PShapesDataStructure.hxx
+// Author: Peter KURNEV
+
#ifndef _NMTDS_PShapesDataStructure_HeaderFile
#define _NMTDS_PShapesDataStructure_HeaderFile
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTDS_Pair.cdl
--- Created:
--- Author: Peter KURNEV
---
-class Pair from NMTDS
-
- ---Purpose:
-
---uses
---raises
-
-is
- Create
- returns Pair from NMTDS;
- ---C++: alias "Standard_EXPORT virtual ~NMTDS_Pair();"
-
- Create(Other:Pair from NMTDS)
- returns Pair from NMTDS;
- ---C++: alias "Standard_EXPORT NMTDS_Pair& operator =(const NMTDS_Pair& Other);"
-
- Clear(me:out);
-
- SetIds(me:out;
- aI1 :Integer from Standard;
- aI2 :Integer from Standard);
-
- Ids(me;
- aI1 :out Integer from Standard;
- aI2 :out Integer from Standard);
-
- IsEqual(me;
- aOther:Pair from NMTDS)
- returns Boolean from Standard;
-
- HashCode(me;
- Upper : Integer from Standard)
- returns Integer from Standard;
-
-
-fields
- myId1: Integer from Standard is protected;
- myId2: Integer from Standard is protected;
-
-end Pair;
// File: NMTDS_Pair.cxx
// Author: Peter KURNEV
-#include <NMTDS_Pair.ixx>
+#include <NMTDS_Pair.hxx>
#include <stdio.h>
#include <string.h>
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-\r
-#ifndef _NMTDS_Pair_HeaderFile\r
-#define _NMTDS_Pair_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_Macro_HeaderFile\r
-#include <Standard_Macro.hxx>\r
-#endif\r
-\r
-#ifndef _Standard_Integer_HeaderFile\r
-#include <Standard_Integer.hxx>\r
-#endif\r
-#ifndef _Standard_Boolean_HeaderFile\r
-#include <Standard_Boolean.hxx>\r
-#endif\r
-\r
-\r
-\r
-class NMTDS_Pair {\r
-public:\r
-\r
- void* operator new(size_t,void* anAddress) \r
- {\r
- return anAddress;\r
- }\r
- void* operator new(size_t size) \r
- {\r
- return Standard::Allocate(size); \r
- }\r
- void operator delete(void *anAddress) \r
- {\r
- if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
- }\r
-\r
- \r
- Standard_EXPORT NMTDS_Pair();\r
-Standard_EXPORT virtual ~NMTDS_Pair();\r
- \r
- Standard_EXPORT NMTDS_Pair(const NMTDS_Pair& Other);\r
-Standard_EXPORT NMTDS_Pair& operator =(const NMTDS_Pair& Other);\r
- \r
- Standard_EXPORT void Clear() ;\r
- \r
- Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2) ;\r
- \r
- Standard_EXPORT void Ids(Standard_Integer& aI1,Standard_Integer& aI2) const;\r
- \r
- Standard_EXPORT Standard_Boolean IsEqual(const NMTDS_Pair& aOther) const;\r
- \r
- Standard_EXPORT Standard_Integer HashCode(const Standard_Integer Upper) const;\r
-\r
-\r
-\r
-\r
-\r
-protected:\r
-\r
-\r
-\r
-Standard_Integer myId1;\r
-Standard_Integer myId2;\r
-\r
-\r
-private:\r
-\r
-\r
-\r
-\r
-\r
-};\r
-\r
-\r
-\r
-\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+
+// File: NMTDS_Pair.hxx
+// Author: Peter KURNEV
+
+#ifndef _NMTDS_Pair_HeaderFile
+#define _NMTDS_Pair_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
+#include <Standard_Integer.hxx>
+#include <Standard_Boolean.hxx>
+
+//=======================================================================
+//function : NMTDS_Pair
+//purpose :
+//=======================================================================
+class NMTDS_Pair {
+ public:
+ Standard_EXPORT
+ NMTDS_Pair();
+
+ Standard_EXPORT
+ virtual ~NMTDS_Pair();
+
+ Standard_EXPORT
+ NMTDS_Pair(const NMTDS_Pair& Other);
+
+ Standard_EXPORT
+ NMTDS_Pair& operator =(const NMTDS_Pair& Other);
+
+ Standard_EXPORT
+ void Clear() ;
+
+ Standard_EXPORT
+ void SetIds(const Standard_Integer aI1,
+ const Standard_Integer aI2) ;
+
+ Standard_EXPORT
+ void Ids(Standard_Integer& aI1,
+ Standard_Integer& aI2) const;
+
+ Standard_EXPORT
+ Standard_Boolean IsEqual(const NMTDS_Pair& aOther) const;
+
+ Standard_EXPORT
+ Standard_Integer HashCode(const Standard_Integer Upper) const;
+
+protected:
+Standard_Integer myId1;
+Standard_Integer myId2;
+};
+#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <NMTDS_Pair.jxx>\r
-\r
- \r
-\r
-\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#ifndef _NMTDS_Pair_HeaderFile\r
-#include <NMTDS_Pair.hxx>\r
-#endif\r
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTDS_PairBoolean.cdl
--- Created:
--- Author: Peter KURNEV
-
-class PairBoolean from NMTDS
- inherits Pair from NMTDS
-
- ---Purpose:
-
-uses
- Shape from TopoDS,
- ListOfInteger from TColStd
-
---raises
-
-is
- Create
- returns PairBoolean from NMTDS;
- ---C++: alias "Standard_EXPORT virtual ~NMTDS_PairBoolean();"
-
- SetFlag(me:out;
- aFlag: Boolean from Standard);
- ---C++: alias " Standard_EXPORT NMTDS_PairBoolean& operator =(const NMTDS_PairBoolean& Other);"
-
- Flag(me)
- returns Boolean from Standard;
-
-fields
- myFlag: Boolean from Standard is protected;
-
-end PairBoolean;
// File: NMTDS_PairBoolean.cxx
// Author: Peter KURNEV
-#include <NMTDS_PairBoolean.ixx>
+#include <NMTDS_PairBoolean.hxx>
//=======================================================================
//function :
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-\r
-#ifndef _NMTDS_PairBoolean_HeaderFile\r
-#define _NMTDS_PairBoolean_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_Macro_HeaderFile\r
-#include <Standard_Macro.hxx>\r
-#endif\r
-\r
-#ifndef _Standard_Boolean_HeaderFile\r
-#include <Standard_Boolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_Pair_HeaderFile\r
-#include <NMTDS_Pair.hxx>\r
-#endif\r
-\r
-\r
-\r
-class NMTDS_PairBoolean : public NMTDS_Pair {\r
-public:\r
-\r
- void* operator new(size_t,void* anAddress) \r
- {\r
- return anAddress;\r
- }\r
- void* operator new(size_t size) \r
- {\r
- return Standard::Allocate(size); \r
- }\r
- void operator delete(void *anAddress) \r
- {\r
- if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
- }\r
-\r
- \r
- Standard_EXPORT NMTDS_PairBoolean();\r
-Standard_EXPORT virtual ~NMTDS_PairBoolean();\r
- \r
- Standard_EXPORT void SetFlag(const Standard_Boolean aFlag) ;\r
- Standard_EXPORT NMTDS_PairBoolean& operator =(const NMTDS_PairBoolean& Other);\r
- \r
- Standard_EXPORT Standard_Boolean Flag() const;\r
-\r
-\r
-\r
-\r
-\r
-protected:\r
-\r
-\r
-\r
-Standard_Boolean myFlag;\r
-\r
-\r
-private:\r
-\r
-\r
-\r
-\r
-\r
-};\r
-\r
-\r
-\r
-\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+
+// File: NMTDS_PairBoolean.hxx
+// Author: Peter KURNEV
+
+#ifndef _NMTDS_PairBoolean_HeaderFile
+#define _NMTDS_PairBoolean_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
+#include <Standard_Boolean.hxx>
+#include <NMTDS_Pair.hxx>
+
+//=======================================================================
+//class : NMTDS_PairBoolean
+//purpose :
+//=======================================================================
+class NMTDS_PairBoolean : public NMTDS_Pair {
+ public:
+ Standard_EXPORT
+ NMTDS_PairBoolean();
+
+ Standard_EXPORT
+ virtual ~NMTDS_PairBoolean();
+
+ Standard_EXPORT
+ void SetFlag(const Standard_Boolean aFlag) ;
+
+ Standard_EXPORT
+ NMTDS_PairBoolean& operator =(const NMTDS_PairBoolean& Other);
+
+ Standard_EXPORT
+ Standard_Boolean Flag() const;
+
+protected:
+ Standard_Boolean myFlag;
+};
+#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <NMTDS_PairBoolean.jxx>\r
-\r
- \r
-\r
-\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#ifndef _NMTDS_PairBoolean_HeaderFile\r
-#include <NMTDS_PairBoolean.hxx>\r
-#endif\r
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTDS_PairMapHasher.cdl
--- Author: Peter KURNEV
-
-class PairMapHasher from NMTDS
-
- ---Purpose:
-
-uses
- Pair from NMTDS
-
---raises
-
-is
- HashCode(myclass;
- aPKey : Pair from NMTDS;
- Upper : Integer from Standard)
- returns Integer from Standard;
-
-
- IsEqual(myclass;
- aPKey1 : Pair from NMTDS;
- aPKey2 : Pair from NMTDS)
- returns Boolean from Standard;
-
-end PairMapHasher;
// File: NMTDS_PairMapHasher.cxx
// Author: Peter KURNEV
-#include <NMTDS_PairMapHasher.ixx>
+#include <NMTDS_PairMapHasher.hxx>
//=======================================================================
//function : HashCode
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-\r
-#ifndef _NMTDS_PairMapHasher_HeaderFile\r
-#define _NMTDS_PairMapHasher_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_Macro_HeaderFile\r
-#include <Standard_Macro.hxx>\r
-#endif\r
-\r
-#ifndef _Standard_Integer_HeaderFile\r
-#include <Standard_Integer.hxx>\r
-#endif\r
-#ifndef _Standard_Boolean_HeaderFile\r
-#include <Standard_Boolean.hxx>\r
-#endif\r
-class NMTDS_Pair;\r
-\r
-\r
-\r
-class NMTDS_PairMapHasher {\r
-public:\r
-\r
- void* operator new(size_t,void* anAddress) \r
- {\r
- return anAddress;\r
- }\r
- void* operator new(size_t size) \r
- {\r
- return Standard::Allocate(size); \r
- }\r
- void operator delete(void *anAddress) \r
- {\r
- if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
- }\r
-\r
- \r
- Standard_EXPORT static Standard_Integer HashCode(const NMTDS_Pair& aPKey,const Standard_Integer Upper) ;\r
- \r
- Standard_EXPORT static Standard_Boolean IsEqual(const NMTDS_Pair& aPKey1,const NMTDS_Pair& aPKey2) ;\r
-\r
-\r
-\r
-\r
-\r
-protected:\r
-\r
-\r
-\r
-\r
-\r
-private:\r
-\r
-\r
-\r
-\r
-\r
-};\r
-\r
-\r
-\r
-\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+
+// File: NMTDS_PairMapHasher.cxx
+// Author: Peter KURNEV
+
+#ifndef _NMTDS_PairMapHasher_HeaderFile
+#define _NMTDS_PairMapHasher_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
+#include <Standard_Integer.hxx>
+#include <NMTDS_Pair.hxx>
+#include <Standard_Boolean.hxx>
+
+//=======================================================================
+//class : NMTDS_PairMapHasher
+//purpose :
+//=======================================================================
+class NMTDS_PairMapHasher {
+ public:
+ Standard_EXPORT
+ static Standard_Integer HashCode(const NMTDS_Pair& aPKey,
+ const Standard_Integer Upper) ;
+
+ Standard_EXPORT
+ static Standard_Boolean IsEqual(const NMTDS_Pair& aPKey1,
+ const NMTDS_Pair& aPKey2) ;
+};
+#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <NMTDS_PairMapHasher.jxx>\r
-\r
- \r
-\r
-\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#ifndef _NMTDS_Pair_HeaderFile\r
-#include <NMTDS_Pair.hxx>\r
-#endif\r
-#ifndef _NMTDS_PairMapHasher_HeaderFile\r
-#include <NMTDS_PairMapHasher.hxx>\r
-#endif\r
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTDS_PassKey.cdl
--- Created: Mon Nov 20 12:16:13 2006
--- Author: Peter KURNEV
---
-class PassKey from NMTDS
-
- ---Purpose:
-
-uses
- Shape from TopoDS,
- IndexedMapOfInteger from TColStd,
- ListOfInteger from TColStd
-
---raises
-
-is
- Create
- returns PassKey from NMTDS;
- ---C++: alias "Standard_EXPORT virtual ~NMTDS_PassKey();"
-
- Create(Other:PassKey from NMTDS)
- returns PassKey from NMTDS;
- ---C++: alias "Standard_EXPORT NMTDS_PassKey& operator =(const NMTDS_PassKey& Other);"
-
- Clear(me:out);
-
- SetIds(me:out;
- aI1 :Integer from Standard);
-
- SetIds(me:out;
- aI1 :Integer from Standard;
- aI2 :Integer from Standard);
-
- SetIds(me:out;
- aI1 :Integer from Standard;
- aI2 :Integer from Standard;
- aI3 :Integer from Standard);
-
- SetIds(me:out;
- aI1 :Integer from Standard;
- aI2 :Integer from Standard;
- aI3 :Integer from Standard;
- aI4 :Integer from Standard);
-
- SetIds(me:out;
- aLS :ListOfInteger from TColStd);
-
- NbIds(me)
- returns Integer from Standard;
-
- IsEqual(me;
- aOther:PassKey from NMTDS)
- returns Boolean from Standard;
-
- HashCode(me;
- Upper : Integer from Standard)
- returns Integer from Standard;
-
- Id(me;
- aIndex: Integer from Standard)
- returns Integer from Standard;
-
- Ids(me;
- aI1 :out Integer from Standard;
- aI2 :out Integer from Standard);
-
- Dump(me;
- aHex:Integer from Standard=0);
-
-
-fields
- myNbIds: Integer from Standard 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: NMTDS_Algo.cxx
-// Created: Sat Dec 04 12:39:47 2004
+// File: NMTDS_PassKey.cxx
+// Created:
// Author: Peter KURNEV
// <peter@PREFEX>
//
-#include <NMTDS_PassKey.ixx>
+#include <NMTDS_PassKey.hxx>
#include <stdio.h>
#include <string.h>
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_PassKey.hxx
+// Created:
+// Author: Peter KURNEV
+// <peter@PREFEX>
+//
#ifndef _NMTDS_PassKey_HeaderFile
#define _NMTDS_PassKey_HeaderFile
-#ifndef _Standard_Integer_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <Standard_Integer.hxx>
-#endif
-#ifndef _TColStd_IndexedMapOfInteger_HeaderFile
#include <TColStd_IndexedMapOfInteger.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-class TColStd_ListOfInteger;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
+#include <TColStd_ListOfInteger.hxx>
+//=======================================================================
+//function : NMTDS_PassKey
+//purpose :
+//=======================================================================
class NMTDS_PassKey {
-
-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 NMTDS_PassKey();
-Standard_EXPORT virtual ~NMTDS_PassKey();
-
-
-Standard_EXPORT NMTDS_PassKey(const NMTDS_PassKey& Other);
-Standard_EXPORT NMTDS_PassKey& operator =(const NMTDS_PassKey& Other);
-
-
-Standard_EXPORT void Clear() ;
-
-
-Standard_EXPORT void SetIds(const Standard_Integer aI1) ;
-
-
-Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2) ;
-
-
-Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2,const Standard_Integer aI3) ;
-
-
-Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2,const Standard_Integer aI3,const Standard_Integer aI4) ;
-
-
-Standard_EXPORT void SetIds(const TColStd_ListOfInteger& aLS) ;
-
-
-Standard_EXPORT Standard_Integer NbIds() const;
-
-
-Standard_EXPORT Standard_Boolean IsEqual(const NMTDS_PassKey& aOther) const;
-
-
-Standard_EXPORT Standard_Integer HashCode(const Standard_Integer Upper) const;
-
-
-Standard_EXPORT Standard_Integer Id(const Standard_Integer aIndex) const;
-
-
-Standard_EXPORT void Ids(Standard_Integer& aI1,Standard_Integer& aI2) const;
-
-
-Standard_EXPORT void Dump(const Standard_Integer aHex = 0) const;
-
-
-
-
+ public:
+ Standard_EXPORT
+ NMTDS_PassKey();
+
+ Standard_EXPORT
+ virtual ~NMTDS_PassKey();
+
+ Standard_EXPORT
+ NMTDS_PassKey(const NMTDS_PassKey& Other);
+
+ Standard_EXPORT
+ NMTDS_PassKey& operator =(const NMTDS_PassKey& Other);
+
+ Standard_EXPORT
+ void Clear() ;
+
+ Standard_EXPORT
+ void SetIds(const Standard_Integer aI1) ;
+
+ Standard_EXPORT
+ void SetIds(const Standard_Integer aI1,
+ const Standard_Integer aI2) ;
+
+ Standard_EXPORT
+ void SetIds(const Standard_Integer aI1,
+ const Standard_Integer aI2,
+ const Standard_Integer aI3) ;
+
+ Standard_EXPORT
+ void SetIds(const Standard_Integer aI1,
+ const Standard_Integer aI2,
+ const Standard_Integer aI3,
+ const Standard_Integer aI4) ;
+
+ Standard_EXPORT
+ void SetIds(const TColStd_ListOfInteger& aLS) ;
+
+ Standard_EXPORT
+ Standard_Integer NbIds() const;
+
+ Standard_EXPORT
+ Standard_Boolean IsEqual(const NMTDS_PassKey& aOther) const;
+
+ Standard_EXPORT
+ Standard_Integer HashCode(const Standard_Integer Upper) const;
+
+ Standard_EXPORT
+ Standard_Integer Id(const Standard_Integer aIndex) const;
+
+ Standard_EXPORT
+ void Ids(Standard_Integer& aI1,Standard_Integer& aI2) const;
+
+ Standard_EXPORT
+ void Dump(const Standard_Integer aHex = 0) const;
protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-Standard_Integer myNbIds;
-Standard_Integer mySum;
-TColStd_IndexedMapOfInteger myMap;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+ Standard_Integer myNbIds;
+ Standard_Integer mySum;
+ TColStd_IndexedMapOfInteger myMap;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_PassKey.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _TColStd_ListOfInteger_HeaderFile
-#include <TColStd_ListOfInteger.hxx>
-#endif
-#ifndef _NMTDS_PassKey_HeaderFile
-#include <NMTDS_PassKey.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTDS_PassKeyBoolean.cdl
--- Created:
--- Author: Peter KURNEV
---
-class PassKeyBoolean from NMTDS
- inherits PassKey from NMTDS
-
- ---Purpose:
-
-uses
- Shape from TopoDS,
- ListOfInteger from TColStd
-
---raises
-
-is
- Create
- returns PassKeyBoolean from NMTDS;
- ---C++: alias "Standard_EXPORT virtual ~NMTDS_PassKeyBoolean();"
-
- SetFlag(me:out;
- aFlag: Boolean from Standard);
- ---C++: alias " Standard_EXPORT NMTDS_PassKeyBoolean& operator =(const NMTDS_PassKeyBoolean& Other);"
-
- Flag(me)
- returns Boolean from Standard;
-
-fields
- myFlag: Boolean from Standard is protected;
-
-end PassKeyBoolean;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <NMTDS_PassKeyBoolean.ixx>
+#include <NMTDS_PassKeyBoolean.hxx>
//=======================================================================
//function :
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_PassKeyBoolean.hxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _NMTDS_PassKeyBoolean_HeaderFile
#define _NMTDS_PassKeyBoolean_HeaderFile
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _NMTDS_PassKey_HeaderFile
-#include <NMTDS_PassKey.hxx>
-#endif
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
+#include <Standard_Boolean.hxx>
+#include <NMTDS_PassKey.hxx>
+//=======================================================================
+//class : NMTDS_PassKeyBoolean
+//purpose :
+//=======================================================================
class NMTDS_PassKeyBoolean : public NMTDS_PassKey {
-
-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 NMTDS_PassKeyBoolean();
-Standard_EXPORT virtual ~NMTDS_PassKeyBoolean();
-
-
-Standard_EXPORT void SetFlag(const Standard_Boolean aFlag) ;
- Standard_EXPORT NMTDS_PassKeyBoolean& operator =(const NMTDS_PassKeyBoolean& Other);
-
-
-Standard_EXPORT Standard_Boolean Flag() const;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-Standard_Boolean myFlag;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+ public:
+ Standard_EXPORT
+ NMTDS_PassKeyBoolean();
+
+ Standard_EXPORT
+ virtual ~NMTDS_PassKeyBoolean();
+
+ Standard_EXPORT
+ void SetFlag(const Standard_Boolean aFlag) ;
+
+ Standard_EXPORT
+ NMTDS_PassKeyBoolean& operator =(const NMTDS_PassKeyBoolean& Other);
+
+ Standard_EXPORT
+ Standard_Boolean Flag() const;
+
+ protected:
+ Standard_Boolean myFlag;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_PassKeyBoolean.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTDS_PassKeyBoolean_HeaderFile
-#include <NMTDS_PassKeyBoolean.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTDS_PassKeyMapHasher.cdl
--- Created:
--- Author: Peter KURNEV
---
-class PassKeyMapHasher from NMTDS
-
- ---Purpose:
-
-uses
- PassKey from NMTDS
-
---raises
-
-is
- HashCode(myclass;
- aPKey : PassKey from NMTDS;
- Upper : Integer from Standard)
- returns Integer from Standard;
-
-
- IsEqual(myclass;
- aPKey1 : PassKey from NMTDS;
- aPKey2 : PassKey from NMTDS)
- returns Boolean from Standard;
-
-end PassKeyMapHasher;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <NMTDS_PassKeyMapHasher.ixx>
+#include <NMTDS_PassKeyMapHasher.hxx>
//=======================================================================
//function : HashCode
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_PassKeyMapHasher.hxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _NMTDS_PassKeyMapHasher_HeaderFile
#define _NMTDS_PassKeyMapHasher_HeaderFile
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class NMTDS_PassKey;
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
+#include <Standard_Integer.hxx>
+#include <NMTDS_PassKey.hxx>
+#include <Standard_Boolean.hxx>
+//=======================================================================
+//function : NMTDS_PassKeyMapHasher
+//purpose :
+//=======================================================================
class NMTDS_PassKeyMapHasher {
-
-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 NMTDS_PassKey& aPKey,const Standard_Integer Upper) ;
-
-
-Standard_EXPORT static Standard_Boolean IsEqual(const NMTDS_PassKey& aPKey1,const NMTDS_PassKey& aPKey2) ;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+ public:
+ Standard_EXPORT
+ static Standard_Integer HashCode(const NMTDS_PassKey& aPKey,
+ const Standard_Integer Upper) ;
+
+ Standard_EXPORT
+ static Standard_Boolean IsEqual(const NMTDS_PassKey& aPKey1,
+ const NMTDS_PassKey& aPKey2) ;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_PassKeyMapHasher.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTDS_PassKey_HeaderFile
-#include <NMTDS_PassKey.hxx>
-#endif
-#ifndef _NMTDS_PassKeyMapHasher_HeaderFile
-#include <NMTDS_PassKeyMapHasher.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- 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: NMTDS_PassKeyShape.cdl
--- Created:
--- Author: Peter KURNEV
---
-class PassKeyShape from NMTDS
-
- ---Purpose:
-
-uses
- Shape from TopoDS,
- ListOfShape from TopTools,
- IndexedMapOfShape from TopTools
-
---raises
-
-is
- Create
- returns PassKeyShape from NMTDS;
- ---C++: alias "Standard_EXPORT virtual ~NMTDS_PassKeyShape();"
-
- Create(Other:PassKeyShape from NMTDS)
- returns PassKeyShape from NMTDS;
-
- Assign(me:out;
- Other : PassKeyShape from NMTDS)
- returns PassKeyShape from NMTDS;
- ---C++: alias operator =
- ---C++: return &
-
- SetShapes(me:out;
- aS :Shape from TopoDS);
-
- SetShapes(me:out;
- aS1 :Shape from TopoDS;
- aS2 :Shape from TopoDS);
-
- SetShapes(me:out;
- aS1 :Shape from TopoDS;
- aS2 :Shape from TopoDS;
- aS3 :Shape from TopoDS);
-
- SetShapes(me:out;
- aS1 :Shape from TopoDS;
- aS2 :Shape from TopoDS;
- aS3 :Shape from TopoDS;
- aS4 :Shape from TopoDS);
-
- SetShapes(me:out;
- aLS :ListOfShape from TopTools);
-
- Clear(me:out);
-
-
- NbIds(me)
- returns Integer from Standard;
-
- IsEqual(me;
- aOther:PassKeyShape from NMTDS)
- returns Boolean from Standard;
-
- HashCode(me;
- Upper : Integer from Standard)
- returns Integer from Standard;
-
- Dump(me;
- aHex:Integer from Standard=0);
-
-fields
- 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;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <NMTDS_PassKeyShape.ixx>
+#include <NMTDS_PassKeyShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TopoDS_Shape.hxx>
static
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_PassKeyShape.hxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _NMTDS_PassKeyShape_HeaderFile
#define _NMTDS_PassKeyShape_HeaderFile
-#ifndef _Standard_Integer_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <Standard_Integer.hxx>
-#endif
-#ifndef _TopTools_IndexedMapOfShape_HeaderFile
#include <TopTools_IndexedMapOfShape.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-class TopoDS_Shape;
-class TopTools_ListOfShape;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
+#include <TopoDS_Shape.hxx>
+#include <TopTools_ListOfShape.hxx>
+//=======================================================================
+//function : NMTDS_PassKeyShape
+//purpose :
+//=======================================================================
class NMTDS_PassKeyShape {
-
-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 NMTDS_PassKeyShape();
-Standard_EXPORT virtual ~NMTDS_PassKeyShape();
-
-
-Standard_EXPORT NMTDS_PassKeyShape(const NMTDS_PassKeyShape& Other);
-
-
-Standard_EXPORT NMTDS_PassKeyShape& Assign(const NMTDS_PassKeyShape& Other) ;
- NMTDS_PassKeyShape& operator =(const NMTDS_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 Clear() ;
-
-
-Standard_EXPORT Standard_Integer NbIds() const;
-
-
-Standard_EXPORT Standard_Boolean IsEqual(const NMTDS_PassKeyShape& aOther) const;
-
-
-Standard_EXPORT Standard_Integer HashCode(const Standard_Integer Upper) const;
-
-
-Standard_EXPORT void Dump(const Standard_Integer aHex = 0) const;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-Standard_Integer myNbIds;
-Standard_Integer mySum;
-Standard_Integer myUpper;
-TopTools_IndexedMapOfShape myMap;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+ public:
+ Standard_EXPORT
+ NMTDS_PassKeyShape();
+
+ Standard_EXPORT
+ virtual ~NMTDS_PassKeyShape();
+
+ Standard_EXPORT
+ NMTDS_PassKeyShape(const NMTDS_PassKeyShape& Other);
+
+ Standard_EXPORT
+ NMTDS_PassKeyShape& Assign(const NMTDS_PassKeyShape& Other) ;
+
+ NMTDS_PassKeyShape& operator =(const NMTDS_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 Clear() ;
+
+ Standard_EXPORT
+ Standard_Integer NbIds() const;
+
+ Standard_EXPORT
+ Standard_Boolean IsEqual(const NMTDS_PassKeyShape& aOther) const;
+
+ Standard_EXPORT
+ Standard_Integer HashCode(const Standard_Integer Upper) const;
+
+ Standard_EXPORT
+ void Dump(const Standard_Integer aHex = 0) const;
+
+ protected:
+ Standard_Integer myNbIds;
+ Standard_Integer mySum;
+ Standard_Integer myUpper;
+ TopTools_IndexedMapOfShape myMap;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 <NMTDS_PassKeyShape.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _NMTDS_PassKeyShape_HeaderFile
-#include <NMTDS_PassKeyShape.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- 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: NMTDS_PassKeyMapHasher.cdl
--- Created:
--- Author: Peter KURNEV
---
-class PassKeyShapeMapHasher from NMTDS
-
- ---Purpose:
-
-uses
- PassKeyShape from NMTDS
-
---raises
-
-is
- HashCode(myclass;
- aPKey : PassKeyShape from NMTDS;
- Upper : Integer from Standard)
- returns Integer from Standard;
-
-
- IsEqual(myclass;
- aPKey1 : PassKeyShape from NMTDS;
- aPKey2 : PassKeyShape from NMTDS)
- returns Boolean from Standard;
-
-end PassKeyShapeMapHasher;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <NMTDS_PassKeyShapeMapHasher.ixx>
+#include <NMTDS_PassKeyShapeMapHasher.hxx>
//=======================================================================
//function : HashCode
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_PassKeyMapHasher.cxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _NMTDS_PassKeyShapeMapHasher_HeaderFile
#define _NMTDS_PassKeyShapeMapHasher_HeaderFile
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class NMTDS_PassKeyShape;
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
+#include <Standard_Integer.hxx>
+#include <NMTDS_PassKeyShape.hxx>
+#include <Standard_Boolean.hxx>
+//=======================================================================
+//function : NMTDS_PassKeyShapeMapHasher
+//purpose :
+//=======================================================================
class NMTDS_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 NMTDS_PassKeyShape& aPKey,const Standard_Integer Upper) ;
-
-
-Standard_EXPORT static Standard_Boolean IsEqual(const NMTDS_PassKeyShape& aPKey1,const NMTDS_PassKeyShape& aPKey2) ;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+ public:
+ Standard_EXPORT
+ static Standard_Integer HashCode(const NMTDS_PassKeyShape& aPKey,
+ const Standard_Integer Upper) ;
+
+ Standard_EXPORT
+ static Standard_Boolean IsEqual(const NMTDS_PassKeyShape& aPKey1,
+ const NMTDS_PassKeyShape& aPKey2) ;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 <NMTDS_PassKeyShapeMapHasher.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 _NMTDS_PassKeyShape_HeaderFile
-#include <NMTDS_PassKeyShape.hxx>
-#endif
-#ifndef _NMTDS_PassKeyShapeMapHasher_HeaderFile
-#include <NMTDS_PassKeyShapeMapHasher.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTDS_ShapesDataStructure.cdl
--- Created:
--- Author: Peter KURNEV
---
-class ShapesDataStructure from NMTDS
- inherits ShapesDataStructure from BooleanOperations
-
- ---Purpose:
-
-uses
- Box from Bnd,
- IndexedMapOfInteger from TColStd,
- Shape from TopoDS,
- IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations,
- CArray1OfIndexRange from NMTDS,
- --modified by NIZNHY-PKV Mon Dec 12 08:57:18 2011f
- DataMapOfShapeInteger from TopTools
- --IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger from NMTDS
- --modified by NIZNHY-PKV Mon Dec 12 08:57:22 2011t
---raises
-
-is
- Create
- returns ShapesDataStructure from NMTDS;
-
- SetCompositeShape(me:out;
- aS:Shape from TopoDS);
-
- Init(me:out);
-
- Ranges(me)
- returns CArray1OfIndexRange from NMTDS;
- ---C++: return const &
-
- CompositeShape(me)
- returns Shape from TopoDS;
- ---C++: return const &
-
- ShapeRangeIndex(me;
- aId:Integer from Standard)
- returns Integer from Standard;
-
- Rank (me;
- anIndex:Integer from Standard)
- returns Integer from Standard
- is redefined;
-
- ShapeIndex (me;
- aS:Shape from TopoDS;
- iRank:Integer from Standard)
- returns Integer from Standard
- is redefined;
-
- FillMap (me;
- aS :Shape from TopoDS;
- aMSA: out IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations;
- aMS : out IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations);
-
- FillSubshapes (me;
- aS :Shape from TopoDS;
- aMSA:out IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations;
- aMS :out IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations);
-
- GetAllSuccessors(me;
- anIndex:Integer from Standard;
- aScrs :out IndexedMapOfInteger from TColStd);
-
- ComputeBoxEx(me;
- anIndex:Integer from Standard;
- aBox:out Box from Bnd);
-
-fields
- myCompositeShape: Shape from TopoDS is protected;
- myRanges : CArray1OfIndexRange from NMTDS is protected;
- --modified by NIZNHY-PKV Mon Dec 12 08:58:07 2011f
- myShapeIndexMap : DataMapOfShapeInteger from TopTools is protected;
- --myShapeIndexMap : IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger from NMTDS is protected;
- --modified by NIZNHY-PKV Mon Dec 12 08:58:21 2011t
-end ShapesDataStructure;
-
// File: NMTDS_ShapesDataStructure.cxx
// Author: Peter KURNEV
-#include <NMTDS_ShapesDataStructure.ixx>
+#include <NMTDS_ShapesDataStructure.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-\r
-#ifndef _NMTDS_ShapesDataStructure_HeaderFile\r
-#define _NMTDS_ShapesDataStructure_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_Macro_HeaderFile\r
-#include <Standard_Macro.hxx>\r
-#endif\r
-\r
-#ifndef _TopoDS_Shape_HeaderFile\r
-#include <TopoDS_Shape.hxx>\r
-#endif\r
-#ifndef _NMTDS_CArray1OfIndexRange_HeaderFile\r
-#include <NMTDS_CArray1OfIndexRange.hxx>\r
-#endif\r
-#ifndef _TopTools_DataMapOfShapeInteger_HeaderFile\r
-#include <TopTools_DataMapOfShapeInteger.hxx>\r
-#endif\r
-#ifndef _BooleanOperations_ShapesDataStructure_HeaderFile\r
-#include <BooleanOperations_ShapesDataStructure.hxx>\r
-#endif\r
-#ifndef _Standard_Integer_HeaderFile\r
-#include <Standard_Integer.hxx>\r
-#endif\r
-class TopoDS_Shape;\r
-class NMTDS_CArray1OfIndexRange;\r
-class BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors;\r
-class TColStd_IndexedMapOfInteger;\r
-class Bnd_Box;\r
-\r
-\r
-\r
-class NMTDS_ShapesDataStructure : public BooleanOperations_ShapesDataStructure {\r
-public:\r
-\r
- void* operator new(size_t,void* anAddress) \r
- {\r
- return anAddress;\r
- }\r
- void* operator new(size_t size) \r
- {\r
- return Standard::Allocate(size); \r
- }\r
- void operator delete(void *anAddress) \r
- {\r
- if (anAddress) Standard::Free((Standard_Address&)anAddress); \r
- }\r
-\r
- \r
- Standard_EXPORT NMTDS_ShapesDataStructure();\r
- \r
- Standard_EXPORT void SetCompositeShape(const TopoDS_Shape& aS) ;\r
- \r
- Standard_EXPORT void Init() ;\r
- \r
- Standard_EXPORT const NMTDS_CArray1OfIndexRange& Ranges() const;\r
- \r
- Standard_EXPORT const TopoDS_Shape& CompositeShape() const;\r
- \r
- Standard_EXPORT Standard_Integer ShapeRangeIndex(const Standard_Integer aId) const;\r
- \r
- Standard_EXPORT virtual Standard_Integer Rank(const Standard_Integer anIndex) const;\r
- \r
- Standard_EXPORT virtual Standard_Integer ShapeIndex(const TopoDS_Shape& aS,const Standard_Integer iRank) const;\r
- \r
- Standard_EXPORT void FillMap(const TopoDS_Shape& aS,BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const;\r
- \r
- Standard_EXPORT void FillSubshapes(const TopoDS_Shape& aS,BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const;\r
- \r
- Standard_EXPORT void GetAllSuccessors(const Standard_Integer anIndex,TColStd_IndexedMapOfInteger& aScrs) const;\r
- \r
- Standard_EXPORT void ComputeBoxEx(const Standard_Integer anIndex,Bnd_Box& aBox) const;\r
-\r
-\r
-\r
-\r
-\r
-protected:\r
-\r
-\r
-\r
-TopoDS_Shape myCompositeShape;\r
-NMTDS_CArray1OfIndexRange myRanges;\r
-TopTools_DataMapOfShapeInteger myShapeIndexMap;\r
-\r
-\r
-private:\r
-\r
-\r
-\r
-\r
-\r
-};\r
-\r
-\r
-\r
-\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+
+
+#ifndef _NMTDS_ShapesDataStructure_HeaderFile
+#define _NMTDS_ShapesDataStructure_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
+#include <TopoDS_Shape.hxx>
+#include <NMTDS_CArray1OfIndexRange.hxx>
+#include <TopTools_DataMapOfShapeInteger.hxx>
+#include <BooleanOperations_ShapesDataStructure.hxx>
+#include <Standard_Integer.hxx>
+#include <TopoDS_Shape.hxx>
+#include <NMTDS_CArray1OfIndexRange.hxx>
+#include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
+#include <TColStd_IndexedMapOfInteger.hxx>
+#include <Bnd_Box.hxx>
+
+//=======================================================================
+//class : NMTDS_ShapesDataStructure
+//purpose :
+//=======================================================================
+class NMTDS_ShapesDataStructure : public BooleanOperations_ShapesDataStructure
+{
+ public:
+ Standard_EXPORT
+ NMTDS_ShapesDataStructure();
+
+ Standard_EXPORT
+ void SetCompositeShape(const TopoDS_Shape& aS) ;
+
+ Standard_EXPORT
+ void Init() ;
+
+ Standard_EXPORT
+ const NMTDS_CArray1OfIndexRange& Ranges() const;
+
+ Standard_EXPORT
+ const TopoDS_Shape& CompositeShape() const;
+
+ Standard_EXPORT
+ Standard_Integer ShapeRangeIndex(const Standard_Integer aId) const;
+
+ Standard_EXPORT
+ virtual Standard_Integer Rank(const Standard_Integer anIndex) const;
+
+ Standard_EXPORT
+ virtual Standard_Integer ShapeIndex(const TopoDS_Shape& aS,
+ const Standard_Integer iRank) const;
+
+ Standard_EXPORT
+ void FillMap(const TopoDS_Shape& aS,
+ BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,
+ BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const;
+
+ Standard_EXPORT
+ void FillSubshapes(const TopoDS_Shape& aS,
+ BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,
+ BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const;
+
+ Standard_EXPORT
+ void GetAllSuccessors(const Standard_Integer anIndex,
+ TColStd_IndexedMapOfInteger& aScrs) const;
+
+ Standard_EXPORT
+ void ComputeBoxEx(const Standard_Integer anIndex,
+ Bnd_Box& aBox) const;
+
+
+ protected:
+ TopoDS_Shape myCompositeShape;
+ NMTDS_CArray1OfIndexRange myRanges;
+ TopTools_DataMapOfShapeInteger myShapeIndexMap;
+};
+#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_ShapesDataStructure.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTDS_CArray1OfIndexRange_HeaderFile
-#include <NMTDS_CArray1OfIndexRange.hxx>
-#endif
-#ifndef _BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#endif
-#ifndef _TColStd_IndexedMapOfInteger_HeaderFile
-#include <TColStd_IndexedMapOfInteger.hxx>
-#endif
-#ifndef _Bnd_Box_HeaderFile
-#include <Bnd_Box.hxx>
-#endif
-#ifndef _NMTDS_ShapesDataStructure_HeaderFile
-#include <NMTDS_ShapesDataStructure.hxx>
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#ifndef _NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile\r
-#define _NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile\r
-\r
-#ifndef _Standard_HeaderFile\r
-#include <Standard.hxx>\r
-#endif\r
-#ifndef _Standard_DefineHandle_HeaderFile\r
-#include <Standard_DefineHandle.hxx>\r
-#endif\r
-#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile\r
-#include <Handle_NMTDS_StdMapNodeOfMapOfPairBoolean.hxx>\r
-#endif\r
-\r
-#ifndef _NMTDS_PairBoolean_HeaderFile\r
-#include <NMTDS_PairBoolean.hxx>\r
-#endif\r
-#ifndef _TCollection_MapNode_HeaderFile\r
-#include <TCollection_MapNode.hxx>\r
-#endif\r
-#ifndef _TCollection_MapNodePtr_HeaderFile\r
-#include <TCollection_MapNodePtr.hxx>\r
-#endif\r
-class NMTDS_PairBoolean;\r
-class NMTDS_PairMapHasher;\r
-class NMTDS_MapOfPairBoolean;\r
-class NMTDS_MapIteratorOfMapOfPairBoolean;\r
-\r
-\r
-\r
-class NMTDS_StdMapNodeOfMapOfPairBoolean : public TCollection_MapNode {\r
-\r
-public:\r
-\r
- \r
- NMTDS_StdMapNodeOfMapOfPairBoolean(const NMTDS_PairBoolean& K,const TCollection_MapNodePtr& n);\r
- \r
- NMTDS_PairBoolean& Key() const;\r
-\r
-\r
-\r
-\r
- DEFINE_STANDARD_RTTI(NMTDS_StdMapNodeOfMapOfPairBoolean)\r
-\r
-protected:\r
-\r
-\r
-\r
-\r
-private: \r
-\r
-\r
-NMTDS_PairBoolean myKey;\r
-\r
-\r
-};\r
-\r
-#define TheKey NMTDS_PairBoolean\r
-#define TheKey_hxx <NMTDS_PairBoolean.hxx>\r
-#define Hasher NMTDS_PairMapHasher\r
-#define Hasher_hxx <NMTDS_PairMapHasher.hxx>\r
-#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPairBoolean\r
-#define TCollection_StdMapNode_hxx <NMTDS_StdMapNodeOfMapOfPairBoolean.hxx>\r
-#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPairBoolean\r
-#define TCollection_MapIterator_hxx <NMTDS_MapIteratorOfMapOfPairBoolean.hxx>\r
-#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPairBoolean\r
-#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPairBoolean_Type_()\r
-#define TCollection_Map NMTDS_MapOfPairBoolean\r
-#define TCollection_Map_hxx <NMTDS_MapOfPairBoolean.hxx>\r
-\r
-#include <TCollection_StdMapNode.lxx>\r
-\r
-#undef TheKey\r
-#undef TheKey_hxx\r
-#undef Hasher\r
-#undef Hasher_hxx\r
-#undef TCollection_StdMapNode\r
-#undef TCollection_StdMapNode_hxx\r
-#undef TCollection_MapIterator\r
-#undef TCollection_MapIterator_hxx\r
-#undef Handle_TCollection_StdMapNode\r
-#undef TCollection_StdMapNode_Type_\r
-#undef TCollection_Map\r
-#undef TCollection_Map_hxx\r
-\r
-\r
-// other Inline functions and methods (like "C++: function call" methods)\r
-\r
-\r
-#endif\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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
-//
-\r
-#include <NMTDS_StdMapNodeOfMapOfPairBoolean.hxx>\r
-\r
-#ifndef _Standard_Type_HeaderFile\r
-#include <Standard_Type.hxx>\r
-#endif\r
-\r
-#ifndef _NMTDS_PairBoolean_HeaderFile\r
-#include <NMTDS_PairBoolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_PairMapHasher_HeaderFile\r
-#include <NMTDS_PairMapHasher.hxx>\r
-#endif\r
-#ifndef _NMTDS_MapOfPairBoolean_HeaderFile\r
-#include <NMTDS_MapOfPairBoolean.hxx>\r
-#endif\r
-#ifndef _NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile\r
-#include <NMTDS_MapIteratorOfMapOfPairBoolean.hxx>\r
-#endif\r
-\r
- \r
-\r
-\r
-IMPLEMENT_STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPairBoolean)\r
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()\r
- STANDARD_TYPE(TCollection_MapNode),\r
- STANDARD_TYPE(MMgt_TShared),\r
- STANDARD_TYPE(Standard_Transient),\r
-\r
-IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()\r
-IMPLEMENT_STANDARD_TYPE_END(NMTDS_StdMapNodeOfMapOfPairBoolean)\r
-\r
-\r
-IMPLEMENT_DOWNCAST(NMTDS_StdMapNodeOfMapOfPairBoolean,Standard_Transient)\r
-IMPLEMENT_STANDARD_RTTI(NMTDS_StdMapNodeOfMapOfPairBoolean)\r
-\r
-\r
-#define TheKey NMTDS_PairBoolean\r
-#define TheKey_hxx <NMTDS_PairBoolean.hxx>\r
-#define Hasher NMTDS_PairMapHasher\r
-#define Hasher_hxx <NMTDS_PairMapHasher.hxx>\r
-#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPairBoolean\r
-#define TCollection_StdMapNode_hxx <NMTDS_StdMapNodeOfMapOfPairBoolean.hxx>\r
-#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPairBoolean\r
-#define TCollection_MapIterator_hxx <NMTDS_MapIteratorOfMapOfPairBoolean.hxx>\r
-#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPairBoolean\r
-#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPairBoolean_Type_()\r
-#define TCollection_Map NMTDS_MapOfPairBoolean\r
-#define TCollection_Map_hxx <NMTDS_MapOfPairBoolean.hxx>\r
-#include <TCollection_StdMapNode.gxx>\r
-\r
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile
-#define _NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile
-#include <Handle_NMTDS_StdMapNodeOfMapOfPassKey.hxx>
-#endif
-
-#ifndef _NMTDS_PassKey_HeaderFile
-#include <NMTDS_PassKey.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-class NMTDS_PassKey;
-class NMTDS_PassKeyMapHasher;
-class NMTDS_MapOfPassKey;
-class NMTDS_MapIteratorOfMapOfPassKey;
-
-
-
-class NMTDS_StdMapNodeOfMapOfPassKey : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTDS_StdMapNodeOfMapOfPassKey(const NMTDS_PassKey& K,const TCollection_MapNodePtr& n);
-
- NMTDS_PassKey& Key() const;
-//Standard_EXPORT ~NMTDS_StdMapNodeOfMapOfPassKey();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-NMTDS_PassKey myKey;
-
-
-};
-
-#define TheKey NMTDS_PassKey
-#define TheKey_hxx <NMTDS_PassKey.hxx>
-#define Hasher NMTDS_PassKeyMapHasher
-#define Hasher_hxx <NMTDS_PassKeyMapHasher.hxx>
-#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPassKey
-#define TCollection_MapIterator_hxx <NMTDS_MapIteratorOfMapOfPassKey.hxx>
-#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPassKey
-#define TCollection_StdMapNode_hxx <NMTDS_StdMapNodeOfMapOfPassKey.hxx>
-#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPassKey
-#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPassKey_Type_()
-#define TCollection_Map NMTDS_MapOfPassKey
-#define TCollection_Map_hxx <NMTDS_MapOfPassKey.hxx>
-
-#include <TCollection_StdMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_MapIterator
-#undef TCollection_MapIterator_hxx
-#undef TCollection_StdMapNode
-#undef TCollection_StdMapNode_hxx
-#undef Handle_TCollection_StdMapNode
-#undef TCollection_StdMapNode_Type_
-#undef TCollection_Map
-#undef TCollection_Map_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile
-#define _NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile
-#include <Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx>
-#endif
-
-#ifndef _NMTDS_PassKeyBoolean_HeaderFile
-#include <NMTDS_PassKeyBoolean.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-class NMTDS_PassKeyBoolean;
-class NMTDS_PassKeyMapHasher;
-class NMTDS_MapOfPassKeyBoolean;
-class NMTDS_MapIteratorOfMapOfPassKeyBoolean;
-
-
-
-class NMTDS_StdMapNodeOfMapOfPassKeyBoolean : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTDS_StdMapNodeOfMapOfPassKeyBoolean(const NMTDS_PassKeyBoolean& K,const TCollection_MapNodePtr& n);
-
- NMTDS_PassKeyBoolean& Key() const;
-//Standard_EXPORT ~NMTDS_StdMapNodeOfMapOfPassKeyBoolean();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-NMTDS_PassKeyBoolean myKey;
-
-
-};
-
-#define TheKey NMTDS_PassKeyBoolean
-#define TheKey_hxx <NMTDS_PassKeyBoolean.hxx>
-#define Hasher NMTDS_PassKeyMapHasher
-#define Hasher_hxx <NMTDS_PassKeyMapHasher.hxx>
-#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPassKeyBoolean
-#define TCollection_MapIterator_hxx <NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx>
-#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPassKeyBoolean
-#define TCollection_StdMapNode_hxx <NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx>
-#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean
-#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPassKeyBoolean_Type_()
-#define TCollection_Map NMTDS_MapOfPassKeyBoolean
-#define TCollection_Map_hxx <NMTDS_MapOfPassKeyBoolean.hxx>
-
-#include <TCollection_StdMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_MapIterator
-#undef TCollection_MapIterator_hxx
-#undef TCollection_StdMapNode
-#undef TCollection_StdMapNode_hxx
-#undef Handle_TCollection_StdMapNode
-#undef TCollection_StdMapNode_Type_
-#undef TCollection_Map
-#undef TCollection_Map_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _NMTDS_PassKeyBoolean_HeaderFile
-#include <NMTDS_PassKeyBoolean.hxx>
-#endif
-#ifndef _NMTDS_PassKeyMapHasher_HeaderFile
-#include <NMTDS_PassKeyMapHasher.hxx>
-#endif
-#ifndef _NMTDS_MapOfPassKeyBoolean_HeaderFile
-#include <NMTDS_MapOfPassKeyBoolean.hxx>
-#endif
-#ifndef _NMTDS_MapIteratorOfMapOfPassKeyBoolean_HeaderFile
-#include <NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx>
-#endif
-//NMTDS_StdMapNodeOfMapOfPassKeyBoolean::~NMTDS_StdMapNodeOfMapOfPassKeyBoolean() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTDS_StdMapNodeOfMapOfPassKeyBoolean_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTDS_StdMapNodeOfMapOfPassKeyBoolean",
- sizeof(NMTDS_StdMapNodeOfMapOfPassKeyBoolean),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean) Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPassKeyBoolean))) {
- _anOtherObject = Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)((Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTDS_StdMapNodeOfMapOfPassKeyBoolean::DynamicType() const
-{
- return STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPassKeyBoolean) ;
-}
-//Standard_Boolean NMTDS_StdMapNodeOfMapOfPassKeyBoolean::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPassKeyBoolean) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean::~Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean() {}
-#define TheKey NMTDS_PassKeyBoolean
-#define TheKey_hxx <NMTDS_PassKeyBoolean.hxx>
-#define Hasher NMTDS_PassKeyMapHasher
-#define Hasher_hxx <NMTDS_PassKeyMapHasher.hxx>
-#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPassKeyBoolean
-#define TCollection_MapIterator_hxx <NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx>
-#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPassKeyBoolean
-#define TCollection_StdMapNode_hxx <NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx>
-#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean
-#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPassKeyBoolean_Type_()
-#define TCollection_Map NMTDS_MapOfPassKeyBoolean
-#define TCollection_Map_hxx <NMTDS_MapOfPassKeyBoolean.hxx>
-#include <TCollection_StdMapNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTDS_StdMapNodeOfMapOfPassKey.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _NMTDS_PassKey_HeaderFile
-#include <NMTDS_PassKey.hxx>
-#endif
-#ifndef _NMTDS_PassKeyMapHasher_HeaderFile
-#include <NMTDS_PassKeyMapHasher.hxx>
-#endif
-#ifndef _NMTDS_MapOfPassKey_HeaderFile
-#include <NMTDS_MapOfPassKey.hxx>
-#endif
-#ifndef _NMTDS_MapIteratorOfMapOfPassKey_HeaderFile
-#include <NMTDS_MapIteratorOfMapOfPassKey.hxx>
-#endif
-//NMTDS_StdMapNodeOfMapOfPassKey::~NMTDS_StdMapNodeOfMapOfPassKey() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTDS_StdMapNodeOfMapOfPassKey_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTDS_StdMapNodeOfMapOfPassKey",
- sizeof(NMTDS_StdMapNodeOfMapOfPassKey),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTDS_StdMapNodeOfMapOfPassKey) Handle(NMTDS_StdMapNodeOfMapOfPassKey)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTDS_StdMapNodeOfMapOfPassKey) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPassKey))) {
- _anOtherObject = Handle(NMTDS_StdMapNodeOfMapOfPassKey)((Handle(NMTDS_StdMapNodeOfMapOfPassKey)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTDS_StdMapNodeOfMapOfPassKey::DynamicType() const
-{
- return STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPassKey) ;
-}
-//Standard_Boolean NMTDS_StdMapNodeOfMapOfPassKey::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPassKey) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTDS_StdMapNodeOfMapOfPassKey::~Handle_NMTDS_StdMapNodeOfMapOfPassKey() {}
-#define TheKey NMTDS_PassKey
-#define TheKey_hxx <NMTDS_PassKey.hxx>
-#define Hasher NMTDS_PassKeyMapHasher
-#define Hasher_hxx <NMTDS_PassKeyMapHasher.hxx>
-#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPassKey
-#define TCollection_MapIterator_hxx <NMTDS_MapIteratorOfMapOfPassKey.hxx>
-#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPassKey
-#define TCollection_StdMapNode_hxx <NMTDS_StdMapNodeOfMapOfPassKey.hxx>
-#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPassKey
-#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPassKey_Type_()
-#define TCollection_Map NMTDS_MapOfPassKey
-#define TCollection_Map_hxx <NMTDS_MapOfPassKey.hxx>
-#include <TCollection_StdMapNode.gxx>
-
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- 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: NMTDS_Tools.cdl
--- Created: Tue Feb 20 14:56:14 2007
--- Author: Peter KURNEV
---
-class Tools from NMTDS
-
- ---Purpose:
-
-uses
- ShapeEnum from TopAbs,
- Vertex from TopoDS,
- Shape from TopoDS,
- IndexedDataMapOfShapeShape from TopTools
-
---raises
-
-is
- TypeToInteger(myclass;
- aT1: ShapeEnum from TopAbs;
- aT2: ShapeEnum from TopAbs)
- returns Integer from Standard;
-
- HasBRep(myclass;
- aT: ShapeEnum from TopAbs)
- returns Boolean from Standard;
-
- ComputeVV(myclass;
- aV1:Vertex from TopoDS;
- aV2:Vertex from TopoDS)
- returns Integer from Standard;
-
- CopyShape(myclass;
- aS:Shape from TopoDS;
- aSC:out Shape from TopoDS);
-
- CopyShape(myclass;
- aS:Shape from TopoDS;
- aSC :out Shape from TopoDS;
- aMSS :out IndexedDataMapOfShapeShape from TopTools);
---fields
-
-end Tools;
// Created: Tue Feb 20 14:57:28 2007
// Author: Peter KURNEV
-#include <NMTDS_Tools.ixx>
+#include <NMTDS_Tools.hxx>
#include <TopoDS_Vertex.hxx>
#include <gp_Pnt.hxx>
#include <BRep_Tool.hxx>
//
bFree=aSC.Free();
aSC.Free(Standard_True);
- //modified by NIZNHY-PKV Fri Nov 25 10:10:03 2011f
aSF=aS;
if (aT==TopAbs_EDGE){
TopAbs_Orientation aOr;
}
}
aIt.Initialize(aSF);
- //aIt.Initialize(aS);
- //modified by NIZNHY-PKV Fri Nov 25 10:10:05 2011t
for (; aIt.More(); aIt.Next()) {
TopoDS_Shape aSCx;
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_Tools.hxx
+// Created:
+// Author: Peter KURNEV
+
#ifndef _NMTDS_Tools_HeaderFile
#define _NMTDS_Tools_HeaderFile
-#ifndef _Standard_Integer_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <Standard_Integer.hxx>
-#endif
-#ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-class TopoDS_Vertex;
-class TopoDS_Shape;
-class TopTools_IndexedDataMapOfShapeShape;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTDS_Tools {
-
-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 TypeToInteger(const TopAbs_ShapeEnum aT1,const TopAbs_ShapeEnum aT2) ;
-
-
-Standard_EXPORT static Standard_Boolean HasBRep(const TopAbs_ShapeEnum aT) ;
-
-
-Standard_EXPORT static Standard_Integer ComputeVV(const TopoDS_Vertex& aV1,const TopoDS_Vertex& aV2) ;
-
-
-Standard_EXPORT static void CopyShape(const TopoDS_Shape& aS,TopoDS_Shape& aSC) ;
-
-
-Standard_EXPORT static void CopyShape(const TopoDS_Shape& aS,TopoDS_Shape& aSC,TopTools_IndexedDataMapOfShapeShape& aMSS) ;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+#include <TopoDS_Vertex.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopTools_IndexedDataMapOfShapeShape.hxx>
+
+//=======================================================================
+//function : NMTDS_Tools
+//purpose :
+//=======================================================================
+class NMTDS_Tools
+{
+ public:
+ Standard_EXPORT
+ static Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aT1,
+ const TopAbs_ShapeEnum aT2) ;
+
+ Standard_EXPORT
+ static Standard_Boolean HasBRep(const TopAbs_ShapeEnum aT) ;
+
+ Standard_EXPORT
+ static Standard_Integer ComputeVV(const TopoDS_Vertex& aV1,
+ const TopoDS_Vertex& aV2) ;
+
+ Standard_EXPORT
+ static void CopyShape(const TopoDS_Shape& aS,
+ TopoDS_Shape& aSC) ;
+
+ Standard_EXPORT
+ static void CopyShape(const TopoDS_Shape& aS,
+ TopoDS_Shape& aSC,
+ TopTools_IndexedDataMapOfShapeShape& aMSS) ;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 <NMTDS_Tools.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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_Vertex_HeaderFile
-#include <TopoDS_Vertex.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopTools_IndexedDataMapOfShapeShape_HeaderFile
-#include <TopTools_IndexedDataMapOfShapeShape.hxx>
-#endif
-#ifndef _NMTDS_Tools_HeaderFile
-#include <NMTDS_Tools.hxx>
-#endif
+++ /dev/null
-Basics_OCCTVersion.hxx
-
-NMTDS_BoxBndTree.cxx
-NMTDS_BoxBndTree.hxx
-NMTDS_BndSphereTree.cxx
-NMTDS_BndSphereTree.hxx
-NMTDS_BndSphere.hxx
-NMTDS_BndSphere.cxx
-NMTDS_BndSphere.lxx
-NMTDS_IndexRange.hxx
-NMTDS_IndexRange.cxx
-NMTDS_InterfPool.hxx
-NMTDS_InterfPool.cxx
-NMTDS_Iterator.hxx
-NMTDS_Iterator.cxx
-NMTDS_IteratorCheckerSI.hxx
-NMTDS_IteratorCheckerSI.cxx
-NMTDS_Pair.hxx
-NMTDS_Pair.cxx
-NMTDS_PairBoolean.hxx
-NMTDS_PairBoolean.cxx
-NMTDS_PairMapHasher.hxx
-NMTDS_PairMapHasher.cxx
-NMTDS_PassKey.hxx
-NMTDS_PassKey.cxx
-NMTDS_PassKeyBoolean.hxx
-NMTDS_PassKeyBoolean.cxx
-NMTDS_PassKeyMapHasher.hxx
-NMTDS_PassKeyMapHasher.cxx
-NMTDS_PassKeyShape.hxx
-NMTDS_PassKeyShape.cxx
-NMTDS_PassKeyShapeMapHasher.hxx
-NMTDS_PassKeyShapeMapHasher.cxx
-NMTDS_Tools.hxx
-NMTDS_Tools.cxx
-NMTDS_ShapesDataStructure.hxx
-NMTDS_ShapesDataStructure.cxx
-NMTDS_InterfType.hxx
-NMTDS_PInterfPool.hxx
-NMTDS_PIterator.hxx
-NMTDS_PShapesDataStructure.hxx
-
-NMTDS_ListOfPassKey.hxx
-NMTDS_ListIteratorOfListOfPassKey.hxx
-NMTDS_ListOfPassKeyBoolean.hxx
-NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx
-NMTDS_ListOfPair.hxx
-NMTDS_ListIteratorOfListOfPair.hxx
-NMTDS_ListOfPairBoolean.hxx
-NMTDS_ListIteratorOfListOfPairBoolean.hxx
-NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
-NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
-NMTDS_MapOfPassKey.hxx
-NMTDS_MapIteratorOfMapOfPassKey.hxx
-NMTDS_MapOfPassKeyBoolean.hxx
-NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx
-NMTDS_MapOfPairBoolean.hxx
-NMTDS_MapIteratorOfMapOfPairBoolean.hxx
-NMTDS_IndexedDataMapOfShapeBox.hxx
-NMTDS_IndexedDataMapOfIntegerShape.hxx
-NMTDS_IndexedDataMapOfShapeBndSphere.hxx
-NMTDS_DataMapOfIntegerMapOfInteger.hxx
-NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx
-
-NMTDS_CArray1OfIndexRange.hxx
-NMTDS_CArray1OfIndexRange.cxx
+++ /dev/null
-
-#
-# 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
-
-# GEOM NMTAlgo : partition algorithm
-# File : Makefile.in
-# Author : Julia DOROVSKIKH
-# Modified by : Alexander BORODIN (OCN) - autotools usage
-# Module : GEOM
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-# header files
-salomeinclude_HEADERS = \
- NMTDS_BndSphere.hxx \
- NMTDS_BndSphere.lxx \
- NMTDS_BndSphereTree.hxx \
- NMTDS_BoxBndTree.hxx \
- NMTDS_CArray1OfIndexRange.hxx \
- NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx \
- NMTDS_DataMapOfIntegerMapOfInteger.hxx \
- NMTDS_IndexedDataMapOfIntegerShape.hxx \
- NMTDS_IndexedDataMapOfShapeBndSphere.hxx \
- NMTDS_IndexedDataMapOfShapeBox.hxx \
- NMTDS_IndexRange.hxx \
- NMTDS_InterfPool.hxx \
- NMTDS_InterfType.hxx \
- NMTDS_IteratorCheckerSI.hxx \
- NMTDS_Iterator.hxx \
- NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \
- NMTDS_ListIteratorOfListOfPairBoolean.hxx \
- NMTDS_ListIteratorOfListOfPair.hxx \
- NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx \
- NMTDS_ListIteratorOfListOfPassKey.hxx \
- NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \
- NMTDS_ListOfPairBoolean.hxx \
- NMTDS_ListOfPair.hxx \
- NMTDS_ListOfPassKeyBoolean.hxx \
- NMTDS_ListOfPassKey.hxx \
- NMTDS_MapIteratorOfMapOfPairBoolean.hxx \
- NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx \
- NMTDS_MapIteratorOfMapOfPassKey.hxx \
- NMTDS_MapOfPairBoolean.hxx \
- NMTDS_MapOfPassKeyBoolean.hxx \
- NMTDS_MapOfPassKey.hxx \
- NMTDS_PairBoolean.hxx \
- NMTDS_Pair.hxx \
- NMTDS_PairMapHasher.hxx \
- NMTDS_PassKeyBoolean.hxx \
- NMTDS_PassKey.hxx \
- NMTDS_PassKeyMapHasher.hxx \
- NMTDS_PassKeyShape.hxx \
- NMTDS_PassKeyShapeMapHasher.hxx \
- NMTDS_PInterfPool.hxx \
- NMTDS_PIterator.hxx \
- NMTDS_PShapesDataStructure.hxx \
- NMTDS_ShapesDataStructure.hxx \
- NMTDS_Tools.hxx
-
-# Libraries targets
-lib_LTLIBRARIES = libNMTDS.la
-
-dist_libNMTDS_la_SOURCES = \
- NMTDS_BndSphere.cxx \
- NMTDS_BndSphereTree.cxx \
- NMTDS_BoxBndTree.cxx \
- NMTDS_CArray1OfIndexRange.cxx \
- NMTDS_IndexRange.cxx \
- NMTDS_InterfPool.cxx \
- NMTDS_IteratorCheckerSI.cxx \
- NMTDS_Iterator.cxx \
- NMTDS_PairBoolean.cxx \
- NMTDS_Pair.cxx \
- NMTDS_PairMapHasher.cxx \
- NMTDS_PassKeyBoolean.cxx \
- NMTDS_PassKey.cxx \
- NMTDS_PassKeyMapHasher.cxx \
- NMTDS_PassKeyShape.cxx \
- NMTDS_PassKeyShapeMapHasher.cxx \
- NMTDS_ShapesDataStructure.cxx \
- NMTDS_Tools.cxx
-
-# additional information to compile and link file
-
-libNMTDS_la_CPPFLAGS = \
- $(CAS_CPPFLAGS) \
- $(KERNEL_CXXFLAGS)
-
-libNMTDS_la_LDFLAGS = \
- $(STDLIB) \
- $(CAS_LDPATH) -lTKBool -lTKBO
-
-# extra dist files
-CDL_FILES = NMTDS.cdl
-
-EXTRA_DIST += \
- $(CDL_FILES) \
- FILES
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTDS.cdl
--- Created: Fri Nov 28 10:13:19 2003
--- Author: Peter KURNEV
---
-package NMTDS
-
- ---Purpose:
-
---uses
- --TCollection,
- --TColStd,
- --gp,
- --Bnd,
- --TopoDS,
- --TopAbs,
- --TopTools,
- --BooleanOperations,
- --BOPTools,
- --BOPTColStd
-
-is
- imported InterfType from NMTDS;
- imported BndSphere from NMTDS;
- imported IndexRange from NMTDS;
- imported InterfPool from NMTDS;
- imported Iterator from NMTDS;
- imported IteratorCheckerSI from NMTDS;
- imported Pair from NMTDS;
- imported PairBoolean from NMTDS;
- imported PairMapHasher from NMTDS;
- imported PassKey from NMTDS;
- imported PassKeyBoolean from NMTDS;
- imported PassKeyMapHasher from NMTDS;
- imported PassKeyShape from NMTDS;
- imported PassKeyShapeMapHasher from NMTDS;
- imported Tools from NMTDS;
- imported ShapesDataStructure from NMTDS;
- imported PShapesDataStructure from NMTDS;
- imported PIterator from NMTDS;
- imported PInterfPool from NMTDS;
- --
- imported ListOfPassKey from NMTDS;
- imported ListIteratorOfListOfPassKey from NMTDS;
-
- imported ListOfPassKeyBoolean from NMTDS;
- imported ListIteratorOfListOfPassKeyBoolean from NMTDS;
-
- imported ListOfPair from NMTDS;
- imported ListIteratorOfListOfPair from NMTDS;
-
- imported ListOfPairBoolean from NMTDS;
- imported ListIteratorOfListOfPairBoolean from NMTDS;
-
- imported ListOfIndexedDataMapOfShapeAncestorsSuccessors from NMTDS;
- imported ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors from NMTDS;
-
- imported MapOfPassKey from NMTDS;
- imported MapIteratorOfMapOfPassKey from NMTDS;
-
- imported MapOfPairBoolean from NMTDS;
- imported MapIteratorOfMapOfPairBoolean from NMTDS;
-
- imported IndexedDataMapOfShapeBox from NMTDS;
- imported IndexedDataMapOfIntegerShape from NMTDS;
- imported IndexedDataMapOfShapeBndSphere from NMTDS;
-
- imported DataMapOfIntegerMapOfInteger from NMTDS;
- imported DataMapIteratorOfDataMapOfIntegerMapOfInteger from NMTDS;
-
- imported CArray1OfIndexRange from NMTDS;
-
-end NMTDS;
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_BndSphere.cxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTDS_BndSphere.hxx>
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- NMTDS_BndSphere::NMTDS_BndSphere()
-{
- myCenter.SetCoord(0., 0., 0.);
- myRadius=0.;
- myGap=0.;
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
- NMTDS_BndSphere::~NMTDS_BndSphere()
-{
-}
-//=======================================================================
-//function : IsOut
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_BndSphere::IsOut(const NMTDS_BndSphere& theOther)const
-{
- Standard_Real aD2, aT2;
- //
- aD2=myCenter.SquareDistance(theOther.myCenter);
- aT2=myRadius+myGap+theOther.myRadius+theOther.myGap;
- aT2=aT2*aT2;
- //
- return aD2>aT2;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_BndSphere.hxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-
-#ifndef _NMTDS_BndSphere_HeaderFile
-#define _NMTDS_BndSphere_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <gp_Pnt.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Boolean.hxx>
-
-//=======================================================================
-//class : NMTDS_BndSphere
-//purpose :
-//=======================================================================
-class NMTDS_BndSphere {
- public:
- Standard_EXPORT
- NMTDS_BndSphere();
-
- Standard_EXPORT
- virtual ~NMTDS_BndSphere();
-
- void SetCenter(const gp_Pnt& theP) ;
-
- const gp_Pnt& Center() const;
-
- void SetRadius(const Standard_Real theR) ;
-
- Standard_Real Radius() const;
-
- void SetGap(const Standard_Real theGap) ;
-
- Standard_Real Gap() const;
-
- void Add(const NMTDS_BndSphere& theOther) ;
-
- Standard_EXPORT
- Standard_Boolean IsOut(const NMTDS_BndSphere& theOther) const;
-
- Standard_Real SquareExtent() const;
-
- protected:
- gp_Pnt myCenter;
- Standard_Real myRadius;
- Standard_Real myGap;
-};
-
-#include <NMTDS_BndSphere.lxx>
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_BndSphere.lxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//=======================================================================
-//function : SetCenter
-//purpose :
-//=======================================================================
- inline void NMTDS_BndSphere::SetCenter(const gp_Pnt& theP)
-//
-{
- myCenter=theP;
-}
-//=======================================================================
-//function : Center
-//purpose :
-//=======================================================================
- inline const gp_Pnt& NMTDS_BndSphere::Center()const
-{
- return myCenter;
-}
-//=======================================================================
-//function : SetRadius
-//purpose :
-//=======================================================================
- inline void NMTDS_BndSphere::SetRadius(const Standard_Real theR)
-{
- myRadius=theR;
-}
-//=======================================================================
-//function : Radius
-//purpose :
-//=======================================================================
- inline Standard_Real NMTDS_BndSphere::Radius()const
-{
- return myRadius;
-}
-//=======================================================================
-//function : SetGap
-//purpose :
-//=======================================================================
- inline void NMTDS_BndSphere::SetGap(const Standard_Real theGap)
-{
- myGap=theGap;
-}
-//=======================================================================
-//function : Gap
-//purpose :
-//=======================================================================
- inline Standard_Real NMTDS_BndSphere::Gap()const
-{
- return myGap;
-}
-//=======================================================================
-//function : Add
-//purpose :
-//=======================================================================
- inline void NMTDS_BndSphere::Add(const NMTDS_BndSphere& theOther)
-{
- Standard_Real aTmax, aR, aT, aTOther;
- gp_Pnt aPc;
- //
- aPc.SetXYZ(0.5*(myCenter.XYZ()+theOther.myCenter.XYZ()));
- //
- aR=aPc.Distance(myCenter);
- //
- aT=myRadius+myGap;
- aTOther=theOther.myRadius+theOther.myGap;
- aTmax=(aT>aTOther) ? aT: aTOther;
- //
- aR=aR+aTmax;
- //
- myCenter=aPc;
- myRadius=aR;
-}
-//=======================================================================
-//function : SquareExtent
-//purpose :
-//=======================================================================
- inline Standard_Real NMTDS_BndSphere::SquareExtent()const
-{
- Standard_Real aD;
- //
- aD=myRadius+myGap;
- aD=aD+aD;
- aD=aD*aD;
- //
- return aD;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_BndSphereTree.cxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTDS_BndSphereTree.hxx>
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- NMTDS_BndSphereTreeSelector::NMTDS_BndSphereTreeSelector()
-{
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
- NMTDS_BndSphereTreeSelector::~NMTDS_BndSphereTreeSelector()
-{
-}
-//=======================================================================
-//function : Reject
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_BndSphereTreeSelector::Reject (const NMTDS_BndSphere& aBox) const
-{
- Standard_Boolean bRet;
- //
- bRet=myBox.IsOut(aBox);
- return bRet;
-}
-//=======================================================================
-//function : Accept
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_BndSphereTreeSelector::Accept (const Standard_Integer& aIndex)
-{
- Standard_Boolean bRet=Standard_False;
- //
- if (myFence.Add(aIndex)) {
- myIndices.Append(aIndex);
- bRet=!bRet;
- }
- return bRet;
-}
-//=======================================================================
-//function : SetBox
-//purpose :
-//=======================================================================
- void NMTDS_BndSphereTreeSelector::SetBox(const NMTDS_BndSphere& aBox)
-{
- myBox=aBox;
-}
-//=======================================================================
-//function : Clear
-//purpose :
-//=======================================================================
- void NMTDS_BndSphereTreeSelector::Clear()
-{
- myFence.Clear();
- myIndices.Clear();
-}
-//=======================================================================
-//function : Indices
-//purpose :
-//=======================================================================
- const TColStd_ListOfInteger& NMTDS_BndSphereTreeSelector::Indices() const
-{
- return myIndices;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_BndSphereTree.hxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef NMTDS_BndSphereTree_HeaderFile
-#define NMTDS_BndSphereTree_HeaderFile
-
-#include <NCollection_UBTree.hxx>
-#include <NMTDS_BndSphere.hxx>
-#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_ListOfInteger.hxx>
-
-typedef NCollection_UBTree <Standard_Integer , NMTDS_BndSphere> NMTDS_BndSphereTree;
-
- class NMTDS_BndSphereTreeSelector : public NMTDS_BndSphereTree::Selector {
- public:
- Standard_EXPORT NMTDS_BndSphereTreeSelector();
- Standard_EXPORT virtual Standard_Boolean Reject(const NMTDS_BndSphere&) const;
- Standard_EXPORT virtual Standard_Boolean Accept(const Standard_Integer &);
- Standard_EXPORT virtual ~NMTDS_BndSphereTreeSelector();
-
- Standard_EXPORT void Clear();
- Standard_EXPORT void SetBox(const NMTDS_BndSphere&);
- Standard_EXPORT const TColStd_ListOfInteger& Indices() const;
-
- protected:
- NMTDS_BndSphere myBox;
- TColStd_MapOfInteger myFence;
- TColStd_ListOfInteger myIndices;
-
- };
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_BoxBndTree.cxx
-// Created: Tue Oct 17 13:04:11 2006
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTDS_BoxBndTree.hxx>
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- NMTDS_BoxBndTreeSelector::NMTDS_BoxBndTreeSelector()
-{
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
- NMTDS_BoxBndTreeSelector::~NMTDS_BoxBndTreeSelector()
-{
-}
-//=======================================================================
-//function : Reject
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_BoxBndTreeSelector::Reject (const Bnd_Box& aBox) const
-{
- Standard_Boolean bRet;
- //
- bRet=myBox.IsOut(aBox);
- return bRet;
-}
-//=======================================================================
-//function : Accept
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_BoxBndTreeSelector::Accept (const Standard_Integer& aIndex)
-{
- Standard_Boolean bRet=Standard_False;
- //
- if (myFence.Add(aIndex)) {
- myIndices.Append(aIndex);
- bRet=!bRet;
- }
- return bRet;
-}
-//=======================================================================
-//function : SetBox
-//purpose :
-//=======================================================================
- void NMTDS_BoxBndTreeSelector::SetBox(const Bnd_Box& aBox)
-{
- myBox=aBox;
-}
-//=======================================================================
-//function : Clear
-//purpose :
-//=======================================================================
- void NMTDS_BoxBndTreeSelector::Clear()
-{
- myFence.Clear();
- myIndices.Clear();
-}
-//=======================================================================
-//function : Indices
-//purpose :
-//=======================================================================
- const TColStd_ListOfInteger& NMTDS_BoxBndTreeSelector::Indices() const
-{
- return myIndices;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_BoxBndTree.hxx
-// Created: Tue Oct 17 12:50:31 2006
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef NMTDS_BoxBndTree_HeaderFile
-#define NMTDS_BoxBndTree_HeaderFile
-
-#include <NCollection_UBTree.hxx>
-#include <Bnd_Box.hxx>
-#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_ListOfInteger.hxx>
-
-typedef NCollection_UBTree <Standard_Integer , Bnd_Box> NMTDS_BoxBndTree;
-
- class NMTDS_BoxBndTreeSelector : public NMTDS_BoxBndTree::Selector {
- public:
- Standard_EXPORT NMTDS_BoxBndTreeSelector();
- Standard_EXPORT virtual Standard_Boolean Reject(const Bnd_Box&) const;
- Standard_EXPORT virtual Standard_Boolean Accept(const Standard_Integer &);
- Standard_EXPORT virtual ~NMTDS_BoxBndTreeSelector();
-
- Standard_EXPORT void Clear();
- Standard_EXPORT void SetBox(const Bnd_Box&);
- Standard_EXPORT const TColStd_ListOfInteger& Indices() const;
-
- protected:
- Bnd_Box myBox;
- TColStd_MapOfInteger myFence;
- TColStd_ListOfInteger myIndices;
-
- };
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_CArray1OfIndexRange.hxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-
-#include <NMTDS_CArray1OfIndexRange.hxx>
-
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_OutOfMemory_HeaderFile
-#include <Standard_OutOfMemory.hxx>
-#endif
-
-
-#define Array1Item NMTDS_IndexRange
-#define Array1Item_hxx <NMTDS_IndexRange.hxx>
-#define BOPTColStd_CArray1 NMTDS_CArray1OfIndexRange
-#define BOPTColStd_CArray1_hxx <NMTDS_CArray1OfIndexRange.hxx>
-#include <BOPTColStd_CArray1.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_BndSphere.hxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-
-#ifndef _NMTDS_CArray1OfIndexRange_HeaderFile
-#define _NMTDS_CArray1OfIndexRange_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Address.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Boolean.hxx>
-#include <NMTDS_IndexRange.hxx>
-
-class Standard_OutOfRange;
-class Standard_OutOfMemory;
-
-
-
-//=======================================================================
-//function : NMTDS_CArray1OfIndexRange
-//purpose :
-//=======================================================================
-class NMTDS_CArray1OfIndexRange {
- public:
-
- Standard_EXPORT
- NMTDS_CArray1OfIndexRange(const Standard_Integer Length = 0,
- const Standard_Integer BlockLength = 5);
-
- Standard_EXPORT
- void Resize(const Standard_Integer theNewLength) ;
-
- Standard_EXPORT
- void Destroy() ;
-
- ~NMTDS_CArray1OfIndexRange() {
- Destroy();
- }
-
- Standard_EXPORT
- Standard_Integer Length() const;
-
- Standard_EXPORT
- Standard_Integer Extent() const;
-
- Standard_EXPORT
- Standard_Integer FactLength() const;
-
- Standard_EXPORT
- Standard_Integer Append(const NMTDS_IndexRange& Value) ;
-
- Standard_EXPORT
- void Remove(const Standard_Integer Index) ;
-
- Standard_EXPORT
- const NMTDS_IndexRange& Value(const Standard_Integer Index) const;
-
- const NMTDS_IndexRange& operator ()(const Standard_Integer Index) const {
- return Value(Index);
- }
-
- Standard_EXPORT
- NMTDS_IndexRange& ChangeValue(const Standard_Integer Index) ;
-
- NMTDS_IndexRange& operator ()(const Standard_Integer Index) {
- return ChangeValue(Index);
- }
-
- Standard_EXPORT
- void SetBlockLength(const Standard_Integer aBL) ;
-
- Standard_EXPORT
- Standard_Integer BlockLength() const;
-
- Standard_EXPORT
- void Purge() ;
-
- private:
- Standard_EXPORT
- NMTDS_CArray1OfIndexRange(const NMTDS_CArray1OfIndexRange& AnArray);
-
- Standard_EXPORT
- NMTDS_CArray1OfIndexRange& Assign(const NMTDS_CArray1OfIndexRange& Other) ;
-
- NMTDS_CArray1OfIndexRange& operator =(const NMTDS_CArray1OfIndexRange& Other) {
- return Assign(Other);
- }
-
- Standard_EXPORT
- Standard_Boolean IsInvalidIndex(const Standard_Integer Index) const;
-
-
- Standard_Address myStart;
- Standard_Integer myLength;
- Standard_Integer myFactLength;
- Standard_Integer myBlockLength;
- Standard_Boolean myIsAllocated;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx
-// Created: Mon Feb 20 09:31:43 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile
-#define NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile
-
-#ifndef NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile
-#include <NMTDS_DataMapOfIntegerMapOfInteger.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_DataMapOfIntegerMapOfInteger.hxx
-// Created: Mon Feb 20 09:27:40 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile
-#define NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile
-
-#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_MapIntegerHasher.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_DataMap.hxx>
-
-typedef NCollection_DataMap<Standard_Integer, TColStd_MapOfInteger, TColStd_MapIntegerHasher> NMTDS_DataMapOfIntegerMapOfInteger;
-typedef NMTDS_DataMapOfIntegerMapOfInteger::Iterator NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger;
-
-#undef _NCollection_MapHasher
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_IndexRange.cxx
-// Created: Fri Nov 28 10:34:59 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTDS_IndexRange.hxx>
-
-//=======================================================================
-//function :NMTDS_IndexRange::NMTDS_IndexRange
-//purpose :
-//=======================================================================
- NMTDS_IndexRange::NMTDS_IndexRange()
-:
- myFirst(0),
- myLast(0)
-{
-}
-//=======================================================================
-//function :SetFirst
-//purpose :
-//=======================================================================
- void NMTDS_IndexRange::SetFirst(const Standard_Integer aFirst)
-{
- myFirst=aFirst;
-}
-//=======================================================================
-//function :First
-//purpose :
-//=======================================================================
- Standard_Integer NMTDS_IndexRange::First()const
-{
- return myFirst;
-}
-//=======================================================================
-//function :SetLast
-//purpose :
-//=======================================================================
- void NMTDS_IndexRange::SetLast(const Standard_Integer aLast)
-{
- myLast=aLast;
-}
-//=======================================================================
-//function :Last
-//purpose :
-//=======================================================================
- Standard_Integer NMTDS_IndexRange::Last()const
-{
- return myLast;
-}
-//=======================================================================
-//function :IsInRange
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_IndexRange::IsInRange(const Standard_Integer aIndex)const
-{
- return (Standard_Boolean)(aIndex>=myFirst && aIndex<=myLast);
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_IndexRange.hxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-
-#ifndef _NMTDS_IndexRange_HeaderFile
-#define _NMTDS_IndexRange_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Boolean.hxx>
-
-//=======================================================================
-//class : NMTDS_IndexRange
-//purpose :
-//=======================================================================
-class NMTDS_IndexRange {
- public:
-
- Standard_EXPORT
- NMTDS_IndexRange();
-
- Standard_EXPORT void SetFirst(const Standard_Integer aFirst) ;
-
- Standard_EXPORT void SetLast(const Standard_Integer aLast) ;
-
- Standard_EXPORT Standard_Integer First() const;
-
- Standard_EXPORT Standard_Integer Last() const;
-
- Standard_EXPORT Standard_Boolean IsInRange(const Standard_Integer aIndex) const;
-
-protected:
- Standard_Integer myFirst;
- Standard_Integer myLast;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_IndexedDataMapOfIntegerShape.hxx
-// Created: Mon Feb 20 09:20:07 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_IndexedDataMapOfIntegerShape_HeaderFile
-#define NMTDS_IndexedDataMapOfIntegerShape_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <Standard_Integer.hxx>
-#include <TColStd_MapIntegerHasher.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_IndexedDataMap.hxx>
-
-
-typedef NCollection_IndexedDataMap<Standard_Integer, TopoDS_Shape, TColStd_MapIntegerHasher> NMTDS_IndexedDataMapOfIntegerShape;
-
-#undef _NCollection_MapHasher
-
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_IndexedDataMapOfShapeBndSphere.hxx
-// Created: Mon Feb 20 09:17:01 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile
-#define NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-#include <NMTDS_BndSphere.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_IndexedDataMap.hxx>
-
-
-
-typedef NCollection_IndexedDataMap<TopoDS_Shape, NMTDS_BndSphere, TopTools_ShapeMapHasher> NMTDS_IndexedDataMapOfShapeBndSphere;
-
-#undef _NCollection_MapHasher
-
-
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_IndexedDataMapOfShapeBox.hxx
-// Created: Mon Feb 20 09:17:01 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_IndexedDataMapOfShapeBox_HeaderFile
-#define NMTDS_IndexedDataMapOfShapeBox_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-#include <Bnd_Box.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_IndexedDataMap.hxx>
-
-
-typedef NCollection_IndexedDataMap<TopoDS_Shape, Bnd_Box, TopTools_ShapeMapHasher> NMTDS_IndexedDataMapOfShapeBox;
-
-#undef _NCollection_MapHasher
-
-
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_InterfPool.cxx
-// Author: Peter KURNEV
-
-#include <NMTDS_InterfPool.hxx>
-
-#include <NMTDS_PairBoolean.hxx>
-#include <NMTDS_ListOfPairBoolean.hxx>
-#include <NMTDS_MapIteratorOfMapOfPairBoolean.hxx>
-#include <NMTDS_ListIteratorOfListOfPairBoolean.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
-static
- Standard_Integer TypeToInteger(const NMTDS_InterfType aType);
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-NMTDS_InterfPool::NMTDS_InterfPool()
-{
- myMaxInd=6;
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
- NMTDS_InterfPool::~NMTDS_InterfPool()
-{
-}
-//=======================================================================
-//function : Add
-//purpose :
-//=======================================================================
-Standard_Boolean NMTDS_InterfPool::Add (const NMTDS_PairBoolean& aPKB,
- const NMTDS_InterfType aType)
-{
- Standard_Boolean bRet;
- Standard_Integer iType;
- //
- bRet=Standard_False;
- //
- iType=TypeToInteger(aType);
- if (iType>-1 && iType<myMaxInd) {
- bRet=myTable[iType].Add(aPKB);
- }
- return bRet;
-}
-//=======================================================================
-//function : Add
-//purpose :
-//=======================================================================
-Standard_Boolean NMTDS_InterfPool::Add (const Standard_Integer aInd1,
- const Standard_Integer aInd2,
- const NMTDS_InterfType aType)
-{
- NMTDS_PairBoolean aPKB;
- //
- aPKB.SetIds(aInd1, aInd2);
- return Add(aPKB, aType);
-}
-//=======================================================================
-//function : Add
-//purpose :
-//=======================================================================
-Standard_Boolean NMTDS_InterfPool::Add (const Standard_Integer aInd1,
- const Standard_Integer aInd2,
- const Standard_Boolean bFlag,
- const NMTDS_InterfType aType)
-{
- NMTDS_PairBoolean aPKB;
- //
- aPKB.SetIds(aInd1, aInd2);
- aPKB.SetFlag(bFlag);
- return Add(aPKB, aType);
-}
-//=======================================================================
-//function : Contains
-//purpose :
-//=======================================================================
-Standard_Boolean NMTDS_InterfPool::Contains(const NMTDS_PairBoolean& aPKB)const
-{
- Standard_Boolean bRet;
- Standard_Integer i;
- //
- for (i=0; i<myMaxInd; ++i) {
- bRet=myTable[i].Contains(aPKB);
- if (bRet) {
- break;
- }
- }
- return bRet;
-}
-//=======================================================================
-//function : Contains
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_InterfPool::Contains(const Standard_Integer aInd1,
- const Standard_Integer aInd2)const
-{
- NMTDS_PairBoolean aPKB;
- //
- aPKB.SetIds(aInd1, aInd2);
- return Contains(aPKB);
-}
-//=======================================================================
-//function : Get
-//purpose :
-//=======================================================================
-const NMTDS_ListOfPairBoolean& NMTDS_InterfPool::Get()const
-{
- Standard_Integer i;
- NMTDS_ListOfPairBoolean* pL;
- //
- pL=(NMTDS_ListOfPairBoolean*)&myList;
- pL->Clear();
- //
- for (i=0; i<myMaxInd; ++i) {
- NMTDS_MapIteratorOfMapOfPairBoolean aIt;
- //
- aIt.Initialize(myTable[i]);
- for(; aIt.More(); aIt.Next()) {
- const NMTDS_PairBoolean& aPKB=aIt.Key();
- pL->Append(aPKB);
- }
- }
- return myList;
-}
-//=======================================================================
-//function : Get
-//purpose :
-//=======================================================================
-const NMTDS_ListOfPairBoolean& NMTDS_InterfPool::Get
- (const Standard_Integer aInd)const
-{
- Standard_Integer i, n1, n2;
- NMTDS_ListOfPairBoolean* pL;
- //
- pL=(NMTDS_ListOfPairBoolean*)&myList;
- pL->Clear();
- //
- for (i=0; i<myMaxInd; ++i) {
- NMTDS_MapIteratorOfMapOfPairBoolean aIt;
- //
- aIt.Initialize(myTable[i]);
- for(; aIt.More(); aIt.Next()) {
- const NMTDS_PairBoolean& aPKB=aIt.Key();
- aPKB.Ids(n1, n2);
- if(n1==aInd || n2==aInd) {
- pL->Append(aPKB);
- }
- }
- }
- return myList;
-}
-//=======================================================================
-//function : Get
-//purpose :
-//=======================================================================
-const NMTDS_ListOfPairBoolean& NMTDS_InterfPool::Get
- (const NMTDS_InterfType aType)const
-{
- Standard_Integer iType;
- NMTDS_ListOfPairBoolean* pL;
- //
- pL=(NMTDS_ListOfPairBoolean*)&myList;
- pL->Clear();
- //
- iType=TypeToInteger(aType);
- if (iType>-1 && iType<myMaxInd) {
- NMTDS_MapIteratorOfMapOfPairBoolean aIt;
- //
- aIt.Initialize(myTable[iType]);
- for(; aIt.More(); aIt.Next()) {
- const NMTDS_PairBoolean& aPKB=aIt.Key();
- pL->Append(aPKB);
- }
- }
- return myList;
-}
-//=======================================================================
-//function : Get
-//purpose :
-//=======================================================================
-const NMTDS_ListOfPairBoolean& NMTDS_InterfPool::Get
- (const Standard_Integer aInd,
- const NMTDS_InterfType aType)const
-{
- Standard_Integer n1, n2;
- NMTDS_ListOfPairBoolean *pL, aLPKB;
- NMTDS_ListIteratorOfListOfPairBoolean aIt;
- //
- aLPKB=Get(aType);
- //
- pL=(NMTDS_ListOfPairBoolean*)&myList;
- pL->Clear();
- //
- aIt.Initialize (aLPKB);
- for (; aIt.More(); aIt.Next()) {
- const NMTDS_PairBoolean& aPKB=aIt.Value();
- aPKB.Ids(n1, n2);
- if(n1==aInd || n2==aInd) {
- pL->Append(aPKB);
- }
- }
- return myList;
-}
-////////////////////
-//===========================================================================
-//function : SSInterferences
-//purpose :
-//===========================================================================
-BOPTools_CArray1OfSSInterference& NMTDS_InterfPool::SSInterferences()
-{
- return mySSInterferences;
-}
-//===========================================================================
-//function : ESInterferences
-//purpose :
-//===========================================================================
-BOPTools_CArray1OfESInterference& NMTDS_InterfPool::ESInterferences()
-{
- return myESInterferences;
-}
-//===========================================================================
-//function : VSInterferences
-//purpose :
-//===========================================================================
-BOPTools_CArray1OfVSInterference& NMTDS_InterfPool::VSInterferences()
-{
- return myVSInterferences;
-}
-//===========================================================================
-//function : EEInterferences
-//purpose :
-//===========================================================================
-BOPTools_CArray1OfEEInterference& NMTDS_InterfPool::EEInterferences()
-{
- return myEEInterferences;
-}
-//===========================================================================
-//function : VEInterferences
-//purpose :
-//===========================================================================
-BOPTools_CArray1OfVEInterference& NMTDS_InterfPool::VEInterferences()
-{
- return myVEInterferences;
-}
-//===========================================================================
-//function : VVInterferences
-//purpose :
-//===========================================================================
-BOPTools_CArray1OfVVInterference& NMTDS_InterfPool::VVInterferences()
-{
- return myVVInterferences;
-}
-
-//modified by NIZNHY-PKV Mon Dec 12 09:07:54 2011f
-//=======================================================================
-//function : Purge
-//purpose :
-//=======================================================================
-void NMTDS_InterfPool::Purge()
-{
-#if OCC_VERSION_LARGE > 0x06050200
- myVVInterferences.Purge();
- myVEInterferences.Purge();
- myEEInterferences.Purge();
- myVSInterferences.Purge();
- myESInterferences.Purge();
- mySSInterferences.Purge();
-#endif
-}
-//modified by NIZNHY-PKV Mon Dec 12 09:07:58 2011t
-
-//=======================================================================
-//function : TypeToInteger
-//purpose :
-//=======================================================================
-Standard_Integer TypeToInteger(const NMTDS_InterfType aType)
-{
- return (Standard_Integer)aType;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_InterfPool.hxx
-//
-// Author: Peter KURNEV
-
-#ifndef _NMTDS_InterfPool_HeaderFile
-#define _NMTDS_InterfPool_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-
-#include <Standard_Integer.hxx>
-#include <BOPTools_CArray1OfSSInterference.hxx>
-#include <BOPTools_CArray1OfESInterference.hxx>
-#include <BOPTools_CArray1OfVSInterference.hxx>
-#include <BOPTools_CArray1OfEEInterference.hxx>
-#include <BOPTools_CArray1OfVEInterference.hxx>
-#include <BOPTools_CArray1OfVVInterference.hxx>
-#include <Standard_Boolean.hxx>
-#include <NMTDS_InterfType.hxx>
-#include <NMTDS_PairBoolean.hxx>
-#include <NMTDS_MapOfPairBoolean.hxx>
-#include <NMTDS_ListOfPairBoolean.hxx>
-
-//=======================================================================
-//class : NMTDS_InterfPool
-//purpose :
-//=======================================================================
-class NMTDS_InterfPool {
- public:
- Standard_EXPORT
- NMTDS_InterfPool();
- Standard_EXPORT
- virtual ~NMTDS_InterfPool();
-
- Standard_EXPORT
- Standard_Boolean Add(const NMTDS_PairBoolean& aPKB,
- const NMTDS_InterfType aType) ;
-
- Standard_EXPORT
- Standard_Boolean Add(const Standard_Integer aInd1,
- const Standard_Integer aInd2,
- const NMTDS_InterfType aType) ;
-
- Standard_EXPORT
- Standard_Boolean Add(const Standard_Integer aInd1,
- const Standard_Integer aInd2,
- const Standard_Boolean bFlag,
- const NMTDS_InterfType aType) ;
-
- Standard_EXPORT
- Standard_Boolean Contains(const NMTDS_PairBoolean& aPKB) const;
-
- Standard_EXPORT
- Standard_Boolean Contains(const Standard_Integer aInd1,
- const Standard_Integer aInd2) const;
-
- Standard_EXPORT
- const NMTDS_ListOfPairBoolean& Get() const;
-
- Standard_EXPORT
- const NMTDS_ListOfPairBoolean& Get(const NMTDS_InterfType aType) const;
-
- Standard_EXPORT
- const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd) const;
-
- Standard_EXPORT
- const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd,
- const NMTDS_InterfType aType) const;
-
- //! Returns the reference to array Of F/F interferences <br>
- Standard_EXPORT BOPTools_CArray1OfSSInterference& SSInterferences() ;
-
- //! Returns the reference to array Of E/F interferences <br>
- Standard_EXPORT BOPTools_CArray1OfESInterference& ESInterferences() ;
-
- //! Returns the reference to array Of V/F interferences <br>
- Standard_EXPORT BOPTools_CArray1OfVSInterference& VSInterferences() ;
-
- //! Returns the reference to arrray Of E/E interferences <br>
- Standard_EXPORT BOPTools_CArray1OfEEInterference& EEInterferences() ;
-
- //! Returns the reference to arrray Of V/E interferences <br>
- Standard_EXPORT BOPTools_CArray1OfVEInterference& VEInterferences() ;
-
- //! Returns the reference to arrray Of V/V interferences <br>
- Standard_EXPORT BOPTools_CArray1OfVVInterference& VVInterferences() ;
-
- Standard_EXPORT void Purge() ;
-
-protected:
- NMTDS_MapOfPairBoolean myTable[6];
- NMTDS_ListOfPairBoolean myList;
- Standard_Integer myMaxInd;
- BOPTools_CArray1OfSSInterference mySSInterferences;
- BOPTools_CArray1OfESInterference myESInterferences;
- BOPTools_CArray1OfVSInterference myVSInterferences;
- BOPTools_CArray1OfEEInterference myEEInterferences;
- BOPTools_CArray1OfVEInterference myVEInterferences;
- BOPTools_CArray1OfVVInterference myVVInterferences;
-
-private:
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_InterfType.hxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-
-
-#ifndef _NMTDS_InterfType_HeaderFile
-#define _NMTDS_InterfType_HeaderFile
-
-
-enum NMTDS_InterfType {
-NMTDS_TI_VV,
-NMTDS_TI_VE,
-NMTDS_TI_VF,
-NMTDS_TI_EE,
-NMTDS_TI_EF,
-NMTDS_TI_FF,
-NMTDS_TI_UNKNOWN
-};
-
-#ifndef _Standard_PrimitiveTypes_HeaderFile
-#include <Standard_PrimitiveTypes.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_Iterator.cxx
-// Author: Peter KURNEV
-
-#include <NMTDS_Iterator.hxx>
-//
-#include <Bnd_Box.hxx>
-//
-#include <TColStd_ListOfInteger.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_MapIteratorOfMapOfInteger.hxx>
-#include <TColStd_DataMapOfIntegerInteger.hxx>
-#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
-#include <TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger.hxx>
-#include <TColStd_MapOfInteger.hxx>
-//
-#include <TopoDS.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Shape.hxx>
-//
-#include <TopTools_DataMapOfShapeInteger.hxx>
-//
-#include <NMTDS_BoxBndTree.hxx>
-#include <NCollection_UBTreeFiller.hxx>
-#include <NMTDS_CArray1OfIndexRange.hxx>
-#include <NMTDS_IndexRange.hxx>
-#include <NMTDS_PairBoolean.hxx>
-#include <NMTDS_MapOfPairBoolean.hxx>
-#include <NMTDS_IndexedDataMapOfShapeBox.hxx>
-#include <NMTDS_IndexedDataMapOfIntegerShape.hxx>
-#include <NMTDS_Tools.hxx>
-#include <NMTDS_DataMapOfIntegerMapOfInteger.hxx>
-#include <NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx>
-#include <NMTDS_ShapesDataStructure.hxx>
-
-//=======================================================================
-//function : NMTDS_Iterator
-//purpose :
-//=======================================================================
-NMTDS_Iterator::NMTDS_Iterator()
-{
- myDS=NULL;
- myLength=0;
-}
-//=======================================================================
-//function : ~NMTDS_Iterator
-//purpose :
-//=======================================================================
-NMTDS_Iterator::~NMTDS_Iterator()
-{
-}
-//=======================================================================
-// function: SetDS
-// purpose:
-//=======================================================================
-void NMTDS_Iterator::SetDS(const NMTDS_PShapesDataStructure& aDS)
-{
- myDS=aDS;
-}
-//=======================================================================
-// function: DS
-// purpose:
-//=======================================================================
-const NMTDS_ShapesDataStructure& NMTDS_Iterator::DS()const
-{
- return *myDS;
-}
-//=======================================================================
-// function: ExpectedLength
-// purpose:
-//=======================================================================
-Standard_Integer NMTDS_Iterator::ExpectedLength() const
-{
- return myLength;
-}
-//=======================================================================
-// function: BlockLength
-// purpose:
-//=======================================================================
-Standard_Integer NMTDS_Iterator::BlockLength() const
-{
- Standard_Integer aNbIIs, iTresh;
- Standard_Real aCfPredict=.5;
-
- aNbIIs=ExpectedLength();
-
- if (aNbIIs<=1) {
- return 1;
- }
- //modified by NIZNHY-PKV Mon Dec 12 08:50:50 2011f
- iTresh=1000;
- if (aNbIIs>iTresh) {
- aNbIIs=iTresh;
- return aNbIIs;
- }
- //modified by NIZNHY-PKV Mon Dec 12 08:50:54 2011t
- //
- aNbIIs=(Standard_Integer) (aCfPredict*(Standard_Real)aNbIIs);
- return aNbIIs;
-}
-//=======================================================================
-// function: Initialize
-// purpose:
-//=======================================================================
-void NMTDS_Iterator::Initialize(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2)
-{
- Standard_Integer iX;
- //
- iX=NMTDS_Tools::TypeToInteger(aType1, aType2);
- if (iX>=0) {
- myIterator.Initialize(myLists[iX]);
- myLength=myLists[iX].Extent();
- }
- else {
- myIterator.Initialize(myEmptyList);
- myLength=0;
- }
-}
-//=======================================================================
-// function: More
-// purpose:
-//=======================================================================
-Standard_Boolean NMTDS_Iterator::More()const
-{
- return myIterator.More();
-}
-//=======================================================================
-// function: Next
-// purpose:
-//=======================================================================
-void NMTDS_Iterator::Next()
-{
- myIterator.Next();
-}
-//=======================================================================
-// function: Current
-// purpose:
-//=======================================================================
-void NMTDS_Iterator::Current(Standard_Integer& aIndex1,
- Standard_Integer& aIndex2,
- Standard_Boolean& aWithSubShape) const
-{
- const NMTDS_PairBoolean& aPKB=myIterator.Value();
- aPKB.Ids(aIndex1, aIndex2);
- aWithSubShape=aPKB.Flag();
-}
-//=======================================================================
-// function: SDVertices
-// purpose:
-//=======================================================================
-const TColStd_DataMapOfIntegerListOfInteger& NMTDS_Iterator::SDVertices()const
-{
- return myMVSD;
-}
-//=======================================================================
-// function: Prepare
-// purpose:
-//=======================================================================
-void NMTDS_Iterator::Prepare()
-{
- Standard_Integer i;
- //
- myLength=0;
- for (i=0; i<6; ++i) {
- myLists[i].Clear();
- }
- myMVSD.Clear();
- //
- if (myDS==NULL){
- return;
- }
- Intersect();
-}
-//=======================================================================
-// function: Intersect
-// purpose:
-//=======================================================================
-void NMTDS_Iterator::Intersect()
-{
- Standard_Boolean bFlag;
- Standard_Integer aNb, i, aNbB, aNbR, iFlag;
- Standard_Integer i1, i2, aNbSD, iX, j, iDS, jB, iR, k, aNbLV, aNbLV1;
- TColStd_ListIteratorOfListOfInteger aIt;
- TColStd_DataMapOfIntegerInteger aMII;
- TColStd_DataMapOfIntegerListOfInteger aMVSD;
- TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger aItVSD;
- TopTools_DataMapOfShapeInteger aMSI;
- TopAbs_ShapeEnum aTi, aTj;
- NMTDS_PairBoolean aPKXB;
- NMTDS_MapOfPairBoolean aMPKXB;
- NMTDS_IndexedDataMapOfShapeBox aMSB;
- //
- NMTDS_BoxBndTreeSelector aSelector;
- NMTDS_BoxBndTree aBBTree;
- NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
- //
- const NMTDS_CArray1OfIndexRange& aRanges=myDS->Ranges();
- aNbR=aRanges.Extent();
- //
- aNb=myDS->NumberOfShapesOfTheObject();
- for (i=1; i<=aNb; ++i) {
- const TopoDS_Shape& aS=myDS->Shape(i);
- aTi=aS.ShapeType();
- if (NMTDS_Tools::HasBRep(aTi)) {
- Bnd_Box aBoxEx;
- //
- myDS->ComputeBoxEx(i, aBoxEx);
- aMSI.Bind(aS, i);
- aMSB.Add(aS, aBoxEx);
- }
- }
- //
- aNbB=aMSB.Extent();
- //
- for (i=1; i<=aNbB; ++i) {
- const TopoDS_Shape& aS=aMSB.FindKey(i);
- const Bnd_Box& aBoxEx=aMSB(i);
- //
- aTreeFiller.Add(i, aBoxEx);
- //
- iDS=aMSI.Find(aS);
- aMII.Bind(i, iDS);
- }
- //
- aTreeFiller.Fill();
- //
- for (iR=1; iR<aNbR; ++iR) {
- const NMTDS_IndexRange& aR=aRanges(iR);
- i1=aR.First();
- i2=aR.Last();
- for (i=i1; i<=i2; ++i) {
- const TopoDS_Shape& aSi=myDS->Shape(i);
- aTi=aSi.ShapeType();
- if (!NMTDS_Tools::HasBRep(aTi)){
- continue;
- }
- const Bnd_Box& aBoxEx=aMSB.FindFromKey(aSi);
- aSelector.Clear();
- aSelector.SetBox(aBoxEx);
- //
- aNbSD=aBBTree.Select(aSelector);
- //
- if (!aNbSD){
- continue;
- }
- //
- const TColStd_ListOfInteger& aLI=aSelector.Indices();
- //
- k=0;
- TColStd_ListOfInteger aLV;
- //
- aIt.Initialize(aLI);
- for (; aIt.More(); aIt.Next()) {
- jB=aIt.Value(); // box index in MII
- j=aMII.Find(jB); // DS index
- if (j>=i1 && j<=i2) {
- continue;// same range
- }
- //
- aPKXB.SetIds(i, j);
- //
- if (aMPKXB.Add(aPKXB)) {
- bFlag=Standard_False;// Bounding boxes are intersected
- const Bnd_Box& aBoxi=myDS->GetBoundingBox(i);
- const Bnd_Box& aBoxj=myDS->GetBoundingBox(j);
- if (aBoxi.IsOut(aBoxj)) {
- bFlag=!bFlag; //Bounding boxes of Sub-shapes are intersected
- }
- const TopoDS_Shape& aSj=myDS->Shape(j);
- aTj=aSj.ShapeType();
- iX=NMTDS_Tools::TypeToInteger(aTi, aTj);
- //bFlag=(iStatus==2);
- aPKXB.SetFlag(bFlag);
- myLists[iX].Append(aPKXB);
- //
- // VSD prepare
- if (iX==5) { //VV
- aLV.Append(j);
- }
- }// if (aMPKXB.Add(aPKXB)) {
- }// for (; aIt.More(); aIt.Next()) {
- //
- // VSD treatment
- aNbLV=aLV.Extent();
- if (aNbLV) {
- TColStd_ListOfInteger aLV1;
- //
- const TopoDS_Vertex& aVi=TopoDS::Vertex(aSi);
- aIt.Initialize(aLV);
- for (; aIt.More(); aIt.Next()) {
- j=aIt.Value();
- const TopoDS_Shape& aSj=myDS->Shape(j);
- const TopoDS_Vertex& aVj=TopoDS::Vertex(aSj);
- iFlag=NMTDS_Tools::ComputeVV(aVi, aVj);
- if (!iFlag) {
- aLV1.Append(j);
- }
- else {
- aPKXB.SetIds(i, j);
- aMPKXB.Remove(aPKXB);
- }
- }
- //
- aNbLV1=aLV1.Extent();
- if (aNbLV1) {
- aMVSD.Bind(i, aLV1);
- }
- }
- }//for (i=i1; i<=i2; ++i) {
- }//for (iR=1; iR<aNbR; ++iR) {
- //
- //
- // Chains
- //=================
- myMVSD.Clear();
- NMTDS_Iterator::FillMVSD(aMVSD, myMVSD);
-
- //modified by NIZNHY-PKV Mon Dec 12 09:51:29 2011f
- aMPKXB.Clear();
- Standard::Purge();
- //modified by NIZNHY-PKV Mon Dec 12 09:51:33 2011t
-}
-//=======================================================================
-//function : FillMVSD
-//purpose :
-//=======================================================================
-void NMTDS_Iterator::FillMVSD(const TColStd_DataMapOfIntegerListOfInteger& aMVSD,
- TColStd_DataMapOfIntegerListOfInteger& bMVSD)
-{
- Standard_Boolean bFound;
- Standard_Integer aNbVSD, iCnt, i, j, k;
- TColStd_ListOfInteger aLV;
- TColStd_ListIteratorOfListOfInteger aIt;
- TColStd_MapOfInteger aMF;
- TColStd_MapIteratorOfMapOfInteger aItMI;
- TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger aItVSD;
- NMTDS_DataMapOfIntegerMapOfInteger aDMIMI;
- NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger aIti, aItj;
- //
- aNbVSD=aMVSD.Extent();
- if (!aNbVSD) {
- return;
- }
- //
- aItVSD.Initialize(aMVSD);
- for (; aItVSD.More(); aItVSD.Next()) {
- TColStd_MapOfInteger aMI;
- //
- i=aItVSD.Key();
- aMI.Add(i);
- const TColStd_ListOfInteger& aLVSD=aItVSD.Value();
- aIt.Initialize(aLVSD);
- for (; aIt.More(); aIt.Next()) {
- j=aIt.Value();
- aMI.Add(j);
- }
- aDMIMI.Bind(i, aMI);
- }
- // i
- aIti.Initialize(aDMIMI);
- for (; aIti.More(); aIti.Next()) {
- i=aIti.Key();
- if (aMF.Contains(i)) {
- continue;
- }
- aMF.Add(i);
- //
- //TColStd_MapOfInteger& aMIi=aDMIMI.ChangeFind(i);
- TColStd_MapOfInteger *pMIi=(TColStd_MapOfInteger *)&aIti.Value();
- TColStd_MapOfInteger& aMIi=*pMIi;
- // j
- while (1) {
- iCnt=0;
- aItj.Initialize(aDMIMI);
- for (; aItj.More(); aItj.Next()) {
- j=aItj.Key();
- if (aMF.Contains(j)) {
- continue;
- }
- //
- //TColStd_MapOfInteger& aMIj=aDMIMI.ChangeFind(j);
- TColStd_MapOfInteger *pMj=(TColStd_MapOfInteger *)&aItj.Value();
- TColStd_MapOfInteger& aMIj=*pMj;
- //
- aItMI.Initialize(aMIj);
- for (; aItMI.More(); aItMI.Next()) {
- k=aItMI.Key();
- bFound=aMIi.Contains(k);
- if (bFound) {
- break;
- }
- }
- if (!bFound) {
- continue;
- }
- //
- aItMI.Initialize(aMIj);
- for (; aItMI.More(); aItMI.Next()) {
- k=aItMI.Key();
- aMIi.Add(k);
- }
- //
- if (aMF.Add(j)) {
- ++iCnt;
- }
- } //for (; aItj.More(); aItj.Next()) {
- if (!iCnt) {
- break;
- }
- } // while (1) {
- //
- aLV.Clear();
- aItMI.Initialize(aMIi);
- for (; aItMI.More(); aItMI.Next()) {
- k=aItMI.Key();
- if (k!=i) {
- aLV.Append(k);
- }
- }
- bMVSD.Bind(i, aLV);
- }// for (; aIti.More(); aIti.Next()) {
-}
-
- /*
- {
- // check
- TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger aItX;
- //
- printf(" \n");
- printf(" myMVSD.Extent()=%d\n", myMVSD.Extent());
- aItX.Initialize(myMVSD);
- for (; aItX.More(); aItX.Next()) {
- i=aItX.Key();
- printf(" i=%d (", i);
- const TColStd_ListOfInteger& aLV=aItX.Value();
- aIt.Initialize(aLV);
- for (; aIt.More(); aIt.Next()) {
- j=aIt.Value();
- printf(" %d", j);
- }
- printf(")\n");
- }
- }
-*/
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_Iterator.hxx
-// Author: Peter KURNEV
-
-#ifndef _NMTDS_Iterator_HeaderFile
-#define _NMTDS_Iterator_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-
-#include <Standard_Integer.hxx>
-#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <Standard_Boolean.hxx>
-#include <NMTDS_PShapesDataStructure.hxx>
-#include <NMTDS_ListOfPairBoolean.hxx>
-#include <NMTDS_ListIteratorOfListOfPairBoolean.hxx>
-#include <NMTDS_ShapesDataStructure.hxx>
-
-//=======================================================================
-//class : NMTDS_Iterator
-//purpose :
-//=======================================================================
-class NMTDS_Iterator {
- public:
- Standard_EXPORT
- NMTDS_Iterator();
-
- Standard_EXPORT
- virtual ~NMTDS_Iterator();
-
- Standard_EXPORT
- void SetDS(const NMTDS_PShapesDataStructure& pDS) ;
-
- Standard_EXPORT
- const NMTDS_ShapesDataStructure& DS() const;
-
- Standard_EXPORT
- void Initialize(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2) ;
-
- Standard_EXPORT
- Standard_Boolean More() const;
-
- Standard_EXPORT
- void Next() ;
-
- Standard_EXPORT
- void Current(Standard_Integer& aIndex1,
- Standard_Integer& aIndex2,
- Standard_Boolean& aWithSubShape) const;
-
- Standard_EXPORT
- virtual void Prepare() ;
-
- Standard_EXPORT
- Standard_Integer ExpectedLength() const;
-
- Standard_EXPORT
- Standard_Integer BlockLength() const;
-
- Standard_EXPORT
- const TColStd_DataMapOfIntegerListOfInteger& SDVertices() const;
-
- Standard_EXPORT
- static void FillMVSD(const TColStd_DataMapOfIntegerListOfInteger& aMVSD1,
- TColStd_DataMapOfIntegerListOfInteger& aMVSD2) ;
-
-protected:
- Standard_EXPORT
- virtual void Intersect() ;
- //
-
- NMTDS_PShapesDataStructure myDS;
- NMTDS_ListOfPairBoolean myLists[6];
- NMTDS_ListIteratorOfListOfPairBoolean myIterator;
- NMTDS_ListOfPairBoolean myEmptyList;
- Standard_Integer myLength;
- TColStd_DataMapOfIntegerListOfInteger myMVSD;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_IteratorChecker.hxx
-// Author: Peter KURNEV
-
-#include <NMTDS_IteratorCheckerSI.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-#include <gp_Pnt.hxx>
-#include <Bnd_Box.hxx>
-//
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS.hxx>
-#include <BRep_Tool.hxx>
-//
-#include <TColStd_IndexedMapOfInteger.hxx>
-#include <TColStd_ListOfInteger.hxx>
-#include <TColStd_DataMapOfIntegerInteger.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_MapIteratorOfMapOfInteger.hxx>
-#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
-#include <TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger.hxx>
-//
-#include <TopTools_DataMapOfShapeInteger.hxx>
-//
-#include <NCollection_UBTreeFiller.hxx>
-#include <NMTDS_BoxBndTree.hxx>
-#include <NMTDS_ShapesDataStructure.hxx>
-#include <NMTDS_CArray1OfIndexRange.hxx>
-#include <NMTDS_IndexRange.hxx>
-#include <NMTDS_PairBoolean.hxx>
-#include <NMTDS_MapOfPairBoolean.hxx>
-#include <NMTDS_IndexedDataMapOfShapeBox.hxx>
-#include <NMTDS_Tools.hxx>
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-NMTDS_IteratorCheckerSI::NMTDS_IteratorCheckerSI()
-:
- NMTDS_Iterator()
-{
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-NMTDS_IteratorCheckerSI::~NMTDS_IteratorCheckerSI()
-{
-}
-//=======================================================================
-// function: Intersect
-// purpose:
-//=======================================================================
-void NMTDS_IteratorCheckerSI::Intersect()
-{
- Standard_Boolean bFlag;
- Standard_Integer aNbS, i, aNbA, aNbB, iFlag;
- Standard_Integer aNbSD, iX, j, iDS, jB, k, aNbLV;
- TColStd_ListIteratorOfListOfInteger aIt;
- TColStd_DataMapOfIntegerInteger aMII;
- TColStd_DataMapOfIntegerListOfInteger aMVSD;
- TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger aItVSD;
- TopTools_DataMapOfShapeInteger aMSI;
- TopAbs_ShapeEnum aTi, aTj;
- NMTDS_PairBoolean aPKXB;
- NMTDS_MapOfPairBoolean aMPKXB;
- NMTDS_IndexedDataMapOfShapeBox aMSB;
- NMTDS_MapOfPairBoolean aMPA;//myPairsAvoid
- //
- NMTDS_BoxBndTreeSelector aSelector;
- NMTDS_BoxBndTree aBBTree;
- NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
- //
- aNbS=myDS->NumberOfShapesOfTheObject();
- //
- // myPairsAvoid, aMSI, aMSB
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aSi=myDS->Shape(i);
- aTi=aSi.ShapeType();
- if (NMTDS_Tools::HasBRep(aTi)) {
- if (aTi!=TopAbs_VERTEX) {
- TColStd_IndexedMapOfInteger aMA;
- //
- myDS->GetAllSuccessors(i, aMA);
- //
- aNbA=aMA.Extent();
- for (j=1; j<=aNbA; ++j) {
- iX=aMA(j);
- aPKXB.Clear();
- aPKXB.SetIds(i, iX);
- aMPA.Add(aPKXB);
- }
- }
- else {
- aPKXB.Clear();
- aPKXB.SetIds(i, i);
- aMPA.Add(aPKXB);
- }
- //
- Bnd_Box aBoxEx;
- //
- myDS->ComputeBoxEx(i, aBoxEx);
- aMSI.Bind(aSi, i);
- aMSB.Add(aSi, aBoxEx);
- }
- }
- //
- // aMII
- aNbB=aMSB.Extent();
- for (i=1; i<=aNbB; ++i) {
- const TopoDS_Shape& aS=aMSB.FindKey(i);
- const Bnd_Box& aBoxEx=aMSB(i);
- //
- aTreeFiller.Add(i, aBoxEx);
- //
- iDS=aMSI.Find(aS);
- aMII.Bind(i, iDS);
- }
- //
- aTreeFiller.Fill();
- //
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aSi=myDS->Shape(i);
- aTi=aSi.ShapeType();
- if (!NMTDS_Tools::HasBRep(aTi)){
- continue;
- }
- const Bnd_Box& aBoxEx=aMSB.FindFromKey(aSi);
- aSelector.Clear();
- aSelector.SetBox(aBoxEx);
- //
- aNbSD=aBBTree.Select(aSelector);
- if (!aNbSD){
- continue;
- }
- //
- const TColStd_ListOfInteger& aLI=aSelector.Indices();
- //
- k=0;
- TColStd_ListOfInteger aLV;
- //
- aIt.Initialize(aLI);
- for (; aIt.More(); aIt.Next()) {
- jB=aIt.Value(); // box index in MII
- j=aMII.Find(jB); // DS index
- //
- aPKXB.SetIds(i, j);
- if (aMPA.Contains(aPKXB)) {
- continue;
- }
- //
- if (aMPKXB.Add(aPKXB)) {
- bFlag=Standard_False;// Bounding boxes are intersected
- const Bnd_Box& aBoxi=myDS->GetBoundingBox(i);
- const Bnd_Box& aBoxj=myDS->GetBoundingBox(j);
- if (aBoxi.IsOut(aBoxj)) {
- bFlag=!bFlag; //Bounding boxes of Sub-shapes are intersected
- }
- const TopoDS_Shape& aSj=myDS->Shape(j);
- aTj=aSj.ShapeType();
- iX=NMTDS_Tools::TypeToInteger(aTi, aTj);
- //bFlag=(iStatus==2);
- aPKXB.SetFlag(bFlag);
- myLists[iX].Append(aPKXB);
- //
- // VSD prepare
- if (iX==5) { //VV
- aLV.Append(j);
- }
- }// if (aMPKXB.Add(aPKXB)) {
- }// for (; aIt.More(); aIt.Next()) {
- //
- // VSD treatment
- aNbLV=aLV.Extent();
- if (aNbLV) {
- TColStd_ListOfInteger aLV1;
- //
- const TopoDS_Vertex& aVi=TopoDS::Vertex(aSi);
- aIt.Initialize(aLV);
- for (; aIt.More(); aIt.Next()) {
- j=aIt.Value();
- const TopoDS_Shape& aSj=myDS->Shape(j);
- const TopoDS_Vertex& aVj=TopoDS::Vertex(aSj);
- iFlag=NMTDS_Tools::ComputeVV(aVi, aVj);
- if (!iFlag) {
- aLV1.Append(j);
- }
- else {
- aPKXB.SetIds(i, j);
- aMPKXB.Remove(aPKXB);
- }
- }
- aMVSD.Bind(i, aLV1);
- }
- }//for (i=1; i<=aNbS; ++i) {
- //
- //
- // 2. Chains
- //=================
- myMVSD.Clear();
- NMTDS_Iterator::FillMVSD(aMVSD, myMVSD);
-}
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_IteratorChecker.cxx
-// Author: Peter KURNEV
-
-#ifndef _NMTDS_IteratorCheckerSI_HeaderFile
-#define _NMTDS_IteratorCheckerSI_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <NMTDS_Iterator.hxx>
-
-//=======================================================================
-//class : NMTDS_IteratorCheckerSI
-//purpose :
-//=======================================================================
-class NMTDS_IteratorCheckerSI : public NMTDS_Iterator {
- public:
-
- Standard_EXPORT
- NMTDS_IteratorCheckerSI();
- Standard_EXPORT
- virtual ~NMTDS_IteratorCheckerSI();
-
-protected:
- Standard_EXPORT
- virtual void Intersect() ;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#define NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-
-#ifndef NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#include <NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_ListIteratorOfListOfPair.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_ListIteratorOfListOfPair_HeaderFile
-#define NMTDS_ListIteratorOfListOfPair_HeaderFile
-
-#ifndef NMTDS_ListOfPair_HeaderFile
-#include <NMTDS_ListOfPair.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_ListIteratorOfListOfPairBoolean.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile
-#define NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile
-
-#ifndef NMTDS_ListOfPairBoolean_HeaderFile
-#include <NMTDS_ListOfPairBoolean.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_ListIteratorOfListOfPassKey.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_ListIteratorOfListOfPassKey_HeaderFile
-#define NMTDS_ListIteratorOfListOfPassKey_HeaderFile
-
-#ifndef NMTDS_ListOfPassKey_HeaderFile
-#include <NMTDS_ListOfPassKey.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile
-#define NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile
-
-#ifndef NMTDS_ListOfPassKeyBoolean_HeaderFile
-#include <NMTDS_ListOfPassKeyBoolean.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-#define NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
-
-#include <NCollection_List.hxx>
-#include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
-
-typedef NCollection_List<BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors> NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors;
-typedef NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors::Iterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors;
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_ListOfPair.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_ListOfPair_HeaderFile
-#define NMTDS_ListOfPair_HeaderFile
-
-#include <NCollection_List.hxx>
-#include <NMTDS_Pair.hxx>
-
-typedef NCollection_List<NMTDS_Pair> NMTDS_ListOfPair;
-typedef NMTDS_ListOfPair::Iterator NMTDS_ListIteratorOfListOfPair;
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_ListOfPairBoolean.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_ListOfPairBoolean_HeaderFile
-#define NMTDS_ListOfPairBoolean_HeaderFile
-
-#include <NCollection_List.hxx>
-#include <NMTDS_PairBoolean.hxx>
-
-typedef NCollection_List<NMTDS_PairBoolean> NMTDS_ListOfPairBoolean;
-typedef NMTDS_ListOfPairBoolean::Iterator NMTDS_ListIteratorOfListOfPairBoolean;
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_ListOfPassKey.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_ListOfPassKey_HeaderFile
-#define NMTDS_ListOfPassKey_HeaderFile
-
-#include <NCollection_List.hxx>
-#include <NMTDS_PassKey.hxx>
-
-typedef NCollection_List<NMTDS_PassKey> NMTDS_ListOfPassKey;
-typedef NMTDS_ListOfPassKey::Iterator NMTDS_ListIteratorOfListOfPassKey;
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_ListOfPassKeyBoolean.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_ListOfPassKeyBoolean_HeaderFile
-#define NMTDS_ListOfPassKeyBoolean_HeaderFile
-
-#include <NCollection_List.hxx>
-#include <NMTDS_PassKeyBoolean.hxx>
-
-typedef NCollection_List<NMTDS_PassKeyBoolean> NMTDS_ListOfPassKeyBoolean;
-typedef NMTDS_ListOfPassKeyBoolean::Iterator NMTDS_ListIteratorOfListOfPassKeyBoolean;
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_MapIteratorOfMapOfPairBoolean.hxx
-// Created: Mon Feb 20 08:22:39 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile
-#define NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile
-
-#ifndef NMTDS_MapOfPairBoolean_HeaderFile
-#include <NMTDS_MapOfPairBoolean.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMRCol_MapIteratorOfMapOfPassKey.hxx
-// Created: Mon Feb 20 08:22:39 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMRCol_MapIteratorOfMapOfPassKey_HeaderFile
-#define NMRCol_MapIteratorOfMapOfPassKey_HeaderFile
-
-#ifndef NMTDS_MapOfPassKey_HeaderFile
-#include <NMTDS_MapOfPassKey.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMRCol_MapIteratorOfMapOfPassKeyBoolean.hxx
-// Created: Mon Feb 20 08:22:39 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMRCol_MapIteratorOfMapOfPassKeyBoolean_HeaderFile
-#define NMRCol_MapIteratorOfMapOfPassKeyBoolean_HeaderFile
-
-#ifndef NMTDS_MapOfPassKeyBoolean_HeaderFile
-#include <NMTDS_MapOfPassKeyBoolean.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_MapOfPairBoolean.hxx
-// Created: Mon Feb 20 08:19:07 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_MapOfPairBoolean_HeaderFile
-#define NMTDS_MapOfPairBoolean_HeaderFile
-
-#include <NMTDS_PairBoolean.hxx>
-#include <NMTDS_PairMapHasher.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_Map.hxx>
-
-typedef NCollection_Map<NMTDS_PairBoolean, NMTDS_PairMapHasher> NMTDS_MapOfPairBoolean;
-typedef NMTDS_MapOfPairBoolean::Iterator NMTDS_MapIteratorOfMapOfPairBoolean;
-
-#undef _NCollection_MapHasher
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_MapOfPassKey.hxx
-// Created: Mon Feb 20 08:19:07 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_MapOfPassKey_HeaderFile
-#define NMTDS_MapOfPassKey_HeaderFile
-
-#include <NMTDS_PassKey.hxx>
-#include <NMTDS_PassKeyMapHasher.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_Map.hxx>
-
-typedef NCollection_Map<NMTDS_PassKey, NMTDS_PassKeyMapHasher> NMTDS_MapOfPassKey;
-typedef NMTDS_MapOfPassKey::Iterator NMTDS_MapIteratorOfMapOfPassKey;
-
-#undef _NCollection_MapHasher
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_MapOfPassKeyBoolean.hxx
-// Created: Mon Feb 20 08:19:07 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTDS_MapOfPassKeyBoolean_HeaderFile
-#define NMTDS_MapOfPassKeyBoolean_HeaderFile
-
-#include <NMTDS_PassKeyBoolean.hxx>
-#include <NMTDS_PassKeyMapHasher.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_Map.hxx>
-
-typedef NCollection_Map<NMTDS_PassKeyBoolean, NMTDS_PassKeyMapHasher> NMTDS_MapOfPassKeyBoolean;
-typedef NMTDS_MapOfPassKeyBoolean::Iterator NMTDS_MapIteratorOfMapOfPassKeyBoolean;
-
-#undef _NCollection_MapHasher
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_PInterfPool.hxx
-// Author: Peter KURNEV
-
-#ifndef _NMTDS_PInterfPool_HeaderFile
-#define _NMTDS_PInterfPool_HeaderFile
-
-class NMTDS_InterfPool;
-
-typedef NMTDS_InterfPool* NMTDS_PInterfPool;
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_PIterator.hxx
-// Author: Peter KURNEV
-
-#ifndef _NMTDS_PIterator_HeaderFile
-#define _NMTDS_PIterator_HeaderFile
-
-class NMTDS_Iterator;
-
-typedef NMTDS_Iterator* NMTDS_PIterator;
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_PShapesDataStructure.hxx
-// Author: Peter KURNEV
-
-#ifndef _NMTDS_PShapesDataStructure_HeaderFile
-#define _NMTDS_PShapesDataStructure_HeaderFile
-
-class NMTDS_ShapesDataStructure;
-
-typedef NMTDS_ShapesDataStructure* NMTDS_PShapesDataStructure;
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_Pair.cxx
-// Author: Peter KURNEV
-
-#include <NMTDS_Pair.hxx>
-
-#include <stdio.h>
-#include <string.h>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <TColStd_ListOfInteger.hxx>
-
-#ifdef WNT
-#pragma warning( disable : 4101)
-#endif
-
-static
- Standard_Integer NormalizedId(const Standard_Integer aId,
- const Standard_Integer aDiv);
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-NMTDS_Pair::NMTDS_Pair()
-{
- Clear();
-}
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-NMTDS_Pair::NMTDS_Pair(const NMTDS_Pair& aOther)
-{
- myId1=aOther.myId1;
- myId2=aOther.myId2;
-}
-//=======================================================================
-//function :operator =
-//purpose :
-//=======================================================================
- NMTDS_Pair& NMTDS_Pair::operator =(const NMTDS_Pair& aOther)
-{
- myId1=aOther.myId1;
- myId2=aOther.myId2;
- return *this;
-}
-//=======================================================================
-//function :~
-//purpose :
-//=======================================================================
- NMTDS_Pair::~NMTDS_Pair()
-{
-}
-//=======================================================================
-//function :Clear
-//purpose :
-//=======================================================================
- void NMTDS_Pair::Clear()
-{
- myId1=0;
- myId2=0;
-}
-//=======================================================================
-//function :SetIds
-//purpose :
-//=======================================================================
- void NMTDS_Pair::SetIds(const Standard_Integer aId1,
- const Standard_Integer aId2)
-{
- Clear();
- myId1=aId1;
- myId2=aId2;
- if (aId1>aId2) {
- myId1=aId2;
- myId2=aId1;
- }
-}
-//=======================================================================
-//function :Ids
-//purpose :
-//=======================================================================
- void NMTDS_Pair::Ids(Standard_Integer& aId1,
- Standard_Integer& aId2) const
-{
- aId1=myId1;
- aId2=myId2;
-}
-//=======================================================================
-//function :IsEqual
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_Pair::IsEqual(const NMTDS_Pair& aOther) const
-{
-
- Standard_Boolean bRet;
- //
- bRet=(myId1==aOther.myId1 && myId2==aOther.myId2);//ZZ
- return bRet;
-}
-//=======================================================================
-//function : HashCode
-//purpose :
-//=======================================================================
- Standard_Integer NMTDS_Pair::HashCode(const Standard_Integer aUpper) const
-{
- Standard_Integer aSum;
- //
- aSum=0;
- aSum+=NormalizedId(myId1, 2);
- aSum+=NormalizedId(myId2, 2);
- return ::HashCode(aSum, aUpper);
-}
-//=======================================================================
-// 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;
- }
- return aIdRet;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_Pair.hxx
-// Author: Peter KURNEV
-
-#ifndef _NMTDS_Pair_HeaderFile
-#define _NMTDS_Pair_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Boolean.hxx>
-
-//=======================================================================
-//function : NMTDS_Pair
-//purpose :
-//=======================================================================
-class NMTDS_Pair {
- public:
- Standard_EXPORT
- NMTDS_Pair();
-
- Standard_EXPORT
- virtual ~NMTDS_Pair();
-
- Standard_EXPORT
- NMTDS_Pair(const NMTDS_Pair& Other);
-
- Standard_EXPORT
- NMTDS_Pair& operator =(const NMTDS_Pair& Other);
-
- Standard_EXPORT
- void Clear() ;
-
- Standard_EXPORT
- void SetIds(const Standard_Integer aI1,
- const Standard_Integer aI2) ;
-
- Standard_EXPORT
- void Ids(Standard_Integer& aI1,
- Standard_Integer& aI2) const;
-
- Standard_EXPORT
- Standard_Boolean IsEqual(const NMTDS_Pair& aOther) const;
-
- Standard_EXPORT
- Standard_Integer HashCode(const Standard_Integer Upper) const;
-
-protected:
-Standard_Integer myId1;
-Standard_Integer myId2;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_PairBoolean.cxx
-// Author: Peter KURNEV
-
-#include <NMTDS_PairBoolean.hxx>
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- NMTDS_PairBoolean::NMTDS_PairBoolean()
-:
- myFlag(Standard_False),
- NMTDS_Pair()
-{
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
- NMTDS_PairBoolean::~NMTDS_PairBoolean()
-{
-}
-//=======================================================================
-//function :operator =
-//purpose :
-//=======================================================================
- NMTDS_PairBoolean& NMTDS_PairBoolean::operator =(const NMTDS_PairBoolean& anOther)
-{
- myFlag=anOther.myFlag;
- NMTDS_Pair::operator =(anOther);
- return *this;
-}
-//=======================================================================
-//function :SetFlag
-//purpose :
-//=======================================================================
- void NMTDS_PairBoolean::SetFlag(const Standard_Boolean aFlag)
-{
- myFlag=aFlag;
-}
-//=======================================================================
-//function :Flag
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_PairBoolean::Flag()const
-{
- return myFlag;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_PairBoolean.hxx
-// Author: Peter KURNEV
-
-#ifndef _NMTDS_PairBoolean_HeaderFile
-#define _NMTDS_PairBoolean_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Boolean.hxx>
-#include <NMTDS_Pair.hxx>
-
-//=======================================================================
-//class : NMTDS_PairBoolean
-//purpose :
-//=======================================================================
-class NMTDS_PairBoolean : public NMTDS_Pair {
- public:
- Standard_EXPORT
- NMTDS_PairBoolean();
-
- Standard_EXPORT
- virtual ~NMTDS_PairBoolean();
-
- Standard_EXPORT
- void SetFlag(const Standard_Boolean aFlag) ;
-
- Standard_EXPORT
- NMTDS_PairBoolean& operator =(const NMTDS_PairBoolean& Other);
-
- Standard_EXPORT
- Standard_Boolean Flag() const;
-
-protected:
- Standard_Boolean myFlag;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_PairMapHasher.cxx
-// Author: Peter KURNEV
-
-#include <NMTDS_PairMapHasher.hxx>
-
-//=======================================================================
-//function : HashCode
-//purpose :
-//=======================================================================
-Standard_Integer NMTDS_PairMapHasher::HashCode(const NMTDS_Pair& aPK,
- const Standard_Integer Upper)
-{
- return aPK.HashCode(Upper);
-}
-//=======================================================================
-//function :IsEqual
-//purpose :
-//=======================================================================
-Standard_Boolean NMTDS_PairMapHasher::IsEqual(const NMTDS_Pair& aPK1,
- const NMTDS_Pair& aPK2)
-{
- return aPK1.IsEqual(aPK2);
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_PairMapHasher.cxx
-// Author: Peter KURNEV
-
-#ifndef _NMTDS_PairMapHasher_HeaderFile
-#define _NMTDS_PairMapHasher_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <NMTDS_Pair.hxx>
-#include <Standard_Boolean.hxx>
-
-//=======================================================================
-//class : NMTDS_PairMapHasher
-//purpose :
-//=======================================================================
-class NMTDS_PairMapHasher {
- public:
- Standard_EXPORT
- static Standard_Integer HashCode(const NMTDS_Pair& aPKey,
- const Standard_Integer Upper) ;
-
- Standard_EXPORT
- static Standard_Boolean IsEqual(const NMTDS_Pair& aPKey1,
- const NMTDS_Pair& aPKey2) ;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_PassKey.cxx
-// Created:
-// Author: Peter KURNEV
-// <peter@PREFEX>
-//
-#include <NMTDS_PassKey.hxx>
-
-#include <stdio.h>
-#include <string.h>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <TColStd_ListOfInteger.hxx>
-
-#ifdef WNT
-#pragma warning( disable : 4101)
-#endif
-
-static
- Standard_Integer NormalizedId(const Standard_Integer aId,
- const Standard_Integer aDiv);
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- NMTDS_PassKey::NMTDS_PassKey()
-{
- Clear();
-}
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- NMTDS_PassKey::NMTDS_PassKey(const NMTDS_PassKey& aOther)
-{
- myNbIds=aOther.myNbIds;
- mySum=aOther.mySum;
- myMap=aOther.myMap;
-}
-//=======================================================================
-//function :operator =
-//purpose :
-//=======================================================================
- NMTDS_PassKey& NMTDS_PassKey::operator =(const NMTDS_PassKey& aOther)
-{
- myNbIds=aOther.myNbIds;
- mySum=aOther.mySum;
- myMap=aOther.myMap;
- return *this;
-}
-//=======================================================================
-//function :~
-//purpose :
-//=======================================================================
- NMTDS_PassKey::~NMTDS_PassKey()
-{
-}
-//=======================================================================
-//function :Clear
-//purpose :
-//=======================================================================
- void NMTDS_PassKey::Clear()
-{
- myNbIds=0;
- mySum=0;
- myMap.Clear();
-}
-//=======================================================================
-//function :SetIds
-//purpose :
-//=======================================================================
- void NMTDS_PassKey::SetIds(const Standard_Integer aId1)
-
-{
- Clear();
- myNbIds=1;
- myMap.Add(aId1);
- mySum=NormalizedId(aId1, myNbIds);
-}
-//=======================================================================
-//function :SetIds
-//purpose :
-//=======================================================================
- void NMTDS_PassKey::SetIds(const Standard_Integer aId1,
- const Standard_Integer aId2)
-{
- TColStd_ListOfInteger aLI;
- //
- aLI.Append(aId1);
- aLI.Append(aId2);
- SetIds(aLI);
-}
-//=======================================================================
-//function :SetIds
-//purpose :
-//=======================================================================
- void NMTDS_PassKey::SetIds(const Standard_Integer aId1,
- const Standard_Integer aId2,
- const Standard_Integer aId3)
-{
- TColStd_ListOfInteger aLI;
- //
- aLI.Append(aId1);
- aLI.Append(aId2);
- aLI.Append(aId3);
- SetIds(aLI);
-}
-//=======================================================================
-//function :SetIds
-//purpose :
-//=======================================================================
- void NMTDS_PassKey::SetIds(const Standard_Integer aId1,
- const Standard_Integer aId2,
- const Standard_Integer aId3,
- const Standard_Integer aId4)
-{
- TColStd_ListOfInteger aLI;
- //
- aLI.Append(aId1);
- aLI.Append(aId2);
- aLI.Append(aId3);
- aLI.Append(aId4);
- SetIds(aLI);
-}
-//=======================================================================
-//function :SetIds
-//purpose :
-//=======================================================================
- void NMTDS_PassKey::SetIds(const TColStd_ListOfInteger& aLI)
-{
- Standard_Integer i, aId, aIdN;
- TColStd_ListIteratorOfListOfInteger aIt;
- //
- Clear();
- aIt.Initialize(aLI);
- for (; aIt.More(); aIt.Next()) {
- aId=aIt.Value();
- myMap.Add(aId);
- }
- myNbIds=myMap.Extent();
- for(i=1; i<=myNbIds; ++i) {
- aId=myMap(i);
- aIdN=NormalizedId(aId, myNbIds);
- mySum+=aIdN;
- }
-}
-
-//=======================================================================
-//function :NbIds
-//purpose :
-//=======================================================================
- Standard_Integer NMTDS_PassKey::NbIds()const
-{
- return myNbIds;
-}
-//=======================================================================
-//function :Id
-//purpose :
-//=======================================================================
- Standard_Integer NMTDS_PassKey::Id(const Standard_Integer aIndex) const
-{
- if (aIndex<1 || aIndex>myNbIds) {
- return -1;
- }
- return myMap(aIndex);
-}
-//=======================================================================
-//function :Ids
-//purpose :
-//=======================================================================
- void NMTDS_PassKey::Ids(Standard_Integer& aId1,
- Standard_Integer& aId2) const
-{
- aId1=0;
- aId2=0;
- if (myNbIds>1) {
- aId1=myMap(1);
- aId2=myMap(2);
- }
-}
-//=======================================================================
-//function :IsEqual
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_PassKey::IsEqual(const NMTDS_PassKey& aOther) const
-{
- Standard_Boolean bRet;
- Standard_Integer i, aId;
- //
- bRet=Standard_False;
- //
- if (myNbIds!=aOther.myNbIds) {
- return bRet;
- }
- for (i=1; i<=myNbIds; ++i) {
- aId=myMap(i);
- if (!aOther.myMap.Contains(aId)) {
- return bRet;
- }
- }
- return !bRet;
-}
-//=======================================================================
-//function : HashCode
-//purpose :
-//=======================================================================
- Standard_Integer NMTDS_PassKey::HashCode(const Standard_Integer aUpper) const
-{
- return ::HashCode(mySum, aUpper);
-}
-//=======================================================================
-//function : Dump
-//purpose :
-//=======================================================================
- void NMTDS_PassKey::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;
- }
- return aIdRet;
-}
-/*
-//=========
-//=======================================================================
-//function : Contains
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_PassKey::Contains(const Standard_Integer aId) const
-{
- return myMap.Contains(aId);
-}
-//=======================================================================
-//function :Contains
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_PassKey::Contains(const NMTDS_PassKey& aOther) const
-{
- Standard_Boolean bRet;
- Standard_Integer i, aId;
- //
- bRet=Standard_False;
- //
- if (myNbIds<aOther.myNbIds) {
- return bRet;
- }
- for (i=1; i<=aOther.myNbIds; ++i) {
- aId=aOther.myMap(i);
- if (!myMap.Contains(aId)) {
- return bRet;
- }
- }
- return !bRet;
-}
-//=======================================================================
-//function :Intersected
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_PassKey::Intersected(const NMTDS_PassKey& aOther) const
-{
- Standard_Boolean bRet;
- Standard_Integer i, aId;
- //
- bRet=Standard_False;
- //
- for (i=1; i<=myNbIds; ++i) {
- aId=myMap(i);
- if (aOther.Contains(aId)) {
- return !bRet;
- }
- }
- return bRet;
-}
-//=======================================================================
-//function : Add
-//purpose :
-//=======================================================================
- void NMTDS_PassKey::Add(const Standard_Integer aId)
-{
- TColStd_ListOfInteger aLI;
- aLI.Append(aId);
- //
- Add(aLI);
-}
-//=======================================================================
-//function : Add
-//purpose :
-//=======================================================================
- void NMTDS_PassKey::Add(const NMTDS_PassKey& aOther)
-{
- Standard_Integer i, aId;
- TColStd_ListOfInteger aLS;
- //
- for(i=1; i<=myNbIds; ++i) {
- aId=myMap(i);
- aLS.Append(aId);
- }
- for(i=1; i<=aOther.myNbIds; ++i) {
- aId=aOther.myMap(i);
- aLS.Append(aId);
- }
- //
- Add(aLS);
-}
-//=======================================================================
-//function : Add
-//purpose :
-//=======================================================================
- void NMTDS_PassKey::Add(const TColStd_ListOfInteger& aLI)
-{
- Standard_Integer i, aId;
- TColStd_ListOfInteger aLS;
- TColStd_ListIteratorOfListOfInteger aIt;
- //
- for(i=1; i<=myNbIds; ++i) {
- aId=myMap(i);
- aLS.Append(aId);
- }
- aIt.Initialize(aLI);
- for (; aIt.More(); aIt.Next()) {
- aId=aIt.Value();
- aLS.Append(aId);
- }
- //
- SetIds(aLS);
-}
-//=========
-*/
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_PassKey.hxx
-// Created:
-// Author: Peter KURNEV
-// <peter@PREFEX>
-//
-#ifndef _NMTDS_PassKey_HeaderFile
-#define _NMTDS_PassKey_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
-#include <Standard_Boolean.hxx>
-#include <TColStd_ListOfInteger.hxx>
-
-//=======================================================================
-//function : NMTDS_PassKey
-//purpose :
-//=======================================================================
-class NMTDS_PassKey {
- public:
- Standard_EXPORT
- NMTDS_PassKey();
-
- Standard_EXPORT
- virtual ~NMTDS_PassKey();
-
- Standard_EXPORT
- NMTDS_PassKey(const NMTDS_PassKey& Other);
-
- Standard_EXPORT
- NMTDS_PassKey& operator =(const NMTDS_PassKey& Other);
-
- Standard_EXPORT
- void Clear() ;
-
- Standard_EXPORT
- void SetIds(const Standard_Integer aI1) ;
-
- Standard_EXPORT
- void SetIds(const Standard_Integer aI1,
- const Standard_Integer aI2) ;
-
- Standard_EXPORT
- void SetIds(const Standard_Integer aI1,
- const Standard_Integer aI2,
- const Standard_Integer aI3) ;
-
- Standard_EXPORT
- void SetIds(const Standard_Integer aI1,
- const Standard_Integer aI2,
- const Standard_Integer aI3,
- const Standard_Integer aI4) ;
-
- Standard_EXPORT
- void SetIds(const TColStd_ListOfInteger& aLS) ;
-
- Standard_EXPORT
- Standard_Integer NbIds() const;
-
- Standard_EXPORT
- Standard_Boolean IsEqual(const NMTDS_PassKey& aOther) const;
-
- Standard_EXPORT
- Standard_Integer HashCode(const Standard_Integer Upper) const;
-
- Standard_EXPORT
- Standard_Integer Id(const Standard_Integer aIndex) const;
-
- Standard_EXPORT
- void Ids(Standard_Integer& aI1,Standard_Integer& aI2) const;
-
- Standard_EXPORT
- void Dump(const Standard_Integer aHex = 0) const;
-
-protected:
- Standard_Integer myNbIds;
- Standard_Integer mySum;
- TColStd_IndexedMapOfInteger myMap;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_PassKeyBoolean.cxx
-// Created: Mon May 15 14:31:05 2006
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTDS_PassKeyBoolean.hxx>
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- NMTDS_PassKeyBoolean::NMTDS_PassKeyBoolean()
-:
- myFlag(Standard_False),
- NMTDS_PassKey()
-{
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
- NMTDS_PassKeyBoolean::~NMTDS_PassKeyBoolean()
-{
-}
-//=======================================================================
-//function :operator =
-//purpose :
-//=======================================================================
- NMTDS_PassKeyBoolean& NMTDS_PassKeyBoolean::operator =(const NMTDS_PassKeyBoolean& anOther)
-{
- myFlag=anOther.myFlag;
- NMTDS_PassKey::operator =(anOther);
- return *this;
-}
-//=======================================================================
-//function :SetFlag
-//purpose :
-//=======================================================================
- void NMTDS_PassKeyBoolean::SetFlag(const Standard_Boolean aFlag)
-{
- myFlag=aFlag;
-}
-//=======================================================================
-//function :Flag
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_PassKeyBoolean::Flag()const
-{
- return myFlag;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_PassKeyBoolean.hxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _NMTDS_PassKeyBoolean_HeaderFile
-#define _NMTDS_PassKeyBoolean_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Boolean.hxx>
-#include <NMTDS_PassKey.hxx>
-
-//=======================================================================
-//class : NMTDS_PassKeyBoolean
-//purpose :
-//=======================================================================
-class NMTDS_PassKeyBoolean : public NMTDS_PassKey {
- public:
- Standard_EXPORT
- NMTDS_PassKeyBoolean();
-
- Standard_EXPORT
- virtual ~NMTDS_PassKeyBoolean();
-
- Standard_EXPORT
- void SetFlag(const Standard_Boolean aFlag) ;
-
- Standard_EXPORT
- NMTDS_PassKeyBoolean& operator =(const NMTDS_PassKeyBoolean& Other);
-
- Standard_EXPORT
- Standard_Boolean Flag() const;
-
- protected:
- Standard_Boolean myFlag;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_PassKeyMapHasher.cxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTDS_PassKeyMapHasher.hxx>
-
-//=======================================================================
-//function : HashCode
-//purpose :
-//=======================================================================
- Standard_Integer NMTDS_PassKeyMapHasher::HashCode(const NMTDS_PassKey& aPK,
- const Standard_Integer Upper)
-{
- return aPK.HashCode(Upper);
-}
-//=======================================================================
-//function :IsEqual
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_PassKeyMapHasher::IsEqual(const NMTDS_PassKey& aPK1,
- const NMTDS_PassKey& aPK2)
-{
- return aPK1.IsEqual(aPK2);
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_PassKeyMapHasher.hxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _NMTDS_PassKeyMapHasher_HeaderFile
-#define _NMTDS_PassKeyMapHasher_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <NMTDS_PassKey.hxx>
-#include <Standard_Boolean.hxx>
-
-
-//=======================================================================
-//function : NMTDS_PassKeyMapHasher
-//purpose :
-//=======================================================================
-class NMTDS_PassKeyMapHasher {
- public:
- Standard_EXPORT
- static Standard_Integer HashCode(const NMTDS_PassKey& aPKey,
- const Standard_Integer Upper) ;
-
- Standard_EXPORT
- static Standard_Boolean IsEqual(const NMTDS_PassKey& aPKey1,
- const NMTDS_PassKey& aPKey2) ;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_PassKeyShape.cxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTDS_PassKeyShape.hxx>
-
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopoDS_Shape.hxx>
-
-
-static
- Standard_Integer NormalizedId(const Standard_Integer aId,
- const Standard_Integer aDiv);
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- NMTDS_PassKeyShape::NMTDS_PassKeyShape()
-{
- myUpper=432123;
-}
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- NMTDS_PassKeyShape::NMTDS_PassKeyShape(const NMTDS_PassKeyShape& aOther)
-{
- myUpper=432123;
- myNbIds=aOther.myNbIds;
- mySum=aOther.mySum;
- myMap=aOther.myMap;
-}
-//=======================================================================
-//function :~
-//purpose :
-//=======================================================================
- NMTDS_PassKeyShape::~NMTDS_PassKeyShape()
-{
-}
-//=======================================================================
-//function :Assign
-//purpose :
-//=======================================================================
- NMTDS_PassKeyShape& NMTDS_PassKeyShape::Assign(const NMTDS_PassKeyShape& aOther)
-{
- myUpper=432123;
- myNbIds=aOther.myNbIds;
- mySum=aOther.mySum;
- myMap=aOther.myMap;
- return *this;
-}
-//=======================================================================
-//function :Clear
-//purpose :
-//=======================================================================
- void NMTDS_PassKeyShape::Clear()
-{
- myNbIds=0;
- mySum=0;
- myMap.Clear();
-}
-//=======================================================================
-//function :SetShapes
-//purpose :
-//=======================================================================
- void NMTDS_PassKeyShape::SetShapes(const TopoDS_Shape& aS1)
-
-{
- Standard_Integer aHC;
- //
- Clear();
- myNbIds=1;
- myMap.Add(aS1);
- aHC=aS1.HashCode(myUpper);
- mySum=NormalizedId(aHC, myNbIds);
-}
-//=======================================================================
-//function :SetShapes
-//purpose :
-//=======================================================================
- void NMTDS_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2)
-{
- TopTools_ListOfShape aLS;
- //
- aLS.Append(aS1);
- aLS.Append(aS2);
- SetShapes(aLS);
-}
-//=======================================================================
-//function :SetShapes
-//purpose :
-//=======================================================================
- void NMTDS_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2,
- const TopoDS_Shape& aS3)
-{
- TopTools_ListOfShape aLS;
- //
- aLS.Append(aS1);
- aLS.Append(aS2);
- aLS.Append(aS3);
- SetShapes(aLS);
-}
-//=======================================================================
-//function :SetShapes
-//purpose :
-//=======================================================================
- void NMTDS_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2,
- const TopoDS_Shape& aS3,
- const TopoDS_Shape& aS4)
-{
- TopTools_ListOfShape aLS;
- //
- aLS.Append(aS1);
- aLS.Append(aS2);
- aLS.Append(aS3);
- aLS.Append(aS4);
- SetShapes(aLS);
-}
-//=======================================================================
-//function :SetShapes
-//purpose :
-//=======================================================================
- void NMTDS_PassKeyShape::SetShapes(const TopTools_ListOfShape& aLS)
-{
- Standard_Integer i, aId, aIdN;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- Clear();
- aIt.Initialize(aLS);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aS=aIt.Value();
- 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 NMTDS_PassKeyShape::NbIds()const
-{
- return myNbIds;
-}
-//=======================================================================
-//function :IsEqual
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_PassKeyShape::IsEqual(const NMTDS_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 NMTDS_PassKeyShape::HashCode(const Standard_Integer aUpper) const
-{
- return ::HashCode(mySum, aUpper);
-}
-//=======================================================================
-//function : Dump
-//purpose :
-//=======================================================================
- void NMTDS_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;
- }
- return aIdRet;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_PassKeyShape.hxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _NMTDS_PassKeyShape_HeaderFile
-#define _NMTDS_PassKeyShape_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <Standard_Boolean.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ListOfShape.hxx>
-
-//=======================================================================
-//function : NMTDS_PassKeyShape
-//purpose :
-//=======================================================================
-class NMTDS_PassKeyShape {
- public:
- Standard_EXPORT
- NMTDS_PassKeyShape();
-
- Standard_EXPORT
- virtual ~NMTDS_PassKeyShape();
-
- Standard_EXPORT
- NMTDS_PassKeyShape(const NMTDS_PassKeyShape& Other);
-
- Standard_EXPORT
- NMTDS_PassKeyShape& Assign(const NMTDS_PassKeyShape& Other) ;
-
- NMTDS_PassKeyShape& operator =(const NMTDS_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 Clear() ;
-
- Standard_EXPORT
- Standard_Integer NbIds() const;
-
- Standard_EXPORT
- Standard_Boolean IsEqual(const NMTDS_PassKeyShape& aOther) const;
-
- Standard_EXPORT
- Standard_Integer HashCode(const Standard_Integer Upper) const;
-
- Standard_EXPORT
- void Dump(const Standard_Integer aHex = 0) const;
-
- protected:
- Standard_Integer myNbIds;
- Standard_Integer mySum;
- Standard_Integer myUpper;
- TopTools_IndexedMapOfShape myMap;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_PassKeyMapHasher.cxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTDS_PassKeyShapeMapHasher.hxx>
-
-//=======================================================================
-//function : HashCode
-//purpose :
-//=======================================================================
- Standard_Integer NMTDS_PassKeyShapeMapHasher::HashCode(const NMTDS_PassKeyShape& aPK,
- const Standard_Integer Upper)
-{
- return aPK.HashCode(Upper);
-}
-//=======================================================================
-//function :IsEqual
-//purpose :
-//=======================================================================
- Standard_Boolean NMTDS_PassKeyShapeMapHasher::IsEqual(const NMTDS_PassKeyShape& aPK1,
- const NMTDS_PassKeyShape& aPK2)
-{
- return aPK1.IsEqual(aPK2);
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_PassKeyMapHasher.cxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _NMTDS_PassKeyShapeMapHasher_HeaderFile
-#define _NMTDS_PassKeyShapeMapHasher_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <NMTDS_PassKeyShape.hxx>
-#include <Standard_Boolean.hxx>
-
-//=======================================================================
-//function : NMTDS_PassKeyShapeMapHasher
-//purpose :
-//=======================================================================
-class NMTDS_PassKeyShapeMapHasher {
- public:
- Standard_EXPORT
- static Standard_Integer HashCode(const NMTDS_PassKeyShape& aPKey,
- const Standard_Integer Upper) ;
-
- Standard_EXPORT
- static Standard_Boolean IsEqual(const NMTDS_PassKeyShape& aPKey1,
- const NMTDS_PassKeyShape& aPKey2) ;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTDS_ShapesDataStructure.cxx
-// Author: Peter KURNEV
-
-#include <NMTDS_ShapesDataStructure.hxx>
-#include <TopoDS_Iterator.hxx>
-#include <TopoDS_Shape.hxx>
-#include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#include <NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#include <NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#include <BooleanOperations_ShapeAndInterferences.hxx>
-#include <NMTDS_IndexRange.hxx>
-//
-#include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#include <BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx>
-#include <TColStd_MapOfInteger.hxx>
-#include <NMTDS_Tools.hxx>
-
-
-static
- void ComputeBoxExS(const Standard_Integer aIx,
- const NMTDS_ShapesDataStructure* pDS,
- Bnd_Box& aBoxEx);
-static
- void GetAllSuccessorsS(const Standard_Integer nS,
- const NMTDS_ShapesDataStructure* myDS,
- TColStd_IndexedMapOfInteger& aMA);
-
-//===========================================================================
-//function : NMTDS_ShapesDataStructure::NMTDS_ShapesDataStructure
-//purpose :
-//===========================================================================
-NMTDS_ShapesDataStructure::NMTDS_ShapesDataStructure()
-:
- BooleanOperations_ShapesDataStructure()
-{}
-//===========================================================================
-//function : SetCompositeShape
-//purpose :
-//===========================================================================
-void NMTDS_ShapesDataStructure::SetCompositeShape(const TopoDS_Shape& aS)
-{
- myCompositeShape=aS;
-}
-//===========================================================================
-//function : CompositeShape
-//purpose :
-//===========================================================================
-const TopoDS_Shape& NMTDS_ShapesDataStructure::CompositeShape()const
-{
- return myCompositeShape;
-}
-//===========================================================================
-//function : Ranges
-//purpose :
-//===========================================================================
-const NMTDS_CArray1OfIndexRange& NMTDS_ShapesDataStructure::Ranges()const
-{
- return myRanges;
-}
-//===========================================================================
-//function : FillMap
-//purpose :
-//===========================================================================
-void NMTDS_ShapesDataStructure::FillMap
- (const TopoDS_Shape& aS,
- BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,
- BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const
-{
- Standard_Integer iX, i, j, aIndex, aNbSc, aNbS;
- BooleanOperations_AncestorsSeqAndSuccessorsSeq aAS;
- //
- aMSA.Add(aS, aAS);
- aMS.Add(aS, aAS);
- FillSubshapes(aS, aMSA, aMS);
- //
- aNbS=aMS.Extent();
- for(i=1; i<=aNbS; ++i) {
- TColStd_MapOfInteger aMFence;
- //
- const TopoDS_Shape& aSX=aMS.FindKey(i);
- iX=aMSA.FindIndex(aSX);
- const BooleanOperations_AncestorsSeqAndSuccessorsSeq& aAS1=aMSA(iX);
- //
- aNbSc=aAS1.NumberOfSuccessors();
- for(j=1; j<=aNbSc; ++j) {
- aIndex=aAS1.GetSuccessor(j);
- if(aMFence.Add(aIndex)) {
- BooleanOperations_AncestorsSeqAndSuccessorsSeq& aAS2=aMSA.ChangeFromIndex(aIndex);
- aAS2.SetNewAncestor(iX);
- }
- }
- }
-}
-//===========================================================================
-//function : FillSubshapes
-//purpose :
-//===========================================================================
-void NMTDS_ShapesDataStructure::FillSubshapes
- (const TopoDS_Shape& aS,
- BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,
- BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const
-{
- Standard_Boolean bIsNewSubShape;
- Standard_Integer aIndexSubShape, aIndex;
- BooleanOperations_AncestorsSeqAndSuccessorsSeq aASx;
- //
- aIndex=aMSA.FindIndex(aS);
- BooleanOperations_AncestorsSeqAndSuccessorsSeq& aAS=aMSA.ChangeFromIndex(aIndex);
- //
- TopoDS_Iterator anIt(aS, Standard_True);
- for(; anIt.More(); anIt.Next()) {
- const TopoDS_Shape& aSubShape = anIt.Value();
- bIsNewSubShape = Standard_False;
- if(!aMSA.Contains(aSubShape)) {
- bIsNewSubShape=!bIsNewSubShape;
- aIndexSubShape=aMSA.Add(aSubShape, aASx);
- aMS.Add(aSubShape, aASx);
- }
- else {
- aIndexSubShape=aMSA.FindIndex(aSubShape);
- }
- aAS.SetNewSuccessor(aIndexSubShape);
- aAS.SetNewOrientation(aSubShape.Orientation());
- //
- if(bIsNewSubShape && (aSubShape.ShapeType() != TopAbs_VERTEX)) {
- FillSubshapes(aSubShape, aMSA, aMS);
- }
- }
-}
-//===========================================================================
-//function : Init
-//purpose :
-//===========================================================================
-void NMTDS_ShapesDataStructure::Init()
-{
- Standard_Integer i, j, aNbSx, aNbS, aShift, aNbRanges;
- Standard_Integer iFirst, iLast;
- NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors aLx;
- NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors aLit;
- TopoDS_Iterator anIt;
- BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors aMSA;
- //
- anIt.Initialize(myCompositeShape);
- for (; anIt.More(); anIt.Next()) {
- const TopoDS_Shape& aSx=anIt.Value();
- BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors aMS;
- //
- if (!aMSA.Contains(aSx)) {
- FillMap(aSx, aMSA, aMS);
- aLx.Append(aMS);
- }
- }
- aNbS=aMSA.Extent();
- //
- // Fill myRanges
- i=aLx.Extent();
- myRanges.Resize(i);
- aLit.Initialize(aLx);
- for (i=1; aLit.More(); aLit.Next(), ++i) {
- const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSx=aLit.Value();
- aNbSx=aMSx.Extent();
- if (i==1) {
- iFirst=1;
- iLast=aNbSx;
- myRanges(i).SetFirst(iFirst);
- myRanges(i).SetLast(iLast);
- continue;
- }
- iFirst=myRanges(i-1).Last()+1;
- iLast=iFirst+aNbSx-1;
- myRanges(i).SetFirst(iFirst);
- myRanges(i).SetLast(iLast);
- }
- //
- myNumberOfShapesOfTheObject=aNbS;
- myNumberOfShapesOfTheTool=0;
- myLength=2*aNbS;
- //
- // Allocate the whole Table
- myListOfShapeAndInterferences = (BooleanOperations_PShapeAndInterferences)
- Standard::Allocate(myLength*sizeof(BooleanOperations_ShapeAndInterferences));
- //
- // Fill the table
-
- aShift=0;
- for (j=1; j<=aNbS; ++j) {
- const TopoDS_Shape& aSx=aMSA.FindKey(j);
- const BooleanOperations_AncestorsSeqAndSuccessorsSeq& aASx=aMSA.FindFromIndex(j);
- InsertShapeAndAncestorsSuccessors(aSx, aASx, aShift);
- }
- // myShapeIndexMap
- myShapeIndexMap.Clear();
- //
- //modified by NIZNHY-PKV Mon Dec 12 09:01:53 2011f
- aNbRanges=myRanges.Extent();
- for (i=1; i<=aNbRanges; ++i){
- const NMTDS_IndexRange& aR=myRanges(i);
- iFirst=aR.First();
- iLast =aR.Last();
- for (j=iFirst; j<=iLast; ++j) {
- const TopoDS_Shape& aS=Shape(j);
- myShapeIndexMap.Bind(aS, j);
- }
- }
- //modified by NIZNHY-PKV Mon Dec 12 09:02:00 2011t
- //
- // myRefEdges
- iLast=myNumberOfShapesOfTheObject+myNumberOfShapesOfTheTool;
- myRefEdges.Resize(iLast);
-
- for (i=1; i<=iLast; ++i) {
- const TopoDS_Shape& aS=Shape(i);
- myRefEdges(i)=0;
- if (aS.ShapeType()==TopAbs_EDGE) {
- myNbEdges++;
- myRefEdges(i)=myNbEdges;
- }
- }
-}
-//===========================================================================
-//function : ShapeRangeIndex
-//purpose :
-//===========================================================================
-Standard_Integer NMTDS_ShapesDataStructure::ShapeRangeIndex
- (const Standard_Integer aId)const
-{
- Standard_Boolean bFound;
- Standard_Integer i, aNbR, aIdx, aNbS, aZero=0;
- //
- aNbS=myNumberOfShapesOfTheObject+myNumberOfShapesOfTheTool;
-
- aIdx=aId;
- if (aIdx > aNbS || aIdx < 1){
- return aZero;
- }
- //
- if (aIdx > myNumberOfShapesOfTheObject) {
- aIdx-=myNumberOfShapesOfTheObject;
- }
- //
- aNbR=myRanges.Extent();
- for (i=1; i<=aNbR; ++i) {
- const NMTDS_IndexRange& aRange=myRanges(i);
- bFound=aRange.IsInRange(aIdx);
- if (bFound) {
- return i;
- }
- }
- return aZero;
-}
-//===========================================================================
-//function : Rank
-//purpose :
-//===========================================================================
-Standard_Integer NMTDS_ShapesDataStructure::Rank
- (const Standard_Integer aId)const
-{
- Standard_Boolean bFound;
- Standard_Integer i, aNbR, aNbS, aZero=0;
- //
- aNbS=myNumberOfShapesOfTheObject;
-
- if (aId > aNbS || aId < 1){
- return aZero;
- }
- //
- aNbR=myRanges.Extent();
- for (i=1; i<=aNbR; ++i) {
- const NMTDS_IndexRange& aRange=myRanges(i);
- bFound=aRange.IsInRange(aId);
- if (bFound) {
- return i;
- }
- }
- return aZero;
-}
-//===========================================================================
-//function : ShapeIndex
-//purpose :
-//===========================================================================
-Standard_Integer NMTDS_ShapesDataStructure::ShapeIndex
- (const TopoDS_Shape& aS,
- const Standard_Integer aRank)const
-{
- Standard_Address pIndex;
- Standard_Integer aIndex;
- //
- aIndex=0;
- //
- //modified by NIZNHY-PKV Mon Dec 12 09:02:48 2011f
- pIndex=myShapeIndexMap.Find1(aS);
- if (pIndex) {
- aIndex=*((Standard_Integer*)pIndex);
- }
- //modified by NIZNHY-PKV Mon Dec 12 09:02:54 2011t
- return aIndex;
-}
-
-//=======================================================================
-//function : ComputeBoxEx
-//purpose :
-//=======================================================================
-void NMTDS_ShapesDataStructure::ComputeBoxEx
- (const Standard_Integer aIx,
- Bnd_Box& aBoxEx)const
-{
- ComputeBoxExS(aIx, this, aBoxEx);
-}
-//=======================================================================
-//function : GetAllSuccessors
-//purpose :
-//=======================================================================
-void NMTDS_ShapesDataStructure::GetAllSuccessors
- (const Standard_Integer nS,
- TColStd_IndexedMapOfInteger& aMA)const
-{
- GetAllSuccessorsS(nS, this, aMA);
-}
-//=======================================================================
-//function : GetAllSuccessorsS
-//purpose :
-//=======================================================================
-void GetAllSuccessorsS(const Standard_Integer nS,
- const NMTDS_ShapesDataStructure* myDS,
- TColStd_IndexedMapOfInteger& aMA)
-{
- TopAbs_ShapeEnum aT;
- Standard_Integer i, nSx, aNbSuccessors, *pSuccessors;
- Standard_Address xSuccessors;
- //
- const TopoDS_Shape& aS=myDS->Shape(nS);
- aT=aS.ShapeType();
- if(NMTDS_Tools::HasBRep(aT)) {
- aMA.Add(nS);
- //
- if (aT==TopAbs_VERTEX) {
- return;
- }
- }
- //
- myDS->GetSuccessors(nS, xSuccessors, aNbSuccessors);
- pSuccessors=(Standard_Integer*)xSuccessors;
- for (i=0; i<aNbSuccessors; ++i) {
- nSx=pSuccessors[i];
- GetAllSuccessorsS(nSx, myDS, aMA);
- }
-}
-//=======================================================================
-// function: ComputeBoxExS
-// purpose:
-//=======================================================================
-void ComputeBoxExS(const Standard_Integer aIx,
- const NMTDS_ShapesDataStructure* pDS,
- Bnd_Box& aBoxEx)
-{
- Standard_Integer i, aNbS, iS;
- //
- const Bnd_Box& aBox=pDS->GetBoundingBox(aIx);
- aBoxEx.Add(aBox);
- //
- aNbS=pDS->NumberOfSuccessors(aIx);
- for (i=1; i<=aNbS; ++i) {
- Bnd_Box aBoxS;
- iS=pDS->GetSuccessor(aIx, i);
- ComputeBoxExS(iS, pDS, aBoxS);
- aBoxEx.Add(aBoxS);
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTDS_ShapesDataStructure_HeaderFile
-#define _NMTDS_ShapesDataStructure_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <TopoDS_Shape.hxx>
-#include <NMTDS_CArray1OfIndexRange.hxx>
-#include <TopTools_DataMapOfShapeInteger.hxx>
-#include <BooleanOperations_ShapesDataStructure.hxx>
-#include <Standard_Integer.hxx>
-#include <TopoDS_Shape.hxx>
-#include <NMTDS_CArray1OfIndexRange.hxx>
-#include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
-#include <Bnd_Box.hxx>
-
-//=======================================================================
-//class : NMTDS_ShapesDataStructure
-//purpose :
-//=======================================================================
-class NMTDS_ShapesDataStructure : public BooleanOperations_ShapesDataStructure
-{
- public:
- Standard_EXPORT
- NMTDS_ShapesDataStructure();
-
- Standard_EXPORT
- void SetCompositeShape(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- void Init() ;
-
- Standard_EXPORT
- const NMTDS_CArray1OfIndexRange& Ranges() const;
-
- Standard_EXPORT
- const TopoDS_Shape& CompositeShape() const;
-
- Standard_EXPORT
- Standard_Integer ShapeRangeIndex(const Standard_Integer aId) const;
-
- Standard_EXPORT
- virtual Standard_Integer Rank(const Standard_Integer anIndex) const;
-
- Standard_EXPORT
- virtual Standard_Integer ShapeIndex(const TopoDS_Shape& aS,
- const Standard_Integer iRank) const;
-
- Standard_EXPORT
- void FillMap(const TopoDS_Shape& aS,
- BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,
- BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const;
-
- Standard_EXPORT
- void FillSubshapes(const TopoDS_Shape& aS,
- BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,
- BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const;
-
- Standard_EXPORT
- void GetAllSuccessors(const Standard_Integer anIndex,
- TColStd_IndexedMapOfInteger& aScrs) const;
-
- Standard_EXPORT
- void ComputeBoxEx(const Standard_Integer anIndex,
- Bnd_Box& aBox) const;
-
-
- protected:
- TopoDS_Shape myCompositeShape;
- NMTDS_CArray1OfIndexRange myRanges;
- TopTools_DataMapOfShapeInteger myShapeIndexMap;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_Tools.cxx
-// Created: Tue Feb 20 14:57:28 2007
-// Author: Peter KURNEV
-
-#include <NMTDS_Tools.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <gp_Pnt.hxx>
-#include <BRep_Tool.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopTools_IndexedDataMapOfShapeShape.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <TopoDS_Iterator.hxx>
-#include <BRep_Builder.hxx>
-
-void CopySource(const TopoDS_Shape& aS,
- TopTools_IndexedDataMapOfShapeShape& aMapSS,
- TopoDS_Shape& aSC);
-
-//=======================================================================
-//function : CopyShape
-//purpose :
-//=======================================================================
- void NMTDS_Tools::CopyShape(const TopoDS_Shape& aS,
- TopoDS_Shape& aSC)
-{
- TopTools_IndexedDataMapOfShapeShape aMapSS;
- //
- CopySource(aS, aMapSS, aSC);
-}
-//=======================================================================
-//function : CopyShape
-//purpose :
-//=======================================================================
- void NMTDS_Tools::CopyShape(const TopoDS_Shape& aS,
- TopoDS_Shape& aSC,
- TopTools_IndexedDataMapOfShapeShape& aMapSS)
-{
- CopySource(aS, aMapSS, aSC);
-}
-//=======================================================================
-//function : CopySource
-//purpose :
-//=======================================================================
-void CopySource(const TopoDS_Shape& aS,
- TopTools_IndexedDataMapOfShapeShape& aMapSS,
- TopoDS_Shape& aSC)
-{
- Standard_Boolean bFree;
- TopAbs_ShapeEnum aT;
- TopoDS_Iterator aIt;
- TopoDS_Shape aSF;
- BRep_Builder BB;
- //
- aT=aS.ShapeType();
- //
- if (aMapSS.Contains(aS)) {
- aSC=aMapSS.ChangeFromKey(aS);
- aSC.Orientation(aS.Orientation());
- return;
- }
- else {
- aSC=aS.EmptyCopied();
- aMapSS.Add(aS, aSC);
- }
- //
- bFree=aSC.Free();
- aSC.Free(Standard_True);
- aSF=aS;
- if (aT==TopAbs_EDGE){
- TopAbs_Orientation aOr;
- //
- aOr=aS.Orientation();
- if(aOr==TopAbs_INTERNAL) {
- aSF.Orientation(TopAbs_FORWARD);
- }
- }
- aIt.Initialize(aSF);
- for (; aIt.More(); aIt.Next()) {
- TopoDS_Shape aSCx;
- //
- const TopoDS_Shape& aSx=aIt.Value();
- //
- CopySource (aSx, aMapSS, aSCx);
- //
- aSCx.Orientation(aSx.Orientation());
- BB.Add(aSC, aSCx);
- }
- aSC.Free(bFree);
-}
-//=======================================================================
-// function: ComputeVV
-// purpose:
-//=======================================================================
- Standard_Integer NMTDS_Tools::ComputeVV(const TopoDS_Vertex& aV1,
- const TopoDS_Vertex& aV2)
-{
- Standard_Real aTolV1, aTolV2, aTolSum, aTolSum2, aD2;
- gp_Pnt aP1, aP2;
- //
- aTolV1=BRep_Tool::Tolerance(aV1);
- aTolV2=BRep_Tool::Tolerance(aV2);
- aTolSum=aTolV1+aTolV2;
- aTolSum2=aTolSum*aTolSum;
- //
- aP1=BRep_Tool::Pnt(aV1);
- aP2=BRep_Tool::Pnt(aV2);
- //
- aD2=aP1.SquareDistance(aP2);
- if (aD2>aTolSum2) {
- return -1;
- }
- return 0;
-}
-//=======================================================================
-// function: HasBRep
-// purpose:
-//=======================================================================
- Standard_Boolean NMTDS_Tools::HasBRep(const TopAbs_ShapeEnum aTi)
-{
- return (aTi==TopAbs_VERTEX || aTi==TopAbs_EDGE || aTi==TopAbs_FACE);
-}
-//=======================================================================
-//function : TypeToInteger
-//purpose :
-//=======================================================================
- Standard_Integer NMTDS_Tools::TypeToInteger(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2)
-{
- Standard_Integer iRet, iT1, iT2, iX;
- //
- iRet=-1;
- iT1=(Standard_Integer)aType1;
- iT2=(Standard_Integer)aType2;
- //
- iX=iT2*10+iT1;
- switch (iX) {
- case 77:
- iRet=5; // VV
- break;
- case 76:
- case 67:
- iRet=4; // VE
- break;
- case 74:
- case 47:
- iRet=2; // VF
- break;
- case 66:
- iRet=3; // EE
- break;
- case 64:
- case 46:
- iRet=1; // EF
- break;
- case 44:
- iRet=0; // FF
- break;
- default:
- break;
- }
- return iRet;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_Tools.hxx
-// Created:
-// Author: Peter KURNEV
-
-#ifndef _NMTDS_Tools_HeaderFile
-#define _NMTDS_Tools_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <Standard_Boolean.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopTools_IndexedDataMapOfShapeShape.hxx>
-
-//=======================================================================
-//function : NMTDS_Tools
-//purpose :
-//=======================================================================
-class NMTDS_Tools
-{
- public:
- Standard_EXPORT
- static Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aT1,
- const TopAbs_ShapeEnum aT2) ;
-
- Standard_EXPORT
- static Standard_Boolean HasBRep(const TopAbs_ShapeEnum aT) ;
-
- Standard_EXPORT
- static Standard_Integer ComputeVV(const TopoDS_Vertex& aV1,
- const TopoDS_Vertex& aV2) ;
-
- Standard_EXPORT
- static void CopyShape(const TopoDS_Shape& aS,
- TopoDS_Shape& aSC) ;
-
- Standard_EXPORT
- static void CopyShape(const TopoDS_Shape& aS,
- TopoDS_Shape& aSC,
- TopTools_IndexedDataMapOfShapeShape& aMSS) ;
-};
-#endif
--- /dev/null
+NMTTools_PaveFiller_0.cxx
+NMTTools_PaveFiller_1.cxx
+NMTTools_PaveFiller_2.cxx
+NMTTools_PaveFiller_3.cxx
+NMTTools_PaveFiller_4.cxx
+NMTTools_PaveFiller_5.cxx
+NMTTools_PaveFiller_6.cxx
+NMTTools_PaveFiller_7.cxx
+NMTTools_PaveFiller_8.cxx
+NMTTools_PaveFiller_9.cxx
+
+
+NMTTools_CoupleOfShape.hxx
+NMTTools_CoupleOfShape.cxx
+NMTTools_CommonBlock.hxx
+NMTTools_CommonBlock.cxx
+NMTTools_CommonBlockAPI.hxx
+NMTTools_CommonBlockAPI.cxx
+NMTTools_FaceInfo.hxx
+NMTTools_FaceInfo.cxx
+NMTTools_FaceInfo.lxx
+NMTTools_Tools.hxx
+NMTTools_Tools.cxx
+NMTTools_PaveFiller.hxx
+NMTTools_PaveFiller.cxx
+NMTTools_PPaveFiller.hxx
+NMTTools_DEProcessor.hxx
+NMTTools_DEProcessor.cxx
+NMTTools_CheckerSI.hxx
+NMTTools_CheckerSI.cxx
+NMTTools_CheckerSI_1.cxx
+
+NMTTools_ListOfCommonBlock.hxx
+NMTTools_ListIteratorOfListOfCommonBlock.hxx
+NMTTools_ListOfCoupleOfShape.hxx
+NMTTools_ListIteratorOfListOfCoupleOfShape.hxx
+
+NMTTools_MapOfPaveBlock.hxx
+NMTTools_MapIteratorOfMapOfPaveBlock.hxx
+
+NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx
+NMTTools_IndexedDataMapOfShapePaveBlock.hxx
+NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx
+
+NMTTools_DataMapOfIntegerListOfPaveBlock.hxx
+NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx
+
+NMTTools_DataMapOfIntegerFaceInfo.hxx
+NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx
+
+NMTTools_CommonBlockPool.hxx
+NMTTools_CommonBlockPool.cxx
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile
-#define _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo);
-
-class Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)():Handle(TCollection_MapNode)() {}
- Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)(const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)(const NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)& operator=(const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)& operator=(const NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo* operator->() const
- {
- return (NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)();
-
- Standard_EXPORT static const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile
-#define _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock);
-
-class Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)():Handle(TCollection_MapNode)() {}
- Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)(const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)(const NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)& operator=(const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)& operator=(const NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock* operator->() const
- {
- return (NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)();
-
- Standard_EXPORT static const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile
-#define _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger);
-
-class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)():Handle(TCollection_MapNode)() {}
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)& operator=(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)& operator=(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger* operator->() const
- {
- return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)();
-
- Standard_EXPORT static const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
-#define _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape);
-
-class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)():Handle(TCollection_MapNode)() {}
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)& operator=(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)& operator=(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape* operator->() const
- {
- return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)();
-
- Standard_EXPORT static const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile
-#define _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock);
-
-class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)():Handle(TCollection_MapNode)() {}
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)& operator=(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)& operator=(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock* operator->() const
- {
- return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)();
-
- Standard_EXPORT static const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile
-#define _Handle_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTTools_ListNodeOfListOfCommonBlock;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_ListNodeOfListOfCommonBlock);
-
-class Handle(NMTTools_ListNodeOfListOfCommonBlock) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTTools_ListNodeOfListOfCommonBlock)():Handle(TCollection_MapNode)() {}
- Handle(NMTTools_ListNodeOfListOfCommonBlock)(const Handle(NMTTools_ListNodeOfListOfCommonBlock)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTTools_ListNodeOfListOfCommonBlock)(const NMTTools_ListNodeOfListOfCommonBlock* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTTools_ListNodeOfListOfCommonBlock)& operator=(const Handle(NMTTools_ListNodeOfListOfCommonBlock)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTTools_ListNodeOfListOfCommonBlock)& operator=(const NMTTools_ListNodeOfListOfCommonBlock* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTTools_ListNodeOfListOfCommonBlock* operator->() const
- {
- return (NMTTools_ListNodeOfListOfCommonBlock *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTTools_ListNodeOfListOfCommonBlock)();
-
- Standard_EXPORT static const Handle(NMTTools_ListNodeOfListOfCommonBlock) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile
-#define _Handle_NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTTools_ListNodeOfListOfCoupleOfShape;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_ListNodeOfListOfCoupleOfShape);
-
-class Handle(NMTTools_ListNodeOfListOfCoupleOfShape) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTTools_ListNodeOfListOfCoupleOfShape)():Handle(TCollection_MapNode)() {}
- Handle(NMTTools_ListNodeOfListOfCoupleOfShape)(const Handle(NMTTools_ListNodeOfListOfCoupleOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTTools_ListNodeOfListOfCoupleOfShape)(const NMTTools_ListNodeOfListOfCoupleOfShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTTools_ListNodeOfListOfCoupleOfShape)& operator=(const Handle(NMTTools_ListNodeOfListOfCoupleOfShape)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTTools_ListNodeOfListOfCoupleOfShape)& operator=(const NMTTools_ListNodeOfListOfCoupleOfShape* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTTools_ListNodeOfListOfCoupleOfShape* operator->() const
- {
- return (NMTTools_ListNodeOfListOfCoupleOfShape *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTTools_ListNodeOfListOfCoupleOfShape)();
-
- Standard_EXPORT static const Handle(NMTTools_ListNodeOfListOfCoupleOfShape) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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_NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile
-#define _Handle_NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class NMTTools_StdMapNodeOfMapOfPaveBlock;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_StdMapNodeOfMapOfPaveBlock);
-
-class Handle(NMTTools_StdMapNodeOfMapOfPaveBlock) : public Handle(TCollection_MapNode) {
- public:
- Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)():Handle(TCollection_MapNode)() {}
- Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)(const Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)(const NMTTools_StdMapNodeOfMapOfPaveBlock* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)& operator=(const Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)& operator=(const NMTTools_StdMapNodeOfMapOfPaveBlock* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- NMTTools_StdMapNodeOfMapOfPaveBlock* operator->() const
- {
- return (NMTTools_StdMapNodeOfMapOfPaveBlock *)ControlAccess();
- }
-
-// Standard_EXPORT ~Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)();
-
- Standard_EXPORT static const Handle(NMTTools_StdMapNodeOfMapOfPaveBlock) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
# header files
salomeinclude_HEADERS = \
- Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx \
- Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx \
- Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx \
- Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx \
- Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx \
- Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx \
- Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx \
- Handle_NMTTools_StdMapNodeOfMapOfPaveBlock.hxx \
NMTTools_CheckerSI.hxx \
- NMTTools_CheckerSI.ixx \
- NMTTools_CheckerSI.jxx \
NMTTools_CommonBlockAPI.hxx \
- NMTTools_CommonBlockAPI.ixx \
- NMTTools_CommonBlockAPI.jxx \
NMTTools_CommonBlock.hxx \
- NMTTools_CommonBlock.ixx \
- NMTTools_CommonBlock.jxx \
NMTTools_CommonBlockPool.hxx \
NMTTools_CoupleOfShape.hxx \
- NMTTools_CoupleOfShape.ixx \
- NMTTools_CoupleOfShape.jxx \
NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx \
NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx \
- NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx \
- NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx \
NMTTools_DataMapOfIntegerFaceInfo.hxx \
NMTTools_DataMapOfIntegerListOfPaveBlock.hxx \
NMTTools_DEProcessor.hxx \
- NMTTools_DEProcessor.ixx \
- NMTTools_DEProcessor.jxx \
NMTTools_FaceInfo.hxx \
- NMTTools_FaceInfo.ixx \
- NMTTools_FaceInfo.jxx \
NMTTools_FaceInfo.lxx \
- NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx \
- NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx \
- NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx \
NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx \
NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx \
NMTTools_IndexedDataMapOfShapePaveBlock.hxx \
NMTTools_ListIteratorOfListOfCommonBlock.hxx \
NMTTools_ListIteratorOfListOfCoupleOfShape.hxx \
- NMTTools_ListNodeOfListOfCommonBlock.hxx \
- NMTTools_ListNodeOfListOfCoupleOfShape.hxx \
NMTTools_ListOfCommonBlock.hxx \
NMTTools_ListOfCoupleOfShape.hxx \
NMTTools_MapIteratorOfMapOfPaveBlock.hxx \
NMTTools_MapOfPaveBlock.hxx \
NMTTools_PaveFiller.hxx \
- NMTTools_PaveFiller.ixx \
- NMTTools_PaveFiller.jxx \
NMTTools_PPaveFiller.hxx \
- NMTTools_Tools.hxx \
- NMTTools_Tools.ixx \
- NMTTools_Tools.jxx \
- NMTTools_StdMapNodeOfMapOfPaveBlock.hxx
+ NMTTools_Tools.hxx
# Libraries targets
lib_LTLIBRARIES = libNMTTools.la
NMTTools_CheckerSI_1.cxx \
NMTTools_CommonBlockAPI.cxx \
NMTTools_CommonBlock.cxx \
- NMTTools_CommonBlockPool_0.cxx \
+ NMTTools_CommonBlockPool.cxx \
NMTTools_CoupleOfShape.cxx \
- NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_0.cxx \
- NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_0.cxx \
- NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_0.cxx \
- NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_0.cxx \
- NMTTools_DataMapOfIntegerFaceInfo_0.cxx \
- NMTTools_DataMapOfIntegerListOfPaveBlock_0.cxx \
NMTTools_DEProcessor.cxx \
NMTTools_FaceInfo.cxx \
- NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx \
- NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx \
- NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx \
- NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx \
- NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx \
- NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx \
- NMTTools_ListIteratorOfListOfCommonBlock_0.cxx \
- NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx \
- NMTTools_ListNodeOfListOfCommonBlock_0.cxx \
- NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx \
- NMTTools_ListOfCommonBlock_0.cxx \
- NMTTools_ListOfCoupleOfShape_0.cxx \
- NMTTools_MapIteratorOfMapOfPaveBlock_0.cxx \
- NMTTools_MapOfPaveBlock_0.cxx \
NMTTools_PaveFiller_0.cxx \
NMTTools_PaveFiller_1.cxx \
NMTTools_PaveFiller_2.cxx \
NMTTools_PaveFiller_8.cxx \
NMTTools_PaveFiller_9.cxx \
NMTTools_PaveFiller.cxx \
- NMTTools_Tools.cxx \
- NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx
+ NMTTools_Tools.cxx
# additional information to compile and link file
$(CAS_LDPATH) -lTKBool -lTKBO \
$(KERNEL_LDFLAGS)
-CDL_FILES = \
- NMTTools.cdl \
- NMTTools_CheckerSI.cdl \
- NMTTools_CommonBlock.cdl \
- NMTTools_CommonBlockAPI.cdl \
- NMTTools_CoupleOfShape.cdl \
- NMTTools_DEProcessor.cdl \
- NMTTools_FaceInfo.cdl \
- NMTTools_PaveFiller.cdl \
- NMTTools_Tools.cdl
+CDL_FILES = \
+ NMTTools.cdl
-EXTRA_DIST += $(CDL_FILES)
+EXTRA_DIST += \
+ $(CDL_FILES) \
+ FILES
-- Author: Peter KURNEV
-- <pkv@irinox>
--
-package NMTTools
+package NMTTools
- ---Purpose:
+ ---Purpose:
+
+uses
-uses
-
TCollection,
TColStd,
- gp,
- TopAbs,
- TopoDS,
- TopTools,
+ gp,
+ TopAbs,
+ TopoDS,
+ TopTools,
Geom2d,
BooleanOperations,
BOPTColStd,
IntTools,
- BOPTools,
-
+ BOPTools,
NMTDS
-is
- class PaveFiller;
- class Tools;
- class CommonBlock;
- class CommonBlockAPI;
- class DEProcessor;
- class CoupleOfShape;
- class CheckerSI;
- class FaceInfo;
-
- pointer PPaveFiller to PaveFiller from NMTTools;
-
- class ListOfCommonBlock instantiates
- List from TCollection(CommonBlock from NMTTools);
-
- class CommonBlockPool instantiates
- CArray1 from BOPTColStd (ListOfCommonBlock from NMTTools);
-
- class IndexedDataMapOfIndexedMapOfInteger instantiates
- IndexedDataMap from TCollection (Integer from Standard,
- IndexedMapOfInteger from TColStd,
- MapIntegerHasher from TColStd);
-
- class IndexedDataMapOfShapePaveBlock instantiates
- IndexedDataMap from TCollection (Shape from TopoDS,
- PaveBlock from BOPTools,
- ShapeMapHasher from TopTools);
-
- class IndexedDataMapOfShapeIndexedMapOfShape instantiates
- IndexedDataMap from TCollection (Shape from TopoDS,
- IndexedMapOfShape from TopTools,
- ShapeMapHasher from TopTools);
-
- class ListOfCoupleOfShape instantiates
- List from TCollection(CoupleOfShape from NMTTools);
+is
+ imported CoupleOfShape from NMTTools;
+ imported CommonBlock from NMTTools;
+ imported CommonBlockAPI from NMTTools;
+ imported FaceInfo from NMTTools;
+ imported Tools from NMTTools;
+ imported PaveFiller from NMTTools;
+ imported PPaveFiller from NMTTools;
+ imported DEProcessor from NMTTools;
+ imported CheckerSI from NMTTools;
+ --
+ imported ListOfCommonBlock from NMTTools;
+ imported ListIteratorOfListOfCommonBlock from NMTTools;
+
+ imported ListOfCoupleOfShape from NMTTools;
+ imported ListIteratorOfListOfCoupleOfShape from NMTTools;
+
+ imported MapOfPaveBlock from NMTTools;
+ imported MapIteratorOfMapOfPaveBlock from NMTTools;
+
+ imported IndexedDataMapOfIndexedMapOfInteger from NMTTools;
+ imported IndexedDataMapOfShapePaveBlock from NMTTools;
+ imported IndexedDataMapOfShapeIndexedMapOfShape from NMTTools;
+
+ imported DataMapOfIntegerListOfPaveBlock from NMTTools;
+ imported DataMapIteratorOfDataMapOfIntegerListOfPaveBlock from NMTTools;
+
+ imported DataMapOfIntegerFaceInfo from NMTTools;
+ imported DataMapIteratorOfDataMapOfIntegerFaceInfo from NMTTools;
+
+ imported CommonBlockPool from NMTTools;
+
+ --
+ --class PaveFiller;
+ --class Tools;
+ --class CommonBlock;
+ --class CommonBlockAPI;
+ --class FaceInfo;
+ --class CoupleOfShape;
+ --class CheckerSI;
+ --class DEProcessor;
+ --pointer PPaveFiller to PaveFiller from NMTTools;
+ --
+ --class ListOfCommonBlock instantiates
+ -- List from TCollection(CommonBlock from NMTTools);
+
+ --class ListOfCoupleOfShape instantiates
+ -- List from TCollection(CoupleOfShape from NMTTools);
+--
+ --class MapOfPaveBlock instantiates
+ -- Map from TCollection (PaveBlock from BOPTools,
+ -- PaveBlockMapHasher from BOPTools);
+--
+ --class IndexedDataMapOfIndexedMapOfInteger instantiates
+ -- IndexedDataMap from TCollection (Integer from Standard,
+ -- IndexedMapOfInteger from TColStd,
+ -- MapIntegerHasher from TColStd);
+
+ --class IndexedDataMapOfShapePaveBlock instantiates
+ -- IndexedDataMap from TCollection (Shape from TopoDS,
+ -- PaveBlock from BOPTools,
+ -- ShapeMapHasher from TopTools);
+
+ --class IndexedDataMapOfShapeIndexedMapOfShape instantiates
+ -- IndexedDataMap from TCollection (Shape from TopoDS,
+ -- IndexedMapOfShape from TopTools,
+ -- ShapeMapHasher from TopTools);
+
+--
+ --class DataMapOfIntegerListOfPaveBlock instantiates
+ -- DataMap from TCollection(Integer from Standard,
+ -- ListOfPaveBlock from BOPTools,
+ -- MapIntegerHasher from TColStd);
+ --class DataMapOfIntegerFaceInfo instantiates
+ -- DataMap from TCollection(Integer from Standard,
+ -- FaceInfo from NMTTools,
+ -- MapIntegerHasher from TColStd);
--
- class DataMapOfIntegerListOfPaveBlock instantiates
- DataMap from TCollection(Integer from Standard,
- ListOfPaveBlock from BOPTools,
- MapIntegerHasher from TColStd);
-
- class MapOfPaveBlock instantiates
- Map from TCollection (PaveBlock from BOPTools,
- PaveBlockMapHasher from BOPTools);
-
- class DataMapOfIntegerFaceInfo instantiates
- DataMap from TCollection(Integer from Standard,
- FaceInfo from NMTTools,
- MapIntegerHasher from TColStd);
-
+ --class CommonBlockPool instantiates
+ -- CArray1 from BOPTColStd (ListOfCommonBlock from NMTTools);
--
end NMTTools;
+++ /dev/null
-# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# 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
-#
-
-TEMPLATE = lib
-TARGET = NMTTools
-DESTDIR = ../../lib
-MOC_DIR = ../../moc
-OBJECTS_DIR = ../../obj/$$TARGET
-
-CASROOT = $$(CASROOT)
-CAS_CPPFLAGS = $${CASROOT}/inc
-
-KERNEL_CXXFLAGS = $$(KERNEL_ROOT_DIR)/include/salome
-
-STDLIB = -lstdc++
-
-CAS_LDPATH = -L$$(CASROOT)/Linux/lib
-
-KERNEL_LDFLAGS = -L$$(KERNEL_ROOT_DIR)/lib/salome
-
-INCLUDEPATH += $${CAS_CPPFLAGS} $${KERNEL_CXXFLAGS} ../NMTDS
-
-LIBS += -L$$(GEOM_ROOT_DIR)/lib -lNMTDS $${STDLIB} $${CAS_LDPATH} -lTKBool -lTKBO $${KERNEL_LDFLAGS}
-
-CONFIG -= debug release debug_and_release
-CONFIG += qt thread debug dll shared
-
-win32:DEFINES += WIN32
-DEFINES += OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS
-
-HEADERS = Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx
-HEADERS += Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
-HEADERS += Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx
-HEADERS += Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx
-HEADERS += Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx
-HEADERS += Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx
-HEADERS += Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx
-HEADERS += NMTTools_CommonBlockAPI.hxx
-HEADERS += NMTTools_CommonBlock.hxx
-HEADERS += NMTTools_CommonBlockPool.hxx
-HEADERS += NMTTools_CoupleOfShape.hxx
-HEADERS += NMTTools_DEProcessor.hxx
-HEADERS += NMTTools_DSFiller.hxx
-HEADERS += NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx
-HEADERS += NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx
-HEADERS += NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx
-HEADERS += NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx
-HEADERS += NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx
-HEADERS += NMTTools_IndexedDataMapOfShapePaveBlock.hxx
-HEADERS += NMTTools_ListIteratorOfListOfCommonBlock.hxx
-HEADERS += NMTTools_ListIteratorOfListOfCoupleOfShape.hxx
-HEADERS += NMTTools_ListNodeOfListOfCommonBlock.hxx
-HEADERS += NMTTools_ListNodeOfListOfCoupleOfShape.hxx
-HEADERS += NMTTools_ListOfCommonBlock.hxx
-HEADERS += NMTTools_ListOfCoupleOfShape.hxx
-HEADERS += NMTTools_PaveFiller.hxx
-HEADERS += NMTTools_PCurveMaker.hxx
-HEADERS += NMTTools_PDSFiller.hxx
-HEADERS += NMTTools_PPaveFiller.hxx
-HEADERS += NMTTools_Tools.hxx
-HEADERS += Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx
-HEADERS += Handle_NMTTools_StdMapNodeOfMapOfPaveBlock.hxx
-HEADERS += NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx
-HEADERS += NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx
-HEADERS += NMTTools_DataMapOfIntegerListOfPaveBlock.hxx
-HEADERS += NMTTools_MapIteratorOfMapOfPaveBlock.hxx
-HEADERS += NMTTools_MapOfPaveBlock.hxx
-HEADERS += NMTTools_StdMapNodeOfMapOfPaveBlock.hxx
-
-SOURCES = NMTTools_CommonBlockAPI.cxx
-SOURCES += NMTTools_CommonBlock.cxx
-SOURCES += NMTTools_CommonBlockPool_0.cxx
-SOURCES += NMTTools_CoupleOfShape.cxx
-SOURCES += NMTTools_DEProcessor.cxx
-SOURCES += NMTTools_DSFiller.cxx
-SOURCES += NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx
-SOURCES += NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx
-SOURCES += NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx
-SOURCES += NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx
-SOURCES += NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx
-SOURCES += NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx
-SOURCES += NMTTools_ListIteratorOfListOfCommonBlock_0.cxx
-SOURCES += NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx
-SOURCES += NMTTools_ListNodeOfListOfCommonBlock_0.cxx
-SOURCES += NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx
-SOURCES += NMTTools_ListOfCommonBlock_0.cxx
-SOURCES += NMTTools_ListOfCoupleOfShape_0.cxx
-SOURCES += NMTTools_PaveFiller_0.cxx
-SOURCES += NMTTools_PaveFiller_1.cxx
-SOURCES += NMTTools_PaveFiller_2.cxx
-SOURCES += NMTTools_PaveFiller_3.cxx
-SOURCES += NMTTools_PaveFiller_4.cxx
-SOURCES += NMTTools_PaveFiller_5.cxx
-SOURCES += NMTTools_PaveFiller_6.cxx
-SOURCES += NMTTools_PaveFiller_7.cxx
-SOURCES += NMTTools_PaveFiller_8.cxx
-SOURCES += NMTTools_PaveFiller_9.cxx
-SOURCES += NMTTools_PaveFiller.cxx
-SOURCES += NMTTools_PCurveMaker.cxx
-SOURCES += NMTTools_Tools.cxx
-SOURCES += NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_0.cxx
-SOURCES += NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_0.cxx
-SOURCES += NMTTools_DataMapOfIntegerListOfPaveBlock_0.cxx
-SOURCES += NMTTools_MapIteratorOfMapOfPaveBlock_0.cxx
-SOURCES += NMTTools_MapOfPaveBlock_0.cxx
-SOURCES += NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx
-
-includes.files = $$HEADERS
-includes.path = ../../include
-
-INSTALLS += includes
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- 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: NMTTools_CheckerSI.cdl
--- Created: Mon Feb 19 11:23:55 2007
--- Author: Peter KURNEV
---
-class CheckerSI from NMTTools
- inherits PaveFiller from NMTTools
- ---Purpose:
-
-uses
- ShapeEnum from TopAbs
-
---raises
-
-is
-
- Create
- returns CheckerSI from NMTTools;
- ---C++: alias "Standard_EXPORT virtual ~NMTTools_CheckerSI();"
-
- Perform (me:out)
- is redefined;
-
- Init (me:out)
- is redefined protected;
-
- Clear (me:out)
- is redefined protected;
-
- PreparePaveBlocks (me:out;
- nE:Integer from Standard)
- is redefined protected;
-
- PreparePaveBlocks (me:out;
- aType1: ShapeEnum from TopAbs;
- aType2: ShapeEnum from TopAbs)
- is redefined protected;
-
- StopStatus(me)
- returns Integer from Standard;
-
-
-fields
- myStopStatus: Integer from Standard is protected;
-
-end CheckerSI;
// File: NMTTools_CheckerSI.cxx
// Created: Mon Feb 19 11:32:08 2007
// Author: Peter KURNEV
-
-#include <NMTTools_CheckerSI.ixx>
-
-#include <NMTTools_DEProcessor.hxx>
+//
+#include <NMTTools_CheckerSI.hxx>
#include <NMTDS_ShapesDataStructure.hxx>
#include <NMTDS_IteratorCheckerSI.hxx>
#include <NMTDS_InterfPool.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
+#include <NMTTools_DEProcessor.hxx>
#include <IntTools_Context.hxx>
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
-NMTTools_CheckerSI::NMTTools_CheckerSI()
- : NMTTools_PaveFiller()
+ NMTTools_CheckerSI::NMTTools_CheckerSI()
+:
+ NMTTools_PaveFiller()
{
myStopStatus=0;
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
-NMTTools_CheckerSI::~NMTTools_CheckerSI()
+ NMTTools_CheckerSI::~NMTTools_CheckerSI()
{
}
//=======================================================================
//function : Clear
-//purpose :
+//purpose :
//=======================================================================
-void NMTTools_CheckerSI::Clear()
+ void NMTTools_CheckerSI::Clear()
{
NMTTools_PaveFiller::Clear();
}
//=======================================================================
//function : StopStatus
-//purpose :
+//purpose :
//=======================================================================
-Standard_Integer NMTTools_CheckerSI::StopStatus()const
+ Standard_Integer NMTTools_CheckerSI::StopStatus()const
{
return myStopStatus;
}
//=======================================================================
//function : Init
-//purpose :
+//purpose :
//=======================================================================
-void NMTTools_CheckerSI::Init()
+ void NMTTools_CheckerSI::Init()
{
myIsDone=Standard_False;
if (myCompositeShape.IsNull()) {
myNbSources=myDS->NumberOfShapesOfTheObject()+
myDS->NumberOfShapesOfTheTool();
myNbEdges=myDS->NbEdges();
- // 4.
+ // 4
myIP=new NMTDS_InterfPool;
//
- // 5.
-#if OCC_VERSION_LARGE > 0x06050200
- // In OCCT6.5.3 class IntTools_Context become a handle
+ // 5
myContext=new IntTools_Context;
-#endif
}
//=======================================================================
//function : Perform
-//purpose :
+//purpose :
//=======================================================================
-void NMTTools_CheckerSI::Perform()
+ void NMTTools_CheckerSI::Perform()
{
myIsDone=Standard_False;
myStopStatus=0;
//
MakePCurves();
//
- // 7. Postprocessing
+ // 7. Postprocessing
UpdatePaveBlocks();
//
NMTTools_DEProcessor aDEP(*this);
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_CheckerSI.hxx
+// Created: Mon Feb 19 11:32:08 2007
+// Author: Peter KURNEV
+//
#ifndef _NMTTools_CheckerSI_HeaderFile
#define _NMTTools_CheckerSI_HeaderFile
-#ifndef _Standard_Integer_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <Standard_Integer.hxx>
-#endif
-#ifndef _NMTTools_PaveFiller_HeaderFile
#include <NMTTools_PaveFiller.hxx>
-#endif
-#ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx>
-#endif
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTTools_CheckerSI : public NMTTools_PaveFiller {
-
-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 NMTTools_CheckerSI();
-Standard_EXPORT virtual ~NMTTools_CheckerSI();
-
-
-Standard_EXPORT virtual void Perform() ;
-
-
-Standard_EXPORT Standard_Integer StopStatus() const;
+//=======================================================================
+//class : NMTTools_CheckerSI
+//purpose :
+//=======================================================================
+class NMTTools_CheckerSI : public NMTTools_PaveFiller
+{
+ public:
+ Standard_EXPORT
+ NMTTools_CheckerSI();
+ Standard_EXPORT
+ virtual ~NMTTools_CheckerSI();
+ Standard_EXPORT
+ virtual void Perform() ;
+ Standard_EXPORT
+ Standard_Integer StopStatus() const;
-protected:
+ protected:
+ Standard_EXPORT
+ virtual void Init() ;
- // Methods PROTECTED
- //
+ Standard_EXPORT
+ virtual void Clear() ;
+ Standard_EXPORT
+ virtual void PreparePaveBlocks(const Standard_Integer nE) ;
-Standard_EXPORT virtual void Init() ;
-
-
-Standard_EXPORT virtual void Clear() ;
-
-
-Standard_EXPORT virtual void PreparePaveBlocks(const Standard_Integer nE) ;
-
-
-Standard_EXPORT virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1,const TopAbs_ShapeEnum aType2) ;
-
-
- // Fields PROTECTED
- //
-Standard_Integer myStopStatus;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
+ Standard_EXPORT
+ virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1,
+ const TopAbs_ShapeEnum aType2) ;
+ Standard_Integer myStopStatus;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 <NMTTools_CheckerSI.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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 _NMTTools_CheckerSI_HeaderFile
-#include <NMTTools_CheckerSI.hxx>
-#endif
// Created: Mon Feb 19 11:32:08 2007
// Author: Peter KURNEV
//
-#include <NMTTools_CheckerSI.ixx>
+#include <NMTTools_CheckerSI.hxx>
#include <NMTDS_ShapesDataStructure.hxx>
#include <NMTDS_IteratorCheckerSI.hxx>
//=======================================================================
// function: PreparePaveBlocks
-// purpose:
+// purpose:
//=======================================================================
- void NMTTools_CheckerSI::PreparePaveBlocks(const TopAbs_ShapeEnum aType1,
+ void NMTTools_CheckerSI::PreparePaveBlocks(const TopAbs_ShapeEnum aType1,
const TopAbs_ShapeEnum aType2)
{
NMTTools_PaveFiller::PreparePaveBlocks(aType1, aType2);
}
//=======================================================================
// function: PreparePaveBlocks
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_CheckerSI::PreparePaveBlocks(const Standard_Integer nE)
{
TopoDS_Vertex aV1, aV2;
//
BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE));
- // Edge
+ // Edge
aE=TopoDS::Edge(myDS->Shape(nE));
if (BRep_Tool::Degenerated(aE)) {
myIsDone=Standard_True;
}
//
BOPTools_PaveSet& aPS=myPavePool(myDS->RefEdge(nE));
-
+
BOPTools_PaveBlockIterator aPBIt(nE, aPS);
for (; aPBIt.More(); aPBIt.Next()) {
BOPTools_PaveBlock& aPB=aPBIt.Value();
//
const BOPTools_Pave& aPave2=aPB.Pave2();
nV2=aPave2.Index();
- aV2=TopoDS::Vertex(myDS->Shape(nV2));
+ aV2=TopoDS::Vertex(myDS->Shape(nV2));
aT2=aPave2.Param();
//
bIsValid=Standard_True;
}
aPB.SetShrunkRange(aSR);
aLPB.Append(aPB);
- } //for (; aPBIt.More(); aPBIt.Next())
+ } //for (; aPBIt.More(); aPBIt.Next())
myIsDone=Standard_True;
}
//=======================================================================
//function : IsValid
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean IsValid(const TopoDS_Edge& aE,
const TopoDS_Vertex& aV,
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTTools_CommonBlock.cdl
--- Created: Tue Dec 9 12:11:48 2003
--- Author: Peter KURNEV
--- <pkv@irinox>
---
-class CommonBlock from NMTTools
-
- ---Purpose:
-
-uses
- ListOfInteger from TColStd,
- PaveBlock from BOPTools,
- ListOfPaveBlock from BOPTools
-
---raises
-
-is
- Create
- returns CommonBlock from NMTTools;
-
- AddPaveBlock(me:out;
- aPB : PaveBlock from BOPTools);
-
- AddFace(me:out;
- aF : Integer from Standard);
-
- AddFaces(me:out;
- aLF: ListOfInteger from TColStd);
-
- PaveBlocks(me)
- returns ListOfPaveBlock from BOPTools;
- ---C++: return const &
-
- Faces (me)
- returns ListOfInteger from TColStd;
- ---C++: return const &
-
- PaveBlock1 (me)
- returns PaveBlock from BOPTools;
- ---C++: return const &
-
- PaveBlock1 (me:out;
- anIx: Integer from Standard)
- returns PaveBlock from BOPTools;
- ---C++: return &
-
- PaveBlockOnEdge (me:out;
- anIndex: Integer from Standard)
- returns PaveBlock from BOPTools;
- ---C++: return &
-
- IsPaveBlockOnFace (me;
- anIndex: Integer from Standard)
- returns Boolean from Standard;
-
- IsPaveBlockOnEdge (me;
- anIndex: Integer from Standard)
- returns Boolean from Standard;
-
- IsEqual (me;
- aCB:CommonBlock from NMTTools)
- returns Boolean from Standard;
-
- Contains(me;
- aPB:PaveBlock from BOPTools)
- returns Boolean from Standard;
-
--- SetEdge (me:out;
--- anEdge:Integer from Standard);
-
--- Edge (me)
--- returns Integer from Standard;
-
-fields
- myPaveBlocks: ListOfPaveBlock from BOPTools is protected;
- myFaces : ListOfInteger from TColStd is protected;
-
-end CommonBlock;
-
-
-
-
-
-
-
-
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <NMTTools_CommonBlock.ixx>
+#include <NMTTools_CommonBlock.hxx>
#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
//=======================================================================
// function: NMTTools_CommonBlock::NMTTools_CommonBlock()
-// purpose:
+// purpose:
//=======================================================================
NMTTools_CommonBlock::NMTTools_CommonBlock()
{
}
//=======================================================================
// function: AddPaveBlock
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_CommonBlock::AddPaveBlock(const BOPTools_PaveBlock& aPB)
{
}
//=======================================================================
// function: AddFace
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_CommonBlock::AddFace(const Standard_Integer aF)
{
}
//=======================================================================
// function: AddFaces
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_CommonBlock::AddFaces(const TColStd_ListOfInteger& aLF)
{
}
//=======================================================================
// function: PaveBlocks
-// purpose:
+// purpose:
//=======================================================================
const BOPTools_ListOfPaveBlock& NMTTools_CommonBlock::PaveBlocks()const
{
}
//=======================================================================
// function: Faces
-// purpose:
+// purpose:
//=======================================================================
const TColStd_ListOfInteger& NMTTools_CommonBlock::Faces()const
{
}
//=======================================================================
// function: PaveBlock1
-// purpose:
+// purpose:
//=======================================================================
const BOPTools_PaveBlock& NMTTools_CommonBlock::PaveBlock1()const
{
}
//=======================================================================
// function: PaveBlock1
-// purpose:
+// purpose:
//=======================================================================
BOPTools_PaveBlock& NMTTools_CommonBlock::PaveBlock1(const Standard_Integer aIx)
{
}
//=======================================================================
// function: PaveBlockOnEdge
-// purpose:
+// purpose:
//=======================================================================
BOPTools_PaveBlock& NMTTools_CommonBlock::PaveBlockOnEdge(const Standard_Integer aIx)
{
}
//=======================================================================
// function: IsPaveBlockOnFace
-// purpose:
+// purpose:
//=======================================================================
Standard_Boolean NMTTools_CommonBlock::IsPaveBlockOnFace(const Standard_Integer aIx)const
{
}
//=======================================================================
// function: IsPaveBlockOnEdge
-// purpose:
+// purpose:
//=======================================================================
Standard_Boolean NMTTools_CommonBlock::IsPaveBlockOnEdge(const Standard_Integer aIx)const
{
}
//=======================================================================
// function: IsEqual
-// purpose:
+// purpose:
//=======================================================================
Standard_Boolean NMTTools_CommonBlock::IsEqual(const NMTTools_CommonBlock& aOther)const
{
}
//=======================================================================
// function: Contains
-// purpose:
+// purpose:
//=======================================================================
Standard_Boolean NMTTools_CommonBlock::Contains(const BOPTools_PaveBlock& aPBx)const
{
/*
//=======================================================================
// function: SetEdge
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_CommonBlock::SetEdge(const Standard_Integer anEdge)
{
}
//=======================================================================
// function: Edge
-// purpose:
+// purpose:
//=======================================================================
Standard_Integer NMTTools_CommonBlock::Edge()const
{
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_CommonBlock.hxx
+// Created: Tue Dec 9 12:23:29 2003
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
+
#ifndef _NMTTools_CommonBlock_HeaderFile
#define _NMTTools_CommonBlock_HeaderFile
-#ifndef _BOPTools_ListOfPaveBlock_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <BOPTools_ListOfPaveBlock.hxx>
-#endif
-#ifndef _TColStd_ListOfInteger_HeaderFile
#include <TColStd_ListOfInteger.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-class BOPTools_PaveBlock;
-class TColStd_ListOfInteger;
-class BOPTools_ListOfPaveBlock;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
+#include <BOPTools_PaveBlock.hxx>
+//=======================================================================
+//function : NMTTools_CommonBlock
+//purpose :
+//=======================================================================
class NMTTools_CommonBlock {
+ public:
+ Standard_EXPORT
+ NMTTools_CommonBlock();
-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 NMTTools_CommonBlock();
-
-
-Standard_EXPORT void AddPaveBlock(const BOPTools_PaveBlock& aPB) ;
-
-
-Standard_EXPORT void AddFace(const Standard_Integer aF) ;
-
-
-Standard_EXPORT void AddFaces(const TColStd_ListOfInteger& aLF) ;
-
-
-Standard_EXPORT const BOPTools_ListOfPaveBlock& PaveBlocks() const;
-
+ Standard_EXPORT
+ void AddPaveBlock(const BOPTools_PaveBlock& aPB) ;
-Standard_EXPORT const TColStd_ListOfInteger& Faces() const;
+ Standard_EXPORT
+ void AddFace(const Standard_Integer aF) ;
+ Standard_EXPORT
+ void AddFaces(const TColStd_ListOfInteger& aLF) ;
-Standard_EXPORT const BOPTools_PaveBlock& PaveBlock1() const;
+ Standard_EXPORT
+ const BOPTools_ListOfPaveBlock& PaveBlocks() const;
+ Standard_EXPORT
+ const TColStd_ListOfInteger& Faces() const;
-Standard_EXPORT BOPTools_PaveBlock& PaveBlock1(const Standard_Integer anIx) ;
+ Standard_EXPORT
+ const BOPTools_PaveBlock& PaveBlock1() const;
+ Standard_EXPORT
+ BOPTools_PaveBlock& PaveBlock1(const Standard_Integer anIx) ;
-Standard_EXPORT BOPTools_PaveBlock& PaveBlockOnEdge(const Standard_Integer anIndex) ;
+ Standard_EXPORT
+ BOPTools_PaveBlock& PaveBlockOnEdge(const Standard_Integer anIndex) ;
+ Standard_EXPORT
+ Standard_Boolean IsPaveBlockOnFace(const Standard_Integer anIndex) const;
-Standard_EXPORT Standard_Boolean IsPaveBlockOnFace(const Standard_Integer anIndex) const;
+ Standard_EXPORT
+ Standard_Boolean IsPaveBlockOnEdge(const Standard_Integer anIndex) const;
+ Standard_EXPORT
+ Standard_Boolean IsEqual(const NMTTools_CommonBlock& aCB) const;
-Standard_EXPORT Standard_Boolean IsPaveBlockOnEdge(const Standard_Integer anIndex) const;
-
-
-Standard_EXPORT Standard_Boolean IsEqual(const NMTTools_CommonBlock& aCB) const;
-
-
-Standard_EXPORT Standard_Boolean Contains(const BOPTools_PaveBlock& aPB) const;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-BOPTools_ListOfPaveBlock myPaveBlocks;
-TColStd_ListOfInteger myFaces;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
+ Standard_EXPORT
+ Standard_Boolean Contains(const BOPTools_PaveBlock& aPB) const;
+ protected:
+ BOPTools_ListOfPaveBlock myPaveBlocks;
+ TColStd_ListOfInteger myFaces;
};
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_CommonBlock.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _BOPTools_PaveBlock_HeaderFile
-#include <BOPTools_PaveBlock.hxx>
-#endif
-#ifndef _TColStd_ListOfInteger_HeaderFile
-#include <TColStd_ListOfInteger.hxx>
-#endif
-#ifndef _BOPTools_ListOfPaveBlock_HeaderFile
-#include <BOPTools_ListOfPaveBlock.hxx>
-#endif
-#ifndef _NMTTools_CommonBlock_HeaderFile
-#include <NMTTools_CommonBlock.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTTools_CommonBlockAPI.cdl
--- Created: Mon Dec 15 11:35:46 2003
--- Author: Peter KURNEV
--- <pkv@irinox>
---
-class CommonBlockAPI from NMTTools
-
- ---Purpose:
-
-uses
- ListOfCommonBlock from NMTTools,
- ListOfPaveBlock from BOPTools,
- PaveBlock from BOPTools,
- CommonBlock from NMTTools
-
---raises
-
-is
- Create (aList:ListOfCommonBlock from NMTTools)
- returns CommonBlockAPI from NMTTools;
-
- List(me)
- returns ListOfCommonBlock from NMTTools;
- ---C++: return const &
- ---Purpose:
- --- Selector
- ---
- CommonPaveBlocks(me;
- anE:Integer from Standard)
- returns ListOfPaveBlock from BOPTools;
- ---C++: return const &
- ---Purpose:
- --- Returns all PaveBlock-s (from the list) that are
- --- common for the given edge with DS-index <anE>
- ---
- IsCommonBlock (me;
- aPB: PaveBlock from BOPTools)
- returns Boolean from Standard;
- ---Purpose:
- --- Returns TRUE if given PaveBlock <aPB> is
- --- common for the Blocks from the list
-
- CommonBlock(me;
- aPB: PaveBlock from BOPTools)
- returns CommonBlock from NMTTools;
- ---C++: return &
-
-fields
- myListOfCommonBlock :Address from Standard;
- myListOfPaveBlock :ListOfPaveBlock from BOPTools;
-
-end CommonBlockAPI;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <NMTTools_CommonBlockAPI.ixx>
+#include <NMTTools_CommonBlockAPI.hxx>
#include <BOPTools_PaveBlock.hxx>
#include <BOPTools_ListOfPaveBlock.hxx>
//=======================================================================
// function: NMTTools_CommonBlockAPI::NMTTools_CommonBlockAPI
-// purpose:
+// purpose:
//=======================================================================
NMTTools_CommonBlockAPI::NMTTools_CommonBlockAPI (const NMTTools_ListOfCommonBlock& aLCB)
{
}
//=======================================================================
// function: List
-// purpose:
+// purpose:
//=======================================================================
const NMTTools_ListOfCommonBlock& NMTTools_CommonBlockAPI::List () const
{
}
//=======================================================================
// function: IsCommonBlock
-// purpose:
+// purpose:
//=======================================================================
Standard_Boolean NMTTools_CommonBlockAPI::IsCommonBlock(const BOPTools_PaveBlock& aPB) const
{
//=======================================================================
// function: CommonBlock
-// purpose:
+// purpose:
//=======================================================================
NMTTools_CommonBlock& NMTTools_CommonBlockAPI::CommonBlock(const BOPTools_PaveBlock& aPB)const
{
//
anItCB.Initialize(*pLCB);
for (; anItCB.More(); anItCB.Next()) {
- NMTTools_CommonBlock& aCB=anItCB.Value();
+ NMTTools_CommonBlock& aCB=anItCB.ChangeValue();
//
const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks();
anItPB.Initialize(aLPB);
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_CommonBlockAPI.hxx
+// Created: Mon Dec 15 11:38:04 2003
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _NMTTools_CommonBlockAPI_HeaderFile
#define _NMTTools_CommonBlockAPI_HeaderFile
-#ifndef _Standard_Address_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <Standard_Address.hxx>
-#endif
-#ifndef _BOPTools_ListOfPaveBlock_HeaderFile
#include <BOPTools_ListOfPaveBlock.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-class NMTTools_ListOfCommonBlock;
-class BOPTools_ListOfPaveBlock;
-class BOPTools_PaveBlock;
-class NMTTools_CommonBlock;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTTools_CommonBlockAPI {
-
-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 NMTTools_CommonBlockAPI(const NMTTools_ListOfCommonBlock& aList);
-
+#include <NMTTools_CommonBlock.hxx>
+#include <NMTTools_ListOfCommonBlock.hxx>
+#include <BOPTools_ListOfPaveBlock.hxx>
+#include <BOPTools_PaveBlock.hxx>
+
+//=======================================================================
+//class : NMTTools_CommonBlockAPI
+//purpose :
+//=======================================================================
+class NMTTools_CommonBlockAPI
+{
+ public:
+ Standard_EXPORT
+ NMTTools_CommonBlockAPI(const NMTTools_ListOfCommonBlock& aList);
//! Selector <br>
-Standard_EXPORT const NMTTools_ListOfCommonBlock& List() const;
-
+ Standard_EXPORT
+ const NMTTools_ListOfCommonBlock& List() const;
//! Returns all PaveBlock-s (from the list) that are <br>
//! common for the given edge with DS-index <anE> <br>
-Standard_EXPORT const BOPTools_ListOfPaveBlock& CommonPaveBlocks(const Standard_Integer anE) const;
-
+ Standard_EXPORT
+ const BOPTools_ListOfPaveBlock& CommonPaveBlocks(const Standard_Integer anE) const;
//! Returns TRUE if given PaveBlock <aPB> is <br>
//! common for the Blocks from the list <br>
-Standard_EXPORT Standard_Boolean IsCommonBlock(const BOPTools_PaveBlock& aPB) const;
-
-
-Standard_EXPORT NMTTools_CommonBlock& CommonBlock(const BOPTools_PaveBlock& aPB) const;
-
-
-
-
+ Standard_EXPORT
+ Standard_Boolean IsCommonBlock(const BOPTools_PaveBlock& aPB) const;
+ Standard_EXPORT
+ NMTTools_CommonBlock& CommonBlock(const BOPTools_PaveBlock& aPB) const;
protected:
+//private:
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
Standard_Address myListOfCommonBlock;
BOPTools_ListOfPaveBlock myListOfPaveBlock;
-
-
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_CommonBlockAPI.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTTools_ListOfCommonBlock_HeaderFile
-#include <NMTTools_ListOfCommonBlock.hxx>
-#endif
-#ifndef _BOPTools_ListOfPaveBlock_HeaderFile
-#include <BOPTools_ListOfPaveBlock.hxx>
-#endif
-#ifndef _BOPTools_PaveBlock_HeaderFile
-#include <BOPTools_PaveBlock.hxx>
-#endif
-#ifndef _NMTTools_CommonBlock_HeaderFile
-#include <NMTTools_CommonBlock.hxx>
-#endif
-#ifndef _NMTTools_CommonBlockAPI_HeaderFile
-#include <NMTTools_CommonBlockAPI.hxx>
-#endif
--- /dev/null
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// 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: NMTTools_CommonBlockPool.cxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
+
+
+#include <NMTTools_CommonBlockPool.hxx>
+
+#ifndef _Standard_OutOfRange_HeaderFile
+#include <Standard_OutOfRange.hxx>
+#endif
+#ifndef _Standard_OutOfMemory_HeaderFile
+#include <Standard_OutOfMemory.hxx>
+#endif
+
+
+#define Array1Item NMTTools_ListOfCommonBlock
+#define Array1Item_hxx <NMTTools_ListOfCommonBlock.hxx>
+#define BOPTColStd_CArray1 NMTTools_CommonBlockPool
+#define BOPTColStd_CArray1_hxx <NMTTools_CommonBlockPool.hxx>
+#include <BOPTColStd_CArray1.gxx>
+
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_CommonBlockPool.hxx
+// Created:
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
+
#ifndef _NMTTools_CommonBlockPool_HeaderFile
#define _NMTTools_CommonBlockPool_HeaderFile
-#include <Basics_OCCTVersion.hxx>
-
-#ifndef _Standard_Address_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <Standard_Address.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
+#include <NMTTools_ListOfCommonBlock.hxx>
class Standard_OutOfRange;
class Standard_OutOfMemory;
-class NMTTools_ListOfCommonBlock;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTTools_CommonBlockPool {
-
-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 NMTTools_CommonBlockPool(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
-
-
-Standard_EXPORT void Resize(const Standard_Integer theNewLength) ;
-
-
-Standard_EXPORT void Destroy() ;
-~NMTTools_CommonBlockPool()
+//=======================================================================
+//class : NMTTools_CommonBlockPool
+//purpose :
+//=======================================================================
+class NMTTools_CommonBlockPool
{
- Destroy();
-}
+ public:
+ Standard_EXPORT
+ NMTTools_CommonBlockPool(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
+ Standard_EXPORT
+ void Resize(const Standard_Integer theNewLength) ;
+ Standard_EXPORT
+ void Destroy() ;
-Standard_EXPORT Standard_Integer Length() const;
+ ~NMTTools_CommonBlockPool() {
+ Destroy();
+ }
+ Standard_EXPORT
+ Standard_Integer Length() const;
-Standard_EXPORT Standard_Integer Extent() const;
+ Standard_EXPORT
+ Standard_Integer Extent() const;
+ Standard_EXPORT
+ Standard_Integer FactLength() const;
-Standard_EXPORT Standard_Integer FactLength() const;
+ Standard_EXPORT
+ Standard_Integer Append(const NMTTools_ListOfCommonBlock& Value) ;
+ Standard_EXPORT
+ void Remove(const Standard_Integer Index) ;
-Standard_EXPORT Standard_Integer Append(const NMTTools_ListOfCommonBlock& Value) ;
+ Standard_EXPORT
+ const NMTTools_ListOfCommonBlock& Value(const Standard_Integer Index) const;
+ const NMTTools_ListOfCommonBlock& operator ()(const Standard_Integer Index) const {
+ return Value(Index);
+ }
-Standard_EXPORT void Remove(const Standard_Integer Index) ;
+ Standard_EXPORT
+ NMTTools_ListOfCommonBlock& ChangeValue(const Standard_Integer Index) ;
+ NMTTools_ListOfCommonBlock& operator ()(const Standard_Integer Index) {
+ return ChangeValue(Index);
+ }
-Standard_EXPORT const NMTTools_ListOfCommonBlock& Value(const Standard_Integer Index) const;
- const NMTTools_ListOfCommonBlock& operator ()(const Standard_Integer Index) const
-{
- return Value(Index);
-}
+ Standard_EXPORT
+ void SetBlockLength(const Standard_Integer aBL) ;
+ Standard_EXPORT
+ Standard_Integer BlockLength() const;
-
-Standard_EXPORT NMTTools_ListOfCommonBlock& ChangeValue(const Standard_Integer Index) ;
- NMTTools_ListOfCommonBlock& operator ()(const Standard_Integer Index)
-{
- return ChangeValue(Index);
-}
-
-Standard_EXPORT void SetBlockLength(const Standard_Integer aBL) ;
-Standard_EXPORT Standard_Integer BlockLength() const;
-
-#if OCC_VERSION_LARGE > 0x06050200
-Standard_EXPORT void Purge();
-#endif
+ Standard_EXPORT
+ void Purge() ;
protected:
- // Methods PROTECTED
- //
-
- // Fields PROTECTED
- //
-
-private:
-
- // Methods PRIVATE
- //
-Standard_EXPORT NMTTools_CommonBlockPool(const NMTTools_CommonBlockPool& AnArray);
+private:
+ Standard_EXPORT
+ NMTTools_CommonBlockPool(const NMTTools_CommonBlockPool& AnArray);
-Standard_EXPORT NMTTools_CommonBlockPool& Assign(const NMTTools_CommonBlockPool& Other) ;
- NMTTools_CommonBlockPool& operator =(const NMTTools_CommonBlockPool& Other)
-{
- return Assign(Other);
-}
+ Standard_EXPORT
+ NMTTools_CommonBlockPool& Assign(const NMTTools_CommonBlockPool& Other) ;
-Standard_EXPORT Standard_Boolean IsInvalidIndex(const Standard_Integer Index) const;
+ NMTTools_CommonBlockPool& operator =(const NMTTools_CommonBlockPool& Other) {
+ return Assign(Other);
+ }
- // Fields PRIVATE
- //
-Standard_Address myStart;
-Standard_Integer myLength;
-Standard_Integer myFactLength;
-Standard_Integer myBlockLength;
-Standard_Boolean myIsAllocated;
+ Standard_EXPORT
+ Standard_Boolean IsInvalidIndex(const Standard_Integer Index) const;
+ Standard_Address myStart;
+ Standard_Integer myLength;
+ Standard_Integer myFactLength;
+ Standard_Integer myBlockLength;
+ Standard_Boolean myIsAllocated;
};
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_CommonBlockPool.hxx>
-
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_OutOfMemory_HeaderFile
-#include <Standard_OutOfMemory.hxx>
-#endif
-#ifndef _NMTTools_ListOfCommonBlock_HeaderFile
-#include <NMTTools_ListOfCommonBlock.hxx>
-#endif
-
-
-#define Array1Item NMTTools_ListOfCommonBlock
-#define Array1Item_hxx <NMTTools_ListOfCommonBlock.hxx>
-#define BOPTColStd_CArray1 NMTTools_CommonBlockPool
-#define BOPTColStd_CArray1_hxx <NMTTools_CommonBlockPool.hxx>
-#include <BOPTColStd_CArray1.gxx>
-
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTTools_CoupleOfShape.cdl
--- Created: Wed Jan 28 15:03:39 2004
--- Author: Peter KURNEV
--- <pkv@irinox>
---
-class CoupleOfShape from NMTTools
-
- ---Purpose:
-
-uses
- Shape from TopoDS
-
---raises
-
-is
- Create
- returns CoupleOfShape from NMTTools;
-
- SetShape1(me:out;
- aS: Shape from TopoDS);
-
- SetShape2(me:out;
- aS: Shape from TopoDS);
-
- Shape1(me)
- returns Shape from TopoDS;
- ---C++: return const &
-
- Shape2(me)
- returns Shape from TopoDS;
- ---C++: return const &
-
-fields
- myShape1:Shape from TopoDS is protected;
- myShape2:Shape from TopoDS is protected;
-
-end CoupleOfShape;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <NMTTools_CoupleOfShape.ixx>
+#include <NMTTools_CoupleOfShape.hxx>
//=======================================================================
// function: NMTTools_CoupleOfShape::NMTTools_CoupleOfShape
-// purpose:
+// purpose:
//=======================================================================
NMTTools_CoupleOfShape::NMTTools_CoupleOfShape()
{}
//=======================================================================
// function: SetShape1
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_CoupleOfShape::SetShape1(const TopoDS_Shape& aS)
{
}
//=======================================================================
// function: SetShape2
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_CoupleOfShape::SetShape2(const TopoDS_Shape& aS)
{
}
//=======================================================================
// function: Shape1
-// purpose:
+// purpose:
//=======================================================================
const TopoDS_Shape& NMTTools_CoupleOfShape::Shape1()const
{
}
//=======================================================================
// function: Shape2
-// purpose:
+// purpose:
//=======================================================================
const TopoDS_Shape& NMTTools_CoupleOfShape::Shape2()const
{
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_CoupleOfShape.hxx
+// Created: Wed Jan 28 15:06:11 2004
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _NMTTools_CoupleOfShape_HeaderFile
#define _NMTTools_CoupleOfShape_HeaderFile
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-class TopoDS_Shape;
-
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTTools_CoupleOfShape {
-
-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 NMTTools_CoupleOfShape();
-
-
-Standard_EXPORT void SetShape1(const TopoDS_Shape& aS) ;
-
-
-Standard_EXPORT void SetShape2(const TopoDS_Shape& aS) ;
-
-
-Standard_EXPORT const TopoDS_Shape& Shape1() const;
-
-
-Standard_EXPORT const TopoDS_Shape& Shape2() const;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-TopoDS_Shape myShape1;
-TopoDS_Shape myShape2;
-
+#include <TopoDS_Shape.hxx>
-private:
+//=======================================================================
+//class : NMTTools_CoupleOfShape
+//purpose :
+//=======================================================================
+class NMTTools_CoupleOfShape
+{
+ public:
+ Standard_EXPORT
+ NMTTools_CoupleOfShape();
- // Methods PRIVATE
- //
+ Standard_EXPORT
+ void SetShape1(const TopoDS_Shape& aS) ;
+ Standard_EXPORT
+ void SetShape2(const TopoDS_Shape& aS) ;
- // Fields PRIVATE
- //
+ Standard_EXPORT
+ const TopoDS_Shape& Shape1() const;
+ Standard_EXPORT
+ const TopoDS_Shape& Shape2() const;
+ protected:
+ TopoDS_Shape myShape1;
+ TopoDS_Shape myShape2;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_CoupleOfShape.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTTools_CoupleOfShape_HeaderFile
-#include <NMTTools_CoupleOfShape.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTTools_DEProcessor.cdl
--- Created: Wed Sep 12 12:08:37 2001
--- Author: Peter KURNEV
--- <pkv@irinox>
---
-class DEProcessor from NMTTools
-
- ---Purpose:
- --
- -- The Algorithm to compute and store in interferences' pool
- --- and in the Data Structure the following values
- --- for degenerated edges
- --- 1. Paves/Pave set(s)
- --- 2. Split parts
- --- 3. States (3D) for split parts
- ---
-
-uses
-
- Vertex from TopoDS,
- Edge from TopoDS,
- Face from TopoDS,
-
- PPaveFiller from NMTTools,
- PaveFiller from NMTTools,
- --PDSFiller from NMTTools,
- ListOfPaveBlock from BOPTools,
- PShapesDataStructure from NMTDS,
- IndexedDataMapOfIntegerDEInfo from BOPTools
-
-
-is
- --Create (aFiller:out PDSFiller from NMTTools)
- -- returns DEProcessor from NMTTools;
- ---Purpose:
- --- Constructor
- ---
- Create (aFiller:out PaveFiller from NMTTools)
- returns DEProcessor from NMTTools;
- ---Purpose:
- --- Constructor
- ---
- Do(me:out);
- ---Purpose:
- --- Launches the processor
- ---
- IsDone(me)
- returns Boolean from Standard;
- ---Purpose:
- --- Returns TRUE if it is Ok
- ---
- ---
- --- Private block
- ---
- ---
- FindDegeneratedEdges (me:out)
- is protected;
-
- DoPaves (me:out)
- is protected;
-
- FindPaveBlocks (me:out;
- nED:Integer from Standard;
- nVD:Integer from Standard;
- nFD:Integer from Standard;
- aLPB:out ListOfPaveBlock from BOPTools)
- is protected;
-
- FillPaveSet (me:out;
- nED:Integer from Standard;
- nVD:Integer from Standard;
- nFD:Integer from Standard;
- aLPB: ListOfPaveBlock from BOPTools)
- is protected;
-
- FillSplitEdgesPool(me:out;
- nED:Integer from Standard)
- is protected;
-
- MakeSplitEdges(me:out;
- nED:Integer from Standard;
- nFD:Integer from Standard)
- is protected;
-
- MakeSplitEdge (me:out;
- aS1: Edge from TopoDS;
- aF : Face from TopoDS;
- aV1: Vertex from TopoDS;
- aP1: Real from Standard;
- aV2: Vertex from TopoDS;
- aP2: Real from Standard;
- aNewEdge:out Edge from TopoDS)
- is protected;
-
-fields
-
- --myDSFiller: PDSFiller from NMTTools is protected;
- myFiller : PPaveFiller from NMTTools is protected;
- myDS : PShapesDataStructure from NMTDS is protected;
- myIsDone : Boolean from Standard is protected;
- myDEMap : IndexedDataMapOfIntegerDEInfo from BOPTools is protected;
-
-end DEProcessor;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <NMTTools_DEProcessor.ixx>
+#include <NMTTools_DEProcessor.hxx>
#include <Precision.hxx>
#include <NMTTools_PaveFiller.hxx>
//=======================================================================
-// function:
-// purpose:
+// function:
+// purpose:
//=======================================================================
NMTTools_DEProcessor::NMTTools_DEProcessor(NMTTools_PaveFiller& aPaveFiller)
:
}
//=======================================================================
// function: IsDone
-// purpose:
+// purpose:
//=======================================================================
Standard_Boolean NMTTools_DEProcessor::IsDone() const
{
}
//=======================================================================
// function: Do
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_DEProcessor::Do()
{
}
//=======================================================================
// function: FindDegeneratedEdges
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_DEProcessor::FindDegeneratedEdges()
{
const TopoDS_Shape aS=myDS->Shape(i);
if (aS.ShapeType()==TopAbs_EDGE) {
const TopoDS_Edge& aE=TopoDS::Edge(aS);
-
+
if (BRep_Tool::Degenerated(aE)) {
iRankE=myDS->Rank(i);
aV=TopExp::FirstVertex(aE);
}
//=======================================================================
// function: DoPaves
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_DEProcessor::DoPaves()
{
TColStd_ListIteratorOfListOfInteger anIt(nLF);
for (; anIt.More(); anIt.Next()) {
nFD=anIt.Value();
-
+
BOPTools_ListOfPaveBlock aLPB;
FindPaveBlocks(nED, nVD, nFD, aLPB);
//
//
FillPaveSet (nED, nVD, nFD, aLPB);
}
- //
+ //
// Fill aSplitEdges for the edge nED
FillSplitEdgesPool(nED);
//
}
//=======================================================================
// function: FindPaveBlocks
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_DEProcessor::FindPaveBlocks(const Standard_Integer ,
const Standard_Integer nVD,
continue;
}
//
- // Split Parts
+ // Split Parts
const BOPTools_ListOfPaveBlock& aLPBSplits=aFF.PaveBlocks();
anIt.Initialize(aLPBSplits);
for (; anIt.More(); anIt.Next()) {
}
//
// Section Parts
- Standard_Integer j, aNbCurves;
+ Standard_Integer j, aNbCurves;
//
BOPTools_SequenceOfCurves& aSC=aFF.Curves();
aNbCurves=aSC.Length();
}
//=======================================================================
// function: FillPaveSet
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_DEProcessor::FillPaveSet (const Standard_Integer nED,
const Standard_Integer nVD,
//
aDT=Precision::PConfusion();
//
- BOPTools_PaveSet& aPaveSet=
+ BOPTools_PaveSet& aPaveSet=
(myFiller->ChangePavePool()).ChangeValue(myDS->RefEdge(nED));
//
// Clear aPaveSet, aSplitEdges
BOPTools_Pave aPave2 (nVD, aTD2, BooleanOperations_UnknownInterference);
aPaveSet.Append(aPave2);
//
- // Fill other paves
+ // Fill other paves
BOPTools_ListIteratorOfListOfPaveBlock anIt(aLPB);
for (; anIt.More(); anIt.Next()) {
const BOPTools_PaveBlock& aPB=anIt.Value();
nE=aPB.Edge();
const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));
-
+
Handle(Geom2d_Curve) aC2D=BRep_Tool::CurveOnSurface(aE, aDF, aT1, aT2);
//
// Intersection
bIsDone=aGInter.IsDone();
if(bIsDone) {
aNbPoints=aGInter.NbPoints();
- if (aNbPoints) {
+ if (aNbPoints) {
for (j=1; j<=aNbPoints; ++j) {
aP2D=aGInter.Point(j).Value();
Handle(Geom2d_Line) aCLDE;
}
//aCLDE=Handle(Geom2d_Line)::DownCast(aC2DDE1);
//modified by NIZNHY-PKV Thu Mar 20 17:37:37 2008t
-
+
if (aCLDE.IsNull()) {
continue;
}
aX=ElCLib::Parameter(aLDE, aP2D);
//
if (fabs (aX-aTD1) < aDT || fabs (aX-aTD2) < aDT) {
- continue;
+ continue;
}
if (aX < aTD1 || aX > aTD2) {
- continue;
+ continue;
}
//
bRejectFlag=Standard_False;
}
}
if (bRejectFlag) {
- continue;
+ continue;
}
//
BOPTools_Pave aPave(nVD, aX, BooleanOperations_UnknownInterference);
}
//=======================================================================
// function: FillSplitEdgesPool
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_DEProcessor::FillSplitEdgesPool (const Standard_Integer nED)
{
const BOPTools_PavePool& aPavePool=myFiller->PavePool();
BOPTools_PavePool* pPavePool=(BOPTools_PavePool*) &aPavePool;
BOPTools_PaveSet& aPaveSet= pPavePool->ChangeValue(myDS->RefEdge(nED));
-
+
BOPTools_PaveBlockIterator aPBIt(nED, aPaveSet);
for (; aPBIt.More(); aPBIt.Next()) {
BOPTools_PaveBlock& aPB=aPBIt.Value();
}
//=======================================================================
// function: MakeSplitEdges
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_DEProcessor::MakeSplitEdges (const Standard_Integer nED,
const Standard_Integer nFD)
aPBIt.Initialize(aSplitEdges);
for (; aPBIt.More(); aPBIt.Next()) {
BOPTools_PaveBlock& aPB=aPBIt.Value();
-
+
const BOPTools_Pave& aPave1=aPB.Pave1();
nV1=aPave1.Index();
t1=aPave1.Param();
aV1=TopoDS::Vertex(myDS->GetShape(nV1));
aV1.Orientation(TopAbs_FORWARD);
-
+
const BOPTools_Pave& aPave2=aPB.Pave2();
nV2=aPave2.Index();
t2=aPave2.Param();
aV2=TopoDS::Vertex(myDS->GetShape(nV2));
aV2.Orientation(TopAbs_REVERSED);
-
- MakeSplitEdge(aDE, aDF, aV1, t1, aV2, t2, aESplit);
+
+ MakeSplitEdge(aDE, aDF, aV1, t1, aV2, t2, aESplit);
//
// Add Split Part of the Original Edge to the DS
BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
-
+
anASSeq.SetNewSuccessor(nV1);
anASSeq.SetNewOrientation(aV1.Orientation());
-
+
anASSeq.SetNewSuccessor(nV2);
anASSeq.SetNewOrientation(aV2.Orientation());
-
+
myDS->InsertShapeAndAncestorsSuccessors(aESplit, anASSeq);
aNewShapeIndex=myDS->NumberOfInsertedShapes();
myDS->SetState(aNewShapeIndex, BooleanOperations_UNKNOWN);
}
//=======================================================================
// function: MakeSplitEdge
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_DEProcessor::MakeSplitEdge (const TopoDS_Edge& aE,
const TopoDS_Face& aF,
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_DEProcessor.hxx
+// Created: Wed Sep 12 12:10:52 2001
+// Author: Peter KURNEV
+// <pkv@irinox>
+
#ifndef _NMTTools_DEProcessor_HeaderFile
#define _NMTTools_DEProcessor_HeaderFile
-#ifndef _NMTTools_PPaveFiller_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <NMTTools_PPaveFiller.hxx>
-#endif
-#ifndef _NMTDS_PShapesDataStructure_HeaderFile
#include <NMTDS_PShapesDataStructure.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-#ifndef _BOPTools_IndexedDataMapOfIntegerDEInfo_HeaderFile
#include <BOPTools_IndexedDataMapOfIntegerDEInfo.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
+#include <NMTTools_PaveFiller.hxx>
#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
-#endif
-class NMTTools_PaveFiller;
-class BOPTools_ListOfPaveBlock;
-class TopoDS_Edge;
-class TopoDS_Face;
-class TopoDS_Vertex;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
//! <br>
//! 2. Split parts <br>
//! 3. States (3D) for split parts <br>
//! <br>
+//=======================================================================
+//class : NMTTools_DEProcessor
+//purpose :
+//=======================================================================
class NMTTools_DEProcessor {
-
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
- //
//! Constructor <br>
//! <br>
//! Constructor <br>
//! <br>
-Standard_EXPORT NMTTools_DEProcessor(NMTTools_PaveFiller& aFiller);
-
+ Standard_EXPORT
+ NMTTools_DEProcessor(NMTTools_PaveFiller& aFiller);
//! Launches the processor <br>
-Standard_EXPORT void Do() ;
-
+ Standard_EXPORT
+ void Do() ;
//! Returns TRUE if it is Ok <br>
-Standard_EXPORT Standard_Boolean IsDone() const;
-
-
+ Standard_EXPORT
+ Standard_Boolean IsDone() const;
protected:
-
- // Methods PROTECTED
- //
-
-
-Standard_EXPORT void FindDegeneratedEdges() ;
-
-
-Standard_EXPORT void DoPaves() ;
-
-
-Standard_EXPORT void FindPaveBlocks(const Standard_Integer nED,const Standard_Integer nVD,const Standard_Integer nFD,BOPTools_ListOfPaveBlock& aLPB) ;
-
-
-Standard_EXPORT void FillPaveSet(const Standard_Integer nED,const Standard_Integer nVD,const Standard_Integer nFD,const BOPTools_ListOfPaveBlock& aLPB) ;
-
-
-Standard_EXPORT void FillSplitEdgesPool(const Standard_Integer nED) ;
-
-
-Standard_EXPORT void MakeSplitEdges(const Standard_Integer nED,const Standard_Integer nFD) ;
-
-
-Standard_EXPORT void MakeSplitEdge(const TopoDS_Edge& aS1,const TopoDS_Face& aF,const TopoDS_Vertex& aV1,const Standard_Real aP1,const TopoDS_Vertex& aV2,const Standard_Real aP2,TopoDS_Edge& aNewEdge) ;
-
-
- // Fields PROTECTED
- //
-NMTTools_PPaveFiller myFiller;
-NMTDS_PShapesDataStructure myDS;
-Standard_Boolean myIsDone;
-BOPTools_IndexedDataMapOfIntegerDEInfo myDEMap;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+ Standard_EXPORT
+ void FindDegeneratedEdges() ;
+
+ Standard_EXPORT
+ void DoPaves() ;
+
+ Standard_EXPORT
+ void FindPaveBlocks(const Standard_Integer nED,
+ const Standard_Integer nVD,
+ const Standard_Integer nFD,
+ BOPTools_ListOfPaveBlock& aLPB) ;
+
+ Standard_EXPORT
+ void FillPaveSet(const Standard_Integer nED,
+ const Standard_Integer nVD,
+ const Standard_Integer nFD,
+ const BOPTools_ListOfPaveBlock& aLPB) ;
+
+ Standard_EXPORT
+ void FillSplitEdgesPool(const Standard_Integer nED) ;
+
+ Standard_EXPORT
+ void MakeSplitEdges(const Standard_Integer nED,
+ const Standard_Integer nFD) ;
+
+ Standard_EXPORT
+ void MakeSplitEdge(const TopoDS_Edge& aS1,
+ const TopoDS_Face& aF,
+ const TopoDS_Vertex& aV1,
+ const Standard_Real aP1,
+ const TopoDS_Vertex& aV2,
+ const Standard_Real aP2,
+ TopoDS_Edge& aNewEdge) ;
+
+
+ NMTTools_PPaveFiller myFiller;
+ NMTDS_PShapesDataStructure myDS;
+ Standard_Boolean myIsDone;
+ BOPTools_IndexedDataMapOfIntegerDEInfo myDEMap;
};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_DEProcessor.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTTools_PaveFiller_HeaderFile
-#include <NMTTools_PaveFiller.hxx>
-#endif
-#ifndef _BOPTools_ListOfPaveBlock_HeaderFile
-#include <BOPTools_ListOfPaveBlock.hxx>
-#endif
-#ifndef _TopoDS_Edge_HeaderFile
-#include <TopoDS_Edge.hxx>
-#endif
-#ifndef _TopoDS_Face_HeaderFile
-#include <TopoDS_Face.hxx>
-#endif
-#ifndef _TopoDS_Vertex_HeaderFile
-#include <TopoDS_Vertex.hxx>
-#endif
-#ifndef _NMTTools_DEProcessor_HeaderFile
-#include <NMTTools_DEProcessor.hxx>
-#endif
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx
+// Created: Mon Feb 20 12:24:47 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile
-#define _NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile
-
-#ifndef _TCollection_BasicMapIterator_HeaderFile
-#include <TCollection_BasicMapIterator.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile
-#include <Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx>
-#endif
-class Standard_NoSuchObject;
-class NMTTools_FaceInfo;
-class TColStd_MapIntegerHasher;
-class NMTTools_DataMapOfIntegerFaceInfo;
-class NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo;
+#ifndef NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile
+#define NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
+#ifndef NMTTools_DataMapOfIntegerFaceInfo_HeaderFile
+#include <NMTTools_DataMapOfIntegerFaceInfo.hxx>
#endif
-
-class NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo : public TCollection_BasicMapIterator {
-
-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 NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo();
-
-
-Standard_EXPORT NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo(const NMTTools_DataMapOfIntegerFaceInfo& aMap);
-
-
-Standard_EXPORT void Initialize(const NMTTools_DataMapOfIntegerFaceInfo& aMap) ;
-
-
-Standard_EXPORT const Standard_Integer& Key() const;
-
-
-Standard_EXPORT const NMTTools_FaceInfo& Value() const;
-
-
-
-
-
-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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _NMTTools_FaceInfo_HeaderFile
-#include <NMTTools_FaceInfo.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile
-#include <NMTTools_DataMapOfIntegerFaceInfo.hxx>
-#endif
-#ifndef _NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile
-#include <NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx>
-#endif
-
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem NMTTools_FaceInfo
-#define TheItem_hxx <NMTTools_FaceInfo.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo
-#define TCollection_DataMapNode_hxx <NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx>
-#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo
-#define TCollection_DataMapIterator_hxx <NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx>
-#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo
-#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_Type_()
-#define TCollection_DataMap NMTTools_DataMapOfIntegerFaceInfo
-#define TCollection_DataMap_hxx <NMTTools_DataMapOfIntegerFaceInfo.hxx>
-#include <TCollection_DataMapIterator.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx
+// Created: Mon Feb 20 12:04:52 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile
-#define _NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile
-
-#ifndef _TCollection_BasicMapIterator_HeaderFile
-#include <TCollection_BasicMapIterator.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile
-#include <Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx>
-#endif
-class Standard_NoSuchObject;
-class BOPTools_ListOfPaveBlock;
-class TColStd_MapIntegerHasher;
-class NMTTools_DataMapOfIntegerListOfPaveBlock;
-class NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock;
+#ifndef NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile
+#define NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
+#ifndef NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile
+#include <NMTTools_DataMapOfIntegerListOfPaveBlock.hxx>
#endif
-
-class NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock : public TCollection_BasicMapIterator {
-
-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 NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock();
-
-
-Standard_EXPORT NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock(const NMTTools_DataMapOfIntegerListOfPaveBlock& aMap);
-
-
-Standard_EXPORT void Initialize(const NMTTools_DataMapOfIntegerListOfPaveBlock& aMap) ;
-
-
-Standard_EXPORT const Standard_Integer& Key() const;
-
-
-Standard_EXPORT const BOPTools_ListOfPaveBlock& Value() const;
-
-
-
-
-
-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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _BOPTools_ListOfPaveBlock_HeaderFile
-#include <BOPTools_ListOfPaveBlock.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile
-#include <NMTTools_DataMapOfIntegerListOfPaveBlock.hxx>
-#endif
-#ifndef _NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile
-#include <NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx>
-#endif
-
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem BOPTools_ListOfPaveBlock
-#define TheItem_hxx <BOPTools_ListOfPaveBlock.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock
-#define TCollection_DataMapNode_hxx <NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx>
-#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock
-#define TCollection_DataMapIterator_hxx <NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx>
-#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock
-#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_Type_()
-#define TCollection_DataMap NMTTools_DataMapOfIntegerListOfPaveBlock
-#define TCollection_DataMap_hxx <NMTTools_DataMapOfIntegerListOfPaveBlock.hxx>
-#include <TCollection_DataMapIterator.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile
-#define _NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile
-#include <Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx>
-#endif
-
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _NMTTools_FaceInfo_HeaderFile
-#include <NMTTools_FaceInfo.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-class NMTTools_FaceInfo;
-class TColStd_MapIntegerHasher;
-class NMTTools_DataMapOfIntegerFaceInfo;
-class NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo;
-
-
-
-class NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo(const Standard_Integer& K,const NMTTools_FaceInfo& I,const TCollection_MapNodePtr& n);
-
- Standard_Integer& Key() const;
-
- NMTTools_FaceInfo& Value() const;
-//Standard_EXPORT ~NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Integer myKey;
-NMTTools_FaceInfo myValue;
-
-
-};
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem NMTTools_FaceInfo
-#define TheItem_hxx <NMTTools_FaceInfo.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo
-#define TCollection_DataMapNode_hxx <NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx>
-#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo
-#define TCollection_DataMapIterator_hxx <NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx>
-#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo
-#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_Type_()
-#define TCollection_DataMap NMTTools_DataMapOfIntegerFaceInfo
-#define TCollection_DataMap_hxx <NMTTools_DataMapOfIntegerFaceInfo.hxx>
-
-#include <TCollection_DataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_DataMapNode
-#undef TCollection_DataMapNode_hxx
-#undef TCollection_DataMapIterator
-#undef TCollection_DataMapIterator_hxx
-#undef Handle_TCollection_DataMapNode
-#undef TCollection_DataMapNode_Type_
-#undef TCollection_DataMap
-#undef TCollection_DataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _NMTTools_FaceInfo_HeaderFile
-#include <NMTTools_FaceInfo.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile
-#include <NMTTools_DataMapOfIntegerFaceInfo.hxx>
-#endif
-#ifndef _NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile
-#include <NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx>
-#endif
-//NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo::~NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo",
- sizeof(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo))) {
- _anOtherObject = Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)((Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo::DynamicType() const
-{
- return STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) ;
-}
-//Standard_Boolean NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo::~Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo() {}
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem NMTTools_FaceInfo
-#define TheItem_hxx <NMTTools_FaceInfo.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo
-#define TCollection_DataMapNode_hxx <NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx>
-#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo
-#define TCollection_DataMapIterator_hxx <NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx>
-#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo
-#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_Type_()
-#define TCollection_DataMap NMTTools_DataMapOfIntegerFaceInfo
-#define TCollection_DataMap_hxx <NMTTools_DataMapOfIntegerFaceInfo.hxx>
-#include <TCollection_DataMapNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile
-#define _NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile
-#include <Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx>
-#endif
-
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _BOPTools_ListOfPaveBlock_HeaderFile
-#include <BOPTools_ListOfPaveBlock.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-class BOPTools_ListOfPaveBlock;
-class TColStd_MapIntegerHasher;
-class NMTTools_DataMapOfIntegerListOfPaveBlock;
-class NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock;
-
-
-
-class NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock(const Standard_Integer& K,const BOPTools_ListOfPaveBlock& I,const TCollection_MapNodePtr& n);
-
- Standard_Integer& Key() const;
-
- BOPTools_ListOfPaveBlock& Value() const;
-//Standard_EXPORT ~NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Integer myKey;
-BOPTools_ListOfPaveBlock myValue;
-
-
-};
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem BOPTools_ListOfPaveBlock
-#define TheItem_hxx <BOPTools_ListOfPaveBlock.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock
-#define TCollection_DataMapNode_hxx <NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx>
-#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock
-#define TCollection_DataMapIterator_hxx <NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx>
-#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock
-#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_Type_()
-#define TCollection_DataMap NMTTools_DataMapOfIntegerListOfPaveBlock
-#define TCollection_DataMap_hxx <NMTTools_DataMapOfIntegerListOfPaveBlock.hxx>
-
-#include <TCollection_DataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_DataMapNode
-#undef TCollection_DataMapNode_hxx
-#undef TCollection_DataMapIterator
-#undef TCollection_DataMapIterator_hxx
-#undef Handle_TCollection_DataMapNode
-#undef TCollection_DataMapNode_Type_
-#undef TCollection_DataMap
-#undef TCollection_DataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _BOPTools_ListOfPaveBlock_HeaderFile
-#include <BOPTools_ListOfPaveBlock.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile
-#include <NMTTools_DataMapOfIntegerListOfPaveBlock.hxx>
-#endif
-#ifndef _NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile
-#include <NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx>
-#endif
-//NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock::~NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock",
- sizeof(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock) Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock))) {
- _anOtherObject = Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)((Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock::DynamicType() const
-{
- return STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock) ;
-}
-//Standard_Boolean NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock::~Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock() {}
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem BOPTools_ListOfPaveBlock
-#define TheItem_hxx <BOPTools_ListOfPaveBlock.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock
-#define TCollection_DataMapNode_hxx <NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx>
-#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock
-#define TCollection_DataMapIterator_hxx <NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx>
-#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock
-#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_Type_()
-#define TCollection_DataMap NMTTools_DataMapOfIntegerListOfPaveBlock
-#define TCollection_DataMap_hxx <NMTTools_DataMapOfIntegerListOfPaveBlock.hxx>
-#include <TCollection_DataMapNode.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_DataMapOfIntegerFaceInfo.hxx
+// Created: Mon Feb 20 12:21:55 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile
-#define _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile
-#include <Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_NoSuchObject;
-class NMTTools_FaceInfo;
-class TColStd_MapIntegerHasher;
-class NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo;
-class NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class NMTTools_DataMapOfIntegerFaceInfo : public TCollection_BasicMap {
-
-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 NMTTools_DataMapOfIntegerFaceInfo(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT NMTTools_DataMapOfIntegerFaceInfo& Assign(const NMTTools_DataMapOfIntegerFaceInfo& Other) ;
- NMTTools_DataMapOfIntegerFaceInfo& operator =(const NMTTools_DataMapOfIntegerFaceInfo& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~NMTTools_DataMapOfIntegerFaceInfo()
-{
- Clear();
-}
-
-
-
-Standard_EXPORT Standard_Boolean Bind(const Standard_Integer& K,const NMTTools_FaceInfo& I) ;
+#ifndef NMTTools_DataMapOfIntegerFaceInfo_HeaderFile
+#define NMTTools_DataMapOfIntegerFaceInfo_HeaderFile
-Standard_EXPORT Standard_Boolean IsBound(const Standard_Integer& K) const;
+#include <NMTTools_FaceInfo.hxx>
+#include <TColStd_MapIntegerHasher.hxx>
+#define _NCollection_MapHasher
+#include <NCollection_DataMap.hxx>
-Standard_EXPORT Standard_Boolean UnBind(const Standard_Integer& K) ;
+typedef NCollection_DataMap<Standard_Integer, NMTTools_FaceInfo, TColStd_MapIntegerHasher> NMTTools_DataMapOfIntegerFaceInfo;
+typedef NMTTools_DataMapOfIntegerFaceInfo::Iterator NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo;
-
-Standard_EXPORT const NMTTools_FaceInfo& Find(const Standard_Integer& K) const;
- const NMTTools_FaceInfo& operator()(const Standard_Integer& K) const
-{
- return Find(K);
-}
-
-
-
-Standard_EXPORT NMTTools_FaceInfo& ChangeFind(const Standard_Integer& K) ;
- NMTTools_FaceInfo& operator()(const Standard_Integer& K)
-{
- return ChangeFind(K);
-}
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address Find1 (const Standard_Integer& K) const;
- Standard_EXPORT Standard_Address ChangeFind1 (const Standard_Integer& K);
-#endif
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT NMTTools_DataMapOfIntegerFaceInfo(const NMTTools_DataMapOfIntegerFaceInfo& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
+#undef _NCollection_MapHasher
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_DataMapOfIntegerFaceInfo.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _NMTTools_FaceInfo_HeaderFile
-#include <NMTTools_FaceInfo.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile
-#include <NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx>
-#endif
-#ifndef _NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile
-#include <NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx>
-#endif
-
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem NMTTools_FaceInfo
-#define TheItem_hxx <NMTTools_FaceInfo.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo
-#define TCollection_DataMapNode_hxx <NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx>
-#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo
-#define TCollection_DataMapIterator_hxx <NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx>
-#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo
-#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_Type_()
-#define TCollection_DataMap NMTTools_DataMapOfIntegerFaceInfo
-#define TCollection_DataMap_hxx <NMTTools_DataMapOfIntegerFaceInfo.hxx>
-#include <TCollection_DataMap.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_DataMapOfIntegerListOfPaveBlock.hxx
+// Created: Mon Feb 20 09:27:40 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile
-#define _NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile
-#include <Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_NoSuchObject;
-class BOPTools_ListOfPaveBlock;
-class TColStd_MapIntegerHasher;
-class NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock;
-class NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class NMTTools_DataMapOfIntegerListOfPaveBlock : public TCollection_BasicMap {
-
-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 NMTTools_DataMapOfIntegerListOfPaveBlock(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT NMTTools_DataMapOfIntegerListOfPaveBlock& Assign(const NMTTools_DataMapOfIntegerListOfPaveBlock& Other) ;
- NMTTools_DataMapOfIntegerListOfPaveBlock& operator =(const NMTTools_DataMapOfIntegerListOfPaveBlock& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~NMTTools_DataMapOfIntegerListOfPaveBlock()
-{
- Clear();
-}
+#ifndef NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile
+#define NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile
-Standard_EXPORT Standard_Boolean Bind(const Standard_Integer& K,const BOPTools_ListOfPaveBlock& I) ;
+#include <TColStd_MapIntegerHasher.hxx>
+#include <BOPTools_ListOfPaveBlock.hxx>
+#define _NCollection_MapHasher
+#include <NCollection_DataMap.hxx>
-Standard_EXPORT Standard_Boolean IsBound(const Standard_Integer& K) const;
+typedef NCollection_DataMap<Standard_Integer, BOPTools_ListOfPaveBlock, TColStd_MapIntegerHasher> NMTTools_DataMapOfIntegerListOfPaveBlock;
+typedef NMTTools_DataMapOfIntegerListOfPaveBlock::Iterator NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock;
-
-Standard_EXPORT Standard_Boolean UnBind(const Standard_Integer& K) ;
-
-
-Standard_EXPORT const BOPTools_ListOfPaveBlock& Find(const Standard_Integer& K) const;
- const BOPTools_ListOfPaveBlock& operator()(const Standard_Integer& K) const
-{
- return Find(K);
-}
-
-
-
-Standard_EXPORT BOPTools_ListOfPaveBlock& ChangeFind(const Standard_Integer& K) ;
- BOPTools_ListOfPaveBlock& operator()(const Standard_Integer& K)
-{
- return ChangeFind(K);
-}
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address Find1 (const Standard_Integer& K) const;
- Standard_EXPORT Standard_Address ChangeFind1 (const Standard_Integer& K);
-#endif
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT NMTTools_DataMapOfIntegerListOfPaveBlock(const NMTTools_DataMapOfIntegerListOfPaveBlock& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
+#undef _NCollection_MapHasher
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_DataMapOfIntegerListOfPaveBlock.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _BOPTools_ListOfPaveBlock_HeaderFile
-#include <BOPTools_ListOfPaveBlock.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile
-#include <NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx>
-#endif
-#ifndef _NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile
-#include <NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx>
-#endif
-
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem BOPTools_ListOfPaveBlock
-#define TheItem_hxx <BOPTools_ListOfPaveBlock.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock
-#define TCollection_DataMapNode_hxx <NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx>
-#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock
-#define TCollection_DataMapIterator_hxx <NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx>
-#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock
-#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_Type_()
-#define TCollection_DataMap NMTTools_DataMapOfIntegerListOfPaveBlock
-#define TCollection_DataMap_hxx <NMTTools_DataMapOfIntegerListOfPaveBlock.hxx>
-#include <TCollection_DataMap.gxx>
-
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTTools_FaceInfo.cdl
--- Created: Tue Dec 9 12:11:48 2003
--- Author: Peter KURNEV
--- <pkv@irinox>
---
-class FaceInfo from NMTTools
-
- ---Purpose:
-
-uses
- MapOfInteger from TColStd,
- MapOfPaveBlock from NMTTools
---raises
-
-is
-
- Create
- returns FaceInfo from NMTTools;
- ---C++: inline
- ---C++: alias "virtual ~NMTTools_FaceInfo();"
- ---Purpose:
- --- Empty contructor
- ---
-
- Clear(me:out);
- ---Purpose:
- --- Clears the contents
-
- SetIndex(me:out;
- theI: Integer from Standard);
- ---C++: inline
- ---Purpose:
- --- Modifier
- --- Sets the index of the face <theI>
-
- Index(me)
- returns Integer from Standard;
- ---C++: inline
- ---Purpose:
- --- Selector
- --- Returns the index of the face
- --
- -- In
- --
- PaveBlocksIn(me)
- returns MapOfPaveBlock from NMTTools;
- ---C++: return const &
- ---C++: inline
- ---Purpose:
- --- Selector
- --- Returns the pave blocks of the face
- --- that have state In
-
- ChangePaveBlocksIn(me:out)
- returns MapOfPaveBlock from NMTTools;
- ---C++: return &
- ---C++: inline
- ---Purpose:
- --- Selector/Modifier
- --- Returns the pave blocks
- -- of the face
- --- that have state In
-
- VerticesIn(me)
- returns MapOfInteger from TColStd;
- ---C++: return const &
- ---C++: inline
- ---Purpose:
- --- Selector
- --- Returns the list of indices for vertices
- -- of the face
- --- that have state In
-
- ChangeVerticesIn(me:out)
- returns MapOfInteger from TColStd;
- ---C++: return &
- ---C++: inline
- ---Purpose:
- --- Selector/Modifier
- --- Returns the list of indices for vertices
- -- of the face
- --- that have state In
- --
- -- On
- --
- PaveBlocksOn(me)
- returns MapOfPaveBlock from NMTTools;
- ---C++: return const &
- ---C++: inline
- ---Purpose:
- --- Selector
- --- Returns the pave blocks of the face
- --- that have state On
-
- ChangePaveBlocksOn(me:out)
- returns MapOfPaveBlock from NMTTools;
- ---C++: return &
- ---C++: inline
- ---Purpose:
- --- Selector/Modifier
- --- Returns the pave blocks
- -- of the face
- --- that have state On
- VerticesOn(me)
- returns MapOfInteger from TColStd;
- ---C++: return const &
- ---C++: inline
- ---Purpose:
- --- Selector
- --- Returns the list of indices for vertices
- -- of the face
- --- that have state On
-
- ChangeVerticesOn(me:out)
- returns MapOfInteger from TColStd;
- ---C++: return &
- ---C++: inline
- ---Purpose:
- --- Selector/Modifier
- --- Returns the list of indices for vertices
- -- of the face
- --- that have state On
-
-fields
- myIndex : Integer from Standard is protected;
- myPaveBlocksIn: MapOfPaveBlock from NMTTools is protected;
- myVerticesIn : MapOfInteger from TColStd is protected;
- myPaveBlocksOn: MapOfPaveBlock from NMTTools is protected;
- myVerticesOn : MapOfInteger from TColStd is protected;
-
-end FaceInfo;
-
-
-
-
-
-
-
-
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <NMTTools_FaceInfo.ixx>
+#include <NMTTools_FaceInfo.hxx>
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_FaceInfo.hxx
+// Created: Tue Dec 9 12:23:29 2003
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _NMTTools_FaceInfo_HeaderFile
#define _NMTTools_FaceInfo_HeaderFile
-#ifndef _Standard_Integer_HeaderFile
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
#include <Standard_Integer.hxx>
-#endif
-#ifndef _NMTTools_MapOfPaveBlock_HeaderFile
#include <NMTTools_MapOfPaveBlock.hxx>
-#endif
-#ifndef _TColStd_MapOfInteger_HeaderFile
#include <TColStd_MapOfInteger.hxx>
-#endif
-class NMTTools_MapOfPaveBlock;
-class TColStd_MapOfInteger;
+#include <NMTTools_MapOfPaveBlock.hxx>
+#include <TColStd_MapOfInteger.hxx>
+//=======================================================================
+//class : NMTTools_FaceInfo
+//purpose :
+//=======================================================================
+class NMTTools_FaceInfo {
+ public:
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
+ //! Empty contructor <br>
+ //! <br>
+ NMTTools_FaceInfo();
+ virtual ~NMTTools_FaceInfo();
-class NMTTools_FaceInfo {
+ //! Clears the contents <br>
+ Standard_EXPORT void Clear() ;
-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
- //
-
-//! Empty contructor <br>
-//! <br>
-NMTTools_FaceInfo();
-virtual ~NMTTools_FaceInfo();
-
-
-//! Clears the contents <br>
-Standard_EXPORT void Clear() ;
-
-//! Modifier <br>
-//! Sets the index of the face <theI> <br>
+ //! Modifier <br>
+ //! Sets the index of the face <theI> <br>
void SetIndex(const Standard_Integer theI) ;
-//! Selector <br>
-//! Returns the index of the face <br>
-//! <br>
-//! In <br>
-//! <br>
+ //! Selector <br>
+ //! Returns the index of the face <br>
+ //! <br>
+ //! In <br>
+ //! <br>
Standard_Integer Index() const;
-//! Selector <br>
-//! Returns the pave blocks of the face <br>
-//! that have state In <br>
- const NMTTools_MapOfPaveBlock& PaveBlocksIn() const;
+ //! Selector <br>
+ //! Returns the pave blocks of the face <br>
+ //! that have state In <br>
+ const NMTTools_MapOfPaveBlock& PaveBlocksIn() const;
//! Selector/Modifier <br>
-//! Returns the pave blocks <br>
-//! of the face <br>
-//! that have state In <br>
+ //! Returns the pave blocks <br>
+ //! of the face <br>
+ //! that have state In <br>
NMTTools_MapOfPaveBlock& ChangePaveBlocksIn() ;
-//! Selector <br>
-//! Returns the list of indices for vertices <br>
-//! of the face <br>
-//! that have state In <br>
- const TColStd_MapOfInteger& VerticesIn() const;
-
-//! Selector/Modifier <br>
-//! Returns the list of indices for vertices <br>
-//! of the face <br>
-//! that have state In <br>
-//! <br>
-//! On <br>
-//! <br>
+ //! Selector <br>
+ //! Returns the list of indices for vertices <br>
+ //! of the face <br>
+ //! that have state In <br>
+ const TColStd_MapOfInteger& VerticesIn() const;
+
+ //! Selector/Modifier <br>
+ //! Returns the list of indices for vertices <br>
+ //! of the face <br>
+ //! that have state In <br>
+ //! <br>
+ //! On <br>
+ //! <br>
TColStd_MapOfInteger& ChangeVerticesIn() ;
-//! Selector <br>
-//! Returns the pave blocks of the face <br>
-//! that have state On <br>
- const NMTTools_MapOfPaveBlock& PaveBlocksOn() const;
+ //! Selector <br>
+ //! Returns the pave blocks of the face <br>
+ //! that have state On <br>
+ const NMTTools_MapOfPaveBlock& PaveBlocksOn() const;
-//! Selector/Modifier <br>
-//! Returns the pave blocks <br>
-//! of the face <br>
-//! that have state On <br>
+ //! Selector/Modifier <br>
+ //! Returns the pave blocks <br>
+ //! of the face <br>
+ //! that have state On <br>
NMTTools_MapOfPaveBlock& ChangePaveBlocksOn() ;
-//! Selector <br>
-//! Returns the list of indices for vertices <br>
-//! of the face <br>
-//! that have state On <br>
- const TColStd_MapOfInteger& VerticesOn() const;
+ //! Selector <br>
+ //! Returns the list of indices for vertices <br>
+ //! of the face <br>
+ //! that have state On <br>
+ const TColStd_MapOfInteger& VerticesOn() const;
-//! Selector/Modifier <br>
-//! Returns the list of indices for vertices <br>
-//! of the face <br>
-//! that have state On <br>
+ //! Selector/Modifier <br>
+ //! Returns the list of indices for vertices <br>
+ //! of the face <br>
+ //! that have state On <br>
TColStd_MapOfInteger& ChangeVerticesOn() ;
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-Standard_Integer myIndex;
-NMTTools_MapOfPaveBlock myPaveBlocksIn;
-TColStd_MapOfInteger myVerticesIn;
-NMTTools_MapOfPaveBlock myPaveBlocksOn;
-TColStd_MapOfInteger myVerticesOn;
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
+ protected:
+ Standard_Integer myIndex;
+ NMTTools_MapOfPaveBlock myPaveBlocksIn;
+ TColStd_MapOfInteger myVerticesIn;
+ NMTTools_MapOfPaveBlock myPaveBlocksOn;
+ TColStd_MapOfInteger myVerticesOn;
};
-
#include <NMTTools_FaceInfo.lxx>
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_FaceInfo.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTTools_MapOfPaveBlock_HeaderFile
-#include <NMTTools_MapOfPaveBlock.hxx>
-#endif
-#ifndef _TColStd_MapOfInteger_HeaderFile
-#include <TColStd_MapOfInteger.hxx>
-#endif
-#ifndef _NMTTools_FaceInfo_HeaderFile
-#include <NMTTools_FaceInfo.hxx>
-#endif
//
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
inline NMTTools_FaceInfo::NMTTools_FaceInfo()
:
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
inline NMTTools_FaceInfo::~NMTTools_FaceInfo()
{
}
//=======================================================================
//function : Clear
-//purpose :
+//purpose :
//=======================================================================
inline void NMTTools_FaceInfo::Clear()
{
}
//=======================================================================
//function : SetIndex
-//purpose :
+//purpose :
//=======================================================================
inline void NMTTools_FaceInfo::SetIndex(const Standard_Integer theI)
{
}
//=======================================================================
//function : Index
-//purpose :
+//purpose :
//=======================================================================
inline Standard_Integer NMTTools_FaceInfo::Index()const
{
}
//=======================================================================
//function : PaveBlockIn
-//purpose :
+//purpose :
//=======================================================================
inline const NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::PaveBlocksIn()const
{
}
//=======================================================================
//function : ChangePaveBlocksIn
-//purpose :
+//purpose :
//=======================================================================
inline NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::ChangePaveBlocksIn()
{
}
//=======================================================================
//function : VerticesIn
-//purpose :
+//purpose :
//=======================================================================
inline const TColStd_MapOfInteger& NMTTools_FaceInfo::VerticesIn()const
{
}
//=======================================================================
//function : ChangeVerticesIn
-//purpose :
+//purpose :
//=======================================================================
inline TColStd_MapOfInteger& NMTTools_FaceInfo::ChangeVerticesIn()
{
}
//=======================================================================
//function : PaveBlockOn
-//purpose :
+//purpose :
//=======================================================================
inline const NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::PaveBlocksOn()const
{
}
//=======================================================================
//function : ChangePaveBlocksOn
-//purpose :
+//purpose :
//=======================================================================
inline NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::ChangePaveBlocksOn()
{
}
//=======================================================================
//function : VerticesOn
-//purpose :
+//purpose :
//=======================================================================
inline const TColStd_MapOfInteger& NMTTools_FaceInfo::VerticesOn()const
{
}
//=======================================================================
//function : ChangeVerticesOn
-//purpose :
+//purpose :
//=======================================================================
inline TColStd_MapOfInteger& NMTTools_FaceInfo::ChangeVerticesOn()
{
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile
-#define _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile
-#include <Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx>
-#endif
-
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _TColStd_IndexedMapOfInteger_HeaderFile
-#include <TColStd_IndexedMapOfInteger.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-class TColStd_IndexedMapOfInteger;
-class TColStd_MapIntegerHasher;
-class NMTTools_IndexedDataMapOfIndexedMapOfInteger;
-
-
-
-class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger(const Standard_Integer& K1,const Standard_Integer K2,const TColStd_IndexedMapOfInteger& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
-
- Standard_Integer& Key1() const;
-
- Standard_Integer& Key2() const;
-
- TCollection_MapNodePtr& Next2() const;
-
- TColStd_IndexedMapOfInteger& Value() const;
-//Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Integer myKey1;
-Standard_Integer myKey2;
-TColStd_IndexedMapOfInteger myValue;
-TCollection_MapNodePtr myNext2;
-
-
-};
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem TColStd_IndexedMapOfInteger
-#define TheItem_hxx <TColStd_IndexedMapOfInteger.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger
-#define TCollection_IndexedDataMapNode_hxx <NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger
-#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_Type_()
-#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfIndexedMapOfInteger
-#define TCollection_IndexedDataMap_hxx <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
-
-#include <TCollection_IndexedDataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_hxx
-#undef Handle_TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_Type_
-#undef TCollection_IndexedDataMap
-#undef TCollection_IndexedDataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TColStd_IndexedMapOfInteger_HeaderFile
-#include <TColStd_IndexedMapOfInteger.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile
-#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
-#endif
-//NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger",
- sizeof(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger))) {
- _anOtherObject = Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)((Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::DynamicType() const
-{
- return STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) ;
-}
-//Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger() {}
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem TColStd_IndexedMapOfInteger
-#define TheItem_hxx <TColStd_IndexedMapOfInteger.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger
-#define TCollection_IndexedDataMapNode_hxx <NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger
-#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_Type_()
-#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfIndexedMapOfInteger
-#define TCollection_IndexedDataMap_hxx <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
-#include <TCollection_IndexedDataMapNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
-#define _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
-#include <Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _TopTools_IndexedMapOfShape_HeaderFile
-#include <TopTools_IndexedMapOfShape.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-class TopoDS_Shape;
-class TopTools_IndexedMapOfShape;
-class TopTools_ShapeMapHasher;
-class NMTTools_IndexedDataMapOfShapeIndexedMapOfShape;
-
-
-
-class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape(const TopoDS_Shape& K1,const Standard_Integer K2,const TopTools_IndexedMapOfShape& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
-
- TopoDS_Shape& Key1() const;
-
- Standard_Integer& Key2() const;
-
- TCollection_MapNodePtr& Next2() const;
-
- TopTools_IndexedMapOfShape& Value() const;
-//Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-TopoDS_Shape myKey1;
-Standard_Integer myKey2;
-TopTools_IndexedMapOfShape myValue;
-TCollection_MapNodePtr myNext2;
-
-
-};
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem TopTools_IndexedMapOfShape
-#define TheItem_hxx <TopTools_IndexedMapOfShape.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape
-#define TCollection_IndexedDataMapNode_hxx <NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape
-#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_Type_()
-#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapeIndexedMapOfShape
-#define TCollection_IndexedDataMap_hxx <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
-
-#include <TCollection_IndexedDataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_hxx
-#undef Handle_TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_Type_
-#undef TCollection_IndexedDataMap
-#undef TCollection_IndexedDataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopTools_IndexedMapOfShape_HeaderFile
-#include <TopTools_IndexedMapOfShape.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
-#include <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#endif
-//NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape",
- sizeof(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape))) {
- _anOtherObject = Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)((Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::DynamicType() const
-{
- return STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) ;
-}
-//Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape() {}
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem TopTools_IndexedMapOfShape
-#define TheItem_hxx <TopTools_IndexedMapOfShape.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape
-#define TCollection_IndexedDataMapNode_hxx <NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape
-#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_Type_()
-#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapeIndexedMapOfShape
-#define TCollection_IndexedDataMap_hxx <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#include <TCollection_IndexedDataMapNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile
-#define _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile
-#include <Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _BOPTools_PaveBlock_HeaderFile
-#include <BOPTools_PaveBlock.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-class TopoDS_Shape;
-class BOPTools_PaveBlock;
-class TopTools_ShapeMapHasher;
-class NMTTools_IndexedDataMapOfShapePaveBlock;
-
-
-
-class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock(const TopoDS_Shape& K1,const Standard_Integer K2,const BOPTools_PaveBlock& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
-
- TopoDS_Shape& Key1() const;
-
- Standard_Integer& Key2() const;
-
- TCollection_MapNodePtr& Next2() const;
-
- BOPTools_PaveBlock& Value() const;
-//Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-TopoDS_Shape myKey1;
-Standard_Integer myKey2;
-BOPTools_PaveBlock myValue;
-TCollection_MapNodePtr myNext2;
-
-
-};
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem BOPTools_PaveBlock
-#define TheItem_hxx <BOPTools_PaveBlock.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock
-#define TCollection_IndexedDataMapNode_hxx <NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock
-#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_Type_()
-#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapePaveBlock
-#define TCollection_IndexedDataMap_hxx <NMTTools_IndexedDataMapOfShapePaveBlock.hxx>
-
-#include <TCollection_IndexedDataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_hxx
-#undef Handle_TCollection_IndexedDataMapNode
-#undef TCollection_IndexedDataMapNode_Type_
-#undef TCollection_IndexedDataMap
-#undef TCollection_IndexedDataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _BOPTools_PaveBlock_HeaderFile
-#include <BOPTools_PaveBlock.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile
-#include <NMTTools_IndexedDataMapOfShapePaveBlock.hxx>
-#endif
-//NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock",
- sizeof(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock))) {
- _anOtherObject = Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)((Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::DynamicType() const
-{
- return STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) ;
-}
-//Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock() {}
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem BOPTools_PaveBlock
-#define TheItem_hxx <BOPTools_PaveBlock.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock
-#define TCollection_IndexedDataMapNode_hxx <NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock
-#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_Type_()
-#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapePaveBlock
-#define TCollection_IndexedDataMap_hxx <NMTTools_IndexedDataMapOfShapePaveBlock.hxx>
-#include <TCollection_IndexedDataMapNode.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx
+// Created: Mon Feb 20 09:20:07 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile
-#define _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile
-#include <Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_OutOfRange;
-class Standard_NoSuchObject;
-class TColStd_IndexedMapOfInteger;
-class TColStd_MapIntegerHasher;
-class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class NMTTools_IndexedDataMapOfIndexedMapOfInteger : public TCollection_BasicMap {
-
-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 NMTTools_IndexedDataMapOfIndexedMapOfInteger(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT NMTTools_IndexedDataMapOfIndexedMapOfInteger& Assign(const NMTTools_IndexedDataMapOfIndexedMapOfInteger& Other) ;
- NMTTools_IndexedDataMapOfIndexedMapOfInteger& operator =(const NMTTools_IndexedDataMapOfIndexedMapOfInteger& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~NMTTools_IndexedDataMapOfIndexedMapOfInteger()
-{
- Clear();
-}
-
-
-
-Standard_EXPORT Standard_Integer Add(const Standard_Integer& K,const TColStd_IndexedMapOfInteger& I) ;
-
-
-Standard_EXPORT void Substitute(const Standard_Integer I,const Standard_Integer& K,const TColStd_IndexedMapOfInteger& T) ;
-
-
-Standard_EXPORT void RemoveLast() ;
+#ifndef NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile
+#define NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile
-Standard_EXPORT Standard_Boolean Contains(const Standard_Integer& K) const;
-
-
-Standard_EXPORT const Standard_Integer& FindKey(const Standard_Integer I) const;
-
-
-Standard_EXPORT const TColStd_IndexedMapOfInteger& FindFromIndex(const Standard_Integer I) const;
- const TColStd_IndexedMapOfInteger& operator ()(const Standard_Integer I) const
-{
- return FindFromIndex(I);
-}
-
-
-
-Standard_EXPORT TColStd_IndexedMapOfInteger& ChangeFromIndex(const Standard_Integer I) ;
- TColStd_IndexedMapOfInteger& operator ()(const Standard_Integer I)
-{
- return ChangeFromIndex(I);
-}
-
-
-
-Standard_EXPORT Standard_Integer FindIndex(const Standard_Integer& K) const;
-
-
-Standard_EXPORT const TColStd_IndexedMapOfInteger& FindFromKey(const Standard_Integer& K) const;
-
-
-Standard_EXPORT TColStd_IndexedMapOfInteger& ChangeFromKey(const Standard_Integer& K) ;
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address FindFromKey1 (const Standard_Integer& K) const;
- Standard_EXPORT Standard_Address ChangeFromKey1 (const Standard_Integer& K);
-#endif
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT NMTTools_IndexedDataMapOfIndexedMapOfInteger(const NMTTools_IndexedDataMapOfIndexedMapOfInteger& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
+#include <Standard_Integer.hxx>
+#include <TColStd_MapIntegerHasher.hxx>
+#include <TColStd_IndexedMapOfInteger.hxx>
+#define _NCollection_MapHasher
+#include <NCollection_IndexedDataMap.hxx>
+typedef NCollection_IndexedDataMap <Standard_Integer, TColStd_IndexedMapOfInteger, TColStd_MapIntegerHasher> NMTTools_IndexedDataMapOfIndexedMapOfInteger;
+#undef _NCollection_MapHasher
-// other Inline functions and methods (like "C++: function call" methods)
-//
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TColStd_IndexedMapOfInteger_HeaderFile
-#include <TColStd_IndexedMapOfInteger.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile
-#include <NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx>
-#endif
-
-
-#define TheKey Standard_Integer
-#define TheKey_hxx <Standard_Integer.hxx>
-#define TheItem TColStd_IndexedMapOfInteger
-#define TheItem_hxx <TColStd_IndexedMapOfInteger.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger
-#define TCollection_IndexedDataMapNode_hxx <NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger
-#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_Type_()
-#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfIndexedMapOfInteger
-#define TCollection_IndexedDataMap_hxx <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
-#include <TCollection_IndexedDataMap.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx
+// Created: Mon Feb 20 09:20:07 2012
+// Author:
+// <pkv@BDEURI37616>
+// File: NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx
+// Created: Mon Feb 20 11:59:23 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
-#define _NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
-#include <Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_OutOfRange;
-class Standard_NoSuchObject;
-class TopoDS_Shape;
-class TopTools_IndexedMapOfShape;
-class TopTools_ShapeMapHasher;
-class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class NMTTools_IndexedDataMapOfShapeIndexedMapOfShape : public TCollection_BasicMap {
-
-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 NMTTools_IndexedDataMapOfShapeIndexedMapOfShape(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Assign(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Other) ;
- NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& operator =(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~NMTTools_IndexedDataMapOfShapeIndexedMapOfShape()
-{
- Clear();
-}
-
-
-
-Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const TopTools_IndexedMapOfShape& I) ;
-
-
-Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const TopTools_IndexedMapOfShape& T) ;
-
-
-Standard_EXPORT void RemoveLast() ;
+#ifndef NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
+#define NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
-Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const;
+#include <TopoDS_Shape.hxx>
+#include <TopTools_ShapeMapHasher.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
-Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const;
+#define _NCollection_MapHasher
+#include <NCollection_IndexedDataMap.hxx>
-Standard_EXPORT const TopTools_IndexedMapOfShape& FindFromIndex(const Standard_Integer I) const;
- const TopTools_IndexedMapOfShape& operator ()(const Standard_Integer I) const
-{
- return FindFromIndex(I);
-}
+typedef NCollection_IndexedDataMap <TopoDS_Shape, TopTools_IndexedMapOfShape, TopTools_ShapeMapHasher> NMTTools_IndexedDataMapOfShapeIndexedMapOfShape;
+#undef _NCollection_MapHasher
-Standard_EXPORT TopTools_IndexedMapOfShape& ChangeFromIndex(const Standard_Integer I) ;
- TopTools_IndexedMapOfShape& operator ()(const Standard_Integer I)
-{
- return ChangeFromIndex(I);
-}
-
-
-
-Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const;
-
-
-Standard_EXPORT const TopTools_IndexedMapOfShape& FindFromKey(const TopoDS_Shape& K) const;
-
-
-Standard_EXPORT TopTools_IndexedMapOfShape& ChangeFromKey(const TopoDS_Shape& K) ;
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const;
- Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K);
#endif
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT NMTTools_IndexedDataMapOfShapeIndexedMapOfShape(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _TopTools_IndexedMapOfShape_HeaderFile
-#include <TopTools_IndexedMapOfShape.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
-#include <NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#endif
-
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem TopTools_IndexedMapOfShape
-#define TheItem_hxx <TopTools_IndexedMapOfShape.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape
-#define TCollection_IndexedDataMapNode_hxx <NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape
-#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_Type_()
-#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapeIndexedMapOfShape
-#define TCollection_IndexedDataMap_hxx <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#include <TCollection_IndexedDataMap.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
-#ifndef _NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile
-#define _NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile
-#include <Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-
-class Standard_DomainError;
-class Standard_OutOfRange;
-class Standard_NoSuchObject;
-class TopoDS_Shape;
-class BOPTools_PaveBlock;
-class TopTools_ShapeMapHasher;
-class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock;
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-class NMTTools_IndexedDataMapOfShapePaveBlock : public TCollection_BasicMap {
-
-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 NMTTools_IndexedDataMapOfShapePaveBlock(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT NMTTools_IndexedDataMapOfShapePaveBlock& Assign(const NMTTools_IndexedDataMapOfShapePaveBlock& Other) ;
- NMTTools_IndexedDataMapOfShapePaveBlock& operator =(const NMTTools_IndexedDataMapOfShapePaveBlock& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~NMTTools_IndexedDataMapOfShapePaveBlock()
-{
- Clear();
-}
-
-
-
-Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const BOPTools_PaveBlock& I) ;
-
-
-Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const BOPTools_PaveBlock& T) ;
-
-
-Standard_EXPORT void RemoveLast() ;
+// File: NMTTools_IndexedDataMapOfShapePaveBlock.hxx
+// Created: Mon Feb 20 11:55:34 2012
+// Author:
+// <pkv@BDEURI37616>
-Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const;
+#ifndef NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile
+#define NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile
+#include <TopoDS_Shape.hxx>
+#include <TopTools_ShapeMapHasher.hxx>
+#include <BOPTools_PaveBlock.hxx>
-Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const;
+#define _NCollection_MapHasher
+#include <NCollection_IndexedDataMap.hxx>
+typedef NCollection_IndexedDataMap <TopoDS_Shape, BOPTools_PaveBlock, TopTools_ShapeMapHasher> NMTTools_IndexedDataMapOfShapePaveBlock;
-Standard_EXPORT const BOPTools_PaveBlock& FindFromIndex(const Standard_Integer I) const;
- const BOPTools_PaveBlock& operator ()(const Standard_Integer I) const
-{
- return FindFromIndex(I);
-}
-
-
-
-Standard_EXPORT BOPTools_PaveBlock& ChangeFromIndex(const Standard_Integer I) ;
- BOPTools_PaveBlock& operator ()(const Standard_Integer I)
-{
- return ChangeFromIndex(I);
-}
-
-
-
-Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const;
-
-
-Standard_EXPORT const BOPTools_PaveBlock& FindFromKey(const TopoDS_Shape& K) const;
-
-
-Standard_EXPORT BOPTools_PaveBlock& ChangeFromKey(const TopoDS_Shape& K) ;
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
- Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const;
- Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K);
-#endif
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT NMTTools_IndexedDataMapOfShapePaveBlock(const NMTTools_IndexedDataMapOfShapePaveBlock& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
+#undef _NCollection_MapHasher
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_IndexedDataMapOfShapePaveBlock.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _BOPTools_PaveBlock_HeaderFile
-#include <BOPTools_PaveBlock.hxx>
-#endif
-#ifndef _TopTools_ShapeMapHasher_HeaderFile
-#include <TopTools_ShapeMapHasher.hxx>
-#endif
-#ifndef _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile
-#include <NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx>
-#endif
-
-
-#define TheKey TopoDS_Shape
-#define TheKey_hxx <TopoDS_Shape.hxx>
-#define TheItem BOPTools_PaveBlock
-#define TheItem_hxx <BOPTools_PaveBlock.hxx>
-#define Hasher TopTools_ShapeMapHasher
-#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
-#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock
-#define TCollection_IndexedDataMapNode_hxx <NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx>
-#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock
-#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_Type_()
-#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapePaveBlock
-#define TCollection_IndexedDataMap_hxx <NMTTools_IndexedDataMapOfShapePaveBlock.hxx>
-#include <TCollection_IndexedDataMap.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_ListIteratorOfListOfCommonBlock.hxx
+// Created: Mon Feb 20 11:25:23 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTTools_ListIteratorOfListOfCommonBlock_HeaderFile
-#define _NMTTools_ListIteratorOfListOfCommonBlock_HeaderFile
-
-#ifndef _Standard_Address_HeaderFile
-#include <Standard_Address.hxx>
-#endif
-#ifndef _Handle_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile
-#include <Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_NoMoreObject;
-class Standard_NoSuchObject;
-class NMTTools_ListOfCommonBlock;
-class NMTTools_CommonBlock;
-class NMTTools_ListNodeOfListOfCommonBlock;
-
+#ifndef NMTDS_ListIteratorOfListOfCommonBlock_HeaderFile
+#define NMTDS_ListIteratorOfListOfCommonBlock_HeaderFile
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
+#ifndef NMTTools_ListOfCommonBlock_HeaderFile
+#include <NMTTools_ListOfCommonBlock.hxx>
#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTTools_ListIteratorOfListOfCommonBlock {
-
-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 NMTTools_ListIteratorOfListOfCommonBlock();
-
-
-Standard_EXPORT NMTTools_ListIteratorOfListOfCommonBlock(const NMTTools_ListOfCommonBlock& L);
-
-
-Standard_EXPORT void Initialize(const NMTTools_ListOfCommonBlock& L) ;
-
- Standard_Boolean More() const;
-
-
-Standard_EXPORT void Next() ;
-
-
-Standard_EXPORT NMTTools_CommonBlock& Value() const;
-
-
-friend class NMTTools_ListOfCommonBlock;
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Address current;
-Standard_Address previous;
-
-
-};
-
-#define Item NMTTools_CommonBlock
-#define Item_hxx <NMTTools_CommonBlock.hxx>
-#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock
-#define TCollection_ListNode_hxx <NMTTools_ListNodeOfListOfCommonBlock.hxx>
-#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock
-#define TCollection_ListIterator_hxx <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock
-#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_()
-#define TCollection_List NMTTools_ListOfCommonBlock
-#define TCollection_List_hxx <NMTTools_ListOfCommonBlock.hxx>
-
-#include <TCollection_ListIterator.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-
-#ifndef _Standard_NoMoreObject_HeaderFile
-#include <Standard_NoMoreObject.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _NMTTools_ListOfCommonBlock_HeaderFile
-#include <NMTTools_ListOfCommonBlock.hxx>
-#endif
-#ifndef _NMTTools_CommonBlock_HeaderFile
-#include <NMTTools_CommonBlock.hxx>
-#endif
-#ifndef _NMTTools_ListNodeOfListOfCommonBlock_HeaderFile
-#include <NMTTools_ListNodeOfListOfCommonBlock.hxx>
-#endif
-
-
-#define Item NMTTools_CommonBlock
-#define Item_hxx <NMTTools_CommonBlock.hxx>
-#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock
-#define TCollection_ListNode_hxx <NMTTools_ListNodeOfListOfCommonBlock.hxx>
-#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock
-#define TCollection_ListIterator_hxx <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock
-#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_()
-#define TCollection_List NMTTools_ListOfCommonBlock
-#define TCollection_List_hxx <NMTTools_ListOfCommonBlock.hxx>
-#include <TCollection_ListIterator.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTDS_ListIteratorOfListOfCoupleOfShape.hxx
+// Created: Mon Feb 20 11:25:23 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTTools_ListIteratorOfListOfCoupleOfShape_HeaderFile
-#define _NMTTools_ListIteratorOfListOfCoupleOfShape_HeaderFile
-
-#ifndef _Standard_Address_HeaderFile
-#include <Standard_Address.hxx>
-#endif
-#ifndef _Handle_NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile
-#include <Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_NoMoreObject;
-class Standard_NoSuchObject;
-class NMTTools_ListOfCoupleOfShape;
-class NMTTools_CoupleOfShape;
-class NMTTools_ListNodeOfListOfCoupleOfShape;
-
+#ifndef NMTDS_ListIteratorOfListOfCoupleOfShape_HeaderFile
+#define NMTDS_ListIteratorOfListOfCoupleOfShape_HeaderFile
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
+#ifndef NMTTools_ListOfCoupleOfShape_HeaderFile
+#include <NMTTools_ListOfCoupleOfShape.hxx>
#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTTools_ListIteratorOfListOfCoupleOfShape {
-
-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 NMTTools_ListIteratorOfListOfCoupleOfShape();
-
-
-Standard_EXPORT NMTTools_ListIteratorOfListOfCoupleOfShape(const NMTTools_ListOfCoupleOfShape& L);
-
-
-Standard_EXPORT void Initialize(const NMTTools_ListOfCoupleOfShape& L) ;
-
- Standard_Boolean More() const;
-
-
-Standard_EXPORT void Next() ;
-
-
-Standard_EXPORT NMTTools_CoupleOfShape& Value() const;
-
-
-friend class NMTTools_ListOfCoupleOfShape;
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Address current;
-Standard_Address previous;
-
-
-};
-
-#define Item NMTTools_CoupleOfShape
-#define Item_hxx <NMTTools_CoupleOfShape.hxx>
-#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape
-#define TCollection_ListNode_hxx <NMTTools_ListNodeOfListOfCoupleOfShape.hxx>
-#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape
-#define TCollection_ListIterator_hxx <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape
-#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_()
-#define TCollection_List NMTTools_ListOfCoupleOfShape
-#define TCollection_List_hxx <NMTTools_ListOfCoupleOfShape.hxx>
-
-#include <TCollection_ListIterator.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-
-#ifndef _Standard_NoMoreObject_HeaderFile
-#include <Standard_NoMoreObject.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _NMTTools_ListOfCoupleOfShape_HeaderFile
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#endif
-#ifndef _NMTTools_CoupleOfShape_HeaderFile
-#include <NMTTools_CoupleOfShape.hxx>
-#endif
-#ifndef _NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile
-#include <NMTTools_ListNodeOfListOfCoupleOfShape.hxx>
-#endif
-
-
-#define Item NMTTools_CoupleOfShape
-#define Item_hxx <NMTTools_CoupleOfShape.hxx>
-#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape
-#define TCollection_ListNode_hxx <NMTTools_ListNodeOfListOfCoupleOfShape.hxx>
-#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape
-#define TCollection_ListIterator_hxx <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape
-#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_()
-#define TCollection_List NMTTools_ListOfCoupleOfShape
-#define TCollection_List_hxx <NMTTools_ListOfCoupleOfShape.hxx>
-#include <TCollection_ListIterator.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTTools_ListNodeOfListOfCommonBlock_HeaderFile
-#define _NMTTools_ListNodeOfListOfCommonBlock_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile
-#include <Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx>
-#endif
-
-#ifndef _NMTTools_CommonBlock_HeaderFile
-#include <NMTTools_CommonBlock.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-class NMTTools_CommonBlock;
-class NMTTools_ListOfCommonBlock;
-class NMTTools_ListIteratorOfListOfCommonBlock;
-
-
-
-class NMTTools_ListNodeOfListOfCommonBlock : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTTools_ListNodeOfListOfCommonBlock(const NMTTools_CommonBlock& I,const TCollection_MapNodePtr& n);
-
- NMTTools_CommonBlock& Value() const;
-//Standard_EXPORT ~NMTTools_ListNodeOfListOfCommonBlock();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-NMTTools_CommonBlock myValue;
-
-
-};
-
-#define Item NMTTools_CommonBlock
-#define Item_hxx <NMTTools_CommonBlock.hxx>
-#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock
-#define TCollection_ListNode_hxx <NMTTools_ListNodeOfListOfCommonBlock.hxx>
-#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock
-#define TCollection_ListIterator_hxx <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock
-#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_()
-#define TCollection_List NMTTools_ListOfCommonBlock
-#define TCollection_List_hxx <NMTTools_ListOfCommonBlock.hxx>
-
-#include <TCollection_ListNode.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_ListNodeOfListOfCommonBlock.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _NMTTools_CommonBlock_HeaderFile
-#include <NMTTools_CommonBlock.hxx>
-#endif
-#ifndef _NMTTools_ListOfCommonBlock_HeaderFile
-#include <NMTTools_ListOfCommonBlock.hxx>
-#endif
-#ifndef _NMTTools_ListIteratorOfListOfCommonBlock_HeaderFile
-#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-#endif
-//NMTTools_ListNodeOfListOfCommonBlock::~NMTTools_ListNodeOfListOfCommonBlock() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTTools_ListNodeOfListOfCommonBlock_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTTools_ListNodeOfListOfCommonBlock",
- sizeof(NMTTools_ListNodeOfListOfCommonBlock),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTTools_ListNodeOfListOfCommonBlock) Handle(NMTTools_ListNodeOfListOfCommonBlock)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTTools_ListNodeOfListOfCommonBlock) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTTools_ListNodeOfListOfCommonBlock))) {
- _anOtherObject = Handle(NMTTools_ListNodeOfListOfCommonBlock)((Handle(NMTTools_ListNodeOfListOfCommonBlock)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTTools_ListNodeOfListOfCommonBlock::DynamicType() const
-{
- return STANDARD_TYPE(NMTTools_ListNodeOfListOfCommonBlock) ;
-}
-//Standard_Boolean NMTTools_ListNodeOfListOfCommonBlock::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTTools_ListNodeOfListOfCommonBlock) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTTools_ListNodeOfListOfCommonBlock::~Handle_NMTTools_ListNodeOfListOfCommonBlock() {}
-#define Item NMTTools_CommonBlock
-#define Item_hxx <NMTTools_CommonBlock.hxx>
-#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock
-#define TCollection_ListNode_hxx <NMTTools_ListNodeOfListOfCommonBlock.hxx>
-#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock
-#define TCollection_ListIterator_hxx <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock
-#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_()
-#define TCollection_List NMTTools_ListOfCommonBlock
-#define TCollection_List_hxx <NMTTools_ListOfCommonBlock.hxx>
-#include <TCollection_ListNode.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile
-#define _NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile
-#include <Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx>
-#endif
-
-#ifndef _NMTTools_CoupleOfShape_HeaderFile
-#include <NMTTools_CoupleOfShape.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-class NMTTools_CoupleOfShape;
-class NMTTools_ListOfCoupleOfShape;
-class NMTTools_ListIteratorOfListOfCoupleOfShape;
-
-
-
-class NMTTools_ListNodeOfListOfCoupleOfShape : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTTools_ListNodeOfListOfCoupleOfShape(const NMTTools_CoupleOfShape& I,const TCollection_MapNodePtr& n);
-
- NMTTools_CoupleOfShape& Value() const;
-//Standard_EXPORT ~NMTTools_ListNodeOfListOfCoupleOfShape();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-NMTTools_CoupleOfShape myValue;
-
-
-};
-
-#define Item NMTTools_CoupleOfShape
-#define Item_hxx <NMTTools_CoupleOfShape.hxx>
-#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape
-#define TCollection_ListNode_hxx <NMTTools_ListNodeOfListOfCoupleOfShape.hxx>
-#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape
-#define TCollection_ListIterator_hxx <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape
-#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_()
-#define TCollection_List NMTTools_ListOfCoupleOfShape
-#define TCollection_List_hxx <NMTTools_ListOfCoupleOfShape.hxx>
-
-#include <TCollection_ListNode.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_ListNodeOfListOfCoupleOfShape.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _NMTTools_CoupleOfShape_HeaderFile
-#include <NMTTools_CoupleOfShape.hxx>
-#endif
-#ifndef _NMTTools_ListOfCoupleOfShape_HeaderFile
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#endif
-#ifndef _NMTTools_ListIteratorOfListOfCoupleOfShape_HeaderFile
-#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-#endif
-//NMTTools_ListNodeOfListOfCoupleOfShape::~NMTTools_ListNodeOfListOfCoupleOfShape() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTTools_ListNodeOfListOfCoupleOfShape_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTTools_ListNodeOfListOfCoupleOfShape",
- sizeof(NMTTools_ListNodeOfListOfCoupleOfShape),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTTools_ListNodeOfListOfCoupleOfShape) Handle(NMTTools_ListNodeOfListOfCoupleOfShape)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTTools_ListNodeOfListOfCoupleOfShape) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTTools_ListNodeOfListOfCoupleOfShape))) {
- _anOtherObject = Handle(NMTTools_ListNodeOfListOfCoupleOfShape)((Handle(NMTTools_ListNodeOfListOfCoupleOfShape)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTTools_ListNodeOfListOfCoupleOfShape::DynamicType() const
-{
- return STANDARD_TYPE(NMTTools_ListNodeOfListOfCoupleOfShape) ;
-}
-//Standard_Boolean NMTTools_ListNodeOfListOfCoupleOfShape::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTTools_ListNodeOfListOfCoupleOfShape) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTTools_ListNodeOfListOfCoupleOfShape::~Handle_NMTTools_ListNodeOfListOfCoupleOfShape() {}
-#define Item NMTTools_CoupleOfShape
-#define Item_hxx <NMTTools_CoupleOfShape.hxx>
-#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape
-#define TCollection_ListNode_hxx <NMTTools_ListNodeOfListOfCoupleOfShape.hxx>
-#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape
-#define TCollection_ListIterator_hxx <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape
-#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_()
-#define TCollection_List NMTTools_ListOfCoupleOfShape
-#define TCollection_List_hxx <NMTTools_ListOfCoupleOfShape.hxx>
-#include <TCollection_ListNode.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_ListOfCommonBlock.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTTools_ListOfCommonBlock_HeaderFile
-#define _NMTTools_ListOfCommonBlock_HeaderFile
-
-#ifndef _Standard_Address_HeaderFile
-#include <Standard_Address.hxx>
-#endif
-#ifndef _Handle_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile
-#include <Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_NoSuchObject;
-class NMTTools_ListIteratorOfListOfCommonBlock;
-class NMTTools_CommonBlock;
-class NMTTools_ListNodeOfListOfCommonBlock;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTTools_ListOfCommonBlock {
-
-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 NMTTools_ListOfCommonBlock();
-
-
-Standard_EXPORT void Assign(const NMTTools_ListOfCommonBlock& Other) ;
- void operator=(const NMTTools_ListOfCommonBlock& Other)
-{
- Assign(Other);
-}
-
-
-
-Standard_EXPORT Standard_Integer Extent() const;
-
-
-Standard_EXPORT void Clear() ;
-~NMTTools_ListOfCommonBlock()
-{
- Clear();
-}
-
-
- Standard_Boolean IsEmpty() const;
-
-
-Standard_EXPORT void Prepend(const NMTTools_CommonBlock& I) ;
-
-
-Standard_EXPORT void Prepend(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& theIt) ;
-
-
-Standard_EXPORT void Prepend(NMTTools_ListOfCommonBlock& Other) ;
-
-
-Standard_EXPORT void Append(const NMTTools_CommonBlock& I) ;
-
-
-Standard_EXPORT void Append(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& theIt) ;
-
-
-Standard_EXPORT void Append(NMTTools_ListOfCommonBlock& Other) ;
-
+#ifndef NMTTools_ListOfCommonBlock_HeaderFile
+#define NMTTools_ListOfCommonBlock_HeaderFile
-Standard_EXPORT NMTTools_CommonBlock& First() const;
-
-
-Standard_EXPORT NMTTools_CommonBlock& Last() const;
-
-
-Standard_EXPORT void RemoveFirst() ;
-
-
-Standard_EXPORT void Remove(NMTTools_ListIteratorOfListOfCommonBlock& It) ;
-
-
-Standard_EXPORT void InsertBefore(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& It) ;
-
-
-Standard_EXPORT void InsertBefore(NMTTools_ListOfCommonBlock& Other,NMTTools_ListIteratorOfListOfCommonBlock& It) ;
-
-
-Standard_EXPORT void InsertAfter(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& It) ;
-
-
-Standard_EXPORT void InsertAfter(NMTTools_ListOfCommonBlock& Other,NMTTools_ListIteratorOfListOfCommonBlock& It) ;
-
-
-friend class NMTTools_ListIteratorOfListOfCommonBlock;
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT NMTTools_ListOfCommonBlock(const NMTTools_ListOfCommonBlock& Other);
-
-
- // Fields PRIVATE
- //
-Standard_Address myFirst;
-Standard_Address myLast;
-
-
-};
-
-#define Item NMTTools_CommonBlock
-#define Item_hxx <NMTTools_CommonBlock.hxx>
-#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock
-#define TCollection_ListNode_hxx <NMTTools_ListNodeOfListOfCommonBlock.hxx>
-#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock
-#define TCollection_ListIterator_hxx <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock
-#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_()
-#define TCollection_List NMTTools_ListOfCommonBlock
-#define TCollection_List_hxx <NMTTools_ListOfCommonBlock.hxx>
-
-#include <TCollection_List.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
+#include <NCollection_List.hxx>
+#include <NMTTools_CommonBlock.hxx>
+typedef NCollection_List <NMTTools_CommonBlock> NMTTools_ListOfCommonBlock;
+typedef NMTTools_ListOfCommonBlock::Iterator NMTTools_ListIteratorOfListOfCommonBlock;
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_ListOfCommonBlock.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _NMTTools_ListIteratorOfListOfCommonBlock_HeaderFile
-#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-#endif
-#ifndef _NMTTools_CommonBlock_HeaderFile
-#include <NMTTools_CommonBlock.hxx>
-#endif
-#ifndef _NMTTools_ListNodeOfListOfCommonBlock_HeaderFile
-#include <NMTTools_ListNodeOfListOfCommonBlock.hxx>
-#endif
-
-
-#define Item NMTTools_CommonBlock
-#define Item_hxx <NMTTools_CommonBlock.hxx>
-#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock
-#define TCollection_ListNode_hxx <NMTTools_ListNodeOfListOfCommonBlock.hxx>
-#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock
-#define TCollection_ListIterator_hxx <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock
-#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_()
-#define TCollection_List NMTTools_ListOfCommonBlock
-#define TCollection_List_hxx <NMTTools_ListOfCommonBlock.hxx>
-#include <TCollection_List.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_ListOfCoupleOfShape.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTTools_ListOfCoupleOfShape_HeaderFile
-#define _NMTTools_ListOfCoupleOfShape_HeaderFile
-
-#ifndef _Standard_Address_HeaderFile
-#include <Standard_Address.hxx>
-#endif
-#ifndef _Handle_NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile
-#include <Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_NoSuchObject;
-class NMTTools_ListIteratorOfListOfCoupleOfShape;
-class NMTTools_CoupleOfShape;
-class NMTTools_ListNodeOfListOfCoupleOfShape;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTTools_ListOfCoupleOfShape {
-
-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 NMTTools_ListOfCoupleOfShape();
-
-
-Standard_EXPORT void Assign(const NMTTools_ListOfCoupleOfShape& Other) ;
- void operator=(const NMTTools_ListOfCoupleOfShape& Other)
-{
- Assign(Other);
-}
-
-
-
-Standard_EXPORT Standard_Integer Extent() const;
-
-
-Standard_EXPORT void Clear() ;
-~NMTTools_ListOfCoupleOfShape()
-{
- Clear();
-}
-
-
- Standard_Boolean IsEmpty() const;
-
-
-Standard_EXPORT void Prepend(const NMTTools_CoupleOfShape& I) ;
-
-
-Standard_EXPORT void Prepend(const NMTTools_CoupleOfShape& I,NMTTools_ListIteratorOfListOfCoupleOfShape& theIt) ;
-
-
-Standard_EXPORT void Prepend(NMTTools_ListOfCoupleOfShape& Other) ;
-
-
-Standard_EXPORT void Append(const NMTTools_CoupleOfShape& I) ;
-
-
-Standard_EXPORT void Append(const NMTTools_CoupleOfShape& I,NMTTools_ListIteratorOfListOfCoupleOfShape& theIt) ;
-
-
-Standard_EXPORT void Append(NMTTools_ListOfCoupleOfShape& Other) ;
-
+#ifndef NMTTools_ListOfCoupleOfShape_HeaderFile
+#define NMTTools_ListOfCoupleOfShape_HeaderFile
-Standard_EXPORT NMTTools_CoupleOfShape& First() const;
-
-
-Standard_EXPORT NMTTools_CoupleOfShape& Last() const;
-
-
-Standard_EXPORT void RemoveFirst() ;
-
-
-Standard_EXPORT void Remove(NMTTools_ListIteratorOfListOfCoupleOfShape& It) ;
-
-
-Standard_EXPORT void InsertBefore(const NMTTools_CoupleOfShape& I,NMTTools_ListIteratorOfListOfCoupleOfShape& It) ;
-
-
-Standard_EXPORT void InsertBefore(NMTTools_ListOfCoupleOfShape& Other,NMTTools_ListIteratorOfListOfCoupleOfShape& It) ;
-
-
-Standard_EXPORT void InsertAfter(const NMTTools_CoupleOfShape& I,NMTTools_ListIteratorOfListOfCoupleOfShape& It) ;
-
-
-Standard_EXPORT void InsertAfter(NMTTools_ListOfCoupleOfShape& Other,NMTTools_ListIteratorOfListOfCoupleOfShape& It) ;
-
-
-friend class NMTTools_ListIteratorOfListOfCoupleOfShape;
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT NMTTools_ListOfCoupleOfShape(const NMTTools_ListOfCoupleOfShape& Other);
-
-
- // Fields PRIVATE
- //
-Standard_Address myFirst;
-Standard_Address myLast;
-
-
-};
-
-#define Item NMTTools_CoupleOfShape
-#define Item_hxx <NMTTools_CoupleOfShape.hxx>
-#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape
-#define TCollection_ListNode_hxx <NMTTools_ListNodeOfListOfCoupleOfShape.hxx>
-#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape
-#define TCollection_ListIterator_hxx <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape
-#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_()
-#define TCollection_List NMTTools_ListOfCoupleOfShape
-#define TCollection_List_hxx <NMTTools_ListOfCoupleOfShape.hxx>
-
-#include <TCollection_List.lxx>
-
-#undef Item
-#undef Item_hxx
-#undef TCollection_ListNode
-#undef TCollection_ListNode_hxx
-#undef TCollection_ListIterator
-#undef TCollection_ListIterator_hxx
-#undef Handle_TCollection_ListNode
-#undef TCollection_ListNode_Type_
-#undef TCollection_List
-#undef TCollection_List_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
+#include <NCollection_List.hxx>
+#include <NMTTools_CoupleOfShape.hxx>
+typedef NCollection_List <NMTTools_CoupleOfShape> NMTTools_ListOfCoupleOfShape;
+typedef NMTTools_ListOfCoupleOfShape::Iterator NMTTools_ListIteratorOfListOfCoupleOfShape;
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_ListOfCoupleOfShape.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _NMTTools_ListIteratorOfListOfCoupleOfShape_HeaderFile
-#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-#endif
-#ifndef _NMTTools_CoupleOfShape_HeaderFile
-#include <NMTTools_CoupleOfShape.hxx>
-#endif
-#ifndef _NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile
-#include <NMTTools_ListNodeOfListOfCoupleOfShape.hxx>
-#endif
-
-
-#define Item NMTTools_CoupleOfShape
-#define Item_hxx <NMTTools_CoupleOfShape.hxx>
-#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape
-#define TCollection_ListNode_hxx <NMTTools_ListNodeOfListOfCoupleOfShape.hxx>
-#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape
-#define TCollection_ListIterator_hxx <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape
-#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_()
-#define TCollection_List NMTTools_ListOfCoupleOfShape
-#define TCollection_List_hxx <NMTTools_ListOfCoupleOfShape.hxx>
-#include <TCollection_List.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_MapIteratorOfMapOfPaveBlock.hxx
+// Created: Mon Feb 20 11:47:30 2012
+// Author:
+// <pkv@BDEURI37616>
-#ifndef _NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile
-#define _NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile
-#ifndef _TCollection_BasicMapIterator_HeaderFile
-#include <TCollection_BasicMapIterator.hxx>
-#endif
-#ifndef _Handle_NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile
-#include <Handle_NMTTools_StdMapNodeOfMapOfPaveBlock.hxx>
-#endif
-class Standard_NoSuchObject;
-class BOPTools_PaveBlock;
-class BOPTools_PaveBlockMapHasher;
-class NMTTools_MapOfPaveBlock;
-class NMTTools_StdMapNodeOfMapOfPaveBlock;
+#ifndef NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile
+#define NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
+#ifndef NMTTools_MapOfPaveBlock_HeaderFile
+#include <NMTTools_MapOfPaveBlock.hxx>
#endif
-
-class NMTTools_MapIteratorOfMapOfPaveBlock : public TCollection_BasicMapIterator {
-
-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 NMTTools_MapIteratorOfMapOfPaveBlock();
-
-
-Standard_EXPORT NMTTools_MapIteratorOfMapOfPaveBlock(const NMTTools_MapOfPaveBlock& aMap);
-
-
-Standard_EXPORT void Initialize(const NMTTools_MapOfPaveBlock& aMap) ;
-
-
-Standard_EXPORT const BOPTools_PaveBlock& Key() const;
-
-
-
-
-
-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) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_MapIteratorOfMapOfPaveBlock.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _BOPTools_PaveBlock_HeaderFile
-#include <BOPTools_PaveBlock.hxx>
-#endif
-#ifndef _BOPTools_PaveBlockMapHasher_HeaderFile
-#include <BOPTools_PaveBlockMapHasher.hxx>
-#endif
-#ifndef _NMTTools_MapOfPaveBlock_HeaderFile
-#include <NMTTools_MapOfPaveBlock.hxx>
-#endif
-#ifndef _NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile
-#include <NMTTools_StdMapNodeOfMapOfPaveBlock.hxx>
-#endif
-
-
-#define TheKey BOPTools_PaveBlock
-#define TheKey_hxx <BOPTools_PaveBlock.hxx>
-#define Hasher BOPTools_PaveBlockMapHasher
-#define Hasher_hxx <BOPTools_PaveBlockMapHasher.hxx>
-#define TCollection_StdMapNode NMTTools_StdMapNodeOfMapOfPaveBlock
-#define TCollection_StdMapNode_hxx <NMTTools_StdMapNodeOfMapOfPaveBlock.hxx>
-#define TCollection_MapIterator NMTTools_MapIteratorOfMapOfPaveBlock
-#define TCollection_MapIterator_hxx <NMTTools_MapIteratorOfMapOfPaveBlock.hxx>
-#define Handle_TCollection_StdMapNode Handle_NMTTools_StdMapNodeOfMapOfPaveBlock
-#define TCollection_StdMapNode_Type_() NMTTools_StdMapNodeOfMapOfPaveBlock_Type_()
-#define TCollection_Map NMTTools_MapOfPaveBlock
-#define TCollection_Map_hxx <NMTTools_MapOfPaveBlock.hxx>
-#include <TCollection_MapIterator.gxx>
-
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
// 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
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#ifndef _NMTTools_MapOfPaveBlock_HeaderFile
-#define _NMTTools_MapOfPaveBlock_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Handle_NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile
-#include <Handle_NMTTools_StdMapNodeOfMapOfPaveBlock.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_DomainError;
-class BOPTools_PaveBlock;
-class BOPTools_PaveBlockMapHasher;
-class NMTTools_StdMapNodeOfMapOfPaveBlock;
-class NMTTools_MapIteratorOfMapOfPaveBlock;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-
-class NMTTools_MapOfPaveBlock : public TCollection_BasicMap {
-
-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 NMTTools_MapOfPaveBlock(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT NMTTools_MapOfPaveBlock& Assign(const NMTTools_MapOfPaveBlock& Other) ;
- NMTTools_MapOfPaveBlock& operator =(const NMTTools_MapOfPaveBlock& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~NMTTools_MapOfPaveBlock()
-{
- Clear();
-}
-
+// File: NMTTools_MapOfPaveBlock.hxx
+// Created: Mon Feb 20 08:19:07 2012
+// Author:
+// <pkv@BDEURI37616>
-Standard_EXPORT Standard_Boolean Add(const BOPTools_PaveBlock& aKey) ;
+#ifndef NMTTools_MapOfPaveBlock_HeaderFile
+#define NMTTools_MapOfPaveBlock_HeaderFile
+#include <BOPTools_PaveBlock.hxx>
+#include <BOPTools_PaveBlockMapHasher.hxx>
-Standard_EXPORT Standard_Boolean Contains(const BOPTools_PaveBlock& aKey) const;
+#define _NCollection_MapHasher
+#include <NCollection_Map.hxx>
+typedef NCollection_Map<BOPTools_PaveBlock, BOPTools_PaveBlockMapHasher> NMTTools_MapOfPaveBlock;
+typedef NMTTools_MapOfPaveBlock::Iterator NMTTools_MapIteratorOfMapOfPaveBlock;
-Standard_EXPORT Standard_Boolean Remove(const BOPTools_PaveBlock& aKey) ;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
-Standard_EXPORT NMTTools_MapOfPaveBlock(const NMTTools_MapOfPaveBlock& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
+#undef _NCollection_MapHasher
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_MapOfPaveBlock.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _BOPTools_PaveBlock_HeaderFile
-#include <BOPTools_PaveBlock.hxx>
-#endif
-#ifndef _BOPTools_PaveBlockMapHasher_HeaderFile
-#include <BOPTools_PaveBlockMapHasher.hxx>
-#endif
-#ifndef _NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile
-#include <NMTTools_StdMapNodeOfMapOfPaveBlock.hxx>
-#endif
-#ifndef _NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile
-#include <NMTTools_MapIteratorOfMapOfPaveBlock.hxx>
-#endif
-
-
-#define TheKey BOPTools_PaveBlock
-#define TheKey_hxx <BOPTools_PaveBlock.hxx>
-#define Hasher BOPTools_PaveBlockMapHasher
-#define Hasher_hxx <BOPTools_PaveBlockMapHasher.hxx>
-#define TCollection_StdMapNode NMTTools_StdMapNodeOfMapOfPaveBlock
-#define TCollection_StdMapNode_hxx <NMTTools_StdMapNodeOfMapOfPaveBlock.hxx>
-#define TCollection_MapIterator NMTTools_MapIteratorOfMapOfPaveBlock
-#define TCollection_MapIterator_hxx <NMTTools_MapIteratorOfMapOfPaveBlock.hxx>
-#define Handle_TCollection_StdMapNode Handle_NMTTools_StdMapNodeOfMapOfPaveBlock
-#define TCollection_StdMapNode_Type_() NMTTools_StdMapNodeOfMapOfPaveBlock_Type_()
-#define TCollection_Map NMTTools_MapOfPaveBlock
-#define TCollection_Map_hxx <NMTTools_MapOfPaveBlock.hxx>
-#include <TCollection_Map.gxx>
-
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_PPaveFiller.hxx
+// Created: Tue Dec 9 12:23:29 2003
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _NMTTools_PPaveFiller_HeaderFile
#define _NMTTools_PPaveFiller_HeaderFile
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTTools_PaveFiller.cdl
--- Created:
--- Author: Peter KURNEV
--- <pkv@irinox>
---
-class PaveFiller from NMTTools
-
- ---Purpose:
-
-uses
- DataMapOfIntegerInteger from TColStd,
- ListOfInteger from TColStd,
- MapOfInteger from TColStd,
-
- Pnt from gp,
- ShapeEnum from TopAbs,
- Vertex from TopoDS,
- Face from TopoDS,
- Shape from TopoDS,
- Edge from TopoDS,
- ListOfShape from TopTools,
- DataMapOfShapeShape from TopTools,
-
- Context from IntTools,
- ShrunkRange from IntTools,
-
- IndexedDataMapOfShapeInteger from BooleanOperations,
-
- PavePool from BOPTools,
- PaveBlock from BOPTools,
- ListOfPaveBlock from BOPTools,
- SplitShapesPool from BOPTools,
- Pave from BOPTools,
- PaveSet from BOPTools,
- Curve from BOPTools,
- SSInterference from BOPTools,
- IDMapOfPaveBlockIMapOfPaveBlock from BOPTools,
- IDMapOfPaveBlockIMapOfInteger from BOPTools,
- SSIntersectionAttribute from BOPTools,
-
- ShapesDataStructure from NMTDS,
- PShapesDataStructure from NMTDS,
- Iterator from NMTDS,
- PIterator from NMTDS,
- PInterfPool from NMTDS,
-
- CommonBlockPool from NMTTools,
- CommonBlock from NMTTools,
- ListOfCommonBlock from NMTTools,
- DataMapOfIntegerFaceInfo from NMTTools,
- IndexedDataMapOfIndexedMapOfInteger from NMTTools
-
---raises
-
-is
- Create
- returns PaveFiller from NMTTools;
- ---C++: alias "Standard_EXPORT virtual ~NMTTools_PaveFiller();"
-
-
-
- SetCompositeShape (me:out;
- aS: Shape from TopoDS);
-
- CompositeShape(me)
- returns Shape from TopoDS;
- ---C++: return const&
-
-
- DS(me:out)
- returns PShapesDataStructure from NMTDS;
-
- DSIt(me:out)
- returns PIterator from NMTDS;
-
- IP(me:out)
- returns PInterfPool from NMTDS;
- --
- Init (me:out)
- is virtual protected;
-
- Clear (me:out)
- is virtual protected;
-
- Perform (me:out)
- is virtual;
-
- PerformVV (me:out)
- is virtual protected;
-
- PerformVE (me:out)
- is virtual protected;
-
- PerformVF (me:out)
- is virtual protected;
-
- PerformEE (me:out)
- is virtual protected;
-
- PerformEF (me:out)
- is virtual protected;
-
- PerformFF (me:out)
- is virtual protected;
-
- MakeSplitEdges(me:out)
- is protected;
-
- PreparePaveBlocks (me:out;
- aType1: ShapeEnum from TopAbs;
- aType2: ShapeEnum from TopAbs)
- is virtual protected;
-
- CorrectShrunkRanges(me:out;
- aSide: Integer from Standard;
- aPave: Pave from BOPTools;
- aSR : out ShrunkRange from IntTools)
- is protected;
-
- PreparePaveBlocks (me:out;
- anE:Integer from Standard)
- is virtual protected;
-
-
- PrepareEdges (me:out)
- is virtual protected;
-
- --
- -- Query section
- IsDone(me)
- returns Boolean from Standard;
-
- Context(me)
- returns Context from IntTools;
- ---C++:return const &
-
- PavePool(me)
- returns PavePool from BOPTools;
- ---C++:return const &
-
- ChangePavePool(me:out)
- returns PavePool from BOPTools;
- ---C++:return &
-
- CommonBlockPool(me)
- returns CommonBlockPool from NMTTools;
- ---C++:return const &
-
- ChangeCommonBlockPool(me:out)
- returns CommonBlockPool from NMTTools;
- ---C++:return &
-
- SplitShapesPool(me)
- returns SplitShapesPool from BOPTools;
- ---C++:return const &
-
- ChangeSplitShapesPool(me:out)
- returns SplitShapesPool from BOPTools;
- ---C++:return &
-
- FindSDVertex (me;
- nV: Integer from Standard)
- returns Integer from Standard;
-
- IsSuccessorsComputed (me;
- iF1:Integer from Standard;
- iF2:Integer from Standard)
- returns Boolean from Standard
- is protected;
-
- IsBlocksCoinside (me;
- aPB1:PaveBlock from BOPTools;
- aPB2:PaveBlock from BOPTools)
- returns Boolean from Standard
- is protected;
-
- RefinePavePool(me:out)
- is protected;
-
- CheckFacePaves(me:out;
- aV : Vertex from TopoDS;
- nF: Integer from Standard)
- returns Integer from Standard
- is protected;
-
- ReplaceCommonBlocks (me:out;
- aLCB: ListOfCommonBlock from NMTTools)
- is protected;
-
- RemoveCommonBlocks (me:out;
- aLCB: ListOfCommonBlock from NMTTools)
- is protected;
-
- SplitCommonBlocks (me:out;
- aLCB: ListOfCommonBlock from NMTTools)
- is protected;
-
- SplitCommonBlock (me:out;
- aCB : CommonBlock from NMTTools;
- aLCB: out ListOfCommonBlock from NMTTools)
- is protected;
-
- EECommonBlocks(me:out;
- aM:IDMapOfPaveBlockIMapOfPaveBlock from BOPTools)
- is protected;
-
- EFCommonBlocks(me:out;
- aMapCB:IDMapOfPaveBlockIMapOfInteger from BOPTools)
- is protected;
-
- EENewVertices (me:out;
- aM:IndexedDataMapOfShapeInteger from BooleanOperations)
- is protected;
-
- EENewVertices (me:out;
- aV:Vertex from TopoDS;
- aM:IndexedDataMapOfShapeInteger from BooleanOperations)
- is protected;
-
- EFNewVertices (me:out;
- aM:IndexedDataMapOfShapeInteger from BooleanOperations)
- is protected;
-
- EFNewVertices (me:out;
- aV:Vertex from TopoDS;
- aM:IndexedDataMapOfShapeInteger from BooleanOperations)
- is protected;
-
- UpdateCommonBlocks(me:out)
- is protected;
-
- --modified by NIZNHY-PKV Mon Dec 12 09:12:15 2011f
- UpdateCommonBlocks(me:out;
- aI:Integer from Standard)
- is protected;
- --modified by NIZNHY-PKV Mon Dec 12 09:12:21 2011t
-
- UpdatePaveBlocks(me:out)
- is protected;
-
- SplitIndex(me;
- aPB:PaveBlock from BOPTools)
- returns Integer from Standard
- is protected;
-
- MakeBlocks(me:out)
- is protected;
-
- --------------------------------------------------------------
- ---
- --- Some API FUNCTIONS
- ---
- SplitsInFace(me:out;
- aBid:Integer from Standard;
- nF1 :Integer from Standard;
- nF2 :Integer from Standard;
- aLs :out ListOfInteger from TColStd)
- returns Integer from Standard;
-
- SplitsInFace(me:out;
- nE1 :Integer from Standard;
- nF2 :Integer from Standard;
- aLs :out ListOfInteger from TColStd)
- returns Integer from Standard;
-
- SplitsOnEdge(me:out;
- nE1 :Integer from Standard;
- nE2 :Integer from Standard;
- aLs :out ListOfInteger from TColStd)
- returns Integer from Standard;
-
- SplitsOnFace(me:out;
- nE1 :Integer from Standard;
- nF2 :Integer from Standard;
- aLs :out ListOfInteger from TColStd)
- returns Integer from Standard;
-
- SplitsOnFace(me:out;
- aBid:Integer from Standard;
- nF1 :Integer from Standard;
- nF2 :Integer from Standard;
- aLs :out ListOfInteger from TColStd)
- returns Integer from Standard;
-
- SplitsInFace(me:out;
- aBid:Integer from Standard;
- nF1 :Integer from Standard;
- nF2 :Integer from Standard;
- aLs :out ListOfPaveBlock from BOPTools)
- returns Integer from Standard;
-
- SplitsInFace(me:out;
- nE1 :Integer from Standard;
- nF2 :Integer from Standard;
- aLs :out ListOfPaveBlock from BOPTools)
- returns Integer from Standard;
-
- SplitsOnEdge(me:out;
- nE1 :Integer from Standard;
- nE2 :Integer from Standard;
- aLs :out ListOfPaveBlock from BOPTools)
- returns Integer from Standard;
-
- SplitsOnFace(me:out;
- nE1 :Integer from Standard;
- nF2 :Integer from Standard;
- aLs :out ListOfPaveBlock from BOPTools)
- returns Integer from Standard;
-
- SplitsOnFace(me:out;
- aBid:Integer from Standard;
- nF1 :Integer from Standard;
- nF2 :Integer from Standard;
- aLs :out ListOfPaveBlock from BOPTools)
- returns Integer from Standard;
- --
- SplitsFace (me:out;
- nF2 :Integer from Standard;
- aLs :out ListOfPaveBlock from BOPTools)
- returns Integer from Standard;
-
- SplitsFace (me:out;
- nF2 :Integer from Standard;
- aLs :out ListOfInteger from TColStd)
- returns Integer from Standard;
-
- CommonBlocksFace (me:out;
- nF :Integer from Standard;
- aLCB:out ListOfCommonBlock from NMTTools)
- returns Integer from Standard;
-
- PrepareFace(me:out;
- nF : Integer from Standard;
- aF : out Face from TopoDS);
-
- --
- RealPaveBlock(me:out;
- aPB:PaveBlock from BOPTools)
- returns PaveBlock from BOPTools;
- ---C++: return const &
-
- RealPaveBlock(me:out;
- aPB:PaveBlock from BOPTools;
- aLB:out ListOfInteger from TColStd;
- aIsCommonBlock:out Integer from Standard)
- returns PaveBlock from BOPTools;
- ---C++: return const &
-
- RealSplitsFace (me:out;
- nF2 :Integer from Standard;
- aLs :out ListOfPaveBlock from BOPTools);
-
- HasRealSplitsInOnFace (me:out;
- nF1 :Integer from Standard;
- nF2 :Integer from Standard)
- returns Boolean from Standard;
-
- RealSplitsInFace(me:out;
- aBid:Integer from Standard;
- nF1 :Integer from Standard;
- nF2 :Integer from Standard;
- aLs :out ListOfPaveBlock from BOPTools);
-
- RealSplitsInFace(me:out;
- nE1 :Integer from Standard;
- nF2 :Integer from Standard;
- aLs :out ListOfPaveBlock from BOPTools);
-
- RealSplitsInFace(me:out;
- nF1 :Integer from Standard;
- aLPB :out ListOfPaveBlock from BOPTools);
-
- RealSplitsOnEdge(me:out;
- nE1 :Integer from Standard;
- nE2 :Integer from Standard;
- aLs :out ListOfPaveBlock from BOPTools);
-
- RealSplitsOnFace(me:out;
- nE1 :Integer from Standard;
- nF2 :Integer from Standard;
- aLs :out ListOfPaveBlock from BOPTools);
-
- RealSplitsOnFace(me:out;
- aBid:Integer from Standard;
- nF1 :Integer from Standard;
- nF2 :Integer from Standard;
- aLs :out ListOfPaveBlock from BOPTools);
-
- PrepareSetForFace(me:out;
- nF1 :Integer from Standard;
- nF2 :Integer from Standard;
- aLPB: ListOfPaveBlock from BOPTools;
- aPSF:out PaveSet from BOPTools);
-
- PutPaveOnCurve(me:out;
- aPSF: PaveSet from BOPTools;
- aTol: Real from Standard;
- aBC : out Curve from BOPTools);
-
-
- PutBoundPaveOnCurve (me:out;
- aBC :out Curve from BOPTools;
- aFF :out SSInterference from BOPTools);
-
- PutBoundPaveOnCurve (me:out;
- aP : Pnt from gp;
- aT : Real from Standard;
- aBC :out Curve from BOPTools;
- aFF :out SSInterference from BOPTools);
-
- FindPave (me:out;
- aP : Pnt from gp;
- aTpV: Real from Standard;
- aPS : PaveSet from BOPTools;
- aPV :out Pave from BOPTools)
- returns Boolean from Standard;
-
- CheckIntermediatePoint(me:out;
- aPB : PaveBlock from BOPTools;
- aPBR: PaveBlock from BOPTools;
- aTol: Real from Standard)
- returns Integer from Standard;
-
-
- IsExistingPaveBlock (me:out;
- aPB : PaveBlock from BOPTools;
- aLPB: ListOfPaveBlock from BOPTools;
- aTol: Real from Standard)
- returns Boolean from Standard;
-
- MakePCurves (me:out);
-
- PerformVF1(me:out)
- is protected;
-
- MakeAloneVertices(me:out)
- is protected;
-
- AloneVertices(me)
- returns IndexedDataMapOfIndexedMapOfInteger from NMTTools;
- ---C++: return const &
-
- IsExistingPaveBlock (me:out;
- aPB : PaveBlock from BOPTools;
- aLPB: ListOfShape from TopTools;
- aTol: Real from Standard)
- returns Boolean from Standard;
-
- --
- CheckCoincidence (me:out;
- aPB : PaveBlock from BOPTools;
- aLPB: ListOfPaveBlock from BOPTools)
- returns Boolean from Standard;
- --
-
- CheckIntermediatePoint(me:out;
- aPB : PaveBlock from BOPTools;
- aE : Edge from TopoDS;
- aTol: Real from Standard)
- returns Integer from Standard;
-
- SharedEdges(me:out;
- nF1 :Integer from Standard;
- nF2 :Integer from Standard;
- aLNE :out ListOfInteger from TColStd;
- aLSE :out ListOfShape from TopTools);
-
- FuseVertices(me;
- aC:Shape from TopoDS;
- aDMVV: out DataMapOfShapeShape from TopTools);
- --
- TreatPaveBlocks(me:out;
- theLCB:out ListOfCommonBlock from NMTTools);
-
- ChangePavePoolNew(me:out)
- returns PavePool from BOPTools;
- ---C++:return &
-
- CheckCoincidence (me:out;
- aPB1 : PaveBlock from BOPTools;
- aPB2 : PaveBlock from BOPTools)
- returns Boolean from Standard;
-
- FillFaceInfo (me:out)
- is protected;
-
- CorrectTolR3D(me:out;
- aFF : SSInterference from BOPTools;
- aMVStick: MapOfInteger from TColStd;
- aTolR3D: out Real from Standard)
- is protected;
-
- PutClosingPaveOnCurve (me:out;
- aBC :out Curve from BOPTools;
- aFF :out SSInterference from BOPTools);
-
-fields
- myDS : PShapesDataStructure from NMTDS is protected;
- myIsDone : Boolean from Standard is protected;
- myNbSources : Integer from Standard is protected;
- myNbEdges : Integer from Standard is protected;
-
- myPavePool : PavePool from BOPTools is protected;
- myPavePoolNew : PavePool from BOPTools is protected;
- myCommonBlockPool : CommonBlockPool from NMTTools is protected;
- mySplitShapesPool : SplitShapesPool from BOPTools is protected;
- --
- myContext : Context from IntTools is protected;
- mySectionAttribute : SSIntersectionAttribute from BOPTools is protected;
- myAloneVertices : IndexedDataMapOfIndexedMapOfInteger from NMTTools is protected;
- --
- myVSD : DataMapOfIntegerInteger from TColStd is protected;
- myDSIt : PIterator from NMTDS is protected;
- myCompositeShape : Shape from TopoDS is protected;
- myIP : PInterfPool from NMTDS is protected;
- myFaceInfo : DataMapOfIntegerFaceInfo from NMTTools is protected;
-end PaveFiller;
// File: NMTTools_PaveFiller.cxx
// Created: Fri Dec 5 14:58:54 2003
// Author: Peter KURNEV
-
-#include <NMTTools_PaveFiller.ixx>
-
-#include <Basics_OCCTVersion.hxx>
-
-#include <NMTTools_DEProcessor.hxx>
-
+// <pkv@irinox>
+//
+#include <NMTTools_PaveFiller.hxx>
+//
+#include <BOPTColStd_Failure.hxx>
+#include <IntTools_Context.hxx>
#include <NMTDS_ShapesDataStructure.hxx>
+#include <NMTTools_DEProcessor.hxx>
#include <NMTDS_Iterator.hxx>
#include <NMTDS_InterfPool.hxx>
-#include <BOPTColStd_Failure.hxx>
-
//=======================================================================
// function: NMTTools_PaveFiller::NMTTools_PaveFiller
-// purpose:
+// purpose:
//=======================================================================
NMTTools_PaveFiller::NMTTools_PaveFiller()
{
}
//=======================================================================
// function: ~
-// purpose:
+// purpose:
//=======================================================================
NMTTools_PaveFiller::~NMTTools_PaveFiller()
{
}
//=======================================================================
// function: Clear
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_PaveFiller::Clear()
{
if (myDSIt) {
delete myDSIt;
- }
+ }
if (myDS) {
delete myDS;
}
myDSIt=NULL;
myDS=NULL;
-
+
if (myIP) {
delete myIP;
}
}
//=======================================================================
// function: SetCompositeShape
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_PaveFiller::SetCompositeShape(const TopoDS_Shape& aS)
{
}
//=======================================================================
// function: CompositeShape
-// purpose:
+// purpose:
//=======================================================================
const TopoDS_Shape& NMTTools_PaveFiller::CompositeShape()const
{
}
//=======================================================================
// function: DS
-// purpose:
+// purpose:
//=======================================================================
NMTDS_PShapesDataStructure NMTTools_PaveFiller::DS()
{
}
//=======================================================================
// function: DSIt
-// purpose:
+// purpose:
//=======================================================================
NMTDS_PIterator NMTTools_PaveFiller::DSIt()
{
}
//=======================================================================
// function: IP
-// purpose:
+// purpose:
//=======================================================================
NMTDS_PInterfPool NMTTools_PaveFiller::IP()
{
}
//=======================================================================
// function:IsDone
-// purpose:
+// purpose:
//=======================================================================
Standard_Boolean NMTTools_PaveFiller::IsDone() const
{
}
//=======================================================================
// function: Context
-// purpose:
+// purpose:
//=======================================================================
-#if OCC_VERSION_LARGE > 0x06050200
-const Handle(IntTools_Context)& NMTTools_PaveFiller::Context() const
-#else
-const IntTools_Context& NMTTools_PaveFiller::Context() const
-#endif
+ const Handle(IntTools_Context)& NMTTools_PaveFiller::Context() const
{
return myContext;
}
-
-#if OCC_VERSION_LARGE <= 0x06050200
-//=======================================================================
-// function: ChangeContext
-// purpose:
-//=======================================================================
-IntTools_Context& NMTTools_PaveFiller::ChangeContext()
-{
- return myContext;
-}
-#endif
-
//=======================================================================
// function: PavePool
-// purpose:
+// purpose:
//=======================================================================
const BOPTools_PavePool& NMTTools_PaveFiller::PavePool() const
{
}
//=======================================================================
// function: ChangePavePool
-// purpose:
+// purpose:
//=======================================================================
BOPTools_PavePool& NMTTools_PaveFiller::ChangePavePool()
{
}
//=======================================================================
// function: ChangePavePoolNew
-// purpose:
+// purpose:
//=======================================================================
BOPTools_PavePool& NMTTools_PaveFiller::ChangePavePoolNew()
{
}
//=======================================================================
// function: CommonBlockPool
-// purpose:
+// purpose:
//=======================================================================
const NMTTools_CommonBlockPool& NMTTools_PaveFiller::CommonBlockPool() const
{
}
//=======================================================================
// function: ChangeCommonBlockPool
-// purpose:
+// purpose:
//=======================================================================
NMTTools_CommonBlockPool& NMTTools_PaveFiller::ChangeCommonBlockPool()
{
}
//=======================================================================
// function: SplitShapesPool
-// purpose:
+// purpose:
//=======================================================================
const BOPTools_SplitShapesPool& NMTTools_PaveFiller::SplitShapesPool() const
{
}
//=======================================================================
// function: ChangeSplitShapesPool
-// purpose:
+// purpose:
//=======================================================================
BOPTools_SplitShapesPool& NMTTools_PaveFiller::ChangeSplitShapesPool()
{
}
//=======================================================================
// function: Init
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_PaveFiller::Init()
{
myDS->NumberOfShapesOfTheTool();
myNbEdges=myDS->NbEdges();
//
- // 4.
+ // 4
myIP=new NMTDS_InterfPool;
-#if OCC_VERSION_LARGE > 0x06050200
//
- // 5.
+ // 5
myContext=new IntTools_Context;
-#endif
}
//=======================================================================
// function: Perform
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_PaveFiller::Perform()
{
//
// 2.VE
myPavePool.Resize (myNbEdges);
-
+
PrepareEdges();
PerformVE();
RefinePavePool();
//
myPavePoolNew.Destroy();
-
+
MakeSplitEdges();
UpdateCommonBlocks();
//
MakePCurves();
//
- // 7.Postprocessing
+ // 7.Postprocessing
UpdatePaveBlocks();
//
NMTTools_DEProcessor aDEP(*this);
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_PaveFiller.hxx
+// Created: Fri Dec 5 14:58:54 2003
+// Author: Peter KURNEV
+// <pkv@irinox>
+//
#ifndef _NMTTools_PaveFiller_HeaderFile
#define _NMTTools_PaveFiller_HeaderFile
-#include <Basics_OCCTVersion.hxx>
-
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
-#ifndef _NMTDS_PShapesDataStructure_HeaderFile
#include <NMTDS_PShapesDataStructure.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
-#endif
-#ifndef _BOPTools_PavePool_HeaderFile
#include <BOPTools_PavePool.hxx>
-#endif
-#ifndef _NMTTools_CommonBlockPool_HeaderFile
#include <NMTTools_CommonBlockPool.hxx>
-#endif
-#ifndef _BOPTools_SplitShapesPool_HeaderFile
#include <BOPTools_SplitShapesPool.hxx>
-#endif
-
-#if OCC_VERSION_LARGE > 0x06050200
#include <Handle_IntTools_Context.hxx>
-#else
-#include <IntTools_Context.hxx>
-#endif
-
-#ifndef _BOPTools_SSIntersectionAttribute_HeaderFile
#include <BOPTools_SSIntersectionAttribute.hxx>
-#endif
-#ifndef _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile
#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
-#endif
-#ifndef _TColStd_DataMapOfIntegerInteger_HeaderFile
#include <TColStd_DataMapOfIntegerInteger.hxx>
-#endif
-#ifndef _NMTDS_PIterator_HeaderFile
#include <NMTDS_PIterator.hxx>
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
-#endif
-#ifndef _NMTDS_PInterfPool_HeaderFile
#include <NMTDS_PInterfPool.hxx>
-#endif
-#ifndef _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile
#include <NMTTools_DataMapOfIntegerFaceInfo.hxx>
-#endif
-#ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
+#include <NMTTools_CommonBlock.hxx>
#include <Standard_Real.hxx>
-#endif
+#include <TopoDS_Shape.hxx>
+#include <BOPTools_Pave.hxx>
+#include <IntTools_ShrunkRange.hxx>
+#include <BOPTools_PavePool.hxx>
+#include <NMTTools_CommonBlockPool.hxx>
+#include <BOPTools_SplitShapesPool.hxx>
+#include <BOPTools_PaveBlock.hxx>
+#include <TopoDS_Vertex.hxx>
+#include <NMTTools_ListOfCommonBlock.hxx>
+#include <BOPTools_IDMapOfPaveBlockIMapOfPaveBlock.hxx>
+#include <BOPTools_IDMapOfPaveBlockIMapOfInteger.hxx>
+#include <BooleanOperations_IndexedDataMapOfShapeInteger.hxx>
+#include <TColStd_ListOfInteger.hxx>
+#include <BOPTools_ListOfPaveBlock.hxx>
+#include <TopoDS_Face.hxx>
+#include <BOPTools_PaveSet.hxx>
+#include <BOPTools_Curve.hxx>
+#include <BOPTools_SSInterference.hxx>
+#include <gp_Pnt.hxx>
+#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopTools_DataMapOfShapeShape.hxx>
+
+
+/*
class TopoDS_Shape;
class BOPTools_Pave;
class IntTools_ShrunkRange;
class BOPTools_PaveBlock;
class TopoDS_Vertex;
class NMTTools_ListOfCommonBlock;
-class NMTTools_CommonBlock;
class BOPTools_IDMapOfPaveBlockIMapOfPaveBlock;
class BOPTools_IDMapOfPaveBlockIMapOfInteger;
class BooleanOperations_IndexedDataMapOfShapeInteger;
class TopTools_ListOfShape;
class TopoDS_Edge;
class TopTools_DataMapOfShapeShape;
-class TColStd_MapOfInteger;
+class TCoLSTD_MapOfInteger;
+*/
+//=======================================================================
+//function : NMTTools_PaveFiller
+//purpose :
+//=======================================================================
class NMTTools_PaveFiller {
-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);
- }
-
-
- Standard_EXPORT NMTTools_PaveFiller();
-Standard_EXPORT virtual ~NMTTools_PaveFiller();
-
- Standard_EXPORT void SetCompositeShape(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT const TopoDS_Shape& CompositeShape() const;
+ public:
+ Standard_EXPORT
+ NMTTools_PaveFiller();
- Standard_EXPORT NMTDS_PShapesDataStructure DS() ;
+ Standard_EXPORT
+ virtual ~NMTTools_PaveFiller();
- Standard_EXPORT NMTDS_PIterator DSIt() ;
+ Standard_EXPORT
+ void SetCompositeShape(const TopoDS_Shape& aS) ;
- Standard_EXPORT NMTDS_PInterfPool IP() ;
+ Standard_EXPORT
+ const TopoDS_Shape& CompositeShape() const;
- Standard_EXPORT virtual void Perform() ;
+ Standard_EXPORT
+ NMTDS_PShapesDataStructure DS() ;
- Standard_EXPORT Standard_Boolean IsDone() const;
+ Standard_EXPORT
+ NMTDS_PIterator DSIt() ;
-#if OCC_VERSION_LARGE > 0x06050200
- Standard_EXPORT const Handle_IntTools_Context& Context() const;
-#else
- Standard_EXPORT const IntTools_Context& Context() const;
- Standard_EXPORT IntTools_Context& ChangeContext() ;
-#endif
-
- Standard_EXPORT const BOPTools_PavePool& PavePool() const;
-
- Standard_EXPORT BOPTools_PavePool& ChangePavePool() ;
-
- Standard_EXPORT const NMTTools_CommonBlockPool& CommonBlockPool() const;
-
- Standard_EXPORT NMTTools_CommonBlockPool& ChangeCommonBlockPool() ;
-
- Standard_EXPORT const BOPTools_SplitShapesPool& SplitShapesPool() const;
-
- Standard_EXPORT BOPTools_SplitShapesPool& ChangeSplitShapesPool() ;
-
- Standard_EXPORT Standard_Integer FindSDVertex(const Standard_Integer nV) const;
-
- Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+ Standard_EXPORT
+ NMTDS_PInterfPool IP() ;
- Standard_EXPORT Standard_Integer SplitsFace(const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+ Standard_EXPORT
+ virtual void Perform() ;
- Standard_EXPORT Standard_Integer SplitsFace(const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
+ Standard_EXPORT
+ Standard_Boolean IsDone() const;
- Standard_EXPORT Standard_Integer CommonBlocksFace(const Standard_Integer nF,NMTTools_ListOfCommonBlock& aLCB) ;
+ Standard_EXPORT
+ const Handle_IntTools_Context& Context() const;
- Standard_EXPORT void PrepareFace(const Standard_Integer nF,TopoDS_Face& aF) ;
+ Standard_EXPORT
+ const BOPTools_PavePool& PavePool() const;
- Standard_EXPORT const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB) ;
+ Standard_EXPORT
+ BOPTools_PavePool& ChangePavePool() ;
- Standard_EXPORT const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB,TColStd_ListOfInteger& aLB,Standard_Integer& aIsCommonBlock) ;
+ Standard_EXPORT
+ const NMTTools_CommonBlockPool& CommonBlockPool() const;
- Standard_EXPORT void RealSplitsFace(const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+ Standard_EXPORT
+ NMTTools_CommonBlockPool& ChangeCommonBlockPool() ;
- Standard_EXPORT Standard_Boolean HasRealSplitsInOnFace(const Standard_Integer nF1,const Standard_Integer nF2) ;
+ Standard_EXPORT
+ const BOPTools_SplitShapesPool& SplitShapesPool() const;
- Standard_EXPORT void RealSplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+ Standard_EXPORT
+ BOPTools_SplitShapesPool& ChangeSplitShapesPool() ;
- Standard_EXPORT void RealSplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+ Standard_EXPORT
+ Standard_Integer FindSDVertex(const Standard_Integer nV) const;
+
+ Standard_EXPORT
+ Standard_Integer SplitsInFace(const Standard_Integer aBid,
+ const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ TColStd_ListOfInteger& aLs) ;
- Standard_EXPORT void RealSplitsInFace(const Standard_Integer nF1,BOPTools_ListOfPaveBlock& aLPB) ;
+ Standard_EXPORT
+ Standard_Integer SplitsInFace(const Standard_Integer nE1,
+ const Standard_Integer nF2,
+ TColStd_ListOfInteger& aLs) ;
- Standard_EXPORT void RealSplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,BOPTools_ListOfPaveBlock& aLs) ;
+ Standard_EXPORT
+ Standard_Integer SplitsOnEdge(const Standard_Integer nE1,
+ const Standard_Integer nE2,
+ TColStd_ListOfInteger& aLs) ;
+
+ Standard_EXPORT
+ Standard_Integer SplitsOnFace(const Standard_Integer nE1,
+ const Standard_Integer nF2,
+ TColStd_ListOfInteger& aLs) ;
+
+ Standard_EXPORT
+ Standard_Integer SplitsOnFace(const Standard_Integer aBid,
+ const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ TColStd_ListOfInteger& aLs) ;
+
+ Standard_EXPORT
+ Standard_Integer SplitsInFace(const Standard_Integer aBid,
+ const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT
+ Standard_Integer SplitsInFace(const Standard_Integer nE1,
+ const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT
+ Standard_Integer SplitsOnEdge(const Standard_Integer nE1,
+ const Standard_Integer nE2,
+ BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT
+ Standard_Integer SplitsOnFace(const Standard_Integer nE1,
+ const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT
+ Standard_Integer SplitsOnFace(const Standard_Integer aBid,
+ const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT
+ Standard_Integer SplitsFace(const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT
+ Standard_Integer SplitsFace(const Standard_Integer nF2,
+ TColStd_ListOfInteger& aLs) ;
+
+ Standard_EXPORT
+ Standard_Integer CommonBlocksFace(const Standard_Integer nF,
+ NMTTools_ListOfCommonBlock& aLCB) ;
+
+ Standard_EXPORT
+ void PrepareFace(const Standard_Integer nF,
+ TopoDS_Face& aF) ;
+
+ Standard_EXPORT
+ const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB) ;
+
+ Standard_EXPORT
+ const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB,
+ TColStd_ListOfInteger& aLB,
+ Standard_Integer& aIsCommonBlock) ;
+
+ Standard_EXPORT
+ void RealSplitsFace(const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT
+ Standard_Boolean HasRealSplitsInOnFace(const Standard_Integer nF1,
+ const Standard_Integer nF2) ;
+
+ Standard_EXPORT
+ void RealSplitsInFace(const Standard_Integer aBid,
+ const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT
+ void RealSplitsInFace(const Standard_Integer nE1,
+ const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT
+ void RealSplitsInFace(const Standard_Integer nF1,
+ BOPTools_ListOfPaveBlock& aLPB) ;
+
+ Standard_EXPORT
+ void RealSplitsOnEdge(const Standard_Integer nE1,
+ const Standard_Integer nE2,
+ BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT
+ void RealSplitsOnFace(const Standard_Integer nE1,
+ const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT
+ void RealSplitsOnFace(const Standard_Integer aBid,
+ const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT
+ void PrepareSetForFace(const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ const BOPTools_ListOfPaveBlock& aLPB,
+ BOPTools_PaveSet& aPSF) ;
+
+ Standard_EXPORT
+ void PutPaveOnCurve(const BOPTools_PaveSet& aPSF,
+ const Standard_Real aTol,
+ BOPTools_Curve& aBC) ;
+
+ Standard_EXPORT
+ void PutBoundPaveOnCurve(BOPTools_Curve& aBC,
+ BOPTools_SSInterference& aFF) ;
+
+ Standard_EXPORT
+ void PutBoundPaveOnCurve(const gp_Pnt& aP,
+ const Standard_Real aT,
+ BOPTools_Curve& aBC,
+ BOPTools_SSInterference& aFF) ;
+
+ Standard_EXPORT
+ Standard_Boolean FindPave(const gp_Pnt& aP,
+ const Standard_Real aTpV,
+ const BOPTools_PaveSet& aPS,
+ BOPTools_Pave& aPV) ;
+
+ Standard_EXPORT
+ Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,
+ const BOPTools_PaveBlock& aPBR,
+ const Standard_Real aTol) ;
+
+ Standard_EXPORT
+ Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,
+ const BOPTools_ListOfPaveBlock& aLPB,
+ const Standard_Real aTol) ;
+
+ Standard_EXPORT
+ void MakePCurves() ;
+
+ Standard_EXPORT
+ const NMTTools_IndexedDataMapOfIndexedMapOfInteger& AloneVertices() const;
+
+ Standard_EXPORT
+ Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,
+ const TopTools_ListOfShape& aLPB,
+ const Standard_Real aTol) ;
- Standard_EXPORT void RealSplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+ Standard_EXPORT
+ Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB,
+ const BOPTools_ListOfPaveBlock& aLPB) ;
- Standard_EXPORT void RealSplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+ Standard_EXPORT
+ Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,
+ const TopoDS_Edge& aE,
+ const Standard_Real aTol) ;
- Standard_EXPORT void PrepareSetForFace(const Standard_Integer nF1,const Standard_Integer nF2,const BOPTools_ListOfPaveBlock& aLPB,BOPTools_PaveSet& aPSF) ;
+ Standard_EXPORT
+ void SharedEdges(const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ TColStd_ListOfInteger& aLNE,
+ TopTools_ListOfShape& aLSE) ;
- Standard_EXPORT void PutPaveOnCurve(const BOPTools_PaveSet& aPSF,const Standard_Real aTol,BOPTools_Curve& aBC) ;
+ Standard_EXPORT
+ void FuseVertices(const TopoDS_Shape& aC,
+ TopTools_DataMapOfShapeShape& aDMVV) const;
- Standard_EXPORT void PutBoundPaveOnCurve(BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ;
+ Standard_EXPORT
+ void TreatPaveBlocks(NMTTools_ListOfCommonBlock& theLCB) ;
- Standard_EXPORT void PutBoundPaveOnCurve(const gp_Pnt& aP,const Standard_Real aT,BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ;
+ Standard_EXPORT
+ BOPTools_PavePool& ChangePavePoolNew() ;
- Standard_EXPORT Standard_Boolean FindPave(const gp_Pnt& aP,const Standard_Real aTpV,const BOPTools_PaveSet& aPS,BOPTools_Pave& aPV) ;
+ Standard_EXPORT
+ Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB1,
+ const BOPTools_PaveBlock& aPB2) ;
- Standard_EXPORT Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,const BOPTools_PaveBlock& aPBR,const Standard_Real aTol) ;
+ Standard_EXPORT
+ void PutClosingPaveOnCurve(BOPTools_Curve& aBC,
+ BOPTools_SSInterference& aFF) ;
- Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,const BOPTools_ListOfPaveBlock& aLPB,const Standard_Real aTol) ;
+ protected:
+ Standard_EXPORT
+ virtual void Init() ;
- Standard_EXPORT void MakePCurves() ;
+ Standard_EXPORT
+ virtual void Clear() ;
- Standard_EXPORT const NMTTools_IndexedDataMapOfIndexedMapOfInteger& AloneVertices() const;
+ Standard_EXPORT
+ virtual void PerformVV() ;
- Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,const TopTools_ListOfShape& aLPB,const Standard_Real aTol) ;
+ Standard_EXPORT
+ virtual void PerformVE() ;
- Standard_EXPORT Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB,const BOPTools_ListOfPaveBlock& aLPB) ;
+ Standard_EXPORT
+ virtual void PerformVF() ;
- Standard_EXPORT Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,const TopoDS_Edge& aE,const Standard_Real aTol) ;
+ Standard_EXPORT
+ virtual void PerformEE() ;
- Standard_EXPORT void SharedEdges(const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLNE,TopTools_ListOfShape& aLSE) ;
+ Standard_EXPORT
+ virtual void PerformEF() ;
- Standard_EXPORT void FuseVertices(const TopoDS_Shape& aC,TopTools_DataMapOfShapeShape& aDMVV) const;
+ Standard_EXPORT
+ virtual void PerformFF() ;
- Standard_EXPORT void TreatPaveBlocks(NMTTools_ListOfCommonBlock& theLCB) ;
+ Standard_EXPORT
+ void MakeSplitEdges() ;
- Standard_EXPORT BOPTools_PavePool& ChangePavePoolNew() ;
+ Standard_EXPORT
+ virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1,
+ const TopAbs_ShapeEnum aType2) ;
- Standard_EXPORT Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB1,const BOPTools_PaveBlock& aPB2) ;
+ Standard_EXPORT
+ void CorrectShrunkRanges(const Standard_Integer aSide,
+ const BOPTools_Pave& aPave,
+ IntTools_ShrunkRange& aSR) ;
- Standard_EXPORT void PutClosingPaveOnCurve(BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ;
+ Standard_EXPORT
+ virtual void PreparePaveBlocks(const Standard_Integer anE) ;
-protected:
+ Standard_EXPORT
+ virtual void PrepareEdges() ;
- Standard_EXPORT virtual void Init() ;
+ Standard_EXPORT
+ Standard_Boolean IsSuccessorsComputed(const Standard_Integer iF1,
+ const Standard_Integer iF2) const;
- Standard_EXPORT virtual void Clear() ;
+ Standard_EXPORT
+ Standard_Boolean IsBlocksCoinside(const BOPTools_PaveBlock& aPB1,
+ const BOPTools_PaveBlock& aPB2) const;
- Standard_EXPORT virtual void PerformVV() ;
+ Standard_EXPORT
+ void RefinePavePool() ;
- Standard_EXPORT virtual void PerformVE() ;
+ Standard_EXPORT
+ Standard_Integer CheckFacePaves(const TopoDS_Vertex& aV,
+ const Standard_Integer nF) ;
- Standard_EXPORT virtual void PerformVF() ;
+ Standard_EXPORT
+ void ReplaceCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
- Standard_EXPORT virtual void PerformEE() ;
+ Standard_EXPORT
+ void RemoveCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
- Standard_EXPORT virtual void PerformEF() ;
+ Standard_EXPORT
+ void SplitCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
- Standard_EXPORT virtual void PerformFF() ;
+ Standard_EXPORT
+ void SplitCommonBlock(const NMTTools_CommonBlock& aCB,NMTTools_ListOfCommonBlock& aLCB) ;
- Standard_EXPORT void MakeSplitEdges() ;
+ Standard_EXPORT
+ void EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aM) ;
- Standard_EXPORT virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1,const TopAbs_ShapeEnum aType2) ;
+ Standard_EXPORT
+ void EFCommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB) ;
- Standard_EXPORT void CorrectShrunkRanges(const Standard_Integer aSide,const BOPTools_Pave& aPave,IntTools_ShrunkRange& aSR) ;
+ Standard_EXPORT
+ void EENewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
- Standard_EXPORT virtual void PreparePaveBlocks(const Standard_Integer anE) ;
+ Standard_EXPORT
+ void EENewVertices(const TopoDS_Vertex& aV,
+ const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
- Standard_EXPORT virtual void PrepareEdges() ;
+ Standard_EXPORT
+ void EFNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
- Standard_EXPORT Standard_Boolean IsSuccessorsComputed(const Standard_Integer iF1,const Standard_Integer iF2) const;
+ Standard_EXPORT
+ void EFNewVertices(const TopoDS_Vertex& aV,
+ const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
- Standard_EXPORT Standard_Boolean IsBlocksCoinside(const BOPTools_PaveBlock& aPB1,const BOPTools_PaveBlock& aPB2) const;
+ Standard_EXPORT
+ void UpdateCommonBlocks() ;
- Standard_EXPORT void RefinePavePool() ;
+ Standard_EXPORT
+ void UpdateCommonBlocks(const Standard_Integer aI) ;
- Standard_EXPORT Standard_Integer CheckFacePaves(const TopoDS_Vertex& aV,const Standard_Integer nF) ;
+ Standard_EXPORT
+ void UpdatePaveBlocks() ;
- Standard_EXPORT void ReplaceCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
+ Standard_EXPORT
+ Standard_Integer SplitIndex(const BOPTools_PaveBlock& aPB) const;
- Standard_EXPORT void RemoveCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
+ Standard_EXPORT
+ void MakeBlocks() ;
- Standard_EXPORT void SplitCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
+ Standard_EXPORT
+ void PerformVF1() ;
- Standard_EXPORT void SplitCommonBlock(const NMTTools_CommonBlock& aCB,NMTTools_ListOfCommonBlock& aLCB) ;
+ Standard_EXPORT
+ void MakeAloneVertices() ;
- Standard_EXPORT void EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aM) ;
+ Standard_EXPORT
+ void FillFaceInfo() ;
- Standard_EXPORT void EFCommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB) ;
+ Standard_EXPORT
+ void CorrectTolR3D(const BOPTools_SSInterference& aFF,
+ const TColStd_MapOfInteger& aMVStick,
+ Standard_Real& aTolR3D) ;
- Standard_EXPORT void EENewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
- Standard_EXPORT void EENewVertices(const TopoDS_Vertex& aV,const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
-
- Standard_EXPORT void EFNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
-
- Standard_EXPORT void EFNewVertices(const TopoDS_Vertex& aV,const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
-
- Standard_EXPORT void UpdateCommonBlocks() ;
-
- Standard_EXPORT void UpdateCommonBlocks (const Standard_Integer aI);
-
- Standard_EXPORT void UpdatePaveBlocks() ;
-
- Standard_EXPORT Standard_Integer SplitIndex(const BOPTools_PaveBlock& aPB) const;
-
- Standard_EXPORT void MakeBlocks() ;
-
- Standard_EXPORT void PerformVF1() ;
-
- Standard_EXPORT void MakeAloneVertices() ;
-
- Standard_EXPORT void FillFaceInfo() ;
-
- Standard_EXPORT void CorrectTolR3D(const BOPTools_SSInterference& aFF,const TColStd_MapOfInteger& aMVStick,Standard_Real& aTolR3D) ;
-
-
-NMTDS_PShapesDataStructure myDS;
-Standard_Boolean myIsDone;
-Standard_Integer myNbSources;
-Standard_Integer myNbEdges;
-BOPTools_PavePool myPavePool;
-BOPTools_PavePool myPavePoolNew;
-NMTTools_CommonBlockPool myCommonBlockPool;
-BOPTools_SplitShapesPool mySplitShapesPool;
-#if OCC_VERSION_LARGE > 0x06050200
+ NMTDS_PShapesDataStructure myDS;
+ Standard_Boolean myIsDone;
+ Standard_Integer myNbSources;
+ Standard_Integer myNbEdges;
+ BOPTools_PavePool myPavePool;
+ BOPTools_PavePool myPavePoolNew;
+ NMTTools_CommonBlockPool myCommonBlockPool;
+ BOPTools_SplitShapesPool mySplitShapesPool;
Handle_IntTools_Context myContext;
-#else
- IntTools_Context myContext;
-#endif
-BOPTools_SSIntersectionAttribute mySectionAttribute;
-NMTTools_IndexedDataMapOfIndexedMapOfInteger myAloneVertices;
-TColStd_DataMapOfIntegerInteger myVSD;
-NMTDS_PIterator myDSIt;
-TopoDS_Shape myCompositeShape;
-NMTDS_PInterfPool myIP;
-NMTTools_DataMapOfIntegerFaceInfo myFaceInfo;
-
-private:
+ BOPTools_SSIntersectionAttribute mySectionAttribute;
+ NMTTools_IndexedDataMapOfIndexedMapOfInteger myAloneVertices;
+ TColStd_DataMapOfIntegerInteger myVSD;
+ NMTDS_PIterator myDSIt;
+ TopoDS_Shape myCompositeShape;
+ NMTDS_PInterfPool myIP;
+ NMTTools_DataMapOfIntegerFaceInfo myFaceInfo;
-};
-// other Inline functions and methods (like "C++: function call" methods)
+ // private:
+};
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_PaveFiller.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _BOPTools_Pave_HeaderFile
-#include <BOPTools_Pave.hxx>
-#endif
-#ifndef _IntTools_ShrunkRange_HeaderFile
-#include <IntTools_ShrunkRange.hxx>
-#endif
-#ifndef _IntTools_Context_HeaderFile
-#include <IntTools_Context.hxx>
-#endif
-#ifndef _BOPTools_PavePool_HeaderFile
-#include <BOPTools_PavePool.hxx>
-#endif
-#ifndef _NMTTools_CommonBlockPool_HeaderFile
-#include <NMTTools_CommonBlockPool.hxx>
-#endif
-#ifndef _BOPTools_SplitShapesPool_HeaderFile
-#include <BOPTools_SplitShapesPool.hxx>
-#endif
-#ifndef _BOPTools_PaveBlock_HeaderFile
-#include <BOPTools_PaveBlock.hxx>
-#endif
-#ifndef _TopoDS_Vertex_HeaderFile
-#include <TopoDS_Vertex.hxx>
-#endif
-#ifndef _NMTTools_ListOfCommonBlock_HeaderFile
-#include <NMTTools_ListOfCommonBlock.hxx>
-#endif
-#ifndef _NMTTools_CommonBlock_HeaderFile
-#include <NMTTools_CommonBlock.hxx>
-#endif
-#ifndef _BOPTools_IDMapOfPaveBlockIMapOfPaveBlock_HeaderFile
-#include <BOPTools_IDMapOfPaveBlockIMapOfPaveBlock.hxx>
-#endif
-#ifndef _BOPTools_IDMapOfPaveBlockIMapOfInteger_HeaderFile
-#include <BOPTools_IDMapOfPaveBlockIMapOfInteger.hxx>
-#endif
-#ifndef _BooleanOperations_IndexedDataMapOfShapeInteger_HeaderFile
-#include <BooleanOperations_IndexedDataMapOfShapeInteger.hxx>
-#endif
-#ifndef _TColStd_ListOfInteger_HeaderFile
-#include <TColStd_ListOfInteger.hxx>
-#endif
-#ifndef _BOPTools_ListOfPaveBlock_HeaderFile
-#include <BOPTools_ListOfPaveBlock.hxx>
-#endif
-#ifndef _TopoDS_Face_HeaderFile
-#include <TopoDS_Face.hxx>
-#endif
-#ifndef _BOPTools_PaveSet_HeaderFile
-#include <BOPTools_PaveSet.hxx>
-#endif
-#ifndef _BOPTools_Curve_HeaderFile
-#include <BOPTools_Curve.hxx>
-#endif
-#ifndef _BOPTools_SSInterference_HeaderFile
-#include <BOPTools_SSInterference.hxx>
-#endif
-#ifndef _gp_Pnt_HeaderFile
-#include <gp_Pnt.hxx>
-#endif
-#ifndef _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile
-#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
-#endif
-#ifndef _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TopoDS_Edge_HeaderFile
-#include <TopoDS_Edge.hxx>
-#endif
-#ifndef _TopTools_DataMapOfShapeShape_HeaderFile
-#include <TopTools_DataMapOfShapeShape.hxx>
-#endif
-#ifndef _TColStd_MapOfInteger_HeaderFile
-#include <TColStd_MapOfInteger.hxx>
-#endif
-#ifndef _NMTTools_PaveFiller_HeaderFile
-#include <NMTTools_PaveFiller.hxx>
-#endif
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <NMTTools_PaveFiller.ixx>
+#include <NMTTools_PaveFiller.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
#include <TopAbs_ShapeEnum.hxx>
//=======================================================================
// function:IsSuccesstorsComputed
-// purpose:
+// purpose:
//=======================================================================
Standard_Boolean NMTTools_PaveFiller::IsSuccessorsComputed(const Standard_Integer aN1,
const Standard_Integer aN2)const
aNbS=aMSuc.Extent();
for (i=1; i<=aNbS; ++i) {
nSuc=aMSuc(i);
- bComputed=myIP->Contains(n1, nSuc);
+ bComputed=myIP->Contains(n1, nSuc);
if (bComputed) {
break;
}
/*
//=======================================================================
// function: ExpectedPoolLength
-// purpose:
+// purpose:
//=======================================================================
Standard_Integer NMTTools_PaveFiller::ExpectedPoolLength()const
{
Standard_Integer aNbIIs;
Standard_Real aCfPredict=.5;
- // Modified Thu Sep 14 14:35:18 2006
+ // Modified Thu Sep 14 14:35:18 2006
// Contribution of Samtech www.samcef.com BEGIN
//const BOPTools_ListOfCoupleOfInteger& aLC=myDSIt.ListOfCouple();
//aNbIIs=aLC.Extent();
}
//
aNbIIs=(Standard_Integer) (aCfPredict*(Standard_Real)aNbIIs);
-
+
return aNbIIs;
}
*/
/*
//=======================================================================
//function : SortTypes
-//purpose :
+//purpose :
//=======================================================================
void NMTTools_PaveFiller::SortTypes(Standard_Integer& theWhat,
- Standard_Integer& theWith)const
-{
+ Standard_Integer& theWith)const
+{
Standard_Integer aWhat, aWith;
Standard_Boolean aReverseFlag;
TopAbs_ShapeEnum aType1, aType2;
if (aType1==TopAbs_EDGE && aType2==TopAbs_FACE) {
aReverseFlag=Standard_False;
}
- if (aType1==TopAbs_VERTEX &&
+ if (aType1==TopAbs_VERTEX &&
(aType2==TopAbs_FACE || aType2==TopAbs_EDGE)) {
aReverseFlag=Standard_False;
}
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <NMTTools_PaveFiller.ixx>
+#include <NMTTools_PaveFiller.hxx>
#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
#include <TColStd_ListOfInteger.hxx>
//=======================================================================
// function: PerformVV
-// purpose:
+// purpose:
//=======================================================================
- void NMTTools_PaveFiller::PerformVV()
+ void NMTTools_PaveFiller::PerformVV()
{
myIsDone=Standard_False;
//
//
BOPTools_VVInterference aVV(n1, n2);
aVV.SetNewShape(nVnew);
- aVVs.Append(aVV);
+ aVVs.Append(aVV);
}
}
}
}
//=======================================================================
// function: FindSDVertex
-// purpose:
+// purpose:
//=======================================================================
Standard_Integer NMTTools_PaveFiller::FindSDVertex(const Standard_Integer nV)const
{
/*
//=======================================================================
// function: PerformNewVertices
-// purpose:
+// purpose:
//=======================================================================
- void NMTTools_PaveFiller::PerformNewVertices()
+ void NMTTools_PaveFiller::PerformNewVertices()
{
}
*/
#include <Standard_Version.hxx>
-#include <NMTTools_PaveFiller.ixx>
+#include <NMTTools_PaveFiller.hxx>
#include <Basics_OCCTVersion.hxx>
#include <NMTDS_ShapesDataStructure.hxx>
#include <NMTDS_InterfPool.hxx>
-// Modified Thu Sep 14 14:35:18 2006
-// Contribution of Samtech www.samcef.com BEGIN
+
#include <BOPTools_IndexedMapOfCoupleOfInteger.hxx>
#include <BOPTools_CoupleOfInteger.hxx>
#include <BooleanOperations_OnceExplorer.hxx>
+#include <IntTools_Context.hxx>
+
static
Standard_Boolean Contains(const TopoDS_Edge& aE,
const TopoDS_Vertex& aV);
-// Contribution of Samtech www.samcef.com END
//=======================================================================
// function: PerformVE
}
//
//modified by NIZNHY-PKV Mon Dec 28 08:58:05 2009f
-#if OCC_VERSION_LARGE > 0x06050200
- // In OCCT6.5.3 class IntTools_Context become a handle
- aFlag = myContext->ComputeVE (aV1, aE2, aT, bToUpdateVertex, aDist);
-#elif OCC_VERSION_LARGE > 0x06030008
+#if OCC_VERSION_LARGE > 0x06030008
// In OCCT6.3.0sp9 is changed a signature of IntTools_Context::ComputeVE() method
- aFlag = myContext.ComputeVE (aV1, aE2, aT, bToUpdateVertex, aDist);
+ aFlag = myContext->ComputeVE (aV1, aE2, aT, bToUpdateVertex, aDist);
#else
- aFlag = myContext.ComputeVE (aV1, aE2, aT);
+ aFlag = myContext->ComputeVE (aV1, aE2, aT);
#endif
//modified by NIZNHY-PKV Mon Dec 28 08:58:13 2009t
//
// File: NMTTools_PaveFiller_3.cxx
// Created: Mon Dec 8 16:06:56 2003
// Author: Peter KURNEV
-
-#include <NMTTools_PaveFiller.ixx>
-
-#include <Basics_OCCTVersion.hxx>
+// <pkv@irinox>
+//
+#include <NMTTools_PaveFiller.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <NMTDS_Iterator.hxx>
#include <NMTDS_ShapesDataStructure.hxx>
#include <NMTDS_InterfPool.hxx>
+#include <IntTools_Context.hxx>
-// Modified Thu Sep 14 14:35:18 2006
-// Contribution of Samtech www.samcef.com BEGIN
static
Standard_Boolean Contains(const TopoDS_Face& aF,
const TopoDS_Vertex& aV);
-// Contribution of Samtech www.samcef.com END
//=======================================================================
// function: PerformVF
-// purpose:
+// purpose:
//=======================================================================
- void NMTTools_PaveFiller::PerformVF()
+ void NMTTools_PaveFiller::PerformVF()
{
myIsDone=Standard_False;
//
//
BOPTools_CArray1OfVSInterference& aVSs=myIP->VSInterferences();
//
- // V/E Interferences
+ // V/E Interferences
myDSIt->Initialize(TopAbs_VERTEX, TopAbs_FACE);
//
// BlockLength correction
//
aF2=TopoDS::Face(myDS->Shape(aWith));
//
- // Modified Thu Sep 14 14:35:18 2006
+ // Modified Thu Sep 14 14:35:18 2006
// Contribution of Samtech www.samcef.com BEGIN
if (Contains(aF2, aV1)) {
continue;
}
// Contribution of Samtech www.samcef.com END
//
-#if OCC_VERSION_LARGE > 0x06050200
aFlag=myContext->ComputeVS (aV1, aF2, aU, aV);
-#else
- aFlag=myContext.ComputeVS (aV1, aF2, aU, aV);
-#endif
//
if (!aFlag) {
//
}
myIsDone=Standard_True;
}
-// Modified Thu Sep 14 14:35:18 2006
+// Modified Thu Sep 14 14:35:18 2006
// Contribution of Samtech www.samcef.com BEGIN
//=======================================================================
//function : Contains
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean Contains(const TopoDS_Face& aF,
const TopoDS_Vertex& aV)
// Created: Mon Dec 8 17:08:58 2003
// Author: Peter KURNEV
-#include <NMTTools_PaveFiller.ixx>
-
-#include <Basics_OCCTVersion.hxx>
+#include <NMTTools_PaveFiller.hxx>
#include <stdio.h>
#include <Precision.hxx>
#include <IntTools_EdgeEdge.hxx>
#include <IntTools_SequenceOfCommonPrts.hxx>
#include <IntTools_Tools.hxx>
+#include <IntTools_Context.hxx>
#include <BOPTools_Pave.hxx>
#include <BOPTools_PaveSet.hxx>
// Append Pave of nV to rhe edge nE
const TopoDS_Edge& aE=*(TopoDS_Edge*)(&myDS->Shape(nE));
const TopoDS_Vertex& aV= *(TopoDS_Vertex*)(&myDS->Shape(nV));
-#if OCC_VERSION_LARGE > 0x06050200
iFlag=myContext->ComputeVE (aV, aE, aT);
-#else
- iFlag=myContext.ComputeVE (aV, aE, aT);
-#endif
if (!iFlag) {
BOPTools_Pave aPave;
//
for (j=0; j<2; ++j) {
if (aMFence.Add(nE[j])) {
aE=TopoDS::Edge(myDS->Shape(nE[j]));
-#if OCC_VERSION_LARGE > 0x06050200
iFlag=myContext->ComputeVE (aVnew, aE, aT);
-#else
- iFlag=myContext.ComputeVE (aVnew, aE, aT);
-#endif
if (!iFlag) {
aPave.SetInterference(-1);
aPave.SetType (BooleanOperations_EdgeEdge);
//
anIt.Initialize(aLCBE);
for (; anIt.More(); anIt.Next()) {
- NMTTools_CommonBlock& aCBE=anIt.Value();
+ NMTTools_CommonBlock& aCBE=anIt.ChangeValue();
const BOPTools_ListOfPaveBlock& aLPBE=aCBE.PaveBlocks();
//
aTolMax=-1.;
}
//
anIndexIn=0;
-#if OCC_VERSION_LARGE > 0x06050200
aFlag=myContext->ComputeVS (aVnew, aF, aU, aV);
-#else
- aFlag=myContext.ComputeVS (aVnew, aF, aU, aV);
-#endif
if (!aFlag) {
BOPTools_VSInterference anInterf (nNewShape, nF, aU, aV);
//
nE2=aPB2.OriginalEdge();
const TopoDS_Edge& aE2=(*(TopoDS_Edge*)(&myDS->Shape(nE2)));
//
-#if OCC_VERSION_LARGE > 0x06050200
GeomAPI_ProjectPointOnCurve& aPPC=myContext->ProjPC(aE2);
-#else
- GeomAPI_ProjectPointOnCurve& aPPC=myContext.ProjPC(aE2);
-#endif
aPPC.Perform(aP1m);
aNbPoints=aPPC.NbPoints();
if (aNbPoints) {
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <NMTTools_PaveFiller.ixx>
-
-#include <Basics_OCCTVersion.hxx>
+#include <NMTTools_PaveFiller.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
#include <IntTools_ShrunkRange.hxx>
#include <IntTools_Range.hxx>
#include <IntTools_EdgeFace.hxx>
-#if OCC_VERSION_LARGE <= 0x06050200
-#include <IntTools_PContext.hxx>
-#endif
#include <IntTools_SequenceOfCommonPrts.hxx>
#include <IntTools_CommonPrt.hxx>
#include <IntTools_Tools.hxx>
+#include <IntTools_Context.hxx>
#include <BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx>
#include <BooleanOperations_IndexedDataMapOfShapeInteger.hxx>
//
//=======================================================================
// function: PerformEF
-// purpose:
+// purpose:
//=======================================================================
- void NMTTools_PaveFiller::PerformEF()
+ void NMTTools_PaveFiller::PerformEF()
{
Standard_Boolean bJustAdd;
Standard_Integer n1, n2, anIndexIn, nE, nF, aNbEFs, aBlockLength;
//
anIndexIn = 0;
//
- nE=n1;
+ nE=n1;
nF=n2;
if (myDS->GetShapeType(n2)==TopAbs_EDGE) {
- nE=n2;
+ nE=n2;
nF=n1;
}
//
//
aTolF=BRep_Tool::Tolerance(aF);
aTolE=BRep_Tool::Tolerance(aE);
-
- const Bnd_Box& aBBF=myDS->GetBoundingBox(nF);
+
+ const Bnd_Box& aBBF=myDS->GetBoundingBox(nF);
//
// Process each PaveBlock on edge nE
BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE));
if (aBBF.IsOut (aBBE)) {
continue;
}
- //
+ //
// EF
IntTools_EdgeFace aEF;
aEF.SetEdge (aE);
aEF.SetTolF (aTolF);
aEF.SetDiscretize (aDiscretize);
aEF.SetDeflection (aDeflection);
- //
-#if OCC_VERSION_LARGE > 0x06050200
+ //
aEF.SetContext(myContext);
-#else
- aEF.SetContext((IntTools_PContext)&myContext);
-#endif
- //
+ //
IntTools_Range anewSR = aSR;
- //
- // Correction of the Shrunk Range
+ //
+ // Correction of the Shrunk Range
BOPTools_Tools::CorrectRange(aE, aF, aSR, anewSR);
aEF.SetRange (anewSR);
//
case TopAbs_VERTEX: {
Standard_Boolean bIsOnPave1, bIsOnPave2;
Standard_Integer nVF;
- Standard_Real aT, aTolToDecide;
+ Standard_Real aT, aTolToDecide;
TopoDS_Vertex aNewVertex;
//
const IntTools_Range& aR=aCPart.Range1();
//
//decide to add pave or not
aTolToDecide=5.e-8;
- bIsOnPave1=IsOnPave(anewSR.First(), aR, aTolToDecide);
- bIsOnPave2=IsOnPave(anewSR.Last() , aR, aTolToDecide);
+ bIsOnPave1=IsOnPave(anewSR.First(), aR, aTolToDecide);
+ bIsOnPave2=IsOnPave(anewSR.Last() , aR, aTolToDecide);
//
if (!bIsOnPave1 && !bIsOnPave2) {
nVF=CheckFacePaves(aNewVertex, nF);
myIP->Add(nE, nF, Standard_True, NMTDS_TI_EF);
//
}// if (!nVF)
- }// if (!bIsOnPave1 && !bIsOnPave2)
+ }// if (!bIsOnPave1 && !bIsOnPave2)
//
//modified by NIZNHY-PKV Fri Apr 18 10:55:38 2008f
else {
default:
break;
- } // switch (aType)
- } // for (i=1; i<=aNbCPrts; i++)
+ } // switch (aType)
+ } // for (i=1; i<=aNbCPrts; i++)
} //if (aEF.IsDone())
- } // for (; anIt.More(); anIt.Next())
- }// for (; myDSIt.More(); myDSIt.Next())
+ } // for (; anIt.More(); anIt.Next())
+ }// for (; myDSIt.More(); myDSIt.Next())
//
// Treat New vertices
EFNewVertices(aMapVI);
//
- // Add draft Common Blocks of EF type
+ // Add draft Common Blocks of EF type
EFCommonBlocks(aMapCB);
//
// Collect all CB we suspected to split by new vertices
}
//=======================================================================
// function:EFCommonBlocks
-// purpose:
+// purpose:
//=======================================================================
void NMTTools_PaveFiller::EFCommonBlocks
(const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB)
}
//=======================================================================
// function:EFNewVertices
-// purpose:
+// purpose:
//=======================================================================
- void NMTTools_PaveFiller::EFNewVertices
- (const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI)
+ void NMTTools_PaveFiller::EFNewVertices
+ (const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI)
{
Standard_Integer i, j, aNb, aNewShape, aFlag, iX, aNbVV, aNbSimple;
Standard_Integer aWhat, aWith, nE, nF, nV, aNbIEF, aNbEdges, iTmp;
TopTools_IndexedMapOfShape aMNVComplex, aMNVSimple;
//
aNb=aMapVI.Extent();
- if (!aNb) { // no new vertices, no new problems
+ if (!aNb) { // no new vertices, no new problems
return;
}
//
aBB.Add(aCompound, aV);
}
//
- // 2. VV intersection between these vertices
+ // 2. VV intersection between these vertices
// using the auxiliary Filler
NMTTools_PaveFiller tPF;
//
EFNewVertices(aV, aMapVI);
}
//
- // 3. Fill Maps : NewVertex-edges (aMNVE)
+ // 3. Fill Maps : NewVertex-edges (aMNVE)
// NewVertex-interferences (aMNVIEE)
aNb=aVVInterfs.Extent();
for (i=1; i<=aNb; ++i) {
BOPTools_ESInterference& aEF=aEFs(iX);
aEF.SetNewShape(aNewShape);
}
- //
- // Update Paves on all edges
+ //
+ // Update Paves on all edges
const TColStd_IndexedMapOfInteger& aME=aMNVE(i);
aNbEdges=aME.Extent();
for (j=1; j<=aNbEdges; ++j) {
nE=aME(j);
const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));//mpv
//
-#if OCC_VERSION_LARGE > 0x06050200
aFlag=myContext->ComputeVE (aNewVertex, aE, aT);
-#else
- aFlag=myContext.ComputeVE (aNewVertex, aE, aT);
-#endif
//
if (!aFlag) {
aPave.SetInterference(-1);
}
//=======================================================================
// function:EFNewVertices
-// purpose:
+// purpose:
//=======================================================================
- void NMTTools_PaveFiller::EFNewVertices
+ void NMTTools_PaveFiller::EFNewVertices
(const TopoDS_Vertex& aNewVertex,
- const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI)
+ const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI)
{
Standard_Integer i, aNewShape, nE, nF;
Standard_Real aT;
}
//=======================================================================
// function: CheckFacePaves
-// purpose:
+// purpose:
//=======================================================================
- Standard_Integer NMTTools_PaveFiller::CheckFacePaves
+ Standard_Integer NMTTools_PaveFiller::CheckFacePaves
(const TopoDS_Vertex& aNewVertex,
const Standard_Integer nF)
{
BOPTools_ListIteratorOfListOfPave anIt;
TColStd_IndexedMapOfInteger aMVF;
//
- iRet=0;
+ iRet=0;
//
BooleanOperations_OnceExplorer aExp(*myDS);
aExp.Init(nF, TopAbs_EDGE);
//
//=======================================================================
// function: VertexParameter
-// purpose:
+// purpose:
//=======================================================================
void VertexParameter(const IntTools_CommonPrt& aCPart,
Standard_Real& aT)
}
//=======================================================================
// function: IsOnPave
-// purpose:
+// purpose:
//=======================================================================
Standard_Boolean IsOnPave(const Standard_Real& aTR,
const IntTools_Range& aCPRange,
return bIsOnPave;
}
//
- dT1=Abs(aTR-aT1);
+ dT1=Abs(aTR-aT1);
dT2=Abs(aTR-aT2);
bIsOnPave=(dT1<=aTolerance || dT2<=aTolerance);
return bIsOnPave;
// Created: Fri Dec 19 10:27:31 2003
// Author: Peter KURNEV
-#include <NMTTools_PaveFiller.ixx>
+#include <NMTTools_PaveFiller.hxx>
#include <Basics_OCCTVersion.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger.hxx>
+
#include <Geom_TrimmedCurve.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2d_Curve.hxx>
#include <BOPTools_PaveBlockIterator.hxx>
#include <BOPTools_Tools2D.hxx>
#include <BOPTools_Tools3D.hxx>
+#include <BOPTools_Curve.hxx>
#include <NMTDS_Iterator.hxx>
#include <NMTDS_ShapesDataStructure.hxx>
static
Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aCtx);
-#else
- IntTools_Context& aCtx);
-#endif
//=======================================================================
// function: PerformFF
//
BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences();
//
-
+
//
// 1. Make Section Edges from intersection curves
// between each pair of faces
//
// Checking of validity in 2D
//
-#if OCC_VERSION_LARGE > 0x06050200
bIsValidIn2D=myContext->IsValidBlockForFaces(aT1, aT2, aIC, aF1, aF2, aTol2D);
-#else
- bIsValidIn2D=myContext.IsValidBlockForFaces(aT1, aT2, aIC, aF1, aF2, aTol2D);
-#endif
if (!bIsValidIn2D) {
continue;
}
{
Standard_Real aT;
//
-#if OCC_VERSION_LARGE > 0x06050200
myContext->IsVertexOnLine(aV1, aIC, aTolR3D, aT);
-#else
- myContext.IsVertexOnLine(aV1, aIC, aTolR3D, aT);
-#endif
BOPTools_Tools::UpdateVertex (aIC, aT, aV1);
//
-#if OCC_VERSION_LARGE > 0x06050200
myContext->IsVertexOnLine(aV2, aIC, aTolR3D, aT);
-#else
- myContext.IsVertexOnLine(aV2, aIC, aTolR3D, aT);
-#endif
BOPTools_Tools::UpdateVertex (aIC, aT, aV2);
}
//
//
aBB.MakeVertex (aVM, aPM, aTolC);
//
-#if OCC_VERSION_LARGE > 0x06050200
iVM=myContext->ComputeVE(aVM, aE2, aTmp);
-#else
- iVM=myContext.ComputeVE(aVM, aE2, aTmp);
-#endif
//
return iVM;
}
const TopoDS_Face aF1=TopoDS::Face(myDS->GetShape(nF1));//mpv
const TopoDS_Face aF2=TopoDS::Face(myDS->GetShape(nF2));//mpv
//
-#if OCC_VERSION_LARGE > 0x06050200
bVF=myContext->IsValidPointForFaces (aP1, aF1, aF2, aTolR3D);
-#else
- bVF=myContext.IsValidPointForFaces (aP1, aF1, aF2, aTolR3D);
-#endif
if (bVF) {
PutBoundPaveOnCurve (aP1, aT1, aBC, aFFi);
}
//
-#if OCC_VERSION_LARGE > 0x06050200
bVF=myContext->IsValidPointForFaces (aP2, aF1, aF2, aTolR3D);
-#else
- bVF=myContext.IsValidPointForFaces (aP2, aF1, aF2, aTolR3D);
-#endif
if (bVF) {
PutBoundPaveOnCurve (aP2, aT2, aBC, aFFi);
}
}
// VE
if (!iV) {
-#if OCC_VERSION_LARGE > 0x06050200
iVE=myContext->ComputeVE (aV11, aE2, aTE);
-#else
- iVE=myContext.ComputeVE (aV11, aE2, aTE);
-#endif
if (!iVE) {
iCount++;
if (iCount>iCountExt) {
}
// VE
if (!iV) {
-#if OCC_VERSION_LARGE > 0x06050200
iVE=myContext->ComputeVE (aV12, aE2, aTE);
-#else
- iVE=myContext.ComputeVE (aV12, aE2, aTE);
-#endif
if (!iVE) {
iCount++;
if (iCount>iCountExt) {
//purpose :
//=======================================================================
Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aCtx)
-#else
- IntTools_Context& aCtx)
-#endif
{
Standard_Boolean bRet;
Standard_Integer iErr;
continue;
}
//
-#if OCC_VERSION_LARGE > 0x06050200
bIsVertexOnLine=myContext->IsVertexOnLine(aV, aC, aTolR3D, aT);
-#else
- bIsVertexOnLine=myContext.IsVertexOnLine(aV, aC, aTolR3D, aT);
-#endif
//
//
if (bIsVertexOnLine) {
//
//=======================================================================
//function : FillFaceInfo
-//purpose :
+//purpose :
//=======================================================================
void NMTTools_PaveFiller::FillFaceInfo()
{
Standard_Integer i, aNbS, aNbFFs, nF, aNbVFs, aNbEFs, j, n1, n2, nX, aNbF;
TopAbs_ShapeEnum aType;
TopoDS_Shape aS;
- TColStd_ListIteratorOfListOfInteger aItF;
+ TColStd_ListIteratorOfListOfInteger aItF;
BOPTools_ListIteratorOfListOfPaveBlock anItPB;
NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo aItMFI;
NMTTools_ListIteratorOfListOfCommonBlock aItCB;
//=======================================================================
//function : CorrectTolR3D
//purpose : Attempt to correct the value of tolerance aTolR3D for
-// the intersection curve in order to
+// the intersection curve in order to
// compel it to pass through the sticks.
-// Prerequisites:
+// Prerequisites:
// 2. The are based on B-Spline surfaces;
// 1. There is at least the one intersection curve;
// 2. The faces have stick vertices to catch the curve;
// 3. The intersection angle is rather small (0.7-7 deg)
-//
+//
//=======================================================================
void NMTTools_PaveFiller::CorrectTolR3D(const BOPTools_SSInterference& aFF,
const TColStd_MapOfInteger& aMVStick,
Standard_Real& aTolR3D)
-
+
{
Standard_Boolean bHasBounds;
Standard_Integer i, nF[2], nV, aNbCurves;
aC3D->D0(aT, aP);
//
for (i=0; i<2; ++i) {
-#if OCC_VERSION_LARGE > 0x06050200
GeomAPI_ProjectPointOnSurf& aPPS=myContext->ProjPS(aF[i]);
-#else
- GeomAPI_ProjectPointOnSurf& aPPS=myContext.ProjPS(aF[i]);
-#endif
aPPS.Perform(aP);
aPPS.LowerDistanceParameters(aU, aV);
BOPTools_Tools3D::GetNormalToSurface(aS[i], aU, aV, aDN[i]);
}
}
//
-
+
aTolR=aTolVmax/aA;
if (aTolR<aTolTresh) {
aTolR3D=aTolR;
Standard_Boolean bIsClosed, bHasBounds, bAdded;
Standard_Integer nVC, j;
Standard_Real aT[2], aTolR3D, aTC, dT, aTx;
- gp_Pnt aP[2] ;
+ gp_Pnt aP[2] ;
BOPTools_Pave aPVx;
BOPTools_ListIteratorOfListOfPave aItLP;
//
if (!bHasBounds){
return;
}
- //
+ //
bAdded=Standard_False;
dT=Precision::PConfusion();
aTolR3D=aFFi.TolR3D();
// File: NMTTools_PaveFiller_7.cxx
// Author: Peter KURNEV
-#include <NMTTools_PaveFiller.ixx>
-
-#include <Basics_OCCTVersion.hxx>
+#include <NMTTools_PaveFiller.hxx>
#include <Bnd_HArray1OfBox.hxx>
#include <Bnd_BoundSortBox.hxx>
#include <TopExp_Explorer.hxx>
#include <TopExp.hxx>
-
+//
#include <IntTools_SequenceOfPntOn2Faces.hxx>
#include <IntTools_PntOnFace.hxx>
#include <IntTools_PntOn2Faces.hxx>
+#include <IntTools_Context.hxx>
#include <BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx>
#include <NMTDS_ShapesDataStructure.hxx>
#include <NMTDS_InterfPool.hxx>
+#include <NMTTools_ListOfCommonBlock.hxx>
#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
#include <NMTTools_MapOfPaveBlock.hxx>
for (; aItLCB.More(); aItLCB.Next()) {
NMTTools_CommonBlock aCBx;
//
- NMTTools_CommonBlock& aCB=aItLCB.Value();
+ NMTTools_CommonBlock& aCB=aItLCB.ChangeValue();
const BOPTools_ListOfPaveBlock &aLPB=aCB.PaveBlocks();
aItLPB.Initialize(aLPB);
for (; aItLPB.More(); aItLPB.Next()) {
//
aItLCB.Initialize(aLCBx);
for (; aItLCB.More(); aItLCB.Next()) {
- NMTTools_CommonBlock& aCBx=aItLCB.Value();
+ NMTTools_CommonBlock& aCBx=aItLCB.ChangeValue();
aLCB.Append(aCBx);
}
//modified by NIZNHY-PKV Thu Jan 19 09:03:30 2012t
// 1
aItLCB.Initialize(aLCB);
for (; aItLCB.More(); aItLCB.Next()) {
- NMTTools_CommonBlock& aCB=aItLCB.Value();
+ NMTTools_CommonBlock& aCB=aItLCB.ChangeValue();
//
BOPTools_PaveBlock aPBMax;
aTolExMax=-1.;
}
//
const TopoDS_Edge& aEx=*((TopoDS_Edge*)&myDS->Shape(nEx));
-#if OCC_VERSION_LARGE > 0x06050200
GeomAPI_ProjectPointOnCurve& aPPCx=myContext->ProjPC(aEx);
-#else
- GeomAPI_ProjectPointOnCurve& aPPCx=myContext.ProjPC(aEx);
-#endif
//
for (j=0; j<2; ++j) {
aPPCx.Perform(aPMax[j]);
//
aCBIt.Initialize(aLCB);
for (; aCBIt.More(); aCBIt.Next()) {
- NMTTools_CommonBlock& aCB=aCBIt.Value();
+ NMTTools_CommonBlock& aCB=aCBIt.ChangeValue();
//
// Among all PBs of aCB the first PB will be one
// that have max tolerance value
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <NMTTools_PaveFiller.ixx>
+#include <NMTTools_PaveFiller.hxx>
#include <TColStd_MapOfInteger.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
+#include <TopTools_ListOfShape.hxx>
+
#include <BooleanOperations_ShapesDataStructure.hxx>
#include <BooleanOperations_OnceExplorer.hxx>
#include <NMTTools_CommonBlockAPI.hxx>
-// Modified to add new method Thu Sep 14 14:35:18 2006
+// Modified to add new method Thu Sep 14 14:35:18 2006
// Contribution of Samtech www.samcef.com BEGIN
//=======================================================================
// function: SharedEdges
nE1=aExp.Current();
aM1.Add(nE1);
}
-
+
aExp.Init(nF2, TopAbs_EDGE);
for (; aExp.More(); aExp.Next()) {
nE2=aExp.Current();
if (aCBAPI.IsCommonBlock(aPB)) {
NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB);
//
- aIsCommonBlock=1;
+ aIsCommonBlock=1;
//
const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks();
aItPBx.Initialize(aLPBx);
//
anItCB.Initialize(aLCB);
for (; anItCB.More(); anItCB.Next()) {
- NMTTools_CommonBlock& aCB=anItCB.Value();
+ NMTTools_CommonBlock& aCB=anItCB.ChangeValue();
const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1);
const BOPTools_PaveBlock& aPB1R=RealPaveBlock(aPB1);
anItCB.Initialize(aLCB);
for (; anItCB.More(); anItCB.Next()) {
- NMTTools_CommonBlock& aCB=anItCB.Value();
+ NMTTools_CommonBlock& aCB=anItCB.ChangeValue();
const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1);
const BOPTools_PaveBlock& aPB1R=RealPaveBlock(aPB1);
//
//
anItCB.Initialize(aLCB);
for (; anItCB.More(); anItCB.Next()) {
- NMTTools_CommonBlock& aCB=anItCB.Value();
+ NMTTools_CommonBlock& aCB=anItCB.ChangeValue();
const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1);
const TColStd_ListOfInteger& aLFCB=aCB.Faces();
anItCB.Initialize(aLCB);
for (; anItCB.More(); anItCB.Next()) {
- NMTTools_CommonBlock& aCB=anItCB.Value();
+ NMTTools_CommonBlock& aCB=anItCB.ChangeValue();
const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1);//XXX
//
const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks();
return 0; //Ok
}
//modified by NIZNHY-PKV Mon Oct 17 12:07:48 2011f
-static
+static
void SortPaveBlocks(BOPTools_ListOfPaveBlock &);
static
- void SortShell(const Standard_Integer,
+ void SortShell(const Standard_Integer,
BOPTools_PaveBlock *);
static
- Standard_Boolean Less(const BOPTools_PaveBlock &,
+ Standard_Boolean Less(const BOPTools_PaveBlock &,
const BOPTools_PaveBlock &);
//=======================================================================
BOPTools_ListOfPaveBlock& aLPBIn)
{
Standard_Integer j, aNbCBP, nSpIn;
- TColStd_MapOfInteger aMFence;
+ TColStd_MapOfInteger aMFence;
BOPTools_ListOfPaveBlock aLPB;
BOPTools_ListIteratorOfListOfPaveBlock aItPB;
NMTTools_ListIteratorOfListOfCommonBlock aItCB;
NMTTools_ListOfCommonBlock& aLCB=aCBP(j);
aItCB.Initialize(aLCB);
for (; aItCB.More(); aItCB.Next()) {
- NMTTools_CommonBlock& aCB=aItCB.Value();
+ NMTTools_CommonBlock& aCB=aItCB.ChangeValue();
if (aCB.IsPaveBlockOnFace(nF)) {
const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1();
nSpIn=aPB1.Edge();
}
//=======================================================================
//function : SortShell
-//purpose :
+//purpose :
//=======================================================================
-void SortShell(const Standard_Integer n,
- BOPTools_PaveBlock *a)
+void SortShell(const Standard_Integer n,
+ BOPTools_PaveBlock *a)
{
Standard_Integer nd, i, j, l, d=1;
BOPTools_PaveBlock x;
j-=d;
if (j > -1) goto m30;
}//if (a[l] < a[j]){
- }//for (i=0; i<nd; ++i)
+ }//for (i=0; i<nd; ++i)
}//while (1)
}
//=======================================================================
//function : Less
-//purpose :
+//purpose :
//=======================================================================
-Standard_Boolean Less(const BOPTools_PaveBlock &aPB1,
+Standard_Boolean Less(const BOPTools_PaveBlock &aPB1,
const BOPTools_PaveBlock &aPB2)
{
Standard_Boolean bRet;
// Author: Peter KURNEV
// <pkv@irinox>
//
-#include <NMTTools_PaveFiller.ixx>
+#include <NMTTools_PaveFiller.hxx>
#include <Geom_Surface.hxx>
//=======================================================================
// function: PrepareFace
-// purpose:
+// purpose:
//=======================================================================
- void NMTTools_PaveFiller::PrepareFace(const Standard_Integer nF,
+ void NMTTools_PaveFiller::PrepareFace(const Standard_Integer nF,
TopoDS_Face& newFace)
{
Standard_Boolean bToReverse, bIsDegenerated;
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile
-#define _NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile
-#include <Handle_NMTTools_StdMapNodeOfMapOfPaveBlock.hxx>
-#endif
-
-#ifndef _BOPTools_PaveBlock_HeaderFile
-#include <BOPTools_PaveBlock.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-class BOPTools_PaveBlock;
-class BOPTools_PaveBlockMapHasher;
-class NMTTools_MapOfPaveBlock;
-class NMTTools_MapIteratorOfMapOfPaveBlock;
-
-
-
-class NMTTools_StdMapNodeOfMapOfPaveBlock : public TCollection_MapNode {
-
-public:
- // Methods PUBLIC
- //
-
-NMTTools_StdMapNodeOfMapOfPaveBlock(const BOPTools_PaveBlock& K,const TCollection_MapNodePtr& n);
-
- BOPTools_PaveBlock& Key() const;
-//Standard_EXPORT ~NMTTools_StdMapNodeOfMapOfPaveBlock();
-
-
-
-
- // 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
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-BOPTools_PaveBlock myKey;
-
-
-};
-
-#define TheKey BOPTools_PaveBlock
-#define TheKey_hxx <BOPTools_PaveBlock.hxx>
-#define Hasher BOPTools_PaveBlockMapHasher
-#define Hasher_hxx <BOPTools_PaveBlockMapHasher.hxx>
-#define TCollection_StdMapNode NMTTools_StdMapNodeOfMapOfPaveBlock
-#define TCollection_StdMapNode_hxx <NMTTools_StdMapNodeOfMapOfPaveBlock.hxx>
-#define TCollection_MapIterator NMTTools_MapIteratorOfMapOfPaveBlock
-#define TCollection_MapIterator_hxx <NMTTools_MapIteratorOfMapOfPaveBlock.hxx>
-#define Handle_TCollection_StdMapNode Handle_NMTTools_StdMapNodeOfMapOfPaveBlock
-#define TCollection_StdMapNode_Type_() NMTTools_StdMapNodeOfMapOfPaveBlock_Type_()
-#define TCollection_Map NMTTools_MapOfPaveBlock
-#define TCollection_Map_hxx <NMTTools_MapOfPaveBlock.hxx>
-
-#include <TCollection_StdMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_StdMapNode
-#undef TCollection_StdMapNode_hxx
-#undef TCollection_MapIterator
-#undef TCollection_MapIterator_hxx
-#undef Handle_TCollection_StdMapNode
-#undef TCollection_StdMapNode_Type_
-#undef TCollection_Map
-#undef TCollection_Map_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_StdMapNodeOfMapOfPaveBlock.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _BOPTools_PaveBlock_HeaderFile
-#include <BOPTools_PaveBlock.hxx>
-#endif
-#ifndef _BOPTools_PaveBlockMapHasher_HeaderFile
-#include <BOPTools_PaveBlockMapHasher.hxx>
-#endif
-#ifndef _NMTTools_MapOfPaveBlock_HeaderFile
-#include <NMTTools_MapOfPaveBlock.hxx>
-#endif
-#ifndef _NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile
-#include <NMTTools_MapIteratorOfMapOfPaveBlock.hxx>
-#endif
-//NMTTools_StdMapNodeOfMapOfPaveBlock::~NMTTools_StdMapNodeOfMapOfPaveBlock() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& NMTTools_StdMapNodeOfMapOfPaveBlock_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- 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("NMTTools_StdMapNodeOfMapOfPaveBlock",
- sizeof(NMTTools_StdMapNodeOfMapOfPaveBlock),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(NMTTools_StdMapNodeOfMapOfPaveBlock) Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(NMTTools_StdMapNodeOfMapOfPaveBlock) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(NMTTools_StdMapNodeOfMapOfPaveBlock))) {
- _anOtherObject = Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)((Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& NMTTools_StdMapNodeOfMapOfPaveBlock::DynamicType() const
-{
- return STANDARD_TYPE(NMTTools_StdMapNodeOfMapOfPaveBlock) ;
-}
-//Standard_Boolean NMTTools_StdMapNodeOfMapOfPaveBlock::IsKind(const Handle(Standard_Type)& AType) const
-//{
-// return (STANDARD_TYPE(NMTTools_StdMapNodeOfMapOfPaveBlock) == AType || TCollection_MapNode::IsKind(AType));
-//}
-//Handle_NMTTools_StdMapNodeOfMapOfPaveBlock::~Handle_NMTTools_StdMapNodeOfMapOfPaveBlock() {}
-#define TheKey BOPTools_PaveBlock
-#define TheKey_hxx <BOPTools_PaveBlock.hxx>
-#define Hasher BOPTools_PaveBlockMapHasher
-#define Hasher_hxx <BOPTools_PaveBlockMapHasher.hxx>
-#define TCollection_StdMapNode NMTTools_StdMapNodeOfMapOfPaveBlock
-#define TCollection_StdMapNode_hxx <NMTTools_StdMapNodeOfMapOfPaveBlock.hxx>
-#define TCollection_MapIterator NMTTools_MapIteratorOfMapOfPaveBlock
-#define TCollection_MapIterator_hxx <NMTTools_MapIteratorOfMapOfPaveBlock.hxx>
-#define Handle_TCollection_StdMapNode Handle_NMTTools_StdMapNodeOfMapOfPaveBlock
-#define TCollection_StdMapNode_Type_() NMTTools_StdMapNodeOfMapOfPaveBlock_Type_()
-#define TCollection_Map NMTTools_MapOfPaveBlock
-#define TCollection_Map_hxx <NMTTools_MapOfPaveBlock.hxx>
-#include <TCollection_StdMapNode.gxx>
-
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTTools_Tools.cdl
--- Created: Mon Dec 8 10:32:34 2003
--- Author: Peter KURNEV
--- <pkv@irinox>
---
-class Tools from NMTTools
-
- ---Purpose:
-
-uses
- Vertex from TopoDS,
- Edge from TopoDS,
- Face from TopoDS,
- Context from IntTools,
- Curve from Geom2d,
-
- ListOfShape from TopTools,
- IndexedDataMapOfIntegerIndexedMapOfInteger from BOPTColStd,
- CArray1OfVVInterference from BOPTools,
- CArray1OfSSInterference from BOPTools,
- ListOfCoupleOfShape from NMTTools,
- IndexedDataMapOfShapeIndexedMapOfShape from NMTTools
-
---raises
-
-is
- MakeNewVertex (myclass;
- aLV : ListOfShape from TopTools;
- aNewVertex: out Vertex from TopoDS);
- FindChains(myclass;
- aVVs:CArray1OfVVInterference from BOPTools;
- aMCX: out IndexedDataMapOfIntegerIndexedMapOfInteger from BOPTColStd);
-
- FindChains(myclass;
- aVVs:CArray1OfSSInterference from BOPTools;
- aMCX: out IndexedDataMapOfIntegerIndexedMapOfInteger from BOPTColStd);
-
- FindChains(myclass;
- aMCV: IndexedDataMapOfIntegerIndexedMapOfInteger from BOPTColStd;
- aMCX: out IndexedDataMapOfIntegerIndexedMapOfInteger from BOPTColStd);
-
-
- IsSplitInOnFace(myclass;
- aE : Edge from TopoDS;
- aF : Face from TopoDS;
- aCtx: Context from IntTools)
- returns Boolean from Standard;
-
- AreFacesSameDomain(myclass;
- aF1 : Face from TopoDS;
- aF2 : Face from TopoDS;
- aCtx : Context from IntTools)
- returns Boolean from Standard;
-
- FindChains(myclass;
- aLCS:ListOfCoupleOfShape from NMTTools;
- aM :out IndexedDataMapOfShapeIndexedMapOfShape from NMTTools);
-
- FindChains(myclass;
- aM1: IndexedDataMapOfShapeIndexedMapOfShape from NMTTools;
- aM2:out IndexedDataMapOfShapeIndexedMapOfShape from NMTTools);
-
- MakePCurve(myclass;
- aE : Edge from TopoDS;
- aF : Face from TopoDS;
- aC2D : Curve from Geom2d);
-
- UpdateEdge(myclass;
- aE : Edge from TopoDS;
- aTol : Real from Standard);
---fields
-
-end Tools;
// File: NMTTools_Tools.cxx
// Created: Mon Dec 8 10:35:15 2003
// Author: Peter KURNEV
+// <pkv@irinox>
+//
+#include <NMTTools_Tools.hxx>
-#include <NMTTools_Tools.ixx>
+#include <TColStd_IndexedMapOfInteger.hxx>
-#include <Basics_OCCTVersion.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_XYZ.hxx>
+#include <gp_Pnt2d.hxx>
-#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-#include <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#include <NMTTools_CoupleOfShape.hxx>
+#include <Geom_Surface.hxx>
+#include <GeomAPI_ProjectPointOnSurf.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Edge.hxx>
-#include <TopoDS_Iterator.hxx>
#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <BRepTools.hxx>
-#include <BRepLib.hxx>
#include <BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx>
#include <BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx>
#include <BOPTools_VVInterference.hxx>
#include <BOPTools_SSInterference.hxx>
+
#include <BOPTools_Tools2D.hxx>
-#include <BOPTools_Tools3D.hxx>
#include <BOPTools_Tools.hxx>
-
+#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
+#include <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
+#include <NMTTools_CoupleOfShape.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <Geom2d_Curve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_TrimmedCurve.hxx>
-#include <Geom_Surface.hxx>
-#include <GeomAPI_ProjectPointOnSurf.hxx>
-#include <Geom2d_Curve.hxx>
-
-#include <TColStd_IndexedMapOfInteger.hxx>
-
-#include <gp_Pnt.hxx>
-#include <gp_XYZ.hxx>
-#include <gp_Pnt2d.hxx>
+#include <BOPTools_Tools2D.hxx>
+#include <BRepLib.hxx>
+#include <BOPTools_Tools3D.hxx>
+#include <TopExp_Explorer.hxx>
+//
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_MapIteratorOfMapOfShape.hxx>
+#include <TopoDS_Iterator.hxx>
static
void ProcessBlock(const Standard_Integer iV,
void NMTTools_Tools::MakePCurve(const TopoDS_Edge& aE,
const TopoDS_Face& aF,
const Handle(Geom2d_Curve)& aC2Dx1)
+
{
Standard_Real aTolE, aT1, aT2, aOutFirst, aOutLast, aOutTol;
Handle(Geom2d_Curve) aC2D, aC2DA;
//=======================================================================
Standard_Boolean NMTTools_Tools::IsSplitInOnFace(const TopoDS_Edge& aE,
const TopoDS_Face& aF,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aContext)
-#else
- IntTools_Context& aContext)
-#endif
{
Standard_Boolean bFlag;
Standard_Real aT, aTolE, aTolF, aTol, aDist, aU, aV;
aTolF=BRep_Tool::Tolerance(aF);
aTol=aTolE+aTolF;
//
-#if OCC_VERSION_LARGE > 0x06050200
GeomAPI_ProjectPointOnSurf& aProjector=aContext->ProjPS(aF);
-#else
- GeomAPI_ProjectPointOnSurf& aProjector=aContext.ProjPS(aF);
-#endif
//
aT=BOPTools_Tools2D::IntermediatePoint(aE);
BOPTools_Tools::PointOnEdge(aE, aT, aP);
//
aProjector.LowerDistanceParameters(aU, aV);
aP2D.SetCoord(aU, aV);
-#if OCC_VERSION_LARGE > 0x06050200
bFlag=aContext->IsPointInOnFace (aF, aP2D);
-#else
- bFlag=aContext.IsPointInOnFace (aF, aP2D);
-#endif
return bFlag;
}
//=======================================================================
//=======================================================================
Standard_Boolean NMTTools_Tools::AreFacesSameDomain(const TopoDS_Face& aF1x,
const TopoDS_Face& aF2y,
-#if OCC_VERSION_LARGE > 0x06050200
const Handle(IntTools_Context)& aCtx)
-#else
- IntTools_Context& aCtx)
-#endif
{
Standard_Boolean bFlag;
// Modified Thu Sep 14 14:35:18 2006
for (; aIt.More(); aIt.Next()) {
const TopoDS_Edge& aE=TopoDS::Edge(aIt.Key());
BOPTools_Tools3D::PointNearEdge(aE, aF1, aP2D, aP);
-#if OCC_VERSION_LARGE > 0x06050200
bFlag=aCtx->IsValidPointForFace(aP, aF2, aTol);
-#else
- bFlag=aCtx.IsValidPointForFace(aP, aF2, aTol);
-#endif
break;
}
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File: NMTTools_Tools.hxx
+// Created: Mon Dec 8 10:35:15 2003
+// Author: Peter KURNEV
+// <pkv@irinox>
+
#ifndef _NMTTools_Tools_HeaderFile
#define _NMTTools_Tools_HeaderFile
-#ifndef _Standard_HeaderFile
#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
-#endif
-
-#include <Basics_OCCTVersion.hxx>
-
-#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Handle_Geom2d_Curve_HeaderFile
+#include <Handle_IntTools_Context.hxx>
#include <Handle_Geom2d_Curve.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
-#endif
-
-#if OCC_VERSION_LARGE > 0x06050200
-#include <Handle_IntTools_Context.hxx>
-#else
-class IntTools_Context;
-#endif
-
-class TopTools_ListOfShape;
-class TopoDS_Vertex;
-class BOPTools_CArray1OfVVInterference;
-class BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger;
-class BOPTools_CArray1OfSSInterference;
-class TopoDS_Edge;
-class TopoDS_Face;
-class NMTTools_ListOfCoupleOfShape;
-class NMTTools_IndexedDataMapOfShapeIndexedMapOfShape;
-class Geom2d_Curve;
-
+#include <TopTools_ListOfShape.hxx>
+#include <TopoDS_Vertex.hxx>
+#include <BOPTools_CArray1OfVVInterference.hxx>
+#include <BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx>
+#include <BOPTools_CArray1OfSSInterference.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Face.hxx>
+#include <IntTools_Context.hxx>
+#include <NMTTools_ListOfCoupleOfShape.hxx>
+#include <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
+#include <Geom2d_Curve.hxx>
+
+//=======================================================================
+//function : NMTTools_Tools
+//purpose :
+//=======================================================================
class NMTTools_Tools {
-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);
- }
-
-
- Standard_EXPORT static void MakeNewVertex(const TopTools_ListOfShape& aLV,TopoDS_Vertex& aNewVertex) ;
-
- Standard_EXPORT static void FindChains(const BOPTools_CArray1OfVVInterference& aVVs,BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
-
- Standard_EXPORT static void FindChains(const BOPTools_CArray1OfSSInterference& aVVs,BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
-
- Standard_EXPORT static void FindChains(const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV,BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
-
- Standard_EXPORT static Standard_Boolean IsSplitInOnFace (const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& aCtx);
-#else
- IntTools_Context& aCtx);
-#endif
-
- Standard_EXPORT static Standard_Boolean AreFacesSameDomain (const TopoDS_Face& aF1,
- const TopoDS_Face& aF2,
-#if OCC_VERSION_LARGE > 0x06050200
- const Handle(IntTools_Context)& aCtx);
-#else
- IntTools_Context& aCtx);
-#endif
-
- Standard_EXPORT static void FindChains(const NMTTools_ListOfCoupleOfShape& aLCS,NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM) ;
-
- Standard_EXPORT static void FindChains(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM1,NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM2) ;
-
- Standard_EXPORT static void MakePCurve(const TopoDS_Edge& aE,const TopoDS_Face& aF,const Handle(Geom2d_Curve)& aC2D) ;
-
- Standard_EXPORT static void UpdateEdge(const TopoDS_Edge& aE,const Standard_Real aTol) ;
-
-protected:
-
-private:
+ public:
+ Standard_EXPORT
+ static void MakeNewVertex(const TopTools_ListOfShape& aLV,
+ TopoDS_Vertex& aNewVertex) ;
+
+ Standard_EXPORT
+ static void FindChains(const BOPTools_CArray1OfVVInterference& aVVs,
+ BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
+
+ Standard_EXPORT
+ static void FindChains(const BOPTools_CArray1OfSSInterference& aVVs,
+ BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
+
+ Standard_EXPORT
+ static void FindChains(const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV,
+ BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
+
+ Standard_EXPORT
+ static Standard_Boolean IsSplitInOnFace(const TopoDS_Edge& aE,
+ const TopoDS_Face& aF,
+ const Handle(IntTools_Context)& aCtx) ;
+
+ Standard_EXPORT
+ static Standard_Boolean AreFacesSameDomain(const TopoDS_Face& aF1,
+ const TopoDS_Face& aF2,
+ const Handle(IntTools_Context)& aCtx) ;
+
+ Standard_EXPORT
+ static void FindChains(const NMTTools_ListOfCoupleOfShape& aLCS,
+ NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM) ;
+
+ Standard_EXPORT
+ static void FindChains(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM1,
+ NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM2) ;
+
+ Standard_EXPORT
+ static void MakePCurve(const TopoDS_Edge& aE,
+ const TopoDS_Face& aF,
+ const Handle(Geom2d_Curve)& aC2D) ;
+
+ Standard_EXPORT
+ static void UpdateEdge(const TopoDS_Edge& aE,
+ const Standard_Real aTol) ;
};
-
-// other Inline functions and methods (like "C++: function call" methods)
-
#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 <NMTTools_Tools.jxx>
-
-
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 _TopTools_ListOfShape_HeaderFile
-#include <TopTools_ListOfShape.hxx>
-#endif
-#ifndef _TopoDS_Vertex_HeaderFile
-#include <TopoDS_Vertex.hxx>
-#endif
-#ifndef _BOPTools_CArray1OfVVInterference_HeaderFile
-#include <BOPTools_CArray1OfVVInterference.hxx>
-#endif
-#ifndef _BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger_HeaderFile
-#include <BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx>
-#endif
-#ifndef _BOPTools_CArray1OfSSInterference_HeaderFile
-#include <BOPTools_CArray1OfSSInterference.hxx>
-#endif
-#ifndef _TopoDS_Edge_HeaderFile
-#include <TopoDS_Edge.hxx>
-#endif
-#ifndef _TopoDS_Face_HeaderFile
-#include <TopoDS_Face.hxx>
-#endif
-#ifndef _IntTools_Context_HeaderFile
-#include <IntTools_Context.hxx>
-#endif
-#ifndef _NMTTools_ListOfCoupleOfShape_HeaderFile
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#endif
-#ifndef _NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
-#include <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#endif
-#ifndef _Geom2d_Curve_HeaderFile
-#include <Geom2d_Curve.hxx>
-#endif
-#ifndef _NMTTools_Tools_HeaderFile
-#include <NMTTools_Tools.hxx>
-#endif
+++ /dev/null
-NMTTools_PaveFiller_0.cxx
-NMTTools_PaveFiller_1.cxx
-NMTTools_PaveFiller_2.cxx
-NMTTools_PaveFiller_3.cxx
-NMTTools_PaveFiller_4.cxx
-NMTTools_PaveFiller_5.cxx
-NMTTools_PaveFiller_6.cxx
-NMTTools_PaveFiller_7.cxx
-NMTTools_PaveFiller_8.cxx
-NMTTools_PaveFiller_9.cxx
-
-
-NMTTools_CoupleOfShape.hxx
-NMTTools_CoupleOfShape.cxx
-NMTTools_CommonBlock.hxx
-NMTTools_CommonBlock.cxx
-NMTTools_CommonBlockAPI.hxx
-NMTTools_CommonBlockAPI.cxx
-NMTTools_FaceInfo.hxx
-NMTTools_FaceInfo.cxx
-NMTTools_FaceInfo.lxx
-NMTTools_Tools.hxx
-NMTTools_Tools.cxx
-NMTTools_PaveFiller.hxx
-NMTTools_PaveFiller.cxx
-NMTTools_PPaveFiller.hxx
-NMTTools_DEProcessor.hxx
-NMTTools_DEProcessor.cxx
-NMTTools_CheckerSI.hxx
-NMTTools_CheckerSI.cxx
-NMTTools_CheckerSI_1.cxx
-
-NMTTools_ListOfCommonBlock.hxx
-NMTTools_ListIteratorOfListOfCommonBlock.hxx
-NMTTools_ListOfCoupleOfShape.hxx
-NMTTools_ListIteratorOfListOfCoupleOfShape.hxx
-
-NMTTools_MapOfPaveBlock.hxx
-NMTTools_MapIteratorOfMapOfPaveBlock.hxx
-
-NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx
-NMTTools_IndexedDataMapOfShapePaveBlock.hxx
-NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx
-
-NMTTools_DataMapOfIntegerListOfPaveBlock.hxx
-NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx
-
-NMTTools_DataMapOfIntegerFaceInfo.hxx
-NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx
-
-NMTTools_CommonBlockPool.hxx
-NMTTools_CommonBlockPool.cxx
+++ /dev/null
-# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# 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
-#
-
-# GEOM NMTTools : partition algorithm
-# File : Makefile.in
-# Author : Julia DOROVSKIKH
-# Modified by : Alexander BORODIN (OCN) - autotools usage
-# Module : GEOM
-
-include $(top_srcdir)/adm_local/unix/make_common_starter.am
-
-# header files
-salomeinclude_HEADERS = \
- NMTTools_CheckerSI.hxx \
- NMTTools_CommonBlockAPI.hxx \
- NMTTools_CommonBlock.hxx \
- NMTTools_CommonBlockPool.hxx \
- NMTTools_CoupleOfShape.hxx \
- NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx \
- NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx \
- NMTTools_DataMapOfIntegerFaceInfo.hxx \
- NMTTools_DataMapOfIntegerListOfPaveBlock.hxx \
- NMTTools_DEProcessor.hxx \
- NMTTools_FaceInfo.hxx \
- NMTTools_FaceInfo.lxx \
- NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx \
- NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx \
- NMTTools_IndexedDataMapOfShapePaveBlock.hxx \
- NMTTools_ListIteratorOfListOfCommonBlock.hxx \
- NMTTools_ListIteratorOfListOfCoupleOfShape.hxx \
- NMTTools_ListOfCommonBlock.hxx \
- NMTTools_ListOfCoupleOfShape.hxx \
- NMTTools_MapIteratorOfMapOfPaveBlock.hxx \
- NMTTools_MapOfPaveBlock.hxx \
- NMTTools_PaveFiller.hxx \
- NMTTools_PPaveFiller.hxx \
- NMTTools_Tools.hxx
-
-# Libraries targets
-lib_LTLIBRARIES = libNMTTools.la
-
-dist_libNMTTools_la_SOURCES = \
- NMTTools_CheckerSI.cxx \
- NMTTools_CheckerSI_1.cxx \
- NMTTools_CommonBlockAPI.cxx \
- NMTTools_CommonBlock.cxx \
- NMTTools_CommonBlockPool.cxx \
- NMTTools_CoupleOfShape.cxx \
- NMTTools_DEProcessor.cxx \
- NMTTools_FaceInfo.cxx \
- NMTTools_PaveFiller_0.cxx \
- NMTTools_PaveFiller_1.cxx \
- NMTTools_PaveFiller_2.cxx \
- NMTTools_PaveFiller_3.cxx \
- NMTTools_PaveFiller_4.cxx \
- NMTTools_PaveFiller_5.cxx \
- NMTTools_PaveFiller_6.cxx \
- NMTTools_PaveFiller_7.cxx \
- NMTTools_PaveFiller_8.cxx \
- NMTTools_PaveFiller_9.cxx \
- NMTTools_PaveFiller.cxx \
- NMTTools_Tools.cxx
-
-# additional information to compile and link file
-
-libNMTTools_la_CPPFLAGS = \
- $(CAS_CPPFLAGS) \
- $(KERNEL_CXXFLAGS) \
- -I$(srcdir)/../$(NMTDS_VAR)
-
-libNMTTools_la_LDFLAGS = \
- ../$(NMTDS_VAR)/libNMTDS.la \
- $(STDLIB) \
- $(CAS_LDPATH) -lTKBool -lTKBO \
- $(KERNEL_LDFLAGS)
-
-CDL_FILES = \
- NMTTools.cdl
-
-EXTRA_DIST += \
- $(CDL_FILES) \
- FILES
+++ /dev/null
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- 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: NMTTools.cdl
--- Created: Thu Dec 4 16:55:49 2003
--- Author: Peter KURNEV
--- <pkv@irinox>
---
-package NMTTools
-
- ---Purpose:
-
-uses
-
- TCollection,
- TColStd,
- gp,
- TopAbs,
- TopoDS,
- TopTools,
- Geom2d,
- BooleanOperations,
- BOPTColStd,
- IntTools,
- BOPTools,
- NMTDS
-
-is
- imported CoupleOfShape from NMTTools;
- imported CommonBlock from NMTTools;
- imported CommonBlockAPI from NMTTools;
- imported FaceInfo from NMTTools;
- imported Tools from NMTTools;
- imported PaveFiller from NMTTools;
- imported PPaveFiller from NMTTools;
- imported DEProcessor from NMTTools;
- imported CheckerSI from NMTTools;
- --
- imported ListOfCommonBlock from NMTTools;
- imported ListIteratorOfListOfCommonBlock from NMTTools;
-
- imported ListOfCoupleOfShape from NMTTools;
- imported ListIteratorOfListOfCoupleOfShape from NMTTools;
-
- imported MapOfPaveBlock from NMTTools;
- imported MapIteratorOfMapOfPaveBlock from NMTTools;
-
- imported IndexedDataMapOfIndexedMapOfInteger from NMTTools;
- imported IndexedDataMapOfShapePaveBlock from NMTTools;
- imported IndexedDataMapOfShapeIndexedMapOfShape from NMTTools;
-
- imported DataMapOfIntegerListOfPaveBlock from NMTTools;
- imported DataMapIteratorOfDataMapOfIntegerListOfPaveBlock from NMTTools;
-
- imported DataMapOfIntegerFaceInfo from NMTTools;
- imported DataMapIteratorOfDataMapOfIntegerFaceInfo from NMTTools;
-
- imported CommonBlockPool from NMTTools;
-
- --
- --class PaveFiller;
- --class Tools;
- --class CommonBlock;
- --class CommonBlockAPI;
- --class FaceInfo;
- --class CoupleOfShape;
- --class CheckerSI;
- --class DEProcessor;
- --pointer PPaveFiller to PaveFiller from NMTTools;
- --
- --class ListOfCommonBlock instantiates
- -- List from TCollection(CommonBlock from NMTTools);
-
- --class ListOfCoupleOfShape instantiates
- -- List from TCollection(CoupleOfShape from NMTTools);
---
- --class MapOfPaveBlock instantiates
- -- Map from TCollection (PaveBlock from BOPTools,
- -- PaveBlockMapHasher from BOPTools);
---
- --class IndexedDataMapOfIndexedMapOfInteger instantiates
- -- IndexedDataMap from TCollection (Integer from Standard,
- -- IndexedMapOfInteger from TColStd,
- -- MapIntegerHasher from TColStd);
-
- --class IndexedDataMapOfShapePaveBlock instantiates
- -- IndexedDataMap from TCollection (Shape from TopoDS,
- -- PaveBlock from BOPTools,
- -- ShapeMapHasher from TopTools);
-
- --class IndexedDataMapOfShapeIndexedMapOfShape instantiates
- -- IndexedDataMap from TCollection (Shape from TopoDS,
- -- IndexedMapOfShape from TopTools,
- -- ShapeMapHasher from TopTools);
-
---
- --class DataMapOfIntegerListOfPaveBlock instantiates
- -- DataMap from TCollection(Integer from Standard,
- -- ListOfPaveBlock from BOPTools,
- -- MapIntegerHasher from TColStd);
-
- --class DataMapOfIntegerFaceInfo instantiates
- -- DataMap from TCollection(Integer from Standard,
- -- FaceInfo from NMTTools,
- -- MapIntegerHasher from TColStd);
---
- --class CommonBlockPool instantiates
- -- CArray1 from BOPTColStd (ListOfCommonBlock from NMTTools);
---
-end NMTTools;
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTTools_CheckerSI.cxx
-// Created: Mon Feb 19 11:32:08 2007
-// Author: Peter KURNEV
-//
-#include <NMTTools_CheckerSI.hxx>
-
-#include <NMTDS_ShapesDataStructure.hxx>
-#include <NMTDS_IteratorCheckerSI.hxx>
-#include <NMTDS_InterfPool.hxx>
-#include <NMTTools_DEProcessor.hxx>
-#include <IntTools_Context.hxx>
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- NMTTools_CheckerSI::NMTTools_CheckerSI()
-:
- NMTTools_PaveFiller()
-{
- myStopStatus=0;
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
- NMTTools_CheckerSI::~NMTTools_CheckerSI()
-{
-}
-//=======================================================================
-//function : Clear
-//purpose :
-//=======================================================================
- void NMTTools_CheckerSI::Clear()
-{
- NMTTools_PaveFiller::Clear();
-}
-//=======================================================================
-//function : StopStatus
-//purpose :
-//=======================================================================
- Standard_Integer NMTTools_CheckerSI::StopStatus()const
-{
- return myStopStatus;
-}
-//=======================================================================
-//function : Init
-//purpose :
-//=======================================================================
- void NMTTools_CheckerSI::Init()
-{
- myIsDone=Standard_False;
- if (myCompositeShape.IsNull()) {
- return;
- }
- //
- Clear();
- // 1.
- myDS=new NMTDS_ShapesDataStructure;
- myDS->SetCompositeShape(myCompositeShape);
- myDS->Init();
- //
- // 2.
- myDSIt=new NMTDS_IteratorCheckerSI;
- myDSIt->SetDS(myDS);
- myDSIt->Prepare();
- //
- // 3.
- myNbSources=myDS->NumberOfShapesOfTheObject()+
- myDS->NumberOfShapesOfTheTool();
- myNbEdges=myDS->NbEdges();
- // 4
- myIP=new NMTDS_InterfPool;
- //
- // 5
- myContext=new IntTools_Context;
-}
-//=======================================================================
-//function : Perform
-//purpose :
-//=======================================================================
- void NMTTools_CheckerSI::Perform()
-{
- myIsDone=Standard_False;
- myStopStatus=0;
- //
- Init();
- //1.VV
- //
- PerformVV();
- //
- // 2.VE
- myPavePool.Resize (myNbEdges);
-
- PrepareEdges();
- //
- PerformVE();
- //
- // 3.VF
- PerformVF();
- //
- // 4.EE
- myCommonBlockPool.Resize (myNbEdges);
- mySplitShapesPool.Resize (myNbEdges);
- myPavePoolNew .Resize (myNbEdges);
- //
- PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE);
- if (myStopStatus) {
- return;
- }
- PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE);
- if (myStopStatus) {
- return;
- }
- //
- PerformEE();
- //
- RefinePavePool ();
- if (myStopStatus) {
- return;
- }
- //
- myPavePoolNew.Destroy();
- myPavePoolNew.Resize (myNbEdges);
- //
- // 5.EF
- PreparePaveBlocks(TopAbs_EDGE, TopAbs_FACE);
- if (myStopStatus) {
- return;
- }
- //
- PerformEF();
- //
- RefinePavePool();
- if (myStopStatus) {
- return;
- }
- //
- myPavePoolNew.Destroy();
- //
- MakeSplitEdges();
- //
- UpdateCommonBlocks();
- //
- // 6. FF
- PerformFF ();
- //
- MakeBlocks();
- //
- MakePCurves();
- //
- // 7. Postprocessing
- UpdatePaveBlocks();
- //
- NMTTools_DEProcessor aDEP(*this);
- aDEP.Do();
- //
- MakeAloneVertices();
- //
- myIsDone=Standard_True;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTTools_CheckerSI.hxx
-// Created: Mon Feb 19 11:32:08 2007
-// Author: Peter KURNEV
-//
-#ifndef _NMTTools_CheckerSI_HeaderFile
-#define _NMTTools_CheckerSI_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <NMTTools_PaveFiller.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-
-//=======================================================================
-//class : NMTTools_CheckerSI
-//purpose :
-//=======================================================================
-class NMTTools_CheckerSI : public NMTTools_PaveFiller
-{
- public:
- Standard_EXPORT
- NMTTools_CheckerSI();
-
- Standard_EXPORT
- virtual ~NMTTools_CheckerSI();
-
- Standard_EXPORT
- virtual void Perform() ;
-
- Standard_EXPORT
- Standard_Integer StopStatus() const;
-
- protected:
- Standard_EXPORT
- virtual void Init() ;
-
- Standard_EXPORT
- virtual void Clear() ;
-
- Standard_EXPORT
- virtual void PreparePaveBlocks(const Standard_Integer nE) ;
-
- Standard_EXPORT
- virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2) ;
-
-
- Standard_Integer myStopStatus;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTTools_CheckerSI.cxx
-// Created: Mon Feb 19 11:32:08 2007
-// Author: Peter KURNEV
-//
-#include <NMTTools_CheckerSI.hxx>
-#include <NMTDS_ShapesDataStructure.hxx>
-#include <NMTDS_IteratorCheckerSI.hxx>
-
-#include <NMTDS_InterfPool.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <TopoDS.hxx>
-#include <BRep_Tool.hxx>
-#include <BOPTools_PaveSet.hxx>
-#include <BOPTools_PaveBlockIterator.hxx>
-#include <BOPTools_PaveBlock.hxx>
-#include <IntTools_Range.hxx>
-#include <BOPTools_Pave.hxx>
-#include <IntTools_ShrunkRange.hxx>
-#include <BOPTColStd_Failure.hxx>
-#include <BOPTColStd_Dump.hxx>
-#include <Geom_Curve.hxx>
-#include <gp_Pnt.hxx>
-
-
-
-static
- Standard_Boolean IsValid(const TopoDS_Edge& aE,
- const TopoDS_Vertex& aV,
- const Standard_Real aTV1,
- const Standard_Real aTV2);
-
-//=======================================================================
-// function: PreparePaveBlocks
-// purpose:
-//=======================================================================
- void NMTTools_CheckerSI::PreparePaveBlocks(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2)
-{
- NMTTools_PaveFiller::PreparePaveBlocks(aType1, aType2);
-}
-//=======================================================================
-// function: PreparePaveBlocks
-// purpose:
-//=======================================================================
- void NMTTools_CheckerSI::PreparePaveBlocks(const Standard_Integer nE)
-{
- myIsDone=Standard_False;
- //
- // char buf[32]={"SR"};
- Standard_Boolean bIsValid;
- Standard_Integer nV1, nV2, iErr;
- Standard_Real aT1, aT2;
- TopoDS_Edge aE;
- TopoDS_Vertex aV1, aV2;
- //
- BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE));
- // Edge
- aE=TopoDS::Edge(myDS->Shape(nE));
- if (BRep_Tool::Degenerated(aE)) {
- myIsDone=Standard_True;
- return;
- }
- //
- BOPTools_PaveSet& aPS=myPavePool(myDS->RefEdge(nE));
-
- BOPTools_PaveBlockIterator aPBIt(nE, aPS);
- for (; aPBIt.More(); aPBIt.Next()) {
- BOPTools_PaveBlock& aPB=aPBIt.Value();
- const IntTools_Range& aRange=aPB.Range();
- //
- const BOPTools_Pave& aPave1=aPB.Pave1();
- nV1=aPave1.Index();
- aV1=TopoDS::Vertex(myDS->Shape(nV1));
- aT1=aPave1.Param();
- //
- const BOPTools_Pave& aPave2=aPB.Pave2();
- nV2=aPave2.Index();
- aV2=TopoDS::Vertex(myDS->Shape(nV2));
- aT2=aPave2.Param();
- //
- bIsValid=Standard_True;
- if (nV1==nV2) {
- bIsValid=IsValid(aE, aV1, aT1, aT2);
- if (!bIsValid) {
- //printf(" pb SR: nV nE: %d nV1:( %d %15.10lf ) nV2:( %d %15.10lf )\n", nE, nV1, aT1, nV2, aT2);
- myStopStatus=1;
- }
- }
- //
- IntTools_ShrunkRange aSR (aE, aV1, aV2, aRange, myContext);
- iErr=aSR.ErrorStatus();
- if (!aSR.IsDone()) {
- //printf(" pb SR: Done nE: %d nV1:( %d %15.10lf ) nV2:( %d %15.10lf )\n", nE, nV1, aT1, nV2, aT2);
- aSR.SetShrunkRange(aRange);
- //throw BOPTColStd_Failure(buf) ;
- }
- else if (iErr!=6) {
- CorrectShrunkRanges (0, aPave1, aSR);
- CorrectShrunkRanges (1, aPave2, aSR);
- }
- aPB.SetShrunkRange(aSR);
- aLPB.Append(aPB);
- } //for (; aPBIt.More(); aPBIt.Next())
- myIsDone=Standard_True;
-}
-
-//=======================================================================
-//function : IsValid
-//purpose :
-//=======================================================================
-Standard_Boolean IsValid(const TopoDS_Edge& aE,
- const TopoDS_Vertex& aV,
- const Standard_Real aTV1,
- const Standard_Real aTV2)
-{
- Standard_Boolean bRet;
- Standard_Integer i, aNbP, aNbP1;
- Standard_Real aTolV2, aTC1, aTC2, dT, aTC, aD2;
- Handle(Geom_Curve) aC;
- gp_Pnt aPV, aPC;
- //
- bRet=Standard_False;
- aTolV2=BRep_Tool::Tolerance(aV);
- aTolV2=aTolV2*aTolV2;
- aPV=BRep_Tool::Pnt(aV);
- aC=BRep_Tool::Curve(aE, aTC1, aTC2);
- aNbP=7;
- aNbP1=aNbP-1;
- dT=(aTV2-aTV1)/aNbP1;
- //
- for (i=1; i<aNbP-1 && !bRet ; ++i) {
- aTC=aTV1+dT*i;
- aC->D0(aTC, aPC);
- aD2=aPV.SquareDistance(aPC);
- bRet=aD2>aTolV2;
- }
- return bRet;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_CommonBlock.cxx
-// Created: Tue Dec 9 12:23:29 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTTools_CommonBlock.hxx>
-
-#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-
-//=======================================================================
-// function: NMTTools_CommonBlock::NMTTools_CommonBlock()
-// purpose:
-//=======================================================================
- NMTTools_CommonBlock::NMTTools_CommonBlock()
-{
-}
-//=======================================================================
-// function: AddPaveBlock
-// purpose:
-//=======================================================================
- void NMTTools_CommonBlock::AddPaveBlock(const BOPTools_PaveBlock& aPB)
-{
- myPaveBlocks.Append(aPB);
-}
-//=======================================================================
-// function: AddFace
-// purpose:
-//=======================================================================
- void NMTTools_CommonBlock::AddFace(const Standard_Integer aF)
-{
- myFaces.Append(aF);
-}
-//=======================================================================
-// function: AddFaces
-// purpose:
-//=======================================================================
- void NMTTools_CommonBlock::AddFaces(const TColStd_ListOfInteger& aLF)
-{
- TColStd_ListIteratorOfListOfInteger aIt(aLF);
- //
- for (; aIt.More(); aIt.Next()) {
- myFaces.Append(aIt.Value());
- }
-}
-//=======================================================================
-// function: PaveBlocks
-// purpose:
-//=======================================================================
- const BOPTools_ListOfPaveBlock& NMTTools_CommonBlock::PaveBlocks()const
-{
- return myPaveBlocks;
-}
-//=======================================================================
-// function: Faces
-// purpose:
-//=======================================================================
- const TColStd_ListOfInteger& NMTTools_CommonBlock::Faces()const
-{
- return myFaces;
-}
-//=======================================================================
-// function: PaveBlock1
-// purpose:
-//=======================================================================
- const BOPTools_PaveBlock& NMTTools_CommonBlock::PaveBlock1()const
-{
- return myPaveBlocks.First();
-}
-//=======================================================================
-// function: PaveBlock1
-// purpose:
-//=======================================================================
- BOPTools_PaveBlock& NMTTools_CommonBlock::PaveBlock1(const Standard_Integer aIx)
-{
- return PaveBlockOnEdge(aIx);
-}
-//=======================================================================
-// function: PaveBlockOnEdge
-// purpose:
-//=======================================================================
- BOPTools_PaveBlock& NMTTools_CommonBlock::PaveBlockOnEdge(const Standard_Integer aIx)
-{
- static BOPTools_PaveBlock aPBs;
- Standard_Integer aIOr;
- BOPTools_ListIteratorOfListOfPaveBlock anIt(myPaveBlocks);
- //
- for (; anIt.More(); anIt.Next()) {
- BOPTools_PaveBlock& aPB=anIt.Value();
- aIOr=aPB.OriginalEdge();
- if (aIOr==aIx){
- return aPB;
- }
- }
- return aPBs;
-}
-//=======================================================================
-// function: IsPaveBlockOnFace
-// purpose:
-//=======================================================================
- Standard_Boolean NMTTools_CommonBlock::IsPaveBlockOnFace(const Standard_Integer aIx)const
-{
- Standard_Boolean bFound=Standard_False;
- Standard_Integer nF;
- TColStd_ListIteratorOfListOfInteger anIt(myFaces);
- //
- for (; anIt.More(); anIt.Next()) {
- nF=anIt.Value();
- if (nF==aIx){
- return !bFound;
- }
- }
- return bFound;
-}
-//=======================================================================
-// function: IsPaveBlockOnEdge
-// purpose:
-//=======================================================================
- Standard_Boolean NMTTools_CommonBlock::IsPaveBlockOnEdge(const Standard_Integer aIx)const
-{
- Standard_Boolean bFound=Standard_False;
- Standard_Integer aIOr;
- BOPTools_ListIteratorOfListOfPaveBlock anIt(myPaveBlocks);
- //
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPB=anIt.Value();
- aIOr=aPB.OriginalEdge();
- if (aIOr==aIx){
- return !bFound;
- }
- }
- return bFound;
-}
-//=======================================================================
-// function: IsEqual
-// purpose:
-//=======================================================================
- Standard_Boolean NMTTools_CommonBlock::IsEqual(const NMTTools_CommonBlock& aOther)const
-{
- Standard_Boolean bFound=Standard_True;
- Standard_Integer aNb1, aNb2;
- BOPTools_ListIteratorOfListOfPaveBlock anIt;
- //
- aNb1=myPaveBlocks.Extent();
- aNb2=aOther.myPaveBlocks.Extent();
- //
- if (!aNb1 && !aNb2) {
- return bFound;
- }
- if (!aNb1) {
- return !bFound;
- }
- if (!aNb2) {
- return !bFound;
- }
- //
- const BOPTools_PaveBlock& aPB=PaveBlock1();
- //
- anIt.Initialize(aOther.myPaveBlocks);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPBOther=anIt.Value();
- if (aPB.IsEqual(aPBOther)){
- return bFound;
- }
- }
- return !bFound;
-}
-//=======================================================================
-// function: Contains
-// purpose:
-//=======================================================================
- Standard_Boolean NMTTools_CommonBlock::Contains(const BOPTools_PaveBlock& aPBx)const
-{
- Standard_Boolean bFound=Standard_False;
- Standard_Integer aNb1;
- BOPTools_ListIteratorOfListOfPaveBlock anIt;
- //
- aNb1=myPaveBlocks.Extent();
- //
- if (!aNb1) {
- return bFound;
- }
- //
- anIt.Initialize(myPaveBlocks);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPB=anIt.Value();
- if (aPB.IsEqual(aPBx)) {
- return !bFound;
- }
- }
- return bFound;
-}
-/*
-//=======================================================================
-// function: SetEdge
-// purpose:
-//=======================================================================
- void NMTTools_CommonBlock::SetEdge(const Standard_Integer anEdge)
-{
- BOPTools_ListIteratorOfListOfPaveBlock anIt;
- //
- anIt.Initialize(myPaveBlocks);
- for (; anIt.More(); anIt.Next()) {
- BOPTools_PaveBlock& aPB=anIt.Value();
- aPB.SetEdge(anEdge);
- }
-}
-//=======================================================================
-// function: Edge
-// purpose:
-//=======================================================================
- Standard_Integer NMTTools_CommonBlock::Edge()const
-{
- Standard_Integer aNb;
- //
- aNb=myPaveBlocks.Extent();
- //
- if (!aNb) {
- return aNb;
- }
- //
- const BOPTools_PaveBlock& aPB=PaveBlock1();
- aNb=aPB.Edge();
- return aNb;
-}
-*/
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_CommonBlock.hxx
-// Created: Tue Dec 9 12:23:29 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-
-#ifndef _NMTTools_CommonBlock_HeaderFile
-#define _NMTTools_CommonBlock_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <TColStd_ListOfInteger.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Boolean.hxx>
-#include <BOPTools_PaveBlock.hxx>
-
-
-//=======================================================================
-//function : NMTTools_CommonBlock
-//purpose :
-//=======================================================================
-class NMTTools_CommonBlock {
- public:
- Standard_EXPORT
- NMTTools_CommonBlock();
-
- Standard_EXPORT
- void AddPaveBlock(const BOPTools_PaveBlock& aPB) ;
-
- Standard_EXPORT
- void AddFace(const Standard_Integer aF) ;
-
- Standard_EXPORT
- void AddFaces(const TColStd_ListOfInteger& aLF) ;
-
- Standard_EXPORT
- const BOPTools_ListOfPaveBlock& PaveBlocks() const;
-
- Standard_EXPORT
- const TColStd_ListOfInteger& Faces() const;
-
- Standard_EXPORT
- const BOPTools_PaveBlock& PaveBlock1() const;
-
- Standard_EXPORT
- BOPTools_PaveBlock& PaveBlock1(const Standard_Integer anIx) ;
-
- Standard_EXPORT
- BOPTools_PaveBlock& PaveBlockOnEdge(const Standard_Integer anIndex) ;
-
- Standard_EXPORT
- Standard_Boolean IsPaveBlockOnFace(const Standard_Integer anIndex) const;
-
- Standard_EXPORT
- Standard_Boolean IsPaveBlockOnEdge(const Standard_Integer anIndex) const;
-
- Standard_EXPORT
- Standard_Boolean IsEqual(const NMTTools_CommonBlock& aCB) const;
-
- Standard_EXPORT
- Standard_Boolean Contains(const BOPTools_PaveBlock& aPB) const;
-
- protected:
- BOPTools_ListOfPaveBlock myPaveBlocks;
- TColStd_ListOfInteger myFaces;
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_CommonBlockAPI.cxx
-// Created: Mon Dec 15 11:38:04 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTTools_CommonBlockAPI.hxx>
-
-#include <BOPTools_PaveBlock.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
-
-#include <NMTTools_CommonBlock.hxx>
-#include <NMTTools_ListOfCommonBlock.hxx>
-#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-
-//=======================================================================
-// function: NMTTools_CommonBlockAPI::NMTTools_CommonBlockAPI
-// purpose:
-//=======================================================================
- NMTTools_CommonBlockAPI::NMTTools_CommonBlockAPI (const NMTTools_ListOfCommonBlock& aLCB)
-{
- myListOfCommonBlock=(void *)&aLCB;
-}
-//=======================================================================
-// function: List
-// purpose:
-//=======================================================================
- const NMTTools_ListOfCommonBlock& NMTTools_CommonBlockAPI::List () const
-{
- NMTTools_ListOfCommonBlock* pListOfCommonBlock=(NMTTools_ListOfCommonBlock*)myListOfCommonBlock;
- return *pListOfCommonBlock;
-}
-//=======================================================================
-// function: CommonPaveBlocks
-// purpose: get all CommonPaveBlocks
-//=======================================================================
- const BOPTools_ListOfPaveBlock& NMTTools_CommonBlockAPI::CommonPaveBlocks(const Standard_Integer anE) const
-{
- Standard_Integer anECurrent;
- BOPTools_ListIteratorOfListOfPaveBlock anItPB;
- //
- BOPTools_ListOfPaveBlock* pmyListOfPaveBlock=(BOPTools_ListOfPaveBlock*) &myListOfPaveBlock;
- pmyListOfPaveBlock->Clear();
-
- NMTTools_ListOfCommonBlock* pListOfCommonBlock=(NMTTools_ListOfCommonBlock*)myListOfCommonBlock;
-
- NMTTools_ListIteratorOfListOfCommonBlock anIt(*pListOfCommonBlock);
- for (; anIt.More(); anIt.Next()) {
- const NMTTools_CommonBlock& aCB=anIt.Value();
- //
- const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks();
- anItPB.Initialize(aLPB);
- for (; anItPB.More(); anItPB.Next()) {
- const BOPTools_PaveBlock& aPB=anItPB.Value();
- anECurrent=aPB.OriginalEdge();
- if (anECurrent==anE) {
- pmyListOfPaveBlock->Append(aPB);
- break;
- }
- }
- }
- return myListOfPaveBlock;
-}
-//=======================================================================
-// function: IsCommonBlock
-// purpose:
-//=======================================================================
- Standard_Boolean NMTTools_CommonBlockAPI::IsCommonBlock(const BOPTools_PaveBlock& aPB) const
-{
- Standard_Integer anE;
- //
- anE=aPB.OriginalEdge();
- //
- CommonPaveBlocks(anE);
- //
- BOPTools_ListIteratorOfListOfPaveBlock anIt(myListOfPaveBlock);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPB1=anIt.Value();
- if (aPB1.IsEqual(aPB)) {
- return Standard_True;
- }
- }
- return Standard_False;
-}
-
-//=======================================================================
-// function: CommonBlock
-// purpose:
-//=======================================================================
- NMTTools_CommonBlock& NMTTools_CommonBlockAPI::CommonBlock(const BOPTools_PaveBlock& aPB)const
-{
- static NMTTools_CommonBlock aCBTMP;
- //
- NMTTools_ListIteratorOfListOfCommonBlock anItCB;
- BOPTools_ListIteratorOfListOfPaveBlock anItPB;
- //
- NMTTools_ListOfCommonBlock* pLCB=(NMTTools_ListOfCommonBlock*)myListOfCommonBlock;
- //
- anItCB.Initialize(*pLCB);
- for (; anItCB.More(); anItCB.Next()) {
- NMTTools_CommonBlock& aCB=anItCB.ChangeValue();
- //
- const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks();
- anItPB.Initialize(aLPB);
- for (; anItPB.More(); anItPB.Next()) {
- const BOPTools_PaveBlock& aPBx=anItPB.Value();
- if (aPBx.IsEqual(aPB)) {
- return aCB;
- }
- }
- }
- return aCBTMP;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_CommonBlockAPI.hxx
-// Created: Mon Dec 15 11:38:04 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _NMTTools_CommonBlockAPI_HeaderFile
-#define _NMTTools_CommonBlockAPI_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Address.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Boolean.hxx>
-#include <NMTTools_CommonBlock.hxx>
-#include <NMTTools_ListOfCommonBlock.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <BOPTools_PaveBlock.hxx>
-
-//=======================================================================
-//class : NMTTools_CommonBlockAPI
-//purpose :
-//=======================================================================
-class NMTTools_CommonBlockAPI
-{
- public:
- Standard_EXPORT
- NMTTools_CommonBlockAPI(const NMTTools_ListOfCommonBlock& aList);
-
-//! Selector <br>
- Standard_EXPORT
- const NMTTools_ListOfCommonBlock& List() const;
-
-//! Returns all PaveBlock-s (from the list) that are <br>
-//! common for the given edge with DS-index <anE> <br>
- Standard_EXPORT
- const BOPTools_ListOfPaveBlock& CommonPaveBlocks(const Standard_Integer anE) const;
-
-//! Returns TRUE if given PaveBlock <aPB> is <br>
-//! common for the Blocks from the list <br>
- Standard_EXPORT
- Standard_Boolean IsCommonBlock(const BOPTools_PaveBlock& aPB) const;
-
- Standard_EXPORT
- NMTTools_CommonBlock& CommonBlock(const BOPTools_PaveBlock& aPB) const;
-protected:
-//private:
-
-Standard_Address myListOfCommonBlock;
-BOPTools_ListOfPaveBlock myListOfPaveBlock;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTTools_CommonBlockPool.cxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-
-
-#include <NMTTools_CommonBlockPool.hxx>
-
-#ifndef _Standard_OutOfRange_HeaderFile
-#include <Standard_OutOfRange.hxx>
-#endif
-#ifndef _Standard_OutOfMemory_HeaderFile
-#include <Standard_OutOfMemory.hxx>
-#endif
-
-
-#define Array1Item NMTTools_ListOfCommonBlock
-#define Array1Item_hxx <NMTTools_ListOfCommonBlock.hxx>
-#define BOPTColStd_CArray1 NMTTools_CommonBlockPool
-#define BOPTColStd_CArray1_hxx <NMTTools_CommonBlockPool.hxx>
-#include <BOPTColStd_CArray1.gxx>
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTTools_CommonBlockPool.hxx
-// Created:
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-
-#ifndef _NMTTools_CommonBlockPool_HeaderFile
-#define _NMTTools_CommonBlockPool_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Address.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Boolean.hxx>
-#include <NMTTools_ListOfCommonBlock.hxx>
-
-class Standard_OutOfRange;
-class Standard_OutOfMemory;
-
-
-
-//=======================================================================
-//class : NMTTools_CommonBlockPool
-//purpose :
-//=======================================================================
-class NMTTools_CommonBlockPool
-{
- public:
- Standard_EXPORT
- NMTTools_CommonBlockPool(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
-
- Standard_EXPORT
- void Resize(const Standard_Integer theNewLength) ;
-
- Standard_EXPORT
- void Destroy() ;
-
- ~NMTTools_CommonBlockPool() {
- Destroy();
- }
-
- Standard_EXPORT
- Standard_Integer Length() const;
-
- Standard_EXPORT
- Standard_Integer Extent() const;
-
- Standard_EXPORT
- Standard_Integer FactLength() const;
-
- Standard_EXPORT
- Standard_Integer Append(const NMTTools_ListOfCommonBlock& Value) ;
-
- Standard_EXPORT
- void Remove(const Standard_Integer Index) ;
-
- Standard_EXPORT
- const NMTTools_ListOfCommonBlock& Value(const Standard_Integer Index) const;
-
- const NMTTools_ListOfCommonBlock& operator ()(const Standard_Integer Index) const {
- return Value(Index);
- }
-
- Standard_EXPORT
- NMTTools_ListOfCommonBlock& ChangeValue(const Standard_Integer Index) ;
-
- NMTTools_ListOfCommonBlock& operator ()(const Standard_Integer Index) {
- return ChangeValue(Index);
- }
-
- Standard_EXPORT
- void SetBlockLength(const Standard_Integer aBL) ;
-
- Standard_EXPORT
- Standard_Integer BlockLength() const;
-
- Standard_EXPORT
- void Purge() ;
-
-protected:
-
-private:
- Standard_EXPORT
- NMTTools_CommonBlockPool(const NMTTools_CommonBlockPool& AnArray);
-
- Standard_EXPORT
- NMTTools_CommonBlockPool& Assign(const NMTTools_CommonBlockPool& Other) ;
-
- NMTTools_CommonBlockPool& operator =(const NMTTools_CommonBlockPool& Other) {
- return Assign(Other);
- }
-
- Standard_EXPORT
- Standard_Boolean IsInvalidIndex(const Standard_Integer Index) const;
-
-
- Standard_Address myStart;
- Standard_Integer myLength;
- Standard_Integer myFactLength;
- Standard_Integer myBlockLength;
- Standard_Boolean myIsAllocated;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_CoupleOfShape.cxx
-// Created: Wed Jan 28 15:06:11 2004
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTTools_CoupleOfShape.hxx>
-
-//=======================================================================
-// function: NMTTools_CoupleOfShape::NMTTools_CoupleOfShape
-// purpose:
-//=======================================================================
- NMTTools_CoupleOfShape::NMTTools_CoupleOfShape()
-{}
-//=======================================================================
-// function: SetShape1
-// purpose:
-//=======================================================================
- void NMTTools_CoupleOfShape::SetShape1(const TopoDS_Shape& aS)
-{
- myShape1=aS;
-}
-//=======================================================================
-// function: SetShape2
-// purpose:
-//=======================================================================
- void NMTTools_CoupleOfShape::SetShape2(const TopoDS_Shape& aS)
-{
- myShape2=aS;
-}
-//=======================================================================
-// function: Shape1
-// purpose:
-//=======================================================================
- const TopoDS_Shape& NMTTools_CoupleOfShape::Shape1()const
-{
- return myShape1;
-}
-//=======================================================================
-// function: Shape2
-// purpose:
-//=======================================================================
- const TopoDS_Shape& NMTTools_CoupleOfShape::Shape2()const
-{
- return myShape2;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_CoupleOfShape.hxx
-// Created: Wed Jan 28 15:06:11 2004
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _NMTTools_CoupleOfShape_HeaderFile
-#define _NMTTools_CoupleOfShape_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <TopoDS_Shape.hxx>
-
-//=======================================================================
-//class : NMTTools_CoupleOfShape
-//purpose :
-//=======================================================================
-class NMTTools_CoupleOfShape
-{
- public:
- Standard_EXPORT
- NMTTools_CoupleOfShape();
-
- Standard_EXPORT
- void SetShape1(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- void SetShape2(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- const TopoDS_Shape& Shape1() const;
-
- Standard_EXPORT
- const TopoDS_Shape& Shape2() const;
-
- protected:
- TopoDS_Shape myShape1;
- TopoDS_Shape myShape2;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_DEProcessor.cxx
-// Created: Wed Sep 12 12:10:52 2001
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTTools_DEProcessor.hxx>
-
-#include <Precision.hxx>
-
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <TColStd_ListOfInteger.hxx>
-
-#include <gp_Pnt2d.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Lin2d.hxx>
-
-#include <ElCLib.hxx>
-
-#include <Geom2d_Curve.hxx>
-#include <Geom2d_Line.hxx>
-#include <Geom2d_TrimmedCurve.hxx>
-#include <Geom2dAdaptor_Curve.hxx>
-#include <Geom2dInt_GInter.hxx>
-
-#include <IntRes2d_IntersectionPoint.hxx>
-
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Solid.hxx>
-
-#include <TopExp.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-
-#include <BRepAdaptor_Surface.hxx>
-
-#include <BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx>
-
-#include <IntTools_Tools.hxx>
-#include <IntTools_Context.hxx>
-
-#include <BOPTools_DEInfo.hxx>
-#include <BOPTools_Pave.hxx>
-#include <BOPTools_ListOfPave.hxx>
-#include <BOPTools_ListIteratorOfListOfPave.hxx>
-#include <BOPTools_PaveBlock.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
-#include <BOPTools_PaveBlockIterator.hxx>
-#include <BOPTools_SSInterference.hxx>
-#include <BOPTools_PavePool.hxx>
-#include <BOPTools_PaveSet.hxx>
-#include <BOPTools_Tools3D.hxx>
-#include <BOPTools_SequenceOfCurves.hxx>
-#include <BOPTools_Curve.hxx>
-#include <BOPTools_CArray1OfSSInterference.hxx>
-#include <BOPTools_SplitShapesPool.hxx>
-
-#include <NMTDS_ShapesDataStructure.hxx>
-#include <NMTDS_InterfPool.hxx>
-
-#include <NMTTools_PaveFiller.hxx>
-
-//=======================================================================
-// function:
-// purpose:
-//=======================================================================
- NMTTools_DEProcessor::NMTTools_DEProcessor(NMTTools_PaveFiller& aPaveFiller)
-:
- myIsDone(Standard_False)
-{
- myFiller=(NMTTools_PaveFiller*) &aPaveFiller;
- myDS=myFiller->DS();
-}
-//=======================================================================
-// function: IsDone
-// purpose:
-//=======================================================================
- Standard_Boolean NMTTools_DEProcessor::IsDone() const
-{
- return myIsDone;
-}
-//=======================================================================
-// function: Do
-// purpose:
-//=======================================================================
- void NMTTools_DEProcessor::Do()
-{
- Standard_Integer aNbE;
- //
- myIsDone=Standard_False;
- //
- FindDegeneratedEdges();
- //
- aNbE=myDEMap.Extent();
- if (!aNbE) {
- myIsDone=!myIsDone;
- return;
- }
- //
- DoPaves();
-}
-//=======================================================================
-// function: FindDegeneratedEdges
-// purpose:
-//=======================================================================
- void NMTTools_DEProcessor::FindDegeneratedEdges()
-{
- Standard_Integer i, aNb, nV, nF, nVx, ip, iRankE;
- TopoDS_Vertex aV;
- TopTools_IndexedDataMapOfShapeListOfShape aMEF;
- //
- aNb=myDS->NumberOfShapesOfTheObject();
- for (i=1; i<=aNb; ++i) {
- const TopoDS_Shape aF=myDS->Shape(i);
- if (aF.ShapeType()==TopAbs_FACE) {
- TopExp::MapShapesAndAncestors (aF, TopAbs_EDGE, TopAbs_FACE, aMEF);
- }
- }
- //
- for (i=1; i<=aNb; ++i) {
- const TopoDS_Shape aS=myDS->Shape(i);
- if (aS.ShapeType()==TopAbs_EDGE) {
- const TopoDS_Edge& aE=TopoDS::Edge(aS);
-
- if (BRep_Tool::Degenerated(aE)) {
- iRankE=myDS->Rank(i);
- aV=TopExp::FirstVertex(aE);
- nVx=myDS->ShapeIndex(aV, iRankE);
- //
- nV=nVx;
- ip=myFiller->FindSDVertex(nV);
- if (ip) {
- nV=ip;
- }
- //
- TColStd_ListOfInteger aLFn;
- const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE);
- TopTools_ListIteratorOfListOfShape anIt(aLF);
- for (; anIt.More(); anIt.Next()) {
- const TopoDS_Shape& aF=anIt.Value();
- nF=myDS->ShapeIndex(aF, iRankE);
- aLFn.Append(nF);
- }
- BOPTools_DEInfo aDEInfo;
- aDEInfo.SetVertex(nV);
- aDEInfo.SetFaces(aLFn);
-
- myDEMap.Add (i, aDEInfo);
- }
- }
- }
-}
-//=======================================================================
-// function: DoPaves
-// purpose:
-//=======================================================================
- void NMTTools_DEProcessor::DoPaves()
-{
-
- Standard_Integer i, aNbE, nED, nVD, aNbLPB, nFD;
- //
- nFD=0;
- aNbE=myDEMap.Extent();
- for (i=1; i<=aNbE; ++i) {
- nED=myDEMap.FindKey(i);
- //
- const BOPTools_DEInfo& aDEInfo=myDEMap(i);
- nVD=aDEInfo.Vertex();
- //
- // Fill PaveSet for the edge nED
- const TColStd_ListOfInteger& nLF=aDEInfo.Faces();
- TColStd_ListIteratorOfListOfInteger anIt(nLF);
- for (; anIt.More(); anIt.Next()) {
- nFD=anIt.Value();
-
- BOPTools_ListOfPaveBlock aLPB;
- FindPaveBlocks(nED, nVD, nFD, aLPB);
- //
- aNbLPB=aLPB.Extent();
- if (!aNbLPB) {
- continue;
- }
- //
- FillPaveSet (nED, nVD, nFD, aLPB);
- }
- //
- // Fill aSplitEdges for the edge nED
- FillSplitEdgesPool(nED);
- //
- // MakeSplitEdges
- MakeSplitEdges(nED, nFD);
- //
- }// next nED
-}
-//=======================================================================
-// function: FindPaveBlocks
-// purpose:
-//=======================================================================
- void NMTTools_DEProcessor::FindPaveBlocks(const Standard_Integer ,
- const Standard_Integer nVD,
- const Standard_Integer nFD,
- BOPTools_ListOfPaveBlock& aLPBOut)
-{
- BOPTools_ListIteratorOfListOfPaveBlock anIt;
- Standard_Integer i, aNb, nF2, nV;
- //
- BOPTools_CArray1OfSSInterference& aFFs=(myFiller->IP())->SSInterferences();
- //
- aNb=aFFs.Extent();
- for (i=1; i<=aNb; ++i) {
- BOPTools_SSInterference& aFF=aFFs(i);
- //
- nF2=aFF.OppositeIndex(nFD);
- if (!nF2) {
- continue;
- }
- //
- // Split Parts
- const BOPTools_ListOfPaveBlock& aLPBSplits=aFF.PaveBlocks();
- anIt.Initialize(aLPBSplits);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPBSp=anIt.Value();
- //
- const BOPTools_Pave& aPave1=aPBSp.Pave1();
- nV=aPave1.Index();
- if (nV==nVD) {
- aLPBOut.Append(aPBSp);
- continue;
- }
- //
- const BOPTools_Pave& aPave2=aPBSp.Pave2();
- nV=aPave2.Index();
- if (nV==nVD) {
- aLPBOut.Append(aPBSp);
- continue;
- }
- }
- //
- // Section Parts
- Standard_Integer j, aNbCurves;
- //
- BOPTools_SequenceOfCurves& aSC=aFF.Curves();
- aNbCurves=aSC.Length();
- for (j=1; j<=aNbCurves; ++j) {
- const BOPTools_Curve& aBC=aSC(j);
- const BOPTools_ListOfPaveBlock& aLPBSe=aBC.NewPaveBlocks();
- //
- anIt.Initialize(aLPBSe);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPBSe=anIt.Value();
- //
- const BOPTools_Pave& aPv1=aPBSe.Pave1();
- nV=aPv1.Index();
- if (nV==nVD) {
- aLPBOut.Append(aPBSe);
- continue;
- }
- //
- const BOPTools_Pave& aPv2=aPBSe.Pave2();
- nV=aPv2.Index();
- if (nV==nVD) {
- aLPBOut.Append(aPBSe);
- continue;
- }
- }
- }
- }
-}
-//=======================================================================
-// function: FillPaveSet
-// purpose:
-//=======================================================================
- void NMTTools_DEProcessor::FillPaveSet (const Standard_Integer nED,
- const Standard_Integer nVD,
- const Standard_Integer nFD,
- const BOPTools_ListOfPaveBlock& aLPB)
-{
- Standard_Boolean bIsDone, bXDir, bRejectFlag;
- Standard_Integer nE, aNbPoints, j;
- Standard_Real aTD1, aTD2, aT1, aT2, aTolInter, aX, aDT, aXx;
- gp_Pnt2d aP2d1, aP2d2, aP2D;
- gp_Lin2d aLDE;
- //
- aDT=Precision::PConfusion();
- //
- BOPTools_PaveSet& aPaveSet=
- (myFiller->ChangePavePool()).ChangeValue(myDS->RefEdge(nED));
- //
- // Clear aPaveSet, aSplitEdges
- aPaveSet.ChangeSet().Clear();
- //
- const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED));
- const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD));
- //
- // 2D Curve of degenerated edge on the face aDF
- Handle(Geom2d_Curve) aC2DDE1=BRep_Tool::CurveOnSurface(aDE, aDF, aTD1, aTD2);
- Handle(Geom2d_TrimmedCurve)aC2DDE=new Geom2d_TrimmedCurve(aC2DDE1, aTD1, aTD2);
- //
- // Choose direction for degenerated edge
- aC2DDE->D0(aTD1, aP2d1);
- aC2DDE->D0(aTD2, aP2d2);
-
- bXDir=Standard_False;
- if (fabs(aP2d1.Y()-aP2d2.Y()) < aDT){
- bXDir=!bXDir;
- }
- //
- // Prepare bounding Paves
- BOPTools_Pave aPave1 (nVD, aTD1, BooleanOperations_UnknownInterference);
- aPaveSet.Append(aPave1);
- BOPTools_Pave aPave2 (nVD, aTD2, BooleanOperations_UnknownInterference);
- aPaveSet.Append(aPave2);
- //
- // Fill other paves
- BOPTools_ListIteratorOfListOfPaveBlock anIt(aLPB);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPB=anIt.Value();
- nE=aPB.Edge();
- const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));
-
- Handle(Geom2d_Curve) aC2D=BRep_Tool::CurveOnSurface(aE, aDF, aT1, aT2);
- //
- // Intersection
- Geom2dAdaptor_Curve aGAC1, aGAC2;
- //
- aGAC1.Load(aC2DDE, aTD1, aTD2);
- Handle(Geom2d_Line) aL2D= Handle(Geom2d_Line)::DownCast(aC2D);
- if (!aL2D.IsNull()) {
- aGAC2.Load(aC2D);
- }
- else {
- aGAC2.Load(aC2D, aT1, aT2);
- }
- //
- aTolInter=0.001;
- Geom2dInt_GInter aGInter(aGAC1, aGAC2, aTolInter, aTolInter);
- bIsDone=aGInter.IsDone();
- if(bIsDone) {
- aNbPoints=aGInter.NbPoints();
- if (aNbPoints) {
- for (j=1; j<=aNbPoints; ++j) {
- aP2D=aGInter.Point(j).Value();
- Handle(Geom2d_Line) aCLDE;
- //
- //modified by NIZNHY-PKV Thu Mar 20 17:37:32 2008f
- Handle(Geom2d_TrimmedCurve) aCLDET1=
- Handle(Geom2d_TrimmedCurve)::DownCast(aC2DDE1);
- if (aCLDET1.IsNull()) {
- aCLDE=Handle(Geom2d_Line)::DownCast(aC2DDE1);
- }
- else {
- Handle(Geom2d_Curve) aBasisCurve=aCLDET1->BasisCurve();
- aCLDE=Handle(Geom2d_Line)::DownCast(aBasisCurve);
- }
- //aCLDE=Handle(Geom2d_Line)::DownCast(aC2DDE1);
- //modified by NIZNHY-PKV Thu Mar 20 17:37:37 2008t
-
- if (aCLDE.IsNull()) {
- continue;
- }
-
- aLDE=aCLDE->Lin2d();
- aX=ElCLib::Parameter(aLDE, aP2D);
- //
- if (fabs (aX-aTD1) < aDT || fabs (aX-aTD2) < aDT) {
- continue;
- }
- if (aX < aTD1 || aX > aTD2) {
- continue;
- }
- //
- bRejectFlag=Standard_False;
- const BOPTools_ListOfPave& aListOfPave=aPaveSet.Set();
- BOPTools_ListIteratorOfListOfPave aPaveIt(aListOfPave);
- for (; aPaveIt.More(); aPaveIt.Next()) {
- const BOPTools_Pave& aPavex=aPaveIt.Value();
- aXx=aPavex.Param();
- if (fabs (aX-aXx) < aDT) {
- bRejectFlag=Standard_True;
- break;
- }
- }
- if (bRejectFlag) {
- continue;
- }
- //
- BOPTools_Pave aPave(nVD, aX, BooleanOperations_UnknownInterference);
- aPaveSet.Append(aPave);
- }
- }
- }
- }
-}
-//=======================================================================
-// function: FillSplitEdgesPool
-// purpose:
-//=======================================================================
- void NMTTools_DEProcessor::FillSplitEdgesPool (const Standard_Integer nED)
-{
- BOPTools_SplitShapesPool& aSplitShapesPool=
- myFiller->ChangeSplitShapesPool();
- BOPTools_ListOfPaveBlock& aSplitEdges=
- aSplitShapesPool.ChangeValue(myDS->RefEdge(nED));
- //
- aSplitEdges.Clear();
- //
- const BOPTools_PavePool& aPavePool=myFiller->PavePool();
- BOPTools_PavePool* pPavePool=(BOPTools_PavePool*) &aPavePool;
- BOPTools_PaveSet& aPaveSet= pPavePool->ChangeValue(myDS->RefEdge(nED));
-
- BOPTools_PaveBlockIterator aPBIt(nED, aPaveSet);
- for (; aPBIt.More(); aPBIt.Next()) {
- BOPTools_PaveBlock& aPB=aPBIt.Value();
- aSplitEdges.Append(aPB);
- }
-}
-//=======================================================================
-// function: MakeSplitEdges
-// purpose:
-//=======================================================================
- void NMTTools_DEProcessor::MakeSplitEdges (const Standard_Integer nED,
- const Standard_Integer nFD)
-{
- const BOPTools_SplitShapesPool& aSplitShapesPool=myFiller->SplitShapesPool();
- const BOPTools_ListOfPaveBlock& aSplitEdges=aSplitShapesPool(myDS->RefEdge(nED));
-
- Standard_Integer nV1, nV2, aNbPB, aNewShapeIndex;
- Standard_Real t1, t2;
- TopoDS_Edge aE, aESplit;
- TopoDS_Vertex aV1, aV2;
- BOPTools_ListIteratorOfListOfPaveBlock aPBIt;
- //
- const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED));
- const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD));
- //
- //modified by NIZNHY-PKV Wed Oct 20 13:20:37 2010f
- aNbPB=aSplitEdges.Extent();
- if (aNbPB==1) {
- Standard_Real aT1, aT2, dT1, dT2, aDT;
- Handle(Geom2d_Curve) aC2D;
- //
- BOPTools_PaveBlock& aPB=aSplitEdges.First();
- //
- const BOPTools_Pave& aPave1=aPB.Pave1();
- t1=aPave1.Param();
- const BOPTools_Pave& aPave2=aPB.Pave2();
- t2=aPave2.Param();
- ////
- nV1=aPave1.Index();
- aV1=*((TopoDS_Vertex*)&myDS->GetShape(nV1));
- //
- aV2=TopExp::FirstVertex(aDE);
- if (aV2.IsSame(aV1)) {
- aC2D=BRep_Tool::CurveOnSurface(aDE, aDF, aT1, aT2);
- dT1=aT1-t1;
- if (dT1<0.) {
- dT1=-dT1;
- }
- //
- dT2=aT2-t2;
- if (dT2<0.) {
- dT2=-dT2;
- }
- aDT=Precision::PConfusion();
- if(dT1<aDT && dT2<aDT) {
- BOPTools_ListOfPaveBlock* pLPB=(BOPTools_ListOfPaveBlock*)&aSplitEdges;
- pLPB->Clear();
- return;
- }
- }
- }
- //modified by NIZNHY-PKV Wed Oct 20 13:20:39 2010t
- //
- aPBIt.Initialize(aSplitEdges);
- for (; aPBIt.More(); aPBIt.Next()) {
- BOPTools_PaveBlock& aPB=aPBIt.Value();
-
- const BOPTools_Pave& aPave1=aPB.Pave1();
- nV1=aPave1.Index();
- t1=aPave1.Param();
- aV1=TopoDS::Vertex(myDS->GetShape(nV1));
- aV1.Orientation(TopAbs_FORWARD);
-
- const BOPTools_Pave& aPave2=aPB.Pave2();
- nV2=aPave2.Index();
- t2=aPave2.Param();
- aV2=TopoDS::Vertex(myDS->GetShape(nV2));
- aV2.Orientation(TopAbs_REVERSED);
-
- MakeSplitEdge(aDE, aDF, aV1, t1, aV2, t2, aESplit);
- //
- // Add Split Part of the Original Edge to the DS
- BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
-
- anASSeq.SetNewSuccessor(nV1);
- anASSeq.SetNewOrientation(aV1.Orientation());
-
- anASSeq.SetNewSuccessor(nV2);
- anASSeq.SetNewOrientation(aV2.Orientation());
-
- myDS->InsertShapeAndAncestorsSuccessors(aESplit, anASSeq);
- aNewShapeIndex=myDS->NumberOfInsertedShapes();
- myDS->SetState(aNewShapeIndex, BooleanOperations_UNKNOWN);
- //
- // Fill Split Set for the Original Edge
- aPB.SetEdge(aNewShapeIndex);
- //
- }
-}
-//=======================================================================
-// function: MakeSplitEdge
-// purpose:
-//=======================================================================
- void NMTTools_DEProcessor::MakeSplitEdge (const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
- const TopoDS_Vertex& aV1,
- const Standard_Real aP1,
- const TopoDS_Vertex& aV2,
- const Standard_Real aP2,
- TopoDS_Edge& aNewEdge)
-{
- Standard_Real aTol=1.e-7;
-
- TopoDS_Edge E=aE;
-
- E.EmptyCopy();
- BRep_Builder BB;
- BB.Add (E, aV1);
- BB.Add (E, aV2);
-
- BB.Range(E, aF, aP1, aP2);
-
- BB.Degenerated(E, Standard_True);
-
- BB.UpdateEdge(E, aTol);
- aNewEdge=E;
-}
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_DEProcessor.hxx
-// Created: Wed Sep 12 12:10:52 2001
-// Author: Peter KURNEV
-// <pkv@irinox>
-
-#ifndef _NMTTools_DEProcessor_HeaderFile
-#define _NMTTools_DEProcessor_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <NMTTools_PPaveFiller.hxx>
-#include <NMTDS_PShapesDataStructure.hxx>
-#include <Standard_Boolean.hxx>
-#include <BOPTools_IndexedDataMapOfIntegerDEInfo.hxx>
-#include <NMTTools_PaveFiller.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Real.hxx>
-
-
-//! <br>
-//! The Algorithm to compute and store in interferences' pool <br>
-//! and in the Data Structure the following values <br>
-//! for degenerated edges <br>
-//! 1. Paves/Pave set(s) <br>
-//! 2. Split parts <br>
-//! 3. States (3D) for split parts <br>
-//! <br>
-//=======================================================================
-//class : NMTTools_DEProcessor
-//purpose :
-//=======================================================================
-class NMTTools_DEProcessor {
-public:
-
-
-
-//! Constructor <br>
-//! <br>
-//! Constructor <br>
-//! <br>
- Standard_EXPORT
- NMTTools_DEProcessor(NMTTools_PaveFiller& aFiller);
-
-//! Launches the processor <br>
- Standard_EXPORT
- void Do() ;
-
-//! Returns TRUE if it is Ok <br>
- Standard_EXPORT
- Standard_Boolean IsDone() const;
-
-
-
-protected:
- Standard_EXPORT
- void FindDegeneratedEdges() ;
-
- Standard_EXPORT
- void DoPaves() ;
-
- Standard_EXPORT
- void FindPaveBlocks(const Standard_Integer nED,
- const Standard_Integer nVD,
- const Standard_Integer nFD,
- BOPTools_ListOfPaveBlock& aLPB) ;
-
- Standard_EXPORT
- void FillPaveSet(const Standard_Integer nED,
- const Standard_Integer nVD,
- const Standard_Integer nFD,
- const BOPTools_ListOfPaveBlock& aLPB) ;
-
- Standard_EXPORT
- void FillSplitEdgesPool(const Standard_Integer nED) ;
-
- Standard_EXPORT
- void MakeSplitEdges(const Standard_Integer nED,
- const Standard_Integer nFD) ;
-
- Standard_EXPORT
- void MakeSplitEdge(const TopoDS_Edge& aS1,
- const TopoDS_Face& aF,
- const TopoDS_Vertex& aV1,
- const Standard_Real aP1,
- const TopoDS_Vertex& aV2,
- const Standard_Real aP2,
- TopoDS_Edge& aNewEdge) ;
-
-
- NMTTools_PPaveFiller myFiller;
- NMTDS_PShapesDataStructure myDS;
- Standard_Boolean myIsDone;
- BOPTools_IndexedDataMapOfIntegerDEInfo myDEMap;
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx
-// Created: Mon Feb 20 12:24:47 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile
-#define NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile
-
-#ifndef NMTTools_DataMapOfIntegerFaceInfo_HeaderFile
-#include <NMTTools_DataMapOfIntegerFaceInfo.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx
-// Created: Mon Feb 20 12:04:52 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile
-#define NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile
-
-#ifndef NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile
-#include <NMTTools_DataMapOfIntegerListOfPaveBlock.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTTools_DataMapOfIntegerFaceInfo.hxx
-// Created: Mon Feb 20 12:21:55 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTTools_DataMapOfIntegerFaceInfo_HeaderFile
-#define NMTTools_DataMapOfIntegerFaceInfo_HeaderFile
-
-#include <NMTTools_FaceInfo.hxx>
-#include <TColStd_MapIntegerHasher.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_DataMap.hxx>
-
-typedef NCollection_DataMap<Standard_Integer, NMTTools_FaceInfo, TColStd_MapIntegerHasher> NMTTools_DataMapOfIntegerFaceInfo;
-typedef NMTTools_DataMapOfIntegerFaceInfo::Iterator NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo;
-
-#undef _NCollection_MapHasher
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTTools_DataMapOfIntegerListOfPaveBlock.hxx
-// Created: Mon Feb 20 09:27:40 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile
-#define NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile
-
-
-#include <TColStd_MapIntegerHasher.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_DataMap.hxx>
-
-typedef NCollection_DataMap<Standard_Integer, BOPTools_ListOfPaveBlock, TColStd_MapIntegerHasher> NMTTools_DataMapOfIntegerListOfPaveBlock;
-typedef NMTTools_DataMapOfIntegerListOfPaveBlock::Iterator NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock;
-
-#undef _NCollection_MapHasher
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_FaceInfo.cxx
-// Created: Tue Dec 9 12:23:29 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTTools_FaceInfo.hxx>
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_FaceInfo.hxx
-// Created: Tue Dec 9 12:23:29 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _NMTTools_FaceInfo_HeaderFile
-#define _NMTTools_FaceInfo_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Integer.hxx>
-#include <NMTTools_MapOfPaveBlock.hxx>
-#include <TColStd_MapOfInteger.hxx>
-#include <NMTTools_MapOfPaveBlock.hxx>
-#include <TColStd_MapOfInteger.hxx>
-
-//=======================================================================
-//class : NMTTools_FaceInfo
-//purpose :
-//=======================================================================
-class NMTTools_FaceInfo {
- public:
-
- //! Empty contructor <br>
- //! <br>
- NMTTools_FaceInfo();
-
- virtual ~NMTTools_FaceInfo();
-
- //! Clears the contents <br>
- Standard_EXPORT void Clear() ;
-
- //! Modifier <br>
- //! Sets the index of the face <theI> <br>
- void SetIndex(const Standard_Integer theI) ;
-
- //! Selector <br>
- //! Returns the index of the face <br>
- //! <br>
- //! In <br>
- //! <br>
- Standard_Integer Index() const;
-
- //! Selector <br>
- //! Returns the pave blocks of the face <br>
- //! that have state In <br>
- const NMTTools_MapOfPaveBlock& PaveBlocksIn() const;
-
-//! Selector/Modifier <br>
- //! Returns the pave blocks <br>
- //! of the face <br>
- //! that have state In <br>
- NMTTools_MapOfPaveBlock& ChangePaveBlocksIn() ;
-
- //! Selector <br>
- //! Returns the list of indices for vertices <br>
- //! of the face <br>
- //! that have state In <br>
- const TColStd_MapOfInteger& VerticesIn() const;
-
- //! Selector/Modifier <br>
- //! Returns the list of indices for vertices <br>
- //! of the face <br>
- //! that have state In <br>
- //! <br>
- //! On <br>
- //! <br>
- TColStd_MapOfInteger& ChangeVerticesIn() ;
-
- //! Selector <br>
- //! Returns the pave blocks of the face <br>
- //! that have state On <br>
- const NMTTools_MapOfPaveBlock& PaveBlocksOn() const;
-
- //! Selector/Modifier <br>
- //! Returns the pave blocks <br>
- //! of the face <br>
- //! that have state On <br>
- NMTTools_MapOfPaveBlock& ChangePaveBlocksOn() ;
-
- //! Selector <br>
- //! Returns the list of indices for vertices <br>
- //! of the face <br>
- //! that have state On <br>
- const TColStd_MapOfInteger& VerticesOn() const;
-
- //! Selector/Modifier <br>
- //! Returns the list of indices for vertices <br>
- //! of the face <br>
- //! that have state On <br>
- TColStd_MapOfInteger& ChangeVerticesOn() ;
-
- protected:
- Standard_Integer myIndex;
- NMTTools_MapOfPaveBlock myPaveBlocksIn;
- TColStd_MapOfInteger myVerticesIn;
- NMTTools_MapOfPaveBlock myPaveBlocksOn;
- TColStd_MapOfInteger myVerticesOn;
-};
-
-#include <NMTTools_FaceInfo.lxx>
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_FaceInfo.lxx
-// Created: Tue Dec 9 12:23:29 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-inline NMTTools_FaceInfo::NMTTools_FaceInfo()
-:
- myIndex(-1)
-{
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-inline NMTTools_FaceInfo::~NMTTools_FaceInfo()
-{
- Clear();
-}
-//=======================================================================
-//function : Clear
-//purpose :
-//=======================================================================
-inline void NMTTools_FaceInfo::Clear()
-{
- myIndex=-1;
- myPaveBlocksIn.Clear();
- myVerticesIn.Clear();
- myPaveBlocksOn.Clear();
- myVerticesOn.Clear();
-}
-//=======================================================================
-//function : SetIndex
-//purpose :
-//=======================================================================
- inline void NMTTools_FaceInfo::SetIndex(const Standard_Integer theI)
-{
- myIndex=theI;
-}
-//=======================================================================
-//function : Index
-//purpose :
-//=======================================================================
- inline Standard_Integer NMTTools_FaceInfo::Index()const
-{
- return myIndex;
-}
-//=======================================================================
-//function : PaveBlockIn
-//purpose :
-//=======================================================================
- inline const NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::PaveBlocksIn()const
-{
- return myPaveBlocksIn;
-}
-//=======================================================================
-//function : ChangePaveBlocksIn
-//purpose :
-//=======================================================================
- inline NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::ChangePaveBlocksIn()
-{
- return myPaveBlocksIn;
-}
-//=======================================================================
-//function : VerticesIn
-//purpose :
-//=======================================================================
- inline const TColStd_MapOfInteger& NMTTools_FaceInfo::VerticesIn()const
-{
- return myVerticesIn;
-}
-//=======================================================================
-//function : ChangeVerticesIn
-//purpose :
-//=======================================================================
- inline TColStd_MapOfInteger& NMTTools_FaceInfo::ChangeVerticesIn()
-{
- return myVerticesIn;
-}
-//=======================================================================
-//function : PaveBlockOn
-//purpose :
-//=======================================================================
- inline const NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::PaveBlocksOn()const
-{
- return myPaveBlocksOn;
-}
-//=======================================================================
-//function : ChangePaveBlocksOn
-//purpose :
-//=======================================================================
- inline NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::ChangePaveBlocksOn()
-{
- return myPaveBlocksOn;
-}
-//=======================================================================
-//function : VerticesOn
-//purpose :
-//=======================================================================
- inline const TColStd_MapOfInteger& NMTTools_FaceInfo::VerticesOn()const
-{
- return myVerticesOn;
-}
-//=======================================================================
-//function : ChangeVerticesOn
-//purpose :
-//=======================================================================
- inline TColStd_MapOfInteger& NMTTools_FaceInfo::ChangeVerticesOn()
-{
- return myVerticesOn;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx
-// Created: Mon Feb 20 09:20:07 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile
-#define NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile
-
-
-#include <Standard_Integer.hxx>
-#include <TColStd_MapIntegerHasher.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_IndexedDataMap.hxx>
-
-typedef NCollection_IndexedDataMap <Standard_Integer, TColStd_IndexedMapOfInteger, TColStd_MapIntegerHasher> NMTTools_IndexedDataMapOfIndexedMapOfInteger;
-
-#undef _NCollection_MapHasher
-
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx
-// Created: Mon Feb 20 09:20:07 2012
-// Author:
-// <pkv@BDEURI37616>
-// File: NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx
-// Created: Mon Feb 20 11:59:23 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
-#define NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
-
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_IndexedDataMap.hxx>
-
-
-typedef NCollection_IndexedDataMap <TopoDS_Shape, TopTools_IndexedMapOfShape, TopTools_ShapeMapHasher> NMTTools_IndexedDataMapOfShapeIndexedMapOfShape;
-
-#undef _NCollection_MapHasher
-
-
-#endif
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTTools_IndexedDataMapOfShapePaveBlock.hxx
-// Created: Mon Feb 20 11:55:34 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile
-#define NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-#include <BOPTools_PaveBlock.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_IndexedDataMap.hxx>
-
-typedef NCollection_IndexedDataMap <TopoDS_Shape, BOPTools_PaveBlock, TopTools_ShapeMapHasher> NMTTools_IndexedDataMapOfShapePaveBlock;
-
-#undef _NCollection_MapHasher
-
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_ListIteratorOfListOfCommonBlock.hxx
-// Created: Mon Feb 20 11:25:23 2012
-// Author:
-// <pkv@BDEURI37616>
-
-#ifndef NMTDS_ListIteratorOfListOfCommonBlock_HeaderFile
-#define NMTDS_ListIteratorOfListOfCommonBlock_HeaderFile
-
-#ifndef NMTTools_ListOfCommonBlock_HeaderFile
-#include <NMTTools_ListOfCommonBlock.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTDS_ListIteratorOfListOfCoupleOfShape.hxx
-// Created: Mon Feb 20 11:25:23 2012
-// Author:
-// <pkv@BDEURI37616>
-
-#ifndef NMTDS_ListIteratorOfListOfCoupleOfShape_HeaderFile
-#define NMTDS_ListIteratorOfListOfCoupleOfShape_HeaderFile
-
-#ifndef NMTTools_ListOfCoupleOfShape_HeaderFile
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTTools_ListOfCommonBlock.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
-
-#ifndef NMTTools_ListOfCommonBlock_HeaderFile
-#define NMTTools_ListOfCommonBlock_HeaderFile
-
-#include <NCollection_List.hxx>
-#include <NMTTools_CommonBlock.hxx>
-
-typedef NCollection_List <NMTTools_CommonBlock> NMTTools_ListOfCommonBlock;
-typedef NMTTools_ListOfCommonBlock::Iterator NMTTools_ListIteratorOfListOfCommonBlock;
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTTools_ListOfCoupleOfShape.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
-
-#ifndef NMTTools_ListOfCoupleOfShape_HeaderFile
-#define NMTTools_ListOfCoupleOfShape_HeaderFile
-
-#include <NCollection_List.hxx>
-#include <NMTTools_CoupleOfShape.hxx>
-
-typedef NCollection_List <NMTTools_CoupleOfShape> NMTTools_ListOfCoupleOfShape;
-typedef NMTTools_ListOfCoupleOfShape::Iterator NMTTools_ListIteratorOfListOfCoupleOfShape;
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTTools_MapIteratorOfMapOfPaveBlock.hxx
-// Created: Mon Feb 20 11:47:30 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile
-#define NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile
-
-#ifndef NMTTools_MapOfPaveBlock_HeaderFile
-#include <NMTTools_MapOfPaveBlock.hxx>
-#endif
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// 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: NMTTools_MapOfPaveBlock.hxx
-// Created: Mon Feb 20 08:19:07 2012
-// Author:
-// <pkv@BDEURI37616>
-
-
-#ifndef NMTTools_MapOfPaveBlock_HeaderFile
-#define NMTTools_MapOfPaveBlock_HeaderFile
-
-#include <BOPTools_PaveBlock.hxx>
-#include <BOPTools_PaveBlockMapHasher.hxx>
-
-#define _NCollection_MapHasher
-#include <NCollection_Map.hxx>
-
-typedef NCollection_Map<BOPTools_PaveBlock, BOPTools_PaveBlockMapHasher> NMTTools_MapOfPaveBlock;
-typedef NMTTools_MapOfPaveBlock::Iterator NMTTools_MapIteratorOfMapOfPaveBlock;
-
-#undef _NCollection_MapHasher
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_PPaveFiller.hxx
-// Created: Tue Dec 9 12:23:29 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _NMTTools_PPaveFiller_HeaderFile
-#define _NMTTools_PPaveFiller_HeaderFile
-
-class NMTTools_PaveFiller;
-
-typedef NMTTools_PaveFiller* NMTTools_PPaveFiller;
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_PaveFiller.cxx
-// Created: Fri Dec 5 14:58:54 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTTools_PaveFiller.hxx>
-//
-#include <BOPTColStd_Failure.hxx>
-#include <IntTools_Context.hxx>
-#include <NMTDS_ShapesDataStructure.hxx>
-#include <NMTTools_DEProcessor.hxx>
-#include <NMTDS_Iterator.hxx>
-#include <NMTDS_InterfPool.hxx>
-
-//=======================================================================
-// function: NMTTools_PaveFiller::NMTTools_PaveFiller
-// purpose:
-//=======================================================================
- NMTTools_PaveFiller::NMTTools_PaveFiller()
-{
- myDS=NULL;
- myDSIt=NULL;
- myIsDone=Standard_False;
- myNbSources=0;
- myNbEdges=0;
- myIP=NULL;
-}
-//=======================================================================
-// function: ~
-// purpose:
-//=======================================================================
- NMTTools_PaveFiller::~NMTTools_PaveFiller()
-{
- Clear();
-}
-//=======================================================================
-// function: Clear
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::Clear()
-{
- if (myDSIt) {
- delete myDSIt;
- }
- if (myDS) {
- delete myDS;
- }
- myDSIt=NULL;
- myDS=NULL;
-
- if (myIP) {
- delete myIP;
- }
- myIP=NULL;
-}
-//=======================================================================
-// function: SetCompositeShape
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::SetCompositeShape(const TopoDS_Shape& aS)
-{
- myCompositeShape=aS;
-}
-//=======================================================================
-// function: CompositeShape
-// purpose:
-//=======================================================================
- const TopoDS_Shape& NMTTools_PaveFiller::CompositeShape()const
-{
- return myCompositeShape;
-}
-//=======================================================================
-// function: DS
-// purpose:
-//=======================================================================
- NMTDS_PShapesDataStructure NMTTools_PaveFiller::DS()
-{
- return myDS;
-}
-//=======================================================================
-// function: DSIt
-// purpose:
-//=======================================================================
- NMTDS_PIterator NMTTools_PaveFiller::DSIt()
-{
- return myDSIt;
-}
-//=======================================================================
-// function: IP
-// purpose:
-//=======================================================================
- NMTDS_PInterfPool NMTTools_PaveFiller::IP()
-{
- return myIP;
-}
-//=======================================================================
-// function:IsDone
-// purpose:
-//=======================================================================
- Standard_Boolean NMTTools_PaveFiller::IsDone() const
-{
- return myIsDone;
-}
-//=======================================================================
-// function: Context
-// purpose:
-//=======================================================================
- const Handle(IntTools_Context)& NMTTools_PaveFiller::Context() const
-{
- return myContext;
-}
-//=======================================================================
-// function: PavePool
-// purpose:
-//=======================================================================
- const BOPTools_PavePool& NMTTools_PaveFiller::PavePool() const
-{
- return myPavePool;
-}
-//=======================================================================
-// function: ChangePavePool
-// purpose:
-//=======================================================================
- BOPTools_PavePool& NMTTools_PaveFiller::ChangePavePool()
-{
- return myPavePool;
-}
-//=======================================================================
-// function: ChangePavePoolNew
-// purpose:
-//=======================================================================
- BOPTools_PavePool& NMTTools_PaveFiller::ChangePavePoolNew()
-{
- return myPavePoolNew;
-}
-//=======================================================================
-// function: CommonBlockPool
-// purpose:
-//=======================================================================
- const NMTTools_CommonBlockPool& NMTTools_PaveFiller::CommonBlockPool() const
-{
- return myCommonBlockPool;
-}
-//=======================================================================
-// function: ChangeCommonBlockPool
-// purpose:
-//=======================================================================
- NMTTools_CommonBlockPool& NMTTools_PaveFiller::ChangeCommonBlockPool()
-{
- return myCommonBlockPool;
-}
-//=======================================================================
-// function: SplitShapesPool
-// purpose:
-//=======================================================================
- const BOPTools_SplitShapesPool& NMTTools_PaveFiller::SplitShapesPool() const
-{
- return mySplitShapesPool;
-}
-//=======================================================================
-// function: ChangeSplitShapesPool
-// purpose:
-//=======================================================================
- BOPTools_SplitShapesPool& NMTTools_PaveFiller::ChangeSplitShapesPool()
-{
- return mySplitShapesPool;
-}
-//=======================================================================
-// function: Init
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::Init()
-{
- myIsDone=Standard_False;
- if (myCompositeShape.IsNull()) {
- return;
- }
- //
- Clear();
- // 1.
- myDS=new NMTDS_ShapesDataStructure;
- myDS->SetCompositeShape(myCompositeShape);
- myDS->Init();
- //
- // 2.
- myDSIt=new NMTDS_Iterator;
- myDSIt->SetDS(myDS);
- myDSIt->Prepare();
- //
- // 3.
- myNbSources=myDS->NumberOfShapesOfTheObject()+
- myDS->NumberOfShapesOfTheTool();
- myNbEdges=myDS->NbEdges();
- //
- // 4
- myIP=new NMTDS_InterfPool;
- //
- // 5
- myContext=new IntTools_Context;
-}
-
-//=======================================================================
-// function: Perform
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::Perform()
-{
- myIsDone=Standard_False;
- //
- //----------------
- try {
- // 0.
- Init();
- //1.VV
- //
- PerformVV();
- //
- // 2.VE
- myPavePool.Resize (myNbEdges);
-
- PrepareEdges();
-
- PerformVE();
- //
- // 3.VF
- PerformVF();
- //
- // 4.EE
- myCommonBlockPool.Resize (myNbEdges);
- mySplitShapesPool.Resize (myNbEdges);
- myPavePoolNew .Resize (myNbEdges);
-
- PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE);
- PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE);
- //
- PerformEE();
- //
- RefinePavePool ();
- //
- myPavePoolNew.Destroy();
- myPavePoolNew.Resize (myNbEdges);
- //
- //modified by NIZNHY-PKV Mon Dec 12 09:13:53 2011f
- UpdateCommonBlocks(0);
- //modified by NIZNHY-PKV Mon Dec 12 09:13:56 2011t
- //
- // 5.EF
- PreparePaveBlocks(TopAbs_EDGE, TopAbs_FACE);
- PerformEF();
- //
- RefinePavePool();
- //
- myPavePoolNew.Destroy();
-
- MakeSplitEdges();
-
- UpdateCommonBlocks();
- //
- // 6. FF
- PerformFF ();
- //
- MakeBlocks();
- //
- MakePCurves();
- //
- // 7.Postprocessing
- UpdatePaveBlocks();
- //
- NMTTools_DEProcessor aDEP(*this);
- aDEP.Do();
- //
- MakeAloneVertices();
- //
- //modified by NIZNHY-PKV Mon Dec 12 09:14:23 2011f
- myIP->Purge();
- //modified by NIZNHY-PKV Mon Dec 12 09:14:27 2011t
- myIsDone=Standard_True;
- }
- catch (BOPTColStd_Failure& ) {
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_PaveFiller.hxx
-// Created: Fri Dec 5 14:58:54 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#ifndef _NMTTools_PaveFiller_HeaderFile
-#define _NMTTools_PaveFiller_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <NMTDS_PShapesDataStructure.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Integer.hxx>
-#include <BOPTools_PavePool.hxx>
-#include <NMTTools_CommonBlockPool.hxx>
-#include <BOPTools_SplitShapesPool.hxx>
-#include <Handle_IntTools_Context.hxx>
-#include <BOPTools_SSIntersectionAttribute.hxx>
-#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
-#include <TColStd_DataMapOfIntegerInteger.hxx>
-#include <NMTDS_PIterator.hxx>
-#include <TopoDS_Shape.hxx>
-#include <NMTDS_PInterfPool.hxx>
-#include <NMTTools_DataMapOfIntegerFaceInfo.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <NMTTools_CommonBlock.hxx>
-#include <Standard_Real.hxx>
-
-#include <TopoDS_Shape.hxx>
-#include <BOPTools_Pave.hxx>
-#include <IntTools_ShrunkRange.hxx>
-#include <BOPTools_PavePool.hxx>
-#include <NMTTools_CommonBlockPool.hxx>
-#include <BOPTools_SplitShapesPool.hxx>
-#include <BOPTools_PaveBlock.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <NMTTools_ListOfCommonBlock.hxx>
-#include <BOPTools_IDMapOfPaveBlockIMapOfPaveBlock.hxx>
-#include <BOPTools_IDMapOfPaveBlockIMapOfInteger.hxx>
-#include <BooleanOperations_IndexedDataMapOfShapeInteger.hxx>
-#include <TColStd_ListOfInteger.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <TopoDS_Face.hxx>
-#include <BOPTools_PaveSet.hxx>
-#include <BOPTools_Curve.hxx>
-#include <BOPTools_SSInterference.hxx>
-#include <gp_Pnt.hxx>
-#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopTools_DataMapOfShapeShape.hxx>
-
-
-/*
-class TopoDS_Shape;
-class BOPTools_Pave;
-class IntTools_ShrunkRange;
-class BOPTools_PavePool;
-class NMTTools_CommonBlockPool;
-class BOPTools_SplitShapesPool;
-class BOPTools_PaveBlock;
-class TopoDS_Vertex;
-class NMTTools_ListOfCommonBlock;
-class BOPTools_IDMapOfPaveBlockIMapOfPaveBlock;
-class BOPTools_IDMapOfPaveBlockIMapOfInteger;
-class BooleanOperations_IndexedDataMapOfShapeInteger;
-class TColStd_ListOfInteger;
-class BOPTools_ListOfPaveBlock;
-class TopoDS_Face;
-class BOPTools_PaveSet;
-class BOPTools_Curve;
-class BOPTools_SSInterference;
-class gp_Pnt;
-class NMTTools_IndexedDataMapOfIndexedMapOfInteger;
-class TopTools_ListOfShape;
-class TopoDS_Edge;
-class TopTools_DataMapOfShapeShape;
-class TCoLSTD_MapOfInteger;
-*/
-
-
-//=======================================================================
-//function : NMTTools_PaveFiller
-//purpose :
-//=======================================================================
-class NMTTools_PaveFiller {
- public:
- Standard_EXPORT
- NMTTools_PaveFiller();
-
- Standard_EXPORT
- virtual ~NMTTools_PaveFiller();
-
- Standard_EXPORT
- void SetCompositeShape(const TopoDS_Shape& aS) ;
-
- Standard_EXPORT
- const TopoDS_Shape& CompositeShape() const;
-
- Standard_EXPORT
- NMTDS_PShapesDataStructure DS() ;
-
- Standard_EXPORT
- NMTDS_PIterator DSIt() ;
-
- Standard_EXPORT
- NMTDS_PInterfPool IP() ;
-
- Standard_EXPORT
- virtual void Perform() ;
-
- Standard_EXPORT
- Standard_Boolean IsDone() const;
-
- Standard_EXPORT
- const Handle_IntTools_Context& Context() const;
-
- Standard_EXPORT
- const BOPTools_PavePool& PavePool() const;
-
- Standard_EXPORT
- BOPTools_PavePool& ChangePavePool() ;
-
- Standard_EXPORT
- const NMTTools_CommonBlockPool& CommonBlockPool() const;
-
- Standard_EXPORT
- NMTTools_CommonBlockPool& ChangeCommonBlockPool() ;
-
- Standard_EXPORT
- const BOPTools_SplitShapesPool& SplitShapesPool() const;
-
- Standard_EXPORT
- BOPTools_SplitShapesPool& ChangeSplitShapesPool() ;
-
- Standard_EXPORT
- Standard_Integer FindSDVertex(const Standard_Integer nV) const;
-
- Standard_EXPORT
- Standard_Integer SplitsInFace(const Standard_Integer aBid,
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT
- Standard_Integer SplitsInFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT
- Standard_Integer SplitsOnEdge(const Standard_Integer nE1,
- const Standard_Integer nE2,
- TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT
- Standard_Integer SplitsOnFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT
- Standard_Integer SplitsOnFace(const Standard_Integer aBid,
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT
- Standard_Integer SplitsInFace(const Standard_Integer aBid,
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT
- Standard_Integer SplitsInFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT
- Standard_Integer SplitsOnEdge(const Standard_Integer nE1,
- const Standard_Integer nE2,
- BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT
- Standard_Integer SplitsOnFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT
- Standard_Integer SplitsOnFace(const Standard_Integer aBid,
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT
- Standard_Integer SplitsFace(const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT
- Standard_Integer SplitsFace(const Standard_Integer nF2,
- TColStd_ListOfInteger& aLs) ;
-
- Standard_EXPORT
- Standard_Integer CommonBlocksFace(const Standard_Integer nF,
- NMTTools_ListOfCommonBlock& aLCB) ;
-
- Standard_EXPORT
- void PrepareFace(const Standard_Integer nF,
- TopoDS_Face& aF) ;
-
- Standard_EXPORT
- const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB) ;
-
- Standard_EXPORT
- const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB,
- TColStd_ListOfInteger& aLB,
- Standard_Integer& aIsCommonBlock) ;
-
- Standard_EXPORT
- void RealSplitsFace(const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT
- Standard_Boolean HasRealSplitsInOnFace(const Standard_Integer nF1,
- const Standard_Integer nF2) ;
-
- Standard_EXPORT
- void RealSplitsInFace(const Standard_Integer aBid,
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT
- void RealSplitsInFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT
- void RealSplitsInFace(const Standard_Integer nF1,
- BOPTools_ListOfPaveBlock& aLPB) ;
-
- Standard_EXPORT
- void RealSplitsOnEdge(const Standard_Integer nE1,
- const Standard_Integer nE2,
- BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT
- void RealSplitsOnFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT
- void RealSplitsOnFace(const Standard_Integer aBid,
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
-
- Standard_EXPORT
- void PrepareSetForFace(const Standard_Integer nF1,
- const Standard_Integer nF2,
- const BOPTools_ListOfPaveBlock& aLPB,
- BOPTools_PaveSet& aPSF) ;
-
- Standard_EXPORT
- void PutPaveOnCurve(const BOPTools_PaveSet& aPSF,
- const Standard_Real aTol,
- BOPTools_Curve& aBC) ;
-
- Standard_EXPORT
- void PutBoundPaveOnCurve(BOPTools_Curve& aBC,
- BOPTools_SSInterference& aFF) ;
-
- Standard_EXPORT
- void PutBoundPaveOnCurve(const gp_Pnt& aP,
- const Standard_Real aT,
- BOPTools_Curve& aBC,
- BOPTools_SSInterference& aFF) ;
-
- Standard_EXPORT
- Standard_Boolean FindPave(const gp_Pnt& aP,
- const Standard_Real aTpV,
- const BOPTools_PaveSet& aPS,
- BOPTools_Pave& aPV) ;
-
- Standard_EXPORT
- Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,
- const BOPTools_PaveBlock& aPBR,
- const Standard_Real aTol) ;
-
- Standard_EXPORT
- Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,
- const BOPTools_ListOfPaveBlock& aLPB,
- const Standard_Real aTol) ;
-
- Standard_EXPORT
- void MakePCurves() ;
-
- Standard_EXPORT
- const NMTTools_IndexedDataMapOfIndexedMapOfInteger& AloneVertices() const;
-
- Standard_EXPORT
- Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,
- const TopTools_ListOfShape& aLPB,
- const Standard_Real aTol) ;
-
- Standard_EXPORT
- Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB,
- const BOPTools_ListOfPaveBlock& aLPB) ;
-
- Standard_EXPORT
- Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,
- const TopoDS_Edge& aE,
- const Standard_Real aTol) ;
-
- Standard_EXPORT
- void SharedEdges(const Standard_Integer nF1,
- const Standard_Integer nF2,
- TColStd_ListOfInteger& aLNE,
- TopTools_ListOfShape& aLSE) ;
-
- Standard_EXPORT
- void FuseVertices(const TopoDS_Shape& aC,
- TopTools_DataMapOfShapeShape& aDMVV) const;
-
- Standard_EXPORT
- void TreatPaveBlocks(NMTTools_ListOfCommonBlock& theLCB) ;
-
- Standard_EXPORT
- BOPTools_PavePool& ChangePavePoolNew() ;
-
- Standard_EXPORT
- Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB1,
- const BOPTools_PaveBlock& aPB2) ;
-
- Standard_EXPORT
- void PutClosingPaveOnCurve(BOPTools_Curve& aBC,
- BOPTools_SSInterference& aFF) ;
-
- protected:
- Standard_EXPORT
- virtual void Init() ;
-
- Standard_EXPORT
- virtual void Clear() ;
-
- Standard_EXPORT
- virtual void PerformVV() ;
-
- Standard_EXPORT
- virtual void PerformVE() ;
-
- Standard_EXPORT
- virtual void PerformVF() ;
-
- Standard_EXPORT
- virtual void PerformEE() ;
-
- Standard_EXPORT
- virtual void PerformEF() ;
-
- Standard_EXPORT
- virtual void PerformFF() ;
-
- Standard_EXPORT
- void MakeSplitEdges() ;
-
- Standard_EXPORT
- virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2) ;
-
- Standard_EXPORT
- void CorrectShrunkRanges(const Standard_Integer aSide,
- const BOPTools_Pave& aPave,
- IntTools_ShrunkRange& aSR) ;
-
- Standard_EXPORT
- virtual void PreparePaveBlocks(const Standard_Integer anE) ;
-
- Standard_EXPORT
- virtual void PrepareEdges() ;
-
- Standard_EXPORT
- Standard_Boolean IsSuccessorsComputed(const Standard_Integer iF1,
- const Standard_Integer iF2) const;
-
- Standard_EXPORT
- Standard_Boolean IsBlocksCoinside(const BOPTools_PaveBlock& aPB1,
- const BOPTools_PaveBlock& aPB2) const;
-
- Standard_EXPORT
- void RefinePavePool() ;
-
- Standard_EXPORT
- Standard_Integer CheckFacePaves(const TopoDS_Vertex& aV,
- const Standard_Integer nF) ;
-
- Standard_EXPORT
- void ReplaceCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
-
- Standard_EXPORT
- void RemoveCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
-
- Standard_EXPORT
- void SplitCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
-
- Standard_EXPORT
- void SplitCommonBlock(const NMTTools_CommonBlock& aCB,NMTTools_ListOfCommonBlock& aLCB) ;
-
- Standard_EXPORT
- void EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aM) ;
-
- Standard_EXPORT
- void EFCommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB) ;
-
- Standard_EXPORT
- void EENewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
-
- Standard_EXPORT
- void EENewVertices(const TopoDS_Vertex& aV,
- const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
-
- Standard_EXPORT
- void EFNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
-
- Standard_EXPORT
- void EFNewVertices(const TopoDS_Vertex& aV,
- const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
-
- Standard_EXPORT
- void UpdateCommonBlocks() ;
-
- Standard_EXPORT
- void UpdateCommonBlocks(const Standard_Integer aI) ;
-
- Standard_EXPORT
- void UpdatePaveBlocks() ;
-
- Standard_EXPORT
- Standard_Integer SplitIndex(const BOPTools_PaveBlock& aPB) const;
-
- Standard_EXPORT
- void MakeBlocks() ;
-
- Standard_EXPORT
- void PerformVF1() ;
-
- Standard_EXPORT
- void MakeAloneVertices() ;
-
- Standard_EXPORT
- void FillFaceInfo() ;
-
- Standard_EXPORT
- void CorrectTolR3D(const BOPTools_SSInterference& aFF,
- const TColStd_MapOfInteger& aMVStick,
- Standard_Real& aTolR3D) ;
-
-
- NMTDS_PShapesDataStructure myDS;
- Standard_Boolean myIsDone;
- Standard_Integer myNbSources;
- Standard_Integer myNbEdges;
- BOPTools_PavePool myPavePool;
- BOPTools_PavePool myPavePoolNew;
- NMTTools_CommonBlockPool myCommonBlockPool;
- BOPTools_SplitShapesPool mySplitShapesPool;
- Handle_IntTools_Context myContext;
- BOPTools_SSIntersectionAttribute mySectionAttribute;
- NMTTools_IndexedDataMapOfIndexedMapOfInteger myAloneVertices;
- TColStd_DataMapOfIntegerInteger myVSD;
- NMTDS_PIterator myDSIt;
- TopoDS_Shape myCompositeShape;
- NMTDS_PInterfPool myIP;
- NMTTools_DataMapOfIntegerFaceInfo myFaceInfo;
-
-
- // private:
-
-};
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_PaveFiller_0.cxx
-// Created: Mon Dec 8 11:45:51 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTTools_PaveFiller.hxx>
-
-#include <TColStd_IndexedMapOfInteger.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-
-#include <NMTDS_InterfPool.hxx>
-#include <NMTDS_ShapesDataStructure.hxx>
-#include <NMTDS_Iterator.hxx>
-
-//=======================================================================
-// function:IsSuccesstorsComputed
-// purpose:
-//=======================================================================
- Standard_Boolean NMTTools_PaveFiller::IsSuccessorsComputed(const Standard_Integer aN1,
- const Standard_Integer aN2)const
-{
- Standard_Boolean bComputed;
- Standard_Integer i, nSuc, n1, n2, ntmp, aNbS;
- TopAbs_ShapeEnum aType;
- TColStd_IndexedMapOfInteger aMSuc;
- //
- n1=aN1;
- n2=aN2;
- aType=myDS->GetShapeType(aN1);
- if (aType!=TopAbs_VERTEX) {
- ntmp=n1;
- n1=n2;
- n2=ntmp;
- }
- //
- myDS->GetAllSuccessors(n2, aMSuc);
- aNbS=aMSuc.Extent();
- for (i=1; i<=aNbS; ++i) {
- nSuc=aMSuc(i);
- bComputed=myIP->Contains(n1, nSuc);
- if (bComputed) {
- break;
- }
- }
- return bComputed;
-}
-/*
-//=======================================================================
-// function: ExpectedPoolLength
-// purpose:
-//=======================================================================
- Standard_Integer NMTTools_PaveFiller::ExpectedPoolLength()const
-{
- Standard_Integer aNbIIs;
- Standard_Real aCfPredict=.5;
- // Modified Thu Sep 14 14:35:18 2006
- // Contribution of Samtech www.samcef.com BEGIN
- //const BOPTools_ListOfCoupleOfInteger& aLC=myDSIt.ListOfCouple();
- //aNbIIs=aLC.Extent();
- aNbIIs=myDSIt->ExpectedLength();
- // Contribution of Samtech www.samcef.com END
- //
- if (aNbIIs==1) {
- return aNbIIs;
- }
- //
- aNbIIs=(Standard_Integer) (aCfPredict*(Standard_Real)aNbIIs);
-
- return aNbIIs;
-}
-*/
-/*
-//=======================================================================
-//function : SortTypes
-//purpose :
-//=======================================================================
- void NMTTools_PaveFiller::SortTypes(Standard_Integer& theWhat,
- Standard_Integer& theWith)const
-{
- Standard_Integer aWhat, aWith;
- Standard_Boolean aReverseFlag;
- TopAbs_ShapeEnum aType1, aType2;
- //
- aType1= myDS->GetShapeType(theWhat),
- aType2= myDS->GetShapeType(theWith);
- //
- if (aType1==aType2) {
- return;
- }
- //
- aReverseFlag=Standard_True;
- if (aType1==TopAbs_EDGE && aType2==TopAbs_FACE) {
- aReverseFlag=Standard_False;
- }
- if (aType1==TopAbs_VERTEX &&
- (aType2==TopAbs_FACE || aType2==TopAbs_EDGE)) {
- aReverseFlag=Standard_False;
- }
- //
- aWhat=(aReverseFlag) ? theWith : theWhat;
- aWith=(aReverseFlag) ? theWhat : theWith;
- //
- theWhat=aWhat;
- theWith=aWith;
-}
-*/
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_PaveFiller_1.cxx
-// Created: Mon Dec 8 11:47:55 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTTools_PaveFiller.hxx>
-
-#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
-#include <TColStd_ListOfInteger.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Vertex.hxx>
-
-#include <TopTools_ListOfShape.hxx>
-
-#include <IntTools_Tools.hxx>
-#include <BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx>
-#include <BOPTools_VVInterference.hxx>
-#include <BOPTools_CArray1OfVVInterference.hxx>
-
-#include <NMTDS_Iterator.hxx>
-#include <NMTDS_InterfPool.hxx>
-#include <NMTDS_ShapesDataStructure.hxx>
-
-#include <NMTTools_Tools.hxx>
-
-//=======================================================================
-// function: PerformVV
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::PerformVV()
-{
- myIsDone=Standard_False;
- //
- Standard_Integer aNbVVs, aBL, aNbVSD, nVnew, i, j, n1, n2;
- TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger aIt1;
- TColStd_ListIteratorOfListOfInteger aItX, aItY;
- TColStd_ListOfInteger aLIX;
- TopTools_ListOfShape aLV;
- TopoDS_Vertex aVnew;
- //
- myVSD.Clear();
- //
- const TColStd_DataMapOfIntegerListOfInteger& aMVSD=myDSIt->SDVertices();
- aNbVSD=aMVSD.Extent();
- if (!aNbVSD) {
- return;
- }
- //
- BOPTools_CArray1OfVVInterference& aVVs=myIP->VVInterferences();
- //
- // BlockLength correction
- myDSIt->Initialize(TopAbs_VERTEX, TopAbs_VERTEX);
- aNbVVs=myDSIt->BlockLength();
- aBL=aVVs.BlockLength();
- if (aNbVVs > aBL) {
- aVVs.SetBlockLength(aNbVVs);
- }
- //
- aIt1.Initialize(aMVSD);
- for (; aIt1.More(); aIt1.Next()) {
- aLV.Clear();
- //
- n1=aIt1.Key();
- const TColStd_ListOfInteger& aLIV=aIt1.Value();
- //
- // new vertex
- const TopoDS_Shape& aS1=myDS->Shape(n1);
- aLV.Append(aS1);
- aItX.Initialize(aLIV);
- for (; aItX.More(); aItX.Next()) {
- n2=aItX.Value();
- const TopoDS_Shape& aS2=myDS->Shape(n2);
- aLV.Append(aS2);
- }
- //
- NMTTools_Tools::MakeNewVertex(aLV, aVnew);
- //
- BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
- //
- myDS->InsertShapeAndAncestorsSuccessors(aVnew, anASSeq);
- nVnew=myDS->NumberOfInsertedShapes();
- myDS->SetState (nVnew, BooleanOperations_ON);
- //
- // myVSD, aLIX
- aLIX.Clear();
- aLIX.Append(n1);
- myVSD.Bind(n1, nVnew);
- //
- aItX.Initialize(aLIV);
- for (; aItX.More(); aItX.Next()) {
- n2=aItX.Value();
- aLIX.Append(n2);
- myVSD.Bind(n2, nVnew);
- }
- //
- // interferences
- aItX.Initialize(aLIX);
- for (i=0; aItX.More(); aItX.Next(), ++i) {
- aItY.Initialize(aLIX);
- for (j=0; aItY.More(); aItY.Next(), ++j) {
- if (j>i) {
- n1=aItX.Value();
- n2=aItY.Value();
- myIP->Add(n1, n2, Standard_True, NMTDS_TI_VV);
- //
- BOPTools_VVInterference aVV(n1, n2);
- aVV.SetNewShape(nVnew);
- aVVs.Append(aVV);
- }
- }
- }
- }//for (; aIt1.More(); aIt1.Next()) {
- myIsDone=Standard_True;
-}
-//=======================================================================
-// function: FindSDVertex
-// purpose:
-//=======================================================================
- Standard_Integer NMTTools_PaveFiller::FindSDVertex(const Standard_Integer nV)const
-{
- Standard_Integer nVSD;
- //
- nVSD=0;
- if (myVSD.IsBound(nV)) {
- nVSD=myVSD.Find(nV);
- }
- return nVSD;
-}
-/*
-//=======================================================================
-// function: PerformNewVertices
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::PerformNewVertices()
-{
-}
-*/
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_PaveFiller_2.cxx
-// Created: Mon Dec 8 12:02:56 2003
-// Author: Peter KURNEV
-
-#include <Standard_Version.hxx>
-
-#include <NMTTools_PaveFiller.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
-#include <Precision.hxx>
-
-#include <gp_Pnt.hxx>
-
-#include <Geom_Curve.hxx>
-
-#include <TopAbs_Orientation.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Iterator.hxx>
-
-#include <BRep_Builder.hxx>
-#include <BRep_Tool.hxx>
-
-#include <BOPTools_Pave.hxx>
-#include <BOPTools_PaveSet.hxx>
-#include <BOPTools_CArray1OfVEInterference.hxx>
-#include <BOPTools_VEInterference.hxx>
-
-#include <BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx>
-
-#include <NMTDS_Iterator.hxx>
-#include <NMTDS_ShapesDataStructure.hxx>
-#include <NMTDS_InterfPool.hxx>
-
-
-#include <BOPTools_IndexedMapOfCoupleOfInteger.hxx>
-#include <BOPTools_CoupleOfInteger.hxx>
-#include <BooleanOperations_OnceExplorer.hxx>
-
-#include <IntTools_Context.hxx>
-
-static
- Standard_Boolean Contains(const TopoDS_Edge& aE,
- const TopoDS_Vertex& aV);
-
-//=======================================================================
-// function: PerformVE
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::PerformVE()
-{
- myIsDone=Standard_False;
- //
- Standard_Boolean bJustAdd;
- Standard_Integer n1, n2, anIndexIn, aFlag, aWhat;
- Standard_Integer aWith, aNbVEs, aBlockLength, iSDV, nV1;
- Standard_Real aT;
-#if OCC_VERSION_LARGE > 0x06030008
- // In OCCT6.3.0sp9 is changed a signature of IntTools_Context::ComputeVE() method
- Standard_Boolean bToUpdateVertex;
- Standard_Real aDist;
-#endif
- TopoDS_Vertex aV1;
- TopoDS_Edge aE2;
- BOPTools_IndexedMapOfCoupleOfInteger aSnareMap;
- BOPTools_CoupleOfInteger aCouple;
- //
- BOPTools_CArray1OfVEInterference& aVEs=myIP->VEInterferences();
- //
- myDSIt->Initialize (TopAbs_VERTEX, TopAbs_EDGE);
- //
- // BlockLength correction
- aNbVEs=myDSIt->BlockLength();
- aBlockLength=aVEs.BlockLength();
- if (aNbVEs > aBlockLength) {
- aVEs.SetBlockLength(aNbVEs);
- }
- //
- for (; myDSIt->More(); myDSIt->Next()) {
- myDSIt->Current(n1, n2, bJustAdd);
- if (!IsSuccessorsComputed(n1, n2)) {
- anIndexIn=0;
- aWhat=n1; // Vertex
- aWith=n2; // Edge
- if (myDS->GetShapeType(n1)==TopAbs_EDGE) {
- aWhat=n2;
- aWith=n1;
- }
- //
- if(bJustAdd) {
- continue;
- }
- // Edge
- aE2=TopoDS::Edge(myDS->Shape(aWith));
- if (BRep_Tool::Degenerated(aE2)){
- continue;
- }
- // Vertex
- nV1=aWhat;
- aV1=TopoDS::Vertex(myDS->Shape(aWhat));
- //
- iSDV=FindSDVertex(aWhat);
- if (iSDV) {
- nV1=iSDV;
- aV1=TopoDS::Vertex(myDS->Shape(nV1));
- // Modified to find same domain vertex Thu Sep 14 14:35:18 2006
- // Contribution of Samtech www.samcef.com BEGIN
- Standard_Integer nVE, iSDVE, iRet;
- //
- BooleanOperations_OnceExplorer aExp(*myDS);
- iRet=0;
- aExp.Init(aWith, TopAbs_VERTEX);
- for (; aExp.More(); aExp.Next()) {
- nVE=aExp.Current();
- iSDVE=FindSDVertex(nVE);
- if (iSDVE==iSDV) {
- iRet=1;
- break;
- }
- }
- if (iRet) {
- continue;
- }
- }
- else {
- if (Contains(aE2, aV1)) {
- continue;
- }
- // Contribution of Samtech www.samcef.com END
- }
- //
- //modified by NIZNHY-PKV Mon Dec 28 08:58:05 2009f
-#if OCC_VERSION_LARGE > 0x06030008
- // In OCCT6.3.0sp9 is changed a signature of IntTools_Context::ComputeVE() method
- aFlag = myContext->ComputeVE (aV1, aE2, aT, bToUpdateVertex, aDist);
-#else
- aFlag = myContext->ComputeVE (aV1, aE2, aT);
-#endif
- //modified by NIZNHY-PKV Mon Dec 28 08:58:13 2009t
- //
- if (!aFlag) {
- // Add Interference to the Pool
- BOPTools_VEInterference anInterf (aWhat, aWith, aT);
- anIndexIn=aVEs.Append(anInterf);
- //
- // Add Pave to the Edge's myPavePool
- aCouple.SetCouple(nV1, aWith);
- if (!aSnareMap.Contains(aCouple)){
- aSnareMap.Add(aCouple);
- //
- BOPTools_Pave aPave(nV1, aT, BooleanOperations_VertexEdge);
- aPave.SetInterference(anIndexIn);
- BOPTools_PaveSet& aPaveSet= myPavePool(myDS->RefEdge(aWith));
- aPaveSet.Append(aPave);
- }
- //
- // State for the Vertex in DS;
- myDS->SetState (aWhat, BooleanOperations_ON);
- // Insert Vertex in Interference Object
- BOPTools_VEInterference& aVE=aVEs(anIndexIn);
- aVE.SetNewShape(aWhat);
- //
- myIP->Add(aWhat, aWith, Standard_True, NMTDS_TI_VE);
- //
- //modified by NIZNHY-PKV Mon Dec 28 09:00:54 2009f
-#if OCC_VERSION_LARGE > 0x06030008
- // In OCCT6.3.0sp9 is changed a signature of IntTools_Context::ComputeVE() method
- if (bToUpdateVertex) {
- BRep_Builder aBB;
- //
- aBB.UpdateVertex(aV1, aDist);
- }
-#endif
- //modified by NIZNHY-PKV Mon Dec 28 09:00:57 2009t
- //
- } //if (!aFlag) {
- }
- }
- myIsDone=Standard_True;
-}
-
-//=======================================================================
-// function: PrepareEdges
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::PrepareEdges()
-{
- Standard_Integer i, nV, ii, aNBSuc, ip, aNbShapesObject;
- Standard_Real aT;
- TopAbs_Orientation anOr;
- TopoDS_Edge aE;
- TopoDS_Vertex aV;
- //
- aNbShapesObject=myDS->NumberOfShapesOfTheObject();
- for (i=1; i<=myNbSources; ++i) {
- if (myDS->GetShapeType(i)==TopAbs_EDGE) {
- aE=TopoDS::Edge(myDS->Shape(i));
- //
- if (BRep_Tool::Degenerated(aE)){
- continue;
- }
- //
- BOPTools_PaveSet& aPaveSet=myPavePool(myDS->RefEdge(i));
- //
- // A <-
- aNBSuc=myDS->NumberOfSuccessors(i);
- for (ii=1; ii <=aNBSuc; ii++) {
- nV=myDS->GetSuccessor(i, ii);
- anOr=myDS->GetOrientation(i, ii);
- aV=TopoDS::Vertex(myDS->Shape(nV));
- aV.Orientation(anOr);
- aT=BRep_Tool::Parameter(aV, aE);
- //
- ip=FindSDVertex(nV);
- if (ip) {
- aV=TopoDS::Vertex(myDS->Shape(ip));
- aV.Orientation(anOr);// XX ? if the edge is closed it'll be amazing result
- nV=ip;
- }
- //
- BOPTools_Pave aPave(nV, aT);
- aPaveSet.Append (aPave);
- }
- }
- }
-}
-
-// Modified Thu Sep 14 14:35:18 2006
-// Contribution of Samtech www.samcef.com BEGIN
-//=======================================================================
-//function : Contains
-//purpose :
-//=======================================================================
-Standard_Boolean Contains(const TopoDS_Edge& aE,
- const TopoDS_Vertex& aV)
-{
- Standard_Boolean bRet;
- TopoDS_Iterator aIt;
- //
- bRet=Standard_False;
- aIt.Initialize(aE);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Shape& aVE=aIt.Value();
- if (aVE.IsSame(aV)) {
- bRet=!bRet;
- break;
- }
- }
- return bRet;
-}
-// Contribution of Samtech www.samcef.com END
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_PaveFiller_3.cxx
-// Created: Mon Dec 8 16:06:56 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTTools_PaveFiller.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Face.hxx>
-
-#include <TopExp_Explorer.hxx>
-
-#include <BOPTools_VSInterference.hxx>
-#include <BOPTools_CArray1OfVSInterference.hxx>
-
-#include <NMTDS_Iterator.hxx>
-#include <NMTDS_ShapesDataStructure.hxx>
-#include <NMTDS_InterfPool.hxx>
-#include <IntTools_Context.hxx>
-
-
-static
- Standard_Boolean Contains(const TopoDS_Face& aF,
- const TopoDS_Vertex& aV);
-
-//=======================================================================
-// function: PerformVF
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::PerformVF()
-{
- myIsDone=Standard_False;
- //
- Standard_Boolean aJustAdd;
- Standard_Integer n1, n2, anIndexIn, aFlag, aWhat, aWith, aNbVSs, aBlockLength, iSDV;
- Standard_Real aU, aV;
- TopoDS_Vertex aV1;
- TopoDS_Face aF2;
- //
- BOPTools_CArray1OfVSInterference& aVSs=myIP->VSInterferences();
- //
- // V/E Interferences
- myDSIt->Initialize(TopAbs_VERTEX, TopAbs_FACE);
- //
- // BlockLength correction
- aNbVSs=myDSIt->BlockLength();
- aBlockLength=aVSs.BlockLength();
- if (aNbVSs > aBlockLength) {
- aVSs.SetBlockLength(aNbVSs);
- }
- //
- for (; myDSIt->More(); myDSIt->Next()) {
- myDSIt->Current(n1, n2, aJustAdd);
- if (! IsSuccessorsComputed(n1, n2)) {
- anIndexIn=0;
- aWhat=n1; // Vertex
- aWith=n2; // Face
- if (myDS->GetShapeType(n1)==TopAbs_FACE) {
- aWhat=n2;
- aWith=n1;
- }
- //
- iSDV=FindSDVertex(aWhat);
- //
- if(aJustAdd) {
- //myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexSurface, anIndexIn);
- continue;
- }
- //
- aV1=TopoDS::Vertex(myDS->Shape(aWhat));
- if (iSDV) {
- aV1=TopoDS::Vertex(myDS->Shape(iSDV));
- }
- //
- aF2=TopoDS::Face(myDS->Shape(aWith));
- //
- // Modified Thu Sep 14 14:35:18 2006
- // Contribution of Samtech www.samcef.com BEGIN
- if (Contains(aF2, aV1)) {
- continue;
- }
- // Contribution of Samtech www.samcef.com END
- //
- aFlag=myContext->ComputeVS (aV1, aF2, aU, aV);
- //
- if (!aFlag) {
- //
- // Add Interference to the Pool
- BOPTools_VSInterference anInterf (aWhat, aWith, aU, aV);
- anIndexIn=aVSs.Append(anInterf);
- //
- // SetState for Vertex in DS;
- myDS->SetState (aWhat, BooleanOperations_ON);
- // Insert Vertex in Interference Object
- BOPTools_VSInterference& aVS=aVSs(anIndexIn);
- aVS.SetNewShape(aWhat);
- // qqf
- {
- myIP->Add(aWhat, aWith, Standard_True, NMTDS_TI_VF);
- }
- // qqt
- }
- //myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexSurface, anIndexIn);
- }
- }
- myIsDone=Standard_True;
-}
-// Modified Thu Sep 14 14:35:18 2006
-// Contribution of Samtech www.samcef.com BEGIN
-//=======================================================================
-//function : Contains
-//purpose :
-//=======================================================================
-Standard_Boolean Contains(const TopoDS_Face& aF,
- const TopoDS_Vertex& aV)
-{
- Standard_Boolean bRet;
- TopExp_Explorer aExp;
- //
- bRet=Standard_False;
- aExp.Init(aF, TopAbs_VERTEX);
- for (; aExp.More(); aExp.Next()) {
- const TopoDS_Shape& aVF=aExp.Current();
- if (aVF.IsSame(aV)) {
- bRet=!bRet;
- break;
- }
- }
- return bRet;
-}
-// Contribution of Samtech www.samcef.com END
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_PaveFiller_4.cxx
-// Created: Mon Dec 8 17:08:58 2003
-// Author: Peter KURNEV
-
-#include <NMTTools_PaveFiller.hxx>
-
-#include <stdio.h>
-#include <Precision.hxx>
-
-#include <gp_XYZ.hxx>
-#include <gp_Pnt.hxx>
-#include <Bnd_Box.hxx>
-
-#include <GeomAPI_ProjectPointOnCurve.hxx>
-
-#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <TColStd_MapIteratorOfMapOfInteger.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Compound.hxx>
-
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
-#include <TopTools_DataMapOfShapeListOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_DataMapOfShapeShape.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-#include <BRepBndLib.hxx>
-
-#include <BOPTColStd_Dump.hxx>
-#include <BOPTColStd_Failure.hxx>
-
-#include <IntTools_ShrunkRange.hxx>
-#include <IntTools_Range.hxx>
-#include <IntTools_CommonPrt.hxx>
-#include <IntTools_SequenceOfRanges.hxx>
-#include <IntTools_EdgeEdge.hxx>
-#include <IntTools_SequenceOfCommonPrts.hxx>
-#include <IntTools_Tools.hxx>
-#include <IntTools_Context.hxx>
-
-#include <BOPTools_Pave.hxx>
-#include <BOPTools_PaveSet.hxx>
-#include <BOPTools_PaveBlockIterator.hxx>
-#include <BOPTools_PaveBlock.hxx>
-#include <BOPTools_CArray1OfEEInterference.hxx>
-#include <BOPTools_EEInterference.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
-#include <BOPTools_CArray1OfVVInterference.hxx>
-#include <BOPTools_VVInterference.hxx>
-#include <BOPTools_CArray1OfEEInterference.hxx>
-#include <BOPTools_Tools.hxx>
-#include <BOPTools_IDMapOfPaveBlockIMapOfPaveBlock.hxx>
-#include <BOPTools_IMapOfPaveBlock.hxx>
-#include <BOPTools_ListIteratorOfListOfPave.hxx>
-#include <BOPTools_SequenceOfPaveBlock.hxx>
-
-#include <BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx>
-#include <BooleanOperations_IndexedDataMapOfShapeInteger.hxx>
-#include <BooleanOperations_KindOfInterference.hxx>
-
-#include <NMTDS_Iterator.hxx>
-#include <NMTDS_ShapesDataStructure.hxx>
-#include <NMTDS_IndexedDataMapOfIntegerShape.hxx>
-#include <NMTDS_IndexedDataMapOfShapeBox.hxx>
-#include <NMTDS_BoxBndTree.hxx>
-#include <NCollection_UBTreeFiller.hxx>
-#include <NMTDS_InterfPool.hxx>
-
-#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
-#include <NMTTools_ListOfCommonBlock.hxx>
-#include <NMTTools_CommonBlock.hxx>
-#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-
-#include <TColStd_ListOfInteger.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <BRepBndLib.hxx>
-#include <BOPTools_CArray1OfVSInterference.hxx>
-#include <BOPTools_VSInterference.hxx>
-#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_MapIteratorOfMapOfInteger.hxx>
-
-static
- void TreatNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI,
- TopTools_DataMapOfShapeListOfShape& myImages,
- TopTools_DataMapOfShapeShape& myOrigins);
-
-static
- void MakeNewVertex(const TopTools_ListOfShape& aLV,
- TopoDS_Vertex& aNewVertex);
-
-static
- void VertexParameters(const IntTools_CommonPrt& aCPart,
- Standard_Real& aT1,
- Standard_Real& aT2);
-
-static
- Standard_Boolean IsOnPave(const Standard_Real& aT1,
- const IntTools_Range& aRange,
- const Standard_Real& aTolerance);
-
-// static
-// void EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB);
-
-static
- void ProcessBlock(const BOPTools_PaveBlock& aPB,
- const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB,
- BOPTools_IMapOfPaveBlock& aProcessedBlocks,
- BOPTools_IMapOfPaveBlock& aChain);
-
-static
- void FindChains(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB,
- NMTTools_ListOfCommonBlock& aLCB);
-
-//=======================================================================
-// function: PerformEE
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::PerformEE()
-{
- myIsDone=Standard_False;
- //
- Standard_Boolean bJustAdd;
- Standard_Integer n1, n2, anIndexIn, nE1, nE2, aNbVEs, aBlockLength;
- Standard_Integer aTmp, aWhat, aWith, i, aNbCPrts, aDiscretize=30;
- Standard_Integer aNbLPB1, aNbLPB2;
- Standard_Real aTolE1, aTolE2, aDeflection=0.01;
- BOPTools_ListIteratorOfListOfPaveBlock anIt1, anIt2;
- TopoDS_Edge aEWhat, aEWith;
- TopoDS_Vertex aNewVertex;
- BooleanOperations_IndexedDataMapOfShapeInteger aMapVI;
- BOPTools_IDMapOfPaveBlockIMapOfPaveBlock aMapCB;
- //
- BOPTools_CArray1OfEEInterference& aEEs=myIP->EEInterferences();
- //
- myDSIt->Initialize(TopAbs_EDGE, TopAbs_EDGE);
- //
- // BlockLength correction
- aNbVEs=myDSIt->BlockLength();
- aBlockLength=aEEs.BlockLength();
- if (aNbVEs > aBlockLength) {
- aEEs.SetBlockLength(aNbVEs);
- }
- //
- for (; myDSIt->More(); myDSIt->Next()) {
- myDSIt->Current(n1, n2, bJustAdd);
- anIndexIn = 0;
- nE1=n1;
- nE2=n2;
- //
- if(bJustAdd) {
- continue;
- }
- //
- const TopoDS_Edge aE1=TopoDS::Edge(myDS->Shape(nE1));//mpv
- const TopoDS_Edge aE2=TopoDS::Edge(myDS->Shape(nE2));//mpv
- //
- if (BRep_Tool::Degenerated(aE1) || BRep_Tool::Degenerated(aE2)){
- continue;
- }
- //
- aTolE1=BRep_Tool::Tolerance(aE1);
- aTolE2=BRep_Tool::Tolerance(aE2);
- //
- BOPTools_ListOfPaveBlock& aLPB1=mySplitShapesPool(myDS->RefEdge(nE1));
- BOPTools_ListOfPaveBlock& aLPB2=mySplitShapesPool(myDS->RefEdge(nE2));
- //
- // Modified Thu Sep 14 14:35:18 2006
- // Contribution of Samtech www.samcef.com BEGIN
- aNbLPB1=aLPB1.Extent();
- aNbLPB2=aLPB2.Extent();
- //
- //if (aE1.IsSame(aE2) && aNbLPB1==1 && aNbLPB2==1) {
- // continue;
- //}
- // Contribution of Samtech www.samcef.com END
- //
- for (anIt1.Initialize(aLPB1); anIt1.More(); anIt1.Next()) {
- BOPTools_PaveBlock& aPB1=anIt1.Value();
- const IntTools_ShrunkRange& aShrunkRange1=aPB1.ShrunkRange();
- //
- const IntTools_Range& aSR1=aShrunkRange1.ShrunkRange();
- const Bnd_Box& aBB1=aShrunkRange1.BndBox();
- //
- for (anIt2.Initialize(aLPB2); anIt2.More(); anIt2.Next()) {
- BOPTools_PaveBlock& aPB2=anIt2.Value();
- const IntTools_ShrunkRange& aShrunkRange2=aPB2.ShrunkRange();
- //
- const IntTools_Range& aSR2=aShrunkRange2.ShrunkRange();
- const Bnd_Box& aBB2=aShrunkRange2.BndBox();
- //
- if (aBB1.IsOut (aBB2)) {
- continue;
- }
- //
- // EE
- IntTools_EdgeEdge aEE;
- aEE.SetEdge1 (aE1);
- aEE.SetEdge2 (aE2);
- aEE.SetTolerance1 (aTolE1);
- aEE.SetTolerance2 (aTolE2);
- aEE.SetDiscretize (aDiscretize);
- aEE.SetDeflection (aDeflection);
- //
- IntTools_Range anewSR1 = aSR1;
- IntTools_Range anewSR2 = aSR2;
- //
- BOPTools_Tools::CorrectRange (aE1, aE2, aSR1, anewSR1);
- BOPTools_Tools::CorrectRange (aE2, aE1, aSR2, anewSR2);
- //
- aEE.SetRange1(anewSR1);
- aEE.SetRange2(anewSR2);
- //
- aEE.Perform();
- //
- anIndexIn=0;
- //
- if (aEE.IsDone()) {
- // reverse order if it is necessary
- aEWhat=aE1;
- aEWith=aE2;
- aWhat=nE1;
- aWith=nE2;
- if (aEE.Order()) {
- aTmp=aWhat;
- aWhat=aWith;
- aWith=aTmp;
- aEWhat=aE2;
- aEWith=aE1;
- }
- //
- const IntTools_SequenceOfCommonPrts& aCPrts=aEE.CommonParts();
- aNbCPrts=aCPrts.Length();
- for (i=1; i<=aNbCPrts; i++) {
- const IntTools_CommonPrt& aCPart=aCPrts(i);
- const IntTools_SequenceOfRanges& aRanges2=aCPart.Ranges2();
- //
- anIndexIn=0;
- //
- TopAbs_ShapeEnum aType=aCPart.Type();
- switch (aType) {
- case TopAbs_VERTEX: {
- Standard_Real aT1, aT2, aTol=Precision::PConfusion();
- Standard_Boolean bIsOnPave1, bIsOnPave2;
- IntTools_Range aR1, aR2;
- //
- VertexParameters(aCPart, aT1, aT2);
- //
- //decide to keep the pave or not
- aR1 = (aEE.Order()) ? anewSR2 : anewSR1;
- aR2 = (aEE.Order()) ? anewSR1 : anewSR2;
- //
- aTol=0.8*aTol;
- bIsOnPave1=IsOnPave(aT1, aR1, aTol);
- bIsOnPave2=IsOnPave(aT2, aR2, aTol);
- //
- if(bIsOnPave1 || bIsOnPave2) {
- continue;
- }
- //
- BOPTools_Tools::MakeNewVertex(aEWhat, aT1, aEWith, aT2, aNewVertex);
- //
- {
- Standard_Integer nV11, nV12, nV21, nV22, nVS[2], k, j, iFound;
- Standard_Real aTolVx, aTolVnew, aD2, aDT2;
- TColStd_MapOfInteger aMV;
- gp_Pnt aPnew, aPx;
- //
- iFound=0;
- j=-1;
- nV11=aPB1.Pave1().Index();
- nV12=aPB1.Pave2().Index();
- nV21=aPB2.Pave1().Index();
- nV22=aPB2.Pave2().Index();
- aMV.Add(nV11);
- aMV.Add(nV12);
- //
- if (aMV.Contains(nV21)) {
- ++j;
- nVS[j]=nV21;
- }
- if (aMV.Contains(nV22)) {
- ++j;
- nVS[j]=nV22;
- }
- //
- aTolVnew=BRep_Tool::Tolerance(aNewVertex);
- aPnew=BRep_Tool::Pnt(aNewVertex);
- //
- for (k=0; k<=j; ++k) {
- const TopoDS_Vertex& aVx=TopoDS::Vertex(myDS->Shape(nVS[k]));
- aTolVx=BRep_Tool::Tolerance(aVx);
- aPx=BRep_Tool::Pnt(aVx);
- aD2=aPnew.SquareDistance(aPx);
- //
- aDT2=100.*(aTolVnew+aTolVx)*(aTolVnew+aTolVx);
- //
- if (aD2<aDT2) {
- iFound=1;
- break;
- }
- }
- //
- if (iFound) {
- continue;
- }
- }
- //
- // Add Interference to the Pool
- BOPTools_EEInterference anInterf (aWhat, aWith, aCPart);
- //
- anIndexIn=aEEs.Append(anInterf);
- // qqf
- {
- myIP->Add(aWhat, aWith, Standard_True, NMTDS_TI_EE);
- }
- // qqt
- //
- // Collect
- aMapVI.Add(aNewVertex, anIndexIn);
- }
- break;
-
- case TopAbs_EDGE: {
- Standard_Integer aNbComPrt2;
- Standard_Boolean aCoinsideFlag;
- //
- aNbComPrt2=aRanges2.Length();
- aCoinsideFlag=IsBlocksCoinside(aPB1, aPB2);
- //
- if (aNbComPrt2>1 || !aCoinsideFlag) {
- break;
- }
- //
- // Fill aMapCB
- if (aMapCB.Contains(aPB1)) {
- BOPTools_IMapOfPaveBlock& aMapPB=aMapCB.ChangeFromKey(aPB1);
- aMapPB.Add(aPB1);
- aMapPB.Add(aPB2);
- }
- else {
- BOPTools_IMapOfPaveBlock aMapPB;
- aMapPB.Add(aPB1);
- aMapPB.Add(aPB2);
- aMapCB.Add(aPB1, aMapPB);
- }
- //
- if (aMapCB.Contains(aPB2)) {
- BOPTools_IMapOfPaveBlock& aMapPB=aMapCB.ChangeFromKey(aPB2);
- aMapPB.Add(aPB1);
- aMapPB.Add(aPB2);
- }
- else {
- BOPTools_IMapOfPaveBlock aMapPB;
- aMapPB.Add(aPB1);
- aMapPB.Add(aPB2);
- aMapCB.Add(aPB2, aMapPB);
- }
- // qqf
- {
- myIP->Add(aWhat, aWith, Standard_True, NMTDS_TI_EE);
- }
- // qqt
- }
- break;
- default:
- break;
- } // switch (aType)
- } // for (i=1; i<=aNbCPrts; i++)
- }// if (aEE.IsDone())
- } // for (; anIt2.More(); anIt2.Next())
- } // for (; anIt1.More(); anIt1.Next())
- }// for (; myDSIt.More(); myDSIt.Next())
- //
- {
- NMTTools_ListOfCommonBlock aLCB;
- //
- FindChains(aMapCB, aLCB);
- EENewVertices (aMapVI);
- //TreatPaveBlocks(*this, aLCB);
- TreatPaveBlocks(aLCB);
- ReplaceCommonBlocks(aLCB);
- }
- //
- PerformVF1();
- //
- myIsDone=Standard_True;
-}
-
-//=======================================================================
-// function:TreatPaveBlocks
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::TreatPaveBlocks (NMTTools_ListOfCommonBlock& theLCB)
-{
- Standard_Boolean bFound;
- Standard_Integer nE, nV, nVp, iFlag;
- Standard_Real aT;
- TColStd_MapOfInteger aMI;
- TColStd_MapIteratorOfMapOfInteger aItMI;
- NMTTools_ListIteratorOfListOfCommonBlock aItLCB;
- BOPTools_ListIteratorOfListOfPaveBlock aItLPB;
- BOPTools_ListIteratorOfListOfPave aItLP;
- //
- aItLCB.Initialize(theLCB);
- for (; aItLCB.More(); aItLCB.Next()) {
- const NMTTools_CommonBlock& aCB=aItLCB.Value();
- //
- aMI.Clear();
- const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks();
- //
- // 1 -> aMI
- aItLPB.Initialize(aLPB);
- for (; aItLPB.More(); aItLPB.Next()) {
- const BOPTools_PaveBlock& aPB=aItLPB.Value();
- nE=aPB.OriginalEdge();
- BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE));
- BOPTools_ListOfPave& aLP=aPaveSet.ChangeSet();
- //
- aItLP.Initialize(aLP);
- for (; aItLP.More(); aItLP.Next()) {
- const BOPTools_Pave& aPave=aItLP.Value();
- nV=aPave.Index();
- aMI.Add(nV);
- }
- }//for (; anItLPB.More(); anItLPB.Next()) {
- //
- // 2
- aItLPB.Initialize(aLPB);
- for (; aItLPB.More(); aItLPB.Next()) {
- const BOPTools_PaveBlock& aPB=aItLPB.Value();
- nE=aPB.OriginalEdge();
- BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE));
- BOPTools_ListOfPave& aLP=aPaveSet.ChangeSet();
- //
- aItMI.Initialize(aMI);
- for (; aItMI.More(); aItMI.Next()) {
- nV=aItMI.Key();
- bFound=Standard_False;
- aItLP.Initialize(aLP);
- for (; aItLP.More(); aItLP.Next()) {
- const BOPTools_Pave& aPave=aItLP.Value();
- nVp=aPave.Index();
- if (nVp==nV) {
- bFound=!bFound;
- break;
- }
- }
- //
- if (!bFound) {
- // Append Pave of nV to rhe edge nE
- const TopoDS_Edge& aE=*(TopoDS_Edge*)(&myDS->Shape(nE));
- const TopoDS_Vertex& aV= *(TopoDS_Vertex*)(&myDS->Shape(nV));
- iFlag=myContext->ComputeVE (aV, aE, aT);
- if (!iFlag) {
- BOPTools_Pave aPave;
- //
- aPave.SetInterference(-1);
- aPave.SetType (BooleanOperations_EdgeEdge);
- aPave.SetIndex(nV);
- aPave.SetParam(aT);
- aPaveSet.Append(aPave);
- }
- }
- }//for (; aItMI.More(); aItMI.Next()) {
- }//for (; anItLPB.More(); anItLPB.Next()) {
- }
-}
-
-//=======================================================================
-// function:EECommonBlocks
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB)
-{
- NMTTools_ListOfCommonBlock aLCB;
- //
- FindChains(aMapCB, aLCB);
- ReplaceCommonBlocks(aLCB);
-}
-
-//=======================================================================
-// function:EENewVertices
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::EENewVertices (const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI)
-{
- Standard_Integer aNb, aNbVSD, nVnew, nIEE, nE[2], j, iFlag;
- Standard_Real aT;
- TopoDS_Edge aE;
- TopTools_DataMapOfShapeListOfShape myImages;
- TopTools_DataMapOfShapeShape myOrigins;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
- TopTools_ListIteratorOfListOfShape aIt;
- BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
- TColStd_MapOfInteger aMFence;
- BOPTools_Pave aPave;
- //
- BOPTools_CArray1OfEEInterference& aEEs=myIP->EEInterferences();
- //
- aNb=aMapVI.Extent();
- if (!aNb) { // no new vertices, no new problems
- return;
- }
- //
- // 0.
- if (aNb==1) {
- TopoDS_Vertex aV1=TopoDS::Vertex(aMapVI.FindKey(1));
- EENewVertices(aV1, aMapVI);
- return;
- }
- //
- // 1.
- TreatNewVertices(aMapVI, myImages, myOrigins);
- //
- aItIm.Initialize(myImages);
- for (; aItIm.More(); aItIm.Next()) {
- const TopoDS_Vertex& aVnew=TopoDS::Vertex(aItIm.Key());
- const TopTools_ListOfShape& aLVSD=aItIm.Value();
- //
- aNbVSD=aLVSD.Extent();
- if (aNbVSD==1) {// simple case aVnew=aVold
- EENewVertices(aVnew, aMapVI);
- continue;
- }
- //
- // aNbVSD>1
- myDS->InsertShapeAndAncestorsSuccessors(aVnew, anASSeq);
- nVnew=myDS->NumberOfInsertedShapes();
- myDS->SetState(nVnew, BooleanOperations_ON);
- //
- aMFence.Clear();
- aIt.Initialize(aLVSD);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Vertex& aVold=TopoDS::Vertex(aIt.Value());
- nIEE=aMapVI.FindFromKey(aVold);
- BOPTools_EEInterference& aEE=aEEs(nIEE);
- aEE.Indices(nE[0], nE[1]);
- aEE.SetNewShape(nVnew);
- //
- for (j=0; j<2; ++j) {
- if (aMFence.Add(nE[j])) {
- aE=TopoDS::Edge(myDS->Shape(nE[j]));
- iFlag=myContext->ComputeVE (aVnew, aE, aT);
- if (!iFlag) {
- aPave.SetInterference(-1);
- aPave.SetType (BooleanOperations_EdgeEdge);
- aPave.SetIndex(nVnew);
- aPave.SetParam(aT);
- //
- BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE[j]));
- aPaveSet.Append(aPave);
- }
- }// if (aMFence.Add(nE[j])) {
- }// for (j=0; j<2; ++j) {
- }//for (; aIt.More(); aIt.Next()) {
- }// for (; aItIm.More(); aItIm.Next())
-}
-//
-// case: use_02
-// completely rewritten
-//=======================================================================
-//function : TreatNewVertices
-//purpose :
-//=======================================================================
-void TreatNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI,
- TopTools_DataMapOfShapeListOfShape& myImages,
- TopTools_DataMapOfShapeShape& myOrigins)
-{
- Standard_Integer j, i, aNbV, aNbVSD;
- Standard_Real aTol;
- TColStd_ListIteratorOfListOfInteger aIt;
- TopoDS_Shape aSTmp, aVF;
- TopoDS_Vertex aVnew;
- TopTools_IndexedMapOfShape aMV, aMVProcessed;
- TopTools_ListIteratorOfListOfShape aItS;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
- TopTools_DataMapOfShapeListOfShape aMVV;
- NMTDS_IndexedDataMapOfIntegerShape aMIS;
- NMTDS_IndexedDataMapOfShapeBox aMSB;
- //
- NMTDS_BoxBndTreeSelector aSelector;
- NMTDS_BoxBndTree aBBTree;
- NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
- //
- myImages.Clear();
- myOrigins.Clear();
- //
- aNbV=aMapVI.Extent();
- for (i=1; i<=aNbV; ++i) {
- const TopoDS_Shape& aV=aMapVI.FindKey(i);
- aMV.Add(aV);
- }
- //
- for (i=1; i<=aNbV; ++i) {
- const TopoDS_Shape& aV=aMV(i);
- Bnd_Box aBox;
- //
- aTol=BRep_Tool::Tolerance(TopoDS::Vertex(aV));
- aBox.SetGap(aTol);
- BRepBndLib::Add(aV, aBox);
- //
- aTreeFiller.Add(i, aBox);
- //
- aMIS.Add(i, aV);
- aMSB.Add(aV, aBox);
- }
- //
- aTreeFiller.Fill();
- //
- // Chains
- for (i=1; i<=aNbV; ++i) {
- const TopoDS_Shape& aV=aMV(i);
- //
- if (aMVProcessed.Contains(aV)) {
- continue;
- }
- //
- Standard_Integer aNbIP, aIP, aNbIP1, aIP1;
- TopTools_ListOfShape aLVSD;
- TColStd_MapOfInteger aMIP, aMIP1, aMIPC;
- TColStd_MapIteratorOfMapOfInteger aIt1;
- //
- aMIP.Add(i);
- while(1) {
- aNbIP=aMIP.Extent();
- aIt1.Initialize(aMIP);
- for(; aIt1.More(); aIt1.Next()) {
- aIP=aIt1.Key();
- if (aMIPC.Contains(aIP)) {
- continue;
- }
- //
- const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
- const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP);
- //
- aSelector.Clear();
- aSelector.SetBox(aBoxVP);
- //
- aNbVSD=aBBTree.Select(aSelector);
- if (!aNbVSD) {
- continue; // it must not be
- }
- //
- const TColStd_ListOfInteger& aLI=aSelector.Indices();
- aIt.Initialize(aLI);
- for (; aIt.More(); aIt.Next()) {
- aIP1=aIt.Value();
- if (aMIP.Contains(aIP1)) {
- continue;
- }
- aMIP1.Add(aIP1);
- } //for (; aIt.More(); aIt.Next()) {
- }//for(; aIt1.More(); aIt1.Next()) {
- //
- aNbIP1=aMIP1.Extent();
- if (!aNbIP1) {
- break; // from while(1)
- }
- //
- aIt1.Initialize(aMIP);
- for(; aIt1.More(); aIt1.Next()) {
- aIP=aIt1.Key();
- aMIPC.Add(aIP);
- }
- //
- aMIP.Clear();
- aIt1.Initialize(aMIP1);
- for(; aIt1.More(); aIt1.Next()) {
- aIP=aIt1.Key();
- aMIP.Add(aIP);
- }
- aMIP1.Clear();
- }// while(1)
- //...
- aNbIP=aMIPC.Extent();
- if (!aNbIP) {
- aMIPC.Add(i);
- }
- //
- aIt1.Initialize(aMIPC);
- for(j=0; aIt1.More(); aIt1.Next(), ++j) {
- aIP=aIt1.Key();
- const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
- if (!j) {
- aVF=aVP;
- }
- aLVSD.Append(aVP);
- aMVProcessed.Add(aVP);
- }
- myImages.Bind(aVF, aLVSD);
- }// for (i=1; i<=aNbV; ++i) {
- //------------------------------
- //
- // Make new vertices
- aMV.Clear();
- aItIm.Initialize(myImages);
- for (; aItIm.More(); aItIm.Next()) {
- const TopoDS_Shape& aV=aItIm.Key();
- const TopTools_ListOfShape& aLVSD=aItIm.Value();
- aNbVSD=aLVSD.Extent();
- if (aNbVSD>1) {
- aMV.Add(aV);
- MakeNewVertex(aLVSD, aVnew);
- aMVV.Bind(aVnew, aLVSD);
- }
- }
- //
- // UnBind old vertices
- aNbV=aMV.Extent();
- for (i=1; i<=aNbV; ++i) {
- const TopoDS_Shape& aV=aMV(i);
- myImages.UnBind(aV);
- }
- //
- // Bind new vertices
- aItIm.Initialize(aMVV);
- for (; aItIm.More(); aItIm.Next()) {
- const TopoDS_Shape& aV=aItIm.Key();
- const TopTools_ListOfShape& aLVSD=aItIm.Value();
- myImages.Bind(aV, aLVSD);
- }
- //
- // Origins
- aItIm.Initialize(myImages);
- for (; aItIm.More(); aItIm.Next()) {
- const TopoDS_Shape& aV=aItIm.Key();
- const TopTools_ListOfShape& aLVSD=aItIm.Value();
- //
- aItS.Initialize(aLVSD);
- for (; aItS.More(); aItS.Next()) {
- const TopoDS_Shape& aVSD=aItS.Value();
- if (!myOrigins.IsBound(aVSD)) {
- myOrigins.Bind(aVSD, aV);
- }
- }
- }
-}
-
-//=======================================================================
-//function : MakeNewVertex
-//purpose :
-//=======================================================================
-void MakeNewVertex(const TopTools_ListOfShape& aLV,
- TopoDS_Vertex& aNewVertex)
-{
- Standard_Integer aNbV;
- Standard_Real aTolV, aD, aDmax;
- gp_XYZ aGC;
- gp_Pnt aP3D, aPGC;
- TopoDS_Vertex aVx;
- BRep_Builder aBB;
- TopTools_ListIteratorOfListOfShape aIt;
- //
- aNbV=aLV.Extent();
- if (!aNbV) {
- return;
- }
- //
- // center of gravity
- aGC.SetCoord(0.,0.,0.);
- aIt.Initialize(aLV);
- for (; aIt.More(); aIt.Next()) {
- aVx=TopoDS::Vertex(aIt.Value());
- aP3D=BRep_Tool::Pnt(aVx);
- aGC+=aP3D.XYZ();
- }
- aGC/=(Standard_Real)aNbV;
- aPGC.SetXYZ(aGC);
- //
- // tolerance value
- aDmax=-1.;
- aIt.Initialize(aLV);
- for (; aIt.More(); aIt.Next()) {
- aVx=TopoDS::Vertex(aIt.Value());
- aP3D=BRep_Tool::Pnt(aVx);
- aTolV=BRep_Tool::Tolerance(aVx);
- aD=aPGC.Distance(aP3D)+aTolV;
- if (aD>aDmax) {
- aDmax=aD;
- }
- }
- //
- aBB.MakeVertex (aNewVertex, aPGC, aDmax);
-}
-
-//=======================================================================
-// function:EENewVertices
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::EENewVertices (const TopoDS_Vertex& aNewVertex,
- const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI)
-{
- Standard_Integer i, aNewShape, nE1, nE2;
- Standard_Real aT1, aT2;
- BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
- BOPTools_Pave aPave;
- //
- BOPTools_CArray1OfEEInterference& aEEs=myIP->EEInterferences();
- //
- // one new vertex case is treated in usual way
- //
- // Insert New Vertex in DS;
- myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq);
- aNewShape=myDS->NumberOfInsertedShapes();
- myDS->SetState (aNewShape, BooleanOperations_ON);
- // Insert New Vertex in EE Interference
- i=aMapVI.FindFromKey(aNewVertex);
- BOPTools_EEInterference& aEEInterf= aEEs(i);
- aEEInterf.SetNewShape(aNewShape);
- // Extact interference info
- aEEInterf.Indices(nE1, nE2);
- const IntTools_CommonPrt& aCPart=aEEInterf.CommonPrt();
- VertexParameters(aCPart, aT1, aT2);
- //
- // Add Paves to the myPavePoolNew
- aPave.SetInterference(i);
- aPave.SetType (BooleanOperations_EdgeEdge);
- aPave.SetIndex(aNewShape);
- // Pave for edge nE1
- aPave.SetParam(aT1);
- BOPTools_PaveSet& aPaveSet1=myPavePoolNew(myDS->RefEdge(nE1));
- aPaveSet1.Append(aPave);
- // Pave for edge nE2
- aPave.SetParam(aT2);
- BOPTools_PaveSet& aPaveSet2=myPavePoolNew(myDS->RefEdge(nE2));
- aPaveSet2.Append(aPave);
-}
-
-//=======================================================================
-// function: RefinePavePool
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::RefinePavePool()
-{
- Standard_Integer i, aNbNew;
-
- for (i=1; i<=myNbSources; i++) {
-
- if ((myDS->GetShape(i)).ShapeType()==TopAbs_EDGE) {
- BOPTools_PaveSet& aPS= myPavePool(myDS->RefEdge(i));
- //
- BOPTools_PaveSet& aNewPS= myPavePoolNew(myDS->RefEdge(i));
- BOPTools_ListOfPave& aNewLP=aNewPS.ChangeSet();
- //
- aNbNew=aNewLP.Extent();
- if (aNbNew) {
- BOPTools_ListIteratorOfListOfPave anIt(aNewLP);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_Pave& aPave=anIt.Value();
- aPS.Append(aPave);
- }
- // Clear the ListOfPaveBlock
- BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(i));
- aLPB.Clear();
- // Prepare the paveBlocks for that egde again
- PreparePaveBlocks(i);
- }
- aNewLP.Clear();
- }
- }
-}
-
-//=======================================================================
-// function: PreparePaveBlocks
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::PreparePaveBlocks(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2)
-{
- myIsDone=Standard_False;
- //
- Standard_Boolean bOk1, bOk2, bOk3, bFlag;
- Standard_Integer i, aNb, nE[2], n1, n2, aNbSplits;
- TColStd_MapOfInteger aMap;
- //
- bOk1= (aType1==TopAbs_VERTEX) && (aType2==TopAbs_EDGE) ;
- bOk2= (aType1==TopAbs_EDGE) && (aType2==TopAbs_EDGE) ;
- bOk3= (aType1==TopAbs_EDGE) && (aType2==TopAbs_FACE) ;
- if (!bOk1 && !bOk2 && !bOk3) {// error: Type mismatch
- return;
- }
- //
- aNb=bOk2 ? 2 : 1;
- //
- myDSIt->Initialize(aType1, aType2);
- for (; myDSIt->More(); myDSIt->Next()) {
- myDSIt->Current(n1, n2, bFlag);
- //
- nE[0]=n1;
- nE[1]=n2;
- if (myDS->GetShapeType(n1)!=TopAbs_EDGE) {
- nE[0]=n2;
- nE[1]=n1;
- }
- //
- for (i=0; i<aNb; ++i) {
- BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE[i]));
- aNbSplits=aLPB.Extent();
- if (!aNbSplits) {
- if (aMap.Add(nE[i])) {
- PreparePaveBlocks(nE[i]);
- if (!myIsDone) {
- return;
- }
- }
- }
- }
- }// for (; myDSIt.More(); myDSIt.Next())
- myIsDone=Standard_True;
-}
-
-//=======================================================================
-// function: PreparePaveBlocks
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::PreparePaveBlocks(const Standard_Integer nE)
-{
- myIsDone=Standard_False;
- //
- char buf[512];
- Standard_Integer nV1, nV2, iErr;
- TopoDS_Edge aE;
- TopoDS_Vertex aV1, aV2;
- //
- BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE));
- // Edge
- aE=TopoDS::Edge(myDS->Shape(nE));
- if (BRep_Tool::Degenerated(aE)) {
- myIsDone=Standard_True;
- return;
- }
- //
- BOPTools_PaveSet& aPS=myPavePool(myDS->RefEdge(nE));
- //
- BOPTools_PaveBlockIterator aPBIt(nE, aPS);
- for (; aPBIt.More(); aPBIt.Next()) {
- BOPTools_PaveBlock& aPB=aPBIt.Value();
- const IntTools_Range& aRange=aPB.Range();
- //
- const BOPTools_Pave& aPave1=aPB.Pave1();
- nV1=aPave1.Index();
- aV1=TopoDS::Vertex(myDS->GetShape(nV1));
- //
- const BOPTools_Pave& aPave2=aPB.Pave2();
- nV2=aPave2.Index();
- aV2=TopoDS::Vertex(myDS->GetShape(nV2));
- //
- // ShrunkRange
- IntTools_ShrunkRange aSR (aE, aV1, aV2, aRange, myContext);
- iErr=aSR.ErrorStatus();
- if (!aSR.IsDone()) {
- sprintf (buf, "Can not obtain ShrunkRange for Edge %d\n", nE);
- BOPTColStd_Dump::PrintMessage(buf);
- sprintf (buf, "Can not obtain ShrunkRange for Edge %d", nE);
- throw
- BOPTColStd_Failure(buf) ;
- }
- //
- if (iErr==6) {
- sprintf(buf,
- "Warning: [PreparePaveBlocks()] Max.Dummy Shrunk Range for Edge %d\n", nE);
- BOPTColStd_Dump::PrintMessage(buf);
- }
- else {
- // Check left paves and correct ShrunkRange if it is necessary
- CorrectShrunkRanges (0, aPave1, aSR);
- CorrectShrunkRanges (1, aPave2, aSR);
- }
- //
- aPB.SetShrunkRange(aSR);
- aLPB.Append(aPB);
- } //for (; aPBIt.More(); aPBIt.Next())
- myIsDone=Standard_True;
-}
-
-//=======================================================================
-// function: CorrectShrunkRanges
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::CorrectShrunkRanges(const Standard_Integer aSide,
- const BOPTools_Pave& aPave,
- IntTools_ShrunkRange& aShrunkRange)
-{
- BooleanOperations_KindOfInterference aType;
- Standard_Integer anIndexInterf ;
- //
- aType=aPave.Type();
- if (aType!=BooleanOperations_EdgeEdge) {
- return;
- }
- //
- anIndexInterf=aPave.Interference();
- if (anIndexInterf<0) {
- // it can be EE interf between E and (e1,e2,..en) -> vertex
- // so we can't decide which aEE.CommonPrt() we should take.
- return;
- }
-
- BOPTools_CArray1OfEEInterference& aEEs=myIP->EEInterferences();
- const BOPTools_EEInterference& aEE=aEEs(anIndexInterf);
- const IntTools_CommonPrt& aCP=aEE.CommonPrt();
- const TopoDS_Edge& aE1=aCP.Edge1();
- const TopoDS_Edge& aE2=aCP.Edge2();
-
- const IntTools_Range& aSR=aShrunkRange.ShrunkRange();
- const TopoDS_Edge& aE=aShrunkRange.Edge();
-
- IntTools_Range aNewRange;
- IntTools_Range aCPRange;
-
- if (aE1.IsSame(aE)) {
- const IntTools_Range& aR1=aCP.Range1();
- aCPRange=aR1;
- }
- if (aE2.IsSame(aE)) {
- const IntTools_SequenceOfRanges& aSeqR=aCP.Ranges2();
- const IntTools_Range& aR2=aSeqR(1);
- aCPRange=aR2;
- }
- //
- Standard_Real aCoeff=1.05, tV, tNV;
- tV=aPave.Param();
- if (aSide==0) { // Left
- if (aCPRange.Last() > aSR.First()) {
- tNV=aCPRange.Last();
- tNV=tV+aCoeff*(tNV-tV);
- aNewRange.SetFirst(tNV);
- aNewRange.SetLast (aSR.Last());
- if(aNewRange.First() < aNewRange.Last()) {
- aShrunkRange.SetShrunkRange(aNewRange);
- }
- }
- }
- else { // Right
- if (aCPRange.First() < aSR.Last()) {
- tNV=aCPRange.First();
- tNV=tV-aCoeff*(tV-tNV);
- aNewRange.SetFirst(aSR.First());
- aNewRange.SetLast (tNV);
-
- if(aNewRange.First() < aNewRange.Last()) {
- aShrunkRange.SetShrunkRange(aNewRange);
- }
- }
- }
-}
-
-//=======================================================================
-// function: IsBlocksCoinside
-// purpose:
-//=======================================================================
-Standard_Boolean NMTTools_PaveFiller::IsBlocksCoinside(const BOPTools_PaveBlock& aPB1,
- const BOPTools_PaveBlock& aPB2) const
-{
- Standard_Boolean bRetFlag=Standard_True;
- Standard_Real aTolV11, aTolV12, aTolV21, aTolV22;
- Standard_Real d1121, d1122, d1222, d1221, aTolSum, aCoeff=1.05;
- gp_Pnt aP11, aP12, aP21, aP22;
-
- const TopoDS_Vertex aV11=TopoDS::Vertex(myDS->Shape(aPB1.Pave1().Index()));//mpv
- const TopoDS_Vertex aV12=TopoDS::Vertex(myDS->Shape(aPB1.Pave2().Index()));//mpv
- const TopoDS_Vertex aV21=TopoDS::Vertex(myDS->Shape(aPB2.Pave1().Index()));//mpv
- const TopoDS_Vertex aV22=TopoDS::Vertex(myDS->Shape(aPB2.Pave2().Index()));//mpv
-
- aTolV11=BRep_Tool::Tolerance(aV11);
- aTolV12=BRep_Tool::Tolerance(aV12);
- aTolV21=BRep_Tool::Tolerance(aV21);
- aTolV22=BRep_Tool::Tolerance(aV22);
-
- aP11=BRep_Tool::Pnt(aV11);
- aP12=BRep_Tool::Pnt(aV12);
- aP21=BRep_Tool::Pnt(aV21);
- aP22=BRep_Tool::Pnt(aV22);
-
- d1121=aP11.Distance(aP21);
- aTolSum=aCoeff*(aTolV11+aTolV21);
- if (d1121<aTolSum) {
- d1222=aP12.Distance(aP22);
- aTolSum=aCoeff*(aTolV12+aTolV22);
- if (d1222<aTolSum) {
- return bRetFlag;
- }
- }
- //
- d1122=aP11.Distance(aP22);
- aTolSum=aCoeff*(aTolV11+aTolV22);
- if (d1122<aTolSum) {
- d1221=aP12.Distance(aP21);
- aTolSum=aCoeff*(aTolV12+aTolV21);
- if (d1221<aTolSum) {
- return bRetFlag;
- }
- }
- return !bRetFlag;
-}
-
-//=======================================================================
-// function: ReplaceCommonBlocks
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::ReplaceCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB)
-{
- RemoveCommonBlocks(aLCB);
- SplitCommonBlocks(aLCB);
-}
-
-//=======================================================================
-// function: SplitCommonBlocks
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::SplitCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB)
-{
- Standard_Integer nE;
- NMTTools_ListOfCommonBlock aLCBx;
- NMTTools_ListIteratorOfListOfCommonBlock anIt, anItCBx;
- BOPTools_ListIteratorOfListOfPaveBlock anItLPE;
- //
- anIt.Initialize(aLCB);
- for (; anIt.More(); anIt.Next()) {
- const NMTTools_CommonBlock& aCB=anIt.Value();
- //
- //XXX
- aLCBx.Clear();
- //XXX
- SplitCommonBlock(aCB, aLCBx);
- //
- anItCBx.Initialize(aLCBx);
- for (; anItCBx.More(); anItCBx.Next()) {
- const NMTTools_CommonBlock& aCBx=anItCBx.Value();
- const BOPTools_ListOfPaveBlock& aLPBx=aCBx.PaveBlocks();
- //
- anItLPE.Initialize(aLPBx);
- for (; anItLPE.More(); anItLPE.Next()) {
- const BOPTools_PaveBlock& aPBx=anItLPE.Value();
- nE=aPBx.OriginalEdge();
- NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE));
- aLCBE.Append(aCBx);
- }
- }
- }
- // Modified to provide the order of edges
- // in common block where the edge with max
- // tolerance value will be the first
- // Thu Sep 14 14:35:18 2006
- // Contribution of Samtech www.samcef.com BEGIN
- Standard_Integer i, iMax, aNb, aNbCB, nSp;
- Standard_Real aTolSp, aTolMax;
- BOPTools_ListOfPaveBlock *pLPBE;
- //
- aNb=myDS->NumberOfShapesOfTheObject();
- for (nE=1; nE<=aNb; ++nE) {
- const TopoDS_Shape& aE=myDS->Shape(nE);
- if (aE.ShapeType()!=TopAbs_EDGE) {
- continue;
- }
- //
- NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE));
- aNbCB=aLCBE.Extent();
- if (!aNbCB) {
- continue;
- }
- //
- anIt.Initialize(aLCBE);
- for (; anIt.More(); anIt.Next()) {
- NMTTools_CommonBlock& aCBE=anIt.ChangeValue();
- const BOPTools_ListOfPaveBlock& aLPBE=aCBE.PaveBlocks();
- //
- aTolMax=-1.;
- anItLPE.Initialize(aLPBE);
- for (i=0; anItLPE.More(); anItLPE.Next(), ++i) {
- const BOPTools_PaveBlock& aPB=anItLPE.Value();
- nSp=aPB.OriginalEdge();
- const TopoDS_Edge& aSp=TopoDS::Edge(myDS->Shape(nSp));
- aTolSp=BRep_Tool::Tolerance(aSp);
- if (aTolSp>aTolMax) {
- iMax=i;
- aTolSp=aTolMax;
- }
- }
- //
- BOPTools_ListOfPaveBlock aLPBx;
- //
- anItLPE.Initialize(aLPBE);
- for (i=0; anItLPE.More(); anItLPE.Next(), ++i) {
- const BOPTools_PaveBlock& aPB=anItLPE.Value();
- if (i==iMax) {
- aLPBx.Prepend(aPB);
- }
- else {
- aLPBx.Append(aPB);
- }
- }
- //
- pLPBE=(BOPTools_ListOfPaveBlock *)&aLPBE;
- pLPBE->Clear();
- pLPBE->Append(aLPBx);
- }//for (; anIt.More(); anIt.Next()) {
- }//for (nE=1; nE<=aNb; ++nE) {
- // Contribution of Samtech www.samcef.com END
-}
-
-//=======================================================================
-// function: RemoveCommonBlocks
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::RemoveCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB)
-{
- Standard_Integer nE;
- NMTTools_ListOfCommonBlock aLCBx;
- NMTTools_ListIteratorOfListOfCommonBlock anItCB, anItCBE;
- BOPTools_ListIteratorOfListOfPaveBlock anItLPB;
- //
- anItCB.Initialize(aLCB);
- for (; anItCB.More(); anItCB.Next()) {
- const NMTTools_CommonBlock& aCB=anItCB.Value();
- const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks();
- //
- // Remove aCB from each edge
- anItLPB.Initialize(aLPB);
- for (; anItLPB.More(); anItLPB.Next()) {
- const BOPTools_PaveBlock& aPB=anItLPB.Value();
- nE=aPB.OriginalEdge();
- //
- NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE));
- anItCBE.Initialize(aLCBE);
- for (; anItCBE.More(); anItCBE.Next()) {
- const NMTTools_CommonBlock& aCBE=anItCBE.Value();
- if (aCBE.IsEqual(aCB)) {
- aLCBE.Remove(anItCBE);
- break;
- }
- }
- }
- }
-}
-
-//=======================================================================
-// function: SplitCommonBlock
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::SplitCommonBlock(const NMTTools_CommonBlock& aCB,
- NMTTools_ListOfCommonBlock& aLCBx)
-{
- Standard_Boolean bIsCoincided;
- Standard_Integer i, j,nE, aNbE, aNbSPBx, aNbPB, k;
- BOPTools_SequenceOfPaveBlock aSPBx;
- BOPTools_ListIteratorOfListOfPaveBlock anItLPB;
- BOPTools_ListIteratorOfListOfPave anIt;
- BOPTools_PaveBlockIterator anPBIt;
- //
- const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks();
- aNbE=aLPB.Extent();
- //
- // 1. Checking: Whether we realy need to split the common block ?
- anItLPB.Initialize(aLPB);
- for (; anItLPB.More(); anItLPB.Next()) {
- const BOPTools_PaveBlock& aPB=anItLPB.Value();
- nE=aPB.OriginalEdge();
- BOPTools_PaveSet& aPSE=myPavePoolNew(myDS->RefEdge(nE));
- aPSE.SortSet();
- //
- BOPTools_PaveSet aPSx;
- //
- const BOPTools_ListOfPave& aLPE=aPSE.Set();
- anIt.Initialize(aLPE);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_Pave& aPx=anIt.Value();
- if (aPB.IsInBlock(aPx)) {
- aPSx.Append(aPx);
- }
- }
- aNbPB=aPSx.Set().Extent();
- break;
- }
- //
- if (!aNbPB) {
- // we need not split it
- aLCBx.Append(aCB);
- return;
- }
- //
- // 2. Get sequence of pave Blocks containing all new pave blocks
- // for each edges's source pave Block
- anItLPB.Initialize(aLPB);
- for (; anItLPB.More(); anItLPB.Next()) {
- const BOPTools_PaveBlock& aPB=anItLPB.Value();
- const BOPTools_Pave& aPave1=aPB.Pave1();
- const BOPTools_Pave& aPave2=aPB.Pave2();
- nE=aPB.OriginalEdge();
- //
- BOPTools_PaveSet aPSx;
- //
- // the set aPsx will contain bounadry paves aPave1, aPave2 and
- // all paves of the edge nE that are inside block aPB
- aPSx.Append(aPave1);
- aPSx.Append(aPave2);
- //
- BOPTools_PaveSet& aPSE=myPavePoolNew(myDS->RefEdge(nE));
- aPSE.SortSet();
- //
- const BOPTools_ListOfPave& aLPE=aPSE.Set();
- anIt.Initialize(aLPE);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_Pave& aPx=anIt.Value();
- if (aPB.IsInBlock(aPx)) {
- aPSx.Append(aPx);
- }
- }
- //
- // Form pave blocks from aPSx and collect them in aSPBx
- anPBIt.Initialize(nE, aPSx);
- for (; anPBIt.More(); anPBIt.Next()) {
- const BOPTools_PaveBlock& aPBx=anPBIt.Value();
- aSPBx.Append(aPBx);
- }
- }
- //
- // 3. Do new common blocks
- //
- const TColStd_ListOfInteger& aLF=aCB.Faces();
- aNbSPBx=aSPBx.Length();
- aNbPB=aNbSPBx/aNbE;
- //
- Standard_Integer k1, k2, n11, n12, n21, n22;
- //
- for (i=1; i<=aNbPB; ++i) {
- NMTTools_CommonBlock aCBx;
- //
- aCBx.AddFaces(aLF);
- //
- const BOPTools_PaveBlock& aPB1=aSPBx(i);
- n11=aPB1.Pave1().Index();
- n12=aPB1.Pave2().Index();
- //
- aCBx.AddPaveBlock(aPB1);
- //
- for (j=2; j<=aNbE; ++j) {
- k1=(j-1)*aNbPB+1;
- k2=k1+aNbPB-1;
- for(k=k1; k<=k2; ++k) {
- const BOPTools_PaveBlock& aPB2=aSPBx(k);
- n21=aPB2.Pave1().Index();
- n22=aPB2.Pave2().Index();
- if ((n21==n11 && n22==n12) || (n21==n12 && n22==n11)) {
- //modified by NIZNHY-PKV Thu Nov 11 08:13:24 2010f
- bIsCoincided=CheckCoincidence(aPB2, aPB1);
- if (bIsCoincided) {
- aCBx.AddPaveBlock(aPB2);
- break;
- }
- //aCBx.AddPaveBlock(aPB2);
- //break;
- //modified by NIZNHY-PKV Thu Nov 11 08:13:31 2010t
- }
- }
- }
- aLCBx.Append(aCBx);
- }
-}
-
-//=======================================================================
-// function: VertexParameters
-// purpose:
-//=======================================================================
-void VertexParameters(const IntTools_CommonPrt& aCPart,
- Standard_Real& aT1,
- Standard_Real& aT2)
-{
- const IntTools_Range& aR1=aCPart.Range1();
- aT1=0.5*(aR1.First()+aR1.Last());
- //
- if((aCPart.VertexParameter1() >= aR1.First()) &&
- (aCPart.VertexParameter1() <= aR1.Last())) {
- aT1 = aCPart.VertexParameter1();
- }
- //
- const IntTools_SequenceOfRanges& aRanges2=aCPart.Ranges2();
- const IntTools_Range& aR2=aRanges2(1);
- aT2=0.5*(aR2.First()+aR2.Last());
- //
- if((aCPart.VertexParameter2() >= aR2.First()) &&
- (aCPart.VertexParameter2() <= aR2.Last())) {
- aT2 = aCPart.VertexParameter2();
- }
-}
-
-//=======================================================================
-// function: KeepPave
-// purpose:
-//=======================================================================
-Standard_Boolean IsOnPave(const Standard_Real& aT1,
- const IntTools_Range& aRange,
- const Standard_Real& aTolerance)
-{
- Standard_Boolean firstisonpave1, firstisonpave2, bIsOnPave;
- //
- firstisonpave1 = (Abs(aRange.First() - aT1) < aTolerance);
- firstisonpave2 = (Abs(aRange.Last() - aT1) < aTolerance);
- bIsOnPave=(firstisonpave1 || firstisonpave2);
- return bIsOnPave;
-}
-
-//=======================================================================
-// function:FindChains
-// purpose:
-//=======================================================================
-void FindChains(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB,
- NMTTools_ListOfCommonBlock& aLCB)
-{
- Standard_Integer i, j, aNbCB, aNbPB;
- BOPTools_IMapOfPaveBlock aProcessedBlocks, aChain;
- //
- aNbCB=aMapCB.Extent();
- for (i=1; i<=aNbCB; ++i) {
- const BOPTools_PaveBlock& aPB=aMapCB.FindKey(i);
- if (aProcessedBlocks.Contains(aPB)) {
- continue;
- }
- //
- aProcessedBlocks.Add(aPB);
- aChain.Add(aPB);
- //
- const BOPTools_IMapOfPaveBlock& aMapPB=aMapCB(i);
- aNbPB=aMapPB.Extent();
- for (j=1; j<=aNbPB; ++j) {
- const BOPTools_PaveBlock& aPBx=aMapPB(j);
- ProcessBlock(aPBx, aMapCB, aProcessedBlocks, aChain);
- }
- //
- NMTTools_CommonBlock aCB;
- //
- aNbPB=aChain.Extent();
- for (j=1; j<=aNbPB; ++j) {
- const BOPTools_PaveBlock& aPBx=aChain(j);
- aCB.AddPaveBlock(aPBx);
- }
- aLCB.Append(aCB);
- aChain.Clear();
- }
-}
-
-//=======================================================================
-// function:ProcessBlock
-// purpose:
-//=======================================================================
-void ProcessBlock(const BOPTools_PaveBlock& aPB,
- const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB,
- BOPTools_IMapOfPaveBlock& aProcessedBlocks,
- BOPTools_IMapOfPaveBlock& aChain)
-{
- Standard_Integer j, aNbPB;
- //
- if (aProcessedBlocks.Contains(aPB)) {
- return;
- }
- aProcessedBlocks.Add(aPB);
- aChain.Add(aPB);
- //
- const BOPTools_IMapOfPaveBlock& aMapPB=aMapCB.FindFromKey(aPB);
- aNbPB=aMapPB.Extent();
- for (j=1; j<=aNbPB; ++j) {
- const BOPTools_PaveBlock& aPBx=aMapPB(j);
- ProcessBlock(aPBx, aMapCB, aProcessedBlocks, aChain);
- }
-}
-// Modified to provide VS interference between
-// vertex as result of EE and a Face of argument
-// Thu Sep 14 14:35:18 2006
-// Contribution of Samtech www.samcef.com BEGIN
-//=======================================================================
-// function: PerformVF1
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::PerformVF1()
-{
- Standard_Integer i, aNbEE, n1, n2, nNewShape, aNbS, nF;
- Standard_Integer anIndexIn, aFlag;
- Standard_Real aU, aV;
- TColStd_ListOfInteger aLFI;
- TColStd_ListIteratorOfListOfInteger aItLFI;
- //
- BOPTools_CArray1OfVSInterference& aVSs=myIP->VSInterferences();
- BOPTools_CArray1OfEEInterference& aEEs=myIP->EEInterferences();
- //
- aNbS=myDS->NumberOfShapesOfTheObject();
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aF=myDS->Shape(i);
- if (aF.ShapeType()==TopAbs_FACE) {
- aLFI.Append(i);
- }
- }
- if (!aLFI.Extent()) {
- return;
- }
- //
- aNbEE=aEEs.Extent();
- for (i=1; i<=aNbEE; ++i) {
- BOPTools_EEInterference& aEE=aEEs(i);
- aEE.Indices(n1, n2);
- nNewShape=aEE.NewShape();
- if (!nNewShape) {
- continue;
- }
- //
- const TopoDS_Shape& aSnew=myDS->Shape(nNewShape);
- if (aSnew.ShapeType()!=TopAbs_VERTEX) {
- continue;
- }
- //
- const TopoDS_Vertex& aVnew=TopoDS::Vertex(aSnew);
- //
- Bnd_Box aBV;
- //
- BRepBndLib::Add(aVnew, aBV);
- //
- aItLFI.Initialize(aLFI);
- for (; aItLFI.More(); aItLFI.Next()) {
- nF=aItLFI.Value();
- //
- const TopoDS_Face& aF=TopoDS::Face(myDS->Shape(nF));
- const Bnd_Box& aBF=myDS->GetBoundingBox(nF);
- if (aBF.IsOut(aBV)) {
- continue;
- }
- //
- anIndexIn=0;
- aFlag=myContext->ComputeVS (aVnew, aF, aU, aV);
- if (!aFlag) {
- BOPTools_VSInterference anInterf (nNewShape, nF, aU, aV);
- //
- anIndexIn=aVSs.Append(anInterf);
- BOPTools_VSInterference& aVS=aVSs(anIndexIn);
- aVS.SetNewShape(nNewShape);//->
- }
- }
- }
-}
-// Contribution of Samtech www.samcef.com END
-//modified by NIZNHY-PKV Thu Nov 11 08:13:48 2010f
-//=======================================================================
-// function: CheckCoincidence
-// purpose:
-//=======================================================================
-Standard_Boolean NMTTools_PaveFiller::CheckCoincidence(const BOPTools_PaveBlock& aPB1,
- const BOPTools_PaveBlock& aPB2)
-{
- Standard_Boolean bRet;
- Standard_Integer nE1, nE2, aNbPoints;
- Standard_Real aT11, aT12, aT21, aT22, aT1m, aD, aTol, aT2x;
- gp_Pnt aP1m;
- //
- bRet=Standard_False;
- //
- aT11=aPB1.Pave1().Param();
- aT12=aPB1.Pave2().Param();
- aT1m=IntTools_Tools::IntermediatePoint (aT11, aT12);
- nE1=aPB1.OriginalEdge();
- const TopoDS_Edge& aE1=(*(TopoDS_Edge*)(&myDS->Shape(nE1)));
- BOPTools_Tools::PointOnEdge(aE1, aT1m, aP1m);
- //
- aT21=aPB2.Pave1().Param();
- aT22=aPB2.Pave2().Param();
- nE2=aPB2.OriginalEdge();
- const TopoDS_Edge& aE2=(*(TopoDS_Edge*)(&myDS->Shape(nE2)));
- //
- GeomAPI_ProjectPointOnCurve& aPPC=myContext->ProjPC(aE2);
- aPPC.Perform(aP1m);
- aNbPoints=aPPC.NbPoints();
- if (aNbPoints) {
- aD=aPPC.LowerDistance();
- //
- aTol=BRep_Tool::Tolerance(aE1);
- aTol=aTol+BRep_Tool::Tolerance(aE2);
- if (aD<aTol) {
- aT2x=aPPC.LowerDistanceParameter();
- if (aT2x>aT21 && aT2x<aT22) {
- return !bRet;
- }
- }
- }
- return bRet;
-}
-//modified by NIZNHY-PKV Thu Nov 11 08:13:55 2010t
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_PaveFiller_5.cxx
-// Created: Mon Dec 15 11:28:33 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTTools_PaveFiller.hxx>
-
-#include <TColStd_IndexedMapOfInteger.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-
-#include <Bnd_Box.hxx>
-
-#include <TopAbs_ShapeEnum.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Compound.hxx>
-
-#include <TopExp.hxx>
-
-#include <TopTools_IndexedMapOfShape.hxx>
-
-#include <IntTools_ShrunkRange.hxx>
-#include <IntTools_Range.hxx>
-#include <IntTools_EdgeFace.hxx>
-#include <IntTools_SequenceOfCommonPrts.hxx>
-#include <IntTools_CommonPrt.hxx>
-#include <IntTools_Tools.hxx>
-#include <IntTools_Context.hxx>
-
-#include <BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx>
-#include <BooleanOperations_IndexedDataMapOfShapeInteger.hxx>
-#include <BooleanOperations_OnceExplorer.hxx>
-
-#include <BOPTools_Tools.hxx>
-#include <BOPTools_Pave.hxx>
-#include <BOPTools_PaveSet.hxx>
-#include <BOPTools_ListOfPave.hxx>
-#include <BOPTools_ListIteratorOfListOfPave.hxx>
-#include <BOPTools_PaveBlock.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
-#include <BOPTools_ESInterference.hxx>
-
-#include <BOPTools_CArray1OfVVInterference.hxx>
-#include <BOPTools_CArray1OfESInterference.hxx>
-#include <BOPTools_VVInterference.hxx>
-#include <BOPTools_ESInterference.hxx>
-#include <BOPTools_IDMapOfPaveBlockIMapOfInteger.hxx>
-#include <BOPTools_IMapOfPaveBlock.hxx>
-
-#include <NMTDS_ShapesDataStructure.hxx>
-#include <NMTDS_Iterator.hxx>
-#include <NMTDS_InterfPool.hxx>
-
-#include <NMTTools_ListOfCommonBlock.hxx>
-#include <NMTTools_CommonBlockAPI.hxx>
-#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
-#include <NMTTools_CommonBlockAPI.hxx>
-#include <NMTTools_ListOfCommonBlock.hxx>
-
-
-static
- void VertexParameter(const IntTools_CommonPrt& aCPart,
- Standard_Real& aT);
-static
- Standard_Boolean IsOnPave(const Standard_Real& aTR,
- const IntTools_Range& aCPRange,
- const Standard_Real& aTolerance);
-//
-//=======================================================================
-// function: PerformEF
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::PerformEF()
-{
- Standard_Boolean bJustAdd;
- Standard_Integer n1, n2, anIndexIn, nE, nF, aNbEFs, aBlockLength;
- Standard_Integer aDiscretize;
- Standard_Real aTolE, aTolF, aDeflection;
- BooleanOperations_IndexedDataMapOfShapeInteger aMapVI;
- BOPTools_IDMapOfPaveBlockIMapOfInteger aMapCB;
- BOPTools_IMapOfPaveBlock aIMPBx;
- //
- myIsDone=Standard_False;
- aDeflection=0.01;
- aDiscretize=35;
- //
- BOPTools_CArray1OfESInterference& aEFs=myIP->ESInterferences();
- //
- myDSIt->Initialize(TopAbs_EDGE, TopAbs_FACE);
- //
- // BlockLength correction
- aNbEFs=myDSIt->BlockLength();
- aBlockLength=aEFs.BlockLength();
- if (aNbEFs > aBlockLength) {
- aEFs.SetBlockLength(aNbEFs);
- }
- //
- for (; myDSIt->More(); myDSIt->Next()) {
- myDSIt->Current(n1, n2, bJustAdd);
- //
- if(bJustAdd) {
- continue;
- }
- //
- anIndexIn = 0;
- //
- nE=n1;
- nF=n2;
- if (myDS->GetShapeType(n2)==TopAbs_EDGE) {
- nE=n2;
- nF=n1;
- }
- //
- // all Common Blocks for face nF
- NMTTools_ListOfCommonBlock aLCBF;
- CommonBlocksFace(nF, aLCBF);
- NMTTools_CommonBlockAPI aCBAPIF(aLCBF);
- //
- // Edge
- const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));
- if (BRep_Tool::Degenerated(aE)){
- continue;
- }
- //
- // Face
- const TopoDS_Face aF=TopoDS::Face(myDS->Shape(nF));
- //
- TopTools_IndexedMapOfShape aME;
- TopExp::MapShapes(aF, TopAbs_EDGE, aME);
- if (aME.Contains(aE)) {
- continue;
- }
- //
- aTolF=BRep_Tool::Tolerance(aF);
- aTolE=BRep_Tool::Tolerance(aE);
-
- const Bnd_Box& aBBF=myDS->GetBoundingBox(nF);
- //
- // Process each PaveBlock on edge nE
- BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE));
- //
- BOPTools_ListIteratorOfListOfPaveBlock anIt(aLPB);
- for (; anIt.More(); anIt.Next()) {
- BOPTools_PaveBlock& aPB=anIt.Value();
- if (aCBAPIF.IsCommonBlock(aPB)) {
- continue;
- }
- //
- const IntTools_ShrunkRange& aShrunkRange=aPB.ShrunkRange();
- const IntTools_Range& aSR =aShrunkRange.ShrunkRange();
- const Bnd_Box& aBBE=aShrunkRange.BndBox();
- //
- if (aBBF.IsOut (aBBE)) {
- continue;
- }
- //
- // EF
- IntTools_EdgeFace aEF;
- aEF.SetEdge (aE);
- aEF.SetFace (aF);
- aEF.SetTolE (aTolE);
- aEF.SetTolF (aTolF);
- aEF.SetDiscretize (aDiscretize);
- aEF.SetDeflection (aDeflection);
- //
- aEF.SetContext(myContext);
- //
- IntTools_Range anewSR = aSR;
- //
- // Correction of the Shrunk Range
- BOPTools_Tools::CorrectRange(aE, aF, aSR, anewSR);
- aEF.SetRange (anewSR);
- //
- aEF.Perform();
- //
- if (aEF.IsDone()) {
- Standard_Boolean bCoinsideFlag;
- Standard_Integer i, aNbCPrts;
- TopAbs_ShapeEnum aType;
- //
- const IntTools_SequenceOfCommonPrts& aCPrts=aEF.CommonParts();
- //
- aNbCPrts=aCPrts.Length();
- for (i=1; i<=aNbCPrts; ++i) {
- anIndexIn=0;
- //
- const IntTools_CommonPrt& aCPart=aCPrts(i);
- aType=aCPart.Type();
- //
- switch (aType) {
- //
- case TopAbs_VERTEX: {
- Standard_Boolean bIsOnPave1, bIsOnPave2;
- Standard_Integer nVF;
- Standard_Real aT, aTolToDecide;
- TopoDS_Vertex aNewVertex;
- //
- const IntTools_Range& aR=aCPart.Range1();
- //
- // New Vertex
- VertexParameter(aCPart, aT);
- BOPTools_Tools::MakeNewVertex(aE, aT, aF, aNewVertex);
- //
- //decide to add pave or not
- aTolToDecide=5.e-8;
- bIsOnPave1=IsOnPave(anewSR.First(), aR, aTolToDecide);
- bIsOnPave2=IsOnPave(anewSR.Last() , aR, aTolToDecide);
- //
- if (!bIsOnPave1 && !bIsOnPave2) {
- nVF=CheckFacePaves(aNewVertex, nF);
- if (!nVF) {
- // really new vertex
- // Add Interference to the Pool
- BOPTools_ESInterference anInterf (nE, nF, aCPart);
- anIndexIn=aEFs.Append(anInterf);
- anInterf.SetNewShape(0);
- //
- aMapVI.Add(aNewVertex, anIndexIn);
- aIMPBx.Add(aPB);
- //
- myIP->Add(nE, nF, Standard_True, NMTDS_TI_EF);
- //
- }// if (!nVF)
- }// if (!bIsOnPave1 && !bIsOnPave2)
- //
- //modified by NIZNHY-PKV Fri Apr 18 10:55:38 2008f
- else {
- const BOPTools_Pave& aPave=(bIsOnPave1)? aPB.Pave1() : aPB.Pave2();
- nVF=aPave.Index();
- const TopoDS_Vertex& aVF=TopoDS::Vertex(myDS->Shape(nVF));
- BOPTools_Tools::UpdateVertex (aVF, aNewVertex);
- }
- //modified by NIZNHY-PKV Fri Apr 18 10:55:40 2008t
- //
- }// case TopAbs_VERTEX:
- break;
- //
- case TopAbs_EDGE: {
- bCoinsideFlag=BOPTools_Tools::IsBlockInOnFace(aPB, aF, myContext);
- if (!bCoinsideFlag) {
- break;
- }
- //
- // Fill aMapCB
- if (aMapCB.Contains(aPB)) {
- TColStd_IndexedMapOfInteger& aMapF=aMapCB.ChangeFromKey(aPB);
- aMapF.Add(nF);
- }
- else {
- TColStd_IndexedMapOfInteger aMapF;
- aMapF.Add(nF);
- aMapCB.Add(aPB, aMapF);
- }
- //
- aIMPBx.Add(aPB);
- myIP->Add(nE, nF, Standard_True, NMTDS_TI_EF);
- }// case TopAbs_EDGE:
- break;
-
- default:
- break;
- } // switch (aType)
- } // for (i=1; i<=aNbCPrts; i++)
- } //if (aEF.IsDone())
- } // for (; anIt.More(); anIt.Next())
- }// for (; myDSIt.More(); myDSIt.Next())
- //
- // Treat New vertices
- EFNewVertices(aMapVI);
- //
- // Add draft Common Blocks of EF type
- EFCommonBlocks(aMapCB);
- //
- // Collect all CB we suspected to split by new vertices
- NMTTools_ListOfCommonBlock aLCBx;
- {
- Standard_Integer i, aNbPBx, nEx;
- BOPTools_IMapOfPaveBlock aMx;
- //
- aNbPBx=aIMPBx.Extent();
- for (i=1; i<=aNbPBx; ++i) {
- const BOPTools_PaveBlock& aPBx=aIMPBx(i);
- nEx=aPBx.OriginalEdge();
- NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nEx));
- if (aLCB.Extent()) {
- NMTTools_CommonBlockAPI aCBAPIx(aLCB);
- if (aCBAPIx.IsCommonBlock(aPBx)) {
- NMTTools_CommonBlock& aCBx=aCBAPIx.CommonBlock(aPBx);
- const BOPTools_PaveBlock& aPB1=aCBx.PaveBlock1();
- if (!aMx.Contains(aPB1)){
- aMx.Add(aPB1);
- aLCBx.Append(aCBx);
- }
- }
- }
- }
- }
- //
- // Split the common blocks above
- if (aLCBx.Extent()) {
- ReplaceCommonBlocks(aLCBx);
- }
- //
- myIsDone=Standard_True;
-}
-//=======================================================================
-// function:EFCommonBlocks
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::EFCommonBlocks
- (const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB)
-{
- Standard_Integer i, aNbPB, nE, j, aNbF, nF;
- //
- aNbPB=aMapCB.Extent();
- for (i=1; i<=aNbPB; ++i) {
- const BOPTools_PaveBlock& aPB=aMapCB.FindKey(i);
- const TColStd_IndexedMapOfInteger& aMapF=aMapCB.FindFromIndex(i);
- aNbF=aMapF.Extent();
- //
- nE=aPB.OriginalEdge();
- //
- NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE));
- //
- NMTTools_CommonBlockAPI aCBAPI(aLCB);
- if (aCBAPI.IsCommonBlock(aPB)) {
- NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB);
- for (j=1; j<=aNbF; ++j) {
- nF=aMapF(j);
- aCB.AddFace(nF);
- }
- }
- else {
- NMTTools_CommonBlock aCB;
- //
- aCB.AddPaveBlock(aPB);
- for (j=1; j<=aNbF; ++j) {
- nF=aMapF(j);
- aCB.AddFace(nF);
- }
- aLCB.Append(aCB);
- }
- }
-}
-//=======================================================================
-// function:EFNewVertices
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::EFNewVertices
- (const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI)
-{
- Standard_Integer i, j, aNb, aNewShape, aFlag, iX, aNbVV, aNbSimple;
- Standard_Integer aWhat, aWith, nE, nF, nV, aNbIEF, aNbEdges, iTmp;
- Standard_Real aT;
- TopoDS_Compound aCompound;
- TopoDS_Vertex aNewVertex;
- BRep_Builder aBB;
- BOPTools_Pave aPave;
- NMTTools_IndexedDataMapOfIndexedMapOfInteger aMNVE, aMNVIEF;
- BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
- TopTools_IndexedMapOfShape aMNVComplex, aMNVSimple;
- //
- aNb=aMapVI.Extent();
- if (!aNb) { // no new vertices, no new problems
- return;
- }
- //
- BOPTools_CArray1OfESInterference& aEFs=myIP->ESInterferences();
- //
- // 0.
- if (aNb==1) {
- aNewVertex=TopoDS::Vertex(aMapVI.FindKey(1));
- EFNewVertices(aNewVertex, aMapVI);
- return;
- }
- //
- // 1. Make compound from new vertices
- aBB.MakeCompound(aCompound);
- for (i=1; i<=aNb; ++i) {
- const TopoDS_Shape& aV=aMapVI.FindKey(i);
- aBB.Add(aCompound, aV);
- }
- //
- // 2. VV intersection between these vertices
- // using the auxiliary Filler
- NMTTools_PaveFiller tPF;
- //
- tPF.SetCompositeShape(aCompound);
- //
- tPF.Init();
- tPF.PerformVV();
- //
- NMTDS_ShapesDataStructure& tDS=*(tPF.DS());
- NMTDS_InterfPool& tInterfPool=*(tPF.IP());
- BOPTools_CArray1OfVVInterference& aVVInterfs=tInterfPool.VVInterferences();
- //
- // 3. Separate Comlex and Simple new vertices
- aNbVV=aVVInterfs.Extent();
- for (i=1; i<=aNbVV; ++i) {
- const BOPTools_VVInterference& aVV=aVVInterfs(i);
- aVV.Indices(aWhat, aWith);
- const TopoDS_Shape& aV1=tDS.Shape(aWhat);
- const TopoDS_Shape& aV2=tDS.Shape(aWith);
- aMNVComplex.Add(aV1);
- aMNVComplex.Add(aV2);
- }
- //
- for (i=1; i<=aNb; ++i) {
- const TopoDS_Shape& aV=aMapVI.FindKey(i);
- if (!aMNVComplex.Contains(aV)) {
- aMNVSimple.Add(aV);
- }
- }
- //
- // 4. Treat Simple new Vertices
- aNbSimple=aMNVSimple.Extent();
- for (i=1; i<=aNbSimple; ++i) {
- const TopoDS_Vertex& aV=TopoDS::Vertex(aMNVSimple(i));
- EFNewVertices(aV, aMapVI);
- }
- //
- // 3. Fill Maps : NewVertex-edges (aMNVE)
- // NewVertex-interferences (aMNVIEE)
- aNb=aVVInterfs.Extent();
- for (i=1; i<=aNb; ++i) {
- const BOPTools_VVInterference& aVV=aVVInterfs(i);
- aNewShape=aVV.NewShape();
- if (!aNewShape) {
- continue;
- }
- //
- if (!aMNVE.Contains(aNewShape)) {
- TColStd_IndexedMapOfInteger aMx;
- aMNVE.Add(aNewShape, aMx);
- }
- if (!aMNVIEF.Contains(aNewShape)) {
- TColStd_IndexedMapOfInteger aMx;
- aMNVIEF.Add(aNewShape, aMx);
- }
- //
- TColStd_IndexedMapOfInteger& aME=aMNVE.ChangeFromKey(aNewShape);
- TColStd_IndexedMapOfInteger& aMIEF=aMNVIEF.ChangeFromKey(aNewShape);
- //
- aVV.Indices(aWhat, aWith);
- //aWhat
- const TopoDS_Shape& aV1=tDS.Shape(aWhat);
- iX=aMapVI.FindFromKey(aV1);
- const BOPTools_ESInterference& aEF1=aEFs(iX);
- aEF1.Indices(nE, nF);
- //
- if (myDS->GetShapeType(nF)==TopAbs_EDGE) {
- iTmp=nE;
- nE=nF;
- nF=iTmp;
- }
- aME.Add(nE);
- aMIEF.Add(iX);
- //aWith
- const TopoDS_Shape& aV2=tDS.Shape(aWith);
- iX=aMapVI.FindFromKey(aV2);
- const BOPTools_ESInterference& aEF2=aEFs(iX);
- aEF2.Indices(nE, nF);
- //
- if (myDS->GetShapeType(nF)==TopAbs_EDGE) {
- iTmp=nE;
- nE=nF;
- nF=iTmp;
- }
- aME.Add(nE);
- aMIEF.Add(iX);
- }// for (i=1; i<=aNb; ++i) {
- //
- // 4. Process new vertices
- aNb=aMNVE.Extent();
- for (i=1; i<=aNb; ++i) { // xx
- //
- // new Vertex
- nV=aMNVE.FindKey(i);
- aNewVertex=TopoDS::Vertex(tDS.Shape(nV));
- //
- // Insert New Vertex in DS;
- myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq);
- aNewShape=myDS->NumberOfInsertedShapes();
- myDS->SetState (aNewShape, BooleanOperations_ON);
- //
- // Update index of NewShape in EF interferences
- const TColStd_IndexedMapOfInteger& aMIEF=aMNVIEF.FindFromKey(nV);
- aNbIEF=aMIEF.Extent();
- for (j=1; j<=aNbIEF; ++j) {
- iX=aMIEF(j);
- BOPTools_ESInterference& aEF=aEFs(iX);
- aEF.SetNewShape(aNewShape);
- }
- //
- // Update Paves on all edges
- const TColStd_IndexedMapOfInteger& aME=aMNVE(i);
- aNbEdges=aME.Extent();
- for (j=1; j<=aNbEdges; ++j) {
- nE=aME(j);
- const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));//mpv
- //
- aFlag=myContext->ComputeVE (aNewVertex, aE, aT);
- //
- if (!aFlag) {
- aPave.SetInterference(-1);
- aPave.SetType (BooleanOperations_EdgeSurface);
- aPave.SetIndex(aNewShape);
- aPave.SetParam(aT);
- //
- BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE));
- aPaveSet.Append(aPave);
- }
- }
- }
-}
-//=======================================================================
-// function:EFNewVertices
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::EFNewVertices
- (const TopoDS_Vertex& aNewVertex,
- const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI)
-{
- Standard_Integer i, aNewShape, nE, nF;
- Standard_Real aT;
- BOPTools_Pave aPave;
- BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
- //
- BOPTools_CArray1OfESInterference& aEFs=myIP->ESInterferences();
- //
- // Insert New Vertex in DS;
- myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq);
- aNewShape=myDS->NumberOfInsertedShapes();
- myDS->SetState (aNewShape, BooleanOperations_ON);
- //
- // Insert New Vertex in EFInterference
- i=aMapVI.FindFromKey(aNewVertex);
- BOPTools_ESInterference& aEFInterf= aEFs(i);
- aEFInterf.SetNewShape(aNewShape);
- // Extract interference info
- aEFInterf.Indices(nE, nF);
- if (myDS->GetShapeType(nF)==TopAbs_EDGE) {
- nE=nF;
- }
- const IntTools_CommonPrt& aCPart=aEFInterf.CommonPrt();
- VertexParameter(aCPart, aT);
- //
- // Pave for edge nE
- aPave.SetInterference(i);
- aPave.SetType (BooleanOperations_EdgeSurface);
- aPave.SetIndex(aNewShape);
- aPave.SetParam(aT);
- // Append the Pave to the myPavePoolNew
- BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE));
- aPaveSet.Append(aPave);
- //
-}
-//=======================================================================
-// function: CheckFacePaves
-// purpose:
-//=======================================================================
- Standard_Integer NMTTools_PaveFiller::CheckFacePaves
- (const TopoDS_Vertex& aNewVertex,
- const Standard_Integer nF)
-{
- Standard_Integer nEF, nVF, iFlag, i, aNbV, iRet;
- BOPTools_ListIteratorOfListOfPave anIt;
- TColStd_IndexedMapOfInteger aMVF;
- //
- iRet=0;
- //
- BooleanOperations_OnceExplorer aExp(*myDS);
- aExp.Init(nF, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- nEF=aExp.Current();
- BOPTools_PaveSet& aPaveSet=myPavePool(myDS->RefEdge(nEF));
- const BOPTools_ListOfPave& aLP=aPaveSet.Set();
- anIt.Initialize(aLP);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_Pave& aPave=anIt.Value();
- nVF=aPave.Index();
- aMVF.Add(nVF);
- }
- }
- //
- aNbV=aMVF.Extent();
- for (i=1; i<=aNbV; ++i) {
- nVF=aMVF(i);
- const TopoDS_Vertex aVF=TopoDS::Vertex(myDS->Shape(nVF));
- iFlag=IntTools_Tools::ComputeVV(aNewVertex, aVF);
- if (!iFlag) {
- return nVF;
- }
- }
- return iRet;
-}
-//
-//=======================================================================
-// function: VertexParameter
-// purpose:
-//=======================================================================
-void VertexParameter(const IntTools_CommonPrt& aCPart,
- Standard_Real& aT)
-{
- const IntTools_Range& aR=aCPart.Range1();
- aT=0.5*(aR.First()+aR.Last());
- if((aCPart.VertexParameter1() >= aR.First()) &&
- (aCPart.VertexParameter1() <= aR.Last())) {
- aT = aCPart.VertexParameter1();
- }
-}
-//=======================================================================
-// function: IsOnPave
-// purpose:
-//=======================================================================
-Standard_Boolean IsOnPave(const Standard_Real& aTR,
- const IntTools_Range& aCPRange,
- const Standard_Real& aTolerance)
-{
- Standard_Boolean bIsOnPave;
- Standard_Real aT1, aT2, dT1, dT2;
- //
- aT1=aCPRange.First();
- aT2=aCPRange.Last();
- bIsOnPave=(aTR>=aT1 && aTR<=aT1);
- if (bIsOnPave) {
- return bIsOnPave;
- }
- //
- dT1=Abs(aTR-aT1);
- dT2=Abs(aTR-aT2);
- bIsOnPave=(dT1<=aTolerance || dT2<=aTolerance);
- return bIsOnPave;
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_PaveFiller_6.cxx
-// Created: Fri Dec 19 10:27:31 2003
-// Author: Peter KURNEV
-
-#include <NMTTools_PaveFiller.hxx>
-
-#include <Basics_OCCTVersion.hxx>
-
-#include <Precision.hxx>
-
-#include <TColStd_IndexedMapOfInteger.hxx>
-#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_MapIteratorOfMapOfInteger.hxx>
-#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
-#include <TColStd_ListOfInteger.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger.hxx>
-
-
-#include <Geom_TrimmedCurve.hxx>
-#include <Geom2d_TrimmedCurve.hxx>
-#include <Geom2d_Curve.hxx>
-#include <GeomAdaptor_Curve.hxx>
-#include <GeomAdaptor_Surface.hxx>
-#include <Geom_Surface.hxx>
-
-#include <BndLib_Add3dCurve.hxx>
-
-#include <TopoDS_Face.hxx>
-#include <TopoDS.hxx>
-#include <TopoDS_Compound.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Edge.hxx>
-
-#include <TopExp.hxx>
-
-#include <BRepLib.hxx>
-#include <BRep_Builder.hxx>
-#include <BRep_Tool.hxx>
-#include <BRepBndLib.hxx>
-
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-
-#include <BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx>
-#include <BOPTColStd_IndexedDataMapOfIntegerInteger.hxx>
-
-#include <BooleanOperations_IndexedDataMapOfShapeInteger.hxx>
-#include <BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx>
-#include <BooleanOperations_OnceExplorer.hxx>
-#include <BooleanOperations_ShapesDataStructure.hxx>
-
-#include <IntTools_SequenceOfPntOn2Faces.hxx>
-#include <IntTools_SequenceOfCurves.hxx>
-#include <IntTools_FaceFace.hxx>
-#include <IntTools_Tools.hxx>
-#include <IntTools_ShrunkRange.hxx>
-#include <IntTools_Context.hxx>
-
-#include <BOPTools_CArray1OfSSInterference.hxx>
-#include <BOPTools_VSInterference.hxx>
-#include <BOPTools_ESInterference.hxx>
-#include <BOPTools_SSInterference.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
-#include <BOPTools_PaveBlock.hxx>
-#include <BOPTools_ListIteratorOfListOfPave.hxx>
-#include <BOPTools_Tools.hxx>
-#include <BOPTools_PaveBlockIterator.hxx>
-#include <BOPTools_Tools2D.hxx>
-#include <BOPTools_Tools3D.hxx>
-#include <BOPTools_Curve.hxx>
-
-#include <NMTDS_Iterator.hxx>
-#include <NMTDS_ShapesDataStructure.hxx>
-#include <NMTDS_InterfPool.hxx>
-
-#include <NMTTools_Tools.hxx>
-#include <NMTTools_IndexedDataMapOfShapePaveBlock.hxx>
-#include <NMTTools_CommonBlock.hxx>
-#include <NMTTools_CommonBlockAPI.hxx>
-#include <NMTTools_ListOfCommonBlock.hxx>
-#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-#include <NMTTools_DataMapOfIntegerListOfPaveBlock.hxx>
-#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-#include <NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx>
-#include <NMTTools_MapOfPaveBlock.hxx>
-#include <NMTTools_MapIteratorOfMapOfPaveBlock.hxx>
-#include <NMTTools_FaceInfo.hxx>
-#include <NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx>
-
-static
- Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE,
- const Handle(IntTools_Context)& aCtx);
-
-//=======================================================================
-// function: PerformFF
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::PerformFF()
-{
- myIsDone=Standard_False;
- //
- Standard_Boolean bToApproxC3d, bToApproxC2dOnS1, bToApproxC2dOnS2, bIsDone;
- Standard_Boolean bJustAdd, bToSplit;
- Standard_Integer n1, n2, anIndexIn, nF1, nF2, aBlockLength, aNbFFs;
- Standard_Integer aNbCurves, aNbPoints;
- Standard_Real anApproxTol, aTolR3D, aTolR2D;
- BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMapWhat, aMapWith;
- IntTools_SequenceOfPntOn2Faces aPnts;
- IntTools_SequenceOfCurves aCvs;
- //
- BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences();
- //
- // F/F Interferences [BooleanOperations_SurfaceSurface]
- myDSIt->Initialize(TopAbs_FACE, TopAbs_FACE);
- //
- // BlockLength correction
- aNbFFs=myDSIt->BlockLength();
- aBlockLength=aFFs.BlockLength();
- if (aNbFFs > aBlockLength) {
- aFFs.SetBlockLength(aNbFFs);
- }
- //
- //modified by NIZNHY-PKV Thu Sep 15 08:02:52 2011f
- bToSplit=Standard_False;
- //modified by NIZNHY-PKV Thu Sep 15 08:02:55 2011t
- //
- for (; myDSIt->More(); myDSIt->Next()) {
- myDSIt->Current(n1, n2, bJustAdd);
- //
- nF1 = n2;
- nF2 = n1;
- if(n1 < n2) {
- nF1 = n1;
- nF2 = n2;
- }
- anIndexIn=0;
- aPnts.Clear();
- aCvs.Clear();
- //
- const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));//mpv
- const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));//mpv
- //
- // FF
- bToApproxC3d = mySectionAttribute.Approximation();
- bToApproxC2dOnS1 = mySectionAttribute.PCurveOnS1();
- bToApproxC2dOnS2 = mySectionAttribute.PCurveOnS2();
- //
- anApproxTol=1.e-7;
- //
- IntTools_FaceFace aFF;
- //
- aFF.SetParameters (bToApproxC3d, bToApproxC2dOnS1,
- bToApproxC2dOnS2, anApproxTol);
- //
- aFF.Perform(aF1, aF2);
- //
- bIsDone=aFF.IsDone();
- //
- if (!bIsDone) {
- BOPTools_SSInterference anInterf (nF1, nF2, 1.e-07, 1.e-07, aCvs, aPnts);
- anIndexIn=aFFs.Append(anInterf);
- continue;
- }
- //
- aTolR3D=aFF.TolReached3d();
- aTolR2D=aFF.TolReached2d();
- if (aTolR3D < 1.e-7){
- aTolR3D=1.e-7;
- }
- //
- //modified by NIZNHY-PKV Thu Sep 15 08:03:02 2011f
-#if OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher
- aFF.PrepareLines3D(bToSplit);
-#else
- aFF.PrepareLines3D();
-#endif // OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher
- //modified by NIZNHY-PKV Thu Sep 15 08:03:04 2011t
- //
- const IntTools_SequenceOfCurves& aCvsX=aFF.Lines();
- const IntTools_SequenceOfPntOn2Faces& aPntsX=aFF.Points();
- //
- aNbCurves=aCvsX.Length();
- aNbPoints=aPntsX.Length();
- //
- if (!aNbCurves && !aNbPoints) {
- BOPTools_SSInterference anInterf (nF1, nF2, 1.e-07, 1.e-07, aCvs, aPnts);
- anIndexIn=aFFs.Append(anInterf);
- continue;
- }
- //
- {
- BOPTools_SSInterference anInterf (nF1, nF2, aTolR3D, aTolR2D, aCvsX, aPntsX);
- anIndexIn=aFFs.Append(anInterf);
- }
- //
- }// for (; myDSIt.More(); myDSIt.Next())
- //
- myIsDone=Standard_True;
-}
-
-//=======================================================================
-// function: MakeBlocks
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::MakeBlocks()
-{
- myIsDone=Standard_False;
- //
- Standard_Boolean bIsExistingPaveBlock, bIsValidIn2D, bIsCoincided;
- Standard_Boolean bIsMicroEdge, bHasES;
- Standard_Integer i, aNbFFs, nF1, nF2;
- Standard_Integer nV1, nV2, j, aNbCurves;
- Standard_Real aTolR3D, aTol2D, aT1, aT2, aTolPPC=Precision::PConfusion();
- TopoDS_Face aF1, aF2;
- NMTTools_IndexedDataMapOfShapePaveBlock aMEPB;
- BooleanOperations_IndexedDataMapOfShapeInteger aMapEI;
- BOPTools_ListIteratorOfListOfPaveBlock anIt;
- //
- BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences();
- //
-
- //
- // 1. Make Section Edges from intersection curves
- // between each pair of faces
- aNbFFs=aFFs.Extent();
- if (!aNbFFs) {
- return;
- }
- //
- FillFaceInfo();
- //
- for (i=1; i<=aNbFFs; ++i) {
- BOPTools_ListOfPaveBlock aLPB;
- TColStd_MapOfInteger aMVStick;
- TopTools_ListOfShape aLSE;
- TColStd_ListOfInteger aLNE;
- BOPTools_PaveSet aPSF;
- NMTTools_MapOfPaveBlock aMPBX;
- TColStd_MapIteratorOfMapOfInteger aItMI;
- NMTTools_MapIteratorOfMapOfPaveBlock aItMPB;
- //
- BOPTools_SSInterference& aFFi=aFFs(i);
- //
- // Faces
- aFFi.Indices(nF1, nF2);
- aF1=*((TopoDS_Face*)(&myDS->Shape(nF1)));
- aF2=*((TopoDS_Face*)(&myDS->Shape(nF2)));
- //
- SharedEdges(nF1, nF2, aLNE, aLSE);
- aFFi.SetSharedEdges(aLNE);
- //
- // aMVStick
- const NMTTools_FaceInfo& aFI1=myFaceInfo.Find(nF1);
- const NMTTools_FaceInfo& aFI2=myFaceInfo.Find(nF2);
- //
- const TColStd_MapOfInteger& aMVOn1=aFI1.VerticesOn();
- const TColStd_MapOfInteger& aMVIn1=aFI1.VerticesIn();
- const TColStd_MapOfInteger& aMVOn2=aFI2.VerticesOn();
- const TColStd_MapOfInteger& aMVIn2=aFI2.VerticesIn();
- //
- for (j=0; j<2; ++j) {
- const TColStd_MapOfInteger& aMV1=(!j) ? aMVOn1 :aMVIn1;
- aItMI.Initialize(aMV1);
- for (; aItMI.More(); aItMI.Next()) {
- nV1=aItMI.Key();
- if (aMVOn2.Contains(nV1) || aMVIn2.Contains(nV1)) {
- aMVStick.Add(nV1);
- }
- }
- }
- //
- // aLPB
- const NMTTools_MapOfPaveBlock& aMPBIn1=aFI1.PaveBlocksIn();
- const NMTTools_MapOfPaveBlock& aMPBOn1=aFI1.PaveBlocksOn();
- const NMTTools_MapOfPaveBlock& aMPBIn2=aFI2.PaveBlocksIn();
- const NMTTools_MapOfPaveBlock& aMPBOn2=aFI2.PaveBlocksOn();
- //
- aMPBX.Clear();
- for (j=0; j<4; ++j) {
- NMTTools_MapOfPaveBlock *pMPB;
- //
- if (!j) {
- pMPB=((NMTTools_MapOfPaveBlock*)&aMPBIn1);
- }
- else if (j==1) {
- pMPB=((NMTTools_MapOfPaveBlock*)&aMPBOn1);
- }
- else if (j==2) {
- pMPB=((NMTTools_MapOfPaveBlock*)&aMPBIn2);
- }
- else if (j==3) {
- pMPB=((NMTTools_MapOfPaveBlock*)&aMPBOn2);
- }
- //
- const NMTTools_MapOfPaveBlock& aMPB=*pMPB;
- aItMPB.Initialize(aMPB);
- for (; aItMPB.More(); aItMPB.Next()) {
- const BOPTools_PaveBlock& aPB=aItMPB.Key();
- if (aMPBX.Add(aPB)) {
- aLPB.Append(aPB);
- }
- //
- else {
- if (j>1) {
- aFFi.AppendBlock(aPB);
- }
- }
- //
- }
- }
- //
- BOPTools_SequenceOfCurves& aSCvs=aFFi.Curves();
- aNbCurves=aSCvs.Length();
- if (!aNbCurves) {
- continue;
- }
- //
- aTolR3D=aFFi.TolR3D();
- aTol2D=(aTolR3D < 1.e-3) ? 1.e-3 : aTolR3D;
- //
- CorrectTolR3D(aFFi, aMVStick, aTolR3D);
- //
- PrepareSetForFace (nF1, nF2, aLPB, aPSF);
- //
- // Put Paves On Curves
- for (j=1; j<=aNbCurves; ++j) {
- BOPTools_Curve& aBC=aSCvs(j);
- const IntTools_Curve& aC=aBC.Curve();
- // DEBUG f
- Handle(Geom_Curve) aC3D = aC.Curve();
- // DEBUG t
- PutPaveOnCurve (aPSF, aTolR3D, aBC);
- }
- //
- // Put bounding paves on curves
- for (j=1; j<=aNbCurves; ++j) {
- BOPTools_Curve& aBC=aSCvs(j);
- PutBoundPaveOnCurve (aBC, aFFi);
- }
- //modified by NIZNHY-PKV Wed Sep 14 13:12:14 2011f
-#if OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher
- //
- // Put closing pave if needded
- for (j=1; j<=aNbCurves; ++j) {
- BOPTools_Curve& aBC=aSCvs(j);
- PutClosingPaveOnCurve (aBC, aFFi);
- }
-#endif // OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher
- //modified by NIZNHY-PKV Wed Sep 14 13:12:17 2011t
- //
- // Pave Blocks on Curves
- bHasES=Standard_False;
- for (j=1; j<=aNbCurves; ++j) {
- BOPTools_Curve& aBC=aSCvs(j);
- const IntTools_Curve& aIC= aBC.Curve();
- BOPTools_PaveSet& aPaveSet=aBC.Set();
- //
- BOPTools_PaveBlockIterator aPBIter(0, aPaveSet);
- for (; aPBIter.More(); aPBIter.Next()) {
- BOPTools_PaveBlock& aPBNew=aPBIter.Value();
- aPBNew.SetCurve(aIC);
- aPBNew.SetFace1(nF1);
- aPBNew.SetFace2(nF2);
- //
- nV1=aPBNew.Pave1().Index();
- nV2=aPBNew.Pave2().Index();
- aT1=aPBNew.Pave1().Param();
- aT2=aPBNew.Pave2().Param();
- //
- if((nV1==nV2) && (Abs(aT2 - aT1) < aTolPPC)) {
- continue;// mkk ft ???
- }
- //
- // 1
- bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLPB, aTolR3D);
- if (bIsExistingPaveBlock) {
- continue;
- }
- //
- bIsCoincided=CheckCoincidence(aPBNew, aLPB);
- if(bIsCoincided) {
- continue;
- }
- //
- // 2
- bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLSE, aTolR3D);
- if (bIsExistingPaveBlock) {
- continue;
- }
- //
- // Checking of validity in 2D
- //
- bIsValidIn2D=myContext->IsValidBlockForFaces(aT1, aT2, aIC, aF1, aF2, aTol2D);
- if (!bIsValidIn2D) {
- continue;
- }
- //
- //
- // Make Section Edge
- TopoDS_Edge aES;
- //
- const TopoDS_Vertex aV1=TopoDS::Vertex(myDS->Shape(nV1));
- const TopoDS_Vertex aV2=TopoDS::Vertex(myDS->Shape(nV2));
- //
- {
- Standard_Real aT;
- //
- myContext->IsVertexOnLine(aV1, aIC, aTolR3D, aT);
- BOPTools_Tools::UpdateVertex (aIC, aT, aV1);
- //
- myContext->IsVertexOnLine(aV2, aIC, aTolR3D, aT);
- BOPTools_Tools::UpdateVertex (aIC, aT, aV2);
- }
- //
- BOPTools_Tools::MakeSectEdge (aIC, aV1, aT1, aV2, aT2, aES);
- //
- NMTTools_Tools::UpdateEdge (aES, aTolR3D);
- bIsMicroEdge=IsMicroEdge(aES, myContext);
- if (bIsMicroEdge) {
- continue;
- }
- //
- {
- Handle(Geom2d_Curve) aC2D1, aC2D2;
- //
- aC2D1=aIC.FirstCurve2d();
- aC2D2=aIC.SecondCurve2d();
- //
- NMTTools_Tools::MakePCurve(aES, aF1, aC2D1);
- NMTTools_Tools::MakePCurve(aES, aF2, aC2D2);
- }
- //
- aMEPB.Add(aES, aPBNew);
- aMapEI.Add(aES, i);
- //
- bHasES=Standard_True;
- }// for (; aPBIter.More(); aPBIter.Next())
- } // end of for (j=1; j<=aNbCurves; ++j)
- // qqf
- if (bHasES) {
- myIP->Add(nF1, nF2, Standard_True, NMTDS_TI_FF);
- }
- // qqt
- }// for (i=1; i<=aNbFFs; ++i)
- //=============================================================
- //
- // II. Post treatment
- //
- // Input data: aMEPB, aMapEI
- // Result : section edges in myDS
- //
- Standard_Integer aNbSE;
- //
- aNbSE=aMEPB.Extent();
- if (!aNbSE) {
- // there is nothing to do here
- return;
- }
- //
- BRep_Builder aBB;
- TopoDS_Compound aCompound;
- //
- // 1. Make compound from SE
- aBB.MakeCompound(aCompound);
- for (i=1; i<=aNbSE; ++i) {
- const TopoDS_Shape& aSE=aMEPB.FindKey(i);
- aBB.Add(aCompound, aSE);
- }
- //
- //
- // 2. Intersect SE using auxiliary Filler
- NMTTools_PaveFiller tPF;
- //
- tPF.SetCompositeShape(aCompound);
- //
- // 2.1.VV
- tPF.Init();
- tPF.PerformVV();
- //
- // 2.2.VE
- tPF.myPavePool.Resize (tPF.myNbEdges);
- tPF.PrepareEdges();
- tPF.PerformVE();
- //
- // 2.3.VF
- tPF.PerformVF();
- //
- // 2.4.EE
- tPF.myCommonBlockPool.Resize (tPF.myNbEdges);
- tPF.mySplitShapesPool.Resize (tPF.myNbEdges);
- tPF.myPavePoolNew .Resize (tPF.myNbEdges);
-
- tPF.PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE);
- tPF.PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE);
- //
- tPF.PerformEE();
- //
- tPF.RefinePavePool ();
- //
- tPF.myPavePoolNew.Destroy();
- //
- tPF.MakeSplitEdges();
- tPF.UpdateCommonBlocks();
- //
- // 3. Treatment of the result of intersection
- //
- Standard_Integer aNbOld, aNbLines, aNbPB, mV1, mV2, nE, mE, iFF;
- TopAbs_ShapeEnum aType;
- BOPTools_ListIteratorOfListOfPaveBlock aIt;
- BOPTColStd_IndexedDataMapOfIntegerInteger aMNewOld;
- //
- const NMTDS_ShapesDataStructure& tDS=*(tPF.DS());
- const BOPTools_SplitShapesPool& aSSP=tPF.mySplitShapesPool;
- const NMTTools_CommonBlockPool& aCBP=tPF.myCommonBlockPool;
- //
- aNbLines=tDS.NumberOfInsertedShapes();
- aNbOld=tDS.NumberOfShapesOfTheObject();
- //
- // 3.1 Links between indices in tDS and DS (kept in aMNewOld)
- //
- // 3.1.1.Old vertices [ links ]
- for (i=1; i<=aNbOld; ++i) {
- const TopoDS_Shape& aV=tDS.Shape(i);
- aType=aV.ShapeType();
- if (aType!=TopAbs_VERTEX) {
- continue;
- }
- //
- for (j=1; j<=aNbSE; ++j) {
- const BOPTools_PaveBlock& aPBSE=aMEPB(j);
- nV1=aPBSE.Pave1().Index();
- const TopoDS_Shape aV1=myDS->Shape(nV1);//mpv
- if (aV1.IsSame(aV)) {
- aMNewOld.Add(i, nV1);
- break;
- }
- nV2=aPBSE.Pave2().Index();
- const TopoDS_Shape aV2=myDS->Shape(nV2);//mpv
- if (aV2.IsSame(aV)) {
- aMNewOld.Add(i, nV2);
- break;
- }
- }
- }
- //
- // 3.1.2. New vertices [ links ]
- i=tDS.NumberOfSourceShapes()+1;
- for (; i<=aNbLines; ++i) {
- const TopoDS_Shape& aV=tDS.Shape(i);
- aType=aV.ShapeType();
- if (aType!=TopAbs_VERTEX) {
- continue;
- }
- //
- // Insert new vertex in myDS
- BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
- myDS->InsertShapeAndAncestorsSuccessors(aV, anASSeq);
- nV1=myDS->NumberOfInsertedShapes();
- // link
- aMNewOld.Add(i, nV1);
- }
- //
- // 3.2. Treatment of section edges (SE)
- for (i=1; i<=aNbOld; ++i) {
- const TopoDS_Shape& aE=tDS.Shape(i);
- aType=aE.ShapeType();
- if (aType!=TopAbs_EDGE) {
- continue;
- }
- //
- // block of section edge that we already have for this SE
- BOPTools_PaveBlock& aPBSE=aMEPB.ChangeFromKey(aE);
- //
- // Corresponding FF-interference
- iFF=aMapEI.FindFromKey(aE);
- BOPTools_SSInterference& aFFi=aFFs(iFF);
- BOPTools_SequenceOfCurves& aSCvs=aFFi.Curves();
- //
- BOPTools_Curve& aBC=aSCvs(1);
- //
- const BOPTools_ListOfPaveBlock& aLPB=aSSP(tDS.RefEdge(i));
- aNbPB=aLPB.Extent();
- //
- if (!aNbPB) {
- // no pave blocks -> use aPBSE and whole edge aE
- BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
- //
- nV1=aPBSE.Pave1().Index();
- const TopoDS_Shape aV1=myDS->Shape(nV1);//mpv
- nV2=aPBSE.Pave2().Index();
- const TopoDS_Shape aV2=myDS->Shape(nV2);//mpv
- //
- anASSeq.SetNewSuccessor(nV1);
- anASSeq.SetNewOrientation(aV1.Orientation());
- anASSeq.SetNewSuccessor(nV2);
- anASSeq.SetNewOrientation(aV2.Orientation());
- //
- myDS->InsertShapeAndAncestorsSuccessors(aE, anASSeq);
- nE=myDS->NumberOfInsertedShapes();
- //
- aPBSE.SetEdge(nE);
- aBC.AppendNewBlock(aPBSE);
- //
- continue;
- }
- //
- nF1=aPBSE.Face1();
- nF2=aPBSE.Face2();
- //
- const NMTTools_ListOfCommonBlock& aLCB=aCBP(tDS.RefEdge(i));
- NMTTools_CommonBlockAPI aCBAPI(aLCB);
- //
- aIt.Initialize(aLPB);
- for (; aIt.More(); aIt.Next()) {
- BOPTools_PaveBlock aPB=aIt.Value();
- //
- const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));
- const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));
- //
- if (aCBAPI.IsCommonBlock(aPB)) {
- // it can be Common Block
- Standard_Real aTolEx;
- Handle(Geom2d_Curve) aC2D1, aC2D2;
- TopoDS_Face aF1FWD, aF2FWD;
- //
- NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB);
- //const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks();
- //
- aPB=aCB.PaveBlock1();
- mE=aPB.Edge(); // index of edge in tDS
- const TopoDS_Edge& aEx=TopoDS::Edge(tDS.Shape(mE));
- aTolEx=BRep_Tool::Tolerance(aEx);
- //
- aF1FWD=aF1;
- aF1FWD.Orientation(TopAbs_FORWARD);
- aF2FWD=aF2;
- aF2FWD.Orientation(TopAbs_FORWARD);
- //
- NMTTools_Tools::MakePCurve(aEx, aF1FWD, aC2D1);
- NMTTools_Tools::MakePCurve(aEx, aF2FWD, aC2D2);
- NMTTools_Tools::UpdateEdge (aEx, aTolEx);
- } //if (aCBAPI.IsCommonBlock(aPB))
- //
- // new SE
- mE=aPB.Edge(); // index of edge in tDS
- const TopoDS_Shape& aSp=tDS.Shape(mE);
- //
- const BOPTools_Pave& aPave1=aPB.Pave1();
- aT1=aPave1.Param();
- mV1=aPave1.Index(); // index in tDS
- nV1=aMNewOld.FindFromKey(mV1); // index in myDS
- const TopoDS_Shape aV1=myDS->Shape(nV1);//mpv
- //
- const BOPTools_Pave& aPave2=aPB.Pave2();
- aT2=aPave2.Param();
- mV2=aPave2.Index();
- nV2=aMNewOld.FindFromKey(mV2);
- const TopoDS_Shape aV2=myDS->Shape(nV2);//mpv
- //
- if (!aMNewOld.Contains(mE)) {
- // add new SE to the myDS
- BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
- //
- anASSeq.SetNewSuccessor(nV1);
- anASSeq.SetNewOrientation(aV1.Orientation());
-
- anASSeq.SetNewSuccessor(nV2);
- anASSeq.SetNewOrientation(aV2.Orientation());
-
- myDS->InsertShapeAndAncestorsSuccessors(aSp, anASSeq);
- nE=myDS->NumberOfInsertedShapes();
- //
- aMNewOld.Add(mE, nE);
- }
- else {
- nE=aMNewOld.FindFromKey(mE);
- }
- // Form PaveBlock;
- BOPTools_PaveBlock aPBx;
- BOPTools_Pave aP1, aP2;
- //
- aPBx.SetFace1(nF1);
- aPBx.SetFace1(nF2);
- //
- aP1.SetIndex(nV1);
- aP1.SetParam(aT1);
- //
- aP2.SetIndex(nV2);
- aP2.SetParam(aT2);
- //
- aPBx.SetPave1(aP1);
- aPBx.SetPave2(aP2);
- //
- aPBx.SetEdge(nE);
- //
- aBC.AppendNewBlock(aPBx);
- }// for (; aIt.More(); aIt.Next())
- }// for (i=1; i<=aNbOld; ++i)
- //
- myIsDone=Standard_True;
-}
-
-//=======================================================================
-// function: MakePCurves
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::MakePCurves()
-{
- Standard_Integer i, aNb, nF1, nF2, nE;
- Standard_Integer aNbCB, aNbF, nSp, nF;
- TopAbs_ShapeEnum aType;
- TopoDS_Face aF1FWD, aF2FWD;
- TColStd_ListIteratorOfListOfInteger aItF;
- BOPTools_ListIteratorOfListOfPaveBlock anIt;
- NMTTools_ListIteratorOfListOfCommonBlock aItCB;
- //
- BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences();
- //
- aNb=aFFs.Extent();
- for (i=1; i<=aNb; i++) {
- BOPTools_SSInterference& aFF=aFFs(i);
- aFF.Indices(nF1, nF2);
- //
- const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));//mpv
- const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));//mpv
- //
- aF1FWD=aF1;
- aF1FWD.Orientation(TopAbs_FORWARD);
- aF2FWD=aF2;
- aF2FWD.Orientation(TopAbs_FORWARD);
- //
- // In, On parts processing
- const BOPTools_ListOfPaveBlock& aLPBInOn=aFF.PaveBlocks();
- //
- anIt.Initialize(aLPBInOn);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPB=anIt.Value();
- nE=aPB.Edge();
- const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));//mpv
-
- BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF1FWD);
- BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF2FWD);
- }
- }
- // Check common blocks between edges and faces
- // Build P-Curves if they were not built in previos block.
- // The main case is :arguments for e.g aEdge, aFace -> no FFs,
- // but p-curves are needed.
- //
- aNb=myDS->NumberOfShapesOfTheObject();
- for (i=1; i<=aNb; ++i) {
- const TopoDS_Shape& aS=myDS->Shape(i);
- aType=aS.ShapeType();
- //
- if (aType!=TopAbs_EDGE) {
- continue;
- }
- const TopoDS_Edge& aE=TopoDS::Edge(aS);
- //
- if (BRep_Tool::Degenerated(aE)) {
- continue;
- }
- //
- const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(i));
- aNbCB=aLCB.Extent();
- if (!aNbCB) {
- continue;
- }
- //
- aItCB.Initialize(aLCB);
- for (; aItCB.More(); aItCB.Next()) {
- const NMTTools_CommonBlock& aCB=aItCB.Value();
- const BOPTools_PaveBlock &aPB1=aCB.PaveBlock1();
- //
- const TColStd_ListOfInteger& aLF=aCB.Faces();
- aNbF=aLF.Extent();
- if (!aNbF) {
- continue;
- }
- //
- nSp=aPB1.Edge();
- const TopoDS_Edge aSp=TopoDS::Edge(myDS->Shape(nSp));//mpv
- //
- aItF.Initialize(aLF);
- for (; aItF.More(); aItF.Next()) {
- nF=aItF.Value();
- aF1FWD=TopoDS::Face(myDS->Shape(nF));
- aF1FWD.Orientation(TopAbs_FORWARD);
- //
- BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aSp, aF1FWD);
- } // for (; aItCB.More(); aItCB.Next()) {
- }//if (aS.ShapeType()==TopAbs_EDGE) {
- }
-}
-
-//=======================================================================
-// function: IsExistingPaveBlock
-// purpose:
-//=======================================================================
-Standard_Boolean NMTTools_PaveFiller::IsExistingPaveBlock(const BOPTools_PaveBlock& aPBNew,
- const BOPTools_ListOfPaveBlock& aLPBR,
- const Standard_Real aTolR3D)
-{
- Standard_Boolean bFlag;
- Standard_Integer nVNew1, nVNew2, nV1, nV2, iC;
- BOPTools_ListIteratorOfListOfPaveBlock anIt;
- //
- bFlag=Standard_False;
- nVNew1=aPBNew.Pave1().Index();
- nVNew2=aPBNew.Pave2().Index();
- //
- anIt.Initialize(aLPBR);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPBR=anIt.Value();
- nV1=aPBR.Pave1().Index();
- nV2=aPBR.Pave2().Index();
- if (nVNew1==nV1 || nVNew1==nV2 || nVNew2==nV1 || nVNew2==nV2) {
- //
- iC=CheckIntermediatePoint(aPBNew, aPBR, aTolR3D);
- if (!iC) {
- return !bFlag;
- }
- }
- }
- return bFlag;
-}
-
-//=======================================================================
-// function: IsExistingPaveBlock
-// purpose:
-//=======================================================================
-Standard_Boolean NMTTools_PaveFiller::IsExistingPaveBlock(const BOPTools_PaveBlock& aPBNew,
- const TopTools_ListOfShape& aLSE,
- const Standard_Real aTolR3D)
-{
- Standard_Boolean bFlag;
- Standard_Integer aNbSE, iC;
- Standard_Real aTolE, aTol;
- TopTools_ListIteratorOfListOfShape anIt;
- //
- bFlag=Standard_False;
- //
- aNbSE=aLSE.Extent();
- if (!aNbSE) {
- return bFlag;
- }
- //
- anIt.Initialize(aLSE);
- for (; anIt.More(); anIt.Next()) {
- const TopoDS_Edge& aE=TopoDS::Edge(anIt.Value());
- aTolE=BRep_Tool::Tolerance(aE);
- aTol=aTolR3D;
- if (aTolE>aTol) {
- aTol=aTolE;
- }
- iC=CheckIntermediatePoint(aPBNew, aE, aTol);
- if (!iC) {
- return !bFlag;
- }
- }
- return bFlag;
-}
-
-//=======================================================================
-// function: CheckIntermediatePoint
-// purpose:
-//=======================================================================
-Standard_Integer NMTTools_PaveFiller::CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,
- const BOPTools_PaveBlock& aPBR,
- const Standard_Real aTolC)
-{
- Standard_Integer iVM, nE2;
- //
- nE2=aPBR.Edge();
- const TopoDS_Edge aE2=TopoDS::Edge(myDS->Shape(nE2));//mpv
- iVM=CheckIntermediatePoint(aPB, aE2, aTolC);
- //
- return iVM;
-}
-
-//=======================================================================
-// function: CheckIntermediatePoint
-// purpose:
-//=======================================================================
-Standard_Integer NMTTools_PaveFiller::CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,
- const TopoDS_Edge& aE2,
- const Standard_Real aTolC)
-{
- Standard_Real aT11, aT12, aTM, aTmp;
- Standard_Integer iVM;
- gp_Pnt aPM;
- BRep_Builder aBB;
- TopoDS_Vertex aVM;
- //
- // Vertex
- const BOPTools_Pave& aPave11=aPB.Pave1();
- aT11=aPave11.Param();
- //
- const BOPTools_Pave& aPave12=aPB.Pave2();
- aT12=aPave12.Param();
- //
- aTM=IntTools_Tools::IntermediatePoint (aT11, aT12);
- //
- const IntTools_Curve& aIC=aPB.Curve();
- aIC.D0(aTM, aPM);
- //
- aBB.MakeVertex (aVM, aPM, aTolC);
- //
- iVM=myContext->ComputeVE(aVM, aE2, aTmp);
- //
- return iVM;
-}
-
-//=======================================================================
-// function: PutBoundPaveOnCurve
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::PutBoundPaveOnCurve(BOPTools_Curve& aBC,
- BOPTools_SSInterference& aFFi)
-{
- Standard_Boolean bHasBounds, bVF;
- Standard_Integer nF1, nF2;
- Standard_Real aT1, aT2, aTolR3D;
- gp_Pnt aP1, aP2;
- //
- const IntTools_Curve& aIC=aBC.Curve();
- bHasBounds=aIC.HasBounds ();
- if (!bHasBounds){
- return;
- }
- //
- // Bounds
- aIC.Bounds (aT1, aT2, aP1, aP2);
- //
- // Faces
- aFFi.Indices(nF1, nF2);
- aTolR3D=aFFi.TolR3D();
- //
- const TopoDS_Face aF1=TopoDS::Face(myDS->GetShape(nF1));//mpv
- const TopoDS_Face aF2=TopoDS::Face(myDS->GetShape(nF2));//mpv
- //
- bVF=myContext->IsValidPointForFaces (aP1, aF1, aF2, aTolR3D);
- if (bVF) {
- PutBoundPaveOnCurve (aP1, aT1, aBC, aFFi);
- }
- //
- bVF=myContext->IsValidPointForFaces (aP2, aF1, aF2, aTolR3D);
- if (bVF) {
- PutBoundPaveOnCurve (aP2, aT2, aBC, aFFi);
- }
-}
-
-//=======================================================================
-// function: PutBoundPaveOnCurve
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::PutBoundPaveOnCurve(const gp_Pnt& aP,
- const Standard_Real aT,
- BOPTools_Curve& aBC,
- BOPTools_SSInterference& aFFi)
-{
- Standard_Boolean bFound1, bFound2;
- Standard_Integer nV;
- Standard_Real aTolV=aFFi.TolR3D();
-
- BOPTools_Pave aPave1, aPave2, aPave;
- BOPTools_PaveSet& aCPS=aBC.Set();
- BOPTools_PaveSet& aFFiPS=aFFi.NewPaveSet();
- const IntTools_Curve& aIC=aBC.Curve();
- //
- bFound1=FindPave(aP, aTolV, aCPS , aPave1);
- bFound2=FindPave(aP, aTolV, aFFiPS, aPave2);
- //
- if (!bFound1 && !bFound2) {
- TopoDS_Vertex aNewVertex;
- BOPTools_Tools::MakeNewVertex(aP, aTolV, aNewVertex);
- //
- BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
- myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq);
- nV=myDS->NumberOfInsertedShapes();
- aPave.SetIndex(nV);
- aPave.SetParam(aT);
-
- aCPS.Append(aPave);
- aFFiPS.Append(aPave);
- //
- // Append Techno Vertex to the Curve
- TColStd_ListOfInteger& aTVs=aBC.TechnoVertices();
- aTVs.Append(nV);
- }
- if (bFound1 && !bFound2) {
- nV=aPave1.Index();
- aPave.SetIndex(nV);
- aPave.SetParam(aT);
- aFFiPS.Append(aPave);
- //
- const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));//mpv
- BOPTools_Tools::UpdateVertex (aIC, aT, aV);
- }
-
- if (!bFound1 && bFound2) {
- nV=aPave2.Index();
- aPave.SetIndex(nV);
- aPave.SetParam(aT);
- aCPS.Append(aPave);
- //
- const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));//mpv
- BOPTools_Tools::UpdateVertex (aIC, aT, aV);
- }
-}
-
-//=======================================================================
-// function: FindPave
-// purpose:
-//=======================================================================
-Standard_Boolean NMTTools_PaveFiller::FindPave(const gp_Pnt& aP,
- const Standard_Real aTolPV,
- const BOPTools_PaveSet& aPS,
- BOPTools_Pave& aPave)
-{
- Standard_Integer nV;
- Standard_Boolean bIsVertex=Standard_False;
-
- const BOPTools_ListOfPave& aLP=aPS.Set();
- BOPTools_ListIteratorOfListOfPave anIt(aLP);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_Pave& aPC=anIt.Value();
- nV=aPC.Index();
- const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));//mpv
- bIsVertex=IntTools_Tools::IsVertex (aP, aTolPV, aV);
- if (bIsVertex) {
- aPave=aPC;
- return bIsVertex;
- }
- }
- return bIsVertex;
-}
-
-//=======================================================================
-// function: PrepareSetForFace
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::PrepareSetForFace(const Standard_Integer ,//nF1,
- const Standard_Integer ,//nF2,
- const BOPTools_ListOfPaveBlock& aLPBC,
- BOPTools_PaveSet& aPSF)
-{
- Standard_Integer nV1, nV2;
- TColStd_MapOfInteger aMap;
- BOPTools_ListIteratorOfListOfPaveBlock anIt;
- //
- anIt.Initialize(aLPBC);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPB=anIt.Value();
- const BOPTools_Pave& aPave1=aPB.Pave1();
- nV1=aPave1.Index();
- if (!aMap.Contains(nV1)) {
- aMap.Add(nV1);
- aPSF.Append(aPave1);
- }
- const BOPTools_Pave& aPave2=aPB.Pave2();
- nV2=aPave2.Index();
- if (!aMap.Contains(nV2)) {
- aMap.Add(nV2);
- aPSF.Append(aPave2);
- }
- }
-}
-
-//=======================================================================
-// function: CheckCoincidence
-// purpose:
-//=======================================================================
-Standard_Boolean NMTTools_PaveFiller::CheckCoincidence(const BOPTools_PaveBlock& aPBNew,
- const BOPTools_ListOfPaveBlock& aLPBFF)
-{
- Standard_Boolean bRet;
- Standard_Real aTE;
- Standard_Integer nV11, nV12, nV21, nV22, iVV, iVE, nE2;
- Standard_Integer iV, iCount, iCountExt;
- BOPTools_ListIteratorOfListOfPaveBlock anIt;
- // V11
- const BOPTools_Pave& aPave11=aPBNew.Pave1();
- nV11=aPave11.Index();
- const TopoDS_Vertex& aV11=TopoDS::Vertex(myDS->Shape(nV11));
-
- // V12
- const BOPTools_Pave& aPave12=aPBNew.Pave2();
- nV12=aPave12.Index();
- const TopoDS_Vertex& aV12=TopoDS::Vertex(myDS->Shape(nV12));
- //
- iCountExt=1;
- iCount=0;
- anIt.Initialize(aLPBFF);
- for (; anIt.More(); anIt.Next()) {
- iCount=0;
- //
- const BOPTools_PaveBlock& aPBR=anIt.Value();
- // V21
- const BOPTools_Pave& aPave21=aPBR.Pave1();
- nV21=aPave21.Index();
-
- // V22
- const BOPTools_Pave& aPave22=aPBR.Pave2();
- nV22=aPave22.Index();
- //
- if (nV11==nV21 || nV11==nV22 || nV12==nV21 || nV12==nV22) {
- continue;
- }
- //
- // E2
- nE2=aPBR.Edge();
- //
- const TopoDS_Vertex& aV21=TopoDS::Vertex(myDS->Shape(nV21));
- const TopoDS_Vertex& aV22=TopoDS::Vertex(myDS->Shape(nV22));
- const TopoDS_Edge& aE2=TopoDS::Edge(myDS->Shape(nE2));
- //
- // VV
- iV=0;
- iVV=IntTools_Tools::ComputeVV (aV11, aV21);
- if (!iVV) {
- iCount++;
- iV++;
- if (iCount>iCountExt) {
- break;
- }
- }
- //
- iVV=IntTools_Tools::ComputeVV (aV11, aV22);
- if (!iVV) {
- iCount++;
- iV++;
- if (iCount>iCountExt) {
- break;
- }
- }
- // VE
- if (!iV) {
- iVE=myContext->ComputeVE (aV11, aE2, aTE);
- if (!iVE) {
- iCount++;
- if (iCount>iCountExt) {
- break;
- }
- }
- }
- // VV
- iV=0;
- iVV=IntTools_Tools::ComputeVV (aV12, aV21);
- if (!iVV) {
- iCount++;
- iV++;
- if (iCount>iCountExt) {
- break;
- }
- }
- //
- iVV=IntTools_Tools::ComputeVV (aV12, aV22);
- if (!iVV) {
- iCount++;
- iV++;
- if (iCount>iCountExt) {
- break;
- }
- }
- // VE
- if (!iV) {
- iVE=myContext->ComputeVE (aV12, aE2, aTE);
- if (!iVE) {
- iCount++;
- if (iCount>iCountExt) {
- break;
- }
- }
- }
- } // next aPBR
- bRet=(Standard_Boolean)(iCount>iCountExt);
- return bRet;
-}
-
-//=======================================================================
-//function : IsMicroEdge
-//purpose :
-//=======================================================================
-Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE,
- const Handle(IntTools_Context)& aCtx)
-{
- Standard_Boolean bRet;
- Standard_Integer iErr;
- Standard_Real aT1, aT2, aTmp;
- Handle(Geom_Curve) aC3D;
- TopoDS_Vertex aV1, aV2;
- IntTools_Range aR;
- //
- bRet=(BRep_Tool::Degenerated(aE) ||
- !BRep_Tool::IsGeometric(aE));
- if (bRet) {
- return bRet;
- }
- //
- aC3D=BRep_Tool::Curve(aE, aT1, aT2);
- TopExp::Vertices(aE, aV1, aV2);
- aT1=BRep_Tool::Parameter(aV1, aE);
- aT2=BRep_Tool::Parameter(aV2, aE);
- if (aT2<aT1) {
- aTmp=aT1;
- aT1=aT2;
- aT2=aTmp;
- }
- //
- aR.SetFirst(aT1);
- aR.SetLast(aT2);
- IntTools_ShrunkRange aSR (aE, aV1, aV2, aR, aCtx);
- iErr=aSR.ErrorStatus();
- bRet=!aSR.IsDone();
- //
- return bRet;
-}
-//=======================================================================
-// function: PutPaveOnCurve
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::PutPaveOnCurve(const BOPTools_PaveSet& aPaveSet,
- const Standard_Real aTolR3D,
- BOPTools_Curve& aBC)
-{
- Standard_Integer nV;
- Standard_Boolean bIsVertexOnLine;
- Standard_Real aT;
- BOPTools_ListIteratorOfListOfPave anIt;
- Bnd_Box aBBC;
- GeomAdaptor_Curve aGAC;
- //
- const IntTools_Curve& aC=aBC.Curve();
- Handle (Geom_Curve) aC3D= aC.Curve();
- aGAC.Load(aC3D);
- BndLib_Add3dCurve::Add(aGAC, aTolR3D, aBBC);
- //
- const BOPTools_ListOfPave& aLP=aPaveSet.Set();
- anIt.Initialize(aLP);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_Pave& aPave=anIt.Value();
- //
- nV=aPave.Index();
- const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));
- //
- Bnd_Box aBBV;
- BRepBndLib::Add(aV, aBBV);
- if (aBBC.IsOut(aBBV)){
- continue;
- }
- //
- bIsVertexOnLine=myContext->IsVertexOnLine(aV, aC, aTolR3D, aT);
- //
- //
- if (bIsVertexOnLine) {
- BOPTools_Pave aPaveNew(nV, aT, BooleanOperations_SurfaceSurface);
- BOPTools_PaveSet& aPS=aBC.Set();
- aPS.Append(aPaveNew);
- //<-B
- }
- }
-}
-//
-//=======================================================================
-//function : FillFaceInfo
-//purpose :
-//=======================================================================
-void NMTTools_PaveFiller::FillFaceInfo()
-{
- Standard_Integer i, aNbS, aNbFFs, nF, aNbVFs, aNbEFs, j, n1, n2, nX, aNbF;
- TopAbs_ShapeEnum aType;
- TopoDS_Shape aS;
- TColStd_ListIteratorOfListOfInteger aItF;
- BOPTools_ListIteratorOfListOfPaveBlock anItPB;
- NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo aItMFI;
- NMTTools_ListIteratorOfListOfCommonBlock aItCB;
- //
- myFaceInfo.Clear();
- //
- BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences();
- BOPTools_CArray1OfVSInterference& aVFs=myIP->VSInterferences();
- BOPTools_CArray1OfESInterference& aEFs=myIP->ESInterferences();
- //
- aNbFFs=aFFs.Extent();
- if (!aNbFFs) {
- return;
- }
- //
- // 0.
- for (i=1; i<=aNbFFs; ++i) {
- NMTTools_FaceInfo aFI;
- //
- BOPTools_SSInterference& aFFi=aFFs(i);
- aFFi.Indices(n1, n2);
- myFaceInfo.Bind(n1, aFI);
- myFaceInfo.Bind(n2, aFI);
- }
- //
- // 1.
- aNbS=myDS->NumberOfShapesOfTheObject();
- for (i=1; i<=aNbS; ++i) {
- aS=myDS->Shape(i);
- aType=aS.ShapeType();
- if (aType==TopAbs_EDGE) {
- const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(i));
- aItCB.Initialize(aLCB);
- for (; aItCB.More(); aItCB.Next()) {
- const NMTTools_CommonBlock& aCB=aItCB.Value();
- const BOPTools_PaveBlock &aPB1=aCB.PaveBlock1();
- const TColStd_ListOfInteger& aLF=aCB.Faces();
- aNbF=aLF.Extent();
- if (!aNbF) {
- continue;
- }
- //
- aItF.Initialize(aLF);
- for (; aItF.More(); aItF.Next()) {
- nF=aItF.Value();
- if (!myFaceInfo.IsBound(nF)) {
- continue;
- }
- //
- NMTTools_FaceInfo& aFI=myFaceInfo.ChangeFind(nF);
- aFI.ChangePaveBlocksIn().Add(aPB1);
- //
- n1=aPB1.Pave1().Index();
- n2=aPB1.Pave2().Index();
- aFI.ChangeVerticesIn().Add(n1);
- aFI.ChangeVerticesIn().Add(n2);
- }
- }
- }// if (aType==TopAbs_EDGE) {
- else if (aType==TopAbs_FACE) {
- if (!myFaceInfo.IsBound(i)) {
- continue;
- }
- //
- BOPTools_ListOfPaveBlock aLPBOn;
- //
- nF=i;
- NMTTools_FaceInfo& aFI=myFaceInfo.ChangeFind(nF);
- //
- RealSplitsFace(nF, aLPBOn);
- //
- anItPB.Initialize(aLPBOn);
- for (; anItPB.More(); anItPB.Next()) {
- const BOPTools_PaveBlock &aPB=anItPB.Value();
- aFI.ChangePaveBlocksOn().Add(aPB);
- //
- n1=aPB.Pave1().Index();
- n2=aPB.Pave2().Index();
- aFI.ChangeVerticesOn().Add(n1);
- aFI.ChangeVerticesOn().Add(n2);
- }
- //
- }// else if (aType==TopAbs_FACE) {
- }// for (i=1; i<=aNbS; ++i) {
- //
- // 2.
- aItMFI.Initialize(myFaceInfo);
- for (; aItMFI.More(); aItMFI.Next()) {
- nF=aItMFI.Key();
- NMTTools_FaceInfo& aFI=*((NMTTools_FaceInfo*)&aItMFI.Value());
- //
- aFI.SetIndex(nF);
- //
- //
- // 2.1 aVFs
- aNbVFs=aVFs.Extent();
- for (j=1; j<=aNbVFs; ++j) {
- BOPTools_VSInterference& aVFj=aVFs(j);
- aVFj.Indices(n1, n2);
- if (nF==n1) {
- aFI.ChangeVerticesIn().Add(n2);
- }
- else if (nF==n2){
- aFI.ChangeVerticesIn().Add(n1);
- }
- }// for (j=1; j<=aNbVFs; ++j) {
- //
- // 2.2 aEFs
- aNbEFs=aEFs.Extent();
- for (j=1; j<=aNbEFs; ++j) {
- BOPTools_ESInterference& aEFj=aEFs(j);
- aEFj.Indices(n1, n2);
- if (!(nF==n1 || nF==n2)) {
- continue;
- }
- //
- nX=aEFj.NewShape();
- if (nX<1) {
- continue;
- }
- //
- aS=myDS->Shape(nX);
- aType=aS.ShapeType();
- if (aType!=TopAbs_VERTEX) {
- continue;
- }
- //
- aFI.ChangeVerticesIn().Add(nX);
- }// for (j=1; j<=aNbEFs; ++j) {
- }// for (; aItMFI.More(); aItMFI.Next()) {
-}
-
-
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Vec.hxx>
-#include <GeomAPI_ProjectPointOnSurf.hxx>
-//=======================================================================
-//function : CorrectTolR3D
-//purpose : Attempt to correct the value of tolerance aTolR3D for
-// the intersection curve in order to
-// compel it to pass through the sticks.
-// Prerequisites:
-// 2. The are based on B-Spline surfaces;
-// 1. There is at least the one intersection curve;
-// 2. The faces have stick vertices to catch the curve;
-// 3. The intersection angle is rather small (0.7-7 deg)
-//
-//=======================================================================
-void NMTTools_PaveFiller::CorrectTolR3D(const BOPTools_SSInterference& aFF,
- const TColStd_MapOfInteger& aMVStick,
- Standard_Real& aTolR3D)
-
-{
- Standard_Boolean bHasBounds;
- Standard_Integer i, nF[2], nV, aNbCurves;
- Standard_Real aT1, aT2, aU, aV, aT, aA, aTolV, aTolVmax;
- Standard_Real aTolR, aTolTresh, aAmin, aAmax;
- TColStd_MapIteratorOfMapOfInteger aIt;
- gp_Pnt aP, aP1, aP2;
- gp_Dir aDN[2];
- gp_Vec aVT;
- Handle(Geom_Surface) aS[2];
- Handle(Geom_Curve) aC3D;
- GeomAdaptor_Surface aGAS;
- GeomAbs_SurfaceType aType;
- TopoDS_Face aF[2];
- //
- aTolTresh=0.0005;
- aAmin=0.012;// 0.7-7 deg
- aAmax=0.12;
- //
- if (!aMVStick.Extent()) {
- return;
- }
- //
- BOPTools_SSInterference& aFFi=*((BOPTools_SSInterference*)&aFF);
- BOPTools_SequenceOfCurves& aSCvs=aFFi.Curves();
- aNbCurves=aSCvs.Length();
- if (aNbCurves!=1){
- return;
- }
- //
- aFFi.Indices(nF[0], nF[1]);
- for (i=0; i<2; ++i) {
- aF[i]=*((TopoDS_Face*)(&myDS->Shape(nF[i])));
- aS[i]=BRep_Tool::Surface(aF[i]);
- aGAS.Load(aS[i]);
- aType=aGAS.GetType();
- if (aType!=GeomAbs_BSplineSurface) {
- return;
- }
- }
- //
- BOPTools_Curve& aBC=aSCvs(1);
- const IntTools_Curve& aIC=aBC.Curve();
- bHasBounds=aIC.HasBounds();
- if (!bHasBounds){
- return;
- }
- //
- aIC.Bounds (aT1, aT2, aP1, aP2);
- aT=IntTools_Tools::IntermediatePoint(aT1, aT2);
- aC3D=aIC.Curve();
- aC3D->D0(aT, aP);
- //
- for (i=0; i<2; ++i) {
- GeomAPI_ProjectPointOnSurf& aPPS=myContext->ProjPS(aF[i]);
- aPPS.Perform(aP);
- aPPS.LowerDistanceParameters(aU, aV);
- BOPTools_Tools3D::GetNormalToSurface(aS[i], aU, aV, aDN[i]);
- }
- //
- aA=aDN[0].Angle(aDN[1]);
- aA=fabs(aA);
- if (aA > 0.5*M_PI) {
- aA = M_PI - aA;
- }
- //
- if (aA<aAmin || aA>aAmax) {
- return;
- }
- //
- aTolVmax=-1.;
- aIt.Initialize(aMVStick);
- for (; aIt.More(); aIt.Next()) {
- nV=aIt.Key();
- const TopoDS_Vertex& aV=*((TopoDS_Vertex*)(&myDS->Shape(nV)));
- aTolV=BRep_Tool::Tolerance(aV);
- if (aTolV>aTolVmax) {
- aTolVmax=aTolV;
- }
- }
- //
-
- aTolR=aTolVmax/aA;
- if (aTolR<aTolTresh) {
- aTolR3D=aTolR;
- }
-}
-
-//modified by NIZNHY-PKV Wed Sep 14 13:21:13 2011f
-#if OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher
-//=======================================================================
-// function: PutClosingPaveOnCurve
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::PutClosingPaveOnCurve(BOPTools_Curve& aBC,
- BOPTools_SSInterference& aFFi)
-{
- Standard_Boolean bIsClosed, bHasBounds, bAdded;
- Standard_Integer nVC, j;
- Standard_Real aT[2], aTolR3D, aTC, dT, aTx;
- gp_Pnt aP[2] ;
- BOPTools_Pave aPVx;
- BOPTools_ListIteratorOfListOfPave aItLP;
- //
- const IntTools_Curve& aIC=aBC.Curve();
- const Handle (Geom_Curve)& aC3D=aIC.Curve();
- if(aC3D.IsNull()) {
- return;
- }
- //
- bIsClosed=IntTools_Tools::IsClosed(aC3D);
- if (!bIsClosed) {
- return;
- }
- //
- bHasBounds=aIC.HasBounds ();
- if (!bHasBounds){
- return;
- }
- //
- bAdded=Standard_False;
- dT=Precision::PConfusion();
- aTolR3D=aFFi.TolR3D();
- aIC.Bounds (aT[0], aT[1], aP[0], aP[1]);
- //
- BOPTools_PaveSet& aFFiPS=aFFi.NewPaveSet();
- BOPTools_PaveSet& aCPS=aBC.Set();
- //
- const BOPTools_ListOfPave& aLP=aCPS.Set();
- aItLP.Initialize(aLP);
- for (; aItLP.More() && !bAdded; aItLP.Next()) {
- const BOPTools_Pave& aPC=aItLP.Value();
- nVC=aPC.Index();
- const TopoDS_Vertex aVC=TopoDS::Vertex(myDS->Shape(nVC));
- aTC=aPC.Param();
- //
- for (j=0; j<2; ++j) {
- if (fabs(aTC-aT[j]) < dT) {
- aTx=(!j) ? aT[1] : aT[0];
- aPVx.SetIndex(nVC);
- aPVx.SetParam(aTx);
- //
- aCPS.Append(aPVx);
- aFFiPS.Append(aPVx);
- //
- bAdded=Standard_True;
- break;
- }
- }
- }
-}
-#endif // OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher
-//modified by NIZNHY-PKV Wed Sep 14 13:21:17 2011t
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_PaveFiller_7.cxx
-// Author: Peter KURNEV
-
-#include <NMTTools_PaveFiller.hxx>
-
-#include <Bnd_HArray1OfBox.hxx>
-#include <Bnd_BoundSortBox.hxx>
-#include <Bnd_Box.hxx>
-#include <BRepBndLib.hxx>
-
-#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_ListOfInteger.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-
-#include <GeomAPI_ProjectPointOnCurve.hxx>
-
-#include <TopAbs_Orientation.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Compound.hxx>
-
-#include <TopTools_DataMapOfIntegerShape.hxx>
-#include <TopTools_DataMapOfShapeInteger.hxx>
-#include <TopTools_DataMapOfShapeShape.hxx>
-#include <TopTools_DataMapOfShapeListOfInteger.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfIntegerShape.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeInteger.hxx>
-#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfInteger.hxx>
-
-#include <BRep_Builder.hxx>
-#include <BRep_Tool.hxx>
-
-#include <TopExp_Explorer.hxx>
-#include <TopExp.hxx>
-//
-#include <IntTools_SequenceOfPntOn2Faces.hxx>
-#include <IntTools_PntOnFace.hxx>
-#include <IntTools_PntOn2Faces.hxx>
-#include <IntTools_Context.hxx>
-
-#include <BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx>
-
-#include <BOPTools_SSInterference.hxx>
-#include <BOPTools_CArray1OfSSInterference.hxx>
-#include <BOPTools_CArray1OfVVInterference.hxx>
-#include <BOPTools_VVInterference.hxx>
-#include <BOPTools_Tools.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
-#include <BOPTools_PaveBlock.hxx>
-#include <BOPTools_Pave.hxx>
-#include <BOPTools_Tools.hxx>
-
-#include <NMTDS_Iterator.hxx>
-#include <NMTDS_ShapesDataStructure.hxx>
-#include <NMTDS_InterfPool.hxx>
-
-#include <NMTTools_ListOfCommonBlock.hxx>
-#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-#include <NMTTools_MapOfPaveBlock.hxx>
-
-
-//=======================================================================
-// function: MakeSplitEdges
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::MakeSplitEdges()
-{
- myIsDone=Standard_False;
- //
- Standard_Boolean bIsNewVertex1, bIsNewVertex2;
- Standard_Integer i, aNbS, nV1, nV2, aNbPaveBlocks, aNewShapeIndex;
- Standard_Real t1, t2;
- TopAbs_Orientation anOri;
- TopoDS_Edge aE, aESplit;
- TopoDS_Vertex aV1, aV2;
- //
- aNbS=myDS->NumberOfShapesOfTheObject();
- for (i=1; i<=aNbS; ++i) {
- if (myDS->GetShapeType(i) != TopAbs_EDGE)
- continue;
- //
- // Original Edge
- aE=TopoDS::Edge(myDS->Shape(i));
- if (BRep_Tool::Degenerated(aE)){
- continue;
- }
- //
- anOri=aE.Orientation();
- aE.Orientation(TopAbs_FORWARD);
- //
- // Making Split Edges
- //
- // Split Set for the Original Edge i
- BOPTools_ListOfPaveBlock& aSplitEdges=mySplitShapesPool(myDS->RefEdge(i));
- BOPTools_ListIteratorOfListOfPaveBlock aPBIt(aSplitEdges);
- //
- aNbPaveBlocks=aSplitEdges.Extent();
-
- for (; aPBIt.More(); aPBIt.Next()) {
- BOPTools_PaveBlock& aPB=aPBIt.Value();
- // aPave1
- const BOPTools_Pave& aPave1=aPB.Pave1();
- nV1=aPave1.Index();
- t1=aPave1.Param();
- aV1=TopoDS::Vertex(myDS->GetShape(nV1));
- aV1.Orientation(TopAbs_FORWARD);
- // aPave2
- const BOPTools_Pave& aPave2=aPB.Pave2();
- nV2=aPave2.Index();
- t2=aPave2.Param();
- aV2=TopoDS::Vertex(myDS->GetShape(nV2));
- aV2.Orientation(TopAbs_REVERSED);
- //xx
- if (aNbPaveBlocks==1) {
- bIsNewVertex1=myDS->IsNewShape (nV1);
- bIsNewVertex2=myDS->IsNewShape (nV2);
- if (!bIsNewVertex1 && !bIsNewVertex2) {
- aPB.SetEdge(i);
- continue;
- }
- }
- //xx
- BOPTools_Tools::MakeSplitEdge(aE, aV1, t1, aV2, t2, aESplit);
- //
- // Add Split Part of the Original Edge to the DS
- BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
-
- anASSeq.SetNewSuccessor(nV1);
- anASSeq.SetNewOrientation(aV1.Orientation());
-
- anASSeq.SetNewSuccessor(nV2);
- anASSeq.SetNewOrientation(aV2.Orientation());
- //
- if (anOri==TopAbs_INTERNAL) {
- anASSeq.SetNewAncestor(i);
- aESplit.Orientation(anOri);
- }
- //
- myDS->InsertShapeAndAncestorsSuccessors(aESplit, anASSeq);
- aNewShapeIndex=myDS->NumberOfInsertedShapes();
- myDS->SetState(aNewShapeIndex, BooleanOperations_UNKNOWN);
- //
- // Fill Split Set for the Original Edge
- aPB.SetEdge(aNewShapeIndex);
- //
- }
- }
- myIsDone=Standard_True;
-}
-//=======================================================================
-// function: UpdateCommonBlocks
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::UpdateCommonBlocks(const Standard_Integer)
-{
- Standard_Integer nE, aNbS, nEx, nEMax, j, aNbPoints, aNbLCB, nF;
- Standard_Real aTolEx, aTolExMax, aTSRMax[2], aTx[2], aTmp;
- TColStd_ListIteratorOfListOfInteger aItLI;
- gp_Pnt aPMax[2];
- TopoDS_Edge aEMax;
- BOPTools_ListIteratorOfListOfPaveBlock aItLPB, aItLPBS;
- NMTTools_ListIteratorOfListOfCommonBlock aItLCB;
- NMTTools_MapOfPaveBlock aMPB;
- //
- myIsDone=Standard_False;
- //
- aNbS=myDS->NumberOfShapesOfTheObject();
- for (nE=1; nE<=aNbS; ++nE) {
- if (myDS->GetShapeType(nE)!=TopAbs_EDGE){
- continue;
- }
- //
- const TopoDS_Edge& aE=*((TopoDS_Edge*)&myDS->Shape(nE));
- if (BRep_Tool::Degenerated(aE)){
- continue;
- }
- //
- NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE));
- //modified by NIZNHY-PKV Thu Jan 19 09:03:19 2012f
- aNbLCB=aLCB.Extent();
- if (!aNbLCB) {
- continue;
- }
- // 0
- NMTTools_ListOfCommonBlock aLCBx;
- //
- aItLCB.Initialize(aLCB);
- for (; aItLCB.More(); aItLCB.Next()) {
- NMTTools_CommonBlock aCBx;
- //
- NMTTools_CommonBlock& aCB=aItLCB.ChangeValue();
- const BOPTools_ListOfPaveBlock &aLPB=aCB.PaveBlocks();
- aItLPB.Initialize(aLPB);
- for (; aItLPB.More(); aItLPB.Next()) {
- const BOPTools_PaveBlock& aPBx=aItLPB.Value();
- nEx=aPBx.OriginalEdge();
- BOPTools_ListOfPaveBlock& aLPBS=mySplitShapesPool(myDS->RefEdge(nEx));
- aItLPBS.Initialize(aLPBS);
- for (; aItLPBS.More(); aItLPBS.Next()) {
- const BOPTools_PaveBlock& aPBSx=aItLPBS.Value();
- if (aPBSx.IsEqual(aPBx)) {
- aCBx.AddPaveBlock(aPBSx);
- break;
- }
- }// for (; aItLPBS.More(); aItLPBS.Next()) {
- }// for (; aItLPB.More(); aItLPB.Next()) {
- //
- const TColStd_ListOfInteger& aLI=aCB.Faces();
- aItLI.Initialize(aLI);
- for (; aItLI.More(); aItLI.Next()) {
- nF=aItLI.Value();
- aCBx.AddFace(nF);
- }
- //
- aLCBx.Append(aCBx);
- }//for (; aItLCB.More(); aItLCB.Next()) {
- //
- aLCB.Clear();
- //
- aItLCB.Initialize(aLCBx);
- for (; aItLCB.More(); aItLCB.Next()) {
- NMTTools_CommonBlock& aCBx=aItLCB.ChangeValue();
- aLCB.Append(aCBx);
- }
- //modified by NIZNHY-PKV Thu Jan 19 09:03:30 2012t
- // 1
- aItLCB.Initialize(aLCB);
- for (; aItLCB.More(); aItLCB.Next()) {
- NMTTools_CommonBlock& aCB=aItLCB.ChangeValue();
- //
- BOPTools_PaveBlock aPBMax;
- aTolExMax=-1.;
- const BOPTools_ListOfPaveBlock &aLPB=aCB.PaveBlocks();
- aItLPB.Initialize(aLPB);
- for (; aItLPB.More(); aItLPB.Next()) {
- const BOPTools_PaveBlock& aPBx=aItLPB.Value();
- nEx=aPBx.OriginalEdge();
- const TopoDS_Edge& aEx=*((TopoDS_Edge*)&myDS->Shape(nEx));
- aTolEx=BRep_Tool::Tolerance(aEx);
- if (aTolEx>aTolExMax) {
- aTolExMax=aTolEx;
- aEMax=aEx;
- aPBMax=aPBx;
- }
- }
- //
- // 2
- if (aMPB.Contains(aPBMax)) {
- continue;
- }
- aMPB.Add(aPBMax);
- //
- nEMax=aPBMax.OriginalEdge();
- const IntTools_ShrunkRange& aISRMax=aPBMax.ShrunkRange();
- const IntTools_Range& aSRMax=aISRMax.ShrunkRange();
- const Bnd_Box& aBoxMax=aISRMax.BndBox();
- aSRMax.Range(aTSRMax[0], aTSRMax[1]);
- for (j=0; j<2; ++j) {
- BOPTools_Tools::PointOnEdge(aEMax, aTSRMax[j], aPMax[j]);
- }
- //
- // 3
- aItLPB.Initialize(aLPB);
- for (; aItLPB.More(); aItLPB.Next()) {
- const BOPTools_PaveBlock& aPBx=aItLPB.Value();
- nEx=aPBx.OriginalEdge();
- if (nEx==nEMax) {
- continue;
- }
- //
- const TopoDS_Edge& aEx=*((TopoDS_Edge*)&myDS->Shape(nEx));
- GeomAPI_ProjectPointOnCurve& aPPCx=myContext->ProjPC(aEx);
- //
- for (j=0; j<2; ++j) {
- aPPCx.Perform(aPMax[j]);
- aNbPoints=aPPCx.NbPoints();
- if (!aNbPoints) {
- break;
- }
- aTx[j]=aPPCx.LowerDistanceParameter();
- }
- if (!aNbPoints) {
- // correction the range is impossible due to
- // a projection problem
- continue;
- }
- //
- if (aTx[0]>aTx[1]){
- aTmp=aTx[0];
- aTx[0]=aTx[1];
- aTx[1]=aTmp;
- }
- //
- // 4 Correction
- // 4.1 aPBx
- {
- const IntTools_ShrunkRange& aISRx=aPBx.ShrunkRange();
- IntTools_Range *pSRx=(IntTools_Range *)(&aISRx.ShrunkRange());
- Bnd_Box *pBoxx=(Bnd_Box *)(&aISRx.BndBox());
- //
- pSRx->SetFirst(aTx[0]);
- pSRx->SetLast(aTx[1]);
- *pBoxx=aBoxMax;
- }
- //
- // 4.2 aPBSx
- BOPTools_ListOfPaveBlock& aLPBSx=mySplitShapesPool(myDS->RefEdge(nEx));
- aItLPBS.Initialize(aLPBSx);
- for (; aItLPBS.More(); aItLPBS.Next()) {
- const BOPTools_PaveBlock& aPBSx=aItLPBS.Value();
- if (!aPBSx.IsEqual(aPBx)) {
- continue;
- }
- //
- const IntTools_ShrunkRange& aISRx=aPBSx.ShrunkRange();
- IntTools_Range *pSRx=(IntTools_Range *)(&aISRx.ShrunkRange());
- Bnd_Box *pBoxx=(Bnd_Box *)(&aISRx.BndBox());
- //
- pSRx->SetFirst(aTx[0]);
- pSRx->SetLast(aTx[1]);
- *pBoxx=aBoxMax;
- }
- //
- //
- }//for (; aItLPB.More(); aItLPB.Next()) {
- }//for (; aItLCB.More(); aItLCB.Next()) {
- }//for (nE=1; nE<=aNbS; ++nE) {
-}
-//=======================================================================
-// function: UpdateCommonBlocks
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::UpdateCommonBlocks()
-{
- myIsDone=Standard_False;
- //
- Standard_Integer nE, aNbS, nSp, nEx, nSpx;
- NMTTools_ListIteratorOfListOfCommonBlock aCBIt;
- BOPTools_ListIteratorOfListOfPaveBlock aPBIt;
- //
- aNbS=myDS->NumberOfShapesOfTheObject();
- //
- for (nE=1; nE<=aNbS; ++nE) {
- if (myDS->GetShapeType(nE)!=TopAbs_EDGE){
- continue;
- }
- if (BRep_Tool::Degenerated(TopoDS::Edge(myDS->Shape(nE)))){
- continue;
- }
- //
- NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE));
- /*BOPTools_ListOfPaveBlock& aLPB=*/mySplitShapesPool (myDS->RefEdge(nE));
- //
- aCBIt.Initialize(aLCB);
- for (; aCBIt.More(); aCBIt.Next()) {
- NMTTools_CommonBlock& aCB=aCBIt.ChangeValue();
- //
- // Among all PBs of aCB the first PB will be one
- // that have max tolerance value
- {
- Standard_Real aTolEx, aTolExMax;
- BOPTools_ListOfPaveBlock *pLPB, aLPBx;
- //
- aTolExMax=-1.;
- pLPB=(BOPTools_ListOfPaveBlock *)&aCB.PaveBlocks();
- aPBIt.Initialize(*pLPB);
- for (; aPBIt.More(); aPBIt.Next()) {
- const BOPTools_PaveBlock& aPBx=aPBIt.Value();
- nEx=aPBx.OriginalEdge();
- const TopoDS_Edge& aEx=TopoDS::Edge(myDS->Shape(nEx));
- aTolEx=BRep_Tool::Tolerance(aEx);
- if (aTolEx>aTolExMax) {
- aTolExMax=aTolEx;
- aLPBx.Prepend(aPBx);
- }
- else{
- aLPBx.Append(aPBx);
- }
- }
- //
- pLPB->Clear();
- *pLPB=aLPBx;
- }
- //
- BOPTools_PaveBlock& aPB=aCB.PaveBlock1(nE);
- nSp=SplitIndex(aPB);
- aPB.SetEdge(nSp);
- //
- const BOPTools_ListOfPaveBlock& aCBLPB=aCB.PaveBlocks();
- aPBIt.Initialize(aCBLPB);
- for (; aPBIt.More(); aPBIt.Next()) {
- BOPTools_PaveBlock& aPBx=aPBIt.Value();
- nEx=aPBx.OriginalEdge();
- if (nEx==nE) {
- continue;
- }
- //
- nSpx=SplitIndex(aPBx);
- aPBx.SetEdge(nSpx);
- }
- //
- }
- }
-}
-//=======================================================================
-// function: SplitIndex
-// purpose:
-//=======================================================================
-Standard_Integer NMTTools_PaveFiller::SplitIndex
- (const BOPTools_PaveBlock& aPBx) const
-{
- Standard_Integer anOriginalEdge, anEdgeIndex=0;
-
- anOriginalEdge=aPBx.OriginalEdge();
-
- const BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(anOriginalEdge));
- //
- BOPTools_ListIteratorOfListOfPaveBlock anIt(aLPB);
- for (; anIt.More(); anIt.Next()) {
- BOPTools_PaveBlock& aPB=anIt.Value();
- if (aPB.IsEqual(aPBx)) {
- anEdgeIndex=aPB.Edge();
- return anEdgeIndex;
- }
- }
- return anEdgeIndex;
-}
-
-//=======================================================================
-// function: UpdatePaveBlocks
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::UpdatePaveBlocks()
-{
- myIsDone=Standard_False;
- //
- Standard_Integer i, aNbFFs, nF1, nF2, aNbF, nF, iRankF, nE, nV1, nV2, aNbPB;
- Standard_Real aT1, aT2;
- TColStd_IndexedMapOfInteger aMF, aME;
- TopExp_Explorer aExp;
- TopoDS_Vertex aV1, aV2;
- TopoDS_Edge aE;
- BOPTools_Pave aPave1, aPave2;
- BOPTools_PaveBlock aPB;
- //
- BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences();
- //
- aNbFFs=aFFs.Extent();
- for (i=1; i<=aNbFFs; ++i) {
- BOPTools_SSInterference& aFFi=aFFs(i);
- aFFi.Indices(nF1, nF2);
- aMF.Add(nF1);
- aMF.Add(nF2);
- }
- //
- aNbF=aMF.Extent();
- for(i=1; i<=aNbF; ++i) {
- nF=aMF(i);
- iRankF=myDS->Rank(nF);
- const TopoDS_Shape aF=myDS->Shape(nF);//mpv
- aExp.Init(aF, TopAbs_EDGE);
- for(; aExp.More(); aExp.Next()) {
- aE=TopoDS::Edge(aExp.Current());
- //
- if (BRep_Tool::Degenerated(aE)) {
- continue;
- }
- //
- nE=myDS->ShapeIndex(aE, iRankF);
- //
- if (aME.Contains(nE)) {
- continue;
- }
- aME.Add(nE);
- //
- BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE));
- aNbPB=aLPB.Extent();
- if (aNbPB) {
- continue;
- }
- TopExp::Vertices(aE, aV1, aV2);
- //
- nV1=myDS->ShapeIndex(aV1, iRankF);
- aT1=BRep_Tool::Parameter(aV1, aE);
- aPave1.SetIndex(nV1);
- aPave1.SetParam(aT1);
- //
- nV2=myDS->ShapeIndex(aV2, iRankF);
- aT2=BRep_Tool::Parameter(aV2, aE);
- aPave2.SetIndex(nV2);
- aPave2.SetParam(aT2);
- //
- aPB.SetEdge(nE);
- aPB.SetOriginalEdge(nE);
- aPB.SetPave1(aPave1);
- aPB.SetPave2(aPave2);
- //
- aLPB.Append(aPB);
- }
- }
-}
-
-//=======================================================================
-// function: MakeAloneVertices
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::MakeAloneVertices()
-{
- Standard_Integer i, aNbFFs, nF1, nF2, j, aNbPnts, nFx, aNbV;
- Standard_Real aTolF1, aTolF2, aTolSum, aTolV;
- TColStd_ListIteratorOfListOfInteger aIt;
- TColStd_ListOfInteger aLI;
- TopoDS_Vertex aV;
- TopoDS_Compound aCompound;
- BRep_Builder aBB;
- TopTools_DataMapOfShapeListOfInteger aDMVFF, aDMVFF1;
- TopTools_DataMapIteratorOfDataMapOfShapeListOfInteger aItDMVFF;
- TopTools_DataMapOfShapeShape aDMVV;
- TopTools_DataMapOfIntegerShape aDMIV;
- TopTools_DataMapOfShapeInteger aDMVI;
- TopTools_DataMapIteratorOfDataMapOfShapeInteger aItDMVI;
- TopTools_DataMapIteratorOfDataMapOfIntegerShape aItDMIV;
- //
- aBB.MakeCompound(aCompound);
- //
- myAloneVertices.Clear();
- //
- BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences();
- //
- // 1. Collect alone vertices from FFs
- aNbV=0;
- aNbFFs=aFFs.Extent();
- for (i=1; i<=aNbFFs; ++i) {
- BOPTools_SSInterference& aFFi=aFFs(i);
- aFFi.Indices(nF1, nF2);
- //
- const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));//mpv
- const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));//mpv
- //
- aTolF1=BRep_Tool::Tolerance(aF1);
- aTolF2=BRep_Tool::Tolerance(aF2);
- aTolSum=aTolF1+aTolF2;
- //
- aLI.Clear();
- aLI.Append(nF1);
- aLI.Append(nF2);
- //
- const IntTools_SequenceOfPntOn2Faces& aSeqAlonePnts=aFFi.AlonePnts();
- aNbPnts=aSeqAlonePnts.Length();
- for (j=1; j<=aNbPnts; ++j) {
- const gp_Pnt& aP=aSeqAlonePnts(j).P1().Pnt();
- BOPTools_Tools::MakeNewVertex(aP, aTolSum, aV);
- aDMVFF.Bind(aV, aLI);
- aBB.Add(aCompound, aV);
- ++aNbV;
- }
- }
- if (!aNbV) {
- return;
- }
- //
- // 2. Try to fuse alone vertices themselves;
- FuseVertices(aCompound, aDMVV);
- //
- // if some are fused, replace them by new ones
- aItDMVFF.Initialize(aDMVFF);
- for (; aItDMVFF.More(); aItDMVFF.Next()) {
- const TopoDS_Shape& aVx=aItDMVFF.Key();
- const TColStd_ListOfInteger& aLIx=aItDMVFF.Value();
- //
- if (!aDMVV.IsBound(aVx)) {
- aDMVFF1.Bind(aVx, aLIx);
- }
- else {
- const TopoDS_Shape& aVy=aDMVV.Find(aVx);
-
- if (aDMVFF1.IsBound(aVy)) {
- TColStd_ListOfInteger& aLIy=aDMVFF1.ChangeFind(aVy);
- aIt.Initialize(aLIx);
- for(; aIt.More(); aIt.Next()) {
- nFx=aIt.Value();
- aLIy.Append(nFx);
- }
- }
- else {
- aDMVFF1.Bind(aVy, aLIx);
- }
- }
- }
- aDMVFF.Clear();
- //
- // refine lists of faces in aDMVFF1;
- aItDMVFF.Initialize(aDMVFF1);
- for (; aItDMVFF.More(); aItDMVFF.Next()) {
- TColStd_MapOfInteger aMIy;
- TColStd_ListOfInteger aLIy;
- //
- const TopoDS_Shape& aVx=aItDMVFF.Key();
- TColStd_ListOfInteger& aLIx=aDMVFF1.ChangeFind(aVx);
- aIt.Initialize(aLIx);
- for(; aIt.More(); aIt.Next()) {
- nFx=aIt.Value();
- if (aMIy.Add(nFx)) {
- aLIy.Append(nFx);
- }
- }
- aLIx.Clear();
- aLIx.Append(aLIy);
- }
- //==================================
- //
- // 3. Collect vertices from DS
- Standard_Integer aNbS, nV, nVSD, aNbVDS, i1, i2, aNbVSD;
- //
- aNbS=myDS->NumberOfShapesOfTheObject();
- // old shapes
- for (i=1; i<=aNbS; ++i) {
- const TopoDS_Shape& aS=myDS->Shape(i);
- if (aS.ShapeType() != TopAbs_VERTEX){
- continue;
- }
- //
- nVSD=FindSDVertex(i);
- nV=(nVSD) ? nVSD : i;
- const TopoDS_Shape& aVx=myDS->Shape(nV);
- if (!aDMVI.IsBound(aVx)) {
- aDMVI.Bind(aVx, nV);
- }
- }
- // new shapes
- i1=myDS->NumberOfSourceShapes()+1;
- i2=myDS->NumberOfInsertedShapes();
- for (i=i1; i<=i2; ++i) {
- const TopoDS_Shape aS=myDS->Shape(i);//mpv
- if (aS.ShapeType() != TopAbs_VERTEX){
- continue;
- }
- if (!aDMVI.IsBound(aS)) {
- aDMVI.Bind(aS, i);
- }
- }
- //
- // 4. Initialize BoundSortBox on aDMVI
- //
- Handle(Bnd_HArray1OfBox) aHAB;
- Bnd_BoundSortBox aBSB;
- //
- aNbVDS=aDMVI.Extent();
- aHAB=new Bnd_HArray1OfBox(1, aNbVDS);
- //
- aItDMVI.Initialize(aDMVI);
- for (i=1; aItDMVI.More(); aItDMVI.Next(), ++i) {
- Bnd_Box aBox;
- //
- nV=aItDMVI.Value();
- aV=TopoDS::Vertex(aItDMVI.Key());
- aTolV=BRep_Tool::Tolerance(aV);
- aBox.SetGap(aTolV);
- BRepBndLib::Add(aV, aBox);
- aHAB->SetValue(i, aBox);
- //
- aDMIV.Bind(i, aV);
- }
- aBSB.Initialize(aHAB);
- //
- // 5. Compare
- aItDMVFF.Initialize(aDMVFF1);
- for (; aItDMVFF.More(); aItDMVFF.Next()) {
- Bnd_Box aBoxV;
- //
- const TColStd_ListOfInteger& aLIFF=aItDMVFF.Value();
- aV=TopoDS::Vertex(aItDMVFF.Key());
- //
- aTolV=BRep_Tool::Tolerance(aV);
- aBoxV.SetGap(aTolV);
- BRepBndLib::Add(aV, aBoxV);
- //
- const TColStd_ListOfInteger& aLIVSD=aBSB.Compare(aBoxV);
- aNbVSD=aLIVSD.Extent();
- if (aNbVSD==0) {
- // add new vertex in DS and update map myAloneVertices
- BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
- //
- myDS->InsertShapeAndAncestorsSuccessors(aV, anASSeq);
- nV=myDS->NumberOfInsertedShapes();
- //
- aIt.Initialize(aLIFF);
- for (; aIt.More(); aIt.Next()) {
- nFx=aIt.Value();
- if (myAloneVertices.Contains(nFx)) {
- TColStd_IndexedMapOfInteger& aMVx=myAloneVertices.ChangeFromKey(nFx);
- aMVx.Add(nV);
- }
- else {
- TColStd_IndexedMapOfInteger aMVx;
- aMVx.Add(nV);
- myAloneVertices.Add(nFx, aMVx);
- }
- }
- }
- }
- // qqf
- {
- Standard_Integer aNbF, aNbAV, nF, k;
- NMTTools_IndexedDataMapOfIndexedMapOfInteger aMAVF;
- //
- aNbF=myAloneVertices.Extent();
- if (aNbF<2) {
- return;
- }
- //
- // 1. fill map Alone Vertex/Face -> aMAVF
- for (i=1; i<=aNbF; ++i) {
- nF=myAloneVertices.FindKey(i);
- const TColStd_IndexedMapOfInteger& aMAV=myAloneVertices(i);
- aNbAV=aMAV.Extent();
- for(j=1; j<=aNbAV; ++j) {
- nV=aMAV(j);
- if (aMAVF.Contains(nV)) {
- TColStd_IndexedMapOfInteger& aMF=aMAVF.ChangeFromKey(nV);
- aMF.Add(nF);
- }
- else{
- TColStd_IndexedMapOfInteger aMF;
- aMF.Add(nF);
- aMAVF.Add(nV, aMF);
- }
- }
- }
- //
- // 2 Obtain pairs of faces
- aNbAV=aMAVF.Extent();
- for (i=1; i<=aNbAV; ++i) {
- const TColStd_IndexedMapOfInteger& aMF=aMAVF(i);
- aNbF=aMF.Extent();
- for(j=1; j<aNbF; ++j) {
- nF1=aMF(j);
- for(k=j+1; k<=aNbF; ++k) {
- nF2=aMF(k);
- myIP->Add(nF1, nF2, Standard_True, NMTDS_TI_FF);
- }
- }
- }
- }
- // qqt
-}
-//=======================================================================
-// function: AloneVertices
-// purpose:
-//=======================================================================
-const NMTTools_IndexedDataMapOfIndexedMapOfInteger&
- NMTTools_PaveFiller::AloneVertices()const
-{
- return myAloneVertices;
-}
-//=======================================================================
-// function: FuseVertices
-// purpose:
-//=======================================================================
-void NMTTools_PaveFiller::FuseVertices
- (const TopoDS_Shape& aCompound,
- TopTools_DataMapOfShapeShape& aDMVV)const
-{
- Standard_Integer i, aNbVV, n1, n2, nX;
- NMTTools_PaveFiller tPF;
- //
- tPF.SetCompositeShape(aCompound);
- //
- tPF.Init();
- //
- tPF.PerformVV();
- //tPF.PerformNewVertices(); //qq
- //
- NMTDS_ShapesDataStructure& tDS=*(tPF.DS());
- NMTDS_InterfPool& tInterfPool=*(tPF.IP());
- BOPTools_CArray1OfVVInterference& aVVt=tInterfPool.VVInterferences();
- //
- aNbVV=aVVt.Extent();
- for (i=1; i<=aNbVV; ++i) {
- const BOPTools_VVInterference& aVV=aVVt(i);
- aVV.Indices(n1, n2);
- nX=aVV.NewShape();
- if (nX) {
- const TopoDS_Shape& aV1=tDS.Shape(n1);
- const TopoDS_Shape& aV2=tDS.Shape(n2);
- const TopoDS_Shape& aVx=tDS.Shape(nX);
- aDMVV.Bind(aV1, aVx);
- aDMVV.Bind(aV2, aVx);
- }
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_PaveFiller_8.cxx
-// Created: Fri Dec 19 11:15:53 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTTools_PaveFiller.hxx>
-
-#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_ListOfInteger.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-
-#include <TopTools_ListOfShape.hxx>
-
-#include <BooleanOperations_ShapesDataStructure.hxx>
-#include <BooleanOperations_OnceExplorer.hxx>
-
-#include <BOPTools_PaveBlock.hxx>
-#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-
-#include <NMTDS_ShapesDataStructure.hxx>
-
-#include <NMTTools_ListOfCommonBlock.hxx>
-#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-#include <NMTTools_CommonBlock.hxx>
-#include <NMTTools_CommonBlockAPI.hxx>
-
-
-// Modified to add new method Thu Sep 14 14:35:18 2006
-// Contribution of Samtech www.samcef.com BEGIN
-//=======================================================================
-// function: SharedEdges
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::SharedEdges(const Standard_Integer nF1,
- const Standard_Integer nF2,
- TColStd_ListOfInteger& aLNE,
- TopTools_ListOfShape& aLSE)
-{
- Standard_Integer nE1, nE2;
- TColStd_MapOfInteger aM1;
- //
- BooleanOperations_ShapesDataStructure *pDS=myDS;
- BooleanOperations_OnceExplorer aExp(*pDS);
- //
- aExp.Init(nF1, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- nE1=aExp.Current();
- aM1.Add(nE1);
- }
-
- aExp.Init(nF2, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- nE2=aExp.Current();
- if (aM1.Contains(nE2)) {
- aLNE.Append(nE2);
- const TopoDS_Shape& aE2=myDS->Shape(nE2);
- aLSE.Append(aE2);
- }
- }
-}
-// Contribution of Samtech www.samcef.com END
-//
-//=======================================================================
-// function: RealPaveBlock
-// purpose:
-//=======================================================================
- const BOPTools_PaveBlock& NMTTools_PaveFiller::RealPaveBlock
- (const BOPTools_PaveBlock& aPB,
- TColStd_ListOfInteger& aLB,
- Standard_Integer& aIsCommonBlock)
-{
- Standard_Integer nE, nSpx;
- BOPTools_ListIteratorOfListOfPaveBlock aItPBx;
- //
- aIsCommonBlock=0;
- aLB.Clear();
- nE=aPB.OriginalEdge();
- const NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE));
- NMTTools_CommonBlockAPI aCBAPI(aLCBE);
- if (aCBAPI.IsCommonBlock(aPB)) {
- NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB);
- //
- aIsCommonBlock=1;
- //
- const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks();
- aItPBx.Initialize(aLPBx);
- for (; aItPBx.More(); aItPBx.Next()) {
- const BOPTools_PaveBlock& aPBx=aItPBx.Value();
- nSpx=aPBx.Edge();
- aLB.Append(nSpx);
- }
- //
- const BOPTools_PaveBlock& aPBx=aCB.PaveBlock1();
- return aPBx;
- }
- return aPB;
-}
-//
-//=======================================================================
-// function: RealPaveBlock
-// purpose:
-//=======================================================================
- const BOPTools_PaveBlock& NMTTools_PaveFiller::RealPaveBlock(const BOPTools_PaveBlock& aPB)
-{
- Standard_Integer nE;
- //
- nE=aPB.OriginalEdge();
- const NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE));
- NMTTools_CommonBlockAPI aCBAPI(aLCBE);
- if (aCBAPI.IsCommonBlock(aPB)) {
- NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB);
- const BOPTools_PaveBlock& aPBx=aCB.PaveBlock1();
- return aPBx;
- }
- return aPB;
-}
-//=======================================================================
-// function: CommonBlocksFace
-// purpose:
-//=======================================================================
- Standard_Integer NMTTools_PaveFiller::CommonBlocksFace(const Standard_Integer nF,
- NMTTools_ListOfCommonBlock& aLCB)
-{
- Standard_Integer nE;
- TopAbs_ShapeEnum aT;
- NMTTools_ListIteratorOfListOfCommonBlock anIt;
- //
- aT=myDS->GetShapeType(nF);
- //
- if (aT!=TopAbs_FACE) {
- return 1; // Type mismatch
- }
- //
- BooleanOperations_ShapesDataStructure *pDS=myDS;
- BooleanOperations_OnceExplorer aExp(*pDS);
- //
- aExp.Init(nF, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- nE=aExp.Current();
- const NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE));
- anIt.Initialize(aLCBE);
- for (; anIt.More(); anIt.Next()) {
- const NMTTools_CommonBlock& aCBE=anIt.Value();
- aLCB.Append(aCBE);
- }
- }
- return 0; //Ok
-}
-//
-// 1 RealSplits
-//
-//
-//=======================================================================
-// function: RealSplitsFace
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::RealSplitsFace(const Standard_Integer nF,
- BOPTools_ListOfPaveBlock& aLPB)
-{
- Standard_Integer nE;
- BOPTools_ListIteratorOfListOfPaveBlock anIt;
- //
- BooleanOperations_ShapesDataStructure *pDS=myDS;
- BooleanOperations_OnceExplorer aExp(*pDS);
- //
- aExp.Init(nF, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- nE=aExp.Current();
- const BOPTools_ListOfPaveBlock& aLPBE=mySplitShapesPool(myDS->RefEdge(nE));
- anIt.Initialize(aLPBE);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPB=anIt.Value();
- const BOPTools_PaveBlock& aPBR=RealPaveBlock(aPB);
- aLPB.Append(aPBR);
- }
- }
-}
-//=======================================================================
-// function: HasRealSplitsInOnFace
-// purpose:
-//=======================================================================
- Standard_Boolean NMTTools_PaveFiller::HasRealSplitsInOnFace(const Standard_Integer nF1,
- const Standard_Integer nF2)
-{
- Standard_Boolean bFlag;
- BOPTools_ListOfPaveBlock aLPB;
- //
- RealSplitsInFace(0, nF1, nF2, aLPB);
- //
- bFlag=!aLPB.IsEmpty();
- if (bFlag) {
- return bFlag;
- }
- //
- RealSplitsInFace(0, nF1, nF2, aLPB);
- //
- bFlag=!aLPB.IsEmpty();
- return bFlag;
-}
-//=======================================================================
-// function: RealSplitsInFace
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::RealSplitsInFace(const Standard_Integer ,//for overriding
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLPB)
-{
- Standard_Integer nE1;
- //
- BooleanOperations_ShapesDataStructure *pDS=myDS;
- BooleanOperations_OnceExplorer aExp(*pDS);
- aExp.Init(nF1, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- nE1=aExp.Current();
- RealSplitsInFace (nE1, nF2, aLPB);
- }
-}
-//=======================================================================
-// function: RealSplitsInFace
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::RealSplitsInFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLPB)
-{
- Standard_Integer nF1;
- //
- TColStd_ListIteratorOfListOfInteger anItLFCB;
- NMTTools_ListIteratorOfListOfCommonBlock anItCB;
- //
- const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE1));
- //
- anItCB.Initialize(aLCB);
- for (; anItCB.More(); anItCB.Next()) {
- NMTTools_CommonBlock& aCB=anItCB.ChangeValue();
- const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1);
- const BOPTools_PaveBlock& aPB1R=RealPaveBlock(aPB1);
-
- const TColStd_ListOfInteger& aLFCB=aCB.Faces();
- anItLFCB.Initialize(aLFCB);
- for (; anItLFCB.More(); anItLFCB.Next()) {
- nF1=anItLFCB.Value();
- if (nF1==nF2) {
- aLPB.Append(aPB1R);
- }
- }
- }
-}
-//=======================================================================
-// function: RealSplitsOnEdge
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::RealSplitsOnEdge(const Standard_Integer nE1,
- const Standard_Integer nE2,
- BOPTools_ListOfPaveBlock& aLPB)
-{
- Standard_Integer nE;
- //
- BOPTools_ListIteratorOfListOfPaveBlock anIt;
- NMTTools_ListIteratorOfListOfCommonBlock anItCB;
- //
- const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE1));
-
- anItCB.Initialize(aLCB);
- for (; anItCB.More(); anItCB.Next()) {
- NMTTools_CommonBlock& aCB=anItCB.ChangeValue();
- const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1);
- const BOPTools_PaveBlock& aPB1R=RealPaveBlock(aPB1);
- //
- const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks();
- anIt.Initialize(aLPBx);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPB2=anIt.Value();
- nE=aPB2.OriginalEdge();
- if (nE==nE2) {
- aLPB.Append(aPB1R);
- }
- }
- }
-}
-//=======================================================================
-// function: RealSplitsOnFace
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::RealSplitsOnFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLPB)
-{
- Standard_Integer nE2;
- //
- BooleanOperations_ShapesDataStructure *pDS=myDS;
- BooleanOperations_OnceExplorer aExp(*pDS);
- aExp.Init(nF2, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- nE2=aExp.Current();
- RealSplitsOnEdge(nE1, nE2, aLPB);
- }
-}
-//=======================================================================
-// function: RealSplitsOnFace
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::RealSplitsOnFace(const Standard_Integer ,//for overriding
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLPB)
-{
- Standard_Integer nE1;
- //
-// BooleanOperations_ShapesDataStructure *pDS=myDS;
- BooleanOperations_OnceExplorer aExp(*myDS);
- aExp.Init(nF1, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- nE1=aExp.Current();
- RealSplitsOnFace(nE1, nF2, aLPB);
- }
-}
-
-// 2 SimpleSplits
-//=======================================================================
-// function: SplitsFace
-// purpose:
-//=======================================================================
- Standard_Integer NMTTools_PaveFiller::SplitsFace(const Standard_Integer nF,
- BOPTools_ListOfPaveBlock& aLPB)
-{
- Standard_Integer nE;
- TopAbs_ShapeEnum aT;
- BOPTools_ListIteratorOfListOfPaveBlock anIt;
- //
- aT=myDS->GetShapeType(nF);
- //
- if (aT!=TopAbs_FACE) {
- return 1; // Type mismatch
- }
- //
- BooleanOperations_ShapesDataStructure *pDS=myDS;
- BooleanOperations_OnceExplorer aExp(*pDS);
- //
- aExp.Init(nF, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- nE=aExp.Current();
- const BOPTools_ListOfPaveBlock& aLPBE=mySplitShapesPool(myDS->RefEdge(nE));
- anIt.Initialize(aLPBE);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPBE=anIt.Value();
- aLPB.Append(aPBE);
- }
- }
- return 0; //Ok
-}
-
-//=======================================================================
-// function: SplitsInFace
-// purpose: splits of edges from nF1 in nF2
-//=======================================================================
- Standard_Integer NMTTools_PaveFiller::SplitsInFace(const Standard_Integer ,//for overriding
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLPB)
-{
- Standard_Integer nE1;
- TopAbs_ShapeEnum aT1, aT2;
-
- aT1=myDS->GetShapeType(nF1);
- aT2=myDS->GetShapeType(nF2);
-
- if (aT1!=TopAbs_FACE || aT2!=TopAbs_FACE) {
- return 1; // Type mismatch
- }
- BooleanOperations_ShapesDataStructure *pDS=myDS;
- BooleanOperations_OnceExplorer aExp(*pDS);
- aExp.Init(nF1, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- nE1=aExp.Current();
- SplitsInFace (nE1, nF2, aLPB);
- }
- return 0; //Ok
-}
-//=======================================================================
-// function: SplitsInFace
-// purpose: splits of edge nE1 in aFace2
-//=======================================================================
- Standard_Integer NMTTools_PaveFiller::SplitsInFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLPB)
-{
- Standard_Integer nF1;
- TopAbs_ShapeEnum aT1, aT2;
-
- aT1=myDS->GetShapeType(nE1);
- aT2=myDS->GetShapeType(nF2);
-
- if (aT1!=TopAbs_EDGE || aT2!=TopAbs_FACE) {
- return 1; // Type mismatch
- }
- //
- TColStd_ListIteratorOfListOfInteger anItLFCB;
- NMTTools_ListIteratorOfListOfCommonBlock anItCB;
- //
- const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE1));
- //
- anItCB.Initialize(aLCB);
- for (; anItCB.More(); anItCB.Next()) {
- NMTTools_CommonBlock& aCB=anItCB.ChangeValue();
- const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1);
-
- const TColStd_ListOfInteger& aLFCB=aCB.Faces();
- anItLFCB.Initialize(aLFCB);
- for (; anItLFCB.More(); anItLFCB.Next()) {
- nF1=anItLFCB.Value();
- if (nF1==nF2) {
- aLPB.Append(aPB1);
- }
- }
- }
- return 0; //Ok
-}
-//=======================================================================
-// function: SplitsOnEdge
-// purpose: splits of edge nE1 on nE2
-//=======================================================================
- Standard_Integer NMTTools_PaveFiller::SplitsOnEdge(const Standard_Integer nE1,
- const Standard_Integer nE2,
- BOPTools_ListOfPaveBlock& aLPB)
-{
- Standard_Integer nE;
- TopAbs_ShapeEnum aT1, aT2;
-
- aT1=myDS->GetShapeType(nE1);
- aT2=myDS->GetShapeType(nE2);
-
- if (aT1!=TopAbs_EDGE || aT2!=TopAbs_EDGE) {
- return 1; // Type mismatch
- }
- //
- BOPTools_ListIteratorOfListOfPaveBlock anIt;
- NMTTools_ListIteratorOfListOfCommonBlock anItCB;
- //
- const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE1));
-
- anItCB.Initialize(aLCB);
- for (; anItCB.More(); anItCB.Next()) {
- NMTTools_CommonBlock& aCB=anItCB.ChangeValue();
- const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1);//XXX
- //
- const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks();
- anIt.Initialize(aLPBx);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPB2=anIt.Value();
- nE=aPB2.OriginalEdge();
- if (nE==nE2) {
- aLPB.Append(aPB1);
- }
- }
- }
- return 0; //Ok
-}
-//=======================================================================
-// function: SplitsOnFace
-// purpose: splits of edge nE1 on face nF2
-//=======================================================================
- Standard_Integer NMTTools_PaveFiller::SplitsOnFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLPB)
-{
- Standard_Integer nE2, ip;
- TopAbs_ShapeEnum aT1, aT2;
-
- aT1=myDS->GetShapeType(nE1);
- aT2=myDS->GetShapeType(nF2);
-
- if (aT1!=TopAbs_EDGE || aT2!=TopAbs_FACE) {
- return 1; // Type mismatch
- }
- BooleanOperations_ShapesDataStructure *pDS=myDS;
- BooleanOperations_OnceExplorer aExp(*pDS);
- aExp.Init(nF2, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- nE2=aExp.Current();
- ip=SplitsOnEdge(nE1, nE2, aLPB);
- if (ip) {
- return ip;
- }
- }
- return 0; //Ok
-}
-//=======================================================================
-// function: SplitsOnFace
-// purpose: splits of edges from face nF1 on face nF2
-//=======================================================================
- Standard_Integer NMTTools_PaveFiller::SplitsOnFace(const Standard_Integer ,//for overriding
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLPB)
-{
- Standard_Integer nE1, ip;
- TopAbs_ShapeEnum aT1, aT2;
-
- aT1=myDS->GetShapeType(nF1);
- aT2=myDS->GetShapeType(nF2);
-
- if (aT1!=TopAbs_FACE || aT2!=TopAbs_FACE) {
- return 1; // Type mismatch
- }
-// BooleanOperations_ShapesDataStructure *pDS=myDS;
- BooleanOperations_OnceExplorer aExp(*myDS);
- aExp.Init(nF1, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- nE1=aExp.Current();
- ip=SplitsOnFace(nE1, nF2, aLPB);
- if (ip) {
- return ip;
- }
- }
- return 0; //Ok
-}
-
-// 3 Simple Splits indices
-//=======================================================================
-// function: SplitsFace
-// purpose:
-//=======================================================================
- Standard_Integer NMTTools_PaveFiller::SplitsFace(const Standard_Integer nF,
- TColStd_ListOfInteger& aSplits)
-{
- Standard_Integer nE, iErr;
- BOPTools_ListIteratorOfListOfPaveBlock aIt;
- BOPTools_ListOfPaveBlock aLPB;
- //
- iErr=SplitsFace(nF, aLPB);
- if (iErr) {
- return iErr;
- }
-
- aIt.Initialize(aLPB);
- for (; aIt.More(); aIt.Next()) {
- const BOPTools_PaveBlock& aPB=aIt.Value();
- nE=aPB.Edge();
- aSplits.Append(nE);
- }
- return 0; //Ok
-}
-
-//=======================================================================
-// function: SplitsInFace
-// purpose: splits of edges from nF1 in nF2
-//=======================================================================
- Standard_Integer NMTTools_PaveFiller::SplitsInFace(const Standard_Integer ,//for overriding
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- TColStd_ListOfInteger& aSplits)
-{
- Standard_Integer nE, iErr;
- BOPTools_ListIteratorOfListOfPaveBlock aIt;
- BOPTools_ListOfPaveBlock aLPB;
- //
- iErr=SplitsInFace(0, nF1, nF2, aLPB);
- if (iErr) {
- return iErr;
- }
- aIt.Initialize(aLPB);
- for (; aIt.More(); aIt.Next()) {
- const BOPTools_PaveBlock& aPB=aIt.Value();
- nE=aPB.Edge();
- aSplits.Append(nE);
- }
- return iErr;
-}
-//=======================================================================
-// function: SplitsInFace
-// purpose: splits of edge nE1 in aFace2
-//=======================================================================
- Standard_Integer NMTTools_PaveFiller::SplitsInFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- TColStd_ListOfInteger& aSplits)
-{
- Standard_Integer nE, iErr;
- BOPTools_ListIteratorOfListOfPaveBlock aIt;
- BOPTools_ListOfPaveBlock aLPB;
- //
- iErr=SplitsInFace(nE1, nF2, aLPB);
- if (iErr) {
- return iErr;
- }
- aIt.Initialize(aLPB);
- for (; aIt.More(); aIt.Next()) {
- const BOPTools_PaveBlock& aPB=aIt.Value();
- nE=aPB.Edge();
- aSplits.Append(nE);
- }
- return iErr;
-}
-//=======================================================================
-// function: SplitsOnEdge
-// purpose: splits of edge nE1 on nE2
-//=======================================================================
- Standard_Integer NMTTools_PaveFiller::SplitsOnEdge(const Standard_Integer nE1,
- const Standard_Integer nE2,
- TColStd_ListOfInteger& aSplits)
-{
- Standard_Integer nE, iErr;
- BOPTools_ListIteratorOfListOfPaveBlock aIt;
- BOPTools_ListOfPaveBlock aLPB;
- //
- iErr=SplitsOnEdge(nE1, nE2, aLPB);
- if (iErr) {
- return iErr;
- }
- aIt.Initialize(aLPB);
- for (; aIt.More(); aIt.Next()) {
- const BOPTools_PaveBlock& aPB=aIt.Value();
- nE=aPB.Edge();
- aSplits.Append(nE);
- }
- return iErr;
-}
-//=======================================================================
-// function: SplitsOnFace
-// purpose: splits of edge nE1 on face nF2
-//=======================================================================
- Standard_Integer NMTTools_PaveFiller::SplitsOnFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- TColStd_ListOfInteger& aSplits)
-{
- Standard_Integer nE, iErr;
- BOPTools_ListIteratorOfListOfPaveBlock aIt;
- BOPTools_ListOfPaveBlock aLPB;
- //
- iErr=SplitsOnEdge(nE1, nF2, aLPB);
- if (iErr) {
- return iErr;
- }
- aIt.Initialize(aLPB);
- for (; aIt.More(); aIt.Next()) {
- const BOPTools_PaveBlock& aPB=aIt.Value();
- nE=aPB.Edge();
- aSplits.Append(nE);
- }
- return iErr;
-}
-//=======================================================================
-// function: SplitsOnFace
-// purpose: splits of edges from face nF1 on face nF2
-//=======================================================================
- Standard_Integer NMTTools_PaveFiller::SplitsOnFace(const Standard_Integer ,//for overriding
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- TColStd_ListOfInteger& aSplits)
-{
- Standard_Integer nE, iErr;
- BOPTools_ListIteratorOfListOfPaveBlock aIt;
- BOPTools_ListOfPaveBlock aLPB;
- //
- iErr=SplitsOnFace(0, nF1, nF2, aLPB);
- if (iErr) {
- return iErr;
- }
-
- aIt.Initialize(aLPB);
- for (; aIt.More(); aIt.Next()) {
- const BOPTools_PaveBlock& aPB=aIt.Value();
- nE=aPB.Edge();
- aSplits.Append(nE);
- }
- return 0; //Ok
-}
-//modified by NIZNHY-PKV Mon Oct 17 12:07:48 2011f
-static
- void SortPaveBlocks(BOPTools_ListOfPaveBlock &);
-static
- void SortShell(const Standard_Integer,
- BOPTools_PaveBlock *);
-static
- Standard_Boolean Less(const BOPTools_PaveBlock &,
- const BOPTools_PaveBlock &);
-
-//=======================================================================
-// function: RealSplitsInFace
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::RealSplitsInFace(const Standard_Integer nF,
- BOPTools_ListOfPaveBlock& aLPBIn)
-{
- Standard_Integer j, aNbCBP, nSpIn;
- TColStd_MapOfInteger aMFence;
- BOPTools_ListOfPaveBlock aLPB;
- BOPTools_ListIteratorOfListOfPaveBlock aItPB;
- NMTTools_ListIteratorOfListOfCommonBlock aItCB;
- //
- NMTTools_CommonBlockPool& aCBP=ChangeCommonBlockPool();
- //
- aNbCBP=aCBP.Extent();
- for (j=1; j<=aNbCBP; ++j) {
- NMTTools_ListOfCommonBlock& aLCB=aCBP(j);
- aItCB.Initialize(aLCB);
- for (; aItCB.More(); aItCB.Next()) {
- NMTTools_CommonBlock& aCB=aItCB.ChangeValue();
- if (aCB.IsPaveBlockOnFace(nF)) {
- const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1();
- nSpIn=aPB1.Edge();
- if (aMFence.Add(nSpIn)){
- aLPB.Append(aPB1);
- }
- }
- }
- }
- //
- SortPaveBlocks(aLPB);
- //
- aItPB.Initialize(aLPB);
- for (; aItPB.More(); aItPB.Next()) {
- const BOPTools_PaveBlock& aPB=aItPB.Value();
- aLPBIn.Append(aPB);
- }
-}
-//=======================================================================
-// function: SortPaveBlocks
-// purpose:
-//=======================================================================
-void SortPaveBlocks(BOPTools_ListOfPaveBlock &aLPBIn)
-{
- Standard_Integer i, aNbPBIn;
- BOPTools_ListIteratorOfListOfPaveBlock aItPB;
- BOPTools_PaveBlock *pPB;
- //
- aNbPBIn=aLPBIn.Extent();
- if (aNbPBIn<2) {
- return;
- }
- //
- pPB=new BOPTools_PaveBlock[aNbPBIn];
- //
- aItPB.Initialize(aLPBIn);
- for (i=0; aItPB.More(); aItPB.Next(), ++i) {
- const BOPTools_PaveBlock& aPB=aItPB.Value();
- pPB[i]=aPB;
- }
- //
- SortShell(aNbPBIn, pPB);
- //
- aLPBIn.Clear();
- for (i=0; i<aNbPBIn; ++i) {
- aLPBIn.Append(pPB[i]);
- }
- //
- delete [] (BOPTools_PaveBlock*)pPB;
-}
-//=======================================================================
-//function : SortShell
-//purpose :
-//=======================================================================
-void SortShell(const Standard_Integer n,
- BOPTools_PaveBlock *a)
-{
- Standard_Integer nd, i, j, l, d=1;
- BOPTools_PaveBlock x;
- //
- 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 (Less(a[l], a[j])) {
- //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)
-}
-
-//=======================================================================
-//function : Less
-//purpose :
-//=======================================================================
-Standard_Boolean Less(const BOPTools_PaveBlock &aPB1,
- const BOPTools_PaveBlock &aPB2)
-{
- Standard_Boolean bRet;
- Standard_Integer iE1, iE2;
- Standard_Real aT11, aT12, aT21, aT22;
- //
- iE1=aPB1.OriginalEdge();
- iE2=aPB2.OriginalEdge();
- if (iE1!=iE2) {
- bRet=(iE1<iE2);
- return bRet;
- }
- //
- aPB1.Parameters(aT11, aT12);
- aPB2.Parameters(aT21, aT22);
- bRet=(aT11<aT21);
- return bRet;
-}
-//modified by NIZNHY-PKV Mon Oct 17 11:44:45 2011t
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_PaveFiller_9.cxx
-// Created: Fri Dec 19 11:15:53 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTTools_PaveFiller.hxx>
-
-#include <Geom_Surface.hxx>
-
-#include <TopLoc_Location.hxx>
-#include <TopAbs_Orientation.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Wire.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Shape.hxx>
-
-#include <BRep_Builder.hxx>
-#include <BRep_Tool.hxx>
-
-#include <TopExp_Explorer.hxx>
-
-#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
-#include <BOPTools_ListOfPaveBlock.hxx>
-#include <BOPTools_PaveBlock.hxx>
-#include <BOPTools_Tools3D.hxx>
-
-#include <NMTDS_ShapesDataStructure.hxx>
-
-#include <NMTTools_CommonBlockAPI.hxx>
-#include <NMTTools_CommonBlock.hxx>
-
-
-//=======================================================================
-// function: PrepareFace
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::PrepareFace(const Standard_Integer nF,
- TopoDS_Face& newFace)
-{
- Standard_Boolean bToReverse, bIsDegenerated;
- Standard_Integer iRankF, nE, nSp, aNbPB;
- Standard_Real aTol;
- TopLoc_Location aLoc;
- TopoDS_Face aF;
- TopoDS_Wire newWire;
- TopoDS_Edge aSp;
- TopAbs_Orientation anOrF, anOrE;
- BRep_Builder aBB;
- TopExp_Explorer aExpW, aExpE;
- BOPTools_ListIteratorOfListOfPaveBlock aItPB;
- //
- iRankF=myDS->Rank(nF);
- aF=TopoDS::Face(myDS->Shape(nF));
- anOrF=aF.Orientation();
- aF.Orientation(TopAbs_FORWARD);
- //
- Handle(Geom_Surface) aS=BRep_Tool::Surface(aF, aLoc);
- aTol=BRep_Tool::Tolerance(aF);
- //
- aBB.MakeFace (newFace, aS, aLoc, aTol);
- //
- aExpW.Init(aF, TopAbs_WIRE);
- for (; aExpW.More(); aExpW.Next()) {
- const TopoDS_Shape& aW=aExpW.Current();
- aBB.MakeWire(newWire);
- //
- aExpE.Init(aW, TopAbs_EDGE);
- for (; aExpE.More(); aExpE.Next()) {
- const TopoDS_Edge& aE=TopoDS::Edge(aExpE.Current());
- bIsDegenerated=BRep_Tool::Degenerated(aE);
- anOrE=aE.Orientation();
- //
- nE=myDS->ShapeIndex(aE, iRankF);
- const BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE));
- aNbPB=aLPB.Extent();
- if (!aNbPB) {
- aBB.Add(newWire, aE);
- continue;
- }
- //
- aItPB.Initialize(aLPB);
- for (; aItPB.More(); aItPB.Next()) {
- const BOPTools_PaveBlock& aPB=aItPB.Value();
- const BOPTools_PaveBlock& aPBR=RealPaveBlock(aPB);
- nSp=aPBR.Edge();
- //
- aSp=TopoDS::Edge(myDS->Shape(nSp));
- if (!bIsDegenerated) {
- bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, myContext);
- if (bToReverse) {
- aSp.Reverse();
- }
- }
- else {
- aSp.Orientation(anOrE);
- }
- aBB.Add(newWire, aSp);
- }
- }
- aBB.Add(newFace, newWire);
- }
- newFace.Orientation(anOrF);
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_Tools.cxx
-// Created: Mon Dec 8 10:35:15 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-//
-#include <NMTTools_Tools.hxx>
-
-#include <TColStd_IndexedMapOfInteger.hxx>
-
-#include <gp_Pnt.hxx>
-#include <gp_XYZ.hxx>
-#include <gp_Pnt2d.hxx>
-
-#include <Geom_Surface.hxx>
-#include <GeomAPI_ProjectPointOnSurf.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Edge.hxx>
-
-#include <TopExp.hxx>
-
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-#include <BRepTools.hxx>
-
-#include <BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx>
-#include <BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx>
-
-#include <BOPTools_VVInterference.hxx>
-#include <BOPTools_SSInterference.hxx>
-
-#include <BOPTools_Tools2D.hxx>
-#include <BOPTools_Tools.hxx>
-#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
-#include <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#include <NMTTools_CoupleOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <Geom2d_Curve.hxx>
-#include <Geom_Curve.hxx>
-#include <Geom_TrimmedCurve.hxx>
-#include <BOPTools_Tools2D.hxx>
-#include <BRepLib.hxx>
-#include <BOPTools_Tools3D.hxx>
-#include <TopExp_Explorer.hxx>
-//
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
-#include <TopoDS_Iterator.hxx>
-
-static
- void ProcessBlock(const Standard_Integer iV,
- const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV,
- TColStd_IndexedMapOfInteger& aProcessed,
- TColStd_IndexedMapOfInteger& aChain);
-static
- void ProcessBlock(const TopoDS_Shape& aF,
- const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMCV,
- TopTools_IndexedMapOfShape& aProcessed,
- TopTools_IndexedMapOfShape& aChain);
-
-//modified by NIZNHY-PKV Thu Nov 16 10:46:53 2006f SKL/PartC5
-//=======================================================================
-// function: UpdateEdge
-// purpose:
-//=======================================================================
- void NMTTools_Tools::UpdateEdge(const TopoDS_Edge& aE,
- const Standard_Real aTolR)
-{
- Standard_Real aTolE, aTolES, aTolV;
- TopoDS_Iterator aIt;
- BRep_Builder aBB;
- //
- aTolE=BRep_Tool::Tolerance(aE);
- aTolES=Max(aTolR, aTolE);
- aBB.UpdateEdge(aE, aTolES);
- //
- aIt.Initialize(aE);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Vertex& aV=TopoDS::Vertex(aIt.Value());
- aTolV=BRep_Tool::Tolerance(aV);
- if (aTolV<aTolES) {
- aBB.UpdateVertex(aV, aTolES);
- }
- }
-}
-//=======================================================================
-// function: MakePCurve
-// purpose:
-//=======================================================================
- void NMTTools_Tools::MakePCurve(const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
- const Handle(Geom2d_Curve)& aC2Dx1)
-
-{
- Standard_Real aTolE, aT1, aT2, aOutFirst, aOutLast, aOutTol;
- Handle(Geom2d_Curve) aC2D, aC2DA;
- TopoDS_Face aFFWD;
- BRep_Builder aBB;
- //
- aFFWD=aF;
- aFFWD.Orientation(TopAbs_FORWARD);
- //
- aTolE=BRep_Tool::Tolerance(aE);
- //
- const Handle(Geom_Curve)& aC3DE=BRep_Tool::Curve(aE, aT1, aT2);
- Handle(Geom_TrimmedCurve)aC3DETrim=new Geom_TrimmedCurve(aC3DE, aT1, aT2);
- //
- aC2D=aC2Dx1;
- if (aC2D.IsNull()) { // ?
- BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aFFWD);
- BOPTools_Tools2D::CurveOnSurface(aE, aFFWD, aC2D, aOutFirst, aOutLast, aOutTol, Standard_True);
- }
- //
- if (aC3DE->IsPeriodic()) {
- BOPTools_Tools2D::AdjustPCurveOnFace(aFFWD, aT1, aT2, aC2D, aC2DA);
- }
- else {
- BOPTools_Tools2D::AdjustPCurveOnFace(aFFWD, aC3DETrim, aC2D, aC2DA);
- }
- //
- aBB.UpdateEdge(aE, aC2DA, aFFWD, aTolE);
- BRepLib::SameParameter(aE);
-}
-/*
-//=======================================================================
-// function: MakePCurve
-// purpose:
-//=======================================================================
- void NMTTools_Tools::MakePCurve(const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
- const Handle(Geom2d_Curve)& aC2Dx,
- const Standard_Real aTolR2D)
-{
- Standard_Integer k, aNbV;
- Standard_Real aTolEdge, aTolFact, aTolV, aTolVmax;
- Standard_Real aTFirst, aTLast, aOutFirst, aOutLast, aOutTol;
- TopoDS_Face aFFWD;
- TopTools_IndexedMapOfShape aVMap;
- BRep_Builder aBB;
- //
- aFFWD=aF;
- aFFWD.Orientation(TopAbs_FORWARD);
- //
- aTolEdge=BRep_Tool::Tolerance(aE);
- aTolFact=Max(aTolEdge, aTolR2D);
- //
- TopExp::MapShapes(aE, TopAbs_VERTEX, aVMap);
- //
- aTolVmax=-1.;
- aNbV=aVMap.Extent();
- for (k=1; k<=aNbV; ++k) {
- const TopoDS_Vertex& aV=TopoDS::Vertex(aVMap(k));
- aTolV=BRep_Tool::Tolerance(aV);
- if (aTolV>aTolVmax) {
- aTolVmax=aTolV;
- }
- }
- //
- if (aTolFact>aTolVmax) {
- aTolFact=aTolVmax;
- }
- //
- const Handle(Geom_Curve)& aC3DE=BRep_Tool::Curve(aE, aTFirst, aTLast);
- Handle(Geom_TrimmedCurve)aC3DETrim=new Geom_TrimmedCurve(aC3DE, aTFirst, aTLast);
- //
- Handle(Geom2d_Curve) aC2D, aC2DA;
- //
- aC2D=aC2Dx;
- if (aC2D.IsNull()) {
- BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aFFWD);
- BOPTools_Tools2D::CurveOnSurface(aE, aFFWD, aC2D, aOutFirst, aOutLast, aOutTol, Standard_True);
- }
- if (aC3DE->IsPeriodic()) {
- BOPTools_Tools2D::AdjustPCurveOnFace(aFFWD, aTFirst, aTLast, aC2D, aC2DA);
- }
- else {
- BOPTools_Tools2D::AdjustPCurveOnFace(aFFWD, aC3DETrim, aC2D, aC2DA);
- }
- //
- aBB.UpdateEdge(aE, aC2DA, aFFWD, aTolFact);
- BRepLib::SameParameter(aE);
-}
-*/
-//modified by NIZNHY-PKV Thu Nov 16 10:46:55 2006t
-//=======================================================================
-// function: IsSplitInOnFace
-// purpose:
-//=======================================================================
- Standard_Boolean NMTTools_Tools::IsSplitInOnFace(const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
- const Handle(IntTools_Context)& aContext)
-{
- Standard_Boolean bFlag;
- Standard_Real aT, aTolE, aTolF, aTol, aDist, aU, aV;
- gp_Pnt aP;
- gp_Pnt2d aP2D;
- //
- aTolE=BRep_Tool::Tolerance(aE);
- aTolF=BRep_Tool::Tolerance(aF);
- aTol=aTolE+aTolF;
- //
- GeomAPI_ProjectPointOnSurf& aProjector=aContext->ProjPS(aF);
- //
- aT=BOPTools_Tools2D::IntermediatePoint(aE);
- BOPTools_Tools::PointOnEdge(aE, aT, aP);
- //
- aProjector.Perform(aP);
- bFlag=aProjector.IsDone();
- if (!bFlag) {
- return bFlag;
- }
- //
- aDist=aProjector.LowerDistance();
- bFlag=(aDist <= aTol);
- if (!bFlag) {
- return bFlag;
- }
- //
- aProjector.LowerDistanceParameters(aU, aV);
- aP2D.SetCoord(aU, aV);
- bFlag=aContext->IsPointInOnFace (aF, aP2D);
- return bFlag;
-}
-//=======================================================================
-// function: NMTTools_Tools::MakeNewVertex
-// purpose :
-//=======================================================================
- void NMTTools_Tools::MakeNewVertex(const TopTools_ListOfShape& aLVs,
- TopoDS_Vertex& aNewVertex)
-{
- Standard_Integer aNb;
- Standard_Real aTi, aDi, aDmax=-1.e5;
- gp_Pnt aPi, aP;
- gp_XYZ aXYZ(0.,0.,0.), aXYZi;
- TopTools_ListIteratorOfListOfShape anIt;
- //
- aNb=aLVs.Extent();
- if (!aNb) {
- return;
- }
- //
- anIt.Initialize(aLVs);
- for (; anIt.More(); anIt.Next()) {
- TopoDS_Vertex aVi=TopoDS::Vertex(anIt.Value());
- aPi=BRep_Tool::Pnt(aVi);
- aXYZi=aPi.XYZ();
- aXYZ=aXYZ+aXYZi;
- }
- //
- aXYZ.Divide((Standard_Real)aNb);
- aP.SetXYZ(aXYZ);
- //
- anIt.Initialize(aLVs);
- for (; anIt.More(); anIt.Next()) {
- TopoDS_Vertex aVi=TopoDS::Vertex(anIt.Value());
- aPi=BRep_Tool::Pnt(aVi);
- aTi=BRep_Tool::Tolerance(aVi);
- aDi=aP.Distance(aPi);
- aDi=aDi+aTi;
- if (aDi > aDmax) {
- aDmax=aDi;
- }
- }
- BRep_Builder aBB;
- aBB.MakeVertex (aNewVertex, aP, aDmax);
-}
-//=======================================================================
-// function: FindChains
-// purpose :
-//=======================================================================
- void NMTTools_Tools::FindChains(const BOPTools_CArray1OfSSInterference& FFs,
- BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapChains)
-{
- Standard_Boolean bIsTangentFaces;
- Standard_Integer j, aNb, anIndex1, anIndex2;
- BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMCV;
- //
- aNb=FFs.Extent();
- for (j=1; j<=aNb; ++j) {
- const BOPTools_SSInterference& aFF=FFs(j);
- //
- bIsTangentFaces=aFF.IsTangentFaces();
- if (!bIsTangentFaces) {
- continue;
- }
- //
- aFF.Indices(anIndex1, anIndex2);
- //
- if (aMCV.Contains(anIndex1)) {
- TColStd_IndexedMapOfInteger& aMV=aMCV.ChangeFromKey(anIndex1);
- aMV.Add(anIndex1);
- aMV.Add(anIndex2);
- }
- else {
- TColStd_IndexedMapOfInteger aMV;
- aMV.Add(anIndex1);
- aMV.Add(anIndex2);
- aMCV.Add(anIndex1, aMV);
- }
- //
- if (aMCV.Contains(anIndex2)) {
- TColStd_IndexedMapOfInteger& aMV=aMCV.ChangeFromKey(anIndex2);
- aMV.Add(anIndex1);
- aMV.Add(anIndex2);
- }
- else {
- TColStd_IndexedMapOfInteger aMV;
- aMV.Add(anIndex1);
- aMV.Add(anIndex2);
- aMCV.Add(anIndex2, aMV);
- }
- }
- NMTTools_Tools::FindChains(aMCV, aMapChains);
-}
-//=======================================================================
-// function: FindChains
-// purpose :
-//=======================================================================
- void NMTTools_Tools::FindChains(const BOPTools_CArray1OfVVInterference& VVs,
- BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapChains)
-{
- Standard_Integer j, aNb, anIndex1, anIndex2;
- BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMCV;
- //
- aNb=VVs.Extent();
- for (j=1; j<=aNb; ++j) {
- const BOPTools_VVInterference& VV=VVs(j);
- VV.Indices(anIndex1, anIndex2);
- //
- if (aMCV.Contains(anIndex1)) {
- TColStd_IndexedMapOfInteger& aMV=aMCV.ChangeFromKey(anIndex1);
- aMV.Add(anIndex1);
- aMV.Add(anIndex2);
- }
- else {
- TColStd_IndexedMapOfInteger aMV;
- aMV.Add(anIndex1);
- aMV.Add(anIndex2);
- aMCV.Add(anIndex1, aMV);
- }
- //
- if (aMCV.Contains(anIndex2)) {
- TColStd_IndexedMapOfInteger& aMV=aMCV.ChangeFromKey(anIndex2);
- aMV.Add(anIndex1);
- aMV.Add(anIndex2);
- }
- else {
- TColStd_IndexedMapOfInteger aMV;
- aMV.Add(anIndex1);
- aMV.Add(anIndex2);
- aMCV.Add(anIndex2, aMV);
- }
- }
- NMTTools_Tools::FindChains(aMCV, aMapChains);
-}
-
-//=======================================================================
-// function: FindChains
-// purpose :
-//=======================================================================
- void NMTTools_Tools::FindChains(const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV,
- BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapChains)
-{
- Standard_Integer i, j, aNbCV, aNbV, iV, iVx;
- TColStd_IndexedMapOfInteger aProcessed, aChain;
- //
- aNbCV=aMCV.Extent();
- for (i=1; i<=aNbCV; ++i) {
- iV=aMCV.FindKey(i);
- if (aProcessed.Contains(iV)) {
- continue;
- }
- //
- aProcessed.Add(iV);
- aChain.Add(iV);
- //
- const TColStd_IndexedMapOfInteger& aMV=aMCV(i);
- aNbV=aMV.Extent();
- for (j=1; j<=aNbV; ++j) {
- iVx=aMV(j);
- ProcessBlock(iVx, aMCV, aProcessed, aChain);
- }
- aMapChains.Add(i, aChain);
- aChain.Clear();
- }
-}
-//=======================================================================
-// function: ProcessBlock
-// purpose:
-//=======================================================================
-void ProcessBlock(const Standard_Integer iV,
- const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV,
- TColStd_IndexedMapOfInteger& aProcessed,
- TColStd_IndexedMapOfInteger& aChain)
-{
- Standard_Integer j, aNbV, iVx;
- //
- if (aProcessed.Contains(iV)) {
- return;
- }
- aProcessed.Add(iV);
- aChain.Add(iV);
- //
- const TColStd_IndexedMapOfInteger& aMV=aMCV.FindFromKey(iV);
- aNbV=aMV.Extent();
- for (j=1; j<=aNbV; ++j) {
- iVx=aMV(j);
- ProcessBlock(iVx, aMCV, aProcessed, aChain);
- }
-}
-//=======================================================================
-// function: AreFacesSameDomain
-// purpose :
-//=======================================================================
- Standard_Boolean NMTTools_Tools::AreFacesSameDomain(const TopoDS_Face& aF1x,
- const TopoDS_Face& aF2y,
- const Handle(IntTools_Context)& aCtx)
-{
- Standard_Boolean bFlag;
- // Modified Thu Sep 14 14:35:18 2006
- // Contribution of Samtech www.samcef.com BEGIN
- Standard_Integer aNbE1, aNbE2;
- Standard_Real aTolF1, aTolF2, aTol;
- gp_Pnt2d aP2D;
- gp_Pnt aP;
- TopoDS_Face aF1, aF2;
- TopExp_Explorer aExp;
- TopTools_MapOfShape aME1, aME2;
- TopTools_MapIteratorOfMapOfShape aIt;
- //
- bFlag=Standard_False;
- // Contribution of Samtech www.samcef.com END
- //
- aF1=aF1x;
- aF1.Orientation(TopAbs_FORWARD);
- aF2=aF2y;
- aF2.Orientation(TopAbs_FORWARD);
- //
- // Modified Thu Sep 14 14:35:18 2006
- // Contribution of Samtech www.samcef.com BEGIN
- //
- // 1
- aExp.Init(aF1, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current());
- if (!BRep_Tool::Degenerated(aE)) {
- aME1.Add(aE);
- }
- }
- //
- aExp.Init(aF2, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current());
- if (!BRep_Tool::Degenerated(aE)) {
- if (!aME1.Contains(aE)) {
- return bFlag;
- }
- aME2.Add(aE);
- }
- }
- //
- // Contribution of Samtech www.samcef.com END
- //
- aNbE1=aME1.Extent();
- aNbE2=aME2.Extent();
- //
- if(!aNbE1 || !aNbE2){
- return bFlag;
- }
- //
- if(aNbE1!=aNbE2) {
- return bFlag;
- }
- //
- // 2
- aTolF1=BRep_Tool::Tolerance(aF1);
- aTolF2=BRep_Tool::Tolerance(aF2);
- aTol=aTolF1+aTolF2;
- //
- aIt.Initialize(aME1);
- for (; aIt.More(); aIt.Next()) {
- const TopoDS_Edge& aE=TopoDS::Edge(aIt.Key());
- BOPTools_Tools3D::PointNearEdge(aE, aF1, aP2D, aP);
- bFlag=aCtx->IsValidPointForFace(aP, aF2, aTol);
- break;
- }
- //
- return bFlag;
-}
-//=======================================================================
-// function: FindChains
-// purpose :
-//=======================================================================
- void NMTTools_Tools::FindChains(const NMTTools_ListOfCoupleOfShape& aLCS,
- NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMapChains)
-{
- NMTTools_ListIteratorOfListOfCoupleOfShape aItCS;
- NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMCV;
- //
- aItCS.Initialize(aLCS);
- for (; aItCS.More(); aItCS.Next()) {
- const NMTTools_CoupleOfShape& aCS=aItCS.Value();
- //
- const TopoDS_Shape& aF1=aCS.Shape1();
- const TopoDS_Shape& aF2=aCS.Shape2();
- //
- //
- if (aMCV.Contains(aF1)) {
- TopTools_IndexedMapOfShape& aMV=aMCV.ChangeFromKey(aF1);
- aMV.Add(aF1);
- aMV.Add(aF2);
- }
- else {
- TopTools_IndexedMapOfShape aMV;
- aMV.Add(aF1);
- aMV.Add(aF2);
- aMCV.Add(aF1, aMV);
- }
- //
- if (aMCV.Contains(aF2)) {
- TopTools_IndexedMapOfShape& aMV=aMCV.ChangeFromKey(aF2);
- aMV.Add(aF1);
- aMV.Add(aF2);
- }
- else {
- TopTools_IndexedMapOfShape aMV;
- aMV.Add(aF1);
- aMV.Add(aF2);
- aMCV.Add(aF2, aMV);
- }
- }
- NMTTools_Tools::FindChains(aMCV, aMapChains);
-}
-//=======================================================================
-// function: FindChains
-// purpose :
-//=======================================================================
- void NMTTools_Tools::FindChains(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMCV,
- NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMapChains)
-{
- Standard_Integer i, j, aNbCV, aNbV;
- TopTools_IndexedMapOfShape aProcessed, aChain;
- //
- aNbCV=aMCV.Extent();
- for (i=1; i<=aNbCV; ++i) {
- const TopoDS_Shape& aF=aMCV.FindKey(i);
- if (aProcessed.Contains(aF)) {
- continue;
- }
- //
- aProcessed.Add(aF);
- aChain.Add(aF);
- //
- const TopTools_IndexedMapOfShape& aMV=aMCV(i);
- aNbV=aMV.Extent();
- for (j=1; j<=aNbV; ++j) {
- const TopoDS_Shape& aFx=aMV(j);
- ProcessBlock(aFx, aMCV, aProcessed, aChain);
- }
- aMapChains.Add(aF, aChain);
- aChain.Clear();
- }
-}
-//=======================================================================
-// function: ProcessBlock
-// purpose:
-//=======================================================================
-void ProcessBlock(const TopoDS_Shape& aF,
- const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMCV,
- TopTools_IndexedMapOfShape& aProcessed,
- TopTools_IndexedMapOfShape& aChain)
-{
- Standard_Integer j, aNbV;
- //
- if (aProcessed.Contains(aF)) {
- return;
- }
- aProcessed.Add(aF);
- aChain.Add(aF);
- //
- const TopTools_IndexedMapOfShape& aMV=aMCV.FindFromKey(aF);
- aNbV=aMV.Extent();
- for (j=1; j<=aNbV; ++j) {
- const TopoDS_Shape& aFx=aMV(j);
- ProcessBlock(aFx, aMCV, aProcessed, aChain);
- }
-}
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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: NMTTools_Tools.hxx
-// Created: Mon Dec 8 10:35:15 2003
-// Author: Peter KURNEV
-// <pkv@irinox>
-
-#ifndef _NMTTools_Tools_HeaderFile
-#define _NMTTools_Tools_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Boolean.hxx>
-#include <Handle_IntTools_Context.hxx>
-#include <Handle_Geom2d_Curve.hxx>
-#include <Standard_Real.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <BOPTools_CArray1OfVVInterference.hxx>
-#include <BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx>
-#include <BOPTools_CArray1OfSSInterference.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Face.hxx>
-#include <IntTools_Context.hxx>
-#include <NMTTools_ListOfCoupleOfShape.hxx>
-#include <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
-#include <Geom2d_Curve.hxx>
-
-//=======================================================================
-//function : NMTTools_Tools
-//purpose :
-//=======================================================================
-class NMTTools_Tools {
- public:
- Standard_EXPORT
- static void MakeNewVertex(const TopTools_ListOfShape& aLV,
- TopoDS_Vertex& aNewVertex) ;
-
- Standard_EXPORT
- static void FindChains(const BOPTools_CArray1OfVVInterference& aVVs,
- BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
-
- Standard_EXPORT
- static void FindChains(const BOPTools_CArray1OfSSInterference& aVVs,
- BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
-
- Standard_EXPORT
- static void FindChains(const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV,
- BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
-
- Standard_EXPORT
- static Standard_Boolean IsSplitInOnFace(const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
- const Handle(IntTools_Context)& aCtx) ;
-
- Standard_EXPORT
- static Standard_Boolean AreFacesSameDomain(const TopoDS_Face& aF1,
- const TopoDS_Face& aF2,
- const Handle(IntTools_Context)& aCtx) ;
-
- Standard_EXPORT
- static void FindChains(const NMTTools_ListOfCoupleOfShape& aLCS,
- NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM) ;
-
- Standard_EXPORT
- static void FindChains(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM1,
- NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM2) ;
-
- Standard_EXPORT
- static void MakePCurve(const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
- const Handle(Geom2d_Curve)& aC2D) ;
-
- Standard_EXPORT
- static void UpdateEdge(const TopoDS_Edge& aE,
- const Standard_Real aTol) ;
-
-};
-#endif