dist_admlocalm4_DATA = \
check_GEOM.m4 \
-check_GUI.m4
+check_GUI.m4 \
+check_OpenCV.m4
resources/Makefile \
resources/GEOMCatalog.xml \
resources/SalomeApp.xml \
+ resources/Plugin \
idl/Makefile \
Makefile \
])
# Modified by : Alexander BORODIN (OCN) - autotools usage
#
SUBDIRS = salome docutils
+#SUBDIRS = salome
usr_docs:
(cd salome && $(MAKE) $(AM_MAKEFLAGS) usr_docs)
PAPEROPT_a4 = -D latex_paper_size=a4
ALLSPHINXOPTS = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR)
+if GEOM_ENABLE_GUI
+SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(GUI_ROOT_DIR)/lib/salome:$(GUI_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(GUI_ROOT_DIR)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/bin/salome:$(KERNEL_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages
+else !GEOM_ENABLE_GUI
SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/bin/salome:$(KERNEL_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages
+endif
+if GEOM_ENABLE_GUI
+SPHINX_LD_LIBRARY_PATH = $(GUI_ROOT_DIR)/lib/salome:$(KERNEL_ROOT_DIR)/lib/salome:$(OMNIORB_ROOT)/lib
+else !GEOM_ENABLE_GUI
SPHINX_LD_LIBRARY_PATH = $(KERNEL_ROOT_DIR)/lib/salome:$(OMNIORB_ROOT)/lib
+endif
.PHONY: latex
GEOM_en.xml \
GEOM_fr.xml \
GEOM.config \
-$(top_builddir)/resources/SalomeApp.xml \
-Plugin \
GEOMDS_Resources \
ImportExport \
ShHealing \
dist_salomeres_DATA += $(ADVANCED_RESOURCES)
# VSR: little trick to avoid putting if GEOMCatalog.xml to the distribution archive
-nodist_salomeres_SCRIPTS = GEOMCatalog.xml
+nodist_salomeres_SCRIPTS = GEOMCatalog.xml SalomeApp.xml Plugin
+++ /dev/null
-! Description of available plugins
-! ********************************
-!
-a148e300-5740-11d1-a904-080036aaa103.Location: FWOSPlugin
-!
-! standard attribute drivers plugin
-!
-ad696000-5b34-11d1-b5ba-00a0c9064368.Location: StdPlugin
-ad696001-5b34-11d1-b5ba-00a0c9064368.Location: StdPlugin
-ad696002-5b34-11d1-b5ba-00a0c9064368.Location: StdPlugin
--- /dev/null
+! Description of available plugins
+! ********************************
+!
+a148e300-5740-11d1-a904-080036aaa103.Location: FWOSPlugin
+!
+! standard attribute drivers plugin
+!
+ad696000-5b34-11d1-b5ba-00a0c9064368.Location: @CAS_STDPLUGIN@
+ad696001-5b34-11d1-b5ba-00a0c9064368.Location: @CAS_STDPLUGIN@
+ad696002-5b34-11d1-b5ba-00a0c9064368.Location: @CAS_STDPLUGIN@
<parameter name="name" value="Geometry"/>
<parameter name="icon" value="ModuleGeom.png"/>
<parameter name="documentation" value="geom_help"/>
- <parameter name="GEOM_VERSION" value="@VERSION@"/>
+ <parameter name="version" value="@VERSION@"/>
</section>
<section name="geom_help" >
<parameter name="sub_menu" value="%1 module"/>
- <parameter name="User's Guide" value="${GEOM_ROOT_DIR}/share/doc/salome/gui/GEOM/index.html"/>
- <parameter name="Developer's Guide" value="${GEOM_ROOT_DIR}/share/doc/salome/tui/GEOM/index.html"/>
+ <parameter name="User's Guide" value="%GEOM_ROOT_DIR%/share/doc/salome/gui/GEOM/index.html"/>
+ <parameter name="Developer's Guide" value="%GEOM_ROOT_DIR%/share/doc/salome/tui/GEOM/index.html"/>
</section>
<section name="resources">
<!-- Module resources -->
- <parameter name="GEOM" value="${GEOM_ROOT_DIR}/share/salome/resources/geom"/>
+ <parameter name="GEOM" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
</section>
<section name="Geometry" >
<!-- Other module preferences -->
topLayout->setMargin( 9 ); topLayout->setSpacing( 6 );
MainWidget->buttonCancel->setText( tr( "GEOM_BUT_CANCEL" ) );
- MainWidget->buttonEnd->setText( tr( "GEOM_BUT_END_SKETCH" ) );
+ MainWidget->buttonEnd->setText( tr( "GEOM_BUT_CLOSE" ) );
MainWidget->buttonClose->setText( tr( "GEOM_BUT_CLOSE_SKETCH" ) );
MainWidget->buttonHelp->setText( tr( "GEOM_BUT_HELP" ) );
myCommand.append( ":WW" );
}
else {
- // PAL16008 (Sketcher Validation should be equal to Apply&Close)
+ /*// PAL16008 (Sketcher Validation should be equal to Apply&Close)
if ( ( Group1Spin->buttonApply->isEnabled() && Group1Spin->isVisible() ) ||
( Group2Spin->buttonApply->isEnabled() && Group2Spin->isVisible() ) ||
( Group3Spin->buttonApply->isEnabled() && Group3Spin->isVisible() ) ||
( Group2Sel->buttonApply->isEnabled() && Group2Sel->isVisible() ) ||
( Group1Sel1Spin->buttonApply->isEnabled() && Group1Sel1Spin->isVisible() ) ) {
ClickOnApply();
- }
+ }*/
myIsAllAdded = true;
}
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOM_DataMapOfAsciiStringTransient_HeaderFile
#define _GEOM_DataMapOfAsciiStringTransient_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_NoSuchObject;
class TCollection_AsciiString;
class GEOM_DataMapNodeOfDataMapOfAsciiStringTransient;
class GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
+
class GEOM_DataMapOfAsciiStringTransient : public TCollection_BasicMap {
public:
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
+
// Methods PUBLIC
//
Standard_EXPORT GEOM_DataMapOfAsciiStringTransient(const Standard_Integer NbBuckets = 1);
return ChangeFind(K);
}
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address Find1 (const TCollection_AsciiString& K) const;
+ Standard_EXPORT Standard_Address ChangeFind1 (const TCollection_AsciiString& K);
+#endif
private:
-
// Methods PRIVATE
//
Standard_EXPORT GEOM_DataMapOfAsciiStringTransient(const GEOM_DataMapOfAsciiStringTransient& Other);
-
-
- // Fields PRIVATE
- //
-
-
};
-
-
-
-
// other Inline functions and methods (like "C++: function call" methods)
//
-
#endif
bool GEOM_Engine::Load(int theDocID, char* theFileName)
{
Handle(TDocStd_Document) aDoc;
- if(_OCAFApp->Open(theFileName, aDoc) != CDF_RS_OK) {
+#if OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher
+ if (_OCAFApp->Open(theFileName, aDoc) != PCDM_RS_OK) {
+#else
+ if (_OCAFApp->Open(theFileName, aDoc) != CDF_RS_OK) {
+#endif
return false;
}
else
aEndParamPos = aSection.Length() + 1;
+ if(MYDEBUG)
+ cout<<"aParamIndex: "<<aParamIndex<<" aStartParamPos: " <<aStartParamPos<<" aEndParamPos: "<<aEndParamPos<<endl;
+
+ if ( aStartParamPos == aEndParamPos)
+ continue;
+
aParameter = aSection.SubString(aStartParamPos, aEndParamPos-1);
if(MYDEBUG)
cout<<"aParameter: "<<aParameter<<endl;
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// File: GEOMAlgo_BuilderTools.cxx
-// Created:
// Author: Peter KURNEV
-// <pkv@irinox>
-//
+
#include <GEOMAlgo_BuilderTools.ixx>
+#include <Basics_OCCTVersion.hxx>
+
#include <TColStd_Array1OfReal.hxx>
#include <gp_Pnt2d.hxx>
#include <TopoDS_Edge.hxx>
#include <TopExp_Explorer.hxx>
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+#include <TopExp.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#endif
+
#include <BRep_Tool.hxx>
#include <BRepBndLib.hxx>
#include <BRepMesh_FastDiscret.hxx>
Standard_True,
Standard_False,
Standard_True);
+
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ TopTools_IndexedDataMapOfShapeListOfShape anAncestors;
+ TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, anAncestors);
+ aMesher.Add(aF, anAncestors);
+#else
aMesher.Add(aF);
+#endif
}
#include <TopTools_DataMapOfIntegerShape.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
+#include <TopTools_DataMapOfShapeInteger.hxx>
static
void UpdateCandidates(const Standard_Integer ,
const Standard_Integer ,
NMTTools_IndexedDataMapOfIndexedMapOfInteger& );
+
//=======================================================================
//function : FillImagesFaces
//purpose :
aLSpIn.Clear();
//
// 1. In Parts
+ //modified by NIZNHY-PKV Fri Oct 14 13:58:00 2011f
+ BOPTools_ListOfPaveBlock aLPBIn;
+ //
+ pPF->RealSplitsInFace(nF, aLPBIn);
+ //
+ aItPB.Initialize(aLPBIn);
+ for (; aItPB.More(); aItPB.Next()) {
+ const BOPTools_PaveBlock& aPB1=aItPB.Value();
+ nSpIn=aPB1.Edge();
+ const TopoDS_Shape& aSpIn=aDS.Shape(nSpIn);
+ aLSpIn.Append(aSpIn);
+ }
+ /*
for (j=1; j<=aNbCBP; ++j) {
NMTTools_ListOfCommonBlock& aLCB=aCBP(j);
aItCB.Initialize(aLCB);
}
}
}
+ */
+ //modified by NIZNHY-PKV Fri Oct 14 13:58:08 2011t
//
// 2. Section Parts
for (j=1; j<=aNbFFs; ++j) {
// 2. Find Chains
NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMC;
//
- NMTTools_Tools::FindChains(aLCS, aMC);
+ NMTTools_Tools::FindChains(aLCS, aMC);
+ //
+ //modified by NIZNHY-PKV Wed Oct 12 13:33:59 2011f
+ Standard_Boolean bIsImage;
+ Standard_Integer aIx, aIxMin, aNbMSDF, k, aNbMFj;
+ TopoDS_Shape aFOld, aFSDmin;
+ TopTools_IndexedMapOfShape aMFj;
+ TopTools_DataMapOfShapeInteger aDMSI;
+ //
+ aItF1.Initialize(myShapes);
+ for (j=1; aItF1.More(); aItF1.Next(), ++j) {
+ const TopoDS_Shape& aSj=aItF1.Value();
+ aMFj.Clear();
+ TopExp::MapShapes(aSj, TopAbs_FACE, aMFj);
+ aNbMFj=aMFj.Extent();
+ for (k=1; k<=aNbMFj; ++k) {
+ const TopoDS_Shape& aFk=aMFj(k);
+ if (!aDMSI.IsBound(aFk)) {
+ aDMSI.Bind(aFk, j);
+ }
+ }
+ }
+ //
+ //modified by NIZNHY-PKV Wed Oct 12 13:34:01 2011t
//
// 3. Fill the map of SDF mySameDomainFaces
aNbC=aMC.Extent();
for (i=1; i<=aNbC; ++i) {
- const TopoDS_Shape& aF=aMC.FindKey(i);
+ // const TopoDS_Shape& aF=aMC.FindKey(i);
const TopTools_IndexedMapOfShape& aMSDF=aMC(i);
//
+ //modified by NIZNHY-PKV Wed Oct 12 13:25:16 2011f
+ aNbMSDF=aMSDF.Extent();
+ for (j=1; j<=aNbMSDF; ++j) {
+ const TopoDS_Shape& aFSD=aMSDF(j);
+ bIsImage=mySplitFaces.IsImage(aFSD);
+ aFOld=aFSD;
+ if (bIsImage) {
+ aFOld=mySplitFaces.ImageFrom(aFSD);
+ }
+ //
+ aIx=aDMSI.Find(aFOld);
+ if (j==1) {
+ aIxMin=aIx;
+ aFSDmin=aFSD;
+ continue;
+ }
+ else {
+ if (aIx<aIxMin) {
+ aIxMin=aIx;
+ aFSDmin=aFSD;
+ }
+ }
+ }
+ //
+ for (j=1; j<=aNbMSDF; ++j) {
+ const TopoDS_Shape& aFSD=aMSDF(j);
+ mySameDomainShapes.Add(aFSD, aFSDmin);
+ }
+ /*
aNbFF=aMSDF.Extent();
for (j=1; j<=aNbFF; ++j) {
const TopoDS_Shape& aFSD=aMSDF(j);
mySameDomainShapes.Add(aFSD, aF);
}
+ */
+ //modified by NIZNHY-PKV Wed Oct 12 13:25:18 2011t
}
//
}
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
#define _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_NoSuchObject;
class TopoDS_Shape;
class GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape;
class GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
-class GEOMAlgo_DataMapOfOrientedShapeShape : public TCollection_BasicMap {
-
+class GEOMAlgo_DataMapOfOrientedShapeShape : 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_DataMapOfOrientedShapeShape(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT GEOMAlgo_DataMapOfOrientedShapeShape& Assign(const GEOMAlgo_DataMapOfOrientedShapeShape& Other) ;
+ 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_DataMapOfOrientedShapeShape(const Standard_Integer NbBuckets = 1);
+
+ Standard_EXPORT GEOMAlgo_DataMapOfOrientedShapeShape& Assign(const GEOMAlgo_DataMapOfOrientedShapeShape& Other) ;
GEOMAlgo_DataMapOfOrientedShapeShape& operator =(const GEOMAlgo_DataMapOfOrientedShapeShape& Other)
-{
- return Assign(Other);
-}
-
+ {
+ return Assign(Other);
+ }
+ Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
+ Standard_EXPORT void Clear() ;
+ ~GEOMAlgo_DataMapOfOrientedShapeShape()
+ {
+ Clear();
+ }
+ Standard_EXPORT Standard_Boolean Bind(const TopoDS_Shape& K,const TopoDS_Shape& I) ;
+ Standard_EXPORT Standard_Boolean IsBound(const TopoDS_Shape& K) const;
+ Standard_EXPORT Standard_Boolean UnBind(const TopoDS_Shape& K) ;
-Standard_EXPORT void Clear() ;
-~GEOMAlgo_DataMapOfOrientedShapeShape()
-{
- Clear();
-}
-
-
-
-Standard_EXPORT Standard_Boolean Bind(const TopoDS_Shape& K,const TopoDS_Shape& I) ;
-
-
-Standard_EXPORT Standard_Boolean IsBound(const TopoDS_Shape& K) const;
-
-
-Standard_EXPORT Standard_Boolean UnBind(const TopoDS_Shape& K) ;
-
-
-Standard_EXPORT const TopoDS_Shape& Find(const TopoDS_Shape& K) const;
- const TopoDS_Shape& operator()(const TopoDS_Shape& K) const
-{
- return Find(K);
-}
-
+ Standard_EXPORT const TopoDS_Shape& Find(const TopoDS_Shape& K) const;
+ const TopoDS_Shape& operator()(const TopoDS_Shape& K) const
+ {
+ return Find(K);
+ }
-
-Standard_EXPORT TopoDS_Shape& ChangeFind(const TopoDS_Shape& K) ;
+ Standard_EXPORT TopoDS_Shape& ChangeFind(const TopoDS_Shape& K) ;
TopoDS_Shape& operator()(const TopoDS_Shape& K)
-{
- return ChangeFind(K);
-}
-
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
+ {
+ return ChangeFind(K);
+ }
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const;
+ Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K);
+#endif
private:
// Methods PRIVATE
//
-
-
Standard_EXPORT GEOMAlgo_DataMapOfOrientedShapeShape(const GEOMAlgo_DataMapOfOrientedShapeShape& Other);
-
- // Fields PRIVATE
- //
-
-
};
-
-
-
-
// other Inline functions and methods (like "C++: function call" methods)
//
-
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile
#define _GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_NoSuchObject;
class GEOMAlgo_PassKey;
class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger;
class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class GEOMAlgo_DataMapOfPassKeyInteger : public TCollection_BasicMap {
{
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
- //
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address Find1 (const GEOMAlgo_PassKey& K) const;
+ Standard_EXPORT Standard_Address ChangeFind1 (const GEOMAlgo_PassKey& K);
+#endif
private:
// Methods PRIVATE
//
-
-
Standard_EXPORT GEOMAlgo_DataMapOfPassKeyInteger(const GEOMAlgo_DataMapOfPassKeyInteger& Other);
-
- // Fields PRIVATE
- //
-
-
};
-
-
-
-
// other Inline functions and methods (like "C++: function call" methods)
//
-
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile
#define _GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_NoSuchObject;
class GEOMAlgo_PassKeyShape;
class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape;
class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class GEOMAlgo_DataMapOfPassKeyShapeShape : public TCollection_BasicMap {
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
+
// Methods PUBLIC
//
-
Standard_EXPORT GEOMAlgo_DataMapOfPassKeyShapeShape(const Standard_Integer NbBuckets = 1);
-
Standard_EXPORT GEOMAlgo_DataMapOfPassKeyShapeShape& Assign(const GEOMAlgo_DataMapOfPassKeyShapeShape& Other) ;
GEOMAlgo_DataMapOfPassKeyShapeShape& operator =(const GEOMAlgo_DataMapOfPassKeyShapeShape& Other)
{
return Assign(Other);
}
-
-
Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
Standard_EXPORT void Clear() ;
~GEOMAlgo_DataMapOfPassKeyShapeShape()
{
Clear();
}
-
-
Standard_EXPORT Standard_Boolean Bind(const GEOMAlgo_PassKeyShape& K,const TopoDS_Shape& I) ;
-
-
Standard_EXPORT Standard_Boolean IsBound(const GEOMAlgo_PassKeyShape& K) const;
-
-
Standard_EXPORT Standard_Boolean UnBind(const GEOMAlgo_PassKeyShape& K) ;
-
Standard_EXPORT const TopoDS_Shape& Find(const GEOMAlgo_PassKeyShape& K) const;
const TopoDS_Shape& operator()(const GEOMAlgo_PassKeyShape& K) const
{
return Find(K);
}
-
-
Standard_EXPORT TopoDS_Shape& ChangeFind(const GEOMAlgo_PassKeyShape& K) ;
TopoDS_Shape& operator()(const GEOMAlgo_PassKeyShape& K)
{
return ChangeFind(K);
}
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address Find1 (const GEOMAlgo_PassKeyShape& K) const;
+ Standard_EXPORT Standard_Address ChangeFind1 (const GEOMAlgo_PassKeyShape& K);
+#endif
private:
// Methods PRIVATE
- //
-
-
-Standard_EXPORT GEOMAlgo_DataMapOfPassKeyShapeShape(const GEOMAlgo_DataMapOfPassKeyShapeShape& Other);
-
-
- // Fields PRIVATE
//
-
+Standard_EXPORT GEOMAlgo_DataMapOfPassKeyShapeShape(const GEOMAlgo_DataMapOfPassKeyShapeShape& Other);
};
-
-
-
-
// other Inline functions and methods (like "C++: function call" methods)
//
-
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_DataMapOfRealListOfShape_HeaderFile
#define _GEOMAlgo_DataMapOfRealListOfShape_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_NoSuchObject;
class TopTools_ListOfShape;
class GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape;
class GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class GEOMAlgo_DataMapOfRealListOfShape : public TCollection_BasicMap {
return Assign(Other);
}
-
-
Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
Clear();
}
-
-
Standard_EXPORT Standard_Boolean Bind(const Standard_Real& K,const TopTools_ListOfShape& I) ;
-
-
Standard_EXPORT Standard_Boolean IsBound(const Standard_Real& K) const;
-
-
Standard_EXPORT Standard_Boolean UnBind(const Standard_Real& K) ;
-
Standard_EXPORT const TopTools_ListOfShape& Find(const Standard_Real& K) const;
const TopTools_ListOfShape& operator()(const Standard_Real& K) const
{
return Find(K);
}
-
-
Standard_EXPORT TopTools_ListOfShape& ChangeFind(const Standard_Real& K) ;
TopTools_ListOfShape& operator()(const Standard_Real& K)
{
return ChangeFind(K);
}
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address Find1 (const Standard_Real& K) const;
+ Standard_EXPORT Standard_Address ChangeFind1 (const Standard_Real& K);
+#endif
private:
// Methods PRIVATE
//
-
-
Standard_EXPORT GEOMAlgo_DataMapOfRealListOfShape(const GEOMAlgo_DataMapOfRealListOfShape& Other);
-
- // Fields PRIVATE
- //
-
-
};
-
-
-
-
// other Inline functions and methods (like "C++: function call" methods)
//
-
#endif
#ifndef _Standard_Boolean_HeaderFile\r
#include <Standard_Boolean.hxx>\r
#endif\r
+\r
class Standard_DomainError;\r
class Standard_NoSuchObject;\r
class TopoDS_Shape;\r
class GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape;\r
class GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape;\r
\r
-\r
+#include <Basics_OCCTVersion.hxx>\r
\r
class GEOMAlgo_DataMapOfShapeMapOfShape : public TCollection_BasicMap {\r
public:\r
return ChangeFind(K);\r
}\r
\r
-\r
-\r
-\r
-\r
-protected:\r
-\r
-\r
-\r
-\r
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version\r
+ Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const;\r
+ Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K);\r
+#endif\r
\r
private:\r
-\r
\r
Standard_EXPORT GEOMAlgo_DataMapOfShapeMapOfShape(const GEOMAlgo_DataMapOfShapeMapOfShape& Other);\r
\r
-\r
-\r
-\r
};\r
\r
-\r
-\r
-\r
-\r
// other Inline functions and methods (like "C++: function call" methods)\r
\r
-\r
#endif\r
#ifndef _Standard_Boolean_HeaderFile\r
#include <Standard_Boolean.hxx>\r
#endif\r
+\r
class Standard_DomainError;\r
class Standard_NoSuchObject;\r
class TopoDS_Shape;\r
class GEOMAlgo_DataMapNodeOfDataMapOfShapePnt;\r
class GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt;\r
\r
-\r
+#include <Basics_OCCTVersion.hxx>\r
\r
class GEOMAlgo_DataMapOfShapePnt : public TCollection_BasicMap {\r
public:\r
return ChangeFind(K);\r
}\r
\r
-\r
-\r
-\r
-\r
-protected:\r
-\r
-\r
-\r
-\r
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version\r
+ Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const;\r
+ Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K);\r
+#endif\r
\r
private:\r
-\r
\r
Standard_EXPORT GEOMAlgo_DataMapOfShapePnt(const GEOMAlgo_DataMapOfShapePnt& Other);\r
\r
-\r
-\r
-\r
};\r
\r
-\r
-\r
-\r
-\r
// other Inline functions and methods (like "C++: function call" methods)\r
\r
-\r
#endif\r
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_DataMapOfShapeReal_HeaderFile
#define _GEOMAlgo_DataMapOfShapeReal_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_NoSuchObject;
class TopoDS_Shape;
class GEOMAlgo_DataMapNodeOfDataMapOfShapeReal;
class GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class GEOMAlgo_DataMapOfShapeReal : public TCollection_BasicMap {
return ChangeFind(K);
}
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const;
+ Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K);
+#endif
private:
};
-
-
-
-
// other Inline functions and methods (like "C++: function call" methods)
//
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
+
class GEOMAlgo_DataMapOfShapeShapeSet : public TCollection_BasicMap {
public:
return ChangeFind(K);
}
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const;
+ Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K);
+#endif
+
private:
Standard_EXPORT GEOMAlgo_DataMapOfShapeShapeSet(const GEOMAlgo_DataMapOfShapeShapeSet& Other);
};
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// File: GEOMAlgo_FinderShapeOn.cxx
// Created: Tue Jan 11 14:44:31 2005
// Author: Peter KURNEV
-// <pkv@irinox>
-//
+
#include <GEOMAlgo_FinderShapeOn.ixx>
+#include <Basics_OCCTVersion.hxx>
+
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+#include <Precision.hxx>
+#endif
+
#include <gp_Pnt.hxx>
#include <TopAbs_ShapeEnum.hxx>
//
// Argument 1
if (!myIsAnalytic) {
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ aMF.Init(mySurface, Standard_True, Precision::Confusion());
+#else
aMF.Init(mySurface, Standard_True);
+#endif
aFErr=aMF.Error();
if (aFErr!=BRepLib_FaceDone) {
myErrorStatus=20; // can not build the face
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
// File: GEOMAlgo_GetInPlace_1.cxx
-// Created:
// Author: Peter KURNEV
#include <GEOMAlgo_GetInPlace.hxx>
Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2)
{
- Standard_Boolean bOk, bIsDone;
+ Standard_Boolean bOk;
Standard_Integer iErr;
- Standard_Real aTol2, aD2;
+ Standard_Real aTol2;
TopAbs_ShapeEnum aType1, aType2;
TopAbs_State aState;
gp_Pnt aP1, aP2;
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile
#define _GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_OutOfRange;
class Standard_NoSuchObject;
class TColStd_MapIntegerHasher;
class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class GEOMAlgo_IndexedDataMapOfIntegerShape : public TCollection_BasicMap {
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
+
// Methods PUBLIC
//
-
Standard_EXPORT GEOMAlgo_IndexedDataMapOfIntegerShape(const Standard_Integer NbBuckets = 1);
-
Standard_EXPORT GEOMAlgo_IndexedDataMapOfIntegerShape& Assign(const GEOMAlgo_IndexedDataMapOfIntegerShape& Other) ;
GEOMAlgo_IndexedDataMapOfIntegerShape& operator =(const GEOMAlgo_IndexedDataMapOfIntegerShape& Other)
{
return Assign(Other);
}
-
-
Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
Standard_EXPORT void Clear() ;
~GEOMAlgo_IndexedDataMapOfIntegerShape()
{
Clear();
}
-
-
Standard_EXPORT Standard_Integer Add(const Standard_Integer& K,const TopoDS_Shape& I) ;
-
Standard_EXPORT void Substitute(const Standard_Integer I,const Standard_Integer& K,const TopoDS_Shape& T) ;
-
Standard_EXPORT void RemoveLast() ;
-
Standard_EXPORT Standard_Boolean Contains(const Standard_Integer& K) const;
-
Standard_EXPORT const Standard_Integer& FindKey(const Standard_Integer I) const;
-
Standard_EXPORT const TopoDS_Shape& FindFromIndex(const Standard_Integer I) const;
const TopoDS_Shape& operator ()(const Standard_Integer I) const
{
return FindFromIndex(I);
}
-
-
Standard_EXPORT TopoDS_Shape& ChangeFromIndex(const Standard_Integer I) ;
TopoDS_Shape& operator ()(const Standard_Integer I)
{
return ChangeFromIndex(I);
}
-
-
Standard_EXPORT Standard_Integer FindIndex(const Standard_Integer& K) const;
-
Standard_EXPORT const TopoDS_Shape& FindFromKey(const Standard_Integer& K) const;
-
-
Standard_EXPORT TopoDS_Shape& ChangeFromKey(const Standard_Integer& K) ;
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address FindFromKey1 (const Standard_Integer& K) const;
+ Standard_EXPORT Standard_Address ChangeFromKey1 (const Standard_Integer& K);
+#endif
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
+private:
// Methods PRIVATE
- //
-
-
-Standard_EXPORT GEOMAlgo_IndexedDataMapOfIntegerShape(const GEOMAlgo_IndexedDataMapOfIntegerShape& Other);
-
-
- // Fields PRIVATE
//
-
-
+Standard_EXPORT GEOMAlgo_IndexedDataMapOfIntegerShape(const GEOMAlgo_IndexedDataMapOfIntegerShape& Other);
};
-
-
-
-
// other Inline functions and methods (like "C++: function call" methods)
//
-
#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_HeaderFile
#define _GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_HeaderFile
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
+
class GEOMAlgo_IndexedDataMapOfPassKeyListOfShape : public TCollection_BasicMap {
public:
Standard_EXPORT const TopTools_ListOfShape& FindFromKey(const GEOMAlgo_PassKey& K) const;
Standard_EXPORT TopTools_ListOfShape& ChangeFromKey(const GEOMAlgo_PassKey& K) ;
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address FindFromKey1 (const GEOMAlgo_PassKey& K) const;
+ Standard_EXPORT Standard_Address ChangeFromKey1 (const GEOMAlgo_PassKey& K);
+#endif
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
#define _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape : public TCollection_BasicMap {
Standard_EXPORT TopTools_ListOfShape& ChangeFromKey(const GEOMAlgo_PassKeyShape& K) ;
-
-
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address FindFromKey1 (const GEOMAlgo_PassKeyShape& K) const;
+ Standard_EXPORT Standard_Address ChangeFromKey1 (const GEOMAlgo_PassKeyShape& K);
+#endif
protected:
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile
#define _GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class GEOMAlgo_IndexedDataMapOfShapeBox : public TCollection_BasicMap {
Standard_EXPORT const Bnd_Box& FindFromKey(const TopoDS_Shape& K) const;
-
-
Standard_EXPORT Bnd_Box& ChangeFromKey(const TopoDS_Shape& K) ;
-
-
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const;
+ Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K);
+#endif
protected:
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile
#define _GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class GEOMAlgo_IndexedDataMapOfShapeShapeInfo : public TCollection_BasicMap {
Standard_EXPORT GEOMAlgo_ShapeInfo& ChangeFromKey(const TopoDS_Shape& K) ;
-
-
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const;
+ Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K);
+#endif
protected:
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
#define _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class GEOMAlgo_IndexedDataMapOfShapeState : public TCollection_BasicMap {
Standard_EXPORT const TopAbs_State& FindFromKey(const TopoDS_Shape& K) const;
-
-
Standard_EXPORT TopAbs_State& ChangeFromKey(const TopoDS_Shape& K) ;
-
-
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const;
+ Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K);
+#endif
protected:
#include <Prs3d_ShadingAspect.hxx>
+#include <BRepMesh_IncrementalMesh.hxx>
+
// VTK Includes
#include <vtkActorCollection.h>
#include <vtkProperty.h>
myToActivate = true;
// This parameter is used for activisation/deactivisation of objects to be displayed
+
+ #if OCC_VERSION_LARGE > 0x06050100 // Functionnality available only in OCCT 6.5.2
+ // Activate parallel vizualisation only for testing purpose
+ // and if the corresponding env variable is set to 1
+ char* parallel_visu = getenv("PARALLEL_VISU");
+ if (parallel_visu && atoi(parallel_visu))
+ {
+ MESSAGE("Parallel visualisation on");
+ BRepMesh_IncrementalMesh::SetParallelDefault(Standard_True);
+ }
+ #endif
myViewFrame = 0;
}
</message>
<message>
<source>MEN_GROUP_CREATE</source>
- <translation>Créer une groupe</translation>
+ <translation>Créer un groupe</translation>
</message>
<message>
<source>MEN_GROUP_EDIT</source>
}
Standard_EXPORT char* getModuleVersion() {
- return GEOM_VERSION_STR;
+ return (char*)GEOM_VERSION_STR;
}
}
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include "GEOMImpl_ArchimedeDriver.hxx"
#include "GEOMImpl_IArchimede.hxx"
#include "Archimede_VolumeSection.hxx"
+#include <Basics_OCCTVersion.hxx>
+
#include <stdio.h>
#include <BRepBuilderAPI_MakeFace.hxx>
Standard_Real u1,u2,v1,v2;
SurfaceTrimmee->Bounds(u1,u2,v1,v2);
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ TopoDS_Face tirant = BRepBuilderAPI_MakeFace(SurfaceTrimmee, u1, u2, v1, v2, Precision::Confusion());
+#else
TopoDS_Face tirant = BRepBuilderAPI_MakeFace(SurfaceTrimmee, u1, u2, v1, v2);
+#endif
if (tirant.IsNull()) {
StdFail_NotDone::Raise("Failed to build secant face");
}
}
- return _anOtherObject ;
+ return _anOtherObject;
}
-
-
// we obtain BSpline curve of degree 1 (C0), which is slowly
// processed by some algorithms (Partition for example).
BO.Approximation(Standard_True);
+ //modified by NIZNHY-PKV Tue Oct 18 14:34:16 2011f
+ BO.ComputePCurveOn1(Standard_True);
+ BO.ComputePCurveOn2(Standard_True);
+ //modified by NIZNHY-PKV Tue Oct 18 14:34:18 2011t
+
BO.Build();
if (!BO.IsDone()) {
StdFail_NotDone::Raise("Section operation can not be performed on the given shapes");
#include <StdFail_NotDone.hxx>
+#include <Precision.hxx>
+
+#include<cmath>
+
//=======================================================================
//function : GetID
//purpose :
gp_Pnt P1 = BRep_Tool::Pnt(TopoDS::Vertex(aShape1));
gp_Pnt P2 = BRep_Tool::Pnt(TopoDS::Vertex(aShape2));
- if (P1.X() == P2.X() || P1.Y() == P2.Y() || P1.Z() == P2.Z()) {
- StdFail_NotDone::Raise("Box can not be created, the points belong to the same plane");
+ if (std::abs(P1.X() - P2.X()) < Precision::Confusion() ||
+ std::abs(P1.Y() - P2.Y()) < Precision::Confusion() ||
+ std::abs(P1.Z() - P2.Z()) < Precision::Confusion() ) {
+ StdFail_NotDone::Raise("Box can not be created, the points belong both to one of the OXY, OYZ or OZX planes");
return 0;
}
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <Standard_Stream.hxx>
#include <GEOMImpl_FillingDriver.hxx>
-#include <GEOM_Function.hxx>
#include <GEOMImpl_IFilling.hxx>
#include <GEOMImpl_Types.hxx>
+#include <GEOM_Function.hxx>
+
+#include <Basics_OCCTVersion.hxx>
+
+#include <ShapeFix_Face.hxx>
+
#include <BRep_Tool.hxx>
#include <BRepAlgo.hxx>
-#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRep_Builder.hxx>
+#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRepBuilderAPI_Copy.hxx>
#include <TopAbs.hxx>
+#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
-#include <TopoDS_Shape.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx>
+#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
-#include <TopExp_Explorer.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <Geom_Circle.hxx>
#include <Geom_Ellipse.hxx>
#include <Geom_BezierCurve.hxx>
+#include <Geom_BSplineCurve.hxx>
#include <Geom_BSplineSurface.hxx>
#include <GeomFill_Line.hxx>
#include <GeomFill_AppSurf.hxx>
#include <GeomFill_SectionGenerator.hxx>
-
-#include <Precision.hxx>
-#include <Standard_ConstructionError.hxx>
-
-#include <TColGeom_SequenceOfCurve.hxx>
-#include <ShapeFix_Face.hxx>
#include <GeomAPI_PointsToBSplineSurface.hxx>
-#include <Geom_BSplineCurve.hxx>
#include <GeomAPI_PointsToBSpline.hxx>
+#include <TColGeom_SequenceOfCurve.hxx>
+
#include <TColgp_SequenceOfPnt.hxx>
#include <TColgp_Array1OfPnt.hxx>
-//#include <BRepTools.hxx>
+#include <Precision.hxx>
+#include <Standard_ConstructionError.hxx>
//=======================================================================
//function : GetID
return aFillingDriver;
}
-
//=======================================================================
//function : GEOMImpl_FillingDriver
//purpose :
App.SurfUMults(), App.SurfVMults(), App.UDegree(), App.VDegree());
if (GBS.IsNull()) return 0;
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ aShape = BRepBuilderAPI_MakeFace(GBS, Precision::Confusion());
+#else
aShape = BRepBuilderAPI_MakeFace(GBS);
+#endif
}
else {
// implemented by skl 20.03.2008 for bug 16568
}
GeomAPI_PointsToBSplineSurface PTB(Points,mindeg,maxdeg,GeomAbs_C2,tol3d);
Handle(Geom_BSplineSurface) BS = PTB.Surface();
- BRepBuilderAPI_MakeFace BB(BS);
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ BRepBuilderAPI_MakeFace BB (BS, Precision::Confusion());
+#else
+ BRepBuilderAPI_MakeFace BB (BS);
+#endif
TopoDS_Face NewF = BB.Face();
Handle(ShapeFix_Face) sff = new ShapeFix_Face(NewF);
sff->Perform();
#include <GEOMImpl_HealingDriver.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOMImpl_IHealing.hxx>
+#include <GEOMImpl_IVector.hxx>
+#include <GEOMImpl_VectorDriver.hxx>
#include <GEOMImpl_CopyDriver.hxx>
#include <Basics_OCCTVersion.hxx>
if (aLastFunction.IsNull())
return NULL; //There is no function which creates an object to be processed
- //Add the function
- aFunction = theObject->AddFunction(GEOMImpl_HealingDriver::GetID(), CHANGE_ORIENTATION);
+ if (theObject->GetType() == GEOM_VECTOR) { // Mantis issue 21066
+ //Add the function
+ aFunction = theObject->AddFunction(GEOMImpl_VectorDriver::GetID(), VECTOR_REVERSE);
- if (aFunction.IsNull())
- return NULL;
+ //Check if the function is set correctly
+ if (aFunction.IsNull()) return NULL;
+ if (aFunction->GetDriverGUID() != GEOMImpl_VectorDriver::GetID()) return NULL;
- //Check if the function is set correctly
- if (aFunction->GetDriverGUID() != GEOMImpl_HealingDriver::GetID()) return NULL;
+ // prepare "data container" class IVector
+ GEOMImpl_IVector aVI (aFunction);
+ aVI.SetCurve(aLastFunction);
+ }
+ else {
+ //Add the function
+ aFunction = theObject->AddFunction(GEOMImpl_HealingDriver::GetID(), CHANGE_ORIENTATION);
- // prepare "data container" class IHealing
- GEOMImpl_IHealing HI(aFunction);
- HI.SetOriginal( aLastFunction );
+ //Check if the function is set correctly
+ if (aFunction.IsNull()) return NULL;
+ if (aFunction->GetDriverGUID() != GEOMImpl_HealingDriver::GetID()) return NULL;
+
+ // prepare "data container" class IHealing
+ GEOMImpl_IHealing HI (aFunction);
+ HI.SetOriginal(aLastFunction);
+ }
//Compute the translation
try {
return NULL; //There is no function which creates an object to be processed
// Add a new object
- Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), theObject->GetType() );
+ Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), theObject->GetType());
- //Add the function
- aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), CHANGE_ORIENTATION);
+ if (theObject->GetType() == GEOM_VECTOR) { // Mantis issue 21066
+ //Add the function
+ aFunction = aNewObject->AddFunction(GEOMImpl_VectorDriver::GetID(), VECTOR_REVERSE);
- if (aFunction.IsNull())
- return NULL;
+ //Check if the function is set correctly
+ if (aFunction.IsNull()) return NULL;
+ if (aFunction->GetDriverGUID() != GEOMImpl_VectorDriver::GetID()) return NULL;
- //Check if the function is set correctly
- if (aFunction->GetDriverGUID() != GEOMImpl_HealingDriver::GetID()) return NULL;
+ // prepare "data container" class IVector
+ GEOMImpl_IVector aVI (aFunction);
+ aVI.SetCurve(aLastFunction);
+ }
+ else {
+ //Add the function
+ aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), CHANGE_ORIENTATION);
- // prepare "data container" class IHealing
- GEOMImpl_IHealing HI(aFunction);
- HI.SetOriginal( aLastFunction );
+ //Check if the function is set correctly
+ if (aFunction.IsNull()) return NULL;
+ if (aFunction->GetDriverGUID() != GEOMImpl_HealingDriver::GetID()) return NULL;
- //Compute the translation
+ // prepare "data container" class IHealing
+ GEOMImpl_IHealing aHI (aFunction);
+ aHI.SetOriginal(aLastFunction);
+ }
+
+ // Compute the result
try {
#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
#include "GEOMImpl_IGlue.hxx"
#include "GEOMImpl_Block6Explorer.hxx"
+#include "GEOMImpl_IHealingOperations.hxx"
+
+#include <GEOMImpl_Gen.hxx>
#include "GEOM_Function.hxx"
#include "GEOM_ISubShape.hxx"
if (theShape.IsNull()) return NULL;
+ /*
//Add a new reversed object
Handle(GEOM_Object) aReversed = GetEngine()->AddObject(GetDocID(), theShape->GetType());
<< " = geompy.ChangeOrientation(" << theShape << ")";
SetErrorCode(OK);
+ */
+
+ Handle(GEOM_Object) aReversed;
+
+ GEOM_Engine* anEngine = GetEngine();
+ //GEOMImpl_Gen* aGen = dynamic_cast<GEOMImpl_Gen*>(anEngine);
+ GEOMImpl_Gen* aGen = (GEOMImpl_Gen*)anEngine;
+
+ if (aGen) {
+ GEOMImpl_IHealingOperations* anIHealingOperations =
+ aGen->GetIHealingOperations(GetDocID());
+ aReversed = anIHealingOperations->ChangeOrientationCopy(theShape);
+ SetErrorCode(anIHealingOperations->GetErrorCode());
+ }
+
return aReversed;
}
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <Standard_Stream.hxx>
#include <GEOMImpl_IMeasureOperations.hxx>
+#include <Basics_OCCTVersion.hxx>
+
// OCCT Includes
#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRep_Tool.hxx>
if (gp_Vec(aP1, aP2).IsParallel(gp_Vec(aP1, aP3), Precision::Angular()))
Standard_ConstructionError::Raise("Plane creation aborted: points lay on one line");
GC_MakePlane aMakePlane (aP1, aP2, aP3);
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ aShape = BRepBuilderAPI_MakeFace(aMakePlane, -aSize, +aSize, -aSize, +aSize,
+ Precision::Confusion()).Shape();
+#else
aShape = BRepBuilderAPI_MakeFace(aMakePlane, -aSize, +aSize, -aSize, +aSize).Shape();
+#endif
} else if (aType == PLANE_FACE) {
Handle(GEOM_Function) aRef = aPI.GetFace();
TopoDS_Shape aRefShape = aRef->GetValue();
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <GEOMImpl_ShapeDriver.hxx>
aShape = C;
}
+ /*
else if (aType == REVERSE_ORIENTATION) {
Handle(GEOM_Function) aRefShape = aCI.GetBase();
TopoDS_Shape aShape_i = aRefShape->GetValue();
aShape = tds;
}
}
+ */
else if (aType == EDGE_WIRE) {
Handle(GEOM_Function) aRefBase = aCI.GetBase();
TopoDS_Shape aWire = aRefBase->GetValue();
// 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_Object types
+
+// GEOM_Object types
#define GEOM_COPY 0
#define GEOM_IMPORT 1
#define POINT_SURFACE_COORD 7
#define POINT_CURVE_LENGTH 8
+// Vector
#define VECTOR_TWO_PNT 1
#define VECTOR_DX_DY_DZ 2
#define VECTOR_TANGENT_CURVE_PAR 3
-#define VECTOR_FACE_NORMALE 4
-#define VERTEX_BY_INDEX 5
+#define VECTOR_REVERSE 4
#define PLANE_PNT_VEC 1
#define PLANE_FACE 2
#define POLYLINE_POINTS 1
+#define SPLINE_BEZIER 1
+#define SPLINE_INTERPOLATION 2
+
#define CIRCLE_THREE_PNT 1
#define CIRCLE_PNT_VEC_R 2
#define CIRCLE_CENTER_TWO_PNT 3
-#define SPLINE_BEZIER 1
-#define SPLINE_INTERPOLATION 2
-
#define ELLIPSE_PNT_VEC_RR 1
+// Arc
#define CIRC_ARC_THREE_PNT 1
#define CIRC_ARC_CENTER 2
#define ELLIPSE_ARC_CENTER_TWO_PNT 3
#define CHAMFER_SHAPE_FACES_AD 6
#define CHAMFER_SHAPE_EDGES_AD 7
+// Shape creation
#define WIRE_EDGES 1
#define FACE_WIRE 2
#define SHELL_FACES 3
#define SUBSHAPE_SORTED 7
#define SUBSHAPE_NOT_SORTED 8
#define FACE_WIRES 9
-#define REVERSE_ORIENTATION 10
+//#define REVERSE_ORIENTATION 10
#define EDGE_WIRE 11
#define EDGE_CURVE_LENGTH 12
#define SKETCHER_NINE_DOUBLS 1
#define SKETCHER_PLANE 2
+// Measures
#define CDG_MEASURE 1
+#define VECTOR_FACE_NORMALE 4
+#define VERTEX_BY_INDEX 5
#define GROUP_FUNCTION 1
#define SHAPES_ON_SHAPE 1
-//Curve constructor type
+// Curve constructor type
#define POINT_CONSTRUCTOR 0
#define COORD_CONSTRUCTOR 1
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <Standard_Stream.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <TopAbs.hxx>
+#include <TopExp.hxx>
#include <TopoDS.hxx>
+#include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
GEOMImpl_IVector aPI (aFunction);
Standard_Integer aType = aFunction->GetType();
- if (aType != VECTOR_DX_DY_DZ && aType != VECTOR_TWO_PNT && aType != VECTOR_TANGENT_CURVE_PAR) return 0;
+ if (aType != VECTOR_DX_DY_DZ && aType != VECTOR_TWO_PNT &&
+ aType != VECTOR_TANGENT_CURVE_PAR && aType != VECTOR_REVERSE) return 0;
TopoDS_Shape aShape;
Standard_ConstructionError::Raise(aMsg.ToCString());
}
aShape = BRepBuilderAPI_MakeEdge(P1, P2).Shape();
- } else if (aType == VECTOR_TWO_PNT) {
+ }
+ else if (aType == VECTOR_TWO_PNT) {
Handle(GEOM_Function) aRefPnt1 = aPI.GetPoint1();
Handle(GEOM_Function) aRefPnt2 = aPI.GetPoint2();
TopoDS_Shape aShape1 = aRefPnt1->GetValue();
}
aShape = BRepBuilderAPI_MakeEdge(V1, V2).Shape();
}
- else if(aType == VECTOR_TANGENT_CURVE_PAR) {
+ else if (aType == VECTOR_TANGENT_CURVE_PAR) {
Handle(GEOM_Function) aRefCurve = aPI.GetCurve();
TopoDS_Shape aRefShape = aRefCurve->GetValue();
if (aRefShape.ShapeType() != TopAbs_EDGE) {
if(aBuilder.IsDone())
aShape = aBuilder.Shape();
}
+ else if (aType == VECTOR_REVERSE) {
+ Handle(GEOM_Function) aRefVec = aPI.GetCurve();
+ TopoDS_Shape aRefShape = aRefVec->GetValue();
+ if (aRefShape.ShapeType() != TopAbs_EDGE) {
+ Standard_TypeMismatch::Raise
+ ("Reversed vector creation aborted : vector shape is not an edge");
+ }
+ TopoDS_Edge anE = TopoDS::Edge(aRefShape);
+ TopoDS_Vertex V1, V2;
+ TopExp::Vertices(anE, V1, V2, Standard_True);
+ aShape = BRepBuilderAPI_MakeEdge(V2, V1).Shape();
+ }
if (aShape.IsNull()) return 0;
}
}
- return _anOtherObject ;
+ return _anOtherObject;
}
logger = Logger("salome.geom.geomtools", color = termcolor.RED)
from salome.kernel.studyedit import getActiveStudyId, getStudyEditor
+from salome.kernel.services import IDToObject
+try:
+ from salome.gui import helper
+except ImportError:
+ pass
_geompys = {}
return _geompys[studyId]
+ModeWireFrame = 0
+ModeShading = 1
+DisplayMode=ModeShading
+
class GeomStudyTools:
"""
This class provides several methods to manipulate geom objects in Salome
if GEOM is None:
GEOM = __import__("GEOM")
if studyEditor is None:
- studyEditor = getStudyEditor()
+ studyEditor = helper.getStudyEditor()
self.editor = studyEditor
def displayShapeByName(self, shapeName, color = None):
if shape:
geomgui = salome.ImportComponentGUI("GEOM")
geomgui.createAndDisplayGO(entry)
- geomgui.setDisplayMode(entry, 1)
+ geomgui.setDisplayMode(entry, DisplayMode)
if color is not None:
geomgui.setColor(entry, color[0], color[1], color[2])
return True
return False
+
+ def getGeomObjectSelected(self):
+ '''
+ Returns the GEOM object currently selected in the objects browser.
+ '''
+ sobject, entry = helper.getSObjectSelected()
+ geomObject = self.getGeomObjectFromEntry(entry)
+ return geomObject
+
+ def getGeomObjectFromEntry(self,entry):
+ '''
+ Returns the GEOM object associated to the specified entry,
+ (the entry is the identifier of an item in the active study)
+ '''
+ if entry is None:
+ return None
+ geomObject=IDToObject(entry, self.editor.study)
+ return geomObject._narrow(GEOM.GEOM_Object)
+
+#
+# ==================================================================
+# Use cases and demo functions
+# ==================================================================
+#
+
+# How to test?
+# 1. Run a SALOME application including GEOM, and create a new study
+# 2. In the console, enter:
+# >>> from salome.geom import geomtools
+# >>> geomtools.TEST_createBox()
+# 3. Select the object named "box" in the browser
+# 4. In the console, enter:
+# >>> geomtools.TEST_getGeomObjectSelected()
+
+def TEST_createBox():
+ geompy = getGeompy()
+ box = geompy.MakeBoxDXDYDZ(200, 200, 200)
+ geompy.addToStudy( box, 'box' )
+ if salome.sg.hasDesktop():
+ salome.sg.updateObjBrowser(1)
+
+
+def TEST_getGeomObjectSelected():
+ tool = GeomStudyTools()
+ myGeomObject = tool.getGeomObjectSelected()
+ print myGeomObject
+
+if __name__ == "__main__":
+ TEST_getGeomObjectSelected()
+
+
+
## Get a vertex subshape by index depended with orientation.
# @param theShape Shape to find subshape.
- # @param theIndex Index to find vertex by this index.
+ # @param theIndex Index to find vertex by this index (starting from zero)
# @return New GEOM_Object, containing the created vertex.
#
# @ref tui_measurement_tools_page "Example"
GEOM_Displayer* aDisplayer = getDisplayer();
if (send == myHideSelBtn) {
- aDisplayer->Erase(aSelList, false, true);
+ aDisplayer->Erase(aSelList, /*forced=*/false, /*updateViewer=*/true);
}
else {
- aDisplayer->EraseAll();
+ aDisplayer->EraseAll(/*forced = false, updateViewer = true*/);
aDisplayer->Display(aSelList, true);
+
+ // for the case when selected ids were not displayed in the viewer: Mantis issue 0021367
+ highlightSubShapes();
}
}
SALOME_Prs* aPrs = aDisplayer->buildSubshapePresentation(aSubShape, anEntry, aView);
if (aPrs) {
displayPreview(aPrs, true, false); // append, do not update
+ // TODO: map or delete Prs
}
}
}
SALOME_View* aView = dynamic_cast<SALOME_View*>(aViewModel);
if (aView == 0) return;
- // TODO: use here GEOMBase_Helper::myPreview instead of ic->DisplayedObjects()
+ // TODO??: use here GEOMBase_Helper::myPreview instead of ic->DisplayedObjects()
OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)aViewManager)->getOCCViewer();
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
AIS_ListOfInteractive List;
- ic->DisplayedObjects(List);
+ //ic->DisplayedObjects(List);
+ ic->ObjectsInside(List); // Mantis issue 0021367
SALOME_ListIO aSelList;
- // To highlight the selected subshape in Object Browser, if it's already pudlished under the main shape
+ // To highlight the selected subshape in Object Browser, if it's already published under the main shape
GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations(getStudyId());
QMap<int, QString> childsMap;
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
// 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: IGESExport.cxx
// Created: Wed May 19 14:49:45 2004
// Author: Pavel TELKOV
-// <ptv@mutex.nnov.opencascade.com>
-//
+
#include "utilities.h"
#include <Basics_Utils.hxx>
const TCollection_AsciiString& theFormatName )
{
MESSAGE("Export IGES into file " << theFileName.ToCString());
- try
+ // commented for 0021350: Please don't catch exceptions silently and send an
+ // inappropriate error message instead, it is disturbing for the user and for us
+ //try
{
// define, whether to write only faces (5.1 IGES format)
// or shells and solids also (5.3 IGES format)
ICW.AddShape( theShape );
ICW.ComputeModel();
bool ok = ICW.Write( theFileName.ToCString() );
-
+
// Return previous locale
if ( ok )
return 1;
}
- catch(Standard_Failure)
- {
- //THROW_SALOME_CORBA_EXCEPTION("Exception catched in IGESExport", SALOME::BAD_PARAM);
- }
+ //catch(Standard_Failure)
+ //{
+ // //THROW_SALOME_CORBA_EXCEPTION("Exception catched in IGESExport", SALOME::BAD_PARAM);
+ //}
return 0;
}
}
// 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 _NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile
#define _NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_NoSuchObject;
class TColStd_MapOfInteger;
class NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger;
class NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
-class NMTDS_DataMapOfIntegerMapOfInteger : 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 NMTDS_DataMapOfIntegerMapOfInteger(const Standard_Integer NbBuckets = 1);
-
-
-Standard_EXPORT NMTDS_DataMapOfIntegerMapOfInteger& Assign(const NMTDS_DataMapOfIntegerMapOfInteger& Other) ;
- NMTDS_DataMapOfIntegerMapOfInteger& operator =(const NMTDS_DataMapOfIntegerMapOfInteger& Other)
-{
- return Assign(Other);
-}
-
-
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-
-
-Standard_EXPORT void Clear() ;
-~NMTDS_DataMapOfIntegerMapOfInteger()
-{
- Clear();
-}
-
-
-
-Standard_EXPORT Standard_Boolean Bind(const Standard_Integer& K,const TColStd_MapOfInteger& I) ;
-
-
-Standard_EXPORT Standard_Boolean IsBound(const Standard_Integer& K) const;
-
-
-Standard_EXPORT Standard_Boolean UnBind(const Standard_Integer& K) ;
-
-
-Standard_EXPORT const TColStd_MapOfInteger& Find(const Standard_Integer& K) const;
- const TColStd_MapOfInteger& operator()(const Standard_Integer& K) const
+class NMTDS_DataMapOfIntegerMapOfInteger : public TCollection_BasicMap
{
- return Find(K);
-}
-
-
-
-Standard_EXPORT TColStd_MapOfInteger& ChangeFind(const Standard_Integer& K) ;
- TColStd_MapOfInteger& operator()(const Standard_Integer& K)
-{
- return ChangeFind(K);
-}
-
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
+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 NMTDS_DataMapOfIntegerMapOfInteger(const Standard_Integer NbBuckets = 1);
+
+ Standard_EXPORT NMTDS_DataMapOfIntegerMapOfInteger& Assign(const NMTDS_DataMapOfIntegerMapOfInteger& Other);
+ NMTDS_DataMapOfIntegerMapOfInteger& operator =(const NMTDS_DataMapOfIntegerMapOfInteger& Other)
+ {
+ return Assign(Other);
+ }
+
+ Standard_EXPORT void ReSize(const Standard_Integer NbBuckets);
+
+ Standard_EXPORT void Clear();
+ ~NMTDS_DataMapOfIntegerMapOfInteger()
+ {
+ Clear();
+ }
+
+ Standard_EXPORT Standard_Boolean Bind (const Standard_Integer& K,const TColStd_MapOfInteger& I);
+ Standard_EXPORT Standard_Boolean IsBound (const Standard_Integer& K) const;
+ Standard_EXPORT Standard_Boolean UnBind (const Standard_Integer& K);
+
+ Standard_EXPORT const TColStd_MapOfInteger& Find (const Standard_Integer& K) const;
+ const TColStd_MapOfInteger& operator()(const Standard_Integer& K) const
+ {
+ return Find(K);
+ }
+
+ Standard_EXPORT TColStd_MapOfInteger& ChangeFind(const Standard_Integer& K);
+ TColStd_MapOfInteger& operator()(const Standard_Integer& K)
+ {
+ return ChangeFind(K);
+ }
+
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address Find1 (const Standard_Integer& K) const;
+ Standard_EXPORT Standard_Address ChangeFind1 (const Standard_Integer& K);
+#endif
-private:
+private:
// Methods PRIVATE
- //
-
-
-Standard_EXPORT NMTDS_DataMapOfIntegerMapOfInteger(const NMTDS_DataMapOfIntegerMapOfInteger& Other);
-
-
- // Fields PRIVATE
//
+ Standard_EXPORT NMTDS_DataMapOfIntegerMapOfInteger(const NMTDS_DataMapOfIntegerMapOfInteger& Other);
};
-
-
-
-
// other Inline functions and methods (like "C++: function call" methods)
//
-
#endif
// 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 _NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile
#define _NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_OutOfRange;
class Standard_NoSuchObject;
class TColStd_MapIntegerHasher;
class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger : public TCollection_BasicMap {
Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeInteger& ChangeFromKey(const Standard_Integer& K) ;
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address FindFromKey1 (const Standard_Integer& K) const;
+ Standard_EXPORT Standard_Address ChangeFromKey1 (const Standard_Integer& K);
+#endif
private:
// Methods PRIVATE
//
-
Standard_EXPORT NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(const NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Other);
-
- // Fields PRIVATE
- //
-
-
};
-
-
-
-
// other Inline functions and methods (like "C++: function call" methods)
//
-
#endif
// 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 _NMTDS_IndexedDataMapOfIntegerShape_HeaderFile
#define _NMTDS_IndexedDataMapOfIntegerShape_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_OutOfRange;
class Standard_NoSuchObject;
class TColStd_MapIntegerHasher;
class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class NMTDS_IndexedDataMapOfIntegerShape : public TCollection_BasicMap {
Standard_EXPORT TopoDS_Shape& ChangeFromKey(const Standard_Integer& K) ;
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address FindFromKey1 (const Standard_Integer& K) const;
+ Standard_EXPORT Standard_Address ChangeFromKey1 (const Standard_Integer& K);
+#endif
private:
// 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 _NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile
#define _NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_OutOfRange;
class Standard_NoSuchObject;
class TopTools_ShapeMapHasher;
class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class NMTDS_IndexedDataMapOfShapeBndSphere : public TCollection_BasicMap {
Standard_EXPORT NMTDS_BndSphere& ChangeFromKey(const TopoDS_Shape& K) ;
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const;
+ Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K);
+#endif
private:
// Methods PRIVATE
//
-
Standard_EXPORT NMTDS_IndexedDataMapOfShapeBndSphere(const NMTDS_IndexedDataMapOfShapeBndSphere& Other);
-
- // Fields PRIVATE
- //
-
-
};
-
-
-
-
// other Inline functions and methods (like "C++: function call" methods)
//
-
#endif
// 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 _NMTDS_IndexedDataMapOfShapeBox_HeaderFile
#define _NMTDS_IndexedDataMapOfShapeBox_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_OutOfRange;
class Standard_NoSuchObject;
class TopTools_ShapeMapHasher;
class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class NMTDS_IndexedDataMapOfShapeBox : public TCollection_BasicMap {
Standard_EXPORT Bnd_Box& ChangeFromKey(const TopoDS_Shape& K) ;
-
-
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const;
+ Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K);
+#endif
protected:
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile
#define _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_NoSuchObject;
class NMTTools_FaceInfo;
class NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo;
class NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class NMTTools_DataMapOfIntegerFaceInfo : public TCollection_BasicMap {
return ChangeFind(K);
}
-
-
-
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address Find1 (const Standard_Integer& K) const;
+ Standard_EXPORT Standard_Address ChangeFind1 (const Standard_Integer& K);
+#endif
protected:
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile
#define _NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_NoSuchObject;
class BOPTools_ListOfPaveBlock;
class NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock;
class NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class NMTTools_DataMapOfIntegerListOfPaveBlock : public TCollection_BasicMap {
return ChangeFind(K);
}
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address Find1 (const Standard_Integer& K) const;
+ Standard_EXPORT Standard_Address ChangeFind1 (const Standard_Integer& K);
+#endif
private:
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile
#define _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_OutOfRange;
class Standard_NoSuchObject;
class TColStd_MapIntegerHasher;
class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class NMTTools_IndexedDataMapOfIndexedMapOfInteger : public TCollection_BasicMap {
Standard_EXPORT TColStd_IndexedMapOfInteger& ChangeFromKey(const Standard_Integer& K) ;
-
-
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address FindFromKey1 (const Standard_Integer& K) const;
+ Standard_EXPORT Standard_Address ChangeFromKey1 (const Standard_Integer& K);
+#endif
protected:
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
#define _NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_OutOfRange;
class Standard_NoSuchObject;
class TopTools_ShapeMapHasher;
class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class NMTTools_IndexedDataMapOfShapeIndexedMapOfShape : public TCollection_BasicMap {
Standard_EXPORT TopTools_IndexedMapOfShape& ChangeFromKey(const TopoDS_Shape& K) ;
-
-
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const;
+ Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K);
+#endif
protected:
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile
#define _NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
+
class Standard_DomainError;
class Standard_OutOfRange;
class Standard_NoSuchObject;
class TopTools_ShapeMapHasher;
class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock;
-
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#include <Standard_Macro.hxx>
#endif
+#include <Basics_OCCTVersion.hxx>
class NMTTools_IndexedDataMapOfShapePaveBlock : public TCollection_BasicMap {
Standard_EXPORT BOPTools_PaveBlock& ChangeFromKey(const TopoDS_Shape& K) ;
-
-
-
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const;
+ Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K);
+#endif
protected:
--- Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
+-- Copyright (C) 2007-2008 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
+-- 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 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.
+-- 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
+-- 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
+-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
--
-- File: NMTTools_PaveFiller.cdl
-- Created: Fri Dec 5 14:35:00 2003
nF :Integer from Standard;
aLCB:out ListOfCommonBlock from NMTTools)
returns Integer from Standard;
-
+
PrepareFace(me:out;
nF : Integer from Standard;
aF : out Face from TopoDS);
RealSplitsInFace(me:out;
nE1 :Integer from Standard;
nF2 :Integer from Standard;
- aLs :out ListOfPaveBlock from BOPTools);
-
+ aLs :out ListOfPaveBlock from BOPTools);
+
+--modified by NIZNHY-PKV Mon Oct 17 11:43:23 2011f
+ RealSplitsInFace(me:out;
+ nF1 :Integer from Standard;
+ aLPB :out ListOfPaveBlock from BOPTools);
+--modified by NIZNHY-PKV Mon Oct 17 11:43:39 2011t
+
RealSplitsOnEdge(me:out;
nE1 :Integer from Standard;
nE2 :Integer from Standard;
aBC : out Curve from BOPTools);
-
PutBoundPaveOnCurve (me:out;
aBC :out Curve from BOPTools;
aFF :out SSInterference from BOPTools);
aPB2 : PaveBlock from BOPTools)
returns Boolean from Standard;
---modified by NIZNHY-PKV Wed Feb 09 10:10:48 2011f
FillFaceInfo (me:out)
is protected;
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
+ is protected;
+
+ PutClosingPaveOnCurve (me:out;
+ aBC :out Curve from BOPTools;
+ aFF :out SSInterference from BOPTools);
fields
myDS : PShapesDataStructure from NMTDS is protected;
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;
#ifndef _NMTTools_PaveFiller_HeaderFile
#define _NMTTools_PaveFiller_HeaderFile
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
#ifndef _NMTDS_PShapesDataStructure_HeaderFile
#include <NMTDS_PShapesDataStructure.hxx>
#endif
class TColStd_MapOfInteger;
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
class NMTTools_PaveFiller {
-
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_PaveFiller();
+ 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);
+ }
+
+
+ Standard_EXPORT NMTTools_PaveFiller();
Standard_EXPORT virtual ~NMTTools_PaveFiller();
-
-
-Standard_EXPORT void SetCompositeShape(const TopoDS_Shape& aS) ;
-
-
-Standard_EXPORT const TopoDS_Shape& CompositeShape() const;
-
-
-Standard_EXPORT NMTDS_PShapesDataStructure DS() ;
-
-
-Standard_EXPORT NMTDS_PIterator DSIt() ;
-
-
-Standard_EXPORT NMTDS_PInterfPool IP() ;
-
-
-Standard_EXPORT virtual void Perform() ;
-
-
-Standard_EXPORT Standard_Boolean IsDone() const;
-
-
-Standard_EXPORT const IntTools_Context& Context() const;
-
-
-Standard_EXPORT IntTools_Context& ChangeContext() ;
-
-
-Standard_EXPORT const BOPTools_PavePool& PavePool() const;
-
-
-Standard_EXPORT BOPTools_PavePool& ChangePavePool() ;
-
-
-Standard_EXPORT const NMTTools_CommonBlockPool& CommonBlockPool() const;
-
-
-Standard_EXPORT NMTTools_CommonBlockPool& ChangeCommonBlockPool() ;
-
-
-Standard_EXPORT const BOPTools_SplitShapesPool& SplitShapesPool() const;
-
-
-Standard_EXPORT BOPTools_SplitShapesPool& ChangeSplitShapesPool() ;
-
-
-Standard_EXPORT Standard_Integer FindSDVertex(const Standard_Integer nV) const;
-
-
-Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
-
-
-Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
-
-
-Standard_EXPORT Standard_Integer SplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,TColStd_ListOfInteger& aLs) ;
-
-
-Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
-
-
-Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
-
-
-Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
-
-Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
-
-Standard_EXPORT Standard_Integer SplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,BOPTools_ListOfPaveBlock& aLs) ;
-
-
-Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
-
-Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
-
-Standard_EXPORT Standard_Integer SplitsFace(const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
-
-Standard_EXPORT Standard_Integer SplitsFace(const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
-
-
-Standard_EXPORT Standard_Integer CommonBlocksFace(const Standard_Integer nF,NMTTools_ListOfCommonBlock& aLCB) ;
-
-
-Standard_EXPORT void PrepareFace(const Standard_Integer nF,TopoDS_Face& aF) ;
-
-
-Standard_EXPORT const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB) ;
-
-
-Standard_EXPORT const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB,TColStd_ListOfInteger& aLB,Standard_Integer& aIsCommonBlock) ;
-
-
-Standard_EXPORT void RealSplitsFace(const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
-
-Standard_EXPORT Standard_Boolean HasRealSplitsInOnFace(const Standard_Integer nF1,const Standard_Integer nF2) ;
-
-
-Standard_EXPORT void RealSplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
-
-Standard_EXPORT void RealSplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
-
-Standard_EXPORT void RealSplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,BOPTools_ListOfPaveBlock& aLs) ;
-
-
-Standard_EXPORT void RealSplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
-
-Standard_EXPORT void RealSplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
-
-
-Standard_EXPORT void PrepareSetForFace(const Standard_Integer nF1,const Standard_Integer nF2,const BOPTools_ListOfPaveBlock& aLPB,BOPTools_PaveSet& aPSF) ;
-
-
-Standard_EXPORT void PutPaveOnCurve(const BOPTools_PaveSet& aPSF,const Standard_Real aTol,BOPTools_Curve& aBC) ;
-
-
-Standard_EXPORT void PutBoundPaveOnCurve(BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ;
-
-
-Standard_EXPORT void PutBoundPaveOnCurve(const gp_Pnt& aP,const Standard_Real aT,BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ;
-
-
-Standard_EXPORT Standard_Boolean FindPave(const gp_Pnt& aP,const Standard_Real aTpV,const BOPTools_PaveSet& aPS,BOPTools_Pave& aPV) ;
-
-
-Standard_EXPORT Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,const BOPTools_PaveBlock& aPBR,const Standard_Real aTol) ;
-
-
-Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,const BOPTools_ListOfPaveBlock& aLPB,const Standard_Real aTol) ;
-
-
-Standard_EXPORT void MakePCurves() ;
-
-
-Standard_EXPORT const NMTTools_IndexedDataMapOfIndexedMapOfInteger& AloneVertices() const;
-
-
-Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,const TopTools_ListOfShape& aLPB,const Standard_Real aTol) ;
-
-
-Standard_EXPORT Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB,const BOPTools_ListOfPaveBlock& aLPB) ;
-
-
-Standard_EXPORT Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,const TopoDS_Edge& aE,const Standard_Real aTol) ;
-
-
-Standard_EXPORT void SharedEdges(const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLNE,TopTools_ListOfShape& aLSE) ;
-
-
-Standard_EXPORT void FuseVertices(const TopoDS_Shape& aC,TopTools_DataMapOfShapeShape& aDMVV) const;
-
-
-Standard_EXPORT void TreatPaveBlocks(NMTTools_ListOfCommonBlock& theLCB) ;
-
-
-Standard_EXPORT BOPTools_PavePool& ChangePavePoolNew() ;
-
-
-Standard_EXPORT Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB1,const BOPTools_PaveBlock& aPB2) ;
+
+ Standard_EXPORT void SetCompositeShape(const TopoDS_Shape& aS) ;
+
+ Standard_EXPORT const TopoDS_Shape& CompositeShape() const;
+
+ Standard_EXPORT NMTDS_PShapesDataStructure DS() ;
+
+ Standard_EXPORT NMTDS_PIterator DSIt() ;
+
+ Standard_EXPORT NMTDS_PInterfPool IP() ;
+
+ Standard_EXPORT virtual void Perform() ;
+
+ Standard_EXPORT Standard_Boolean IsDone() const;
+
+ Standard_EXPORT const IntTools_Context& Context() const;
+
+ Standard_EXPORT IntTools_Context& ChangeContext() ;
+
+ Standard_EXPORT const BOPTools_PavePool& PavePool() const;
+
+ Standard_EXPORT BOPTools_PavePool& ChangePavePool() ;
+
+ Standard_EXPORT const NMTTools_CommonBlockPool& CommonBlockPool() const;
+
+ Standard_EXPORT NMTTools_CommonBlockPool& ChangeCommonBlockPool() ;
+
+ Standard_EXPORT const BOPTools_SplitShapesPool& SplitShapesPool() const;
+
+ Standard_EXPORT BOPTools_SplitShapesPool& ChangeSplitShapesPool() ;
+
+ Standard_EXPORT Standard_Integer FindSDVertex(const Standard_Integer nV) const;
+
+ Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
+
+ Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
+
+ Standard_EXPORT Standard_Integer SplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,TColStd_ListOfInteger& aLs) ;
+
+ Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
+
+ Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
+
+ Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT Standard_Integer SplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT Standard_Integer SplitsFace(const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT Standard_Integer SplitsFace(const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ;
+
+ Standard_EXPORT Standard_Integer CommonBlocksFace(const Standard_Integer nF,NMTTools_ListOfCommonBlock& aLCB) ;
+
+ Standard_EXPORT void PrepareFace(const Standard_Integer nF,TopoDS_Face& aF) ;
+
+ Standard_EXPORT const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB) ;
+
+ Standard_EXPORT const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB,TColStd_ListOfInteger& aLB,Standard_Integer& aIsCommonBlock) ;
+
+ Standard_EXPORT void RealSplitsFace(const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT Standard_Boolean HasRealSplitsInOnFace(const Standard_Integer nF1,const Standard_Integer nF2) ;
+
+ Standard_EXPORT void RealSplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT void RealSplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT void RealSplitsInFace(const Standard_Integer nF1,BOPTools_ListOfPaveBlock& aLPB) ;
+
+ Standard_EXPORT void RealSplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT void RealSplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT void RealSplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ;
+
+ Standard_EXPORT void PrepareSetForFace(const Standard_Integer nF1,const Standard_Integer nF2,const BOPTools_ListOfPaveBlock& aLPB,BOPTools_PaveSet& aPSF) ;
+
+ Standard_EXPORT void PutPaveOnCurve(const BOPTools_PaveSet& aPSF,const Standard_Real aTol,BOPTools_Curve& aBC) ;
+
+ Standard_EXPORT void PutBoundPaveOnCurve(BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ;
+
+ Standard_EXPORT void PutBoundPaveOnCurve(const gp_Pnt& aP,const Standard_Real aT,BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ;
+
+ Standard_EXPORT Standard_Boolean FindPave(const gp_Pnt& aP,const Standard_Real aTpV,const BOPTools_PaveSet& aPS,BOPTools_Pave& aPV) ;
+
+ Standard_EXPORT Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,const BOPTools_PaveBlock& aPBR,const Standard_Real aTol) ;
+
+ Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,const BOPTools_ListOfPaveBlock& aLPB,const Standard_Real aTol) ;
+
+ Standard_EXPORT void MakePCurves() ;
+
+ Standard_EXPORT const NMTTools_IndexedDataMapOfIndexedMapOfInteger& AloneVertices() const;
+
+ Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,const TopTools_ListOfShape& aLPB,const Standard_Real aTol) ;
+
+ Standard_EXPORT Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB,const BOPTools_ListOfPaveBlock& aLPB) ;
+
+ Standard_EXPORT Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,const TopoDS_Edge& aE,const Standard_Real aTol) ;
+
+ Standard_EXPORT void SharedEdges(const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLNE,TopTools_ListOfShape& aLSE) ;
+
+ Standard_EXPORT void FuseVertices(const TopoDS_Shape& aC,TopTools_DataMapOfShapeShape& aDMVV) const;
+
+ Standard_EXPORT void TreatPaveBlocks(NMTTools_ListOfCommonBlock& theLCB) ;
+
+ Standard_EXPORT BOPTools_PavePool& ChangePavePoolNew() ;
+
+ Standard_EXPORT Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB1,const BOPTools_PaveBlock& aPB2) ;
+
+ Standard_EXPORT void PutClosingPaveOnCurve(BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ;
protected:
- // Methods PROTECTED
- //
-
-
-Standard_EXPORT virtual void Init() ;
-
-
-Standard_EXPORT virtual void Clear() ;
-
-
-Standard_EXPORT virtual void PerformVV() ;
-
-
-Standard_EXPORT virtual void PerformVE() ;
-
-
-Standard_EXPORT virtual void PerformVF() ;
-
-
-Standard_EXPORT virtual void PerformEE() ;
-
-
-Standard_EXPORT virtual void PerformEF() ;
-
-
-Standard_EXPORT virtual void PerformFF() ;
-
-
-Standard_EXPORT void MakeSplitEdges() ;
-
-
-Standard_EXPORT virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1,const TopAbs_ShapeEnum aType2) ;
-
+
+ Standard_EXPORT virtual void Init() ;
+
+ Standard_EXPORT virtual void Clear() ;
+
+ Standard_EXPORT virtual void PerformVV() ;
+
+ Standard_EXPORT virtual void PerformVE() ;
+
+ Standard_EXPORT virtual void PerformVF() ;
+
+ Standard_EXPORT virtual void PerformEE() ;
+
+ Standard_EXPORT virtual void PerformEF() ;
+
+ Standard_EXPORT virtual void PerformFF() ;
+
+ Standard_EXPORT void MakeSplitEdges() ;
+
+ Standard_EXPORT virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1,const TopAbs_ShapeEnum aType2) ;
+
+ Standard_EXPORT void CorrectShrunkRanges(const Standard_Integer aSide,const BOPTools_Pave& aPave,IntTools_ShrunkRange& aSR) ;
+
+ Standard_EXPORT virtual void PreparePaveBlocks(const Standard_Integer anE) ;
+
+ Standard_EXPORT virtual void PrepareEdges() ;
+
+ Standard_EXPORT Standard_Boolean IsSuccessorsComputed(const Standard_Integer iF1,const Standard_Integer iF2) const;
+
+ Standard_EXPORT Standard_Boolean IsBlocksCoinside(const BOPTools_PaveBlock& aPB1,const BOPTools_PaveBlock& aPB2) const;
+
+ Standard_EXPORT void RefinePavePool() ;
+
+ Standard_EXPORT Standard_Integer CheckFacePaves(const TopoDS_Vertex& aV,const Standard_Integer nF) ;
+
+ Standard_EXPORT void ReplaceCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
+
+ Standard_EXPORT void RemoveCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
+
+ Standard_EXPORT void SplitCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
+
+ Standard_EXPORT void SplitCommonBlock(const NMTTools_CommonBlock& aCB,NMTTools_ListOfCommonBlock& aLCB) ;
+
+ Standard_EXPORT void EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aM) ;
+
+ Standard_EXPORT void EFCommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB) ;
+
+ Standard_EXPORT void EENewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
+
+ Standard_EXPORT void EENewVertices(const TopoDS_Vertex& aV,const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
+
+ Standard_EXPORT void EFNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
+
+ Standard_EXPORT void EFNewVertices(const TopoDS_Vertex& aV,const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
+
+ Standard_EXPORT void UpdateCommonBlocks() ;
+
+ Standard_EXPORT void UpdatePaveBlocks() ;
+
+ Standard_EXPORT Standard_Integer SplitIndex(const BOPTools_PaveBlock& aPB) const;
+
+ Standard_EXPORT void MakeBlocks() ;
+
+ 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) ;
-Standard_EXPORT void CorrectShrunkRanges(const Standard_Integer aSide,const BOPTools_Pave& aPave,IntTools_ShrunkRange& aSR) ;
-
-Standard_EXPORT virtual void PreparePaveBlocks(const Standard_Integer anE) ;
-
-
-Standard_EXPORT virtual void PrepareEdges() ;
-
-
-Standard_EXPORT Standard_Boolean IsSuccessorsComputed(const Standard_Integer iF1,const Standard_Integer iF2) const;
-
-
-Standard_EXPORT Standard_Boolean IsBlocksCoinside(const BOPTools_PaveBlock& aPB1,const BOPTools_PaveBlock& aPB2) const;
-
-
-Standard_EXPORT void RefinePavePool() ;
-
-
-Standard_EXPORT Standard_Integer CheckFacePaves(const TopoDS_Vertex& aV,const Standard_Integer nF) ;
-
-
-Standard_EXPORT void ReplaceCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
-
-
-Standard_EXPORT void RemoveCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
-
-
-Standard_EXPORT void SplitCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
-
-
-Standard_EXPORT void SplitCommonBlock(const NMTTools_CommonBlock& aCB,NMTTools_ListOfCommonBlock& aLCB) ;
-
-
-Standard_EXPORT void EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aM) ;
-
-
-Standard_EXPORT void EFCommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB) ;
-
-
-Standard_EXPORT void EENewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
-
-
-Standard_EXPORT void EENewVertices(const TopoDS_Vertex& aV,const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
-
-
-Standard_EXPORT void EFNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
-
-
-Standard_EXPORT void EFNewVertices(const TopoDS_Vertex& aV,const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
-
-
-Standard_EXPORT void UpdateCommonBlocks() ;
-
-
-Standard_EXPORT void UpdatePaveBlocks() ;
-
-
-Standard_EXPORT Standard_Integer SplitIndex(const BOPTools_PaveBlock& aPB) const;
-
-
-Standard_EXPORT void MakeBlocks() ;
-
-
-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;
Standard_Boolean myIsDone;
Standard_Integer myNbSources;
NMTTools_DataMapOfIntegerFaceInfo myFaceInfo;
-private:
+private:
- // Methods PRIVATE
- //
- // Fields PRIVATE
- //
};
// other Inline functions and methods (like "C++: function call" methods)
-//
#endif
-// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2011 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
+// 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 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.
+// 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
+// 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
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTTools_PaveFiller_6.cxx
// Created: Fri Dec 19 10:27:31 2003
#include <NMTTools_PaveFiller.ixx>
+#include <Basics_OCCTVersion.hxx>
+
#include <Precision.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
myIsDone=Standard_False;
//
Standard_Boolean bToApproxC3d, bToApproxC2dOnS1, bToApproxC2dOnS2, bIsDone;
- Standard_Boolean bJustAdd;
+ Standard_Boolean bJustAdd, bToSplit;
Standard_Integer n1, n2, anIndexIn, nF1, nF2, aBlockLength, aNbFFs;
Standard_Integer aNbCurves, aNbPoints;
Standard_Real anApproxTol, aTolR3D, aTolR2D;
aFFs.SetBlockLength(aNbFFs);
}
//
+ //modified by NIZNHY-PKV Thu Sep 15 08:02:52 2011f
+ bToSplit=Standard_False;
+ //modified by NIZNHY-PKV Thu Sep 15 08:02:55 2011t
+ //
for (; myDSIt->More(); myDSIt->Next()) {
myDSIt->Current(n1, n2, bJustAdd);
//
aTolR3D=1.e-7;
}
//
+ //modified by NIZNHY-PKV Thu Sep 15 08:03:02 2011f
+#if OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher
+ aFF.PrepareLines3D(bToSplit);
+#else
aFF.PrepareLines3D();
+#endif // OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher
+ //modified by NIZNHY-PKV Thu Sep 15 08:03:04 2011t
//
const IntTools_SequenceOfCurves& aCvsX=aFF.Lines();
const IntTools_SequenceOfPntOn2Faces& aPntsX=aFF.Points();
BOPTools_Curve& aBC=aSCvs(j);
PutBoundPaveOnCurve (aBC, aFFi);
}
+ //modified by NIZNHY-PKV Wed Sep 14 13:12:14 2011f
+#if OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher
+ //
+ // Put closing pave if needded
+ for (j=1; j<=aNbCurves; ++j) {
+ BOPTools_Curve& aBC=aSCvs(j);
+ PutClosingPaveOnCurve (aBC, aFFi);
+ }
+#endif // OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher
+ //modified by NIZNHY-PKV Wed Sep 14 13:12:17 2011t
//
// Pave Blocks on Curves
bHasES=Standard_False;
BOPTools_PaveSet& aPS=aBC.Set();
aPS.Append(aPaveNew);
//<-B
- //modified by NIZNHY-PKV Thu Apr 22 10:36:45 2010f
- //BOPTools_Tools::UpdateVertex (aC, aT, aV);
- //modified by NIZNHY-PKV Thu Apr 22 10:36:48 2010t
}
}
}
-//modified by NIZNHY-PKV Tue Feb 08 12:24:35 2011f
//
//=======================================================================
//function : FillFaceInfo
aTolR3D=aTolR;
}
}
-//modified by NIZNHY-PKV Tue Feb 08 12:24:56 2011t
+
+//modified by NIZNHY-PKV Wed Sep 14 13:21:13 2011f
+#if OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher
+//=======================================================================
+// function: PutClosingPaveOnCurve
+// purpose:
+//=======================================================================
+void NMTTools_PaveFiller::PutClosingPaveOnCurve(BOPTools_Curve& aBC,
+ BOPTools_SSInterference& aFFi)
+{
+ Standard_Boolean bIsClosed, bHasBounds, bAdded;
+ Standard_Integer nVC, j;
+ Standard_Real aT[2], aTolR3D, aTC, dT, aTx;
+ gp_Pnt aP[2] ;
+ BOPTools_Pave aPVx;
+ BOPTools_ListIteratorOfListOfPave aItLP;
+ //
+ const IntTools_Curve& aIC=aBC.Curve();
+ const Handle (Geom_Curve)& aC3D=aIC.Curve();
+ if(aC3D.IsNull()) {
+ return;
+ }
+ //
+ bIsClosed=IntTools_Tools::IsClosed(aC3D);
+ if (!bIsClosed) {
+ return;
+ }
+ //
+ bHasBounds=aIC.HasBounds ();
+ if (!bHasBounds){
+ return;
+ }
+ //
+ bAdded=Standard_False;
+ dT=Precision::PConfusion();
+ aTolR3D=aFFi.TolR3D();
+ aIC.Bounds (aT[0], aT[1], aP[0], aP[1]);
+ //
+ BOPTools_PaveSet& aFFiPS=aFFi.NewPaveSet();
+ BOPTools_PaveSet& aCPS=aBC.Set();
+ //
+ const BOPTools_ListOfPave& aLP=aCPS.Set();
+ aItLP.Initialize(aLP);
+ for (; aItLP.More() && !bAdded; aItLP.Next()) {
+ const BOPTools_Pave& aPC=aItLP.Value();
+ nVC=aPC.Index();
+ const TopoDS_Vertex aVC=TopoDS::Vertex(myDS->Shape(nVC));
+ aTC=aPC.Param();
+ //
+ for (j=0; j<2; ++j) {
+ if (fabs(aTC-aT[j]) < dT) {
+ aTx=(!j) ? aT[1] : aT[0];
+ aPVx.SetIndex(nVC);
+ aPVx.SetParam(aTx);
+ //
+ aCPS.Append(aPVx);
+ aFFiPS.Append(aPVx);
+ //
+ bAdded=Standard_True;
+ break;
+ }
+ }
+ }
+}
+#endif // OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher
+//modified by NIZNHY-PKV Wed Sep 14 13:21:17 2011t
}
return 0; //Ok
}
+//modified by NIZNHY-PKV Mon Oct 17 12:07:48 2011f
+static
+ void SortPaveBlocks(BOPTools_ListOfPaveBlock &);
+static
+ void SortShell(const Standard_Integer,
+ BOPTools_PaveBlock *);
+static
+ Standard_Boolean Less(const BOPTools_PaveBlock &,
+ const BOPTools_PaveBlock &);
+
+//=======================================================================
+// function: RealSplitsInFace
+// purpose:
+//=======================================================================
+ void NMTTools_PaveFiller::RealSplitsInFace(const Standard_Integer nF,
+ BOPTools_ListOfPaveBlock& aLPBIn)
+{
+ Standard_Integer j, aNbCBP, nSpIn;
+ TColStd_MapOfInteger aMFence;
+ BOPTools_ListOfPaveBlock aLPB;
+ BOPTools_ListIteratorOfListOfPaveBlock aItPB;
+ NMTTools_ListIteratorOfListOfCommonBlock aItCB;
+ //
+ NMTTools_CommonBlockPool& aCBP=ChangeCommonBlockPool();
+ //
+ aNbCBP=aCBP.Extent();
+ for (j=1; j<=aNbCBP; ++j) {
+ NMTTools_ListOfCommonBlock& aLCB=aCBP(j);
+ aItCB.Initialize(aLCB);
+ for (; aItCB.More(); aItCB.Next()) {
+ NMTTools_CommonBlock& aCB=aItCB.Value();
+ if (aCB.IsPaveBlockOnFace(nF)) {
+ const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1();
+ nSpIn=aPB1.Edge();
+ if (aMFence.Add(nSpIn)){
+ aLPB.Append(aPB1);
+ }
+ }
+ }
+ }
+ //
+ SortPaveBlocks(aLPB);
+ //
+ aItPB.Initialize(aLPB);
+ for (; aItPB.More(); aItPB.Next()) {
+ const BOPTools_PaveBlock& aPB=aItPB.Value();
+ aLPBIn.Append(aPB);
+ }
+}
+//=======================================================================
+// function: SortPaveBlocks
+// purpose:
+//=======================================================================
+void SortPaveBlocks(BOPTools_ListOfPaveBlock &aLPBIn)
+{
+ Standard_Integer i, aNbPBIn;
+ BOPTools_ListIteratorOfListOfPaveBlock aItPB;
+ BOPTools_PaveBlock *pPB;
+ //
+ aNbPBIn=aLPBIn.Extent();
+ if (aNbPBIn<2) {
+ return;
+ }
+ //
+ pPB=new BOPTools_PaveBlock[aNbPBIn];
+ //
+ aItPB.Initialize(aLPBIn);
+ for (i=0; aItPB.More(); aItPB.Next(), ++i) {
+ const BOPTools_PaveBlock& aPB=aItPB.Value();
+ pPB[i]=aPB;
+ }
+ //
+ SortShell(aNbPBIn, pPB);
+ //
+ aLPBIn.Clear();
+ for (i=0; i<aNbPBIn; ++i) {
+ aLPBIn.Append(pPB[i]);
+ }
+ //
+ delete [] (BOPTools_PaveBlock*)pPB;
+}
+//=======================================================================
+//function : SortShell
+//purpose :
+//=======================================================================
+void SortShell(const Standard_Integer n,
+ BOPTools_PaveBlock *a)
+{
+ Standard_Integer nd, i, j, l, d=1;
+ BOPTools_PaveBlock x;
+ //
+ while(d<=n) {
+ d*=2;
+ }
+ //
+ while (d) {
+ d=(d-1)/2;
+ //
+ nd=n-d;
+ for (i=0; i<nd; ++i) {
+ j=i;
+ m30:;
+ l=j+d;
+ if (Less(a[l], a[j])) {
+ //if (a[l] < a[j]){
+ x=a[j];
+ a[j]=a[l];
+ a[l]=x;
+ j-=d;
+ if (j > -1) goto m30;
+ }//if (a[l] < a[j]){
+ }//for (i=0; i<nd; ++i)
+ }//while (1)
+}
+
+//=======================================================================
+//function : Less
+//purpose :
+//=======================================================================
+Standard_Boolean Less(const BOPTools_PaveBlock &aPB1,
+ const BOPTools_PaveBlock &aPB2)
+{
+ Standard_Boolean bRet;
+ Standard_Integer iE1, iE2;
+ Standard_Real aT11, aT12, aT21, aT22;
+ //
+ iE1=aPB1.OriginalEdge();
+ iE2=aPB2.OriginalEdge();
+ if (iE1!=iE2) {
+ bRet=(iE1<iE2);
+ return bRet;
+ }
+ //
+ aPB1.Parameters(aT11, aT12);
+ aPB2.Parameters(aT21, aT22);
+ bRet=(aT11<aT21);
+ return bRet;
+}
+//modified by NIZNHY-PKV Mon Oct 17 11:44:45 2011t
#include <Interface_InterfaceModel.hxx>
#include <XSControl_TransferReader.hxx>
#include <XSControl_WorkSession.hxx>
+#include <StepShape_TopologicalRepresentationItem.hxx>
#include <Transfer_Binder.hxx>
#include <TNaming_Builder.hxx>
if (!TR.IsNull()) {
Handle(Transfer_TransientProcess) TP = TR->TransientProcess();
Handle(Standard_Type) tPD = STANDARD_TYPE(StepBasic_ProductDefinition);
+ Handle(Standard_Type) tShape = STANDARD_TYPE(StepShape_TopologicalRepresentationItem);
Standard_Integer nb = Model->NbEntities();
for (Standard_Integer ie = 1; ie <= nb; ie++) {
Handle(Standard_Transient) enti = Model->Value(ie);
- if (enti->DynamicType() != tPD) continue;
-
- Handle(StepBasic_ProductDefinition) PD =
- Handle(StepBasic_ProductDefinition)::DownCast(enti);
- if (PD.IsNull()) continue;
-
- Handle(StepBasic_Product) Prod = PD->Formation()->OfProduct();
- if (Prod->Name()->UsefullLength() <= 0) continue;
+ Handle(TCollection_HAsciiString) aName;
+ if ( enti->IsKind( tShape ))
+ {
+ aName = Handle(StepRepr_RepresentationItem)::DownCast(enti)->Name();
+ }
+ else if (enti->DynamicType() == tPD)
+ {
+ Handle(StepBasic_ProductDefinition) PD =
+ Handle(StepBasic_ProductDefinition)::DownCast(enti);
+ if (PD.IsNull()) continue;
- Handle(TCollection_HAsciiString) aName = Prod->Name();
- TCollection_ExtendedString aNameExt (aName->ToCString());
+ Handle(StepBasic_Product) Prod = PD->Formation()->OfProduct();
+ aName = Prod->Name();
+ }
+ else
+ {
+ continue;
+ }
+ if ( aName->UsefullLength() < 1 )
+ continue;
+ // skip 'N0NE' name
+ if ( aName->UsefullLength() == 4 &&
+ toupper (aName->Value(1)) == 'N' &&
+ toupper (aName->Value(2)) == 'O' &&
+ toupper (aName->Value(3)) == 'N' &&
+ toupper (aName->Value(4)) == 'E')
+ continue;
// special check to pass names like "Open CASCADE STEP translator 6.3 1"
TCollection_AsciiString aSkipName ("Open CASCADE STEP translator");
if (aName->String().SubString(1, aSkipName.Length()).IsEqual(aSkipName))
continue;
}
+ TCollection_ExtendedString aNameExt (aName->ToCString());
// find target shape
Handle(Transfer_Binder) binder = TP->Find(enti);
// 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: ShHealOper_ChangeOrientation.cxx
// Created: 11.07.06 11:46:45
// Author: Sergey KUUL
-//
+
#include <ShHealOper_ChangeOrientation.hxx>
#include <BRep_Builder.hxx>
+#include <BRepBuilderAPI_Copy.hxx>
+
#include <TopoDS_Iterator.hxx>
//=======================================================================
BRep_Builder B;
if (myInitShape.ShapeType() == TopAbs_SHELL) {
myResultShape = myInitShape.EmptyCopied();
- TopoDS_Iterator itr(myInitShape);
+ TopoDS_Iterator itr (myInitShape);
while (itr.More()) {
B.Add(myResultShape,itr.Value().Reversed());
itr.Next();
}
else if (myInitShape.ShapeType() == TopAbs_FACE) {
myResultShape = myInitShape.EmptyCopied();
- TopoDS_Iterator itr(myInitShape);
+ TopoDS_Iterator itr (myInitShape);
while (itr.More()) {
B.Add(myResultShape,itr.Value());
itr.Next();
}
else if ( myInitShape.ShapeType() == TopAbs_WIRE || myInitShape.ShapeType() == TopAbs_EDGE) {
myResultShape = myInitShape.EmptyCopied();
- TopoDS_Iterator itr(myInitShape);
+ TopoDS_Iterator itr (myInitShape);
while (itr.More()) {
B.Add(myResultShape,itr.Value());
itr.Next();
myResultShape.Reverse();
}
else {
- return false;
+ BRepBuilderAPI_Copy Copy (myInitShape);
+ if (!Copy.IsDone()) return false;
+
+ myResultShape = Copy.Shape();
+ if (myResultShape.IsNull()) return false;
+
+ if (myResultShape.Orientation() == TopAbs_FORWARD)
+ myResultShape.Orientation(TopAbs_REVERSED);
+ else
+ myResultShape.Orientation(TopAbs_FORWARD);
}
return true;
-
}
// 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: ShHealOper_FillHoles.cxx
// Created: 26.04.04 17:35:30
// Author: Galina KULIKOVA
-//
+
+#include <Basics_OCCTVersion.hxx>
+
+#include <ShapeFix_Shell.hxx>
+#include <ShapeFix_Face.hxx>
#include <ShHealOper_FillHoles.hxx>
-#include <TopExp.hxx>
-#include <TopAbs_ShapeEnum.hxx>
#include <ShapeAnalysis_FreeBounds.hxx>
-#include <TopoDS_Compound.hxx>
-#include <TopoDS_Iterator.hxx>
-#include <Geom_Curve.hxx>
+
#include <BRep_Tool.hxx>
-#include <TopExp_Explorer.hxx>
-#include <TopTools_HSequenceOfShape.hxx>
-#include <TopoDS.hxx>
-#include <Geom_BSplineSurface.hxx>
-#include <GeomPlate_BuildPlateSurface.hxx>
-#include <TopoDS_Edge.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_HCurve.hxx>
-#include <GeomPlate_CurveConstraint.hxx>
-#include <GeomPlate_Surface.hxx>
-#include <TColgp_SequenceOfXY.hxx>
-#include <TColgp_SequenceOfXYZ.hxx>
#include <BRep_Builder.hxx>
-#include <ShapeFix_Face.hxx>
-#include <BRep_Tool.hxx>
+#include <BRepFill_CurveConstraint.hxx>
+#include <BRepBuilderAPI_MakeFace.hxx>
+
+#include <TopAbs_ShapeEnum.hxx>
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Shell.hxx>
+#include <TopoDS_Compound.hxx>
+#include <TopoDS_Iterator.hxx>
#include <TopLoc_Location.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_HSequenceOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopoDS_Shell.hxx>
-#include <ShapeFix_Shell.hxx>
-#include <GeomPlate_PlateG0Criterion.hxx>
+
+#include <Geom_Curve.hxx>
+#include <Geom_BSplineSurface.hxx>
+#include <GeomPlate_Surface.hxx>
#include <GeomPlate_MakeApprox.hxx>
-#include <Precision.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <BRepFill_CurveConstraint.hxx>
-#include <BRepBuilderAPI_MakeFace.hxx>
+#include <GeomPlate_CurveConstraint.hxx>
+#include <GeomPlate_PlateG0Criterion.hxx>
+#include <GeomPlate_BuildPlateSurface.hxx>
+#include <TColgp_SequenceOfXY.hxx>
+#include <TColgp_SequenceOfXYZ.hxx>
+
+#include <Precision.hxx>
//=======================================================================
//function : ShHealOper_FillHoles()
//=======================================================================
//function : ShHealOper_FillHoles
-//purpose :
+//purpose :
//=======================================================================
-
ShHealOper_FillHoles::ShHealOper_FillHoles (const TopoDS_Shape& theShape)
{
-
Init(theShape);
InitParameters();
}
+
//=======================================================================
//function : Init
-//purpose :
+//purpose :
//=======================================================================
-
void ShHealOper_FillHoles::Init(const TopoDS_Shape& theShape)
{
ShHealOper_Tool::Init(theShape);
TopExp::MapShapesAndAncestors( myInitShape, TopAbs_EDGE,TopAbs_SHELL , myEdgeShells);
TopExp::MapShapesAndAncestors ( myInitShape, TopAbs_EDGE,TopAbs_COMPOUND, myEdgeComps );
-
+
TopExp::MapShapesAndAncestors ( myInitShape, TopAbs_EDGE,TopAbs_FACE, myEdgeFaces );
}
+
//=======================================================================
//function : InitParameters
-//purpose :
+//purpose :
//=======================================================================
-
void ShHealOper_FillHoles::InitParameters(Standard_Integer theDegree,
Standard_Integer theNbPtsOnCur,
Standard_Integer theNbIter,
}
//=======================================================================
//function : Fill
-//purpose :
+//purpose :
//=======================================================================
-
Standard_Boolean ShHealOper_FillHoles::Fill()
{
ShapeAnalysis_FreeBounds sab(myInitShape);
if(!aCompClosed.IsNull()) {
TopoDS_Iterator aIt(aCompClosed);
- for( ; aIt.More(); aIt.Next())
+ for( ; aIt.More(); aIt.Next())
aFillWires.Append(aIt.Value());
}
if(!aCompOpen.IsNull()) {
TopoDS_Iterator aIt(aCompOpen);
- for( ; aIt.More(); aIt.Next())
+ for( ; aIt.More(); aIt.Next())
aFillWires.Append(aIt.Value());
}
-
+
TopExp_Explorer aExp(myInitShape,TopAbs_EDGE,TopAbs_FACE);
-
+
for( ; aExp.More(); aExp.Next())
aFillWires.Append(aExp.Current());
//=======================================================================
//function : Fill
-//purpose :
+//purpose :
//=======================================================================
-
Standard_Boolean ShHealOper_FillHoles::Fill(const TopTools_SequenceOfShape& theFillShapes)
{
myDone = Standard_False;
Handle(Geom_Surface) aSurf = buildSurface(aWire,aCurves2d,aOrders,aSenses);
if(aSurf.IsNull())
myErrorStatus = ShHealOper_ErrorExecution;
- else
+ else
myDone = (addFace(aSurf,aWire,aCurves2d,aOrders,aSenses) || myDone);
}
if(myDone)
myResultShape = myContext->Apply(myResultShape);
return myDone;
}
+
//=======================================================================
//function : isCircle
-//purpose :
+//purpose :
//=======================================================================
static Standard_Boolean isCircle(const TopoDS_Edge theEdge)
{
Standard_Real aFirst, aLast;
Handle(Geom_Curve) aC3D = BRep_Tool::Curve(theEdge,aFirst, aLast );
if(aC3D.IsNull()) return Standard_False;
- Standard_Boolean isCirc = (aC3D->Value(aFirst).Distance(aC3D->Value(aLast)) <
+ Standard_Boolean isCirc = (aC3D->Value(aFirst).Distance(aC3D->Value(aLast)) <
aC3D->Value(aFirst).Distance(aC3D->Value((aFirst +aLast)/2)));
return isCirc;
}
//=======================================================================
//function : prepareWires
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean ShHealOper_FillHoles::prepareWires(const TopTools_SequenceOfShape& theFillShapes,
Handle(TopTools_HSequenceOfShape)& theSeqWires)
{
Handle(TopTools_HSequenceOfShape) aSeqEdges = new TopTools_HSequenceOfShape;
- BRep_Builder aB;
Standard_Integer i =1;
for( ; i <= theFillShapes.Length(); i++) {
TopExp_Explorer aExp;
aSeqEdges->Append(aExp.Current());
}
}
-
+
if(aSeqEdges->Length())
{
Standard_Real aTol = 0.;
Handle(TopTools_HSequenceOfShape) anWiresClosed = new TopTools_HSequenceOfShape,
anWiresOpen = new TopTools_HSequenceOfShape;
ShapeAnalysis_FreeBounds::SplitWires(aTmpWires, aTol, aShared, anWiresClosed, anWiresOpen);
-
+
for (i = 1; i <= anWiresClosed->Length(); i++)
theSeqWires->Append (anWiresClosed->Value (i));
for (i = 1; i <= anWiresOpen->Length(); i++)
theSeqWires->Append (anWiresOpen->Value (i));
}
-
-
for( i =1; i <= theSeqWires->Length(); i++) {
TopoDS_Wire aWire = TopoDS::Wire(theSeqWires->Value(i));
-
+
TopoDS_Iterator aIt(aWire);
Standard_Integer ne =0;
TopoDS_Edge ae;
for( ; aIt.More(); aIt.Next(), ne++)
- ae = TopoDS::Edge(aIt.Value());
+ ae = TopoDS::Edge(aIt.Value());
if((ne == 1) && ( !isCircle(ae))) {
theSeqWires->Remove(i--);
continue;
}
//=======================================================================
//function : buildSurface
-//purpose :
+//purpose :
//=======================================================================
Handle(Geom_Surface) ShHealOper_FillHoles::buildSurface(const TopoDS_Wire& theWire,
{
Handle(Geom_BSplineSurface) aSurf;
try {
-
GeomPlate_BuildPlateSurface aBuilder(myDegree, myNbPtsOnCur, myNbIter,
myTol2d, myTol3d, myTolAng, myTolCrv);
TopoDS_Iterator aIter;
Handle(BRepAdaptor_HCurve) aHAD= new BRepAdaptor_HCurve(adC);
Handle(BRepFill_CurveConstraint) aConst =
new BRepFill_CurveConstraint (aHAD, (Standard_Integer) GeomAbs_C0, myNbPtsOnCur, myTol3d);
- //Handle(GeomPlate_CurveConstraint) aConst =
+ //Handle(GeomPlate_CurveConstraint) aConst =
// new GeomPlate_CurveConstraint(aHAD, (Standard_Integer) GeomAbs_C0, myNbPtsOnCur, myTol3d);
aBuilder.Add (aConst);
}
S3d.Clear();
aBuilder.Disc2dContour(4,S2d);
aBuilder.Disc3dContour(4,0,S3d);
- Standard_Real amaxTol = Max( myTol3d, 10* aDist);
+ Standard_Real amaxTol = Max( myTol3d, 10* aDist);
GeomPlate_PlateG0Criterion Criterion( S2d, S3d, amaxTol );
GeomPlate_MakeApprox Approx( aPlSurf, Criterion, myTol3d, myMaxSeg, myMaxDeg );
aSurf = Approx.Surface();
if(aSurf.IsNull())
return aSurf;
-
+
theCurves2d = aBuilder.Curves2d();
theOrders = aBuilder.Order();
theSenses = aBuilder.Sense();
-
}
catch (Standard_Failure) {
//=======================================================================
//function : addFace
-//purpose :
+//purpose :
//=======================================================================
Standard_Boolean ShHealOper_FillHoles::addFace(const Handle(Geom_Surface)& theSurf,
const Handle(TColStd_HArray1OfInteger)& theOrders,
const Handle(TColStd_HArray1OfInteger)& theSenses)
{
+#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
+ BRepBuilderAPI_MakeFace aMakeFace (theSurf, Precision::Confusion());
+#else
BRepBuilderAPI_MakeFace aMakeFace (theSurf);
+#endif
TopoDS_Face aFace = aMakeFace.Face();
aFace.EmptyCopy();
-
TopoDS_Wire aWire;
BRep_Builder aB;
BRep_Tool::Range (anEdge, aF, aL);
TopLoc_Location aLoc;
aB.UpdateEdge (anEdge, theCurves2d->Value (aInd),aFace, 0.);
-
+
aB.Range (anEdge, aFace, aF, aL);
-
+
// Set orientation of the edge: orientation should be changed
// if its orientation does not make sence with curve orientation
// recommended by GeomPlate
//=======================================================================
//function : getResShape
-//purpose :
+//purpose :
//=======================================================================
void ShHealOper_FillHoles::getResShape(const TopoDS_Shape& theAddShape,
aB.MakeShell(aTmpShell);
TopTools_SequenceOfShape aseqShells;
if(anhasShell) {
-
aB.Add(aTmpShell,theAddShape);
Standard_Integer i =1;
for( ; i <= aMapParent.Extent(); i++) {
TopoDS_Shape anshape = asfs->Shape();
myContext->Replace(aseqShells.Value(1),anshape);
Standard_Integer i =2;
- for( ; i<= aseqShells.Length(); i++)
+ for( ; i<= aseqShells.Length(); i++)
myContext->Remove(aseqShells.Value(i));
-
}
else {
TopoDS_Compound aComp;
aB.Add(aComp,aIt.Value());
aB.Add(aComp,theAddShape);
myContext->Replace( oldshape,aComp);
-
}
}