Replace obsolete packages by new ones

This commit is contained in:
vsr 2012-04-26 15:59:16 +00:00
parent 3b5346b618
commit a67dc446eb
934 changed files with 7828 additions and 93326 deletions

View File

@ -318,19 +318,6 @@ echo
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
@ -460,7 +447,6 @@ AC_OUTPUT([ \
src/EntityGUI/Makefile \
src/GEOM/Makefile \
src/GEOMAlgo/Makefile \
src/GEOMAlgo_NEW/Makefile \
src/GEOMBase/Makefile \
src/GEOMClient/Makefile \
src/GEOMFiltersSelection/Makefile \
@ -480,9 +466,7 @@ AC_OUTPUT([ \
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 \

View File

@ -42,19 +42,19 @@ uses
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;

View File

@ -18,52 +18,71 @@
// Foundation, 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 <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 <ShapeFix_Wire.hxx>
#include <TopoDS_Wire.hxx>
#include <BRepTools_Modifier.hxx>
#include <Geom_SphericalSurface.hxx>
#include <Geom_ToroidalSurface.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 <ShapeFix.hxx>
#include <ShapeFix_Face.hxx>
#include <ShapeAnalysis.hxx>
#include <TColgp_SequenceOfPnt2d.hxx>
#include <ShapeAnalysis_Curve.hxx>
#include <TopoDS_Vertex.hxx>
#include <ShapeBuild_Edge.hxx>
#include <BlockFix_SphereSpaceModifier.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <BlockFix_PeriodicSurfaceModifier.hxx>
#include <TopoDS_Solid.hxx>
//=======================================================================
//function : FixResult
@ -79,26 +98,26 @@ static void FixResult(const TopoDS_Shape& result,
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();
@ -111,10 +130,10 @@ static void FixResult(const TopoDS_Shape& result,
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)) {
@ -129,8 +148,7 @@ static void FixResult(const TopoDS_Shape& result,
sewd->Remove(sewd->NbEdges());
}
}
if(isDone) {
TopoDS_Wire ResWire = sfw->Wire();
Context->Replace(ex_w.Current(), ResWire);
@ -143,24 +161,17 @@ static void FixResult(const TopoDS_Shape& result,
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);
@ -168,29 +179,146 @@ TopoDS_Shape BlockFix::RotateSphereSpace (const TopoDS_Shape& S,
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;
@ -199,17 +327,17 @@ TopoDS_Shape BlockFix::FixRanges (const TopoDS_Shape& S,
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;

View File

@ -26,6 +26,7 @@
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
class TopoDS_Shape;
class BlockFix_SphereSpaceModifier;
class BlockFix_UnionFaces;
@ -34,7 +35,6 @@ class BlockFix_BlockFixAPI;
class BlockFix_PeriodicSurfaceModifier;
class BlockFix_CheckTool;
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
@ -46,45 +46,26 @@ 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);
}
// 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;
@ -95,12 +76,6 @@ friend class BlockFix_CheckTool;
};
// other Inline functions and methods (like "C++: function call" methods)
//
#endif

View File

@ -22,6 +22,6 @@
#include <BlockFix.jxx>

View File

@ -26,43 +26,43 @@
--
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;

View File

@ -18,16 +18,21 @@
// Foundation, 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>
//=======================================================================
@ -52,12 +57,23 @@ void BlockFix_BlockFixAPI::Perform()
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);

View File

@ -50,21 +50,21 @@ class TopoDS_Shape;
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();
@ -80,7 +80,7 @@ public:
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;

View File

@ -27,7 +27,7 @@
#endif
BlockFix_BlockFixAPI::~BlockFix_BlockFixAPI() {}
Standard_EXPORT Handle_Standard_Type& BlockFix_BlockFixAPI_Type_()
@ -37,7 +37,7 @@ 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",
@ -53,7 +53,7 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_BlockFixAPI_Type_()
// 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;
@ -65,13 +65,13 @@ const Handle(BlockFix_BlockFixAPI) Handle(BlockFix_BlockFixAPI)::DownCast(const
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() {}

View File

@ -24,7 +24,7 @@
//=======================================================================
//function : SetShape
//purpose :
//purpose :
//=======================================================================
inline void BlockFix_BlockFixAPI::SetShape(const TopoDS_Shape& Shape)
@ -34,7 +34,7 @@ inline void BlockFix_BlockFixAPI::SetShape(const TopoDS_Shape& Shape)
//=======================================================================
//function : Shape
//purpose :
//purpose :
//=======================================================================
inline TopoDS_Shape BlockFix_BlockFixAPI::Shape() const
@ -44,7 +44,7 @@ inline TopoDS_Shape BlockFix_BlockFixAPI::Shape() const
//=======================================================================
//function : Context
//purpose :
//purpose :
//=======================================================================
inline Handle(ShapeBuild_ReShape)& BlockFix_BlockFixAPI::Context()
@ -54,7 +54,7 @@ inline Handle(ShapeBuild_ReShape)& BlockFix_BlockFixAPI::Context()
//=======================================================================
//function : Tolerance
//purpose :
//purpose :
//=======================================================================
inline Standard_Real& BlockFix_BlockFixAPI::Tolerance()
@ -64,7 +64,7 @@ inline Standard_Real& BlockFix_BlockFixAPI::Tolerance()
//=======================================================================
//function : OptimumNbFaces
//purpose :
//purpose :
//=======================================================================
inline Standard_Integer& BlockFix_BlockFixAPI::OptimumNbFaces()

View File

@ -27,7 +27,7 @@
class CheckTool from BlockFix
---Purpose:
uses
Shape from TopoDS,
@ -37,18 +37,18 @@ is
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
@ -63,5 +63,5 @@ fields
myNbUE : Integer;
myNbUFUE : Integer;
myBadRanges : Integer;
end CheckTool;

View File

@ -57,7 +57,7 @@ BlockFix_CheckTool::BlockFix_CheckTool( )
//=======================================================================
//function : SetShape
//purpose :
//purpose :
//=======================================================================
void BlockFix_CheckTool::SetShape(const TopoDS_Shape& aShape)
@ -70,10 +70,10 @@ void BlockFix_CheckTool::SetShape(const TopoDS_Shape& aShape)
//=======================================================================
//function : Perform
//purpose :
//purpose :
//=======================================================================
void BlockFix_CheckTool::Perform()
void BlockFix_CheckTool::Perform()
{
myNbSolids=0;
myNbBlocks=0;
@ -209,7 +209,7 @@ void BlockFix_CheckTool::Perform()
}
}
if (IsBlock)
if (IsBlock)
myNbBlocks++;
else {
if (MayBeUF) {
@ -232,7 +232,7 @@ void BlockFix_CheckTool::Perform()
//=======================================================================
//function : NbPossibleBlocks
//purpose :
//purpose :
//=======================================================================
Standard_Integer BlockFix_CheckTool::NbPossibleBlocks() const
@ -243,13 +243,13 @@ 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;
}
@ -257,7 +257,7 @@ TopoDS_Shape BlockFix_CheckTool::PossibleBlock(const Standard_Integer num) const
//=======================================================================
//function : DumpCheckResult
//purpose :
//purpose :
//=======================================================================
void BlockFix_CheckTool::DumpCheckResult(Standard_OStream& S) const

View File

@ -52,20 +52,20 @@ class BlockFix_CheckTool {
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() ;
@ -80,17 +80,17 @@ Standard_EXPORT void DumpCheckResult(Standard_OStream& S) const;
protected:
// Methods PROTECTED
//
//
// Fields PROTECTED
//
private:
private:
// Methods PRIVATE
//
//
// Fields PRIVATE

View File

@ -22,6 +22,6 @@
#include <BlockFix_CheckTool.jxx>

View File

@ -24,12 +24,12 @@
-- 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,
@ -42,9 +42,9 @@ uses
DataMapOfShapeInteger from TopTools
is
Create returns mutable PeriodicSurfaceModifier from BlockFix;
SetTolerance(me: mutable; Toler: Real);
---Purpose: Sets the tolerance for recognition of geometry
@ -61,7 +61,7 @@ is
-- 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;
@ -95,10 +95,10 @@ is
-- 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.
@ -120,14 +120,14 @@ is
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;

View File

@ -49,7 +49,7 @@ BlockFix_PeriodicSurfaceModifier::BlockFix_PeriodicSurfaceModifier ( )
//=======================================================================
//function : SetTolerance
//purpose :
//purpose :
//=======================================================================
void BlockFix_PeriodicSurfaceModifier::SetTolerance(const Standard_Real Tol)
@ -70,7 +70,7 @@ static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
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);
@ -84,7 +84,7 @@ static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
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;
@ -101,30 +101,30 @@ static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
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;
@ -136,13 +136,13 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewSurface(const TopoDS_Face&
//=======================================================================
//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;
}
@ -150,12 +150,12 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve(const TopoDS_Edge& /
//=======================================================================
//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;
}
@ -163,7 +163,7 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewPoint(const TopoDS_Vertex&
//=======================================================================
//function : NewCurve2d
//purpose :
//purpose :
//=======================================================================
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve2d(const TopoDS_Edge& E,
@ -171,47 +171,47 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve2d(const TopoDS_Edge&
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;
}
@ -222,13 +222,13 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve2d(const TopoDS_Edge&
//=======================================================================
//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;
}
@ -236,7 +236,7 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewParameter(const TopoDS_Ver
//=======================================================================
//function : Continuity
//purpose :
//purpose :
//=======================================================================
GeomAbs_Shape BlockFix_PeriodicSurfaceModifier::Continuity(const TopoDS_Edge& E,
@ -244,7 +244,7 @@ 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);
}

View File

@ -71,20 +71,20 @@ class BlockFix_PeriodicSurfaceModifier : public 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);
}
// 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) ;
@ -107,17 +107,17 @@ Standard_EXPORT ~BlockFix_PeriodicSurfaceModifier();
protected:
// Methods PROTECTED
//
//
// Fields PROTECTED
//
private:
private:
// Methods PRIVATE
//
//
// Fields PRIVATE

View File

@ -27,7 +27,7 @@
#endif
BlockFix_PeriodicSurfaceModifier::~BlockFix_PeriodicSurfaceModifier() {}
Standard_EXPORT Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_()
@ -39,7 +39,7 @@ 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",
@ -55,7 +55,7 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_()
// 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;
@ -67,13 +67,13 @@ const Handle(BlockFix_PeriodicSurfaceModifier) Handle(BlockFix_PeriodicSurfaceMo
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() {}

View File

@ -24,13 +24,13 @@
-- 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,
@ -43,9 +43,9 @@ uses
DataMapOfShapeInteger from TopTools
is
Create returns mutable SphereSpaceModifier from BlockFix;
SetTolerance(me: mutable; Toler: Real);
---Purpose: Sets the tolerance for recognition of geometry
@ -62,7 +62,7 @@ is
-- 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;
@ -96,10 +96,10 @@ is
-- 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.
@ -121,15 +121,15 @@ is
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;

View File

@ -44,7 +44,7 @@
//=======================================================================
//function : BlockFix_SphereSpaceModifier
//purpose :
//purpose :
//=======================================================================
BlockFix_SphereSpaceModifier::BlockFix_SphereSpaceModifier()
@ -55,7 +55,7 @@ BlockFix_SphereSpaceModifier::BlockFix_SphereSpaceModifier()
//=======================================================================
//function : SetTolerance
//purpose :
//purpose :
//=======================================================================
void BlockFix_SphereSpaceModifier::SetTolerance(const Standard_Real Tol)
@ -66,7 +66,7 @@ void BlockFix_SphereSpaceModifier::SetTolerance(const Standard_Real Tol)
//=======================================================================
//function : NewSurface
//purpose :
//purpose :
//=======================================================================
@ -76,11 +76,11 @@ static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
{
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);
@ -119,109 +119,109 @@ static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
}
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)
@ -240,11 +240,11 @@ Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve2d(const TopoDS_Edge& E,c
//=======================================================================
//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;
}
@ -252,12 +252,12 @@ Standard_Boolean BlockFix_SphereSpaceModifier::NewParameter(const TopoDS_Vertex&
//=======================================================================
//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);
}

View File

@ -71,20 +71,20 @@ class BlockFix_SphereSpaceModifier : public 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);
}
// 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) ;
@ -108,17 +108,17 @@ Standard_EXPORT ~BlockFix_SphereSpaceModifier();
protected:
// Methods PROTECTED
//
//
// Fields PROTECTED
//
private:
private:
// Methods PRIVATE
//
//
// Fields PRIVATE

View File

@ -27,7 +27,7 @@
#endif
BlockFix_SphereSpaceModifier::~BlockFix_SphereSpaceModifier() {}
Standard_EXPORT Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_()
@ -39,7 +39,7 @@ 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",
@ -55,7 +55,7 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_()
// 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;
@ -67,13 +67,13 @@ const Handle(BlockFix_SphereSpaceModifier) Handle(BlockFix_SphereSpaceModifier):
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() {}

View File

@ -26,24 +26,24 @@
--
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;

View File

@ -18,7 +18,6 @@
// Foundation, 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
@ -26,30 +25,31 @@
#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>
@ -58,17 +58,206 @@
#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
@ -142,9 +331,9 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
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
@ -252,6 +441,8 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
}
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++) {
@ -265,6 +456,7 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
B.MakeEdge (E,bc,Precision::Confusion());
B.Add (E,VF);
B.Add (E,VL);
*/
aChain.SetValue(1,E);
}
else {
@ -277,12 +469,10 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
return Standard_True;
}
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
TopoDS_Shape BlockFix_UnionEdges::Perform(const TopoDS_Shape& Shape,
const Standard_Real Tol)
{

View File

@ -44,20 +44,20 @@ class BlockFix_UnionEdges {
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) ;
@ -68,17 +68,17 @@ Standard_EXPORT TopoDS_Shape Perform(const TopoDS_Shape& Shape,const Standard_
protected:
// Methods PROTECTED
//
//
// Fields PROTECTED
//
private:
private:
// Methods PRIVATE
//
//
// Fields PRIVATE

View File

@ -22,6 +22,6 @@
#include <BlockFix_UnionEdges.jxx>

View File

@ -35,31 +35,31 @@ is
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;
end;

View File

@ -42,21 +42,21 @@ class TopoDS_Face;
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();
@ -80,7 +80,7 @@ public:
Standard_EXPORT virtual void MovePCurves(TopoDS_Face& aTarget,
const TopoDS_Face& aSource) const;
private:
private:
// Fields PRIVATE
//
Standard_Real myTolerance;

View File

@ -22,6 +22,6 @@
#include <BlockFix_UnionFaces.jxx>

View File

@ -23,241 +23,320 @@
-- 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
--
-- 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 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;
TopoDS,
TopTools,
IntTools,
BOPTools,
BOP,
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;
--
--class FinderShapeOn1;
class StateCollector;
TColStd,
BOPTColStd,
BRepAlgo,
NMTDS,
NMTTools
class ClsfSolid;
-- class FinderShapeOn2;
-- class PassKeyShapeMapHasher;
is
-- Enumerations
imported State from GEOMAlgo;
imported KindOfShape from GEOMAlgo;
imported KindOfName from GEOMAlgo;
imported KindOfBounds from GEOMAlgo;
imported KindOfClosed from GEOMAlgo;
--
-- 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);
-- 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);
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;
--
-- 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;
--
--

