PAL7508: Development of new block functionalities. Implement GetShapesOn<xxx>() functions for case of SOLID. Done by PKV.

This commit is contained in:
jfa 2005-02-01 11:12:57 +00:00
parent 6a52e30ef9
commit d85baed107
28 changed files with 1679 additions and 248 deletions

View File

@ -46,6 +46,7 @@ is
class CoupleOfShapes;
class PassKey;
class PassKeyMapHasher;
class SurfaceTools;
class Tools;
--
-- finder on
@ -53,8 +54,10 @@ is
class WireSolid;
class ShellSolid;
class VertexSolid;
class SolidSolid;
class FinderShapeOn;
--
-- instantiations
class IndexedDataMapOfPassKeyListOfShape
instantiates IndexedDataMap from TCollection (PassKey from GEOMAlgo,
ListOfShape from TopTools,
@ -73,4 +76,9 @@ is
instantiates List from TCollection (CoupleOfShapes from GEOMAlgo);
class IndexedDataMapOfShapeState
instantiates IndexedDataMap from TCollection (Shape from TopoDS,
State from TopAbs,
ShapeMapHasher from TopTools);
end GEOMAlgo;

View File

@ -16,7 +16,8 @@ uses
ListOfShape from TopTools,
DataMapOfShapeShape from TopTools,
Shape from TopoDS,
State from GEOMAlgo
State from GEOMAlgo,
IndexedDataMapOfShapeState from GEOMAlgo
--raises
@ -57,12 +58,22 @@ is
CheckData(me:out)
is redefined protected;
MakeArguments(me:out)
MakeArgument1(me:out)
is protected;
MakeArgument2(me:out)
is protected;
Find(me:out)
is protected;
Find(me:out;
aS:Shape from TopoDS)
is protected;
FindVertices(me:out)
is protected;
CopySource(myclass;
aS :Shape from TopoDS;
aImages : out DataMapOfShapeShape from TopTools;
@ -79,5 +90,7 @@ fields
myArg2 : Shape from TopoDS is protected;
myLS : ListOfShape from TopTools is protected;
myImages : DataMapOfShapeShape from TopTools is protected;
myMSS : IndexedDataMapOfShapeState from GEOMAlgo is protected;
myIsAnalytic : Boolean from Standard is protected;
end FinderShapeOn;

View File

@ -6,7 +6,10 @@
#include <GEOMAlgo_FinderShapeOn.ixx>
#include <gp_Pnt.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopAbs_Orientation.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
@ -16,7 +19,6 @@
#include <TopoDS_Solid.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
@ -24,6 +26,7 @@
#include <TopTools_DataMapOfShapeShape.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
@ -37,7 +40,9 @@
#include <GEOMAlgo_ShellSolid.hxx>
#include <GEOMAlgo_VertexSolid.hxx>
#include <GEOMAlgo_ShapeSolid.hxx>
#include <GEOMAlgo_SolidSolid.hxx>
#include <GEOMAlgo_SurfaceTools.hxx>
#include <GEOMAlgo_Tools.hxx>
//=======================================================================
//function : GEOMAlgo_FinderShapeOn
@ -49,7 +54,8 @@ GEOMAlgo_FinderShapeOn::GEOMAlgo_FinderShapeOn()
{
myTolerance=0.0001;
myShapeType=TopAbs_VERTEX;
myState=GEOMAlgo_ST_UNKNOWN;
myState=GEOMAlgo_ST_UNKNOWN;
myIsAnalytic=Standard_True;
}
//=======================================================================
//function : ~
@ -112,6 +118,24 @@ GEOMAlgo_State GEOMAlgo_FinderShapeOn::State() 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;
}
//=======================================================================
@ -123,6 +147,7 @@ void GEOMAlgo_FinderShapeOn::Perform()
myErrorStatus=0;
myWarningStatus=0;
myLS.Clear();
myMSS.Clear();
//
if (!myResult.IsNull()){
myResult.Nullify();
@ -133,34 +158,122 @@ void GEOMAlgo_FinderShapeOn::Perform()
return;
}
//
MakeArguments();
if(myErrorStatus || myWarningStatus) {
return;
}
myIsAnalytic=GEOMAlgo_SurfaceTools::IsAnalytic(mySurface);
//
Find();
MakeArgument1();
if(myErrorStatus) {
return;
}
//
if (myIsAnalytic && myShapeType==TopAbs_VERTEX) {
FindVertices();
return;
}
//
MakeArgument2();
if(myErrorStatus) {
return;
}
//
Find();
if(myErrorStatus || myWarningStatus) {
return;
}
//
}
//=======================================================================
//function : FindVertices
//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn::FindVertices()
{
Standard_Integer i, aNb, iErr;
TopAbs_State aSt;
TopAbs_Orientation aOr;
gp_Pnt aP;
TopTools_IndexedMapOfShape aM;
//
TopExp::MapShapes(myArg1, TopAbs_FACE, aM);
const TopoDS_Face& aF=TopoDS::Face(aM(1));
aOr=aF.Orientation();
//
aM.Clear();
TopExp::MapShapes(myShape, myShapeType, aM);
aNb=aM.Extent();
if (!aNb) {
myWarningStatus=10; // No found 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
//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn::Find()
{
Standard_Integer i, aNb;
Standard_Boolean bICS;
TopTools_IndexedMapOfShape aM;
//
TopExp::MapShapes(myArg2, myShapeType, aM);
//
aNb=aM.Extent();
if (!aNb) {
myWarningStatus=10; // No found 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;
//
Standard_Boolean bIsDone;
Standard_Integer iErr;
Standard_Integer i, iErr;
TopAbs_State aSts[]={TopAbs_IN, TopAbs_OUT, TopAbs_ON};
TopTools_ListIteratorOfListOfShape aIt;
BRep_Builder aBB;
BOPTools_DSFiller aDF;
GEOMAlgo_ShapeSolid* pSS;
//
// 1. Prepare DSFiller
aDF.SetShapes (myArg1, myArg2);
aDF.SetShapes (myArg1, aS);
bIsDone=aDF.IsDone();
if (!bIsDone) {
myErrorStatus=30; // wrong args are used for DSFiller
@ -174,16 +287,31 @@ void GEOMAlgo_FinderShapeOn::Find()
}
//
// 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=new GEOMAlgo_VertexSolid;
}
else if (myShapeType==TopAbs_EDGE) {
pSS=new GEOMAlgo_WireSolid;
}
else if (myShapeType==TopAbs_FACE) {
pSS=new GEOMAlgo_ShellSolid;
pSS=NULL;
//
switch (myShapeType) {
case TopAbs_VERTEX:
pSS=&aVXS;
break;
case TopAbs_EDGE:
pSS=&aWRS;
break;
case TopAbs_FACE:
pSS=&aSHS;
break;
case TopAbs_SOLID:
aSLS.SetShape2(myArg2);
pSS=&aSLS;
break;
default:
myErrorStatus=12; // unallowed subshape type
return;
}
//
pSS->SetFiller(aDF);
@ -191,97 +319,111 @@ void GEOMAlgo_FinderShapeOn::Find()
iErr=pSS->ErrorStatus();
if (iErr) {
myErrorStatus=32; // builder ShapeSolid failed
delete pSS;
return;
}
//
const TopTools_ListOfShape& aLS=pSS->Shapes(myState);
//
aIt.Initialize(aLS);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSImage=aIt.Value();
if (myImages.IsBound(aSImage)) {
const TopoDS_Shape& aS=myImages.Find(aSImage);
myLS.Append(aS);
}
else {
myErrorStatus=33;// can not find original shape
return;
for (i=0; i<3; ++i) {
const TopTools_ListOfShape& aLS=pSS->Shapes(aSts[i]);
aIt.Initialize(aLS);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSImage=aIt.Value();
if (myImages.IsBound(aSImage)) {
const TopoDS_Shape& aSx=myImages.Find(aSImage);
myMSS.Add(aSx, aSts[i]);
}
else {
myErrorStatus=33;// can not find original shape
return;
}
}
}
//
delete pSS;
}
//=======================================================================
//function : MakeArguments
//function : MakeArgument1
//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn::MakeArguments()
void GEOMAlgo_FinderShapeOn::MakeArgument1()
{
myErrorStatus=0;
//
Standard_Integer i, aNb;
TopAbs_ShapeEnum aType;
BRepLib_FaceError aFErr;
BRepLib_MakeFace aMF;
TopTools_IndexedMapOfShape aM;
BRep_Builder aBB;
TopoDS_Compound aCmp;
TopoDS_Face aFace;
TopoDS_Shell aSh;
TopoDS_Solid aSd;
TopoDS_Shape aSC;
TopTools_DataMapOfShapeShape aOriginals;
TopExp_Explorer aExp;
//
// Argument 1
aMF.Init(mySurface, Standard_True);
aFErr=aMF.Error();
if (aFErr!=BRepLib_FaceDone) {
myErrorStatus=20; // can not build the face
return;
if (!myIsAnalytic) {
aMF.Init(mySurface, Standard_True);
aFErr=aMF.Error();
if (aFErr!=BRepLib_FaceDone) {
myErrorStatus=20; // can not build the face
return;
}
//
const TopoDS_Shape& aF=aMF.Shape();
aFace=TopoDS::Face(aF);
//
// update tolerances
aM.Add(aF);
TopExp::MapShapes(aF, TopAbs_VERTEX, aM);
TopExp::MapShapes(aF, TopAbs_EDGE, aM);
aNb=aM.Extent();
for (i=1; i<=aNb; ++i) {
const TopoDS_Shape& aS=aM(i);
aType=aS.ShapeType();
switch (aType) {
case TopAbs_VERTEX: {
const TopoDS_Vertex& aVx=TopoDS::Vertex(aS);
aBB.UpdateVertex(aVx, myTolerance);
}
break;
case TopAbs_EDGE: {
const TopoDS_Edge& aEx=TopoDS::Edge(aS);
aBB.UpdateEdge(aEx, myTolerance);
}
break;
case TopAbs_FACE: {
const TopoDS_Face& aFx=TopoDS::Face(aS);
aBB.UpdateFace(aFx, myTolerance);
}
break;
default:
break;
}
}
} //
else {
aBB.MakeFace(aFace, mySurface, myTolerance);
}
//
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
aBB.MakeShell(aSh);
aBB.Add(aSh, aFace);
aBB.MakeSolid(aSd);
aBB.Add(aSd, aSh);
myArg1=aSd;
}
//=======================================================================
//function : MakeArgument2
//purpose :
//=======================================================================
void GEOMAlgo_FinderShapeOn::MakeArgument2()
{
myErrorStatus=0;
//
// Argument 2
TopoDS_Shape aSC;
TopTools_DataMapOfShapeShape aOriginals;
//
myImages.Clear();
//
GEOMAlgo_FinderShapeOn::CopySource(myShape, myImages, aOriginals, aSC);
//
TopExp::MapShapes(aSC, myShapeType, aM);
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;
myArg2=aSC;
}
//=======================================================================
//function : CheckData
@ -303,7 +445,8 @@ void GEOMAlgo_FinderShapeOn::CheckData()
//
if (!(myShapeType==TopAbs_VERTEX ||
myShapeType==TopAbs_EDGE ||
myShapeType==TopAbs_FACE)) {
myShapeType==TopAbs_FACE ||
myShapeType==TopAbs_SOLID)) {
myErrorStatus=12; // unallowed subshape type
return;
}
@ -334,9 +477,7 @@ void GEOMAlgo_FinderShapeOn::CopySource(const TopoDS_Shape& aE,
//
if (aOriginals.IsBound(aE)) {
aEx=aOriginals.ChangeFind(aE);
if (aType==TopAbs_EDGE) {
return;
}
return;
}
else {
aEx=aE.EmptyCopied();

View File

@ -40,6 +40,12 @@
#ifndef _TopTools_DataMapOfShapeShape_HeaderFile
#include <TopTools_DataMapOfShapeShape.hxx>
#endif
#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
#include <GEOMAlgo_ShapeAlgo.hxx>
#endif
@ -95,8 +101,11 @@ protected:
// Methods PROTECTED
//
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(const TopoDS_Shape& aS) ;
Standard_EXPORT void FindVertices() ;
// Fields PROTECTED
@ -108,6 +117,8 @@ TopoDS_Shape myArg1;
TopoDS_Shape myArg2;
TopTools_ListOfShape myLS;
TopTools_DataMapOfShapeShape myImages;
GEOMAlgo_IndexedDataMapOfShapeState myMSS;
Standard_Boolean myIsAnalytic;
private:

View File

@ -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

View File

@ -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>

View 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

View 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>

View File

@ -10,9 +10,9 @@ deferred class ShapeSolid from GEOMAlgo
---Purpose:
uses
uses
State from TopAbs,
ListOfShape from TopTools,
State from GEOMAlgo,
PDSFiller from BOPTools,
DSFiller from BOPTools
--raises
@ -26,8 +26,9 @@ is
aDSF:DSFiller from BOPTools);
---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ShapeSolid();"
Shapes(me;
aState:State from GEOMAlgo)
aState:State from TopAbs)
returns ListOfShape from TopTools;
---C++: return const &
@ -41,8 +42,6 @@ fields
myLSIN : ListOfShape from TopTools is protected;
myLSOUT : ListOfShape from TopTools is protected;
myLSON : ListOfShape from TopTools is protected;
myLS : ListOfShape from TopTools is protected;
myRank : Integer from Standard is protected;
myDSFiller : PDSFiller from BOPTools is protected;

View File

@ -35,80 +35,27 @@ void GEOMAlgo_ShapeSolid::SetFiller(const BOPTools_DSFiller& aDSFiller)
{
myDSFiller=(BOPTools_DSFiller*) &aDSFiller;
}
//=======================================================================
// function: Shapes
// 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;
//
TopTools_ListOfShape* pLS=(TopTools_ListOfShape*)&myLS;
//
pLS->Clear();
const TopTools_ListOfShape *pL;
//
switch (aState) {
case GEOMAlgo_ST_IN: {
aIt.Initialize(myLSIN);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
pLS->Append(aS);
}
}
case TopAbs_IN:
pL=&myLSIN;
break;
//
case GEOMAlgo_ST_OUT: {
aIt.Initialize(myLSOUT);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
pLS->Append(aS);
}
}
case TopAbs_OUT:
pL=&myLSOUT;
break;
//
case GEOMAlgo_ST_ON: {
aIt.Initialize(myLSON);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
pLS->Append(aS);
}
}
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:
case TopAbs_ON:
pL=&myLSON;
break;
default:
break;
pL=&myLSON;
break;
}
return myLS;
return *pL;
}

