From: jfa Date: Fri, 4 Mar 2011 13:11:52 +0000 (+0000) Subject: Mantis issue 0021128. A partial fix by PKV. X-Git-Tag: Start_BR_19998_21191~38 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=33b02426f050c8f9b2823cdc2cab2bd9cb865936;p=modules%2Fgeom.git Mantis issue 0021128. A partial fix by PKV. --- diff --git a/src/NMTTools/Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx b/src/NMTTools/Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx new file mode 100644 index 000000000..9b3ecf9be --- /dev/null +++ b/src/NMTTools/Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx @@ -0,0 +1,74 @@ +// 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_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile +#define _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_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 NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo); + +class Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) : public Handle(TCollection_MapNode) { + public: + Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)():Handle(TCollection_MapNode)() {} + Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)(const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)& aHandle) : Handle(TCollection_MapNode)(aHandle) + { + } + + Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)(const NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) + { + } + + Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)& operator=(const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)& operator=(const NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo* operator->() const + { + return (NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo *)ControlAccess(); + } + +// Standard_EXPORT ~Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)(); + + Standard_EXPORT static const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) DownCast(const Handle(Standard_Transient)& AnObject); +}; +#endif diff --git a/src/NMTTools/Makefile.am b/src/NMTTools/Makefile.am index 0716bacdd..1da8aedac 100644 --- a/src/NMTTools/Makefile.am +++ b/src/NMTTools/Makefile.am @@ -15,26 +15,25 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# # GEOM NMTTools : partition algorithm # File : Makefile.in # Author : Julia DOROVSKIKH # Modified by : Alexander BORODIN (OCN) - autotools usage # Module : GEOM -# $Header$ -# + include $(top_srcdir)/adm_local/unix/make_common_starter.am -# header files +# header files salomeinclude_HEADERS = \ - Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx \ - Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \ + Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx \ + Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx \ Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx \ Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx \ Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx \ Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx \ Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx \ + Handle_NMTTools_StdMapNodeOfMapOfPaveBlock.hxx \ NMTTools_CheckerSI.hxx \ NMTTools_CheckerSI.ixx \ NMTTools_CheckerSI.jxx \ @@ -48,9 +47,19 @@ salomeinclude_HEADERS = \ NMTTools_CoupleOfShape.hxx \ NMTTools_CoupleOfShape.ixx \ NMTTools_CoupleOfShape.jxx \ + NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx \ + NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx \ + NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx \ + NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx \ + NMTTools_DataMapOfIntegerFaceInfo.hxx \ + NMTTools_DataMapOfIntegerListOfPaveBlock.hxx \ NMTTools_DEProcessor.hxx \ NMTTools_DEProcessor.ixx \ NMTTools_DEProcessor.jxx \ + NMTTools_FaceInfo.hxx \ + NMTTools_FaceInfo.ixx \ + NMTTools_FaceInfo.jxx \ + NMTTools_FaceInfo.lxx \ NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx \ NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx \ NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx \ @@ -66,6 +75,8 @@ salomeinclude_HEADERS = \ NMTTools_ListNodeOfListOfCoupleOfShape.hxx \ NMTTools_ListOfCommonBlock.hxx \ NMTTools_ListOfCoupleOfShape.hxx \ + NMTTools_MapIteratorOfMapOfPaveBlock.hxx \ + NMTTools_MapOfPaveBlock.hxx \ NMTTools_PaveFiller.hxx \ NMTTools_PaveFiller.ixx \ NMTTools_PaveFiller.jxx \ @@ -73,13 +84,6 @@ salomeinclude_HEADERS = \ NMTTools_Tools.hxx \ NMTTools_Tools.ixx \ NMTTools_Tools.jxx \ - Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx \ - Handle_NMTTools_StdMapNodeOfMapOfPaveBlock.hxx \ - NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx \ - NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx \ - NMTTools_DataMapOfIntegerListOfPaveBlock.hxx \ - NMTTools_MapIteratorOfMapOfPaveBlock.hxx \ - NMTTools_MapOfPaveBlock.hxx \ NMTTools_StdMapNodeOfMapOfPaveBlock.hxx # Libraries targets @@ -92,7 +96,14 @@ dist_libNMTTools_la_SOURCES = \ NMTTools_CommonBlock.cxx \ NMTTools_CommonBlockPool_0.cxx \ NMTTools_CoupleOfShape.cxx \ + NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_0.cxx \ + NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_0.cxx \ + NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_0.cxx \ + NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_0.cxx \ + NMTTools_DataMapOfIntegerFaceInfo_0.cxx \ + NMTTools_DataMapOfIntegerListOfPaveBlock_0.cxx \ NMTTools_DEProcessor.cxx \ + NMTTools_FaceInfo.cxx \ NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx \ NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx \ NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx \ @@ -106,6 +117,8 @@ dist_libNMTTools_la_SOURCES = \ NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx \ NMTTools_ListOfCommonBlock_0.cxx \ NMTTools_ListOfCoupleOfShape_0.cxx \ + NMTTools_MapIteratorOfMapOfPaveBlock_0.cxx \ + NMTTools_MapOfPaveBlock_0.cxx \ NMTTools_PaveFiller_0.cxx \ NMTTools_PaveFiller_1.cxx \ NMTTools_PaveFiller_2.cxx \ @@ -118,11 +131,6 @@ dist_libNMTTools_la_SOURCES = \ NMTTools_PaveFiller_9.cxx \ NMTTools_PaveFiller.cxx \ NMTTools_Tools.cxx \ - NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_0.cxx \ - NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_0.cxx \ - NMTTools_DataMapOfIntegerListOfPaveBlock_0.cxx \ - NMTTools_MapIteratorOfMapOfPaveBlock_0.cxx \ - NMTTools_MapOfPaveBlock_0.cxx \ NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx # additional information to compile and link file @@ -145,6 +153,7 @@ CDL_FILES = \ NMTTools_CommonBlockAPI.cdl \ NMTTools_CoupleOfShape.cdl \ NMTTools_DEProcessor.cdl \ + NMTTools_FaceInfo.cdl \ NMTTools_IteratorOfCoupleOfShape.cdl \ NMTTools_PaveFiller.cdl \ NMTTools_Tools.cdl diff --git a/src/NMTTools/NMTTools.cdl b/src/NMTTools/NMTTools.cdl index 7152b2f13..74bd82446 100644 --- a/src/NMTTools/NMTTools.cdl +++ b/src/NMTTools/NMTTools.cdl @@ -46,21 +46,16 @@ uses NMTDS is - --class IteratorOfCoupleOfShape; - --class DSFiller; class PaveFiller; class Tools; class CommonBlock; class CommonBlockAPI; - --class PCurveMaker; class DEProcessor; class CoupleOfShape; - --modified by NIZNHY-PKV Mon Feb 19 11:39:24 2007f class CheckerSI; - --modified by NIZNHY-PKV Mon Feb 19 11:39:27 2007t + class FaceInfo; pointer PPaveFiller to PaveFiller from NMTTools; - --pointer PDSFiller to DSFiller from NMTTools; class ListOfCommonBlock instantiates List from TCollection(CommonBlock from NMTTools); @@ -94,6 +89,12 @@ is class MapOfPaveBlock instantiates Map from TCollection (PaveBlock from BOPTools, - PaveBlockMapHasher from BOPTools); + PaveBlockMapHasher from BOPTools); + + class DataMapOfIntegerFaceInfo instantiates + DataMap from TCollection(Integer from Standard, + FaceInfo from NMTTools, + MapIntegerHasher from TColStd); + -- end NMTTools; diff --git a/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx b/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx new file mode 100644 index 000000000..e48aa8ee8 --- /dev/null +++ b/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx @@ -0,0 +1,117 @@ +// File generated by CPPExt (Value) +// +// Copyright (C) 1991 - 2000 by +// Matra Datavision SA. All rights reserved. +// +// Copyright (C) 2001 - 2004 by +// Open CASCADE SA. All rights reserved. +// +// This file is part of the Open CASCADE Technology software. +// +// This software may be distributed and/or modified under the terms and +// conditions of the Open CASCADE Public License as defined by Open CASCADE SA +// and appearing in the file LICENSE included in the packaging of this file. +// +// This software is distributed on an "AS IS" basis, without warranty of any +// kind, and Open CASCADE SA hereby disclaims all such warranties, +// including without limitation, any warranties of merchantability, fitness +// for a particular purpose or non-infringement. Please see the License for +// the specific terms and conditions governing rights and limitations under the +// License. + +#ifndef _NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile +#define _NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile + +#ifndef _TCollection_BasicMapIterator_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile +#include +#endif +class Standard_NoSuchObject; +class NMTTools_FaceInfo; +class TColStd_MapIntegerHasher; +class NMTTools_DataMapOfIntegerFaceInfo; +class NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + + +class NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo : public TCollection_BasicMapIterator { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // + + +Standard_EXPORT NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo(); + + +Standard_EXPORT NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo(const NMTTools_DataMapOfIntegerFaceInfo& aMap); + + +Standard_EXPORT void Initialize(const NMTTools_DataMapOfIntegerFaceInfo& aMap) ; + + +Standard_EXPORT const Standard_Integer& Key() const; + + +Standard_EXPORT const NMTTools_FaceInfo& Value() const; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_0.cxx b/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_0.cxx new file mode 100644 index 000000000..4005772d9 --- /dev/null +++ b/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_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 _NMTTools_FaceInfo_HeaderFile +#include +#endif +#ifndef _TColStd_MapIntegerHasher_HeaderFile +#include +#endif +#ifndef _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile +#include +#endif +#ifndef _NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile +#include +#endif + + +#define TheKey Standard_Integer +#define TheKey_hxx +#define TheItem NMTTools_FaceInfo +#define TheItem_hxx +#define Hasher TColStd_MapIntegerHasher +#define Hasher_hxx +#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo +#define TCollection_DataMapNode_hxx +#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo +#define TCollection_DataMapIterator_hxx +#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo +#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_Type_() +#define TCollection_DataMap NMTTools_DataMapOfIntegerFaceInfo +#define TCollection_DataMap_hxx +#include + diff --git a/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx b/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx new file mode 100644 index 000000000..661f53c62 --- /dev/null +++ b/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx @@ -0,0 +1,134 @@ +// 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 _NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile +#define _NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile +#include +#endif + +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _NMTTools_FaceInfo_HeaderFile +#include +#endif +#ifndef _TCollection_MapNode_HeaderFile +#include +#endif +#ifndef _TCollection_MapNodePtr_HeaderFile +#include +#endif +class NMTTools_FaceInfo; +class TColStd_MapIntegerHasher; +class NMTTools_DataMapOfIntegerFaceInfo; +class NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo; + + + +class NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo : public TCollection_MapNode { + +public: + // Methods PUBLIC + // + +NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo(const Standard_Integer& K,const NMTTools_FaceInfo& I,const TCollection_MapNodePtr& n); + + Standard_Integer& Key() const; + + NMTTools_FaceInfo& Value() const; +//Standard_EXPORT ~NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo(); + + + + + // Type management + // + Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // +Standard_Integer myKey; +NMTTools_FaceInfo myValue; + + +}; + +#define TheKey Standard_Integer +#define TheKey_hxx +#define TheItem NMTTools_FaceInfo +#define TheItem_hxx +#define Hasher TColStd_MapIntegerHasher +#define Hasher_hxx +#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo +#define TCollection_DataMapNode_hxx +#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo +#define TCollection_DataMapIterator_hxx +#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo +#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_Type_() +#define TCollection_DataMap NMTTools_DataMapOfIntegerFaceInfo +#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/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_0.cxx b/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_0.cxx new file mode 100644 index 000000000..8a541b929 --- /dev/null +++ b/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_0.cxx @@ -0,0 +1,102 @@ +// 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 _NMTTools_FaceInfo_HeaderFile +#include +#endif +#ifndef _TColStd_MapIntegerHasher_HeaderFile +#include +#endif +#ifndef _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile +#include +#endif +#ifndef _NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile +#include +#endif +//NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo::~NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo() {} + + + +Standard_EXPORT Handle_Standard_Type& NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo", + sizeof(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + + +// DownCast method +// allow safe downcasting +// +const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo))) { + _anOtherObject = Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)((Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)&)AnObject); + } + } + + return _anOtherObject ; +} +const Handle(Standard_Type)& NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo::DynamicType() const +{ + return STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) ; +} +//Standard_Boolean NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo::IsKind(const Handle(Standard_Type)& AType) const +//{ +// return (STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) == AType || TCollection_MapNode::IsKind(AType)); +//} +//Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo::~Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo() {} +#define TheKey Standard_Integer +#define TheKey_hxx +#define TheItem NMTTools_FaceInfo +#define TheItem_hxx +#define Hasher TColStd_MapIntegerHasher +#define Hasher_hxx +#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo +#define TCollection_DataMapNode_hxx +#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo +#define TCollection_DataMapIterator_hxx +#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo +#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_Type_() +#define TCollection_DataMap NMTTools_DataMapOfIntegerFaceInfo +#define TCollection_DataMap_hxx +#include + diff --git a/src/NMTTools/NMTTools_DataMapOfIntegerFaceInfo.hxx b/src/NMTTools/NMTTools_DataMapOfIntegerFaceInfo.hxx new file mode 100644 index 000000000..af66bd7ee --- /dev/null +++ b/src/NMTTools/NMTTools_DataMapOfIntegerFaceInfo.hxx @@ -0,0 +1,156 @@ +// 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 _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile +#define _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile + +#ifndef _TCollection_BasicMap_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_DomainError; +class Standard_NoSuchObject; +class NMTTools_FaceInfo; +class TColStd_MapIntegerHasher; +class NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo; +class NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + + +class NMTTools_DataMapOfIntegerFaceInfo : 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 NMTTools_DataMapOfIntegerFaceInfo(const Standard_Integer NbBuckets = 1); + + +Standard_EXPORT NMTTools_DataMapOfIntegerFaceInfo& Assign(const NMTTools_DataMapOfIntegerFaceInfo& Other) ; + NMTTools_DataMapOfIntegerFaceInfo& operator =(const NMTTools_DataMapOfIntegerFaceInfo& Other) +{ + return Assign(Other); +} + + + +Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; + + +Standard_EXPORT void Clear() ; +~NMTTools_DataMapOfIntegerFaceInfo() +{ + Clear(); +} + + + +Standard_EXPORT Standard_Boolean Bind(const Standard_Integer& K,const NMTTools_FaceInfo& I) ; + + +Standard_EXPORT Standard_Boolean IsBound(const Standard_Integer& K) const; + + +Standard_EXPORT Standard_Boolean UnBind(const Standard_Integer& K) ; + + +Standard_EXPORT const NMTTools_FaceInfo& Find(const Standard_Integer& K) const; + const NMTTools_FaceInfo& operator()(const Standard_Integer& K) const +{ + return Find(K); +} + + + +Standard_EXPORT NMTTools_FaceInfo& ChangeFind(const Standard_Integer& K) ; + NMTTools_FaceInfo& operator()(const Standard_Integer& K) +{ + return ChangeFind(K); +} + + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + +Standard_EXPORT NMTTools_DataMapOfIntegerFaceInfo(const NMTTools_DataMapOfIntegerFaceInfo& Other); + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_DataMapOfIntegerFaceInfo_0.cxx b/src/NMTTools/NMTTools_DataMapOfIntegerFaceInfo_0.cxx new file mode 100644 index 000000000..760274236 --- /dev/null +++ b/src/NMTTools/NMTTools_DataMapOfIntegerFaceInfo_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 _NMTTools_FaceInfo_HeaderFile +#include +#endif +#ifndef _TColStd_MapIntegerHasher_HeaderFile +#include +#endif +#ifndef _NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile +#include +#endif +#ifndef _NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile +#include +#endif + + +#define TheKey Standard_Integer +#define TheKey_hxx +#define TheItem NMTTools_FaceInfo +#define TheItem_hxx +#define Hasher TColStd_MapIntegerHasher +#define Hasher_hxx +#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo +#define TCollection_DataMapNode_hxx +#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo +#define TCollection_DataMapIterator_hxx +#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo +#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_Type_() +#define TCollection_DataMap NMTTools_DataMapOfIntegerFaceInfo +#define TCollection_DataMap_hxx +#include + diff --git a/src/NMTTools/NMTTools_FaceInfo.cdl b/src/NMTTools/NMTTools_FaceInfo.cdl new file mode 100644 index 000000000..23799b0ff --- /dev/null +++ b/src/NMTTools/NMTTools_FaceInfo.cdl @@ -0,0 +1,161 @@ +-- Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +-- +-- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- + +-- File: NMTTools_FaceInfo.cdl +-- Created: Tue Dec 9 12:11:48 2003 +-- Author: Peter KURNEV +-- +-- +class FaceInfo from NMTTools + + ---Purpose: + +uses + MapOfInteger from TColStd, + MapOfPaveBlock from NMTTools +--raises + +is + + Create + returns FaceInfo from NMTTools; + ---C++: inline + ---C++: alias "virtual ~NMTTools_FaceInfo();" + ---Purpose: + --- Empty contructor + --- + + Clear(me:out); + ---Purpose: + --- Clears the contents + + SetIndex(me:out; + theI: Integer from Standard); + ---C++: inline + ---Purpose: + --- Modifier + --- Sets the index of the face + + Index(me) + returns Integer from Standard; + ---C++: inline + ---Purpose: + --- Selector + --- Returns the index of the face + -- + -- In + -- + PaveBlocksIn(me) + returns MapOfPaveBlock from NMTTools; + ---C++: return const & + ---C++: inline + ---Purpose: + --- Selector + --- Returns the pave blocks of the face + --- that have state In + + ChangePaveBlocksIn(me:out) + returns MapOfPaveBlock from NMTTools; + ---C++: return & + ---C++: inline + ---Purpose: + --- Selector/Modifier + --- Returns the pave blocks + -- of the face + --- that have state In + + VerticesIn(me) + returns MapOfInteger from TColStd; + ---C++: return const & + ---C++: inline + ---Purpose: + --- Selector + --- Returns the list of indices for vertices + -- of the face + --- that have state In + + ChangeVerticesIn(me:out) + returns MapOfInteger from TColStd; + ---C++: return & + ---C++: inline + ---Purpose: + --- Selector/Modifier + --- Returns the list of indices for vertices + -- of the face + --- that have state In + -- + -- On + -- + PaveBlocksOn(me) + returns MapOfPaveBlock from NMTTools; + ---C++: return const & + ---C++: inline + ---Purpose: + --- Selector + --- Returns the pave blocks of the face + --- that have state On + + ChangePaveBlocksOn(me:out) + returns MapOfPaveBlock from NMTTools; + ---C++: return & + ---C++: inline + ---Purpose: + --- Selector/Modifier + --- Returns the pave blocks + -- of the face + --- that have state On + VerticesOn(me) + returns MapOfInteger from TColStd; + ---C++: return const & + ---C++: inline + ---Purpose: + --- Selector + --- Returns the list of indices for vertices + -- of the face + --- that have state On + + ChangeVerticesOn(me:out) + returns MapOfInteger from TColStd; + ---C++: return & + ---C++: inline + ---Purpose: + --- Selector/Modifier + --- Returns the list of indices for vertices + -- of the face + --- that have state On + +fields + myIndex : Integer from Standard is protected; + myPaveBlocksIn: MapOfPaveBlock from NMTTools is protected; + myVerticesIn : MapOfInteger from TColStd is protected; + myPaveBlocksOn: MapOfPaveBlock from NMTTools is protected; + myVerticesOn : MapOfInteger from TColStd is protected; + +end FaceInfo; + + + + + + + + diff --git a/src/NMTTools/NMTTools_FaceInfo.cxx b/src/NMTTools/NMTTools_FaceInfo.cxx new file mode 100644 index 000000000..79fd78788 --- /dev/null +++ b/src/NMTTools/NMTTools_FaceInfo.cxx @@ -0,0 +1,28 @@ +// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +// File: NMTTools_FaceInfo.cxx +// Created: Tue Dec 9 12:23:29 2003 +// Author: Peter KURNEV +// +// +#include diff --git a/src/NMTTools/NMTTools_FaceInfo.hxx b/src/NMTTools/NMTTools_FaceInfo.hxx new file mode 100644 index 000000000..7e2e6b6e8 --- /dev/null +++ b/src/NMTTools/NMTTools_FaceInfo.hxx @@ -0,0 +1,174 @@ +// 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 _NMTTools_FaceInfo_HeaderFile +#define _NMTTools_FaceInfo_HeaderFile + +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _NMTTools_MapOfPaveBlock_HeaderFile +#include +#endif +#ifndef _TColStd_MapOfInteger_HeaderFile +#include +#endif +class NMTTools_MapOfPaveBlock; +class TColStd_MapOfInteger; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + + +class NMTTools_FaceInfo { + +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 + // + +//! Empty contructor
+//!
+NMTTools_FaceInfo(); +virtual ~NMTTools_FaceInfo(); + + +//! Clears the contents
+Standard_EXPORT void Clear() ; + +//! Modifier
+//! Sets the index of the face
+ void SetIndex(const Standard_Integer theI) ; + +//! Selector
+//! Returns the index of the face
+//!
+//! In
+//!
+ Standard_Integer Index() const; + +//! Selector
+//! Returns the pave blocks of the face
+//! that have state In
+ const NMTTools_MapOfPaveBlock& PaveBlocksIn() const; + +//! Selector/Modifier
+//! Returns the pave blocks
+//! of the face
+//! that have state In
+ NMTTools_MapOfPaveBlock& ChangePaveBlocksIn() ; + +//! Selector
+//! Returns the list of indices for vertices
+//! of the face
+//! that have state In
+ const TColStd_MapOfInteger& VerticesIn() const; + +//! Selector/Modifier
+//! Returns the list of indices for vertices
+//! of the face
+//! that have state In
+//!
+//! On
+//!
+ TColStd_MapOfInteger& ChangeVerticesIn() ; + +//! Selector
+//! Returns the pave blocks of the face
+//! that have state On
+ const NMTTools_MapOfPaveBlock& PaveBlocksOn() const; + +//! Selector/Modifier
+//! Returns the pave blocks
+//! of the face
+//! that have state On
+ NMTTools_MapOfPaveBlock& ChangePaveBlocksOn() ; + +//! Selector
+//! Returns the list of indices for vertices
+//! of the face
+//! that have state On
+ const TColStd_MapOfInteger& VerticesOn() const; + +//! Selector/Modifier
+//! Returns the list of indices for vertices
+//! of the face
+//! that have state On
+ TColStd_MapOfInteger& ChangeVerticesOn() ; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // +Standard_Integer myIndex; +NMTTools_MapOfPaveBlock myPaveBlocksIn; +TColStd_MapOfInteger myVerticesIn; +NMTTools_MapOfPaveBlock myPaveBlocksOn; +TColStd_MapOfInteger myVerticesOn; + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + +#include + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_FaceInfo.ixx b/src/NMTTools/NMTTools_FaceInfo.ixx new file mode 100644 index 000000000..051dc5e9e --- /dev/null +++ b/src/NMTTools/NMTTools_FaceInfo.ixx @@ -0,0 +1,26 @@ +// File generated by CPPExt (Value) +// +// Copyright (C) 1991 - 2000 by +// Matra Datavision SA. All rights reserved. +// +// Copyright (C) 2001 - 2004 by +// Open CASCADE SA. All rights reserved. +// +// This file is part of the Open CASCADE Technology software. +// +// This software may be distributed and/or modified under the terms and +// conditions of the Open CASCADE Public License as defined by Open CASCADE SA +// and appearing in the file LICENSE included in the packaging of this file. +// +// This software is distributed on an "AS IS" basis, without warranty of any +// kind, and Open CASCADE SA hereby disclaims all such warranties, +// including without limitation, any warranties of merchantability, fitness +// for a particular purpose or non-infringement. Please see the License for +// the specific terms and conditions governing rights and limitations under the +// License. + +#include + + + + diff --git a/src/NMTTools/NMTTools_FaceInfo.jxx b/src/NMTTools/NMTTools_FaceInfo.jxx new file mode 100644 index 000000000..f530c4f3b --- /dev/null +++ b/src/NMTTools/NMTTools_FaceInfo.jxx @@ -0,0 +1,9 @@ +#ifndef _NMTTools_MapOfPaveBlock_HeaderFile +#include +#endif +#ifndef _TColStd_MapOfInteger_HeaderFile +#include +#endif +#ifndef _NMTTools_FaceInfo_HeaderFile +#include +#endif diff --git a/src/NMTTools/NMTTools_FaceInfo.lxx b/src/NMTTools/NMTTools_FaceInfo.lxx new file mode 100644 index 000000000..aecc89015 --- /dev/null +++ b/src/NMTTools/NMTTools_FaceInfo.lxx @@ -0,0 +1,136 @@ +// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File: NMTTools_FaceInfo.lxx +// Created: Tue Dec 9 12:23:29 2003 +// Author: Peter KURNEV +// +// + +//======================================================================= +//function : +//purpose : +//======================================================================= +inline NMTTools_FaceInfo::NMTTools_FaceInfo() +: + myIndex(-1) +{ +} +//======================================================================= +//function : ~ +//purpose : +//======================================================================= +inline NMTTools_FaceInfo::~NMTTools_FaceInfo() +{ + Clear(); +} +//======================================================================= +//function : Clear +//purpose : +//======================================================================= +inline void NMTTools_FaceInfo::Clear() +{ + myIndex=-1; + myPaveBlocksIn.Clear(); + myVerticesIn.Clear(); + myPaveBlocksOn.Clear(); + myVerticesOn.Clear(); +} +//======================================================================= +//function : SetIndex +//purpose : +//======================================================================= + inline void NMTTools_FaceInfo::SetIndex(const Standard_Integer theI) +{ + myIndex=theI; +} +//======================================================================= +//function : Index +//purpose : +//======================================================================= + inline Standard_Integer NMTTools_FaceInfo::Index()const +{ + return myIndex; +} +//======================================================================= +//function : PaveBlockIn +//purpose : +//======================================================================= + inline const NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::PaveBlocksIn()const +{ + return myPaveBlocksIn; +} +//======================================================================= +//function : ChangePaveBlocksIn +//purpose : +//======================================================================= + inline NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::ChangePaveBlocksIn() +{ + return myPaveBlocksIn; +} +//======================================================================= +//function : VerticesIn +//purpose : +//======================================================================= + inline const TColStd_MapOfInteger& NMTTools_FaceInfo::VerticesIn()const +{ + return myVerticesIn; +} +//======================================================================= +//function : ChangeVerticesIn +//purpose : +//======================================================================= + inline TColStd_MapOfInteger& NMTTools_FaceInfo::ChangeVerticesIn() +{ + return myVerticesIn; +} +//======================================================================= +//function : PaveBlockOn +//purpose : +//======================================================================= + inline const NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::PaveBlocksOn()const +{ + return myPaveBlocksOn; +} +//======================================================================= +//function : ChangePaveBlocksOn +//purpose : +//======================================================================= + inline NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::ChangePaveBlocksOn() +{ + return myPaveBlocksOn; +} +//======================================================================= +//function : VerticesOn +//purpose : +//======================================================================= + inline const TColStd_MapOfInteger& NMTTools_FaceInfo::VerticesOn()const +{ + return myVerticesOn; +} +//======================================================================= +//function : ChangeVerticesOn +//purpose : +//======================================================================= + inline TColStd_MapOfInteger& NMTTools_FaceInfo::ChangeVerticesOn() +{ + return myVerticesOn; +} diff --git a/src/NMTTools/NMTTools_PaveFiller.cdl b/src/NMTTools/NMTTools_PaveFiller.cdl index d21a19edf..97fb76e90 100644 --- a/src/NMTTools/NMTTools_PaveFiller.cdl +++ b/src/NMTTools/NMTTools_PaveFiller.cdl @@ -29,7 +29,10 @@ class PaveFiller from NMTTools ---Purpose: uses - DataMapOfIntegerInteger from TColStd, + DataMapOfIntegerInteger from TColStd, + ListOfInteger from TColStd, + MapOfInteger from TColStd, + Pnt from gp, ShapeEnum from TopAbs, Vertex from TopoDS, @@ -38,8 +41,7 @@ uses Edge from TopoDS, ListOfShape from TopTools, DataMapOfShapeShape from TopTools, - ListOfInteger from TColStd, - + Context from IntTools, ShrunkRange from IntTools, @@ -53,23 +55,21 @@ uses PaveSet from BOPTools, Curve from BOPTools, SSInterference from BOPTools, - IDMapOfPaveBlockIMapOfPaveBlock from BOPTools, IDMapOfPaveBlockIMapOfInteger from BOPTools, - SSIntersectionAttribute from BOPTools, + SSIntersectionAttribute from BOPTools, - CommonBlockPool from NMTTools, - CommonBlock from NMTTools, - ListOfCommonBlock from NMTTools, - ShapesDataStructure from NMTDS, - PShapesDataStructure from NMTDS, - Iterator from NMTDS, - IndexedDataMapOfIndexedMapOfInteger from NMTTools, - + Iterator from NMTDS, PIterator from NMTDS, - PInterfPool from NMTDS + PInterfPool from NMTDS, + + CommonBlockPool from NMTTools, + CommonBlock from NMTTools, + ListOfCommonBlock from NMTTools, + DataMapOfIntegerFaceInfo from NMTTools, + IndexedDataMapOfIndexedMapOfInteger from NMTTools --raises @@ -400,18 +400,20 @@ is nF1 :Integer from Standard; nF2 :Integer from Standard; aLs :out ListOfPaveBlock from BOPTools); - -- + PrepareSetForFace(me:out; nF1 :Integer from Standard; nF2 :Integer from Standard; aLPB: ListOfPaveBlock from BOPTools; aPSF:out PaveSet from BOPTools); - + PutPaveOnCurve(me:out; - aPSF: PaveSet from BOPTools; + aPSF: PaveSet from BOPTools; aTol: Real from Standard; - aBC : out Curve from BOPTools); - + aBC : out Curve from BOPTools); + + + PutBoundPaveOnCurve (me:out; aBC :out Curve from BOPTools; aFF :out SSInterference from BOPTools); @@ -490,13 +492,22 @@ is returns PavePool from BOPTools; ---C++:return & - --modified by NIZNHY-PKV Thu Nov 11 08:12:50 2010f CheckCoincidence (me:out; aPB1 : PaveBlock from BOPTools; aPB2 : PaveBlock from BOPTools) - returns Boolean from Standard; - --modified by NIZNHY-PKV Thu Nov 11 08:12:54 2010t - + returns Boolean from Standard; + +--modified by NIZNHY-PKV Wed Feb 09 10:10:48 2011f + FillFaceInfo (me:out) + is protected; + + CorrectTolR3D(me:out; + aFF : SSInterference from BOPTools; + aMVStick: MapOfInteger from TColStd; + aTolR3D: out Real from Standard) + is protected; +--modified by NIZNHY-PKV Wed Feb 09 10:11:52 2011t + fields myDS : PShapesDataStructure from NMTDS is protected; myIsDone : Boolean from Standard is protected; @@ -516,5 +527,7 @@ fields myDSIt : PIterator from NMTDS is protected; myCompositeShape : Shape from TopoDS is protected; myIP : PInterfPool from NMTDS is protected; - +--modified by NIZNHY-PKV Wed Feb 09 10:51:50 2011f + myFaceInfo : DataMapOfIntegerFaceInfo from NMTTools is protected; +--modified by NIZNHY-PKV Wed Feb 09 10:51:50 2011t end PaveFiller; diff --git a/src/NMTTools/NMTTools_PaveFiller.hxx b/src/NMTTools/NMTTools_PaveFiller.hxx index ba8dbd419..777890a39 100644 --- a/src/NMTTools/NMTTools_PaveFiller.hxx +++ b/src/NMTTools/NMTTools_PaveFiller.hxx @@ -61,6 +61,9 @@ #ifndef _NMTDS_PInterfPool_HeaderFile #include #endif +#ifndef _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile +#include +#endif #ifndef _TopAbs_ShapeEnum_HeaderFile #include #endif @@ -92,6 +95,7 @@ class NMTTools_IndexedDataMapOfIndexedMapOfInteger; class TopTools_ListOfShape; class TopoDS_Edge; class TopTools_DataMapOfShapeShape; +class TColStd_MapOfInteger; #ifndef _Standard_HeaderFile @@ -402,6 +406,12 @@ Standard_EXPORT void PerformVF1() ; Standard_EXPORT void MakeAloneVertices() ; +Standard_EXPORT void FillFaceInfo() ; + + +Standard_EXPORT void CorrectTolR3D(const BOPTools_SSInterference& aFF,const TColStd_MapOfInteger& aMVStick,Standard_Real& aTolR3D) ; + + // Fields PROTECTED // NMTDS_PShapesDataStructure myDS; @@ -419,6 +429,7 @@ TColStd_DataMapOfIntegerInteger myVSD; NMTDS_PIterator myDSIt; TopoDS_Shape myCompositeShape; NMTDS_PInterfPool myIP; +NMTTools_DataMapOfIntegerFaceInfo myFaceInfo; private: diff --git a/src/NMTTools/NMTTools_PaveFiller.jxx b/src/NMTTools/NMTTools_PaveFiller.jxx index 90d127a9c..083fa494c 100644 --- a/src/NMTTools/NMTTools_PaveFiller.jxx +++ b/src/NMTTools/NMTTools_PaveFiller.jxx @@ -1,25 +1,3 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - #ifndef _TopoDS_Shape_HeaderFile #include #endif @@ -95,6 +73,9 @@ #ifndef _TopTools_DataMapOfShapeShape_HeaderFile #include #endif +#ifndef _TColStd_MapOfInteger_HeaderFile +#include +#endif #ifndef _NMTTools_PaveFiller_HeaderFile #include #endif diff --git a/src/NMTTools/NMTTools_PaveFiller_6.cxx b/src/NMTTools/NMTTools_PaveFiller_6.cxx index 657a1ad82..1dea52d68 100644 --- a/src/NMTTools/NMTTools_PaveFiller_6.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_6.cxx @@ -32,13 +32,16 @@ #include #include #include -#include #include +#include + #include #include #include #include +#include +#include #include @@ -73,9 +76,11 @@ #include #include #include +#include #include - +#include +#include #include #include #include @@ -84,6 +89,7 @@ #include #include #include +#include #include #include @@ -91,12 +97,17 @@ #include #include +#include #include +#include +#include #include #include - #include #include +#include +#include +#include static Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE, @@ -212,146 +223,103 @@ void NMTTools_PaveFiller::MakeBlocks() Standard_Integer i, aNbFFs, nF1, nF2; Standard_Integer nV1, nV2, j, aNbCurves; Standard_Real aTolR3D, aTol2D, aT1, aT2, aTolPPC=Precision::PConfusion(); + TopoDS_Face aF1, aF2; NMTTools_IndexedDataMapOfShapePaveBlock aMEPB; BooleanOperations_IndexedDataMapOfShapeInteger aMapEI; BOPTools_ListIteratorOfListOfPaveBlock anIt; // BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences(); // - aNbFFs=aFFs.Extent(); + // - NMTTools_DataMapOfIntegerListOfPaveBlock aMFInOn; - NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock aItMF; - //--- - { - Standard_Integer aNbS, aNbF, nF, aNbOn, nSp; - TopAbs_ShapeEnum aType; - BOPTools_ListIteratorOfListOfPaveBlock anItPB; - NMTTools_ListIteratorOfListOfCommonBlock aItCB; - TColStd_ListIteratorOfListOfInteger aItF; - // - aNbS=myDS->NumberOfShapesOfTheObject(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aS=myDS->Shape(i); - aType=aS.ShapeType(); - // - if (aType==TopAbs_EDGE) { - const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(i)); - aItCB.Initialize(aLCB); - for (; aItCB.More(); aItCB.Next()) { - const NMTTools_CommonBlock& aCB=aItCB.Value(); - const BOPTools_PaveBlock &aPB1=aCB.PaveBlock1(); - // - const TColStd_ListOfInteger& aLF=aCB.Faces(); - aNbF=aLF.Extent(); - if (aNbF) { - aItF.Initialize(aLF); - for (; aItF.More(); aItF.Next()) { - nF=aItF.Value(); - if (aMFInOn.IsBound(nF)) { - BOPTools_ListOfPaveBlock& aLPB=aMFInOn.ChangeFind(nF); - aLPB.Append(aPB1); - } - else { - BOPTools_ListOfPaveBlock aLPB; - aLPB.Append(aPB1); - aMFInOn.Bind(nF, aLPB); - } - } - }// if (aNbF) { - } // for (; aItCB.More(); aItCB.Next()) { - }//if (aS.ShapeType()==TopAbs_EDGE) { - // - else if (aType==TopAbs_FACE) { - BOPTools_ListOfPaveBlock aLPBOn; - // - nF=i; - RealSplitsFace(nF, aLPBOn); - // - aNbOn=aLPBOn.Extent(); - if (aNbOn) { - if (aMFInOn.IsBound(nF)) { - BOPTools_ListOfPaveBlock& aLPB=aMFInOn.ChangeFind(nF); - aLPB.Append(aLPBOn); - } - else { - aMFInOn.Bind(nF, aLPBOn); - } - } - } - } // for (i=1; i<=aNbS; ++i) { - // - // Refine ListOfPaveBlocks - aItMF.Initialize(aMFInOn); - for(; aItMF.More(); aItMF.Next()) { - TColStd_MapOfInteger aMTmp; - BOPTools_ListOfPaveBlock aLPBX; - // - nF=aItMF.Key(); - BOPTools_ListOfPaveBlock& aLPB=aMFInOn.ChangeFind(nF); - anItPB.Initialize(aLPB); - for (; anItPB.More(); anItPB.Next()) { - const BOPTools_PaveBlock& aPB=anItPB.Value(); - nSp=aPB.Edge(); - if (aMTmp.Add(nSp)) { - aLPBX.Append(aPB); - } - } - aLPB.Clear(); - aLPB.Append(aLPBX); - } - } - //--- - // - // 1. Produce Section Edges from intersection curves + // 1. Make Section Edges from intersection curves // between each pair of faces aNbFFs=aFFs.Extent(); + if (!aNbFFs) { + return; + } + // + FillFaceInfo(); // for (i=1; i<=aNbFFs; ++i) { + BOPTools_ListOfPaveBlock aLPB; + TColStd_MapOfInteger aMVStick; + TopTools_ListOfShape aLSE; + TColStd_ListOfInteger aLNE; + BOPTools_PaveSet aPSF; + NMTTools_MapOfPaveBlock aMPBX; + TColStd_MapIteratorOfMapOfInteger aItMI; + NMTTools_MapIteratorOfMapOfPaveBlock aItMPB; + // BOPTools_SSInterference& aFFi=aFFs(i); // // Faces aFFi.Indices(nF1, nF2); - const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));//mpv - const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));//mpv + aF1=*((TopoDS_Face*)(&myDS->Shape(nF1))); + aF2=*((TopoDS_Face*)(&myDS->Shape(nF2))); // - BOPTools_ListOfPaveBlock aLPB; + SharedEdges(nF1, nF2, aLNE, aLSE); + aFFi.SetSharedEdges(aLNE); // - //--- - { - BOPTools_ListIteratorOfListOfPaveBlock anItPB; - NMTTools_MapOfPaveBlock aMPB; + // aMVStick + const NMTTools_FaceInfo& aFI1=myFaceInfo.Find(nF1); + const NMTTools_FaceInfo& aFI2=myFaceInfo.Find(nF2); + // + const TColStd_MapOfInteger& aMVOn1=aFI1.VerticesOn(); + const TColStd_MapOfInteger& aMVIn1=aFI1.VerticesIn(); + const TColStd_MapOfInteger& aMVOn2=aFI2.VerticesOn(); + const TColStd_MapOfInteger& aMVIn2=aFI2.VerticesIn(); + // + for (j=0; j<2; ++j) { + const TColStd_MapOfInteger& aMV1=(!j) ? aMVOn1 :aMVIn1; + aItMI.Initialize(aMV1); + for (; aItMI.More(); aItMI.Next()) { + nV1=aItMI.Key(); + if (aMVOn2.Contains(nV1) || aMVIn2.Contains(nV1)) { + aMVStick.Add(nV1); + } + } + } + // + // aLPB + const NMTTools_MapOfPaveBlock& aMPBIn1=aFI1.PaveBlocksIn(); + const NMTTools_MapOfPaveBlock& aMPBOn1=aFI1.PaveBlocksOn(); + const NMTTools_MapOfPaveBlock& aMPBIn2=aFI2.PaveBlocksIn(); + const NMTTools_MapOfPaveBlock& aMPBOn2=aFI2.PaveBlocksOn(); + // + aMPBX.Clear(); + for (j=0; j<4; ++j) { + NMTTools_MapOfPaveBlock *pMPB; // - if (aMFInOn.IsBound(nF1)) { - const BOPTools_ListOfPaveBlock& aLPBF1=aMFInOn.Find(nF1); - anItPB.Initialize(aLPBF1); - for (; anItPB.More(); anItPB.Next()) { - const BOPTools_PaveBlock& aPB=anItPB.Value(); - if (aMPB.Add(aPB)) { - aLPB.Append(aPB); - } - } + if (!j) { + pMPB=((NMTTools_MapOfPaveBlock*)&aMPBIn1); } - if (aMFInOn.IsBound(nF2)) { - const BOPTools_ListOfPaveBlock& aLPBF2=aMFInOn.Find(nF2); - anItPB.Initialize(aLPBF2); - for (; anItPB.More(); anItPB.Next()) { - const BOPTools_PaveBlock& aPB=anItPB.Value(); - if (aMPB.Contains(aPB)) { - aFFi.AppendBlock(aPB); - } - else { - aLPB.Append(aPB); - } - } + else if (j==1) { + pMPB=((NMTTools_MapOfPaveBlock*)&aMPBOn1); + } + else if (j==2) { + pMPB=((NMTTools_MapOfPaveBlock*)&aMPBIn2); + } + else if (j==3) { + pMPB=((NMTTools_MapOfPaveBlock*)&aMPBOn2); + } + // + const NMTTools_MapOfPaveBlock& aMPB=*pMPB; + aItMPB.Initialize(aMPB); + for (; aItMPB.More(); aItMPB.Next()) { + const BOPTools_PaveBlock& aPB=aItMPB.Key(); + if (aMPBX.Add(aPB)) { + aLPB.Append(aPB); + } + // + else { + if (j>1) { + aFFi.AppendBlock(aPB); + } + } + // } } - //--- - // - TopTools_ListOfShape aLSE; - TColStd_ListOfInteger aLNE; - SharedEdges(nF1, nF2, aLNE, aLSE); - aFFi.SetSharedEdges(aLNE); // BOPTools_SequenceOfCurves& aSCvs=aFFi.Curves(); aNbCurves=aSCvs.Length(); @@ -359,19 +327,18 @@ void NMTTools_PaveFiller::MakeBlocks() continue; } // - // Contribution of Samtech www.samcef.com END aTolR3D=aFFi.TolR3D(); aTol2D=(aTolR3D < 1.e-3) ? 1.e-3 : aTolR3D; // - BOPTools_PaveSet aPSF; + CorrectTolR3D(aFFi, aMVStick, aTolR3D); // PrepareSetForFace (nF1, nF2, aLPB, aPSF); // // Put Paves On Curves for (j=1; j<=aNbCurves; ++j) { BOPTools_Curve& aBC=aSCvs(j); - // DEBUG f const IntTools_Curve& aC=aBC.Curve(); + // DEBUG f Handle(Geom_Curve) aC3D = aC.Curve(); // DEBUG t PutPaveOnCurve (aPSF, aTolR3D, aBC); @@ -417,18 +384,12 @@ void NMTTools_PaveFiller::MakeBlocks() continue; } // - // Modified - // to provide checking whether aPBNew already exists in list - // of section edges aLSE - // Thu Sep 14 14:35:18 2006 - // Contribution of Samtech www.samcef.com BEGIN // 2 bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLSE, aTolR3D); if (bIsExistingPaveBlock) { continue; } - // Contribution of Samtech www.samcef.com END - // + // // Checking of validity in 2D // bIsValidIn2D=myContext.IsValidBlockForFaces(aT1, aT2, aIC, aF1, aF2, aTol2D); @@ -443,7 +404,6 @@ void NMTTools_PaveFiller::MakeBlocks() const TopoDS_Vertex aV1=TopoDS::Vertex(myDS->Shape(nV1)); const TopoDS_Vertex aV2=TopoDS::Vertex(myDS->Shape(nV2)); // - //modified by NIZNHY-PKV Thu Apr 22 07:54:35 2010f { Standard_Real aT; // @@ -453,7 +413,6 @@ void NMTTools_PaveFiller::MakeBlocks() myContext.IsVertexOnLine(aV2, aIC, aTolR3D, aT); BOPTools_Tools::UpdateVertex (aIC, aT, aV2); } - //modified by NIZNHY-PKV Thu Apr 22 07:54:37 2010t // BOPTools_Tools::MakeSectEdge (aIC, aV1, aT1, aV2, aT2, aES); // @@ -519,7 +478,6 @@ void NMTTools_PaveFiller::MakeBlocks() // 2.1.VV tPF.Init(); tPF.PerformVV(); - //tPF.PerformNewVertices(); qq // // 2.2.VE tPF.myPavePool.Resize (tPF.myNbEdges); @@ -1260,7 +1218,6 @@ Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE, // return bRet; } - //======================================================================= // function: PutPaveOnCurve // purpose: @@ -1287,7 +1244,7 @@ void NMTTools_PaveFiller::PutPaveOnCurve(const BOPTools_PaveSet& aPaveSet, const BOPTools_Pave& aPave=anIt.Value(); // nV=aPave.Index(); - const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));//mpv + const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV)); // Bnd_Box aBBV; BRepBndLib::Add(aV, aBBV); @@ -1297,6 +1254,7 @@ void NMTTools_PaveFiller::PutPaveOnCurve(const BOPTools_PaveSet& aPaveSet, // bIsVertexOnLine=myContext.IsVertexOnLine(aV, aC, aTolR3D, aT); // + // if (bIsVertexOnLine) { BOPTools_Pave aPaveNew(nV, aT, BooleanOperations_SurfaceSurface); BOPTools_PaveSet& aPS=aBC.Set(); @@ -1308,3 +1266,256 @@ void NMTTools_PaveFiller::PutPaveOnCurve(const BOPTools_PaveSet& aPaveSet, } } } +//modified by NIZNHY-PKV Tue Feb 08 12:24:35 2011f +// +//======================================================================= +//function : FillFaceInfo +//purpose : +//======================================================================= +void NMTTools_PaveFiller::FillFaceInfo() +{ + Standard_Integer i, aNbS, aNbFFs, nF, aNbVFs, aNbEFs, j, n1, n2, nX, aNbF; + TopAbs_ShapeEnum aType; + TopoDS_Shape aS; + TColStd_ListIteratorOfListOfInteger aItF; + BOPTools_ListIteratorOfListOfPaveBlock anItPB; + NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo aItMFI; + NMTTools_ListIteratorOfListOfCommonBlock aItCB; + // + myFaceInfo.Clear(); + // + BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences(); + BOPTools_CArray1OfVSInterference& aVFs=myIP->VSInterferences(); + BOPTools_CArray1OfESInterference& aEFs=myIP->ESInterferences(); + // + aNbFFs=aFFs.Extent(); + if (!aNbFFs) { + return; + } + // + // 0. + for (i=1; i<=aNbFFs; ++i) { + NMTTools_FaceInfo aFI; + // + BOPTools_SSInterference& aFFi=aFFs(i); + aFFi.Indices(n1, n2); + myFaceInfo.Bind(n1, aFI); + myFaceInfo.Bind(n2, aFI); + } + // + // 1. + aNbS=myDS->NumberOfShapesOfTheObject(); + for (i=1; i<=aNbS; ++i) { + aS=myDS->Shape(i); + aType=aS.ShapeType(); + if (aType==TopAbs_EDGE) { + const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(i)); + aItCB.Initialize(aLCB); + for (; aItCB.More(); aItCB.Next()) { + const NMTTools_CommonBlock& aCB=aItCB.Value(); + const BOPTools_PaveBlock &aPB1=aCB.PaveBlock1(); + const TColStd_ListOfInteger& aLF=aCB.Faces(); + aNbF=aLF.Extent(); + if (!aNbF) { + continue; + } + // + aItF.Initialize(aLF); + for (; aItF.More(); aItF.Next()) { + nF=aItF.Value(); + if (!myFaceInfo.IsBound(nF)) { + continue; + } + // + NMTTools_FaceInfo& aFI=myFaceInfo.ChangeFind(nF); + aFI.ChangePaveBlocksIn().Add(aPB1); + // + n1=aPB1.Pave1().Index(); + n2=aPB1.Pave2().Index(); + aFI.ChangeVerticesIn().Add(n1); + aFI.ChangeVerticesIn().Add(n2); + } + } + }// if (aType==TopAbs_EDGE) { + else if (aType==TopAbs_FACE) { + if (!myFaceInfo.IsBound(i)) { + continue; + } + // + BOPTools_ListOfPaveBlock aLPBOn; + // + nF=i; + NMTTools_FaceInfo& aFI=myFaceInfo.ChangeFind(nF); + // + RealSplitsFace(nF, aLPBOn); + // + anItPB.Initialize(aLPBOn); + for (; anItPB.More(); anItPB.Next()) { + const BOPTools_PaveBlock &aPB=anItPB.Value(); + aFI.ChangePaveBlocksOn().Add(aPB); + // + n1=aPB.Pave1().Index(); + n2=aPB.Pave2().Index(); + aFI.ChangeVerticesOn().Add(n1); + aFI.ChangeVerticesOn().Add(n2); + } + // + }// else if (aType==TopAbs_FACE) { + }// for (i=1; i<=aNbS; ++i) { + // + // 2. + aItMFI.Initialize(myFaceInfo); + for (; aItMFI.More(); aItMFI.Next()) { + nF=aItMFI.Key(); + NMTTools_FaceInfo& aFI=*((NMTTools_FaceInfo*)&aItMFI.Value()); + // + aFI.SetIndex(nF); + // + // + // 2.1 aVFs + aNbVFs=aVFs.Extent(); + for (j=1; j<=aNbVFs; ++j) { + BOPTools_VSInterference& aVFj=aVFs(j); + aVFj.Indices(n1, n2); + if (nF==n1) { + aFI.ChangeVerticesIn().Add(n2); + } + else if (nF==n2){ + aFI.ChangeVerticesIn().Add(n1); + } + }// for (j=1; j<=aNbVFs; ++j) { + // + // 2.2 aEFs + aNbEFs=aEFs.Extent(); + for (j=1; j<=aNbEFs; ++j) { + BOPTools_ESInterference& aEFj=aEFs(j); + aEFj.Indices(n1, n2); + if (!(nF==n1 || nF==n2)) { + continue; + } + // + nX=aEFj.NewShape(); + if (nX<1) { + continue; + } + // + aS=myDS->Shape(nX); + aType=aS.ShapeType(); + if (aType!=TopAbs_VERTEX) { + continue; + } + // + aFI.ChangeVerticesIn().Add(nX); + }// for (j=1; j<=aNbEFs; ++j) { + }// for (; aItMFI.More(); aItMFI.Next()) { +} + + +#include +#include +#include +#include +//======================================================================= +//function : CorrectTolR3D +//purpose : Attempt to correct the value of tolerance aTolR3D for +// the intersection curve in order to +// compel it to pass through the sticks. +// Prerequisites: +// 2. The are based on B-Spline surfaces; +// 1. There is at least the one intersection curve; +// 2. The faces have stick vertices to catch the curve; +// 3. The intersection angle is rather small (0.7-7 deg) +// +//======================================================================= +void NMTTools_PaveFiller::CorrectTolR3D(const BOPTools_SSInterference& aFF, + const TColStd_MapOfInteger& aMVStick, + Standard_Real& aTolR3D) + +{ + Standard_Boolean bHasBounds; + Standard_Integer i, nF[2], nV, aNbCurves; + Standard_Real aT1, aT2, aU, aV, aT, aA, aTolV, aTolVmax; + Standard_Real aTolR, aTolTresh, aAmin, aAmax; + TColStd_MapIteratorOfMapOfInteger aIt; + gp_Pnt aP, aP1, aP2; + gp_Dir aDN[2]; + gp_Vec aVT; + Handle(Geom_Surface) aS[2]; + Handle(Geom_Curve) aC3D; + GeomAdaptor_Surface aGAS; + GeomAbs_SurfaceType aType; + TopoDS_Face aF[2]; + // + aTolTresh=0.0005; + aAmin=0.012;// 0.7-7 deg + aAmax=0.12; + // + if (!aMVStick.Extent()) { + return; + } + // + BOPTools_SSInterference& aFFi=*((BOPTools_SSInterference*)&aFF); + BOPTools_SequenceOfCurves& aSCvs=aFFi.Curves(); + aNbCurves=aSCvs.Length(); + if (aNbCurves!=1){ + return; + } + // + aFFi.Indices(nF[0], nF[1]); + for (i=0; i<2; ++i) { + aF[i]=*((TopoDS_Face*)(&myDS->Shape(nF[i]))); + aS[i]=BRep_Tool::Surface(aF[i]); + aGAS.Load(aS[i]); + aType=aGAS.GetType(); + if (aType!=GeomAbs_BSplineSurface) { + return; + } + } + // + BOPTools_Curve& aBC=aSCvs(1); + const IntTools_Curve& aIC=aBC.Curve(); + bHasBounds=aIC.HasBounds(); + if (!bHasBounds){ + return; + } + // + aIC.Bounds (aT1, aT2, aP1, aP2); + aT=IntTools_Tools::IntermediatePoint(aT1, aT2); + aC3D=aIC.Curve(); + aC3D->D0(aT, aP); + // + for (i=0; i<2; ++i) { + GeomAPI_ProjectPointOnSurf& aPPS=myContext.ProjPS(aF[i]); + aPPS.Perform(aP); + aPPS.LowerDistanceParameters(aU, aV); + BOPTools_Tools3D::GetNormalToSurface(aS[i], aU, aV, aDN[i]); + } + // + aA=aDN[0].Angle(aDN[1]); + aA=fabs(aA); + if (aA>0.5*PI) { + aA=PI-aA; + } + // + if (aAaAmax) { + return; + } + // + aTolVmax=-1.; + aIt.Initialize(aMVStick); + for (; aIt.More(); aIt.Next()) { + nV=aIt.Key(); + const TopoDS_Vertex& aV=*((TopoDS_Vertex*)(&myDS->Shape(nV))); + aTolV=BRep_Tool::Tolerance(aV); + if (aTolV>aTolVmax) { + aTolVmax=aTolV; + } + } + // + + aTolR=aTolVmax/aA; + if (aTolR