View File

@ -1,247 +0,0 @@
# 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

View File

@ -1,64 +0,0 @@
-- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
--
-- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, 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;

View File

@ -25,11 +25,11 @@
// Author: Peter KURNEV
// <peter@PREFEX>
//
#include <GEOMAlgo_Algo.ixx>
#include <GEOMAlgo_Algo.hxx>
//=======================================================================
// function:
// purpose:
// function:
// purpose:
//=======================================================================
GEOMAlgo_Algo::GEOMAlgo_Algo()
:
@ -39,14 +39,14 @@
{}
//=======================================================================
// function: ~
// purpose:
// purpose:
//=======================================================================
GEOMAlgo_Algo::~GEOMAlgo_Algo()
{
}
//=======================================================================
// function: CheckData
// purpose:
// purpose:
//=======================================================================
void GEOMAlgo_Algo::CheckData()
{
@ -54,7 +54,7 @@
}
//=======================================================================
// function: CheckResult
// purpose:
// purpose:
//=======================================================================
void GEOMAlgo_Algo::CheckResult()
{
@ -62,7 +62,7 @@
}
//=======================================================================
// function: ErrorStatus
// purpose:
// purpose:
//=======================================================================
Standard_Integer GEOMAlgo_Algo::ErrorStatus()const
{
@ -70,7 +70,7 @@
}
//=======================================================================
// function: WarningStatus
// purpose:
// purpose:
//=======================================================================
Standard_Integer GEOMAlgo_Algo::WarningStatus()const
{
@ -82,7 +82,7 @@
//=======================================================================
//function : ComputeInternalShapes
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_Algo::ComputeInternalShapes(const Standard_Boolean theFlag)
{

View File

@ -20,96 +20,56 @@
// 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
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
//=======================================================================
//class : GEOMAlgo_Algo
//purpose :
//=======================================================================
class GEOMAlgo_Algo
{
public:
Standard_EXPORT
virtual void Perform() = 0;
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;
Standard_EXPORT void ComputeInternalShapes(const Standard_Boolean theFlag);
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 GEOMAlgo_Algo();
Standard_EXPORT virtual ~GEOMAlgo_Algo();
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 ~GEOMAlgo_Algo();
Standard_EXPORT
virtual void CheckData() ;
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

View File

@ -1,27 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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>

View File

@ -1,25 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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

View File

@ -1,255 +0,0 @@
-- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
--
-- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, 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;

View File

@ -20,10 +20,10 @@
// 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>
@ -44,8 +44,8 @@
#include <GEOMAlgo_Tools.hxx>
//=======================================================================
//function :
//purpose :
//function :
//purpose :
//=======================================================================
GEOMAlgo_Builder::GEOMAlgo_Builder()
:
@ -57,7 +57,7 @@
}
//=======================================================================
//function : ~
//purpose :
//purpose :
//=======================================================================
GEOMAlgo_Builder::~GEOMAlgo_Builder()
{
@ -70,7 +70,7 @@
}
//=======================================================================
//function : AddCompound
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_Builder::AddCompound(const TopoDS_Shape& theShape)
{
@ -84,7 +84,7 @@
}
//=======================================================================
//function : AddShape
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_Builder::AddShape(const TopoDS_Shape& theShape)
{
@ -94,7 +94,7 @@
}
//=======================================================================
//function : Shapes
//purpose :
//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_Builder::Shapes()const
{
@ -102,7 +102,7 @@
}
//=======================================================================
//function : Clear
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_Builder::Clear()
{
@ -111,7 +111,7 @@
}
//=======================================================================
//function : ClearInternals
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_Builder::ClearInternals()
{
@ -130,7 +130,7 @@
}
//=======================================================================
//function : Prepare
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_Builder::Prepare()
{
@ -161,7 +161,7 @@
//=======================================================================
//function : AddShape1
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_Builder::AddShape1(const TopoDS_Shape& theShape)
{
@ -186,7 +186,7 @@
}
//=======================================================================
//function : BuildResult
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_Builder::BuildResult(const TopAbs_ShapeEnum theType)
{
@ -222,7 +222,7 @@
}
//=======================================================================
//function : Perform
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_Builder::Perform()
{
@ -250,7 +250,7 @@
}
//=======================================================================
//function : PerformWithFiller
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_Builder::PerformWithFiller(const NMTTools_PaveFiller& theDSF)
{
@ -260,7 +260,7 @@
}
//=======================================================================
//function : PerformInternal
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_Builder::PerformInternal(const NMTTools_PaveFiller& pPF)
{
@ -303,7 +303,7 @@
if (myErrorStatus) {
return;
}
BuildResult(TopAbs_EDGE);
if (myErrorStatus) {
return;
@ -313,29 +313,29 @@
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;
@ -345,7 +345,7 @@
if (myErrorStatus) {
return;
}
BuildResult(TopAbs_SOLID);
if (myErrorStatus) {
return;
@ -355,7 +355,7 @@
if (myErrorStatus) {
return;
}
BuildResult(TopAbs_COMPSOLID);
if (myErrorStatus) {
return;
@ -365,7 +365,7 @@
if (myErrorStatus) {
return;
}
BuildResult(TopAbs_COMPOUND);
if (myErrorStatus) {
return;
@ -374,16 +374,16 @@
// 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()
{
@ -400,14 +400,14 @@
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

View File

@ -19,235 +19,206 @@
//
// 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 <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 <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
#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();
class GEOMAlgo_Builder : public GEOMAlgo_BuilderShape {
Standard_EXPORT
virtual ~GEOMAlgo_Builder();
public:
//! Performs calculations <br>
Standard_EXPORT
virtual void Perform() ;
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
//
//! Performs calculations using prepared PaveFiller <br>
//! object theDSF <br>
Standard_EXPORT
virtual void PerformWithFiller(const NMTTools_PaveFiller& theDSF) ;
//! Empty constructor <br>
Standard_EXPORT GEOMAlgo_Builder();
Standard_EXPORT virtual ~GEOMAlgo_Builder();
//! Adds argument theShape of the operation <br>
Standard_EXPORT
virtual void AddShape(const TopoDS_Shape& theShape) ;
//! Performs calculations <br>
Standard_EXPORT virtual void Perform() ;
//! Clears internal fields and arguments <br>
Standard_EXPORT
virtual void Clear() ;
//! Performs calculations using prepared PaveFiller <br>
//! object theDSF <br>
Standard_EXPORT virtual void PerformWithFiller(const NMTTools_PaveFiller& theDSF) ;
//! Returns the arguments of the operation <br>
Standard_EXPORT
const TopTools_ListOfShape& Shapes() const;
//! Adds argument theShape of the operation <br>
Standard_EXPORT virtual void AddShape(const TopoDS_Shape& theShape) ;
//! Returns the list of shapes generated from the <br>
//! shape theS. <br>
Standard_EXPORT
virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
//! Clears internal fields and arguments <br>
Standard_EXPORT virtual void Clear() ;
//! Returns the list of shapes modified from the shape <br>
//! theS. <br>
Standard_EXPORT
virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
//! 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;
//! 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) ;
// Methods PROTECTED
//
//! Prepare information for history support <br>
Standard_EXPORT
virtual void PrepareHistory() ;
//! Performs calculations using prepared DSFiller <br>
//! object theDSF <br>
Standard_EXPORT virtual void PerformInternal(const NMTTools_PaveFiller& theDSF) ;
//! Clears internal fields <br>
Standard_EXPORT
virtual void ClearInternals() ;
//! Prepare information for history support <br>
Standard_EXPORT virtual void PrepareHistory() ;
//! Provides preparing actions <br>
Standard_EXPORT
virtual void Prepare() ;
//! Clears internal fields <br>
Standard_EXPORT virtual void ClearInternals() ;
//! Provides post-tratment actions <br>
Standard_EXPORT
virtual void PostTreat() ;
//! Provides preparing actions <br>
Standard_EXPORT virtual void Prepare() ;
//! Append the argument theShape to <br>
//! typified lists of arguments myShapes1 <br>
Standard_EXPORT
void AddShape1(const TopoDS_Shape& theShape) ;
//! Provides post-tratment actions <br>
Standard_EXPORT virtual void PostTreat() ;
//! Build the resulting shapes of type theType <br>
Standard_EXPORT
virtual void BuildResult(const TopAbs_ShapeEnum theType) ;
//! Append the argument theShape to <br>
//! typified lists of arguments myShapes1 <br>
Standard_EXPORT void AddShape1(const TopoDS_Shape& theShape) ;
//! Fill Images for vertices <br>
Standard_EXPORT
void FillImagesVertices() ;
//! Build the resulting shapes of type theType <br>
Standard_EXPORT virtual void BuildResult(const TopAbs_ShapeEnum theType) ;
//! Fill Images for edges <br>
Standard_EXPORT
void FillImagesEdges() ;
//! Fill Images for vertices <br>
Standard_EXPORT void FillImagesVertices() ;
//! Fill Images for faces <br>
Standard_EXPORT
void FillImagesFaces() ;
//! Fill Images for edges <br>
Standard_EXPORT void FillImagesEdges() ;
//! For each interferred face find split edges <br>
//! that are in 2-D domain of the face <br>
Standard_EXPORT
void FillIn2DParts() ;
//! Fill Images for faces <br>
Standard_EXPORT void FillImagesFaces() ;
//! Build draft faces <br>
Standard_EXPORT
void BuildSplitFaces() ;
//! For each interferred face find split edges <br>
//! that are in 2-D domain of the face <br>
Standard_EXPORT void FillIn2DParts() ;
//! Among draft faces find same domain faces <br>
Standard_EXPORT
void FillSameDomainFaces() ;
//! Build draft faces <br>
Standard_EXPORT void BuildSplitFaces() ;
//! Fill Images for faces <br>
//! taking into account same domain faces <br>
Standard_EXPORT
void FillImagesFaces1() ;
//! Among draft faces find same domain faces <br>
Standard_EXPORT void FillSameDomainFaces() ;
//! Update Images for faces by <br>
//! internal vertices <br>
Standard_EXPORT
void FillInternalVertices() ;
//! Fill Images for faces <br>
//! taking into account same domain faces <br>
Standard_EXPORT void FillImagesFaces1() ;
//! Fill Images for Wires, Shells, Compsolids, Compounds <br>
Standard_EXPORT
void FillImagesContainers(const TopAbs_ShapeEnum theType) ;
//! Update Images for faces by <br>
//! internal vertices <br>
Standard_EXPORT void FillInternalVertices() ;
//! Fill Images for solids <br>
Standard_EXPORT
void FillImagesSolids() ;
//! Fill Images for Wires, Shells, Compsolids, Compounds <br>
Standard_EXPORT void FillImagesContainers(const TopAbs_ShapeEnum theType) ;
//! For each interferred solid find split faces <br>
//! that are in 3-D domain of the solid <br>
Standard_EXPORT
void FillIn3DParts() ;
//! Fill Images for solids <br>
Standard_EXPORT void FillImagesSolids() ;
//! Build draft solids <br>
Standard_EXPORT
void BuildSplitSolids() ;
//! For each interferred solid find split faces <br>
//! that are in 3-D domain of the solid <br>
Standard_EXPORT void FillIn3DParts() ;
//! Update draft solids by <br>
//! internal shells, edges, vertices <br>
Standard_EXPORT
void FillInternalShapes() ;
//! 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) ;
//! 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
//
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

View File

@ -1,27 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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>

View File

@ -1,37 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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

View File

@ -1,108 +0,0 @@
-- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
--
-- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, 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;

View File

@ -21,16 +21,13 @@
//
// 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>
//=======================================================================
@ -38,11 +35,9 @@
//purpose :
//=======================================================================
GEOMAlgo_BuilderArea::GEOMAlgo_BuilderArea()
: GEOMAlgo_Algo()
:
GEOMAlgo_Algo()
{
#if OCC_VERSION_LARGE <= 0x06050200
myContext=NULL;
#endif
}
//=======================================================================
//function : ~
@ -55,20 +50,10 @@ GEOMAlgo_BuilderArea::~GEOMAlgo_BuilderArea()
//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 :
@ -87,8 +72,6 @@ void GEOMAlgo_BuilderArea::Perform()
myContext=new IntTools_Context;
}
}
#endif
//=======================================================================
//function : SetShapes
//purpose :
@ -156,3 +139,4 @@ void GEOMAlgo_BuilderArea::PerformAreas()
void GEOMAlgo_BuilderArea::PerformInternalShapes()
{
}

View File

@ -20,127 +20,93 @@
// 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 <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 <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 : public GEOMAlgo_Algo {
//=======================================================================
//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) ;
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
#if OCC_VERSION_LARGE > 0x06050200
//! Returns cashed geometrical tools <br>
Standard_EXPORT const Handle_IntTools_Context& Context() const;
#endif
Standard_EXPORT
const Handle_IntTools_Context& Context() const;
//! Sets edges/faces to process <br>
Standard_EXPORT void SetShapes(const TopTools_ListOfShape& theLS) ;
//! 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 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 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;
//! Returns faces/solids that have been built <br>
Standard_EXPORT
const TopTools_ListOfShape& Areas() const;
#if OCC_VERSION_LARGE > 0x06050200
Standard_EXPORT virtual void Perform() ;
#endif
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() ;
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 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

View File

@ -1,27 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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>

View File

@ -1,31 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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

View File

@ -1,83 +0,0 @@
-- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
--
-- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, 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;

View File

@ -21,20 +21,10 @@
//
// 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>
@ -81,28 +71,32 @@
#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()
:
@ -111,14 +105,14 @@ static
}
//=======================================================================
//function : ~
//purpose :
//purpose :
//=======================================================================
GEOMAlgo_BuilderFace::~GEOMAlgo_BuilderFace()
{
}
//=======================================================================
//function : SetFace
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_BuilderFace::SetFace(const TopoDS_Face& theFace)
{
@ -126,7 +120,7 @@ static
}
//=======================================================================
//function : Face
//purpose :
//purpose :
//=======================================================================
const TopoDS_Face& GEOMAlgo_BuilderFace::Face()const
{
@ -134,28 +128,18 @@ static
}
//=======================================================================
//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) {
@ -179,7 +163,7 @@ static
}
//=======================================================================
//function :PerformShapesToAvoid
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_BuilderFace::PerformShapesToAvoid()
{
@ -250,12 +234,12 @@ static
break;
}
//
}//while (1)
}//while (1)
//printf(" EdgesToAvoid=%d, iCnt=%d\n", EdgesToAvoid.Extent(), iCnt);
}
}
//=======================================================================
//function : PerformLoops
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_BuilderFace::PerformLoops()
{
@ -268,11 +252,11 @@ static
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);
//
@ -298,7 +282,7 @@ static
//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()) {
@ -309,7 +293,7 @@ static
aMEP.Add(aE);
}
}
//
//
// b. collect all edges that are to avoid
aItM.Initialize(myShapesToAvoid);
for (; aItM.More(); aItM.Next()) {
@ -359,7 +343,7 @@ static
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);
@ -367,7 +351,7 @@ static
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);
@ -375,7 +359,7 @@ static
}
//=======================================================================
//function : PerformAreas
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_BuilderFace::PerformAreas()
{
@ -383,7 +367,7 @@ static
//
Standard_Boolean bIsGrowth, bIsHole;
Standard_Real aTol;
TopTools_ListOfShape aNewFaces, aHoleWires;
TopTools_ListOfShape aNewFaces, aHoleWires;
TopoDS_Shape anInfinitePointShape;
TopTools_DataMapOfShapeShape aInOutMap;
TopTools_DataMapOfShapeListOfShape aMSH;
@ -414,7 +398,7 @@ static
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);
@ -486,20 +470,20 @@ static
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()
{
@ -509,11 +493,11 @@ static
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;
@ -575,7 +559,7 @@ static
}
//=======================================================================
//function : MakeInternalWires
//purpose :
//purpose :
//=======================================================================
void MakeInternalWires(const TopTools_MapOfShape& theME,
TopTools_ListOfShape& theWires)
@ -601,7 +585,7 @@ void MakeInternalWires(const TopTools_MapOfShape& theME,
//
// make a new shell
TopoDS_Wire aW;
aBB.MakeWire(aW);
aBB.MakeWire(aW);
aEE.Orientation(TopAbs_INTERNAL);
aBB.Add(aW, aEE);
//
@ -614,7 +598,7 @@ void MakeInternalWires(const TopTools_MapOfShape& theME,
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);
@ -628,19 +612,15 @@ void MakeInternalWires(const TopTools_MapOfShape& theME,
}
//=======================================================================
//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;
@ -673,14 +653,14 @@ Standard_Boolean IsInside(const TopoDS_Shape& theHole,
//=======================================================================
//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);
@ -703,7 +683,7 @@ Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire,
/*
//=======================================================================
//function : IsInside
//purpose :
//purpose :
//=======================================================================
Standard_Boolean IsInside(const TopoDS_Shape& theHole,
const TopoDS_Shape& theF2,

View File

@ -1,3 +1,4 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
@ -20,109 +21,71 @@
// 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 {
//=======================================================================
//class : GEOMAlgo_BuilderFace
//purpose :
//=======================================================================
class GEOMAlgo_BuilderFace : public GEOMAlgo_BuilderArea
{
public:
public:
//! Empty constructor <br>
Standard_EXPORT
GEOMAlgo_BuilderFace();
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 ~GEOMAlgo_BuilderFace();
//! 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) ;
//! 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;
//! Returns the face generatix <br>
Standard_EXPORT const TopoDS_Face& Face() const;
//! Performs the algorithm <br>
Standard_EXPORT
virtual void Perform() ;
//! 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
//
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

View File

@ -1,27 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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>

View File

@ -1,28 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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

View File

@ -1,115 +0,0 @@
-- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
--
-- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, 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;

View File

@ -21,13 +21,13 @@
//
// 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()
:
@ -39,14 +39,14 @@
}
//=======================================================================
//function : ~
//purpose :
//purpose :
//=======================================================================
GEOMAlgo_BuilderShape::~GEOMAlgo_BuilderShape()
{
}
//=======================================================================
//function : Shape
//purpose :
//purpose :
//=======================================================================
const TopoDS_Shape& GEOMAlgo_BuilderShape::Shape() const
{
@ -55,7 +55,7 @@
//
//=======================================================================
//function : Generated
//purpose :
//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Generated(const TopoDS_Shape& )
{
@ -64,7 +64,7 @@
}
//=======================================================================
//function : Modified
//purpose :
//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Modified(const TopoDS_Shape& )
{
@ -73,18 +73,18 @@
}
//=======================================================================
//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
{
@ -92,7 +92,7 @@
}
//=======================================================================
//function : HasGenerated
//purpose :
//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_BuilderShape::HasGenerated()const
{
@ -100,7 +100,7 @@
}
//=======================================================================
//function : HasModified
//purpose :
//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_BuilderShape::HasModified()const
{
@ -108,7 +108,7 @@
}
//=======================================================================
//function : PrepareHistory
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_BuilderShape::PrepareHistory()
{
@ -124,7 +124,7 @@
//modified by NIZNHY-PKV Thu Dec 7 11:57:00 2006f
//=======================================================================
//function : ImagesResult
//purpose :
//purpose :
//=======================================================================
const TopTools_IndexedDataMapOfShapeListOfShape& GEOMAlgo_BuilderShape::ImagesResult()const
{

View File

@ -20,134 +20,86 @@
// 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 <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
#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 : public GEOMAlgo_Algo {
//=======================================================================
//class : GEOMAlgo_BuilderShape
//purpose :
//=======================================================================
class GEOMAlgo_BuilderShape : public GEOMAlgo_Algo
{
public:
//! Returns the result of algorithm <br>
Standard_EXPORT
const TopoDS_Shape& Shape() const;
public:
//! Returns the list of shapes generated from the <br>
//! shape theS. <br>
Standard_EXPORT
virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
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 list of shapes modified from the <br>
//! shape theS. <br>
Standard_EXPORT
virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
//! 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;
//! 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
//
Standard_EXPORT
virtual ~GEOMAlgo_BuilderShape();
//! 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;
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

View File

@ -1,27 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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>

View File

@ -1,31 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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

View File

@ -1,70 +0,0 @@
-- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
--
-- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, 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;

View File

@ -21,18 +21,10 @@
//
// 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>
@ -81,27 +73,24 @@
#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& );
@ -111,7 +100,7 @@ static
static
Standard_Boolean RefineShell(const TopoDS_Shell& ,
TopoDS_Shell& );
TopoDS_Shell& );
//=======================================================================
//function :
@ -137,10 +126,8 @@ void GEOMAlgo_BuilderSolid::Perform()
{
myErrorStatus=0;
//
#if OCC_VERSION_LARGE > 0x06050200
// Initialize the context
GEOMAlgo_BuilderArea::Perform();
#endif
//
TopoDS_Compound aC;
BRep_Builder aBB;
@ -153,13 +140,6 @@ void GEOMAlgo_BuilderSolid::Perform()
aBB.Add(aC, aF);
}
//
#if OCC_VERSION_LARGE <= 0x06050200
if (myContext==NULL) {
myErrorStatus=11;// Null Context
return;
}
#endif
//
PerformShapesToAvoid();
if (myErrorStatus) {
return;
@ -209,7 +189,7 @@ void GEOMAlgo_BuilderSolid::PerformShapesToAvoid()
}
/*
else {
int a=0;
int a=0;
}
*/
}
@ -410,17 +390,15 @@ void GEOMAlgo_BuilderSolid::PerformLoops()
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
@ -631,10 +609,11 @@ void GEOMAlgo_BuilderSolid::PerformInternalShapes()
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;
@ -656,6 +635,16 @@ void GEOMAlgo_BuilderSolid::PerformInternalShapes()
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);
//
@ -664,13 +653,17 @@ void GEOMAlgo_BuilderSolid::PerformInternalShapes()
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
@ -756,11 +749,7 @@ void MakeInternalShells(const TopTools_MapOfShape& theMF,
//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);
@ -775,11 +764,7 @@ Standard_Boolean IsHole(const TopoDS_Shape& theS2,
//=======================================================================
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;
@ -795,11 +780,7 @@ Standard_Boolean IsInside(const TopoDS_Shape& theS1,
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);
}
@ -864,13 +845,13 @@ Standard_Boolean IsClosedShell(const TopoDS_Shell& theShell)
}
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;
@ -900,7 +881,7 @@ Standard_Boolean RefineShell (const TopoDS_Shell& aShell,
const TopoDS_Face& aF1=*((TopoDS_Face*)(&aLF.First()));
if (aNbF==1) {
if (aOrE==TopAbs_INTERNAL) {
continue;
continue;
}
aMFx.Add(aF1);
}
@ -908,14 +889,14 @@ Standard_Boolean RefineShell (const TopoDS_Shell& aShell,
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);
}
}
}
@ -945,6 +926,6 @@ Standard_Boolean RefineShell (const TopoDS_Shell& aShell,
//
return bRet;
}
//
// ErrorStatus :
// 11 - Null Context