View File

@ -34,8 +34,8 @@
#ifndef _GEOMAlgo_Algo_HeaderFile
#include <GEOMAlgo_Algo.hxx>
#endif
#ifndef _GEOMAlgo_State_HeaderFile
#include <GEOMAlgo_State.hxx>
#ifndef _TopAbs_State_HeaderFile
#include <TopAbs_State.hxx>
#endif
class BOPTools_DSFiller;
class TopTools_ListOfShape;
@ -68,7 +68,7 @@ public:
//
Standard_EXPORT void SetFiller(const BOPTools_DSFiller& aDSF) ;
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 myLSOUT;
TopTools_ListOfShape myLSON;
TopTools_ListOfShape myLS;
Standard_Integer myRank;
BOPTools_PDSFiller myDSFiller;

View File

@ -10,24 +10,25 @@
#include <gp_Pnt2d.hxx>
#include <gp_Pnt.hxx>
#include <gp_Dir.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Solid.hxx>
#include <BRep_Tool.hxx>
#include <BRepTools.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopExp_Explorer.hxx>
#include <BOPTColStd_Dump.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <IntTools_Context.hxx>
#include <BOPTColStd_Dump.hxx>
#include <BooleanOperations_ShapesDataStructure.hxx>
#include <BOPTools_PaveFiller.hxx>
@ -46,28 +47,10 @@
#include <BOPTools_SplitShapesPool.hxx>
#include <BOPTools_Tools3D.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_SDFWESFiller.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
@ -345,10 +328,10 @@ void GEOMAlgo_ShellSolid::DetectSDFaces()
Standard_Boolean bIsValidIn2D, bNegativeFlag;
bIsValidIn2D=BOPTools_Tools3D::IsValidArea (aFaceResult, bNegativeFlag);
if (bIsValidIn2D) {
if(CheckSameDomainFaceInside(aFaceResult, aF2)) {
iZone=1;
break;
}
//if(CheckSameDomainFaceInside(aFaceResult, aF2)) {
iZone=1;
break;
//}
}
//
}
@ -365,52 +348,3 @@ void GEOMAlgo_ShellSolid::DetectSDFaces()
aFF.SetSenseFlag (iSenseFlag);
}// 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;
}

