mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-25 17:00:35 +05:00
PAL7508: Development of new block functionalities. Implement GetShapesOn<xxx>() functions for case of SOLID. Done by PKV.
This commit is contained in:
parent
6a52e30ef9
commit
d85baed107
@ -46,6 +46,7 @@ is
|
|||||||
class CoupleOfShapes;
|
class CoupleOfShapes;
|
||||||
class PassKey;
|
class PassKey;
|
||||||
class PassKeyMapHasher;
|
class PassKeyMapHasher;
|
||||||
|
class SurfaceTools;
|
||||||
class Tools;
|
class Tools;
|
||||||
--
|
--
|
||||||
-- finder on
|
-- finder on
|
||||||
@ -53,8 +54,10 @@ is
|
|||||||
class WireSolid;
|
class WireSolid;
|
||||||
class ShellSolid;
|
class ShellSolid;
|
||||||
class VertexSolid;
|
class VertexSolid;
|
||||||
|
class SolidSolid;
|
||||||
class FinderShapeOn;
|
class FinderShapeOn;
|
||||||
--
|
--
|
||||||
|
-- instantiations
|
||||||
class IndexedDataMapOfPassKeyListOfShape
|
class IndexedDataMapOfPassKeyListOfShape
|
||||||
instantiates IndexedDataMap from TCollection (PassKey from GEOMAlgo,
|
instantiates IndexedDataMap from TCollection (PassKey from GEOMAlgo,
|
||||||
ListOfShape from TopTools,
|
ListOfShape from TopTools,
|
||||||
@ -73,4 +76,9 @@ is
|
|||||||
instantiates List from TCollection (CoupleOfShapes from GEOMAlgo);
|
instantiates List from TCollection (CoupleOfShapes from GEOMAlgo);
|
||||||
|
|
||||||
|
|
||||||
|
class IndexedDataMapOfShapeState
|
||||||
|
instantiates IndexedDataMap from TCollection (Shape from TopoDS,
|
||||||
|
State from TopAbs,
|
||||||
|
ShapeMapHasher from TopTools);
|
||||||
|
|
||||||
end GEOMAlgo;
|
end GEOMAlgo;
|
||||||
|
@ -16,7 +16,8 @@ uses
|
|||||||
ListOfShape from TopTools,
|
ListOfShape from TopTools,
|
||||||
DataMapOfShapeShape from TopTools,
|
DataMapOfShapeShape from TopTools,
|
||||||
Shape from TopoDS,
|
Shape from TopoDS,
|
||||||
State from GEOMAlgo
|
State from GEOMAlgo,
|
||||||
|
IndexedDataMapOfShapeState from GEOMAlgo
|
||||||
|
|
||||||
--raises
|
--raises
|
||||||
|
|
||||||
@ -57,12 +58,22 @@ is
|
|||||||
CheckData(me:out)
|
CheckData(me:out)
|
||||||
is redefined protected;
|
is redefined protected;
|
||||||
|
|
||||||
MakeArguments(me:out)
|
MakeArgument1(me:out)
|
||||||
|
is protected;
|
||||||
|
|
||||||
|
MakeArgument2(me:out)
|
||||||
is protected;
|
is protected;
|
||||||
|
|
||||||
Find(me:out)
|
Find(me:out)
|
||||||
is protected;
|
is protected;
|
||||||
|
|
||||||
|
Find(me:out;
|
||||||
|
aS:Shape from TopoDS)
|
||||||
|
is protected;
|
||||||
|
|
||||||
|
FindVertices(me:out)
|
||||||
|
is protected;
|
||||||
|
|
||||||
CopySource(myclass;
|
CopySource(myclass;
|
||||||
aS :Shape from TopoDS;
|
aS :Shape from TopoDS;
|
||||||
aImages : out DataMapOfShapeShape from TopTools;
|
aImages : out DataMapOfShapeShape from TopTools;
|
||||||
@ -79,5 +90,7 @@ fields
|
|||||||
myArg2 : Shape from TopoDS is protected;
|
myArg2 : Shape from TopoDS is protected;
|
||||||
myLS : ListOfShape from TopTools is protected;
|
myLS : ListOfShape from TopTools is protected;
|
||||||
myImages : DataMapOfShapeShape from TopTools is protected;
|
myImages : DataMapOfShapeShape from TopTools is protected;
|
||||||
|
myMSS : IndexedDataMapOfShapeState from GEOMAlgo is protected;
|
||||||
|
myIsAnalytic : Boolean from Standard is protected;
|
||||||
|
|
||||||
end FinderShapeOn;
|
end FinderShapeOn;
|
||||||
|
@ -6,7 +6,10 @@
|
|||||||
|
|
||||||
#include <GEOMAlgo_FinderShapeOn.ixx>
|
#include <GEOMAlgo_FinderShapeOn.ixx>
|
||||||
|
|
||||||
|
#include <gp_Pnt.hxx>
|
||||||
|
|
||||||
#include <TopAbs_ShapeEnum.hxx>
|
#include <TopAbs_ShapeEnum.hxx>
|
||||||
|
#include <TopAbs_Orientation.hxx>
|
||||||
|
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <TopoDS_Face.hxx>
|
#include <TopoDS_Face.hxx>
|
||||||
@ -16,7 +19,6 @@
|
|||||||
#include <TopoDS_Solid.hxx>
|
#include <TopoDS_Solid.hxx>
|
||||||
#include <TopoDS_Vertex.hxx>
|
#include <TopoDS_Vertex.hxx>
|
||||||
#include <TopoDS_Edge.hxx>
|
#include <TopoDS_Edge.hxx>
|
||||||
|
|
||||||
#include <TopoDS_Iterator.hxx>
|
#include <TopoDS_Iterator.hxx>
|
||||||
|
|
||||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||||
@ -24,6 +26,7 @@
|
|||||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||||
|
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
|
#include <BRep_Tool.hxx>
|
||||||
|
|
||||||
#include <TopExp.hxx>
|
#include <TopExp.hxx>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
@ -37,7 +40,9 @@
|
|||||||
#include <GEOMAlgo_ShellSolid.hxx>
|
#include <GEOMAlgo_ShellSolid.hxx>
|
||||||
#include <GEOMAlgo_VertexSolid.hxx>
|
#include <GEOMAlgo_VertexSolid.hxx>
|
||||||
#include <GEOMAlgo_ShapeSolid.hxx>
|
#include <GEOMAlgo_ShapeSolid.hxx>
|
||||||
|
#include <GEOMAlgo_SolidSolid.hxx>
|
||||||
|
#include <GEOMAlgo_SurfaceTools.hxx>
|
||||||
|
#include <GEOMAlgo_Tools.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GEOMAlgo_FinderShapeOn
|
//function : GEOMAlgo_FinderShapeOn
|
||||||
@ -50,6 +55,7 @@ GEOMAlgo_FinderShapeOn::GEOMAlgo_FinderShapeOn()
|
|||||||
myTolerance=0.0001;
|
myTolerance=0.0001;
|
||||||
myShapeType=TopAbs_VERTEX;
|
myShapeType=TopAbs_VERTEX;
|
||||||
myState=GEOMAlgo_ST_UNKNOWN;
|
myState=GEOMAlgo_ST_UNKNOWN;
|
||||||
|
myIsAnalytic=Standard_True;
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ~
|
//function : ~
|
||||||
@ -112,6 +118,24 @@ GEOMAlgo_State GEOMAlgo_FinderShapeOn::State() const
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn::Shapes() const
|
const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn::Shapes() const
|
||||||
{
|
{
|
||||||
|
Standard_Boolean bIsConformState;
|
||||||
|
Standard_Integer i, aNb;
|
||||||
|
TopAbs_State aSt;
|
||||||
|
TopTools_ListOfShape* pL;
|
||||||
|
//
|
||||||
|
pL=(TopTools_ListOfShape*) &myLS;
|
||||||
|
pL->Clear();
|
||||||
|
//
|
||||||
|
aNb=myMSS.Extent();
|
||||||
|
for (i=1; i<=aNb; ++i) {
|
||||||
|
const TopoDS_Shape& aS=myMSS.FindKey(i);
|
||||||
|
aSt=myMSS.FindFromIndex(i);
|
||||||
|
//
|
||||||
|
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
|
||||||
|
if (bIsConformState) {
|
||||||
|
pL->Append(aS);
|
||||||
|
}
|
||||||
|
}
|
||||||
return myLS;
|
return myLS;
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -123,6 +147,7 @@ void GEOMAlgo_FinderShapeOn::Perform()
|
|||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
myWarningStatus=0;
|
myWarningStatus=0;
|
||||||
myLS.Clear();
|
myLS.Clear();
|
||||||
|
myMSS.Clear();
|
||||||
//
|
//
|
||||||
if (!myResult.IsNull()){
|
if (!myResult.IsNull()){
|
||||||
myResult.Nullify();
|
myResult.Nullify();
|
||||||
@ -133,34 +158,122 @@ void GEOMAlgo_FinderShapeOn::Perform()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
MakeArguments();
|
myIsAnalytic=GEOMAlgo_SurfaceTools::IsAnalytic(mySurface);
|
||||||
if(myErrorStatus || myWarningStatus) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//
|
//
|
||||||
Find();
|
MakeArgument1();
|
||||||
if(myErrorStatus) {
|
if(myErrorStatus) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
if (myIsAnalytic && myShapeType==TopAbs_VERTEX) {
|
||||||
|
FindVertices();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
MakeArgument2();
|
||||||
|
if(myErrorStatus) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
Find();
|
||||||
|
if(myErrorStatus || myWarningStatus) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
}
|
||||||
|
//=======================================================================
|
||||||
|
//function : FindVertices
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void GEOMAlgo_FinderShapeOn::FindVertices()
|
||||||
|
{
|
||||||
|
Standard_Integer i, aNb, iErr;
|
||||||
|
TopAbs_State aSt;
|
||||||
|
TopAbs_Orientation aOr;
|
||||||
|
gp_Pnt aP;
|
||||||
|
TopTools_IndexedMapOfShape aM;
|
||||||
|
//
|
||||||
|
TopExp::MapShapes(myArg1, TopAbs_FACE, aM);
|
||||||
|
const TopoDS_Face& aF=TopoDS::Face(aM(1));
|
||||||
|
aOr=aF.Orientation();
|
||||||
|
//
|
||||||
|
aM.Clear();
|
||||||
|
TopExp::MapShapes(myShape, myShapeType, aM);
|
||||||
|
aNb=aM.Extent();
|
||||||
|
if (!aNb) {
|
||||||
|
myWarningStatus=10; // No found subshapes of type myShapeType
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
for (i=1; i<=aNb; ++i) {
|
||||||
|
const TopoDS_Shape& aS=aM(i);
|
||||||
|
const TopoDS_Vertex& aV=TopoDS::Vertex(aS);
|
||||||
|
aP=BRep_Tool::Pnt(aV);
|
||||||
|
iErr=GEOMAlgo_SurfaceTools::GetState(aP, mySurface, myTolerance, aSt);
|
||||||
|
if (aOr==TopAbs_REVERSED) {
|
||||||
|
aSt=GEOMAlgo_SurfaceTools::ReverseState(aSt);
|
||||||
|
}
|
||||||
|
myMSS.Add(aS, aSt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Find
|
//function : Find
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_FinderShapeOn::Find()
|
void GEOMAlgo_FinderShapeOn::Find()
|
||||||
|
{
|
||||||
|
Standard_Integer i, aNb;
|
||||||
|
Standard_Boolean bICS;
|
||||||
|
TopTools_IndexedMapOfShape aM;
|
||||||
|
//
|
||||||
|
TopExp::MapShapes(myArg2, myShapeType, aM);
|
||||||
|
//
|
||||||
|
aNb=aM.Extent();
|
||||||
|
if (!aNb) {
|
||||||
|
myWarningStatus=10; // No found subshapes of type myShapeType
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
bICS=GEOMAlgo_Tools::IsCompositeShape(myArg2);
|
||||||
|
if (!bICS || myIsAnalytic) {
|
||||||
|
TopoDS_Compound aCmp;
|
||||||
|
BRep_Builder aBB;
|
||||||
|
//
|
||||||
|
aBB.MakeCompound(aCmp);
|
||||||
|
for (i=1; i<=aNb; ++i) {
|
||||||
|
const TopoDS_Shape& aSi=aM(i);
|
||||||
|
aBB.Add(aCmp, aSi);
|
||||||
|
}
|
||||||
|
//
|
||||||
|
aM.Clear();
|
||||||
|
aM.Add(aCmp);
|
||||||
|
aNb=1;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
for (i=1; i<=aNb; ++i) {
|
||||||
|
const TopoDS_Shape& aS=aM(i);
|
||||||
|
Find(aS);
|
||||||
|
if (myErrorStatus) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//=======================================================================
|
||||||
|
//function : Find
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void GEOMAlgo_FinderShapeOn::Find(const TopoDS_Shape& aS)
|
||||||
{
|
{
|
||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
//
|
//
|
||||||
Standard_Boolean bIsDone;
|
Standard_Boolean bIsDone;
|
||||||
Standard_Integer iErr;
|
Standard_Integer i, iErr;
|
||||||
|
TopAbs_State aSts[]={TopAbs_IN, TopAbs_OUT, TopAbs_ON};
|
||||||
TopTools_ListIteratorOfListOfShape aIt;
|
TopTools_ListIteratorOfListOfShape aIt;
|
||||||
BRep_Builder aBB;
|
|
||||||
BOPTools_DSFiller aDF;
|
BOPTools_DSFiller aDF;
|
||||||
GEOMAlgo_ShapeSolid* pSS;
|
|
||||||
//
|
//
|
||||||
// 1. Prepare DSFiller
|
// 1. Prepare DSFiller
|
||||||
aDF.SetShapes (myArg1, myArg2);
|
aDF.SetShapes (myArg1, aS);
|
||||||
bIsDone=aDF.IsDone();
|
bIsDone=aDF.IsDone();
|
||||||
if (!bIsDone) {
|
if (!bIsDone) {
|
||||||
myErrorStatus=30; // wrong args are used for DSFiller
|
myErrorStatus=30; // wrong args are used for DSFiller
|
||||||
@ -174,16 +287,31 @@ void GEOMAlgo_FinderShapeOn::Find()
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
// 2. Find shapes
|
// 2. Find shapes
|
||||||
myLS.Clear();
|
GEOMAlgo_ShapeSolid* pSS;
|
||||||
|
GEOMAlgo_VertexSolid aVXS;
|
||||||
|
GEOMAlgo_WireSolid aWRS;
|
||||||
|
GEOMAlgo_ShellSolid aSHS;
|
||||||
|
GEOMAlgo_SolidSolid aSLS;
|
||||||
//
|
//
|
||||||
if (myShapeType==TopAbs_VERTEX) {
|
pSS=NULL;
|
||||||
pSS=new GEOMAlgo_VertexSolid;
|
//
|
||||||
}
|
switch (myShapeType) {
|
||||||
else if (myShapeType==TopAbs_EDGE) {
|
case TopAbs_VERTEX:
|
||||||
pSS=new GEOMAlgo_WireSolid;
|
pSS=&aVXS;
|
||||||
}
|
break;
|
||||||
else if (myShapeType==TopAbs_FACE) {
|
case TopAbs_EDGE:
|
||||||
pSS=new GEOMAlgo_ShellSolid;
|
pSS=&aWRS;
|
||||||
|
break;
|
||||||
|
case TopAbs_FACE:
|
||||||
|
pSS=&aSHS;
|
||||||
|
break;
|
||||||
|
case TopAbs_SOLID:
|
||||||
|
aSLS.SetShape2(myArg2);
|
||||||
|
pSS=&aSLS;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
myErrorStatus=12; // unallowed subshape type
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
pSS->SetFiller(aDF);
|
pSS->SetFiller(aDF);
|
||||||
@ -191,97 +319,111 @@ void GEOMAlgo_FinderShapeOn::Find()
|
|||||||
iErr=pSS->ErrorStatus();
|
iErr=pSS->ErrorStatus();
|
||||||
if (iErr) {
|
if (iErr) {
|
||||||
myErrorStatus=32; // builder ShapeSolid failed
|
myErrorStatus=32; // builder ShapeSolid failed
|
||||||
delete pSS;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const TopTools_ListOfShape& aLS=pSS->Shapes(myState);
|
for (i=0; i<3; ++i) {
|
||||||
//
|
const TopTools_ListOfShape& aLS=pSS->Shapes(aSts[i]);
|
||||||
aIt.Initialize(aLS);
|
aIt.Initialize(aLS);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aSImage=aIt.Value();
|
const TopoDS_Shape& aSImage=aIt.Value();
|
||||||
if (myImages.IsBound(aSImage)) {
|
if (myImages.IsBound(aSImage)) {
|
||||||
const TopoDS_Shape& aS=myImages.Find(aSImage);
|
const TopoDS_Shape& aSx=myImages.Find(aSImage);
|
||||||
myLS.Append(aS);
|
myMSS.Add(aSx, aSts[i]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
myErrorStatus=33;// can not find original shape
|
myErrorStatus=33;// can not find original shape
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
|
||||||
delete pSS;
|
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : MakeArguments
|
//function : MakeArgument1
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_FinderShapeOn::MakeArguments()
|
void GEOMAlgo_FinderShapeOn::MakeArgument1()
|
||||||
{
|
{
|
||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
//
|
//
|
||||||
Standard_Integer i, aNb;
|
Standard_Integer i, aNb;
|
||||||
|
TopAbs_ShapeEnum aType;
|
||||||
BRepLib_FaceError aFErr;
|
BRepLib_FaceError aFErr;
|
||||||
BRepLib_MakeFace aMF;
|
BRepLib_MakeFace aMF;
|
||||||
TopTools_IndexedMapOfShape aM;
|
TopTools_IndexedMapOfShape aM;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
TopoDS_Compound aCmp;
|
TopoDS_Face aFace;
|
||||||
TopoDS_Shell aSh;
|
TopoDS_Shell aSh;
|
||||||
TopoDS_Solid aSd;
|
TopoDS_Solid aSd;
|
||||||
TopoDS_Shape aSC;
|
|
||||||
TopTools_DataMapOfShapeShape aOriginals;
|
|
||||||
TopExp_Explorer aExp;
|
|
||||||
//
|
//
|
||||||
// Argument 1
|
// Argument 1
|
||||||
aMF.Init(mySurface, Standard_True);
|
if (!myIsAnalytic) {
|
||||||
aFErr=aMF.Error();
|
aMF.Init(mySurface, Standard_True);
|
||||||
if (aFErr!=BRepLib_FaceDone) {
|
aFErr=aMF.Error();
|
||||||
myErrorStatus=20; // can not build the face
|
if (aFErr!=BRepLib_FaceDone) {
|
||||||
return;
|
myErrorStatus=20; // can not build the face
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
const TopoDS_Shape& aF=aMF.Shape();
|
||||||
|
aFace=TopoDS::Face(aF);
|
||||||
|
//
|
||||||
|
// update tolerances
|
||||||
|
aM.Add(aF);
|
||||||
|
TopExp::MapShapes(aF, TopAbs_VERTEX, aM);
|
||||||
|
TopExp::MapShapes(aF, TopAbs_EDGE, aM);
|
||||||
|
aNb=aM.Extent();
|
||||||
|
for (i=1; i<=aNb; ++i) {
|
||||||
|
const TopoDS_Shape& aS=aM(i);
|
||||||
|
aType=aS.ShapeType();
|
||||||
|
switch (aType) {
|
||||||
|
case TopAbs_VERTEX: {
|
||||||
|
const TopoDS_Vertex& aVx=TopoDS::Vertex(aS);
|
||||||
|
aBB.UpdateVertex(aVx, myTolerance);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TopAbs_EDGE: {
|
||||||
|
const TopoDS_Edge& aEx=TopoDS::Edge(aS);
|
||||||
|
aBB.UpdateEdge(aEx, myTolerance);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TopAbs_FACE: {
|
||||||
|
const TopoDS_Face& aFx=TopoDS::Face(aS);
|
||||||
|
aBB.UpdateFace(aFx, myTolerance);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} //
|
||||||
|
else {
|
||||||
|
aBB.MakeFace(aFace, mySurface, myTolerance);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const TopoDS_Shape& aF=aMF.Shape();
|
|
||||||
//
|
|
||||||
// update tolerance
|
|
||||||
aExp.Init(aF, TopAbs_VERTEX);
|
|
||||||
for (; aExp.More(); aExp.Next()) {
|
|
||||||
const TopoDS_Vertex& aV=TopoDS::Vertex(aExp.Current());
|
|
||||||
aBB.UpdateVertex(aV, myTolerance);
|
|
||||||
}
|
|
||||||
aExp.Init(aF, TopAbs_EDGE);
|
|
||||||
for (; aExp.More(); aExp.Next()) {
|
|
||||||
const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current());
|
|
||||||
aBB.UpdateEdge(aE, myTolerance);
|
|
||||||
}
|
|
||||||
const TopoDS_Face& aFace=TopoDS::Face(aF);
|
|
||||||
aBB.UpdateFace(aFace, myTolerance);
|
|
||||||
//
|
|
||||||
// make solid
|
// make solid
|
||||||
aBB.MakeShell(aSh);
|
aBB.MakeShell(aSh);
|
||||||
aBB.Add(aSh, aFace);
|
aBB.Add(aSh, aFace);
|
||||||
aBB.MakeSolid(aSd);
|
aBB.MakeSolid(aSd);
|
||||||
aBB.Add(aSd, aSh);
|
aBB.Add(aSd, aSh);
|
||||||
myArg1=aSd;
|
myArg1=aSd;
|
||||||
|
}
|
||||||
|
//=======================================================================
|
||||||
|
//function : MakeArgument2
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void GEOMAlgo_FinderShapeOn::MakeArgument2()
|
||||||
|
{
|
||||||
|
myErrorStatus=0;
|
||||||
//
|
//
|
||||||
// Argument 2
|
TopoDS_Shape aSC;
|
||||||
|
TopTools_DataMapOfShapeShape aOriginals;
|
||||||
//
|
//
|
||||||
myImages.Clear();
|
myImages.Clear();
|
||||||
//
|
//
|
||||||
GEOMAlgo_FinderShapeOn::CopySource(myShape, myImages, aOriginals, aSC);
|
GEOMAlgo_FinderShapeOn::CopySource(myShape, myImages, aOriginals, aSC);
|
||||||
//
|
//
|
||||||
TopExp::MapShapes(aSC, myShapeType, aM);
|
myArg2=aSC;
|
||||||
aNb=aM.Extent();
|
|
||||||
if (!aNb) {
|
|
||||||
myWarningStatus=10; // No found subshapes of type myShapeType
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
aBB.MakeCompound(aCmp);
|
|
||||||
for (i=1; i<=aNb; ++i) {
|
|
||||||
const TopoDS_Shape& aS=aM(i);
|
|
||||||
aBB.Add(aCmp, aS);
|
|
||||||
}
|
|
||||||
myArg2=aCmp;
|
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : CheckData
|
//function : CheckData
|
||||||
@ -303,7 +445,8 @@ void GEOMAlgo_FinderShapeOn::CheckData()
|
|||||||
//
|
//
|
||||||
if (!(myShapeType==TopAbs_VERTEX ||
|
if (!(myShapeType==TopAbs_VERTEX ||
|
||||||
myShapeType==TopAbs_EDGE ||
|
myShapeType==TopAbs_EDGE ||
|
||||||
myShapeType==TopAbs_FACE)) {
|
myShapeType==TopAbs_FACE ||
|
||||||
|
myShapeType==TopAbs_SOLID)) {
|
||||||
myErrorStatus=12; // unallowed subshape type
|
myErrorStatus=12; // unallowed subshape type
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -334,9 +477,7 @@ void GEOMAlgo_FinderShapeOn::CopySource(const TopoDS_Shape& aE,
|
|||||||
//
|
//
|
||||||
if (aOriginals.IsBound(aE)) {
|
if (aOriginals.IsBound(aE)) {
|
||||||
aEx=aOriginals.ChangeFind(aE);
|
aEx=aOriginals.ChangeFind(aE);
|
||||||
if (aType==TopAbs_EDGE) {
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aEx=aE.EmptyCopied();
|
aEx=aE.EmptyCopied();
|
||||||
|
@ -40,6 +40,12 @@
|
|||||||
#ifndef _TopTools_DataMapOfShapeShape_HeaderFile
|
#ifndef _TopTools_DataMapOfShapeShape_HeaderFile
|
||||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
|
||||||
|
#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Standard_Boolean_HeaderFile
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#endif
|
||||||
#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
|
#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
|
||||||
#include <GEOMAlgo_ShapeAlgo.hxx>
|
#include <GEOMAlgo_ShapeAlgo.hxx>
|
||||||
#endif
|
#endif
|
||||||
@ -95,8 +101,11 @@ protected:
|
|||||||
// Methods PROTECTED
|
// Methods PROTECTED
|
||||||
//
|
//
|
||||||
Standard_EXPORT virtual void CheckData() ;
|
Standard_EXPORT virtual void CheckData() ;
|
||||||
Standard_EXPORT void MakeArguments() ;
|
Standard_EXPORT void MakeArgument1() ;
|
||||||
|
Standard_EXPORT void MakeArgument2() ;
|
||||||
Standard_EXPORT void Find() ;
|
Standard_EXPORT void Find() ;
|
||||||
|
Standard_EXPORT void Find(const TopoDS_Shape& aS) ;
|
||||||
|
Standard_EXPORT void FindVertices() ;
|
||||||
|
|
||||||
|
|
||||||
// Fields PROTECTED
|
// Fields PROTECTED
|
||||||
@ -108,6 +117,8 @@ TopoDS_Shape myArg1;
|
|||||||
TopoDS_Shape myArg2;
|
TopoDS_Shape myArg2;
|
||||||
TopTools_ListOfShape myLS;
|
TopTools_ListOfShape myLS;
|
||||||
TopTools_DataMapOfShapeShape myImages;
|
TopTools_DataMapOfShapeShape myImages;
|
||||||
|
GEOMAlgo_IndexedDataMapOfShapeState myMSS;
|
||||||
|
Standard_Boolean myIsAnalytic;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -0,0 +1,146 @@
|
|||||||
|
// File generated by CPPExt (Transient)
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Copyright (C) 1991 - 2000 by
|
||||||
|
// Matra Datavision SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// Copyright (C) 2001 - 2004 by
|
||||||
|
// Open CASCADE SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of the Open CASCADE Technology software.
|
||||||
|
//
|
||||||
|
// This software may be distributed and/or modified under the terms and
|
||||||
|
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
|
||||||
|
// and appearing in the file LICENSE included in the packaging of this file.
|
||||||
|
//
|
||||||
|
// This software is distributed on an "AS IS" basis, without warranty of any
|
||||||
|
// kind, and Open CASCADE SA hereby disclaims all such warranties,
|
||||||
|
// including without limitation, any warranties of merchantability, fitness
|
||||||
|
// for a particular purpose or non-infringement. Please see the License for
|
||||||
|
// the specific terms and conditions governing rights and limitations under the
|
||||||
|
// License.
|
||||||
|
|
||||||
|
#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile
|
||||||
|
#define _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile
|
||||||
|
|
||||||
|
#ifndef _Standard_HeaderFile
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile
|
||||||
|
#include <Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _TopoDS_Shape_HeaderFile
|
||||||
|
#include <TopoDS_Shape.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Standard_Integer_HeaderFile
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _TopAbs_State_HeaderFile
|
||||||
|
#include <TopAbs_State.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _TCollection_MapNodePtr_HeaderFile
|
||||||
|
#include <TCollection_MapNodePtr.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _TCollection_MapNode_HeaderFile
|
||||||
|
#include <TCollection_MapNode.hxx>
|
||||||
|
#endif
|
||||||
|
class TopoDS_Shape;
|
||||||
|
class TopTools_ShapeMapHasher;
|
||||||
|
class GEOMAlgo_IndexedDataMapOfShapeState;
|
||||||
|
|
||||||
|
|
||||||
|
class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState : public TCollection_MapNode {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
void* operator new(size_t,void* anAddress)
|
||||||
|
{
|
||||||
|
return anAddress;
|
||||||
|
}
|
||||||
|
void* operator new(size_t size)
|
||||||
|
{
|
||||||
|
return Standard::Allocate(size);
|
||||||
|
}
|
||||||
|
void operator delete(void *anAddress)
|
||||||
|
{
|
||||||
|
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||||
|
}
|
||||||
|
// Methods PUBLIC
|
||||||
|
//
|
||||||
|
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState(const TopoDS_Shape& K1,const Standard_Integer K2,const TopAbs_State& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
|
||||||
|
TopoDS_Shape& Key1() const;
|
||||||
|
Standard_Integer& Key2() const;
|
||||||
|
TCollection_MapNodePtr& Next2() const;
|
||||||
|
TopAbs_State& Value() const;
|
||||||
|
Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Type management
|
||||||
|
//
|
||||||
|
Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_Type_();
|
||||||
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
|
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Methods PROTECTED
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
// Fields PROTECTED
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Methods PRIVATE
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
// Fields PRIVATE
|
||||||
|
//
|
||||||
|
TopoDS_Shape myKey1;
|
||||||
|
Standard_Integer myKey2;
|
||||||
|
TopAbs_State myValue;
|
||||||
|
TCollection_MapNodePtr myNext2;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#define TheKey TopoDS_Shape
|
||||||
|
#define TheKey_hxx <TopoDS_Shape.hxx>
|
||||||
|
#define TheItem TopAbs_State
|
||||||
|
#define TheItem_hxx <TopAbs_State.hxx>
|
||||||
|
#define Hasher TopTools_ShapeMapHasher
|
||||||
|
#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
|
||||||
|
#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState
|
||||||
|
#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx>
|
||||||
|
#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState
|
||||||
|
#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_Type_()
|
||||||
|
#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeState
|
||||||
|
#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
|
||||||
|
|
||||||
|
#include <TCollection_IndexedDataMapNode.lxx>
|
||||||
|
|
||||||
|
#undef TheKey
|
||||||
|
#undef TheKey_hxx
|
||||||
|
#undef TheItem
|
||||||
|
#undef TheItem_hxx
|
||||||
|
#undef Hasher
|
||||||
|
#undef Hasher_hxx
|
||||||
|
#undef TCollection_IndexedDataMapNode
|
||||||
|
#undef TCollection_IndexedDataMapNode_hxx
|
||||||
|
#undef Handle_TCollection_IndexedDataMapNode
|
||||||
|
#undef TCollection_IndexedDataMapNode_Type_
|
||||||
|
#undef TCollection_IndexedDataMap
|
||||||
|
#undef TCollection_IndexedDataMap_hxx
|
||||||
|
|
||||||
|
|
||||||
|
// other Inline functions and methods (like "C++: function call" methods)
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,100 @@
|
|||||||
|
// File generated by CPPExt (Transient)
|
||||||
|
//
|
||||||
|
// Copyright (C) 1991 - 2000 by
|
||||||
|
// Matra Datavision SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// Copyright (C) 2001 - 2004 by
|
||||||
|
// Open CASCADE SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of the Open CASCADE Technology software.
|
||||||
|
//
|
||||||
|
// This software may be distributed and/or modified under the terms and
|
||||||
|
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
|
||||||
|
// and appearing in the file LICENSE included in the packaging of this file.
|
||||||
|
//
|
||||||
|
// This software is distributed on an "AS IS" basis, without warranty of any
|
||||||
|
// kind, and Open CASCADE SA hereby disclaims all such warranties,
|
||||||
|
// including without limitation, any warranties of merchantability, fitness
|
||||||
|
// for a particular purpose or non-infringement. Please see the License for
|
||||||
|
// the specific terms and conditions governing rights and limitations under the
|
||||||
|
// License.
|
||||||
|
|
||||||
|
#include <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx>
|
||||||
|
|
||||||
|
#ifndef _Standard_TypeMismatch_HeaderFile
|
||||||
|
#include <Standard_TypeMismatch.hxx>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _TopoDS_Shape_HeaderFile
|
||||||
|
#include <TopoDS_Shape.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _TopTools_ShapeMapHasher_HeaderFile
|
||||||
|
#include <TopTools_ShapeMapHasher.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
|
||||||
|
#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
|
||||||
|
#endif
|
||||||
|
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState() {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_Type_()
|
||||||
|
{
|
||||||
|
|
||||||
|
static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
|
||||||
|
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
|
||||||
|
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
|
||||||
|
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
|
||||||
|
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
|
||||||
|
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
|
||||||
|
|
||||||
|
|
||||||
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState",
|
||||||
|
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState),
|
||||||
|
1,
|
||||||
|
(Standard_Address)_Ancestors,
|
||||||
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
|
return _aType;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// DownCast method
|
||||||
|
// allow safe downcasting
|
||||||
|
//
|
||||||
|
const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)::DownCast(const Handle(Standard_Transient)& AnObject)
|
||||||
|
{
|
||||||
|
Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) _anOtherObject;
|
||||||
|
|
||||||
|
if (!AnObject.IsNull()) {
|
||||||
|
if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState))) {
|
||||||
|
_anOtherObject = Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)((Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)&)AnObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return _anOtherObject ;
|
||||||
|
}
|
||||||
|
const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::DynamicType() const
|
||||||
|
{
|
||||||
|
return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) ;
|
||||||
|
}
|
||||||
|
Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::IsKind(const Handle(Standard_Type)& AType) const
|
||||||
|
{
|
||||||
|
return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) == AType || TCollection_MapNode::IsKind(AType));
|
||||||
|
}
|
||||||
|
Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState() {}
|
||||||
|
#define TheKey TopoDS_Shape
|
||||||
|
#define TheKey_hxx <TopoDS_Shape.hxx>
|
||||||
|
#define TheItem TopAbs_State
|
||||||
|
#define TheItem_hxx <TopAbs_State.hxx>
|
||||||
|
#define Hasher TopTools_ShapeMapHasher
|
||||||
|
#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
|
||||||
|
#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState
|
||||||
|
#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx>
|
||||||
|
#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState
|
||||||
|
#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_Type_()
|
||||||
|
#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeState
|
||||||
|
#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
|
||||||
|
#include <TCollection_IndexedDataMapNode.gxx>
|
||||||
|
|
143
src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState.hxx
Normal file
143
src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState.hxx
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
// File generated by CPPExt (Value)
|
||||||
|
//
|
||||||
|
// Copyright (C) 1991 - 2000 by
|
||||||
|
// Matra Datavision SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// Copyright (C) 2001 - 2004 by
|
||||||
|
// Open CASCADE SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of the Open CASCADE Technology software.
|
||||||
|
//
|
||||||
|
// This software may be distributed and/or modified under the terms and
|
||||||
|
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
|
||||||
|
// and appearing in the file LICENSE included in the packaging of this file.
|
||||||
|
//
|
||||||
|
// This software is distributed on an "AS IS" basis, without warranty of any
|
||||||
|
// kind, and Open CASCADE SA hereby disclaims all such warranties,
|
||||||
|
// including without limitation, any warranties of merchantability, fitness
|
||||||
|
// for a particular purpose or non-infringement. Please see the License for
|
||||||
|
// the specific terms and conditions governing rights and limitations under the
|
||||||
|
// License.
|
||||||
|
|
||||||
|
#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
|
||||||
|
#define _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
|
||||||
|
|
||||||
|
#ifndef _TCollection_BasicMap_HeaderFile
|
||||||
|
#include <TCollection_BasicMap.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _TopAbs_State_HeaderFile
|
||||||
|
#include <TopAbs_State.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile
|
||||||
|
#include <Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Standard_Integer_HeaderFile
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Standard_Boolean_HeaderFile
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#endif
|
||||||
|
class Standard_DomainError;
|
||||||
|
class Standard_OutOfRange;
|
||||||
|
class Standard_NoSuchObject;
|
||||||
|
class TopoDS_Shape;
|
||||||
|
class TopTools_ShapeMapHasher;
|
||||||
|
class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState;
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef _Standard_HeaderFile
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Standard_Macro_HeaderFile
|
||||||
|
#include <Standard_Macro.hxx>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class GEOMAlgo_IndexedDataMapOfShapeState : public TCollection_BasicMap {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
void* operator new(size_t,void* anAddress)
|
||||||
|
{
|
||||||
|
return anAddress;
|
||||||
|
}
|
||||||
|
void* operator new(size_t size)
|
||||||
|
{
|
||||||
|
return Standard::Allocate(size);
|
||||||
|
}
|
||||||
|
void operator delete(void *anAddress)
|
||||||
|
{
|
||||||
|
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||||
|
}
|
||||||
|
// Methods PUBLIC
|
||||||
|
//
|
||||||
|
Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeState(const Standard_Integer NbBuckets = 1);
|
||||||
|
Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeState& Assign(const GEOMAlgo_IndexedDataMapOfShapeState& Other) ;
|
||||||
|
GEOMAlgo_IndexedDataMapOfShapeState& operator =(const GEOMAlgo_IndexedDataMapOfShapeState& Other)
|
||||||
|
{
|
||||||
|
return Assign(Other);
|
||||||
|
}
|
||||||
|
|
||||||
|
Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
|
||||||
|
Standard_EXPORT void Clear() ;
|
||||||
|
~GEOMAlgo_IndexedDataMapOfShapeState()
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const TopAbs_State& I) ;
|
||||||
|
Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const TopAbs_State& T) ;
|
||||||
|
Standard_EXPORT void RemoveLast() ;
|
||||||
|
Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const;
|
||||||
|
Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const;
|
||||||
|
Standard_EXPORT const TopAbs_State& FindFromIndex(const Standard_Integer I) const;
|
||||||
|
const TopAbs_State& operator ()(const Standard_Integer I) const
|
||||||
|
{
|
||||||
|
return FindFromIndex(I);
|
||||||
|
}
|
||||||
|
|
||||||
|
Standard_EXPORT TopAbs_State& ChangeFromIndex(const Standard_Integer I) ;
|
||||||
|
TopAbs_State& operator ()(const Standard_Integer I)
|
||||||
|
{
|
||||||
|
return ChangeFromIndex(I);
|
||||||
|
}
|
||||||
|
|
||||||
|
Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const;
|
||||||
|
Standard_EXPORT const TopAbs_State& FindFromKey(const TopoDS_Shape& K) const;
|
||||||
|
Standard_EXPORT TopAbs_State& ChangeFromKey(const TopoDS_Shape& K) ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Methods PROTECTED
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
// Fields PROTECTED
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Methods PRIVATE
|
||||||
|
//
|
||||||
|
Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeState(const GEOMAlgo_IndexedDataMapOfShapeState& Other);
|
||||||
|
|
||||||
|
|
||||||
|
// Fields PRIVATE
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// other Inline functions and methods (like "C++: function call" methods)
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
57
src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState_0.cxx
Normal file
57
src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState_0.cxx
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
// File generated by CPPExt (Value)
|
||||||
|
//
|
||||||
|
// Copyright (C) 1991 - 2000 by
|
||||||
|
// Matra Datavision SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// Copyright (C) 2001 - 2004 by
|
||||||
|
// Open CASCADE SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of the Open CASCADE Technology software.
|
||||||
|
//
|
||||||
|
// This software may be distributed and/or modified under the terms and
|
||||||
|
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
|
||||||
|
// and appearing in the file LICENSE included in the packaging of this file.
|
||||||
|
//
|
||||||
|
// This software is distributed on an "AS IS" basis, without warranty of any
|
||||||
|
// kind, and Open CASCADE SA hereby disclaims all such warranties,
|
||||||
|
// including without limitation, any warranties of merchantability, fitness
|
||||||
|
// for a particular purpose or non-infringement. Please see the License for
|
||||||
|
// the specific terms and conditions governing rights and limitations under the
|
||||||
|
// License.
|
||||||
|
|
||||||
|
#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
|
||||||
|
|
||||||
|
#ifndef _Standard_DomainError_HeaderFile
|
||||||
|
#include <Standard_DomainError.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Standard_OutOfRange_HeaderFile
|
||||||
|
#include <Standard_OutOfRange.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Standard_NoSuchObject_HeaderFile
|
||||||
|
#include <Standard_NoSuchObject.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _TopoDS_Shape_HeaderFile
|
||||||
|
#include <TopoDS_Shape.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _TopTools_ShapeMapHasher_HeaderFile
|
||||||
|
#include <TopTools_ShapeMapHasher.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile
|
||||||
|
#include <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#define TheKey TopoDS_Shape
|
||||||
|
#define TheKey_hxx <TopoDS_Shape.hxx>
|
||||||
|
#define TheItem TopAbs_State
|
||||||
|
#define TheItem_hxx <TopAbs_State.hxx>
|
||||||
|
#define Hasher TopTools_ShapeMapHasher
|
||||||
|
#define Hasher_hxx <TopTools_ShapeMapHasher.hxx>
|
||||||
|
#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState
|
||||||
|
#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx>
|
||||||
|
#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState
|
||||||
|
#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_Type_()
|
||||||
|
#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeState
|
||||||
|
#define TCollection_IndexedDataMap_hxx <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
|
||||||
|
#include <TCollection_IndexedDataMap.gxx>
|
||||||
|
|
@ -11,8 +11,8 @@ deferred class ShapeSolid from GEOMAlgo
|
|||||||
---Purpose:
|
---Purpose:
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
State from TopAbs,
|
||||||
ListOfShape from TopTools,
|
ListOfShape from TopTools,
|
||||||
State from GEOMAlgo,
|
|
||||||
PDSFiller from BOPTools,
|
PDSFiller from BOPTools,
|
||||||
DSFiller from BOPTools
|
DSFiller from BOPTools
|
||||||
--raises
|
--raises
|
||||||
@ -26,8 +26,9 @@ is
|
|||||||
aDSF:DSFiller from BOPTools);
|
aDSF:DSFiller from BOPTools);
|
||||||
---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ShapeSolid();"
|
---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ShapeSolid();"
|
||||||
|
|
||||||
|
|
||||||
Shapes(me;
|
Shapes(me;
|
||||||
aState:State from GEOMAlgo)
|
aState:State from TopAbs)
|
||||||
returns ListOfShape from TopTools;
|
returns ListOfShape from TopTools;
|
||||||
---C++: return const &
|
---C++: return const &
|
||||||
|
|
||||||
@ -41,8 +42,6 @@ fields
|
|||||||
myLSIN : ListOfShape from TopTools is protected;
|
myLSIN : ListOfShape from TopTools is protected;
|
||||||
myLSOUT : ListOfShape from TopTools is protected;
|
myLSOUT : ListOfShape from TopTools is protected;
|
||||||
myLSON : ListOfShape from TopTools is protected;
|
myLSON : ListOfShape from TopTools is protected;
|
||||||
|
|
||||||
myLS : ListOfShape from TopTools is protected;
|
|
||||||
myRank : Integer from Standard is protected;
|
myRank : Integer from Standard is protected;
|
||||||
myDSFiller : PDSFiller from BOPTools is protected;
|
myDSFiller : PDSFiller from BOPTools is protected;
|
||||||
|
|
||||||
|
@ -35,80 +35,27 @@ void GEOMAlgo_ShapeSolid::SetFiller(const BOPTools_DSFiller& aDSFiller)
|
|||||||
{
|
{
|
||||||
myDSFiller=(BOPTools_DSFiller*) &aDSFiller;
|
myDSFiller=(BOPTools_DSFiller*) &aDSFiller;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function: Shapes
|
// function: Shapes
|
||||||
// purpose:
|
// purpose:
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const TopTools_ListOfShape& GEOMAlgo_ShapeSolid::Shapes(const GEOMAlgo_State aState) const
|
const TopTools_ListOfShape& GEOMAlgo_ShapeSolid::Shapes(const TopAbs_State aState) const
|
||||||
{
|
{
|
||||||
TopTools_ListIteratorOfListOfShape aIt;
|
const TopTools_ListOfShape *pL;
|
||||||
//
|
|
||||||
TopTools_ListOfShape* pLS=(TopTools_ListOfShape*)&myLS;
|
|
||||||
//
|
|
||||||
pLS->Clear();
|
|
||||||
//
|
//
|
||||||
switch (aState) {
|
switch (aState) {
|
||||||
case GEOMAlgo_ST_IN: {
|
case TopAbs_IN:
|
||||||
aIt.Initialize(myLSIN);
|
pL=&myLSIN;
|
||||||
for (; aIt.More(); aIt.Next()) {
|
|
||||||
const TopoDS_Shape& aS=aIt.Value();
|
|
||||||
pLS->Append(aS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
//
|
case TopAbs_OUT:
|
||||||
case GEOMAlgo_ST_OUT: {
|
pL=&myLSOUT;
|
||||||
aIt.Initialize(myLSOUT);
|
|
||||||
for (; aIt.More(); aIt.Next()) {
|
|
||||||
const TopoDS_Shape& aS=aIt.Value();
|
|
||||||
pLS->Append(aS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
//
|
case TopAbs_ON:
|
||||||
case GEOMAlgo_ST_ON: {
|
pL=&myLSON;
|
||||||
aIt.Initialize(myLSON);
|
|
||||||
for (; aIt.More(); aIt.Next()) {
|
|
||||||
const TopoDS_Shape& aS=aIt.Value();
|
|
||||||
pLS->Append(aS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
//
|
|
||||||
case GEOMAlgo_ST_ONIN: {
|
|
||||||
aIt.Initialize(myLSON);
|
|
||||||
for (; aIt.More(); aIt.Next()) {
|
|
||||||
const TopoDS_Shape& aS=aIt.Value();
|
|
||||||
pLS->Append(aS);
|
|
||||||
}
|
|
||||||
aIt.Initialize(myLSIN);
|
|
||||||
for (; aIt.More(); aIt.Next()) {
|
|
||||||
const TopoDS_Shape& aS=aIt.Value();
|
|
||||||
pLS->Append(aS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
//
|
|
||||||
case GEOMAlgo_ST_ONOUT: {
|
|
||||||
aIt.Initialize(myLSON);
|
|
||||||
for (; aIt.More(); aIt.Next()) {
|
|
||||||
const TopoDS_Shape& aS=aIt.Value();
|
|
||||||
pLS->Append(aS);
|
|
||||||
}
|
|
||||||
aIt.Initialize(myLSOUT);
|
|
||||||
for (; aIt.More(); aIt.Next()) {
|
|
||||||
const TopoDS_Shape& aS=aIt.Value();
|
|
||||||
pLS->Append(aS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
//
|
|
||||||
case GEOMAlgo_ST_UNKNOWN:
|
|
||||||
case GEOMAlgo_ST_INOUT:
|
|
||||||
default:
|
default:
|
||||||
|
pL=&myLSON;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return myLS;
|
return *pL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
#ifndef _GEOMAlgo_Algo_HeaderFile
|
#ifndef _GEOMAlgo_Algo_HeaderFile
|
||||||
#include <GEOMAlgo_Algo.hxx>
|
#include <GEOMAlgo_Algo.hxx>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _GEOMAlgo_State_HeaderFile
|
#ifndef _TopAbs_State_HeaderFile
|
||||||
#include <GEOMAlgo_State.hxx>
|
#include <TopAbs_State.hxx>
|
||||||
#endif
|
#endif
|
||||||
class BOPTools_DSFiller;
|
class BOPTools_DSFiller;
|
||||||
class TopTools_ListOfShape;
|
class TopTools_ListOfShape;
|
||||||
@ -68,7 +68,7 @@ public:
|
|||||||
//
|
//
|
||||||
Standard_EXPORT void SetFiller(const BOPTools_DSFiller& aDSF) ;
|
Standard_EXPORT void SetFiller(const BOPTools_DSFiller& aDSF) ;
|
||||||
Standard_EXPORT virtual ~GEOMAlgo_ShapeSolid();
|
Standard_EXPORT virtual ~GEOMAlgo_ShapeSolid();
|
||||||
Standard_EXPORT const TopTools_ListOfShape& Shapes(const GEOMAlgo_State aState) const;
|
Standard_EXPORT const TopTools_ListOfShape& Shapes(const TopAbs_State aState) const;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -88,7 +88,6 @@ Standard_EXPORT virtual void Prepare() = 0;
|
|||||||
TopTools_ListOfShape myLSIN;
|
TopTools_ListOfShape myLSIN;
|
||||||
TopTools_ListOfShape myLSOUT;
|
TopTools_ListOfShape myLSOUT;
|
||||||
TopTools_ListOfShape myLSON;
|
TopTools_ListOfShape myLSON;
|
||||||
TopTools_ListOfShape myLS;
|
|
||||||
Standard_Integer myRank;
|
Standard_Integer myRank;
|
||||||
BOPTools_PDSFiller myDSFiller;
|
BOPTools_PDSFiller myDSFiller;
|
||||||
|
|
||||||
|
@ -10,24 +10,25 @@
|
|||||||
|
|
||||||
#include <gp_Pnt2d.hxx>
|
#include <gp_Pnt2d.hxx>
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
|
#include <gp_Dir.hxx>
|
||||||
|
|
||||||
|
#include <TopoDS.hxx>
|
||||||
#include <TopoDS_Face.hxx>
|
#include <TopoDS_Face.hxx>
|
||||||
#include <TopoDS_Edge.hxx>
|
#include <TopoDS_Edge.hxx>
|
||||||
#include <TopoDS.hxx>
|
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopoDS_Solid.hxx>
|
#include <TopoDS_Solid.hxx>
|
||||||
|
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
|
#include <BRepTools.hxx>
|
||||||
|
|
||||||
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
|
|
||||||
#include <BOPTColStd_Dump.hxx>
|
|
||||||
|
|
||||||
#include <BRepClass3d_SolidClassifier.hxx>
|
#include <BRepClass3d_SolidClassifier.hxx>
|
||||||
|
|
||||||
#include <IntTools_Context.hxx>
|
#include <IntTools_Context.hxx>
|
||||||
|
#include <BOPTColStd_Dump.hxx>
|
||||||
#include <BooleanOperations_ShapesDataStructure.hxx>
|
#include <BooleanOperations_ShapesDataStructure.hxx>
|
||||||
|
|
||||||
#include <BOPTools_PaveFiller.hxx>
|
#include <BOPTools_PaveFiller.hxx>
|
||||||
@ -46,28 +47,10 @@
|
|||||||
#include <BOPTools_SplitShapesPool.hxx>
|
#include <BOPTools_SplitShapesPool.hxx>
|
||||||
#include <BOPTools_Tools3D.hxx>
|
#include <BOPTools_Tools3D.hxx>
|
||||||
#include <BOPTools_DSFiller.hxx>
|
#include <BOPTools_DSFiller.hxx>
|
||||||
//
|
|
||||||
#include <gp_Dir.hxx>
|
|
||||||
#include <BOPTools_SSInterference.hxx>
|
|
||||||
#include <TopoDS_Face.hxx>
|
|
||||||
#include <TopoDS.hxx>
|
|
||||||
#include <BOPTools_ListOfPaveBlock.hxx>
|
|
||||||
#include <TopoDS_Edge.hxx>
|
|
||||||
#include <BOPTools_Tools3D.hxx>
|
|
||||||
#include <BOP_WireEdgeSet.hxx>
|
#include <BOP_WireEdgeSet.hxx>
|
||||||
#include <BOP_SDFWESFiller.hxx>
|
#include <BOP_SDFWESFiller.hxx>
|
||||||
#include <BOP_FaceBuilder.hxx>
|
#include <BOP_FaceBuilder.hxx>
|
||||||
#include <TopTools_ListOfShape.hxx>
|
|
||||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
|
||||||
#include <BRepTools.hxx>
|
|
||||||
#include <IntTools_Context.hxx>
|
|
||||||
#include <Geom_Surface.hxx>
|
|
||||||
#include <TopExp_Explorer.hxx>
|
|
||||||
#include <GeomAPI_ProjectPointOnSurf.hxx>
|
|
||||||
|
|
||||||
static
|
|
||||||
Standard_Boolean CheckSameDomainFaceInside(const TopoDS_Face& theFace1,
|
|
||||||
const TopoDS_Face& theFace2);
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GEOMAlgo_ShellSolid
|
//function : GEOMAlgo_ShellSolid
|
||||||
@ -345,10 +328,10 @@ void GEOMAlgo_ShellSolid::DetectSDFaces()
|
|||||||
Standard_Boolean bIsValidIn2D, bNegativeFlag;
|
Standard_Boolean bIsValidIn2D, bNegativeFlag;
|
||||||
bIsValidIn2D=BOPTools_Tools3D::IsValidArea (aFaceResult, bNegativeFlag);
|
bIsValidIn2D=BOPTools_Tools3D::IsValidArea (aFaceResult, bNegativeFlag);
|
||||||
if (bIsValidIn2D) {
|
if (bIsValidIn2D) {
|
||||||
if(CheckSameDomainFaceInside(aFaceResult, aF2)) {
|
//if(CheckSameDomainFaceInside(aFaceResult, aF2)) {
|
||||||
iZone=1;
|
iZone=1;
|
||||||
break;
|
break;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
@ -365,52 +348,3 @@ void GEOMAlgo_ShellSolid::DetectSDFaces()
|
|||||||
aFF.SetSenseFlag (iSenseFlag);
|
aFF.SetSenseFlag (iSenseFlag);
|
||||||
}// end of for (i=1; i<=aNb; i++)
|
}// end of for (i=1; i<=aNb; i++)
|
||||||
}
|
}
|
||||||
//=======================================================================
|
|
||||||
//function : CheckSameDomainFaceInside
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
Standard_Boolean CheckSameDomainFaceInside(const TopoDS_Face& theFace1,
|
|
||||||
const TopoDS_Face& theFace2)
|
|
||||||
{
|
|
||||||
Standard_Real umin = 0., umax = 0., vmin = 0., vmax = 0.;
|
|
||||||
BRepTools::UVBounds(theFace1, umin, umax, vmin, vmax);
|
|
||||||
IntTools_Context aContext;
|
|
||||||
Handle(Geom_Surface) aSurface = BRep_Tool::Surface(theFace1);
|
|
||||||
Standard_Real aTolerance = BRep_Tool::Tolerance(theFace1);
|
|
||||||
|
|
||||||
TopExp_Explorer anExpE(theFace1, TopAbs_EDGE);
|
|
||||||
|
|
||||||
for(; anExpE.More(); anExpE.Next()) {
|
|
||||||
const TopoDS_Edge& anEdge = TopoDS::Edge(anExpE.Current());
|
|
||||||
Standard_Real anEdgeTol = BRep_Tool::Tolerance(anEdge);
|
|
||||||
aTolerance = (aTolerance < anEdgeTol) ? anEdgeTol : aTolerance;
|
|
||||||
}
|
|
||||||
aTolerance += BRep_Tool::Tolerance(theFace2);
|
|
||||||
|
|
||||||
Standard_Integer nbpoints = 5;
|
|
||||||
Standard_Real adeltau = (umax - umin) / (nbpoints + 1);
|
|
||||||
Standard_Real adeltav = (vmax - vmin) / (nbpoints + 1);
|
|
||||||
Standard_Real U = umin + adeltau;
|
|
||||||
GeomAPI_ProjectPointOnSurf& aProjector = aContext.ProjPS(theFace2);
|
|
||||||
|
|
||||||
for(Standard_Integer i = 1; i <= nbpoints; i++, U+=adeltau) {
|
|
||||||
Standard_Real V = vmin + adeltav;
|
|
||||||
|
|
||||||
for(Standard_Integer j = 1; j <= nbpoints; j++, V+=adeltav) {
|
|
||||||
gp_Pnt2d aPoint(U,V);
|
|
||||||
|
|
||||||
if(aContext.IsPointInFace(theFace1, aPoint)) {
|
|
||||||
gp_Pnt aP3d = aSurface->Value(U, V);
|
|
||||||
aProjector.Perform(aP3d);
|
|
||||||
|
|
||||||
if(aProjector.IsDone()) {
|
|
||||||
|
|
||||||
if(aProjector.LowerDistance() > aTolerance)
|
|
||||||
return Standard_False;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Standard_True;
|
|
||||||
}
|
|
||||||
|
39
src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl
Normal file
39
src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
-- File: GEOMAlgo_SolidSolid.cdl
|
||||||
|
-- Created: Wed Jan 26 12:05:14 2005
|
||||||
|
-- Author: Peter KURNEV
|
||||||
|
-- <pkv@irinox>
|
||||||
|
---Copyright: Matra Datavision 2005
|
||||||
|
|
||||||
|
|
||||||
|
class SolidSolid from GEOMAlgo
|
||||||
|
inherits ShellSolid from GEOMAlgo
|
||||||
|
|
||||||
|
---Purpose:
|
||||||
|
|
||||||
|
uses
|
||||||
|
Shape from TopoDS
|
||||||
|
|
||||||
|
--raises
|
||||||
|
|
||||||
|
is
|
||||||
|
Create
|
||||||
|
returns SolidSolid from GEOMAlgo;
|
||||||
|
---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_SolidSolid();"
|
||||||
|
|
||||||
|
Perform (me:out)
|
||||||
|
is redefined;
|
||||||
|
|
||||||
|
BuildResult (me:out)
|
||||||
|
is redefined protected;
|
||||||
|
|
||||||
|
SetShape2 (me:out;
|
||||||
|
aS: Shape from TopoDS);
|
||||||
|
|
||||||
|
Shape2 (me)
|
||||||
|
returns Shape from TopoDS;
|
||||||
|
---C++: return const &
|
||||||
|
|
||||||
|
fields
|
||||||
|
myS2: Shape from TopoDS is protected;
|
||||||
|
|
||||||
|
end SolidSolid;
|
182
src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx
Normal file
182
src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
// File: GEOMAlgo_SolidSolid.cxx
|
||||||
|
// Created: Wed Jan 26 12:06:26 2005
|
||||||
|
// Author: Peter KURNEV
|
||||||
|
// <pkv@irinox>
|
||||||
|
|
||||||
|
|
||||||
|
#include <GEOMAlgo_SolidSolid.ixx>
|
||||||
|
|
||||||
|
#include <Standard_Failure.hxx>
|
||||||
|
|
||||||
|
#include <TopAbs_State.hxx>
|
||||||
|
#include <TopoDS_Shape.hxx>
|
||||||
|
#include <TopExp.hxx>
|
||||||
|
|
||||||
|
#include <TopTools_ListOfShape.hxx>
|
||||||
|
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||||
|
#include <TopTools_IndexedMapOfShape.hxx>
|
||||||
|
|
||||||
|
#include <BooleanOperations_ShapesDataStructure.hxx>
|
||||||
|
#include <BOPTools_DSFiller.hxx>
|
||||||
|
|
||||||
|
#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GEOMAlgo_SolidSolid
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
GEOMAlgo_SolidSolid::GEOMAlgo_SolidSolid()
|
||||||
|
:
|
||||||
|
GEOMAlgo_ShellSolid()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//=======================================================================
|
||||||
|
//function : ~
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
GEOMAlgo_SolidSolid::~GEOMAlgo_SolidSolid()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//=======================================================================
|
||||||
|
// function: SetShape2
|
||||||
|
// purpose:
|
||||||
|
//=======================================================================
|
||||||
|
void GEOMAlgo_SolidSolid::SetShape2(const TopoDS_Shape& aS2)
|
||||||
|
{
|
||||||
|
myS2=aS2;
|
||||||
|
}
|
||||||
|
//=======================================================================
|
||||||
|
// function: Shape2
|
||||||
|
// purpose:
|
||||||
|
//=======================================================================
|
||||||
|
const TopoDS_Shape& GEOMAlgo_SolidSolid::Shape2()const
|
||||||
|
{
|
||||||
|
return myS2;
|
||||||
|
}
|
||||||
|
//=======================================================================
|
||||||
|
// function: Perform
|
||||||
|
// purpose:
|
||||||
|
//=======================================================================
|
||||||
|
void GEOMAlgo_SolidSolid::Perform()
|
||||||
|
{
|
||||||
|
myErrorStatus=0;
|
||||||
|
try {
|
||||||
|
if (myDSFiller==NULL) {
|
||||||
|
myErrorStatus=10;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!myDSFiller->IsDone()) {
|
||||||
|
myErrorStatus=11;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
Standard_Boolean bIsNewFiller;
|
||||||
|
//
|
||||||
|
bIsNewFiller=myDSFiller->IsNewFiller();
|
||||||
|
if (bIsNewFiller) {
|
||||||
|
Prepare();
|
||||||
|
myDSFiller->SetNewFiller(!bIsNewFiller);
|
||||||
|
}
|
||||||
|
//
|
||||||
|
myRank=2;
|
||||||
|
BuildResult();
|
||||||
|
}
|
||||||
|
catch (Standard_Failure) {
|
||||||
|
myErrorStatus=12;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//=================================================================================
|
||||||
|
// function: BuildResult
|
||||||
|
// purpose:
|
||||||
|
//=================================================================================
|
||||||
|
void GEOMAlgo_SolidSolid::BuildResult()
|
||||||
|
{
|
||||||
|
myErrorStatus=0;
|
||||||
|
//
|
||||||
|
Standard_Integer i, j, aNbF, aNbS;
|
||||||
|
Standard_Integer aNbFIN, aNbFOUT, aNbFON, aNbFINTR;
|
||||||
|
TopAbs_State aState;
|
||||||
|
TopTools_ListIteratorOfListOfShape aIt;
|
||||||
|
TopTools_IndexedMapOfShape aMF, aMS;
|
||||||
|
GEOMAlgo_IndexedDataMapOfShapeState aMFS;
|
||||||
|
//
|
||||||
|
// 1. classify the faces
|
||||||
|
GEOMAlgo_ShellSolid::BuildResult();
|
||||||
|
//
|
||||||
|
// 2. fill Shape-State map
|
||||||
|
aIt.Initialize(myLSIN);
|
||||||
|
for (; aIt.More(); aIt.Next()) {
|
||||||
|
const TopoDS_Shape& aF=aIt.Value();
|
||||||
|
aMFS.Add(aF, TopAbs_IN);
|
||||||
|
}
|
||||||
|
aIt.Initialize(myLSOUT);
|
||||||
|
for (; aIt.More(); aIt.Next()) {
|
||||||
|
const TopoDS_Shape& aF=aIt.Value();
|
||||||
|
aMFS.Add(aF, TopAbs_OUT);
|
||||||
|
}
|
||||||
|
aIt.Initialize(myLSON);
|
||||||
|
for (; aIt.More(); aIt.Next()) {
|
||||||
|
const TopoDS_Shape& aF=aIt.Value();
|
||||||
|
aMFS.Add(aF, TopAbs_ON);
|
||||||
|
}
|
||||||
|
myLSIN.Clear();
|
||||||
|
myLSON.Clear();
|
||||||
|
myLSOUT.Clear();
|
||||||
|
//
|
||||||
|
// 3. fill states for solids
|
||||||
|
TopExp::MapShapes(myS2, TopAbs_SOLID, aMS);
|
||||||
|
//
|
||||||
|
aNbS=aMS.Extent();
|
||||||
|
for (i=1; i<=aNbS; ++i) {
|
||||||
|
const TopoDS_Shape& aSolid=aMS(i);
|
||||||
|
//
|
||||||
|
aMF.Clear();
|
||||||
|
TopExp::MapShapes(aSolid, TopAbs_FACE, aMF);
|
||||||
|
//
|
||||||
|
aNbFIN=0;
|
||||||
|
aNbFOUT=0;
|
||||||
|
aNbFON=0;
|
||||||
|
aNbFINTR=0;
|
||||||
|
//
|
||||||
|
aNbF=aMF.Extent();
|
||||||
|
for(j=1; j<aNbF; ++j) {
|
||||||
|
const TopoDS_Shape& aF=aMF(j);
|
||||||
|
//
|
||||||
|
if (!aMFS.Contains(aF)) {// the face is intesected
|
||||||
|
++aNbFINTR;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
aState=aMFS.FindFromKey(aF);
|
||||||
|
switch (aState) {
|
||||||
|
case TopAbs_IN:
|
||||||
|
++aNbFIN;
|
||||||
|
break;
|
||||||
|
case TopAbs_OUT:
|
||||||
|
++aNbFOUT;
|
||||||
|
break;
|
||||||
|
case TopAbs_ON:
|
||||||
|
++aNbFON;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (aNbFIN && aNbFOUT) {
|
||||||
|
++aNbFINTR;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
if (!aNbFINTR) {
|
||||||
|
if (aNbFON==aNbF) {
|
||||||
|
myLSON.Append(aSolid);
|
||||||
|
}
|
||||||
|
else if (aNbFIN) {
|
||||||
|
myLSIN.Append(aSolid);
|
||||||
|
}
|
||||||
|
else if (aNbFOUT) {
|
||||||
|
myLSOUT.Append(aSolid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
101
src/GEOMAlgo/GEOMAlgo_SolidSolid.hxx
Normal file
101
src/GEOMAlgo/GEOMAlgo_SolidSolid.hxx
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
// File generated by CPPExt (Value)
|
||||||
|
//
|
||||||
|
// Copyright (C) 1991 - 2000 by
|
||||||
|
// Matra Datavision SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// Copyright (C) 2001 - 2004 by
|
||||||
|
// Open CASCADE SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of the Open CASCADE Technology software.
|
||||||
|
//
|
||||||
|
// This software may be distributed and/or modified under the terms and
|
||||||
|
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
|
||||||
|
// and appearing in the file LICENSE included in the packaging of this file.
|
||||||
|
//
|
||||||
|
// This software is distributed on an "AS IS" basis, without warranty of any
|
||||||
|
// kind, and Open CASCADE SA hereby disclaims all such warranties,
|
||||||
|
// including without limitation, any warranties of merchantability, fitness
|
||||||
|
// for a particular purpose or non-infringement. Please see the License for
|
||||||
|
// the specific terms and conditions governing rights and limitations under the
|
||||||
|
// License.
|
||||||
|
|
||||||
|
#ifndef _GEOMAlgo_SolidSolid_HeaderFile
|
||||||
|
#define _GEOMAlgo_SolidSolid_HeaderFile
|
||||||
|
|
||||||
|
#ifndef _TopoDS_Shape_HeaderFile
|
||||||
|
#include <TopoDS_Shape.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _GEOMAlgo_ShellSolid_HeaderFile
|
||||||
|
#include <GEOMAlgo_ShellSolid.hxx>
|
||||||
|
#endif
|
||||||
|
class TopoDS_Shape;
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef _Standard_HeaderFile
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Standard_Macro_HeaderFile
|
||||||
|
#include <Standard_Macro.hxx>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class GEOMAlgo_SolidSolid : public GEOMAlgo_ShellSolid {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
void* operator new(size_t,void* anAddress)
|
||||||
|
{
|
||||||
|
return anAddress;
|
||||||
|
}
|
||||||
|
void* operator new(size_t size)
|
||||||
|
{
|
||||||
|
return Standard::Allocate(size);
|
||||||
|
}
|
||||||
|
void operator delete(void *anAddress)
|
||||||
|
{
|
||||||
|
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||||
|
}
|
||||||
|
// Methods PUBLIC
|
||||||
|
//
|
||||||
|
Standard_EXPORT GEOMAlgo_SolidSolid();
|
||||||
|
Standard_EXPORT virtual ~GEOMAlgo_SolidSolid();
|
||||||
|
Standard_EXPORT virtual void Perform() ;
|
||||||
|
Standard_EXPORT void SetShape2(const TopoDS_Shape& aS) ;
|
||||||
|
Standard_EXPORT const TopoDS_Shape& Shape2() const;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Methods PROTECTED
|
||||||
|
//
|
||||||
|
Standard_EXPORT virtual void BuildResult() ;
|
||||||
|
|
||||||
|
|
||||||
|
// Fields PROTECTED
|
||||||
|
//
|
||||||
|
TopoDS_Shape myS2;
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Methods PRIVATE
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
// Fields PRIVATE
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// other Inline functions and methods (like "C++: function call" methods)
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
26
src/GEOMAlgo/GEOMAlgo_SolidSolid.ixx
Normal file
26
src/GEOMAlgo/GEOMAlgo_SolidSolid.ixx
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
// File generated by CPPExt (Value)
|
||||||
|
//
|
||||||
|
// Copyright (C) 1991 - 2000 by
|
||||||
|
// Matra Datavision SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// Copyright (C) 2001 - 2004 by
|
||||||
|
// Open CASCADE SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of the Open CASCADE Technology software.
|
||||||
|
//
|
||||||
|
// This software may be distributed and/or modified under the terms and
|
||||||
|
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
|
||||||
|
// and appearing in the file LICENSE included in the packaging of this file.
|
||||||
|
//
|
||||||
|
// This software is distributed on an "AS IS" basis, without warranty of any
|
||||||
|
// kind, and Open CASCADE SA hereby disclaims all such warranties,
|
||||||
|
// including without limitation, any warranties of merchantability, fitness
|
||||||
|
// for a particular purpose or non-infringement. Please see the License for
|
||||||
|
// the specific terms and conditions governing rights and limitations under the
|
||||||
|
// License.
|
||||||
|
|
||||||
|
#include <GEOMAlgo_SolidSolid.jxx>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
6
src/GEOMAlgo/GEOMAlgo_SolidSolid.jxx
Normal file
6
src/GEOMAlgo/GEOMAlgo_SolidSolid.jxx
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef _TopoDS_Shape_HeaderFile
|
||||||
|
#include <TopoDS_Shape.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _GEOMAlgo_SolidSolid_HeaderFile
|
||||||
|
#include <GEOMAlgo_SolidSolid.hxx>
|
||||||
|
#endif
|
61
src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl
Normal file
61
src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
-- File: GEOMAlgo_SurfaceTools.cdl
|
||||||
|
-- Created: Thu Jan 27 11:03:49 2005
|
||||||
|
-- Author: Peter KURNEV
|
||||||
|
-- <pkv@irinox>
|
||||||
|
---Copyright: Matra Datavision 2005
|
||||||
|
|
||||||
|
|
||||||
|
class SurfaceTools from GEOMAlgo
|
||||||
|
|
||||||
|
---Purpose:
|
||||||
|
|
||||||
|
uses
|
||||||
|
Pnt from gp,
|
||||||
|
Pln from gp,
|
||||||
|
Cylinder from gp,
|
||||||
|
Sphere from gp,
|
||||||
|
Surface from Geom,
|
||||||
|
State from TopAbs,
|
||||||
|
State from GEOMAlgo
|
||||||
|
|
||||||
|
--raises
|
||||||
|
|
||||||
|
is
|
||||||
|
IsAnalytic(myclass;
|
||||||
|
aS:Surface from Geom)
|
||||||
|
returns Boolean from Standard;
|
||||||
|
|
||||||
|
IsConformState(myclass;
|
||||||
|
aST1:State from TopAbs;
|
||||||
|
aST2:State from GEOMAlgo)
|
||||||
|
returns Boolean from Standard;
|
||||||
|
|
||||||
|
GetState(myclass;
|
||||||
|
aP:Pnt from gp;
|
||||||
|
aS:Surface from Geom;
|
||||||
|
aTol:Real from Standard;
|
||||||
|
aSt:out State from TopAbs)
|
||||||
|
returns Integer from Standard;
|
||||||
|
|
||||||
|
Distance(myclass;
|
||||||
|
aP:Pnt from gp;
|
||||||
|
aPln:Pln from gp)
|
||||||
|
returns Real from Standard;
|
||||||
|
|
||||||
|
Distance(myclass;
|
||||||
|
aP:Pnt from gp;
|
||||||
|
aCyl:Cylinder from gp)
|
||||||
|
returns Real from Standard;
|
||||||
|
|
||||||
|
Distance(myclass;
|
||||||
|
aP:Pnt from gp;
|
||||||
|
aSph:Sphere from gp)
|
||||||
|
returns Real from Standard;
|
||||||
|
|
||||||
|
ReverseState(myclass;
|
||||||
|
aSt: State from TopAbs)
|
||||||
|
returns State from TopAbs;
|
||||||
|
|
||||||
|
--fields
|
||||||
|
|
||||||
|
end SurfaceTools;
|
204
src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx
Normal file
204
src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
// File: GEOMAlgo_SurfaceTools.cxx
|
||||||
|
// Created: Thu Jan 27 11:05:16 2005
|
||||||
|
// Author: Peter KURNEV
|
||||||
|
// <pkv@irinox>
|
||||||
|
|
||||||
|
|
||||||
|
#include <GEOMAlgo_SurfaceTools.ixx>
|
||||||
|
|
||||||
|
#include <gp_Pln.hxx>
|
||||||
|
#include <gp_Cylinder.hxx>
|
||||||
|
#include <gp_Sphere.hxx>
|
||||||
|
#include <gp_Ax1.hxx>
|
||||||
|
#include <gp_Lin.hxx>
|
||||||
|
#include <gp_Ax3.hxx>
|
||||||
|
#include <gp_Dir.hxx>
|
||||||
|
|
||||||
|
#include <GeomAbs_SurfaceType.hxx>
|
||||||
|
#include <GeomAdaptor_Surface.hxx>
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetState
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Integer GEOMAlgo_SurfaceTools::GetState(const gp_Pnt& aP,
|
||||||
|
const Handle(Geom_Surface)& aSurf,
|
||||||
|
const Standard_Real aTol,
|
||||||
|
TopAbs_State& aState)
|
||||||
|
{
|
||||||
|
Standard_Integer iErr;
|
||||||
|
Standard_Real aDp, aR;
|
||||||
|
GeomAbs_SurfaceType aType;
|
||||||
|
GeomAdaptor_Surface aGAS;
|
||||||
|
gp_Sphere aSph;
|
||||||
|
gp_Cylinder aCyl;
|
||||||
|
gp_Pln aPln;
|
||||||
|
//
|
||||||
|
iErr=0;
|
||||||
|
aState=TopAbs_UNKNOWN;
|
||||||
|
aGAS.Load(aSurf);
|
||||||
|
//
|
||||||
|
aType=aGAS.GetType();
|
||||||
|
switch (aType) {
|
||||||
|
case GeomAbs_Plane:
|
||||||
|
aPln=aGAS.Plane();
|
||||||
|
aR=0.;
|
||||||
|
aDp=GEOMAlgo_SurfaceTools::Distance(aP, aPln);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GeomAbs_Cylinder:
|
||||||
|
aCyl=aGAS.Cylinder();
|
||||||
|
aR=aCyl.Radius();
|
||||||
|
aDp=GEOMAlgo_SurfaceTools::Distance(aP, aCyl);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GeomAbs_Sphere:
|
||||||
|
aSph=aGAS.Sphere();
|
||||||
|
aR=aSph.Radius();
|
||||||
|
aDp=GEOMAlgo_SurfaceTools::Distance(aP, aSph);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
iErr=1; // unprocessed surface type
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
if (!iErr) {
|
||||||
|
aState=TopAbs_ON;
|
||||||
|
if (aDp>aR+aTol) {
|
||||||
|
aState=TopAbs_OUT;
|
||||||
|
}
|
||||||
|
else if (aDp<aR-aTol) {
|
||||||
|
aState=TopAbs_IN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
return iErr;
|
||||||
|
}
|
||||||
|
//=======================================================================
|
||||||
|
//function : ReverseState
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
TopAbs_State GEOMAlgo_SurfaceTools::ReverseState(const TopAbs_State aState)
|
||||||
|
{
|
||||||
|
TopAbs_State aRSt=aState;
|
||||||
|
//
|
||||||
|
switch (aState) {
|
||||||
|
case TopAbs_IN:
|
||||||
|
aRSt=TopAbs_OUT;
|
||||||
|
break;
|
||||||
|
case TopAbs_OUT:
|
||||||
|
aRSt=TopAbs_IN;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
return aRSt;
|
||||||
|
}
|
||||||
|
//=======================================================================
|
||||||
|
//function : Distance
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
|
||||||
|
const gp_Sphere& aSph)
|
||||||
|
{
|
||||||
|
Standard_Real aD, aR;
|
||||||
|
//
|
||||||
|
aR=aSph.Radius();
|
||||||
|
const gp_Pnt& aLoc=aSph.Location();
|
||||||
|
aD=aLoc.Distance(aP);
|
||||||
|
//
|
||||||
|
return aD;
|
||||||
|
}
|
||||||
|
//=======================================================================
|
||||||
|
//function : Distance
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
|
||||||
|
const gp_Cylinder& aCyl)
|
||||||
|
{
|
||||||
|
Standard_Real aD, aR;
|
||||||
|
//
|
||||||
|
aR=aCyl.Radius();
|
||||||
|
const gp_Ax1& aAxis=aCyl.Axis();
|
||||||
|
gp_Lin aLin(aAxis);
|
||||||
|
aD=aLin.Distance(aP);
|
||||||
|
//
|
||||||
|
return aD;
|
||||||
|
}
|
||||||
|
//=======================================================================
|
||||||
|
//function : Distance
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP,
|
||||||
|
const gp_Pln& aPL)
|
||||||
|
{
|
||||||
|
Standard_Real aD;
|
||||||
|
//
|
||||||
|
const gp_Ax3& aPos=aPL.Position();
|
||||||
|
const gp_Pnt& aLoc=aPos.Location ();
|
||||||
|
const gp_Dir& aDir=aPos.Direction();
|
||||||
|
//
|
||||||
|
aD= (aDir.X() * (aP.X() - aLoc.X()) +
|
||||||
|
aDir.Y() * (aP.Y() - aLoc.Y()) +
|
||||||
|
aDir.Z() * (aP.Z() - aLoc.Z()));
|
||||||
|
return aD;
|
||||||
|
}
|
||||||
|
//=======================================================================
|
||||||
|
//function : IsAnalytic
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean GEOMAlgo_SurfaceTools::IsAnalytic(const Handle(Geom_Surface)& aSurf)
|
||||||
|
{
|
||||||
|
Standard_Boolean bRet;
|
||||||
|
GeomAbs_SurfaceType aType;
|
||||||
|
GeomAdaptor_Surface aGAS;
|
||||||
|
//
|
||||||
|
aGAS.Load(aSurf);
|
||||||
|
aType=aGAS.GetType();
|
||||||
|
bRet=(aType==GeomAbs_Plane ||
|
||||||
|
aType==GeomAbs_Cylinder ||
|
||||||
|
aType==GeomAbs_Sphere);
|
||||||
|
return bRet;
|
||||||
|
}
|
||||||
|
//=======================================================================
|
||||||
|
//function : IsConformState
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean GEOMAlgo_SurfaceTools::IsConformState(const TopAbs_State aST1,
|
||||||
|
const GEOMAlgo_State aST2)
|
||||||
|
{
|
||||||
|
Standard_Boolean bRet=Standard_False;
|
||||||
|
//
|
||||||
|
switch (aST2) {
|
||||||
|
case GEOMAlgo_ST_IN:
|
||||||
|
if (aST1==TopAbs_IN) {
|
||||||
|
bRet=!bRet;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GEOMAlgo_ST_OUT:
|
||||||
|
if (aST1==TopAbs_OUT) {
|
||||||
|
bRet=!bRet;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GEOMAlgo_ST_ON:
|
||||||
|
if (aST1==TopAbs_ON) {
|
||||||
|
bRet=!bRet;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GEOMAlgo_ST_ONIN:
|
||||||
|
if (aST1==TopAbs_ON || aST1==TopAbs_IN) {
|
||||||
|
bRet=!bRet;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GEOMAlgo_ST_ONOUT:
|
||||||
|
if (aST1==TopAbs_ON || aST1==TopAbs_OUT) {
|
||||||
|
bRet=!bRet;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return bRet;
|
||||||
|
}
|
117
src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx
Normal file
117
src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
// File generated by CPPExt (Value)
|
||||||
|
//
|
||||||
|
// Copyright (C) 1991 - 2000 by
|
||||||
|
// Matra Datavision SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// Copyright (C) 2001 - 2004 by
|
||||||
|
// Open CASCADE SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of the Open CASCADE Technology software.
|
||||||
|
//
|
||||||
|
// This software may be distributed and/or modified under the terms and
|
||||||
|
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
|
||||||
|
// and appearing in the file LICENSE included in the packaging of this file.
|
||||||
|
//
|
||||||
|
// This software is distributed on an "AS IS" basis, without warranty of any
|
||||||
|
// kind, and Open CASCADE SA hereby disclaims all such warranties,
|
||||||
|
// including without limitation, any warranties of merchantability, fitness
|
||||||
|
// for a particular purpose or non-infringement. Please see the License for
|
||||||
|
// the specific terms and conditions governing rights and limitations under the
|
||||||
|
// License.
|
||||||
|
|
||||||
|
#ifndef _GEOMAlgo_SurfaceTools_HeaderFile
|
||||||
|
#define _GEOMAlgo_SurfaceTools_HeaderFile
|
||||||
|
|
||||||
|
#ifndef _Standard_Boolean_HeaderFile
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Handle_Geom_Surface_HeaderFile
|
||||||
|
#include <Handle_Geom_Surface.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _TopAbs_State_HeaderFile
|
||||||
|
#include <TopAbs_State.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _GEOMAlgo_State_HeaderFile
|
||||||
|
#include <GEOMAlgo_State.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Standard_Integer_HeaderFile
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Standard_Real_HeaderFile
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
|
#endif
|
||||||
|
class Geom_Surface;
|
||||||
|
class gp_Pnt;
|
||||||
|
class gp_Pln;
|
||||||
|
class gp_Cylinder;
|
||||||
|
class gp_Sphere;
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef _Standard_HeaderFile
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Standard_Macro_HeaderFile
|
||||||
|
#include <Standard_Macro.hxx>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class GEOMAlgo_SurfaceTools {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
void* operator new(size_t,void* anAddress)
|
||||||
|
{
|
||||||
|
return anAddress;
|
||||||
|
}
|
||||||
|
void* operator new(size_t size)
|
||||||
|
{
|
||||||
|
return Standard::Allocate(size);
|
||||||
|
}
|
||||||
|
void operator delete(void *anAddress)
|
||||||
|
{
|
||||||
|
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||||
|
}
|
||||||
|
// Methods PUBLIC
|
||||||
|
//
|
||||||
|
Standard_EXPORT static Standard_Boolean IsAnalytic(const Handle(Geom_Surface)& aS) ;
|
||||||
|
Standard_EXPORT static Standard_Boolean IsConformState(const TopAbs_State aST1,const GEOMAlgo_State aST2) ;
|
||||||
|
Standard_EXPORT static Standard_Integer GetState(const gp_Pnt& aP,const Handle(Geom_Surface)& aS,const Standard_Real aTol,TopAbs_State& aSt) ;
|
||||||
|
Standard_EXPORT static Standard_Real Distance(const gp_Pnt& aP,const gp_Pln& aPln) ;
|
||||||
|
Standard_EXPORT static Standard_Real Distance(const gp_Pnt& aP,const gp_Cylinder& aCyl) ;
|
||||||
|
Standard_EXPORT static Standard_Real Distance(const gp_Pnt& aP,const gp_Sphere& aSph) ;
|
||||||
|
Standard_EXPORT static TopAbs_State ReverseState(const TopAbs_State aSt) ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Methods PROTECTED
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
// Fields PROTECTED
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Methods PRIVATE
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
// Fields PRIVATE
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// other Inline functions and methods (like "C++: function call" methods)
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
26
src/GEOMAlgo/GEOMAlgo_SurfaceTools.ixx
Normal file
26
src/GEOMAlgo/GEOMAlgo_SurfaceTools.ixx
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
// File generated by CPPExt (Value)
|
||||||
|
//
|
||||||
|
// Copyright (C) 1991 - 2000 by
|
||||||
|
// Matra Datavision SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// Copyright (C) 2001 - 2004 by
|
||||||
|
// Open CASCADE SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of the Open CASCADE Technology software.
|
||||||
|
//
|
||||||
|
// This software may be distributed and/or modified under the terms and
|
||||||
|
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
|
||||||
|
// and appearing in the file LICENSE included in the packaging of this file.
|
||||||
|
//
|
||||||
|
// This software is distributed on an "AS IS" basis, without warranty of any
|
||||||
|
// kind, and Open CASCADE SA hereby disclaims all such warranties,
|
||||||
|
// including without limitation, any warranties of merchantability, fitness
|
||||||
|
// for a particular purpose or non-infringement. Please see the License for
|
||||||
|
// the specific terms and conditions governing rights and limitations under the
|
||||||
|
// License.
|
||||||
|
|
||||||
|
#include <GEOMAlgo_SurfaceTools.jxx>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
18
src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx
Normal file
18
src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef _Geom_Surface_HeaderFile
|
||||||
|
#include <Geom_Surface.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _gp_Pnt_HeaderFile
|
||||||
|
#include <gp_Pnt.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _gp_Pln_HeaderFile
|
||||||
|
#include <gp_Pln.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _gp_Cylinder_HeaderFile
|
||||||
|
#include <gp_Cylinder.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _gp_Sphere_HeaderFile
|
||||||
|
#include <gp_Sphere.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _GEOMAlgo_SurfaceTools_HeaderFile
|
||||||
|
#include <GEOMAlgo_SurfaceTools.hxx>
|
||||||
|
#endif
|
@ -12,8 +12,9 @@ class Tools from GEOMAlgo
|
|||||||
uses
|
uses
|
||||||
Pnt from gp,
|
Pnt from gp,
|
||||||
Surface from Geom,
|
Surface from Geom,
|
||||||
Edge from TopoDS,
|
ShapeEnum from TopAbs,
|
||||||
Face from TopoDS,
|
Edge from TopoDS,
|
||||||
|
Face from TopoDS,
|
||||||
Shape from TopoDS,
|
Shape from TopoDS,
|
||||||
ListOfShape from TopTools,
|
ListOfShape from TopTools,
|
||||||
IndexedDataMapOfShapeListOfShape from TopTools,
|
IndexedDataMapOfShapeListOfShape from TopTools,
|
||||||
@ -23,6 +24,10 @@ uses
|
|||||||
--raises
|
--raises
|
||||||
|
|
||||||
is
|
is
|
||||||
|
IsCompositeShape(myclass;
|
||||||
|
aS :Shape from TopoDS)
|
||||||
|
returns Boolean from Standard;
|
||||||
|
|
||||||
RefineSDShapes(myclass;
|
RefineSDShapes(myclass;
|
||||||
aMSD:out IndexedDataMapOfPassKeyListOfShape from GEOMAlgo;
|
aMSD:out IndexedDataMapOfPassKeyListOfShape from GEOMAlgo;
|
||||||
aTol:Real from Standard;
|
aTol:Real from Standard;
|
||||||
@ -83,6 +88,7 @@ is
|
|||||||
IsUPeriodic(myclass;
|
IsUPeriodic(myclass;
|
||||||
aS:Surface from Geom)
|
aS:Surface from Geom)
|
||||||
returns Boolean from Standard;
|
returns Boolean from Standard;
|
||||||
|
|
||||||
--fields
|
--fields
|
||||||
|
|
||||||
end Tools;
|
end Tools;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopoDS_Edge.hxx>
|
#include <TopoDS_Edge.hxx>
|
||||||
|
#include <TopoDS_Iterator.hxx>
|
||||||
|
|
||||||
#include <TopTools_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||||
@ -34,7 +35,55 @@
|
|||||||
|
|
||||||
#include <GEOMAlgo_PassKey.hxx>
|
#include <GEOMAlgo_PassKey.hxx>
|
||||||
#include <GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx>
|
#include <GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx>
|
||||||
//
|
|
||||||
|
static
|
||||||
|
void GetCount(const TopoDS_Shape& aS,
|
||||||
|
Standard_Integer& iCnt);
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : IsCompositeShape
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean GEOMAlgo_Tools::IsCompositeShape(const TopoDS_Shape& aS)
|
||||||
|
{
|
||||||
|
Standard_Boolean bRet;
|
||||||
|
Standard_Integer iCnt;
|
||||||
|
TopoDS_Iterator aIt;
|
||||||
|
//
|
||||||
|
iCnt=0;
|
||||||
|
GetCount(aS, iCnt);
|
||||||
|
bRet=(iCnt>1);
|
||||||
|
//
|
||||||
|
return bRet;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetCount
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void GetCount(const TopoDS_Shape& aS,
|
||||||
|
Standard_Integer& iCnt)
|
||||||
|
{
|
||||||
|
TopoDS_Iterator aIt;
|
||||||
|
TopAbs_ShapeEnum aTS;
|
||||||
|
//
|
||||||
|
aTS=aS.ShapeType();
|
||||||
|
//
|
||||||
|
if (aTS==TopAbs_SHAPE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (aTS!=TopAbs_COMPOUND) {
|
||||||
|
++iCnt;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
aIt.Initialize(aS);
|
||||||
|
for (; aIt.More(); aIt.Next()) {
|
||||||
|
const TopoDS_Shape& aSx=aIt.Value();
|
||||||
|
GetCount(aSx, iCnt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : RefineSDShapes
|
//function : RefineSDShapes
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -22,23 +22,23 @@
|
|||||||
#ifndef _GEOMAlgo_Tools_HeaderFile
|
#ifndef _GEOMAlgo_Tools_HeaderFile
|
||||||
#define _GEOMAlgo_Tools_HeaderFile
|
#define _GEOMAlgo_Tools_HeaderFile
|
||||||
|
|
||||||
|
#ifndef _Standard_Boolean_HeaderFile
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#endif
|
||||||
#ifndef _Standard_Integer_HeaderFile
|
#ifndef _Standard_Integer_HeaderFile
|
||||||
#include <Standard_Integer.hxx>
|
#include <Standard_Integer.hxx>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _Standard_Real_HeaderFile
|
#ifndef _Standard_Real_HeaderFile
|
||||||
#include <Standard_Real.hxx>
|
#include <Standard_Real.hxx>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _Standard_Boolean_HeaderFile
|
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
#endif
|
|
||||||
#ifndef _Handle_Geom_Surface_HeaderFile
|
#ifndef _Handle_Geom_Surface_HeaderFile
|
||||||
#include <Handle_Geom_Surface.hxx>
|
#include <Handle_Geom_Surface.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
class TopoDS_Shape;
|
||||||
class GEOMAlgo_IndexedDataMapOfPassKeyListOfShape;
|
class GEOMAlgo_IndexedDataMapOfPassKeyListOfShape;
|
||||||
class IntTools_Context;
|
class IntTools_Context;
|
||||||
class TopTools_ListOfShape;
|
class TopTools_ListOfShape;
|
||||||
class TopTools_IndexedDataMapOfShapeListOfShape;
|
class TopTools_IndexedDataMapOfShapeListOfShape;
|
||||||
class TopoDS_Shape;
|
|
||||||
class gp_Pnt;
|
class gp_Pnt;
|
||||||
class TopoDS_Edge;
|
class TopoDS_Edge;
|
||||||
class TopoDS_Face;
|
class TopoDS_Face;
|
||||||
@ -70,6 +70,7 @@ public:
|
|||||||
}
|
}
|
||||||
// Methods PUBLIC
|
// Methods PUBLIC
|
||||||
//
|
//
|
||||||
|
Standard_EXPORT static Standard_Boolean IsCompositeShape(const TopoDS_Shape& aS) ;
|
||||||
Standard_EXPORT static Standard_Integer RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& aMSD,const Standard_Real aTol,IntTools_Context& aCtx) ;
|
Standard_EXPORT static Standard_Integer RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& aMSD,const Standard_Real aTol,IntTools_Context& aCtx) ;
|
||||||
Standard_EXPORT static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,const Standard_Real aTol,TopTools_IndexedDataMapOfShapeListOfShape& aMEE,IntTools_Context& aCtx) ;
|
Standard_EXPORT static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,const Standard_Real aTol,TopTools_IndexedDataMapOfShapeListOfShape& aMEE,IntTools_Context& aCtx) ;
|
||||||
Standard_EXPORT static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1,const TopTools_ListOfShape& aLE,const Standard_Real aTol,TopTools_ListOfShape& aLESD,IntTools_Context& aCtx) ;
|
Standard_EXPORT static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1,const TopTools_ListOfShape& aLE,const Standard_Real aTol,TopTools_ListOfShape& aLESD,IntTools_Context& aCtx) ;
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#ifndef _TopoDS_Shape_HeaderFile
|
||||||
|
#include <TopoDS_Shape.hxx>
|
||||||
|
#endif
|
||||||
#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_HeaderFile
|
#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_HeaderFile
|
||||||
#include <GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx>
|
#include <GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx>
|
||||||
#endif
|
#endif
|
||||||
@ -10,9 +13,6 @@
|
|||||||
#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile
|
#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile
|
||||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _TopoDS_Shape_HeaderFile
|
|
||||||
#include <TopoDS_Shape.hxx>
|
|
||||||
#endif
|
|
||||||
#ifndef _gp_Pnt_HeaderFile
|
#ifndef _gp_Pnt_HeaderFile
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
@ -0,0 +1,91 @@
|
|||||||
|
// File generated by CPPExt (Transient)
|
||||||
|
//
|
||||||
|
// Copyright (C) 1991 - 2000 by
|
||||||
|
// Matra Datavision SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// Copyright (C) 2001 - 2004 by
|
||||||
|
// Open CASCADE SA. All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of the Open CASCADE Technology software.
|
||||||
|
//
|
||||||
|
// This software may be distributed and/or modified under the terms and
|
||||||
|
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
|
||||||
|
// and appearing in the file LICENSE included in the packaging of this file.
|
||||||
|
//
|
||||||
|
// This software is distributed on an "AS IS" basis, without warranty of any
|
||||||
|
// kind, and Open CASCADE SA hereby disclaims all such warranties,
|
||||||
|
// including without limitation, any warranties of merchantability, fitness
|
||||||
|
// for a particular purpose or non-infringement. Please see the License for
|
||||||
|
// the specific terms and conditions governing rights and limitations under the
|
||||||
|
// License.
|
||||||
|
|
||||||
|
#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile
|
||||||
|
#define _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile
|
||||||
|
|
||||||
|
#ifndef _Standard_Macro_HeaderFile
|
||||||
|
#include <Standard_Macro.hxx>
|
||||||
|
#endif
|
||||||
|
#ifndef _Standard_HeaderFile
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _Handle_TCollection_MapNode_HeaderFile
|
||||||
|
#include <Handle_TCollection_MapNode.hxx>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class Standard_Transient;
|
||||||
|
class Handle_Standard_Type;
|
||||||
|
class Handle(TCollection_MapNode);
|
||||||
|
class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState;
|
||||||
|
Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState);
|
||||||
|
|
||||||
|
class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) : public Handle(TCollection_MapNode) {
|
||||||
|
public:
|
||||||
|
void* operator new(size_t,void* anAddress)
|
||||||
|
{
|
||||||
|
return anAddress;
|
||||||
|
}
|
||||||
|
void* operator new(size_t size)
|
||||||
|
{
|
||||||
|
return Standard::Allocate(size);
|
||||||
|
}
|
||||||
|
void operator delete(void *anAddress)
|
||||||
|
{
|
||||||
|
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
||||||
|
}
|
||||||
|
Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)():Handle(TCollection_MapNode)() {}
|
||||||
|
Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)& aHandle) : Handle(TCollection_MapNode)(aHandle)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)& operator=(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)& aHandle)
|
||||||
|
{
|
||||||
|
Assign(aHandle.Access());
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)& operator=(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState* anItem)
|
||||||
|
{
|
||||||
|
Assign((Standard_Transient *)anItem);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState* operator->()
|
||||||
|
{
|
||||||
|
return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState *)ControlAccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState* operator->() const
|
||||||
|
{
|
||||||
|
return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState *)ControlAccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)();
|
||||||
|
|
||||||
|
Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) DownCast(const Handle(Standard_Transient)& AnObject);
|
||||||
|
};
|
||||||
|
#endif
|
@ -64,7 +64,11 @@ LIB_SRC = \
|
|||||||
GEOMAlgo_ShapeSolid.cxx \
|
GEOMAlgo_ShapeSolid.cxx \
|
||||||
GEOMAlgo_ShellSolid.cxx \
|
GEOMAlgo_ShellSolid.cxx \
|
||||||
GEOMAlgo_VertexSolid.cxx \
|
GEOMAlgo_VertexSolid.cxx \
|
||||||
GEOMAlgo_WireSolid.cxx
|
GEOMAlgo_WireSolid.cxx \
|
||||||
|
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx \
|
||||||
|
GEOMAlgo_IndexedDataMapOfShapeState_0.cxx \
|
||||||
|
GEOMAlgo_SolidSolid.cxx \
|
||||||
|
GEOMAlgo_SurfaceTools.cxx
|
||||||
|
|
||||||
LIB_CLIENT_IDL =
|
LIB_CLIENT_IDL =
|
||||||
LIB_SERVER_IDL =
|
LIB_SERVER_IDL =
|
||||||
@ -84,7 +88,9 @@ EXPORT_HEADERS = \
|
|||||||
BlockFix_CheckTool.hxx \
|
BlockFix_CheckTool.hxx \
|
||||||
Handle_BlockFix_BlockFixAPI.hxx \
|
Handle_BlockFix_BlockFixAPI.hxx \
|
||||||
GEOMAlgo_State.hxx \
|
GEOMAlgo_State.hxx \
|
||||||
GEOMAlgo_FinderShapeOn.hxx
|
GEOMAlgo_FinderShapeOn.hxx \
|
||||||
|
GEOMAlgo_IndexedDataMapOfShapeState.hxx \
|
||||||
|
Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx
|
||||||
|
|
||||||
# idl files
|
# idl files
|
||||||
EXPORT_IDLS=
|
EXPORT_IDLS=
|
||||||
|
Loading…
Reference in New Issue
Block a user