View File

@ -20,98 +20,58 @@
// 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 {
//=======================================================================
//function : GEOMAlgo_BuilderSolid
//purpose :
//=======================================================================
class GEOMAlgo_BuilderSolid : public GEOMAlgo_BuilderArea
{
public:
//! Empty constructor <br>
Standard_EXPORT
GEOMAlgo_BuilderSolid();
public:
Standard_EXPORT
virtual ~GEOMAlgo_BuilderSolid();
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
//
//! Performs the algorithm <br>
Standard_EXPORT
virtual void Perform() ;
//! Empty constructor <br>
Standard_EXPORT GEOMAlgo_BuilderSolid();
Standard_EXPORT virtual ~GEOMAlgo_BuilderSolid();
protected:
//! Collect the faces that <br>
//! a) are internal <br>
//! b) are the same and have different orientation <br>
Standard_EXPORT
virtual void PerformShapesToAvoid() ;
//! Performs the algorithm <br>
Standard_EXPORT virtual void Perform() ;
//! 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() ;
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
//
//! Build finalized solids with internal shells <br>
Standard_EXPORT
virtual void PerformInternalShapes() ;
};
// other Inline functions and methods (like "C++: function call" methods)
//
#endif

View File

@ -1,27 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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>

View File

@ -1,25 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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