View 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;

View 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);
}
}
}
}

View 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

View 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>

View File

@ -0,0 +1,6 @@
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _GEOMAlgo_SolidSolid_HeaderFile
#include <GEOMAlgo_SolidSolid.hxx>
#endif

View 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;

View 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;
}

View 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

View 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>

View 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

View File

@ -11,9 +11,10 @@ class Tools from GEOMAlgo
uses
Pnt from gp,
Surface from Geom,
Edge from TopoDS,
Face from TopoDS,
Surface from Geom,
ShapeEnum from TopAbs,
Edge from TopoDS,
Face from TopoDS,
Shape from TopoDS,
ListOfShape from TopTools,
IndexedDataMapOfShapeListOfShape from TopTools,
@ -23,6 +24,10 @@ uses
--raises
is
IsCompositeShape(myclass;
aS :Shape from TopoDS)
returns Boolean from Standard;
RefineSDShapes(myclass;
aMSD:out IndexedDataMapOfPassKeyListOfShape from GEOMAlgo;
aTol:Real from Standard;
@ -83,6 +88,7 @@ is
IsUPeriodic(myclass;
aS:Surface from Geom)
returns Boolean from Standard;
--fields
end Tools;

View File

@ -20,6 +20,7 @@
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
@ -34,7 +35,55 @@
#include <GEOMAlgo_PassKey.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
//purpose :

View File

@ -22,23 +22,23 @@
#ifndef _GEOMAlgo_Tools_HeaderFile
#define _GEOMAlgo_Tools_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Handle_Geom_Surface_HeaderFile
#include <Handle_Geom_Surface.hxx>
#endif
class TopoDS_Shape;
class GEOMAlgo_IndexedDataMapOfPassKeyListOfShape;
class IntTools_Context;
class TopTools_ListOfShape;
class TopTools_IndexedDataMapOfShapeListOfShape;
class TopoDS_Shape;
class gp_Pnt;
class TopoDS_Edge;
class TopoDS_Face;
@ -70,6 +70,7 @@ 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 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) ;

View File

@ -1,3 +1,6 @@
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_HeaderFile
#include <GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx>
#endif
@ -10,9 +13,6 @@
#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#endif
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _gp_Pnt_HeaderFile
#include <gp_Pnt.hxx>
#endif

View File

@ -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

View File

@ -64,7 +64,11 @@ LIB_SRC = \
GEOMAlgo_ShapeSolid.cxx \
GEOMAlgo_ShellSolid.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_SERVER_IDL =
@ -84,7 +88,9 @@ EXPORT_HEADERS = \
BlockFix_CheckTool.hxx \
Handle_BlockFix_BlockFixAPI.hxx \
GEOMAlgo_State.hxx \
GEOMAlgo_FinderShapeOn.hxx
GEOMAlgo_FinderShapeOn.hxx \
GEOMAlgo_IndexedDataMapOfShapeState.hxx \
Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx
# idl files
EXPORT_IDLS=