From 390fa7af81bb9aeeebff53a60c1999be4c7deb89 Mon Sep 17 00:00:00 2001 From: jfa Date: Wed, 23 Mar 2005 07:27:20 +0000 Subject: [PATCH 1/1] Optimization of GetShapesOn functionality --- idl/GEOM_Gen.idl | 62 ++ src/GEOMAlgo/GEOMAlgo.cdl | 31 +- ...aMapIteratorOfDataMapOfPassKeyInteger.hxx} | 43 +- ...MapIteratorOfDataMapOfPassKeyInteger_0.cxx | 56 ++ ...o_DataMapNodeOfDataMapOfPassKeyInteger.hxx | 144 +++ ...DataMapNodeOfDataMapOfPassKeyInteger_0.cxx | 105 +++ .../GEOMAlgo_DataMapOfPassKeyInteger.hxx | 135 +++ .../GEOMAlgo_DataMapOfPassKeyInteger_0.cxx | 59 ++ src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cdl | 96 -- src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx | 528 ----------- src/GEOMAlgo/GEOMAlgo_FinderShapeOn.ixx | 26 - src/GEOMAlgo/GEOMAlgo_FinderShapeOn.jxx | 15 - src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cdl | 120 +++ src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx | 822 ++++++++++++++++++ ...hapeOn.hxx => GEOMAlgo_FinderShapeOn1.hxx} | 56 +- ...dSolid.ixx => GEOMAlgo_FinderShapeOn1.ixx} | 2 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.jxx | 21 + src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx | 12 +- src/GEOMAlgo/GEOMAlgo_Gluer.cdl | 6 +- src/GEOMAlgo/GEOMAlgo_Gluer.cxx | 22 +- src/GEOMAlgo/GEOMAlgo_Gluer.hxx | 6 +- src/GEOMAlgo/GEOMAlgo_Gluer.jxx | 4 +- ...dexedDataMapOfPassKeyShapeListOfShape.hxx} | 44 +- ...xedDataMapOfPassKeyShapeListOfShape_0.cxx} | 52 +- ...dexedDataMapOfPassKeyShapeListOfShape.hxx} | 38 +- ...xedDataMapOfPassKeyShapeListOfShape_0.cxx} | 26 +- .../GEOMAlgo_ListIteratorOfListOfPnt.hxx | 131 +++ .../GEOMAlgo_ListIteratorOfListOfPnt_0.cxx | 52 ++ src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx | 130 +++ .../GEOMAlgo_ListNodeOfListOfPnt_0.cxx | 98 +++ src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx | 157 ++++ src/GEOMAlgo/GEOMAlgo_ListOfPnt_0.cxx | 49 ++ src/GEOMAlgo/GEOMAlgo_PassKey.cdl | 47 +- src/GEOMAlgo/GEOMAlgo_PassKey.cxx | 170 ++-- src/GEOMAlgo/GEOMAlgo_PassKey.hxx | 19 +- src/GEOMAlgo/GEOMAlgo_PassKey.jxx | 7 +- src/GEOMAlgo/GEOMAlgo_PassKeyShape.cdl | 48 + src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx | 112 +++ ...lidSolid.hxx => GEOMAlgo_PassKeyShape.hxx} | 29 +- ...ellSolid.ixx => GEOMAlgo_PassKeyShape.ixx} | 2 +- src/GEOMAlgo/GEOMAlgo_PassKeyShape.jxx | 9 + src/GEOMAlgo/GEOMAlgo_ShapeSolid.cdl | 48 - src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx | 61 -- src/GEOMAlgo/GEOMAlgo_ShapeSolid.jxx | 9 - src/GEOMAlgo/GEOMAlgo_ShellSolid.cdl | 34 - src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx | 350 -------- src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx | 96 -- src/GEOMAlgo/GEOMAlgo_ShellSolid.jxx | 3 - src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl | 39 - src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx | 182 ---- src/GEOMAlgo/GEOMAlgo_SolidSolid.jxx | 6 - src/GEOMAlgo/GEOMAlgo_StateCollector.cdl | 31 + src/GEOMAlgo/GEOMAlgo_StateCollector.cxx | 71 ++ ...eSolid.hxx => GEOMAlgo_StateCollector.hxx} | 25 +- ...eSolid.ixx => GEOMAlgo_StateCollector.ixx} | 2 +- src/GEOMAlgo/GEOMAlgo_StateCollector.jxx | 3 + src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl | 19 +- src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx | 59 +- src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx | 11 +- src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx | 9 +- src/GEOMAlgo/GEOMAlgo_Tools.cdl | 4 +- src/GEOMAlgo/GEOMAlgo_Tools.cxx | 8 +- src/GEOMAlgo/GEOMAlgo_Tools.hxx | 4 +- src/GEOMAlgo/GEOMAlgo_Tools.jxx | 4 +- src/GEOMAlgo/GEOMAlgo_VertexSolid.cdl | 32 - src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx | 219 ----- src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx | 95 -- src/GEOMAlgo/GEOMAlgo_VertexSolid.ixx | 26 - src/GEOMAlgo/GEOMAlgo_VertexSolid.jxx | 3 - src/GEOMAlgo/GEOMAlgo_WireSolid.cdl | 31 - src/GEOMAlgo/GEOMAlgo_WireSolid.cxx | 152 ---- src/GEOMAlgo/GEOMAlgo_WireSolid.ixx | 26 - src/GEOMAlgo/GEOMAlgo_WireSolid.jxx | 3 - ...o_DataMapNodeOfDataMapOfPassKeyInteger.hxx | 91 ++ ...dexedDataMapOfPassKeyShapeListOfShape.hxx} | 32 +- .../Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx | 91 ++ src/GEOMAlgo/Makefile.in | 63 +- src/GEOMImpl/GEOMImpl_IGroupOperations.cxx | 143 +++ src/GEOMImpl/GEOMImpl_IGroupOperations.hxx | 7 + src/GEOMImpl/GEOMImpl_IShapesOperations.cxx | 490 ++++++++++- src/GEOMImpl/GEOMImpl_IShapesOperations.hxx | 19 + src/GEOM_I/GEOM_IGroupOperations_i.cc | 62 ++ src/GEOM_I/GEOM_IGroupOperations_i.hh | 4 + src/GEOM_I/GEOM_IShapesOperations_i.cc | 122 +++ src/GEOM_I/GEOM_IShapesOperations_i.hh | 17 + src/Makefile.in | 2 +- 86 files changed, 3937 insertions(+), 2462 deletions(-) rename src/GEOMAlgo/{GEOMAlgo_ShapeSolid.hxx => GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx} (63%) create mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx create mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx create mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx create mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger.hxx create mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_FinderShapeOn.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_FinderShapeOn.jxx create mode 100644 src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cdl create mode 100644 src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx rename src/GEOMAlgo/{GEOMAlgo_FinderShapeOn.hxx => GEOMAlgo_FinderShapeOn1.hxx} (68%) rename src/GEOMAlgo/{GEOMAlgo_SolidSolid.ixx => GEOMAlgo_FinderShapeOn1.ixx} (96%) create mode 100644 src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.jxx rename src/GEOMAlgo/{GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx => GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx} (74%) rename src/GEOMAlgo/{GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx => GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx} (65%) rename src/GEOMAlgo/{GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx => GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx} (70%) rename src/GEOMAlgo/{GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_0.cxx => GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx} (75%) create mode 100644 src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt.hxx create mode 100644 src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt_0.cxx create mode 100644 src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx create mode 100644 src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt_0.cxx create mode 100644 src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx create mode 100644 src/GEOMAlgo/GEOMAlgo_ListOfPnt_0.cxx create mode 100755 src/GEOMAlgo/GEOMAlgo_PassKeyShape.cdl create mode 100755 src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx rename src/GEOMAlgo/{GEOMAlgo_SolidSolid.hxx => GEOMAlgo_PassKeyShape.hxx} (67%) rename src/GEOMAlgo/{GEOMAlgo_ShellSolid.ixx => GEOMAlgo_PassKeyShape.ixx} (96%) create mode 100644 src/GEOMAlgo/GEOMAlgo_PassKeyShape.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeSolid.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeSolid.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShellSolid.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShellSolid.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_SolidSolid.jxx create mode 100644 src/GEOMAlgo/GEOMAlgo_StateCollector.cdl create mode 100644 src/GEOMAlgo/GEOMAlgo_StateCollector.cxx rename src/GEOMAlgo/{GEOMAlgo_WireSolid.hxx => GEOMAlgo_StateCollector.hxx} (76%) rename src/GEOMAlgo/{GEOMAlgo_ShapeSolid.ixx => GEOMAlgo_StateCollector.ixx} (96%) create mode 100644 src/GEOMAlgo/GEOMAlgo_StateCollector.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_VertexSolid.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_VertexSolid.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_VertexSolid.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_WireSolid.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_WireSolid.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_WireSolid.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_WireSolid.jxx create mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx rename src/GEOMAlgo/{Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx => Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx} (59%) create mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx diff --git a/idl/GEOM_Gen.idl b/idl/GEOM_Gen.idl index 891f401e0..4e948ae5e 100644 --- a/idl/GEOM_Gen.idl +++ b/idl/GEOM_Gen.idl @@ -962,6 +962,54 @@ module GEOM in double theRadius, in shape_state theState); + /*! + * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively + * the specified plane by the certain way, defined through \a theState parameter. + * \param theShape Shape to find sub-shapes of. + * \param theShapeType Type of sub-shapes to be retrieved. + * \param theAx1 Vector (or line, or linear edge), specifying normal + * direction and location of the plane to find shapes on. + * \param theState The state of the subshapes to find. + * \return List of IDs of all found sub-shapes. + */ + ListOfLong GetShapesOnPlaneIDs (in GEOM_Object theShape, + in long theShapeType, + in GEOM_Object theAx1, + in shape_state theState); + + /*! + * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively + * the specified cylinder by the certain way, defined through \a theState parameter. + * \param theShape Shape to find sub-shapes of. + * \param theShapeType Type of sub-shapes to be retrieved. + * \param theAxis Vector (or line, or linear edge), specifying + * axis of the cylinder to find shapes on. + * \param theRadius Radius of the cylinder to find shapes on. + * \param theState The state of the subshapes to find. + * \return List of IDs of all found sub-shapes. + */ + ListOfLong GetShapesOnCylinderIDs (in GEOM_Object theShape, + in long theShapeType, + in GEOM_Object theAxis, + in double theRadius, + in shape_state theState); + + /*! + * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively + * the specified sphere by the certain way, defined through \a theState parameter. + * \param theShape Shape to find sub-shapes of. + * \param theShapeType Type of sub-shapes to be retrieved. + * \param theCenter Point, specifying center of the sphere to find shapes on. + * \param theRadius Radius of the sphere to find shapes on. + * \param theState The state of the subshapes to find. + * \return List of IDs of all found sub-shapes. + */ + ListOfLong GetShapesOnSphereIDs (in GEOM_Object theShape, + in long theShapeType, + in GEOM_Object theCenter, + in double theRadius, + in shape_state theState); + /*! * Get sub-shape(s) of theShapeWhere, which are * coincident with \a theShapeWhat or could be a part of it. @@ -1880,6 +1928,20 @@ module GEOM */ void DifferenceList (in GEOM_Object theGroup, in ListOfGO theSubShapes); + /*! + * Adds to the group all the given shapes. No errors, if some shapes are alredy included. + * \param theGroup is a GEOM group to which the new sub shapes are added. + * \param theSubShapes is a list of IDs of sub shapes to be added. + */ + void UnionIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes); + + /*! + * Removes from the group all the given shapes. No errors, if some shapes are not included. + * \param theGroup is a GEOM group from which the sub-shapes are removed. + * \param theSubShapes is a list of IDs of sub-shapes to be removed. + */ + void DifferenceIDs (in GEOM_Object theGroup, in ListOfLong theSubShapes); + /*! * Returns a type of sub objects stored in the group * \param theGroup is a GEOM group which type is returned. diff --git a/src/GEOMAlgo/GEOMAlgo.cdl b/src/GEOMAlgo/GEOMAlgo.cdl index 98ed925d1..ec463fbce 100755 --- a/src/GEOMAlgo/GEOMAlgo.cdl +++ b/src/GEOMAlgo/GEOMAlgo.cdl @@ -14,7 +14,8 @@ uses TColStd, Geom, Bnd, - gp, + gp, + GeomAdaptor, TopAbs, TopoDS, TopTools, @@ -44,10 +45,12 @@ is class Gluer; class GlueAnalyser; class CoupleOfShapes; - class PassKey; + class PassKey; class PassKeyMapHasher; + class PassKeyShape; class SurfaceTools; - class Tools; + class Tools; + -- -- finder on deferred class ShapeSolid; @@ -56,10 +59,13 @@ is class VertexSolid; class SolidSolid; class FinderShapeOn; + -- + class FinderShapeOn1; + class StateCollector; -- -- instantiations - class IndexedDataMapOfPassKeyListOfShape - instantiates IndexedDataMap from TCollection (PassKey from GEOMAlgo, + class IndexedDataMapOfPassKeyShapeListOfShape + instantiates IndexedDataMap from TCollection (PassKeyShape from GEOMAlgo, ListOfShape from TopTools, PassKeyMapHasher from GEOMAlgo); @@ -80,5 +86,20 @@ is instantiates IndexedDataMap from TCollection (Shape from TopoDS, State from TopAbs, ShapeMapHasher from TopTools); +-- + class ListOfPnt + instantiates List from TCollection (Pnt from gp); + +-- class IndexedDataMapOfPassKeyInteger +-- instantiates IndexedDataMap from TCollection (PassKeyRoot from GEOMAlgo, +-- Integer from Standard, +-- PassKeyMapHasher from GEOMAlgo); + + + class DataMapOfPassKeyInteger + instantiates DataMap from TCollection (PassKey from GEOMAlgo, + Integer from Standard, + PassKeyMapHasher from GEOMAlgo); + end GEOMAlgo; diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx similarity index 63% rename from src/GEOMAlgo/GEOMAlgo_ShapeSolid.hxx rename to src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx index 6142c1b72..292bb3afb 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx @@ -19,26 +19,23 @@ // the specific terms and conditions governing rights and limitations under the // License. -#ifndef _GEOMAlgo_ShapeSolid_HeaderFile -#define _GEOMAlgo_ShapeSolid_HeaderFile +#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile +#define _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile -#ifndef _TopTools_ListOfShape_HeaderFile -#include +#ifndef _TCollection_BasicMapIterator_HeaderFile +#include #endif #ifndef _Standard_Integer_HeaderFile #include #endif -#ifndef _BOPTools_PDSFiller_HeaderFile -#include +#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile +#include #endif -#ifndef _GEOMAlgo_Algo_HeaderFile -#include -#endif -#ifndef _TopAbs_State_HeaderFile -#include -#endif -class BOPTools_DSFiller; -class TopTools_ListOfShape; +class Standard_NoSuchObject; +class GEOMAlgo_PassKey; +class GEOMAlgo_PassKeyMapHasher; +class GEOMAlgo_DataMapOfPassKeyInteger; +class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger; #ifndef _Standard_HeaderFile @@ -48,7 +45,7 @@ class TopTools_ListOfShape; #include #endif -class GEOMAlgo_ShapeSolid : public GEOMAlgo_Algo { +class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger : public TCollection_BasicMapIterator { public: @@ -66,9 +63,11 @@ public: } // Methods PUBLIC // -Standard_EXPORT void SetFiller(const BOPTools_DSFiller& aDSF) ; -Standard_EXPORT virtual ~GEOMAlgo_ShapeSolid(); -Standard_EXPORT const TopTools_ListOfShape& Shapes(const TopAbs_State aState) const; +Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger(); +Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger(const GEOMAlgo_DataMapOfPassKeyInteger& aMap); +Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfPassKeyInteger& aMap) ; +Standard_EXPORT const GEOMAlgo_PassKey& Key() const; +Standard_EXPORT const Standard_Integer& Value() const; @@ -78,18 +77,10 @@ protected: // Methods PROTECTED // -Standard_EXPORT GEOMAlgo_ShapeSolid(); -Standard_EXPORT virtual void BuildResult() = 0; -Standard_EXPORT virtual void Prepare() = 0; // Fields PROTECTED // -TopTools_ListOfShape myLSIN; -TopTools_ListOfShape myLSOUT; -TopTools_ListOfShape myLSON; -Standard_Integer myRank; -BOPTools_PDSFiller myDSFiller; private: diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx new file mode 100644 index 000000000..53a99babb --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx @@ -0,0 +1,56 @@ +// 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 + +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_PassKey_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile +#include +#endif + + +#define TheKey GEOMAlgo_PassKey +#define TheKey_hxx +#define TheItem Standard_Integer +#define TheItem_hxx +#define Hasher GEOMAlgo_PassKeyMapHasher +#define Hasher_hxx +#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger +#define TCollection_DataMapNode_hxx +#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger +#define TCollection_DataMapIterator_hxx +#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger +#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_() +#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyInteger +#define TCollection_DataMap_hxx +#include + diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx new file mode 100644 index 000000000..7226f82be --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx @@ -0,0 +1,144 @@ +// 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_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile +#define _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile +#include +#endif + +#ifndef _GEOMAlgo_PassKey_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _TCollection_MapNode_HeaderFile +#include +#endif +#ifndef _TCollection_MapNodePtr_HeaderFile +#include +#endif +class GEOMAlgo_PassKey; +class GEOMAlgo_PassKeyMapHasher; +class GEOMAlgo_DataMapOfPassKeyInteger; +class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger; + + +class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger : 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_DataMapNodeOfDataMapOfPassKeyInteger(const GEOMAlgo_PassKey& K,const Standard_Integer& I,const TCollection_MapNodePtr& n); + GEOMAlgo_PassKey& Key() const; + Standard_Integer& Value() const; +Standard_EXPORT ~GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger(); + + + + + // Type management + // + Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_(); + Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // +GEOMAlgo_PassKey myKey; +Standard_Integer myValue; + + +}; + +#define TheKey GEOMAlgo_PassKey +#define TheKey_hxx +#define TheItem Standard_Integer +#define TheItem_hxx +#define Hasher GEOMAlgo_PassKeyMapHasher +#define Hasher_hxx +#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger +#define TCollection_DataMapNode_hxx +#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger +#define TCollection_DataMapIterator_hxx +#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger +#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_() +#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyInteger +#define TCollection_DataMap_hxx + +#include + +#undef TheKey +#undef TheKey_hxx +#undef TheItem +#undef TheItem_hxx +#undef Hasher +#undef Hasher_hxx +#undef TCollection_DataMapNode +#undef TCollection_DataMapNode_hxx +#undef TCollection_DataMapIterator +#undef TCollection_DataMapIterator_hxx +#undef Handle_TCollection_DataMapNode +#undef TCollection_DataMapNode_Type_ +#undef TCollection_DataMap +#undef TCollection_DataMap_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx new file mode 100644 index 000000000..6035a471a --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx @@ -0,0 +1,105 @@ +// 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 + +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _GEOMAlgo_PassKey_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile +#include +#endif +GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::~GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger() {} + + + +Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_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_DataMapNodeOfDataMapOfPassKeyInteger", + sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + + +// DownCast method +// allow safe downcasting +// +const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger))) { + _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)&)AnObject); + } + } + + return _anOtherObject ; +} +const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::DynamicType() const +{ + return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) ; +} +Standard_Boolean GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::IsKind(const Handle(Standard_Type)& AType) const +{ + return (STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) == AType || TCollection_MapNode::IsKind(AType)); +} +Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::~Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger() {} +#define TheKey GEOMAlgo_PassKey +#define TheKey_hxx +#define TheItem Standard_Integer +#define TheItem_hxx +#define Hasher GEOMAlgo_PassKeyMapHasher +#define Hasher_hxx +#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger +#define TCollection_DataMapNode_hxx +#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger +#define TCollection_DataMapIterator_hxx +#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger +#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_() +#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyInteger +#define TCollection_DataMap_hxx +#include + diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger.hxx new file mode 100644 index 000000000..746ac5413 --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger.hxx @@ -0,0 +1,135 @@ +// 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_DataMapOfPassKeyInteger_HeaderFile +#define _GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile + +#ifndef _TCollection_BasicMap_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_DomainError; +class Standard_NoSuchObject; +class GEOMAlgo_PassKey; +class GEOMAlgo_PassKeyMapHasher; +class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger; +class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class GEOMAlgo_DataMapOfPassKeyInteger : 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_DataMapOfPassKeyInteger(const Standard_Integer NbBuckets = 1); +Standard_EXPORT GEOMAlgo_DataMapOfPassKeyInteger& Assign(const GEOMAlgo_DataMapOfPassKeyInteger& Other) ; + GEOMAlgo_DataMapOfPassKeyInteger& operator =(const GEOMAlgo_DataMapOfPassKeyInteger& Other) +{ + return Assign(Other); +} + +Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; +Standard_EXPORT void Clear() ; +~GEOMAlgo_DataMapOfPassKeyInteger() +{ + Clear(); +} + +Standard_EXPORT Standard_Boolean Bind(const GEOMAlgo_PassKey& K,const Standard_Integer& I) ; +Standard_EXPORT Standard_Boolean IsBound(const GEOMAlgo_PassKey& K) const; +Standard_EXPORT Standard_Boolean UnBind(const GEOMAlgo_PassKey& K) ; +Standard_EXPORT const Standard_Integer& Find(const GEOMAlgo_PassKey& K) const; + const Standard_Integer& operator()(const GEOMAlgo_PassKey& K) const +{ + return Find(K); +} + +Standard_EXPORT Standard_Integer& ChangeFind(const GEOMAlgo_PassKey& K) ; + Standard_Integer& operator()(const GEOMAlgo_PassKey& K) +{ + return ChangeFind(K); +} + + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // +Standard_EXPORT GEOMAlgo_DataMapOfPassKeyInteger(const GEOMAlgo_DataMapOfPassKeyInteger& Other); + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger_0.cxx new file mode 100644 index 000000000..0163b4e1a --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger_0.cxx @@ -0,0 +1,59 @@ +// 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 + +#ifndef _Standard_DomainError_HeaderFile +#include +#endif +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_PassKey_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile +#include +#endif + + +#define TheKey GEOMAlgo_PassKey +#define TheKey_hxx +#define TheItem Standard_Integer +#define TheItem_hxx +#define Hasher GEOMAlgo_PassKeyMapHasher +#define Hasher_hxx +#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger +#define TCollection_DataMapNode_hxx +#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger +#define TCollection_DataMapIterator_hxx +#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger +#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_() +#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyInteger +#define TCollection_DataMap_hxx +#include + diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cdl b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cdl deleted file mode 100644 index 4f8cfaaf3..000000000 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cdl +++ /dev/null @@ -1,96 +0,0 @@ --- File: GEOMAlgo_FinderShapeOn.cdl --- Created: Tue Jan 11 14:35:52 2005 --- Author: Peter KURNEV --- ----Copyright: Matra Datavision 2005 - - -class FinderShapeOn from GEOMAlgo - inherits ShapeAlgo from GEOMAlgo - - ---Purpose: - -uses - Surface from Geom, - ShapeEnum from TopAbs, - ListOfShape from TopTools, - DataMapOfShapeShape from TopTools, - Shape from TopoDS, - State from GEOMAlgo, - IndexedDataMapOfShapeState from GEOMAlgo - ---raises - -is - Create - returns FinderShapeOn from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn();" - - Perform(me:out) - is redefined; - - SetSurface(me:out; - aS:Surface from Geom); - - SetShapeType(me:out; - aST:ShapeEnum from TopAbs); - - SetState(me:out; - aSF:State from GEOMAlgo); - - Surface(me) - returns Surface from Geom; - ---C++: return const & - - ShapeType(me) - returns ShapeEnum from TopAbs; - - State(me) - returns State from GEOMAlgo; - - Shapes(me) - returns ListOfShape from TopTools; - ---C++: return const & - - -- - -- protected methods - -- - CheckData(me:out) - is redefined protected; - - MakeArgument1(me:out) - is protected; - - MakeArgument2(me:out) - is protected; - - Find(me:out) - is protected; - - Find(me:out; - aS:Shape from TopoDS) - is protected; - - FindVertices(me:out) - is protected; - - CopySource(myclass; - aS :Shape from TopoDS; - aImages : out DataMapOfShapeShape from TopTools; - aOriginals: out DataMapOfShapeShape from TopTools; - aSC : out Shape from TopoDS); - - - -fields - mySurface : Surface from Geom is protected; - myShapeType : ShapeEnum from TopAbs is protected; - myState : State from GEOMAlgo is protected; - myArg1 : Shape from TopoDS is protected; - myArg2 : Shape from TopoDS is protected; - myLS : ListOfShape from TopTools is protected; - myImages : DataMapOfShapeShape from TopTools is protected; - myMSS : IndexedDataMapOfShapeState from GEOMAlgo is protected; - myIsAnalytic : Boolean from Standard is protected; - -end FinderShapeOn; diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx deleted file mode 100644 index ce9b55f8d..000000000 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx +++ /dev/null @@ -1,528 +0,0 @@ -// File: GEOMAlgo_FinderShapeOn.cxx -// Created: Tue Jan 11 14:44:31 2005 -// Author: Peter KURNEV -// - - -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_FinderShapeOn -//purpose : -//======================================================================= -GEOMAlgo_FinderShapeOn::GEOMAlgo_FinderShapeOn() -: - GEOMAlgo_ShapeAlgo() -{ - myTolerance=0.0001; - myShapeType=TopAbs_VERTEX; - myState=GEOMAlgo_ST_UNKNOWN; - myIsAnalytic=Standard_True; -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_FinderShapeOn::~GEOMAlgo_FinderShapeOn() -{ -} -//======================================================================= -//function : SetSurface -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::SetSurface(const Handle(Geom_Surface)& aS) -{ - mySurface=aS; -} -//======================================================================= -//function : Surface -//purpose : -//======================================================================= -const Handle(Geom_Surface)& GEOMAlgo_FinderShapeOn::Surface() const -{ - return mySurface; -} -//======================================================================= -//function : SetShapeType -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::SetShapeType(const TopAbs_ShapeEnum aType) -{ - myShapeType=aType; -} -//======================================================================= -//function : ShapeType -//purpose : -//======================================================================= -TopAbs_ShapeEnum GEOMAlgo_FinderShapeOn::ShapeType()const -{ - return myShapeType; -} -//======================================================================= -//function : SetState -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::SetState(const GEOMAlgo_State aState) -{ - myState=aState; -} -//======================================================================= -//function : State -//purpose : -//======================================================================= -GEOMAlgo_State GEOMAlgo_FinderShapeOn::State() const -{ - return myState; -} -//======================================================================= -// function: Shapes -// purpose: -//======================================================================= -const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn::Shapes() const -{ - Standard_Boolean bIsConformState; - Standard_Integer i, aNb; - TopAbs_State aSt; - TopTools_ListOfShape* pL; - // - pL=(TopTools_ListOfShape*) &myLS; - pL->Clear(); - // - aNb=myMSS.Extent(); - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aS=myMSS.FindKey(i); - aSt=myMSS.FindFromIndex(i); - // - bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); - if (bIsConformState) { - pL->Append(aS); - } - } - return myLS; -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::Perform() -{ - myErrorStatus=0; - myWarningStatus=0; - myLS.Clear(); - myMSS.Clear(); - // - if (!myResult.IsNull()){ - myResult.Nullify(); - } - // - CheckData(); - if(myErrorStatus) { - return; - } - // - myIsAnalytic=GEOMAlgo_SurfaceTools::IsAnalytic(mySurface); - // - MakeArgument1(); - if(myErrorStatus) { - return; - } - // - if (myIsAnalytic && myShapeType==TopAbs_VERTEX) { - FindVertices(); - return; - } - // - MakeArgument2(); - if(myErrorStatus) { - return; - } - // - Find(); - if(myErrorStatus || myWarningStatus) { - return; - } - // -} -//======================================================================= -//function : FindVertices -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::FindVertices() -{ - Standard_Integer i, aNb, iErr; - TopAbs_State aSt; - TopAbs_Orientation aOr; - gp_Pnt aP; - TopTools_IndexedMapOfShape aM; - // - TopExp::MapShapes(myArg1, TopAbs_FACE, aM); - const TopoDS_Face& aF=TopoDS::Face(aM(1)); - aOr=aF.Orientation(); - // - aM.Clear(); - TopExp::MapShapes(myShape, myShapeType, aM); - aNb=aM.Extent(); - if (!aNb) { - myWarningStatus=10; // No found 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 i, iErr; - TopAbs_State aSts[]={TopAbs_IN, TopAbs_OUT, TopAbs_ON}; - TopTools_ListIteratorOfListOfShape aIt; - BOPTools_DSFiller aDF; - // - // 1. Prepare DSFiller - aDF.SetShapes (myArg1, aS); - bIsDone=aDF.IsDone(); - if (!bIsDone) { - myErrorStatus=30; // wrong args are used for DSFiller - return; - } - aDF.Perform(); - bIsDone=aDF.IsDone(); - if (!bIsDone) { - myErrorStatus=31; // DSFiller failed - return; - } - // - // 2. Find shapes - GEOMAlgo_ShapeSolid* pSS; - GEOMAlgo_VertexSolid aVXS; - GEOMAlgo_WireSolid aWRS; - GEOMAlgo_ShellSolid aSHS; - GEOMAlgo_SolidSolid aSLS; - // - pSS=NULL; - // - switch (myShapeType) { - case TopAbs_VERTEX: - pSS=&aVXS; - break; - case TopAbs_EDGE: - pSS=&aWRS; - break; - case TopAbs_FACE: - pSS=&aSHS; - break; - case TopAbs_SOLID: - aSLS.SetShape2(myArg2); - pSS=&aSLS; - break; - default: - myErrorStatus=12; // unallowed subshape type - return; - } - // - pSS->SetFiller(aDF); - pSS->Perform(); - iErr=pSS->ErrorStatus(); - if (iErr) { - myErrorStatus=32; // builder ShapeSolid failed - return; - } - // - for (i=0; i<3; ++i) { - const TopTools_ListOfShape& aLS=pSS->Shapes(aSts[i]); - aIt.Initialize(aLS); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSImage=aIt.Value(); - if (myImages.IsBound(aSImage)) { - const TopoDS_Shape& aSx=myImages.Find(aSImage); - myMSS.Add(aSx, aSts[i]); - } - else { - myErrorStatus=33;// can not find original shape - return; - } - } - } -} -//======================================================================= -//function : MakeArgument1 -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::MakeArgument1() -{ - myErrorStatus=0; - // - Standard_Integer i, aNb; - TopAbs_ShapeEnum aType; - BRepLib_FaceError aFErr; - BRepLib_MakeFace aMF; - TopTools_IndexedMapOfShape aM; - BRep_Builder aBB; - TopoDS_Face aFace; - TopoDS_Shell aSh; - TopoDS_Solid aSd; - // - // Argument 1 - if (!myIsAnalytic) { - 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); - } - // - // make solid - aBB.MakeShell(aSh); - aBB.Add(aSh, aFace); - aBB.MakeSolid(aSd); - aBB.Add(aSd, aSh); - myArg1=aSd; -} -//======================================================================= -//function : MakeArgument2 -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::MakeArgument2() -{ - myErrorStatus=0; - // - TopoDS_Shape aSC; - TopTools_DataMapOfShapeShape aOriginals; - // - myImages.Clear(); - // - GEOMAlgo_FinderShapeOn::CopySource(myShape, myImages, aOriginals, aSC); - // - myArg2=aSC; -} -//======================================================================= -//function : CheckData -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::CheckData() -{ - myErrorStatus=0; - // - if(mySurface.IsNull()) { - myErrorStatus=10; // mySurface=NULL - return; - } - // - if (myShape.IsNull()) { - myErrorStatus=11; // myShape=NULL - return; - } - // - if (!(myShapeType==TopAbs_VERTEX || - myShapeType==TopAbs_EDGE || - myShapeType==TopAbs_FACE || - myShapeType==TopAbs_SOLID)) { - myErrorStatus=12; // unallowed subshape type - return; - } - // - if (myState==GEOMAlgo_ST_UNKNOWN || - myState==GEOMAlgo_ST_INOUT) { - myErrorStatus=13; // unallowed state type - return; - } -} -// -//======================================================================= -//function : CopySource -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::CopySource(const TopoDS_Shape& aE, - TopTools_DataMapOfShapeShape& aImages, - TopTools_DataMapOfShapeShape& aOriginals, - TopoDS_Shape& aEx) -{ - Standard_Boolean bFree; - TopAbs_ShapeEnum aType; - Standard_Integer aR; - BRep_Builder BB; - TopoDS_Iterator aIt; - // - aType=aE.ShapeType(); - // - if (aOriginals.IsBound(aE)) { - aEx=aOriginals.ChangeFind(aE); - return; - } - else { - aEx=aE.EmptyCopied(); - aOriginals.Bind(aE, aEx); - aImages.Bind(aEx, aE); - } - // - aR=(Standard_Integer)aType+1; - if (aR>TopAbs_VERTEX) { - return; - } - // - bFree=aEx.Free(); - aEx.Free(Standard_True); - // - aType=(TopAbs_ShapeEnum) aR; - // - aIt.Initialize(aE);//, Standard_False); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aV=aIt.Value(); - TopoDS_Shape aVx; - // - CopySource (aV, aImages, aOriginals, aVx); - // - aVx.Orientation(aV.Orientation()); - BB.Add(aEx, aVx); - } - // - aEx.Free(bFree); -} - -// -// myErrorStatus : -// -// 10 -mySurface=NULL -// 11 -myShape=NULL -// 12 -unallowed type of subshapes -// 13 -unallowed state -// 20 -can not build the face -// 30 -wrong args are used for DSFiller -// 31 -DSFiller failed -// 32 -builder ShapeSolid failed -// 33 -can not find original shape -// -// myWarningStatus -// -// 10 -subshapes of type myShapeType can not be fond in myShape - diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.ixx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.ixx deleted file mode 100644 index 00afa2d33..000000000 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.ixx +++ /dev/null @@ -1,26 +0,0 @@ -// 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 - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.jxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.jxx deleted file mode 100644 index d9a848049..000000000 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.jxx +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _Geom_Surface_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_DataMapOfShapeShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_FinderShapeOn_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cdl b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cdl new file mode 100644 index 000000000..24c3459dd --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cdl @@ -0,0 +1,120 @@ +-- File: GEOMAlgo_FinderShapeOn1.cdl +-- Created: Fri Mar 4 10:26:54 2005 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2005 + + +class FinderShapeOn1 from GEOMAlgo + inherits ShapeAlgo from GEOMAlgo + + ---Purpose: + +uses + Surface from Geom, + Surface from GeomAdaptor, + + ShapeEnum from TopAbs, + Face from TopoDS, + Edge from TopoDS, + ListOfShape from TopTools, + + State from GEOMAlgo, + ListOfPnt from GEOMAlgo, + IndexedDataMapOfShapeState from GEOMAlgo + +--raises + +is + Create + returns FinderShapeOn1 from GEOMAlgo; + ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn1();" + + SetSurface(me:out; + aS:Surface from Geom); + + SetShapeType(me:out; + aST:ShapeEnum from TopAbs); + + SetState(me:out; + aSF:State from GEOMAlgo); + + SetNbPntsMin(me:out; + aNb:Integer from Standard); + + NbPntsMin(me) + returns Integer from Standard; + + SetNbPntsMax(me:out; + aNb:Integer from Standard); + + NbPntsMax(me) + returns Integer from Standard; + + Surface(me) + returns Surface from Geom; + ---C++: return const & + + ShapeType(me) + returns ShapeEnum from TopAbs; + + State(me) + returns State from GEOMAlgo; + + Perform(me:out) + is redefined; + + Shapes(me) + returns ListOfShape from TopTools; + ---C++: return const & + -- + -- protected methods + -- + CheckData(me:out) + is redefined protected; + + ProcessVertices(me:out) + is protected; + + ProcessEdges(me:out) + is protected; + + ProcessFaces(me:out) + is protected; + + ProcessSolids(me:out) + is protected; + + InnerPoints(me:out; + aF :Face from TopoDS; + aLP:out ListOfPnt from GEOMAlgo) + is protected; + + InnerPoints(me:out; + aE :Edge from TopoDS; + aLP:out ListOfPnt from GEOMAlgo) + is protected; + + InnerPoints(me:out; + aE :Edge from TopoDS; + aNbPnts: Integer from Standard; + aLP:out ListOfPnt from GEOMAlgo) + is protected; + + MSS (me) + returns IndexedDataMapOfShapeState from GEOMAlgo; + ---C++:return const & + +fields + mySurface : Surface from Geom is protected; + myShapeType : ShapeEnum from TopAbs is protected; + myState : State from GEOMAlgo is protected; + myNbPntsMin : Integer from Standard is protected; + myNbPntsMax : Integer from Standard is protected; + -- + myGAS : Surface from GeomAdaptor is protected; + myLS : ListOfShape from TopTools is protected; + -- + myMSS : IndexedDataMapOfShapeState from GEOMAlgo is protected; + +end FinderShapeOn1; diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx new file mode 100644 index 000000000..8ceaf7c45 --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx @@ -0,0 +1,822 @@ +// File: GEOMAlgo_FinderShapeOn1.cxx +// Created: Fri Mar 4 10:31:06 2005 +// Author: Peter KURNEV +// + + +#include +#include + + +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + + +//======================================================================= +//function : GEOMAlgo_FinderShapeOn1 +//purpose : +//======================================================================= +GEOMAlgo_FinderShapeOn1::GEOMAlgo_FinderShapeOn1() +: + GEOMAlgo_ShapeAlgo() +{ + myTolerance=0.0001; + myShapeType=TopAbs_VERTEX; + myState=GEOMAlgo_ST_UNKNOWN; + myNbPntsMin=3; + myNbPntsMax=0; +} +//======================================================================= +//function : ~ +//purpose : +//======================================================================= +GEOMAlgo_FinderShapeOn1::~GEOMAlgo_FinderShapeOn1() +{ +} +//======================================================================= +//function : SetSurface +//purpose : +//======================================================================= +void GEOMAlgo_FinderShapeOn1::SetSurface(const Handle(Geom_Surface)& aS) +{ + mySurface=aS; +} +//======================================================================= +//function : Surface +//purpose : +//======================================================================= +const Handle(Geom_Surface)& GEOMAlgo_FinderShapeOn1::Surface() const +{ + return mySurface; +} +//======================================================================= +//function : SetShapeType +//purpose : +//======================================================================= +void GEOMAlgo_FinderShapeOn1::SetShapeType(const TopAbs_ShapeEnum aType) +{ + myShapeType=aType; +} +//======================================================================= +//function : ShapeType +//purpose : +//======================================================================= +TopAbs_ShapeEnum GEOMAlgo_FinderShapeOn1::ShapeType()const +{ + return myShapeType; +} +//======================================================================= +//function : SetState +//purpose : +//======================================================================= +void GEOMAlgo_FinderShapeOn1::SetState(const GEOMAlgo_State aState) +{ + myState=aState; +} +//======================================================================= +//function : State +//purpose : +//======================================================================= +GEOMAlgo_State GEOMAlgo_FinderShapeOn1::State() const +{ + return myState; +} +//======================================================================= +//function : SetNbPntsMin +//purpose : +//======================================================================= +void GEOMAlgo_FinderShapeOn1::SetNbPntsMin(const Standard_Integer aNb) +{ + myNbPntsMin=aNb; +} +//======================================================================= +//function : NbPntsMin +//purpose : +//======================================================================= +Standard_Integer GEOMAlgo_FinderShapeOn1::NbPntsMin()const +{ + return myNbPntsMin; +} +//======================================================================= +//function : SetNbPntsMax +//purpose : +//======================================================================= +void GEOMAlgo_FinderShapeOn1::SetNbPntsMax(const Standard_Integer aNb) +{ + myNbPntsMax=aNb; +} +//======================================================================= +//function : NbPntsMax +//purpose : +//======================================================================= +Standard_Integer GEOMAlgo_FinderShapeOn1::NbPntsMax()const +{ + return myNbPntsMax; +} +//======================================================================= +// function: MSS +// purpose: +//======================================================================= +const GEOMAlgo_IndexedDataMapOfShapeState& GEOMAlgo_FinderShapeOn1::MSS() const +{ + return myMSS; +} +//======================================================================= +// function: Shapes +// purpose: +//======================================================================= +const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn1::Shapes() const +{ + Standard_Integer i, aNb; + TopTools_ListOfShape* pL; + // + pL=(TopTools_ListOfShape*) &myLS; + pL->Clear(); + // + aNb=myMSS.Extent(); + for (i=1; i<=aNb; ++i) { + const TopoDS_Shape& aS=myMSS.FindKey(i); + if (aS.ShapeType()==myShapeType) { + pL->Append(aS); + } + } + return myLS; +} +//======================================================================= +//function : Perform +//purpose : +//======================================================================= +void GEOMAlgo_FinderShapeOn1::Perform() +{ + myErrorStatus=0; + myWarningStatus=0; + myLS.Clear(); + myMSS.Clear(); + // + CheckData(); + if(myErrorStatus) { + return; + } + // + // 1 + ProcessVertices(); + if(myErrorStatus) { + return; + } + if (myShapeType==TopAbs_VERTEX) { + return; + } + // + // 2 + ProcessEdges(); + if(myErrorStatus) { + return; + } + if (myShapeType==TopAbs_EDGE) { + return; + } + // + // 3 + ProcessFaces(); + if(myErrorStatus) { + return; + } + if (myShapeType==TopAbs_FACE) { + return; + } + // + // 4 + ProcessSolids(); + // +} +//======================================================================= +//function : ProcessVertices +//purpose : +//======================================================================= +void GEOMAlgo_FinderShapeOn1::ProcessVertices() +{ + myErrorStatus=0; + // + Standard_Boolean bIsConformState; + Standard_Integer i, aNb; + gp_Pnt aP; + TopTools_IndexedMapOfShape aM; + TopAbs_State aSt; + // + TopExp::MapShapes(myShape, TopAbs_VERTEX, aM); + aNb=aM.Extent(); + for (i=1; i<=aNb; ++i) { + const TopoDS_Vertex& aV=TopoDS::Vertex(aM(i)); + aP=BRep_Tool::Pnt(aV); + // + GEOMAlgo_SurfaceTools::GetState(aP, myGAS, myTolerance, aSt); + bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); + // + if (myShapeType==TopAbs_VERTEX){ + if (bIsConformState) { + myMSS.Add(aV, aSt); + } + } + else if (bIsConformState || aSt==TopAbs_ON) { + myMSS.Add(aV, aSt); + } + } +} +//======================================================================= +//function : ProcessEdges +//purpose : +//======================================================================= +void GEOMAlgo_FinderShapeOn1::ProcessEdges() +{ + myErrorStatus=0; + // + Standard_Boolean bIsConformState, bIsToBreak; + Standard_Integer i, aNb, iCnt; + TopAbs_State aSt; + TopTools_IndexedMapOfShape aM; + TopExp_Explorer aExp; + GEOMAlgo_ListIteratorOfListOfPnt aIt; + GeomAbs_SurfaceType aType1; + // + aType1=myGAS.GetType(); + // + TopExp::MapShapes(myShape, TopAbs_EDGE, aM); + aNb=aM.Extent(); + for (i=1; i<=aNb; ++i) { + GEOMAlgo_ListOfPnt aLP; + GEOMAlgo_StateCollector aSC; + // + const TopoDS_Edge& aE=TopoDS::Edge(aM(i)); + // + aExp.Init(aE, TopAbs_VERTEX); + for (; aExp.More(); aExp.Next()) { + const TopoDS_Shape& aV=aExp.Current(); + // + bIsConformState=myMSS.Contains(aV); + if (!bIsConformState) { + break;// vertex has non-conformed state + } + else { + aSt=myMSS.FindFromKey(aV); + aSC.AppendState(aSt); + } + } + // + if (!bIsConformState) { + continue; // vertex has non-conformed state,skip edge + } + // + if (BRep_Tool::Degenerated(aE)) { + myMSS.Add(aE, aSt); + continue; + } + // + if (myState==GEOMAlgo_ST_ON && aType1==GeomAbs_Sphere) { + Standard_Real aT1, aT2; + Handle(Geom_Curve) aC; + GeomAdaptor_Curve aGAC; + GeomAbs_CurveType aType2; + // + aC=BRep_Tool::Curve(aE, aT1, aT2); + aGAC.Load(aC); + // + aType2=aGAC.GetType(); + if (aType2==GeomAbs_Line) { + continue; + } + } + // + InnerPoints(aE, aLP); + if (myErrorStatus) { + return; + } + // + bIsConformState=Standard_True; + aIt.Initialize(aLP); + for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) { + if (myNbPntsMax) { + if (iCnt > myNbPntsMax) { + break; + } + } + // + const gp_Pnt& aP=aIt.Value(); + GEOMAlgo_SurfaceTools::GetState(aP, myGAS, myTolerance, aSt); + bIsToBreak=aSC.AppendState(aSt); + if (bIsToBreak) { + break; + } + } + // + aSt=aSC.State(); + // + bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); + if (myShapeType==TopAbs_EDGE) { + if (bIsConformState) { + myMSS.Add(aE, aSt); + } + } + else if (bIsConformState || aSt==TopAbs_ON) { + myMSS.Add(aE, aSt); + } + } // for (i=1; i<=aNb; ++i) next edge +} +//======================================================================= +//function : ProcessFaces +//purpose : +//======================================================================= +void GEOMAlgo_FinderShapeOn1::ProcessFaces() +{ + myErrorStatus=0; + // + Standard_Boolean bIsConformState, bIsToBreak; + Standard_Integer i, aNbF, iCnt; + TopAbs_State aSt; + TopTools_IndexedMapOfShape aM; + TopExp_Explorer aExp; + GEOMAlgo_ListIteratorOfListOfPnt aIt; + GeomAbs_SurfaceType aType1, aType2; + // + aType1=myGAS.GetType(); + // + TopExp::MapShapes(myShape, TopAbs_FACE, aM); + aNbF=aM.Extent(); + for (i=1; i<=aNbF; ++i) { + GEOMAlgo_StateCollector aSC; + GEOMAlgo_ListOfPnt aLP; + // + const TopoDS_Face& aF=TopoDS::Face(aM(i)); + // + if (myState==GEOMAlgo_ST_ON) { + Handle(Geom_Surface) aS; + GeomAdaptor_Surface aGAS; + // + aS=BRep_Tool::Surface(aF); + aGAS.Load(aS); + aType2=aGAS.GetType(); + if (aType2!=aType1) { + continue; + } + } + // + aExp.Init(aF, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + const TopoDS_Shape& aE=aExp.Current(); + bIsConformState=myMSS.Contains(aE); + if (!bIsConformState) { + break;// edge has non-conformed state + } + else { + aSt=myMSS.FindFromKey(aE); + aSC.AppendState(aSt); + } + } + // + if (!bIsConformState) { + continue; // edge has non-conformed state,skip face + } + // + InnerPoints(aF, aLP); + if (myErrorStatus) { + return; + } + // + bIsConformState=Standard_True; + aIt.Initialize(aLP); + for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) { + if (myNbPntsMax) { + if (iCnt > myNbPntsMax) { + break; + } + } + // + const gp_Pnt& aP=aIt.Value(); + GEOMAlgo_SurfaceTools::GetState(aP, myGAS, myTolerance, aSt); + bIsToBreak=aSC.AppendState(aSt); + if (bIsToBreak) { + break; + } + } + // + aSt=aSC.State(); + // + bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); + if (myShapeType==TopAbs_FACE) { + if (bIsConformState) { + myMSS.Add(aF, aSt); + } + } + else if (bIsConformState || aSt==TopAbs_ON) { + myMSS.Add(aF, aSt); + } + }// for (i=1; i<=aNb; ++i) next face +} +//======================================================================= +//function : ProcessSolids +//purpose : +//======================================================================= +void GEOMAlgo_FinderShapeOn1::ProcessSolids() +{ + myErrorStatus=0; + // + Standard_Boolean bIsConformState; + Standard_Integer i, aNbS, j, aNbF; + TopTools_IndexedMapOfShape aM, aMF; + TopAbs_State aSt; + // + TopExp::MapShapes(myShape, TopAbs_SOLID, aM); + aNbS=aM.Extent(); + for (i=1; i<=aNbS; ++i) { + GEOMAlgo_StateCollector aSC; + // + const TopoDS_Shape& aSd=aM(i); + aMF.Clear(); + TopExp::MapShapes(aSd, TopAbs_FACE, aMF); + aNbF=aMF.Extent(); + for (j=1; j<=aNbF; ++j) { + const TopoDS_Shape& aF=aMF(j); + bIsConformState=myMSS.Contains(aF); + if (!bIsConformState) { + break;// face has non-conformed state + } + else { + aSt=myMSS.FindFromKey(aF); + aSC.AppendState(aSt); + } + } + // + if (!bIsConformState) { + continue; // face has non-conformed state,skip solid + } + // + aSt=aSC.State(); + // + bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); + if (bIsConformState) { + myMSS.Add(aSd, aSt); + } + } +} +// +//======================================================================= +//function : InnerPoints +//purpose : +//======================================================================= +void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, + GEOMAlgo_ListOfPnt& aLP) +{ + myErrorStatus=0; + // + Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNbMax, aNb; + Standard_Integer iCnt, *pIds; + TopLoc_Location aLoc; + Handle(Poly_Triangulation) aTRF; + TColStd_MapOfInteger aMBN; + GEOMAlgo_DataMapOfPassKeyInteger aMPKI; + GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger aIt; + gp_Pnt aP, aP1, aP2; + // + aLP.Clear(); + // + aTRF=BRep_Tool::Triangulation(aF, aLoc); + if (aTRF.IsNull()) { + myErrorStatus=20; // no triangulation found + return; + } + // + const gp_Trsf& aTrsf=aLoc.Transformation(); + const Poly_Array1OfTriangle& aTrs=aTRF->Triangles(); + const TColgp_Array1OfPnt& aNodes=aTRF->Nodes(); + // + // map link/nbtriangles + j1=aTrs.Lower(); + j2=aTrs.Upper(); + for (j=j1; j<=j2; ++j) { + const Poly_Triangle& aTr=aTrs(j); + aTr.Get(n[0], n[1], n[2]); + n[3]=n[0]; + for (k=0; k<3; ++k) { + GEOMAlgo_PassKey aPK; + // + aPK.SetIds(n[k], n[k+1]); + if (aMPKI.IsBound(aPK)) { + Standard_Integer& iCntX=aMPKI.ChangeFind(aPK); + ++iCntX; + } + else { + aMPKI.Bind(aPK, 1); + } + } + } + // + // boundary nodes aMBN + aNbLinks=aMPKI.Extent(); + aIt.Initialize(aMPKI); + for (; aIt.More(); aIt.Next()) { + iCnt=aIt.Value(); + if (iCnt==1) { + const GEOMAlgo_PassKey& aPK=aIt.Key(); + aNbMax=aPK.NbMax(); + pIds=(Standard_Integer*)aPK.Key(); + for (k=1; k<3; ++k) { + aNx=*(pIds+aNbMax-k); + aMBN.Add(aNx); + } + } + } + // + // inner nodes=all_nodes - boundary_nodes + j1=aNodes.Lower(); + j2=aNodes.Upper(); + for (j=j1; j<=j2; ++j) { + if (!aMBN.Contains(j)) { + aP=aNodes(j).Transformed(aTrsf); + aLP.Append(aP); + } + } + // + aNb=aLP.Extent(); + // + if (!aNb && myNbPntsMin) { + // try to fill it yourself + Standard_Boolean bIsDone; + Standard_Integer aN1, aN2; + Handle(Geom_Surface) aS; + GeomAdaptor_Surface aGAS; + GeomAbs_SurfaceType aType; + // + aS=BRep_Tool::Surface(aF); + aGAS.Load(aS); + aType=aGAS.GetType(); + if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder) { + // inner links + aNbLinks=aMPKI.Extent(); + aIt.Initialize(aMPKI); + for (; aIt.More(); aIt.Next()) { + iCnt=aIt.Value(); + if (iCnt>1) { + // take the first having occured inner link + // and discretize it + const GEOMAlgo_PassKey& aPK=aIt.Key(); + aNbMax=aPK.NbMax(); + pIds=(Standard_Integer*)aPK.Key(); + aN1=*(pIds+aNbMax-1); + aN2=*(pIds+aNbMax-2); + aP1=aNodes(aN1).Transformed(aTrsf); + aP2=aNodes(aN2).Transformed(aTrsf); + // + if (aType==GeomAbs_Cylinder) { + Standard_Real aTolSM; + gp_Cylinder aCyl; + // + aTolSM=1.523e-6;//~1.-cos(0.1 deg) + aCyl=aGAS.Cylinder(); + if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) { + continue; + } + } + // + BRepLib_MakeEdge aBME(aP1, aP2); + bIsDone=aBME.IsDone(); + if (!bIsDone) { + myErrorStatus=30; //can not obtain the line fron the link + return; + } + // + const TopoDS_Shape& aSx=aBME.Shape(); + const TopoDS_Edge& aE=TopoDS::Edge(aSx); + // + InnerPoints(aE, myNbPntsMin, aLP); + break; + }// if (iCnt>1) + }// for (; aIt.More(); aIt.Next()) + }// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder) + }// if (!aNb && myNbPntsMin) { +} +//======================================================================= +//function : InnerPoints +//purpose : +//======================================================================= +void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE, + GEOMAlgo_ListOfPnt& aLP) +{ + myErrorStatus=0; + // + Standard_Integer j, aNbNodes, aIndex, aNb; + Handle(Poly_PolygonOnTriangulation) aPTE; + Handle(Poly_Triangulation) aTRE; + TopLoc_Location aLoc; + gp_Pnt aP; + // + aLP.Clear(); + BRep_Tool::PolygonOnTriangulation(aE, aPTE, aTRE, aLoc); + if (aTRE.IsNull() || aPTE.IsNull()) { + myErrorStatus=20; // no triangulation found + return; + } + // + const gp_Trsf& aTrsf=aLoc.Transformation(); + const TColgp_Array1OfPnt& aNodes=aTRE->Nodes(); + // + aNbNodes=aPTE->NbNodes(); + const TColStd_Array1OfInteger& aInds=aPTE->Nodes(); + for (j=2; jD0(aT, aP); + aLP.Append(aP); + } +} + +//======================================================================= +//function : CheckData +//purpose : +//======================================================================= +void GEOMAlgo_FinderShapeOn1::CheckData() +{ + myErrorStatus=0; + // + if(mySurface.IsNull()) { + myErrorStatus=10; // mySurface=NULL + return; + } + // + if (myShape.IsNull()) { + myErrorStatus=11; // myShape=NULL + return; + } + // + if (!(myShapeType==TopAbs_VERTEX || + myShapeType==TopAbs_EDGE || + myShapeType==TopAbs_FACE || + myShapeType==TopAbs_SOLID)) { + myErrorStatus=12; // unallowed subshape type + return; + } + // + if (myState==GEOMAlgo_ST_UNKNOWN || + myState==GEOMAlgo_ST_INOUT) { + myErrorStatus=13; // unallowed state type + return; + } + // + GeomAbs_SurfaceType aType; + // + myGAS.Load(mySurface); + aType=myGAS.GetType(); + if (!(aType==GeomAbs_Plane || + aType==GeomAbs_Cylinder || + aType==GeomAbs_Sphere)) { + myErrorStatus=14; // unallowed surface type + } +} + +// +// myErrorStatus : +// +// 10 -mySurface=NULL +// 11 -myShape=NULL +// 12 -unallowed type of subshapes +// 13 -unallowed state +// 14 -unallowed surface type +// 15 -unallowed surface type +// 20- no triangulation found +// 30- can not obtain the line from the link + + +/* +// Chronometer +#include +#include + +Standard_STATIC(OSD_Chronometer, x_S_Chrono); +static void x_StartChrono(); +static void x_StopChrono(); +static Standard_Boolean x_IsToShow(); +// +//======================================================================= +//function : x_StartChrono +//purpose : +//======================================================================= +void x_StartChrono() +{ + if (x_IsToShow()){ + x_S_Chrono().Reset(); + x_S_Chrono().Start(); + } +} +//======================================================================= +//function : x_StopChrono +//purpose : +//======================================================================= +void x_StopChrono() +{ + if (x_IsToShow()){ + Standard_Real Chrono; + x_S_Chrono().Stop(); + x_S_Chrono().Show(Chrono); + printf(" Tps: %lf\n", Chrono); + //cout << "Tps: " << Chrono << endl; + } +} +//======================================================================= +//function : x_IsToShow +//purpose : +//======================================================================= +Standard_Boolean x_IsToShow() +{ + Standard_Boolean bFlag=Standard_False; + // + char *xr=getenv ("STDCHRONO"); + if (xr!=NULL){ + if (!strcmp (xr, "yes")) { + bFlag=!bFlag; + } + } + return bFlag; +} +*/ diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.hxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.hxx similarity index 68% rename from src/GEOMAlgo/GEOMAlgo_FinderShapeOn.hxx rename to src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.hxx index 42129bc28..975e80b69 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.hxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.hxx @@ -19,8 +19,8 @@ // the specific terms and conditions governing rights and limitations under the // License. -#ifndef _GEOMAlgo_FinderShapeOn_HeaderFile -#define _GEOMAlgo_FinderShapeOn_HeaderFile +#ifndef _GEOMAlgo_FinderShapeOn1_HeaderFile +#define _GEOMAlgo_FinderShapeOn1_HeaderFile #ifndef _Handle_Geom_Surface_HeaderFile #include @@ -31,28 +31,27 @@ #ifndef _GEOMAlgo_State_HeaderFile #include #endif -#ifndef _TopoDS_Shape_HeaderFile -#include +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _GeomAdaptor_Surface_HeaderFile +#include #endif #ifndef _TopTools_ListOfShape_HeaderFile #include #endif -#ifndef _TopTools_DataMapOfShapeShape_HeaderFile -#include -#endif #ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile #include #endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif #ifndef _GEOMAlgo_ShapeAlgo_HeaderFile #include #endif class Geom_Surface; class TopTools_ListOfShape; -class TopoDS_Shape; -class TopTools_DataMapOfShapeShape; +class TopoDS_Face; +class GEOMAlgo_ListOfPnt; +class TopoDS_Edge; +class GEOMAlgo_IndexedDataMapOfShapeState; #ifndef _Standard_HeaderFile @@ -62,7 +61,7 @@ class TopTools_DataMapOfShapeShape; #include #endif -class GEOMAlgo_FinderShapeOn : public GEOMAlgo_ShapeAlgo { +class GEOMAlgo_FinderShapeOn1 : public GEOMAlgo_ShapeAlgo { public: @@ -80,17 +79,21 @@ public: } // Methods PUBLIC // -Standard_EXPORT GEOMAlgo_FinderShapeOn(); -Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn(); -Standard_EXPORT virtual void Perform() ; +Standard_EXPORT GEOMAlgo_FinderShapeOn1(); +Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn1(); Standard_EXPORT void SetSurface(const Handle(Geom_Surface)& aS) ; Standard_EXPORT void SetShapeType(const TopAbs_ShapeEnum aST) ; Standard_EXPORT void SetState(const GEOMAlgo_State aSF) ; +Standard_EXPORT void SetNbPntsMin(const Standard_Integer aNb) ; +Standard_EXPORT Standard_Integer NbPntsMin() const; +Standard_EXPORT void SetNbPntsMax(const Standard_Integer aNb) ; +Standard_EXPORT Standard_Integer NbPntsMax() const; Standard_EXPORT const Handle_Geom_Surface& Surface() const; Standard_EXPORT TopAbs_ShapeEnum ShapeType() const; Standard_EXPORT GEOMAlgo_State State() const; +Standard_EXPORT virtual void Perform() ; Standard_EXPORT const TopTools_ListOfShape& Shapes() const; -Standard_EXPORT static void CopySource(const TopoDS_Shape& aS,TopTools_DataMapOfShapeShape& aImages,TopTools_DataMapOfShapeShape& aOriginals,TopoDS_Shape& aSC) ; +Standard_EXPORT const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const; @@ -101,11 +104,13 @@ protected: // Methods PROTECTED // Standard_EXPORT virtual void CheckData() ; -Standard_EXPORT void MakeArgument1() ; -Standard_EXPORT void MakeArgument2() ; -Standard_EXPORT void Find() ; -Standard_EXPORT void Find(const TopoDS_Shape& aS) ; -Standard_EXPORT void FindVertices() ; +Standard_EXPORT void ProcessVertices() ; +Standard_EXPORT void ProcessEdges() ; +Standard_EXPORT void ProcessFaces() ; +Standard_EXPORT void ProcessSolids() ; +Standard_EXPORT void InnerPoints(const TopoDS_Face& aF,GEOMAlgo_ListOfPnt& aLP) ; +Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,GEOMAlgo_ListOfPnt& aLP) ; +Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,const Standard_Integer aNbPnts,GEOMAlgo_ListOfPnt& aLP) ; // Fields PROTECTED @@ -113,12 +118,11 @@ Standard_EXPORT void FindVertices() ; Handle_Geom_Surface mySurface; TopAbs_ShapeEnum myShapeType; GEOMAlgo_State myState; -TopoDS_Shape myArg1; -TopoDS_Shape myArg2; +Standard_Integer myNbPntsMin; +Standard_Integer myNbPntsMax; +GeomAdaptor_Surface myGAS; TopTools_ListOfShape myLS; -TopTools_DataMapOfShapeShape myImages; GEOMAlgo_IndexedDataMapOfShapeState myMSS; -Standard_Boolean myIsAnalytic; private: diff --git a/src/GEOMAlgo/GEOMAlgo_SolidSolid.ixx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.ixx similarity index 96% rename from src/GEOMAlgo/GEOMAlgo_SolidSolid.ixx rename to src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.ixx index 9db5bd64f..6c8932859 100644 --- a/src/GEOMAlgo/GEOMAlgo_SolidSolid.ixx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.ixx @@ -19,7 +19,7 @@ // the specific terms and conditions governing rights and limitations under the // License. -#include +#include diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.jxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.jxx new file mode 100644 index 000000000..2dc017a38 --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.jxx @@ -0,0 +1,21 @@ +#ifndef _Geom_Surface_HeaderFile +#include +#endif +#ifndef _TopTools_ListOfShape_HeaderFile +#include +#endif +#ifndef _TopoDS_Face_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_ListOfPnt_HeaderFile +#include +#endif +#ifndef _TopoDS_Edge_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_FinderShapeOn1_HeaderFile +#include +#endif diff --git a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx index b2d4e7583..dfdc79c7c 100644 --- a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx +++ b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -242,8 +242,8 @@ TopoDS_Shape aNewShape; TopTools_IndexedMapOfShape aMF; TopTools_ListIteratorOfListOfShape aItS; - GEOMAlgo_PassKey aPKF; - GEOMAlgo_IndexedDataMapOfPassKeyListOfShape aMPKLF; + GEOMAlgo_PassKeyShape aPKF; + GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF; // TopExp::MapShapes(myShape, aType, aMF); // @@ -322,8 +322,8 @@ TopTools_IndexedDataMapOfShapeListOfShape aMFS; TopTools_IndexedMapOfShape aMx, aMS; TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm; - GEOMAlgo_IndexedDataMapOfPassKeyListOfShape aMPKLS; - GEOMAlgo_PassKey aPKSx; + GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLS; + GEOMAlgo_PassKeyShape aPKSx; GEOMAlgo_CoupleOfShapes aCS; // aBB.MakeCompound(aCmp); diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.cdl b/src/GEOMAlgo/GEOMAlgo_Gluer.cdl index a8c778b6e..00447584a 100755 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.cdl +++ b/src/GEOMAlgo/GEOMAlgo_Gluer.cdl @@ -20,7 +20,7 @@ uses DataMapOfShapeShape from TopTools, DataMapOfShapeListOfShape from TopTools, Context from IntTools, - PassKey from GEOMAlgo + PassKeyShape from GEOMAlgo --raises @@ -87,12 +87,12 @@ is EdgePassKey(me:out; aE:Edge from TopoDS; - aPK:out PassKey from GEOMAlgo) + aPK:out PassKeyShape from GEOMAlgo) is protected; FacePassKey(me:out; aF:Face from TopoDS; - aPK:out PassKey from GEOMAlgo) + aPK:out PassKeyShape from GEOMAlgo) is protected; MakeVertex(me:out; diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.cxx b/src/GEOMAlgo/GEOMAlgo_Gluer.cxx index 53f7a6957..76bba07cc 100755 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer.cxx @@ -58,8 +58,8 @@ #include #include -#include -#include +#include +#include #include // @@ -324,7 +324,7 @@ void GEOMAlgo_Gluer::MakeSolids() // aNbS=aMS.Extent(); if (aNbS) { - //Standard_Real aTol=1.e-7; + Standard_Real aTol=1.e-7; BOP_CorrectTolerances::CorrectCurveOnSurface(myResult); } } @@ -405,8 +405,8 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) TopoDS_Shape aNewShape; TopTools_IndexedMapOfShape aMF; TopTools_ListIteratorOfListOfShape aItS; - GEOMAlgo_PassKey aPKF; - GEOMAlgo_IndexedDataMapOfPassKeyListOfShape aMPKLF; + GEOMAlgo_PassKeyShape aPKF; + GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF; // TopExp::MapShapes(myShape, aType, aMF); // @@ -460,8 +460,6 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) // const TopoDS_Shape& aS1=aLSDF.First(); // - //modified by NIZNHY-PKV Fri Jan 21 15:34:00 2005 f - // bHasNewSubShape=Standard_True; // prevent creation of a new shape if there are not // new subshapes of aSS among the originals @@ -472,9 +470,8 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) aNewShape.Orientation(TopAbs_FORWARD); } } - //modified by NIZNHY-PKV Fri Jan 21 15:34:05 2005 t // - if (bHasNewSubShape) {//modified by NIZNHY-PKV Fri Jan 21 15:34:10 2005ft + if (bHasNewSubShape) { if (aType==TopAbs_FACE) { TopoDS_Face aNewFace; // @@ -604,7 +601,7 @@ void GEOMAlgo_Gluer::InnerTolerance() //purpose : //======================================================================= void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF, - GEOMAlgo_PassKey& aPK) + GEOMAlgo_PassKeyShape& aPK) { Standard_Integer i, aNbE, aNbMax; TopTools_ListOfShape aLE; @@ -634,7 +631,7 @@ void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF, //purpose : //======================================================================= void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE, - GEOMAlgo_PassKey& aPK) + GEOMAlgo_PassKeyShape& aPK) { TopoDS_Vertex aV1, aV2; // @@ -867,8 +864,6 @@ Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR, } return bRet; } -// -//modified by NIZNHY-PKV Fri Jan 21 10:55:42 2005 f //======================================================================= //function : HasNewSubShape //purpose : @@ -975,7 +970,6 @@ Standard_Boolean GEOMAlgo_Gluer::IsDeleted (const TopoDS_Shape& aS) // return bRet; } -//modified by NIZNHY-PKV Fri Jan 21 10:59:21 2005 t // // ErrorStatus // diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.hxx b/src/GEOMAlgo/GEOMAlgo_Gluer.hxx index 994b717fa..f37b8010c 100644 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.hxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer.hxx @@ -49,7 +49,7 @@ class TopTools_ListOfShape; class TopoDS_Shape; class TopoDS_Edge; -class GEOMAlgo_PassKey; +class GEOMAlgo_PassKeyShape; class TopoDS_Face; class TopoDS_Vertex; class TopTools_DataMapOfShapeListOfShape; @@ -110,8 +110,8 @@ Standard_EXPORT void MakeShapes(const TopAbs_ShapeEnum aType) ; Standard_EXPORT void MakeShells() ; Standard_EXPORT void MakeSolids() ; Standard_EXPORT void InnerTolerance() ; -Standard_EXPORT void EdgePassKey(const TopoDS_Edge& aE,GEOMAlgo_PassKey& aPK) ; -Standard_EXPORT void FacePassKey(const TopoDS_Face& aF,GEOMAlgo_PassKey& aPK) ; +Standard_EXPORT void EdgePassKey(const TopoDS_Edge& aE,GEOMAlgo_PassKeyShape& aPK) ; +Standard_EXPORT void FacePassKey(const TopoDS_Face& aF,GEOMAlgo_PassKeyShape& aPK) ; Standard_EXPORT void MakeVertex(const TopTools_ListOfShape& aLV,TopoDS_Vertex& aNewV) ; Standard_EXPORT void MakeEdge(const TopoDS_Edge& aEdge,TopoDS_Edge& aNewEdge) ; Standard_EXPORT void MakeFace(const TopoDS_Face& aFace,TopoDS_Face& aNewEdge) ; diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.jxx b/src/GEOMAlgo/GEOMAlgo_Gluer.jxx index a80b13204..62ed2afca 100644 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.jxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer.jxx @@ -7,8 +7,8 @@ #ifndef _TopoDS_Edge_HeaderFile #include #endif -#ifndef _GEOMAlgo_PassKey_HeaderFile -#include +#ifndef _GEOMAlgo_PassKeyShape_HeaderFile +#include #endif #ifndef _TopoDS_Face_HeaderFile #include diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx similarity index 74% rename from src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx rename to src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx index af09ac4f9..94b521fd1 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx @@ -20,18 +20,18 @@ // the specific terms and conditions governing rights and limitations under the // License. -#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile -#define _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile +#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile +#define _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile #ifndef _Standard_HeaderFile #include #endif -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile -#include +#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile +#include #endif -#ifndef _GEOMAlgo_PassKey_HeaderFile -#include +#ifndef _GEOMAlgo_PassKeyShape_HeaderFile +#include #endif #ifndef _Standard_Integer_HeaderFile #include @@ -45,13 +45,13 @@ #ifndef _TCollection_MapNode_HeaderFile #include #endif -class GEOMAlgo_PassKey; +class GEOMAlgo_PassKeyShape; class TopTools_ListOfShape; class GEOMAlgo_PassKeyMapHasher; -class GEOMAlgo_IndexedDataMapOfPassKeyListOfShape; +class GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape; -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape : public TCollection_MapNode { +class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape : public TCollection_MapNode { public: @@ -69,19 +69,19 @@ public: } // Methods PUBLIC // -GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape(const GEOMAlgo_PassKey& K1,const Standard_Integer K2,const TopTools_ListOfShape& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); - GEOMAlgo_PassKey& Key1() const; +GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape(const GEOMAlgo_PassKeyShape& K1,const Standard_Integer K2,const TopTools_ListOfShape& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); + GEOMAlgo_PassKeyShape& Key1() const; Standard_Integer& Key2() const; TCollection_MapNodePtr& Next2() const; TopTools_ListOfShape& Value() const; -Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape(); +Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_(); + Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; @@ -103,7 +103,7 @@ private: // Fields PRIVATE // -GEOMAlgo_PassKey myKey1; +GEOMAlgo_PassKeyShape myKey1; Standard_Integer myKey2; TopTools_ListOfShape myValue; TCollection_MapNodePtr myNext2; @@ -111,18 +111,18 @@ TCollection_MapNodePtr myNext2; }; -#define TheKey GEOMAlgo_PassKey -#define TheKey_hxx +#define TheKey GEOMAlgo_PassKeyShape +#define TheKey_hxx #define TheItem TopTools_ListOfShape #define TheItem_hxx #define Hasher GEOMAlgo_PassKeyMapHasher #define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMap_hxx +#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape +#define TCollection_IndexedDataMapNode_hxx +#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape +#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_Type_() +#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape +#define TCollection_IndexedDataMap_hxx #include diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx similarity index 65% rename from src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx rename to src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx index 97be9daa0..be0803d75 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx @@ -19,14 +19,14 @@ // the specific terms and conditions governing rights and limitations under the // License. -#include +#include #ifndef _Standard_TypeMismatch_HeaderFile #include #endif -#ifndef _GEOMAlgo_PassKey_HeaderFile -#include +#ifndef _GEOMAlgo_PassKeyShape_HeaderFile +#include #endif #ifndef _TopTools_ListOfShape_HeaderFile #include @@ -34,14 +34,14 @@ #ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile #include #endif -#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_HeaderFile -#include +#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile +#include #endif -GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape() {} +GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape() {} -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_() +Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_Type_() { static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); @@ -53,8 +53,8 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape", - sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape), + static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape", + sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape), 1, (Standard_Address)_Ancestors, (Standard_Address)NULL); @@ -66,38 +66,38 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa // DownCast method // allow safe downcasting // -const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)::DownCast(const Handle(Standard_Transient)& AnObject) +const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)::DownCast(const Handle(Standard_Transient)& AnObject) { - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) _anOtherObject; + Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) _anOtherObject; if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape))) { - _anOtherObject = Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)((Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)&)AnObject); + if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape))) { + _anOtherObject = Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)((Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)&)AnObject); } } return _anOtherObject ; } -const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape::DynamicType() const +const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::DynamicType() const { - return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) ; + return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) ; } -Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape::IsKind(const Handle(Standard_Type)& AType) const +Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::IsKind(const Handle(Standard_Type)& AType) const { - return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) == AType || TCollection_MapNode::IsKind(AType)); + return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) == AType || TCollection_MapNode::IsKind(AType)); } -Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape() {} -#define TheKey GEOMAlgo_PassKey -#define TheKey_hxx +Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape() {} +#define TheKey GEOMAlgo_PassKeyShape +#define TheKey_hxx #define TheItem TopTools_ListOfShape #define TheItem_hxx #define Hasher GEOMAlgo_PassKeyMapHasher #define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMap_hxx +#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape +#define TCollection_IndexedDataMapNode_hxx +#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape +#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_Type_() +#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape +#define TCollection_IndexedDataMap_hxx #include diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx similarity index 70% rename from src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx rename to src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx index e89044f20..55506997d 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx @@ -19,14 +19,14 @@ // the specific terms and conditions governing rights and limitations under the // License. -#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_HeaderFile -#define _GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_HeaderFile +#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile +#define _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile #ifndef _TCollection_BasicMap_HeaderFile #include #endif -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile -#include +#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile +#include #endif #ifndef _Standard_Integer_HeaderFile #include @@ -37,10 +37,10 @@ class Standard_DomainError; class Standard_OutOfRange; class Standard_NoSuchObject; -class GEOMAlgo_PassKey; +class GEOMAlgo_PassKeyShape; class TopTools_ListOfShape; class GEOMAlgo_PassKeyMapHasher; -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape; +class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape; #ifndef _Standard_HeaderFile @@ -50,7 +50,7 @@ class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape; #include #endif -class GEOMAlgo_IndexedDataMapOfPassKeyListOfShape : public TCollection_BasicMap { +class GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape : public TCollection_BasicMap { public: @@ -68,25 +68,25 @@ public: } // Methods PUBLIC // -Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyListOfShape(const Standard_Integer NbBuckets = 1); -Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& Assign(const GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& Other) ; - GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& operator =(const GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& Other) +Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape(const Standard_Integer NbBuckets = 1); +Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Assign(const GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Other) ; + GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& operator =(const GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Other) { return Assign(Other); } Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; Standard_EXPORT void Clear() ; -~GEOMAlgo_IndexedDataMapOfPassKeyListOfShape() +~GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape() { Clear(); } -Standard_EXPORT Standard_Integer Add(const GEOMAlgo_PassKey& K,const TopTools_ListOfShape& I) ; -Standard_EXPORT void Substitute(const Standard_Integer I,const GEOMAlgo_PassKey& K,const TopTools_ListOfShape& T) ; +Standard_EXPORT Standard_Integer Add(const GEOMAlgo_PassKeyShape& K,const TopTools_ListOfShape& I) ; +Standard_EXPORT void Substitute(const Standard_Integer I,const GEOMAlgo_PassKeyShape& K,const TopTools_ListOfShape& T) ; Standard_EXPORT void RemoveLast() ; -Standard_EXPORT Standard_Boolean Contains(const GEOMAlgo_PassKey& K) const; -Standard_EXPORT const GEOMAlgo_PassKey& FindKey(const Standard_Integer I) const; +Standard_EXPORT Standard_Boolean Contains(const GEOMAlgo_PassKeyShape& K) const; +Standard_EXPORT const GEOMAlgo_PassKeyShape& FindKey(const Standard_Integer I) const; Standard_EXPORT const TopTools_ListOfShape& FindFromIndex(const Standard_Integer I) const; const TopTools_ListOfShape& operator ()(const Standard_Integer I) const { @@ -99,9 +99,9 @@ Standard_EXPORT TopTools_ListOfShape& ChangeFromIndex(const Standard_Integer I return ChangeFromIndex(I); } -Standard_EXPORT Standard_Integer FindIndex(const GEOMAlgo_PassKey& K) const; -Standard_EXPORT const TopTools_ListOfShape& FindFromKey(const GEOMAlgo_PassKey& K) const; -Standard_EXPORT TopTools_ListOfShape& ChangeFromKey(const GEOMAlgo_PassKey& K) ; +Standard_EXPORT Standard_Integer FindIndex(const GEOMAlgo_PassKeyShape& K) const; +Standard_EXPORT const TopTools_ListOfShape& FindFromKey(const GEOMAlgo_PassKeyShape& K) const; +Standard_EXPORT TopTools_ListOfShape& ChangeFromKey(const GEOMAlgo_PassKeyShape& K) ; @@ -121,7 +121,7 @@ private: // Methods PRIVATE // -Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyListOfShape(const GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& Other); +Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape(const GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Other); // Fields PRIVATE diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx similarity index 75% rename from src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_0.cxx rename to src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx index 94bdc322b..8d5b2b3d9 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx @@ -19,7 +19,7 @@ // the specific terms and conditions governing rights and limitations under the // License. -#include +#include #ifndef _Standard_DomainError_HeaderFile #include @@ -30,8 +30,8 @@ #ifndef _Standard_NoSuchObject_HeaderFile #include #endif -#ifndef _GEOMAlgo_PassKey_HeaderFile -#include +#ifndef _GEOMAlgo_PassKeyShape_HeaderFile +#include #endif #ifndef _TopTools_ListOfShape_HeaderFile #include @@ -39,22 +39,22 @@ #ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile #include #endif -#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile -#include +#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile +#include #endif -#define TheKey GEOMAlgo_PassKey -#define TheKey_hxx +#define TheKey GEOMAlgo_PassKeyShape +#define TheKey_hxx #define TheItem TopTools_ListOfShape #define TheItem_hxx #define Hasher GEOMAlgo_PassKeyMapHasher #define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMap_hxx +#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape +#define TCollection_IndexedDataMapNode_hxx +#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape +#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_Type_() +#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape +#define TCollection_IndexedDataMap_hxx #include diff --git a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt.hxx b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt.hxx new file mode 100644 index 000000000..b370cbbd4 --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt.hxx @@ -0,0 +1,131 @@ +// 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_ListIteratorOfListOfPnt_HeaderFile +#define _GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile + +#ifndef _Standard_Address_HeaderFile +#include +#endif +#ifndef _Handle_GEOMAlgo_ListNodeOfListOfPnt_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_NoMoreObject; +class Standard_NoSuchObject; +class GEOMAlgo_ListOfPnt; +class gp_Pnt; +class GEOMAlgo_ListNodeOfListOfPnt; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class GEOMAlgo_ListIteratorOfListOfPnt { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT GEOMAlgo_ListIteratorOfListOfPnt(); +Standard_EXPORT GEOMAlgo_ListIteratorOfListOfPnt(const GEOMAlgo_ListOfPnt& L); +Standard_EXPORT void Initialize(const GEOMAlgo_ListOfPnt& L) ; + Standard_Boolean More() const; +Standard_EXPORT void Next() ; +Standard_EXPORT gp_Pnt& Value() const; + + +friend class GEOMAlgo_ListOfPnt; + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // +Standard_Address current; +Standard_Address previous; + + +}; + +#define Item gp_Pnt +#define Item_hxx +#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt +#define TCollection_ListNode_hxx +#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt +#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_() +#define TCollection_List GEOMAlgo_ListOfPnt +#define TCollection_List_hxx + +#include + +#undef Item +#undef Item_hxx +#undef TCollection_ListNode +#undef TCollection_ListNode_hxx +#undef TCollection_ListIterator +#undef TCollection_ListIterator_hxx +#undef Handle_TCollection_ListNode +#undef TCollection_ListNode_Type_ +#undef TCollection_List +#undef TCollection_List_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt_0.cxx new file mode 100644 index 000000000..bc1684b68 --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt_0.cxx @@ -0,0 +1,52 @@ +// 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 + +#ifndef _Standard_NoMoreObject_HeaderFile +#include +#endif +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_ListOfPnt_HeaderFile +#include +#endif +#ifndef _gp_Pnt_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_ListNodeOfListOfPnt_HeaderFile +#include +#endif + + +#define Item gp_Pnt +#define Item_hxx +#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt +#define TCollection_ListNode_hxx +#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt +#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_() +#define TCollection_List GEOMAlgo_ListOfPnt +#define TCollection_List_hxx +#include + diff --git a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx new file mode 100644 index 000000000..fd9b15d9a --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx @@ -0,0 +1,130 @@ +// 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_ListNodeOfListOfPnt_HeaderFile +#define _GEOMAlgo_ListNodeOfListOfPnt_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Handle_GEOMAlgo_ListNodeOfListOfPnt_HeaderFile +#include +#endif + +#ifndef _gp_Pnt_HeaderFile +#include +#endif +#ifndef _TCollection_MapNode_HeaderFile +#include +#endif +#ifndef _TCollection_MapNodePtr_HeaderFile +#include +#endif +class gp_Pnt; +class GEOMAlgo_ListOfPnt; +class GEOMAlgo_ListIteratorOfListOfPnt; + + +class GEOMAlgo_ListNodeOfListOfPnt : 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_ListNodeOfListOfPnt(const gp_Pnt& I,const TCollection_MapNodePtr& n); + gp_Pnt& Value() const; +Standard_EXPORT ~GEOMAlgo_ListNodeOfListOfPnt(); + + + + + // Type management + // + Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_ListNodeOfListOfPnt_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 + // +gp_Pnt myValue; + + +}; + +#define Item gp_Pnt +#define Item_hxx +#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt +#define TCollection_ListNode_hxx +#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt +#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_() +#define TCollection_List GEOMAlgo_ListOfPnt +#define TCollection_List_hxx + +#include + +#undef Item +#undef Item_hxx +#undef TCollection_ListNode +#undef TCollection_ListNode_hxx +#undef TCollection_ListIterator +#undef TCollection_ListIterator_hxx +#undef Handle_TCollection_ListNode +#undef TCollection_ListNode_Type_ +#undef TCollection_List +#undef TCollection_List_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt_0.cxx new file mode 100644 index 000000000..bb3473704 --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt_0.cxx @@ -0,0 +1,98 @@ +// 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 + +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _gp_Pnt_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_ListOfPnt_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile +#include +#endif +GEOMAlgo_ListNodeOfListOfPnt::~GEOMAlgo_ListNodeOfListOfPnt() {} + + + +Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ListNodeOfListOfPnt_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_ListNodeOfListOfPnt", + sizeof(GEOMAlgo_ListNodeOfListOfPnt), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + + +// DownCast method +// allow safe downcasting +// +const Handle(GEOMAlgo_ListNodeOfListOfPnt) Handle(GEOMAlgo_ListNodeOfListOfPnt)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMAlgo_ListNodeOfListOfPnt) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt))) { + _anOtherObject = Handle(GEOMAlgo_ListNodeOfListOfPnt)((Handle(GEOMAlgo_ListNodeOfListOfPnt)&)AnObject); + } + } + + return _anOtherObject ; +} +const Handle(Standard_Type)& GEOMAlgo_ListNodeOfListOfPnt::DynamicType() const +{ + return STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt) ; +} +Standard_Boolean GEOMAlgo_ListNodeOfListOfPnt::IsKind(const Handle(Standard_Type)& AType) const +{ + return (STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt) == AType || TCollection_MapNode::IsKind(AType)); +} +Handle_GEOMAlgo_ListNodeOfListOfPnt::~Handle_GEOMAlgo_ListNodeOfListOfPnt() {} +#define Item gp_Pnt +#define Item_hxx +#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt +#define TCollection_ListNode_hxx +#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt +#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_() +#define TCollection_List GEOMAlgo_ListOfPnt +#define TCollection_List_hxx +#include + diff --git a/src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx b/src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx new file mode 100644 index 000000000..270207654 --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx @@ -0,0 +1,157 @@ +// 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_ListOfPnt_HeaderFile +#define _GEOMAlgo_ListOfPnt_HeaderFile + +#ifndef _Standard_Address_HeaderFile +#include +#endif +#ifndef _Handle_GEOMAlgo_ListNodeOfListOfPnt_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_NoSuchObject; +class GEOMAlgo_ListIteratorOfListOfPnt; +class gp_Pnt; +class GEOMAlgo_ListNodeOfListOfPnt; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class GEOMAlgo_ListOfPnt { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT GEOMAlgo_ListOfPnt(); +Standard_EXPORT void Assign(const GEOMAlgo_ListOfPnt& Other) ; + void operator=(const GEOMAlgo_ListOfPnt& Other) +{ + Assign(Other); +} + +Standard_EXPORT Standard_Integer Extent() const; +Standard_EXPORT void Clear() ; +~GEOMAlgo_ListOfPnt() +{ + Clear(); +} + + Standard_Boolean IsEmpty() const; +Standard_EXPORT void Prepend(const gp_Pnt& I) ; +Standard_EXPORT void Prepend(const gp_Pnt& I,GEOMAlgo_ListIteratorOfListOfPnt& theIt) ; +Standard_EXPORT void Prepend(GEOMAlgo_ListOfPnt& Other) ; +Standard_EXPORT void Append(const gp_Pnt& I) ; +Standard_EXPORT void Append(const gp_Pnt& I,GEOMAlgo_ListIteratorOfListOfPnt& theIt) ; +Standard_EXPORT void Append(GEOMAlgo_ListOfPnt& Other) ; +Standard_EXPORT gp_Pnt& First() const; +Standard_EXPORT gp_Pnt& Last() const; +Standard_EXPORT void RemoveFirst() ; +Standard_EXPORT void Remove(GEOMAlgo_ListIteratorOfListOfPnt& It) ; +Standard_EXPORT void InsertBefore(const gp_Pnt& I,GEOMAlgo_ListIteratorOfListOfPnt& It) ; +Standard_EXPORT void InsertBefore(GEOMAlgo_ListOfPnt& Other,GEOMAlgo_ListIteratorOfListOfPnt& It) ; +Standard_EXPORT void InsertAfter(const gp_Pnt& I,GEOMAlgo_ListIteratorOfListOfPnt& It) ; +Standard_EXPORT void InsertAfter(GEOMAlgo_ListOfPnt& Other,GEOMAlgo_ListIteratorOfListOfPnt& It) ; + + +friend class GEOMAlgo_ListIteratorOfListOfPnt; + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // +Standard_EXPORT GEOMAlgo_ListOfPnt(const GEOMAlgo_ListOfPnt& Other); + + + // Fields PRIVATE + // +Standard_Address myFirst; +Standard_Address myLast; + + +}; + +#define Item gp_Pnt +#define Item_hxx +#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt +#define TCollection_ListNode_hxx +#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt +#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_() +#define TCollection_List GEOMAlgo_ListOfPnt +#define TCollection_List_hxx + +#include + +#undef Item +#undef Item_hxx +#undef TCollection_ListNode +#undef TCollection_ListNode_hxx +#undef TCollection_ListIterator +#undef TCollection_ListIterator_hxx +#undef Handle_TCollection_ListNode +#undef TCollection_ListNode_Type_ +#undef TCollection_List +#undef TCollection_List_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ListOfPnt_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListOfPnt_0.cxx new file mode 100644 index 000000000..4d8ff2b7d --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_ListOfPnt_0.cxx @@ -0,0 +1,49 @@ +// 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 + +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile +#include +#endif +#ifndef _gp_Pnt_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_ListNodeOfListOfPnt_HeaderFile +#include +#endif + + +#define Item gp_Pnt +#define Item_hxx +#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt +#define TCollection_ListNode_hxx +#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt +#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_() +#define TCollection_List GEOMAlgo_ListOfPnt +#define TCollection_List_hxx +#include + diff --git a/src/GEOMAlgo/GEOMAlgo_PassKey.cdl b/src/GEOMAlgo/GEOMAlgo_PassKey.cdl index fe864b984..5de666d17 100755 --- a/src/GEOMAlgo/GEOMAlgo_PassKey.cdl +++ b/src/GEOMAlgo/GEOMAlgo_PassKey.cdl @@ -11,40 +11,40 @@ class PassKey from GEOMAlgo uses Shape from TopoDS, - ListOfShape from TopTools + ListOfInteger from TColStd --raises is Create returns PassKey from GEOMAlgo; - + Assign(me:out; - Other : PassKey from GEOMAlgo) + Other : PassKey from GEOMAlgo) returns PassKey from GEOMAlgo; ---C++: alias operator = ---C++: return & - +-- SetIds(me:out; - aS :Shape from TopoDS); - + aI1 :Integer from Standard); + SetIds(me:out; - aS1 :Shape from TopoDS; - aS2 :Shape from TopoDS); - + aI1 :Integer from Standard; + aI2 :Integer from Standard); + SetIds(me:out; - aS1 :Shape from TopoDS; - aS2 :Shape from TopoDS; - aS3 :Shape from TopoDS); - - SetIds(me:out; - aS1 :Shape from TopoDS; - aS2 :Shape from TopoDS; - aS3 :Shape from TopoDS; - aS4 :Shape from TopoDS); - + aI1 :Integer from Standard; + aI2 :Integer from Standard; + aI3 :Integer from Standard); + + SetIds(me:out; + aI1 :Integer from Standard; + aI2 :Integer from Standard; + aI3 :Integer from Standard; + aI4 :Integer from Standard); + SetIds(me:out; - aLS :ListOfShape from TopTools); + aLS :ListOfInteger from TColStd); NbMax(me) returns Integer from Standard; @@ -64,6 +64,11 @@ is Upper : Integer from Standard) returns Integer from Standard; + Id(me; + aIndex: Integer from Standard) + returns Integer from Standard; + + Dump(me); fields @@ -72,7 +77,5 @@ fields myNbMax: Integer from Standard is protected; mySum : Integer from Standard is protected; myIds : Integer from Standard [8] is protected; - myShapes : Shape from TopoDS [8] is protected; - myUpper : Integer from Standard is protected; end PassKey; diff --git a/src/GEOMAlgo/GEOMAlgo_PassKey.cxx b/src/GEOMAlgo/GEOMAlgo_PassKey.cxx index 54a392cf7..61c70febb 100755 --- a/src/GEOMAlgo/GEOMAlgo_PassKey.cxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKey.cxx @@ -8,8 +8,7 @@ #include #include - -#include +#include #ifdef WNT #pragma warning( disable : 4101) @@ -17,6 +16,9 @@ static void SortShell(const int n, int* a); +static + Standard_Integer NormalizedId(const Standard_Integer aId, + const Standard_Integer aDiv); //======================================================================= //function : @@ -27,19 +29,6 @@ static Clear(); } //======================================================================= -//function :Clear -//purpose : -//======================================================================= - void GEOMAlgo_PassKey::Clear() -{ - myNbIds=0; - myNbMax=8; - mySum=0; - myIds[0]=0; myIds[1]=0; myIds[2]=0; myIds[3]=0; - myIds[4]=0; myIds[5]=0; myIds[6]=0; myIds[7]=0; - myUpper=432123;//2147483647; -} -//======================================================================= //function :Assign //purpose : //======================================================================= @@ -52,115 +41,140 @@ static return *this; } //======================================================================= +//function :Clear +//purpose : +//======================================================================= + void GEOMAlgo_PassKey::Clear() +{ + Standard_Integer i; + // + myNbIds=0; + myNbMax=8; + mySum=0; + for (i=0; i myNbMax) { + aNb=aLI.Extent(); + if (!aNb || aNb > myNbMax) { return; } // myNbIds=aNb; mySum=0; i=myNbMax-myNbIds; - aIt.Initialize(aLS); + aIt.Initialize(aLI); for (; aIt.More(); aIt.Next(), ++i) { - const TopoDS_Shape& aS=aIt.Value(); - anId=aS.HashCode(myUpper); + anId=aIt.Value(); myIds[i]=anId; - mySum+=anId; + aIdN=NormalizedId(anId, myNbIds); + mySum+=aIdN; } // Compute(); } //======================================================================= +//function :Id +//purpose : +//======================================================================= + Standard_Integer GEOMAlgo_PassKey::Id(const Standard_Integer aIndex)const +{ + if (aIndex < 0 || aIndex >= myNbMax) { + return 0; + } + return myIds[aIndex]; +} +//======================================================================= //function :NbMax //purpose : //======================================================================= @@ -206,7 +220,8 @@ static //======================================================================= Standard_Integer GEOMAlgo_PassKey::HashCode(const Standard_Integer Upper) const { - return (mySum % Upper); + //return (mySum % Upper); + return ::HashCode(mySum, Upper); } //======================================================================= //function : Dump @@ -223,6 +238,23 @@ static printf(" }"); } //======================================================================= +// function: NormalizedId +// purpose : +//======================================================================= +Standard_Integer NormalizedId(const Standard_Integer aId, + const Standard_Integer aDiv) +{ + Standard_Integer aMax, aTresh, aIdRet; + // + aIdRet=aId; + aMax=::IntegerLast(); + aTresh=aMax/aDiv; + if (aId>aTresh) { + aIdRet=aId%aTresh; + } + return aIdRet; +} +//======================================================================= // function: SortShell // purpose : //======================================================================= diff --git a/src/GEOMAlgo/GEOMAlgo_PassKey.hxx b/src/GEOMAlgo/GEOMAlgo_PassKey.hxx index ef1844e77..880fa62a9 100644 --- a/src/GEOMAlgo/GEOMAlgo_PassKey.hxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKey.hxx @@ -25,17 +25,13 @@ #ifndef _Standard_Integer_HeaderFile #include #endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Standard_Address_HeaderFile #include #endif -class TopoDS_Shape; -class TopTools_ListOfShape; +class TColStd_ListOfInteger; #ifndef _Standard_HeaderFile @@ -70,17 +66,18 @@ Standard_EXPORT GEOMAlgo_PassKey& Assign(const GEOMAlgo_PassKey& Other) ; return Assign(Other); } -Standard_EXPORT void SetIds(const TopoDS_Shape& aS) ; -Standard_EXPORT void SetIds(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ; -Standard_EXPORT void SetIds(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3) ; -Standard_EXPORT void SetIds(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3,const TopoDS_Shape& aS4) ; -Standard_EXPORT void SetIds(const TopTools_ListOfShape& aLS) ; +Standard_EXPORT void SetIds(const Standard_Integer aI1) ; +Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2) ; +Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2,const Standard_Integer aI3) ; +Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2,const Standard_Integer aI3,const Standard_Integer aI4) ; +Standard_EXPORT void SetIds(const TColStd_ListOfInteger& aLS) ; Standard_EXPORT Standard_Integer NbMax() const; Standard_EXPORT void Clear() ; Standard_EXPORT void Compute() ; Standard_EXPORT Standard_Boolean IsEqual(const GEOMAlgo_PassKey& aOther) const; Standard_EXPORT Standard_Address Key() const; Standard_EXPORT Standard_Integer HashCode(const Standard_Integer Upper) const; +Standard_EXPORT Standard_Integer Id(const Standard_Integer aIndex) const; Standard_EXPORT void Dump() const; @@ -99,8 +96,6 @@ Standard_Integer myNbIds; Standard_Integer myNbMax; Standard_Integer mySum; Standard_Integer myIds[8]; -TopoDS_Shape myShapes[8]; -Standard_Integer myUpper; private: diff --git a/src/GEOMAlgo/GEOMAlgo_PassKey.jxx b/src/GEOMAlgo/GEOMAlgo_PassKey.jxx index c66ea0df6..a96f71615 100644 --- a/src/GEOMAlgo/GEOMAlgo_PassKey.jxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKey.jxx @@ -1,8 +1,5 @@ -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include +#ifndef _TColStd_ListOfInteger_HeaderFile +#include #endif #ifndef _GEOMAlgo_PassKey_HeaderFile #include diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cdl b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cdl new file mode 100755 index 000000000..b0e1fe1d7 --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cdl @@ -0,0 +1,48 @@ +-- File: GEOMAlgo_PassKeyShape.cdl +-- Created: +-- Author: Peter KURNEV +-- +---Copyright: + + +class PassKeyShape from GEOMAlgo + inherits PassKey from GEOMAlgo + + ---Purpose: + +uses + Shape from TopoDS, + ListOfShape from TopTools + +--raises + +is + Create + returns PassKeyShape from GEOMAlgo; + + SetIds(me:out; + aS :Shape from TopoDS); + + SetIds(me:out; + aS1 :Shape from TopoDS; + aS2 :Shape from TopoDS); + + SetIds(me:out; + aS1 :Shape from TopoDS; + aS2 :Shape from TopoDS; + aS3 :Shape from TopoDS); + + SetIds(me:out; + aS1 :Shape from TopoDS; + aS2 :Shape from TopoDS; + aS3 :Shape from TopoDS; + aS4 :Shape from TopoDS); + + SetIds(me:out; + aLS :ListOfShape from TopTools); + + +fields + myUpper : Integer from Standard is protected; + +end PassKeyShape; diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx new file mode 100755 index 000000000..3b7e7f2d1 --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx @@ -0,0 +1,112 @@ +// File: GEOMAlgo_PassKeyShape.cxx +// Created: +// Author: Peter KURNEV +// + + +#include + +#include +#include + +#include +#include + +//======================================================================= +//function : +//purpose : +//======================================================================= + GEOMAlgo_PassKeyShape::GEOMAlgo_PassKeyShape() +: + GEOMAlgo_PassKey() +{ + myUpper=432123; + GEOMAlgo_PassKey::Clear(); +} +//======================================================================= +//function :SetIds +//purpose : +//======================================================================= + void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1) + +{ + Standard_Integer anId1; + // + anId1=aS1.HashCode(myUpper); + GEOMAlgo_PassKey::SetIds(anId1); +} +//======================================================================= +//function :SetIds +//purpose : +//======================================================================= + void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1, + const TopoDS_Shape& aS2) +{ + Standard_Integer anId1, anId2; + // + anId1=aS1.HashCode(myUpper); + anId2=aS2.HashCode(myUpper); + // + GEOMAlgo_PassKey::SetIds(anId1, anId2); +} +//======================================================================= +//function :SetIds +//purpose : +//======================================================================= + void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1, + const TopoDS_Shape& aS2, + const TopoDS_Shape& aS3) +{ + Standard_Integer anId1, anId2, anId3; + // + anId1=aS1.HashCode(myUpper); + anId2=aS2.HashCode(myUpper); + anId3=aS3.HashCode(myUpper); + // + GEOMAlgo_PassKey::SetIds(anId1, anId2, anId3); +} +//======================================================================= +//function :SetIds +//purpose : +//======================================================================= + void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1, + const TopoDS_Shape& aS2, + const TopoDS_Shape& aS3, + const TopoDS_Shape& aS4) +{ + Standard_Integer anId1, anId2, anId3, anId4; + // + anId1=aS1.HashCode(myUpper); + anId2=aS2.HashCode(myUpper); + anId3=aS3.HashCode(myUpper); + anId4=aS4.HashCode(myUpper); + // + GEOMAlgo_PassKey::SetIds(anId1, anId2, anId3, anId4); +} +//======================================================================= +//function :SetIds +//purpose : +//======================================================================= + void GEOMAlgo_PassKeyShape::SetIds(const TopTools_ListOfShape& aLS) +{ + Standard_Integer anId; + TopTools_ListIteratorOfListOfShape aIt; + TColStd_ListOfInteger aLI; + // + //aNb=aLS.Extent(); + //if (aNb<1 || aNb > myNbMax) { + // return; + //} + // + //myNbIds=aNb; + //mySum=0; + //i=myNbMax-myNbIds; + + aIt.Initialize(aLS); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aS=aIt.Value(); + anId=aS.HashCode(myUpper); + aLI.Append(anId); + } + GEOMAlgo_PassKey::SetIds(aLI); +} diff --git a/src/GEOMAlgo/GEOMAlgo_SolidSolid.hxx b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.hxx similarity index 67% rename from src/GEOMAlgo/GEOMAlgo_SolidSolid.hxx rename to src/GEOMAlgo/GEOMAlgo_PassKeyShape.hxx index 5a90d3135..9bb52df00 100644 --- a/src/GEOMAlgo/GEOMAlgo_SolidSolid.hxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.hxx @@ -19,16 +19,17 @@ // the specific terms and conditions governing rights and limitations under the // License. -#ifndef _GEOMAlgo_SolidSolid_HeaderFile -#define _GEOMAlgo_SolidSolid_HeaderFile +#ifndef _GEOMAlgo_PassKeyShape_HeaderFile +#define _GEOMAlgo_PassKeyShape_HeaderFile -#ifndef _TopoDS_Shape_HeaderFile -#include +#ifndef _Standard_Integer_HeaderFile +#include #endif -#ifndef _GEOMAlgo_ShellSolid_HeaderFile -#include +#ifndef _GEOMAlgo_PassKey_HeaderFile +#include #endif class TopoDS_Shape; +class TopTools_ListOfShape; #ifndef _Standard_HeaderFile @@ -38,7 +39,7 @@ class TopoDS_Shape; #include #endif -class GEOMAlgo_SolidSolid : public GEOMAlgo_ShellSolid { +class GEOMAlgo_PassKeyShape : public GEOMAlgo_PassKey { public: @@ -56,11 +57,12 @@ public: } // 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; +Standard_EXPORT GEOMAlgo_PassKeyShape(); +Standard_EXPORT void SetIds(const TopoDS_Shape& aS) ; +Standard_EXPORT void SetIds(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ; +Standard_EXPORT void SetIds(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3) ; +Standard_EXPORT void SetIds(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3,const TopoDS_Shape& aS4) ; +Standard_EXPORT void SetIds(const TopTools_ListOfShape& aLS) ; @@ -70,12 +72,11 @@ protected: // Methods PROTECTED // -Standard_EXPORT virtual void BuildResult() ; // Fields PROTECTED // -TopoDS_Shape myS2; +Standard_Integer myUpper; private: diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.ixx b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.ixx similarity index 96% rename from src/GEOMAlgo/GEOMAlgo_ShellSolid.ixx rename to src/GEOMAlgo/GEOMAlgo_PassKeyShape.ixx index f5b12e14e..befc4fd74 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.ixx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.ixx @@ -19,7 +19,7 @@ // the specific terms and conditions governing rights and limitations under the // License. -#include +#include diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.jxx b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.jxx new file mode 100644 index 000000000..f89527576 --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.jxx @@ -0,0 +1,9 @@ +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _TopTools_ListOfShape_HeaderFile +#include +#endif +#ifndef _GEOMAlgo_PassKeyShape_HeaderFile +#include +#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cdl b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cdl deleted file mode 100644 index c0dcdd422..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cdl +++ /dev/null @@ -1,48 +0,0 @@ --- File: GEOMAlgo_ShapeSolid.cdl --- Created: Thu Jan 13 12:44:07 2005 --- Author: Peter KURNEV --- ----Copyright: Matra Datavision 2005 - - -deferred class ShapeSolid from GEOMAlgo - inherits Algo from GEOMAlgo - - ---Purpose: - -uses - State from TopAbs, - ListOfShape from TopTools, - PDSFiller from BOPTools, - DSFiller from BOPTools ---raises - -is - Initialize - returns ShapeSolid from GEOMAlgo; - - - SetFiller(me:out; - aDSF:DSFiller from BOPTools); - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ShapeSolid();" - - - Shapes(me; - aState:State from TopAbs) - returns ListOfShape from TopTools; - ---C++: return const & - - BuildResult (me:out) - is deferred protected; - - Prepare(me:out) - is deferred protected; - -fields - myLSIN : ListOfShape from TopTools is protected; - myLSOUT : ListOfShape from TopTools is protected; - myLSON : ListOfShape from TopTools is protected; - myRank : Integer from Standard is protected; - myDSFiller : PDSFiller from BOPTools is protected; - -end ShapeSolid; diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx deleted file mode 100644 index e0cebcf23..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx +++ /dev/null @@ -1,61 +0,0 @@ -// File: GEOMAlgo_ShapeSolid.cxx -// Created: Thu Jan 13 12:54:48 2005 -// Author: Peter KURNEV -// - - -#include - -#include -#include - -//======================================================================= -//function : GEOMAlgo_ShapeSolid -//purpose : -//======================================================================= -GEOMAlgo_ShapeSolid::GEOMAlgo_ShapeSolid() -: - GEOMAlgo_Algo(), - myRank(0), - myDSFiller(NULL) -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_ShapeSolid::~GEOMAlgo_ShapeSolid() -{ -} -//======================================================================= -//function : SetFiller -//purpose : -//======================================================================= -void GEOMAlgo_ShapeSolid::SetFiller(const BOPTools_DSFiller& aDSFiller) -{ - myDSFiller=(BOPTools_DSFiller*) &aDSFiller; -} -//======================================================================= -// function: Shapes -// purpose: -//======================================================================= -const TopTools_ListOfShape& GEOMAlgo_ShapeSolid::Shapes(const TopAbs_State aState) const -{ - const TopTools_ListOfShape *pL; - // - switch (aState) { - case TopAbs_IN: - pL=&myLSIN; - break; - case TopAbs_OUT: - pL=&myLSOUT; - break; - case TopAbs_ON: - pL=&myLSON; - break; - default: - pL=&myLSON; - break; - } - return *pL; -} diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.jxx b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.jxx deleted file mode 100644 index d0cdc370f..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.jxx +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _BOPTools_DSFiller_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ShapeSolid_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.cdl b/src/GEOMAlgo/GEOMAlgo_ShellSolid.cdl deleted file mode 100644 index 7489b6a96..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.cdl +++ /dev/null @@ -1,34 +0,0 @@ --- File: GEOMAlgo_ShellSolid.cdl --- Created: Wed Jan 12 12:45:20 2005 --- Author: Peter KURNEV --- ----Copyright: Matra Datavision 2005 - - -class ShellSolid from GEOMAlgo - inherits ShapeSolid from GEOMAlgo - ---Purpose: - ---uses ---raises - -is - Create - returns ShellSolid from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ShellSolid();" - - Perform (me:out) - is redefined; - - Prepare(me:out) - is redefined protected; - - BuildResult (me:out) - is redefined protected; - - DetectSDFaces(me:out) - is protected; - ---fields - -end ShellSolid; diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx b/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx deleted file mode 100644 index e7da2ac05..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx +++ /dev/null @@ -1,350 +0,0 @@ -// File: GEOMAlgo_ShellSolid.cxx -// Created: Wed Jan 12 12:49:45 2005 -// Author: Peter KURNEV -// - - -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_ShellSolid -//purpose : -//======================================================================= -GEOMAlgo_ShellSolid::GEOMAlgo_ShellSolid() -: - GEOMAlgo_ShapeSolid() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_ShellSolid::~GEOMAlgo_ShellSolid() -{ -} -//======================================================================= -// function: -// purpose: -//======================================================================= -void GEOMAlgo_ShellSolid::Perform() -{ - myErrorStatus=0; - // - try { - if (myDSFiller==NULL) { - myErrorStatus=10; - return; - } - if(!myDSFiller->IsDone()) { - myErrorStatus=11; - return; - } - // - Standard_Boolean bIsNewFiller; - // - bIsNewFiller=myDSFiller->IsNewFiller(); - if (bIsNewFiller) { - Prepare(); - myDSFiller->SetNewFiller(!bIsNewFiller); - } - // - myRank=(myDSFiller->DS().Object().ShapeType()==TopAbs_SHELL) ? 1 : 2; - BuildResult(); - } - catch (Standard_Failure) { - myErrorStatus=12; - } -} -//======================================================================= -// function: Prepare -// purpose: -//======================================================================= -void GEOMAlgo_ShellSolid::Prepare() -{ - const BOPTools_PaveFiller& aPaveFiller=myDSFiller->PaveFiller(); - // - // 1 States - BOPTools_SolidStateFiller aStateFiller(aPaveFiller); - aStateFiller.Do(); - // - // 2 Project section edges on corresp. faces -> P-Curves on edges. - BOPTools_PCurveMaker aPCurveMaker(aPaveFiller); - aPCurveMaker.Do(); - // - // 3. Degenerated Edges Processing - BOPTools_DEProcessor aDEProcessor(aPaveFiller); - aDEProcessor.Do(); - // - // 4. Detect Same Domain Faces - DetectSDFaces(); -} -//================================================================================= -// function: BuildResult -// purpose: -//================================================================================= -void GEOMAlgo_ShellSolid::BuildResult() -{ - Standard_Boolean bIsTouchCase; - Standard_Integer i, j, nF1, nF2, aNbFFs, aNbS, aNbCurves, nSp, iRank1; - Standard_Integer nE, nF, aNbPB, iBeg, iEnd; - BooleanOperations_StateOfShape aState; - TopExp_Explorer anExp; - TopAbs_ShapeEnum aType; - gp_Pnt2d aP2D; - gp_Pnt aP3D; - // - const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS(); - const BOPTools_InterferencePool& anInterfPool=myDSFiller->InterfPool(); - BOPTools_InterferencePool* pInterfPool=(BOPTools_InterferencePool*) &anInterfPool; - BOPTools_CArray1OfSSInterference& aFFs=pInterfPool->SSInterferences(); - const BOPTools_PaveFiller& aPaveFiller=myDSFiller->PaveFiller(); - const BOPTools_SplitShapesPool& aSplitShapesPool=aPaveFiller.SplitShapesPool(); - // - // 1. process pf non-interferring faces - iBeg=1; - iEnd=aDS.NumberOfShapesOfTheObject(); - if (myRank==2) { - iBeg=iEnd+1; - iEnd=aDS.NumberOfSourceShapes(); - } - // - for (i=iBeg; i<=iEnd; ++i) { - aType=aDS.GetShapeType(i); - if (aType!=TopAbs_FACE) { - continue; - } - // - const TopoDS_Face& aF1=TopoDS::Face(aDS.Shape(i)); - aState=aDS.GetState(i); - if (aState==BooleanOperations_IN) { - myLSIN.Append(aF1); - } - else if (aState==BooleanOperations_OUT) { - myLSOUT.Append(aF1); - } - } - // - // 2. process pf interferred faces - aNbFFs=aFFs.Extent(); - for (i=1; i<=aNbFFs; ++i) { - BOPTools_SSInterference& aFFi=aFFs(i); - // - nF1=aFFi.Index1(); - nF2=aFFi.Index2(); - iRank1=aDS.Rank(nF1); - nF=(iRank1==myRank) ? nF1 : nF2; - const TopoDS_Face& aF1=TopoDS::Face(aDS.Shape(nF)); - // - bIsTouchCase=aFFi.IsTangentFaces(); - // - if (bIsTouchCase) { - myLSON.Append(aF1); - continue; - } - // - // Has section edges ? - aNbS=0; - BOPTools_SequenceOfCurves& aBCurves=aFFi.Curves(); - aNbCurves=aBCurves.Length(); - for (j=1; j<=aNbCurves; j++) { - BOPTools_Curve& aBC=aBCurves(j); - const BOPTools_ListOfPaveBlock& aSectEdges=aBC.NewPaveBlocks(); - aNbS=aSectEdges.Extent(); - if (aNbS) { - break; - } - } - // - if (aNbS) { // it has - continue; - } - // - anExp.Init(aF1, TopAbs_EDGE); - for (; anExp.More(); anExp.Next()) { - const TopoDS_Edge& aE=TopoDS::Edge(anExp.Current()); - if (BRep_Tool::Degenerated(aE)) { - continue; - } - // - nE=aDS.ShapeIndex(aE, myRank); - const BOPTools_ListOfPaveBlock& aLPB=aSplitShapesPool(aDS.RefEdge(nE)); - aNbPB=aLPB.Extent(); - // - if (aNbPB<2) { - nSp=nE; - if (aNbPB) { - const BOPTools_PaveBlock& aPB=aLPB.First(); - nSp=aPB.Edge(); - } - const TopoDS_Shape& aSp=aDS.Shape(nSp); - // - aState=aDS.GetState(nSp); - if (aState==BooleanOperations_IN) { - myLSIN.Append(aF1); - } - else if (aState==BooleanOperations_OUT) { - myLSOUT.Append(aF1); - } - else if (aState==BooleanOperations_ON) { - Standard_Real aTol; - TopAbs_State aSt; - // - //const TopoDS_Face& aF2=TopoDS::Face(aDS.Shape((iRank1==myRank)? nF2 : nF1)); - //aTol=BRep_Tool::Tolerance(aF2); - aTol=1.e-7; - // - BOPTools_Tools3D::PointNearEdge(aE, aF1, aP2D, aP3D); - const TopoDS_Solid& aRefSolid=(myRank==1) ? - TopoDS::Solid(aDS.Tool()) : TopoDS::Solid(aDS.Object()); - // - BOPTools_PaveFiller* pPF=(BOPTools_PaveFiller*)& aPaveFiller; - IntTools_Context& aCtx=pPF->ChangeContext(); - // - BRepClass3d_SolidClassifier& aSC=aCtx.SolidClassifier(aRefSolid); - aSC.Perform(aP3D, aTol); - aSt=aSC.State(); - if (aSt==TopAbs_IN) { - myLSIN.Append(aF1); - } - else if (aSt==TopAbs_OUT) { - myLSOUT.Append(aF1); - } - } - break; - } // if (aNbPB<2) { - } //for (; anExp.More(); anExp.Next()) - } -} -//======================================================================= -// function: DetectSDFaces -// purpose: -//======================================================================= -void GEOMAlgo_ShellSolid::DetectSDFaces() -{ - const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS(); - BOPTools_InterferencePool* pIntrPool=(BOPTools_InterferencePool*)&myDSFiller->InterfPool(); - BOPTools_CArray1OfSSInterference& aFFs=pIntrPool->SSInterferences(); - // - Standard_Boolean bFlag; - Standard_Integer i, aNb, nF1, nF2, iZone, aNbSps, iSenseFlag; - gp_Dir aDNF1, aDNF2; - - aNb=aFFs.Extent(); - for (i=1; i<=aNb; i++) { - bFlag=Standard_False; - - BOPTools_SSInterference& aFF=aFFs(i); - - nF1=aFF.Index1(); - nF2=aFF.Index2(); - const TopoDS_Face& aF1=TopoDS::Face(aDS.Shape(nF1)); - const TopoDS_Face& aF2=TopoDS::Face(aDS.Shape(nF2)); - // - // iSenseFlag; - const BOPTools_ListOfPaveBlock& aLPB=aFF.PaveBlocks(); - aNbSps=aLPB.Extent(); - - if (!aNbSps) { - continue; - } - - const BOPTools_PaveBlock& aPB=aLPB.First(); - const TopoDS_Edge& aSpE=TopoDS::Edge(aDS.Shape(aPB.Edge())); - - BOPTools_Tools3D::GetNormalToFaceOnEdge (aSpE, aF1, aDNF1); - BOPTools_Tools3D::GetNormalToFaceOnEdge (aSpE, aF2, aDNF2); - iSenseFlag=BOPTools_Tools3D::SenseFlag (aDNF1, aDNF2); - // - if (iSenseFlag==1 || iSenseFlag==-1) { - // - // - TopoDS_Face aF1FWD=aF1; - aF1FWD.Orientation (TopAbs_FORWARD); - - BOP_WireEdgeSet aWES (aF1FWD); - BOP_SDFWESFiller aWESFiller(nF1, nF2, *myDSFiller); - aWESFiller.SetSenseFlag(iSenseFlag); - aWESFiller.SetOperation(BOP_COMMON); - aWESFiller.Do(aWES); - - BOP_FaceBuilder aFB; - aFB.Do(aWES); - const TopTools_ListOfShape& aLF=aFB.NewFaces(); - - iZone=0; - TopTools_ListIteratorOfListOfShape anIt(aLF); - for (; anIt.More(); anIt.Next()) { - const TopoDS_Shape& aFR=anIt.Value(); - - if (aFR.ShapeType()==TopAbs_FACE) { - const TopoDS_Face& aFaceResult=TopoDS::Face(aFR); - // - Standard_Boolean bIsValidIn2D, bNegativeFlag; - bIsValidIn2D=BOPTools_Tools3D::IsValidArea (aFaceResult, bNegativeFlag); - if (bIsValidIn2D) { - //if(CheckSameDomainFaceInside(aFaceResult, aF2)) { - iZone=1; - break; - //} - } - // - } - } - - if (iZone) { - bFlag=Standard_True; - aFF.SetStatesMap(aWESFiller.StatesMap()); - } - - }// if (iSenseFlag) - - aFF.SetTangentFacesFlag(bFlag); - aFF.SetSenseFlag (iSenseFlag); - }// end of for (i=1; i<=aNb; i++) -} diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx b/src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx deleted file mode 100644 index 16415ecc7..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx +++ /dev/null @@ -1,96 +0,0 @@ -// 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_ShellSolid_HeaderFile -#define _GEOMAlgo_ShellSolid_HeaderFile - -#ifndef _GEOMAlgo_ShapeSolid_HeaderFile -#include -#endif - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -class GEOMAlgo_ShellSolid : public GEOMAlgo_ShapeSolid { - -public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } - // Methods PUBLIC - // -Standard_EXPORT GEOMAlgo_ShellSolid(); -Standard_EXPORT virtual ~GEOMAlgo_ShellSolid(); -Standard_EXPORT virtual void Perform() ; - - - - - -protected: - - // Methods PROTECTED - // -Standard_EXPORT virtual void Prepare() ; -Standard_EXPORT virtual void BuildResult() ; -Standard_EXPORT void DetectSDFaces() ; - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.jxx b/src/GEOMAlgo/GEOMAlgo_ShellSolid.jxx deleted file mode 100644 index e9afe6d41..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.jxx +++ /dev/null @@ -1,3 +0,0 @@ -#ifndef _GEOMAlgo_ShellSolid_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl b/src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl deleted file mode 100644 index 3634282e8..000000000 --- a/src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl +++ /dev/null @@ -1,39 +0,0 @@ --- File: GEOMAlgo_SolidSolid.cdl --- Created: Wed Jan 26 12:05:14 2005 --- Author: Peter KURNEV --- ----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; diff --git a/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx b/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx deleted file mode 100644 index c4596bdb0..000000000 --- a/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx +++ /dev/null @@ -1,182 +0,0 @@ -// File: GEOMAlgo_SolidSolid.cxx -// Created: Wed Jan 26 12:06:26 2005 -// Author: Peter KURNEV -// - - -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include - -//======================================================================= -//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 -#endif -#ifndef _GEOMAlgo_SolidSolid_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_StateCollector.cdl b/src/GEOMAlgo/GEOMAlgo_StateCollector.cdl new file mode 100644 index 000000000..7919dbd2e --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_StateCollector.cdl @@ -0,0 +1,31 @@ +-- File: GEOMAlgo_StateCollector.cdl +-- Created: Thu Mar 10 09:39:25 2005 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2005 + + +class StateCollector from GEOMAlgo + + ---Purpose: + +uses + State from TopAbs + +--raises + +is + Create + returns StateCollector from GEOMAlgo; + + AppendState(me:out; + aSt:State from TopAbs) + returns Boolean from Standard; + + State(me) + returns State from TopAbs; + +fields + myCounter:Integer from Standard[3]; + +end StateCollector; diff --git a/src/GEOMAlgo/GEOMAlgo_StateCollector.cxx b/src/GEOMAlgo/GEOMAlgo_StateCollector.cxx new file mode 100644 index 000000000..1e754ff88 --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_StateCollector.cxx @@ -0,0 +1,71 @@ +// File: GEOMAlgo_StateCollector.cxx +// Created: Thu Mar 10 09:42:11 2005 +// Author: Peter KURNEV +// + + +#include + +//======================================================================= +//function : GEOMAlgo_StateCollector +//purpose : +//======================================================================= +GEOMAlgo_StateCollector::GEOMAlgo_StateCollector() +{ + myCounter[0]=0; + myCounter[1]=0; + myCounter[2]=0; +} +//======================================================================= +//function : AppendState +//purpose : +//======================================================================= +Standard_Boolean GEOMAlgo_StateCollector::AppendState(const TopAbs_State aSt) +{ + Standard_Boolean bIsToBreak; + // + switch(aSt) { + case TopAbs_IN: + ++myCounter[0]; + break; + case TopAbs_OUT: + ++myCounter[1]; + break; + case TopAbs_ON: + ++myCounter[2]; + break; + default: + break; + } + bIsToBreak=(myCounter[0] && myCounter[1]); + // + return bIsToBreak; +} +//======================================================================= +//function : State +//purpose : +//======================================================================= +TopAbs_State GEOMAlgo_StateCollector::State()const +{ + TopAbs_State aSt; + // + aSt=TopAbs_UNKNOWN; + // + if (myCounter[0] && myCounter[1]) { + return aSt; + } + // + else if (myCounter[0] && myCounter[2]>=0) { + aSt=TopAbs_IN; + } + // + else if (myCounter[1] && myCounter[2]>=0) { + aSt=TopAbs_OUT; + } + // + else if (!myCounter[0] && !myCounter[1] && myCounter[2]) { + aSt=TopAbs_ON; + } + // + return aSt; +} diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.hxx b/src/GEOMAlgo/GEOMAlgo_StateCollector.hxx similarity index 76% rename from src/GEOMAlgo/GEOMAlgo_WireSolid.hxx rename to src/GEOMAlgo/GEOMAlgo_StateCollector.hxx index 7212908dc..3c1e25bfe 100644 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.hxx +++ b/src/GEOMAlgo/GEOMAlgo_StateCollector.hxx @@ -19,11 +19,17 @@ // the specific terms and conditions governing rights and limitations under the // License. -#ifndef _GEOMAlgo_WireSolid_HeaderFile -#define _GEOMAlgo_WireSolid_HeaderFile +#ifndef _GEOMAlgo_StateCollector_HeaderFile +#define _GEOMAlgo_StateCollector_HeaderFile -#ifndef _GEOMAlgo_ShapeSolid_HeaderFile -#include +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +#ifndef _TopAbs_State_HeaderFile +#include #endif @@ -34,7 +40,7 @@ #include #endif -class GEOMAlgo_WireSolid : public GEOMAlgo_ShapeSolid { +class GEOMAlgo_StateCollector { public: @@ -52,9 +58,9 @@ public: } // Methods PUBLIC // -Standard_EXPORT GEOMAlgo_WireSolid(); -Standard_EXPORT virtual ~GEOMAlgo_WireSolid(); -Standard_EXPORT virtual void Perform() ; +Standard_EXPORT GEOMAlgo_StateCollector(); +Standard_EXPORT Standard_Boolean AppendState(const TopAbs_State aSt) ; +Standard_EXPORT TopAbs_State State() const; @@ -64,8 +70,6 @@ protected: // Methods PROTECTED // -Standard_EXPORT virtual void Prepare() ; -Standard_EXPORT virtual void BuildResult() ; // Fields PROTECTED @@ -80,6 +84,7 @@ private: // Fields PRIVATE // +Standard_Integer myCounter[3]; }; diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.ixx b/src/GEOMAlgo/GEOMAlgo_StateCollector.ixx similarity index 96% rename from src/GEOMAlgo/GEOMAlgo_ShapeSolid.ixx rename to src/GEOMAlgo/GEOMAlgo_StateCollector.ixx index 1ef447531..d3cb9c3cf 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.ixx +++ b/src/GEOMAlgo/GEOMAlgo_StateCollector.ixx @@ -19,7 +19,7 @@ // the specific terms and conditions governing rights and limitations under the // License. -#include +#include diff --git a/src/GEOMAlgo/GEOMAlgo_StateCollector.jxx b/src/GEOMAlgo/GEOMAlgo_StateCollector.jxx new file mode 100644 index 000000000..3fe123afc --- /dev/null +++ b/src/GEOMAlgo/GEOMAlgo_StateCollector.jxx @@ -0,0 +1,3 @@ +#ifndef _GEOMAlgo_StateCollector_HeaderFile +#include +#endif diff --git a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl index f5ffe9e42..8242aca94 100644 --- a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl +++ b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl @@ -15,21 +15,38 @@ uses Cylinder from gp, Sphere from gp, Surface from Geom, + Surface from GeomAdaptor, State from TopAbs, State from GEOMAlgo --raises is + + IsAnalytic(myclass; aS:Surface from Geom) returns Boolean from Standard; - + + IsCoaxial(myclass; + aP1 : Pnt from gp; + aP2 : Pnt from gp; + aCyl : Cylinder from gp; + aTol : Real from Standard) + returns Boolean from Standard; + IsConformState(myclass; aST1:State from TopAbs; aST2:State from GEOMAlgo) returns Boolean from Standard; + GetState(myclass; + aP:Pnt from gp; + aS:Surface from GeomAdaptor; + aTol:Real from Standard; + aSt:out State from TopAbs) + returns Integer from Standard; + GetState(myclass; aP:Pnt from gp; aS:Surface from Geom; diff --git a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx index b07749692..16b20746d 100644 --- a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx +++ b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx @@ -6,6 +6,8 @@ #include +#include + #include #include #include @@ -13,30 +15,31 @@ #include #include #include +#include +#include #include #include + //======================================================================= //function : GetState //purpose : //======================================================================= Standard_Integer GEOMAlgo_SurfaceTools::GetState(const gp_Pnt& aP, - const Handle(Geom_Surface)& aSurf, + const GeomAdaptor_Surface& aGAS, 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) { @@ -76,6 +79,25 @@ return iErr; } //======================================================================= +//function : GetState +//purpose : +//======================================================================= + Standard_Integer GEOMAlgo_SurfaceTools::GetState(const gp_Pnt& aP, + const Handle(Geom_Surface)& aSurf, + const Standard_Real aTol, + TopAbs_State& aState) +{ + Standard_Integer iErr; + GeomAdaptor_Surface aGAS; + // + aState=TopAbs_UNKNOWN; + aGAS.Load(aSurf); + // + iErr=GEOMAlgo_SurfaceTools::GetState(aP, aGAS, aTol, aState); + // + return iErr; +} +//======================================================================= //function : ReverseState //purpose : //======================================================================= @@ -103,9 +125,8 @@ Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, const gp_Sphere& aSph) { - Standard_Real aD, aR; + Standard_Real aD; // - aR=aSph.Radius(); const gp_Pnt& aLoc=aSph.Location(); aD=aLoc.Distance(aP); // @@ -118,9 +139,8 @@ Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, const gp_Cylinder& aCyl) { - Standard_Real aD, aR; + Standard_Real aD; // - aR=aCyl.Radius(); const gp_Ax1& aAxis=aCyl.Axis(); gp_Lin aLin(aAxis); aD=aLin.Distance(aP); @@ -146,6 +166,31 @@ Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, return aD; } //======================================================================= +//function : IsCoaxial +//purpose : +//======================================================================= +Standard_Boolean GEOMAlgo_SurfaceTools::IsCoaxial(const gp_Pnt& aP1, + const gp_Pnt& aP2, + const gp_Cylinder& aCyl, + const Standard_Real aTol) +{ + Standard_Boolean bRet=Standard_False; + Standard_Real aSM; + // + gp_Vec aV12(aP1, aP2); + gp_Dir aD12(aV12); + // + const gp_Ax1& aAxis=aCyl.Axis(); + const gp_Dir& aDAxis=aAxis.Direction(); + // + aSM=fabs(aD12*aDAxis); + if (fabs(1.-aSM) > aTol) { + return bRet; + } + // + return !bRet; +} +//======================================================================= //function : IsAnalytic //purpose : //======================================================================= diff --git a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx index 94b8c2d80..19f616025 100644 --- a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx +++ b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx @@ -28,6 +28,9 @@ #ifndef _Handle_Geom_Surface_HeaderFile #include #endif +#ifndef _Standard_Real_HeaderFile +#include +#endif #ifndef _TopAbs_State_HeaderFile #include #endif @@ -37,13 +40,11 @@ #ifndef _Standard_Integer_HeaderFile #include #endif -#ifndef _Standard_Real_HeaderFile -#include -#endif class Geom_Surface; class gp_Pnt; -class gp_Pln; class gp_Cylinder; +class GeomAdaptor_Surface; +class gp_Pln; class gp_Sphere; @@ -73,7 +74,9 @@ public: // Methods PUBLIC // Standard_EXPORT static Standard_Boolean IsAnalytic(const Handle(Geom_Surface)& aS) ; +Standard_EXPORT static Standard_Boolean IsCoaxial(const gp_Pnt& aP1,const gp_Pnt& aP2,const gp_Cylinder& aCyl,const Standard_Real aTol) ; Standard_EXPORT static Standard_Boolean IsConformState(const TopAbs_State aST1,const GEOMAlgo_State aST2) ; +Standard_EXPORT static Standard_Integer GetState(const gp_Pnt& aP,const GeomAdaptor_Surface& aS,const Standard_Real aTol,TopAbs_State& aSt) ; Standard_EXPORT static Standard_Integer GetState(const gp_Pnt& aP,const Handle(Geom_Surface)& aS,const Standard_Real aTol,TopAbs_State& aSt) ; Standard_EXPORT static Standard_Real Distance(const gp_Pnt& aP,const gp_Pln& aPln) ; Standard_EXPORT static Standard_Real Distance(const gp_Pnt& aP,const gp_Cylinder& aCyl) ; diff --git a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx index 061597445..ceb961740 100644 --- a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx +++ b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx @@ -4,12 +4,15 @@ #ifndef _gp_Pnt_HeaderFile #include #endif -#ifndef _gp_Pln_HeaderFile -#include -#endif #ifndef _gp_Cylinder_HeaderFile #include #endif +#ifndef _GeomAdaptor_Surface_HeaderFile +#include +#endif +#ifndef _gp_Pln_HeaderFile +#include +#endif #ifndef _gp_Sphere_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_Tools.cdl b/src/GEOMAlgo/GEOMAlgo_Tools.cdl index 7b50b0c39..922d14a14 100644 --- a/src/GEOMAlgo/GEOMAlgo_Tools.cdl +++ b/src/GEOMAlgo/GEOMAlgo_Tools.cdl @@ -19,7 +19,7 @@ uses ListOfShape from TopTools, IndexedDataMapOfShapeListOfShape from TopTools, Context from IntTools, - IndexedDataMapOfPassKeyListOfShape from GEOMAlgo + IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo --raises @@ -29,7 +29,7 @@ is returns Boolean from Standard; RefineSDShapes(myclass; - aMSD:out IndexedDataMapOfPassKeyListOfShape from GEOMAlgo; + aMSD:out IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo; aTol:Real from Standard; aCtx:out Context from IntTools) returns Integer from Standard; diff --git a/src/GEOMAlgo/GEOMAlgo_Tools.cxx b/src/GEOMAlgo/GEOMAlgo_Tools.cxx index e9f4df621..1a4437b7f 100644 --- a/src/GEOMAlgo/GEOMAlgo_Tools.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Tools.cxx @@ -33,8 +33,8 @@ #include #include -#include -#include +#include +#include static void GetCount(const TopoDS_Shape& aS, @@ -88,7 +88,7 @@ void GetCount(const TopoDS_Shape& aS, //function : RefineSDShapes //purpose : //======================================================================= -Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyListOfShape &aMPKLE, +Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape &aMPKLE, const Standard_Real aTol, IntTools_Context& aCtx) { @@ -132,7 +132,7 @@ Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKey } // for (i=1; i<=aNbToAdd; ++i) { - GEOMAlgo_PassKey aPKE1; + GEOMAlgo_PassKeyShape aPKE1; // const TopoDS_Shape& aE1=aMEToAdd.FindKey(i); const TopTools_ListOfShape& aLE=aMEToAdd(i); diff --git a/src/GEOMAlgo/GEOMAlgo_Tools.hxx b/src/GEOMAlgo/GEOMAlgo_Tools.hxx index 947c0c8bd..73d9bc35f 100644 --- a/src/GEOMAlgo/GEOMAlgo_Tools.hxx +++ b/src/GEOMAlgo/GEOMAlgo_Tools.hxx @@ -35,7 +35,7 @@ #include #endif class TopoDS_Shape; -class GEOMAlgo_IndexedDataMapOfPassKeyListOfShape; +class GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape; class IntTools_Context; class TopTools_ListOfShape; class TopTools_IndexedDataMapOfShapeListOfShape; @@ -71,7 +71,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 RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& 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) ; Standard_EXPORT static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1,const TopoDS_Shape& aS,gp_Pnt& aP2,IntTools_Context& aCtx) ; diff --git a/src/GEOMAlgo/GEOMAlgo_Tools.jxx b/src/GEOMAlgo/GEOMAlgo_Tools.jxx index e22f3c3ea..379b7f298 100644 --- a/src/GEOMAlgo/GEOMAlgo_Tools.jxx +++ b/src/GEOMAlgo/GEOMAlgo_Tools.jxx @@ -1,8 +1,8 @@ #ifndef _TopoDS_Shape_HeaderFile #include #endif -#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_HeaderFile -#include +#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile +#include #endif #ifndef _IntTools_Context_HeaderFile #include diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cdl b/src/GEOMAlgo/GEOMAlgo_VertexSolid.cdl deleted file mode 100644 index 9a7c6232a..000000000 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cdl +++ /dev/null @@ -1,32 +0,0 @@ --- File: GEOMAlgo_VertexSolid.cdl --- Created: Wed Jan 12 16:34:53 2005 --- Author: Peter KURNEV --- ----Copyright: Matra Datavision 2005 - - -class VertexSolid from GEOMAlgo - inherits ShapeSolid from GEOMAlgo - - ---Purpose: - ---uses ---raises - -is - Create - returns VertexSolid from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_VertexSolid();" - - Perform (me:out) - is redefined; - - Prepare(me:out) - is redefined protected; - - BuildResult (me:out) - is redefined protected; - ---fields - -end VertexSolid; diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx b/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx deleted file mode 100644 index 1257362ed..000000000 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx +++ /dev/null @@ -1,219 +0,0 @@ -// File: GEOMAlgo_VertexSolid.cxx -// Created: Wed Jan 12 16:36:40 2005 -// Author: Peter KURNEV -// - - -#include - -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include - -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_VertexSolid -//purpose : -//======================================================================= -GEOMAlgo_VertexSolid::GEOMAlgo_VertexSolid() -: - GEOMAlgo_ShapeSolid() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_VertexSolid::~GEOMAlgo_VertexSolid() -{ -} -//======================================================================= -// function: Perform -// purpose: -//======================================================================= -void GEOMAlgo_VertexSolid::Perform() -{ - myErrorStatus=0; - // - try { - if (myDSFiller==NULL) { - myErrorStatus=10; - return; - } - if(!myDSFiller->IsDone()) { - myErrorStatus=11; - return; - } - // - Standard_Boolean bIsNewFiller; - Standard_Integer aNbF; - TopTools_IndexedMapOfShape aM; - // - const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS(); - const TopoDS_Shape& aObj=aDS.Object(); - // - TopExp::MapShapes(aObj, TopAbs_FACE, aM); - aNbF=aM.Extent(); - myRank=(aNbF) ? 2 : 1; - // - bIsNewFiller=myDSFiller->IsNewFiller(); - - if (bIsNewFiller) { - Prepare(); - myDSFiller->SetNewFiller(!bIsNewFiller); - } - BuildResult(); - } - // - catch (Standard_Failure) { - myErrorStatus = 12; - } -} -//======================================================================= -// function: Prepare -// purpose: -//======================================================================= -void GEOMAlgo_VertexSolid::Prepare() -{ - Standard_Integer i, iBeg, iEnd, aNbVV, j, n1, n2, iFound; - Standard_Real aTol; - TopAbs_State aSt; - TopAbs_ShapeEnum aType; - BooleanOperations_StateOfShape aState; - gp_Pnt aP3D; - // - const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS(); - BooleanOperations_ShapesDataStructure* pDS=(BooleanOperations_ShapesDataStructure*)&aDS; - const BOPTools_InterferencePool& aIP=myDSFiller->InterfPool(); - BOPTools_InterferencePool* pIP=(BOPTools_InterferencePool*) &aIP; - BOPTools_CArray1OfVVInterference& aVVs=pIP->VVInterferences(); - const BOPTools_PaveFiller& aPF=myDSFiller->PaveFiller(); - BOPTools_PaveFiller* pPF=(BOPTools_PaveFiller*)&aPF; - IntTools_Context& aCtx=pPF->ChangeContext(); - // - const TopoDS_Shape& aObj=aDS.Object(); - const TopoDS_Shape& aTool=aDS.Tool(); - // - const TopoDS_Solid& aSolid=(myRank==1) ? TopoDS::Solid(aTool) : TopoDS::Solid(aObj); - const TopoDS_Shape& aSV =(myRank==1)? aObj : aTool; - // - BRepClass3d_SolidClassifier& aSC=aCtx.SolidClassifier(aSolid); - // - iBeg=1; - iEnd=aDS.NumberOfShapesOfTheObject(); - if (myRank==2) { - iBeg=iEnd+1; - iEnd=aDS.NumberOfSourceShapes(); - } - // - for (i=iBeg; i<=iEnd; ++i) { - aType=aDS.GetShapeType(i); - if (aType!=TopAbs_VERTEX) { - continue; - } - // - const TopoDS_Vertex& aV=TopoDS::Vertex(aDS.Shape(i)); - // - aState=aDS.GetState(i); - if (aState==BooleanOperations_ON || - aState==BooleanOperations_IN || - aState==BooleanOperations_OUT) { - continue; - } - // - iFound=0; - aNbVV=aVVs.Extent(); - for (j=1; j<=aNbVV; ++j) { - BOPTools_VVInterference& aVV=aVVs(j); - aVV.Indices(n1, n2); - if (n1==i || n2==i) { - pDS->SetState (n1, BooleanOperations_ON); - pDS->SetState (n2, BooleanOperations_ON); - iFound=1; - break; - } - } - if (iFound) { - continue; - } - // - aP3D=BRep_Tool::Pnt(aV); - aTol=1.E-7; - aSC.Perform(aP3D, aTol); - aSt=aSC.State(); - if (aSt==TopAbs_IN) { - pDS->SetState (i, BooleanOperations_IN); - } - else if (aSt==TopAbs_OUT) { - pDS->SetState (i, BooleanOperations_OUT); - } - } -} -//======================================================================= -// function: BuildResult -// purpose: -//======================================================================= -void GEOMAlgo_VertexSolid::BuildResult() -{ - const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS(); - // - Standard_Integer i, iBeg, iEnd; - TopAbs_ShapeEnum aType; - BooleanOperations_StateOfShape aState; - // - myLSIN.Clear(); - myLSOUT.Clear(); - myLSON.Clear(); - // - iBeg=1; - iEnd=aDS.NumberOfShapesOfTheObject(); - if (myRank==2) { - iBeg=iEnd+1; - iEnd=aDS.NumberOfSourceShapes(); - } - // - for (i=iBeg; i<=iEnd; ++i) { - aType=aDS.GetShapeType(i); - if (aType!=TopAbs_VERTEX) { - continue; - } - const TopoDS_Shape& aV=aDS.Shape(i); - aState=aDS.GetState(i); - // - if (aState==BooleanOperations_IN) { - myLSIN.Append(aV); - } - else if (aState==BooleanOperations_OUT) { - myLSOUT.Append(aV); - } - else if (aState==BooleanOperations_ON) { - myLSON.Append(aV); - } - } -} diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx b/src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx deleted file mode 100644 index 103c7f2f6..000000000 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx +++ /dev/null @@ -1,95 +0,0 @@ -// 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_VertexSolid_HeaderFile -#define _GEOMAlgo_VertexSolid_HeaderFile - -#ifndef _GEOMAlgo_ShapeSolid_HeaderFile -#include -#endif - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -class GEOMAlgo_VertexSolid : public GEOMAlgo_ShapeSolid { - -public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } - // Methods PUBLIC - // -Standard_EXPORT GEOMAlgo_VertexSolid(); -Standard_EXPORT virtual ~GEOMAlgo_VertexSolid(); -Standard_EXPORT virtual void Perform() ; - - - - - -protected: - - // Methods PROTECTED - // -Standard_EXPORT virtual void Prepare() ; -Standard_EXPORT virtual void BuildResult() ; - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.ixx b/src/GEOMAlgo/GEOMAlgo_VertexSolid.ixx deleted file mode 100644 index e2351fef2..000000000 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.ixx +++ /dev/null @@ -1,26 +0,0 @@ -// 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 - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.jxx b/src/GEOMAlgo/GEOMAlgo_VertexSolid.jxx deleted file mode 100644 index 8c7c253e9..000000000 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.jxx +++ /dev/null @@ -1,3 +0,0 @@ -#ifndef _GEOMAlgo_VertexSolid_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.cdl b/src/GEOMAlgo/GEOMAlgo_WireSolid.cdl deleted file mode 100644 index d85db1291..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.cdl +++ /dev/null @@ -1,31 +0,0 @@ --- File: GEOMAlgo_WireSolid.cdl --- Created: Wed Jan 12 10:17:00 2005 --- Author: Peter KURNEV --- ----Copyright: Matra Datavision 2005 - - -class WireSolid from GEOMAlgo - inherits ShapeSolid from GEOMAlgo - ---Purpose: - ---uses ---raises - -is - Create - returns WireSolid from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_WireSolid();" - - Perform (me:out) - is redefined; - - Prepare(me:out) - is redefined protected; - - BuildResult (me:out) - is redefined protected; - ---fields - -end WireSolid; diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx b/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx deleted file mode 100644 index faaf3612f..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx +++ /dev/null @@ -1,152 +0,0 @@ -// File: GEOMAlgo_WireSolid.cxx -// Created: Wed Jan 12 10:19:31 2005 -// Author: Peter KURNEV -// - - -#include - -#include - -#include - -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_WireSolid -//purpose : -//======================================================================= -GEOMAlgo_WireSolid::GEOMAlgo_WireSolid() -: - GEOMAlgo_ShapeSolid() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_WireSolid::~GEOMAlgo_WireSolid() -{ -} -//======================================================================= -// function: Perform -// purpose: -//======================================================================= -void GEOMAlgo_WireSolid::Perform() -{ - myErrorStatus=0; - // - try { - if (myDSFiller==NULL) { - myErrorStatus=10; - return; - } - if(!myDSFiller->IsDone()) { - myErrorStatus=11; - return; - } - // - Standard_Boolean bIsNewFiller; - // - bIsNewFiller=myDSFiller->IsNewFiller(); - - if (bIsNewFiller) { - Prepare(); - myDSFiller->SetNewFiller(!bIsNewFiller); - } - BuildResult(); - } - // - catch (Standard_Failure) { - myErrorStatus= 12; - } -} -//======================================================================= -// function: Prepare -// purpose: -//======================================================================= -void GEOMAlgo_WireSolid::Prepare() -{ - const BOPTools_PaveFiller& aPaveFiller=myDSFiller->PaveFiller(); - // - BOPTools_WireStateFiller aStateFiller(aPaveFiller); - aStateFiller.Do(); - // -} -//======================================================================= -// function: BuildResult -// purpose: -//======================================================================= -void GEOMAlgo_WireSolid::BuildResult() -{ - const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS(); - const BOPTools_PaveFiller& aPaveFiller=myDSFiller->PaveFiller(); - const BOPTools_SplitShapesPool& aSplitShapesPool=aPaveFiller.SplitShapesPool(); - // - Standard_Integer i, aNbPB, nSp, iBeg, iEnd; - TopAbs_ShapeEnum aType; - BooleanOperations_StateOfShape aState; - // - myLSIN.Clear(); - myLSOUT.Clear(); - myLSON.Clear(); - // - iBeg=1; - iEnd=aDS.NumberOfShapesOfTheObject(); - if (aDS.Tool().ShapeType()==TopAbs_WIRE) { - iBeg=iEnd+1; - iEnd=aDS.NumberOfSourceShapes(); - } - // - for (i=iBeg; i<=iEnd; ++i) { - aType=aDS.GetShapeType(i); - if (aType==TopAbs_EDGE) { - const TopoDS_Shape& aE=aDS.Shape(i); - const BOPTools_ListOfPaveBlock& aLPB=aSplitShapesPool(aDS.RefEdge(i)); - aNbPB=aLPB.Extent(); - // - if (!aNbPB) { - aState=aDS.GetState(i); - // - if (aState==BooleanOperations_IN) { - myLSIN.Append(aE); - } - else if (aState==BooleanOperations_OUT) { - myLSOUT.Append(aE); - } - else if (aState==BooleanOperations_ON) { - myLSON.Append(aE); - } - } - // - else if (aNbPB==1) { - const BOPTools_PaveBlock& aPB=aLPB.First(); - nSp=aPB.Edge(); - const TopoDS_Shape& aSp=aDS.Shape(nSp); - aState=aDS.GetState(nSp); - // - if (aState==BooleanOperations_IN) { - myLSIN.Append(aE); - } - else if (aState==BooleanOperations_OUT) { - myLSOUT.Append(aE); - } - else if (aState==BooleanOperations_ON) { - myLSON.Append(aE); - } - } - } - } -} diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.ixx b/src/GEOMAlgo/GEOMAlgo_WireSolid.ixx deleted file mode 100644 index 37b35b408..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.ixx +++ /dev/null @@ -1,26 +0,0 @@ -// 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 - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.jxx b/src/GEOMAlgo/GEOMAlgo_WireSolid.jxx deleted file mode 100644 index a37f27e72..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.jxx +++ /dev/null @@ -1,3 +0,0 @@ -#ifndef _GEOMAlgo_WireSolid_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx new file mode 100644 index 000000000..9e15b517b --- /dev/null +++ b/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx @@ -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_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile +#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Handle_TCollection_MapNode_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TCollection_MapNode); +class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger); + +class Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) : 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_DataMapNodeOfDataMapOfPassKeyInteger)():Handle(TCollection_MapNode)() {} + Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)(const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle) + { + } + + Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)(const GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) + { + } + + Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)& operator=(const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)& operator=(const GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger* operator->() + { + return (GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger *)ControlAccess(); + } + + GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger* operator->() const + { + return (GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)(); + + Standard_EXPORT static const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) DownCast(const Handle(Standard_Transient)& AnObject); +}; +#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx similarity index 59% rename from src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx rename to src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx index e246513bc..dd43aac0c 100644 --- a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx +++ b/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx @@ -19,8 +19,8 @@ // the specific terms and conditions governing rights and limitations under the // License. -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile -#define _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile +#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile +#define _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile #ifndef _Standard_Macro_HeaderFile #include @@ -36,10 +36,10 @@ class Standard_Transient; class Handle_Standard_Type; class Handle(TCollection_MapNode); -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape); +class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape); -class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) : public Handle(TCollection_MapNode) { +class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) : public Handle(TCollection_MapNode) { public: void* operator new(size_t,void* anAddress) { @@ -53,39 +53,39 @@ class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) : { if (anAddress) Standard::Free((Standard_Address&)anAddress); } - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)():Handle(TCollection_MapNode)() {} - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle) + Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)():Handle(TCollection_MapNode)() {} + Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle) { } - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) + Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) { } - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)& operator=(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)& aHandle) + Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)& operator=(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)& aHandle) { Assign(aHandle.Access()); return *this; } - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)& operator=(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape* anItem) + Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)& operator=(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape* anItem) { Assign((Standard_Transient *)anItem); return *this; } - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape* operator->() + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape* operator->() { - return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape *)ControlAccess(); + return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape *)ControlAccess(); } - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape* operator->() const + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape* operator->() const { - return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape *)ControlAccess(); + return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape *)ControlAccess(); } - Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)(); + Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)(); - Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) DownCast(const Handle(Standard_Transient)& AnObject); + Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) DownCast(const Handle(Standard_Transient)& AnObject); }; #endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx new file mode 100644 index 000000000..d073a4ceb --- /dev/null +++ b/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx @@ -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_ListNodeOfListOfPnt_HeaderFile +#define _Handle_GEOMAlgo_ListNodeOfListOfPnt_HeaderFile + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Handle_TCollection_MapNode_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TCollection_MapNode); +class GEOMAlgo_ListNodeOfListOfPnt; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt); + +class Handle(GEOMAlgo_ListNodeOfListOfPnt) : public Handle(TCollection_MapNode) { + public: + 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_ListNodeOfListOfPnt)():Handle(TCollection_MapNode)() {} + Handle(GEOMAlgo_ListNodeOfListOfPnt)(const Handle(GEOMAlgo_ListNodeOfListOfPnt)& aHandle) : Handle(TCollection_MapNode)(aHandle) + { + } + + Handle(GEOMAlgo_ListNodeOfListOfPnt)(const GEOMAlgo_ListNodeOfListOfPnt* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) + { + } + + Handle(GEOMAlgo_ListNodeOfListOfPnt)& operator=(const Handle(GEOMAlgo_ListNodeOfListOfPnt)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMAlgo_ListNodeOfListOfPnt)& operator=(const GEOMAlgo_ListNodeOfListOfPnt* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMAlgo_ListNodeOfListOfPnt* operator->() + { + return (GEOMAlgo_ListNodeOfListOfPnt *)ControlAccess(); + } + + GEOMAlgo_ListNodeOfListOfPnt* operator->() const + { + return (GEOMAlgo_ListNodeOfListOfPnt *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMAlgo_ListNodeOfListOfPnt)(); + + Standard_EXPORT static const Handle(GEOMAlgo_ListNodeOfListOfPnt) DownCast(const Handle(Standard_Transient)& AnObject); +}; +#endif diff --git a/src/GEOMAlgo/Makefile.in b/src/GEOMAlgo/Makefile.in index 0af9311f1..934d12095 100644 --- a/src/GEOMAlgo/Makefile.in +++ b/src/GEOMAlgo/Makefile.in @@ -36,61 +36,64 @@ VPATH=.:@srcdir@ # Libraries targets LIB = libGEOMAlgo.la LIB_SRC = \ + BlockFix.cxx \ + BlockFix_BlockFixAPI.cxx \ + BlockFix_CheckTool.cxx \ + BlockFix_PeriodicSurfaceModifier.cxx \ + BlockFix_SphereSpaceModifier.cxx \ + BlockFix_UnionEdges.cxx \ + BlockFix_UnionFaces.cxx \ GEOMAlgo_Algo.cxx \ GEOMAlgo_CoupleOfShapes.cxx \ + GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx \ + GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx \ + GEOMAlgo_DataMapOfPassKeyInteger_0.cxx \ + GEOMAlgo_FinderShapeOn1.cxx \ GEOMAlgo_GlueAnalyser.cxx \ GEOMAlgo_Gluer.cxx \ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx \ - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx \ + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx \ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx \ + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx \ GEOMAlgo_IndexedDataMapOfIntegerShape_0.cxx \ - GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_0.cxx \ + GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx \ GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx \ + GEOMAlgo_IndexedDataMapOfShapeState_0.cxx \ GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_0.cxx \ + GEOMAlgo_ListIteratorOfListOfPnt_0.cxx \ GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx \ + GEOMAlgo_ListNodeOfListOfPnt_0.cxx \ GEOMAlgo_ListOfCoupleOfShapes_0.cxx \ + GEOMAlgo_ListOfPnt_0.cxx \ GEOMAlgo_PassKey.cxx \ GEOMAlgo_PassKeyMapHasher.cxx \ + GEOMAlgo_PassKeyShape.cxx \ GEOMAlgo_ShapeAlgo.cxx \ - GEOMAlgo_Tools.cxx \ - BlockFix.cxx \ - BlockFix_BlockFixAPI.cxx \ - BlockFix_CheckTool.cxx \ - BlockFix_PeriodicSurfaceModifier.cxx \ - BlockFix_SphereSpaceModifier.cxx \ - BlockFix_UnionEdges.cxx \ - BlockFix_UnionFaces.cxx \ - GEOMAlgo_FinderShapeOn.cxx \ - GEOMAlgo_ShapeSolid.cxx \ - GEOMAlgo_ShellSolid.cxx \ - GEOMAlgo_VertexSolid.cxx \ - GEOMAlgo_WireSolid.cxx \ - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx \ - GEOMAlgo_IndexedDataMapOfShapeState_0.cxx \ - GEOMAlgo_SolidSolid.cxx \ - GEOMAlgo_SurfaceTools.cxx + GEOMAlgo_StateCollector.cxx \ + GEOMAlgo_SurfaceTools.cxx \ + GEOMAlgo_Tools.cxx LIB_CLIENT_IDL = LIB_SERVER_IDL = # header files EXPORT_HEADERS = \ - GEOMAlgo_Gluer.hxx \ - GEOMAlgo_ShapeAlgo.hxx \ - GEOMAlgo_Algo.hxx \ - GEOMAlgo_GlueAnalyser.hxx \ - GEOMAlgo_CoupleOfShapes.hxx \ - GEOMAlgo_ListOfCoupleOfShapes.hxx \ - GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx \ - Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx \ BlockFix_BlockFixAPI.hxx \ BlockFix_BlockFixAPI.lxx \ BlockFix_CheckTool.hxx \ Handle_BlockFix_BlockFixAPI.hxx \ - GEOMAlgo_State.hxx \ - GEOMAlgo_FinderShapeOn.hxx \ + GEOMAlgo_Algo.hxx \ + GEOMAlgo_CoupleOfShapes.hxx \ + GEOMAlgo_GlueAnalyser.hxx \ + GEOMAlgo_Gluer.hxx \ + GEOMAlgo_FinderShapeOn1.hxx \ GEOMAlgo_IndexedDataMapOfShapeState.hxx \ - Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx + GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx \ + GEOMAlgo_ListOfCoupleOfShapes.hxx \ + GEOMAlgo_ShapeAlgo.hxx \ + GEOMAlgo_State.hxx \ + Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx \ + Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx # idl files EXPORT_IDLS= diff --git a/src/GEOMImpl/GEOMImpl_IGroupOperations.cxx b/src/GEOMImpl/GEOMImpl_IGroupOperations.cxx index f4bedb504..12b1602ed 100644 --- a/src/GEOMImpl/GEOMImpl_IGroupOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IGroupOperations.cxx @@ -457,6 +457,149 @@ void GEOMImpl_IGroupOperations::DifferenceList (Handle(GEOM_Object) theGroup, SetErrorCode(OK); } +//============================================================================= +/*! + * UnionIDs + */ +//============================================================================= +void GEOMImpl_IGroupOperations::UnionIDs (Handle(GEOM_Object) theGroup, + const Handle(TColStd_HSequenceOfInteger)& theSubShapes) +{ + SetErrorCode(KO); + if (theGroup.IsNull()) return; + + Handle(GEOM_Function) aFunction = theGroup->GetFunction(1); + if (aFunction.IsNull()) return; + + GEOM_ISubShape aSSI (aFunction); + + // New contents of the group + TColStd_ListOfInteger aNewIDs; + TColStd_MapOfInteger mapIDs; + + // Add current IDs to the list + Handle(TColStd_HArray1OfInteger) aSeq = aSSI.GetIndices(); + if (aSeq.IsNull()) return; + Standard_Integer val_j, aLength = aSeq->Length(); + + for (Standard_Integer j = 1; j <= aLength; j++) { + val_j = aSeq->Value(j); + if (val_j > 0 && mapIDs.Add(val_j)) { + aNewIDs.Append(val_j); + } + } + + // Get Main Shape + Handle(GEOM_Function) aMainShapeFunc = aSSI.GetMainShape(); + if (aMainShapeFunc.IsNull()) return; + TDF_Label aLabel = aMainShapeFunc->GetOwnerEntry(); + if (aLabel.IsRoot()) return; + Handle(GEOM_Object) aMainObj = GEOM_Object::GetObject(aLabel); + if (aMainObj.IsNull()) return; + TopoDS_Shape aMainShape = aMainObj->GetValue(); + if (aMainShape.IsNull()) return; + + TopTools_IndexedMapOfShape mapIndices; + TopExp::MapShapes(aMainShape, mapIndices); + + // Get IDs of sub-shapes to add + Standard_Integer i, new_id, aLen = theSubShapes->Length(); + for (i = 1; i <= aLen; i++) { + new_id = theSubShapes->Value(i); + + if (0 < new_id && new_id <= mapIndices.Extent()) { + if (mapIDs.Add(new_id)) { + aNewIDs.Append(new_id); + } + } + } + + if (aNewIDs.Extent() > 0) { + Standard_Integer k = 1; + TColStd_ListIteratorOfListOfInteger aNewIDsIter (aNewIDs); + Handle(TColStd_HArray1OfInteger) aNewSeq = new TColStd_HArray1OfInteger(1, aNewIDs.Extent()); + for (; aNewIDsIter.More(); aNewIDsIter.Next(), k++) { + aNewSeq->SetValue(k, aNewIDsIter.Value()); + } + + aSSI.SetIndices(aNewSeq); + } + + SetErrorCode(OK); +} + +//============================================================================= +/*! + * DifferenceIDs + */ +//============================================================================= +void GEOMImpl_IGroupOperations::DifferenceIDs (Handle(GEOM_Object) theGroup, + const Handle(TColStd_HSequenceOfInteger)& theSubShapes) +{ + SetErrorCode(KO); + if (theGroup.IsNull()) return; + + Handle(GEOM_Function) aFunction = theGroup->GetFunction(1); + if (aFunction.IsNull()) return; + + GEOM_ISubShape aSSI (aFunction); + + // Map of IDs to be removed + TColStd_MapOfInteger mapIDsToRemove; + + // Map of current IDs + Handle(TColStd_HArray1OfInteger) aSeq = aSSI.GetIndices(); + if (aSeq.IsNull()) return; + Standard_Integer aLength = aSeq->Length(); + + if (aLength == 1 && aSeq->Value(1) == -1) // empty group + return; + + TColStd_MapOfInteger mapIDsCurrent; + Standard_Integer j = 1; + for (; j <= aLength; j++) { + mapIDsCurrent.Add(aSeq->Value(j)); + } + + // Get Main Shape + Handle(GEOM_Function) aMainShapeFunc = aSSI.GetMainShape(); + if (aMainShapeFunc.IsNull()) return; + TDF_Label aLabel = aMainShapeFunc->GetOwnerEntry(); + if (aLabel.IsRoot()) return; + Handle(GEOM_Object) aMainObj = GEOM_Object::GetObject(aLabel); + if (aMainObj.IsNull()) return; + TopoDS_Shape aMainShape = aMainObj->GetValue(); + if (aMainShape.IsNull()) return; + + TopTools_IndexedMapOfShape mapIndices; + TopExp::MapShapes(aMainShape, mapIndices); + + // Get IDs of sub-shapes to be removed + Standard_Integer i, rem_id, aLen = theSubShapes->Length(); + for (i = 1; i <= aLen; i++) { + rem_id = theSubShapes->Value(i); + if (mapIDsCurrent.Contains(rem_id)) { + mapIDsToRemove.Add(rem_id); + } + } + + if (mapIDsToRemove.Extent() > 0) { + Standard_Integer k = 1, aRemLength = mapIDsToRemove.Extent(); + Handle(TColStd_HArray1OfInteger) aNewSeq = new TColStd_HArray1OfInteger(1, aLength - aRemLength); + + for (j = 1; j <= aLength; j++) { + if (!mapIDsToRemove.Contains(aSeq->Value(j))) { + aNewSeq->SetValue(k, aSeq->Value(j)); + k++; + } + } + + aSSI.SetIndices(aNewSeq); + } + + SetErrorCode(OK); +} + //============================================================================= /*! * GetType diff --git a/src/GEOMImpl/GEOMImpl_IGroupOperations.hxx b/src/GEOMImpl/GEOMImpl_IGroupOperations.hxx index ea9075844..61d0d9037 100644 --- a/src/GEOMImpl/GEOMImpl_IGroupOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IGroupOperations.hxx @@ -8,6 +8,7 @@ #include "GEOM_Object.hxx" #include #include +#include #include class GEOMImpl_IGroupOperations : public GEOM_IOperations { @@ -27,6 +28,12 @@ class GEOMImpl_IGroupOperations : public GEOM_IOperations { void DifferenceList (Handle(GEOM_Object) theGroup, const Handle(TColStd_HSequenceOfTransient)& theSubShapes); + void UnionIDs (Handle(GEOM_Object) theGroup, + const Handle(TColStd_HSequenceOfInteger)& theSubShapes); + + void DifferenceIDs (Handle(GEOM_Object) theGroup, + const Handle(TColStd_HSequenceOfInteger)& theSubShapes); + TopAbs_ShapeEnum GetType(Handle(GEOM_Object) theGroup); Handle(GEOM_Object) GetMainShape(Handle(GEOM_Object) theGroup); diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx index bbe4f5803..48c9a0d74 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx @@ -17,7 +17,7 @@ using namespace std; #include "GEOM_Function.hxx" -#include "GEOMAlgo_FinderShapeOn.hxx" +#include "GEOMAlgo_FinderShapeOn1.hxx" #include "utilities.h" #include "OpUtil.hxx" @@ -35,7 +35,9 @@ using namespace std; #include #include #include +#include #include +#include #include #include @@ -60,6 +62,7 @@ using namespace std; #include +#include #include #include #include @@ -1027,6 +1030,10 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnPlan { SetErrorCode(KO); +// MESSAGE("--------------------------- GetShapesOnPlane phase 1 takes:"); +// OSD_Timer timer1; +// timer1.Start(); + if (theShape.IsNull() || theAx1.IsNull()) return NULL; TopoDS_Shape aShape = theShape->GetValue(); @@ -1061,8 +1068,12 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnPlan Handle(Geom_Plane) aPlane = new Geom_Plane(aLoc, aVec); + // Check presence of triangulation, build if need + if (!CheckTriangulation(aShape)) + return NULL; + // Call algo - GEOMAlgo_FinderShapeOn aFinder; + GEOMAlgo_FinderShapeOn1 aFinder; Standard_Real aTol = 0.0001; // default value aFinder.SetShape(aShape); @@ -1071,11 +1082,33 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnPlan aFinder.SetShapeType(aShapeType); aFinder.SetState(theState); + // Sets the minimal number of inner points for the faces that do not have own + // inner points at all (for e.g. rectangular planar faces have just 2 triangles). + // Default value=3 + aFinder.SetNbPntsMin(3); + // Sets the maximal number of inner points for edges or faces. + // It is usefull for the cases when this number is very big (e.g =2000) to improve + // the performance. If this value =0, all inner points will be taken into account. + // Default value=0 + aFinder.SetNbPntsMax(100); + +// timer1.Stop(); +// timer1.Show(); + +// MESSAGE("--------------------------- Perform on Plane takes:"); +// timer1.Reset(); +// timer1.Start(); aFinder.Perform(); +// timer1.Stop(); +// timer1.Show(); + +// MESSAGE("--------------------------- GetShapesOnPlane phase 3 takes:"); +// timer1.Reset(); +// timer1.Start(); // Interprete results Standard_Integer iErr = aFinder.ErrorStatus(); - // the detailed description of error codes is in GEOMAlgo_FinderShapeOn.cxx + // the detailed description of error codes is in GEOMAlgo_FinderShapeOn1.cxx if (iErr) { MESSAGE(" iErr : " << iErr); TCollection_AsciiString aMsg (" iErr : "); @@ -1084,7 +1117,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnPlan return NULL; } Standard_Integer iWrn = aFinder.WarningStatus(); - // the detailed description of warning codes is in GEOMAlgo_FinderShapeOn.cxx + // the detailed description of warning codes is in GEOMAlgo_FinderShapeOn1.cxx if (iWrn) { MESSAGE(" *** iWrn : " << iWrn); } @@ -1096,6 +1129,13 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnPlan return NULL; } +// timer1.Stop(); +// timer1.Show(); + +// MESSAGE("--------------------------- GetShapesOnPlane phase 4 takes:"); +// timer1.Reset(); +// timer1.Start(); + // Fill sequence of objects TopTools_IndexedMapOfShape anIndices; TopExp::MapShapes(aShape, anIndices); @@ -1112,6 +1152,13 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnPlan anObj = GetEngine()->AddSubShape(theShape, anArray); aSeq->Append(anObj); } + +// timer1.Stop(); +// timer1.Show(); + +// MESSAGE("--------------------------- GetShapesOnPlane phase 5 takes:"); +// timer1.Reset(); +// timer1.Start(); // The GetShapesOnPlane() doesn't change object so no new function is required. Handle(GEOM_Function) aFunction = theShape->GetLastFunction(); @@ -1129,6 +1176,9 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnPlan anOldDescr += aDescr; aFunction->SetDescription(anOldDescr); +// timer1.Stop(); +// timer1.Show(); + SetErrorCode(OK); return aSeq; } @@ -1186,8 +1236,12 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnCyli Handle(Geom_CylindricalSurface) aCylinder = new Geom_CylindricalSurface(anAx3, theRadius); + // Check presence of triangulation, build if need + if (!CheckTriangulation(aShape)) + return NULL; + // Call algo - GEOMAlgo_FinderShapeOn aFinder; + GEOMAlgo_FinderShapeOn1 aFinder; Standard_Real aTol = 0.0001; // default value aFinder.SetShape(aShape); @@ -1196,11 +1250,14 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnCyli aFinder.SetShapeType(aShapeType); aFinder.SetState(theState); + aFinder.SetNbPntsMin(3); + aFinder.SetNbPntsMax(100); + aFinder.Perform(); // Interprete results Standard_Integer iErr = aFinder.ErrorStatus(); - // the detailed description of error codes is in GEOMAlgo_FinderShapeOn.cxx + // the detailed description of error codes is in GEOMAlgo_FinderShapeOn1.cxx if (iErr) { MESSAGE(" iErr : " << iErr); TCollection_AsciiString aMsg (" iErr : "); @@ -1209,7 +1266,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnCyli return NULL; } Standard_Integer iWrn = aFinder.WarningStatus(); - // the detailed description of warning codes is in GEOMAlgo_FinderShapeOn.cxx + // the detailed description of warning codes is in GEOMAlgo_FinderShapeOn1.cxx if (iWrn) { MESSAGE(" *** iWrn : " << iWrn); } @@ -1297,8 +1354,12 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnSphe Handle(Geom_SphericalSurface) aSphere = new Geom_SphericalSurface(anAx3, theRadius); + // Check presence of triangulation, build if need + if (!CheckTriangulation(aShape)) + return NULL; + // Call algo - GEOMAlgo_FinderShapeOn aFinder; + GEOMAlgo_FinderShapeOn1 aFinder; Standard_Real aTol = 0.0001; // default value aFinder.SetShape(aShape); @@ -1307,11 +1368,14 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnSphe aFinder.SetShapeType(aShapeType); aFinder.SetState(theState); + aFinder.SetNbPntsMin(3); + aFinder.SetNbPntsMax(100); + aFinder.Perform(); // Interprete results Standard_Integer iErr = aFinder.ErrorStatus(); - // the detailed description of error codes is in GEOMAlgo_FinderShapeOn.cxx + // the detailed description of error codes is in GEOMAlgo_FinderShapeOn1.cxx if (iErr) { MESSAGE(" iErr : " << iErr); TCollection_AsciiString aMsg (" iErr : "); @@ -1320,7 +1384,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnSphe return NULL; } Standard_Integer iWrn = aFinder.WarningStatus(); - // the detailed description of warning codes is in GEOMAlgo_FinderShapeOn.cxx + // the detailed description of warning codes is in GEOMAlgo_FinderShapeOn1.cxx if (iWrn) { MESSAGE(" *** iWrn : " << iWrn); } @@ -1370,6 +1434,368 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnSphe return aSeq; } +//============================================================================= +/*! + * GetShapesOnPlaneIDs + */ +//============================================================================= +Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::GetShapesOnPlaneIDs + (const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + const Handle(GEOM_Object)& theAx1, + const GEOMAlgo_State theState) +{ + SetErrorCode(KO); + + if (theShape.IsNull() || theAx1.IsNull()) return NULL; + + TopoDS_Shape aShape = theShape->GetValue(); + TopoDS_Shape anAx1 = theAx1->GetValue(); + + if (aShape.IsNull() || anAx1.IsNull()) return NULL; + + TopAbs_ShapeEnum aShapeType = TopAbs_ShapeEnum(theShapeType); + if (aShapeType != TopAbs_VERTEX && + aShapeType != TopAbs_EDGE && + aShapeType != TopAbs_FACE && + aShapeType != TopAbs_SOLID) { + SetErrorCode("Only solids, vertices, edges or faces can be found by this method"); + return NULL; + } + + // Create plane + if (anAx1.ShapeType() != TopAbs_EDGE) return NULL; + TopoDS_Edge anEdge = TopoDS::Edge(anAx1); + TopoDS_Vertex V1, V2; + TopExp::Vertices(anEdge, V1, V2, Standard_True); + if (V1.IsNull() || V2.IsNull()) { + SetErrorCode("Bad edge given for the plane normal vector"); + return NULL; + } + gp_Pnt aLoc = BRep_Tool::Pnt(V1); + gp_Vec aVec (aLoc, BRep_Tool::Pnt(V2)); + if (aVec.Magnitude() < Precision::Confusion()) { + SetErrorCode("Vector with null magnitude given"); + return NULL; + } + + Handle(Geom_Plane) aPlane = new Geom_Plane(aLoc, aVec); + + // Check presence of triangulation, build if need + if (!CheckTriangulation(aShape)) + return NULL; + + // Call algo + GEOMAlgo_FinderShapeOn1 aFinder; + Standard_Real aTol = 0.0001; // default value + + aFinder.SetShape(aShape); + aFinder.SetTolerance(aTol); + aFinder.SetSurface(aPlane); + aFinder.SetShapeType(aShapeType); + aFinder.SetState(theState); + + aFinder.SetNbPntsMin(3); + aFinder.SetNbPntsMax(100); + + aFinder.Perform(); + + // Interprete results + Standard_Integer iErr = aFinder.ErrorStatus(); + // the detailed description of error codes is in GEOMAlgo_FinderShapeOn1.cxx + if (iErr) { + MESSAGE(" iErr : " << iErr); + TCollection_AsciiString aMsg (" iErr : "); + aMsg += TCollection_AsciiString(iErr); + SetErrorCode(aMsg); + return NULL; + } + Standard_Integer iWrn = aFinder.WarningStatus(); + // the detailed description of warning codes is in GEOMAlgo_FinderShapeOn1.cxx + if (iWrn) { + MESSAGE(" *** iWrn : " << iWrn); + } + + const TopTools_ListOfShape& listSS = aFinder.Shapes(); // the result + + if (listSS.Extent() < 1) { + SetErrorCode("Not a single sub-shape of the requested type found on the given plane"); + return NULL; + } + + // Fill sequence of objects + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aShape, anIndices); + + Handle(TColStd_HSequenceOfInteger) aSeq = new TColStd_HSequenceOfInteger; + + TopTools_ListIteratorOfListOfShape itSub (listSS); + for (int index = 1; itSub.More(); itSub.Next(), ++index) { + int id = anIndices.FindIndex(itSub.Value()); + aSeq->Append(id); + } + + // The GetShapesOnPlane() doesn't change object so no new function is required. + Handle(GEOM_Function) aFunction = theShape->GetLastFunction(); + + // Make a Python command + TCollection_AsciiString anEntry, aDescr + ("\nlistShapesOnPlane = IShapesOperations.GetShapesOnPlaneIDs("); + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += anEntry + TCollection_AsciiString(theShapeType) + ","; + TDF_Tool::Entry(theAx1->GetEntry(), anEntry); + aDescr += anEntry + ","; + aDescr += TCollection_AsciiString(theState) + ")"; + + TCollection_AsciiString anOldDescr = aFunction->GetDescription(); + anOldDescr += aDescr; + aFunction->SetDescription(anOldDescr); + + SetErrorCode(OK); + return aSeq; +} + +//============================================================================= +/*! + * GetShapesOnCylinderIDs + */ +//============================================================================= +Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::GetShapesOnCylinderIDs + (const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + const Handle(GEOM_Object)& theAxis, + const Standard_Real theRadius, + const GEOMAlgo_State theState) +{ + SetErrorCode(KO); + + if (theShape.IsNull() || theAxis.IsNull()) return NULL; + + TopoDS_Shape aShape = theShape->GetValue(); + TopoDS_Shape anAxis = theAxis->GetValue(); + + if (aShape.IsNull() || anAxis.IsNull()) return NULL; + + TopAbs_ShapeEnum aShapeType = TopAbs_ShapeEnum(theShapeType); + if (aShapeType != TopAbs_VERTEX && + aShapeType != TopAbs_EDGE && + aShapeType != TopAbs_FACE && + aShapeType != TopAbs_SOLID) { + SetErrorCode("Only solids, vertices, edges or faces can be found by this method"); + return NULL; + } + + //Axis of the cylinder + if (anAxis.ShapeType() != TopAbs_EDGE) { + SetErrorCode("Not an edge given for the axis"); + return NULL; + } + TopoDS_Edge anEdge = TopoDS::Edge(anAxis); + TopoDS_Vertex V1, V2; + TopExp::Vertices(anEdge, V1, V2, Standard_True); + if (V1.IsNull() || V2.IsNull()) { + SetErrorCode("Bad edge given for the axis"); + return NULL; + } + gp_Pnt aLoc = BRep_Tool::Pnt(V1); + gp_Vec aVec (aLoc, BRep_Tool::Pnt(V2)); + if (aVec.Magnitude() < Precision::Confusion()) { + SetErrorCode("Vector with null magnitude given"); + return NULL; + } + + gp_Ax3 anAx3 (aLoc, aVec); + Handle(Geom_CylindricalSurface) aCylinder = + new Geom_CylindricalSurface(anAx3, theRadius); + + // Check presence of triangulation, build if need + if (!CheckTriangulation(aShape)) + return NULL; + + // Call algo + GEOMAlgo_FinderShapeOn1 aFinder; + Standard_Real aTol = 0.0001; // default value + + aFinder.SetShape(aShape); + aFinder.SetTolerance(aTol); + aFinder.SetSurface(aCylinder); + aFinder.SetShapeType(aShapeType); + aFinder.SetState(theState); + + aFinder.SetNbPntsMin(3); + aFinder.SetNbPntsMax(100); + + aFinder.Perform(); + + // Interprete results + Standard_Integer iErr = aFinder.ErrorStatus(); + // the detailed description of error codes is in GEOMAlgo_FinderShapeOn1.cxx + if (iErr) { + MESSAGE(" iErr : " << iErr); + TCollection_AsciiString aMsg (" iErr : "); + aMsg += TCollection_AsciiString(iErr); + SetErrorCode(aMsg); + return NULL; + } + Standard_Integer iWrn = aFinder.WarningStatus(); + // the detailed description of warning codes is in GEOMAlgo_FinderShapeOn1.cxx + if (iWrn) { + MESSAGE(" *** iWrn : " << iWrn); + } + + const TopTools_ListOfShape& listSS = aFinder.Shapes(); // the result + + if (listSS.Extent() < 1) { + SetErrorCode("Not a single sub-shape of the requested type found on the given cylinder"); + return NULL; + } + + // Fill sequence of objects + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aShape, anIndices); + + Handle(TColStd_HSequenceOfInteger) aSeq = new TColStd_HSequenceOfInteger; + + TopTools_ListIteratorOfListOfShape itSub (listSS); + for (int index = 1; itSub.More(); itSub.Next(), ++index) { + int id = anIndices.FindIndex(itSub.Value()); + aSeq->Append(id); + } + + // The GetShapesOnCylinder() doesn't change object so no new function is required. + Handle(GEOM_Function) aFunction = theShape->GetLastFunction(); + + // Make a Python command + TCollection_AsciiString anEntry, aDescr + ("\nlistShapesOnCylinder = IShapesOperations.GetShapesOnCylinderIDs("); + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += anEntry + TCollection_AsciiString(theShapeType) + ","; + TDF_Tool::Entry(theAxis->GetEntry(), anEntry); + aDescr += anEntry + ","; + aDescr += TCollection_AsciiString(theRadius) + ","; + aDescr += TCollection_AsciiString(theState) + ")"; + + TCollection_AsciiString anOldDescr = aFunction->GetDescription(); + anOldDescr += aDescr; + aFunction->SetDescription(anOldDescr); + + SetErrorCode(OK); + return aSeq; +} + +//============================================================================= +/*! + * GetShapesOnSphereIDs + */ +//============================================================================= +Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::GetShapesOnSphereIDs + (const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + const Handle(GEOM_Object)& theCenter, + const Standard_Real theRadius, + const GEOMAlgo_State theState) +{ + SetErrorCode(KO); + + if (theShape.IsNull() || theCenter.IsNull()) return NULL; + + TopoDS_Shape aShape = theShape->GetValue(); + TopoDS_Shape aCenter = theCenter->GetValue(); + + if (aShape.IsNull() || aCenter.IsNull()) return NULL; + + TopAbs_ShapeEnum aShapeType = TopAbs_ShapeEnum(theShapeType); + if (aShapeType != TopAbs_VERTEX && + aShapeType != TopAbs_EDGE && + aShapeType != TopAbs_FACE && + aShapeType != TopAbs_SOLID) { + SetErrorCode("Only solids, vertices, edges or faces can be found by this method"); + return NULL; + } + + // Center of the sphere + if (aCenter.ShapeType() != TopAbs_VERTEX) return NULL; + gp_Pnt aLoc = BRep_Tool::Pnt(TopoDS::Vertex(aCenter)); + + gp_Ax3 anAx3 (aLoc, gp::DZ()); + Handle(Geom_SphericalSurface) aSphere = + new Geom_SphericalSurface(anAx3, theRadius); + + // Check presence of triangulation, build if need + if (!CheckTriangulation(aShape)) + return NULL; + + // Call algo + GEOMAlgo_FinderShapeOn1 aFinder; + Standard_Real aTol = 0.0001; // default value + + aFinder.SetShape(aShape); + aFinder.SetTolerance(aTol); + aFinder.SetSurface(aSphere); + aFinder.SetShapeType(aShapeType); + aFinder.SetState(theState); + + aFinder.SetNbPntsMin(3); + aFinder.SetNbPntsMax(100); + + aFinder.Perform(); + + // Interprete results + Standard_Integer iErr = aFinder.ErrorStatus(); + // the detailed description of error codes is in GEOMAlgo_FinderShapeOn1.cxx + if (iErr) { + MESSAGE(" iErr : " << iErr); + TCollection_AsciiString aMsg (" iErr : "); + aMsg += TCollection_AsciiString(iErr); + SetErrorCode(aMsg); + return NULL; + } + Standard_Integer iWrn = aFinder.WarningStatus(); + // the detailed description of warning codes is in GEOMAlgo_FinderShapeOn1.cxx + if (iWrn) { + MESSAGE(" *** iWrn : " << iWrn); + } + + const TopTools_ListOfShape& listSS = aFinder.Shapes(); // the result + + if (listSS.Extent() < 1) { + SetErrorCode("Not a single sub-shape of the requested type found on the given sphere"); + return NULL; + } + + // Fill sequence of objects + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aShape, anIndices); + + Handle(TColStd_HSequenceOfInteger) aSeq = new TColStd_HSequenceOfInteger; + + TopTools_ListIteratorOfListOfShape itSub (listSS); + for (int index = 1; itSub.More(); itSub.Next(), ++index) { + int id = anIndices.FindIndex(itSub.Value()); + aSeq->Append(id); + } + + // The GetShapesOnSphere() doesn't change object so no new function is required. + Handle(GEOM_Function) aFunction = theShape->GetLastFunction(); + + // Make a Python command + TCollection_AsciiString anEntry, aDescr + ("\nlistShapesOnSphere = IShapesOperations.GetShapesOnSphereIDs("); + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += anEntry + TCollection_AsciiString(theShapeType) + ","; + TDF_Tool::Entry(theCenter->GetEntry(), anEntry); + aDescr += anEntry + ","; + aDescr += TCollection_AsciiString(theRadius) + ","; + aDescr += TCollection_AsciiString(theState) + ")"; + + TCollection_AsciiString anOldDescr = aFunction->GetDescription(); + anOldDescr += aDescr; + aFunction->SetDescription(anOldDescr); + + SetErrorCode(OK); + return aSeq; +} + //============================================================================= /*! * GetInPlace @@ -1562,3 +1988,47 @@ void GEOMImpl_IShapesOperations::SortShapes(TopTools_ListOfShape& SL) for (Index=1; Index <= MaxShapes; Index++) SL.Append( aShapes( OrderInd(Index) )); } + +//======================================================================= +//function : CheckTriangulation +//purpose : +//======================================================================= +bool GEOMImpl_IShapesOperations::CheckTriangulation (const TopoDS_Shape& aShape) +{ +// MESSAGE("CheckTriangulation"); +// +// OSD_Timer timer1; +// timer1.Start(); + + TopExp_Explorer exp (aShape, TopAbs_FACE); + if (!exp.More()) { + SetErrorCode("Shape without faces given"); + return false; + } + + TopLoc_Location aTopLoc; + Handle(Poly_Triangulation) aTRF; + aTRF = BRep_Tool::Triangulation(TopoDS::Face(exp.Current()), aTopLoc); + if (aTRF.IsNull()) { + // calculate deflection + Standard_Real aDeviationCoefficient = 0.001; + + Bnd_Box B; + BRepBndLib::Add(aShape, B); + Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax; + B.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax); + + Standard_Real dx = aXmax - aXmin, dy = aYmax - aYmin, dz = aZmax - aZmin; + Standard_Real aDeflection = Max(Max(dx, dy), dz) * aDeviationCoefficient * 4; + +// MESSAGE("Deflection = " << aDeflection); + + Standard_Real aHLRAngle = 0.349066; + + BRepMesh_IncrementalMesh Inc (aShape, aDeflection, Standard_False, aHLRAngle); + } +// timer1.Stop(); +// timer1.Show(); + + return true; +} diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx index 3980e8878..0c8f57395 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx @@ -81,6 +81,23 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations { const Standard_Real theRadius, const GEOMAlgo_State theState); + Handle(TColStd_HSequenceOfInteger) GetShapesOnPlaneIDs (const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + const Handle(GEOM_Object)& theAx1, + const GEOMAlgo_State theState); + + Handle(TColStd_HSequenceOfInteger) GetShapesOnCylinderIDs (const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + const Handle(GEOM_Object)& theAxis, + const Standard_Real theRadius, + const GEOMAlgo_State theState); + + Handle(TColStd_HSequenceOfInteger) GetShapesOnSphereIDs (const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + const Handle(GEOM_Object)& theCenter, + const Standard_Real theRadius, + const GEOMAlgo_State theState); + Handle(GEOM_Object) GetShapesOnCylinderOld (Handle(GEOM_Object) theShape, const Standard_Integer theShapeType, Handle(GEOM_Object) theAxis, @@ -101,6 +118,8 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations { const Standard_Integer theObjectType, const Standard_Integer theFunctionType, const TCollection_AsciiString theMethodName); + + bool CheckTriangulation (const TopoDS_Shape& aShape); }; #endif diff --git a/src/GEOM_I/GEOM_IGroupOperations_i.cc b/src/GEOM_I/GEOM_IGroupOperations_i.cc index b0689d0dd..3ee63ba84 100644 --- a/src/GEOM_I/GEOM_IGroupOperations_i.cc +++ b/src/GEOM_I/GEOM_IGroupOperations_i.cc @@ -174,6 +174,68 @@ void GEOM_IGroupOperations_i::DifferenceList (GEOM::GEOM_Object_ptr theGroup, return; } +//============================================================================= +/*! + * UnionIDs + */ +//============================================================================= +void GEOM_IGroupOperations_i::UnionIDs (GEOM::GEOM_Object_ptr theGroup, + const GEOM::ListOfLong& theSubShapes) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theGroup == NULL) return; + + //Get the reference group + Handle(GEOM_Object) aGroupRef = GetOperations()->GetEngine()->GetObject + (theGroup->GetStudyID(), theGroup->GetEntry()); + if (aGroupRef.IsNull()) return; + + //Get sub-shape to add + Handle(TColStd_HSequenceOfInteger) aSubShapes = new TColStd_HSequenceOfInteger; + + int ind, aLen = theSubShapes.length(); + for (ind = 0; ind < aLen; ind++) { + aSubShapes->Append(theSubShapes[ind]); + } + + //Perform the operation + GetOperations()->UnionIDs(aGroupRef, aSubShapes); + return; +} + +//============================================================================= +/*! + * DifferenceIDs + */ +//============================================================================= +void GEOM_IGroupOperations_i::DifferenceIDs (GEOM::GEOM_Object_ptr theGroup, + const GEOM::ListOfLong& theSubShapes) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theGroup == NULL) return; + + //Get the reference group + Handle(GEOM_Object) aGroupRef = GetOperations()->GetEngine()->GetObject + (theGroup->GetStudyID(), theGroup->GetEntry()); + if (aGroupRef.IsNull()) return; + + //Get sub-shape to remove + Handle(TColStd_HSequenceOfInteger) aSubShapes = new TColStd_HSequenceOfInteger; + + int ind, aLen = theSubShapes.length(); + for (ind = 0; ind < aLen; ind++) { + aSubShapes->Append(theSubShapes[ind]); + } + + //Perform the operation + GetOperations()->DifferenceIDs(aGroupRef, aSubShapes); + return; +} + //============================================================================= /*! * GetType diff --git a/src/GEOM_I/GEOM_IGroupOperations_i.hh b/src/GEOM_I/GEOM_IGroupOperations_i.hh index 068f0916d..e730101d4 100644 --- a/src/GEOM_I/GEOM_IGroupOperations_i.hh +++ b/src/GEOM_I/GEOM_IGroupOperations_i.hh @@ -30,6 +30,10 @@ class GEOM_IGroupOperations_i : void DifferenceList (GEOM::GEOM_Object_ptr theGroup, const GEOM::ListOfGO& theSubShapes); + void UnionIDs (GEOM::GEOM_Object_ptr theGroup, const GEOM::ListOfLong& theSubShapes); + + void DifferenceIDs (GEOM::GEOM_Object_ptr theGroup, const GEOM::ListOfLong& theSubShapes); + CORBA::Long GetType (GEOM::GEOM_Object_ptr theGroup); GEOM::GEOM_Object_ptr GetMainShape (GEOM::GEOM_Object_ptr theGroup); diff --git a/src/GEOM_I/GEOM_IShapesOperations_i.cc b/src/GEOM_I/GEOM_IShapesOperations_i.cc index e595f2a88..718f5683f 100644 --- a/src/GEOM_I/GEOM_IShapesOperations_i.cc +++ b/src/GEOM_I/GEOM_IShapesOperations_i.cc @@ -699,6 +699,128 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnSphere return aSeq._retn(); } +//============================================================================= +/*! + * GetShapesOnPlaneIDs + */ +//============================================================================= +GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnPlaneIDs + (GEOM::GEOM_Object_ptr theShape, + const CORBA::Long theShapeType, + GEOM::GEOM_Object_ptr theAx1, + const GEOM::shape_state theState) +{ + GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL || theAx1 == NULL) return aSeq._retn(); + + //Get the reference objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject + (theAx1->GetStudyID(), theAx1->GetEntry()); + + if (aShape.IsNull() || anAx1.IsNull()) return aSeq._retn(); + + //Get Shapes On Plane + Handle(TColStd_HSequenceOfInteger) aHSeq = + GetOperations()->GetShapesOnPlaneIDs(aShape, theShapeType, anAx1, ShapeState(theState)); + if (!GetOperations()->IsDone() || aHSeq.IsNull()) + return aSeq._retn(); + + Standard_Integer aLength = aHSeq->Length(); + aSeq->length(aLength); + for (Standard_Integer i = 1; i <= aLength; i++) + aSeq[i-1] = aHSeq->Value(i); + + return aSeq._retn(); +} + +//============================================================================= +/*! + * GetShapesOnCylinderIDs + */ +//============================================================================= +GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnCylinderIDs + (GEOM::GEOM_Object_ptr theShape, + const CORBA::Long theShapeType, + GEOM::GEOM_Object_ptr theAxis, + const CORBA::Double theRadius, + const GEOM::shape_state theState) +{ + GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL || theAxis == NULL) return aSeq._retn(); + + //Get the reference objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) anAxis = GetOperations()->GetEngine()->GetObject + (theAxis->GetStudyID(), theAxis->GetEntry()); + + if (aShape.IsNull() || anAxis.IsNull()) return aSeq._retn(); + + //Get Shapes On Cylinder + Handle(TColStd_HSequenceOfInteger) aHSeq = GetOperations()->GetShapesOnCylinderIDs + (aShape, theShapeType, anAxis, theRadius, ShapeState(theState)); + if (!GetOperations()->IsDone() || aHSeq.IsNull()) + return aSeq._retn(); + + Standard_Integer aLength = aHSeq->Length(); + aSeq->length(aLength); + for (Standard_Integer i = 1; i <= aLength; i++) + aSeq[i-1] = aHSeq->Value(i); + + return aSeq._retn(); +} + +//============================================================================= +/*! + * GetShapesOnSphereIDs + */ +//============================================================================= +GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnSphereIDs + (GEOM::GEOM_Object_ptr theShape, + const CORBA::Long theShapeType, + GEOM::GEOM_Object_ptr theCenter, + const CORBA::Double theRadius, + const GEOM::shape_state theState) +{ + GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL || theCenter == NULL) return aSeq._retn(); + + //Get the reference objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) aCenter = GetOperations()->GetEngine()->GetObject + (theCenter->GetStudyID(), theCenter->GetEntry()); + + if (aShape.IsNull() || aCenter.IsNull()) return aSeq._retn(); + + //Get Shapes On Sphere + Handle(TColStd_HSequenceOfInteger) aHSeq = GetOperations()->GetShapesOnSphereIDs + (aShape, theShapeType, aCenter, theRadius, ShapeState(theState)); + if (!GetOperations()->IsDone() || aHSeq.IsNull()) + return aSeq._retn(); + + Standard_Integer aLength = aHSeq->Length(); + aSeq->length(aLength); + for (Standard_Integer i = 1; i <= aLength; i++) + aSeq[i-1] = aHSeq->Value(i); + + return aSeq._retn(); +} + //============================================================================= /*! * GetInPlace diff --git a/src/GEOM_I/GEOM_IShapesOperations_i.hh b/src/GEOM_I/GEOM_IShapesOperations_i.hh index e4e8c4a11..0ad390980 100644 --- a/src/GEOM_I/GEOM_IShapesOperations_i.hh +++ b/src/GEOM_I/GEOM_IShapesOperations_i.hh @@ -82,6 +82,23 @@ class GEOM_IShapesOperations_i : const CORBA::Double theRadius, const GEOM::shape_state theState); + GEOM::ListOfLong* GetShapesOnPlaneIDs (GEOM::GEOM_Object_ptr theShape, + const CORBA::Long theShapeType, + GEOM::GEOM_Object_ptr theAx1, + const GEOM::shape_state theState); + + GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape, + const CORBA::Long theShapeType, + GEOM::GEOM_Object_ptr theAxis, + const CORBA::Double theRadius, + const GEOM::shape_state theState); + + GEOM::ListOfLong* GetShapesOnSphereIDs (GEOM::GEOM_Object_ptr theShape, + const CORBA::Long theShapeType, + GEOM::GEOM_Object_ptr theCenter, + const CORBA::Double theRadius, + const GEOM::shape_state theState); + GEOM::GEOM_Object_ptr GetInPlace (GEOM::GEOM_Object_ptr theShapeWhere, GEOM::GEOM_Object_ptr theShapeWhat); diff --git a/src/Makefile.in b/src/Makefile.in index bf9b91068..ac330ca23 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -32,6 +32,6 @@ VPATH=.:@srcdir@ @COMMENCE@ -SUBDIRS = OBJECT ARCHIMEDE NMTDS NMTTools NMTAlgo GEOMAlgo SKETCHER PARTITION GEOM BREPExport BREPImport IGESExport IGESImport STEPExport STEPImport ShHealOper GEOMImpl GEOM_I GEOMClient DlgRef GEOMFiltersSelection GEOMGUI GEOMBase DisplayGUI GEOMToolsGUI BasicGUI PrimitiveGUI GenerationGUI EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI RepairGUI MeasureGUI GroupGUI BlocksGUI GEOM_SWIG GEOM_I_Superv +SUBDIRS = OBJECT ARCHIMEDE NMTDS NMTTools NMTAlgo GEOMAlgo SKETCHER GEOM BREPExport BREPImport IGESExport IGESImport STEPExport STEPImport ShHealOper GEOMImpl GEOM_I GEOMClient DlgRef GEOMFiltersSelection GEOMGUI GEOMBase DisplayGUI GEOMToolsGUI BasicGUI PrimitiveGUI GenerationGUI EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI RepairGUI MeasureGUI GroupGUI BlocksGUI GEOM_SWIG GEOM_I_Superv @MODULE@ -- 2.30.2