View File

@ -1,49 +0,0 @@
-- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
--
-- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, 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;

View File

@ -23,7 +23,7 @@
// File: GEOMAlgo_BuilderTools.cxx
// Author: Peter KURNEV
#include <GEOMAlgo_BuilderTools.ixx>
#include <GEOMAlgo_BuilderTools.hxx>
#include <Basics_OCCTVersion.hxx>
@ -64,7 +64,7 @@
#include <Bnd_Box.hxx>
#include <BRepAdaptor_Curve2d.hxx>
static
static
Standard_Integer ComputeProps(const TopoDS_Face& aF,
Standard_Real& aA,
Standard_Real& aV);
@ -73,7 +73,7 @@ static
//=======================================================================
//function : IsHole
//purpose :
//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aW,
const TopoDS_Shape& aFace)
@ -84,7 +84,7 @@ static
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;
@ -98,10 +98,10 @@ static
//
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;
}
@ -135,17 +135,17 @@ static
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)
{
@ -171,7 +171,7 @@ static
}
//=======================================================================
//function : ComputeProps
//purpose :
//purpose :
//=======================================================================
Standard_Integer ComputeProps(const TopoDS_Face& aF,
Standard_Real& aA,
@ -244,7 +244,7 @@ Standard_Integer ComputeProps(const TopoDS_Face& aF,
}
//=======================================================================
//function : BuildTriangulation
//purpose :
//purpose :
//=======================================================================
void BuildTriangulation(const TopoDS_Face& aF)
{

View File

@ -20,80 +20,29 @@
// 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

View File

@ -1,27 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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>

View File

@ -1,28 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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

View File

@ -35,7 +35,7 @@
//=======================================================================
//function : Shapes1
//purpose :
//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_Builder::Shapes1(const Standard_Integer theType)const
{
@ -43,7 +43,7 @@
}
//=======================================================================
//function : Images
//purpose :
//purpose :
//=======================================================================
const BRepAlgo_Image& GEOMAlgo_Builder::Images()const
{
@ -51,7 +51,7 @@
}
//=======================================================================
//function : InParts
//purpose :
//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_Builder::InParts(const TopoDS_Shape& theS)const
{

View File

@ -21,26 +21,12 @@
//
// 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>
@ -48,20 +34,33 @@
#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
@ -75,7 +74,7 @@ static
//=======================================================================
//function : FillImagesVertices
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_Builder::FillImagesVertices()
{
@ -104,7 +103,7 @@ static
}
//=======================================================================
// function: FillImagesEdges
// purpose:
// purpose:
//=======================================================================
void GEOMAlgo_Builder::FillImagesEdges()
{
@ -113,11 +112,7 @@ static
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;
@ -209,12 +204,12 @@ static
}
//
myImages.Bind(aE, aLSp);
}//for (i=1; i<=aNb; ++i)
}
//=======================================================================
// function: FillImagesContainers
// purpose:
// purpose:
//=======================================================================
void GEOMAlgo_Builder::FillImagesContainers(const TopAbs_ShapeEnum theType)
{
@ -225,17 +220,13 @@ static
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) {
@ -291,12 +282,12 @@ static
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)
@ -312,18 +303,18 @@ void FillImagesCompounds(const TopTools_MapOfShape& theMS,
}
//=======================================================================
//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;
@ -365,5 +356,5 @@ void FillImagesCompound(const TopoDS_Shape& theS,
aBB.Add(aCIm, aSX);
}
}
theImages.Bind(theS, aCIm);
theImages.Bind(theS, aCIm);
}

