mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-10 06:33:08 +05:00
Replace obsolete packages by new ones
This commit is contained in:
parent
3b5346b618
commit
a67dc446eb
16
configure.ac
16
configure.ac
@ -318,19 +318,6 @@ echo
|
|||||||
|
|
||||||
CHECK_CAS
|
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 ---------------------------------------------
|
echo ---------------------------------------------
|
||||||
echo Testing html generators
|
echo Testing html generators
|
||||||
@ -460,7 +447,6 @@ AC_OUTPUT([ \
|
|||||||
src/EntityGUI/Makefile \
|
src/EntityGUI/Makefile \
|
||||||
src/GEOM/Makefile \
|
src/GEOM/Makefile \
|
||||||
src/GEOMAlgo/Makefile \
|
src/GEOMAlgo/Makefile \
|
||||||
src/GEOMAlgo_NEW/Makefile \
|
|
||||||
src/GEOMBase/Makefile \
|
src/GEOMBase/Makefile \
|
||||||
src/GEOMClient/Makefile \
|
src/GEOMClient/Makefile \
|
||||||
src/GEOMFiltersSelection/Makefile \
|
src/GEOMFiltersSelection/Makefile \
|
||||||
@ -480,9 +466,7 @@ AC_OUTPUT([ \
|
|||||||
src/IGESImport/Makefile \
|
src/IGESImport/Makefile \
|
||||||
src/MeasureGUI/Makefile \
|
src/MeasureGUI/Makefile \
|
||||||
src/NMTDS/Makefile \
|
src/NMTDS/Makefile \
|
||||||
src/NMTDS_NEW/Makefile \
|
|
||||||
src/NMTTools/Makefile \
|
src/NMTTools/Makefile \
|
||||||
src/NMTTools_NEW/Makefile \
|
|
||||||
src/OBJECT/Makefile \
|
src/OBJECT/Makefile \
|
||||||
src/OCC2VTK/Makefile \
|
src/OCC2VTK/Makefile \
|
||||||
src/OperationGUI/Makefile \
|
src/OperationGUI/Makefile \
|
||||||
|
@ -42,19 +42,19 @@ uses
|
|||||||
is
|
is
|
||||||
|
|
||||||
class SphereSpaceModifier;
|
class SphereSpaceModifier;
|
||||||
|
|
||||||
class UnionFaces;
|
class UnionFaces;
|
||||||
|
|
||||||
class UnionEdges;
|
class UnionEdges;
|
||||||
|
|
||||||
class BlockFixAPI;
|
class BlockFixAPI;
|
||||||
---Purpose: API class to perform the fixing of the
|
---Purpose: API class to perform the fixing of the
|
||||||
-- block
|
-- block
|
||||||
|
|
||||||
class PeriodicSurfaceModifier;
|
class PeriodicSurfaceModifier;
|
||||||
|
|
||||||
class CheckTool;
|
class CheckTool;
|
||||||
|
|
||||||
RotateSphereSpace (S: Shape from TopoDS; Tol: Real)
|
RotateSphereSpace (S: Shape from TopoDS; Tol: Real)
|
||||||
returns Shape from TopoDS;
|
returns Shape from TopoDS;
|
||||||
|
|
||||||
|
@ -18,52 +18,71 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// File: BlockFix.cxx
|
// File: BlockFix.cxx
|
||||||
// Created: Tue Dec 7 11:59:05 2004
|
// Created: Tue Dec 7 11:59:05 2004
|
||||||
// Author: Pavel DURANDIN
|
// Author: Pavel DURANDIN
|
||||||
//
|
|
||||||
#include <BlockFix.hxx>
|
#include <BlockFix.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
|
||||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
#include <BlockFix_SphereSpaceModifier.hxx>
|
||||||
#include <ShapeCustom.hxx>
|
#include <BlockFix_PeriodicSurfaceModifier.hxx>
|
||||||
#include <BRepTools.hxx>
|
|
||||||
#include <ShapeBuild_ReShape.hxx>
|
#include <TopExp.hxx>
|
||||||
#include <TopoDS_Face.hxx>
|
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
#include <TopoDS.hxx>
|
|
||||||
#include <TopLoc_Location.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_Surface.hxx>
|
||||||
#include <Geom_CylindricalSurface.hxx>
|
#include <Geom_CylindricalSurface.hxx>
|
||||||
#include <Geom_ConicalSurface.hxx>
|
#include <Geom_ConicalSurface.hxx>
|
||||||
#include <ShapeFix_Wire.hxx>
|
|
||||||
#include <TopoDS_Wire.hxx>
|
|
||||||
#include <BRepTools_Modifier.hxx>
|
|
||||||
#include <Geom_SphericalSurface.hxx>
|
#include <Geom_SphericalSurface.hxx>
|
||||||
#include <Geom_ToroidalSurface.hxx>
|
#include <Geom_ToroidalSurface.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
|
||||||
#include <TopoDS_Edge.hxx>
|
|
||||||
#include <Geom2d_Curve.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 <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
|
//function : FixResult
|
||||||
@ -79,26 +98,26 @@ static void FixResult(const TopoDS_Shape& result,
|
|||||||
TopoDS_Face aFace = TopoDS::Face(aShape);
|
TopoDS_Face aFace = TopoDS::Face(aShape);
|
||||||
TopLoc_Location L;
|
TopLoc_Location L;
|
||||||
Handle(Geom_Surface) Surf = BRep_Tool::Surface(aFace,L);
|
Handle(Geom_Surface) Surf = BRep_Tool::Surface(aFace,L);
|
||||||
|
|
||||||
if( Surf->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ||
|
if( Surf->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ||
|
||||||
Surf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) ) {
|
Surf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) ) {
|
||||||
|
|
||||||
Standard_Integer nbWires = 0;
|
Standard_Integer nbWires = 0;
|
||||||
for (TopExp_Explorer ex_w(aFace,TopAbs_WIRE); ex_w.More(); ex_w.Next()) {
|
for (TopExp_Explorer ex_w(aFace,TopAbs_WIRE); ex_w.More(); ex_w.Next()) {
|
||||||
nbWires++;
|
nbWires++;
|
||||||
Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire(TopoDS::Wire(ex_w.Current()),
|
Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire(TopoDS::Wire(ex_w.Current()),
|
||||||
aFace,
|
aFace,
|
||||||
Precision::Confusion());
|
Precision::Confusion());
|
||||||
sfw->FixReorder();
|
sfw->FixReorder();
|
||||||
if(sfw->StatusReorder ( ShapeExtend_FAIL ))
|
if(sfw->StatusReorder ( ShapeExtend_FAIL ))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
sfw->SetPrecision(2.*Tol);
|
sfw->SetPrecision(2.*Tol);
|
||||||
sfw->FixShifted();
|
sfw->FixShifted();
|
||||||
|
|
||||||
Standard_Boolean isDone = sfw->LastFixStatus ( ShapeExtend_DONE );
|
Standard_Boolean isDone = sfw->LastFixStatus ( ShapeExtend_DONE );
|
||||||
isDone |= sfw->FixDegenerated();
|
isDone |= sfw->FixDegenerated();
|
||||||
|
|
||||||
// remove degenerated edges from not degenerated points
|
// remove degenerated edges from not degenerated points
|
||||||
ShapeAnalysis_Edge sae;
|
ShapeAnalysis_Edge sae;
|
||||||
Handle(ShapeExtend_WireData) sewd = sfw->WireData();
|
Handle(ShapeExtend_WireData) sewd = sfw->WireData();
|
||||||
@ -111,10 +130,10 @@ static void FixResult(const TopoDS_Shape& result,
|
|||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//isDone |= sfw->FixLacking(); // commented by skl 22.03.2005 (PAL8395)
|
//isDone |= sfw->FixLacking(); // commented by skl 22.03.2005 (PAL8395)
|
||||||
|
|
||||||
// remove neighbour seam edges
|
// remove neighbour seam edges
|
||||||
if(isDone) {
|
if(isDone) {
|
||||||
for( i = 1; i<sewd->NbEdges();i++) {
|
for( i = 1; i<sewd->NbEdges();i++) {
|
||||||
if(sewd->IsSeam(i) && sewd->IsSeam(i+1)) {
|
if(sewd->IsSeam(i) && sewd->IsSeam(i+1)) {
|
||||||
@ -129,8 +148,7 @@ static void FixResult(const TopoDS_Shape& result,
|
|||||||
sewd->Remove(sewd->NbEdges());
|
sewd->Remove(sewd->NbEdges());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(isDone) {
|
if(isDone) {
|
||||||
TopoDS_Wire ResWire = sfw->Wire();
|
TopoDS_Wire ResWire = sfw->Wire();
|
||||||
Context->Replace(ex_w.Current(), ResWire);
|
Context->Replace(ex_w.Current(), ResWire);
|
||||||
@ -143,24 +161,17 @@ static void FixResult(const TopoDS_Shape& result,
|
|||||||
if(sff->FixOrientation())
|
if(sff->FixOrientation())
|
||||||
Context->Replace(aFixedFace,sff->Face());
|
Context->Replace(aFixedFace,sff->Face());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ConvertToAnalytical
|
//function : RotateSphereSpace
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
TopoDS_Shape BlockFix::RotateSphereSpace (const TopoDS_Shape& S,
|
TopoDS_Shape BlockFix::RotateSphereSpace (const TopoDS_Shape& S,
|
||||||
const Standard_Real Tol)
|
const Standard_Real Tol)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Create a modification description
|
// Create a modification description
|
||||||
Handle(BlockFix_SphereSpaceModifier) SR = new BlockFix_SphereSpaceModifier;
|
Handle(BlockFix_SphereSpaceModifier) SR = new BlockFix_SphereSpaceModifier;
|
||||||
SR->SetTolerance(Tol);
|
SR->SetTolerance(Tol);
|
||||||
@ -168,29 +179,146 @@ TopoDS_Shape BlockFix::RotateSphereSpace (const TopoDS_Shape& S,
|
|||||||
TopTools_DataMapOfShapeShape context;
|
TopTools_DataMapOfShapeShape context;
|
||||||
BRepTools_Modifier MD;
|
BRepTools_Modifier MD;
|
||||||
TopoDS_Shape result = ShapeCustom::ApplyModifier ( S, SR, context,MD );
|
TopoDS_Shape result = ShapeCustom::ApplyModifier ( S, SR, context,MD );
|
||||||
|
|
||||||
Handle(ShapeBuild_ReShape) RS = new ShapeBuild_ReShape;
|
Handle(ShapeBuild_ReShape) RS = new ShapeBuild_ReShape;
|
||||||
FixResult(result,RS,Tol);
|
FixResult(result,RS,Tol);
|
||||||
result = RS->Apply(result);
|
result = RS->Apply(result);
|
||||||
|
|
||||||
ShapeFix_Edge sfe;
|
ShapeFix_Edge sfe;
|
||||||
for(TopExp_Explorer exp(result,TopAbs_EDGE); exp.More(); exp.Next()) {
|
for(TopExp_Explorer exp(result,TopAbs_EDGE); exp.More(); exp.Next()) {
|
||||||
TopoDS_Edge E = TopoDS::Edge(exp.Current());
|
TopoDS_Edge E = TopoDS::Edge(exp.Current());
|
||||||
sfe.FixVertexTolerance (E);
|
sfe.FixVertexTolerance (E);
|
||||||
}
|
}
|
||||||
|
|
||||||
ShapeFix::SameParameter(result,Standard_False);
|
ShapeFix::SameParameter(result,Standard_False);
|
||||||
return result;
|
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
|
//function : FixRanges
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
TopoDS_Shape BlockFix::FixRanges (const TopoDS_Shape& S,
|
TopoDS_Shape BlockFix::FixRanges (const TopoDS_Shape& S,
|
||||||
const Standard_Real Tol)
|
const Standard_Real Tol)
|
||||||
{
|
{
|
||||||
// Create a modification description
|
// Create a modification description
|
||||||
Handle(BlockFix_PeriodicSurfaceModifier) SR = new BlockFix_PeriodicSurfaceModifier;
|
Handle(BlockFix_PeriodicSurfaceModifier) SR = new BlockFix_PeriodicSurfaceModifier;
|
||||||
@ -199,17 +327,17 @@ TopoDS_Shape BlockFix::FixRanges (const TopoDS_Shape& S,
|
|||||||
TopTools_DataMapOfShapeShape context;
|
TopTools_DataMapOfShapeShape context;
|
||||||
BRepTools_Modifier MD;
|
BRepTools_Modifier MD;
|
||||||
TopoDS_Shape result = ShapeCustom::ApplyModifier ( S, SR, context,MD );
|
TopoDS_Shape result = ShapeCustom::ApplyModifier ( S, SR, context,MD );
|
||||||
|
|
||||||
Handle(ShapeBuild_ReShape) RS = new ShapeBuild_ReShape;
|
Handle(ShapeBuild_ReShape) RS = new ShapeBuild_ReShape;
|
||||||
FixResult(result,RS,Tol);
|
FixResult(result,RS,Tol);
|
||||||
result = RS->Apply(result);
|
result = RS->Apply(result);
|
||||||
|
|
||||||
ShapeFix_Edge sfe;
|
ShapeFix_Edge sfe;
|
||||||
for(TopExp_Explorer exp(result,TopAbs_EDGE); exp.More(); exp.Next()) {
|
for(TopExp_Explorer exp(result,TopAbs_EDGE); exp.More(); exp.Next()) {
|
||||||
TopoDS_Edge E = TopoDS::Edge(exp.Current());
|
TopoDS_Edge E = TopoDS::Edge(exp.Current());
|
||||||
sfe.FixVertexTolerance (E);
|
sfe.FixVertexTolerance (E);
|
||||||
}
|
}
|
||||||
|
|
||||||
ShapeFix::SameParameter(result,Standard_False);
|
ShapeFix::SameParameter(result,Standard_False);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#ifndef _Standard_Real_HeaderFile
|
#ifndef _Standard_Real_HeaderFile
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class TopoDS_Shape;
|
class TopoDS_Shape;
|
||||||
class BlockFix_SphereSpaceModifier;
|
class BlockFix_SphereSpaceModifier;
|
||||||
class BlockFix_UnionFaces;
|
class BlockFix_UnionFaces;
|
||||||
@ -34,7 +35,6 @@ class BlockFix_BlockFixAPI;
|
|||||||
class BlockFix_PeriodicSurfaceModifier;
|
class BlockFix_PeriodicSurfaceModifier;
|
||||||
class BlockFix_CheckTool;
|
class BlockFix_CheckTool;
|
||||||
|
|
||||||
|
|
||||||
#ifndef _Standard_HeaderFile
|
#ifndef _Standard_HeaderFile
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
#endif
|
||||||
@ -46,45 +46,26 @@ class BlockFix {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void* operator new(size_t,void* anAddress)
|
void* operator new(size_t,void* anAddress)
|
||||||
{
|
{
|
||||||
return anAddress;
|
return anAddress;
|
||||||
}
|
}
|
||||||
void* operator new(size_t size)
|
void* operator new(size_t size)
|
||||||
{
|
{
|
||||||
return Standard::Allocate(size);
|
return Standard::Allocate(size);
|
||||||
}
|
}
|
||||||
void operator delete(void *anAddress)
|
void operator delete(void *anAddress)
|
||||||
{
|
{
|
||||||
if (anAddress) Standard::Free((Standard_Address&)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) ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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:
|
protected:
|
||||||
|
|
||||||
// Methods PROTECTED
|
private:
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
// Fields PROTECTED
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
// Methods PRIVATE
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
// Fields PRIVATE
|
|
||||||
//
|
|
||||||
|
|
||||||
friend class BlockFix_SphereSpaceModifier;
|
friend class BlockFix_SphereSpaceModifier;
|
||||||
friend class BlockFix_UnionFaces;
|
friend class BlockFix_UnionFaces;
|
||||||
@ -95,12 +76,6 @@ friend class BlockFix_CheckTool;
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// other Inline functions and methods (like "C++: function call" methods)
|
// other Inline functions and methods (like "C++: function call" methods)
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -22,6 +22,6 @@
|
|||||||
|
|
||||||
#include <BlockFix.jxx>
|
#include <BlockFix.jxx>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,43 +26,43 @@
|
|||||||
--
|
--
|
||||||
class BlockFixAPI from BlockFix inherits TShared from MMgt
|
class BlockFixAPI from BlockFix inherits TShared from MMgt
|
||||||
|
|
||||||
---Purpose:
|
---Purpose:
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
|
||||||
Shape from TopoDS,
|
Shape from TopoDS,
|
||||||
ReShape from ShapeBuild
|
ReShape from ShapeBuild
|
||||||
|
|
||||||
is
|
is
|
||||||
Create returns BlockFixAPI from BlockFix;
|
Create returns BlockFixAPI from BlockFix;
|
||||||
---Purpose: Empty constructor
|
---Purpose: Empty constructor
|
||||||
|
|
||||||
SetShape(me: mutable; Shape: Shape from TopoDS);
|
SetShape(me: mutable; Shape: Shape from TopoDS);
|
||||||
---Purpose: Sets the shape to be operated on
|
---Purpose: Sets the shape to be operated on
|
||||||
---C++: inline
|
---C++: inline
|
||||||
|
|
||||||
Perform(me: mutable);
|
Perform(me: mutable);
|
||||||
---Purpose:
|
---Purpose:
|
||||||
|
|
||||||
Shape(me) returns Shape from TopoDS;
|
Shape(me) returns Shape from TopoDS;
|
||||||
---Purpose: Returns resulting shape.
|
---Purpose: Returns resulting shape.
|
||||||
---C++: inline
|
---C++: inline
|
||||||
|
|
||||||
Context(me:mutable) returns ReShape from ShapeBuild;
|
Context(me:mutable) returns ReShape from ShapeBuild;
|
||||||
---Purpose: Returns modifiable context for storing the
|
---Purpose: Returns modifiable context for storing the
|
||||||
-- mofifications
|
-- mofifications
|
||||||
---C++: inline
|
---C++: inline
|
||||||
---C++: return &
|
---C++: return &
|
||||||
|
|
||||||
Tolerance (me:mutable) returns Real;
|
Tolerance (me:mutable) returns Real;
|
||||||
---Purpose: Returns modifiable tolerance of recognition
|
---Purpose: Returns modifiable tolerance of recognition
|
||||||
---C++: inline
|
---C++: inline
|
||||||
---C++: return &
|
---C++: return &
|
||||||
|
|
||||||
fields
|
fields
|
||||||
|
|
||||||
myContext : ReShape from ShapeBuild;
|
myContext : ReShape from ShapeBuild;
|
||||||
myShape : Shape from TopoDS;
|
myShape : Shape from TopoDS;
|
||||||
myTolerance : Real from Standard;
|
myTolerance : Real from Standard;
|
||||||
|
|
||||||
end BlockFixAPI from BlockFix;
|
end BlockFixAPI from BlockFix;
|
||||||
|
@ -18,16 +18,21 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// File: BlockFix_BlockFixAPI.cxx
|
// File: BlockFix_BlockFixAPI.cxx
|
||||||
// Created: Tue Dec 7 11:59:05 2004
|
// Created: Tue Dec 7 11:59:05 2004
|
||||||
// Author: Pavel DURANDIN
|
// Author: Pavel DURANDIN
|
||||||
//
|
|
||||||
#include <BlockFix_BlockFixAPI.ixx>
|
#include <BlockFix_BlockFixAPI.ixx>
|
||||||
|
|
||||||
#include <BlockFix.hxx>
|
#include <BlockFix.hxx>
|
||||||
#include <BlockFix_UnionFaces.hxx>
|
#include <BlockFix_UnionFaces.hxx>
|
||||||
#include <BlockFix_UnionEdges.hxx>
|
#include <BlockFix_UnionEdges.hxx>
|
||||||
|
|
||||||
|
#include <Basics_OCCTVersion.hxx>
|
||||||
|
|
||||||
|
#include <ShapeUpgrade_RemoveLocations.hxx>
|
||||||
|
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -52,12 +57,23 @@ void BlockFix_BlockFixAPI::Perform()
|
|||||||
TopoDS_Shape aShape = Shape();
|
TopoDS_Shape aShape = Shape();
|
||||||
myShape = BlockFix::RotateSphereSpace(aShape,myTolerance);
|
myShape = BlockFix::RotateSphereSpace(aShape,myTolerance);
|
||||||
|
|
||||||
|
// try to approximate non-canonic surfaces
|
||||||
|
// with singularities on boundaries by filling
|
||||||
|
myShape = BlockFix::RefillProblemFaces(myShape);
|
||||||
|
|
||||||
// faces unification
|
// faces unification
|
||||||
BlockFix_UnionFaces aFaceUnifier;
|
BlockFix_UnionFaces aFaceUnifier;
|
||||||
aFaceUnifier.GetTolerance() = myTolerance;
|
aFaceUnifier.GetTolerance() = myTolerance;
|
||||||
aFaceUnifier.GetOptimumNbFaces() = myOptimumNbFaces;
|
aFaceUnifier.GetOptimumNbFaces() = myOptimumNbFaces;
|
||||||
TopoDS_Shape aResult = aFaceUnifier.Perform(myShape);
|
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;
|
BlockFix_UnionEdges anEdgeUnifier;
|
||||||
myShape = anEdgeUnifier.Perform(aResult,myTolerance);
|
myShape = anEdgeUnifier.Perform(aResult,myTolerance);
|
||||||
|
|
||||||
|
@ -50,21 +50,21 @@ class TopoDS_Shape;
|
|||||||
class BlockFix_BlockFixAPI : public MMgt_TShared
|
class BlockFix_BlockFixAPI : public MMgt_TShared
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void* operator new(size_t,void* anAddress)
|
void* operator new(size_t,void* anAddress)
|
||||||
{
|
{
|
||||||
return anAddress;
|
return anAddress;
|
||||||
}
|
}
|
||||||
void* operator new(size_t size)
|
void* operator new(size_t size)
|
||||||
{
|
{
|
||||||
return Standard::Allocate(size);
|
return Standard::Allocate(size);
|
||||||
}
|
}
|
||||||
void operator delete(void *anAddress)
|
void operator delete(void *anAddress)
|
||||||
{
|
{
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Methods PUBLIC
|
// Methods PUBLIC
|
||||||
//
|
//
|
||||||
Standard_EXPORT BlockFix_BlockFixAPI();
|
Standard_EXPORT BlockFix_BlockFixAPI();
|
||||||
void SetShape(const TopoDS_Shape& Shape);
|
void SetShape(const TopoDS_Shape& Shape);
|
||||||
Standard_EXPORT void Perform();
|
Standard_EXPORT void Perform();
|
||||||
@ -80,7 +80,7 @@ public:
|
|||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Fields PRIVATE
|
// Fields PRIVATE
|
||||||
//
|
//
|
||||||
Handle_ShapeBuild_ReShape myContext;
|
Handle_ShapeBuild_ReShape myContext;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
BlockFix_BlockFixAPI::~BlockFix_BlockFixAPI() {}
|
BlockFix_BlockFixAPI::~BlockFix_BlockFixAPI() {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT Handle_Standard_Type& BlockFix_BlockFixAPI_Type_()
|
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);
|
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared);
|
||||||
static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
|
static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
|
||||||
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);
|
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);
|
||||||
|
|
||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_BlockFixAPI",
|
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_BlockFixAPI",
|
||||||
@ -53,7 +53,7 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_BlockFixAPI_Type_()
|
|||||||
// DownCast method
|
// DownCast method
|
||||||
// allow safe downcasting
|
// 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;
|
Handle(BlockFix_BlockFixAPI) _anOtherObject;
|
||||||
|
|
||||||
@ -65,13 +65,13 @@ const Handle(BlockFix_BlockFixAPI) Handle(BlockFix_BlockFixAPI)::DownCast(const
|
|||||||
|
|
||||||
return _anOtherObject ;
|
return _anOtherObject ;
|
||||||
}
|
}
|
||||||
const Handle(Standard_Type)& BlockFix_BlockFixAPI::DynamicType() const
|
const Handle(Standard_Type)& BlockFix_BlockFixAPI::DynamicType() const
|
||||||
{
|
{
|
||||||
return STANDARD_TYPE(BlockFix_BlockFixAPI) ;
|
return STANDARD_TYPE(BlockFix_BlockFixAPI) ;
|
||||||
}
|
}
|
||||||
Standard_Boolean BlockFix_BlockFixAPI::IsKind(const Handle(Standard_Type)& AType) const
|
Standard_Boolean BlockFix_BlockFixAPI::IsKind(const Handle(Standard_Type)& AType) const
|
||||||
{
|
{
|
||||||
return (STANDARD_TYPE(BlockFix_BlockFixAPI) == AType || MMgt_TShared::IsKind(AType));
|
return (STANDARD_TYPE(BlockFix_BlockFixAPI) == AType || MMgt_TShared::IsKind(AType));
|
||||||
}
|
}
|
||||||
Handle_BlockFix_BlockFixAPI::~Handle_BlockFix_BlockFixAPI() {}
|
Handle_BlockFix_BlockFixAPI::~Handle_BlockFix_BlockFixAPI() {}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetShape
|
//function : SetShape
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
inline void BlockFix_BlockFixAPI::SetShape(const TopoDS_Shape& Shape)
|
inline void BlockFix_BlockFixAPI::SetShape(const TopoDS_Shape& Shape)
|
||||||
@ -34,7 +34,7 @@ inline void BlockFix_BlockFixAPI::SetShape(const TopoDS_Shape& Shape)
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Shape
|
//function : Shape
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
inline TopoDS_Shape BlockFix_BlockFixAPI::Shape() const
|
inline TopoDS_Shape BlockFix_BlockFixAPI::Shape() const
|
||||||
@ -44,7 +44,7 @@ inline TopoDS_Shape BlockFix_BlockFixAPI::Shape() const
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Context
|
//function : Context
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
inline Handle(ShapeBuild_ReShape)& BlockFix_BlockFixAPI::Context()
|
inline Handle(ShapeBuild_ReShape)& BlockFix_BlockFixAPI::Context()
|
||||||
@ -54,7 +54,7 @@ inline Handle(ShapeBuild_ReShape)& BlockFix_BlockFixAPI::Context()
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Tolerance
|
//function : Tolerance
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
inline Standard_Real& BlockFix_BlockFixAPI::Tolerance()
|
inline Standard_Real& BlockFix_BlockFixAPI::Tolerance()
|
||||||
@ -64,7 +64,7 @@ inline Standard_Real& BlockFix_BlockFixAPI::Tolerance()
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : OptimumNbFaces
|
//function : OptimumNbFaces
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
inline Standard_Integer& BlockFix_BlockFixAPI::OptimumNbFaces()
|
inline Standard_Integer& BlockFix_BlockFixAPI::OptimumNbFaces()
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
class CheckTool from BlockFix
|
class CheckTool from BlockFix
|
||||||
|
|
||||||
---Purpose:
|
---Purpose:
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
|
||||||
Shape from TopoDS,
|
Shape from TopoDS,
|
||||||
@ -37,18 +37,18 @@ is
|
|||||||
|
|
||||||
Create returns CheckTool from BlockFix;
|
Create returns CheckTool from BlockFix;
|
||||||
---Purpose: Empty constructor
|
---Purpose: Empty constructor
|
||||||
|
|
||||||
SetShape(me: in out; aShape: Shape from TopoDS);
|
SetShape(me: in out; aShape: Shape from TopoDS);
|
||||||
|
|
||||||
Perform(me: in out);
|
Perform(me: in out);
|
||||||
---Purpose:
|
---Purpose:
|
||||||
|
|
||||||
NbPossibleBlocks(me) returns Integer;
|
NbPossibleBlocks(me) returns Integer;
|
||||||
|
|
||||||
PossibleBlock(me; num: Integer) returns Shape from TopoDS;
|
PossibleBlock(me; num: Integer) returns Shape from TopoDS;
|
||||||
|
|
||||||
DumpCheckResult(me; S : in out OStream);
|
DumpCheckResult(me; S : in out OStream);
|
||||||
---Purpose: Dumps results of checking
|
---Purpose: Dumps results of checking
|
||||||
|
|
||||||
|
|
||||||
fields
|
fields
|
||||||
@ -63,5 +63,5 @@ fields
|
|||||||
myNbUE : Integer;
|
myNbUE : Integer;
|
||||||
myNbUFUE : Integer;
|
myNbUFUE : Integer;
|
||||||
myBadRanges : Integer;
|
myBadRanges : Integer;
|
||||||
|
|
||||||
end CheckTool;
|
end CheckTool;
|
||||||
|
@ -57,7 +57,7 @@ BlockFix_CheckTool::BlockFix_CheckTool( )
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetShape
|
//function : SetShape
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void BlockFix_CheckTool::SetShape(const TopoDS_Shape& aShape)
|
void BlockFix_CheckTool::SetShape(const TopoDS_Shape& aShape)
|
||||||
@ -70,10 +70,10 @@ void BlockFix_CheckTool::SetShape(const TopoDS_Shape& aShape)
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Perform
|
//function : Perform
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void BlockFix_CheckTool::Perform()
|
void BlockFix_CheckTool::Perform()
|
||||||
{
|
{
|
||||||
myNbSolids=0;
|
myNbSolids=0;
|
||||||
myNbBlocks=0;
|
myNbBlocks=0;
|
||||||
@ -209,7 +209,7 @@ void BlockFix_CheckTool::Perform()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsBlock)
|
if (IsBlock)
|
||||||
myNbBlocks++;
|
myNbBlocks++;
|
||||||
else {
|
else {
|
||||||
if (MayBeUF) {
|
if (MayBeUF) {
|
||||||
@ -232,7 +232,7 @@ void BlockFix_CheckTool::Perform()
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : NbPossibleBlocks
|
//function : NbPossibleBlocks
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
Standard_Integer BlockFix_CheckTool::NbPossibleBlocks() const
|
Standard_Integer BlockFix_CheckTool::NbPossibleBlocks() const
|
||||||
@ -243,13 +243,13 @@ Standard_Integer BlockFix_CheckTool::NbPossibleBlocks() const
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : PossibleBlock
|
//function : PossibleBlock
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
TopoDS_Shape BlockFix_CheckTool::PossibleBlock(const Standard_Integer num) const
|
TopoDS_Shape BlockFix_CheckTool::PossibleBlock(const Standard_Integer num) const
|
||||||
{
|
{
|
||||||
TopoDS_Shape res;
|
TopoDS_Shape res;
|
||||||
if( num>0 && num<=myPossibleBlocks.Length() )
|
if( num>0 && num<=myPossibleBlocks.Length() )
|
||||||
res = myPossibleBlocks.Value(num);
|
res = myPossibleBlocks.Value(num);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -257,7 +257,7 @@ TopoDS_Shape BlockFix_CheckTool::PossibleBlock(const Standard_Integer num) const
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : DumpCheckResult
|
//function : DumpCheckResult
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void BlockFix_CheckTool::DumpCheckResult(Standard_OStream& S) const
|
void BlockFix_CheckTool::DumpCheckResult(Standard_OStream& S) const
|
||||||
|
@ -52,20 +52,20 @@ class BlockFix_CheckTool {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void* operator new(size_t,void* anAddress)
|
void* operator new(size_t,void* anAddress)
|
||||||
{
|
{
|
||||||
return anAddress;
|
return anAddress;
|
||||||
}
|
}
|
||||||
void* operator new(size_t size)
|
void* operator new(size_t size)
|
||||||
{
|
{
|
||||||
return Standard::Allocate(size);
|
return Standard::Allocate(size);
|
||||||
}
|
}
|
||||||
void operator delete(void *anAddress)
|
void operator delete(void *anAddress)
|
||||||
{
|
{
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||||
}
|
}
|
||||||
// Methods PUBLIC
|
// Methods PUBLIC
|
||||||
//
|
//
|
||||||
Standard_EXPORT BlockFix_CheckTool();
|
Standard_EXPORT BlockFix_CheckTool();
|
||||||
Standard_EXPORT void SetShape(const TopoDS_Shape& aShape) ;
|
Standard_EXPORT void SetShape(const TopoDS_Shape& aShape) ;
|
||||||
Standard_EXPORT void Perform() ;
|
Standard_EXPORT void Perform() ;
|
||||||
@ -80,17 +80,17 @@ Standard_EXPORT void DumpCheckResult(Standard_OStream& S) const;
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Methods PROTECTED
|
// Methods PROTECTED
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
// Fields PROTECTED
|
// Fields PROTECTED
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Methods PRIVATE
|
// Methods PRIVATE
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
// Fields PRIVATE
|
// Fields PRIVATE
|
||||||
|
@ -22,6 +22,6 @@
|
|||||||
|
|
||||||
#include <BlockFix_CheckTool.jxx>
|
#include <BlockFix_CheckTool.jxx>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,12 +24,12 @@
|
|||||||
-- Created: Wed Dec 15 10:03:50 2004
|
-- Created: Wed Dec 15 10:03:50 2004
|
||||||
-- Author: Sergey KUUL
|
-- Author: Sergey KUUL
|
||||||
--
|
--
|
||||||
class PeriodicSurfaceModifier from BlockFix inherits Modification from BRepTools
|
class PeriodicSurfaceModifier from BlockFix inherits Modification from BRepTools
|
||||||
|
|
||||||
---Purpose:
|
---Purpose:
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Vertex from TopoDS,
|
Vertex from TopoDS,
|
||||||
Edge from TopoDS,
|
Edge from TopoDS,
|
||||||
Face from TopoDS,
|
Face from TopoDS,
|
||||||
Location from TopLoc,
|
Location from TopLoc,
|
||||||
@ -42,9 +42,9 @@ uses
|
|||||||
DataMapOfShapeInteger from TopTools
|
DataMapOfShapeInteger from TopTools
|
||||||
|
|
||||||
is
|
is
|
||||||
|
|
||||||
Create returns mutable PeriodicSurfaceModifier from BlockFix;
|
Create returns mutable PeriodicSurfaceModifier from BlockFix;
|
||||||
|
|
||||||
SetTolerance(me: mutable; Toler: Real);
|
SetTolerance(me: mutable; Toler: Real);
|
||||||
---Purpose: Sets the tolerance for recognition of geometry
|
---Purpose: Sets the tolerance for recognition of geometry
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ is
|
|||||||
-- the new tolerance. Otherwise, returns
|
-- the new tolerance. Otherwise, returns
|
||||||
-- Standard_False, and <S>, <L>, <Tol> are not
|
-- Standard_False, and <S>, <L>, <Tol> are not
|
||||||
-- significant.
|
-- significant.
|
||||||
|
|
||||||
NewCurve(me: mutable; E : Edge from TopoDS;
|
NewCurve(me: mutable; E : Edge from TopoDS;
|
||||||
C : out Curve from Geom;
|
C : out Curve from Geom;
|
||||||
L : out Location from TopLoc;
|
L : out Location from TopLoc;
|
||||||
@ -95,10 +95,10 @@ is
|
|||||||
-- curve on surface on the face <F>.In this case, <C>
|
-- curve on surface on the face <F>.In this case, <C>
|
||||||
-- is the new geometric support of the edge, <L> the
|
-- is the new geometric support of the edge, <L> the
|
||||||
-- new location, <Tol> the new tolerance.
|
-- new location, <Tol> the new tolerance.
|
||||||
--
|
--
|
||||||
-- Otherwise, returns Standard_False, and <C>, <L>,
|
-- Otherwise, returns Standard_False, and <C>, <L>,
|
||||||
-- <Tol> are not significant.
|
-- <Tol> are not significant.
|
||||||
--
|
--
|
||||||
-- <NewE> is the new edge created from <E>. <NewF>
|
-- <NewE> is the new edge created from <E>. <NewF>
|
||||||
-- is the new face created from <F>. They may be usefull.
|
-- is the new face created from <F>. They may be usefull.
|
||||||
|
|
||||||
@ -120,14 +120,14 @@ is
|
|||||||
returns Shape from GeomAbs;
|
returns Shape from GeomAbs;
|
||||||
---Purpose: Returns the continuity of <NewE> between <NewF1>
|
---Purpose: Returns the continuity of <NewE> between <NewF1>
|
||||||
-- and <NewF2>.
|
-- and <NewF2>.
|
||||||
--
|
--
|
||||||
-- <NewE> is the new edge created from <E>. <NewF1>
|
-- <NewE> is the new edge created from <E>. <NewF1>
|
||||||
-- (resp. <NewF2>) is the new face created from <F1>
|
-- (resp. <NewF2>) is the new face created from <F1>
|
||||||
-- (resp. <F2>).
|
-- (resp. <F2>).
|
||||||
|
|
||||||
|
|
||||||
fields
|
|
||||||
|
fields
|
||||||
|
|
||||||
myTolerance : Real;
|
myTolerance : Real;
|
||||||
myMapOfFaces : DataMapOfShapeInteger from TopTools;
|
myMapOfFaces : DataMapOfShapeInteger from TopTools;
|
||||||
myMapOfSurfaces: IndexedMapOfTransient from TColStd;
|
myMapOfSurfaces: IndexedMapOfTransient from TColStd;
|
||||||
|
@ -49,7 +49,7 @@ BlockFix_PeriodicSurfaceModifier::BlockFix_PeriodicSurfaceModifier ( )
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetTolerance
|
//function : SetTolerance
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void BlockFix_PeriodicSurfaceModifier::SetTolerance(const Standard_Real Tol)
|
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;
|
Handle(Geom_Surface) S = aSurface;
|
||||||
|
|
||||||
if(S->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) {
|
if(S->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) {
|
||||||
Handle(Geom_CylindricalSurface) aCyl =
|
Handle(Geom_CylindricalSurface) aCyl =
|
||||||
Handle(Geom_CylindricalSurface)::DownCast(S);
|
Handle(Geom_CylindricalSurface)::DownCast(S);
|
||||||
Standard_Real Umin, Umax, Vmin, Vmax;
|
Standard_Real Umin, Umax, Vmin, Vmax;
|
||||||
BRepTools::UVBounds(aFace, 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;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(S->IsKind(STANDARD_TYPE(Geom_SphericalSurface))) {
|
if(S->IsKind(STANDARD_TYPE(Geom_SphericalSurface))) {
|
||||||
Handle(Geom_SphericalSurface) aSphere = Handle(Geom_SphericalSurface)::DownCast(S);
|
Handle(Geom_SphericalSurface) aSphere = Handle(Geom_SphericalSurface)::DownCast(S);
|
||||||
Standard_Real Umin, Umax, Vmin, Vmax;
|
Standard_Real Umin, Umax, Vmin, Vmax;
|
||||||
@ -101,30 +101,30 @@ static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
|
|||||||
|
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : NewSurface
|
//function : NewSurface
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewSurface(const TopoDS_Face& F,
|
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewSurface(const TopoDS_Face& F,
|
||||||
Handle(Geom_Surface)& S,
|
Handle(Geom_Surface)& S,
|
||||||
TopLoc_Location& L,Standard_Real& Tol,
|
TopLoc_Location& L,Standard_Real& Tol,
|
||||||
Standard_Boolean& RevWires,
|
Standard_Boolean& RevWires,
|
||||||
Standard_Boolean& RevFace)
|
Standard_Boolean& RevFace)
|
||||||
{
|
{
|
||||||
TopLoc_Location LS;
|
TopLoc_Location LS;
|
||||||
Handle(Geom_Surface) SIni = BRep_Tool::Surface(F, LS);
|
Handle(Geom_Surface) SIni = BRep_Tool::Surface(F, LS);
|
||||||
|
|
||||||
if(ModifySurface(F, SIni, S)) {
|
if(ModifySurface(F, SIni, S)) {
|
||||||
|
|
||||||
RevWires = Standard_False;
|
RevWires = Standard_False;
|
||||||
RevFace = Standard_False;
|
RevFace = Standard_False;
|
||||||
|
|
||||||
L = LS;
|
L = LS;
|
||||||
Tol = BRep_Tool::Tolerance(F);
|
Tol = BRep_Tool::Tolerance(F);
|
||||||
|
|
||||||
Standard_Integer anIndex = myMapOfSurfaces.Add(S);
|
Standard_Integer anIndex = myMapOfSurfaces.Add(S);
|
||||||
myMapOfFaces.Bind(F,anIndex);
|
myMapOfFaces.Bind(F,anIndex);
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
@ -136,13 +136,13 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewSurface(const TopoDS_Face&
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : NewCurve
|
//function : NewCurve
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve(const TopoDS_Edge& /*E*/,
|
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve(const TopoDS_Edge& /*E*/,
|
||||||
Handle(Geom_Curve)& /*C*/,
|
Handle(Geom_Curve)& /*C*/,
|
||||||
TopLoc_Location& /*L*/,
|
TopLoc_Location& /*L*/,
|
||||||
Standard_Real& /*Tol*/)
|
Standard_Real& /*Tol*/)
|
||||||
{
|
{
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
@ -150,12 +150,12 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve(const TopoDS_Edge& /
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : NewPoint
|
//function : NewPoint
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewPoint(const TopoDS_Vertex& /*V*/,
|
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewPoint(const TopoDS_Vertex& /*V*/,
|
||||||
gp_Pnt& /*P*/,
|
gp_Pnt& /*P*/,
|
||||||
Standard_Real& /*Tol*/)
|
Standard_Real& /*Tol*/)
|
||||||
{
|
{
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
@ -163,7 +163,7 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewPoint(const TopoDS_Vertex&
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : NewCurve2d
|
//function : NewCurve2d
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve2d(const TopoDS_Edge& E,
|
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_Edge& /*NewE*/,
|
||||||
const TopoDS_Face& /*NewF*/,
|
const TopoDS_Face& /*NewF*/,
|
||||||
Handle(Geom2d_Curve)& C,
|
Handle(Geom2d_Curve)& C,
|
||||||
Standard_Real& Tol)
|
Standard_Real& Tol)
|
||||||
{
|
{
|
||||||
//check if undelying surface of the face was modified
|
//check if undelying surface of the face was modified
|
||||||
if(myMapOfFaces.IsBound(F)) {
|
if(myMapOfFaces.IsBound(F)) {
|
||||||
Standard_Integer anIndex = myMapOfFaces.Find(F);
|
Standard_Integer anIndex = myMapOfFaces.Find(F);
|
||||||
|
|
||||||
Handle(Geom_Surface) aNewSurf = Handle(Geom_Surface)::DownCast(myMapOfSurfaces.FindKey(anIndex));
|
Handle(Geom_Surface) aNewSurf = Handle(Geom_Surface)::DownCast(myMapOfSurfaces.FindKey(anIndex));
|
||||||
|
|
||||||
Standard_Real f,l;
|
Standard_Real f,l;
|
||||||
TopLoc_Location LC, LS;
|
TopLoc_Location LC, LS;
|
||||||
Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l );
|
Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l );
|
||||||
Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS);
|
Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS);
|
||||||
|
|
||||||
//taking into accound the orientation of the seam
|
//taking into accound the orientation of the seam
|
||||||
C = BRep_Tool::CurveOnSurface(E,F,f,l);
|
C = BRep_Tool::CurveOnSurface(E,F,f,l);
|
||||||
Tol = BRep_Tool::Tolerance(E);
|
Tol = BRep_Tool::Tolerance(E);
|
||||||
|
|
||||||
BRep_Builder B;
|
BRep_Builder B;
|
||||||
TopoDS_Edge TempE;
|
TopoDS_Edge TempE;
|
||||||
B.MakeEdge(TempE);
|
B.MakeEdge(TempE);
|
||||||
B.Add(TempE, TopExp::FirstVertex(E));
|
B.Add(TempE, TopExp::FirstVertex(E));
|
||||||
B.Add(TempE, TopExp::LastVertex(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.UpdateEdge(TempE, Handle(Geom_Curve)::DownCast(C3d->Transformed(LC.Transformation())), Precision::Confusion());
|
||||||
B.Range(TempE, f, l);
|
B.Range(TempE, f, l);
|
||||||
|
|
||||||
Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge;
|
Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge;
|
||||||
Handle(Geom_Surface) STemp = Handle(Geom_Surface)::DownCast(aNewSurf->Transformed(LS.Transformation()));
|
Handle(Geom_Surface) STemp = Handle(Geom_Surface)::DownCast(aNewSurf->Transformed(LS.Transformation()));
|
||||||
TopLoc_Location LTemp;
|
TopLoc_Location LTemp;
|
||||||
LTemp.Identity();
|
LTemp.Identity();
|
||||||
|
|
||||||
Standard_Boolean isClosed = BRep_Tool::IsClosed (E, F);
|
Standard_Boolean isClosed = BRep_Tool::IsClosed (E, F);
|
||||||
Standard_Real aWorkTol = 2*myTolerance+Tol;
|
Standard_Real aWorkTol = 2*myTolerance+Tol;
|
||||||
sfe->FixAddPCurve(TempE, STemp, LTemp, isClosed, Max(Precision::Confusion(), aWorkTol));
|
sfe->FixAddPCurve(TempE, STemp, LTemp, isClosed, Max(Precision::Confusion(), aWorkTol));
|
||||||
sfe->FixSameParameter(TempE);
|
sfe->FixSameParameter(TempE);
|
||||||
|
|
||||||
//keep the orientation of original edge
|
//keep the orientation of original edge
|
||||||
TempE.Orientation(E.Orientation());
|
TempE.Orientation(E.Orientation());
|
||||||
C = BRep_Tool::CurveOnSurface(TempE, STemp, LTemp, f, l);
|
C = BRep_Tool::CurveOnSurface(TempE, STemp, LTemp, f, l);
|
||||||
|
|
||||||
//surface was modified
|
//surface was modified
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
@ -222,13 +222,13 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve2d(const TopoDS_Edge&
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : NewParameter
|
//function : NewParameter
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewParameter(const TopoDS_Vertex& /*V*/,
|
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewParameter(const TopoDS_Vertex& /*V*/,
|
||||||
const TopoDS_Edge& /*E*/,
|
const TopoDS_Edge& /*E*/,
|
||||||
Standard_Real& /*P*/,
|
Standard_Real& /*P*/,
|
||||||
Standard_Real& /*Tol*/)
|
Standard_Real& /*Tol*/)
|
||||||
{
|
{
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
@ -236,7 +236,7 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewParameter(const TopoDS_Ver
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Continuity
|
//function : Continuity
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
GeomAbs_Shape BlockFix_PeriodicSurfaceModifier::Continuity(const TopoDS_Edge& E,
|
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_Face& F2,
|
||||||
const TopoDS_Edge& /*NewE*/,
|
const TopoDS_Edge& /*NewE*/,
|
||||||
const TopoDS_Face& /*NewF1*/,
|
const TopoDS_Face& /*NewF1*/,
|
||||||
const TopoDS_Face& /*NewF2*/)
|
const TopoDS_Face& /*NewF2*/)
|
||||||
{
|
{
|
||||||
return BRep_Tool::Continuity(E,F1,F2);
|
return BRep_Tool::Continuity(E,F1,F2);
|
||||||
}
|
}
|
||||||
|
@ -71,20 +71,20 @@ class BlockFix_PeriodicSurfaceModifier : public BRepTools_Modification {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void* operator new(size_t,void* anAddress)
|
void* operator new(size_t,void* anAddress)
|
||||||
{
|
{
|
||||||
return anAddress;
|
return anAddress;
|
||||||
}
|
}
|
||||||
void* operator new(size_t size)
|
void* operator new(size_t size)
|
||||||
{
|
{
|
||||||
return Standard::Allocate(size);
|
return Standard::Allocate(size);
|
||||||
}
|
}
|
||||||
void operator delete(void *anAddress)
|
void operator delete(void *anAddress)
|
||||||
{
|
{
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||||
}
|
}
|
||||||
// Methods PUBLIC
|
// Methods PUBLIC
|
||||||
//
|
//
|
||||||
Standard_EXPORT BlockFix_PeriodicSurfaceModifier();
|
Standard_EXPORT BlockFix_PeriodicSurfaceModifier();
|
||||||
Standard_EXPORT void SetTolerance(const Standard_Real Toler) ;
|
Standard_EXPORT void SetTolerance(const Standard_Real Toler) ;
|
||||||
Standard_EXPORT Standard_Boolean NewSurface(const TopoDS_Face& F,Handle(Geom_Surface)& S,TopLoc_Location& L,Standard_Real& Tol,Standard_Boolean& RevWires,Standard_Boolean& RevFace) ;
|
Standard_EXPORT Standard_Boolean 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:
|
protected:
|
||||||
|
|
||||||
// Methods PROTECTED
|
// Methods PROTECTED
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
// Fields PROTECTED
|
// Fields PROTECTED
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Methods PRIVATE
|
// Methods PRIVATE
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
// Fields PRIVATE
|
// Fields PRIVATE
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
BlockFix_PeriodicSurfaceModifier::~BlockFix_PeriodicSurfaceModifier() {}
|
BlockFix_PeriodicSurfaceModifier::~BlockFix_PeriodicSurfaceModifier() {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_()
|
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);
|
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
|
||||||
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
|
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
|
||||||
if ( aType3.IsNull()) 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_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_PeriodicSurfaceModifier",
|
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_PeriodicSurfaceModifier",
|
||||||
@ -55,7 +55,7 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_()
|
|||||||
// DownCast method
|
// DownCast method
|
||||||
// allow safe downcasting
|
// 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;
|
Handle(BlockFix_PeriodicSurfaceModifier) _anOtherObject;
|
||||||
|
|
||||||
@ -67,13 +67,13 @@ const Handle(BlockFix_PeriodicSurfaceModifier) Handle(BlockFix_PeriodicSurfaceMo
|
|||||||
|
|
||||||
return _anOtherObject ;
|
return _anOtherObject ;
|
||||||
}
|
}
|
||||||
const Handle(Standard_Type)& BlockFix_PeriodicSurfaceModifier::DynamicType() const
|
const Handle(Standard_Type)& BlockFix_PeriodicSurfaceModifier::DynamicType() const
|
||||||
{
|
{
|
||||||
return STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) ;
|
return STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) ;
|
||||||
}
|
}
|
||||||
Standard_Boolean BlockFix_PeriodicSurfaceModifier::IsKind(const Handle(Standard_Type)& AType) const
|
Standard_Boolean BlockFix_PeriodicSurfaceModifier::IsKind(const Handle(Standard_Type)& AType) const
|
||||||
{
|
{
|
||||||
return (STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) == AType || BRepTools_Modification::IsKind(AType));
|
return (STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) == AType || BRepTools_Modification::IsKind(AType));
|
||||||
}
|
}
|
||||||
Handle_BlockFix_PeriodicSurfaceModifier::~Handle_BlockFix_PeriodicSurfaceModifier() {}
|
Handle_BlockFix_PeriodicSurfaceModifier::~Handle_BlockFix_PeriodicSurfaceModifier() {}
|
||||||
|
|
||||||
|
@ -24,13 +24,13 @@
|
|||||||
-- Created: Tue Dec 7 12:01:49 2004
|
-- Created: Tue Dec 7 12:01:49 2004
|
||||||
-- Author: Pavel Durandin
|
-- 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
|
---Purpose: Rotation of the parametric space of the sphere in order
|
||||||
-- to avoid the seam and degenerared edge within it
|
-- to avoid the seam and degenerared edge within it
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Vertex from TopoDS,
|
Vertex from TopoDS,
|
||||||
Edge from TopoDS,
|
Edge from TopoDS,
|
||||||
Face from TopoDS,
|
Face from TopoDS,
|
||||||
Location from TopLoc,
|
Location from TopLoc,
|
||||||
@ -43,9 +43,9 @@ uses
|
|||||||
DataMapOfShapeInteger from TopTools
|
DataMapOfShapeInteger from TopTools
|
||||||
|
|
||||||
is
|
is
|
||||||
|
|
||||||
Create returns mutable SphereSpaceModifier from BlockFix;
|
Create returns mutable SphereSpaceModifier from BlockFix;
|
||||||
|
|
||||||
SetTolerance(me: mutable; Toler: Real);
|
SetTolerance(me: mutable; Toler: Real);
|
||||||
---Purpose: Sets the tolerance for recognition of geometry
|
---Purpose: Sets the tolerance for recognition of geometry
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ is
|
|||||||
-- the new tolerance. Otherwise, returns
|
-- the new tolerance. Otherwise, returns
|
||||||
-- Standard_False, and <S>, <L>, <Tol> are not
|
-- Standard_False, and <S>, <L>, <Tol> are not
|
||||||
-- significant.
|
-- significant.
|
||||||
|
|
||||||
NewCurve(me: mutable; E : Edge from TopoDS;
|
NewCurve(me: mutable; E : Edge from TopoDS;
|
||||||
C : out Curve from Geom;
|
C : out Curve from Geom;
|
||||||
L : out Location from TopLoc;
|
L : out Location from TopLoc;
|
||||||
@ -96,10 +96,10 @@ is
|
|||||||
-- curve on surface on the face <F>.In this case, <C>
|
-- curve on surface on the face <F>.In this case, <C>
|
||||||
-- is the new geometric support of the edge, <L> the
|
-- is the new geometric support of the edge, <L> the
|
||||||
-- new location, <Tol> the new tolerance.
|
-- new location, <Tol> the new tolerance.
|
||||||
--
|
--
|
||||||
-- Otherwise, returns Standard_False, and <C>, <L>,
|
-- Otherwise, returns Standard_False, and <C>, <L>,
|
||||||
-- <Tol> are not significant.
|
-- <Tol> are not significant.
|
||||||
--
|
--
|
||||||
-- <NewE> is the new edge created from <E>. <NewF>
|
-- <NewE> is the new edge created from <E>. <NewF>
|
||||||
-- is the new face created from <F>. They may be usefull.
|
-- is the new face created from <F>. They may be usefull.
|
||||||
|
|
||||||
@ -121,15 +121,15 @@ is
|
|||||||
returns Shape from GeomAbs;
|
returns Shape from GeomAbs;
|
||||||
---Purpose: Returns the continuity of <NewE> between <NewF1>
|
---Purpose: Returns the continuity of <NewE> between <NewF1>
|
||||||
-- and <NewF2>.
|
-- and <NewF2>.
|
||||||
--
|
--
|
||||||
-- <NewE> is the new edge created from <E>. <NewF1>
|
-- <NewE> is the new edge created from <E>. <NewF1>
|
||||||
-- (resp. <NewF2>) is the new face created from <F1>
|
-- (resp. <NewF2>) is the new face created from <F1>
|
||||||
-- (resp. <F2>).
|
-- (resp. <F2>).
|
||||||
|
|
||||||
ForRotation(me: mutable; F: Face from TopoDS) returns Boolean;
|
ForRotation(me: mutable; F: Face from TopoDS) returns Boolean;
|
||||||
|
|
||||||
fields
|
fields
|
||||||
|
|
||||||
myTolerance : Real;
|
myTolerance : Real;
|
||||||
myMapOfFaces : DataMapOfShapeInteger from TopTools;
|
myMapOfFaces : DataMapOfShapeInteger from TopTools;
|
||||||
myMapOfSpheres: IndexedMapOfTransient from TColStd;
|
myMapOfSpheres: IndexedMapOfTransient from TColStd;
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : BlockFix_SphereSpaceModifier
|
//function : BlockFix_SphereSpaceModifier
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
BlockFix_SphereSpaceModifier::BlockFix_SphereSpaceModifier()
|
BlockFix_SphereSpaceModifier::BlockFix_SphereSpaceModifier()
|
||||||
@ -55,7 +55,7 @@ BlockFix_SphereSpaceModifier::BlockFix_SphereSpaceModifier()
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetTolerance
|
//function : SetTolerance
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void BlockFix_SphereSpaceModifier::SetTolerance(const Standard_Real Tol)
|
void BlockFix_SphereSpaceModifier::SetTolerance(const Standard_Real Tol)
|
||||||
@ -66,7 +66,7 @@ void BlockFix_SphereSpaceModifier::SetTolerance(const Standard_Real Tol)
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : NewSurface
|
//function : NewSurface
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
|
|
||||||
@ -76,11 +76,11 @@ static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
|
|||||||
{
|
{
|
||||||
Handle(Geom_Surface) S = aSurface;
|
Handle(Geom_Surface) S = aSurface;
|
||||||
if(S->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
|
if(S->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
|
||||||
Handle(Geom_RectangularTrimmedSurface) RTS =
|
Handle(Geom_RectangularTrimmedSurface) RTS =
|
||||||
Handle(Geom_RectangularTrimmedSurface)::DownCast(S);
|
Handle(Geom_RectangularTrimmedSurface)::DownCast(S);
|
||||||
S = RTS->BasisSurface();
|
S = RTS->BasisSurface();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(S->IsKind(STANDARD_TYPE(Geom_SphericalSurface))) {
|
if(S->IsKind(STANDARD_TYPE(Geom_SphericalSurface))) {
|
||||||
Standard_Real Umin, Umax, Vmin, Vmax;
|
Standard_Real Umin, Umax, Vmin, Vmax;
|
||||||
ShapeAnalysis::GetFaceUVBounds(aFace,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;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Standard_Boolean BlockFix_SphereSpaceModifier::NewSurface(const TopoDS_Face& F,
|
Standard_Boolean BlockFix_SphereSpaceModifier::NewSurface(const TopoDS_Face& F,
|
||||||
Handle(Geom_Surface)& S,
|
Handle(Geom_Surface)& S,
|
||||||
TopLoc_Location& L,Standard_Real& Tol,
|
TopLoc_Location& L,Standard_Real& Tol,
|
||||||
Standard_Boolean& RevWires,
|
Standard_Boolean& RevWires,
|
||||||
Standard_Boolean& RevFace)
|
Standard_Boolean& RevFace)
|
||||||
{
|
{
|
||||||
TopLoc_Location LS;
|
TopLoc_Location LS;
|
||||||
Handle(Geom_Surface) SIni = BRep_Tool::Surface(F, LS);
|
Handle(Geom_Surface) SIni = BRep_Tool::Surface(F, LS);
|
||||||
|
|
||||||
//check if pole of the sphere in the parametric space
|
//check if pole of the sphere in the parametric space
|
||||||
if(ModifySurface(F, SIni, S)) {
|
if(ModifySurface(F, SIni, S)) {
|
||||||
|
|
||||||
RevWires = Standard_False;
|
RevWires = Standard_False;
|
||||||
RevFace = Standard_False;
|
RevFace = Standard_False;
|
||||||
|
|
||||||
L = LS;
|
L = LS;
|
||||||
Tol = BRep_Tool::Tolerance(F);
|
Tol = BRep_Tool::Tolerance(F);
|
||||||
|
|
||||||
Standard_Integer anIndex = myMapOfSpheres.Add(S);
|
Standard_Integer anIndex = myMapOfSpheres.Add(S);
|
||||||
myMapOfFaces.Bind(F,anIndex);
|
myMapOfFaces.Bind(F,anIndex);
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : NewCurve
|
//function : NewCurve
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve(const TopoDS_Edge& /*E*/,Handle(Geom_Curve)& /*C*/,
|
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;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : NewPoint
|
//function : NewPoint
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
Standard_Boolean BlockFix_SphereSpaceModifier::NewPoint(const TopoDS_Vertex& /*V*/,
|
Standard_Boolean BlockFix_SphereSpaceModifier::NewPoint(const TopoDS_Vertex& /*V*/,
|
||||||
gp_Pnt& /*P*/,
|
gp_Pnt& /*P*/,
|
||||||
Standard_Real& /*Tol*/)
|
Standard_Real& /*Tol*/)
|
||||||
{
|
{
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : NewCurve2d
|
//function : NewCurve2d
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve2d(const TopoDS_Edge& E,const TopoDS_Face& F,
|
Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve2d(const TopoDS_Edge& E,const TopoDS_Face& F,
|
||||||
const TopoDS_Edge& /*NewE*/,const TopoDS_Face& /*NewF*/,
|
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
|
//check if undelying surface of the face was modified
|
||||||
if(myMapOfFaces.IsBound(F)) {
|
if(myMapOfFaces.IsBound(F)) {
|
||||||
Standard_Integer anIndex = myMapOfFaces.Find(F);
|
Standard_Integer anIndex = myMapOfFaces.Find(F);
|
||||||
|
|
||||||
Handle(Geom_Surface) aNewSphere = Handle(Geom_Surface)::DownCast(myMapOfSpheres.FindKey(anIndex));
|
Handle(Geom_Surface) aNewSphere = Handle(Geom_Surface)::DownCast(myMapOfSpheres.FindKey(anIndex));
|
||||||
|
|
||||||
Standard_Real f,l;
|
Standard_Real f,l;
|
||||||
TopLoc_Location LC, LS;
|
TopLoc_Location LC, LS;
|
||||||
Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l );
|
Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l );
|
||||||
Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS);
|
Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS);
|
||||||
|
|
||||||
//taking into accound the orientation of the seam
|
//taking into accound the orientation of the seam
|
||||||
C = BRep_Tool::CurveOnSurface(E,F,f,l);
|
C = BRep_Tool::CurveOnSurface(E,F,f,l);
|
||||||
Tol = BRep_Tool::Tolerance(E);
|
Tol = BRep_Tool::Tolerance(E);
|
||||||
|
|
||||||
BRep_Builder B;
|
BRep_Builder B;
|
||||||
TopoDS_Edge TempE;
|
TopoDS_Edge TempE;
|
||||||
B.MakeEdge(TempE);
|
B.MakeEdge(TempE);
|
||||||
B.Add(TempE, TopExp::FirstVertex(E));
|
B.Add(TempE, TopExp::FirstVertex(E));
|
||||||
B.Add(TempE, TopExp::LastVertex(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.UpdateEdge(TempE, Handle(Geom_Curve)::DownCast(C3d->Transformed(LC.Transformation())), Precision::Confusion());
|
||||||
B.Range(TempE, f, l);
|
B.Range(TempE, f, l);
|
||||||
|
|
||||||
Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge;
|
Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge;
|
||||||
Handle(Geom_Surface) STemp = Handle(Geom_Surface)::DownCast(aNewSphere->Transformed(LS.Transformation()));
|
Handle(Geom_Surface) STemp = Handle(Geom_Surface)::DownCast(aNewSphere->Transformed(LS.Transformation()));
|
||||||
TopLoc_Location LTemp;
|
TopLoc_Location LTemp;
|
||||||
LTemp.Identity();
|
LTemp.Identity();
|
||||||
|
|
||||||
Standard_Boolean isClosed = BRep_Tool::IsClosed (E, F);
|
Standard_Boolean isClosed = BRep_Tool::IsClosed (E, F);
|
||||||
Standard_Real aWorkTol = 2*myTolerance+Tol;
|
Standard_Real aWorkTol = 2*myTolerance+Tol;
|
||||||
sfe->FixAddPCurve(TempE, STemp, LTemp, isClosed, Max(Precision::Confusion(), aWorkTol));
|
sfe->FixAddPCurve(TempE, STemp, LTemp, isClosed, Max(Precision::Confusion(), aWorkTol));
|
||||||
sfe->FixSameParameter(TempE);
|
sfe->FixSameParameter(TempE);
|
||||||
|
|
||||||
//keep the orientation of original edge
|
//keep the orientation of original edge
|
||||||
TempE.Orientation(E.Orientation());
|
TempE.Orientation(E.Orientation());
|
||||||
C = BRep_Tool::CurveOnSurface(TempE, STemp, LTemp, f, l);
|
C = BRep_Tool::CurveOnSurface(TempE, STemp, LTemp, f, l);
|
||||||
|
|
||||||
// shifting seam of sphere
|
// shifting seam of sphere
|
||||||
if(isClosed && !C.IsNull()) {
|
if(isClosed && !C.IsNull()) {
|
||||||
Standard_Real f2,l2;
|
Standard_Real f2,l2;
|
||||||
Handle(Geom2d_Curve) c22 =
|
Handle(Geom2d_Curve) c22 =
|
||||||
BRep_Tool::CurveOnSurface(TopoDS::Edge(TempE.Reversed()),STemp, LTemp,f2,l2);
|
BRep_Tool::CurveOnSurface(TopoDS::Edge(TempE.Reversed()),STemp, LTemp,f2,l2);
|
||||||
Standard_Real dPreci = Precision::PConfusion()*Precision::PConfusion();
|
Standard_Real dPreci = Precision::PConfusion()*Precision::PConfusion();
|
||||||
if((C->Value(f).SquareDistance(c22->Value(f2)) < dPreci)
|
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
|
//function : NewParameter
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
Standard_Boolean BlockFix_SphereSpaceModifier::NewParameter(const TopoDS_Vertex& /*V*/,const TopoDS_Edge& /*E*/,
|
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;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
@ -252,12 +252,12 @@ Standard_Boolean BlockFix_SphereSpaceModifier::NewParameter(const TopoDS_Vertex&
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Continuity
|
//function : Continuity
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
GeomAbs_Shape BlockFix_SphereSpaceModifier::Continuity(const TopoDS_Edge& E,const TopoDS_Face& F1,
|
GeomAbs_Shape BlockFix_SphereSpaceModifier::Continuity(const TopoDS_Edge& E,const TopoDS_Face& F1,
|
||||||
const TopoDS_Face& F2,const TopoDS_Edge& /*NewE*/,
|
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);
|
return BRep_Tool::Continuity(E,F1,F2);
|
||||||
}
|
}
|
||||||
|
@ -71,20 +71,20 @@ class BlockFix_SphereSpaceModifier : public BRepTools_Modification {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void* operator new(size_t,void* anAddress)
|
void* operator new(size_t,void* anAddress)
|
||||||
{
|
{
|
||||||
return anAddress;
|
return anAddress;
|
||||||
}
|
}
|
||||||
void* operator new(size_t size)
|
void* operator new(size_t size)
|
||||||
{
|
{
|
||||||
return Standard::Allocate(size);
|
return Standard::Allocate(size);
|
||||||
}
|
}
|
||||||
void operator delete(void *anAddress)
|
void operator delete(void *anAddress)
|
||||||
{
|
{
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||||
}
|
}
|
||||||
// Methods PUBLIC
|
// Methods PUBLIC
|
||||||
//
|
//
|
||||||
Standard_EXPORT BlockFix_SphereSpaceModifier();
|
Standard_EXPORT BlockFix_SphereSpaceModifier();
|
||||||
Standard_EXPORT void SetTolerance(const Standard_Real Toler) ;
|
Standard_EXPORT void SetTolerance(const Standard_Real Toler) ;
|
||||||
Standard_EXPORT Standard_Boolean NewSurface(const TopoDS_Face& F,Handle(Geom_Surface)& S,TopLoc_Location& L,Standard_Real& Tol,Standard_Boolean& RevWires,Standard_Boolean& RevFace) ;
|
Standard_EXPORT Standard_Boolean 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:
|
protected:
|
||||||
|
|
||||||
// Methods PROTECTED
|
// Methods PROTECTED
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
// Fields PROTECTED
|
// Fields PROTECTED
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Methods PRIVATE
|
// Methods PRIVATE
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
// Fields PRIVATE
|
// Fields PRIVATE
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
BlockFix_SphereSpaceModifier::~BlockFix_SphereSpaceModifier() {}
|
BlockFix_SphereSpaceModifier::~BlockFix_SphereSpaceModifier() {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_()
|
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);
|
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
|
||||||
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
|
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
|
||||||
if ( aType3.IsNull()) 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_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_SphereSpaceModifier",
|
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_SphereSpaceModifier",
|
||||||
@ -55,7 +55,7 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_()
|
|||||||
// DownCast method
|
// DownCast method
|
||||||
// allow safe downcasting
|
// 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;
|
Handle(BlockFix_SphereSpaceModifier) _anOtherObject;
|
||||||
|
|
||||||
@ -67,13 +67,13 @@ const Handle(BlockFix_SphereSpaceModifier) Handle(BlockFix_SphereSpaceModifier):
|
|||||||
|
|
||||||
return _anOtherObject ;
|
return _anOtherObject ;
|
||||||
}
|
}
|
||||||
const Handle(Standard_Type)& BlockFix_SphereSpaceModifier::DynamicType() const
|
const Handle(Standard_Type)& BlockFix_SphereSpaceModifier::DynamicType() const
|
||||||
{
|
{
|
||||||
return STANDARD_TYPE(BlockFix_SphereSpaceModifier) ;
|
return STANDARD_TYPE(BlockFix_SphereSpaceModifier) ;
|
||||||
}
|
}
|
||||||
Standard_Boolean BlockFix_SphereSpaceModifier::IsKind(const Handle(Standard_Type)& AType) const
|
Standard_Boolean BlockFix_SphereSpaceModifier::IsKind(const Handle(Standard_Type)& AType) const
|
||||||
{
|
{
|
||||||
return (STANDARD_TYPE(BlockFix_SphereSpaceModifier) == AType || BRepTools_Modification::IsKind(AType));
|
return (STANDARD_TYPE(BlockFix_SphereSpaceModifier) == AType || BRepTools_Modification::IsKind(AType));
|
||||||
}
|
}
|
||||||
Handle_BlockFix_SphereSpaceModifier::~Handle_BlockFix_SphereSpaceModifier() {}
|
Handle_BlockFix_SphereSpaceModifier::~Handle_BlockFix_SphereSpaceModifier() {}
|
||||||
|
|
||||||
|
@ -26,24 +26,24 @@
|
|||||||
--
|
--
|
||||||
class UnionEdges from BlockFix
|
class UnionEdges from BlockFix
|
||||||
|
|
||||||
---Purpose:
|
---Purpose:
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
|
||||||
Shape from TopoDS,
|
Shape from TopoDS,
|
||||||
ReShape from ShapeBuild
|
ReShape from ShapeBuild
|
||||||
|
|
||||||
is
|
is
|
||||||
|
|
||||||
Create returns UnionEdges from BlockFix;
|
Create returns UnionEdges from BlockFix;
|
||||||
|
|
||||||
Perform(me: in out; Shape: Shape from TopoDS;
|
Perform(me: in out; Shape: Shape from TopoDS;
|
||||||
Tol : Real)
|
Tol : Real)
|
||||||
returns Shape from TopoDS;
|
returns Shape from TopoDS;
|
||||||
|
|
||||||
fields
|
fields
|
||||||
|
|
||||||
myTolerance : Real;
|
myTolerance : Real;
|
||||||
myContext : ReShape from ShapeBuild;
|
myContext : ReShape from ShapeBuild;
|
||||||
|
|
||||||
end UnionEdges;
|
end UnionEdges;
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// File: BlockFix_UnionEdges.cxx
|
// File: BlockFix_UnionEdges.cxx
|
||||||
// Created: 07.12.04 15:27:30
|
// Created: 07.12.04 15:27:30
|
||||||
@ -26,30 +25,31 @@
|
|||||||
|
|
||||||
#include <BlockFix_UnionEdges.ixx>
|
#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 <ShapeAnalysis_Edge.hxx>
|
||||||
|
|
||||||
#include <ShapeFix_Edge.hxx>
|
#include <ShapeFix_Edge.hxx>
|
||||||
#include <ShapeFix_Face.hxx>
|
#include <ShapeFix_Face.hxx>
|
||||||
#include <ShapeFix_Shell.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.hxx>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
|
|
||||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||||
#include <TopTools_IndexedMapOfShape.hxx>
|
#include <TopTools_IndexedMapOfShape.hxx>
|
||||||
#include <TopTools_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <TopTools_MapOfShape.hxx>
|
#include <TopTools_MapOfShape.hxx>
|
||||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||||
#include <TopTools_SequenceOfShape.hxx>
|
#include <TopTools_SequenceOfShape.hxx>
|
||||||
|
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <TopoDS_Edge.hxx>
|
#include <TopoDS_Edge.hxx>
|
||||||
#include <TopoDS_Face.hxx>
|
#include <TopoDS_Face.hxx>
|
||||||
@ -58,17 +58,206 @@
|
|||||||
#include <TopoDS_Vertex.hxx>
|
#include <TopoDS_Vertex.hxx>
|
||||||
#include <TopoDS_Iterator.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"
|
#include "utilities.h"
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : BlockFix_UnionEdges()
|
//function : BlockFix_UnionEdges()
|
||||||
//purpose : Constructor
|
//purpose : Constructor
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
BlockFix_UnionEdges::BlockFix_UnionEdges ( )
|
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
|
//function : MergeEdges
|
||||||
@ -142,9 +331,9 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
|
|||||||
Handle(Geom_Line) L2 = Handle(Geom_Line)::DownCast(c3d2);
|
Handle(Geom_Line) L2 = Handle(Geom_Line)::DownCast(c3d2);
|
||||||
gp_Dir Dir1 = L1->Position().Direction();
|
gp_Dir Dir1 = L1->Position().Direction();
|
||||||
gp_Dir Dir2 = L2->Position().Direction();
|
gp_Dir Dir2 = L2->Position().Direction();
|
||||||
//if(!Dir1.IsEqual(Dir2,Precision::Angular())) {
|
//if(!Dir1.IsEqual(Dir2,Precision::Angular())) {
|
||||||
//if(!Dir1.IsParallel(Dir2,Precision::Angular())) {
|
//if(!Dir1.IsParallel(Dir2,Precision::Angular())) {
|
||||||
if(!Dir1.IsParallel(Dir2,Tol)) {
|
if(!Dir1.IsParallel(Dir2,Tol)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// can union lines => create new edge
|
// can union lines => create new edge
|
||||||
@ -252,6 +441,8 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
|
|||||||
}
|
}
|
||||||
if(NeedUnion) {
|
if(NeedUnion) {
|
||||||
MESSAGE ("can not make analitical union => make approximation");
|
MESSAGE ("can not make analitical union => make approximation");
|
||||||
|
TopoDS_Edge E = GlueEdgesWithPCurves(aChain, VF, VL);
|
||||||
|
/*
|
||||||
TopoDS_Wire W;
|
TopoDS_Wire W;
|
||||||
B.MakeWire(W);
|
B.MakeWire(W);
|
||||||
for(j=1; j<=aChain.Length(); j++) {
|
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.MakeEdge (E,bc,Precision::Confusion());
|
||||||
B.Add (E,VF);
|
B.Add (E,VF);
|
||||||
B.Add (E,VL);
|
B.Add (E,VL);
|
||||||
|
*/
|
||||||
aChain.SetValue(1,E);
|
aChain.SetValue(1,E);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -277,12 +469,10 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
|
|||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Perform
|
//function : Perform
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
TopoDS_Shape BlockFix_UnionEdges::Perform(const TopoDS_Shape& Shape,
|
TopoDS_Shape BlockFix_UnionEdges::Perform(const TopoDS_Shape& Shape,
|
||||||
const Standard_Real Tol)
|
const Standard_Real Tol)
|
||||||
{
|
{
|
||||||
|
@ -44,20 +44,20 @@ class BlockFix_UnionEdges {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void* operator new(size_t,void* anAddress)
|
void* operator new(size_t,void* anAddress)
|
||||||
{
|
{
|
||||||
return anAddress;
|
return anAddress;
|
||||||
}
|
}
|
||||||
void* operator new(size_t size)
|
void* operator new(size_t size)
|
||||||
{
|
{
|
||||||
return Standard::Allocate(size);
|
return Standard::Allocate(size);
|
||||||
}
|
}
|
||||||
void operator delete(void *anAddress)
|
void operator delete(void *anAddress)
|
||||||
{
|
{
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||||
}
|
}
|
||||||
// Methods PUBLIC
|
// Methods PUBLIC
|
||||||
//
|
//
|
||||||
Standard_EXPORT BlockFix_UnionEdges();
|
Standard_EXPORT BlockFix_UnionEdges();
|
||||||
Standard_EXPORT TopoDS_Shape Perform(const TopoDS_Shape& Shape,const Standard_Real Tol) ;
|
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:
|
protected:
|
||||||
|
|
||||||
// Methods PROTECTED
|
// Methods PROTECTED
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
// Fields PROTECTED
|
// Fields PROTECTED
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Methods PRIVATE
|
// Methods PRIVATE
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
// Fields PRIVATE
|
// Fields PRIVATE
|
||||||
|
@ -22,6 +22,6 @@
|
|||||||
|
|
||||||
#include <BlockFix_UnionEdges.jxx>
|
#include <BlockFix_UnionEdges.jxx>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,31 +35,31 @@ is
|
|||||||
|
|
||||||
Create returns UnionFaces from BlockFix;
|
Create returns UnionFaces from BlockFix;
|
||||||
---Purpose: Empty constructor
|
---Purpose: Empty constructor
|
||||||
|
|
||||||
GetTolerance(me: in out) returns Real;
|
GetTolerance(me: in out) returns Real;
|
||||||
---Purpose: Returns modifiable tolerance
|
---Purpose: Returns modifiable tolerance
|
||||||
---C++: return&
|
---C++: return&
|
||||||
|
|
||||||
Perform (me: in out; Shape: Shape from TopoDS) returns Shape from TopoDS;
|
Perform (me: in out; Shape: Shape from TopoDS) returns Shape from TopoDS;
|
||||||
---Purpose: Performs the unification of the fsces
|
---Purpose: Performs the unification of the fsces
|
||||||
-- whith the same geometry
|
-- whith the same geometry
|
||||||
|
|
||||||
IsSameDomain(me; aFace : Face from TopoDS;
|
IsSameDomain(me; aFace : Face from TopoDS;
|
||||||
aChekedFace: Face from TopoDS)
|
aChekedFace: Face from TopoDS)
|
||||||
returns Boolean is virtual;
|
returns Boolean is virtual;
|
||||||
---Purpose: Returns true is surfaces have same geometrically domain
|
---Purpose: Returns true is surfaces have same geometrically domain
|
||||||
-- with given tolerance
|
-- with given tolerance
|
||||||
|
|
||||||
MovePCurves(me; aTarget: in out Face from TopoDS;
|
MovePCurves(me; aTarget: in out Face from TopoDS;
|
||||||
aSource: Face from TopoDS)
|
aSource: Face from TopoDS)
|
||||||
is virtual;
|
is virtual;
|
||||||
---Purpose: Creates pcurves on aTarget face for each edge from
|
---Purpose: Creates pcurves on aTarget face for each edge from
|
||||||
-- aSource one.
|
-- aSource one.
|
||||||
|
|
||||||
fields
|
fields
|
||||||
|
|
||||||
myTolerance: Real;
|
myTolerance: Real;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,21 +42,21 @@ class TopoDS_Face;
|
|||||||
class BlockFix_UnionFaces
|
class BlockFix_UnionFaces
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void* operator new(size_t,void* anAddress)
|
void* operator new(size_t,void* anAddress)
|
||||||
{
|
{
|
||||||
return anAddress;
|
return anAddress;
|
||||||
}
|
}
|
||||||
void* operator new(size_t size)
|
void* operator new(size_t size)
|
||||||
{
|
{
|
||||||
return Standard::Allocate(size);
|
return Standard::Allocate(size);
|
||||||
}
|
}
|
||||||
void operator delete(void *anAddress)
|
void operator delete(void *anAddress)
|
||||||
{
|
{
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Methods PUBLIC
|
// Methods PUBLIC
|
||||||
//
|
//
|
||||||
Standard_EXPORT BlockFix_UnionFaces();
|
Standard_EXPORT BlockFix_UnionFaces();
|
||||||
|
|
||||||
Standard_EXPORT Standard_Real& GetTolerance();
|
Standard_EXPORT Standard_Real& GetTolerance();
|
||||||
@ -80,7 +80,7 @@ public:
|
|||||||
Standard_EXPORT virtual void MovePCurves(TopoDS_Face& aTarget,
|
Standard_EXPORT virtual void MovePCurves(TopoDS_Face& aTarget,
|
||||||
const TopoDS_Face& aSource) const;
|
const TopoDS_Face& aSource) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Fields PRIVATE
|
// Fields PRIVATE
|
||||||
//
|
//
|
||||||
Standard_Real myTolerance;
|
Standard_Real myTolerance;
|
||||||
|
@ -22,6 +22,6 @@
|
|||||||
|
|
||||||
#include <BlockFix_UnionFaces.jxx>
|
#include <BlockFix_UnionFaces.jxx>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,241 +23,320 @@
|
|||||||
-- Created: Sat Dec 04 12:36:22 2004
|
-- Created: Sat Dec 04 12:36:22 2004
|
||||||
-- Author: Peter KURNEV
|
-- Author: Peter KURNEV
|
||||||
|
|
||||||
package GEOMAlgo
|
package GEOMAlgo
|
||||||
|
|
||||||
---Purpose:
|
---Purpose:
|
||||||
|
|
||||||
uses
|
uses
|
||||||
TCollection,
|
TCollection,
|
||||||
|
|
||||||
TColgp,
|
TColgp,
|
||||||
Geom,
|
Geom,
|
||||||
Bnd,
|
Bnd,
|
||||||
gp,
|
gp,
|
||||||
GeomAdaptor,
|
GeomAdaptor,
|
||||||
TopAbs,
|
TopAbs,
|
||||||
TopoDS,
|
TopoDS,
|
||||||
TopTools,
|
TopTools,
|
||||||
IntTools,
|
IntTools,
|
||||||
BOPTools,
|
BOPTools,
|
||||||
BOP,
|
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;
|
|
||||||
|
|
||||||
imported Gluer2 from GEOMAlgo;
|
TColStd,
|
||||||
imported GlueDetector from GEOMAlgo;
|
BOPTColStd,
|
||||||
imported GluerAlgo from GEOMAlgo;
|
BRepAlgo,
|
||||||
imported GetInPlace from GEOMAlgo;
|
NMTDS,
|
||||||
--modified by NIZNHY-PKV Mon Feb 21 10:07:27 2011t
|
NMTTools
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
class ClsfSolid;
|
is
|
||||||
-- class FinderShapeOn2;
|
-- Enumerations
|
||||||
-- class PassKeyShapeMapHasher;
|
imported State from GEOMAlgo;
|
||||||
|
imported KindOfShape from GEOMAlgo;
|
||||||
|
imported KindOfName from GEOMAlgo;
|
||||||
|
imported KindOfBounds from GEOMAlgo;
|
||||||
|
imported KindOfClosed from GEOMAlgo;
|
||||||
--
|
--
|
||||||
-- Builder/Splitter
|
-- Gluer / GetInPlace
|
||||||
deferred class BuilderShape;
|
imported Gluer2 from GEOMAlgo;
|
||||||
|
imported GlueDetector from GEOMAlgo;
|
||||||
class Builder;
|
imported GluerAlgo from GEOMAlgo;
|
||||||
class Splitter;
|
imported GetInPlace from GEOMAlgo;
|
||||||
class Tools3D;
|
-- Algos
|
||||||
class BuilderTools;
|
imported WireSplitter from GEOMAlgo;
|
||||||
class ShapeSet;
|
imported WESScaler from GEOMAlgo;
|
||||||
|
imported WESCorrector from GEOMAlgo;
|
||||||
deferred class BuilderArea;
|
imported WireEdgeSet from GEOMAlgo;
|
||||||
class BuilderFace;
|
imported GlueAnalyser from GEOMAlgo;
|
||||||
class BuilderSolid;
|
imported Gluer from GEOMAlgo;
|
||||||
|
imported FinderShapeOn2 from GEOMAlgo;
|
||||||
class WireSplitter;
|
imported FinderShapeOn1 from GEOMAlgo;
|
||||||
class WireEdgeSet;
|
imported FinderShapeOn from GEOMAlgo;
|
||||||
class WESCorrector;
|
imported ShapeAlgo from GEOMAlgo;
|
||||||
class WESScaler;
|
imported SolidSolid from GEOMAlgo;
|
||||||
--
|
imported ShellSolid from GEOMAlgo;
|
||||||
-- Pointers
|
imported VertexSolid from GEOMAlgo;
|
||||||
--
|
imported WireSolid from GEOMAlgo;
|
||||||
pointer PWireEdgeSet to WireEdgeSet from GEOMAlgo;
|
imported ShapeSolid from GEOMAlgo;
|
||||||
--
|
imported Splitter from GEOMAlgo;
|
||||||
--
|
imported Builder from GEOMAlgo;
|
||||||
-- Instantiations
|
imported BuilderShape from GEOMAlgo;
|
||||||
class DataMapOfShapeShapeSet instantiates
|
imported BuilderSolid from GEOMAlgo;
|
||||||
DataMap from TCollection(Shape from TopoDS,
|
imported BuilderFace from GEOMAlgo;
|
||||||
ShapeSet from GEOMAlgo,
|
imported BuilderArea from GEOMAlgo;
|
||||||
ShapeMapHasher from TopTools);
|
imported ShapeInfoFiller from GEOMAlgo;
|
||||||
|
imported Algo from GEOMAlgo;
|
||||||
class DataMapOfShapeReal instantiates
|
-- Data / Tools
|
||||||
DataMap from TCollection(Shape from TopoDS,
|
imported ShapeSet from GEOMAlgo;
|
||||||
Real from Standard,
|
imported SurfaceTools from GEOMAlgo;
|
||||||
ShapeMapHasher from TopTools);
|
imported ShapeInfo from GEOMAlgo;
|
||||||
|
imported CoupleOfShapes from GEOMAlgo;
|
||||||
|
imported BuilderTools from GEOMAlgo;
|
||||||
class DataMapOfRealListOfShape instantiates
|
imported Tools3D from GEOMAlgo;
|
||||||
DataMap from TCollection(Real from Standard,
|
imported Tools from GEOMAlgo;
|
||||||
ListOfShape from TopTools,
|
imported PWireEdgeSet from GEOMAlgo;
|
||||||
MapRealHasher from TColStd);
|
imported StateCollector from GEOMAlgo;
|
||||||
--
|
imported PassKey from GEOMAlgo;
|
||||||
-- instantiations
|
imported PassKeyMapHasher from GEOMAlgo;
|
||||||
|
imported PassKeyShape from GEOMAlgo;
|
||||||
|
imported PassKeyShapeMapHasher from GEOMAlgo;
|
||||||
class IndexedDataMapOfShapeBox
|
imported ClsfBox from GEOMAlgo;
|
||||||
instantiates IndexedDataMap from TCollection (Shape from TopoDS,
|
imported ClsfSurf from GEOMAlgo;
|
||||||
Box from Bnd,
|
imported ClsfSolid from GEOMAlgo;
|
||||||
ShapeMapHasher from TopTools);
|
imported Clsf from GEOMAlgo;
|
||||||
class IndexedDataMapOfIntegerShape
|
imported HAlgo from GEOMAlgo;
|
||||||
instantiates IndexedDataMap from TCollection (Integer from Standard,
|
|
||||||
Shape from TopoDS,
|
imported ListOfCoupleOfShapes from GEOMAlgo;
|
||||||
MapIntegerHasher from TColStd);
|
imported ListIteratorOfListOfCoupleOfShapes from GEOMAlgo;
|
||||||
|
imported ListOfPnt from GEOMAlgo;
|
||||||
class ListOfCoupleOfShapes
|
imported ListIteratorOfListOfPnt from GEOMAlgo;
|
||||||
instantiates List from TCollection (CoupleOfShapes 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;
|
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;
|
||||||
|
--
|
||||||
|
--
|
||||||
|
@ -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
|
|
@ -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;
|
|
@ -25,11 +25,11 @@
|
|||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <peter@PREFEX>
|
// <peter@PREFEX>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_Algo.ixx>
|
#include <GEOMAlgo_Algo.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function:
|
// function:
|
||||||
// purpose:
|
// purpose:
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_Algo::GEOMAlgo_Algo()
|
GEOMAlgo_Algo::GEOMAlgo_Algo()
|
||||||
:
|
:
|
||||||
@ -39,14 +39,14 @@
|
|||||||
{}
|
{}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function: ~
|
// function: ~
|
||||||
// purpose:
|
// purpose:
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_Algo::~GEOMAlgo_Algo()
|
GEOMAlgo_Algo::~GEOMAlgo_Algo()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function: CheckData
|
// function: CheckData
|
||||||
// purpose:
|
// purpose:
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Algo::CheckData()
|
void GEOMAlgo_Algo::CheckData()
|
||||||
{
|
{
|
||||||
@ -54,7 +54,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function: CheckResult
|
// function: CheckResult
|
||||||
// purpose:
|
// purpose:
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Algo::CheckResult()
|
void GEOMAlgo_Algo::CheckResult()
|
||||||
{
|
{
|
||||||
@ -62,7 +62,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function: ErrorStatus
|
// function: ErrorStatus
|
||||||
// purpose:
|
// purpose:
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Integer GEOMAlgo_Algo::ErrorStatus()const
|
Standard_Integer GEOMAlgo_Algo::ErrorStatus()const
|
||||||
{
|
{
|
||||||
@ -70,7 +70,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function: WarningStatus
|
// function: WarningStatus
|
||||||
// purpose:
|
// purpose:
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Integer GEOMAlgo_Algo::WarningStatus()const
|
Standard_Integer GEOMAlgo_Algo::WarningStatus()const
|
||||||
{
|
{
|
||||||
@ -82,7 +82,7 @@
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ComputeInternalShapes
|
//function : ComputeInternalShapes
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Algo::ComputeInternalShapes(const Standard_Boolean theFlag)
|
void GEOMAlgo_Algo::ComputeInternalShapes(const Standard_Boolean theFlag)
|
||||||
{
|
{
|
||||||
|
@ -20,96 +20,56 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// File: GEOMAlgo_Algo.hxx
|
||||||
|
// Created: Sat Dec 04 12:39:47 2004
|
||||||
|
// Author: Peter KURNEV
|
||||||
|
// <peter@PREFEX>
|
||||||
|
//
|
||||||
#ifndef _GEOMAlgo_Algo_HeaderFile
|
#ifndef _GEOMAlgo_Algo_HeaderFile
|
||||||
#define _GEOMAlgo_Algo_HeaderFile
|
#define _GEOMAlgo_Algo_HeaderFile
|
||||||
|
|
||||||
#ifndef _Standard_Integer_HeaderFile
|
|
||||||
#include <Standard_Integer.hxx>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _Standard_HeaderFile
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
|
||||||
#include <Standard_Macro.hxx>
|
#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 {
|
Standard_EXPORT
|
||||||
|
Standard_Integer ErrorStatus() const;
|
||||||
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 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:
|
protected:
|
||||||
|
Standard_EXPORT
|
||||||
|
GEOMAlgo_Algo();
|
||||||
|
|
||||||
// Methods PROTECTED
|
Standard_EXPORT
|
||||||
//
|
virtual ~GEOMAlgo_Algo();
|
||||||
|
|
||||||
|
Standard_EXPORT
|
||||||
Standard_EXPORT GEOMAlgo_Algo();
|
virtual void CheckData() ;
|
||||||
Standard_EXPORT virtual ~GEOMAlgo_Algo();
|
|
||||||
|
Standard_EXPORT
|
||||||
|
virtual void CheckResult() ;
|
||||||
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_Integer myErrorStatus;
|
||||||
|
Standard_Integer myWarningStatus;
|
||||||
|
Standard_Boolean myComputeInternalShapes;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// other Inline functions and methods (like "C++: function call" methods)
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -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>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -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
|
|
@ -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;
|
|
||||||
|
|
@ -20,10 +20,10 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_Builder.cxx
|
// File: GEOMAlgo_Builder.cxx
|
||||||
// Created:
|
// Created:
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_Builder.ixx>
|
#include <GEOMAlgo_Builder.hxx>
|
||||||
|
|
||||||
#include <TopAbs_ShapeEnum.hxx>
|
#include <TopAbs_ShapeEnum.hxx>
|
||||||
|
|
||||||
@ -44,8 +44,8 @@
|
|||||||
#include <GEOMAlgo_Tools.hxx>
|
#include <GEOMAlgo_Tools.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_Builder::GEOMAlgo_Builder()
|
GEOMAlgo_Builder::GEOMAlgo_Builder()
|
||||||
:
|
:
|
||||||
@ -57,7 +57,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ~
|
//function : ~
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_Builder::~GEOMAlgo_Builder()
|
GEOMAlgo_Builder::~GEOMAlgo_Builder()
|
||||||
{
|
{
|
||||||
@ -70,7 +70,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : AddCompound
|
//function : AddCompound
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::AddCompound(const TopoDS_Shape& theShape)
|
void GEOMAlgo_Builder::AddCompound(const TopoDS_Shape& theShape)
|
||||||
{
|
{
|
||||||
@ -84,7 +84,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : AddShape
|
//function : AddShape
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::AddShape(const TopoDS_Shape& theShape)
|
void GEOMAlgo_Builder::AddShape(const TopoDS_Shape& theShape)
|
||||||
{
|
{
|
||||||
@ -94,7 +94,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Shapes
|
//function : Shapes
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const TopTools_ListOfShape& GEOMAlgo_Builder::Shapes()const
|
const TopTools_ListOfShape& GEOMAlgo_Builder::Shapes()const
|
||||||
{
|
{
|
||||||
@ -102,7 +102,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Clear
|
//function : Clear
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::Clear()
|
void GEOMAlgo_Builder::Clear()
|
||||||
{
|
{
|
||||||
@ -111,7 +111,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ClearInternals
|
//function : ClearInternals
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::ClearInternals()
|
void GEOMAlgo_Builder::ClearInternals()
|
||||||
{
|
{
|
||||||
@ -130,7 +130,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Prepare
|
//function : Prepare
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::Prepare()
|
void GEOMAlgo_Builder::Prepare()
|
||||||
{
|
{
|
||||||
@ -161,7 +161,7 @@
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : AddShape1
|
//function : AddShape1
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::AddShape1(const TopoDS_Shape& theShape)
|
void GEOMAlgo_Builder::AddShape1(const TopoDS_Shape& theShape)
|
||||||
{
|
{
|
||||||
@ -186,7 +186,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : BuildResult
|
//function : BuildResult
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::BuildResult(const TopAbs_ShapeEnum theType)
|
void GEOMAlgo_Builder::BuildResult(const TopAbs_ShapeEnum theType)
|
||||||
{
|
{
|
||||||
@ -222,7 +222,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Perform
|
//function : Perform
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::Perform()
|
void GEOMAlgo_Builder::Perform()
|
||||||
{
|
{
|
||||||
@ -250,7 +250,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : PerformWithFiller
|
//function : PerformWithFiller
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::PerformWithFiller(const NMTTools_PaveFiller& theDSF)
|
void GEOMAlgo_Builder::PerformWithFiller(const NMTTools_PaveFiller& theDSF)
|
||||||
{
|
{
|
||||||
@ -260,7 +260,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : PerformInternal
|
//function : PerformInternal
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::PerformInternal(const NMTTools_PaveFiller& pPF)
|
void GEOMAlgo_Builder::PerformInternal(const NMTTools_PaveFiller& pPF)
|
||||||
{
|
{
|
||||||
@ -303,7 +303,7 @@
|
|||||||
if (myErrorStatus) {
|
if (myErrorStatus) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildResult(TopAbs_EDGE);
|
BuildResult(TopAbs_EDGE);
|
||||||
if (myErrorStatus) {
|
if (myErrorStatus) {
|
||||||
return;
|
return;
|
||||||
@ -313,29 +313,29 @@
|
|||||||
if (myErrorStatus) {
|
if (myErrorStatus) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildResult(TopAbs_WIRE);
|
BuildResult(TopAbs_WIRE);
|
||||||
if (myErrorStatus) {
|
if (myErrorStatus) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3.4 Faces
|
// 3.4 Faces
|
||||||
FillImagesFaces();
|
FillImagesFaces();
|
||||||
if (myErrorStatus) {
|
if (myErrorStatus) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildResult(TopAbs_FACE);
|
BuildResult(TopAbs_FACE);
|
||||||
if (myErrorStatus) {
|
if (myErrorStatus) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 3.5 Shells
|
// 3.5 Shells
|
||||||
|
|
||||||
FillImagesContainers(TopAbs_SHELL);
|
FillImagesContainers(TopAbs_SHELL);
|
||||||
if (myErrorStatus) {
|
if (myErrorStatus) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildResult(TopAbs_SHELL);
|
BuildResult(TopAbs_SHELL);
|
||||||
if (myErrorStatus) {
|
if (myErrorStatus) {
|
||||||
return;
|
return;
|
||||||
@ -345,7 +345,7 @@
|
|||||||
if (myErrorStatus) {
|
if (myErrorStatus) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildResult(TopAbs_SOLID);
|
BuildResult(TopAbs_SOLID);
|
||||||
if (myErrorStatus) {
|
if (myErrorStatus) {
|
||||||
return;
|
return;
|
||||||
@ -355,7 +355,7 @@
|
|||||||
if (myErrorStatus) {
|
if (myErrorStatus) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildResult(TopAbs_COMPSOLID);
|
BuildResult(TopAbs_COMPSOLID);
|
||||||
if (myErrorStatus) {
|
if (myErrorStatus) {
|
||||||
return;
|
return;
|
||||||
@ -365,7 +365,7 @@
|
|||||||
if (myErrorStatus) {
|
if (myErrorStatus) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildResult(TopAbs_COMPOUND);
|
BuildResult(TopAbs_COMPOUND);
|
||||||
if (myErrorStatus) {
|
if (myErrorStatus) {
|
||||||
return;
|
return;
|
||||||
@ -374,16 +374,16 @@
|
|||||||
// 4.History
|
// 4.History
|
||||||
PrepareHistory();
|
PrepareHistory();
|
||||||
//
|
//
|
||||||
// 5 Post-treatment
|
// 5 Post-treatment
|
||||||
PostTreat();
|
PostTreat();
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// static
|
// static
|
||||||
// void CorrectWires(const TopoDS_Shape& aS);
|
// void CorrectWires(const TopoDS_Shape& aS);
|
||||||
//
|
//
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : PostTreat
|
//function : PostTreat
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::PostTreat()
|
void GEOMAlgo_Builder::PostTreat()
|
||||||
{
|
{
|
||||||
@ -400,14 +400,14 @@
|
|||||||
if (aNbS==1) {
|
if (aNbS==1) {
|
||||||
myShape=aLS.First();
|
myShape=aLS.First();
|
||||||
}
|
}
|
||||||
|
|
||||||
BRepLib::SameParameter(myShape, 1.e-7, Standard_True);
|
BRepLib::SameParameter(myShape, 1.e-7, Standard_True);
|
||||||
//
|
//
|
||||||
GEOMAlgo_Tools::CorrectWires(myShape);
|
GEOMAlgo_Tools::CorrectWires(myShape);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// myErrorStatus
|
// myErrorStatus
|
||||||
//
|
//
|
||||||
// 0 - Ok
|
// 0 - Ok
|
||||||
// 1 - The object is just initialized
|
// 1 - The object is just initialized
|
||||||
// 2 - PaveFiller is failed
|
// 2 - PaveFiller is failed
|
||||||
|
@ -19,235 +19,206 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// File: GEOMAlgo_Builder.cxx
|
||||||
|
// Created:
|
||||||
|
// Author: Peter KURNEV
|
||||||
|
//
|
||||||
#ifndef _GEOMAlgo_Builder_HeaderFile
|
#ifndef _GEOMAlgo_Builder_HeaderFile
|
||||||
#define _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>
|
#include <Standard.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
|
||||||
#include <Standard_Macro.hxx>
|
#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)
|
//! Performs calculations using prepared PaveFiller <br>
|
||||||
{
|
//! object theDSF <br>
|
||||||
return anAddress;
|
Standard_EXPORT
|
||||||
}
|
virtual void PerformWithFiller(const NMTTools_PaveFiller& theDSF) ;
|
||||||
void* operator new(size_t size)
|
|
||||||
{
|
|
||||||
return Standard::Allocate(size);
|
|
||||||
}
|
|
||||||
void operator delete(void *anAddress)
|
|
||||||
{
|
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
|
||||||
}
|
|
||||||
// Methods PUBLIC
|
|
||||||
//
|
|
||||||
|
|
||||||
//! Empty constructor <br>
|
//! Adds argument theShape of the operation <br>
|
||||||
Standard_EXPORT GEOMAlgo_Builder();
|
Standard_EXPORT
|
||||||
Standard_EXPORT virtual ~GEOMAlgo_Builder();
|
virtual void AddShape(const TopoDS_Shape& theShape) ;
|
||||||
|
|
||||||
//! Performs calculations <br>
|
//! Clears internal fields and arguments <br>
|
||||||
Standard_EXPORT virtual void Perform() ;
|
Standard_EXPORT
|
||||||
|
virtual void Clear() ;
|
||||||
|
|
||||||
//! Performs calculations using prepared PaveFiller <br>
|
//! Returns the arguments of the operation <br>
|
||||||
//! object theDSF <br>
|
Standard_EXPORT
|
||||||
Standard_EXPORT virtual void PerformWithFiller(const NMTTools_PaveFiller& theDSF) ;
|
const TopTools_ListOfShape& Shapes() const;
|
||||||
|
|
||||||
//! Adds argument theShape of the operation <br>
|
//! Returns the list of shapes generated from the <br>
|
||||||
Standard_EXPORT virtual void AddShape(const TopoDS_Shape& theShape) ;
|
//! shape theS. <br>
|
||||||
|
Standard_EXPORT
|
||||||
|
virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
|
||||||
|
|
||||||
//! Clears internal fields and arguments <br>
|
//! Returns the list of shapes modified from the shape <br>
|
||||||
Standard_EXPORT virtual void Clear() ;
|
//! theS. <br>
|
||||||
|
Standard_EXPORT
|
||||||
|
virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
|
||||||
|
|
||||||
//! Returns the arguments of the operation <br>
|
//! Returns true if the shape theS has been deleted. <br>
|
||||||
Standard_EXPORT const TopTools_ListOfShape& Shapes() const;
|
Standard_EXPORT
|
||||||
|
virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
|
||||||
//! 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;
|
|
||||||
|
|
||||||
|
//! 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:
|
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>
|
//! Clears internal fields <br>
|
||||||
//! object theDSF <br>
|
Standard_EXPORT
|
||||||
Standard_EXPORT virtual void PerformInternal(const NMTTools_PaveFiller& theDSF) ;
|
virtual void ClearInternals() ;
|
||||||
|
|
||||||
//! Prepare information for history support <br>
|
//! Provides preparing actions <br>
|
||||||
Standard_EXPORT virtual void PrepareHistory() ;
|
Standard_EXPORT
|
||||||
|
virtual void Prepare() ;
|
||||||
|
|
||||||
//! Clears internal fields <br>
|
//! Provides post-tratment actions <br>
|
||||||
Standard_EXPORT virtual void ClearInternals() ;
|
Standard_EXPORT
|
||||||
|
virtual void PostTreat() ;
|
||||||
|
|
||||||
//! Provides preparing actions <br>
|
//! Append the argument theShape to <br>
|
||||||
Standard_EXPORT virtual void Prepare() ;
|
//! typified lists of arguments myShapes1 <br>
|
||||||
|
Standard_EXPORT
|
||||||
|
void AddShape1(const TopoDS_Shape& theShape) ;
|
||||||
|
|
||||||
//! Provides post-tratment actions <br>
|
//! Build the resulting shapes of type theType <br>
|
||||||
Standard_EXPORT virtual void PostTreat() ;
|
Standard_EXPORT
|
||||||
|
virtual void BuildResult(const TopAbs_ShapeEnum theType) ;
|
||||||
|
|
||||||
//! Append the argument theShape to <br>
|
//! Fill Images for vertices <br>
|
||||||
//! typified lists of arguments myShapes1 <br>
|
Standard_EXPORT
|
||||||
Standard_EXPORT void AddShape1(const TopoDS_Shape& theShape) ;
|
void FillImagesVertices() ;
|
||||||
|
|
||||||
//! Build the resulting shapes of type theType <br>
|
//! Fill Images for edges <br>
|
||||||
Standard_EXPORT virtual void BuildResult(const TopAbs_ShapeEnum theType) ;
|
Standard_EXPORT
|
||||||
|
void FillImagesEdges() ;
|
||||||
|
|
||||||
//! Fill Images for vertices <br>
|
//! Fill Images for faces <br>
|
||||||
Standard_EXPORT void FillImagesVertices() ;
|
Standard_EXPORT
|
||||||
|
void FillImagesFaces() ;
|
||||||
|
|
||||||
//! Fill Images for edges <br>
|
//! For each interferred face find split edges <br>
|
||||||
Standard_EXPORT void FillImagesEdges() ;
|
//! that are in 2-D domain of the face <br>
|
||||||
|
Standard_EXPORT
|
||||||
|
void FillIn2DParts() ;
|
||||||
|
|
||||||
//! Fill Images for faces <br>
|
//! Build draft faces <br>
|
||||||
Standard_EXPORT void FillImagesFaces() ;
|
Standard_EXPORT
|
||||||
|
void BuildSplitFaces() ;
|
||||||
|
|
||||||
//! For each interferred face find split edges <br>
|
//! Among draft faces find same domain faces <br>
|
||||||
//! that are in 2-D domain of the face <br>
|
Standard_EXPORT
|
||||||
Standard_EXPORT void FillIn2DParts() ;
|
void FillSameDomainFaces() ;
|
||||||
|
|
||||||
//! Build draft faces <br>
|
//! Fill Images for faces <br>
|
||||||
Standard_EXPORT void BuildSplitFaces() ;
|
//! taking into account same domain faces <br>
|
||||||
|
Standard_EXPORT
|
||||||
|
void FillImagesFaces1() ;
|
||||||
|
|
||||||
//! Among draft faces find same domain faces <br>
|
//! Update Images for faces by <br>
|
||||||
Standard_EXPORT void FillSameDomainFaces() ;
|
//! internal vertices <br>
|
||||||
|
Standard_EXPORT
|
||||||
|
void FillInternalVertices() ;
|
||||||
|
|
||||||
//! Fill Images for faces <br>
|
//! Fill Images for Wires, Shells, Compsolids, Compounds <br>
|
||||||
//! taking into account same domain faces <br>
|
Standard_EXPORT
|
||||||
Standard_EXPORT void FillImagesFaces1() ;
|
void FillImagesContainers(const TopAbs_ShapeEnum theType) ;
|
||||||
|
|
||||||
//! Update Images for faces by <br>
|
//! Fill Images for solids <br>
|
||||||
//! internal vertices <br>
|
Standard_EXPORT
|
||||||
Standard_EXPORT void FillInternalVertices() ;
|
void FillImagesSolids() ;
|
||||||
|
|
||||||
//! Fill Images for Wires, Shells, Compsolids, Compounds <br>
|
//! For each interferred solid find split faces <br>
|
||||||
Standard_EXPORT void FillImagesContainers(const TopAbs_ShapeEnum theType) ;
|
//! that are in 3-D domain of the solid <br>
|
||||||
|
Standard_EXPORT
|
||||||
|
void FillIn3DParts() ;
|
||||||
|
|
||||||
//! Fill Images for solids <br>
|
//! Build draft solids <br>
|
||||||
Standard_EXPORT void FillImagesSolids() ;
|
Standard_EXPORT
|
||||||
|
void BuildSplitSolids() ;
|
||||||
|
|
||||||
//! For each interferred solid find split faces <br>
|
//! Update draft solids by <br>
|
||||||
//! that are in 3-D domain of the solid <br>
|
//! internal shells, edges, vertices <br>
|
||||||
Standard_EXPORT void FillIn3DParts() ;
|
Standard_EXPORT
|
||||||
|
void FillInternalShapes() ;
|
||||||
|
|
||||||
//! Build draft solids <br>
|
//! Build solid theDraftSolid that consists of <br>
|
||||||
Standard_EXPORT void BuildSplitSolids() ;
|
//! non-internal split faces of the solid <br>
|
||||||
|
//! theSolid. <br>
|
||||||
//! Update draft solids by <br>
|
//! All splits of internal faces of <br>
|
||||||
//! internal shells, edges, vertices <br>
|
//! theSolid are in the list: theInternalFaces <br>
|
||||||
Standard_EXPORT void FillInternalShapes() ;
|
Standard_EXPORT
|
||||||
|
void BuildDraftSolid(const TopoDS_Shape& theSolid,
|
||||||
//! Build solid theDraftSolid that consists of <br>
|
TopoDS_Shape& theDraftSolid,
|
||||||
//! non-internal split faces of the solid <br>
|
TopTools_ListOfShape& theInternalFaces) ;
|
||||||
//! 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;
|
||||||
NMTTools_PPaveFiller myPaveFiller;
|
Standard_Integer myNbTypes;
|
||||||
TopTools_ListOfShape myShapes;
|
TopTools_MapOfShape myMapFence;
|
||||||
Standard_Integer myNbTypes;
|
TopTools_ListOfShape myShapes1[9];
|
||||||
TopTools_MapOfShape myMapFence;
|
BRepAlgo_Image myImages;
|
||||||
TopTools_ListOfShape myShapes1[9];
|
TopTools_IndexedDataMapOfShapeListOfShape myInParts;
|
||||||
BRepAlgo_Image myImages;
|
BRepAlgo_Image mySplitFaces;
|
||||||
TopTools_IndexedDataMapOfShapeListOfShape myInParts;
|
TopTools_IndexedDataMapOfShapeShape mySameDomainShapes;
|
||||||
BRepAlgo_Image mySplitFaces;
|
TopTools_IndexedDataMapOfShapeShape myDraftSolids;
|
||||||
TopTools_IndexedDataMapOfShapeShape mySameDomainShapes;
|
Standard_Integer myEntryPoint;
|
||||||
TopTools_IndexedDataMapOfShapeShape myDraftSolids;
|
|
||||||
Standard_Integer myEntryPoint;
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
// Methods PRIVATE
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
// Fields PRIVATE
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// other Inline functions and methods (like "C++: function call" methods)
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -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>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -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
|
|
@ -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;
|
|
@ -21,16 +21,13 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// File: GEOMAlgo_BuilderArea.cxx
|
// File: GEOMAlgo_BuilderArea.cxx
|
||||||
|
// Created:
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
|
//
|
||||||
#include <GEOMAlgo_BuilderArea.ixx>
|
#include <GEOMAlgo_BuilderArea.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
|
||||||
|
|
||||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||||
|
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
|
|
||||||
#include <IntTools_Context.hxx>
|
#include <IntTools_Context.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -38,11 +35,9 @@
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_BuilderArea::GEOMAlgo_BuilderArea()
|
GEOMAlgo_BuilderArea::GEOMAlgo_BuilderArea()
|
||||||
: GEOMAlgo_Algo()
|
:
|
||||||
|
GEOMAlgo_Algo()
|
||||||
{
|
{
|
||||||
#if OCC_VERSION_LARGE <= 0x06050200
|
|
||||||
myContext=NULL;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ~
|
//function : ~
|
||||||
@ -55,20 +50,10 @@ GEOMAlgo_BuilderArea::~GEOMAlgo_BuilderArea()
|
|||||||
//function : SetContext
|
//function : SetContext
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
void GEOMAlgo_BuilderArea::SetContext(const Handle(IntTools_Context)& theContext)
|
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;
|
myContext=theContext;
|
||||||
#else
|
|
||||||
myContext=(IntTools_Context*)&theContext;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Context
|
//function : Context
|
||||||
//purpose :
|
//purpose :
|
||||||
@ -87,8 +72,6 @@ void GEOMAlgo_BuilderArea::Perform()
|
|||||||
myContext=new IntTools_Context;
|
myContext=new IntTools_Context;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetShapes
|
//function : SetShapes
|
||||||
//purpose :
|
//purpose :
|
||||||
@ -156,3 +139,4 @@ void GEOMAlgo_BuilderArea::PerformAreas()
|
|||||||
void GEOMAlgo_BuilderArea::PerformInternalShapes()
|
void GEOMAlgo_BuilderArea::PerformInternalShapes()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,127 +20,93 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// File: GEOMAlgo_BuilderArea.hxx
|
||||||
|
// Created:
|
||||||
|
// Author: Peter KURNEV
|
||||||
|
//
|
||||||
|
|
||||||
#ifndef _GEOMAlgo_BuilderArea_HeaderFile
|
#ifndef _GEOMAlgo_BuilderArea_HeaderFile
|
||||||
#define _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>
|
#include <Standard.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
|
||||||
#include <Standard_Macro.hxx>
|
#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>
|
//! The root class for algorithms to build <br>
|
||||||
//! faces/solids from set of edges/faces <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>
|
//! Returns cashed geometrical tools <br>
|
||||||
Standard_EXPORT const Handle_IntTools_Context& Context() const;
|
Standard_EXPORT
|
||||||
#endif
|
const Handle_IntTools_Context& Context() const;
|
||||||
|
|
||||||
//! Sets edges/faces to process <br>
|
//! Sets edges/faces to process <br>
|
||||||
Standard_EXPORT void SetShapes(const TopTools_ListOfShape& theLS) ;
|
Standard_EXPORT
|
||||||
|
void SetShapes(const TopTools_ListOfShape& theLS) ;
|
||||||
|
|
||||||
//! Returns edges/faces to process <br>
|
//! Returns edges/faces to process <br>
|
||||||
Standard_EXPORT const TopTools_ListOfShape& Shapes() const;
|
Standard_EXPORT
|
||||||
|
const TopTools_ListOfShape& Shapes() const;
|
||||||
|
|
||||||
//! Returns wires/shells that have been built <br>
|
//! Returns wires/shells that have been built <br>
|
||||||
Standard_EXPORT const TopTools_ListOfShape& Loops() const;
|
Standard_EXPORT
|
||||||
|
const TopTools_ListOfShape& Loops() const;
|
||||||
|
|
||||||
//! Returns faces/solids that have been built <br>
|
//! Returns faces/solids that have been built <br>
|
||||||
Standard_EXPORT const TopTools_ListOfShape& Areas() const;
|
Standard_EXPORT
|
||||||
|
const TopTools_ListOfShape& Areas() const;
|
||||||
|
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
Standard_EXPORT
|
||||||
Standard_EXPORT virtual void Perform() ;
|
virtual void Perform() ;
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
|
protected:
|
||||||
//! Empty constructor <br>
|
//! Empty constructor <br>
|
||||||
Standard_EXPORT GEOMAlgo_BuilderArea();
|
Standard_EXPORT
|
||||||
Standard_EXPORT virtual ~GEOMAlgo_BuilderArea();
|
GEOMAlgo_BuilderArea();
|
||||||
|
|
||||||
|
Standard_EXPORT
|
||||||
|
virtual ~GEOMAlgo_BuilderArea();
|
||||||
//! Collect the edges/faces that <br>
|
//! Collect the edges/faces that <br>
|
||||||
//! a) are internal <br>
|
//! a) are internal <br>
|
||||||
//! b) are the same and have different orientation <br>
|
//! b) are the same and have different orientation <br>
|
||||||
Standard_EXPORT virtual void PerformShapesToAvoid() ;
|
|
||||||
|
Standard_EXPORT
|
||||||
|
virtual void PerformShapesToAvoid() ;
|
||||||
|
|
||||||
//! Build draft faces/shells <br>
|
//! Build draft faces/shells <br>
|
||||||
//! a)myLoops - draft faces/shells that consist of <br>
|
//! a)myLoops - draft faces/shells that consist of <br>
|
||||||
//! boundary edges/faces <br>
|
//! boundary edges/faces <br>
|
||||||
//! b)myLoopsInternal - draft faces/shells that contains <br>
|
//! b)myLoopsInternal - draft faces/shells that contains <br>
|
||||||
//! inner edges/faces <br>
|
//! inner edges/faces <br>
|
||||||
Standard_EXPORT virtual void PerformLoops() ;
|
Standard_EXPORT
|
||||||
|
virtual void PerformLoops() ;
|
||||||
//! Build draft faces/solids that contains boundary faces <br>
|
//! 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>
|
//! Build finalized faces/solids with internal wires/shells <br>
|
||||||
Standard_EXPORT virtual void PerformInternalShapes() ;
|
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:
|
|
||||||
|
|
||||||
|
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
|
#endif
|
||||||
|
@ -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>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -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
|
|
@ -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;
|
|
||||||
|
|
@ -21,20 +21,10 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// File: GEOMAlgo_BuilderFace.cxx
|
// File: GEOMAlgo_BuilderFace.cxx
|
||||||
|
// Created:
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
|
//
|
||||||
#include <GEOMAlgo_BuilderFace.ixx>
|
#include <GEOMAlgo_BuilderFace.hxx>
|
||||||
|
|
||||||
#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 <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
#include <gp_Pln.hxx>
|
#include <gp_Pln.hxx>
|
||||||
@ -81,28 +71,32 @@
|
|||||||
#include <BOP_WireEdgeSet.hxx>
|
#include <BOP_WireEdgeSet.hxx>
|
||||||
#include <BOP_WESCorrector.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
|
static
|
||||||
Standard_Boolean IsGrowthWire(const TopoDS_Shape& ,
|
Standard_Boolean IsGrowthWire(const TopoDS_Shape& ,
|
||||||
|
|
||||||
const TopTools_IndexedMapOfShape& );
|
const TopTools_IndexedMapOfShape& );
|
||||||
|
|
||||||
static
|
static
|
||||||
Standard_Boolean IsInside(const TopoDS_Shape& ,
|
Standard_Boolean IsInside(const TopoDS_Shape& ,
|
||||||
const TopoDS_Shape& ,
|
const TopoDS_Shape& ,
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
const Handle(IntTools_Context)& );
|
const Handle(IntTools_Context)& );
|
||||||
#else
|
|
||||||
IntTools_PContext& );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static
|
static
|
||||||
void MakeInternalWires(const TopTools_MapOfShape& ,
|
void MakeInternalWires(const TopTools_MapOfShape& ,
|
||||||
TopTools_ListOfShape& );
|
TopTools_ListOfShape& );
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_BuilderFace::GEOMAlgo_BuilderFace()
|
GEOMAlgo_BuilderFace::GEOMAlgo_BuilderFace()
|
||||||
:
|
:
|
||||||
@ -111,14 +105,14 @@ static
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ~
|
//function : ~
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_BuilderFace::~GEOMAlgo_BuilderFace()
|
GEOMAlgo_BuilderFace::~GEOMAlgo_BuilderFace()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetFace
|
//function : SetFace
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_BuilderFace::SetFace(const TopoDS_Face& theFace)
|
void GEOMAlgo_BuilderFace::SetFace(const TopoDS_Face& theFace)
|
||||||
{
|
{
|
||||||
@ -126,7 +120,7 @@ static
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Face
|
//function : Face
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const TopoDS_Face& GEOMAlgo_BuilderFace::Face()const
|
const TopoDS_Face& GEOMAlgo_BuilderFace::Face()const
|
||||||
{
|
{
|
||||||
@ -134,28 +128,18 @@ static
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Perform
|
//function : Perform
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_BuilderFace::Perform()
|
void GEOMAlgo_BuilderFace::Perform()
|
||||||
{
|
{
|
||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
//
|
//
|
||||||
#if OCC_VERSION_LARGE <= 0x06050200
|
|
||||||
if (myContext==NULL) {
|
|
||||||
myErrorStatus=11;// Null Context
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
//
|
|
||||||
if (myFace.IsNull()) {
|
if (myFace.IsNull()) {
|
||||||
myErrorStatus=12;// Null face generix
|
myErrorStatus=12;// Null face generix
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
// Initialize the context
|
// Initialize the context
|
||||||
GEOMAlgo_BuilderArea::Perform();
|
GEOMAlgo_BuilderArea::Perform();
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
PerformShapesToAvoid();
|
PerformShapesToAvoid();
|
||||||
if (myErrorStatus) {
|
if (myErrorStatus) {
|
||||||
@ -179,7 +163,7 @@ static
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :PerformShapesToAvoid
|
//function :PerformShapesToAvoid
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_BuilderFace::PerformShapesToAvoid()
|
void GEOMAlgo_BuilderFace::PerformShapesToAvoid()
|
||||||
{
|
{
|
||||||
@ -250,12 +234,12 @@ static
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
}//while (1)
|
}//while (1)
|
||||||
//printf(" EdgesToAvoid=%d, iCnt=%d\n", EdgesToAvoid.Extent(), iCnt);
|
//printf(" EdgesToAvoid=%d, iCnt=%d\n", EdgesToAvoid.Extent(), iCnt);
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : PerformLoops
|
//function : PerformLoops
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_BuilderFace::PerformLoops()
|
void GEOMAlgo_BuilderFace::PerformLoops()
|
||||||
{
|
{
|
||||||
@ -268,11 +252,11 @@ static
|
|||||||
TopTools_IndexedDataMapOfShapeListOfShape aVEMap;
|
TopTools_IndexedDataMapOfShapeListOfShape aVEMap;
|
||||||
TopTools_MapOfOrientedShape aMAdded;
|
TopTools_MapOfOrientedShape aMAdded;
|
||||||
TopoDS_Iterator aItW;
|
TopoDS_Iterator aItW;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
GEOMAlgo_WireEdgeSet aWES;
|
GEOMAlgo_WireEdgeSet aWES;
|
||||||
GEOMAlgo_WESCorrector aWESCor;
|
GEOMAlgo_WESCorrector aWESCor;
|
||||||
//
|
//
|
||||||
// 1. Usual Wires
|
// 1. Usual Wires
|
||||||
myLoops.Clear();
|
myLoops.Clear();
|
||||||
aWES.SetFace(myFace);
|
aWES.SetFace(myFace);
|
||||||
//
|
//
|
||||||
@ -298,7 +282,7 @@ static
|
|||||||
//modified by NIZNHY-PKV Tue Aug 5 15:09:29 2008f
|
//modified by NIZNHY-PKV Tue Aug 5 15:09:29 2008f
|
||||||
// Post Treatment
|
// Post Treatment
|
||||||
TopTools_MapOfOrientedShape aMEP;
|
TopTools_MapOfOrientedShape aMEP;
|
||||||
//
|
//
|
||||||
// a. collect all edges that are in loops
|
// a. collect all edges that are in loops
|
||||||
aIt.Initialize (myLoops);
|
aIt.Initialize (myLoops);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
@ -309,7 +293,7 @@ static
|
|||||||
aMEP.Add(aE);
|
aMEP.Add(aE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// b. collect all edges that are to avoid
|
// b. collect all edges that are to avoid
|
||||||
aItM.Initialize(myShapesToAvoid);
|
aItM.Initialize(myShapesToAvoid);
|
||||||
for (; aItM.More(); aItM.Next()) {
|
for (; aItM.More(); aItM.Next()) {
|
||||||
@ -359,7 +343,7 @@ static
|
|||||||
const TopoDS_Vertex& aV = TopoDS::Vertex(aItE.Value());
|
const TopoDS_Vertex& aV = TopoDS::Vertex(aItE.Value());
|
||||||
const TopTools_ListOfShape& aLE=aVEMap.FindFromKey(aV);
|
const TopTools_ListOfShape& aLE=aVEMap.FindFromKey(aV);
|
||||||
aIt.Initialize(aLE);
|
aIt.Initialize(aLE);
|
||||||
for (; aIt.More()&&bFlag; aIt.Next()) {
|
for (; aIt.More()&&bFlag; aIt.Next()) {
|
||||||
const TopoDS_Shape& aEx=aIt.Value();
|
const TopoDS_Shape& aEx=aIt.Value();
|
||||||
if (aMAdded.Add(aEx)) {
|
if (aMAdded.Add(aEx)) {
|
||||||
aBB.Add(aW, aEx);
|
aBB.Add(aW, aEx);
|
||||||
@ -367,7 +351,7 @@ static
|
|||||||
bFlag=!bFlag;
|
bFlag=!bFlag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}//for (; aIt.More(); aIt.Next()) {
|
}//for (; aIt.More(); aIt.Next()) {
|
||||||
}//for (; aItE.More(); aItE.Next()) {
|
}//for (; aItE.More(); aItE.Next()) {
|
||||||
}//for (; aItW.More(); aItW.Next()) {
|
}//for (; aItW.More(); aItW.Next()) {
|
||||||
myLoopsInternal.Append(aW);
|
myLoopsInternal.Append(aW);
|
||||||
@ -375,7 +359,7 @@ static
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : PerformAreas
|
//function : PerformAreas
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_BuilderFace::PerformAreas()
|
void GEOMAlgo_BuilderFace::PerformAreas()
|
||||||
{
|
{
|
||||||
@ -383,7 +367,7 @@ static
|
|||||||
//
|
//
|
||||||
Standard_Boolean bIsGrowth, bIsHole;
|
Standard_Boolean bIsGrowth, bIsHole;
|
||||||
Standard_Real aTol;
|
Standard_Real aTol;
|
||||||
TopTools_ListOfShape aNewFaces, aHoleWires;
|
TopTools_ListOfShape aNewFaces, aHoleWires;
|
||||||
TopoDS_Shape anInfinitePointShape;
|
TopoDS_Shape anInfinitePointShape;
|
||||||
TopTools_DataMapOfShapeShape aInOutMap;
|
TopTools_DataMapOfShapeShape aInOutMap;
|
||||||
TopTools_DataMapOfShapeListOfShape aMSH;
|
TopTools_DataMapOfShapeListOfShape aMSH;
|
||||||
@ -414,7 +398,7 @@ static
|
|||||||
aNewFaces.Append (aFace);
|
aNewFaces.Append (aFace);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
// check if a wire is a hole
|
// check if a wire is a hole
|
||||||
//XX
|
//XX
|
||||||
//bIsHole=IsHole(aWire, myFace, myContext);
|
//bIsHole=IsHole(aWire, myFace, myContext);
|
||||||
bIsHole=GEOMAlgo_BuilderTools::IsHole(aWire, myFace);
|
bIsHole=GEOMAlgo_BuilderTools::IsHole(aWire, myFace);
|
||||||
@ -486,20 +470,20 @@ static
|
|||||||
aBB.Add (aF, aHole);
|
aBB.Add (aF, aHole);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// update classifier
|
// update classifier
|
||||||
aTol=BRep_Tool::Tolerance(aF);
|
aTol=BRep_Tool::Tolerance(aF);
|
||||||
IntTools_FClass2d& aClsf=myContext->FClass2d(aF);
|
IntTools_FClass2d& aClsf=myContext->FClass2d(aF);
|
||||||
aClsf.Init(aF, aTol);
|
aClsf.Init(aF, aTol);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// These aNewFaces are draft faces that
|
// These aNewFaces are draft faces that
|
||||||
// do not contain any internal shapes
|
// do not contain any internal shapes
|
||||||
//
|
//
|
||||||
myAreas.Append(aNewFaces);
|
myAreas.Append(aNewFaces);
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : PerformInternalShapes
|
//function : PerformInternalShapes
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_BuilderFace::PerformInternalShapes()
|
void GEOMAlgo_BuilderFace::PerformInternalShapes()
|
||||||
{
|
{
|
||||||
@ -509,11 +493,11 @@ static
|
|||||||
if (!aNbWI) {// nothing to do
|
if (!aNbWI) {// nothing to do
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
//Standard_Real aTol;
|
//Standard_Real aTol;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
TopTools_ListIteratorOfListOfShape aIt1, aIt2;
|
TopTools_ListIteratorOfListOfShape aIt1, aIt2;
|
||||||
TopoDS_Iterator aIt;
|
TopoDS_Iterator aIt;
|
||||||
TopTools_MapOfShape aME, aMEP;
|
TopTools_MapOfShape aME, aMEP;
|
||||||
TopTools_MapIteratorOfMapOfShape aItME;
|
TopTools_MapIteratorOfMapOfShape aItME;
|
||||||
TopTools_IndexedDataMapOfShapeListOfShape aMVE;
|
TopTools_IndexedDataMapOfShapeListOfShape aMVE;
|
||||||
@ -575,7 +559,7 @@ static
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : MakeInternalWires
|
//function : MakeInternalWires
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void MakeInternalWires(const TopTools_MapOfShape& theME,
|
void MakeInternalWires(const TopTools_MapOfShape& theME,
|
||||||
TopTools_ListOfShape& theWires)
|
TopTools_ListOfShape& theWires)
|
||||||
@ -601,7 +585,7 @@ void MakeInternalWires(const TopTools_MapOfShape& theME,
|
|||||||
//
|
//
|
||||||
// make a new shell
|
// make a new shell
|
||||||
TopoDS_Wire aW;
|
TopoDS_Wire aW;
|
||||||
aBB.MakeWire(aW);
|
aBB.MakeWire(aW);
|
||||||
aEE.Orientation(TopAbs_INTERNAL);
|
aEE.Orientation(TopAbs_INTERNAL);
|
||||||
aBB.Add(aW, aEE);
|
aBB.Add(aW, aEE);
|
||||||
//
|
//
|
||||||
@ -614,7 +598,7 @@ void MakeInternalWires(const TopTools_MapOfShape& theME,
|
|||||||
const TopoDS_Shape& aV =aExp.Current();
|
const TopoDS_Shape& aV =aExp.Current();
|
||||||
const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV);
|
const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV);
|
||||||
aItE.Initialize(aLE);
|
aItE.Initialize(aLE);
|
||||||
for (; aItE.More(); aItE.Next()) {
|
for (; aItE.More(); aItE.Next()) {
|
||||||
TopoDS_Shape aEL=aItE.Value();
|
TopoDS_Shape aEL=aItE.Value();
|
||||||
if (aAddedMap.Add(aEL)){
|
if (aAddedMap.Add(aEL)){
|
||||||
aEL.Orientation(TopAbs_INTERNAL);
|
aEL.Orientation(TopAbs_INTERNAL);
|
||||||
@ -628,19 +612,15 @@ void MakeInternalWires(const TopTools_MapOfShape& theME,
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IsInside
|
//function : IsInside
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean IsInside(const TopoDS_Shape& theHole,
|
Standard_Boolean IsInside(const TopoDS_Shape& theHole,
|
||||||
const TopoDS_Shape& theF2,
|
const TopoDS_Shape& theF2,
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
const Handle(IntTools_Context)& theContext)
|
const Handle(IntTools_Context)& theContext)
|
||||||
#else
|
|
||||||
IntTools_PContext& theContext)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
Standard_Boolean bRet;
|
Standard_Boolean bRet;
|
||||||
Standard_Real aT, aU, aV;
|
Standard_Real aT, aU, aV;
|
||||||
|
|
||||||
TopAbs_State aState;
|
TopAbs_State aState;
|
||||||
TopExp_Explorer aExp;
|
TopExp_Explorer aExp;
|
||||||
TopTools_IndexedMapOfShape aME2;
|
TopTools_IndexedMapOfShape aME2;
|
||||||
@ -673,14 +653,14 @@ Standard_Boolean IsInside(const TopoDS_Shape& theHole,
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IsGrowthWire
|
//function : IsGrowthWire
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire,
|
Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire,
|
||||||
const TopTools_IndexedMapOfShape& theMHE)
|
const TopTools_IndexedMapOfShape& theMHE)
|
||||||
{
|
{
|
||||||
Standard_Boolean bRet;
|
Standard_Boolean bRet;
|
||||||
TopoDS_Iterator aIt;
|
TopoDS_Iterator aIt;
|
||||||
//
|
//
|
||||||
bRet=Standard_False;
|
bRet=Standard_False;
|
||||||
if (theMHE.Extent()) {
|
if (theMHE.Extent()) {
|
||||||
aIt.Initialize(theWire);
|
aIt.Initialize(theWire);
|
||||||
@ -703,7 +683,7 @@ Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire,
|
|||||||
/*
|
/*
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IsInside
|
//function : IsInside
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean IsInside(const TopoDS_Shape& theHole,
|
Standard_Boolean IsInside(const TopoDS_Shape& theHole,
|
||||||
const TopoDS_Shape& theF2,
|
const TopoDS_Shape& theF2,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
// 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
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// File: GEOMAlgo_BuilderFace.hxx
|
||||||
|
// Created:
|
||||||
|
// Author: Peter KURNEV
|
||||||
|
//
|
||||||
#ifndef _GEOMAlgo_BuilderFace_HeaderFile
|
#ifndef _GEOMAlgo_BuilderFace_HeaderFile
|
||||||
#define _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>
|
#include <Standard.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#endif
|
#include <TopoDS_Face.hxx>
|
||||||
|
#include <GEOMAlgo_BuilderArea.hxx>
|
||||||
|
|
||||||
//! The algorithm to build faces from set of edges <br>
|
//! 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)
|
Standard_EXPORT
|
||||||
{
|
virtual ~GEOMAlgo_BuilderFace();
|
||||||
return anAddress;
|
|
||||||
}
|
|
||||||
void* operator new(size_t size)
|
|
||||||
{
|
|
||||||
return Standard::Allocate(size);
|
|
||||||
}
|
|
||||||
void operator delete(void *anAddress)
|
|
||||||
{
|
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
|
||||||
}
|
|
||||||
// Methods PUBLIC
|
|
||||||
//
|
|
||||||
|
|
||||||
//! Empty constructor <br>
|
//! Sets the face generatix <br>
|
||||||
Standard_EXPORT GEOMAlgo_BuilderFace();
|
Standard_EXPORT
|
||||||
Standard_EXPORT virtual ~GEOMAlgo_BuilderFace();
|
void SetFace(const TopoDS_Face& theFace) ;
|
||||||
|
|
||||||
//! Sets the face generatix <br>
|
//! Returns the face generatix <br>
|
||||||
Standard_EXPORT void SetFace(const TopoDS_Face& theFace) ;
|
Standard_EXPORT
|
||||||
|
const TopoDS_Face& Face() const;
|
||||||
|
|
||||||
//! Returns the face generatix <br>
|
//! Performs the algorithm <br>
|
||||||
Standard_EXPORT const TopoDS_Face& Face() const;
|
Standard_EXPORT
|
||||||
|
virtual void Perform() ;
|
||||||
|
|
||||||
//! Performs the algorithm <br>
|
protected:
|
||||||
Standard_EXPORT virtual void Perform() ;
|
//! Collect the edges that <br>
|
||||||
|
//! a) are internal <br>
|
||||||
|
//! b) are the same and have different orientation <br>
|
||||||
|
Standard_EXPORT
|
||||||
|
virtual void PerformShapesToAvoid() ;
|
||||||
|
|
||||||
protected:
|
//! Build draft wires <br>
|
||||||
|
//! a)myLoops - draft wires that consist of <br>
|
||||||
// Methods PROTECTED
|
//! boundary edges <br>
|
||||||
//
|
//! b)myLoopsInternal - draft wires that contains <br>
|
||||||
|
//! inner edges <br>
|
||||||
//! Collect the edges that <br>
|
Standard_EXPORT
|
||||||
//! a) are internal <br>
|
virtual void PerformLoops() ;
|
||||||
//! b) are the same and have different orientation <br>
|
|
||||||
Standard_EXPORT virtual void PerformShapesToAvoid() ;
|
//! Build draft faces that contains boundary edges <br>
|
||||||
|
Standard_EXPORT
|
||||||
//! Build draft wires <br>
|
virtual void PerformAreas() ;
|
||||||
//! a)myLoops - draft wires that consist of <br>
|
|
||||||
//! boundary edges <br>
|
//! Build finalized faces with internals <br>
|
||||||
//! b)myLoopsInternal - draft wires that contains <br>
|
Standard_EXPORT
|
||||||
//! inner edges <br>
|
virtual void PerformInternalShapes() ;
|
||||||
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
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
|
TopoDS_Face myFace;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// other Inline functions and methods (like "C++: function call" methods)
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -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>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -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
|
|
@ -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;
|
|
||||||
|
|
@ -21,13 +21,13 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// File: GEOMAlgo_BuilderShape.cxx
|
// File: GEOMAlgo_BuilderShape.cxx
|
||||||
// Created:
|
// Created:
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_BuilderShape.ixx>
|
#include <GEOMAlgo_BuilderShape.hxx>
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_BuilderShape::GEOMAlgo_BuilderShape()
|
GEOMAlgo_BuilderShape::GEOMAlgo_BuilderShape()
|
||||||
:
|
:
|
||||||
@ -39,14 +39,14 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ~
|
//function : ~
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_BuilderShape::~GEOMAlgo_BuilderShape()
|
GEOMAlgo_BuilderShape::~GEOMAlgo_BuilderShape()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Shape
|
//function : Shape
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const TopoDS_Shape& GEOMAlgo_BuilderShape::Shape() const
|
const TopoDS_Shape& GEOMAlgo_BuilderShape::Shape() const
|
||||||
{
|
{
|
||||||
@ -55,7 +55,7 @@
|
|||||||
//
|
//
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Generated
|
//function : Generated
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Generated(const TopoDS_Shape& )
|
const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Generated(const TopoDS_Shape& )
|
||||||
{
|
{
|
||||||
@ -64,7 +64,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Modified
|
//function : Modified
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Modified(const TopoDS_Shape& )
|
const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Modified(const TopoDS_Shape& )
|
||||||
{
|
{
|
||||||
@ -73,18 +73,18 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IsDeleted
|
//function : IsDeleted
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean GEOMAlgo_BuilderShape::IsDeleted(const TopoDS_Shape& theS)
|
Standard_Boolean GEOMAlgo_BuilderShape::IsDeleted(const TopoDS_Shape& theS)
|
||||||
{
|
{
|
||||||
Standard_Boolean bRet;
|
Standard_Boolean bRet;
|
||||||
//
|
//
|
||||||
bRet=!myMapShape.Contains(theS);
|
bRet=!myMapShape.Contains(theS);
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : HasDeleted
|
//function : HasDeleted
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean GEOMAlgo_BuilderShape::HasDeleted()const
|
Standard_Boolean GEOMAlgo_BuilderShape::HasDeleted()const
|
||||||
{
|
{
|
||||||
@ -92,7 +92,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : HasGenerated
|
//function : HasGenerated
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean GEOMAlgo_BuilderShape::HasGenerated()const
|
Standard_Boolean GEOMAlgo_BuilderShape::HasGenerated()const
|
||||||
{
|
{
|
||||||
@ -100,7 +100,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : HasModified
|
//function : HasModified
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean GEOMAlgo_BuilderShape::HasModified()const
|
Standard_Boolean GEOMAlgo_BuilderShape::HasModified()const
|
||||||
{
|
{
|
||||||
@ -108,7 +108,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : PrepareHistory
|
//function : PrepareHistory
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_BuilderShape::PrepareHistory()
|
void GEOMAlgo_BuilderShape::PrepareHistory()
|
||||||
{
|
{
|
||||||
@ -124,7 +124,7 @@
|
|||||||
//modified by NIZNHY-PKV Thu Dec 7 11:57:00 2006f
|
//modified by NIZNHY-PKV Thu Dec 7 11:57:00 2006f
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ImagesResult
|
//function : ImagesResult
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const TopTools_IndexedDataMapOfShapeListOfShape& GEOMAlgo_BuilderShape::ImagesResult()const
|
const TopTools_IndexedDataMapOfShapeListOfShape& GEOMAlgo_BuilderShape::ImagesResult()const
|
||||||
{
|
{
|
||||||
|
@ -20,134 +20,86 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// File: GEOMAlgo_BuilderShape.hxx
|
||||||
|
// Created:
|
||||||
|
// Author: Peter KURNEV
|
||||||
|
//
|
||||||
#ifndef _GEOMAlgo_BuilderShape_HeaderFile
|
#ifndef _GEOMAlgo_BuilderShape_HeaderFile
|
||||||
#define _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>
|
#include <Standard.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
|
||||||
#include <Standard_Macro.hxx>
|
#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>
|
//! 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)
|
//! Returns the list of shapes modified from the <br>
|
||||||
{
|
//! shape theS. <br>
|
||||||
return anAddress;
|
Standard_EXPORT
|
||||||
}
|
virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
|
||||||
void* operator new(size_t size)
|
|
||||||
{
|
|
||||||
return Standard::Allocate(size);
|
|
||||||
}
|
|
||||||
void operator delete(void *anAddress)
|
|
||||||
{
|
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
|
||||||
}
|
|
||||||
// Methods PUBLIC
|
|
||||||
//
|
|
||||||
|
|
||||||
//! Returns the result of algorithm <br>
|
//! Returns true if the shape theS has been deleted. <br>
|
||||||
Standard_EXPORT const TopoDS_Shape& Shape() const;
|
Standard_EXPORT
|
||||||
|
virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
|
||||||
//! 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 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:
|
protected:
|
||||||
|
//! Empty constructor <br>
|
||||||
|
Standard_EXPORT
|
||||||
|
GEOMAlgo_BuilderShape();
|
||||||
|
|
||||||
// Methods PROTECTED
|
Standard_EXPORT
|
||||||
//
|
virtual ~GEOMAlgo_BuilderShape();
|
||||||
|
|
||||||
//! Empty constructor <br>
|
//! Prepare information for history support <br>
|
||||||
Standard_EXPORT GEOMAlgo_BuilderShape();
|
Standard_EXPORT
|
||||||
Standard_EXPORT virtual ~GEOMAlgo_BuilderShape();
|
virtual void PrepareHistory() ;
|
||||||
|
|
||||||
//! 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
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
|
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
|
#endif
|
||||||
|
@ -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>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -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
|
|
@ -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;
|
|
@ -21,18 +21,10 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// File: GEOMAlgo_BuilderSolid.cxx
|
// File: GEOMAlgo_BuilderSolid.cxx
|
||||||
|
// Created:
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
|
//
|
||||||
#include <GEOMAlgo_BuilderSolid.ixx>
|
#include <GEOMAlgo_BuilderSolid.hxx>
|
||||||
|
|
||||||
#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 <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
#include <gp_Pln.hxx>
|
#include <gp_Pln.hxx>
|
||||||
@ -81,27 +73,24 @@
|
|||||||
#include <BOPTools_Tools2D.hxx>
|
#include <BOPTools_Tools2D.hxx>
|
||||||
#include <BOPTools_Tools3D.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
|
static
|
||||||
Standard_Boolean IsGrowthShell(const TopoDS_Shape& ,
|
Standard_Boolean IsGrowthShell(const TopoDS_Shape& ,
|
||||||
const TopTools_IndexedMapOfShape& );
|
const TopTools_IndexedMapOfShape& );
|
||||||
static
|
static
|
||||||
Standard_Boolean IsHole(const TopoDS_Shape& ,
|
Standard_Boolean IsHole(const TopoDS_Shape& ,
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
const Handle(IntTools_Context)& );
|
const Handle(IntTools_Context)& );
|
||||||
#else
|
|
||||||
IntTools_PContext& );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static
|
static
|
||||||
Standard_Boolean IsInside(const TopoDS_Shape& ,
|
Standard_Boolean IsInside(const TopoDS_Shape& ,
|
||||||
const TopoDS_Shape& ,
|
const TopoDS_Shape& ,
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
const Handle(IntTools_Context)& );
|
const Handle(IntTools_Context)& );
|
||||||
#else
|
|
||||||
IntTools_PContext& );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static
|
static
|
||||||
void MakeInternalShells(const TopTools_MapOfShape& ,
|
void MakeInternalShells(const TopTools_MapOfShape& ,
|
||||||
TopTools_ListOfShape& );
|
TopTools_ListOfShape& );
|
||||||
@ -111,7 +100,7 @@ static
|
|||||||
|
|
||||||
static
|
static
|
||||||
Standard_Boolean RefineShell(const TopoDS_Shell& ,
|
Standard_Boolean RefineShell(const TopoDS_Shell& ,
|
||||||
TopoDS_Shell& );
|
TopoDS_Shell& );
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
@ -137,10 +126,8 @@ void GEOMAlgo_BuilderSolid::Perform()
|
|||||||
{
|
{
|
||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
//
|
//
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
// Initialize the context
|
// Initialize the context
|
||||||
GEOMAlgo_BuilderArea::Perform();
|
GEOMAlgo_BuilderArea::Perform();
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
TopoDS_Compound aC;
|
TopoDS_Compound aC;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
@ -153,13 +140,6 @@ void GEOMAlgo_BuilderSolid::Perform()
|
|||||||
aBB.Add(aC, aF);
|
aBB.Add(aC, aF);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
#if OCC_VERSION_LARGE <= 0x06050200
|
|
||||||
if (myContext==NULL) {
|
|
||||||
myErrorStatus=11;// Null Context
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
//
|
|
||||||
PerformShapesToAvoid();
|
PerformShapesToAvoid();
|
||||||
if (myErrorStatus) {
|
if (myErrorStatus) {
|
||||||
return;
|
return;
|
||||||
@ -209,7 +189,7 @@ void GEOMAlgo_BuilderSolid::PerformShapesToAvoid()
|
|||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
else {
|
else {
|
||||||
int a=0;
|
int a=0;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
@ -410,17 +390,15 @@ void GEOMAlgo_BuilderSolid::PerformLoops()
|
|||||||
if (IsClosedShell(aShell)) {
|
if (IsClosedShell(aShell)) {
|
||||||
myLoops.Append(aShell);
|
myLoops.Append(aShell);
|
||||||
}
|
}
|
||||||
//modified by NIZNHY-PKV Wed Oct 27 07:10:41 2010f
|
|
||||||
else {
|
else {
|
||||||
Standard_Boolean bRefine;
|
Standard_Boolean bRefine;
|
||||||
TopoDS_Shell aShx;
|
TopoDS_Shell aShx;
|
||||||
//
|
//
|
||||||
bRefine=RefineShell(aShell, aShx);
|
bRefine=RefineShell(aShell, aShx);
|
||||||
if (bRefine) {
|
if (bRefine) {
|
||||||
myLoops.Append(aShx);
|
myLoops.Append(aShx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//modified by NIZNHY-PKV Wed Oct 27 07:10:44 2010t
|
|
||||||
} // for (; aItF.More(); aItF.Next()) {
|
} // for (; aItF.More(); aItF.Next()) {
|
||||||
//
|
//
|
||||||
// Post Treatment
|
// Post Treatment
|
||||||
@ -631,10 +609,11 @@ void GEOMAlgo_BuilderSolid::PerformInternalShapes()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
Standard_Integer bFlag;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
TopTools_ListIteratorOfListOfShape aShellIt, aSolidIt;
|
TopTools_ListIteratorOfListOfShape aShellIt, aSolidIt;
|
||||||
TopoDS_Iterator aIt;
|
TopoDS_Iterator aIt;
|
||||||
TopTools_MapOfShape aMF, aMFP;
|
TopTools_MapOfShape aMF, aMFP, aMFS;
|
||||||
TopTools_MapIteratorOfMapOfShape aItMF;
|
TopTools_MapIteratorOfMapOfShape aItMF;
|
||||||
TopTools_IndexedDataMapOfShapeListOfShape aMEF;
|
TopTools_IndexedDataMapOfShapeListOfShape aMEF;
|
||||||
TopTools_ListOfShape aLSI;
|
TopTools_ListOfShape aLSI;
|
||||||
@ -656,6 +635,16 @@ void GEOMAlgo_BuilderSolid::PerformInternalShapes()
|
|||||||
for ( ; aSolidIt.More(); aSolidIt.Next()) {
|
for ( ; aSolidIt.More(); aSolidIt.Next()) {
|
||||||
TopoDS_Solid& aSolid=*((TopoDS_Solid*)(&aSolidIt.Value()));
|
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();
|
aMEF.Clear();
|
||||||
TopExp::MapShapesAndAncestors(aSolid, TopAbs_EDGE, TopAbs_FACE, aMEF);
|
TopExp::MapShapesAndAncestors(aSolid, TopAbs_EDGE, TopAbs_FACE, aMEF);
|
||||||
//
|
//
|
||||||
@ -664,13 +653,17 @@ void GEOMAlgo_BuilderSolid::PerformInternalShapes()
|
|||||||
aItMF.Initialize(aMF);
|
aItMF.Initialize(aMF);
|
||||||
for (; aItMF.More(); aItMF.Next()) {
|
for (; aItMF.More(); aItMF.Next()) {
|
||||||
const TopoDS_Face& aF=*((TopoDS_Face*)(&aItMF.Key()));
|
const TopoDS_Face& aF=*((TopoDS_Face*)(&aItMF.Key()));
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
//modified by NIZNHY-PKV Wed Mar 07 08:54:56 2012f
|
||||||
if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext)) {
|
if (!aMFS.Contains(aF)) {
|
||||||
#else
|
bFlag=GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext);
|
||||||
if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, *myContext)) {
|
if (bFlag) {
|
||||||
#endif
|
aMFP.Add(aF);
|
||||||
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
|
// 2.2 Make Internal Shells
|
||||||
@ -756,11 +749,7 @@ void MakeInternalShells(const TopTools_MapOfShape& theMF,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean IsHole(const TopoDS_Shape& theS2,
|
Standard_Boolean IsHole(const TopoDS_Shape& theS2,
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
const Handle(IntTools_Context)& theContext)
|
const Handle(IntTools_Context)& theContext)
|
||||||
#else
|
|
||||||
IntTools_PContext& theContext)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
TopoDS_Solid *pS2=(TopoDS_Solid *)&theS2;
|
TopoDS_Solid *pS2=(TopoDS_Solid *)&theS2;
|
||||||
BRepClass3d_SolidClassifier& aClsf=theContext->SolidClassifier(*pS2);
|
BRepClass3d_SolidClassifier& aClsf=theContext->SolidClassifier(*pS2);
|
||||||
@ -775,11 +764,7 @@ Standard_Boolean IsHole(const TopoDS_Shape& theS2,
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean IsInside(const TopoDS_Shape& theS1,
|
Standard_Boolean IsInside(const TopoDS_Shape& theS1,
|
||||||
const TopoDS_Shape& theS2,
|
const TopoDS_Shape& theS2,
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
const Handle(IntTools_Context)& theContext)
|
const Handle(IntTools_Context)& theContext)
|
||||||
#else
|
|
||||||
IntTools_PContext& theContext)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
TopExp_Explorer aExp;
|
TopExp_Explorer aExp;
|
||||||
TopAbs_State aState;
|
TopAbs_State aState;
|
||||||
@ -795,11 +780,7 @@ Standard_Boolean IsInside(const TopoDS_Shape& theS1,
|
|||||||
else {
|
else {
|
||||||
TopTools_IndexedMapOfShape aBounds;
|
TopTools_IndexedMapOfShape aBounds;
|
||||||
const TopoDS_Face& aF = TopoDS::Face(aExp.Current());
|
const TopoDS_Face& aF = TopoDS::Face(aExp.Current());
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
aState=GEOMAlgo_Tools3D::ComputeState(aF, *pS2, 1.e-14, aBounds, theContext);
|
aState=GEOMAlgo_Tools3D::ComputeState(aF, *pS2, 1.e-14, aBounds, theContext);
|
||||||
#else
|
|
||||||
aState=GEOMAlgo_Tools3D::ComputeState(aF, *pS2, 1.e-14, aBounds, *theContext);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
return (aState==TopAbs_IN);
|
return (aState==TopAbs_IN);
|
||||||
}
|
}
|
||||||
@ -864,13 +845,13 @@ Standard_Boolean IsClosedShell(const TopoDS_Shell& theShell)
|
|||||||
}
|
}
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : RefineShell
|
//function : RefineShell
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean RefineShell (const TopoDS_Shell& aShell,
|
Standard_Boolean RefineShell(const TopoDS_Shell& aShell,
|
||||||
TopoDS_Shell& aShx)
|
TopoDS_Shell& aShx)
|
||||||
|
|
||||||
{
|
{
|
||||||
Standard_Boolean bRet;
|
Standard_Boolean bRet;
|
||||||
Standard_Integer i, aNbE, aNbF;
|
Standard_Integer i, aNbE, aNbF;
|
||||||
@ -900,7 +881,7 @@ Standard_Boolean RefineShell (const TopoDS_Shell& aShell,
|
|||||||
const TopoDS_Face& aF1=*((TopoDS_Face*)(&aLF.First()));
|
const TopoDS_Face& aF1=*((TopoDS_Face*)(&aLF.First()));
|
||||||
if (aNbF==1) {
|
if (aNbF==1) {
|
||||||
if (aOrE==TopAbs_INTERNAL) {
|
if (aOrE==TopAbs_INTERNAL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
aMFx.Add(aF1);
|
aMFx.Add(aF1);
|
||||||
}
|
}
|
||||||
@ -908,14 +889,14 @@ Standard_Boolean RefineShell (const TopoDS_Shell& aShell,
|
|||||||
else if (aNbF==2) {
|
else if (aNbF==2) {
|
||||||
const TopoDS_Face& aF2=*((TopoDS_Face*)(&aLF.Last()));
|
const TopoDS_Face& aF2=*((TopoDS_Face*)(&aLF.Last()));
|
||||||
if (aF2.IsSame(aF1)) {
|
if (aF2.IsSame(aF1)) {
|
||||||
if (BRep_Tool::IsClosed(aE, aF1)) {
|
if (BRep_Tool::IsClosed(aE, aF1)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (aOrE==TopAbs_INTERNAL) {
|
if (aOrE==TopAbs_INTERNAL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
aMFx.Add(aF1);
|
aMFx.Add(aF1);
|
||||||
aMFx.Add(aF2);
|
aMFx.Add(aF2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -945,6 +926,6 @@ Standard_Boolean RefineShell (const TopoDS_Shell& aShell,
|
|||||||
//
|
//
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
//
|
||||||
// ErrorStatus :
|
// ErrorStatus :
|
||||||
// 11 - Null Context
|
// 11 - Null Context
|
||||||
|
@ -20,98 +20,58 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// File: GEOMAlgo_BuilderSolid.hxx
|
||||||
|
// Created:
|
||||||
|
// Author: Peter KURNEV
|
||||||
|
//
|
||||||
#ifndef _GEOMAlgo_BuilderSolid_HeaderFile
|
#ifndef _GEOMAlgo_BuilderSolid_HeaderFile
|
||||||
#define _GEOMAlgo_BuilderSolid_HeaderFile
|
#define _GEOMAlgo_BuilderSolid_HeaderFile
|
||||||
|
|
||||||
#ifndef _GEOMAlgo_BuilderArea_HeaderFile
|
|
||||||
#include <GEOMAlgo_BuilderArea.hxx>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _Standard_HeaderFile
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#endif
|
#include <GEOMAlgo_BuilderArea.hxx>
|
||||||
|
|
||||||
//! The algorithm to build solids from set of faces <br>
|
//! 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)
|
//! Performs the algorithm <br>
|
||||||
{
|
Standard_EXPORT
|
||||||
return anAddress;
|
virtual void Perform() ;
|
||||||
}
|
|
||||||
void* operator new(size_t size)
|
|
||||||
{
|
|
||||||
return Standard::Allocate(size);
|
|
||||||
}
|
|
||||||
void operator delete(void *anAddress)
|
|
||||||
{
|
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
|
||||||
}
|
|
||||||
// Methods PUBLIC
|
|
||||||
//
|
|
||||||
|
|
||||||
//! Empty constructor <br>
|
protected:
|
||||||
Standard_EXPORT GEOMAlgo_BuilderSolid();
|
//! Collect the faces that <br>
|
||||||
Standard_EXPORT virtual ~GEOMAlgo_BuilderSolid();
|
//! a) are internal <br>
|
||||||
|
//! b) are the same and have different orientation <br>
|
||||||
|
Standard_EXPORT
|
||||||
|
virtual void PerformShapesToAvoid() ;
|
||||||
|
|
||||||
//! Performs the algorithm <br>
|
//! Build draft shells <br>
|
||||||
Standard_EXPORT virtual void Perform() ;
|
//! 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() ;
|
||||||
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
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// other Inline functions and methods (like "C++: function call" methods)
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -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>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -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
|
|
@ -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;
|
|
@ -23,7 +23,7 @@
|
|||||||
// File: GEOMAlgo_BuilderTools.cxx
|
// File: GEOMAlgo_BuilderTools.cxx
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
|
|
||||||
#include <GEOMAlgo_BuilderTools.ixx>
|
#include <GEOMAlgo_BuilderTools.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
#include <Basics_OCCTVersion.hxx>
|
||||||
|
|
||||||
@ -64,7 +64,7 @@
|
|||||||
#include <Bnd_Box.hxx>
|
#include <Bnd_Box.hxx>
|
||||||
#include <BRepAdaptor_Curve2d.hxx>
|
#include <BRepAdaptor_Curve2d.hxx>
|
||||||
|
|
||||||
static
|
static
|
||||||
Standard_Integer ComputeProps(const TopoDS_Face& aF,
|
Standard_Integer ComputeProps(const TopoDS_Face& aF,
|
||||||
Standard_Real& aA,
|
Standard_Real& aA,
|
||||||
Standard_Real& aV);
|
Standard_Real& aV);
|
||||||
@ -73,7 +73,7 @@ static
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IsHole
|
//function : IsHole
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aW,
|
Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aW,
|
||||||
const TopoDS_Shape& aFace)
|
const TopoDS_Shape& aFace)
|
||||||
@ -84,7 +84,7 @@ static
|
|||||||
Standard_Real aU1, aU2, aU, dU;
|
Standard_Real aU1, aU2, aU, dU;
|
||||||
Standard_Real aX1, aY1, aX0, aY0;
|
Standard_Real aX1, aY1, aX0, aY0;
|
||||||
TopAbs_Orientation aOr;
|
TopAbs_Orientation aOr;
|
||||||
|
|
||||||
gp_Pnt2d aP2D0, aP2D1;
|
gp_Pnt2d aP2D0, aP2D1;
|
||||||
Handle(Geom2d_Curve) aC2D;
|
Handle(Geom2d_Curve) aC2D;
|
||||||
TopoDS_Face aF, aFF;
|
TopoDS_Face aF, aFF;
|
||||||
@ -98,10 +98,10 @@ static
|
|||||||
//
|
//
|
||||||
aS=0.;
|
aS=0.;
|
||||||
aItW.Initialize(aW);
|
aItW.Initialize(aW);
|
||||||
for (; aItW.More(); aItW.Next()) {
|
for (; aItW.More(); aItW.Next()) {
|
||||||
const TopoDS_Edge& aE=TopoDS::Edge(aItW.Value());
|
const TopoDS_Edge& aE=TopoDS::Edge(aItW.Value());
|
||||||
aOr=aE.Orientation();
|
aOr=aE.Orientation();
|
||||||
if (!(aOr==TopAbs_FORWARD ||
|
if (!(aOr==TopAbs_FORWARD ||
|
||||||
aOr==TopAbs_REVERSED)) {
|
aOr==TopAbs_REVERSED)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -135,17 +135,17 @@ static
|
|||||||
aP2D0.Coord(aX0, aY0);
|
aP2D0.Coord(aX0, aY0);
|
||||||
aP2D1.Coord(aX1, aY1);
|
aP2D1.Coord(aX1, aY1);
|
||||||
//
|
//
|
||||||
aS=aS+(aY0+aY1)*(aX1-aX0);
|
aS=aS+(aY0+aY1)*(aX1-aX0);
|
||||||
//
|
//
|
||||||
aP2D0=aP2D1;
|
aP2D0=aP2D1;
|
||||||
}
|
}
|
||||||
}//for (; aItW.More(); aItW.Next()) {
|
}//for (; aItW.More(); aItW.Next()) {
|
||||||
bIsHole=(aS>0.);
|
bIsHole=(aS>0.);
|
||||||
return bIsHole;
|
return bIsHole;
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IsHole
|
//function : IsHole
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aShell)
|
Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aShell)
|
||||||
{
|
{
|
||||||
@ -171,7 +171,7 @@ static
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ComputeProps
|
//function : ComputeProps
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Integer ComputeProps(const TopoDS_Face& aF,
|
Standard_Integer ComputeProps(const TopoDS_Face& aF,
|
||||||
Standard_Real& aA,
|
Standard_Real& aA,
|
||||||
@ -244,7 +244,7 @@ Standard_Integer ComputeProps(const TopoDS_Face& aF,
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : BuildTriangulation
|
//function : BuildTriangulation
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void BuildTriangulation(const TopoDS_Face& aF)
|
void BuildTriangulation(const TopoDS_Face& aF)
|
||||||
{
|
{
|
||||||
|
@ -20,80 +20,29 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// File: GEOMAlgo_BuilderTools.hxx
|
||||||
|
// Author: Peter KURNEV
|
||||||
|
|
||||||
#ifndef _GEOMAlgo_BuilderTools_HeaderFile
|
#ifndef _GEOMAlgo_BuilderTools_HeaderFile
|
||||||
#define _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>
|
#include <Standard.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#endif
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <TopoDS_Shape.hxx>
|
||||||
|
|
||||||
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
|
|
||||||
//
|
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//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
|
#endif
|
||||||
|
@ -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>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -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
|
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Shapes1
|
//function : Shapes1
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const TopTools_ListOfShape& GEOMAlgo_Builder::Shapes1(const Standard_Integer theType)const
|
const TopTools_ListOfShape& GEOMAlgo_Builder::Shapes1(const Standard_Integer theType)const
|
||||||
{
|
{
|
||||||
@ -43,7 +43,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Images
|
//function : Images
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const BRepAlgo_Image& GEOMAlgo_Builder::Images()const
|
const BRepAlgo_Image& GEOMAlgo_Builder::Images()const
|
||||||
{
|
{
|
||||||
@ -51,7 +51,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : InParts
|
//function : InParts
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const TopTools_ListOfShape& GEOMAlgo_Builder::InParts(const TopoDS_Shape& theS)const
|
const TopTools_ListOfShape& GEOMAlgo_Builder::InParts(const TopoDS_Shape& theS)const
|
||||||
{
|
{
|
||||||
|
@ -21,26 +21,12 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// File: GEOMAlgo_Builder_1.cxx
|
// File: GEOMAlgo_Builder_1.cxx
|
||||||
// Author: Peter KURNEV
|
// Created:
|
||||||
|
// Author: Peter KURNEV
|
||||||
|
//
|
||||||
#include <GEOMAlgo_Builder.hxx>
|
#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_ListOfInteger.hxx>
|
||||||
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
|
||||||
|
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
@ -48,20 +34,33 @@
|
|||||||
#include <TopoDS_Edge.hxx>
|
#include <TopoDS_Edge.hxx>
|
||||||
#include <TopoDS_Shell.hxx>
|
#include <TopoDS_Shell.hxx>
|
||||||
#include <TopoDS_Iterator.hxx>
|
#include <TopoDS_Iterator.hxx>
|
||||||
|
//
|
||||||
#include <TopTools_MapOfShape.hxx>
|
#include <TopTools_MapOfShape.hxx>
|
||||||
#include <TopTools_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||||
#include <TopTools_MapIteratorOfMapOfShape.hxx>
|
#include <TopTools_MapIteratorOfMapOfShape.hxx>
|
||||||
|
//
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
|
//
|
||||||
#include <IntTools_Context.hxx>
|
#include <IntTools_Context.hxx>
|
||||||
|
|
||||||
#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
|
#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
|
||||||
#include <BOPTools_ListOfPaveBlock.hxx>
|
#include <BOPTools_ListOfPaveBlock.hxx>
|
||||||
#include <BOPTools_PaveBlock.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
|
static
|
||||||
@ -75,7 +74,7 @@ static
|
|||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : FillImagesVertices
|
//function : FillImagesVertices
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::FillImagesVertices()
|
void GEOMAlgo_Builder::FillImagesVertices()
|
||||||
{
|
{
|
||||||
@ -104,7 +103,7 @@ static
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function: FillImagesEdges
|
// function: FillImagesEdges
|
||||||
// purpose:
|
// purpose:
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::FillImagesEdges()
|
void GEOMAlgo_Builder::FillImagesEdges()
|
||||||
{
|
{
|
||||||
@ -113,11 +112,7 @@ static
|
|||||||
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
|
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
|
||||||
NMTTools_PaveFiller* pPF=myPaveFiller;
|
NMTTools_PaveFiller* pPF=myPaveFiller;
|
||||||
const BOPTools_SplitShapesPool& aSSP=pPF->SplitShapesPool();
|
const BOPTools_SplitShapesPool& aSSP=pPF->SplitShapesPool();
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
const Handle(IntTools_Context)& aCtx=pPF->Context();
|
const Handle(IntTools_Context)& aCtx=pPF->Context();
|
||||||
#else
|
|
||||||
IntTools_Context& aCtx=pPF->ChangeContext();
|
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
Standard_Boolean bToReverse;
|
Standard_Boolean bToReverse;
|
||||||
Standard_Integer i, aNb, aNbSp, nSp, nSpR, nSpx, aIsCB, aNbLB;
|
Standard_Integer i, aNb, aNbSp, nSp, nSpR, nSpx, aIsCB, aNbLB;
|
||||||
@ -209,12 +204,12 @@ static
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
myImages.Bind(aE, aLSp);
|
myImages.Bind(aE, aLSp);
|
||||||
|
|
||||||
}//for (i=1; i<=aNb; ++i)
|
}//for (i=1; i<=aNb; ++i)
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function: FillImagesContainers
|
// function: FillImagesContainers
|
||||||
// purpose:
|
// purpose:
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::FillImagesContainers(const TopAbs_ShapeEnum theType)
|
void GEOMAlgo_Builder::FillImagesContainers(const TopAbs_ShapeEnum theType)
|
||||||
{
|
{
|
||||||
@ -225,17 +220,13 @@ static
|
|||||||
TopAbs_ShapeEnum aType;
|
TopAbs_ShapeEnum aType;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
TopoDS_Iterator aIt;
|
TopoDS_Iterator aIt;
|
||||||
TopTools_ListIteratorOfListOfShape aItIm;
|
TopTools_ListIteratorOfListOfShape aItIm;
|
||||||
TopTools_MapOfShape aMS;
|
TopTools_MapOfShape aMS;
|
||||||
TopTools_MapIteratorOfMapOfShape aItS;
|
TopTools_MapIteratorOfMapOfShape aItS;
|
||||||
//
|
//
|
||||||
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
|
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
|
||||||
NMTTools_PaveFiller* pPF=myPaveFiller;
|
NMTTools_PaveFiller* pPF=myPaveFiller;
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
const Handle(IntTools_Context)& aCtx= pPF->Context();
|
const Handle(IntTools_Context)& aCtx= pPF->Context();
|
||||||
#else
|
|
||||||
IntTools_Context& aCtx= pPF->ChangeContext();
|
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
aNbS=aDS.NumberOfShapesOfTheObject();
|
aNbS=aDS.NumberOfShapesOfTheObject();
|
||||||
for (i=1; i<=aNbS; ++i) {
|
for (i=1; i<=aNbS; ++i) {
|
||||||
@ -291,12 +282,12 @@ static
|
|||||||
aBB.Add(aCIm, aF);
|
aBB.Add(aCIm, aF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
myImages.Bind(aC, aCIm);
|
myImages.Bind(aC, aCIm);
|
||||||
}// for (; aItS.More(); aItS.Next()) {
|
}// for (; aItS.More(); aItS.Next()) {
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function: FillImagesCompounds
|
// function: FillImagesCompounds
|
||||||
// purpose:
|
// purpose:
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void FillImagesCompounds(const TopTools_MapOfShape& theMS,
|
void FillImagesCompounds(const TopTools_MapOfShape& theMS,
|
||||||
BRepAlgo_Image& theImages)
|
BRepAlgo_Image& theImages)
|
||||||
@ -312,18 +303,18 @@ void FillImagesCompounds(const TopTools_MapOfShape& theMS,
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : FillImagesCompound
|
//function : FillImagesCompound
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void FillImagesCompound(const TopoDS_Shape& theS,
|
void FillImagesCompound(const TopoDS_Shape& theS,
|
||||||
BRepAlgo_Image& theImages,
|
BRepAlgo_Image& theImages,
|
||||||
TopTools_MapOfShape& theMFP)
|
TopTools_MapOfShape& theMFP)
|
||||||
{
|
{
|
||||||
Standard_Boolean bInterferred;
|
Standard_Boolean bInterferred;
|
||||||
TopAbs_ShapeEnum aTypeX;
|
TopAbs_ShapeEnum aTypeX;
|
||||||
TopAbs_Orientation aOrX;
|
TopAbs_Orientation aOrX;
|
||||||
TopoDS_Iterator aIt;
|
TopoDS_Iterator aIt;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
TopTools_ListIteratorOfListOfShape aItIm;
|
TopTools_ListIteratorOfListOfShape aItIm;
|
||||||
//
|
//
|
||||||
if (!theMFP.Add(theS)) {
|
if (!theMFP.Add(theS)) {
|
||||||
return;
|
return;
|
||||||
@ -365,5 +356,5 @@ void FillImagesCompound(const TopoDS_Shape& theS,
|
|||||||
aBB.Add(aCIm, aSX);
|
aBB.Add(aCIm, aSX);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
theImages.Bind(theS, aCIm);
|
theImages.Bind(theS, aCIm);
|
||||||
}
|
}
|
||||||
|
@ -24,27 +24,8 @@
|
|||||||
|
|
||||||
#include <GEOMAlgo_Builder.hxx>
|
#include <GEOMAlgo_Builder.hxx>
|
||||||
|
|
||||||
#include <Basics_OCCTVersion.hxx>
|
#include <TColStd_IndexedMapOfInteger.hxx>
|
||||||
|
#include <TColStd_ListOfInteger.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 <TopAbs_Orientation.hxx>
|
#include <TopAbs_Orientation.hxx>
|
||||||
|
|
||||||
@ -58,8 +39,6 @@
|
|||||||
#include <TopTools_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <TopTools_MapOfShape.hxx>
|
#include <TopTools_MapOfShape.hxx>
|
||||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||||
#include <TopTools_DataMapOfIntegerShape.hxx>
|
|
||||||
#include <TopTools_DataMapOfShapeInteger.hxx>
|
|
||||||
|
|
||||||
#include <TopExp.hxx>
|
#include <TopExp.hxx>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
@ -72,13 +51,8 @@
|
|||||||
#include <IntTools_Context.hxx>
|
#include <IntTools_Context.hxx>
|
||||||
#include <IntTools_FClass2d.hxx>
|
#include <IntTools_FClass2d.hxx>
|
||||||
|
|
||||||
#include <Bnd_Box.hxx>
|
|
||||||
#include <BRepBndLib.hxx>
|
|
||||||
|
|
||||||
#include <BooleanOperations_OnceExplorer.hxx>
|
#include <BooleanOperations_OnceExplorer.hxx>
|
||||||
|
|
||||||
#include <BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx>
|
#include <BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx>
|
||||||
|
|
||||||
#include <BOPTools_ListOfPaveBlock.hxx>
|
#include <BOPTools_ListOfPaveBlock.hxx>
|
||||||
#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
|
#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
|
||||||
#include <BOPTools_CArray1OfSSInterference.hxx>
|
#include <BOPTools_CArray1OfSSInterference.hxx>
|
||||||
@ -93,11 +67,34 @@
|
|||||||
#include <BOPTools_ESInterference.hxx>
|
#include <BOPTools_ESInterference.hxx>
|
||||||
#include <BOPTools_CArray1OfESInterference.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_ListOfInteger.hxx>
|
||||||
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
||||||
|
#include <TopTools_DataMapOfShapeInteger.hxx>
|
||||||
|
|
||||||
static
|
static
|
||||||
void UpdateCandidates(const Standard_Integer ,
|
void UpdateCandidates(const Standard_Integer ,
|
||||||
@ -106,8 +103,8 @@ static
|
|||||||
|
|
||||||
//modified by NIZNHY-PKV Thu Feb 16 12:24:52 2012f
|
//modified by NIZNHY-PKV Thu Feb 16 12:24:52 2012f
|
||||||
static
|
static
|
||||||
Standard_Boolean IsClosed(const TopoDS_Edge& aE,
|
Standard_Boolean IsClosed(const TopoDS_Edge& ,
|
||||||
const TopoDS_Face& aF);
|
const TopoDS_Face& );
|
||||||
//modified by NIZNHY-PKV Thu Feb 16 12:24:56 2012t
|
//modified by NIZNHY-PKV Thu Feb 16 12:24:56 2012t
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -216,11 +213,7 @@ void GEOMAlgo_Builder::BuildSplitFaces()
|
|||||||
NMTTools_PaveFiller* pPF=myPaveFiller;
|
NMTTools_PaveFiller* pPF=myPaveFiller;
|
||||||
NMTDS_InterfPool* pIP=pPF->IP();
|
NMTDS_InterfPool* pIP=pPF->IP();
|
||||||
BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
|
BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
const Handle(IntTools_Context)& aCtx= pPF->Context();
|
const Handle(IntTools_Context)& aCtx= pPF->Context();
|
||||||
#else
|
|
||||||
IntTools_Context& aCtx= pPF->ChangeContext();
|
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
Standard_Boolean bToReverse, bIsClosed, bIsDegenerated;
|
Standard_Boolean bToReverse, bIsClosed, bIsDegenerated;
|
||||||
Standard_Integer i, aNb, aNbF, nF;
|
Standard_Integer i, aNb, aNbF, nF;
|
||||||
@ -319,10 +312,10 @@ void GEOMAlgo_Builder::BuildSplitFaces()
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
bIsDegenerated=BRep_Tool::Degenerated(aE);
|
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=IsClosed(aE, aF);
|
||||||
//bIsClosed=BRep_Tool::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);
|
const TopTools_ListOfShape& aLIE=myImages.Image(aE);
|
||||||
aIt.Initialize(aLIE);
|
aIt.Initialize(aLIE);
|
||||||
@ -435,11 +428,7 @@ void GEOMAlgo_Builder::FillSameDomainFaces()
|
|||||||
NMTTools_PaveFiller* pPF=myPaveFiller;
|
NMTTools_PaveFiller* pPF=myPaveFiller;
|
||||||
NMTDS_InterfPool* pIP=pPF->IP();
|
NMTDS_InterfPool* pIP=pPF->IP();
|
||||||
BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
|
BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
const Handle(IntTools_Context)& aCtx= pPF->Context();
|
||||||
const Handle(IntTools_Context)& aCtx=pPF->Context();
|
|
||||||
#else
|
|
||||||
IntTools_Context& aCtx=pPF->ChangeContext();
|
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//mySameDomainShapes.Clear();
|
//mySameDomainShapes.Clear();
|
||||||
@ -600,7 +589,7 @@ void GEOMAlgo_Builder::FillSameDomainFaces()
|
|||||||
// 2. Find Chains
|
// 2. Find Chains
|
||||||
NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMC;
|
NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMC;
|
||||||
//
|
//
|
||||||
NMTTools_Tools::FindChains(aLCS, aMC);
|
NMTTools_Tools::FindChains(aLCS, aMC);
|
||||||
//
|
//
|
||||||
Standard_Boolean bIsImage;
|
Standard_Boolean bIsImage;
|
||||||
Standard_Integer aIx, aIxMin, aNbMSDF, k, aNbMFj;
|
Standard_Integer aIx, aIxMin, aNbMSDF, k, aNbMFj;
|
||||||
@ -726,11 +715,7 @@ void GEOMAlgo_Builder::FillInternalVertices()
|
|||||||
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
|
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
|
||||||
NMTTools_PaveFiller* pPF=myPaveFiller;
|
NMTTools_PaveFiller* pPF=myPaveFiller;
|
||||||
NMTDS_InterfPool* pIP=pPF->IP();
|
NMTDS_InterfPool* pIP=pPF->IP();
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
const Handle(IntTools_Context)& aCtx= pPF->Context();
|
const Handle(IntTools_Context)& aCtx= pPF->Context();
|
||||||
#else
|
|
||||||
IntTools_Context& aCtx= pPF->ChangeContext();
|
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
BOPTools_CArray1OfVSInterference& aVFs=pIP->VSInterferences();
|
BOPTools_CArray1OfVSInterference& aVFs=pIP->VSInterferences();
|
||||||
BOPTools_CArray1OfESInterference& aEFs=pIP->ESInterferences();
|
BOPTools_CArray1OfESInterference& aEFs=pIP->ESInterferences();
|
||||||
@ -903,18 +888,10 @@ void GEOMAlgo_Builder::FillInternalVertices()
|
|||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
TopoDS_Face aFx=TopoDS::Face(aIt.Value());
|
TopoDS_Face aFx=TopoDS::Face(aIt.Value());
|
||||||
// update classifier
|
// update classifier
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
IntTools_FClass2d& aClsf=aCtx->FClass2d(aFx);
|
IntTools_FClass2d& aClsf=aCtx->FClass2d(aFx);
|
||||||
#else
|
|
||||||
IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx);
|
|
||||||
#endif
|
|
||||||
aClsf.Init(aFx, aTol);
|
aClsf.Init(aFx, aTol);
|
||||||
//
|
//
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
iFlag=aCtx->ComputeVS (aV, aFx, aU1, aU2);
|
iFlag=aCtx->ComputeVS (aV, aFx, aU1, aU2);
|
||||||
#else
|
|
||||||
iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2);
|
|
||||||
#endif
|
|
||||||
if (!iFlag) {
|
if (!iFlag) {
|
||||||
aBB.Add(aFx, aV);
|
aBB.Add(aFx, aV);
|
||||||
break;
|
break;
|
||||||
@ -924,18 +901,10 @@ void GEOMAlgo_Builder::FillInternalVertices()
|
|||||||
else {
|
else {
|
||||||
const TopoDS_Face& aFx=TopoDS::Face(aF);
|
const TopoDS_Face& aFx=TopoDS::Face(aF);
|
||||||
// update classifier
|
// update classifier
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
IntTools_FClass2d& aClsf=aCtx->FClass2d(aFx);
|
IntTools_FClass2d& aClsf=aCtx->FClass2d(aFx);
|
||||||
#else
|
|
||||||
IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx);
|
|
||||||
#endif
|
|
||||||
aClsf.Init(aFx, aTol);
|
aClsf.Init(aFx, aTol);
|
||||||
//
|
//
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
iFlag=aCtx->ComputeVS (aV, aFx, aU1, aU2);
|
iFlag=aCtx->ComputeVS (aV, aFx, aU1, aU2);
|
||||||
#else
|
|
||||||
iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2);
|
|
||||||
#endif
|
|
||||||
if (!iFlag) {
|
if (!iFlag) {
|
||||||
TopoDS_Face aFz;
|
TopoDS_Face aFz;
|
||||||
//
|
//
|
||||||
@ -971,7 +940,7 @@ void UpdateCandidates(const Standard_Integer theNF,
|
|||||||
//modified by NIZNHY-PKV Thu Feb 16 12:25:16 2012f
|
//modified by NIZNHY-PKV Thu Feb 16 12:25:16 2012f
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IsClosed
|
//function : IsClosed
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean IsClosed(const TopoDS_Edge& aE,
|
Standard_Boolean IsClosed(const TopoDS_Edge& aE,
|
||||||
const TopoDS_Face& aF)
|
const TopoDS_Face& aF)
|
||||||
@ -986,12 +955,12 @@ Standard_Boolean IsClosed(const TopoDS_Edge& aE,
|
|||||||
const TopoDS_Shape& aEx=aExp.Current();
|
const TopoDS_Shape& aEx=aExp.Current();
|
||||||
//
|
//
|
||||||
if (aM.Add(aEx)) {
|
if (aM.Add(aEx)) {
|
||||||
if (aEx.IsSame(aE)) {
|
bRet=aEx.IsSame(aE);
|
||||||
|
if (bRet) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bRet=!bRet;
|
|
||||||
}
|
}
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
@ -19,24 +19,12 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
// File : GEOMAlgo_Builder_3.cxx
|
// File : GEOMAlgo_Builder_3.cxx
|
||||||
|
// Created :
|
||||||
// Author : Peter KURNEV
|
// Author : Peter KURNEV
|
||||||
|
|
||||||
#include <GEOMAlgo_Builder.hxx>
|
#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 <TopAbs_State.hxx>
|
||||||
|
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
@ -69,6 +57,16 @@
|
|||||||
|
|
||||||
#include <IntTools_Context.hxx>
|
#include <IntTools_Context.hxx>
|
||||||
|
|
||||||
|
#include <NMTDS_ShapesDataStructure.hxx>
|
||||||
|
#include <NMTTools_PaveFiller.hxx>
|
||||||
|
|
||||||
|
#include <GEOMAlgo_Tools3D.hxx>
|
||||||
|
#include <GEOMAlgo_BuilderSolid.hxx>
|
||||||
|
#include <GEOMAlgo_ShapeSet.hxx>
|
||||||
|
#include <GEOMAlgo_DataMapOfShapeShapeSet.hxx>
|
||||||
|
#include <GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static
|
static
|
||||||
void OwnInternalShapes(const TopoDS_Shape& ,
|
void OwnInternalShapes(const TopoDS_Shape& ,
|
||||||
@ -97,11 +95,7 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid,
|
|||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
//
|
//
|
||||||
NMTTools_PaveFiller* pPF=myPaveFiller;
|
NMTTools_PaveFiller* pPF=myPaveFiller;
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
const Handle(IntTools_Context)& aCtx= pPF->Context();
|
||||||
const Handle(IntTools_Context)& aCtx=pPF->Context();
|
|
||||||
#else
|
|
||||||
IntTools_Context& aCtx=pPF->ChangeContext();
|
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
Standard_Boolean bToReverse;
|
Standard_Boolean bToReverse;
|
||||||
Standard_Integer iFlag;
|
Standard_Integer iFlag;
|
||||||
@ -194,11 +188,7 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid,
|
|||||||
//
|
//
|
||||||
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
|
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
|
||||||
NMTTools_PaveFiller* pPF=myPaveFiller;
|
NMTTools_PaveFiller* pPF=myPaveFiller;
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
const Handle(IntTools_Context)& aCtx= pPF->Context();
|
||||||
const Handle(IntTools_Context)& aCtx=pPF->Context();
|
|
||||||
#else
|
|
||||||
IntTools_Context& aCtx=pPF->ChangeContext();
|
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
Standard_Boolean bIsIN, bHasImage;
|
Standard_Boolean bIsIN, bHasImage;
|
||||||
Standard_Integer aNbS, aNbSolids, i, j, aNbFaces, aNbFP, aNbFPx, aNbFIN, aNbLIF;
|
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();
|
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
|
||||||
NMTTools_PaveFiller* pPF=myPaveFiller;
|
NMTTools_PaveFiller* pPF=myPaveFiller;
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
const Handle(IntTools_Context)& aCtx= pPF->Context();
|
||||||
const Handle(IntTools_Context)& aCtx=pPF->Context();
|
|
||||||
#else
|
|
||||||
IntTools_Context& aCtx=pPF->ChangeContext();
|
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
Standard_Integer i, aNbS, iErr;
|
Standard_Integer i, aNbS, iErr;
|
||||||
TopExp_Explorer aExp;
|
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
|
//modified by NIZNHY-PKV Wed Oct 27 09:53:18 2010t
|
||||||
//
|
//
|
||||||
// 1.3 Build new solids
|
// 1.3 Build new solids
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
aSB.SetContext(aCtx);
|
aSB.SetContext(aCtx);
|
||||||
#endif
|
|
||||||
aSB.SetShapes(aSFS1);
|
aSB.SetShapes(aSFS1);
|
||||||
aSB.Perform();
|
aSB.Perform();
|
||||||
iErr=aSB.ErrorStatus();
|
iErr=aSB.ErrorStatus();
|
||||||
@ -580,11 +564,7 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid,
|
|||||||
//
|
//
|
||||||
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
|
const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
|
||||||
NMTTools_PaveFiller* pPF=myPaveFiller;
|
NMTTools_PaveFiller* pPF=myPaveFiller;
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
const Handle(IntTools_Context)& aCtx= pPF->Context();
|
const Handle(IntTools_Context)& aCtx= pPF->Context();
|
||||||
#else
|
|
||||||
IntTools_Context& aCtx= pPF->ChangeContext();
|
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
//Standard_Boolean bHasImage;
|
//Standard_Boolean bHasImage;
|
||||||
Standard_Integer i, j, jT, aNbS, aNbSI, aNbSx, aNbSd;
|
Standard_Integer i, j, jT, aNbS, aNbSI, aNbSx, aNbSd;
|
||||||
|
@ -21,18 +21,11 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// File: GEOMAlgo_Builder_4.cxx
|
// File: GEOMAlgo_Builder_4.cxx
|
||||||
|
// Created:
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
|
//
|
||||||
#include <GEOMAlgo_Builder.hxx>
|
#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 <TopoDS_Iterator.hxx>
|
||||||
|
|
||||||
#include <TopTools_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
@ -42,6 +35,12 @@
|
|||||||
|
|
||||||
#include <IntTools_Context.hxx>
|
#include <IntTools_Context.hxx>
|
||||||
|
|
||||||
|
#include <NMTDS_ShapesDataStructure.hxx>
|
||||||
|
|
||||||
|
#include <NMTTools_PaveFiller.hxx>
|
||||||
|
|
||||||
|
#include <GEOMAlgo_Tools3D.hxx>
|
||||||
|
|
||||||
static
|
static
|
||||||
void MapShapes(const TopoDS_Shape& aS,
|
void MapShapes(const TopoDS_Shape& aS,
|
||||||
TopTools_MapOfShape& aM);
|
TopTools_MapOfShape& aM);
|
||||||
@ -53,11 +52,7 @@ static
|
|||||||
const TopTools_ListOfShape& GEOMAlgo_Builder::Generated(const TopoDS_Shape& theS)
|
const TopTools_ListOfShape& GEOMAlgo_Builder::Generated(const TopoDS_Shape& theS)
|
||||||
{
|
{
|
||||||
NMTTools_PaveFiller* pPF=myPaveFiller;
|
NMTTools_PaveFiller* pPF=myPaveFiller;
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
const Handle(IntTools_Context)& aCtx=pPF->Context();
|
const Handle(IntTools_Context)& aCtx=pPF->Context();
|
||||||
#else
|
|
||||||
IntTools_Context& aCtx=pPF->ChangeContext();
|
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
Standard_Boolean bHasImage, bToReverse;
|
Standard_Boolean bHasImage, bToReverse;
|
||||||
TopAbs_ShapeEnum aType;
|
TopAbs_ShapeEnum aType;
|
||||||
@ -111,11 +106,7 @@ static
|
|||||||
const TopTools_ListOfShape& GEOMAlgo_Builder::Modified(const TopoDS_Shape& theS)
|
const TopTools_ListOfShape& GEOMAlgo_Builder::Modified(const TopoDS_Shape& theS)
|
||||||
{
|
{
|
||||||
NMTTools_PaveFiller* pPF=myPaveFiller;
|
NMTTools_PaveFiller* pPF=myPaveFiller;
|
||||||
#if OCC_VERSION_LARGE > 0x06050200
|
|
||||||
const Handle(IntTools_Context)& aCtx=pPF->Context();
|
const Handle(IntTools_Context)& aCtx=pPF->Context();
|
||||||
#else
|
|
||||||
IntTools_Context& aCtx=pPF->ChangeContext();
|
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
Standard_Boolean bHasImage, bToReverse;
|
Standard_Boolean bHasImage, bToReverse;
|
||||||
TopAbs_ShapeEnum aType;
|
TopAbs_ShapeEnum aType;
|
||||||
@ -306,6 +297,7 @@ static
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : MapShapes
|
//function : MapShapes
|
||||||
|
@ -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;
|
|
@ -20,16 +20,19 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
// File: GEOMAlgo_Classifier.cxx
|
// File: GEOMAlgo_Clsf.cxx
|
||||||
// Created: Wed Nov 22 10:23:04 2006
|
// Created: Wed Nov 22 10:23:04 2006
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <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 :
|
//function :
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_Clsf::GEOMAlgo_Clsf()
|
GEOMAlgo_Clsf::GEOMAlgo_Clsf()
|
||||||
:
|
:
|
||||||
@ -41,14 +44,14 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ~
|
//function : ~
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_Clsf::~GEOMAlgo_Clsf()
|
GEOMAlgo_Clsf::~GEOMAlgo_Clsf()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetTolerance
|
//function : SetTolerance
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Clsf::SetTolerance(const Standard_Real aT)
|
void GEOMAlgo_Clsf::SetTolerance(const Standard_Real aT)
|
||||||
{
|
{
|
||||||
@ -56,7 +59,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Tolerance
|
//function : Tolerance
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Real GEOMAlgo_Clsf::Tolerance()const
|
Standard_Real GEOMAlgo_Clsf::Tolerance()const
|
||||||
{
|
{
|
||||||
@ -64,7 +67,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetPnt
|
//function : SetPnt
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Clsf::SetPnt(const gp_Pnt& aP)
|
void GEOMAlgo_Clsf::SetPnt(const gp_Pnt& aP)
|
||||||
{
|
{
|
||||||
@ -72,7 +75,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Pnt
|
//function : Pnt
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const gp_Pnt& GEOMAlgo_Clsf::Pnt()const
|
const gp_Pnt& GEOMAlgo_Clsf::Pnt()const
|
||||||
{
|
{
|
||||||
@ -80,7 +83,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : State
|
//function : State
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
TopAbs_State GEOMAlgo_Clsf::State() const
|
TopAbs_State GEOMAlgo_Clsf::State() const
|
||||||
{
|
{
|
||||||
@ -88,7 +91,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : CanBeON
|
//function : CanBeON
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean GEOMAlgo_Clsf::CanBeON(const Handle(Geom_Curve)& ) const
|
Standard_Boolean GEOMAlgo_Clsf::CanBeON(const Handle(Geom_Curve)& ) const
|
||||||
{
|
{
|
||||||
@ -96,7 +99,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : CanBeON
|
//function : CanBeON
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean GEOMAlgo_Clsf::CanBeON(const Handle(Geom_Surface)& ) const
|
Standard_Boolean GEOMAlgo_Clsf::CanBeON(const Handle(Geom_Surface)& ) const
|
||||||
{
|
{
|
||||||
|
@ -20,114 +20,68 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// File: GEOMAlgo_Clsf.hxx
|
||||||
|
// Created: Wed Nov 22 10:23:04 2006
|
||||||
|
// Author: Peter KURNEV
|
||||||
|
// <pkv@irinox>
|
||||||
|
//
|
||||||
#ifndef _GEOMAlgo_Clsf_HeaderFile
|
#ifndef _GEOMAlgo_Clsf_HeaderFile
|
||||||
#define _GEOMAlgo_Clsf_HeaderFile
|
#define _GEOMAlgo_Clsf_HeaderFile
|
||||||
|
|
||||||
#ifndef _Standard_HeaderFile
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
#include <Standard_DefineHandle.hxx>
|
||||||
#ifndef _Handle_GEOMAlgo_Clsf_HeaderFile
|
//#include <Handle_GEOMAlgo_Clsf.hxx>
|
||||||
#include <Handle_GEOMAlgo_Clsf.hxx>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _TopAbs_State_HeaderFile
|
|
||||||
#include <TopAbs_State.hxx>
|
#include <TopAbs_State.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _gp_Pnt_HeaderFile
|
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Standard_Real_HeaderFile
|
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _GEOMAlgo_HAlgo_HeaderFile
|
|
||||||
#include <GEOMAlgo_HAlgo.hxx>
|
#include <GEOMAlgo_HAlgo.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Standard_Boolean_HeaderFile
|
|
||||||
#include <Standard_Boolean.hxx>
|
#include <Standard_Boolean.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Handle_Geom_Curve_HeaderFile
|
|
||||||
#include <Handle_Geom_Curve.hxx>
|
#include <Handle_Geom_Curve.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Handle_Geom_Surface_HeaderFile
|
|
||||||
#include <Handle_Geom_Surface.hxx>
|
#include <Handle_Geom_Surface.hxx>
|
||||||
#endif
|
#include <Geom_Curve.hxx>
|
||||||
class gp_Pnt;
|
#include <Geom_Surface.hxx>
|
||||||
class Geom_Curve;
|
|
||||||
class Geom_Surface;
|
|
||||||
|
|
||||||
|
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:
|
Standard_EXPORT
|
||||||
// Methods PUBLIC
|
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) ;
|
protected:
|
||||||
|
Standard_EXPORT
|
||||||
|
GEOMAlgo_Clsf();
|
||||||
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
|
|
||||||
//
|
|
||||||
|
|
||||||
|
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
|
#endif
|
||||||
|
@ -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() {}
|
|
||||||
|
|
@ -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
|
|
@ -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;
|
|
@ -20,12 +20,13 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
// File: GEOMAlgo_ClsfSurf.cxx
|
// File: GEOMAlgo_ClsfBox.cxx
|
||||||
// Created: Wed Nov 22 10:41:47 2006
|
// Created: Wed Nov 22 10:41:47 2006
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_ClsfBox.ixx>
|
#include <GEOMAlgo_ClsfBox.hxx>
|
||||||
|
|
||||||
#include <GeomAbs_SurfaceType.hxx>
|
#include <GeomAbs_SurfaceType.hxx>
|
||||||
#include <GEOMAlgo_SurfaceTools.hxx>
|
#include <GEOMAlgo_SurfaceTools.hxx>
|
||||||
#include <TopAbs_ShapeEnum.hxx>
|
#include <TopAbs_ShapeEnum.hxx>
|
||||||
@ -42,9 +43,12 @@
|
|||||||
#include <gp_Ax1.hxx>
|
#include <gp_Ax1.hxx>
|
||||||
#include <Geom_Plane.hxx>
|
#include <Geom_Plane.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf)
|
||||||
|
IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf)
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_ClsfBox::GEOMAlgo_ClsfBox()
|
GEOMAlgo_ClsfBox::GEOMAlgo_ClsfBox()
|
||||||
:
|
:
|
||||||
@ -53,14 +57,14 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ~
|
//function : ~
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_ClsfBox::~GEOMAlgo_ClsfBox()
|
GEOMAlgo_ClsfBox::~GEOMAlgo_ClsfBox()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetBox
|
//function : SetBox
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_ClsfBox::SetBox(const TopoDS_Shape& aBox)
|
void GEOMAlgo_ClsfBox::SetBox(const TopoDS_Shape& aBox)
|
||||||
{
|
{
|
||||||
@ -68,7 +72,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Box
|
//function : Box
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const TopoDS_Shape& GEOMAlgo_ClsfBox::Box() const
|
const TopoDS_Shape& GEOMAlgo_ClsfBox::Box() const
|
||||||
{
|
{
|
||||||
@ -76,10 +80,10 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : CheckData
|
//function : CheckData
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_ClsfBox::CheckData()
|
void GEOMAlgo_ClsfBox::CheckData()
|
||||||
{
|
{
|
||||||
Standard_Integer i, aNbF;
|
Standard_Integer i, aNbF;
|
||||||
TopAbs_ShapeEnum aTypeShape;
|
TopAbs_ShapeEnum aTypeShape;
|
||||||
TopAbs_Orientation aOr;
|
TopAbs_Orientation aOr;
|
||||||
@ -118,7 +122,7 @@
|
|||||||
aS=BRep_Tool::Surface(aF);
|
aS=BRep_Tool::Surface(aF);
|
||||||
myGAS[i-1].Load(aS);
|
myGAS[i-1].Load(aS);
|
||||||
aType=myGAS[i-1].GetType();
|
aType=myGAS[i-1].GetType();
|
||||||
if (!aType==GeomAbs_Plane) {
|
if (!aType==GeomAbs_Plane) {
|
||||||
myErrorStatus=13; // unallowed surface type
|
myErrorStatus=13; // unallowed surface type
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -142,7 +146,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Perform
|
//function : Perform
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_ClsfBox::Perform()
|
void GEOMAlgo_ClsfBox::Perform()
|
||||||
{
|
{
|
||||||
@ -158,7 +162,7 @@
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
iNext=1;
|
iNext=1;
|
||||||
aNbON=0;
|
aNbON=0;
|
||||||
aNbIN=0;
|
aNbIN=0;
|
||||||
for(i=0; i<aNbS && iNext; i++) {
|
for(i=0; i<aNbS && iNext; i++) {
|
||||||
GEOMAlgo_SurfaceTools::GetState(myPnt, myGAS[i], myTolerance, aSt);
|
GEOMAlgo_SurfaceTools::GetState(myPnt, myGAS[i], myTolerance, aSt);
|
||||||
@ -177,7 +181,7 @@
|
|||||||
default:
|
default:
|
||||||
myState=TopAbs_UNKNOWN;
|
myState=TopAbs_UNKNOWN;
|
||||||
iNext=0;
|
iNext=0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -194,7 +198,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : CanBeON
|
//function : CanBeON
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean GEOMAlgo_ClsfBox::CanBeON(const Handle(Geom_Curve)& aC) const
|
Standard_Boolean GEOMAlgo_ClsfBox::CanBeON(const Handle(Geom_Curve)& aC) const
|
||||||
{
|
{
|
||||||
@ -202,7 +206,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : CanBeON
|
//function : CanBeON
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean GEOMAlgo_ClsfBox::CanBeON(const Handle(Geom_Surface)& aS1) const
|
Standard_Boolean GEOMAlgo_ClsfBox::CanBeON(const Handle(Geom_Surface)& aS1) const
|
||||||
{
|
{
|
||||||
|
@ -20,97 +20,69 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// File: GEOMAlgo_ClsfBox.hxx
|
||||||
|
// Created: Wed Nov 22 10:41:47 2006
|
||||||
|
// Author: Peter KURNEV
|
||||||
|
// <pkv@irinox>
|
||||||
|
//
|
||||||
#ifndef _GEOMAlgo_ClsfBox_HeaderFile
|
#ifndef _GEOMAlgo_ClsfBox_HeaderFile
|
||||||
#define _GEOMAlgo_ClsfBox_HeaderFile
|
#define _GEOMAlgo_ClsfBox_HeaderFile
|
||||||
|
|
||||||
#ifndef _Standard_HeaderFile
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
#include <Standard_DefineHandle.hxx>
|
||||||
#ifndef _Handle_GEOMAlgo_ClsfBox_HeaderFile
|
//#include <Handle_GEOMAlgo_ClsfBox.hxx>
|
||||||
#include <Handle_GEOMAlgo_ClsfBox.hxx>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _TopoDS_Shape_HeaderFile
|
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _GeomAdaptor_Surface_HeaderFile
|
|
||||||
#include <GeomAdaptor_Surface.hxx>
|
#include <GeomAdaptor_Surface.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _GEOMAlgo_Clsf_HeaderFile
|
|
||||||
#include <GEOMAlgo_Clsf.hxx>
|
#include <GEOMAlgo_Clsf.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Standard_Boolean_HeaderFile
|
|
||||||
#include <Standard_Boolean.hxx>
|
#include <Standard_Boolean.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Handle_Geom_Curve_HeaderFile
|
|
||||||
#include <Handle_Geom_Curve.hxx>
|
#include <Handle_Geom_Curve.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Handle_Geom_Surface_HeaderFile
|
|
||||||
#include <Handle_Geom_Surface.hxx>
|
#include <Handle_Geom_Surface.hxx>
|
||||||
#endif
|
#include <Geom_Curve.hxx>
|
||||||
class TopoDS_Shape;
|
#include <Geom_Surface.hxx>
|
||||||
class Geom_Curve;
|
|
||||||
class Geom_Surface;
|
DEFINE_STANDARD_HANDLE(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf)
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GEOMAlgo_ClsfBox
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
class GEOMAlgo_ClsfBox : public GEOMAlgo_Clsf
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Standard_EXPORT
|
||||||
|
GEOMAlgo_ClsfBox();
|
||||||
|
|
||||||
|
Standard_EXPORT
|
||||||
|
virtual ~GEOMAlgo_ClsfBox();
|
||||||
|
|
||||||
|
Standard_EXPORT
|
||||||
|
void SetBox(const TopoDS_Shape& aS) ;
|
||||||
|
|
||||||
|
Standard_EXPORT
|
||||||
|
const TopoDS_Shape& Box() const;
|
||||||
|
|
||||||
|
Standard_EXPORT
|
||||||
|
virtual void Perform() ;
|
||||||
|
|
||||||
|
Standard_EXPORT
|
||||||
|
virtual void CheckData() ;
|
||||||
|
|
||||||
|
Standard_EXPORT
|
||||||
|
virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aC) const;
|
||||||
|
|
||||||
|
Standard_EXPORT
|
||||||
|
virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
|
||||||
|
|
||||||
|
DEFINE_STANDARD_RTTI(GEOMAlgo_ClsfBox)
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TopoDS_Shape myBox;
|
||||||
|
GeomAdaptor_Surface myGAS[6];
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
class GEOMAlgo_ClsfBox : public GEOMAlgo_Clsf {
|
|
||||||
|
|
||||||
public:
|
|
||||||
// Methods PUBLIC
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT GEOMAlgo_ClsfBox();
|
|
||||||
Standard_EXPORT virtual ~GEOMAlgo_ClsfBox();
|
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT void SetBox(const TopoDS_Shape& aS) ;
|
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT const TopoDS_Shape& Box() const;
|
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT virtual void Perform() ;
|
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT virtual void CheckData() ;
|
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aC) const;
|
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
|
|
||||||
//Standard_EXPORT ~GEOMAlgo_ClsfBox();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Type management
|
|
||||||
//
|
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// Methods PROTECTED
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
// Fields PROTECTED
|
|
||||||
//
|
|
||||||
TopoDS_Shape myBox;
|
|
||||||
GeomAdaptor_Surface myGAS[6];
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
// Methods PRIVATE
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
// Fields PRIVATE
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -120,7 +92,6 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
// other Inline functions and methods (like "C++: function call" methods)
|
// other Inline functions and methods (like "C++: function call" methods)
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -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() {}
|
|
||||||
|
|
@ -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
|
|
@ -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;
|
|
@ -22,7 +22,7 @@
|
|||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_ClsfSolid.ixx>
|
#include <GEOMAlgo_ClsfSolid.hxx>
|
||||||
|
|
||||||
#include <TopAbs_ShapeEnum.hxx>
|
#include <TopAbs_ShapeEnum.hxx>
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
@ -30,9 +30,12 @@
|
|||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
#include <BRepClass3d_SolidClassifier.hxx>
|
#include <BRepClass3d_SolidClassifier.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf)
|
||||||
|
IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf)
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_ClsfSolid::GEOMAlgo_ClsfSolid()
|
GEOMAlgo_ClsfSolid::GEOMAlgo_ClsfSolid()
|
||||||
:
|
:
|
||||||
@ -42,7 +45,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ~
|
//function : ~
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_ClsfSolid::~GEOMAlgo_ClsfSolid()
|
GEOMAlgo_ClsfSolid::~GEOMAlgo_ClsfSolid()
|
||||||
{
|
{
|
||||||
@ -55,7 +58,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetShape
|
//function : SetShape
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_ClsfSolid::SetShape(const TopoDS_Shape& aS)
|
void GEOMAlgo_ClsfSolid::SetShape(const TopoDS_Shape& aS)
|
||||||
{
|
{
|
||||||
@ -63,7 +66,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Shape
|
//function : Shape
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const TopoDS_Shape& GEOMAlgo_ClsfSolid::Shape()const
|
const TopoDS_Shape& GEOMAlgo_ClsfSolid::Shape()const
|
||||||
{
|
{
|
||||||
@ -71,7 +74,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : CheckData
|
//function : CheckData
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_ClsfSolid::CheckData()
|
void GEOMAlgo_ClsfSolid::CheckData()
|
||||||
{
|
{
|
||||||
@ -89,7 +92,7 @@
|
|||||||
//
|
//
|
||||||
aType=myShape.ShapeType();
|
aType=myShape.ShapeType();
|
||||||
if (!(aType==TopAbs_SOLID || aType==TopAbs_SHELL)) {
|
if (!(aType==TopAbs_SOLID || aType==TopAbs_SHELL)) {
|
||||||
myErrorStatus=12;
|
myErrorStatus=12;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -112,7 +115,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Perform
|
//function : Perform
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_ClsfSolid::Perform()
|
void GEOMAlgo_ClsfSolid::Perform()
|
||||||
{
|
{
|
||||||
|
@ -17,90 +17,53 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// File: GEOMAlgo_ClsfSolid.hxx
|
||||||
|
// Created: Mon Jan 29 10:35:46 2007
|
||||||
|
// Author: Peter KURNEV
|
||||||
|
// <pkv@irinox>
|
||||||
|
//
|
||||||
#ifndef _GEOMAlgo_ClsfSolid_HeaderFile
|
#ifndef _GEOMAlgo_ClsfSolid_HeaderFile
|
||||||
#define _GEOMAlgo_ClsfSolid_HeaderFile
|
#define _GEOMAlgo_ClsfSolid_HeaderFile
|
||||||
|
|
||||||
#ifndef _Standard_HeaderFile
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
#include <Standard_DefineHandle.hxx>
|
||||||
#ifndef _Handle_GEOMAlgo_ClsfSolid_HeaderFile
|
//#include <Handle_GEOMAlgo_ClsfSolid.hxx>
|
||||||
#include <Handle_GEOMAlgo_ClsfSolid.hxx>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _TopoDS_Shape_HeaderFile
|
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Standard_Address_HeaderFile
|
|
||||||
#include <Standard_Address.hxx>
|
#include <Standard_Address.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _GEOMAlgo_Clsf_HeaderFile
|
|
||||||
#include <GEOMAlgo_Clsf.hxx>
|
#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:
|
Standard_EXPORT
|
||||||
// Methods PUBLIC
|
void SetShape(const TopoDS_Shape& aS) ;
|
||||||
//
|
|
||||||
|
|
||||||
|
Standard_EXPORT
|
||||||
|
const TopoDS_Shape& Shape() const;
|
||||||
|
|
||||||
Standard_EXPORT GEOMAlgo_ClsfSolid();
|
Standard_EXPORT
|
||||||
Standard_EXPORT virtual ~GEOMAlgo_ClsfSolid();
|
virtual void Perform() ;
|
||||||
|
|
||||||
|
Standard_EXPORT
|
||||||
|
virtual void CheckData() ;
|
||||||
|
|
||||||
Standard_EXPORT void SetShape(const TopoDS_Shape& aS) ;
|
DEFINE_STANDARD_RTTI(GEOMAlgo_ClsfSolid)
|
||||||
|
|
||||||
|
|
||||||
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
|
|
||||||
//
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TopoDS_Shape myShape;
|
||||||
|
Standard_Address myPClsf;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// other Inline functions and methods (like "C++: function call" methods)
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -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() {}
|
|
||||||
|
|
@ -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
|
|
@ -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;
|
|
@ -25,14 +25,17 @@
|
|||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_ClsfSurf.ixx>
|
#include <GEOMAlgo_ClsfSurf.hxx>
|
||||||
#include <GeomAbs_SurfaceType.hxx>
|
#include <GeomAbs_SurfaceType.hxx>
|
||||||
#include <GEOMAlgo_SurfaceTools.hxx>
|
#include <GEOMAlgo_SurfaceTools.hxx>
|
||||||
#include <GeomAdaptor_Curve.hxx>
|
#include <GeomAdaptor_Curve.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf);
|
||||||
|
IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf);
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_ClsfSurf::GEOMAlgo_ClsfSurf()
|
GEOMAlgo_ClsfSurf::GEOMAlgo_ClsfSurf()
|
||||||
:
|
:
|
||||||
@ -41,14 +44,14 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ~
|
//function : ~
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_ClsfSurf::~GEOMAlgo_ClsfSurf()
|
GEOMAlgo_ClsfSurf::~GEOMAlgo_ClsfSurf()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetSurface
|
//function : SetSurface
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_ClsfSurf::SetSurface(const Handle(Geom_Surface)& aS)
|
void GEOMAlgo_ClsfSurf::SetSurface(const Handle(Geom_Surface)& aS)
|
||||||
{
|
{
|
||||||
@ -56,7 +59,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Surface
|
//function : Surface
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const Handle(Geom_Surface)& GEOMAlgo_ClsfSurf::Surface() const
|
const Handle(Geom_Surface)& GEOMAlgo_ClsfSurf::Surface() const
|
||||||
{
|
{
|
||||||
@ -64,7 +67,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : CheckData
|
//function : CheckData
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_ClsfSurf::CheckData()
|
void GEOMAlgo_ClsfSurf::CheckData()
|
||||||
{
|
{
|
||||||
@ -79,7 +82,7 @@
|
|||||||
//
|
//
|
||||||
myGAS.Load(myS);
|
myGAS.Load(myS);
|
||||||
aType=myGAS.GetType();
|
aType=myGAS.GetType();
|
||||||
if (!(aType==GeomAbs_Plane ||
|
if (!(aType==GeomAbs_Plane ||
|
||||||
aType==GeomAbs_Cylinder ||
|
aType==GeomAbs_Cylinder ||
|
||||||
aType==GeomAbs_Sphere)) {
|
aType==GeomAbs_Sphere)) {
|
||||||
myErrorStatus=11; // unallowed surface type
|
myErrorStatus=11; // unallowed surface type
|
||||||
@ -87,7 +90,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Perform
|
//function : Perform
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_ClsfSurf::Perform()
|
void GEOMAlgo_ClsfSurf::Perform()
|
||||||
{
|
{
|
||||||
@ -102,7 +105,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : CanBeON
|
//function : CanBeON
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean GEOMAlgo_ClsfSurf::CanBeON(const Handle(Geom_Curve)& aC) const
|
Standard_Boolean GEOMAlgo_ClsfSurf::CanBeON(const Handle(Geom_Curve)& aC) const
|
||||||
{
|
{
|
||||||
@ -121,7 +124,7 @@
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : CanBeON
|
//function : CanBeON
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean GEOMAlgo_ClsfSurf::CanBeON(const Handle(Geom_Surface)& aS1) const
|
Standard_Boolean GEOMAlgo_ClsfSurf::CanBeON(const Handle(Geom_Surface)& aS1) const
|
||||||
{
|
{
|
||||||
|
@ -20,103 +20,62 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// File: GEOMAlgo_ClsfSurf.hxx
|
||||||
|
// Created: Wed Nov 22 10:41:47 2006
|
||||||
|
// Author: Peter KURNEV
|
||||||
|
// <pkv@irinox>
|
||||||
|
//
|
||||||
#ifndef _GEOMAlgo_ClsfSurf_HeaderFile
|
#ifndef _GEOMAlgo_ClsfSurf_HeaderFile
|
||||||
#define _GEOMAlgo_ClsfSurf_HeaderFile
|
#define _GEOMAlgo_ClsfSurf_HeaderFile
|
||||||
|
|
||||||
#ifndef _Standard_HeaderFile
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
#include <Standard_DefineHandle.hxx>
|
||||||
#ifndef _Handle_GEOMAlgo_ClsfSurf_HeaderFile
|
//#include <Handle_GEOMAlgo_ClsfSurf.hxx>
|
||||||
#include <Handle_GEOMAlgo_ClsfSurf.hxx>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _Handle_Geom_Surface_HeaderFile
|
|
||||||
#include <Handle_Geom_Surface.hxx>
|
#include <Handle_Geom_Surface.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _GeomAdaptor_Surface_HeaderFile
|
|
||||||
#include <GeomAdaptor_Surface.hxx>
|
#include <GeomAdaptor_Surface.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _GEOMAlgo_Clsf_HeaderFile
|
|
||||||
#include <GEOMAlgo_Clsf.hxx>
|
#include <GEOMAlgo_Clsf.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Standard_Boolean_HeaderFile
|
|
||||||
#include <Standard_Boolean.hxx>
|
#include <Standard_Boolean.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Handle_Geom_Curve_HeaderFile
|
|
||||||
#include <Handle_Geom_Curve.hxx>
|
#include <Handle_Geom_Curve.hxx>
|
||||||
#endif
|
#include <Geom_Surface.hxx>
|
||||||
class Geom_Surface;
|
#include <Geom_Curve.hxx>
|
||||||
class Geom_Curve;
|
|
||||||
|
|
||||||
|
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:
|
Standard_EXPORT
|
||||||
// Methods PUBLIC
|
void SetSurface(const Handle(Geom_Surface)& aS) ;
|
||||||
//
|
|
||||||
|
|
||||||
|
Standard_EXPORT
|
||||||
|
const Handle_Geom_Surface& Surface() const;
|
||||||
|
|
||||||
Standard_EXPORT GEOMAlgo_ClsfSurf();
|
Standard_EXPORT
|
||||||
Standard_EXPORT virtual ~GEOMAlgo_ClsfSurf();
|
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;
|
DEFINE_STANDARD_RTTI(GEOMAlgo_ClsfSurf);
|
||||||
|
|
||||||
|
|
||||||
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
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
Handle_Geom_Surface myS;
|
||||||
|
GeomAdaptor_Surface myGAS;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// other Inline functions and methods (like "C++: function call" methods)
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -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() {}
|
|
||||||
|
|
@ -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
|
|
@ -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;
|
|
@ -19,22 +19,21 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
// File: GEOMAlgo_CoupleOfShapes.cxx
|
// File: GEOMAlgo_CoupleOfShapes.cxx
|
||||||
// Created: Wed Dec 15 13:03:52 2004
|
// Created: Wed Dec 15 13:03:52 2004
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_CoupleOfShapes.ixx>
|
#include <GEOMAlgo_CoupleOfShapes.hxx>
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GEOMAlgo_CoupleOfShapes
|
//function : GEOMAlgo_CoupleOfShapes
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_CoupleOfShapes::GEOMAlgo_CoupleOfShapes()
|
GEOMAlgo_CoupleOfShapes::GEOMAlgo_CoupleOfShapes()
|
||||||
{}
|
{}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetShapes
|
//function : SetShapes
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_CoupleOfShapes::SetShapes(const TopoDS_Shape& aS1,
|
void GEOMAlgo_CoupleOfShapes::SetShapes(const TopoDS_Shape& aS1,
|
||||||
const TopoDS_Shape& aS2)
|
const TopoDS_Shape& aS2)
|
||||||
@ -44,7 +43,7 @@ void GEOMAlgo_CoupleOfShapes::SetShapes(const TopoDS_Shape& aS1,
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Shapes
|
//function : Shapes
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_CoupleOfShapes::Shapes(TopoDS_Shape& aS1,
|
void GEOMAlgo_CoupleOfShapes::Shapes(TopoDS_Shape& aS1,
|
||||||
TopoDS_Shape& aS2)const
|
TopoDS_Shape& aS2)const
|
||||||
@ -54,7 +53,7 @@ void GEOMAlgo_CoupleOfShapes::Shapes(TopoDS_Shape& aS1,
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetShape1
|
//function : SetShape1
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_CoupleOfShapes::SetShape1(const TopoDS_Shape& aS1)
|
void GEOMAlgo_CoupleOfShapes::SetShape1(const TopoDS_Shape& aS1)
|
||||||
{
|
{
|
||||||
@ -62,7 +61,7 @@ void GEOMAlgo_CoupleOfShapes::SetShape1(const TopoDS_Shape& aS1)
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : SetShape2
|
//function : SetShape2
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_CoupleOfShapes::SetShape2(const TopoDS_Shape& aS2)
|
void GEOMAlgo_CoupleOfShapes::SetShape2(const TopoDS_Shape& aS2)
|
||||||
{
|
{
|
||||||
@ -70,7 +69,7 @@ void GEOMAlgo_CoupleOfShapes::SetShape2(const TopoDS_Shape& aS2)
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Shape1
|
//function : Shape1
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape1()const
|
const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape1()const
|
||||||
{
|
{
|
||||||
@ -78,7 +77,7 @@ const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape1()const
|
|||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Shape2
|
//function : Shape2
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape2()const
|
const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape2()const
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
|
||||||
//
|
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// 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
|
// 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
|
#ifndef _GEOMAlgo_CoupleOfShapes_HeaderFile
|
||||||
#define _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>
|
#include <Standard.hxx>
|
||||||
#endif
|
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
|
||||||
#include <Standard_Macro.hxx>
|
#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:
|
Standard_EXPORT
|
||||||
|
void SetShape1(const TopoDS_Shape& aS1) ;
|
||||||
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 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:
|
protected:
|
||||||
|
TopoDS_Shape myShape1;
|
||||||
// Methods PROTECTED
|
TopoDS_Shape myShape2;
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
// Fields PROTECTED
|
|
||||||
//
|
|
||||||
TopoDS_Shape myShape1;
|
|
||||||
TopoDS_Shape myShape2;
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
// Methods PRIVATE
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
// Fields PRIVATE
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// other Inline functions and methods (like "C++: function call" methods)
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -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>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -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
|
|
@ -16,97 +16,17 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// File: GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx
|
||||||
#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
|
// Created: Wed Feb 22 11:05:01 2012
|
||||||
#define _GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
|
// Author:
|
||||||
|
// <pkv@BDEURI37616>
|
||||||
#ifndef _TCollection_BasicMapIterator_HeaderFile
|
|
||||||
#include <TCollection_BasicMapIterator.hxx>
|
|
||||||
#endif
|
|
||||||
#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile
|
|
||||||
#include <Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx>
|
|
||||||
#endif
|
|
||||||
class Standard_NoSuchObject;
|
|
||||||
class TopoDS_Shape;
|
|
||||||
class TopTools_OrientedShapeMapHasher;
|
|
||||||
class GEOMAlgo_DataMapOfOrientedShapeShape;
|
|
||||||
class GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape;
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _Standard_HeaderFile
|
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
|
||||||
#include <Standard.hxx>
|
#define GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile
|
||||||
#endif
|
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
#ifndef GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
|
||||||
#include <Standard_Macro.hxx>
|
#include <GEOMAlgo_DataMapOfOrientedShapeShape.hxx>
|
||||||
#endif
|
#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
|
#endif
|
||||||
|
@ -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>
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
|||||||
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
|
||||||
//
|
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// 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
|
// 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
|
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile
|
||||||
#include <TCollection_BasicMapIterator.hxx>
|
#define GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile
|
||||||
|
|
||||||
|
#ifndef GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile
|
||||||
|
#include <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
|
||||||
#endif
|
#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
|
#endif
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user