View File

@ -24,27 +24,8 @@
#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>
@ -58,8 +39,6 @@
#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>
@ -72,13 +51,8 @@
#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>
@ -93,11 +67,34 @@
#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 ,
@ -106,8 +103,8 @@ static
//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
//=======================================================================
@ -216,11 +213,7 @@ void GEOMAlgo_Builder::BuildSplitFaces()
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;
@ -319,10 +312,10 @@ void GEOMAlgo_Builder::BuildSplitFaces()
}
//
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);
@ -435,11 +428,7 @@ void GEOMAlgo_Builder::FillSameDomainFaces()
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();
@ -600,7 +589,7 @@ void GEOMAlgo_Builder::FillSameDomainFaces()
// 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;
@ -726,11 +715,7 @@ void GEOMAlgo_Builder::FillInternalVertices()
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();
@ -903,18 +888,10 @@ void GEOMAlgo_Builder::FillInternalVertices()
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;
@ -924,18 +901,10 @@ void GEOMAlgo_Builder::FillInternalVertices()
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;
//
@ -971,7 +940,7 @@ void UpdateCandidates(const Standard_Integer theNF,
//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)
@ -986,12 +955,12 @@ Standard_Boolean IsClosed(const TopoDS_Edge& aE,
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;
}

View File

@ -19,24 +19,12 @@
//
// 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>
@ -69,6 +57,16 @@
#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& ,
@ -97,11 +95,7 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid,
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;
@ -194,11 +188,7 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid,
//
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;
@ -431,11 +421,7 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid,
//
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;
@ -534,9 +520,7 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid,
//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();
@ -580,11 +564,7 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid,
//
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;

View File

@ -21,18 +21,11 @@
//
// 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>
@ -42,6 +35,12 @@
#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);
@ -53,11 +52,7 @@ static
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;
@ -111,11 +106,7 @@ static
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;
@ -306,6 +297,7 @@ static
}
}
}
}
//=======================================================================
//function : MapShapes

View File

@ -1,77 +0,0 @@
-- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
--
-- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, 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;

View File

@ -20,16 +20,19 @@
// 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()
:
@ -41,14 +44,14 @@
}
//=======================================================================
//function : ~
//purpose :
//purpose :
//=======================================================================
GEOMAlgo_Clsf::~GEOMAlgo_Clsf()
{
}
//=======================================================================
//function : SetTolerance
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_Clsf::SetTolerance(const Standard_Real aT)
{
@ -56,7 +59,7 @@
}
//=======================================================================
//function : Tolerance
//purpose :
//purpose :
//=======================================================================
Standard_Real GEOMAlgo_Clsf::Tolerance()const
{
@ -64,7 +67,7 @@
}
//=======================================================================
//function : SetPnt
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_Clsf::SetPnt(const gp_Pnt& aP)
{
@ -72,7 +75,7 @@
}
//=======================================================================
//function : Pnt
//purpose :
//purpose :
//=======================================================================
const gp_Pnt& GEOMAlgo_Clsf::Pnt()const
{
@ -80,7 +83,7 @@
}
//=======================================================================
//function : State
//purpose :
//purpose :
//=======================================================================
TopAbs_State GEOMAlgo_Clsf::State() const
{
@ -88,7 +91,7 @@
}
//=======================================================================
//function : CanBeON
//purpose :
//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_Clsf::CanBeON(const Handle(Geom_Curve)& ) const
{
@ -96,7 +99,7 @@
}
//=======================================================================
//function : CanBeON
//purpose :
//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_Clsf::CanBeON(const Handle(Geom_Surface)& ) const
{

View File

@ -20,114 +20,68 @@
// 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;
#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) ;
class GEOMAlgo_Clsf : public GEOMAlgo_HAlgo {
Standard_EXPORT
const gp_Pnt& Pnt() const;
public:
// Methods PUBLIC
//
Standard_EXPORT
void SetTolerance(const Standard_Real aT) ;
Standard_EXPORT
Standard_Real Tolerance() const;
Standard_EXPORT void SetPnt(const gp_Pnt& aP) ;
Standard_EXPORT
TopAbs_State State() const;
Standard_EXPORT
virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aCT) const;
Standard_EXPORT const gp_Pnt& Pnt() const;
Standard_EXPORT
virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
DEFINE_STANDARD_RTTI(GEOMAlgo_Clsf);
Standard_EXPORT void SetTolerance(const Standard_Real aT) ;
Standard_EXPORT Standard_Real Tolerance() const;
Standard_EXPORT TopAbs_State State() const;
Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aCT) const;
Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
//Standard_EXPORT ~GEOMAlgo_Clsf();
// Type management
//
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Methods PROTECTED
//
Standard_EXPORT GEOMAlgo_Clsf();
Standard_EXPORT virtual ~GEOMAlgo_Clsf();
// Fields PROTECTED
//
TopAbs_State myState;
gp_Pnt myPnt;
Standard_Real myTolerance;
private:
// Methods PRIVATE
//
// Fields PRIVATE
//
protected:
Standard_EXPORT
GEOMAlgo_Clsf();
Standard_EXPORT
virtual ~GEOMAlgo_Clsf();
TopAbs_State myState;
gp_Pnt myPnt;
Standard_Real myTolerance;
};
// other Inline functions and methods (like "C++: function call" methods)
//
#endif

View File

@ -1,76 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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() {}

View File

@ -1,34 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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

View File

@ -1,72 +0,0 @@
-- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
--
-- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, 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;

View File

@ -20,12 +20,13 @@
// 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>
@ -42,9 +43,12 @@
#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()
:
@ -53,14 +57,14 @@
}
//=======================================================================
//function : ~
//purpose :
//purpose :
//=======================================================================
GEOMAlgo_ClsfBox::~GEOMAlgo_ClsfBox()
{
}
//=======================================================================
//function : SetBox
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_ClsfBox::SetBox(const TopoDS_Shape& aBox)
{
@ -68,7 +72,7 @@
}
//=======================================================================
//function : Box
//purpose :
//purpose :
//=======================================================================
const TopoDS_Shape& GEOMAlgo_ClsfBox::Box() const
{
@ -76,10 +80,10 @@
}
//=======================================================================
//function : CheckData
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_ClsfBox::CheckData()
{
{
Standard_Integer i, aNbF;
TopAbs_ShapeEnum aTypeShape;
TopAbs_Orientation aOr;
@ -118,7 +122,7 @@
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;
}
@ -142,7 +146,7 @@
}
//=======================================================================
//function : Perform
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_ClsfBox::Perform()
{
@ -158,7 +162,7 @@
}
*/
iNext=1;
aNbON=0;
aNbON=0;
aNbIN=0;
for(i=0; i<aNbS && iNext; i++) {
GEOMAlgo_SurfaceTools::GetState(myPnt, myGAS[i], myTolerance, aSt);
@ -177,7 +181,7 @@
default:
myState=TopAbs_UNKNOWN;
iNext=0;
break;
break;
}
}
//
@ -194,7 +198,7 @@
}
//=======================================================================
//function : CanBeON
//purpose :
//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_ClsfBox::CanBeON(const Handle(Geom_Curve)& aC) const
{
@ -202,7 +206,7 @@
}
//=======================================================================
//function : CanBeON
//purpose :
//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_ClsfBox::CanBeON(const Handle(Geom_Surface)& aS1) const
{

View File

@ -20,97 +20,69 @@
// 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;
#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];
class GEOMAlgo_ClsfBox : public GEOMAlgo_Clsf {
public:
// Methods PUBLIC
//
private:
Standard_EXPORT GEOMAlgo_ClsfBox();
Standard_EXPORT virtual ~GEOMAlgo_ClsfBox();
Standard_EXPORT void SetBox(const TopoDS_Shape& aS) ;
Standard_EXPORT const TopoDS_Shape& Box() const;
Standard_EXPORT virtual void Perform() ;
Standard_EXPORT virtual void CheckData() ;
Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aC) const;
Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
//Standard_EXPORT ~GEOMAlgo_ClsfBox();
// Type management
//
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Methods PROTECTED
//
// Fields PROTECTED
//
TopoDS_Shape myBox;
GeomAdaptor_Surface myGAS[6];
private:
// Methods PRIVATE
//
// Fields PRIVATE
//
};
@ -120,7 +92,6 @@ private:
// other Inline functions and methods (like "C++: function call" methods)
//
#endif

View File

@ -1,77 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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() {}

View File

@ -1,34 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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

View File

@ -1,58 +0,0 @@
-- 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;

View File

@ -22,7 +22,7 @@
// Author: Peter KURNEV
// <pkv@irinox>
//
#include <GEOMAlgo_ClsfSolid.ixx>
#include <GEOMAlgo_ClsfSolid.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopoDS.hxx>
@ -30,9 +30,12 @@
#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()
:
@ -42,7 +45,7 @@
}
//=======================================================================
//function : ~
//purpose :
//purpose :
//=======================================================================
GEOMAlgo_ClsfSolid::~GEOMAlgo_ClsfSolid()
{
@ -55,7 +58,7 @@
}
//=======================================================================
//function : SetShape
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_ClsfSolid::SetShape(const TopoDS_Shape& aS)
{
@ -63,7 +66,7 @@
}
//=======================================================================
//function : Shape
//purpose :
//purpose :
//=======================================================================
const TopoDS_Shape& GEOMAlgo_ClsfSolid::Shape()const
{
@ -71,7 +74,7 @@
}
//=======================================================================
//function : CheckData
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_ClsfSolid::CheckData()
{
@ -89,7 +92,7 @@
//
aType=myShape.ShapeType();
if (!(aType==TopAbs_SOLID || aType==TopAbs_SHELL)) {
myErrorStatus=12;
myErrorStatus=12;
return;
}
//
@ -112,7 +115,7 @@
}
//=======================================================================
//function : Perform
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_ClsfSolid::Perform()
{

View File

@ -17,90 +17,53 @@
// 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;
DEFINE_STANDARD_HANDLE(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf)
//=======================================================================
//class : GEOMAlgo_ClsfSolid
//purpose :
//=======================================================================
class GEOMAlgo_ClsfSolid : public GEOMAlgo_Clsf
{
public:
Standard_EXPORT
GEOMAlgo_ClsfSolid();
class GEOMAlgo_ClsfSolid : public GEOMAlgo_Clsf {
Standard_EXPORT
virtual ~GEOMAlgo_ClsfSolid();
public:
// Methods PUBLIC
//
Standard_EXPORT
void SetShape(const TopoDS_Shape& aS) ;
Standard_EXPORT
const TopoDS_Shape& Shape() const;
Standard_EXPORT GEOMAlgo_ClsfSolid();
Standard_EXPORT virtual ~GEOMAlgo_ClsfSolid();
Standard_EXPORT
virtual void Perform() ;
Standard_EXPORT
virtual void CheckData() ;
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() ;
//Standard_EXPORT ~GEOMAlgo_ClsfSolid();
// 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

View File

@ -1,74 +0,0 @@
// 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() {}

View File

@ -1,25 +0,0 @@
// 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

View File

@ -1,72 +0,0 @@
-- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
--
-- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, 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;

View File

@ -25,14 +25,17 @@
// 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()
:
@ -41,14 +44,14 @@
}
//=======================================================================
//function : ~
//purpose :
//purpose :
//=======================================================================
GEOMAlgo_ClsfSurf::~GEOMAlgo_ClsfSurf()
{
}
//=======================================================================
//function : SetSurface
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_ClsfSurf::SetSurface(const Handle(Geom_Surface)& aS)
{
@ -56,7 +59,7 @@
}
//=======================================================================
//function : Surface
//purpose :
//purpose :
//=======================================================================
const Handle(Geom_Surface)& GEOMAlgo_ClsfSurf::Surface() const
{
@ -64,7 +67,7 @@
}
//=======================================================================
//function : CheckData
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_ClsfSurf::CheckData()
{
@ -79,7 +82,7 @@
//
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
@ -87,7 +90,7 @@
}
//=======================================================================
//function : Perform
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_ClsfSurf::Perform()
{
@ -102,7 +105,7 @@
}
//=======================================================================
//function : CanBeON
//purpose :
//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_ClsfSurf::CanBeON(const Handle(Geom_Curve)& aC) const
{
@ -121,7 +124,7 @@
}
//=======================================================================
//function : CanBeON
//purpose :
//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_ClsfSurf::CanBeON(const Handle(Geom_Surface)& aS1) const
{

View File

@ -20,103 +20,62 @@
// 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;
#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();
class GEOMAlgo_ClsfSurf : public GEOMAlgo_Clsf {
Standard_EXPORT
virtual ~GEOMAlgo_ClsfSurf();
public:
// Methods PUBLIC
//
Standard_EXPORT
void SetSurface(const Handle(Geom_Surface)& aS) ;
Standard_EXPORT
const Handle_Geom_Surface& Surface() const;
Standard_EXPORT GEOMAlgo_ClsfSurf();
Standard_EXPORT virtual ~GEOMAlgo_ClsfSurf();
Standard_EXPORT
virtual void Perform() ;
Standard_EXPORT
virtual void CheckData() ;
Standard_EXPORT void SetSurface(const Handle(Geom_Surface)& aS) ;
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 const Handle_Geom_Surface& Surface() const;
Standard_EXPORT virtual void Perform() ;
Standard_EXPORT virtual void CheckData() ;
Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aC) const;
Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
//Standard_EXPORT ~GEOMAlgo_ClsfSurf();
// Type management
//
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Methods PROTECTED
//
// Fields PROTECTED
//
Handle_Geom_Surface myS;
GeomAdaptor_Surface myGAS;
private:
// Methods PRIVATE
//
// Fields PRIVATE
//
DEFINE_STANDARD_RTTI(GEOMAlgo_ClsfSurf);
protected:
Handle_Geom_Surface myS;
GeomAdaptor_Surface myGAS;
};
// other Inline functions and methods (like "C++: function call" methods)
//
#endif

View File

@ -1,77 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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() {}

View File

@ -1,31 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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

View File

@ -1,67 +0,0 @@
-- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
--
-- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, 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;

View File

@ -19,22 +19,21 @@
//
// 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)
@ -44,7 +43,7 @@ void GEOMAlgo_CoupleOfShapes::SetShapes(const TopoDS_Shape& aS1,
}
//=======================================================================
//function : Shapes
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_CoupleOfShapes::Shapes(TopoDS_Shape& aS1,
TopoDS_Shape& aS2)const
@ -54,7 +53,7 @@ void GEOMAlgo_CoupleOfShapes::Shapes(TopoDS_Shape& aS1,
}
//=======================================================================
//function : SetShape1
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_CoupleOfShapes::SetShape1(const TopoDS_Shape& aS1)
{
@ -62,7 +61,7 @@ void GEOMAlgo_CoupleOfShapes::SetShape1(const TopoDS_Shape& aS1)
}
//=======================================================================
//function : SetShape2
//purpose :
//purpose :
//=======================================================================
void GEOMAlgo_CoupleOfShapes::SetShape2(const TopoDS_Shape& aS2)
{
@ -70,7 +69,7 @@ void GEOMAlgo_CoupleOfShapes::SetShape2(const TopoDS_Shape& aS2)
}
//=======================================================================
//function : Shape1
//purpose :
//purpose :
//=======================================================================
const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape1()const
{
@ -78,7 +77,7 @@ const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape1()const
}
//=======================================================================
//function : Shape2
//purpose :
//purpose :
//=======================================================================
const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape2()const
{

View File

@ -1,8 +1,5 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
@ -19,98 +16,49 @@
//
// 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
#include <TopoDS_Shape.hxx>
//=======================================================================
//class : GEOMAlgo_CoupleOfShapes
//purpose :
//=======================================================================
class GEOMAlgo_CoupleOfShapes
{
public:
Standard_EXPORT
GEOMAlgo_CoupleOfShapes();
class GEOMAlgo_CoupleOfShapes {
Standard_EXPORT
void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ;
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;
Standard_EXPORT const TopoDS_Shape& Shape1() const;
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

View File

@ -1,27 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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>

View File

@ -1,28 +0,0 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// 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

View File

@ -16,97 +16,17 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#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;
// File: GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx
// Created: Wed Feb 22 11:05:01 2012
// Author:
// <pkv@BDEURI37616>
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
#define GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
#ifndef GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
#include <GEOMAlgo_DataMapOfOrientedShapeShape.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

View File

@ -1,54 +0,0 @@
// 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>

View File

@ -1,8 +1,5 @@
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
@ -19,100 +16,16 @@
//
// 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>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile
#define GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile
#ifndef GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile
#include <GEOMAlgo_DataMapOfPassKeyInteger.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 _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.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

Some files were not shown because too many files have changed in this diff Show More