#include <TopoDS_Shape.hxx>
#ifdef WNT
-#include <SALOME_WNT.hxx>
+ #if defined BREPEXPORT_EXPORTS
+ #if defined WIN32
+ #define BREPEXPORT_EXPORT __declspec( dllexport )
+ #else
+ #define BREPEXPORT_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define BREPEXPORT_EXPORT __declspec( dllimport )
+ #else
+ #define BREPEXPORT_EXPORT
+ #endif
+ #endif
#else
-#define SALOME_WNT_EXPORT
+ #define BREPEXPORT_EXPORT
#endif
//=============================================================================
extern "C"
{
-SALOME_WNT_EXPORT
- int Export(const TopoDS_Shape& theShape,
- const TCollection_AsciiString& theFileName,
- const TCollection_AsciiString& /*theFormatName*/)
+BREPEXPORT_EXPORT
+ int Export(const TopoDS_Shape& theShape, const TCollection_AsciiString& theFileName)
{
MESSAGE("Export BREP into file " << theFileName.ToCString());
#include <TopoDS_Shape.hxx>
#ifdef WNT
-#include <SALOME_WNT.hxx>
+ #if defined BREPIMPORT_EXPORTS
+ #if defined WIN32
+ #define BREPIMPORT_EXPORT __declspec( dllexport )
+ #else
+ #define BREPIMPORT_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define BREPIMPORT_EXPORT __declspec( dllimport )
+ #else
+ #define BREPIMPORT_EXPORT
+ #endif
+ #endif
#else
-#define SALOME_WNT_EXPORT
+ #define BREPIMPORT_EXPORT
#endif
//=============================================================================
extern "C"
{
-SALOME_WNT_EXPORT
+BREPIMPORT_EXPORT
TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& /*theFormatName*/,
TCollection_AsciiString& theError)
//=====================================================================================
extern "C"
{
-#ifdef WNT
- __declspec( dllexport )
-#endif
+GEOM_BASICGUI_EXPORT
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return new BasicGUI( parent );
#ifndef BASICGUI_H
#define BASICGUI_H
+#include "GEOM_BasicGUI.hxx"
+
#include "GEOMGUI.h"
#include "GEOMBase.h"
#include <V3d_View.hxx>
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define BASICGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define BASICGUI_WNT_EXPORT
-#endif
-
//=================================================================================
// class : BasicGUI
// purpose :
//=================================================================================
-class BasicGUI : public GEOMGUI
+class GEOM_BASICGUI_EXPORT BasicGUI : public GEOMGUI
{
public:
BasicGUI( GeometryGUI* parent );
#ifndef DIALOGBOX_ARC_H
#define DIALOGBOX_ARC_H
+#include "GEOM_BasicGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_3Sel_QTD.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define BASICGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define BASICGUI_WNT_EXPORT
-#endif
+
//=================================================================================
// class : BasicGUI_ArcDlg
// purpose :
//=================================================================================
-class BasicGUI_ArcDlg : public GEOMBase_Skeleton
+class GEOM_BASICGUI_EXPORT BasicGUI_ArcDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_CIRCLE_H
#define DIALOGBOX_CIRCLE_H
+#include "GEOM_BasicGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_2Sel1Spin.h"
#include "DlgRef_3Sel_QTD.h"
#include "BasicGUI.h"
-#include <gp_Dir.hxx>
-
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define BASICGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define BASICGUI_WNT_EXPORT
-#endif
-
//=================================================================================
// class : BasicGUI_CircleDlg
// purpose :
//=================================================================================
-class BasicGUI_CircleDlg : public GEOMBase_Skeleton
+class GEOM_BASICGUI_EXPORT BasicGUI_CircleDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef BASICGUI_CURVE_H
#define BASICGUI_CURVE_H
+#include "GEOM_BasicGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel_QTD.h"
#include <list>
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define BASICGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define BASICGUI_WNT_EXPORT
-#endif
-
//=================================================================================
// class : BasicGUI_CurveDlg
// purpose :
//=================================================================================
-class BasicGUI_CurveDlg : public GEOMBase_Skeleton
+class GEOM_BASICGUI_EXPORT BasicGUI_CurveDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef BASICGUI_ELLIPSE_H
#define BASICGUI_ELLIPSE_H
+#include "GEOM_BasicGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_2Sel2Spin.h"
#include "BasicGUI.h"
-#include <gp_Dir.hxx>
-
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define BASICGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define BASICGUI_WNT_EXPORT
-#endif
-
//=================================================================================
// class : BasicGUI_EllipseDlg
// purpose :
//=================================================================================
-class BasicGUI_EllipseDlg : public GEOMBase_Skeleton
+class GEOM_BASICGUI_EXPORT BasicGUI_EllipseDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_LINE_H
#define DIALOGBOX_LINE_H
+#include "GEOM_BasicGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_2Sel_QTD.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define BASICGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define BASICGUI_WNT_EXPORT
-#endif
-
//=================================================================================
// class : BasicGUI_LineDlg
// purpose :
//=================================================================================
-class BasicGUI_LineDlg : public GEOMBase_Skeleton
+class GEOM_BASICGUI_EXPORT BasicGUI_LineDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_Marker_H
#define DIALOGBOX_Marker_H
+#include "GEOM_BasicGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel_QTD.h"
#include "DlgRef_3Sel_QTD.h"
class DlgRef_SpinBox;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define BASICGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define BASICGUI_WNT_EXPORT
-#endif
-
-class BasicGUI_MarkerDlg : public GEOMBase_Skeleton
+class GEOM_BASICGUI_EXPORT BasicGUI_MarkerDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_PLANE_H
#define DIALOGBOX_PLANE_H
+#include "GEOM_BasicGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel1Spin.h"
#include "DlgRef_2Sel1Spin.h"
#include "DlgRef_3Sel1Spin.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define BASICGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define BASICGUI_WNT_EXPORT
-#endif
-
//=================================================================================
// class : BasicGUI_PlaneDlg
// purpose :
//=================================================================================
-class BasicGUI_PlaneDlg : public GEOMBase_Skeleton
+class GEOM_BASICGUI_EXPORT BasicGUI_PlaneDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_POINT_H
#define DIALOGBOX_POINT_H
+#include "GEOM_BasicGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel1Spin.h"
#include "DlgRef_3Spin.h"
class QLineEdit;
class QGroupBox;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define BASICGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define BASICGUI_WNT_EXPORT
-#endif
//=================================================================================
// class : BasicGUI_PointDlg
// purpose :
//=================================================================================
-class BasicGUI_PointDlg : public GEOMBase_Skeleton
+class GEOM_BASICGUI_EXPORT BasicGUI_PointDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_VECTOR_H
#define DIALOGBOX_VECTOR_H
+#include "GEOM_BasicGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_2Sel_QTD.h"
#include "DlgRef_3Spin1Check.h"
#include "BasicGUI.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define BASICGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define BASICGUI_WNT_EXPORT
-#endif
-
//=================================================================================
// class : BasicGUI_VectorDlg
// purpose :
//=================================================================================
-class BasicGUI_VectorDlg : public GEOMBase_Skeleton
+class GEOM_BASICGUI_EXPORT BasicGUI_VectorDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_WORKINGPLANE_H
#define DIALOGBOX_WORKINGPLANE_H
+#include "GEOM_BasicGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel_QTD.h"
#include "DlgRef_2Sel_QTD.h"
#include "DlgRef_3Check_QTD.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define BASICGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define BASICGUI_WNT_EXPORT
-#endif
-
//=================================================================================
// class : BasicGUI_WorkingPlaneDlg
// purpose :
//=================================================================================
-class BASICGUI_WNT_EXPORT BasicGUI_WorkingPlaneDlg : public GEOMBase_Skeleton
+class GEOM_BASICGUI_EXPORT BasicGUI_WorkingPlaneDlg : public GEOMBase_Skeleton
{
Q_OBJECT
@COMMENCE@
# header files
-EXPORT_HEADERS= BasicGUI_PointDlg.h
+EXPORT_HEADERS= BasicGUI_PointDlg.h \
+ GEOM_BasicGUI.hxx
# Libraries targets
LIB = libBasicGUI.la
BasicGUI_PlaneDlg.h \
BasicGUI_WorkingPlaneDlg.h \
BasicGUI_CurveDlg.h \
- BasicGUI_MarkerDlg.h
+ BasicGUI_MarkerDlg.h \
+ GEOM_BasicGUI.hxx
LIB_CLIENT_IDL = SALOME_GenericObj.idl SALOME_Exception.idl SALOME_Component.idl
//=====================================================================================
extern "C"
{
-#ifdef WNT
- __declspec( dllexport )
-#endif
+ GEOM_BLOCKSGUI_EXPORT
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return new BlocksGUI( parent );
#ifndef BLOCKSGUI_H
#define BLOCKSGUI_H
+#include "GEOM_BlocksGUI.hxx"
+
#include "GEOMGUI.h"
//=================================================================================
// class : BlocksGUI
// purpose :
//=================================================================================
-class BlocksGUI : public GEOMGUI
+class GEOM_BLOCKSGUI_EXPORT BlocksGUI : public GEOMGUI
{
public:
BlocksGUI( GeometryGUI* parent );
#ifndef DIALOGBOX_BLOCK_H
#define DIALOGBOX_BLOCK_H
+#include "GEOM_BlocksGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_2Sel_QTD.h"
#include "DlgRef_6Sel_QTD.h"
// class : BlocksGUI_BlockDlg
// purpose :
//=================================================================================
-class BlocksGUI_BlockDlg : public GEOMBase_Skeleton
+class GEOM_BLOCKSGUI_EXPORT BlocksGUI_BlockDlg : public GEOMBase_Skeleton
{
Q_OBJECT
ObjectList toRemoveFromEnggine;
ObjectList::iterator anIter;
for (anIter = myTmpObjs.begin(); anIter != myTmpObjs.end(); ++anIter) {
- if (selected.contains(myGeomGUI->getApp()->orb()->object_to_string(*anIter)))
+ CORBA::String_var objStr = myGeomGUI->getApp()->orb()->object_to_string(*anIter);
+ if (selected.contains(QString(objStr.in())))
objects.push_back(*anIter);
else
toRemoveFromEnggine.push_back(*anIter);
#ifndef DIALOGBOX_BLOCK_EXPLODE_H
#define DIALOGBOX_BLOCK_EXPLODE_H
+#include "GEOM_BlocksGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
class DlgRef_SpinBox;
// class : BlocksGUI_ExplodeDlg
// purpose :
//=================================================================================
-class BlocksGUI_ExplodeDlg : public GEOMBase_Skeleton
+class GEOM_BLOCKSGUI_EXPORT BlocksGUI_ExplodeDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_BlocksGUI_PropagateDlg_H
#define DIALOGBOX_BlocksGUI_PropagateDlg_H
+#include "GEOM_BlocksGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
// class : BlocksGUI_PropagateDlg
// purpose :
//=================================================================================
-class BlocksGUI_PropagateDlg : public GEOMBase_Skeleton
+class GEOM_BLOCKSGUI_EXPORT BlocksGUI_PropagateDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_QUAD_FACE_H
#define DIALOGBOX_QUAD_FACE_H
+#include "GEOM_BlocksGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
//=================================================================================
// class : BlocksGUI_QuadFaceDlg
// purpose :
//=================================================================================
-class BlocksGUI_QuadFaceDlg : public GEOMBase_Skeleton
+class GEOM_BLOCKSGUI_EXPORT BlocksGUI_QuadFaceDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_BLOCK_MULTITRSF_H
#define DIALOGBOX_BLOCK_MULTITRSF_H
+#include "GEOM_BlocksGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
class DlgRef_SpinBox;
// class : BlocksGUI_TrsfDlg
// purpose :
//=================================================================================
-class BlocksGUI_TrsfDlg : public GEOMBase_Skeleton
+class GEOM_BLOCKSGUI_EXPORT BlocksGUI_TrsfDlg : public GEOMBase_Skeleton
{
Q_OBJECT
BlocksGUI_BlockDlg.h \
BlocksGUI_ExplodeDlg.h \
BlocksGUI_PropagateDlg.h \
- BlocksGUI_TrsfDlg.h
+ BlocksGUI_TrsfDlg.h \
+ GEOM_BlocksGUI.hxx
LIB_CLIENT_IDL = SALOME_Exception.idl SALOME_GenericObj.idl SALOME_Component.idl
//=====================================================================================
extern "C"
{
-#ifdef WNT
- __declspec( dllexport )
-#endif
+GEOM_BOOLEANGUI_EXPORT
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return new BooleanGUI( parent );
#include "GEOMGUI.h"
+#ifdef WNT
+ #if defined BOOLEANGUI_EXPORTS
+ #if defined WIN32
+ #define GEOM_BOOLEANGUI_EXPORT __declspec( dllexport )
+ #else
+ #define GEOM_BOOLEANGUI_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define GEOM_BOOLEANGUI_EXPORT __declspec( dllimport )
+ #else
+ #define GEOM_BOOLEANGUI_EXPORT
+ #endif
+ #endif
+#else
+ #define GEOM_BOOLEANGUI_EXPORT
+#endif
+
//=================================================================================
// class : BooleanGUI
// purpose :
//=================================================================================
-class BooleanGUI : public GEOMGUI
+class GEOM_BOOLEANGUI_EXPORT BooleanGUI : public GEOMGUI
{
public:
enum BooleanOperation { COMMON = 1, CUT = 2, FUSE = 3, SECTION = 4 };
#ifndef BooleanGUI_Dialog_H
#define BooleanGUI_Dialog_H
+#include "BooleanGUI.h" //for wnt defines
+
#include "GEOMBase_Skeleton.h"
class DlgRef_2Sel_QTD;
// class : BooleanGUI_Dialog
// purpose :
//=================================================================================
-class BooleanGUI_Dialog : public GEOMBase_Skeleton
+class GEOM_BOOLEANGUI_EXPORT BooleanGUI_Dialog : public GEOMBase_Skeleton
{
Q_OBJECT
//=====================================================================================
extern "C"
{
-#ifdef WNT
- __declspec( dllexport )
-#endif
+ GEOM_BUILDGUI_EXPORT
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return new BuildGUI( parent );
#ifndef BUILDGUI_H
#define BUILDGUI_H
+#include "GEOM_BuildGUI.hxx"
+
#include "GEOMGUI.h"
//=================================================================================
// class : BuildGUI
// purpose :
//=================================================================================
-class BuildGUI : public GEOMGUI
+class GEOM_BUILDGUI_EXPORT BuildGUI : public GEOMGUI
{
public :
BuildGUI( GeometryGUI* parent );
#ifndef DIALOGBOX_COMPOUND_H
#define DIALOGBOX_COMPOUND_H
+#include "GEOM_BuildGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel_QTD.h"
// class : BuildGUI_CompoundDlg
// purpose :
//=================================================================================
-class BuildGUI_CompoundDlg : public GEOMBase_Skeleton
+class GEOM_BUILDGUI_EXPORT BuildGUI_CompoundDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_EDGE_H
#define DIALOGBOX_EDGE_H
+#include "GEOM_BuildGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_2Sel_QTD.h"
// class : BuildGUI_EdgeDlg
// purpose :
//=================================================================================
-class BuildGUI_EdgeDlg : public GEOMBase_Skeleton
+class GEOM_BUILDGUI_EXPORT BuildGUI_EdgeDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#include "BuildGUI_FaceDlg.h"
#include "GEOMImpl_Types.hxx"
+#include "TColStd_MapOfInteger.hxx"
#include "SUIT_Session.h"
#include "SalomeApp_Application.h"
GroupWire = new DlgRef_1Sel1Check_QTD(this, "GroupWire");
GroupWire->GroupBox1->setTitle(tr("GEOM_FACE_FFW"));
- GroupWire->TextLabel1->setText(tr("GEOM_WIRES"));
+ GroupWire->TextLabel1->setText(tr("GEOM_OBJECTS"));
GroupWire->CheckButton1->setText(tr("GEOM_FACE_OPT"));
GroupWire->PushButton1->setPixmap(image1);
GroupWire->CheckButton1->setChecked(TRUE);
- globalSelection( GEOM_WIRE );
+ TColStd_MapOfInteger aMap;
+ aMap.Add( GEOM_EDGE );
+ aMap.Add( GEOM_WIRE );
+ globalSelection( aMap );
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
if (!myWires.length())
return;
if(aNbSel != 1)
- aName = tr("%1_wires").arg(aNbSel);
+ aName = tr("%1_objects").arg(aNbSel);
myEditCurrentArgument->setText( aName );
if (send != GroupWire->PushButton1)
return;
- globalSelection( GEOM_WIRE );
+ TColStd_MapOfInteger aMap;
+ aMap.Add( GEOM_EDGE );
+ aMap.Add( GEOM_WIRE );
+ globalSelection( aMap );
+
myEditCurrentArgument = GroupWire->LineEdit1;
myEditCurrentArgument->setFocus();
GEOMBase_Skeleton::ActivateThisDialog();
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
- globalSelection( GEOM_WIRE );
+ TColStd_MapOfInteger aMap;
+ aMap.Add( GEOM_EDGE );
+ aMap.Add( GEOM_WIRE );
+ globalSelection( aMap );
}
#ifndef DIALOGBOX_FACE_H
#define DIALOGBOX_FACE_H
+#include "GEOM_BuildGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel1Check_QTD.h"
// class : BuildGUI_FaceDlg
// purpose :
//=================================================================================
-class BuildGUI_FaceDlg : public GEOMBase_Skeleton
+class GEOM_BUILDGUI_EXPORT BuildGUI_FaceDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_SHELL_H
#define DIALOGBOX_SHELL_H
+#include "GEOM_BuildGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel_QTD.h"
// class : BuildGUI_ShellDlg
// purpose :
//=================================================================================
-class BuildGUI_ShellDlg : public GEOMBase_Skeleton
+class GEOM_BUILDGUI_EXPORT BuildGUI_ShellDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_SOLID_H
#define DIALOGBOX_SOLID_H
+#include "GEOM_BuildGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel1Check_QTD.h"
// class : BuildGUI_SolidDlg
// purpose :
//=================================================================================
-class BuildGUI_SolidDlg : public GEOMBase_Skeleton
+class GEOM_BUILDGUI_EXPORT BuildGUI_SolidDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_WIRE_H
#define DIALOGBOX_WIRE_H
+#include "GEOM_BuildGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel_QTD.h"
// class : BuildGUI_WireDlg
// purpose :
//=================================================================================
-class BuildGUI_WireDlg : public GEOMBase_Skeleton
+class GEOM_BUILDGUI_EXPORT BuildGUI_WireDlg : public GEOMBase_Skeleton
{
Q_OBJECT
BuildGUI_FaceDlg.h \
BuildGUI_ShellDlg.h \
BuildGUI_SolidDlg.h \
- BuildGUI_CompoundDlg.h
+ BuildGUI_CompoundDlg.h \
+ GEOM_BuildGUI.hxx
LIB_CLIENT_IDL = SALOME_Exception.idl SALOME_GenericObj.idl SALOME_Component.idl
//=====================================================================================
extern "C"
{
-#ifdef WNT
- __declspec( dllexport )
-#endif
+ GEOM_DISPLAYGUI_EXPORT
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return new DisplayGUI( parent );
#include "GEOMGUI.h"
#include "GEOMBase.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DISPLAYGUI_WNT_EXPORT __declspec( dllexport )
+#ifdef WNT
+# if defined DISPLAYGUI_EXPORTS
+# define GEOM_DISPLAYGUI_EXPORT __declspec( dllexport )
+# else
+# define GEOM_DISPLAYGUI_EXPORT __declspec( dllimport )
+# endif
#else
-#define DISPLAYGUI_WNT_EXPORT
+# define GEOM_DISPLAYGUI_EXPORT
#endif
//=================================================================================
//=================================================================================
//class QAD_ViewFrame;
class SUIT_ViewWindow;
-class DisplayGUI : public GEOMGUI
+class GEOM_DISPLAYGUI_EXPORT DisplayGUI : public GEOMGUI
{
public:
DisplayGUI( GeometryGUI* parent );
#ifndef DLGREF_1LIST1SPIN1BTN_QTD_H
#define DLGREF_1LIST1SPIN1BTN_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QSpinBox;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_1List1Spin1Btn_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_1List1Spin1Btn_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_1SEL1CHECK1LIST_QTD_H
#define DLGREF_1SEL1CHECK1LIST_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QRadioButton;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_1Sel1Check1List_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_1Sel1Check1List_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_1SEL1CHECK_QTD_H
#define DLGREF_1SEL1CHECK_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QLineEdit;
class QPushButton;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_1Sel1Check_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_1Sel1Check_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_1SEL1SPIN_H
#define DLGREF_1SEL1SPIN_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_1Sel1Spin_QTD.h"
#include "DlgRef_SpinBox.h"
-//#if defined WNT
-//#include <SALOME_WNT.hxx>
-//#else
-//#define SALOME_WNT_EXPORT
-//#endif
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_1Sel1Spin : public DlgRef_1Sel1Spin_QTD
+
+class GEOM_DLGREF_EXPORT DlgRef_1Sel1Spin : public DlgRef_1Sel1Spin_QTD
{
Q_OBJECT
#ifndef DLGREF_1SEL1SPIN1CHECK_H
#define DLGREF_1SEL1SPIN1CHECK_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_1Sel1Spin1Check_QTD.h"
#include "DlgRef_SpinBox.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_1Sel1Spin1Check : public DlgRef_1Sel1Spin1Check_QTD
+class GEOM_DLGREF_EXPORT DlgRef_1Sel1Spin1Check : public DlgRef_1Sel1Spin1Check_QTD
{
Q_OBJECT
#ifndef DLGREF_1SEL1SPIN1CHECK_QTD_H
#define DLGREF_1SEL1SPIN1CHECK_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QSpinBox;
-class DlgRef_1Sel1Spin1Check_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_1Sel1Spin1Check_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_1SEL1SPIN_QTD_H
#define DLGREF_1SEL1SPIN_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QLineEdit;
class QPushButton;
class QSpinBox;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-class DLGREF_WNT_EXPORT DlgRef_1Sel1Spin_QTD : public QWidget
+
+class GEOM_DLGREF_EXPORT DlgRef_1Sel1Spin_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_1SEL2SPIN_H
#define DLGREF_1SEL2SPIN_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_1Sel2Spin_QTD.h"
#include "DlgRef_SpinBox.h"
-class DlgRef_1Sel2Spin : public DlgRef_1Sel2Spin_QTD
+class GEOM_DLGREF_EXPORT DlgRef_1Sel2Spin : public DlgRef_1Sel2Spin_QTD
{
Q_OBJECT
#ifndef DLGREF_1SEL2SPIN_QTD_H
#define DLGREF_1SEL2SPIN_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QSpinBox;
-class DlgRef_1Sel2Spin_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_1Sel2Spin_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_1SEL3CHECK_QTD_H
#define DLGREF_1SEL3CHECK_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QLineEdit;
class QPushButton;
-class DlgRef_1Sel3Check_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_1Sel3Check_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_1SEL3SPIN_H
#define DLGREF_1SEL3SPIN_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_1Sel3Spin_QTD.h"
#include "DlgRef_SpinBox.h"
-//#if defined WNT
-//#include <SALOME_WNT.hxx>
-//#else
-//#define SALOME_WNT_EXPORT
-//#endif
-
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_1Sel3Spin : public DlgRef_1Sel3Spin_QTD
+
+class GEOM_DLGREF_EXPORT DlgRef_1Sel3Spin : public DlgRef_1Sel3Spin_QTD
{
Q_OBJECT
#ifndef DLGREF_1SEL3SPIN_QTD_H
#define DLGREF_1SEL3SPIN_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QLineEdit;
class QPushButton;
class QSpinBox;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-class DLGREF_WNT_EXPORT DlgRef_1Sel3Spin_QTD : public QWidget
+
+class GEOM_DLGREF_EXPORT DlgRef_1Sel3Spin_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_1SEL4SPIN_H
#define DLGREF_1SEL4SPIN_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_1Sel4Spin_QTD.h"
#include "DlgRef_SpinBox.h"
-class DlgRef_1Sel4Spin : public DlgRef_1Sel4Spin_QTD
+class GEOM_DLGREF_EXPORT DlgRef_1Sel4Spin : public DlgRef_1Sel4Spin_QTD
{
Q_OBJECT
#ifndef DLGREF_1SEL4SPIN_QTD_H
#define DLGREF_1SEL4SPIN_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QSpinBox;
-class DlgRef_1Sel4Spin_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_1Sel4Spin_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_1SEL5SPIN_H
#define DLGREF_1SEL5SPIN_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_1Sel5Spin_QTD.h"
#include "DlgRef_SpinBox.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_1Sel5Spin : public DlgRef_1Sel5Spin_QTD
+class GEOM_DLGREF_EXPORT DlgRef_1Sel5Spin : public DlgRef_1Sel5Spin_QTD
{
Q_OBJECT
#ifndef DLGREF_1SEL5SPIN_QTD_H
#define DLGREF_1SEL5SPIN_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QSpinBox;
-class DlgRef_1Sel5Spin_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_1Sel5Spin_QTD : public QWidget
{
Q_OBJECT
#ifndef DlgRef_1Sel_Ext_H
#define DlgRef_1Sel_Ext_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_1Sel_QTD.h"
class QGridLayout;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_1Sel_Ext : public DlgRef_1Sel_QTD
+class GEOM_DLGREF_EXPORT DlgRef_1Sel_Ext : public DlgRef_1Sel_QTD
{
Q_OBJECT
#ifndef DLGREF_1SEL_QTD_H
#define DLGREF_1SEL_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QLineEdit;
class QPushButton;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_1Sel_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_1Sel_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_1SPIN_H
#define DLGREF_1SPIN_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_1Spin_QTD.h"
#include "DlgRef_SpinBox.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-class DLGREF_WNT_EXPORT DlgRef_1Spin : public DlgRef_1Spin_QTD
+
+class GEOM_DLGREF_EXPORT DlgRef_1Spin : public DlgRef_1Spin_QTD
{
Q_OBJECT
#ifndef DLGREF_1SPIN_QTD_H
#define DLGREF_1SPIN_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QGroupBox;
class QLabel;
class QSpinBox;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-class DLGREF_WNT_EXPORT DlgRef_1Spin_QTD : public QWidget
+
+class GEOM_DLGREF_EXPORT DlgRef_1Spin_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_2SEL1SPIN_H
#define DLGREF_2SEL1SPIN_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_2Sel1Spin_QTD.h"
#include "DlgRef_SpinBox.h"
-//#if defined WNT
-//#include <SALOME_WNT.hxx>
-//#else
-//#define SALOME_WNT_EXPORT
-//#endif
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_2Sel1Spin : public DlgRef_2Sel1Spin_QTD
+
+class GEOM_DLGREF_EXPORT DlgRef_2Sel1Spin : public DlgRef_2Sel1Spin_QTD
{
Q_OBJECT
#ifndef DLGREF_2SEL1SPIN2CHECK_H
#define DLGREF_2SEL1SPIN2CHECK_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_2Sel1Spin2Check_QTD.h"
#include "DlgRef_SpinBox.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-class DLGREF_WNT_EXPORT DlgRef_2Sel1Spin2Check : public DlgRef_2Sel1Spin2Check_QTD
+class GEOM_DLGREF_EXPORT DlgRef_2Sel1Spin2Check : public DlgRef_2Sel1Spin2Check_QTD
{
Q_OBJECT
#ifndef DLGREF_2SEL1SPIN2CHECK_QTD_H
#define DLGREF_2SEL1SPIN2CHECK_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QSpinBox;
-class DlgRef_2Sel1Spin2Check_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_2Sel1Spin2Check_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_2SEL1SPIN_QTD_H
#define DLGREF_2SEL1SPIN_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QSpinBox;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_2Sel1Spin_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_2Sel1Spin_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_2SEL2SPIN_H
#define DLGREF_2SEL2SPIN_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_2Sel2Spin_QTD.h"
#include "DlgRef_SpinBox.h"
-//#if defined WNT
-//#include <SALOME_WNT.hxx>
-//#else
-//#define SALOME_WNT_EXPORT
-//#endif
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-class DLGREF_WNT_EXPORT DlgRef_2Sel2Spin : public DlgRef_2Sel2Spin_QTD
+
+class GEOM_DLGREF_EXPORT DlgRef_2Sel2Spin : public DlgRef_2Sel2Spin_QTD
{
Q_OBJECT
#ifndef DLGREF_2SEL2SPIN1CHECK_H
#define DLGREF_2SEL2SPIN1CHECK_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_2Sel2Spin1Check_QTD.h"
#include "DlgRef_SpinBox.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_2Sel2Spin1Check : public DlgRef_2Sel2Spin1Check_QTD
+class GEOM_DLGREF_EXPORT DlgRef_2Sel2Spin1Check : public DlgRef_2Sel2Spin1Check_QTD
{
Q_OBJECT
#ifndef DLGREF_2SEL2SPIN1CHECK_QTD_H
#define DLGREF_2SEL2SPIN1CHECK_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QSpinBox;
-class DlgRef_2Sel2Spin1Check_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_2Sel2Spin1Check_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_2SEL2SPIN_QTD_H
#define DLGREF_2SEL2SPIN_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QSpinBox;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_2Sel2Spin_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_2Sel2Spin_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_2SEL3SPIN_H
#define DLGREF_2SEL3SPIN_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_2Sel3Spin_QTD.h"
#include "DlgRef_SpinBox.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_2Sel3Spin : public DlgRef_2Sel3Spin_QTD
+class GEOM_DLGREF_EXPORT DlgRef_2Sel3Spin : public DlgRef_2Sel3Spin_QTD
{
Q_OBJECT
#ifndef DLGREF_2SEL3SPIN_QTD_H
#define DLGREF_2SEL3SPIN_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QLineEdit;
class QPushButton;
class QSpinBox;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-class DLGREF_WNT_EXPORT DlgRef_2Sel3Spin_QTD : public QWidget
+
+class GEOM_DLGREF_EXPORT DlgRef_2Sel3Spin_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_2SEL4SPIN1CHECK_H
#define DLGREF_2SEL4SPIN1CHECK_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_2Sel4Spin1Check_QTD.h"
#include "DlgRef_SpinBox.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-class DLGREF_WNT_EXPORT DlgRef_2Sel4Spin1Check : public DlgRef_2Sel4Spin1Check_QTD
+class GEOM_DLGREF_EXPORT DlgRef_2Sel4Spin1Check : public DlgRef_2Sel4Spin1Check_QTD
{
Q_OBJECT
#ifndef DLGREF_2SEL4SPIN1CHECK_QTD_H
#define DLGREF_2SEL4SPIN1CHECK_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QSpinBox;
-class DlgRef_2Sel4Spin1Check_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_2Sel4Spin1Check_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_2SEL_QTD_H
#define DLGREF_2SEL_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QLineEdit;
class QPushButton;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_2Sel_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_2Sel_QTD : public QWidget
{
Q_OBJECT
#include "DlgRef_2Spin_QTD.h"
#include "DlgRef_SpinBox.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-class DLGREF_WNT_EXPORT DlgRef_2Spin : public DlgRef_2Spin_QTD
+
+#include "GEOM_DlgRef.hxx"
+
+class GEOM_DLGREF_EXPORT DlgRef_2Spin : public DlgRef_2Spin_QTD
{
Q_OBJECT
#ifndef DLGREF_2SPIN_QTD_H
#define DLGREF_2SPIN_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QGroupBox;
class QLabel;
class QSpinBox;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-class DLGREF_WNT_EXPORT DlgRef_2Spin_QTD : public QWidget
+
+class GEOM_DLGREF_EXPORT DlgRef_2Spin_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_3CHECK_QTD_H
#define DLGREF_3CHECK_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QButtonGroup;
class QRadioButton;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_3Check_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_3Check_QTD : public QWidget
{
Q_OBJECT
#ifndef DlgRef_3SEL_1SPIN_H
#define DlgRef_3SEL_1SPIN_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_3Sel_QTD.h"
#include "DlgRef_SpinBox.h"
#include <qlayout.h>
#include <qlabel.h>
-//#if defined WNT
-//#include <SALOME_WNT.hxx>
-//#else
-//#define SALOME_WNT_EXPORT
-//#endif
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
+
//=================================================================================
// class : DlgRef_3Sel1Spin
// purpose : extension of a DlgRef_3Sel_QTD class, 1 additional spin box is added
//=================================================================================
-class DLGREF_WNT_EXPORT DlgRef_3Sel1Spin : public DlgRef_3Sel_QTD
+class GEOM_DLGREF_EXPORT DlgRef_3Sel1Spin : public DlgRef_3Sel_QTD
{
Q_OBJECT
#ifndef DLGREF_3SEL3SPIN1CHECK_H
#define DLGREF_3SEL3SPIN1CHECK_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_3Sel3Spin1Check_QTD.h"
#include "DlgRef_SpinBox.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_3Sel3Spin1Check : public DlgRef_3Sel3Spin1Check_QTD
+class GEOM_DLGREF_EXPORT DlgRef_3Sel3Spin1Check : public DlgRef_3Sel3Spin1Check_QTD
{
Q_OBJECT
#ifndef DLGREF_3SEL3SPIN1CHECK_QTD_H
#define DLGREF_3SEL3SPIN1CHECK_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QSpinBox;
-class DlgRef_3Sel3Spin1Check_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_3Sel3Spin1Check_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_3SEL4SPIN2CHECK_H
#define DLGREF_3SEL4SPIN2CHECK_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_3Sel4Spin2Check_QTD.h"
#include "DlgRef_SpinBox.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_3Sel4Spin2Check : public DlgRef_3Sel4Spin2Check_QTD
+class GEOM_DLGREF_EXPORT DlgRef_3Sel4Spin2Check : public DlgRef_3Sel4Spin2Check_QTD
{
Q_OBJECT
#ifndef DLGREF_3SEL4SPIN2CHECK_QTD_H
#define DLGREF_3SEL4SPIN2CHECK_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QSpinBox;
-class DlgRef_3Sel4Spin2Check_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_3Sel4Spin2Check_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_3SEL_QTD_H
#define DLGREF_3SEL_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QLineEdit;
class QPushButton;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_3Sel_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_3Sel_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_3SPIN_H
#define DLGREF_3SPIN_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_3Spin_QTD.h"
#include "DlgRef_SpinBox.h"
-//#if defined WNT
-//#include <SALOME_WNT.hxx>
-//#else
-//#define SALOME_WNT_EXPORT
-//#endif
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-class DLGREF_WNT_EXPORT DlgRef_3Spin : public DlgRef_3Spin_QTD
+
+class GEOM_DLGREF_EXPORT DlgRef_3Spin : public DlgRef_3Spin_QTD
{
Q_OBJECT
#ifndef DLGREF_3SPIN1CHECK_H
#define DLGREF_3SPIN1CHECK_H
+#include "GEOM_DlgRef.hxx"
+
#include "DlgRef_3Spin1Check_QTD.h"
#include "DlgRef_SpinBox.h"
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-class DLGREF_WNT_EXPORT DlgRef_3Spin1Check : public DlgRef_3Spin1Check_QTD
+class GEOM_DLGREF_EXPORT DlgRef_3Spin1Check : public DlgRef_3Spin1Check_QTD
{
Q_OBJECT
#ifndef DLGREF_3SPIN1CHECK_QTD_H
#define DLGREF_3SPIN1CHECK_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QRadioButton;
class QSpinBox;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_3Spin1Check_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_3Spin1Check_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_3SPIN_QTD_H
#define DLGREF_3SPIN_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QLabel;
class QSpinBox;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-class DLGREF_WNT_EXPORT DlgRef_3Spin_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_3Spin_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_4SEL1LIST1CHECK_QTD_H
#define DLGREF_4SEL1LIST1CHECK_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QCheckBox;
class QPushButton;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_4Sel1List1Check_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_4Sel1List1Check_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_4SEL1LIST_QTD_H
#define DLGREF_4SEL1LIST_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QLineEdit;
class QPushButton;
-class DlgRef_4Sel1List_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_4Sel1List_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_6SEL_QTD_H
#define DLGREF_6SEL_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QLineEdit;
class QPushButton;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
-
-class DLGREF_WNT_EXPORT DlgRef_6Sel_QTD : public QWidget
+class GEOM_DLGREF_EXPORT DlgRef_6Sel_QTD : public QWidget
{
Q_OBJECT
#ifndef DLGREF_SKELETON_QTD_H
#define DLGREF_SKELETON_QTD_H
+#include "GEOM_DlgRef.hxx"
+
#include <qvariant.h>
#include <qdialog.h>
class QLineEdit;
class QLabel;
-class DlgRef_Skeleton_QTD : public QDialog
+class GEOM_DLGREF_EXPORT DlgRef_Skeleton_QTD : public QDialog
{
Q_OBJECT
#ifndef GEOMSPINBOX_H
#define GEOMSPINBOX_H
+#include "GEOM_DlgRef.hxx"
+
#include "QtxDblSpinBox.h"
-//#if defined WNT
-//#include <SALOME_WNT.hxx>
-//#else
-//#define SALOME_WNT_EXPORT
-//#endif
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define DLGREF_WNT_EXPORT __declspec( dllexport )
-#else
-#define DLGREF_WNT_EXPORT
-#endif
#define COORD_MIN -1e+15
#define COORD_MAX +1e+15
// class : DlgRef_SpinBox
// purpose : Derivated from QSpinBox class and modified to accept floats
//=================================================================================
-class DLGREF_WNT_EXPORT DlgRef_SpinBox : public QtxDblSpinBox
+class GEOM_DLGREF_EXPORT DlgRef_SpinBox : public QtxDblSpinBox
{
Q_OBJECT
DlgRef_2Sel4Spin1Check_QTD.cxx \
DlgRef_3Sel4Spin2Check_QTD.cxx \
DlgRef_4Sel1List_QTD.cxx \
+ DlgRef_2Sel1List_QTD.cxx \
DlgRef_1List1Spin1Btn_QTD.cxx \
DlgRef_4Sel1List1Check_QTD.cxx \
DlgRef_1Spin_QTD.cxx \
DlgRef_3Spin_QTD.cxx \
DlgRef_3Spin1Check_QTD.cxx \
DlgRef_3Sel3Spin1Check_QTD.cxx \
+ DlgRef_4Sel1Spin2Check_QTD.cxx \
DlgRef_SpinBox.cxx \
DlgRef_1Sel1Spin.cxx \
DlgRef_1Sel2Spin.cxx \
DlgRef_3Spin1Check.cxx \
DlgRef_3Sel1Spin.cxx \
DlgRef_3Check_QTD.cxx \
- DlgRef_6Sel_QTD.cxx
+ DlgRef_6Sel_QTD.cxx \
+ DlgRef_4Sel1Spin2Check.cxx
LIB_MOC = \
DlgRef_Skeleton_QTD.h \
DlgRef_2Sel4Spin1Check_QTD.h \
DlgRef_3Sel4Spin2Check_QTD.h \
DlgRef_4Sel1List_QTD.h \
+ DlgRef_2Sel1List_QTD.h \
DlgRef_1List1Spin1Btn_QTD.h \
DlgRef_4Sel1List1Check_QTD.h \
DlgRef_1Spin_QTD.h \
DlgRef_3Spin_QTD.h \
DlgRef_3Spin1Check_QTD.h \
DlgRef_3Sel3Spin1Check_QTD.h \
+ DlgRef_4Sel1Spin2Check_QTD.h \
DlgRef_SpinBox.h \
DlgRef_1Sel1Spin.h \
DlgRef_1Sel2Spin.h \
DlgRef_3Sel1Spin.h \
DlgRef_1Sel_Ext.h \
DlgRef_3Check_QTD.h \
- DlgRef_6Sel_QTD.h
+ DlgRef_6Sel_QTD.h \
+ DlgRef_4Sel1Spin2Check.h
# header files
-EXPORT_HEADERS= $(LIB_MOC)
+EXPORT_HEADERS= $(LIB_MOC) \
+ GEOM_DlgRef.hxx
LIB_CLIENT_IDL =
# 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
#
#!/bin/sh
#uic -o DlgRef_6Sel_QTD.h DlgRef_6Sel_QTD.ui
#uic -o DlgRef_6Sel_QTD.cxx -impl DlgRef_6Sel_QTD.h DlgRef_6Sel_QTD.ui
-uic -o DlgRef_3Check_QTD.h DlgRef_3Check_QTD.ui
-uic -o DlgRef_3Check_QTD.cxx -impl DlgRef_3Check_QTD.h DlgRef_3Check_QTD.ui
+#uic -o DlgRef_3Check_QTD.h DlgRef_3Check_QTD.ui
+#uic -o DlgRef_3Check_QTD.cxx -impl DlgRef_3Check_QTD.h DlgRef_3Check_QTD.ui
+
+uic -o DlgRef_4Sel1Spin2Check_QTD.h DlgRef_4Sel1Spin2Check_QTD.ui
+uic -o DlgRef_4Sel1Spin2Check_QTD.cxx -impl DlgRef_4Sel1Spin2Check_QTD.h DlgRef_4Sel1Spin2Check_QTD.ui
//=====================================================================================
extern "C"
{
-#ifdef WNT
- __declspec( dllexport )
-#endif
+GEOM_ENTITYGUI_EXPORT
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return new EntityGUI( parent );
#ifndef ENTITYGUI_H
#define ENTITYGUI_H
+#include "GEOM_EntityGUI.hxx"
+
#include "GEOMGUI.h"
#include "SALOMEDSClient.hxx"
// class : EntityGUI
// purpose :
//=================================================================================
-class EntityGUI : public GEOMGUI
+class GEOM_ENTITYGUI_EXPORT EntityGUI : public GEOMGUI
{
public :
EntityGUI( GeometryGUI* parent ); // hide constructor to avoid direct creation
#ifndef ENTITYGUI_1SEL_QTD_H
#define ENTITYGUI_1SEL_QTD_H
+#include "GEOM_EntityGUI.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QLineEdit;
class QPushButton;
-class EntityGUI_1Sel_QTD : public QWidget
+class GEOM_ENTITYGUI_EXPORT EntityGUI_1Sel_QTD : public QWidget
{
Q_OBJECT
#ifndef ENTITYGUI_1SPIN_H
#define ENTITYGUI_1SPIN_H
+#include "GEOM_EntityGUI.hxx"
+
#include "EntityGUI_1Spin_QTD.h"
#include "DlgRef_SpinBox.h"
-class EntityGUI_1Spin : public EntityGUI_1Spin_QTD
+class GEOM_ENTITYGUI_EXPORT EntityGUI_1Spin : public EntityGUI_1Spin_QTD
{
Q_OBJECT
#ifndef ENTITYGUI_1SPIN_QTD_H
#define ENTITYGUI_1SPIN_QTD_H
+#include "GEOM_EntityGUI.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QSpinBox;
-class EntityGUI_1Spin_QTD : public QWidget
+class GEOM_ENTITYGUI_EXPORT EntityGUI_1Spin_QTD : public QWidget
{
Q_OBJECT
#ifndef ENTITYGUI_2SPIN_H
#define ENTITYGUI_2SPIN_H
+#include "GEOM_EntityGUI.hxx"
+
#include "EntityGUI_2Spin_QTD.h"
#include "DlgRef_SpinBox.h"
-class EntityGUI_2Spin : public EntityGUI_2Spin_QTD
+class GEOM_ENTITYGUI_EXPORT EntityGUI_2Spin : public EntityGUI_2Spin_QTD
{
Q_OBJECT
#ifndef ENTITYGUI_2SPIN_QTD_H
#define ENTITYGUI_2SPIN_QTD_H
+#include "GEOM_EntityGUI.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QSpinBox;
-class EntityGUI_2Spin_QTD : public QWidget
+class GEOM_ENTITYGUI_EXPORT EntityGUI_2Spin_QTD : public QWidget
{
Q_OBJECT
#ifndef ENTITYGUI_3SPIN_H
#define ENTITYGUI_3SPIN_H
+#include "GEOM_EntityGUI.hxx"
+
#include "EntityGUI_3Spin_QTD.h"
#include "DlgRef_SpinBox.h"
-class EntityGUI_3Spin : public EntityGUI_3Spin_QTD
+class GEOM_ENTITYGUI_EXPORT EntityGUI_3Spin : public EntityGUI_3Spin_QTD
{
Q_OBJECT
#ifndef ENTITYGUI_3SPIN_QTD_H
#define ENTITYGUI_3SPIN_QTD_H
+#include "GEOM_EntityGUI.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QSpinBox;
-class EntityGUI_3Spin_QTD : public QWidget
+class GEOM_ENTITYGUI_EXPORT EntityGUI_3Spin_QTD : public QWidget
{
Q_OBJECT
#ifndef ENTITYGUI_4SPIN_H
#define ENTITYGUI_4SPIN_H
+#include "GEOM_EntityGUI.hxx"
+
#include "EntityGUI_4Spin_QTD.h"
#include "DlgRef_SpinBox.h"
-class EntityGUI_4Spin : public EntityGUI_4Spin_QTD
+class GEOM_ENTITYGUI_EXPORT EntityGUI_4Spin : public EntityGUI_4Spin_QTD
{
Q_OBJECT
#ifndef ENTITYGUI_4SPIN_QTD_H
#define ENTITYGUI_4SPIN_QTD_H
+#include "GEOM_EntityGUI.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QSpinBox;
-class EntityGUI_4Spin_QTD : public QWidget
+class GEOM_ENTITYGUI_EXPORT EntityGUI_4Spin_QTD : public QWidget
{
Q_OBJECT
#ifndef ENTITYGUI_DIR1_QTD_H
#define ENTITYGUI_DIR1_QTD_H
+#include "GEOM_EntityGUI.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QButtonGroup;
class QRadioButton;
-class EntityGUI_Dir1_QTD : public QWidget
+class GEOM_ENTITYGUI_EXPORT EntityGUI_Dir1_QTD : public QWidget
{
Q_OBJECT
#ifndef ENTITYGUI_DIR2_QTD_H
#define ENTITYGUI_DIR2_QTD_H
+#include "GEOM_EntityGUI.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QButtonGroup;
class QRadioButton;
-class EntityGUI_Dir2_QTD : public QWidget
+class GEOM_ENTITYGUI_EXPORT EntityGUI_Dir2_QTD : public QWidget
{
Q_OBJECT
#ifndef ENTITYGUI_POINT_QTD_H
#define ENTITYGUI_POINT_QTD_H
+#include "GEOM_EntityGUI.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QButtonGroup;
class QRadioButton;
-class EntityGUI_Point_QTD : public QWidget
+class GEOM_ENTITYGUI_EXPORT EntityGUI_Point_QTD : public QWidget
{
Q_OBJECT
#ifndef ENTITYGUI_SKELETON_QTD_H
#define ENTITYGUI_SKELETON_QTD_H
+#include "GEOM_EntityGUI.hxx"
+
#include <qvariant.h>
#include <qdialog.h>
class QRadioButton;
class QPushButton;
-class EntityGUI_Skeleton_QTD : public QDialog
+class GEOM_ENTITYGUI_EXPORT EntityGUI_Skeleton_QTD : public QDialog
{
Q_OBJECT
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
// File : EntityGUI_SketcherDlg.cxx
// Author : Damien COQUERET
// Module : GEOM
-// $Header:
+// $Header$
#include "EntityGUI_SketcherDlg.h"
#include "Sketcher_Profile.hxx"
//=================================================================================
// class : EntityGUI_SketcherDlg()
-// purpose : Constructs a EntityGUI_SketcherDlg which is a child of 'parent', with the
+// purpose : Constructs a EntityGUI_SketcherDlg which is a child of 'parent', with the
// name 'name' and widget flags set to 'f'.
// The dialog will by default be modeless, unless you set 'modal' to
// TRUE to construct a modal dialog.
buttonClose->setText(tr("GEOM_BUT_CLOSE_SKETCH"));
buttonHelp->setText(tr("GEOM_BUT_HELP"));
- GroupVal->close(TRUE);
+ GroupVal->close(TRUE);
GroupDest2->close(TRUE);
GroupDest3->close(TRUE);
Group1Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
Group1Spin->buttonUndo->setPixmap(image1);
Group1Spin->buttonRedo->setPixmap(image2);
+ QWidget::setTabOrder(Group1Spin->SpinBox_DX , Group1Spin->buttonApply);
+ QWidget::setTabOrder(Group1Spin->buttonApply, Group1Spin->buttonUndo);
+ QWidget::setTabOrder(Group1Spin->buttonUndo , Group1Spin->buttonRedo);
Group2Spin = new EntityGUI_2Spin(this, "Group2Spin");
Group2Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES"));
Group2Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
Group2Spin->buttonUndo->setPixmap(image1);
Group2Spin->buttonRedo->setPixmap(image2);
+ QWidget::setTabOrder(Group2Spin->SpinBox_DX , Group2Spin->SpinBox_DY);
+ QWidget::setTabOrder(Group2Spin->SpinBox_DY , Group2Spin->buttonApply);
+ QWidget::setTabOrder(Group2Spin->buttonApply, Group2Spin->buttonUndo);
+ QWidget::setTabOrder(Group2Spin->buttonUndo , Group2Spin->buttonRedo);
Group3Spin = new EntityGUI_3Spin(this, "Group3Spin");
Group3Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES"));
Group3Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
Group3Spin->buttonUndo->setPixmap(image1);
Group3Spin->buttonRedo->setPixmap(image2);
+ QWidget::setTabOrder(Group3Spin->SpinBox_DX , Group3Spin->SpinBox_DY);
+ QWidget::setTabOrder(Group3Spin->SpinBox_DY , Group3Spin->SpinBox_DZ);
+ QWidget::setTabOrder(Group3Spin->SpinBox_DZ , Group3Spin->buttonApply);
+ QWidget::setTabOrder(Group3Spin->buttonApply, Group3Spin->buttonUndo);
+ QWidget::setTabOrder(Group3Spin->buttonUndo , Group3Spin->buttonRedo);
Group4Spin = new EntityGUI_4Spin(this, "Group4Spin");
Group4Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES"));
Group4Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
Group4Spin->buttonUndo->setPixmap(image1);
Group4Spin->buttonRedo->setPixmap(image2);
+ QWidget::setTabOrder(Group4Spin->SpinBox_DX , Group4Spin->SpinBox_DY);
+ QWidget::setTabOrder(Group4Spin->SpinBox_DY , Group4Spin->SpinBox_DZ);
+ QWidget::setTabOrder(Group4Spin->SpinBox_DZ , Group4Spin->SpinBox_DS);
+ QWidget::setTabOrder(Group4Spin->SpinBox_DS , Group4Spin->buttonApply);
+ QWidget::setTabOrder(Group4Spin->buttonApply, Group4Spin->buttonUndo);
+ QWidget::setTabOrder(Group4Spin->buttonUndo , Group4Spin->buttonRedo);
Layout5->addMultiCellWidget(GroupPt, 1, 1, 0, 1);
Layout5->addWidget(GroupD1, 1, 0);
connect(myGeometryGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(myGeometryGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
-
+
+ // install event filter on spin-boxes to provide Apply action on Return pressed
+ Group1Spin->SpinBox_DX->installEventFilter(this);
+ Group2Spin->SpinBox_DX->installEventFilter(this);
+ Group2Spin->SpinBox_DY->installEventFilter(this);
+ Group3Spin->SpinBox_DX->installEventFilter(this);
+ Group3Spin->SpinBox_DY->installEventFilter(this);
+ Group3Spin->SpinBox_DZ->installEventFilter(this);
+ Group4Spin->SpinBox_DX->installEventFilter(this);
+ Group4Spin->SpinBox_DY->installEventFilter(this);
+ Group4Spin->SpinBox_DZ->installEventFilter(this);
+ Group4Spin->SpinBox_DS->installEventFilter(this);
+
Init();
}
//=================================================================================
EntityGUI_SketcherDlg::~EntityGUI_SketcherDlg()
{
- myGeometryGUI->SetActiveDialogBox( 0 );
+ myGeometryGUI->SetActiveDialogBox( 0 );
+}
+
+
+//=================================================================================
+// function : eventFilter()
+// purpose : event filter for spin-boxes to provide Apply action on Return pressed
+//=================================================================================
+bool EntityGUI_SketcherDlg::eventFilter (QObject* object, QEvent* event)
+{
+ if (event->type() == QEvent::KeyPress) {
+ QKeyEvent* ke = (QKeyEvent*)event;
+ if (ke->key() == Key_Return) {
+ if (object == Group1Spin->SpinBox_DX) {
+ Group1Spin->buttonApply->animateClick();
+ return true;
+ } else if (object == Group2Spin->SpinBox_DX ||
+ object == Group2Spin->SpinBox_DY) {
+ Group2Spin->buttonApply->animateClick();
+ return true;
+ } else if (object == Group3Spin->SpinBox_DX ||
+ object == Group3Spin->SpinBox_DY ||
+ object == Group3Spin->SpinBox_DZ) {
+ Group3Spin->buttonApply->animateClick();
+ return true;
+ } else if (object == Group4Spin->SpinBox_DX ||
+ object == Group4Spin->SpinBox_DY ||
+ object == Group4Spin->SpinBox_DZ ||
+ object == Group4Spin->SpinBox_DS) {
+ Group4Spin->buttonApply->animateClick();
+ return true;
+ }
+ }
+ }
+
+ return EntityGUI_Skeleton_QTD::eventFilter(object, event);
}
//=================================================================================
void EntityGUI_SketcherDlg::InitClick()
{
- disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0);
+ disconnect(myGeometryGUI->getApp()->selectionMgr(), 0, this, 0);
Group1Sel->hide();
Group1Spin->hide();
{
InitClick();
+ // Get setting of step value from file configuration
+ double step = SUIT_Session::session()->resourceMgr()->doubleValue("Geometry", "SettingsGeomStep", 100.0);
+
if ( myConstructorId == 0 )
{ // SEGMENT
if ( constructorId == 1 )
{ // XY
mySketchType = PT_ABS;
- Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
+ Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X2"));
Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y2"));
myX = 0.0;
else if ( constructorId == 0 )
{ // DXDY
mySketchType = PT_RELATIVE;
- Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
+ Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_DX2"));
Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_DY2"));
myDX = 0.0;
{ // Selection
mySketchType = PT_SEL;
myEditCurrentArgument = Group1Sel->LineEdit1;
- connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
- SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
+ connect(myGeometryGUI->getApp()->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
Group1Sel->show();
Group1Sel->buttonApply->setFocus();
SelectionIntoArgument();
InitClick();
myAngle = 0.0;
+ // Get setting of step value from file configuration
+ double step = SUIT_Session::session()->resourceMgr()->doubleValue("Geometry", "SettingsGeomStep", 100.0);
+
if ( myConstructorId == 0 )
{ // SEGMENT
myX = 0.0;
if ( myConstructorDirId == 2 )
{ // Angle
Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2"));
Group2Spin->SpinBox_DX->SetValue(myAngle);
Group2Spin->buttonApply->setFocus();
Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y3"));
Group2Spin->SpinBox_DY->SetValue(myY);
}
- }
+ }
else if ( myConstructorDirId == 0 )
{ // Perpendicular
Group1Spin->show();
{ // DXDY
Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3);
Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3);
- Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
+ Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_VX2"));
Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_VY2"));
myDX = 0.0;
{ // Length
mySketchType = DIR_ANGLE_LENGTH;
Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
- Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
+ Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2"));
Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_RADIUS2"));
if ( constructorId == 2 )
{ // Length
mySketchType = DIR_PER_LENGTH;
- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2"));
Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2"));
if ( constructorId == 2 )
{ // Length
mySketchType = DIR_TAN_LENGTH;
- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2"));
Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2"));
tr( "GEOM_ERROR_STATUS" ), tr( "CANNOT_CLOSE" ), tr( "BUT_OK" ) );
return;
}
-
+
QString Command = myCommand.join( "" ) + GetNewCommand();
Sketcher_Profile aProfile (Command.ascii());
TopoDS_Shape myShape;
if ( aProfile.IsDone() )
myShape = aProfile.GetShape();
-
+
if(myShape.ShapeType() != TopAbs_VERTEX)
myCommand.append( ":WW" );
}
- else
+ else
myIsAllAdded = true;
if( myCommand.size() > 2 )
//=================================================================================
bool EntityGUI_SketcherDlg::ClickOnApply()
{
- ((QPushButton*)sender())->setFocus();
+ ((QPushButton*)sender())->setFocus(); // to update value of currently edited spin-box (PAL11948)
myCommand.append( GetNewCommand() );
mySketchState = NEXT_POINT;
GEOMBase_Helper::displayPreview();
+ // Set focus to SpinBox_DX
+ if (sender() == Group1Spin->buttonApply) {
+ (Group1Spin->SpinBox_DX)->setFocus();
+ (Group1Spin->SpinBox_DX)->selectAll();
+ }
+ else if (sender() == Group2Spin->buttonApply) {
+ (Group2Spin->SpinBox_DX)->setFocus();
+ (Group2Spin->SpinBox_DX)->selectAll();
+ }
+ else if (sender() == Group3Spin->buttonApply) {
+ (Group3Spin->SpinBox_DX)->setFocus();
+ (Group3Spin->SpinBox_DX)->selectAll();
+ }
+ else if (sender() == Group4Spin->buttonApply) {
+ (Group4Spin->SpinBox_DX)->setFocus();
+ (Group4Spin->SpinBox_DX)->selectAll();
+ }
+
return true;
}
void EntityGUI_SketcherDlg::ClickOnHelp()
{
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
- if (app)
+ if (app)
app->onHelpContextModule(myGeometryGUI ? app->moduleName(myGeometryGUI->moduleName()) : QString(""), myHelpFileName);
else {
+ QString platform;
+#ifdef WIN32
+ platform = "winapplication";
+#else
+ platform = "application";
+#endif
+
SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName),
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName),
QObject::tr("BUT_OK"));
}
}
if(myCommand.count() == 1) {
mySketchState = FIRST_POINT;
-
+
RadioButton1->setChecked(true);
TypeClicked(0);
setEnabled( false );
globalSelection();
- disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0);
+ disconnect(myGeometryGUI->getApp()->selectionMgr(), 0, this, 0);
myGeometryGUI->SetActiveDialogBox(0);
}
setEnabled(true);
myGeometryGUI->SetActiveDialogBox((QDialog*)this);
- connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
- SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
+ connect(myGeometryGUI->getApp()->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
//myGeometryGUI->SetState( 0 );
globalSelection( GEOM_POINT );
void EntityGUI_SketcherDlg::closeEvent(QCloseEvent* e)
{
//myGeometryGUI->SetState( -1 );
- disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0);
+ disconnect(myGeometryGUI->getApp()->selectionMgr(), 0, this, 0);
QDialog::closeEvent( e );
}
}
QString cmd;
- if( ( mySketchState != FIRST_POINT && myLastX1 == myLastX2 && myLastY1 == myLastY2 ) || myIsAllAdded ) {
+ if( ( mySketchState != FIRST_POINT &&
+ myLastX1 == myLastX2 && myLastY1 == myLastY2 ) || myIsAllAdded ) {
cmd = myCommand.join( "" );
if ( Group1Sel->isVisible() ) {
Group1Sel->buttonApply->setEnabled(false);
- Group1Sel->buttonApply->setFocus();
+ //Group1Sel->buttonApply->setFocus();
}
if ( Group1Spin->isVisible() ) {
Group1Spin->buttonApply->setEnabled(false);
- Group1Spin->buttonApply->setFocus();
+ //Group1Spin->buttonApply->setFocus();
}
if ( Group2Spin->isVisible() ) {
Group2Spin->buttonApply->setEnabled(false);
- Group2Spin->buttonApply->setFocus();
+ //Group2Spin->buttonApply->setFocus();
}
if ( Group3Spin->isVisible() ) {
Group3Spin->buttonApply->setEnabled(false);
- Group3Spin->buttonApply->setFocus();
+ //Group3Spin->buttonApply->setFocus();
}
if ( Group4Spin->isVisible() ) {
Group4Spin->buttonApply->setEnabled(false);
- Group4Spin->buttonApply->setFocus();
+ //Group4Spin->buttonApply->setFocus();
}
}
else {
if ( Group1Sel->isVisible() ) {
Group1Sel->buttonApply->setEnabled(true);
- Group1Sel->buttonApply->setFocus();
+ //Group1Sel->buttonApply->setFocus();
}
if ( Group1Spin->isVisible() ) {
Group1Spin->buttonApply->setEnabled(true);
- Group1Spin->buttonApply->setFocus();
+ //Group1Spin->buttonApply->setFocus();
}
if ( Group2Spin->isVisible() ) {
Group2Spin->buttonApply->setEnabled(true);
- Group2Spin->buttonApply->setFocus();
+ //Group2Spin->buttonApply->setFocus();
}
if ( Group3Spin->isVisible() ) {
Group3Spin->buttonApply->setEnabled(true);
- Group3Spin->buttonApply->setFocus();
+ //Group3Spin->buttonApply->setFocus();
}
if ( Group4Spin->isVisible() ) {
Group4Spin->buttonApply->setEnabled(true);
- Group4Spin->buttonApply->setFocus();
+ //Group4Spin->buttonApply->setFocus();
}
}
-
+
gp_Ax3 myWPlane = myGeometryGUI->GetWorkingPlane();
GEOM::ListOfDouble_var WPlane = new GEOM::ListOfDouble;
WPlane->length(9);
WPlane[7] = myWPlane.XDirection().Y();
WPlane[8] = myWPlane.XDirection().Z();
- GEOM::GEOM_Object_var anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeSketcher( cmd.latin1(), WPlane );
+ GEOM::GEOM_Object_var anObj =
+ GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeSketcher( cmd.latin1(), WPlane );
if ( !anObj->_is_nil() )
objects.push_back( anObj._retn() );
getDisplayer()->SetToActivate( activate );
// Make a reference to GEOM_Object
- getDisplayer()->SetName( myGeometryGUI->getApp()->orb()->object_to_string( object ) );
+ CORBA::String_var objStr = myGeometryGUI->getApp()->orb()->object_to_string( object );
+ getDisplayer()->SetName( objStr.in() );
// Create wire from applayed object
TopoDS_Shape anApplyedWire, aLastSegment;
ClickOnHelp();
}
}
-
-
-
-
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
#ifndef ENTITYGUI_SKETCHERDLG_H
#define ENTITYGUI_SKETCHERDLG_H
+#include "GEOM_EntityGUI.hxx"
+
#include "GEOMBase_Helper.h"
#include "EntityGUI_Skeleton_QTD.h"
// class : EntityGUI_Dlg
// purpose :
//=================================================================================
-class EntityGUI_SketcherDlg : public EntityGUI_Skeleton_QTD, public GEOMBase_Helper
+class GEOM_ENTITYGUI_EXPORT EntityGUI_SketcherDlg : public EntityGUI_Skeleton_QTD, public GEOMBase_Helper
{
Q_OBJECT
const char* name = 0, bool modal = FALSE, WFlags fl = 0);
~EntityGUI_SketcherDlg();
+ bool eventFilter (QObject* object, QEvent* event);
+
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool execute( ObjectList& objects );
void closeEvent( QCloseEvent* e );
- void keyPressEvent( QKeyEvent* e );
+ void keyPressEvent( QKeyEvent* e );
private :
void Init();
#ifndef DIALOGBOX_SUBSHAPE_H
#define DIALOGBOX_SUBSHAPE_H
+#include "GEOM_EntityGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel1Check1List_QTD.h"
// class : EntityGUI_SubShapeDlg
// purpose :
//=================================================================================
-class EntityGUI_SubShapeDlg : public GEOMBase_Skeleton
+class GEOM_ENTITYGUI_EXPORT EntityGUI_SubShapeDlg : public GEOMBase_Skeleton
{
Q_OBJECT
LIB = libEntityGUI.la
# header files
-EXPORT_HEADERS=
+EXPORT_HEADERS= GEOM_EntityGUI.hxx
LIB_SRC = EntityGUI.cxx \
EntityGUI_Skeleton_QTD.cxx \
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <GEOM_Function.hxx>
#include <GEOM_Object.hxx>
#include <GEOM_Solver.hxx>
+#include <GEOM_ISubShape.hxx>
#include "utilities.h"
TopoDS_Shape aShape;
TDF_Label aLabel = GetOwnerEntry();
- if(aLabel.IsRoot()) return aShape;
+ if (aLabel.IsRoot()) return aShape;
Handle(GEOM_Object) anObject = GEOM_Object::GetObject(aLabel);
- if(anObject.IsNull()) return aShape;
- if(!anObject->IsMainShape()) {
- try {
+ if (anObject.IsNull()) return aShape;
+
+ if (!anObject->IsMainShape()) {
+ bool isResult = false;
+ TDF_Label aResultLabel = _label.FindChild(RESULT_LABEL);
+ if (!aResultLabel.IsNull()) {
+ Handle(TNaming_NamedShape) aNS;
+ if (aResultLabel.FindAttribute(TNaming_NamedShape::GetID(), aNS))
+ isResult = true;
+ }
+
+ // compare tics
+ if (isResult) {
+ // tic of this
+ Standard_Integer aTic = anObject->GetTic();
+
+ // tic of main shape
+ GEOM_ISubShape aCI (this);
+ TDF_Label aLabelObjMainSh = aCI.GetMainShape()->GetOwnerEntry();
+ if (aLabelObjMainSh.IsRoot()) return aShape;
+ Handle(GEOM_Object) anObjMainSh = GEOM_Object::GetObject(aLabelObjMainSh);
+ if (anObjMainSh.IsNull()) return aShape;
+ Standard_Integer aTicMainSh = anObjMainSh->GetTic();
+
+ // compare
+ isResult = ((aTic == aTicMainSh) ? true : false);
+ }
+
+ if (!isResult) {
+ try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
- OCC_CATCH_SIGNALS;
+ OCC_CATCH_SIGNALS;
#endif
- GEOM_Solver aSolver(GEOM_Engine::GetEngine());
- if (!aSolver.ComputeFunction(this)) {
- MESSAGE("GEOM_Object::GetValue Error : Can't build a sub shape");
- return aShape;
+ GEOM_Solver aSolver(GEOM_Engine::GetEngine());
+ if (!aSolver.ComputeFunction(this)) {
+ MESSAGE("GEOM_Object::GetValue Error : Can't build a sub shape");
+ return aShape;
+ }
+ }
+ catch (Standard_Failure) {
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+ MESSAGE("GEOM_Function::GetValue Error: " << aFail->GetMessageString());
+ return aShape;
}
- }
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- MESSAGE("GEOM_Function::GetValue Error: " << aFail->GetMessageString());
- return aShape;
}
}
TDF_Label aResultLabel = _label.FindChild(RESULT_LABEL);
Handle(TNaming_NamedShape) aNS;
- if(!aResultLabel.FindAttribute(TNaming_NamedShape::GetID(), aNS)) return aShape;
+ if (!aResultLabel.FindAttribute(TNaming_NamedShape::GetID(), aNS)) return aShape;
aShape = aNS->Get();
//=============================================================================
/*!
- * GetValue
+ * SetValue
*/
//=============================================================================
void GEOM_Function::SetValue(TopoDS_Shape& theShape)
aBuilder.Generated(theShape);
+ // synchronisation between main shape and its sub-shapes
+ TDF_Label aLabel = GetOwnerEntry();
+ if (aLabel.IsRoot()) return;
+ Handle(GEOM_Object) anObject = GEOM_Object::GetObject(aLabel);
+ if (anObject.IsNull()) return;
+ if (anObject->IsMainShape()) {
+ // increase modifications counter of this (main) shape
+ anObject->IncrementTic();
+ }
+ else {
+ // update modifications counter of this (sub-) shape to be the same as on main shape
+ GEOM_ISubShape aCI (this);
+ TDF_Label aLabelObjMainSh = aCI.GetMainShape()->GetOwnerEntry();
+ if (aLabelObjMainSh.IsRoot()) return;
+ Handle(GEOM_Object) anObjMainSh = GEOM_Object::GetObject(aLabelObjMainSh);
+ if (anObjMainSh.IsNull()) return;
+
+ anObject->SetTic(anObjMainSh->GetTic());
+ }
+
_isDone = true;
}
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopExp.hxx>
-#define TYPE 2
#define FUNCTION_LABEL(theNb) (_label.FindChild(1).FindChild((theNb)))
+#define TYPE_LABEL 2
#define FREE_LABEL 3
+#define TIC_LABEL 4
//=======================================================================
//function : GetObjectID
{
static Standard_GUID anObjectID("FF1BBB01-5D14-4df2-980B-3A668264EA16");
return anObjectID;
-}
+}
//=======================================================================
//function : GetSubShapeID
static Standard_GUID anObjectID("FF1BBB68-5D14-4df2-980B-3A668264EA16");
return anObjectID;
}
-
+
//=============================================================================
/*!
* GetObject
Handle(TDataStd_Integer) anID;
if(!aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) return NULL;
-
+
GEOM_Engine* anEngine= GEOM_Engine::GetEngine();
if(anEngine == NULL) return NULL;
// Get label of the referenced object
TDF_Label aLabel = aFather->Label();
-
+
return GEOM_Object::GetObject(aLabel);
}
*/
//=============================================================================
GEOM_Object::GEOM_Object(TDF_Label& theEntry)
-: _label(theEntry), _ior("")
+: _label(theEntry), _ior("")
{
- if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
+ if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
_root = TDataStd_TreeNode::Set(theEntry);
}
*/
//=============================================================================
GEOM_Object::GEOM_Object(TDF_Label& theEntry, int theType)
-: _label(theEntry), _ior("")
+: _label(theEntry), _ior("")
{
theEntry.ForgetAllAttributes(Standard_True);
- if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
+ if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
_root = TDataStd_TreeNode::Set(theEntry);
- TDataStd_Integer::Set(theEntry.FindChild(TYPE), theType);
+ TDataStd_Integer::Set(theEntry.FindChild(TYPE_LABEL), theType);
TDataStd_UAttribute::Set(theEntry, GetObjectID());
}
int GEOM_Object::GetType()
{
Handle(TDataStd_Integer) aType;
- if(!_label.FindChild(TYPE).FindAttribute(TDataStd_Integer::GetID(), aType)) return -1;
-
+ if(!_label.FindChild(TYPE_LABEL).FindAttribute(TDataStd_Integer::GetID(), aType)) return -1;
+
return aType->Get();
}
//=============================================================================
void GEOM_Object::SetType(int theType)
{
- TDataStd_Integer::Set(_label.FindChild(TYPE), theType);
- return;
+ TDataStd_Integer::Set(_label.FindChild(TYPE_LABEL), theType);
+}
+
+
+//=============================================================================
+/*!
+ * Returns modifications counter of this object.
+ * Comparing this value with modifications counters of argument objects
+ * (on which this object depends) we decide whether this object needs to be updated.
+ */
+//=============================================================================
+int GEOM_Object::GetTic()
+{
+ Handle(TDataStd_Integer) aTicAttr;
+ if (!_label.FindChild(TIC_LABEL).FindAttribute(TDataStd_Integer::GetID(), aTicAttr))
+ return 0;
+
+ return aTicAttr->Get();
+}
+
+//=============================================================================
+/*!
+ * Set another value of modifications counter.
+ *
+ * Use this method to update modifications counter of dependent object
+ * to be equal to modifications counter of its argument.
+ * This is commonly done in GEOM_Function::GetValue()
+ */
+//=============================================================================
+void GEOM_Object::SetTic(int theTic)
+{
+ TDataStd_Integer::Set(_label.FindChild(TIC_LABEL), theTic);
+}
+
+//=============================================================================
+/*!
+ * Increment modifications counter to mark this object as modified.
+ *
+ * Commonly called from GEOM_Function::SetValue()
+ */
+//=============================================================================
+void GEOM_Object::IncrementTic()
+{
+ TDF_Label aTicLabel = _label.FindChild(TIC_LABEL);
+
+ Standard_Integer aTic = 0;
+ Handle(TDataStd_Integer) aTicAttr;
+ if (aTicLabel.FindAttribute(TDataStd_Integer::GetID(), aTicAttr))
+ aTic = aTicAttr->Get();
+
+ TDataStd_Integer::Set(aTicLabel, aTic + 1);
}
Handle(TDataStd_Integer) anID;
if(!aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) return -1;
-
+
return anID->Get();
}
if (!aFunction.IsNull())
aShape = aFunction->GetValue();
-
+
return aShape;
}
{
Handle(TDataStd_Name) aNameAttr;
if(!_label.FindAttribute(TDataStd_Name::GetID(), aNameAttr)) return NULL;
-
+
TCollection_AsciiString aName(aNameAttr->Get());
- return aName.ToCString();
+ // do not return pointer of local variable
+ // return aName.ToCString();
+ // the following code could lead to memory leak, so take care about recieved pointer
+ return strdup(aName.ToCString());
}
//=============================================================================
/*!
* IsSubShape
*/
-//=============================================================================
+//=============================================================================
bool GEOM_Object::IsMainShape()
{
Handle(GEOM_Function) aFunction = GetFunction(1);
{
Standard_Integer nb = GetNbFunctions();
if(nb) return GetFunction(nb);
-
+
return NULL;
}
}
Standard_Integer aLength = aSeq.Length();
- if(aLength > 0) {
+ if(aLength > 0) {
anArray = new TColStd_HSequenceOfTransient;
for(Standard_Integer j =1; j<=aLength; j++)
anArray->Append(GetReferencedObject(aSeq(j)));
}
-
+
return anArray;
}
//=======================================================================
//function : GEOM_Object_Type_
//purpose :
-//=======================================================================
+//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOM_Object_Type_()
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared);
+ if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);
-
+
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
static Handle_Standard_Type _aType = new Standard_Type("GEOM_Object",
//=======================================================================
//function : DownCast
//purpose :
-//=======================================================================
+//=======================================================================
const Handle(GEOM_Object) Handle(GEOM_Object)::DownCast(const Handle(Standard_Transient)& AnObject)
{
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#endif
#ifndef _Handle_MMgt_TShared_HeaderFile
#include <Handle_MMgt_TShared.hxx>
-#endif
+#endif
#ifndef _MMgt_TShared_HeaderFile
#include <MMgt_TShared.hxx>
-#endif
+#endif
#ifndef _Standard_GUID_HeaderFile
#include <Standard_GUID.hxx>
#endif
class Handle(GEOM_Object) : public Handle(MMgt_TShared) {
public:
- inline void* operator new(size_t,void* anAddress)
+ inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
+ inline void* operator new(size_t size)
+ {
+ return Standard::Allocate(size);
}
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
+ inline void operator delete(void *anAddress)
+ {
+ if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
- Handle(GEOM_Object)():Handle(MMgt_TShared)() {}
- Handle(GEOM_Object)(const Handle(GEOM_Object)& aHandle) : Handle(MMgt_TShared)(aHandle)
+ Handle(GEOM_Object)():Handle(MMgt_TShared)() {}
+ Handle(GEOM_Object)(const Handle(GEOM_Object)& aHandle) : Handle(MMgt_TShared)(aHandle)
{
}
- Handle(GEOM_Object)(const GEOM_Object* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem)
+ Handle(GEOM_Object)(const GEOM_Object* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem)
{
}
return *this;
}
- GEOM_Object* operator->()
+ GEOM_Object* operator->()
{
return (GEOM_Object *)ControlAccess();
}
- GEOM_Object* operator->() const
+ GEOM_Object* operator->() const
{
return (GEOM_Object *)ControlAccess();
}
Standard_EXPORT ~Handle(GEOM_Object)() {};
-
+
Standard_EXPORT static const Handle(GEOM_Object) DownCast(const Handle(Standard_Transient)& AnObject);
};
-
#include <Standard_GUID.hxx>
#include <TDataStd_TreeNode.hxx>
#include "GEOM_Function.hxx"
#include "GEOM_Engine.hxx"
-
class GEOM_Object : public MMgt_TShared
{
- friend class GEOM_Engine;
+ friend class GEOM_Engine;
public:
- inline void* operator new(size_t,void* anAddress)
+ inline void* operator new(size_t,void* anAddress)
{
return anAddress;
}
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
+ inline void* operator new(size_t size)
+ {
+ return Standard::Allocate(size);
}
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
+ inline void operator delete(void *anAddress)
+ {
+ if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
-
+
// Type management
//
Standard_EXPORT friend Handle_Standard_Type& GEOM_Object_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOM_Object) ; }
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOM_Object) == AType || MMgt_TShared::IsKind(AType)); }
+ Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const
+ { return (STANDARD_TYPE(GEOM_Object) == AType || MMgt_TShared::IsKind(AType)); }
private:
- GEOM_Object(TDF_Label& theLabel);
+ GEOM_Object(TDF_Label& theLabel);
public:
Standard_EXPORT GEOM_Object(TDF_Label& theEntry, int theType);
Standard_EXPORT static const Standard_GUID& GetSubShapeID();
//###########################################################
- //Access to properties
+ //Access to properties
//###########################################################
//Returns a TreeNode that presents a root of a function tree for this GEOM_Object
- Standard_EXPORT Handle(TDataStd_TreeNode) GetRootNode() { return _root; }
-
+ Standard_EXPORT Handle(TDataStd_TreeNode) GetRootNode() { return _root; }
+
//Returns a label of this GEOM_Object
Standard_EXPORT TDF_Label GetEntry() { return _label; }
-
+
//Returns a type of this GEOM_Object (GEOM_POINT, GEOM_VECTOR...)
- Standard_EXPORT int GetType();
+ Standard_EXPORT int GetType();
//Sets the type of this GEOM_Object
Standard_EXPORT void SetType(int theType);
-
+
+ //Modifications counter management
+ Standard_EXPORT int GetTic();
+ Standard_EXPORT void SetTic(int theTic);
+ Standard_EXPORT void IncrementTic();
+
//Returns an ID of the OCAF document where this GEOM_Object is stored
- Standard_EXPORT int GetDocID();
+ Standard_EXPORT int GetDocID();
- //Returns a value (as TopoDS_Shape) of this GEOM_Object
+ //Returns a value (as TopoDS_Shape) of this GEOM_Object
Standard_EXPORT TopoDS_Shape GetValue();
//Sets a name of this GEOM_Object
//Returns an auxiliary data
Standard_EXPORT TCollection_AsciiString GetAuxData();
- //###########################################################
+ //###########################################################
// Sub shape methods
//###########################################################
-
+
//Returns false if the object is a sub shape of another object
Standard_EXPORT bool IsMainShape();
- //###########################################################
- // CORBA related methods
- //###########################################################
-
- //Sets an IOR of CORBA GEOM_Object_i which refers to this object
- Standard_EXPORT void SetIOR(TCollection_AsciiString& theIOR) { _ior = theIOR; }
+ //###########################################################
+ // CORBA related methods
+ //###########################################################
+
+ //Sets an IOR of CORBA GEOM_Object_i which refers to this object
+ Standard_EXPORT void SetIOR(TCollection_AsciiString& theIOR) { _ior = theIOR; }
- //Returns an IOR of CORBA GEOM_Object_i which refers to this object
- Standard_EXPORT TCollection_AsciiString GetIOR() { return _ior; }
+ //Returns an IOR of CORBA GEOM_Object_i which refers to this object
+ Standard_EXPORT TCollection_AsciiString GetIOR() { return _ior; }
//###########################################################
//Functions methods
//###########################################################
- //Adds a function with a driver GUID = theGUID and a type theFunctionType to the function tree of this GEOM_Object
+ //Adds a function with a driver GUID = theGUID and a type theFunctionType
+ //to the function tree of this GEOM_Object
Standard_EXPORT Handle(GEOM_Function) AddFunction(const Standard_GUID& theGUID, int theFunctionType);
-
+
//Returns a number of functions of this GEOM_Object
- Standard_EXPORT int GetNbFunctions();
-
+ Standard_EXPORT int GetNbFunctions();
+
//Returns a function with given number theFunctionNumber
Standard_EXPORT Handle(GEOM_Function) GetFunction(int theFunctionNumber);
-
+
//Return the last function of this GEOM_Object
Standard_EXPORT Handle(GEOM_Function) GetLastFunction();
//Returns the dependencies of the last function
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetLastDependency();
- //###########################################################
- // Internal methods
- //###########################################################
+ //###########################################################
+ // Internal methods
+ //###########################################################
- //Returns a label which could be used to store some additional data
- Standard_EXPORT TDF_Label GetFreeLabel();
-
+ //Returns a label which could be used to store some additional data
+ Standard_EXPORT TDF_Label GetFreeLabel();
private:
-
Handle(TDataStd_TreeNode) _root;
- TDF_Label _label;
- TCollection_AsciiString _ior;
+ TDF_Label _label;
+ TCollection_AsciiString _ior;
};
#endif
/*! Returns an object from two given, which has the latest entry
*/
- Handle(GEOM_Object) GetCreatedLast (const Handle(GEOM_Object)& theObj1,
+ Standard_EXPORT Handle(GEOM_Object) GetCreatedLast (const Handle(GEOM_Object)& theObj1,
const Handle(GEOM_Object)& theObj2);
/*! Returns an object from \a theObjects, which has the latest entry
*/
- Handle(GEOM_Object) GetCreatedLast (const Handle(TColStd_HSequenceOfTransient)& theObjects);
+ Standard_EXPORT Handle(GEOM_Object) GetCreatedLast (const Handle(TColStd_HSequenceOfTransient)& theObjects);
}
#endif
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo.cdl
-- Created: Sat Dec 04 12:36:22 2004
-- Author: Peter KURNEV
-- <peter@PREFEX>
----Copyright: Matra Datavision 2004
-
package GEOMAlgo
uses
TCollection,
- TColStd,
+
+ TColgp,
Geom,
Bnd,
gp,
TopTools,
IntTools,
BOPTools,
- BOP
+ BOP,
+
+ TColStd,
+ BOPTColStd,
+ BRepAlgo,
+ NMTDS,
+ NMTTools
is
- -- enumerations
+ --
+ -- enumerations
--
enumeration State is
ST_UNKNOWN,
ST_ONIN,
ST_ONOUT,
ST_INOUT
- end State;
+ end State;
+ --
+ deferred class HAlgo;
+ deferred class Clsf;
+ class ClsfSurf;
+ class ClsfBox;
+ class FinderShapeOn2;
+ class PassKeyShapeMapHasher;
--
-- classes
- --
- deferred class Algo;
- deferred class ShapeAlgo;
+ --
+ deferred class Algo;
+ deferred class ShapeAlgo;
--
-- gluer
class Gluer;
class PassKey;
class PassKeyMapHasher;
class PassKeyShape;
+
class SurfaceTools;
class Tools;
-
--
-- finder on
deferred class ShapeSolid;
class FinderShapeOn;
--
class FinderShapeOn1;
- class StateCollector;
+ class StateCollector;
+
+ --
+ -- Builder/Splitter
+ deferred class BuilderShape;
+
+ class Builder;
+ class Splitter;
+ class Tools3D;
+ class BuilderTools;
+ class ShapeSet;
+
+ deferred class BuilderArea;
+ class BuilderFace;
+ class BuilderSolid;
+
+ class WireSplitter;
+ class WireEdgeSet;
+ class WESCorrector;
+ --
+ -- Pointers
+ --
+ pointer PWireEdgeSet to WireEdgeSet from GEOMAlgo;
+ --
+ --
+ -- Instantiations
+ class DataMapOfShapeShapeSet instantiates
+ DataMap from TCollection(Shape from TopoDS,
+ ShapeSet from GEOMAlgo,
+ ShapeMapHasher from TopTools);
+
+ class DataMapOfShapeReal instantiates
+ DataMap from TCollection(Shape from TopoDS,
+ Real from Standard,
+ ShapeMapHasher from TopTools);
+
+
+ class DataMapOfRealListOfShape instantiates
+ DataMap from TCollection(Real from Standard,
+ ListOfShape from TopTools,
+ MapRealHasher from TColStd);
--
-- instantiations
- class IndexedDataMapOfPassKeyShapeListOfShape
- instantiates IndexedDataMap from TCollection (PassKeyShape from GEOMAlgo,
- ListOfShape from TopTools,
- PassKeyMapHasher from GEOMAlgo);
+
class IndexedDataMapOfShapeBox
instantiates IndexedDataMap from TCollection (Shape from TopoDS,
instantiates IndexedDataMap from TCollection (Shape from TopoDS,
State from TopAbs,
ShapeMapHasher from TopTools);
---
class ListOfPnt
instantiates List from TCollection (Pnt from gp);
--- class IndexedDataMapOfPassKeyInteger
--- instantiates IndexedDataMap from TCollection (PassKeyRoot from GEOMAlgo,
--- Integer from Standard,
--- PassKeyMapHasher from GEOMAlgo);
-
-
class DataMapOfPassKeyInteger
instantiates DataMap from TCollection (PassKey from GEOMAlgo,
Integer from Standard,
- PassKeyMapHasher from GEOMAlgo);
-
+ PassKeyMapHasher from GEOMAlgo);
+
+ class IndexedDataMapOfPassKeyShapeListOfShape
+ instantiates IndexedDataMap from TCollection (PassKeyShape from GEOMAlgo,
+ ListOfShape from TopTools,
+ PassKeyShapeMapHasher from GEOMAlgo);
end GEOMAlgo;
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_Algo.cdl
-- Created: Sat Dec 04 12:37:56 2004
-- Author: Peter KURNEV
-- <peter@PREFEX>
----Copyright: Matra Datavision 2004
deferred class Algo from GEOMAlgo
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_Algo {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT virtual void Perform() = 0;
+
+
Standard_EXPORT Standard_Integer ErrorStatus() const;
+
+
Standard_EXPORT Standard_Integer WarningStatus() const;
// Methods PROTECTED
//
+
+
Standard_EXPORT GEOMAlgo_Algo();
Standard_EXPORT virtual ~GEOMAlgo_Algo();
+
+
Standard_EXPORT virtual void CheckData() ;
+
+
Standard_EXPORT virtual void CheckResult() ;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _GEOMAlgo_Algo_HeaderFile
#include <GEOMAlgo_Algo.hxx>
#endif
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_CoupleOfShapes.cdl
-- Created: Wed Dec 15 13:00:10 2004
-- Author: Peter KURNEV
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_CoupleOfShapes {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_CoupleOfShapes();
+
+
Standard_EXPORT void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ;
+
+
Standard_EXPORT void SetShape1(const TopoDS_Shape& aS1) ;
+
+
Standard_EXPORT void SetShape2(const TopoDS_Shape& aS2) ;
+
+
Standard_EXPORT void Shapes(TopoDS_Shape& aS1,TopoDS_Shape& aS2) const;
+
+
Standard_EXPORT const TopoDS_Shape& Shape1() const;
+
+
Standard_EXPORT const TopoDS_Shape& Shape2() const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger : public TCollection_BasicMapIterator {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger();
+
+
Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger(const GEOMAlgo_DataMapOfPassKeyInteger& aMap);
+
+
Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfPassKeyInteger& aMap) ;
+
+
Standard_EXPORT const GEOMAlgo_PassKey& Key() const;
+
+
Standard_EXPORT const Standard_Integer& Value() const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger;
+
class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger : public TCollection_MapNode {
public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
// Methods PUBLIC
//
+
GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger(const GEOMAlgo_PassKey& K,const Standard_Integer& I,const TCollection_MapNodePtr& n);
+
GEOMAlgo_PassKey& Key() const;
+
Standard_Integer& Value() const;
-Standard_EXPORT ~GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger();
+//Standard_EXPORT ~GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger();
// Type management
//
- Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile
#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
#endif
-GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::~GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger() {}
+//GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::~GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger() {}
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
{
return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) ;
}
-Standard_Boolean GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::~Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger() {}
+//Standard_Boolean GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) == AType || TCollection_MapNode::IsKind(AType));
+//}
+//Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::~Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger() {}
#define TheKey GEOMAlgo_PassKey
#define TheKey_hxx <GEOMAlgo_PassKey.hxx>
#define TheItem Standard_Integer
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_DataMapOfPassKeyInteger : public TCollection_BasicMap {
public:
}
// 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)
{
// Methods PRIVATE
//
+
+
Standard_EXPORT GEOMAlgo_DataMapOfPassKeyInteger(const GEOMAlgo_DataMapOfPassKeyInteger& Other);
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_FinderShapeOn.cdl
-- Created: Tue Jan 11 14:35:52 2005
-- Author: Peter KURNEV
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_FinderShapeOn : public GEOMAlgo_ShapeAlgo {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_FinderShapeOn();
Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn();
+
+
Standard_EXPORT virtual void Perform() ;
+
+
Standard_EXPORT void SetSurface(const Handle(Geom_Surface)& aS) ;
+
+
Standard_EXPORT void SetShapeType(const TopAbs_ShapeEnum aST) ;
+
+
Standard_EXPORT void SetState(const GEOMAlgo_State aSF) ;
+
+
Standard_EXPORT const Handle_Geom_Surface& Surface() const;
+
+
Standard_EXPORT TopAbs_ShapeEnum ShapeType() const;
+
+
Standard_EXPORT GEOMAlgo_State State() const;
+
+
Standard_EXPORT const TopTools_ListOfShape& Shapes() const;
+
+
Standard_EXPORT static void CopySource(const TopoDS_Shape& aS,TopTools_DataMapOfShapeShape& aImages,TopTools_DataMapOfShapeShape& aOriginals,TopoDS_Shape& aSC) ;
// Methods PROTECTED
//
+
+
Standard_EXPORT virtual void CheckData() ;
+
+
Standard_EXPORT void MakeArgument1() ;
+
+
Standard_EXPORT void MakeArgument2() ;
+
+
Standard_EXPORT void Find() ;
+
+
Standard_EXPORT void Find(const TopoDS_Shape& aS) ;
+
+
Standard_EXPORT void FindVertices() ;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _Geom_Surface_HeaderFile
#include <Geom_Surface.hxx>
#endif
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_FinderShapeOn1.cdl
-- Created: Fri Mar 4 10:26:54 2005
-- Author: Peter KURNEV
---Purpose:
-uses
+uses
+ Pnt from gp,--
Surface from Geom,
Surface from GeomAdaptor,
#include <BRepLib_MakeEdge.hxx>
#include <GEOMAlgo_ListIteratorOfListOfPnt.hxx>
-#include <GEOMAlgo_PassKey.hxx>
-#include <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
-#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
+
#include <GEOMAlgo_SurfaceTools.hxx>
#include <GEOMAlgo_StateCollector.hxx>
+#include <GEOMAlgo_PassKey.hxx>
+#include <GEOMAlgo_DataMapOfPassKeyInteger.hxx>
+#include <GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx>
//=======================================================================
//function : GEOMAlgo_FinderShapeOn1
{
myErrorStatus=0;
//
- Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNbMax, aNb;
- Standard_Integer iCnt, *pIds;
+ Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNb, iCnt;//, aNbMax, *pIds;
TopLoc_Location aLoc;
Handle(Poly_Triangulation) aTRF;
TColStd_MapOfInteger aMBN;
iCnt=aIt.Value();
if (iCnt==1) {
const GEOMAlgo_PassKey& aPK=aIt.Key();
+ //qf
+ /*
aNbMax=aPK.NbMax();
pIds=(Standard_Integer*)aPK.Key();
for (k=1; k<3; ++k) {
aNx=*(pIds+aNbMax-k);
aMBN.Add(aNx);
}
+ */
+ aNx=(Standard_Integer)aPK.Id(1);
+ aMBN.Add(aNx);
+ aNx=(Standard_Integer)aPK.Id(2);
+ aMBN.Add(aNx);
+ //qt
}
}
//
// take the first having occured inner link
// and discretize it
const GEOMAlgo_PassKey& aPK=aIt.Key();
+ //qf
+ /*
aNbMax=aPK.NbMax();
pIds=(Standard_Integer*)aPK.Key();
aN1=*(pIds+aNbMax-1);
aN2=*(pIds+aNbMax-2);
+ */
+ //
+ aN1=(Standard_Integer)aPK.Id(1);
+ aN2=(Standard_Integer)aPK.Id(2);
+ //qt
aP1=aNodes(aN1).Transformed(aTrsf);
aP2=aNodes(aN2).Transformed(aTrsf);
//
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
#include <GEOMAlgo_ShapeAlgo.hxx>
#endif
+#ifndef _TopAbs_State_HeaderFile
+#include <TopAbs_State.hxx>
+#endif
class Geom_Surface;
class TopTools_ListOfShape;
class TopoDS_Face;
class GEOMAlgo_ListOfPnt;
class TopoDS_Edge;
class GEOMAlgo_IndexedDataMapOfShapeState;
+class gp_Pnt;
#ifndef _Standard_HeaderFile
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_FinderShapeOn1 : public GEOMAlgo_ShapeAlgo {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_FinderShapeOn1();
Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn1();
+
+
Standard_EXPORT void SetSurface(const Handle(Geom_Surface)& aS) ;
+
+
Standard_EXPORT void SetShapeType(const TopAbs_ShapeEnum aST) ;
+
+
Standard_EXPORT void SetState(const GEOMAlgo_State aSF) ;
+
+
Standard_EXPORT void SetNbPntsMin(const Standard_Integer aNb) ;
+
+
Standard_EXPORT Standard_Integer NbPntsMin() const;
+
+
Standard_EXPORT void SetNbPntsMax(const Standard_Integer aNb) ;
+
+
Standard_EXPORT Standard_Integer NbPntsMax() const;
+
+
Standard_EXPORT const Handle_Geom_Surface& Surface() const;
+
+
Standard_EXPORT TopAbs_ShapeEnum ShapeType() const;
+
+
Standard_EXPORT GEOMAlgo_State State() const;
+
+
Standard_EXPORT virtual void Perform() ;
+
+
Standard_EXPORT const TopTools_ListOfShape& Shapes() const;
+
+
Standard_EXPORT const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const;
// Methods PROTECTED
//
+
+
Standard_EXPORT virtual void CheckData() ;
+
+
Standard_EXPORT void ProcessVertices() ;
+
+
Standard_EXPORT void ProcessEdges() ;
+
+
Standard_EXPORT void ProcessFaces() ;
+
+
Standard_EXPORT void ProcessSolids() ;
+
+
Standard_EXPORT void InnerPoints(const TopoDS_Face& aF,GEOMAlgo_ListOfPnt& aLP) ;
+
+
Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,GEOMAlgo_ListOfPnt& aLP) ;
+
+
Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,const Standard_Integer aNbPnts,GEOMAlgo_ListOfPnt& aLP) ;
-Standard_EXPORT virtual TopAbs_State GetPointState(const gp_Pnt& aP) ;
+
+
+Standard_EXPORT virtual TopAbs_State GetPointState(const gp_Pnt& aP) ;
// Fields PROTECTED
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _Geom_Surface_HeaderFile
#include <Geom_Surface.hxx>
#endif
#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
#endif
+#ifndef _gp_Pnt_HeaderFile
+#include <gp_Pnt.hxx>
+#endif
#ifndef _GEOMAlgo_FinderShapeOn1_HeaderFile
#include <GEOMAlgo_FinderShapeOn1.hxx>
#endif
{
public:
+ Standard_EXPORT
GEOMAlgo_FinderShapeOnQuad(const gp_Pnt & theTopLeftPoint,
const gp_Pnt & theTopRigthPoint,
const gp_Pnt & theBottomLeftPoint,
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_GlueAnalyser.cdl
-- Created: Wed Dec 15 11:03:03 2004
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright: Matra Datavision 2004
class GlueAnalyser from GEOMAlgo
for (i=1; i<=aNbF; ++i) {
const TopoDS_Shape& aS=aMF(i);
//
- aPKF.Clear();
+ //aPKF.Clear();//qft
if (aType==TopAbs_FACE) {
const TopoDS_Face& aF=TopoDS::Face(aS);
FacePassKey(aF, aPKF);
TopTools_IndexedDataMapOfShapeListOfShape aMFS;
TopTools_IndexedMapOfShape aMx, aMS;
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
+ GEOMAlgo_CoupleOfShapes aCS;
+ //
GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLS;
GEOMAlgo_PassKeyShape aPKSx;
- GEOMAlgo_CoupleOfShapes aCS;
//
aBB.MakeCompound(aCmp);
//
continue;
}
//
- aPKSx.Clear();
- aPKSx.SetIds(aSx[0], aSx[1]);
+ //aPKSx.Clear();//qft
+ //qf
+ //aPKSx.SetIds(aSx[0], aSx[1]);
+ aPKSx.SetShapes(aSx[0], aSx[1]);
+ //qt
//
if (!aMPKLS.Contains(aPKSx)) {
TopTools_ListOfShape aLSx;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_GlueAnalyser : public GEOMAlgo_Gluer {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_GlueAnalyser();
Standard_EXPORT virtual ~GEOMAlgo_GlueAnalyser();
+
+
Standard_EXPORT virtual void Perform() ;
+
+
Standard_EXPORT Standard_Boolean HasSolidsToGlue() const;
+
+
Standard_EXPORT const GEOMAlgo_ListOfCoupleOfShapes& SolidsToGlue() const;
+
+
Standard_EXPORT Standard_Boolean HasSolidsAlone() const;
+
+
Standard_EXPORT const TopTools_ListOfShape& SolidsAlone() const;
// Methods PROTECTED
//
+
+
Standard_EXPORT void DetectVertices() ;
+
+
Standard_EXPORT void DetectEdges() ;
+
+
Standard_EXPORT void DetectFaces() ;
+
+
Standard_EXPORT void DetectShapes(const TopAbs_ShapeEnum aType) ;
+
+
Standard_EXPORT void DetectSolids() ;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _GEOMAlgo_ListOfCoupleOfShapes_HeaderFile
#include <GEOMAlgo_ListOfCoupleOfShapes.hxx>
#endif
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_Gluer.cdl
-- Created: Sat Dec 04 12:41:32 2004
-- Author: Peter KURNEV
-- <peter@PREFEX>
----Copyright: Matra Datavision 2004
class Gluer from GEOMAlgo
EdgePassKey(me:out;
aE:Edge from TopoDS;
- aPK:out PassKeyShape from GEOMAlgo)
+ aPK:out PassKeyShape from GEOMAlgo)
is protected;
FacePassKey(me:out;
aF:Face from TopoDS;
- aPK:out PassKeyShape from GEOMAlgo)
+ aPK:out PassKeyShape from GEOMAlgo)
is protected;
MakeVertex(me:out;
#include <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
#include <GEOMAlgo_IndexedDataMapOfShapeBox.hxx>
-#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
-#include <GEOMAlgo_PassKeyShape.hxx>
+#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx> //qft
+#include <GEOMAlgo_PassKeyShape.hxx>//qft
#include <GEOMAlgo_Tools.hxx>
//
TopoDS_Shape aNewShape;
TopTools_IndexedMapOfShape aMF;
TopTools_ListIteratorOfListOfShape aItS;
- GEOMAlgo_PassKeyShape aPKF;
- GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF;
+ GEOMAlgo_PassKeyShape aPKF;//qft
+ GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF;//qft
//
TopExp::MapShapes(myShape, aType, aMF);
//
for (i=1; i<=aNbF; ++i) {
const TopoDS_Shape& aS=aMF(i);
//
- aPKF.Clear();
+ //aPKF.Clear();//qft
if (aType==TopAbs_FACE) {
const TopoDS_Face& aF=TopoDS::Face(aS);
FacePassKey(aF, aPKF);
void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF,
GEOMAlgo_PassKeyShape& aPK)
{
- Standard_Integer i, aNbE, aNbMax;
+ Standard_Integer i, aNbE;//, aNbMax;//qft
TopTools_ListOfShape aLE;
TopTools_IndexedMapOfShape aME;
//
TopExp::MapShapes(aF, TopAbs_EDGE, aME);
aNbE=aME.Extent();
+ //qf
+ /*
aNbMax=aPK.NbMax();
if (!aNbE || aNbE>aNbMax) {
- myErrorStatus=101; // temprorary
- return;
+ myErrorStatus=101; // temprorary
+ return;
}
+ */
+ //qt
//
for (i=1; i<=aNbE; ++i) {
const TopoDS_Shape& aE=aME(i);
const TopoDS_Shape& aER=myOrigins.Find(aE);
aLE.Append(aER);
}
- aPK.SetIds(aLE);
+ //qf
+ //aPK.SetIds(aLE);
+ aPK.SetShapes(aLE);
+ //qt
}
//=======================================================================
//function : EdgePassKey
}
const TopoDS_Shape& aVR1=myOrigins.Find(aV1);
const TopoDS_Shape& aVR2=myOrigins.Find(aV2);
- aPK.SetIds(aVR1, aVR2);
+ //qf
+ //aPK.SetIds(aVR1, aVR2);
+ aPK.SetShapes(aVR1, aVR2);
+ //qt
}
//=======================================================================
//function : MakeVertex
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_Gluer : public GEOMAlgo_ShapeAlgo {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_Gluer();
Standard_EXPORT virtual ~GEOMAlgo_Gluer();
+
+
Standard_EXPORT void SetCheckGeometry(const Standard_Boolean aFlag) ;
+
+
Standard_EXPORT Standard_Boolean CheckGeometry() const;
+
+
Standard_EXPORT virtual void Perform() ;
+
+
Standard_EXPORT Standard_Integer AloneShapes() const;
+
+
Standard_EXPORT const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ;
+
+
Standard_EXPORT const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) ;
+
+
Standard_EXPORT Standard_Boolean IsDeleted(const TopoDS_Shape& S) ;
+
+
Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Images() const;
+
+
Standard_EXPORT const TopTools_DataMapOfShapeShape& Origins() const;
// Methods PROTECTED
//
+
+
Standard_EXPORT virtual void CheckData() ;
+
+
Standard_EXPORT virtual void CheckResult() ;
+
+
Standard_EXPORT void MakeVertices() ;
+
+
Standard_EXPORT void MakeEdges() ;
+
+
Standard_EXPORT void MakeFaces() ;
+
+
Standard_EXPORT void MakeShapes(const TopAbs_ShapeEnum aType) ;
+
+
Standard_EXPORT void MakeShells() ;
+
+
Standard_EXPORT void MakeSolids() ;
+
+
Standard_EXPORT void InnerTolerance() ;
+
+
Standard_EXPORT void EdgePassKey(const TopoDS_Edge& aE,GEOMAlgo_PassKeyShape& aPK) ;
+
+
Standard_EXPORT void FacePassKey(const TopoDS_Face& aF,GEOMAlgo_PassKeyShape& aPK) ;
+
+
Standard_EXPORT void MakeVertex(const TopTools_ListOfShape& aLV,TopoDS_Vertex& aNewV) ;
+
+
Standard_EXPORT void MakeEdge(const TopoDS_Edge& aEdge,TopoDS_Edge& aNewEdge) ;
+
+
Standard_EXPORT void MakeFace(const TopoDS_Face& aFace,TopoDS_Face& aNewEdge) ;
+
+
Standard_EXPORT Standard_Boolean IsToReverse(const TopoDS_Face& aFR,const TopoDS_Face& aF) ;
+
+
Standard_EXPORT Standard_Boolean HasNewSubShape(const TopoDS_Shape& aS) const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
#endif
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class GEOMAlgo_IndexedDataMapOfIntegerShape;
+
class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape : public TCollection_MapNode {
public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
// Methods PUBLIC
//
+
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape(const Standard_Integer& K1,const Standard_Integer K2,const TopoDS_Shape& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
+
Standard_Integer& Key1() const;
+
Standard_Integer& Key2() const;
+
TCollection_MapNodePtr& Next2() const;
+
TopoDS_Shape& Value() const;
-Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape();
+//Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape();
// Type management
//
- Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile
#include <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
#endif
-GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape() {}
+//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape() {}
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
{
return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) ;
}
-Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape() {}
+//Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) == AType || TCollection_MapNode::IsKind(AType));
+//}
+//Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape() {}
#define TheKey Standard_Integer
#define TheKey_hxx <Standard_Integer.hxx>
#define TheItem TopoDS_Shape
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#endif
class GEOMAlgo_PassKeyShape;
class TopTools_ListOfShape;
-class GEOMAlgo_PassKeyMapHasher;
+class GEOMAlgo_PassKeyShapeMapHasher;
class GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape;
+
class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape : public TCollection_MapNode {
public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
// Methods PUBLIC
//
+
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape(const GEOMAlgo_PassKeyShape& K1,const Standard_Integer K2,const TopTools_ListOfShape& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
+
GEOMAlgo_PassKeyShape& Key1() const;
+
Standard_Integer& Key2() const;
+
TCollection_MapNodePtr& Next2() const;
+
TopTools_ListOfShape& Value() const;
-Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape();
+//Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape();
// Type management
//
- Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
#define TheKey_hxx <GEOMAlgo_PassKeyShape.hxx>
#define TheItem TopTools_ListOfShape
#define TheItem_hxx <TopTools_ListOfShape.hxx>
-#define Hasher GEOMAlgo_PassKeyMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyMapHasher.hxx>
+#define Hasher GEOMAlgo_PassKeyShapeMapHasher
+#define Hasher_hxx <GEOMAlgo_PassKeyShapeMapHasher.hxx>
#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape
#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx>
#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
#endif
-#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile
-#include <GEOMAlgo_PassKeyMapHasher.hxx>
+#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile
+#include <GEOMAlgo_PassKeyShapeMapHasher.hxx>
#endif
#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
#endif
-GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape() {}
+//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape() {}
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
{
return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) ;
}
-Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape() {}
+//Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) == AType || TCollection_MapNode::IsKind(AType));
+//}
+//Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape() {}
#define TheKey GEOMAlgo_PassKeyShape
#define TheKey_hxx <GEOMAlgo_PassKeyShape.hxx>
#define TheItem TopTools_ListOfShape
#define TheItem_hxx <TopTools_ListOfShape.hxx>
-#define Hasher GEOMAlgo_PassKeyMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyMapHasher.hxx>
+#define Hasher GEOMAlgo_PassKeyShapeMapHasher
+#define Hasher_hxx <GEOMAlgo_PassKeyShapeMapHasher.hxx>
#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape
#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx>
#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class GEOMAlgo_IndexedDataMapOfShapeBox;
+
class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox : public TCollection_MapNode {
public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
// Methods PUBLIC
//
+
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox(const TopoDS_Shape& K1,const Standard_Integer K2,const Bnd_Box& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
+
TopoDS_Shape& Key1() const;
+
Standard_Integer& Key2() const;
+
TCollection_MapNodePtr& Next2() const;
+
Bnd_Box& Value() const;
-Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox();
+//Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox();
// Type management
//
- Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile
#include <GEOMAlgo_IndexedDataMapOfShapeBox.hxx>
#endif
-GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox() {}
+//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox() {}
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
{
return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) ;
}
-Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox() {}
+//Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) == AType || TCollection_MapNode::IsKind(AType));
+//}
+//Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox() {}
#define TheKey TopoDS_Shape
#define TheKey_hxx <TopoDS_Shape.hxx>
#define TheItem Bnd_Box
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class GEOMAlgo_IndexedDataMapOfShapeState;
+
class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState : public TCollection_MapNode {
public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
// Methods PUBLIC
//
+
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState(const TopoDS_Shape& K1,const Standard_Integer K2,const TopAbs_State& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
+
TopoDS_Shape& Key1() const;
+
Standard_Integer& Key2() const;
+
TCollection_MapNodePtr& Next2() const;
+
TopAbs_State& Value() const;
-Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState();
+//Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState();
// Type management
//
- Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
#endif
-GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState() {}
+//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState() {}
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
{
return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) ;
}
-Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState() {}
+//Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) == AType || TCollection_MapNode::IsKind(AType));
+//}
+//Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState() {}
#define TheKey TopoDS_Shape
#define TheKey_hxx <TopoDS_Shape.hxx>
#define TheItem TopAbs_State
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_IndexedDataMapOfIntegerShape : public TCollection_BasicMap {
public:
}
// 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) ;
// Methods PRIVATE
//
+
+
Standard_EXPORT GEOMAlgo_IndexedDataMapOfIntegerShape(const GEOMAlgo_IndexedDataMapOfIntegerShape& Other);
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Standard_NoSuchObject;
class GEOMAlgo_PassKeyShape;
class TopTools_ListOfShape;
-class GEOMAlgo_PassKeyMapHasher;
+class GEOMAlgo_PassKeyShapeMapHasher;
class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape;
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape : public TCollection_BasicMap {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape(const Standard_Integer NbBuckets = 1);
+
+
Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Assign(const GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Other) ;
GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& operator =(const GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Other)
{
return Assign(Other);
}
+
+
Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
+
+
Standard_EXPORT void Clear() ;
~GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape()
{
Clear();
}
+
+
Standard_EXPORT Standard_Integer Add(const GEOMAlgo_PassKeyShape& K,const TopTools_ListOfShape& I) ;
+
+
Standard_EXPORT void Substitute(const Standard_Integer I,const GEOMAlgo_PassKeyShape& K,const TopTools_ListOfShape& T) ;
+
+
Standard_EXPORT void RemoveLast() ;
+
+
Standard_EXPORT Standard_Boolean Contains(const GEOMAlgo_PassKeyShape& K) const;
+
+
Standard_EXPORT const GEOMAlgo_PassKeyShape& FindKey(const Standard_Integer I) const;
+
+
Standard_EXPORT const TopTools_ListOfShape& FindFromIndex(const Standard_Integer I) const;
const TopTools_ListOfShape& operator ()(const Standard_Integer I) const
{
return FindFromIndex(I);
}
+
+
Standard_EXPORT TopTools_ListOfShape& ChangeFromIndex(const Standard_Integer I) ;
TopTools_ListOfShape& operator ()(const Standard_Integer I)
{
return ChangeFromIndex(I);
}
+
+
Standard_EXPORT Standard_Integer FindIndex(const GEOMAlgo_PassKeyShape& K) const;
+
+
Standard_EXPORT const TopTools_ListOfShape& FindFromKey(const GEOMAlgo_PassKeyShape& K) const;
+
+
Standard_EXPORT TopTools_ListOfShape& ChangeFromKey(const GEOMAlgo_PassKeyShape& K) ;
// Methods PRIVATE
//
+
+
Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape(const GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Other);
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
#endif
-#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile
-#include <GEOMAlgo_PassKeyMapHasher.hxx>
+#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile
+#include <GEOMAlgo_PassKeyShapeMapHasher.hxx>
#endif
#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
#include <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx>
#define TheKey_hxx <GEOMAlgo_PassKeyShape.hxx>
#define TheItem TopTools_ListOfShape
#define TheItem_hxx <TopTools_ListOfShape.hxx>
-#define Hasher GEOMAlgo_PassKeyMapHasher
-#define Hasher_hxx <GEOMAlgo_PassKeyMapHasher.hxx>
+#define Hasher GEOMAlgo_PassKeyShapeMapHasher
+#define Hasher_hxx <GEOMAlgo_PassKeyShapeMapHasher.hxx>
#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape
#define TCollection_IndexedDataMapNode_hxx <GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx>
#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_IndexedDataMapOfShapeBox : public TCollection_BasicMap {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeBox(const Standard_Integer NbBuckets = 1);
+
+
Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeBox& Assign(const GEOMAlgo_IndexedDataMapOfShapeBox& Other) ;
GEOMAlgo_IndexedDataMapOfShapeBox& operator =(const GEOMAlgo_IndexedDataMapOfShapeBox& Other)
{
return Assign(Other);
}
+
+
Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
+
+
Standard_EXPORT void Clear() ;
~GEOMAlgo_IndexedDataMapOfShapeBox()
{
Clear();
}
+
+
Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const Bnd_Box& I) ;
+
+
Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const Bnd_Box& T) ;
+
+
Standard_EXPORT void RemoveLast() ;
+
+
Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const;
+
+
Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const;
+
+
Standard_EXPORT const Bnd_Box& FindFromIndex(const Standard_Integer I) const;
const Bnd_Box& operator ()(const Standard_Integer I) const
{
return FindFromIndex(I);
}
+
+
Standard_EXPORT Bnd_Box& ChangeFromIndex(const Standard_Integer I) ;
Bnd_Box& operator ()(const Standard_Integer I)
{
return ChangeFromIndex(I);
}
+
+
Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const;
+
+
Standard_EXPORT const Bnd_Box& FindFromKey(const TopoDS_Shape& K) const;
+
+
Standard_EXPORT Bnd_Box& ChangeFromKey(const TopoDS_Shape& K) ;
// Methods PRIVATE
//
+
+
Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeBox(const GEOMAlgo_IndexedDataMapOfShapeBox& Other);
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_IndexedDataMapOfShapeState : public TCollection_BasicMap {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeState(const Standard_Integer NbBuckets = 1);
+
+
Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeState& Assign(const GEOMAlgo_IndexedDataMapOfShapeState& Other) ;
GEOMAlgo_IndexedDataMapOfShapeState& operator =(const GEOMAlgo_IndexedDataMapOfShapeState& Other)
{
return Assign(Other);
}
+
+
Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
+
+
Standard_EXPORT void Clear() ;
~GEOMAlgo_IndexedDataMapOfShapeState()
{
Clear();
}
+
+
Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const TopAbs_State& I) ;
+
+
Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const TopAbs_State& T) ;
+
+
Standard_EXPORT void RemoveLast() ;
+
+
Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const;
+
+
Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const;
+
+
Standard_EXPORT const TopAbs_State& FindFromIndex(const Standard_Integer I) const;
const TopAbs_State& operator ()(const Standard_Integer I) const
{
return FindFromIndex(I);
}
+
+
Standard_EXPORT TopAbs_State& ChangeFromIndex(const Standard_Integer I) ;
TopAbs_State& operator ()(const Standard_Integer I)
{
return ChangeFromIndex(I);
}
+
+
Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const;
+
+
Standard_EXPORT const TopAbs_State& FindFromKey(const TopoDS_Shape& K) const;
+
+
Standard_EXPORT TopAbs_State& ChangeFromKey(const TopoDS_Shape& K) ;
// Methods PRIVATE
//
+
+
Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeState(const GEOMAlgo_IndexedDataMapOfShapeState& Other);
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_ListIteratorOfListOfCoupleOfShapes {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_ListIteratorOfListOfCoupleOfShapes();
+
+
Standard_EXPORT GEOMAlgo_ListIteratorOfListOfCoupleOfShapes(const GEOMAlgo_ListOfCoupleOfShapes& L);
+
+
Standard_EXPORT void Initialize(const GEOMAlgo_ListOfCoupleOfShapes& L) ;
+
Standard_Boolean More() const;
+
+
Standard_EXPORT void Next() ;
+
+
Standard_EXPORT GEOMAlgo_CoupleOfShapes& Value() const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_ListIteratorOfListOfPnt {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_ListIteratorOfListOfPnt();
+
+
Standard_EXPORT GEOMAlgo_ListIteratorOfListOfPnt(const GEOMAlgo_ListOfPnt& L);
+
+
Standard_EXPORT void Initialize(const GEOMAlgo_ListOfPnt& L) ;
+
Standard_Boolean More() const;
+
+
Standard_EXPORT void Next() ;
+
+
Standard_EXPORT gp_Pnt& Value() const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class GEOMAlgo_ListIteratorOfListOfCoupleOfShapes;
+
class GEOMAlgo_ListNodeOfListOfCoupleOfShapes : public TCollection_MapNode {
public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
// Methods PUBLIC
//
+
GEOMAlgo_ListNodeOfListOfCoupleOfShapes(const GEOMAlgo_CoupleOfShapes& I,const TCollection_MapNodePtr& n);
+
GEOMAlgo_CoupleOfShapes& Value() const;
-Standard_EXPORT ~GEOMAlgo_ListNodeOfListOfCoupleOfShapes();
+//Standard_EXPORT ~GEOMAlgo_ListNodeOfListOfCoupleOfShapes();
// Type management
//
- Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile
#include <GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx>
#endif
-GEOMAlgo_ListNodeOfListOfCoupleOfShapes::~GEOMAlgo_ListNodeOfListOfCoupleOfShapes() {}
+//GEOMAlgo_ListNodeOfListOfCoupleOfShapes::~GEOMAlgo_ListNodeOfListOfCoupleOfShapes() {}
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
{
return STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) ;
}
-Standard_Boolean GEOMAlgo_ListNodeOfListOfCoupleOfShapes::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes::~Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes() {}
+//Standard_Boolean GEOMAlgo_ListNodeOfListOfCoupleOfShapes::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) == AType || TCollection_MapNode::IsKind(AType));
+//}
+//Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes::~Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes() {}
#define Item GEOMAlgo_CoupleOfShapes
#define Item_hxx <GEOMAlgo_CoupleOfShapes.hxx>
#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfCoupleOfShapes
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class GEOMAlgo_ListIteratorOfListOfPnt;
+
class GEOMAlgo_ListNodeOfListOfPnt : public TCollection_MapNode {
public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
// Methods PUBLIC
//
+
GEOMAlgo_ListNodeOfListOfPnt(const gp_Pnt& I,const TCollection_MapNodePtr& n);
+
gp_Pnt& Value() const;
-Standard_EXPORT ~GEOMAlgo_ListNodeOfListOfPnt();
+//Standard_EXPORT ~GEOMAlgo_ListNodeOfListOfPnt();
// Type management
//
- Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_ListNodeOfListOfPnt_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile
#include <GEOMAlgo_ListIteratorOfListOfPnt.hxx>
#endif
-GEOMAlgo_ListNodeOfListOfPnt::~GEOMAlgo_ListNodeOfListOfPnt() {}
+//GEOMAlgo_ListNodeOfListOfPnt::~GEOMAlgo_ListNodeOfListOfPnt() {}
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
{
return STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt) ;
}
-Standard_Boolean GEOMAlgo_ListNodeOfListOfPnt::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_GEOMAlgo_ListNodeOfListOfPnt::~Handle_GEOMAlgo_ListNodeOfListOfPnt() {}
+//Standard_Boolean GEOMAlgo_ListNodeOfListOfPnt::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt) == AType || TCollection_MapNode::IsKind(AType));
+//}
+//Handle_GEOMAlgo_ListNodeOfListOfPnt::~Handle_GEOMAlgo_ListNodeOfListOfPnt() {}
#define Item gp_Pnt
#define Item_hxx <gp_Pnt.hxx>
#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_ListOfCoupleOfShapes {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_ListOfCoupleOfShapes();
+
+
Standard_EXPORT void Assign(const GEOMAlgo_ListOfCoupleOfShapes& Other) ;
void operator=(const GEOMAlgo_ListOfCoupleOfShapes& Other)
{
Assign(Other);
}
+
+
Standard_EXPORT Standard_Integer Extent() const;
+
+
Standard_EXPORT void Clear() ;
~GEOMAlgo_ListOfCoupleOfShapes()
{
Clear();
}
+
Standard_Boolean IsEmpty() const;
+
+
Standard_EXPORT void Prepend(const GEOMAlgo_CoupleOfShapes& I) ;
+
+
Standard_EXPORT void Prepend(const GEOMAlgo_CoupleOfShapes& I,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& theIt) ;
+
+
Standard_EXPORT void Prepend(GEOMAlgo_ListOfCoupleOfShapes& Other) ;
+
+
Standard_EXPORT void Append(const GEOMAlgo_CoupleOfShapes& I) ;
+
+
Standard_EXPORT void Append(const GEOMAlgo_CoupleOfShapes& I,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& theIt) ;
+
+
Standard_EXPORT void Append(GEOMAlgo_ListOfCoupleOfShapes& Other) ;
+
+
Standard_EXPORT GEOMAlgo_CoupleOfShapes& First() const;
+
+
Standard_EXPORT GEOMAlgo_CoupleOfShapes& Last() const;
+
+
Standard_EXPORT void RemoveFirst() ;
+
+
Standard_EXPORT void Remove(GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& It) ;
+
+
Standard_EXPORT void InsertBefore(const GEOMAlgo_CoupleOfShapes& I,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& It) ;
+
+
Standard_EXPORT void InsertBefore(GEOMAlgo_ListOfCoupleOfShapes& Other,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& It) ;
+
+
Standard_EXPORT void InsertAfter(const GEOMAlgo_CoupleOfShapes& I,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& It) ;
+
+
Standard_EXPORT void InsertAfter(GEOMAlgo_ListOfCoupleOfShapes& Other,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& It) ;
// Methods PRIVATE
//
+
+
Standard_EXPORT GEOMAlgo_ListOfCoupleOfShapes(const GEOMAlgo_ListOfCoupleOfShapes& Other);
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_ListOfPnt {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_ListOfPnt();
+
+
Standard_EXPORT void Assign(const GEOMAlgo_ListOfPnt& Other) ;
void operator=(const GEOMAlgo_ListOfPnt& Other)
{
Assign(Other);
}
+
+
Standard_EXPORT Standard_Integer Extent() const;
+
+
Standard_EXPORT void Clear() ;
~GEOMAlgo_ListOfPnt()
{
Clear();
}
+
Standard_Boolean IsEmpty() const;
+
+
Standard_EXPORT void Prepend(const gp_Pnt& I) ;
+
+
Standard_EXPORT void Prepend(const gp_Pnt& I,GEOMAlgo_ListIteratorOfListOfPnt& theIt) ;
+
+
Standard_EXPORT void Prepend(GEOMAlgo_ListOfPnt& Other) ;
+
+
Standard_EXPORT void Append(const gp_Pnt& I) ;
+
+
Standard_EXPORT void Append(const gp_Pnt& I,GEOMAlgo_ListIteratorOfListOfPnt& theIt) ;
+
+
Standard_EXPORT void Append(GEOMAlgo_ListOfPnt& Other) ;
+
+
Standard_EXPORT gp_Pnt& First() const;
+
+
Standard_EXPORT gp_Pnt& Last() const;
+
+
Standard_EXPORT void RemoveFirst() ;
+
+
Standard_EXPORT void Remove(GEOMAlgo_ListIteratorOfListOfPnt& It) ;
+
+
Standard_EXPORT void InsertBefore(const gp_Pnt& I,GEOMAlgo_ListIteratorOfListOfPnt& It) ;
+
+
Standard_EXPORT void InsertBefore(GEOMAlgo_ListOfPnt& Other,GEOMAlgo_ListIteratorOfListOfPnt& It) ;
+
+
Standard_EXPORT void InsertAfter(const gp_Pnt& I,GEOMAlgo_ListIteratorOfListOfPnt& It) ;
+
+
Standard_EXPORT void InsertAfter(GEOMAlgo_ListOfPnt& Other,GEOMAlgo_ListIteratorOfListOfPnt& It) ;
// Methods PRIVATE
//
+
+
Standard_EXPORT GEOMAlgo_ListOfPnt(const GEOMAlgo_ListOfPnt& Other);
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_PassKey.cdl
--- Created:
+-- Created: Mon Nov 20 12:16:13 2006
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright:
class PassKey from GEOMAlgo
uses
Shape from TopoDS,
- ListOfInteger from TColStd
-
+ IndexedMapOfInteger from TColStd,
+ ListOfInteger from TColStd
+
--raises
is
Create
returns PassKey from GEOMAlgo;
+ ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_PassKey();"
+
+ Create(Other:PassKey from GEOMAlgo)
+ returns PassKey from GEOMAlgo;
Assign(me:out;
Other : PassKey from GEOMAlgo)
returns PassKey from GEOMAlgo;
---C++: alias operator =
---C++: return &
+
+ Clear(me:out);
--
SetIds(me:out;
aI1 :Integer from Standard);
SetIds(me:out;
- aI1 :Integer from Standard;
+ aI1 :Integer from Standard;
aI2 :Integer from Standard);
SetIds(me:out;
SetIds(me:out;
aLS :ListOfInteger from TColStd);
-
- NbMax(me)
+
+ NbIds(me)
returns Integer from Standard;
-
- Clear(me:out);
-
- Compute(me:out);
IsEqual(me;
aOther:PassKey from GEOMAlgo)
returns Boolean from Standard;
-
- Key(me)
- returns Address from Standard;
HashCode(me;
Upper : Integer from Standard)
Id(me;
aIndex: Integer from Standard)
- returns Integer from Standard;
+ returns Integer from Standard;
- Dump(me);
-
+ Dump(me;
+ aHex:Integer from Standard=0);
+
+
fields
-
myNbIds: Integer from Standard is protected;
- myNbMax: Integer from Standard is protected;
- mySum : Integer from Standard is protected;
- myIds : Integer from Standard [8] is protected;
+ mySum : Integer from Standard is protected;
+ myMap : IndexedMapOfInteger from TColStd is protected;
end PassKey;
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: GEOMAlgo_PassKey.cxx
-// Created:
+//
+// File: GEOMAlgo_Algo.cxx
+// Created: Sat Dec 04 12:39:47 2004
// Author: Peter KURNEV
-// <pkv@irinox>
+// <peter@PREFEX>
#include <GEOMAlgo_PassKey.ixx>
#include <stdio.h>
#include <string.h>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
+#include <TColStd_ListOfInteger.hxx>
#ifdef WNT
#pragma warning( disable : 4101)
#endif
-static
- void SortShell(const int n, int* a);
static
Standard_Integer NormalizedId(const Standard_Integer aId,
const Standard_Integer aDiv);
//=======================================================================
GEOMAlgo_PassKey::GEOMAlgo_PassKey()
{
- Clear();
+ Clear();
+}
+//=======================================================================
+//function :
+//purpose :
+//=======================================================================
+ GEOMAlgo_PassKey::GEOMAlgo_PassKey(const GEOMAlgo_PassKey& aOther)
+{
+ myNbIds=aOther.myNbIds;
+ mySum=aOther.mySum;
+ myMap=aOther.myMap;
}
//=======================================================================
//function :Assign
//purpose :
//=======================================================================
- GEOMAlgo_PassKey& GEOMAlgo_PassKey::Assign(const GEOMAlgo_PassKey& anOther)
+ GEOMAlgo_PassKey& GEOMAlgo_PassKey::Assign(const GEOMAlgo_PassKey& aOther)
{
- myNbIds=anOther.myNbIds;
- myNbMax=anOther.myNbMax;
- mySum=anOther.mySum;
- memcpy(myIds, anOther.myIds, sizeof(myIds));
+ myNbIds=aOther.myNbIds;
+ mySum=aOther.mySum;
+ myMap=aOther.myMap;
return *this;
}
//=======================================================================
+//function :~
+//purpose :
+//=======================================================================
+ GEOMAlgo_PassKey::~GEOMAlgo_PassKey()
+{
+}
+//=======================================================================
//function :Clear
//purpose :
//=======================================================================
void GEOMAlgo_PassKey::Clear()
{
- Standard_Integer i;
- //
myNbIds=0;
- myNbMax=8;
mySum=0;
- for (i=0; i<myNbMax; ++i) {
- myIds[i]=0;
- }
+ myMap.Clear();
}
//=======================================================================
//function :SetIds
//purpose :
//=======================================================================
- void GEOMAlgo_PassKey::SetIds(const Standard_Integer anId1)
+ void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1)
{
+ Clear();
myNbIds=1;
- myIds[myNbMax-1]=anId1;
- mySum=anId1;
+ myMap.Add(aId1);
+ mySum=NormalizedId(aId1, myNbIds);
}
//=======================================================================
//function :SetIds
//purpose :
//=======================================================================
- void GEOMAlgo_PassKey::SetIds(const Standard_Integer anId1,
- const Standard_Integer anId2)
+ void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1,
+ const Standard_Integer aId2)
{
- Standard_Integer aIdN1, aIdN2;
+ TColStd_ListOfInteger aLI;
//
- myNbIds=2;
- aIdN1=NormalizedId(anId1, myNbIds);
- aIdN2=NormalizedId(anId2, myNbIds);
- mySum=aIdN1+aIdN2;
- //
- if (anId1<anId2) {
- myIds[myNbMax-2]=anId1;
- myIds[myNbMax-1]=anId2;
- return;
- }
- myIds[myNbMax-2]=anId2;
- myIds[myNbMax-1]=anId1;
+ aLI.Append(aId1);
+ aLI.Append(aId2);
+ SetIds(aLI);
}
-
//=======================================================================
//function :SetIds
//purpose :
//=======================================================================
- void GEOMAlgo_PassKey::SetIds(const Standard_Integer anId1,
- const Standard_Integer anId2,
- const Standard_Integer anId3)
+ void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1,
+ const Standard_Integer aId2,
+ const Standard_Integer aId3)
{
- Standard_Integer aIdN1, aIdN2, aIdN3;
- //
- myNbIds=3;
- aIdN1=NormalizedId(anId1, myNbIds);
- aIdN2=NormalizedId(anId2, myNbIds);
- aIdN3=NormalizedId(anId3, myNbIds);
- mySum=aIdN1+aIdN2+aIdN3;
- //
- myIds[myNbMax-3]=anId1;
- myIds[myNbMax-2]=anId2;
- myIds[myNbMax-1]=anId3;
+ TColStd_ListOfInteger aLI;
//
- Compute();
+ aLI.Append(aId1);
+ aLI.Append(aId2);
+ aLI.Append(aId3);
+ SetIds(aLI);
}
//=======================================================================
//function :SetIds
//purpose :
//=======================================================================
- void GEOMAlgo_PassKey::SetIds(const Standard_Integer anId1,
- const Standard_Integer anId2,
- const Standard_Integer anId3,
- const Standard_Integer anId4)
-{
- Standard_Integer aIdN1, aIdN2, aIdN3, aIdN4;
- //
- myNbIds=4;
- aIdN1=NormalizedId(anId1, myNbIds);
- aIdN2=NormalizedId(anId2, myNbIds);
- aIdN3=NormalizedId(anId3, myNbIds);
- aIdN4=NormalizedId(anId4, myNbIds);
- mySum=aIdN1+aIdN2+aIdN3+aIdN4;
+ void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1,
+ const Standard_Integer aId2,
+ const Standard_Integer aId3,
+ const Standard_Integer aId4)
+{
+ TColStd_ListOfInteger aLI;
//
- myIds[myNbMax-4]=anId1;
- myIds[myNbMax-3]=anId2;
- myIds[myNbMax-2]=anId3;
- myIds[myNbMax-1]=anId4;
- //
- Compute();
+ aLI.Append(aId1);
+ aLI.Append(aId2);
+ aLI.Append(aId3);
+ aLI.Append(aId4);
+ SetIds(aLI);
}
//=======================================================================
//function :SetIds
//=======================================================================
void GEOMAlgo_PassKey::SetIds(const TColStd_ListOfInteger& aLI)
{
- Standard_Integer aNb, i, anId, aIdN;
+ Standard_Integer i, aId, aIdN;
TColStd_ListIteratorOfListOfInteger aIt;
//
- aNb=aLI.Extent();
- if (!aNb || aNb > myNbMax) {
- return;
- }
- //
- myNbIds=aNb;
- mySum=0;
- i=myNbMax-myNbIds;
+ Clear();
aIt.Initialize(aLI);
- for (; aIt.More(); aIt.Next(), ++i) {
- anId=aIt.Value();
- myIds[i]=anId;
- aIdN=NormalizedId(anId, myNbIds);
- mySum+=aIdN;
+ for (; aIt.More(); aIt.Next()) {
+ aId=aIt.Value();
+ myMap.Add(aId);
}
- //
- Compute();
-}
-//=======================================================================
-//function :Id
-//purpose :
-//=======================================================================
- Standard_Integer GEOMAlgo_PassKey::Id(const Standard_Integer aIndex)const
-{
- if (aIndex < 0 || aIndex >= myNbMax) {
- return 0;
+ myNbIds=myMap.Extent();
+ for(i=1; i<=myNbIds; ++i) {
+ aId=myMap(i);
+ aIdN=NormalizedId(aId, myNbIds);
+ mySum+=aIdN;
}
- return myIds[aIndex];
}
//=======================================================================
-//function :NbMax
+//function :NbIds
//purpose :
//=======================================================================
- Standard_Integer GEOMAlgo_PassKey::NbMax()const
+ Standard_Integer GEOMAlgo_PassKey::NbIds()const
{
- return myNbMax;
+ return myNbIds;
}
//=======================================================================
-//function :Compute
+//function :Id
//purpose :
//=======================================================================
- void GEOMAlgo_PassKey::Compute()
+ Standard_Integer GEOMAlgo_PassKey::Id(const Standard_Integer aIndex) const
{
- SortShell(myNbIds, myIds+myNbMax-myNbIds);
+ if (aIndex<1 || aIndex>myNbIds) {
+ return -1;
+ }
+ return myMap(aIndex);
}
//=======================================================================
//function :IsEqual
//purpose :
//=======================================================================
- Standard_Boolean GEOMAlgo_PassKey::IsEqual(const GEOMAlgo_PassKey& anOther) const
+ Standard_Boolean GEOMAlgo_PassKey::IsEqual(const GEOMAlgo_PassKey& aOther) const
{
- Standard_Integer iIsEqual;
- Standard_Boolean bIsEqual;
+ Standard_Boolean bRet;
+ Standard_Integer i, aId;
//
- iIsEqual=memcmp(myIds, anOther.myIds, sizeof(myIds));
- bIsEqual=Standard_False;
- if (!iIsEqual) {
- bIsEqual=!bIsEqual;
+ bRet=Standard_False;
+ //
+ if (myNbIds!=aOther.myNbIds) {
+ return bRet;
}
- return bIsEqual;
-}
-//=======================================================================
-//function :Key
-//purpose :
-//=======================================================================
- Standard_Address GEOMAlgo_PassKey::Key()const
-{
- return (Standard_Address)myIds;
+ for (i=1; i<=myNbIds; ++i) {
+ aId=myMap(i);
+ if (!aOther.myMap.Contains(aId)) {
+ return bRet;
+ }
+ }
+ return !bRet;
}
//=======================================================================
//function : HashCode
//purpose :
//=======================================================================
- Standard_Integer GEOMAlgo_PassKey::HashCode(const Standard_Integer Upper) const
+ Standard_Integer GEOMAlgo_PassKey::HashCode(const Standard_Integer aUpper) const
{
- //return (mySum % Upper);
- return ::HashCode(mySum, Upper);
+ return ::HashCode(mySum, aUpper);
}
//=======================================================================
//function : Dump
//purpose :
//=======================================================================
- void GEOMAlgo_PassKey::Dump()const
+ void GEOMAlgo_PassKey::Dump(const Standard_Integer )const
{
- Standard_Integer i;
- //
- printf(" PassKey: {");
- for (i=0; i<myNbMax; ++i) {
- printf(" %d", myIds[i]);
- }
- printf(" }");
}
//=======================================================================
// function: NormalizedId
}
return aIdRet;
}
-//=======================================================================
-// function: SortShell
-// purpose :
-//=======================================================================
-void SortShell(const int n, int* a)
-{
- int x, nd, i, j, l, d=1;
- //
- 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 (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)
-}
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
+#ifndef _TColStd_IndexedMapOfInteger_HeaderFile
+#include <TColStd_IndexedMapOfInteger.hxx>
+#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
-#ifndef _Standard_Address_HeaderFile
-#include <Standard_Address.hxx>
-#endif
class TColStd_ListOfInteger;
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_PassKey {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_PassKey();
+Standard_EXPORT virtual ~GEOMAlgo_PassKey();
+
+
+Standard_EXPORT GEOMAlgo_PassKey(const GEOMAlgo_PassKey& Other);
+
+
Standard_EXPORT GEOMAlgo_PassKey& Assign(const GEOMAlgo_PassKey& Other) ;
GEOMAlgo_PassKey& operator =(const GEOMAlgo_PassKey& Other)
{
return Assign(Other);
}
+
+
+Standard_EXPORT void Clear() ;
+
+
Standard_EXPORT void SetIds(const Standard_Integer aI1) ;
+
+
Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2) ;
+
+
Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2,const Standard_Integer aI3) ;
+
+
Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2,const Standard_Integer aI3,const Standard_Integer aI4) ;
+
+
Standard_EXPORT void SetIds(const TColStd_ListOfInteger& aLS) ;
-Standard_EXPORT Standard_Integer NbMax() const;
-Standard_EXPORT void Clear() ;
-Standard_EXPORT void Compute() ;
+
+
+Standard_EXPORT Standard_Integer NbIds() const;
+
+
Standard_EXPORT Standard_Boolean IsEqual(const GEOMAlgo_PassKey& aOther) const;
-Standard_EXPORT Standard_Address Key() const;
+
+
Standard_EXPORT Standard_Integer HashCode(const Standard_Integer Upper) const;
+
+
Standard_EXPORT Standard_Integer Id(const Standard_Integer aIndex) const;
-Standard_EXPORT void Dump() const;
+
+
+Standard_EXPORT void Dump(const Standard_Integer aHex = 0) const;
// Fields PROTECTED
//
Standard_Integer myNbIds;
-Standard_Integer myNbMax;
Standard_Integer mySum;
-Standard_Integer myIds[8];
+TColStd_IndexedMapOfInteger myMap;
private:
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _TColStd_ListOfInteger_HeaderFile
#include <TColStd_ListOfInteger.hxx>
#endif
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_PassKeyMapHasher.cdl
-- Created:
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright:
class PassKeyMapHasher from GEOMAlgo
//function : HashCode
//purpose :
//=======================================================================
- Standard_Integer GEOMAlgo_PassKeyMapHasher::HashCode(const GEOMAlgo_PassKey& aPKey,
+ Standard_Integer GEOMAlgo_PassKeyMapHasher::HashCode(const GEOMAlgo_PassKey& aPK,
const Standard_Integer Upper)
{
- return aPKey.HashCode(Upper);
+ return aPK.HashCode(Upper);
}
//=======================================================================
//function :IsEqual
//purpose :
//=======================================================================
- Standard_Boolean GEOMAlgo_PassKeyMapHasher::IsEqual(const GEOMAlgo_PassKey& aPKey1,
- const GEOMAlgo_PassKey& aPKey2)
+ Standard_Boolean GEOMAlgo_PassKeyMapHasher::IsEqual(const GEOMAlgo_PassKey& aPK1,
+ const GEOMAlgo_PassKey& aPK2)
{
- return aPKey1.IsEqual(aPKey2);
+ return aPK1.IsEqual(aPK2);
}
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_PassKeyMapHasher {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT static Standard_Integer HashCode(const GEOMAlgo_PassKey& aPKey,const Standard_Integer Upper) ;
+
+
Standard_EXPORT static Standard_Boolean IsEqual(const GEOMAlgo_PassKey& aPKey1,const GEOMAlgo_PassKey& aPKey2) ;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _GEOMAlgo_PassKey_HeaderFile
#include <GEOMAlgo_PassKey.hxx>
#endif
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_PassKeyShape.cdl
-- Created:
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright:
class PassKeyShape from GEOMAlgo
- inherits PassKey from GEOMAlgo
-
+
---Purpose:
uses
Shape from TopoDS,
- ListOfShape from TopTools
-
+ ListOfShape from TopTools,
+ IndexedMapOfShape from TopTools
+
--raises
is
Create
returns PassKeyShape from GEOMAlgo;
-
- SetIds(me:out;
+ ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_PassKeyShape();"
+
+ Create(Other:PassKeyShape from GEOMAlgo)
+ returns PassKeyShape from GEOMAlgo;
+
+ Assign(me:out;
+ Other : PassKeyShape from GEOMAlgo)
+ returns PassKeyShape from GEOMAlgo;
+ ---C++: alias operator =
+ ---C++: return &
+
+ SetShapes(me:out;
aS :Shape from TopoDS);
- SetIds(me:out;
+ SetShapes(me:out;
aS1 :Shape from TopoDS;
aS2 :Shape from TopoDS);
- SetIds(me:out;
+ SetShapes(me:out;
aS1 :Shape from TopoDS;
aS2 :Shape from TopoDS;
aS3 :Shape from TopoDS);
- SetIds(me:out;
+ SetShapes(me:out;
aS1 :Shape from TopoDS;
aS2 :Shape from TopoDS;
aS3 :Shape from TopoDS;
aS4 :Shape from TopoDS);
- SetIds(me:out;
+ SetShapes(me:out;
aLS :ListOfShape from TopTools);
-
+
+ Clear(me:out);
+
+ NbIds(me)
+ returns Integer from Standard;
+
+ IsEqual(me;
+ aOther:PassKeyShape from GEOMAlgo)
+ returns Boolean from Standard;
+
+ HashCode(me;
+ Upper : Integer from Standard)
+ returns Integer from Standard;
+
+ Dump(me;
+ aHex:Integer from Standard=0);
+
fields
- myUpper : Integer from Standard is protected;
+ myNbIds:Integer from Standard is protected;
+ mySum :Integer from Standard is protected;
+ myUpper:Integer from Standard is protected;
+ myMap :IndexedMapOfShape from TopTools is protected;
end PassKeyShape;
#include <GEOMAlgo_PassKeyShape.ixx>
-#include <stdio.h>
-#include <string.h>
-
+#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TColStd_ListOfInteger.hxx>
+
+static
+ Standard_Integer NormalizedId(const Standard_Integer aId,
+ const Standard_Integer aDiv);
//=======================================================================
//function :
//purpose :
//=======================================================================
GEOMAlgo_PassKeyShape::GEOMAlgo_PassKeyShape()
-:
- GEOMAlgo_PassKey()
{
myUpper=432123;
- GEOMAlgo_PassKey::Clear();
}
//=======================================================================
-//function :SetIds
+//function :
+//purpose :
+//=======================================================================
+ GEOMAlgo_PassKeyShape::GEOMAlgo_PassKeyShape(const GEOMAlgo_PassKeyShape& aOther)
+{
+ myUpper=432123;
+ myNbIds=aOther.myNbIds;
+ mySum=aOther.mySum;
+ myMap=aOther.myMap;
+}
+//=======================================================================
+//function :~
+//purpose :
+//=======================================================================
+ GEOMAlgo_PassKeyShape::~GEOMAlgo_PassKeyShape()
+{
+}
+//=======================================================================
+//function :Assign
+//purpose :
+//=======================================================================
+ GEOMAlgo_PassKeyShape& GEOMAlgo_PassKeyShape::Assign(const GEOMAlgo_PassKeyShape& aOther)
+{
+ myUpper=432123;
+ myNbIds=aOther.myNbIds;
+ mySum=aOther.mySum;
+ myMap=aOther.myMap;
+ return *this;
+}
+//=======================================================================
+//function :Clear
//purpose :
//=======================================================================
- void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1)
+ void GEOMAlgo_PassKeyShape::Clear()
+{
+ myNbIds=0;
+ mySum=0;
+ myMap.Clear();
+}
+//=======================================================================
+//function :SetShapes
+//purpose :
+//=======================================================================
+ void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1)
{
- Standard_Integer anId1;
+ Standard_Integer aHC;
//
- anId1=aS1.HashCode(myUpper);
- GEOMAlgo_PassKey::SetIds(anId1);
+ Clear();
+ myNbIds=1;
+ myMap.Add(aS1);
+ aHC=aS1.HashCode(myUpper);
+ mySum=NormalizedId(aHC, myNbIds);
}
//=======================================================================
-//function :SetIds
+//function :SetShapes
//purpose :
//=======================================================================
- void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2)
+ void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
+ const TopoDS_Shape& aS2)
{
- Standard_Integer anId1, anId2;
+ TopTools_ListOfShape aLS;
//
- anId1=aS1.HashCode(myUpper);
- anId2=aS2.HashCode(myUpper);
- //
- GEOMAlgo_PassKey::SetIds(anId1, anId2);
+ aLS.Append(aS1);
+ aLS.Append(aS2);
+ SetShapes(aLS);
}
//=======================================================================
-//function :SetIds
+//function :SetShapes
//purpose :
//=======================================================================
- void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2,
- const TopoDS_Shape& aS3)
+ void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
+ const TopoDS_Shape& aS2,
+ const TopoDS_Shape& aS3)
{
- Standard_Integer anId1, anId2, anId3;
- //
- anId1=aS1.HashCode(myUpper);
- anId2=aS2.HashCode(myUpper);
- anId3=aS3.HashCode(myUpper);
+ TopTools_ListOfShape aLS;
//
- GEOMAlgo_PassKey::SetIds(anId1, anId2, anId3);
+ aLS.Append(aS1);
+ aLS.Append(aS2);
+ aLS.Append(aS3);
+ SetShapes(aLS);
}
//=======================================================================
-//function :SetIds
+//function :SetShapes
//purpose :
//=======================================================================
- void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2,
- const TopoDS_Shape& aS3,
- const TopoDS_Shape& aS4)
+ void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
+ const TopoDS_Shape& aS2,
+ const TopoDS_Shape& aS3,
+ const TopoDS_Shape& aS4)
{
- Standard_Integer anId1, anId2, anId3, anId4;
+ TopTools_ListOfShape aLS;
//
- anId1=aS1.HashCode(myUpper);
- anId2=aS2.HashCode(myUpper);
- anId3=aS3.HashCode(myUpper);
- anId4=aS4.HashCode(myUpper);
- //
- GEOMAlgo_PassKey::SetIds(anId1, anId2, anId3, anId4);
+ aLS.Append(aS1);
+ aLS.Append(aS2);
+ aLS.Append(aS3);
+ aLS.Append(aS4);
+ SetShapes(aLS);
}
//=======================================================================
-//function :SetIds
+//function :SetShapes
//purpose :
//=======================================================================
- void GEOMAlgo_PassKeyShape::SetIds(const TopTools_ListOfShape& aLS)
+ void GEOMAlgo_PassKeyShape::SetShapes(const TopTools_ListOfShape& aLS)
{
- Standard_Integer anId;
+ Standard_Integer i, aId, aIdN;
TopTools_ListIteratorOfListOfShape aIt;
- TColStd_ListOfInteger aLI;
- //
- //aNb=aLS.Extent();
- //if (aNb<1 || aNb > myNbMax) {
- // return;
- //}
//
- //myNbIds=aNb;
- //mySum=0;
- //i=myNbMax-myNbIds;
-
+ Clear();
aIt.Initialize(aLS);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
- anId=aS.HashCode(myUpper);
- aLI.Append(anId);
+ myMap.Add(aS);
+ }
+ myNbIds=myMap.Extent();
+ for(i=1; i<=myNbIds; ++i) {
+ const TopoDS_Shape& aS=myMap(i);
+ aId=aS.HashCode(myUpper);
+ aIdN=NormalizedId(aId, myNbIds);
+ mySum+=aIdN;
+ }
+}
+//=======================================================================
+//function :NbIds
+//purpose :
+//=======================================================================
+ Standard_Integer GEOMAlgo_PassKeyShape::NbIds()const
+{
+ return myNbIds;
+}
+//=======================================================================
+//function :IsEqual
+//purpose :
+//=======================================================================
+ Standard_Boolean GEOMAlgo_PassKeyShape::IsEqual(const GEOMAlgo_PassKeyShape& aOther) const
+{
+ Standard_Boolean bRet;
+ Standard_Integer i;
+ //
+ bRet=Standard_False;
+ //
+ if (myNbIds!=aOther.myNbIds) {
+ return bRet;
+ }
+ for (i=1; i<=myNbIds; ++i) {
+ const TopoDS_Shape& aS=myMap(i);
+ if (!aOther.myMap.Contains(aS)) {
+ return bRet;
+ }
+ }
+ return !bRet;
+}
+//=======================================================================
+//function : HashCode
+//purpose :
+//=======================================================================
+ Standard_Integer GEOMAlgo_PassKeyShape::HashCode(const Standard_Integer aUpper) const
+{
+ return ::HashCode(mySum, aUpper);
+}
+//=======================================================================
+//function : Dump
+//purpose :
+//=======================================================================
+ void GEOMAlgo_PassKeyShape::Dump(const Standard_Integer)const
+{
+}
+//=======================================================================
+// function: NormalizedId
+// purpose :
+//=======================================================================
+Standard_Integer NormalizedId(const Standard_Integer aId,
+ const Standard_Integer aDiv)
+{
+ Standard_Integer aMax, aTresh, aIdRet;
+ //
+ aIdRet=aId;
+ aMax=::IntegerLast();
+ aTresh=aMax/aDiv;
+ if (aId>aTresh) {
+ aIdRet=aId%aTresh;
}
- GEOMAlgo_PassKey::SetIds(aLI);
+ return aIdRet;
}
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
-#ifndef _GEOMAlgo_PassKey_HeaderFile
-#include <GEOMAlgo_PassKey.hxx>
+#ifndef _TopTools_IndexedMapOfShape_HeaderFile
+#include <TopTools_IndexedMapOfShape.hxx>
+#endif
+#ifndef _Standard_Boolean_HeaderFile
+#include <Standard_Boolean.hxx>
#endif
class TopoDS_Shape;
class TopTools_ListOfShape;
#include <Standard_Macro.hxx>
#endif
-class GEOMAlgo_PassKeyShape : public GEOMAlgo_PassKey {
+
+class GEOMAlgo_PassKeyShape {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_PassKeyShape();
-Standard_EXPORT void SetIds(const TopoDS_Shape& aS) ;
-Standard_EXPORT void SetIds(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ;
-Standard_EXPORT void SetIds(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3) ;
-Standard_EXPORT void SetIds(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3,const TopoDS_Shape& aS4) ;
-Standard_EXPORT void SetIds(const TopTools_ListOfShape& aLS) ;
+Standard_EXPORT virtual ~GEOMAlgo_PassKeyShape();
+
+
+Standard_EXPORT GEOMAlgo_PassKeyShape(const GEOMAlgo_PassKeyShape& Other);
+
+
+Standard_EXPORT GEOMAlgo_PassKeyShape& Assign(const GEOMAlgo_PassKeyShape& Other) ;
+ GEOMAlgo_PassKeyShape& operator =(const GEOMAlgo_PassKeyShape& Other)
+{
+ return Assign(Other);
+}
+
+
+
+Standard_EXPORT void SetShapes(const TopoDS_Shape& aS) ;
+
+
+Standard_EXPORT void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ;
+
+
+Standard_EXPORT void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3) ;
+
+
+Standard_EXPORT void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3,const TopoDS_Shape& aS4) ;
+
+
+Standard_EXPORT void SetShapes(const TopTools_ListOfShape& aLS) ;
+
+
+Standard_EXPORT void Clear() ;
+
+
+Standard_EXPORT Standard_Integer NbIds() const;
+
+
+Standard_EXPORT Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aOther) const;
+
+
+Standard_EXPORT Standard_Integer HashCode(const Standard_Integer Upper) const;
+
+
+Standard_EXPORT void Dump(const Standard_Integer aHex = 0) const;
// Fields PROTECTED
//
+Standard_Integer myNbIds;
+Standard_Integer mySum;
Standard_Integer myUpper;
+TopTools_IndexedMapOfShape myMap;
private:
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_ShapeAlgo.cdl
-- Created: Tue Dec 7 12:05:19 2004
-- Author: Peter KURNEV
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_ShapeAlgo : public GEOMAlgo_Algo {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT void SetShape(const TopoDS_Shape& aS) ;
+
+
Standard_EXPORT void SetTolerance(const Standard_Real aT) ;
+
+
Standard_EXPORT const TopoDS_Shape& Shape() const;
+
+
Standard_EXPORT Standard_Real Tolerance() const;
+
+
Standard_EXPORT const TopoDS_Shape& Result() const;
// Methods PROTECTED
//
+
+
Standard_EXPORT GEOMAlgo_ShapeAlgo();
Standard_EXPORT virtual ~GEOMAlgo_ShapeAlgo();
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_ShapeSolid.cdl
-- Created: Thu Jan 13 12:44:07 2005
-- Author: Peter KURNEV
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_ShapeSolid : public GEOMAlgo_Algo {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT void SetFiller(const BOPTools_DSFiller& aDSF) ;
Standard_EXPORT virtual ~GEOMAlgo_ShapeSolid();
+
+
Standard_EXPORT const TopTools_ListOfShape& Shapes(const TopAbs_State aState) const;
// Methods PROTECTED
//
+
+
Standard_EXPORT GEOMAlgo_ShapeSolid();
+
+
Standard_EXPORT virtual void BuildResult() = 0;
+
+
Standard_EXPORT virtual void Prepare() = 0;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _BOPTools_DSFiller_HeaderFile
#include <BOPTools_DSFiller.hxx>
#endif
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_ShellSolid.cdl
-- Created: Wed Jan 12 12:45:20 2005
-- Author: Peter KURNEV
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_ShellSolid : public GEOMAlgo_ShapeSolid {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_ShellSolid();
Standard_EXPORT virtual ~GEOMAlgo_ShellSolid();
+
+
Standard_EXPORT virtual void Perform() ;
// Methods PROTECTED
//
+
+
Standard_EXPORT virtual void Prepare() ;
+
+
Standard_EXPORT virtual void BuildResult() ;
+
+
Standard_EXPORT void DetectSDFaces() ;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _GEOMAlgo_ShellSolid_HeaderFile
#include <GEOMAlgo_ShellSolid.hxx>
#endif
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_SolidSolid.cdl
-- Created: Wed Jan 26 12:05:14 2005
-- Author: Peter KURNEV
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_SolidSolid : public GEOMAlgo_ShellSolid {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_SolidSolid();
Standard_EXPORT virtual ~GEOMAlgo_SolidSolid();
+
+
Standard_EXPORT virtual void Perform() ;
+
+
Standard_EXPORT void SetShape2(const TopoDS_Shape& aS) ;
+
+
Standard_EXPORT const TopoDS_Shape& Shape2() const;
// Methods PROTECTED
//
+
+
Standard_EXPORT virtual void BuildResult() ;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _GEOMAlgo_State_HeaderFile
#define _GEOMAlgo_State_HeaderFile
+
enum GEOMAlgo_State {
GEOMAlgo_ST_UNKNOWN,
GEOMAlgo_ST_IN,
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_StateCollector.cdl
-- Created: Thu Mar 10 09:39:25 2005
-- Author: Peter KURNEV
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_StateCollector {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_StateCollector();
+
+
Standard_EXPORT Standard_Boolean AppendState(const TopAbs_State aSt) ;
+
+
Standard_EXPORT TopAbs_State State() const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _GEOMAlgo_StateCollector_HeaderFile
#include <GEOMAlgo_StateCollector.hxx>
#endif
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_SurfaceTools.cdl
-- Created: Thu Jan 27 11:03:49 2005
-- Author: Peter KURNEV
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_SurfaceTools {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT static Standard_Boolean IsAnalytic(const Handle(Geom_Surface)& aS) ;
+
+
Standard_EXPORT static Standard_Boolean IsCoaxial(const gp_Pnt& aP1,const gp_Pnt& aP2,const gp_Cylinder& aCyl,const Standard_Real aTol) ;
+
+
Standard_EXPORT static Standard_Boolean IsConformState(const TopAbs_State aST1,const GEOMAlgo_State aST2) ;
+
+
Standard_EXPORT static Standard_Integer GetState(const gp_Pnt& aP,const GeomAdaptor_Surface& aS,const Standard_Real aTol,TopAbs_State& aSt) ;
+
+
Standard_EXPORT static Standard_Integer GetState(const gp_Pnt& aP,const Handle(Geom_Surface)& aS,const Standard_Real aTol,TopAbs_State& aSt) ;
+
+
Standard_EXPORT static Standard_Real Distance(const gp_Pnt& aP,const gp_Pln& aPln) ;
+
+
Standard_EXPORT static Standard_Real Distance(const gp_Pnt& aP,const gp_Cylinder& aCyl) ;
+
+
Standard_EXPORT static Standard_Real Distance(const gp_Pnt& aP,const gp_Sphere& aSph) ;
+
+
Standard_EXPORT static TopAbs_State ReverseState(const TopAbs_State aSt) ;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _Geom_Surface_HeaderFile
#include <Geom_Surface.hxx>
#endif
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_Tools.cdl
-- Created: Mon Dec 6 11:26:02 2004
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright: Matra Datavision 2004
class Tools from GEOMAlgo
ListOfShape from TopTools,
IndexedDataMapOfShapeListOfShape from TopTools,
Context from IntTools,
- IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo
+ IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo --qft
--raises
returns Boolean from Standard;
RefineSDShapes(myclass;
- aMSD:out IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo;
+ aMSD:out IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo; --qft
aTol:Real from Standard;
aCtx:out Context from IntTools)
returns Integer from Standard;
#include <BOPTools_Tools2D.hxx>
#include <IntTools_Context.hxx>
-#include <GEOMAlgo_PassKeyShape.hxx>
-#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
+#include <GEOMAlgo_PassKeyShape.hxx>//qft
+#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>//qft
static
void GetCount(const TopoDS_Shape& aS,
//function : RefineSDShapes
//purpose :
//=======================================================================
-Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape &aMPKLE,
- const Standard_Real aTol,
- IntTools_Context& aCtx)
+ Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE,
+ const Standard_Real aTol,
+ IntTools_Context& aCtx)
{
Standard_Integer i, aNbE, iErr, j, aNbEE, aNbToAdd;
TopTools_IndexedDataMapOfShapeListOfShape aMEE, aMSDE, aMEToAdd;
const TopoDS_Shape& aE1=aMEToAdd.FindKey(i);
const TopTools_ListOfShape& aLE=aMEToAdd(i);
//
- aPKE1.SetIds(aE1);
+ //qf
+ //aPKE1.SetIds(aE1);
+ aPKE1.SetShapes(aE1);
+ //qt
aMPKLE.Add(aPKE1, aLE);
}
//
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_Tools {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT static Standard_Boolean IsCompositeShape(const TopoDS_Shape& aS) ;
+
+
Standard_EXPORT static Standard_Integer RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD,const Standard_Real aTol,IntTools_Context& aCtx) ;
+
+
Standard_EXPORT static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,const Standard_Real aTol,TopTools_IndexedDataMapOfShapeListOfShape& aMEE,IntTools_Context& aCtx) ;
+
+
Standard_EXPORT static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1,const TopTools_ListOfShape& aLE,const Standard_Real aTol,TopTools_ListOfShape& aLESD,IntTools_Context& aCtx) ;
+
+
Standard_EXPORT static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1,const TopoDS_Shape& aS,gp_Pnt& aP2,IntTools_Context& aCtx) ;
+
+
Standard_EXPORT static void PointOnShape(const TopoDS_Shape& aS,gp_Pnt& aP3D) ;
+
+
Standard_EXPORT static void PointOnEdge(const TopoDS_Edge& aE,gp_Pnt& aP3D) ;
+
+
Standard_EXPORT static void PointOnEdge(const TopoDS_Edge& aE,const Standard_Real aT,gp_Pnt& aP3D) ;
+
+
Standard_EXPORT static void PointOnFace(const TopoDS_Face& aF,gp_Pnt& aP3D) ;
+
+
Standard_EXPORT static void PointOnFace(const TopoDS_Face& aF,const Standard_Real aU,const Standard_Real aV,gp_Pnt& aP3D) ;
+
+
Standard_EXPORT static void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,const TopoDS_Face& aF,const Standard_Real aU1,const Standard_Real aU2) ;
+
+
Standard_EXPORT static Standard_Boolean IsUPeriodic(const Handle(Geom_Surface)& aS) ;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_VertexSolid.cdl
-- Created: Wed Jan 12 16:34:53 2005
-- Author: Peter KURNEV
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_VertexSolid : public GEOMAlgo_ShapeSolid {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_VertexSolid();
Standard_EXPORT virtual ~GEOMAlgo_VertexSolid();
+
+
Standard_EXPORT virtual void Perform() ;
// Methods PROTECTED
//
+
+
Standard_EXPORT virtual void Prepare() ;
+
+
Standard_EXPORT virtual void BuildResult() ;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _GEOMAlgo_VertexSolid_HeaderFile
#include <GEOMAlgo_VertexSolid.hxx>
#endif
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+--
-- File: GEOMAlgo_WireSolid.cdl
-- Created: Wed Jan 12 10:17:00 2005
-- Author: Peter KURNEV
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class GEOMAlgo_WireSolid : public GEOMAlgo_ShapeSolid {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT GEOMAlgo_WireSolid();
Standard_EXPORT virtual ~GEOMAlgo_WireSolid();
+
+
Standard_EXPORT virtual void Perform() ;
// Methods PROTECTED
//
+
+
Standard_EXPORT virtual void Prepare() ;
+
+
Standard_EXPORT virtual void BuildResult() ;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _GEOMAlgo_WireSolid_HeaderFile
#include <GEOMAlgo_WireSolid.hxx>
#endif
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) : public Handle(TCollection_MapNode) {
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)():Handle(TCollection_MapNode)() {}
Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)(const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle)
{
return *this;
}
- GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger* operator->()
- {
- return (GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger *)ControlAccess();
- }
-
- GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger* operator->() const
+ GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger* operator->() const
{
return (GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger *)ControlAccess();
}
- Standard_EXPORT ~Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)();
+// Standard_EXPORT ~Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)();
Standard_EXPORT static const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) DownCast(const Handle(Standard_Transient)& AnObject);
};
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) : public Handle(TCollection_MapNode) {
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)():Handle(TCollection_MapNode)() {}
Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& aHandle) : Handle(TCollection_MapNode)(aHandle)
{
return *this;
}
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* operator->()
- {
- return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape *)ControlAccess();
- }
-
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* operator->() const
+ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* operator->() const
{
return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape *)ControlAccess();
}
- Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)();
+// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)();
Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) DownCast(const Handle(Standard_Transient)& AnObject);
};
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) : public Handle(TCollection_MapNode) {
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)():Handle(TCollection_MapNode)() {}
Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle)
{
return *this;
}
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape* operator->()
- {
- return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape *)ControlAccess();
- }
-
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape* operator->() const
+ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape* operator->() const
{
return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape *)ControlAccess();
}
- Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)();
+// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)();
Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) DownCast(const Handle(Standard_Transient)& AnObject);
};
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) : public Handle(TCollection_MapNode) {
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)():Handle(TCollection_MapNode)() {}
Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& aHandle) : Handle(TCollection_MapNode)(aHandle)
{
return *this;
}
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* operator->()
- {
- return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox *)ControlAccess();
- }
-
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* operator->() const
+ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* operator->() const
{
return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox *)ControlAccess();
}
- Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)();
+// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)();
Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) DownCast(const Handle(Standard_Transient)& AnObject);
};
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) : public Handle(TCollection_MapNode) {
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)():Handle(TCollection_MapNode)() {}
Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)& aHandle) : Handle(TCollection_MapNode)(aHandle)
{
return *this;
}
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState* operator->()
- {
- return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState *)ControlAccess();
- }
-
- GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState* operator->() const
+ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState* operator->() const
{
return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState *)ControlAccess();
}
- Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)();
+// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)();
Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) DownCast(const Handle(Standard_Transient)& AnObject);
};
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) : public Handle(TCollection_MapNode) {
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)():Handle(TCollection_MapNode)() {}
Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)(const Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)& aHandle) : Handle(TCollection_MapNode)(aHandle)
{
return *this;
}
- GEOMAlgo_ListNodeOfListOfCoupleOfShapes* operator->()
- {
- return (GEOMAlgo_ListNodeOfListOfCoupleOfShapes *)ControlAccess();
- }
-
- GEOMAlgo_ListNodeOfListOfCoupleOfShapes* operator->() const
+ GEOMAlgo_ListNodeOfListOfCoupleOfShapes* operator->() const
{
return (GEOMAlgo_ListNodeOfListOfCoupleOfShapes *)ControlAccess();
}
- Standard_EXPORT ~Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)();
+// Standard_EXPORT ~Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)();
Standard_EXPORT static const Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) DownCast(const Handle(Standard_Transient)& AnObject);
};
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Handle(GEOMAlgo_ListNodeOfListOfPnt) : public Handle(TCollection_MapNode) {
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
Handle(GEOMAlgo_ListNodeOfListOfPnt)():Handle(TCollection_MapNode)() {}
Handle(GEOMAlgo_ListNodeOfListOfPnt)(const Handle(GEOMAlgo_ListNodeOfListOfPnt)& aHandle) : Handle(TCollection_MapNode)(aHandle)
{
return *this;
}
- GEOMAlgo_ListNodeOfListOfPnt* operator->()
- {
- return (GEOMAlgo_ListNodeOfListOfPnt *)ControlAccess();
- }
-
- GEOMAlgo_ListNodeOfListOfPnt* operator->() const
+ GEOMAlgo_ListNodeOfListOfPnt* operator->() const
{
return (GEOMAlgo_ListNodeOfListOfPnt *)ControlAccess();
}
- Standard_EXPORT ~Handle(GEOMAlgo_ListNodeOfListOfPnt)();
+// Standard_EXPORT ~Handle(GEOMAlgo_ListNodeOfListOfPnt)();
Standard_EXPORT static const Handle(GEOMAlgo_ListNodeOfListOfPnt) DownCast(const Handle(Standard_Transient)& AnObject);
};
BlockFix_UnionEdges.cxx \
BlockFix_UnionFaces.cxx \
GEOMAlgo_Algo.cxx \
+ GEOMAlgo_Builder_0.cxx \
+ GEOMAlgo_Builder_1.cxx \
+ GEOMAlgo_Builder_2.cxx \
+ GEOMAlgo_Builder_3.cxx \
+ GEOMAlgo_Builder_4.cxx \
+ GEOMAlgo_BuilderArea.cxx \
+ GEOMAlgo_Builder.cxx \
+ GEOMAlgo_BuilderFace.cxx \
+ GEOMAlgo_BuilderShape.cxx \
+ GEOMAlgo_BuilderSolid.cxx \
+ GEOMAlgo_BuilderTools.cxx \
+ GEOMAlgo_ClsfBox.cxx \
+ GEOMAlgo_Clsf.cxx \
+ GEOMAlgo_ClsfSurf.cxx \
GEOMAlgo_CoupleOfShapes.cxx \
GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx \
+ GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_0.cxx \
+ GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_0.cxx \
+ GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_0.cxx \
GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx \
+ GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_0.cxx \
+ GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_0.cxx \
+ GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_0.cxx \
GEOMAlgo_DataMapOfPassKeyInteger_0.cxx \
+ GEOMAlgo_DataMapOfRealListOfShape_0.cxx \
+ GEOMAlgo_DataMapOfShapeReal_0.cxx \
+ GEOMAlgo_DataMapOfShapeShapeSet_0.cxx \
GEOMAlgo_FinderShapeOn1.cxx \
+ GEOMAlgo_FinderShapeOn2.cxx \
+ GEOMAlgo_FinderShapeOn.cxx \
GEOMAlgo_FinderShapeOnQuad.cxx \
GEOMAlgo_GlueAnalyser.cxx \
GEOMAlgo_Gluer.cxx \
+ GEOMAlgo_HAlgo.cxx \
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx \
+ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx \
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx \
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx \
GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx \
GEOMAlgo_IndexedDataMapOfIntegerShape_0.cxx \
+ GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_0.cxx \
GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx \
GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx \
GEOMAlgo_IndexedDataMapOfShapeState_0.cxx \
GEOMAlgo_PassKey.cxx \
GEOMAlgo_PassKeyMapHasher.cxx \
GEOMAlgo_PassKeyShape.cxx \
+ GEOMAlgo_PassKeyShapeMapHasher.cxx \
GEOMAlgo_ShapeAlgo.cxx \
+ GEOMAlgo_ShapeSet.cxx \
+ GEOMAlgo_ShapeSolid.cxx \
+ GEOMAlgo_ShellSolid.cxx \
+ GEOMAlgo_SolidSolid.cxx \
+ GEOMAlgo_Splitter.cxx \
GEOMAlgo_StateCollector.cxx \
GEOMAlgo_SurfaceTools.cxx \
- GEOMAlgo_Tools.cxx
+ GEOMAlgo_Tools3D.cxx \
+ GEOMAlgo_Tools.cxx \
+ GEOMAlgo_VertexSolid.cxx \
+ GEOMAlgo_WESCorrector.cxx \
+ GEOMAlgo_WireEdgeSet.cxx \
+ GEOMAlgo_WireSolid.cxx \
+ GEOMAlgo_WireSplitter.cxx
LIB_CLIENT_IDL =
LIB_SERVER_IDL =
BlockFix_CheckTool.hxx \
Handle_BlockFix_BlockFixAPI.hxx \
GEOMAlgo_Algo.hxx \
+ GEOMAlgo_BuilderArea.hxx \
+ GEOMAlgo_BuilderFace.hxx \
+ GEOMAlgo_Builder.hxx \
+ GEOMAlgo_BuilderShape.hxx \
+ GEOMAlgo_BuilderSolid.hxx \
+ GEOMAlgo_BuilderTools.hxx \
+ GEOMAlgo_ClsfBox.hxx \
+ GEOMAlgo_Clsf.hxx \
+ GEOMAlgo_ClsfSurf.hxx \
GEOMAlgo_CoupleOfShapes.hxx \
- GEOMAlgo_GlueAnalyser.hxx \
- GEOMAlgo_Gluer.hxx \
+ GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx \
+ GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx \
+ GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx \
+ GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx \
+ GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx \
+ GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx \
+ GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx \
+ GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx \
+ GEOMAlgo_DataMapOfPassKeyInteger.hxx \
+ GEOMAlgo_DataMapOfRealListOfShape.hxx \
+ GEOMAlgo_DataMapOfShapeReal.hxx \
+ GEOMAlgo_DataMapOfShapeShapeSet.hxx \
GEOMAlgo_FinderShapeOn1.hxx \
+ GEOMAlgo_FinderShapeOn2.hxx \
+ GEOMAlgo_FinderShapeOn.hxx \
GEOMAlgo_FinderShapeOnQuad.hxx \
+ GEOMAlgo_GlueAnalyser.hxx \
+ GEOMAlgo_Gluer.hxx \
+ GEOMAlgo_HAlgo.hxx \
+ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \
+ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx \
+ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx \
+ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx \
+ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx \
+ GEOMAlgo_IndexedDataMapOfIntegerShape.hxx \
+ GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx \
+ GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx \
+ GEOMAlgo_IndexedDataMapOfShapeBox.hxx \
GEOMAlgo_IndexedDataMapOfShapeState.hxx \
GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx \
+ GEOMAlgo_ListIteratorOfListOfPnt.hxx \
+ GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx \
+ GEOMAlgo_ListNodeOfListOfPnt.hxx \
GEOMAlgo_ListOfCoupleOfShapes.hxx \
+ GEOMAlgo_ListOfPnt.hxx \
+ GEOMAlgo_PassKey.hxx \
+ GEOMAlgo_PassKeyMapHasher.hxx \
+ GEOMAlgo_PassKeyShape.hxx \
+ GEOMAlgo_PassKeyShapeMapHasher.hxx \
+ GEOMAlgo_PWireEdgeSet.hxx \
GEOMAlgo_ShapeAlgo.hxx \
+ GEOMAlgo_ShapeSet.hxx \
+ GEOMAlgo_ShapeSolid.hxx \
+ GEOMAlgo_ShellSolid.hxx \
+ GEOMAlgo_SolidSolid.hxx \
+ GEOMAlgo_Splitter.hxx \
+ GEOMAlgo_StateCollector.hxx \
GEOMAlgo_State.hxx \
+ GEOMAlgo_SurfaceTools.hxx \
+ GEOMAlgo_Tools3D.hxx \
+ GEOMAlgo_Tools.hxx \
+ GEOMAlgo_VertexSolid.hxx \
+ GEOMAlgo_WESCorrector.hxx \
+ GEOMAlgo_WireEdgeSet.hxx \
+ GEOMAlgo_WireSolid.hxx \
+ GEOMAlgo_WireSplitter.hxx \
+ Handle_GEOMAlgo_ClsfBox.hxx \
+ Handle_GEOMAlgo_Clsf.hxx \
+ Handle_GEOMAlgo_ClsfSurf.hxx \
+ Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx \
+ Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx \
+ Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx \
+ Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx \
+ Handle_GEOMAlgo_HAlgo.hxx \
+ Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \
+ Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx \
+ Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx \
+ Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx \
Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx \
- Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx
+ Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx \
+ Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx
# idl files
EXPORT_IDLS=
#include <qvaluelist.h>
#include <qstringlist.h>
+#include <set>
+
#include "GEOMImpl_Types.hxx"
using namespace std;
{
QString aName = "";
- SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
+ // collect all object names of GEOM component
+ SalomeApp_Study* appStudy =
+ dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
if ( !appStudy ) return aName;
_PTR(Study) aStudy = appStudy->studyDS();
- int aNumber = 0;
- _PTR(SObject) obj;
- do
- {
- aName = theOperation+"_"+QString::number(++aNumber);
- obj = aStudy->FindObject(aName.latin1());
+ std::set<std::string> aSet;
+ _PTR(SComponent) aGeomCompo (aStudy->FindComponent("GEOM"));
+ if (aGeomCompo) {
+ _PTR(ChildIterator) it (aStudy->NewChildIterator(aGeomCompo));
+ _PTR(SObject) obj;
+ for (it->InitEx(true); it->More(); it->Next()) {
+ obj = it->Value();
+ aSet.insert(obj->GetName());
}
- while (obj);
+ }
+
+ // build a unique name
+ int aNumber = 0;
+ bool isUnique = false;
+ while (!isUnique) {
+ aName = theOperation + "_" + QString::number(++aNumber);
+ isUnique = (aSet.count(aName.latin1()) == 0);
+ }
return aName;
}
if ( appStudy )
{
- string anIOR = SalomeApp_Application::orb()->object_to_string( theObj );
- if ( anIOR != "" )
+ CORBA::String_var anIOR = SalomeApp_Application::orb()->object_to_string( theObj );
+ if ( strcmp(anIOR.in(), "") != 0 )
{
- _PTR(SObject) aSObj ( appStudy->studyDS()->FindObjectIOR( anIOR ) );
+ _PTR(SObject) aSObj ( appStudy->studyDS()->FindObjectIOR( string( anIOR ) ) );
_PTR(GenericAttribute) anAttr;
#ifndef GEOMBASE_H
#define GEOMBASE_H
+#include "GEOM_GEOMBase.hxx"
+
// SALOME Includes
#include "GEOM_AISShape.hxx"
// QT Includes
#include <qstring.h>
-//#if defined WNT
-//#include <SALOME_WNT.hxx>
-//#else
-//#define SALOME_WNT_EXPORT
-//#endif
-
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define GEOMBASE_WNT_EXPORT __declspec( dllexport )
-#else
-#define GEOMBASE_WNT_EXPORT
-#endif
class GEOM_Actor;
class SALOME_ListIO;
// class : GEOMBase
// purpose :
//=================================================================================
-class GEOMBASE_WNT_EXPORT GEOMBase
+class GEOMBASE_EXPORT GEOMBase
{
public :
/* Selection and objects management */
SalomeApp_Study* aDoc = getStudy();
if ( aDoc && aDoc->studyDS() ) {
_PTR(Study) aStudy = aDoc->studyDS();
- _PTR(SObject) aSObj (aStudy->FindObjectIOR(SalomeApp_Application::orb()->object_to_string(object)));
+ CORBA::String_var objStr = SalomeApp_Application::orb()->object_to_string(object);
+ _PTR(SObject) aSObj (aStudy->FindObjectIOR(string(objStr.in())));
if ( aSObj ) {
_PTR(ChildIterator) anIt ( aStudy->NewChildIterator( aSObj ) );
for ( anIt->InitEx( true ); anIt->More(); anIt->Next() ) {
getDisplayer()->SetToActivate( activate );
// Make a reference to GEOM_Object
- getDisplayer()->SetName( SalomeApp_Application::orb()->object_to_string( object ) );
+ CORBA::String_var objStr = SalomeApp_Application::orb()->object_to_string( object );
+ getDisplayer()->SetName( objStr.in() );
// Build prs
SALOME_Prs* aPrs = getDisplayer()->BuildPrs( object );
{
SalomeApp_Study* study = getStudy();
if ( study ) {
- string IOR = GEOMBase::GetIORFromObject( object);
+ char * objIOR = GEOMBase::GetIORFromObject( object );
+ string IOR( objIOR );
+ free( objIOR );
if ( IOR != "" ) {
_PTR(SObject) SO ( study->studyDS()->FindObjectIOR( IOR ) );
if ( SO ) {
- return TCollection_AsciiString((char*)SO->GetID().c_str()).ToCString();
+ return TCollection_AsciiString((char*)SO->GetID().c_str()).ToCString();
}
}
}
if ( CORBA::is_nil( theObj ) )
return;
- string IOR = SalomeApp_Application::orb()->object_to_string( theObj );
- TCollection_AsciiString asciiIOR( strdup( IOR.c_str() ) );
+ CORBA::String_var IOR = SalomeApp_Application::orb()->object_to_string( theObj );
+ TCollection_AsciiString asciiIOR( (char *)IOR.in() );
GEOM_Client().RemoveShapeFromBuffer( asciiIOR );
if ( !getStudy() || !getStudy()->studyDS() )
return;
_PTR(Study) aStudy = getStudy()->studyDS();
- _PTR(SObject) aSObj ( aStudy->FindObjectIOR( IOR ) );
+ _PTR(SObject) aSObj ( aStudy->FindObjectIOR( string( IOR ) ) );
if ( !aSObj )
return;
#ifndef GEOMBASE_HELPER_H
#define GEOMBASE_HELPER_H
+#include "GEOM_GEOMBase.hxx"
+
#include "GEOM_Displayer.h"
#include "SALOME_Prs.h"
#include "SALOME_ListIO.hxx"
#include <qstring.h>
#include <list>
-//#if defined WNT
-//#include <SALOME_WNT.hxx>
-//#else
-//#define SALOME_WNT_EXPORT
-//#endif
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define GEOMBASE_WNT_EXPORT __declspec( dllexport )
-#else
-#define GEOMBASE_WNT_EXPORT
-#endif
+
typedef std::list<GEOM::GEOM_Object_ptr> ObjectList;
class SalomeApp_Study;
// performing common operations (display/erase, selection activation,
// publication in a study, transaction management)
//================================================================
-class GEOMBASE_WNT_EXPORT GEOMBase_Helper
+class GEOMBASE_EXPORT GEOMBase_Helper
{
public:
GEOMBase_Helper( SUIT_Desktop* );
if (app)
app->onHelpContextModule(myGeomGUI ? app->moduleName(myGeomGUI->moduleName()) : QString(""), myHelpFileName);
else {
+ QString platform;
+#ifdef WIN32
+ platform = "winapplication";
+#else
+ platform = "application";
+#endif
SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName),
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName),
QObject::tr("BUT_OK"));
}
}
#ifndef GEOMBASE_SKELETON_H
#define GEOMBASE_SKELETON_H
+#include "GEOM_GEOMBase.hxx"
+
#include "DlgRef_Skeleton_QTD.h"
#include "GEOMBase.h"
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qbuttongroup.h>
-//#if defined WNT
-//#include <SALOME_WNT.hxx>
-//#else
-//#define SALOME_WNT_EXPORT
-//#endif
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define GEOMBASE_WNT_EXPORT __declspec( dllexport )
-#else
-#define GEOMBASE_WNT_EXPORT
-#endif
-
-class GEOMBASE_WNT_EXPORT GEOMBase_Skeleton : public DlgRef_Skeleton_QTD, public GEOMBase_Helper
+
+class GEOMBASE_EXPORT GEOMBase_Skeleton : public DlgRef_Skeleton_QTD, public GEOMBase_Helper
{
Q_OBJECT
#ifndef GEOMBase_aParameterDLG_H
#define GEOMBase_aParameterDLG_H
+#include "GEOM_GEOMBase.hxx"
+
#include <qdialog.h>
class QPushButton;
// class : GEOMBase_aParameterDlg
// purpose :
//=================================================================================
-class GEOMBase_aParameterDlg : public QDialog
+class GEOMBASE_EXPORT GEOMBase_aParameterDlg : public QDialog
{
Q_OBJECT
#ifndef GEOM_OPERATION_H
#define GEOM_OPERATION_H
+#include "GEOM_GEOMBase.hxx"
+
#include "SUIT_Operation.h"
#include <SALOMEconfig.h>
-#include <Standard_Macro.hxx>
#include CORBA_CLIENT_HEADER(GEOM_Gen)
-class Standard_EXPORT GEOM_Operation : public SUIT_Operation
+class GEOMBASE_EXPORT GEOM_Operation : public SUIT_Operation
{
public:
GEOM_Operation( SUIT_Application*, GEOM::GEOM_IOperations_ptr );
EXPORT_HEADERS= GEOMBase.h \
GEOMBase_Skeleton.h \
GEOMBase_Helper.h \
- GEOM_Operation.h
+ GEOM_Operation.h \
+ GEOM_GEOMBase.hxx
LIB_SRC = GEOMBase.cxx \
GEOMBase_Skeleton.cxx \
SALOMEDS.idl \
SALOMEDS_Attributes.idl \
SALOME_GenericObj.idl \
+ SALOME_Component.idl \
GEOM_Gen.idl
LIB_SERVER_IDL =
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define GEOMCLIENT_WNT_EXPORT __declspec( dllexport )
+
+#ifdef WNT
+ #if defined GEOMCLIENT_EXPORTS
+ #if defined WIN32
+ #define GEOMCLIENT_EXPORT __declspec( dllexport )
+ #else
+ #define GEOMCLIENT_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define GEOMCLIENT_EXPORT __declspec( dllimport )
+ #else
+ #define GEOMCLIENT_EXPORT
+ #endif
+ #endif
#else
-#define GEOMCLIENT_WNT_EXPORT
+ #define GEOMCLIENT_EXPORT
#endif
//=====================================================================
// GEOM_Client : class definition
//=====================================================================
-class GEOMCLIENT_WNT_EXPORT GEOM_Client {
+class GEOMCLIENT_EXPORT GEOM_Client {
public:
// Module : GEOM
// $Header:
-using namespace std;
#include "GEOMContext.h"
#include "QAD_Tools.h"
+using namespace std;
+
/* The object itself created in the static method 'GetOrCreateGEOMBase()' */
static GEOMContext* GeomGUI = 0;
#include <OSD_SharedLibrary.hxx>
#include <qapplication.h>
+#ifdef WNT
+ #if defined GEOMCONTEXT_EXPORTS
+ #if defined WIN32
+ #define GEOM_CONTEXT_EXPORT __declspec( dllexport )
+ #else
+ #define GEOM_CONTEXT_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define GEOM_CONTEXT_EXPORT __declspec( dllimport )
+ #else
+ #define GEOM_CONTEXT_EXPORT
+ #endif
+ #endif
+#else
+ #define GEOM_CONTEXT_EXPORT
+#endif
+
//=================================================================================
// class : GEOMContext
// purpose :
//=================================================================================
-class GEOMContext : public QObject
+class GEOM_CONTEXT_EXPORT GEOMContext : public QObject
{
Q_OBJECT /* for QT compatibility */
msgid "ICON_DLG_ROTATION"
msgstr "rotate.png"
+#RotationDlg
+msgid "ICON_DLG_ROTATION_THREE_POINTS"
+msgstr "rotatepnt.png"
+
#ScaleDlg
msgid "ICON_DLG_SCALE"
msgstr "scale.png"
#if !defined( __GEOMGUI_H )
#define __GEOMGUI_H
+#include "GEOM_GEOMGUI.hxx"
+
#include <qobject.h>
class SUIT_Desktop;
class QKeyEvent;
class GeometryGUI;
-//#ifdef WNT
-//#include <SALOME_WNT.hxx>
-//#else
-//#define SALOME_WNT_EXPORT
-//#endif
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define GEOMGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define GEOMGUI_WNT_EXPORT
-#endif
//=================================================================================
// class : GEOMGUI
// purpose : Base class for all geometry GUI subclasses
//=================================================================================
-class GEOMGUI_WNT_EXPORT GEOMGUI : public QObject
+class GEOMGUI_EXPORT GEOMGUI : public QObject
{
public :
// Constructor
}
}
}
+ // add externally selected objects
+ SUIT_DataOwnerPtrList::const_iterator anExtIter;
+ for(anExtIter = getSelectedExt().begin(); anExtIter != getSelectedExt().end(); anExtIter++) {
+ aList.append(*anExtIter);
+ }
+
}
//================================================================
Handle(AIS_InteractiveContext) ic = vw->getAISContext();
-#ifndef WNT
NCollection_DataMap<TCollection_AsciiString, TColStd_IndexedMapOfInteger> indexesMap; // "entry - list_of_int" map for LOCAL selection
-#else
- NCollection_DataMap<Standard_CString, TColStd_IndexedMapOfInteger> indexesMap; // "entry - list_of_int" map for LOCAL selection
-#endif
QMap<QString,int> globalSelMap; // only Key=entry from this map is used. value(int) is NOT used at all.
SelectMgr_IndexedMapOfOwner ownersmap; // map of owners to be selected
if ( !anOwner->ComesFromDecomposition() && globalSelMap.contains( entryStr ) )
{
ownersmap.Add( anOwner );
+ globalSelMap[entryStr]++;
}
// LOCAL selection
else
}
vw->update();
+
+ // fill extra selected
+ clearSelExtOwners();
+ for ( SUIT_DataOwnerPtrList::const_iterator itr2 = aList.begin(); itr2 != aList.end(); ++itr2 ) {
+ const LightApp_DataSubOwner* subOwner = dynamic_cast<const LightApp_DataSubOwner*>( (*itr2).operator->() );
+ if ( !subOwner )
+ {
+ const LightApp_DataOwner* owner = dynamic_cast<const LightApp_DataOwner*>( (*itr2).operator->() );
+ if ( owner )
+ {
+ SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
+ QString anEntry = appStudy->referencedToEntry( owner->entry() );
+ if (globalSelMap[anEntry] == 1)
+ appendSelExtOwner(*itr2);
+ }
+ }
+ }
}
#ifndef GEOMGUI_OCCSELECTOR_H
#define GEOMGUI_OCCSELECTOR_H
+#include "GEOM_GEOMGUI.hxx"
+
#include <LightApp_OCCSelector.h>
-class GEOMGUI_OCCSelector : public LightApp_OCCSelector
+class GEOMGUI_EXPORT GEOMGUI_OCCSelector : public LightApp_OCCSelector
{
public:
GEOMGUI_OCCSelector( OCCViewer_Viewer*, SUIT_SelectionMgr* );
#ifndef GEOMGUI_SELECTION_HeaderFile
#define GEOMGUI_SELECTION_HeaderFile
+#include "GEOM_GEOMGUI.hxx"
+
#include <LightApp_Selection.h>
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(GEOM_Gen)
-class GEOMGUI_Selection : public LightApp_Selection
+class GEOMGUI_EXPORT GEOMGUI_Selection : public LightApp_Selection
{
public:
GEOMGUI_Selection();
SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( session->activeApplication() );
if ( app )
{
- string IOR = app->orb()->object_to_string( object );
- if ( IOR != "" )
+ CORBA::String_var IOR = app->orb()->object_to_string( object );
+ if ( strcmp(IOR.in(), "") != 0 )
{
SalomeApp_Study* study = ( SalomeApp_Study* )app->activeStudy();
- _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( IOR ) );
+ _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( string(IOR) ) );
if ( SO )
return SO->GetID();
}
SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( session->activeApplication() );
if ( app )
{
- string IOR = app->orb()->object_to_string( object );
- if ( IOR != "" )
+ CORBA::String_var IOR = app->orb()->object_to_string( object );
+ if ( strcmp(IOR.in(), "") != 0 )
{
SalomeApp_Study* study = ( SalomeApp_Study* )app->activeStudy();
- _PTR(SObject) aSObj ( study->studyDS()->FindObjectIOR( IOR ) );
+ _PTR(SObject) aSObj ( study->studyDS()->FindObjectIOR( string(IOR) ) );
_PTR(GenericAttribute) anAttr;
AISShape->SetDisplayMode( myDisplayMode );
AISShape->SetShadingColor( myShadingColor );
- // Set color for iso lines
+ // Set color and number for iso lines
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
QColor col = aResMgr->colorValue( "Geometry", "isos_color", QColor(int(0.5*255), int(0.5*255), int(0.5*255)) );
Quantity_Color aColor = SalomeApp_Tools::color( col );
-
+ int anUIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_u", 1);
+ int aVIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_v", 1);
+
Handle(Prs3d_IsoAspect) anAspect = AISShape->Attributes()->UIsoAspect();
+ anAspect->SetNumber( anUIsoNumber );
anAspect->SetColor( aColor );
AISShape->Attributes()->SetUIsoAspect( anAspect );
anAspect = AISShape->Attributes()->VIsoAspect();
+ anAspect->SetNumber( aVIsoNumber );
anAspect->SetColor( aColor );
AISShape->Attributes()->SetVIsoAspect( anAspect );
#if !defined (__GEOM_DISPLAYER_H)
#define __GEOM_DISPLAYER_H
+#include "GEOM_GEOMGUI.hxx"
+
#include "SALOME_Prs.h"
#include "SALOME_InteractiveObject.hxx"
#include "SALOME_ListIO.hxx"
class SUIT_SelectionFilter;
//class SALOME_Selection;
-//#ifdef WNT
-//#include <SALOME_WNT.hxx>
-//#else
-//#define SALOME_WNT_EXPORT
-//#endif
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define GEOMGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define GEOMGUI_WNT_EXPORT
-#endif
-
-class GEOMGUI_WNT_EXPORT GEOM_Displayer : public LightApp_Displayer
+class GEOMGUI_EXPORT GEOM_Displayer : public LightApp_Displayer
{
public:
msgid "ICON_DLG_ROTATION"
msgstr "rotate.png"
+#RotationDlg
+msgid "ICON_DLG_ROTATION_THREE_POINTS"
+msgstr "rotatepnt.png"
+
#ScaleDlg
msgid "ICON_DLG_SCALE"
msgstr "scale.png"
#: GeometryGUI_FaceDlg.cxx:78
msgid "GEOM_FACE_FFW"
-msgstr "Face from a wire"
+msgstr "Face from a closed wire and edge"
#: GeometryGUI_FaceDlg.cxx:103
msgid "GEOM_FACE_OPT"
msgid "PREF_TAB_SETTINGS"
msgstr "Settings"
+
+msgid "ERROR_SHAPE_TYPE"
+msgstr "Object of incorrect type selected!\nPlease, select face, shell or solid and try again"
+
+msgid "DEP_OBJECT"
+msgstr "Selected object has been used to create another one\n It can't be deleted "
// 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
//
//
//
//=======================================================================
// function : ClientSObjectToObject
-// purpose :
+// purpose :
//=======================================================================
CORBA::Object_var GeometryGUI::ClientSObjectToObject (_PTR(SObject) theSObject)
{
//=======================================================================
// function : ClientStudyToStudy
-// purpose :
+// purpose :
//=======================================================================
SALOMEDS::Study_var GeometryGUI::ClientStudyToStudy (_PTR(Study) theStudy)
{
SalomeApp_Module( "GEOM" )
{
if ( CORBA::is_nil( myComponentGeom ) )
- {
+ {
SALOME_LifeCycleCORBA* ls = new SALOME_LifeCycleCORBA( getApp()->namingService() );
Engines::Component_var comp = ls->FindOrLoad_Component( "FactoryServer", "GEOM" );
myComponentGeom = GEOM::GEOM_Gen::_narrow( comp );
}
-
+
myState = -1;
myActiveDialogBox = 0;
myFatherior = "";
bool ViewVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
// if current viewframe is not of OCC and not of VTK type - return immediately
// fix for IPAL8958 - allow some commands to execute even when NO viewer is active (rename for example)
- bool NotViewerDependentCommand = ( id == 901 || id == 216 || id == 213 );
+ bool NotViewerDependentCommand = ( id == 901 || id == 216 || id == 213 );
if ( !ViewOCC && !ViewVTK && !NotViewerDependentCommand )
return;
else if( id == 503 || // MENU OPERATION - PARTITION
id == 504 || // MENU OPERATION - ARCHIMEDE
id == 505 || // MENU OPERATION - FILLET
- id == 506 || // MENU OPERATION - CHAMFER
+ id == 506 || // MENU OPERATION - CHAMFER
id == 507 ) { // MENU OPERATION - CLIPPING RANGE
#ifndef WNT
library = getLibrary( "libOperationGUI.so" );
}
// call method of corresponding GUI library
- if ( library )
+ if ( library )
library->OnGUIEvent( id, desk );
- else
+ else
SUIT_MessageBox::error1( desk, tr( "GEOM_ERROR" ), tr( "GEOM_ERR_LIB_NOT_FOUND" ), tr( "GEOM_BUT_OK" ) );
}
// purpose : Manages mouse move events [static]
//=================================================================================
void GeometryGUI::OnMouseMove( SUIT_ViewWindow* win, QMouseEvent* pe )
-{
+{
GUIMap::Iterator it;
bool bOk = true;
for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) {
{
QMenuBar* Mb = parent->getMainMenuBar();
SUIT_Study* ActiveStudy = application()->activeStudy();
-
+
// Wireframe or Shading
int DisplayMode = 0;
SUIT_ViewWindow* window = application()->desktop()->activeWindow();
// if(!AddInStudy.isEmpty())
// Settings_AddInStudy = AddInStudy.toInt();
// else
-
+
Settings_AddInStudy = 1;
Mb->setItemChecked(411, Settings_AddInStudy);
- // step value
+ // step value
QString S = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep");
if(S.isEmpty())
QAD_CONFIG->addSetting("Geometry:SettingsGeomStep", "100");
- // isos
+ // isos
int count = ActiveStudy->getStudyFramesCount();
for(int i = 0; i < count; i++) {
if(ActiveStudy->getStudyFrame(i)->getTypeView() == VIEW_OCC) {
GUIMap::Iterator it;
for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it )
bOk = bOk && it.data()->SetSettings( parent );
-
- // MZN: Enable/disable "Clipping range" menu item(from GEOM_CLIPPING variable)
+
+ // MZN: Enable/disable "Clipping range" menu item(from GEOM_CLIPPING variable)
if (getenv( "GEOM_CLIPPING" ) == NULL)
{
QMenuItem* mi = Mb->findItem(50);
if (mi && mi->popup())
- mi->popup()->removeItem(507);
- }
-
+ mi->popup()->removeItem(507);
+ }
+
return bOk;
}
*/
//=======================================================================
// function : createGeomAction
-// purpose :
+// purpose :
//=======================================================================
void GeometryGUI::createGeomAction( const int id, const QString& po_id, const QString& icon_id, const int key, const bool toggle )
{
QWidget* parent = application()->desktop();
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
QPixmap pix;
- if ( icon_id.length() )
+ if ( icon_id.length() )
pix = resMgr->loadPixmap( "GEOM", tr( icon_id ) );
else
pix = resMgr->loadPixmap( "GEOM", tr( QString( "ICO_" )+po_id ), false );
createGeomAction( 609, "CHECK_FREE_BNDS" );
createGeomAction( 610, "CHECK_FREE_FACES" );
createGeomAction( 611, "CHANGE_ORIENTATION" );
-
+
createGeomAction( 708, "POINT_COORDS" );
createGeomAction( 701, "BASIC_PROPS" );
createGeomAction( 702, "MASS_CENTER" );
createGeomAction( 7072, "CHECK_COMPOUND" );
createGeomAction( 5103, "CHECK_GEOMETRY" );
-
+
createGeomAction( 412, "SHADING_COLOR" );
createGeomAction( 413, "ISOS" );
createGeomAction( 414, "STEP_VALUE" );
createMenu( 4020, basicId, -1 );
int primId = createMenu( tr( "MEN_PRIMITIVES" ), newEntId, -1 );
- createMenu( 4021, primId, -1 );
- createMenu( 4022, primId, -1 );
- createMenu( 4023, primId, -1 );
- createMenu( 4024, primId, -1 );
- createMenu( 4025, primId, -1 );
+ createMenu( 4021, primId, -1 );
+ createMenu( 4022, primId, -1 );
+ createMenu( 4023, primId, -1 );
+ createMenu( 4024, primId, -1 );
+ createMenu( 4025, primId, -1 );
int genId = createMenu( tr( "MEN_GENERATION" ), newEntId, -1 );
- createMenu( 4031, genId, -1 );
- createMenu( 4032, genId, -1 );
- createMenu( 4033, genId, -1 );
- createMenu( 4034, genId, -1 );
+ createMenu( 4031, genId, -1 );
+ createMenu( 4032, genId, -1 );
+ createMenu( 4033, genId, -1 );
+ createMenu( 4034, genId, -1 );
createMenu( separator(), newEntId, -1 );
int groupId = createMenu( tr( "MEN_GROUP" ), newEntId, -1 );
- createMenu( 800, groupId, -1 );
- createMenu( 801, groupId, -1 );
+ createMenu( 800, groupId, -1 );
+ createMenu( 801, groupId, -1 );
createMenu( separator(), newEntId, -1 );
int blocksId = createMenu( tr( "MEN_BLOCKS" ), newEntId, -1 );
- createMenu( 9997, blocksId, -1 );
- createMenu( 9999, blocksId, -1 );
+ createMenu( 9997, blocksId, -1 );
+ createMenu( 9999, blocksId, -1 );
createMenu( separator(), newEntId, -1 );
- createMenu( 404, newEntId, -1 );
+ createMenu( 404, newEntId, -1 );
createMenu( separator(), newEntId, -1 );
- createMenu( 407, newEntId, -1 );
+ createMenu( 407, newEntId, -1 );
int buildId = createMenu( tr( "MEN_BUILD" ), newEntId, -1 );
- createMenu( 4081, buildId, -1 );
- createMenu( 4082, buildId, -1 );
- createMenu( 4083, buildId, -1 );
- createMenu( 4084, buildId, -1 );
- createMenu( 4085, buildId, -1 );
- createMenu( 4086, buildId, -1 );
+ createMenu( 4081, buildId, -1 );
+ createMenu( 4082, buildId, -1 );
+ createMenu( 4083, buildId, -1 );
+ createMenu( 4084, buildId, -1 );
+ createMenu( 4085, buildId, -1 );
+ createMenu( 4086, buildId, -1 );
int operId = createMenu( tr( "MEN_OPERATIONS" ), -1, -1, 10 );
int boolId = createMenu( tr( "MEN_BOOLEAN" ), operId, -1 );
- createMenu( 5011, boolId, -1 );
- createMenu( 5012, boolId, -1 );
- createMenu( 5013, boolId, -1 );
- createMenu( 5014, boolId, -1 );
+ createMenu( 5011, boolId, -1 );
+ createMenu( 5012, boolId, -1 );
+ createMenu( 5013, boolId, -1 );
+ createMenu( 5014, boolId, -1 );
int transId = createMenu( tr( "MEN_TRANSFORMATION" ), operId, -1 );
- createMenu( 5021, transId, -1 );
- createMenu( 5022, transId, -1 );
- createMenu( 5023, transId, -1 );
- createMenu( 5024, transId, -1 );
- createMenu( 5025, transId, -1 );
- createMenu( 5026, transId, -1 );
+ createMenu( 5021, transId, -1 );
+ createMenu( 5022, transId, -1 );
+ createMenu( 5023, transId, -1 );
+ createMenu( 5024, transId, -1 );
+ createMenu( 5025, transId, -1 );
+ createMenu( 5026, transId, -1 );
createMenu( separator(), transId, -1 );
- createMenu( 5027, transId, -1 );
- createMenu( 5028, transId, -1 );
+ createMenu( 5027, transId, -1 );
+ createMenu( 5028, transId, -1 );
- createMenu( 503, operId, -1 );
- createMenu( 504, operId, -1 );
+ createMenu( 503, operId, -1 );
+ createMenu( 504, operId, -1 );
createMenu( separator(), operId, -1 );
- createMenu( 505, transId, -1 );
- createMenu( 506, transId, -1 );
- //createMenu( 507, transId, -1 );
+ createMenu( 505, transId, -1 );
+ createMenu( 506, transId, -1 );
+ //createMenu( 507, transId, -1 );
int blockId = createMenu( tr( "MEN_BLOCKS" ), operId, -1 );
- createMenu( 9998, blockId, -1 );
- createMenu( 9995, blockId, -1 );
- createMenu( 99991, blockId, -1 );
+ createMenu( 9998, blockId, -1 );
+ createMenu( 9995, blockId, -1 );
+ createMenu( 99991, blockId, -1 );
int repairId = createMenu( tr( "MEN_REPAIR" ), -1, -1, 10 );
- createMenu( 605, repairId, -1 );
- createMenu( 603, repairId, -1 );
- createMenu( 606, repairId, -1 );
- createMenu( 607, repairId, -1 );
- createMenu( 604, repairId, -1 );
- createMenu( 601, repairId, -1 );
- createMenu( 602, repairId, -1 );
- createMenu( 608, repairId, -1 );
- createMenu( 609, repairId, -1 );
- createMenu( 610, repairId, -1 );
- createMenu( 611, repairId, -1 );
+ createMenu( 605, repairId, -1 );
+ createMenu( 603, repairId, -1 );
+ createMenu( 606, repairId, -1 );
+ createMenu( 607, repairId, -1 );
+ createMenu( 604, repairId, -1 );
+ createMenu( 601, repairId, -1 );
+ createMenu( 602, repairId, -1 );
+ createMenu( 608, repairId, -1 );
+ createMenu( 609, repairId, -1 );
+ createMenu( 610, repairId, -1 );
+ createMenu( 611, repairId, -1 );
int measurId = createMenu( tr( "MEN_MEASURES" ), -1, -1, 10 );
- createMenu( 708, measurId, -1 );
- createMenu( 701, measurId, -1 );
+ createMenu( 708, measurId, -1 );
+ createMenu( 701, measurId, -1 );
createMenu( separator(), measurId, -1 );
- createMenu( 702, measurId, -1 );
- createMenu( 703, measurId, -1 );
+ createMenu( 702, measurId, -1 );
+ createMenu( 703, measurId, -1 );
createMenu( separator(), measurId, -1 );
int dimId = createMenu( tr( "MEN_DIMENSIONS" ), measurId, -1 );
- createMenu( 7041, dimId, -1 );
+ createMenu( 7041, dimId, -1 );
createMenu( 7042, dimId, -1 );
createMenu( separator(), measurId, -1 );
-
- createMenu( 705, measurId, -1 );
+
+ createMenu( 705, measurId, -1 );
createMenu( separator(), measurId, -1 );
- createMenu( 706, measurId, -1 );
- createMenu( 707, measurId, -1 );
- createMenu( 7072, measurId, -1 );
+ createMenu( 706, measurId, -1 );
+ createMenu( 707, measurId, -1 );
+ createMenu( 7072, measurId, -1 );
int toolsId = createMenu( tr( "MEN_TOOLS" ), -1, -1, 50 );
createMenu( separator(), toolsId, -1 );
- createMenu( 5103, toolsId, -1 );
-
+ createMenu( 5103, toolsId, -1 );
+
//int prefId = createMenu( tr( "MEN_PREFERENCES" ), -1, -1, 50 );
//createMenu( separator(), prefId, -1 );
//int geomId = createMenu( tr( "MEN_PREFERENCES_GEOM" ), prefId, -1 );
- //createMenu( 412, geomId, -1 );
- //createMenu( 413, geomId, -1 );
- //createMenu( 414, geomId, -1 );
+ //createMenu( 412, geomId, -1 );
+ //createMenu( 413, geomId, -1 );
+ //createMenu( 414, geomId, -1 );
//createMenu( separator(), prefId, -1 );
int viewId = createMenu( tr( "MEN_VIEW" ), -1, -1 );
createMenu( separator(), viewId, -1 );
int dispmodeId = createMenu( tr( "MEN_DISPLAY_MODE" ), viewId, -1 );
- createMenu( 211, dispmodeId, -1 );
-
+ createMenu( 211, dispmodeId, -1 );
+
createMenu( separator(), viewId, -1 );
- createMenu( 212, viewId, -1 );
- createMenu( 214, viewId, -1 );
+ createMenu( 212, viewId, -1 );
+ createMenu( 214, viewId, -1 );
createMenu( separator(), viewId, -1 );
/*
because of these items are accessible through object browser and viewers
we have removed they from main menu
- createMenu( 216, viewId, -1 );
- createMenu( 213, viewId, -1 );
+ createMenu( 216, viewId, -1 );
+ createMenu( 213, viewId, -1 );
createMenu( 215, viewId, -1 );
*/
createTool( 4020, basicTbId );
int primTbId = createTool( tr( "TOOL_PRIMITIVES" ) );
- createTool( 4021, primTbId );
- createTool( 4022, primTbId );
- createTool( 4023, primTbId );
- createTool( 4024, primTbId );
- createTool( 4025, primTbId );
+ createTool( 4021, primTbId );
+ createTool( 4022, primTbId );
+ createTool( 4023, primTbId );
+ createTool( 4024, primTbId );
+ createTool( 4025, primTbId );
int boolTbId = createTool( tr( "TOOL_BOOLEAN" ) );
- createTool( 5011, boolTbId );
- createTool( 5012, boolTbId );
- createTool( 5013, boolTbId );
- createTool( 5014, boolTbId );
+ createTool( 5011, boolTbId );
+ createTool( 5012, boolTbId );
+ createTool( 5013, boolTbId );
+ createTool( 5014, boolTbId );
int genTbId = createTool( tr( "TOOL_GENERATION" ) );
- createTool( 4031, genTbId );
- createTool( 4032, genTbId );
- createTool( 4033, genTbId );
- createTool( 4034, genTbId );
+ createTool( 4031, genTbId );
+ createTool( 4032, genTbId );
+ createTool( 4033, genTbId );
+ createTool( 4034, genTbId );
int transTbId = createTool( tr( "TOOL_TRANSFORMATION" ) );
- createTool( 5021, transTbId );
- createTool( 5022, transTbId );
- createTool( 5023, transTbId );
- createTool( 5024, transTbId );
- createTool( 5025, transTbId );
- createTool( 5026, transTbId );
+ createTool( 5021, transTbId );
+ createTool( 5022, transTbId );
+ createTool( 5023, transTbId );
+ createTool( 5024, transTbId );
+ createTool( 5025, transTbId );
+ createTool( 5026, transTbId );
createTool( separator(), transTbId );
- createTool( 5027, transTbId );
+ createTool( 5027, transTbId );
createTool( 5028, transTbId );
// ---- create popup menus --------------------------
setMenuShown( false );
setToolShown( false );
- disconnect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ),
+ disconnect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ),
this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) );
EmitSignalCloseAllDialogs();
GUIMap::Iterator it;
for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it )
- it.data()->deactivate();
+ it.data()->deactivate();
// Unset actions accelerator keys
//action(111)->setAccel(QKeySequence()); // Import
if( nbSel == 0 ) {
////// NOTHING SELECTED
popup->clear();
- }
+ }
else if ( nbSel == 1 ) {
////// SINGLE OBJECT SELECTION
if ( parentComponent != parent->getActiveComponent() ) {
//=======================================================================
// function : GeometryGUI::BuildPresentation()
-// purpose :
+// purpose :
//=======================================================================
void GeometryGUI::BuildPresentation( const Handle(SALOME_InteractiveObject)& io, SUIT_ViewWindow* win )
{
const bool ViewOCC = ( win->getViewManager()->getType() == OCCViewer_Viewer::Type() );
// const bool ViewVTK = ( win->getViewManager()->getType() == SVTK_Viewer::Type() );
-
+
// disable non-OCC viewframe menu commands
// action( 404 )->setEnabled( ViewOCC ); // SKETCHER
action( 603 )->setEnabled( ViewOCC ); // SuppressFace
QString GeometryGUI::engineIOR() const
{
+ QString anIOR = QString::null;
if ( !CORBA::is_nil( GetGeomGen() ) )
- return QString( getApp()->orb()->object_to_string( GetGeomGen() ) );
- return QString( "" );
+ {
+ CORBA::String_var objStr = getApp()->orb()->object_to_string( GetGeomGen() );
+ anIOR = QString( objStr.in() );
+// free( objStr ); ASV : 26.07.06 : commented out because it raises exception and blocks application
+ }
+ return anIOR;
}
LightApp_Selection* GeometryGUI::createSelection() const
addPreference( tr( "PREF_SHADING_COLOR" ), genGroup,
LightApp_Preferences::Color, "Geometry", "shading_color" );
-
+
addPreference( tr( "PREF_WIREFRAME_COLOR" ), genGroup,
LightApp_Preferences::Color, "Geometry", "wireframe_color" );
-
+
addPreference( tr( "PREF_FREE_BOUND_COLOR" ), genGroup,
LightApp_Preferences::Color, "Geometry", "free_bound_color" );
-
+
addPreference( tr( "PREF_LINE_COLOR"), genGroup,
LightApp_Preferences::Color, "Geometry", "line_color" );
-
+
addPreference( tr( "PREF_POINT_COLOR"), genGroup,
LightApp_Preferences::Color, "Geometry", "point_color" );
-
+
addPreference( tr( "PREF_ISOS_COLOR" ), genGroup,
LightApp_Preferences::Color, "Geometry", "isos_color" );
-
+
int step = addPreference( tr( "PREF_STEP_VALUE" ), genGroup,
LightApp_Preferences::IntSpin, "Geometry", "SettingsGeomStep" );
QStringList aModesList;
aModesList.append( tr("MEN_WIREFRAME") );
aModesList.append( tr("MEN_SHADING") );
-
+
QValueList<QVariant> anIndexesList;
anIndexesList.append(0);
anIndexesList.append(1);
-
+
setPreferenceProperty( dispmode, "strings", aModesList );
setPreferenceProperty( dispmode, "indexes", anIndexesList );
-
+
// Set property for step value for spinboxes
setPreferenceProperty( step, "min", 0.001 );
setPreferenceProperty( step, "max", 10000 );
setPreferenceProperty( step, "precision", 3 );
-
+
}
void GeometryGUI::preferencesChanged( const QString& section, const QString& param )
{
+ if (section == "Geometry") {
+ SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
+ if (param == QString("SettingsGeomStep")) {
+ double spin_step = aResourceMgr->doubleValue(section, param, 100.);
+ EmitSignalDefaultStepValueChanged(spin_step);
+ }
+ }
}
LightApp_Displayer* GeometryGUI::displayer()
#ifndef GEOMETRYGUI_H
#define GEOMETRYGUI_H
+#include "GEOM_GEOMGUI.hxx"
+
#include "SalomeApp_Module.h"
#include "GEOMGUI.h"
#include "SALOMEconfig.h"
#include CORBA_CLIENT_HEADER(SALOMEDS)
-#ifdef WNT
-#include <SALOME_WNT.hxx>
-#else
-#define SALOME_WNT_EXPORT
-#endif
-
-//#if defined WNT
-//#include <SALOME_WNT.hxx>
-//#else
-//#define SALOME_WNT_EXPORT
-//#endif
-
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define GEOMGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define GEOMGUI_WNT_EXPORT
-#endif
-
typedef QMap<QString, GEOMGUI*> GUIMap;
class QDialog;
// class : GeometryGUI
// purpose :
//=================================================================================
-class GEOMGUI_WNT_EXPORT GeometryGUI : public SalomeApp_Module
+class GEOMGUI_EXPORT GeometryGUI : public SalomeApp_Module
{
Q_OBJECT;
#include <AIS_ListOfInteractive.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <AIS_Drawer.hxx>
+#include <BRepTools.hxx>
// IDL Headers
#include <SALOMEconfig.h>
if (!father)
return;
if (!father->ComponentIOR(aFatherIOR)) {
- aStudyBuilder->LoadWith(father, SalomeApp_Application::orb()->object_to_string(Geom));
+ CORBA::String_var objStr = SalomeApp_Application::orb()->object_to_string(Geom);
+ aStudyBuilder->LoadWith(father, objStr.in());
father->ComponentIOR(aFatherIOR);
}
ite.Value()->SetColor(CSFColor);
if (ite.Value()->IsKind(STANDARD_TYPE(GEOM_AISShape)))
Handle(GEOM_AISShape)::DownCast(ite.Value())->SetShadingColor(CSFColor);
- ite.Value()->Redisplay(Standard_True);
+ ic->Redisplay(ite.Value(), true, true);
if (myUpdateViewer)
occViewer->update();
break;
if ((!aObj.IsNull()) && aObj->hasEntry() && aObj->isSame(anIO)) {
Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast(it.Value());
if (!aShape.IsNull()) {
- Handle(AIS_Drawer) aDrawer = aShape->Attributes();
- if (aDrawer.IsNull())
- aDrawer = new AIS_Drawer();
- aDrawer->SetDeviationCoefficient(myParam);
- aShape->SetAttributes(aDrawer);
- aContext->Redisplay(aShape, true, true);
- aContext->UpdateCurrentViewer();
+ TopoDS_Shape aSh = aShape->Shape();
+ if (!aSh.IsNull())
+ BRepTools::Clean(aSh);
+
+ aShape->SetOwnDeviationCoefficient( myParam );
+ aShape->SetOwnHLRDeviationAngle( 1.57 );
+ aContext->Redisplay(aShape);
return;
}
}
#ifndef _GeometryGUI_SWIG_HXX_
#define _GeometryGUI_SWIG_HXX_
+#include "GEOM_GEOMGUI.hxx"
+
// IDL Headers
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(GEOM_Gen)
#include CORBA_SERVER_HEADER(SALOMEDS)
#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define GEOMGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define GEOMGUI_WNT_EXPORT
-#endif
-
class GEOM_Client;
-class GEOMGUI_WNT_EXPORT GEOM_Swig
+class GEOMGUI_EXPORT GEOM_Swig
{
public:
GEOM_Swig();
GEOMGUI_OCCSelector.h \
GEOMGUI_Selection.h \
GeometryGUI_Swig.hxx \
- GeometryGUI_Swig.i
+ GeometryGUI_Swig.i \
+ GEOM_GEOMGUI.hxx
# Libraries targets
LIB = libGEOM.la
if (!BO.IsDone()) {
StdFail_NotDone::Raise("Common operation can not be performed on the given shapes");
}
- if (isCompound)
- B.Add(C, BO.Shape());
+ if (isCompound) {
+ TopoDS_Shape aStepResult = BO.Shape();
+
+ // check result of this step: if it is a compound (boolean operations
+ // allways return a compound), we add all sub-shapes of it.
+ // This allows to avoid adding empty compounds,
+ // resulting from COMMON on two non-intersecting shapes.
+ if (aStepResult.ShapeType() == TopAbs_COMPOUND) {
+ TopoDS_Iterator aCompIter (aStepResult);
+ for (; aCompIter.More(); aCompIter.Next()) {
+ // add shape in a result
+ B.Add(C, aCompIter.Value());
+ }
+ }
+ else {
+ // add shape in a result
+ B.Add(C, aStepResult);
+ }
+ }
else
aShape = BO.Shape();
}
}
aCut = BO.Shape();
}
- if (isCompound)
- B.Add(C, aCut);
+ if (isCompound) {
+ // check result of this step: if it is a compound (boolean operations
+ // allways return a compound), we add all sub-shapes of it.
+ // This allows to avoid adding empty compounds,
+ // resulting from CUT of parts
+ if (aCut.ShapeType() == TopAbs_COMPOUND) {
+ TopoDS_Iterator aCompIter (aCut);
+ for (; aCompIter.More(); aCompIter.Next()) {
+ // add shape in a result
+ B.Add(C, aCompIter.Value());
+ }
+ }
+ else {
+ // add shape in a result
+ B.Add(C, aCut);
+ }
+ }
else
aShape = aCut;
}
TopTools_ListIteratorOfListOfShape itSub2 (listShape2);
for (; itSub2.More(); itSub2.Next()) {
TopoDS_Shape aValue2 = itSub2.Value();
- BRepAlgoAPI_Section BO (aValue1, aValue2);
+ BRepAlgoAPI_Section BO (aValue1, aValue2, Standard_False);
+ // Set approximation to have an attached 3D BSpline geometry to each edge,
+ // where analytic curve is not possible. Without this flag in some cases
+ // we obtain BSpline curve of degree 1 (C0), which is slowly
+ // processed by some algorithms (Partition for example).
+ BO.Approximation(Standard_True);
+ BO.Build();
if (!BO.IsDone()) {
StdFail_NotDone::Raise("Section operation can not be performed on the given shapes");
}
- if (isCompound)
- B.Add(C, BO.Shape());
+ if (isCompound) {
+ TopoDS_Shape aStepResult = BO.Shape();
+
+ // check result of this step: if it is a compound (boolean operations
+ // allways return a compound), we add all sub-shapes of it.
+ // This allows to avoid adding empty compounds,
+ // resulting from SECTION on two non-intersecting shapes.
+ if (aStepResult.ShapeType() == TopAbs_COMPOUND) {
+ TopoDS_Iterator aCompIter (aStepResult);
+ for (; aCompIter.More(); aCompIter.Next()) {
+ // add shape in a result
+ B.Add(C, aCompIter.Value());
+ }
+ }
+ else {
+ // add shape in a result
+ B.Add(C, aStepResult);
+ }
+ }
else
aShape = BO.Shape();
}
#include <Standard_ConstructionError.hxx>
+#include <NCollection_DataMap.hxx>
+
#ifdef WNT
#include <windows.h>
#else
return 0;
// load plugin library
- LibHandle anExportLib = LoadLib( aLibName.ToCString() );
+ LibHandle anExportLib = LoadLib( aLibName.ToCString() ); //This is workaround of BUG OCC13051
funcPoint fp = 0;
if ( anExportLib )
fp = (funcPoint)GetProc( anExportLib, "Export" );
int res = fp( aShape, aFileName, aFormatName );
// unload plugin library
- UnLoadLib( anExportLib );
+ //UnLoadLib( anExportLib );
if ( res )
log.SetTouched(Label());
#ifndef _GEOMImpl_GEN_HXX_
#define _GEOMImpl_GEN_HXX_
+#include <GEOM_GEOMImpl.hxx>
+
#include <map>
#include "GEOMImpl_IBasicOperations.hxx"
#include "GEOMImpl_IGroupOperations.hxx"
#include "GEOM_Engine.hxx"
-#ifdef WNT
-#include <SALOME_WNT.hxx>
-#else
-#define SALOME_WNT_EXPORT
-#endif
-
-class SALOME_WNT_EXPORT GEOMImpl_Gen : public GEOM_Engine
+class GEOMIMPL_EXPORT GEOMImpl_Gen : public GEOM_Engine
{
public:
GEOMImpl_Gen();
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
//
+
#include <Standard_Stream.hxx>
#include <GEOMImpl_IBooleanOperations.hxx>
* constructor:
*/
//=============================================================================
-GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations (GEOM_Engine* theEngine, int theDocID)
+GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations (GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
{
MESSAGE("GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations");
SetErrorCode(KO);
if (theShape1.IsNull() || theShape2.IsNull()) return NULL;
-
- //Add a new Boolean object
+
+ //Add a new Boolean object
Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
-
+
//Add a new Boolean function
Handle(GEOM_Function) aFunction;
if (theOp == 1) {
if (aFunction.IsNull()) return NULL;
//Check if the function is set correctly
- if (aFunction->GetDriverGUID() != GEOMImpl_BooleanDriver::GetID()) return NULL;
+ if (aFunction->GetDriverGUID() != GEOMImpl_BooleanDriver::GetID()) return NULL;
GEOMImpl_IBoolean aCI (aFunction);
-
+
Handle(GEOM_Function) aRef1 = theShape1->GetLastFunction();
Handle(GEOM_Function) aRef2 = theShape2->GetLastFunction();
pd << theShape1 << ", " << theShape2 << ")";
SetErrorCode(OK);
- return aBool;
+ return aBool;
}
//=============================================================================
*/
//=============================================================================
Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition
- (const Handle(TColStd_HSequenceOfTransient)& theShapes,
+ (const Handle(TColStd_HSequenceOfTransient)& theShapes,
const Handle(TColStd_HSequenceOfTransient)& theTools,
const Handle(TColStd_HSequenceOfTransient)& theKeepIns,
const Handle(TColStd_HSequenceOfTransient)& theRemoveIns,
- const Standard_Integer theLimit,
- const Standard_Boolean theRemoveWebs,
- const Handle(TColStd_HArray1OfInteger)& theMaterials)
+ const Standard_Integer theLimit,
+ const Standard_Boolean theRemoveWebs,
+ const Handle(TColStd_HArray1OfInteger)& theMaterials,
+ const Standard_Boolean thePerformSelfIntersections)
{
SetErrorCode(KO);
- //Add a new Partition object
+ //Add a new Partition object
Handle(GEOM_Object) aPartition = GetEngine()->AddObject(GetDocID(), GEOM_PARTITION);
-
+
//Add a new Partition function
- Handle(GEOM_Function) aFunction =
- aPartition->AddFunction(GEOMImpl_PartitionDriver::GetID(), PARTITION_PARTITION);
+ Handle(GEOM_Function) aFunction;
+ if (thePerformSelfIntersections)
+ aFunction = aPartition->AddFunction(GEOMImpl_PartitionDriver::GetID(), PARTITION_PARTITION);
+ else
+ aFunction = aPartition->AddFunction(GEOMImpl_PartitionDriver::GetID(), PARTITION_NO_SELF_INTERSECTIONS);
if (aFunction.IsNull()) return NULL;
//Check if the function is set correctly
- if (aFunction->GetDriverGUID() != GEOMImpl_PartitionDriver::GetID()) return NULL;
+ if (aFunction->GetDriverGUID() != GEOMImpl_PartitionDriver::GetID()) return NULL;
GEOMImpl_IPartition aCI (aFunction);
-
-// int aLen = theShapes.size();
-// aCI.SetLength(aLen);
Handle(TColStd_HSequenceOfTransient) aShapesSeq = new TColStd_HSequenceOfTransient;
Handle(TColStd_HSequenceOfTransient) aToolsSeq = new TColStd_HSequenceOfTransient;
return NULL;
}
- //Make a Python command
+ //Make a Python command
GEOM::TPythonDump pd (aFunction);
- pd << aPartition << " = geompy.MakePartition([";
+ if (thePerformSelfIntersections)
+ pd << aPartition << " = geompy.MakePartition([";
+ else
+ pd << aPartition << " = geompy.MakePartitionNonSelfIntersectedShape([";
+
// Shapes, Tools
pd << aShapesDescr.ToCString() << "], [" << aToolsDescr.ToCString() << "], [";
// Keep Ins, Remove Ins
pd << aKeepInsDescr.ToCString() << "], [" << aRemoveInsDescr.ToCString() << "], ";
// Limit, Remove Webs
- pd << theLimit << ", " << (int)theRemoveWebs << ", [";
+ pd << TopAbs_ShapeEnum(theLimit) << ", " << (int)theRemoveWebs << ", [";
// Materials
if (!theMaterials.IsNull() && theMaterials->Length() > 0) {
int i = theMaterials->Lower();
pd << "])";
SetErrorCode(OK);
- return aPartition;
+ return aPartition;
}
//=============================================================================
SetErrorCode(KO);
if (theShape.IsNull() || thePlane.IsNull()) return NULL;
-
- //Add a new Boolean object
- Handle(GEOM_Object) aPart = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
-
+
+ //Add a new Boolean object
+ Handle(GEOM_Object) aPart = GetEngine()->AddObject(GetDocID(), GEOM_PARTITION);
+
//Add a new Partition function
Handle(GEOM_Function) aFunction =
aPart->AddFunction(GEOMImpl_PartitionDriver::GetID(), PARTITION_HALF);
if (aFunction.IsNull()) return NULL;
//Check if the function is set correctly
- if (aFunction->GetDriverGUID() != GEOMImpl_PartitionDriver::GetID()) return NULL;
+ if (aFunction->GetDriverGUID() != GEOMImpl_PartitionDriver::GetID()) return NULL;
GEOMImpl_IPartition aCI (aFunction);
-
+
Handle(GEOM_Function) aRef1 = theShape->GetLastFunction();
Handle(GEOM_Function) aRef2 = thePlane->GetLastFunction();
return NULL;
}
- //Make a Python command
+ //Make a Python command
GEOM::TPythonDump(aFunction) << aPart << " = geompy.MakeHalfPartition("
<< theShape << ", " << thePlane << ")";
SetErrorCode(OK);
- return aPart;
+ return aPart;
}
#include "GEOM_IOperations.hxx"
-//#include "TColStd_HSequenceOfTransient.hxx"
-
#include "list"
class GEOM_Engine;
Standard_EXPORT ~GEOMImpl_IBooleanOperations();
Standard_EXPORT Handle(GEOM_Object) MakeBoolean (Handle(GEOM_Object) theShape1,
- Handle(GEOM_Object) theShape2,
- Standard_Integer theOp);
-
- Standard_EXPORT Handle(GEOM_Object) MakePartition (const Handle(TColStd_HSequenceOfTransient)& theShapes,
- const Handle(TColStd_HSequenceOfTransient)& theTools,
- const Handle(TColStd_HSequenceOfTransient)& theKeepInside,
- const Handle(TColStd_HSequenceOfTransient)& theRemoveInside,
- const Standard_Integer theLimit,
- const Standard_Boolean theRemoveWebs,
- const Handle(TColStd_HArray1OfInteger)& theMaterials);
+ Handle(GEOM_Object) theShape2,
+ Standard_Integer theOp);
+
+ Standard_EXPORT Handle(GEOM_Object) MakePartition
+ (const Handle(TColStd_HSequenceOfTransient)& theShapes,
+ const Handle(TColStd_HSequenceOfTransient)& theTools,
+ const Handle(TColStd_HSequenceOfTransient)& theKeepInside,
+ const Handle(TColStd_HSequenceOfTransient)& theRemoveInside,
+ const Standard_Integer theLimit,
+ const Standard_Boolean theRemoveWebs,
+ const Handle(TColStd_HArray1OfInteger)& theMaterials,
+ const Standard_Boolean thePerformSelfIntersections);
Standard_EXPORT Handle(GEOM_Object) MakeHalfPartition (Handle(GEOM_Object) theShape,
- Handle(GEOM_Object) thePlane);
+ Handle(GEOM_Object) thePlane);
};
#endif
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
//
+
#include <Standard_Stream.hxx>
#include <GEOMImpl_IGroupOperations.hxx>
* constructor:
*/
//=============================================================================
-GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations (GEOM_Engine* theEngine, int theDocID)
+GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations (GEOM_Engine* theEngine, int theDocID)
: GEOM_IOperations(theEngine, theDocID)
{
MESSAGE("GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations");
Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1);
anArray->SetValue(1, -1);
- //Add a new Fillet object
+ //Add a new Sub-shape object
Handle(GEOM_Object) aGroup = GetEngine()->AddSubShape(theMainShape, anArray);
//Set a GROUP type
// Check sub-shape index validity
TDF_Label aLabel = aSSI.GetMainShape()->GetOwnerEntry();
if (aLabel.IsRoot()) return;
- Handle(GEOM_Object) anObj = GEOM_Object::GetObject(aLabel);
- if (anObj.IsNull()) return;
- TopoDS_Shape aMainShape = anObj->GetValue();
+ Handle(GEOM_Object) aMainObj = GEOM_Object::GetObject(aLabel);
+ if (aMainObj.IsNull()) return;
+ TopoDS_Shape aMainShape = aMainObj->GetValue();
if (aMainShape.IsNull()) return;
TopTools_IndexedMapOfShape aMapOfShapes;
aSSI.SetIndices(aNewSeq);
}
+ // As we do not recompute here our group, lets mark it as Modified
+ Standard_Integer aTic = aMainObj->GetTic(); // tic of main shape
+ theGroup->SetTic(aTic - 1);
+
//Make a Python command
GEOM::TPythonDump(aFunction, /*append=*/true)
<< "geompy.AddObject(" << theGroup << ", " << theSubShapeID << ")";
GEOM_ISubShape aSSI(aFunction);
Handle(TColStd_HArray1OfInteger) aSeq = aSSI.GetIndices();
if(aSeq.IsNull()) return;
+
if(aSeq->Length() == 1 && aSeq->Value(1) == -1) {
SetErrorCode(NOT_EXISTS);
return;
}
- else {
- Handle(TColStd_HArray1OfInteger) aNewSeq;
- Standard_Integer aLength = aSeq->Length();
- if(aLength == 1) {
- if(aSeq->Value(1) != theSubShapeID) {
- SetErrorCode(NOT_EXISTS);
- return;
- }
- aNewSeq = new TColStd_HArray1OfInteger(1,1);
- aNewSeq->SetValue(1, -1);
+
+ Handle(TColStd_HArray1OfInteger) aNewSeq;
+ Standard_Integer aLength = aSeq->Length();
+ if(aLength == 1) {
+ if(aSeq->Value(1) != theSubShapeID) {
+ SetErrorCode(NOT_EXISTS);
+ return;
}
- else {
- aNewSeq = new TColStd_HArray1OfInteger(1, aLength-1);
- Standard_Boolean isFound = Standard_False;
- for (Standard_Integer i = 1, k = 1; i <= aLength; i++) {
- if (aSeq->Value(i) == theSubShapeID) {
- isFound = Standard_True;
- } else {
- if (k < aLength) { // this check is to avoid sequence <aNewSeq> overflow
- aNewSeq->SetValue(k, aSeq->Value(i));
- k++;
- }
+ aNewSeq = new TColStd_HArray1OfInteger(1,1);
+ aNewSeq->SetValue(1, -1);
+ }
+ else {
+ aNewSeq = new TColStd_HArray1OfInteger(1, aLength-1);
+ Standard_Boolean isFound = Standard_False;
+ for (Standard_Integer i = 1, k = 1; i <= aLength; i++) {
+ if (aSeq->Value(i) == theSubShapeID) {
+ isFound = Standard_True;
+ } else {
+ if (k < aLength) { // this check is to avoid sequence <aNewSeq> overflow
+ aNewSeq->SetValue(k, aSeq->Value(i));
+ k++;
}
}
-
- if (!isFound) {
- SetErrorCode(NOT_EXISTS);
- return;
- }
}
- aSSI.SetIndices(aNewSeq);
+ if (!isFound) {
+ SetErrorCode(NOT_EXISTS);
+ return;
+ }
}
- //Make a Python command
+ aSSI.SetIndices(aNewSeq);
+
+ // As we do not recompute here our group, lets mark it as Modified
+ TDF_Label aLabel = aSSI.GetMainShape()->GetOwnerEntry();
+ if (aLabel.IsRoot()) return;
+ Handle(GEOM_Object) aMainObj = GEOM_Object::GetObject(aLabel);
+ if (aMainObj.IsNull()) return;
+ Standard_Integer aTic = aMainObj->GetTic(); // tic of main shape
+ theGroup->SetTic(aTic - 1);
+
+ //Make a Python command
GEOM::TPythonDump(aFunction, /*append=*/true)
<< "geompy.RemoveObject(" << theGroup << ", " << theSubShapeID << ")";
SetErrorCode(OK);
- return;
+ return;
}
//=============================================================================
}
aSSI.SetIndices(aNewSeq);
+
+ // As we do not recompute here our group, lets mark it as Modified
+ Standard_Integer aTic = aMainObj->GetTic(); // tic of main shape
+ theGroup->SetTic(aTic - 1);
}
//Make a Python command
}
aSSI.SetIndices(aNewSeq);
+
+ // As we do not recompute here our group, lets mark it as Modified
+ Standard_Integer aTic = aMainObj->GetTic(); // tic of main shape
+ theGroup->SetTic(aTic - 1);
}
//Make a Python command
}
aSSI.SetIndices(aNewSeq);
+
+ // As we do not recompute here our group, lets mark it as Modified
+ Standard_Integer aTic = aMainObj->GetTic(); // tic of main shape
+ theGroup->SetTic(aTic - 1);
}
//Make a Python command
}
aSSI.SetIndices(aNewSeq);
+
+ // As we do not recompute here our group, lets mark it as Modified
+ Standard_Integer aTic = aMainObj->GetTic(); // tic of main shape
+ theGroup->SetTic(aTic - 1);
}
//Make a Python command
if(!aFreeLabel.FindAttribute(TDataStd_Integer::GetID(), anAttrib)) return TopAbs_SHAPE;
SetErrorCode(OK);
- return (TopAbs_ShapeEnum) anAttrib->Get();
+ return (TopAbs_ShapeEnum) anAttrib->Get();
}
//=============================================================================
<< aMainShape << " = geompy.GetMainShape(" << theGroup << ")";
SetErrorCode(OK);
- return aMainShape;
+ return aMainShape;
}
//=============================================================================
aKey += ".";
aKey += aMode;
if (myResMgr->Find(aKey.ToCString())) {
- TCollection_AsciiString aLibName (myResMgr->Value(aKey.ToCString()));
+ TCollection_AsciiString aLibName (myResMgr->Value(aKey.ToCString()));
+#ifndef WNT
+ aLibName += ".so";
+#else
+ aLibName += ".dll";
+#endif
theLibName = new TCollection_HAsciiString (aLibName);
return Standard_True;
}
#define ROTATE_STEP1 4
#define ROTATE_NBITER1 5
#define ROTATE_NBITER2 6
+#define ROTATE_CENTRAL_POINT 7
+#define ROTATE_POINT1 8
+#define ROTATE_POINT2 9
class GEOMImpl_IRotate
{
GEOMImpl_IRotate(Handle(GEOM_Function) theFunction): _func(theFunction) {}
+ void SetCentPoint(Handle(GEOM_Function) theCentPoint) { _func->SetReference(ROTATE_CENTRAL_POINT, theCentPoint); }
+
+ Handle(GEOM_Function) GetCentPoint() { return _func->GetReference(ROTATE_CENTRAL_POINT); }
+
+ void SetPoint1(Handle(GEOM_Function) thePoint1) { _func->SetReference(ROTATE_POINT1, thePoint1); }
+
+ Handle(GEOM_Function) GetPoint1() { return _func->GetReference(ROTATE_POINT1); }
+
+ void SetPoint2(Handle(GEOM_Function) thePoint2) { _func->SetReference(ROTATE_POINT2, thePoint2); }
+
+ Handle(GEOM_Function) GetPoint2() { return _func->GetReference(ROTATE_POINT2); }
+
void SetAngle(Standard_Real theAngle) { _func->SetReal(ROTATE_ANGLE, theAngle); }
Standard_Real GetAngle() { return _func->GetReal(ROTATE_ANGLE); }
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
//
+
#include <Standard_Stream.hxx>
#include "GEOMImpl_IShapesOperations.hxx"
#include "GEOMAlgo_FinderShapeOn1.hxx"
#include "GEOMAlgo_FinderShapeOnQuad.hxx"
+#include "GEOMAlgo_FinderShapeOn2.hxx"
+#include "GEOMAlgo_ClsfBox.hxx"
+//#include "GEOMAlgo_ClsfSurf.hxx"
#include "utilities.h"
#include "OpUtil.hxx"
#include <BRepExtrema_ExtCF.hxx>
#include <BRep_Tool.hxx>
+#include <BRepTools.hxx>
#include <BRepGProp.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
+#include <TopoDS_Solid.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopExp_Explorer.hxx>
#include <TopLoc_Location.hxx>
#include <TopTools_MapOfShape.hxx>
+#include <TopTools_MapOfOrientedShape.hxx>
#include <TopTools_Array1OfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
+#include <GeomLib_Tool.hxx>
#include <Geom2d_Curve.hxx>
#include <Bnd_Box.hxx>
anArray = new TColStd_HArray1OfInteger(1,1);
anArray->SetValue(1, anIndices.FindIndex(aValue));
anObj = GetEngine()->AddSubShape(theShape, anArray);
- aSeq->Append(anObj);
+ if (!anObj.IsNull()) {
+ aSeq->Append(anObj);
- // for python command
- TDF_Tool::Entry(anObj->GetEntry(), anEntry);
- anAsciiList += anEntry;
- anAsciiList += ",";
+ // for python command
+ TDF_Tool::Entry(anObj->GetEntry(), anEntry);
+ anAsciiList += anEntry;
+ anAsciiList += ",";
+ }
}
//Make a Python command
//=======================================================================
//function : GetSharedShapes
-//purpose :
+//purpose :
//=======================================================================
Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetSharedShapes
//=============================================================================
/*!
- *
+ *
*/
//=============================================================================
static GEOM::TPythonDump& operator<< (GEOM::TPythonDump& theDump,
}
+//=======================================================================
+//function : getShapesOnBoxIDs
+ /*!
+ * \brief Find IDs of subshapes complying with given status about surface
+ * \param theBox - the box to check state of subshapes against
+ * \param theShape - the shape to explore
+ * \param theShapeType - type of subshape of theShape
+ * \param theState - required state
+ * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes
+ */
+//=======================================================================
+
+Handle(TColStd_HSequenceOfInteger)
+ GEOMImpl_IShapesOperations::getShapesOnBoxIDs(const Handle(GEOM_Object)& theBox,
+ const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ GEOMAlgo_State theState)
+{
+ Handle(TColStd_HSequenceOfInteger) aSeqOfIDs;
+
+ TopoDS_Shape aBox = theBox->GetValue();
+ TopoDS_Shape aShape = theShape->GetValue();
+
+ // Call algo
+ GEOMAlgo_FinderShapeOn2 aFinder;
+ Standard_Real aTol = 0.0001; // default value
+
+ Handle(GEOMAlgo_ClsfBox) aClsfBox = new GEOMAlgo_ClsfBox;
+ aClsfBox->SetBox(aBox);
+
+ aFinder.SetShape(aShape);
+ aFinder.SetTolerance(aTol);
+ aFinder.SetClsf(aClsfBox);
+ aFinder.SetShapeType( (TopAbs_ShapeEnum)theShapeType );
+ aFinder.SetState(theState);
+ aFinder.Perform();
+
+ // Interprete results
+ Standard_Integer iErr = aFinder.ErrorStatus();
+ // the detailed description of error codes is in GEOMAlgo_FinderShapeOn1.cxx
+ if (iErr) {
+ MESSAGE(" iErr : " << iErr);
+ TCollection_AsciiString aMsg (" iErr : ");
+ aMsg += TCollection_AsciiString(iErr);
+ SetErrorCode(aMsg);
+ return aSeqOfIDs;
+ }
+ Standard_Integer iWrn = aFinder.WarningStatus();
+ // the detailed description of warning codes is in GEOMAlgo_FinderShapeOn1.cxx
+ if (iWrn) {
+ MESSAGE(" *** iWrn : " << iWrn);
+ }
+
+ const TopTools_ListOfShape& listSS = aFinder.Shapes(); // the result
+
+ if (listSS.Extent() < 1) {
+ SetErrorCode("Not a single sub-shape of the requested type found on the given surface");
+ return aSeqOfIDs;
+ }
+
+ // Fill sequence of object IDs
+ aSeqOfIDs = new TColStd_HSequenceOfInteger;
+
+ TopTools_IndexedMapOfShape anIndices;
+ TopExp::MapShapes(aShape, anIndices);
+
+ TopTools_ListIteratorOfListOfShape itSub (listSS);
+ for (int index = 1; itSub.More(); itSub.Next(), ++index) {
+ int id = anIndices.FindIndex(itSub.Value());
+ aSeqOfIDs->Append(id);
+ }
+
+ return aSeqOfIDs;
+}
+
+
+//=======================================================================
+//function : GetShapesOnBoxIDs
+/*!
+ * \brief Find subshapes complying with given status about surface
+ * \param theBox - the box to check state of subshapes against
+ * \param theShape - the shape to explore
+ * \param theShapeType - type of subshape of theShape
+ * \param theState - required state
+ * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes
+ */
+//=======================================================================
+
+Handle(TColStd_HSequenceOfInteger)
+ GEOMImpl_IShapesOperations::GetShapesOnBoxIDs(const Handle(GEOM_Object)& theBox,
+ const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ GEOMAlgo_State theState)
+{
+ // Find subshapes ids
+ Handle(TColStd_HSequenceOfInteger) aSeqOfIDs =
+ getShapesOnBoxIDs (theBox, theShape, theShapeType, theState);
+ if ( aSeqOfIDs.IsNull() || aSeqOfIDs->Length() == 0 )
+ return NULL;
+
+ // The GetShapesOnBox() doesn't change object so no new function is required.
+ Handle(GEOM_Function) aFunction = GEOM::GetCreatedLast(theShape,theBox)->GetLastFunction();
+
+ // Make a Python command
+ GEOM::TPythonDump(aFunction)
+ << "listShapesOnBoxIDs = geompy.GetShapesOnQuadrangleIDs("
+ << theBox << ", "
+ << theShape << ", "
+ << TopAbs_ShapeEnum(theShapeType) << ", "
+ << theState << ")";
+
+ SetErrorCode(OK);
+ return aSeqOfIDs;
+}
+
+//=======================================================================
+//function : GetShapesOnBox
+/*!
+ * \brief Find subshapes complying with given status about surface
+ * \param theBox - the box to check state of subshapes against
+ * \param theShape - the shape to explore
+ * \param theShapeType - type of subshape of theShape
+ * \param theState - required state
+ * \retval Handle(TColStd_HSequenceOfTransient) - found subshapes
+ */
+//=======================================================================
+
+Handle(TColStd_HSequenceOfTransient)
+ GEOMImpl_IShapesOperations::GetShapesOnBox(const Handle(GEOM_Object)& theBox,
+ const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ GEOMAlgo_State theState)
+{
+ // Find subshapes ids
+ Handle(TColStd_HSequenceOfInteger) aSeqOfIDs =
+ getShapesOnBoxIDs (theBox, theShape, theShapeType, theState);
+ if ( aSeqOfIDs.IsNull() || aSeqOfIDs->Length() == 0 )
+ return NULL;
+
+ // Find objects by indices
+ TCollection_AsciiString anAsciiList;
+ Handle(TColStd_HSequenceOfTransient) aSeq;
+ aSeq = getObjectsShapesOn( theShape, aSeqOfIDs, anAsciiList );
+ if ( aSeq.IsNull() || aSeq->IsEmpty() )
+ return NULL;
+
+ // Make a Python command
+
+ Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast( aSeq->Value( 1 ));
+ Handle(GEOM_Function) aFunction = anObj->GetLastFunction();
+
+ GEOM::TPythonDump(aFunction)
+ << "[" << anAsciiList.ToCString() << "] = geompy.GetShapesOnBox("
+ << theBox << ", "
+ << theShape << ", "
+ << TopAbs_ShapeEnum(theShapeType) << ", "
+ << theState << ")";
+
+ SetErrorCode(OK);
+ return aSeq;
+}
+
+
//=======================================================================
//function : getShapesOnSurfaceIDs
/*!
return aSeq;
}
+//=============================================================================
+/*!
+ * GetShapesOnPlaneWithLocation
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnPlaneWithLocation
+ (const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ const Handle(GEOM_Object)& theAx1,
+ const Handle(GEOM_Object)& thePnt,
+ const GEOMAlgo_State theState)
+{
+ SetErrorCode(KO);
+
+ if (theShape.IsNull() || theAx1.IsNull() || thePnt.IsNull()) return NULL;
+
+ TopoDS_Shape aShape = theShape->GetValue();
+ TopoDS_Shape anAx1 = theAx1->GetValue();
+ TopoDS_Shape anPnt = thePnt->GetValue();
+
+ if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return NULL;
+
+ TopAbs_ShapeEnum aShapeType = TopAbs_ShapeEnum(theShapeType);
+ if ( !checkTypeShapesOn( theShapeType ))
+ return NULL;
+
+ // Create plane
+ if ( anAx1.ShapeType() != TopAbs_EDGE || anPnt.ShapeType() != TopAbs_VERTEX ) return NULL;
+ TopoDS_Vertex V1, V2, V3;
+ TopoDS_Edge anEdge = TopoDS::Edge(anAx1);
+ TopExp::Vertices(anEdge, V1, V2, Standard_True);
+
+ if (V1.IsNull() || V2.IsNull()) {
+ SetErrorCode("Bad edge given for the plane normal vector");
+ return NULL;
+ }
+ V3 = TopoDS::Vertex(anPnt);
+
+ if(V3.IsNull()) {
+ SetErrorCode("Bad vertex given for the plane location");
+ return NULL;
+ }
+ gp_Pnt aLoc = BRep_Tool::Pnt(V3);
+ gp_Vec aVec(BRep_Tool::Pnt(V1),BRep_Tool::Pnt(V2));
+
+ if (aVec.Magnitude() < Precision::Confusion()) {
+ SetErrorCode("Vector with null magnitude given");
+ return NULL;
+ }
+ Handle(Geom_Surface) aPlane = new Geom_Plane(aLoc, aVec);
+
+ if ( aPlane.IsNull() )
+ return NULL;
+
+ // Find objects
+ TCollection_AsciiString anAsciiList;
+ Handle(TColStd_HSequenceOfTransient) aSeq;
+ aSeq = getShapesOnSurface( aPlane, theShape, aShapeType, theState, anAsciiList );
+ if ( aSeq.IsNull() || aSeq->Length() == 0 )
+ return NULL;
+
+ // Make a Python command
+
+ Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast( aSeq->Value( 1 ));
+ Handle(GEOM_Function) aFunction = anObj->GetLastFunction();
+
+ GEOM::TPythonDump(aFunction) << "[" << anAsciiList.ToCString()
+ << "] = geompy.GetShapesOnPlaneWithLocation(" << theShape << ", "
+ << aShapeType << ", " << theAx1 << ", "<< thePnt <<", " << theState << ")";
+
+ SetErrorCode(OK);
+ return aSeq;
+}
+
//=============================================================================
/*!
* GetShapesOnCylinder
aSeq = getShapesOnSurface( aCylinder, theShape, aShapeType, theState, anAsciiList );
if ( aSeq.IsNull() || aSeq->Length() == 0 )
return NULL;
-
+
// Make a Python command
Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast( aSeq->Value( 1 ));
aSeq = getShapesOnSurface( aSphere, theShape, aShapeType, theState, anAsciiList );
if ( aSeq.IsNull() || aSeq->Length() == 0 )
return NULL;
-
+
// Make a Python command
Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast( aSeq->Value( 1 ));
return aSeq;
}
+//=============================================================================
+/*!
+ * GetShapesOnPlaneWithLocationIDs
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::GetShapesOnPlaneWithLocationIDs
+ (const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ const Handle(GEOM_Object)& theAx1,
+ const Handle(GEOM_Object)& thePnt,
+ const GEOMAlgo_State theState)
+{
+ SetErrorCode(KO);
+
+ if (theShape.IsNull() || theAx1.IsNull() || thePnt.IsNull()) return NULL;
+
+ TopoDS_Shape aShape = theShape->GetValue();
+ TopoDS_Shape anAx1 = theAx1->GetValue();
+ TopoDS_Shape anPnt = thePnt->GetValue();
+
+ if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return NULL;
+
+ TopAbs_ShapeEnum aShapeType = TopAbs_ShapeEnum(theShapeType);
+ if ( !checkTypeShapesOn( aShapeType ))
+ return NULL;
+
+ // Create plane
+ if (anAx1.ShapeType() != TopAbs_EDGE || anPnt.ShapeType() != TopAbs_VERTEX) return NULL;
+ TopoDS_Edge anEdge = TopoDS::Edge(anAx1);
+ TopoDS_Vertex V1, V2, V3;
+ TopExp::Vertices(anEdge, V1, V2, Standard_True);
+ if (V1.IsNull() || V2.IsNull()) {
+ SetErrorCode("Bad edge given for the plane normal vector");
+ return NULL;
+ }
+ V3 = TopoDS::Vertex(anPnt);
+ if(V3.IsNull()) {
+ SetErrorCode("Bad vertex given for the plane location");
+ return NULL;
+ }
+ gp_Pnt aLoc = BRep_Tool::Pnt(V3);
+ gp_Vec aVec(BRep_Tool::Pnt(V1),BRep_Tool::Pnt(V2));
+ if (aVec.Magnitude() < Precision::Confusion()) {
+ SetErrorCode("Vector with null magnitude given");
+ return NULL;
+ }
+
+ Handle(Geom_Surface) aPlane = new Geom_Plane(aLoc, aVec);
+ if ( aPlane.IsNull() )
+ return NULL;
+
+ // Find object IDs
+ Handle(TColStd_HSequenceOfInteger) aSeq;
+ aSeq = getShapesOnSurfaceIDs( aPlane, aShape, aShapeType, theState );
+
+ // The GetShapesOnPlaneIDs() doesn't change object so no new function is required.
+ Handle(GEOM_Function) aFunction = GEOM::GetCreatedLast(theShape,theAx1)->GetLastFunction();
+
+ // Make a Python command
+ GEOM::TPythonDump(aFunction, /*append=*/true)
+ << "listShapesOnPlane = geompy.GetShapesOnPlaneWithLocationIDs"
+ << "(" << theShape << ", " << aShapeType << ", " << theAx1 << ", "<< thePnt << ", " << theState << ")";
+
+ SetErrorCode(OK);
+ return aSeq;
+}
+
//=============================================================================
/*!
* GetShapesOnCylinderIDs
Handle(Geom_Surface) aCylinder = makeCylinder( anAxis, theRadius );
if ( aCylinder.IsNull() )
return NULL;
-
+
// Find object IDs
Handle(TColStd_HSequenceOfInteger) aSeq;
aSeq = getShapesOnSurfaceIDs( aCylinder, aShape, aShapeType, theState );
// Find object IDs
Handle(TColStd_HSequenceOfInteger) aSeq;
aSeq = getShapesOnSurfaceIDs( aSphere, aShape, aShapeType, theState );
-
+
// The GetShapesOnSphere() doesn't change object so no new function is required.
Handle(GEOM_Function) aFunction = GEOM::GetCreatedLast(theShape,theCenter)->GetLastFunction();
TopoDS_Shape aBR = theBottomRigthPoint->GetValue();
if (aShape.IsNull() ||
- aTL.IsNull() ||
- aTR.IsNull() ||
- aBL.IsNull() ||
+ aTL.IsNull() ||
+ aTR.IsNull() ||
+ aBL.IsNull() ||
aBR.IsNull() ||
- aTL.ShapeType() != TopAbs_VERTEX ||
- aTR.ShapeType() != TopAbs_VERTEX ||
- aBL.ShapeType() != TopAbs_VERTEX ||
+ aTL.ShapeType() != TopAbs_VERTEX ||
+ aTR.ShapeType() != TopAbs_VERTEX ||
+ aBL.ShapeType() != TopAbs_VERTEX ||
aBR.ShapeType() != TopAbs_VERTEX )
return NULL;
* GetInPlace
*/
//=============================================================================
-static void SimplifyWhat (TopoDS_Shape& theWhat,
- TopTools_IndexedMapOfShape& theArgumentIndices,
- TColStd_ListOfInteger& theSimpleSubWhat)
+static bool GetInPlaceOfShape (const Handle(GEOM_Function)& theWhereFunction,
+ const TopTools_IndexedMapOfShape& theWhereIndices,
+ const TopoDS_Shape& theWhat,
+ TColStd_ListOfInteger& theModifiedList)
{
- TopTools_MapOfShape mapShape;
- TopoDS_Iterator It (theWhat, Standard_True, Standard_True);
- for (; It.More(); It.Next()) {
- if (mapShape.Add(It.Value())) {
- TopoDS_Shape curSh = It.Value();
- if (curSh.ShapeType() == TopAbs_COMPOUND ||
- curSh.ShapeType() == TopAbs_COMPSOLID) {
- SimplifyWhat(curSh, theArgumentIndices, theSimpleSubWhat);
- } else {
- theSimpleSubWhat.Append(theArgumentIndices.FindIndex(curSh));
- }
- }
+ if (theWhereFunction.IsNull() || theWhat.IsNull()) return false;
+
+ if (theWhereIndices.Contains(theWhat)) {
+ // entity was not changed by the operation
+ Standard_Integer aWhatIndex = theWhereIndices.FindIndex(theWhat);
+ theModifiedList.Append(aWhatIndex);
+ return true;
}
-}
-static bool GetInPlaceOfCompound (Handle(GEOM_Function)& theWhereFunction,
- TopoDS_Shape& theWhat,
- TColStd_ListOfInteger& theModifiedArray)
-{
- bool isFoundAny = false;
- TopTools_MapOfShape mapShape;
- TopoDS_Iterator It (theWhat, Standard_True, Standard_True);
- for (; It.More(); It.Next()) {
- if (mapShape.Add(It.Value())) {
- TopoDS_Shape curWhat = It.Value();
- if (curWhat.ShapeType() == TopAbs_COMPOUND ||
- curWhat.ShapeType() == TopAbs_COMPSOLID) {
- // Recursive call for compound or compsolid
- if (GetInPlaceOfCompound(theWhereFunction, curWhat, theModifiedArray))
- isFoundAny = true;
- } else {
- // Try to find for "simple" shape
- bool isFound = false;
-
- TDF_LabelSequence aLabelSeq;
- theWhereFunction->GetDependency(aLabelSeq);
- Standard_Integer nbArg = aLabelSeq.Length();
-
- for (Standard_Integer iarg = 1; iarg <= nbArg && !isFound; iarg++) {
-
- TDF_Label anArgumentRefLabel = aLabelSeq.Value(iarg);
-
- Handle(GEOM_Object) anArgumentObject = GEOM_Object::GetReferencedObject(anArgumentRefLabel);
- TopoDS_Shape anArgumentShape = anArgumentObject->GetValue();
-
- TopTools_IndexedMapOfShape anArgumentIndices;
- TopExp::MapShapes(anArgumentShape, anArgumentIndices);
-
- if (anArgumentIndices.Contains(curWhat)) {
- isFound = Standard_True;
- Standard_Integer aWhatIndex = anArgumentIndices.FindIndex(curWhat);
-
- // Find corresponding label in history
- TDF_Label anArgumentHistoryLabel =
- theWhereFunction->GetArgumentHistoryEntry(anArgumentRefLabel, Standard_False);
- if (!anArgumentHistoryLabel.IsNull()) {
- TDF_Label aWhatHistoryLabel = anArgumentHistoryLabel.FindChild(aWhatIndex, Standard_False);
- if (!aWhatHistoryLabel.IsNull()) {
- Handle(TDataStd_IntegerArray) anIntegerArray;
- if (aWhatHistoryLabel.FindAttribute(TDataStd_IntegerArray::GetID(), anIntegerArray)) {
- Standard_Integer imod, aModifLen = anIntegerArray->Array()->Length();
- for (imod = 1; imod <= aModifLen; imod++) {
- theModifiedArray.Append(anIntegerArray->Array()->Value(imod));
- }
- }
- }
+ // try to find in history
+ TDF_Label aHistoryLabel = theWhereFunction->GetHistoryEntry(Standard_False);
+
+ // search in history for all argument shapes
+ Standard_Boolean isFound = Standard_False;
+ Standard_Boolean isGood = Standard_False;
+
+ TDF_LabelSequence aLabelSeq;
+ theWhereFunction->GetDependency(aLabelSeq);
+ Standard_Integer nbArg = aLabelSeq.Length();
+
+ for (Standard_Integer iarg = 1; iarg <= nbArg && !isFound; iarg++) {
+
+ TDF_Label anArgumentRefLabel = aLabelSeq.Value(iarg);
+
+ Handle(GEOM_Object) anArgumentObject = GEOM_Object::GetReferencedObject(anArgumentRefLabel);
+ TopoDS_Shape anArgumentShape = anArgumentObject->GetValue();
+
+ TopTools_IndexedMapOfShape anArgumentIndices;
+ TopExp::MapShapes(anArgumentShape, anArgumentIndices);
+
+ if (anArgumentIndices.Contains(theWhat)) {
+ isFound = Standard_True;
+ Standard_Integer aWhatIndex = anArgumentIndices.FindIndex(theWhat);
+
+ // Find corresponding label in history
+ TDF_Label anArgumentHistoryLabel =
+ theWhereFunction->GetArgumentHistoryEntry(anArgumentRefLabel, Standard_False);
+ if (anArgumentHistoryLabel.IsNull()) {
+ // Lost History of operation argument. Possibly, all its entities was removed.
+ isGood = Standard_True;
+ }
+ else {
+ TDF_Label aWhatHistoryLabel = anArgumentHistoryLabel.FindChild(aWhatIndex, Standard_False);
+
+ if (aWhatHistoryLabel.IsNull()) {
+ // Removed entity ? Compound ? Compsolid ? Shell ? Wire
+ isGood = Standard_False;
+ } else {
+ Handle(TDataStd_IntegerArray) anIntegerArray;
+ if (!aWhatHistoryLabel.FindAttribute(TDataStd_IntegerArray::GetID(), anIntegerArray)) {
+ //Error: Empty modifications history for the sought shape.
+ isGood = Standard_False;
+ }
+ else {
+ isGood = Standard_True;
+ Standard_Integer imod, aModifLen = anIntegerArray->Array()->Length();
+ for (imod = 1; imod <= aModifLen; imod++) {
+ theModifiedList.Append(anIntegerArray->Array()->Value(imod));
}
}
}
- if (isFound)
- isFoundAny = true;
}
}
}
- return isFoundAny;
+
+ isFound = isGood;
+
+ if (!isFound) {
+ // try compound/compsolid/shell/wire element by element
+ bool isFoundAny = false;
+ TopTools_MapOfShape mapShape;
+
+ if (theWhat.ShapeType() == TopAbs_COMPOUND ||
+ theWhat.ShapeType() == TopAbs_COMPSOLID) {
+ // recursive processing of compound/compsolid
+ TopoDS_Iterator anIt (theWhat, Standard_True, Standard_True);
+ for (; anIt.More(); anIt.Next()) {
+ if (mapShape.Add(anIt.Value())) {
+ TopoDS_Shape curWhat = anIt.Value();
+ isFoundAny = GetInPlaceOfShape(theWhereFunction, theWhereIndices, curWhat, theModifiedList);
+ if (isFoundAny) isFound = Standard_True;
+ }
+ }
+ }
+ else if (theWhat.ShapeType() == TopAbs_SHELL) {
+ // try to replace a shell by its faces images
+ TopExp_Explorer anExp (theWhat, TopAbs_FACE);
+ for (; anExp.More(); anExp.Next()) {
+ if (mapShape.Add(anExp.Current())) {
+ TopoDS_Shape curWhat = anExp.Current();
+ isFoundAny = GetInPlaceOfShape(theWhereFunction, theWhereIndices, curWhat, theModifiedList);
+ if (isFoundAny) isFound = Standard_True;
+ }
+ }
+ }
+ else if (theWhat.ShapeType() == TopAbs_WIRE) {
+ // try to replace a wire by its edges images
+ TopExp_Explorer anExp (theWhat, TopAbs_EDGE);
+ for (; anExp.More(); anExp.Next()) {
+ if (mapShape.Add(anExp.Current())) {
+ TopoDS_Shape curWhat = anExp.Current();
+ isFoundAny = GetInPlaceOfShape(theWhereFunction, theWhereIndices, curWhat, theModifiedList);
+ if (isFoundAny) isFound = Standard_True;
+ }
+ }
+ }
+ else {
+ // Removed entity
+ }
+ }
+
+ return isFound;
}
Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace
if (aWhere.IsNull() || aWhat.IsNull()) return NULL;
- //Fill array of indices
- Handle(TColStd_HArray1OfInteger) aModifiedArray;
-
Handle(GEOM_Function) aWhereFunction = theShapeWhere->GetLastFunction();
+ if (aWhereFunction.IsNull()) return NULL;
+ //Fill array of indices
TopTools_IndexedMapOfShape aWhereIndices;
TopExp::MapShapes(aWhere, aWhereIndices);
- if (aWhereIndices.Contains(aWhat)) {
-
- // entity was not changed by the operation
- Standard_Integer aWhatIndex = aWhereIndices.FindIndex(aWhat);
- aModifiedArray = new TColStd_HArray1OfInteger(1,1);
- aModifiedArray->SetValue(1, aWhatIndex);
-
- } else {
-
- TDF_Label aHistoryLabel = aWhereFunction->GetHistoryEntry(Standard_False);
- if (aHistoryLabel.IsNull()) {
- SetErrorCode("Modifications history does not exist for the shape under consideration.");
- return NULL;
- }
-
- // search in history for all argument shapes
- Standard_Boolean isFound = Standard_False;
-
- TDF_LabelSequence aLabelSeq;
- aWhereFunction->GetDependency(aLabelSeq);
- Standard_Integer nbArg = aLabelSeq.Length();
-
- for (Standard_Integer iarg = 1; iarg <= nbArg && !isFound; iarg++) {
-
- TDF_Label anArgumentRefLabel = aLabelSeq.Value(iarg);
-
- Handle(GEOM_Object) anArgumentObject = GEOM_Object::GetReferencedObject(anArgumentRefLabel);
- TopoDS_Shape anArgumentShape = anArgumentObject->GetValue();
-
- TopTools_IndexedMapOfShape anArgumentIndices;
- TopExp::MapShapes(anArgumentShape, anArgumentIndices);
+ // process shape
+ TColStd_ListOfInteger aModifiedList;
+ bool isFound = GetInPlaceOfShape(aWhereFunction, aWhereIndices, aWhat, aModifiedList);
- if (anArgumentIndices.Contains(aWhat)) {
- isFound = Standard_True;
- Standard_Integer aWhatIndex = anArgumentIndices.FindIndex(aWhat);
-
- // Find corresponding label in history
- TDF_Label anArgumentHistoryLabel =
- aWhereFunction->GetArgumentHistoryEntry(anArgumentRefLabel, Standard_False);
- if (anArgumentHistoryLabel.IsNull()) {
- // Lost History of operation argument. Possibly, all its entities was removed.
- SetErrorCode(OK);
- return NULL;
- }
-
- TDF_Label aWhatHistoryLabel = anArgumentHistoryLabel.FindChild(aWhatIndex, Standard_False);
- if (aWhatHistoryLabel.IsNull()) {
- // Check, if the sought shape is Compound or Compsolid.
- // In that case we will try to find history for its sub-shapes
- if (aWhat.ShapeType() == TopAbs_COMPOUND ||
- aWhat.ShapeType() == TopAbs_COMPSOLID) {
- TColStd_ListOfInteger aSimpleSubWhat, aModifiedList;
- SimplifyWhat(aWhat, anArgumentIndices, aSimpleSubWhat);
- TColStd_ListIteratorOfListOfInteger anIterSub (aSimpleSubWhat);
- for (; anIterSub.More(); anIterSub.Next()) {
- Standard_Integer aSubWhatIndex = anIterSub.Value();
- TDF_Label aSubWhatHistoryLabel =
- anArgumentHistoryLabel.FindChild(aSubWhatIndex, Standard_False);
- if (!aSubWhatHistoryLabel.IsNull()) {
- Handle(TDataStd_IntegerArray) anIntegerArray;
- if (aSubWhatHistoryLabel.FindAttribute(TDataStd_IntegerArray::GetID(), anIntegerArray)) {
- for (Standard_Integer isub = 1; isub <= anIntegerArray->Length(); isub++) {
- aModifiedList.Append(anIntegerArray->Value(isub));
- }
- }
- }
- }
- if (aModifiedList.Extent() > 0) {
- Handle(TColStd_HArray1OfInteger) aModifiedArraySub =
- new TColStd_HArray1OfInteger (1, aModifiedList.Extent());
- TColStd_ListIteratorOfListOfInteger anIterModif (aModifiedList);
- for (Standard_Integer imod = 1; anIterModif.More(); anIterModif.Next(), imod++) {
- aModifiedArraySub->SetValue(imod, anIterModif.Value());
- }
- aModifiedArray = aModifiedArraySub;
- } else {
- // Removed entity
- SetErrorCode(OK);
- return NULL;
- }
- } else {
- // Removed entity
- SetErrorCode(OK);
- return NULL;
- }
- } else {
- Handle(TDataStd_IntegerArray) anIntegerArray;
- if (!aWhatHistoryLabel.FindAttribute(TDataStd_IntegerArray::GetID(), anIntegerArray)) {
- SetErrorCode("Error: Empty modifications history for the sought shape.");
- return NULL;
- }
-
- aModifiedArray = anIntegerArray->Array();
- if (aModifiedArray->Length() == 0) {
- SetErrorCode("Error: Empty modifications history for the sought shape.");
- return NULL;
- }
- }
- }
- }
+ if (!isFound || aModifiedList.Extent() < 1) {
+ SetErrorCode("Error: No history found for the sought shape or its sub-shapes.");
+ return NULL;
+ }
- if (!isFound) {
- // try compound element by element
- if (aWhat.ShapeType() == TopAbs_COMPOUND ||
- aWhat.ShapeType() == TopAbs_COMPSOLID) {
- TColStd_ListOfInteger aModifiedList;
- isFound = GetInPlaceOfCompound(aWhereFunction, aWhat, aModifiedList);
- if (isFound) {
- aModifiedArray = new TColStd_HArray1OfInteger (1, aModifiedList.Extent());
- TColStd_ListIteratorOfListOfInteger anIterModif (aModifiedList);
- for (Standard_Integer imod = 1; anIterModif.More(); anIterModif.Next(), imod++) {
- aModifiedArray->SetValue(imod, anIterModif.Value());
- }
- }
- }
- if (!isFound) {
- SetErrorCode("The sought shape does not belong to any operation argument.");
- return NULL;
- }
- }
+ Handle(TColStd_HArray1OfInteger) aModifiedArray =
+ new TColStd_HArray1OfInteger (1, aModifiedList.Extent());
+ TColStd_ListIteratorOfListOfInteger anIterModif (aModifiedList);
+ for (Standard_Integer imod = 1; anIterModif.More(); anIterModif.Next(), imod++) {
+ aModifiedArray->SetValue(imod, anIterModif.Value());
}
//Add a new object
Handle(GEOM_Object) aResult = GetEngine()->AddSubShape(theShapeWhere, aModifiedArray);
+ if (aResult.IsNull()) {
+ SetErrorCode("Error in algorithm: result found, but cannot be returned.");
+ return NULL;
+ }
if (aModifiedArray->Length() > 1) {
//Set a GROUP type
aResult->SetType(GEOM_GROUP);
//Set a sub shape type
+ TopoDS_Shape aFirstFound = aWhereIndices.FindKey(aModifiedArray->Value(1));
+ TopAbs_ShapeEnum aShapeType = aFirstFound.ShapeType();
+
TDF_Label aFreeLabel = aResult->GetFreeLabel();
- TopAbs_ShapeEnum aShapeType = aWhat.ShapeType();
TDataStd_Integer::Set(aFreeLabel, (Standard_Integer)aShapeType);
}
return true;
}
+
+#define MAX_TOLERANCE 1.e-7
+
+
+//=======================================================================
+//function : isSameEdge
+//purpose : Returns True if two edges coincide
+//=======================================================================
+static bool isSameEdge(const TopoDS_Edge& theEdge1, const TopoDS_Edge& theEdge2)
+{
+ TopoDS_Vertex V11, V12, V21, V22;
+ TopExp::Vertices(theEdge1, V11, V12);
+ TopExp::Vertices(theEdge2, V21, V22);
+ gp_Pnt P11 = BRep_Tool::Pnt(V11);
+ gp_Pnt P12 = BRep_Tool::Pnt(V12);
+ gp_Pnt P21 = BRep_Tool::Pnt(V21);
+ gp_Pnt P22 = BRep_Tool::Pnt(V22);
+ bool coincide = false;
+
+ //Check that ends of edges coincide
+ if(P11.Distance(P21) <= MAX_TOLERANCE) {
+ if(P12.Distance(P22) <= MAX_TOLERANCE) coincide = true;
+ }
+ else if(P11.Distance(P22) <= MAX_TOLERANCE) {
+ if(P12.Distance(P21) <= MAX_TOLERANCE) coincide = true;
+ }
+
+ if(!coincide) return false;
+
+ double U11, U12, U21, U22;
+ Handle(Geom_Curve) C1 = BRep_Tool::Curve(theEdge1, U11, U12);
+ Handle(Geom_Curve) C2 = BRep_Tool::Curve(theEdge2, U21, U22);
+ if(C1->DynamicType() == C2->DynamicType()) return true;
+
+ //Check that both edges has the same geometry
+ double range = U12-U11;
+ double U = U11+ range/3.0;
+ gp_Pnt P1 = C1->Value(U); //Compute a point on one third of the edge's length
+ U = U11+range*2.0/3.0;
+ gp_Pnt P2 = C1->Value(U); //Compute a point on two thirds of the edge's length
+
+ if(!GeomLib_Tool::Parameter(C2, P1, MAX_TOLERANCE, U) || U < U21 || U > U22)
+ return false;
+
+ if(P1.Distance(C2->Value(U)) > MAX_TOLERANCE) return false;
+
+ if(!GeomLib_Tool::Parameter(C2, P2, MAX_TOLERANCE, U) || U < U21 || U > U22)
+ return false;
+
+ if(P2.Distance(C2->Value(U)) > MAX_TOLERANCE) return false;
+
+ return true;
+}
+
+#include <TopoDS_TShape.hxx>
+//=======================================================================
+//function : isSameFace
+//purpose : Returns True if two faces coincide
+//=======================================================================
+static bool isSameFace(const TopoDS_Face& theFace1, const TopoDS_Face& theFace2)
+{
+ TopExp_Explorer E(theFace1, TopAbs_EDGE);
+ TopTools_ListOfShape LS1, LS2;
+ for(; E.More(); E.Next()) LS1.Append(E.Current());
+
+ E.Init(theFace2, TopAbs_EDGE);
+ for(; E.More(); E.Next()) LS2.Append(E.Current());
+
+ //Compare the number of edges in the faces
+ if(LS1.Extent() != LS2.Extent()) return false;
+
+ double aMin = RealFirst(), aMax = RealLast();
+ double xminB1=aMax, yminB1=aMax, zminB1=aMax, xminB2=aMax, yminB2=aMax, zminB2=aMax;
+ double xmaxB1=aMin, ymaxB1=aMin, zmaxB1=aMin, xmaxB2=aMin, ymaxB2=aMin, zmaxB2=aMin;
+
+ for(E.Init(theFace1, TopAbs_VERTEX); E.More(); E.Next()) {
+ gp_Pnt P = BRep_Tool::Pnt(TopoDS::Vertex(E.Current()));
+ if(P.X() < xminB1) xminB1 = P.X();
+ if(P.Y() < yminB1) yminB1 = P.Y();
+ if(P.Z() < zminB1) zminB1 = P.Z();
+ if(P.X() > xmaxB1) xmaxB1 = P.X();
+ if(P.Y() > ymaxB1) ymaxB1 = P.Y();
+ if(P.Z() > zmaxB1) zmaxB1 = P.Z();
+ }
+
+ for(E.Init(theFace2, TopAbs_VERTEX); E.More(); E.Next()) {
+ gp_Pnt P = BRep_Tool::Pnt(TopoDS::Vertex(E.Current()));
+ if(P.X() < xminB2) xminB2 = P.X();
+ if(P.Y() < yminB2) yminB2 = P.Y();
+ if(P.Z() < zminB2) zminB2 = P.Z();
+ if(P.X() > xmaxB2) xmaxB2 = P.X();
+ if(P.Y() > ymaxB2) ymaxB2 = P.Y();
+ if(P.Z() > zmaxB2) zmaxB2 = P.Z();
+ }
+
+ //Compare the bounding boxes of both faces
+ if(gp_Pnt(xminB1, yminB1, zminB1).Distance(gp_Pnt(xminB2, yminB2, zminB2)) > MAX_TOLERANCE)
+ return false;
+
+ if(gp_Pnt(xmaxB1, ymaxB1, zmaxB1).Distance(gp_Pnt(xmaxB2, ymaxB2, zmaxB2)) > MAX_TOLERANCE)
+ return false;
+
+ //Check that each edge of the Face1 has a counterpart in the Face2
+ TopTools_MapOfOrientedShape aMap;
+ TopTools_ListIteratorOfListOfShape LSI1(LS1);
+ for(; LSI1.More(); LSI1.Next()) {
+ TopoDS_Edge E = TopoDS::Edge(LSI1.Value());
+ bool isFound = false;
+ TopTools_ListIteratorOfListOfShape LSI2(LS2);
+ for(; LSI2.More(); LSI2.Next()) {
+ TopoDS_Shape aValue = LSI2.Value();
+ if(aMap.Contains(aValue)) continue; //To avoid checking already found edge several times
+ if(isSameEdge(E, TopoDS::Edge(aValue))) {
+ aMap.Add(aValue);
+ isFound = true;
+ break;
+ }
+ }
+ if(!isFound) return false;
+ }
+
+ Handle(Geom_Surface) S1 = BRep_Tool::Surface(theFace1);
+ Handle(Geom_Surface) S2 = BRep_Tool::Surface(theFace2);
+ if(S1->DynamicType() == S2->DynamicType()) {
+ return true;
+ }
+ else { //Check if there a coincidence of two surfaces at least in two points
+ double U11, U12, V11, V12, U21, U22, V21, V22;
+ BRepTools::UVBounds(theFace1, U11, U12, V11, V12);
+ BRepTools::UVBounds(theFace2, U21, U22, V21, V22);
+
+ double rangeU = U12-U11;
+ double rangeV = V12-V11;
+ double U = U11 + rangeU/3.0;
+ double V = V11 + rangeV/3.0;
+ gp_Pnt P1 = S1->Value(U, V);
+ U = U11+rangeU*2.0/3.0;
+ V = V11+rangeV*2.0/3.0;
+ gp_Pnt P2 = S1->Value(U, V);
+
+ if(!GeomLib_Tool::Parameters(S2, P1, MAX_TOLERANCE, U, V) || U < U21 || U > U22 || V < V21 || V > V22)
+ return false;
+
+ if(P1.Distance(S2->Value(U,V)) > MAX_TOLERANCE) return false;
+
+ if(!GeomLib_Tool::Parameters(S2, P2, MAX_TOLERANCE, U, V) || U < U21 || U > U22 || V < V21 || V > V22)
+ return false;
+
+ if(P2.Distance(S2->Value(U, V)) > MAX_TOLERANCE) return false;
+ }
+
+ return true;
+}
+
+//=======================================================================
+//function : isSameSolid
+//purpose : Returns True if two solids coincide
+//=======================================================================
+bool isSameSolid(const TopoDS_Solid& theSolid1, const TopoDS_Solid& theSolid2)
+{
+ TopExp_Explorer E(theSolid1, TopAbs_FACE);
+ TopTools_ListOfShape LS1, LS2;
+ for(; E.More(); E.Next()) LS1.Append(E.Current());
+ E.Init(theSolid2, TopAbs_FACE);
+ for(; E.More(); E.Next()) LS2.Append(E.Current());
+
+ if(LS1.Extent() != LS2.Extent()) return false;
+
+ double aMin = RealFirst(), aMax = RealLast();
+ double xminB1=aMax, yminB1=aMax, zminB1=aMax, xminB2=aMax, yminB2=aMax, zminB2=aMax;
+ double xmaxB1=aMin, ymaxB1=aMin, zmaxB1=aMin, xmaxB2=aMin, ymaxB2=aMin, zmaxB2=aMin;
+
+ for(E.Init(theSolid1, TopAbs_VERTEX); E.More(); E.Next()) {
+ gp_Pnt P = BRep_Tool::Pnt(TopoDS::Vertex(E.Current()));
+ if(P.X() < xminB1) xminB1 = P.X();
+ if(P.Y() < yminB1) yminB1 = P.Y();
+ if(P.Z() < zminB1) zminB1 = P.Z();
+ if(P.X() > xmaxB1) xmaxB1 = P.X();
+ if(P.Y() > ymaxB1) ymaxB1 = P.Y();
+ if(P.Z() > zmaxB1) zmaxB1 = P.Z();
+ }
+
+ for(E.Init(theSolid2, TopAbs_VERTEX); E.More(); E.Next()) {
+ gp_Pnt P = BRep_Tool::Pnt(TopoDS::Vertex(E.Current()));
+ if(P.X() < xminB2) xminB2 = P.X();
+ if(P.Y() < yminB2) yminB2 = P.Y();
+ if(P.Z() < zminB2) zminB2 = P.Z();
+ if(P.X() > xmaxB2) xmaxB2 = P.X();
+ if(P.Y() > ymaxB2) ymaxB2 = P.Y();
+ if(P.Z() > zmaxB2) zmaxB2 = P.Z();
+ }
+
+ //Compare the bounding boxes of both solids
+ if(gp_Pnt(xminB1, yminB1, zminB1).Distance(gp_Pnt(xminB2, yminB2, zminB2)) > MAX_TOLERANCE)
+ return false;
+
+ if(gp_Pnt(xmaxB1, ymaxB1, zmaxB1).Distance(gp_Pnt(xmaxB2, ymaxB2, zmaxB2)) > MAX_TOLERANCE)
+ return false;
+
+ //Check that each face of the Solid1 has a counterpart in the Solid2
+ TopTools_MapOfOrientedShape aMap;
+ TopTools_ListIteratorOfListOfShape LSI1(LS1);
+ for(; LSI1.More(); LSI1.Next()) {
+ TopoDS_Face F = TopoDS::Face(LSI1.Value());
+ bool isFound = false;
+ TopTools_ListIteratorOfListOfShape LSI2(LS2);
+ for(; LSI2.More(); LSI2.Next()) {
+ if(aMap.Contains(LSI2.Value())) continue; //To avoid checking already found faces several times
+ if(isSameFace(F, TopoDS::Face(LSI2.Value()))) {
+ aMap.Add(LSI2.Value());
+ isFound = true;
+ break;
+ }
+ }
+ if(!isFound) return false;
+ }
+
+ return true;
+}
+
+//=======================================================================
+//function : GetSame
+//purpose :
+//=======================================================================
+Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetSame(const Handle(GEOM_Object)& theShapeWhere,
+ const Handle(GEOM_Object)& theShapeWhat)
+{
+ SetErrorCode(KO);
+ if (theShapeWhere.IsNull() || theShapeWhat.IsNull()) return NULL;
+
+ TopoDS_Shape aWhere = theShapeWhere->GetValue();
+ TopoDS_Shape aWhat = theShapeWhat->GetValue();
+
+ if (aWhere.IsNull() || aWhat.IsNull()) return NULL;
+
+ int anIndex = -1;
+ bool isFound = false;
+ TopoDS_Shape aSubShape;
+ TopTools_MapOfShape aMap;
+
+ switch(aWhat.ShapeType()) {
+ case TopAbs_VERTEX: {
+ gp_Pnt P = BRep_Tool::Pnt(TopoDS::Vertex(aWhat));
+ TopExp_Explorer E(aWhere, TopAbs_VERTEX);
+ for(; E.More(); E.Next()) {
+ if(!aMap.Add(E.Current())) continue;
+ gp_Pnt P2 = BRep_Tool::Pnt(TopoDS::Vertex(E.Current()));
+ if(P.Distance(P2) <= MAX_TOLERANCE) {
+ isFound = true;
+ aSubShape = E.Current();
+ break;
+ }
+ }
+ break;
+ }
+ case TopAbs_FACE: {
+ TopoDS_Face aFace = TopoDS::Face(aWhat);
+ TopExp_Explorer E(aWhere, TopAbs_FACE);
+ for(; E.More(); E.Next()) {
+ if(!aMap.Add(E.Current())) continue;
+ if(isSameFace(aFace, TopoDS::Face(E.Current()))) {
+ aSubShape = E.Current();
+ isFound = true;
+ break;
+ }
+ }
+ break;
+ }
+ case TopAbs_EDGE: {
+ TopoDS_Edge anEdge = TopoDS::Edge(aWhat);
+ TopExp_Explorer E(aWhere, TopAbs_EDGE);
+ for(; E.More(); E.Next()) {
+ if(!aMap.Add(E.Current())) continue;
+ if(isSameEdge(anEdge, TopoDS::Edge(E.Current()))) {
+ aSubShape = E.Current();
+ isFound = true;
+ break;
+ }
+ }
+ break;
+ }
+ case TopAbs_SOLID: {
+ TopoDS_Solid aSolid = TopoDS::Solid(aWhat);
+ TopExp_Explorer E(aWhere, TopAbs_SOLID);
+ for(; E.More(); E.Next()) {
+ if(!aMap.Add(E.Current())) continue;
+ if(isSameSolid(aSolid, TopoDS::Solid(E.Current()))) {
+ aSubShape = E.Current();
+ isFound = true;
+ break;
+ }
+ }
+ break;
+ }
+ default:
+ return NULL;
+ }
+
+ if(isFound) {
+ TopTools_IndexedMapOfShape anIndices;
+ TopExp::MapShapes(aWhere, anIndices);
+ if (anIndices.Contains(aSubShape))
+ anIndex = anIndices.FindIndex(aSubShape);
+ }
+
+ if(anIndex < 0) return NULL;
+
+ Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1);
+
+ anArray->SetValue(1, anIndex);
+
+ Handle(GEOM_Object) aResult = GetEngine()->AddSubShape(theShapeWhere, anArray);
+ Handle(GEOM_Function) aFunction = aResult->GetLastFunction();
+
+ GEOM::TPythonDump(aFunction) << aResult << " = geompy.GetSame("
+ << theShapeWhere << ", " << theShapeWhat << ")";
+
+ SetErrorCode(OK);
+
+ return aResult;
+}
const Handle(GEOM_Object)& theAx1,
const GEOMAlgo_State theState);
+ Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetShapesOnPlaneWithLocation (const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ const Handle(GEOM_Object)& theAx1,
+ const Handle(GEOM_Object)& thePnt,
+ const GEOMAlgo_State theState);
+
+
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetShapesOnCylinder (const Handle(GEOM_Object)& theShape,
const Standard_Integer theShapeType,
const Handle(GEOM_Object)& theAxis,
const Handle(GEOM_Object)& theAx1,
const GEOMAlgo_State theState);
+ Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetShapesOnPlaneWithLocationIDs (const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ const Handle(GEOM_Object)& theAx1,
+ const Handle(GEOM_Object)& thePnt,
+ const GEOMAlgo_State theState);
+
Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetShapesOnCylinderIDs (const Handle(GEOM_Object)& theShape,
const Standard_Integer theShapeType,
const Handle(GEOM_Object)& theAxis,
Standard_EXPORT static void SortShapes (TopTools_ListOfShape& SL);
+ /*!
+ * \brief Searches a shape equal to theWhat in the context of theWhere
+ * \param theShapeWhere - a context shap
+ * \param theShapeWhat - a sample shape
+ * \retval Handle(GEOM_Object) - found shape
+ */
+ Standard_EXPORT Handle(GEOM_Object) GetSame(const Handle(GEOM_Object)& theShapeWhere,
+ const Handle(GEOM_Object)& theShapeWhat);
+
+ /*!
+ * \brief Find IDs of subshapes complying with given status about surface
+ * \param theBox - the box to check state of subshapes against
+ * \param theShape - the shape to explore
+ * \param theShapeType - type of subshape of theShape
+ * \param theState - required state
+ * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes
+ */
+ Standard_EXPORT Handle(TColStd_HSequenceOfInteger)
+ GEOMImpl_IShapesOperations::GetShapesOnBoxIDs(const Handle(GEOM_Object)& theBox,
+ const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ GEOMAlgo_State theState);
+
+ /*!
+ * \brief Find subshapes complying with given status about surface
+ * \param theBox - the box to check state of subshapes against
+ * \param theShape - the shape to explore
+ * \param theShapeType - type of subshape of theShape
+ * \param theState - required state
+ * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes
+ */
+ Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
+ GEOMImpl_IShapesOperations::GetShapesOnBox(const Handle(GEOM_Object)& theBox,
+ const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ GEOMAlgo_State theState);
+
+
private:
Handle(GEOM_Object) MakeShape (list<Handle(GEOM_Object)> theShapes,
const Standard_Integer theObjectType,
const Handle(GEOM_Object)& theBottomRigthPoint,
const GEOMAlgo_State theState);
+ /*!
+ * \brief Find IDs of subshapes complying with given status about surface
+ * \param theBox - the box to check state of subshapes against
+ * \param theShape - the shape to explore
+ * \param theShapeType - type of subshape of theShape
+ * \param theState - required state
+ * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes
+ */
+ Handle(TColStd_HSequenceOfInteger)
+ GEOMImpl_IShapesOperations::getShapesOnBoxIDs(const Handle(GEOM_Object)& theBox,
+ const Handle(GEOM_Object)& theShape,
+ const Standard_Integer theShapeType,
+ GEOMAlgo_State theState);
+
/*!
* \brief Find shape objects and their entries by their ids
* \param theShape - the main shape
SetErrorCode(OK);
return aCopy;
}
+
+//=============================================================================
+/*!
+ * RotateThreePoints
+ */
+//=============================================================================
+Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateThreePoints (Handle(GEOM_Object) theObject,
+ Handle(GEOM_Object) theCentPoint,
+ Handle(GEOM_Object) thePoint1,
+ Handle(GEOM_Object) thePoint2)
+{
+ SetErrorCode(KO);
+
+ if (theObject.IsNull() || theCentPoint.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL;
+
+ Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction();
+ if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
+
+ // Get last functions of the arguments
+ Handle(GEOM_Function) aCPF = theCentPoint->GetLastFunction();
+ Handle(GEOM_Function) aP1F = thePoint1->GetLastFunction();
+ Handle(GEOM_Function) aP2F = thePoint2->GetLastFunction();
+
+
+ //Add a rotate function
+ aFunction = theObject->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_THREE_POINTS);
+
+ if (aFunction.IsNull()) return NULL;
+
+ //Check if the function is set correctly
+ if (aFunction->GetDriverGUID() != GEOMImpl_RotateDriver::GetID()) return NULL;
+
+ GEOMImpl_IRotate aRI(aFunction);
+ aRI.SetCentPoint(aCPF);
+ aRI.SetPoint1(aP1F);
+ aRI.SetPoint2(aP2F);
+ aRI.SetOriginal(aLastFunction);
+
+ //Compute the translation
+ try {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ OCC_CATCH_SIGNALS;
+#endif
+ if (!GetSolver()->ComputeFunction(aFunction)) {
+ SetErrorCode("Rotate driver failed");
+ return NULL;
+ }
+ }
+ catch (Standard_Failure) {
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+ SetErrorCode(aFail->GetMessageString());
+ return NULL;
+ }
+
+ //Make a Python command
+ GEOM::TPythonDump(aFunction) << "geompy.TrsfOp.RotateThreePoints(" << theObject
+ << ", " << theCentPoint << ", "<<thePoint1 << ", " << thePoint2 << ")";
+
+ SetErrorCode(OK);
+ return theObject;
+}
+
+//=============================================================================
+/*!
+ * RotateThreePointsCopy
+ */
+//=============================================================================
+Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateThreePointsCopy (Handle(GEOM_Object) theObject,
+ Handle(GEOM_Object) theCentPoint,
+ Handle(GEOM_Object) thePoint1,
+ Handle(GEOM_Object) thePoint2)
+{
+ SetErrorCode(KO);
+
+ if (theObject.IsNull() || theCentPoint.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL;
+
+ Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction();
+ if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
+
+ //Add a new Copy object
+ Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+
+ //Add a rotate function
+ aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_THREE_POINTS_COPY);
+ if (aFunction.IsNull()) return NULL;
+
+ //Check if the function is set correctly
+ if (aFunction->GetDriverGUID() != GEOMImpl_RotateDriver::GetID()) return NULL;
+
+ GEOMImpl_IRotate aRI(aFunction);
+ aRI.SetCentPoint(theCentPoint->GetLastFunction());
+ aRI.SetPoint1(thePoint1->GetLastFunction());
+ aRI.SetPoint2(thePoint2->GetLastFunction());
+ aRI.SetOriginal(aLastFunction);
+
+ //Compute the translation
+ try {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ OCC_CATCH_SIGNALS;
+#endif
+ if (!GetSolver()->ComputeFunction(aFunction)) {
+ SetErrorCode("Rotate driver failed");
+ return NULL;
+ }
+ }
+ catch (Standard_Failure) {
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+ SetErrorCode(aFail->GetMessageString());
+ return NULL;
+ }
+
+ //Make a Python command
+ GEOM::TPythonDump(aFunction) << aCopy << " = geompy.MakeRotationThreePoints(" << theObject
+ << ", " << theCentPoint << ", "<<thePoint1 << ", " << thePoint2 << ")";
+
+ SetErrorCode(OK);
+ return aCopy;
+}
+
Standard_Integer theNbTimes1,
double theStep,
Standard_Integer theNbTimes2);
+
+ Standard_EXPORT Handle(GEOM_Object) RotateThreePoints (Handle(GEOM_Object) theObject,
+ Handle(GEOM_Object) theCentPoint,
+ Handle(GEOM_Object) thePoint1,
+ Handle(GEOM_Object) thePoint2);
+
+ Standard_EXPORT Handle(GEOM_Object) RotateThreePointsCopy (Handle(GEOM_Object) theObject,
+ Handle(GEOM_Object) theCentPoint,
+ Handle(GEOM_Object) thePoint1,
+ Handle(GEOM_Object) thePoint2);
+
};
#endif
#include <Standard_ConstructionError.hxx>
#include <StdFail_NotDone.hxx>
+#include <NCollection_DataMap.hxx>
+
#ifdef WNT
#include <windows.h>
#else
if (aFileName.IsEmpty() || aFormatName.IsEmpty() || aLibName.IsEmpty())
return 0;
- // load plugin library
- LibHandle anImportLib = LoadLib( aLibName.ToCString() );
+ // load plugin library
+ LibHandle anImportLib = LoadLib( aLibName.ToCString() ); //This is workaround of BUG OCC13051
funcPoint fp = 0;
if ( anImportLib )
fp = (funcPoint)GetProc( anImportLib, "Import" );
TCollection_AsciiString anError;
TopoDS_Shape aShape = fp( aFileName, aFormatName, anError );
- // unload plugin library
- UnLoadLib( anImportLib );
+ // unload plugin library
+ //UnLoadLib( anImportLib ); //This is workaround of BUG OCC13051
if ( aShape.IsNull() ) {
StdFail_NotDone::Raise(anError.ToCString());
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <GEOM_Object.hxx>
#include <GEOM_Function.hxx>
-#include <NMTAlgo_Splitter1.hxx>
+//#include <NMTAlgo_Splitter1.hxx>
+#include <GEOMAlgo_Splitter.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
#include <TDataStd_IntegerArray.hxx>
#include <BRep_Tool.hxx>
#include <BRepAlgo.hxx>
+#include <TopAbs.hxx>
+#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
-#include <TopAbs.hxx>
-#include <TopExp.hxx>
+#include <TopoDS_Iterator.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
//=======================================================================
//function : GetID
//purpose :
-//=======================================================================
+//=======================================================================
const Standard_GUID& GEOMImpl_PartitionDriver::GetID()
{
static Standard_GUID aPartitionDriver("FF1BBB22-5D14-4df2-980B-3A668264EA16");
- return aPartitionDriver;
+ return aPartitionDriver;
}
//=======================================================================
//function : GEOMImpl_PartitionDriver
-//purpose :
+//purpose :
//=======================================================================
-GEOMImpl_PartitionDriver::GEOMImpl_PartitionDriver()
+GEOMImpl_PartitionDriver::GEOMImpl_PartitionDriver()
{
}
+//=======================================================================
+//function : SimplifyCompound
+//purpose :
+//=======================================================================
+static void PrepareShapes (const TopoDS_Shape& theShape,
+ Standard_Integer theType,
+ TopTools_ListOfShape& theSimpleList)
+{
+ if (theType == PARTITION_NO_SELF_INTERSECTIONS ||
+ theShape.ShapeType() != TopAbs_COMPOUND) {
+ theSimpleList.Append(theShape);
+ return;
+ }
+
+ // explode compound on simple shapes to allow their intersections
+ TopoDS_Iterator It (theShape, Standard_True, Standard_True);
+ TopTools_MapOfShape mapShape;
+ for (; It.More(); It.Next()) {
+ if (mapShape.Add(It.Value())) {
+ TopoDS_Shape curSh = It.Value();
+ PrepareShapes(curSh, theType, theSimpleList);
+ }
+ }
+}
+
//=======================================================================
//function : Execute
//purpose :
-//=======================================================================
+//=======================================================================
Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const
{
- if (Label().IsNull()) return 0;
+ if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
GEOMImpl_IPartition aCI (aFunction);
Standard_Integer aType = aFunction->GetType();
TopoDS_Shape aShape;
- NMTAlgo_Splitter1 PS;
+ //sklNMTAlgo_Splitter1 PS;
+ GEOMAlgo_Splitter PS;
- if (aType == PARTITION_PARTITION) {
+ if (aType == PARTITION_PARTITION || aType == PARTITION_NO_SELF_INTERSECTIONS)
+ {
Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes();
Handle(TColStd_HSequenceOfTransient) aTools = aCI.GetTools();
Handle(TColStd_HSequenceOfTransient) aKeepIns = aCI.GetKeepIns();
Handle(TColStd_HSequenceOfTransient) aRemIns = aCI.GetRemoveIns();
Handle(TColStd_HArray1OfInteger) aMaterials = aCI.GetMaterials();
- Standard_Boolean DoRemoveWebs = !aMaterials.IsNull();
-
- unsigned int ind, nbshapes = 0;
- nbshapes += aShapes->Length() + aTools->Length();
- nbshapes += aKeepIns->Length() + aRemIns->Length();
+ //skl Standard_Boolean DoRemoveWebs = !aMaterials.IsNull();
- TopTools_MapOfShape ShapesMap(nbshapes), ToolsMap(nbshapes);
+ unsigned int ind;
+ //unsigned int ind, nbshapes = 0;
+ //nbshapes += aShapes->Length() + aTools->Length();
+ //nbshapes += aKeepIns->Length() + aRemIns->Length();
+ //TopTools_MapOfShape ShapesMap(nbshapes), ToolsMap(nbshapes);
+ TopTools_MapOfShape ShapesMap, ToolsMap;
// add object shapes that are in ListShapes;
for (ind = 1; ind <= aShapes->Length(); ind++) {
if (aShape_i.IsNull()) {
Standard_NullObject::Raise("In Partition a shape is null");
}
- if (ShapesMap.Add(aShape_i)) {
- PS.AddShape(aShape_i);
- if (DoRemoveWebs) {
- if (aMaterials->Length() >= ind)
- PS.SetMaterial(aShape_i, aMaterials->Value(ind));
+ //
+ TopTools_ListOfShape aSimpleShapes;
+ PrepareShapes(aShape_i, aType, aSimpleShapes);
+ TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes);
+ for (; aSimpleIter.More(); aSimpleIter.Next()) {
+ const TopoDS_Shape& aSimpleSh = aSimpleIter.Value();
+ if (ShapesMap.Add(aSimpleSh)) {
+ PS.AddShape(aSimpleSh);
+ //skl if (DoRemoveWebs) {
+ //skl if (aMaterials->Length() >= ind)
+ //skl PS.SetMaterial(aSimpleSh, aMaterials->Value(ind));
+ //skl }
}
}
}
if (aShape_i.IsNull()) {
Standard_NullObject::Raise("In Partition a tool shape is null");
}
- if (!ShapesMap.Contains(aShape_i) && ToolsMap.Add(aShape_i))
- PS.AddTool(aShape_i);
+ //
+ TopTools_ListOfShape aSimpleShapes;
+ PrepareShapes(aShape_i, aType, aSimpleShapes);
+ TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes);
+ for (; aSimpleIter.More(); aSimpleIter.Next()) {
+ const TopoDS_Shape& aSimpleSh = aSimpleIter.Value();
+ if (!ShapesMap.Contains(aSimpleSh) && ToolsMap.Add(aSimpleSh)) {
+ PS.AddTool(aSimpleSh);
+ }
+ }
}
// add shapes that are in ListKeepInside, as object shapes;
if (aShape_i.IsNull()) {
Standard_NullObject::Raise("In Partition a Keep Inside shape is null");
}
- if (!ToolsMap.Contains(aShape_i) && ShapesMap.Add(aShape_i))
- PS.AddShape(aShape_i);
+ //
+ TopTools_ListOfShape aSimpleShapes;
+ PrepareShapes(aShape_i, aType, aSimpleShapes);
+ TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes);
+ for (; aSimpleIter.More(); aSimpleIter.Next()) {
+ const TopoDS_Shape& aSimpleSh = aSimpleIter.Value();
+ if (!ToolsMap.Contains(aSimpleSh) && ShapesMap.Add(aSimpleSh))
+ PS.AddShape(aSimpleSh);
+ }
}
// add shapes that are in ListRemoveInside, as object shapes;
if (aShape_i.IsNull()) {
Standard_NullObject::Raise("In Partition a Remove Inside shape is null");
}
- if (!ToolsMap.Contains(aShape_i) && ShapesMap.Add(aShape_i))
- PS.AddShape(aShape_i);
+ //
+ TopTools_ListOfShape aSimpleShapes;
+ PrepareShapes(aShape_i, aType, aSimpleShapes);
+ TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes);
+ for (; aSimpleIter.More(); aSimpleIter.Next()) {
+ const TopoDS_Shape& aSimpleSh = aSimpleIter.Value();
+ if (!ToolsMap.Contains(aSimpleSh) && ShapesMap.Add(aSimpleSh))
+ PS.AddShape(aSimpleSh);
+ }
}
- PS.Compute();
- PS.SetRemoveWebs(DoRemoveWebs);
- PS.Build((TopAbs_ShapeEnum) aCI.GetLimit());
+ PS.SetLimit( (TopAbs_ShapeEnum)aCI.GetLimit() );
+ PS.Perform();
+ //skl PS.Compute();
+ //skl PS.SetRemoveWebs(!DoRemoveWebs);
+ //skl PS.Build((TopAbs_ShapeEnum) aCI.GetLimit());
+ /*skl
// suppress result outside of shapes in KInsideMap
for (ind = 1; ind <= aKeepIns->Length(); ind++) {
Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aKeepIns->Value(ind));
TopoDS_Shape aShape_i = aRefShape->GetValue();
PS.RemoveShapesInside(aShape_i);
}
-
- } else if (aType == PARTITION_HALF) {
+ */
+ }
+ else if (aType == PARTITION_HALF)
+ {
Handle(GEOM_Function) aRefShape = aCI.GetShape();
Handle(GEOM_Function) aRefPlane = aCI.GetPlane();
TopoDS_Shape aShapeArg = aRefShape->GetValue();
// add tool shapes that are in ListTools and not in ListShapes;
PS.AddTool(aPlaneArg);
- PS.Compute();
- PS.SetRemoveWebs(Standard_False);
- PS.Build(aShapeArg.ShapeType());
+ //skl PS.Compute();
+ PS.Perform();
+ //PS.SetRemoveWebs(Standard_False);
+ //PS.Build(aShapeArg.ShapeType());
} else {
}
TopTools_IndexedMapOfShape aResIndices;
TopExp::MapShapes(aShape, aResIndices);
+ // Map: source_shape/images of source_shape in Result
+ const TopTools_IndexedDataMapOfShapeListOfShape& aMR = PS.ImagesResult();
+
// history for all argument shapes
TDF_LabelSequence aLabelSeq;
aFunction->GetDependency(aLabelSeq);
for (Standard_Integer ie = 1; ie <= nbArgumentEntities; ie++) {
TopoDS_Shape anEntity = anArgumentIndices.FindKey(ie);
- const TopTools_ListOfShape& aModified = PS.Modified(anEntity);
+ if (!aMR.Contains(anEntity)) continue;
+
+ const TopTools_ListOfShape& aModified = aMR.FindFromKey(anEntity);
Standard_Integer nbModified = aModified.Extent();
if (nbModified > 0) {
Handle(TDataStd_IntegerArray) anAttr =
TDataStd_IntegerArray::Set(aWhatHistoryLabel, 1, nbModified);
+ int ih = 1;
TopTools_ListIteratorOfListOfShape itM (aModified);
- for (int im = 1; itM.More(); itM.Next(), ++im) {
+ for (; itM.More(); itM.Next(), ++ih) {
int id = aResIndices.FindIndex(itM.Value());
- anAttr->SetValue(im, id);
+ anAttr->SetValue(ih, id);
}
}
}
//=======================================================================
//function : GEOMImpl_PartitionDriver_Type_
//purpose :
-//=======================================================================
+//=======================================================================
Standard_EXPORT Handle_Standard_Type& GEOMImpl_PartitionDriver_Type_()
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver);
if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
+ if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
+
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PartitionDriver",
//=======================================================================
//function : DownCast
//purpose :
-//=======================================================================
+//=======================================================================
const Handle(GEOMImpl_PartitionDriver) Handle(GEOMImpl_PartitionDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
{
Handle(GEOMImpl_PartitionDriver) _anOtherObject;
GEOMImpl_IRotate RI(aFunction);
gp_Trsf aTrsf;
+ gp_Pnt aCP, aP1, aP2;
Standard_Integer aType = aFunction->GetType();
Handle(GEOM_Function) anOriginalFunction = RI.GetOriginal();
if(anOriginalFunction.IsNull()) return 0;
BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
aShape = aTransformation.Shape();
}
+ else if(aType == ROTATE_THREE_POINTS || aType == ROTATE_THREE_POINTS_COPY) {
+ Handle(GEOM_Function) aCentPoint = RI.GetCentPoint();
+ Handle(GEOM_Function) aPoint1 = RI.GetPoint1();
+ Handle(GEOM_Function) aPoint2 = RI.GetPoint2();
+ if(aCentPoint.IsNull() || aPoint1.IsNull() || aPoint2.IsNull()) return 0;
+ TopoDS_Shape aCV = aCentPoint->GetValue();
+ TopoDS_Shape aV1 = aPoint1->GetValue();
+ TopoDS_Shape aV2 = aPoint2->GetValue();
+ if(aCV.IsNull() || aCV.ShapeType() != TopAbs_VERTEX) return 0;
+ if(aV1.IsNull() || aV1.ShapeType() != TopAbs_VERTEX) return 0;
+ if(aV2.IsNull() || aV2.ShapeType() != TopAbs_VERTEX) return 0;
+
+ aCP = BRep_Tool::Pnt(TopoDS::Vertex(aCV));
+ aP1 = BRep_Tool::Pnt(TopoDS::Vertex(aV1));
+ aP2 = BRep_Tool::Pnt(TopoDS::Vertex(aV2));
+
+ gp_Vec aVec1(aCP, aP1);
+ gp_Vec aVec2(aCP, aP2);
+ gp_Dir aDir(aVec1 ^ aVec2);
+ gp_Ax1 anAx1(aCP, aDir);
+ Standard_Real anAngle = aVec1.Angle(aVec2);
+ aTrsf.SetRotation(anAx1, anAngle);
+ BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
+ aShape = aTransformation.Shape();
+ }
else if(aType == ROTATE_1D) {
//Get direction
Handle(GEOM_Function) anAxis = RI.GetAxis();
if (!MW.IsDone()) {
Standard_ConstructionError::Raise("Wire construction failed");
}
- //W = TopoDS::Wire(aShapeBase);
- W = MW;
+ W = MW;
}
else {
Standard_NullObject::Raise
Standard_ConstructionError::Raise("No wires given");
}
- // first wire
+ // first wire or edge
Handle(GEOM_Function) aRefWire = Handle(GEOM_Function)::DownCast(aShapes->Value(1));
TopoDS_Shape aWire = aRefWire->GetValue();
- if (aWire.IsNull() || aWire.ShapeType() != TopAbs_WIRE) {
- Standard_NullObject::Raise("Shape for face construction is null or not a wire");
+ if (aWire.IsNull()) Standard_NullObject::Raise("Argument Shape is null");
+ TopoDS_Wire W1;
+ if(aWire.ShapeType() == TopAbs_WIRE) {
+ W1 = TopoDS::Wire(aWire);
+ }
+ else if(aWire.ShapeType() == TopAbs_EDGE && aWire.Closed()) {
+ BRepBuilderAPI_MakeWire MW;
+ MW.Add(TopoDS::Edge(aWire));
+ if (!MW.IsDone()) {
+ Standard_ConstructionError::Raise("Wire construction failed");
+ }
+ W1 = MW;
+ }
+ else {
+ Standard_NullObject::Raise
+ ("Shape for face construction is neither a wire nor closed edge");
}
- TopoDS_Wire W = TopoDS::Wire(aWire);
// basic face
TopoDS_Shape FFace;
- GEOMImpl_Block6Explorer::MakeFace(W, aCI.GetIsPlanar(), FFace);
+ GEOMImpl_Block6Explorer::MakeFace(W1, aCI.GetIsPlanar(), FFace);
if (FFace.IsNull()) {
Standard_ConstructionError::Raise("Face construction failed");
}
Handle(GEOM_Function) aRefWire_i =
Handle(GEOM_Function)::DownCast(aShapes->Value(ind));
TopoDS_Shape aWire_i = aRefWire_i->GetValue();
- if (aWire_i.IsNull() || aWire_i.ShapeType() != TopAbs_WIRE) {
- Standard_NullObject::Raise("Shape for face construction is null or not a wire");
- }
-
- FR.Add(TopoDS::Wire(aWire_i));
+ if (aWire_i.IsNull()) Standard_NullObject::Raise("Argument Shape is null");
+ TopoDS_Wire W_i;
+ if(aWire_i.ShapeType() == TopAbs_WIRE) {
+ W_i = TopoDS::Wire(aWire_i);
+ }
+ else if(aWire_i.ShapeType() == TopAbs_EDGE && aWire_i.Closed()) {
+ BRepBuilderAPI_MakeWire MW1;
+ MW1.Add(TopoDS::Edge(aWire_i));
+ if (!MW1.IsDone()) {
+ Standard_ConstructionError::Raise("Wire construction failed");
+ }
+ W_i = MW1;
+ }
+ else {
+ Standard_NullObject::Raise
+ ("Shape for face construction is neither a wire nor closed edges");
+ }
+ FR.Add(W_i);
}
FR.Perform();
#define TRANSLATE_XYZ 7
#define TRANSLATE_XYZ_COPY 8
-#define ROTATE 1
-#define ROTATE_COPY 2
-#define ROTATE_1D 3
-#define ROTATE_2D 4
+#define ROTATE 1
+#define ROTATE_COPY 2
+#define ROTATE_1D 3
+#define ROTATE_2D 4
+#define ROTATE_THREE_POINTS 5
+#define ROTATE_THREE_POINTS_COPY 6
#define MIRROR_PLANE 1
#define MIRROR_PLANE_COPY 2
#define PARTITION_PARTITION 1
#define PARTITION_HALF 2
+#define PARTITION_NO_SELF_INTERSECTIONS 3
#define POLYLINE_POINTS 1
GEOMImpl_IMeasureOperations.hxx \
GEOMImpl_IGroupOperations.hxx \
GEOMImpl_CopyDriver.hxx \
- GEOMImpl_Types.hxx
+ GEOMImpl_Types.hxx \
+ GEOM_GEOMImpl.hxx
# additionnal information to compil and link file
CPPFLAGS += $(OCC_INCLUDES) $(KERNEL_CXXFLAGS) $(BOOST_CPPFLAGS)
// VSR 17/11/04: check if all objects selected belong to GEOM component --> start
// modifications of ASV 01.06.05
QString parentComp = getParentComponent( aStudy, selected );
- const char* geomIOR = app->orb()->object_to_string( GeometryGUI::GetGeomGen() );
- QString geomComp = getParentComponent( aStudy->FindObjectIOR( geomIOR ) );
+ CORBA::String_var geomIOR = app->orb()->object_to_string( GeometryGUI::GetGeomGen() );
+ QString geomComp = getParentComponent( aStudy->FindObjectIOR( geomIOR.in() ) );
if ( parentComp != geomComp ) {
SUIT_MessageBox::warn1 ( app->desktop(),
_PTR(GenericAttribute) anAttr;
GEOM_Displayer* disp = new GEOM_Displayer( appStudy );
+ _PTR(SComponent) aGeom ( aStudy->FindComponent("GEOM") );
+ if ( !aGeom )
+ return;
+
// MAIN LOOP OF SELECTED OBJECTS
for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
if ( !strcmp( obj->GetIOR().c_str(), geomIOR ) )
continue;
+ //If the object has been used to create another one,then it can't be deleted
+ _PTR(ChildIterator) it (aStudy->NewChildIterator(aGeom));
+ for ( it->InitEx( true ); it->More(); it->Next() ) {
+ _PTR(SObject) chobj (it->Value());
+ if(CheckSubObjectInUse(chobj, obj, aStudy)) return;
+ //check subobjects
+ for (_PTR(ChildIterator) it (aStudy->NewChildIterator(obj)); it->More(); it->Next()) {
+ _PTR(SObject) child (it->Value());
+ if(CheckSubObjectInUse( chobj, child, aStudy)) return;
+ }
+ }
+
RemoveObjectWithChildren(obj, aStudy, views, disp);
// Remove objects from Study
}
}
+//=====================================================================================
+// function : CheckSubObjectInUse
+// purpose : to be used by OnEditDelete() method
+//=====================================================================================
+bool GEOMToolsGUI::CheckSubObjectInUse(_PTR(SObject) checkobj,
+ _PTR(SObject) remobj,
+ _PTR(Study) aStudy)
+{
+ CORBA::Object_var corbaObj = GeometryGUI::ClientSObjectToObject(checkobj);
+ GEOM::GEOM_Object_var geomObj = GEOM::GEOM_Object::_narrow( corbaObj );
+ if( CORBA::is_nil(geomObj) )
+ return false;
+
+ GEOM::ListOfGO_var list = geomObj->GetDependency();
+ if( list->length() > 1 )
+ for(int i = 0; i < list->length(); i++ ){
+ CORBA::Object_var corbaObj_rem = GeometryGUI::ClientSObjectToObject(remobj);
+ GEOM::GEOM_Object_var geomObj_rem = GEOM::GEOM_Object::_narrow( corbaObj_rem );
+ if( list[i]->_is_equivalent( geomObj_rem ) ){
+ SalomeApp_Application* app =
+ dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+
+ SUIT_MessageBox::warn1 ( app->desktop(),
+ QObject::tr("WRN_WARNING"),
+ QObject::tr("DEP_OBJECT"),
+ QObject::tr("BUT_OK") );
+ return true;
+ }
+ }
+
+ return false;
+}
+
//=====================================================================================
// EXPORTED METHODS
//=====================================================================================
extern "C"
{
-#ifdef WNT
- __declspec( dllexport )
-#endif
+GEOMTOOLSGUI_EXPORT
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return new GEOMToolsGUI( parent );
#ifndef GEOMTOOLSGUI_H
#define GEOMTOOLSGUI_H
+#include "GEOM_ToolsGUI.hxx"
+
#include "GEOMGUI.h"
#include "GEOM_Displayer.h"
#include <qptrlist.h>
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define GEOMTOOLSGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define GEOMTOOLSGUI_WNT_EXPORT
-#endif
-
//=================================================================================
// class : GEOMToolsGUI
// purpose :
//=================================================================================
-class GEOMTOOLSGUI_WNT_EXPORT GEOMToolsGUI : public GEOMGUI
+class GEOMTOOLSGUI_EXPORT GEOMToolsGUI : public GEOMGUI
{
public :
GEOMToolsGUI( GeometryGUI* ); // hide constructor to avoid direct creation
_PTR(Study) aStudy,
QPtrList<SALOME_View> views,
GEOM_Displayer* disp);
+
+ //checks if the object passed as the first argument depends on the second arguments
+ bool CheckSubObjectInUse(_PTR(SObject) checkobj,
+ _PTR(SObject) remobj,
+ _PTR(Study) aStudy);
+
};
#endif
app->onHelpContextModule(aGeomGUI ? app->moduleName(aGeomGUI->moduleName()) : QString(""), myHelpFileName);
}
else {
+ QString platform;
+#ifdef WIN32
+ platform = "winapplication";
+#else
+ platform = "application";
+#endif
SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName),
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName),
QObject::tr("BUT_OK"));
}
}
#ifndef GEOMTOOLSGUI_NBISOSDLG_H
#define GEOMTOOLSGUI_NBISOSDLG_H
+#include "GEOM_ToolsGUI.hxx"
+
#include <qdialog.h>
class QSpinBox;
// class : GEOMToolsGUI_NbIsosDlg
// purpose :
//=================================================================================
-class GEOMToolsGUI_NbIsosDlg : public QDialog
+class GEOMTOOLSGUI_EXPORT GEOMToolsGUI_NbIsosDlg : public QDialog
{
Q_OBJECT
void setU( const int );
void setV( const int );
+private slots:
+ void ClickOnHelp();
+
private:
void keyPressEvent(QKeyEvent*);
-private slots:
- void ClickOnHelp();
-
private:
QSpinBox* SpinBoxU;
QSpinBox* SpinBoxV;
app->onHelpContextModule(aGeomGUI ? app->moduleName(aGeomGUI->moduleName()) : QString(""), myHelpFileName);
}
else {
+ QString platform;
+#ifdef WIN32
+ platform = "winapplication";
+#else
+ platform = "application";
+#endif
SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName),
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName),
QObject::tr("BUT_OK"));
}
}
#ifndef DIALOGBOX_TRANSPARENCYDLG_H
#define DIALOGBOX_TRANSPARENCYDLG_H
+#include "GEOM_ToolsGUI.hxx"
+
#include <qdialog.h>
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define GEOMTOOLSGUI_WNT_EXPORT __declspec( dllexport )
-#else
-#define GEOMTOOLSGUI_WNT_EXPORT
-#endif
+
class QSlider;
//=================================================================================
// purpose :
// : WARNING : that is a MODAL dialog.
//=================================================================================
-class GEOMTOOLSGUI_WNT_EXPORT GEOMToolsGUI_TransparencyDlg : public QDialog
+class GEOMTOOLSGUI_EXPORT GEOMToolsGUI_TransparencyDlg : public QDialog
{
Q_OBJECT
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
_impl = new ::GEOMImpl_Gen;
- //work around PAL12004, PAL12628
- //OSD::SetSignal( true );
- bool raiseFPE;
+ //PAL10867: disable signals catching with "noexcepthandler" option
+ char* envNoCatchSignals = getenv("NOT_INTERCEPT_SIGNALS");
+ if (!envNoCatchSignals || !atoi(envNoCatchSignals))
+ {
+ //work around PAL12004, PAL12628
+ //OSD::SetSignal( true );
+ bool raiseFPE;
#ifdef _DEBUG_
- raiseFPE = true;
- char* envDisableFPE = getenv("DISABLE_FPE");
- if (envDisableFPE && atoi(envDisableFPE))
- raiseFPE = false;
+ raiseFPE = true;
+ char* envDisableFPE = getenv("DISABLE_FPE");
+ if (envDisableFPE && atoi(envDisableFPE))
+ raiseFPE = false;
#else
- raiseFPE = false;
+ raiseFPE = false;
#endif
- OSD::SetSignal( raiseFPE );
+ OSD::SetSignal( raiseFPE );
+ }
}
//============================================================================
{
GEOM::GEOM_Object_var anObject = GEOM::GEOM_Object::_narrow(_orb->string_to_object(IORString));
if (!CORBA::is_nil(anObject)) {
- return strdup(anObject->GetEntry());
+ return CORBA::string_dup(anObject->GetEntry());
}
return 0;
}
GEOM::GEOM_Object_var obj = GetObject(anObject->GetDocID(), anEntry.ToCString());
CORBA::String_var aPersRefString = _orb->object_to_string(obj);
- return strdup(aPersRefString);
+ return CORBA::string_dup(aPersRefString);
}
//============================================================================
}
anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeIOR");
SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
- char *aGeomObjIOR = _orb->object_to_string(theObject);
- anIOR->SetValue(strdup(aGeomObjIOR));
+ //char *aGeomObjIOR = _orb->object_to_string(theObject);
+ CORBA::String_var aGeomObjIOR = _orb->object_to_string(theObject);
+ //anIOR->SetValue(CORBA::string_dup(aGeomObjIOR));
+ anIOR->SetValue(aGeomObjIOR);
anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributePixMap");
SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
aShapeName = "Vertex_";
}
//if (strlen(theName) == 0) aShapeName += TCollection_AsciiString(aResultSO->Tag());
- //else aShapeName = TCollection_AsciiString(strdup(theName));
+ //else aShapeName = TCollection_AsciiString(CORBA::string_dup(theName));
// asv : 11.11.04 Introducing a more sofisticated method of name creation, just as
// it is done in GUI in GEOMBase::GetDefaultName() - not just add a Tag() == number
aShapeName = aNewShapeName;
}
else // MOST PROBABLY CALLED FROM GEOM GUI (ALREADY WITH VALID NAME)
- aShapeName = TCollection_AsciiString(strdup(theName));
+ aShapeName = TCollection_AsciiString((char*)theName);
//Set the study entry as a name of the published GEOM_Object
aShape->SetStudyEntry(aResultSO->GetID());
if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir.c_str(), aSeq.in(), true);
SALOMEDS::Study_var Study = theComponent->GetStudy();
- TCollection_AsciiString name( strdup(Study->Name()) );
+ TCollection_AsciiString name (Study->Name());
return true;
}
TDF_Tool::Entry(anObj->GetEntry(), anEntry);
GEOM::GEOM_Object_var obj = GetObject(anObj->GetDocID(), anEntry.ToCString());
+ //Set the study entry of the published GEOM_Object
+ obj->SetStudyEntry(aNewSO->GetID());
+
// Add IORAttribute to the Study and set IOR of the created GEOM_Object to it
SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(aNewSO, "AttributeIOR");
SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
- anIOR->SetValue(_orb->object_to_string(obj));
+ CORBA::String_var objStr = _orb->object_to_string(obj);
+ anIOR->SetValue(objStr.in());
// Return the created in the Study SObject
return aNewSO._retn();
//============================================================================
char* GEOM_Gen_i::ComponentDataType()
{
- return strdup("GEOM");
+ return CORBA::string_dup("GEOM");
}
//============================================================================
if(theObject->_is_nil() || theStudy->_is_nil()) return aResultSO;
SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
- char* IOR;
+ CORBA::String_var IOR;
if(!theFather->_is_nil()) {
IOR = _orb->object_to_string(theFather);
- SALOMEDS::SObject_var aFatherSO = theStudy->FindObjectIOR(IOR);
+ SALOMEDS::SObject_var aFatherSO = theStudy->FindObjectIOR(IOR.in());
if(aFatherSO->_is_nil()) return aResultSO._retn();
aResultSO = aStudyBuilder->NewObject(aFatherSO);
//aStudyBuilder->Addreference(aResultSO, aResultSO);
GEOM::GEOM_Object_var anObject = aList[i];
if(anObject->_is_nil()) continue;
IOR = _orb->object_to_string(anObject);
- SALOMEDS::SObject_var aSO = theStudy->FindObjectIOR(IOR);
+ SALOMEDS::SObject_var aSO = theStudy->FindObjectIOR(IOR.in());
if(aSO->_is_nil()) continue;
SALOMEDS::SObject_var aSubSO = aStudyBuilder->NewObject(aResultSO);
aStudyBuilder->Addreference(aSubSO, aSO);
void GEOM_Gen_i::register_name(char * name)
{
GEOM::GEOM_Gen_ptr g = GEOM::GEOM_Gen::_narrow(_this());
- name_service->Register(g, strdup(name));
+ name_service->Register(g, CORBA::string_dup(name));
}
//============================================================================
GEOM_Object_i* servant = new GEOM_Object_i (_poa, engine, handle_object);
obj = servant->_this();
- stringIOR = _orb->object_to_string(obj);
- handle_object->SetIOR(stringIOR);
+ CORBA::String_var objStr = _orb->object_to_string(obj);
+ TCollection_AsciiString anAscii( (char *)objStr.in() );
+ handle_object->SetIOR( anAscii );
return obj._retn();
}
//=====================================================================================
extern "C"
{
-#ifdef WNT
- __declspec( dllexport )
-#endif
+GEOM_I_EXPORT
PortableServer::ObjectId * GEOMEngine_factory(CORBA::ORB_ptr orb,
PortableServer::POA_ptr poa,
PortableServer::ObjectId * contId,
#ifndef __GEOM_GEN_I_H__
#define __GEOM_GEN_I_H__
+#include "GEOM_GEOM_I.hxx"
+
#include "GEOMImpl_Gen.hxx"
// IDL headers
//=====================================================================
// GEOM_Gen_i : class definition
//=====================================================================
-class GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual public Engines_Component_i
+class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual public Engines_Component_i
{
public:
#ifndef _GEOM_I3DPrimOperations_i_HeaderFile
#define _GEOM_I3DPrimOperations_i_HeaderFile
+#include "GEOMImpl_Gen.hxx"
#include <SALOMEconfig.h>
#include "GEOMImpl_I3DPrimOperations.hxx"
-class GEOM_I3DPrimOperations_i :
+class GEOM_I_EXPORT GEOM_I3DPrimOperations_i :
public virtual POA_GEOM::GEOM_I3DPrimOperations,
public virtual GEOM_IOperations_i
{
#ifndef _GEOM_IBasicOperations_i_HeaderFile
#define _GEOM_IBasicOperations_i_HeaderFile
+#include "GEOMImpl_Gen.hxx"
#include <SALOMEconfig.h>
#include "GEOMImpl_IBasicOperations.hxx"
-class GEOM_IBasicOperations_i :
+class GEOM_I_EXPORT GEOM_IBasicOperations_i :
public virtual POA_GEOM::GEOM_IBasicOperations,
public virtual GEOM_IOperations_i
{
#ifndef _GEOM_IBlocksOperations_i_HeaderFile
#define _GEOM_IBlocksOperations_i_HeaderFile
+#include "GEOMImpl_Gen.hxx"
#include <SALOMEconfig.h>
#include "GEOMImpl_IBlocksOperations.hxx"
-class GEOM_IBlocksOperations_i :
+class GEOM_I_EXPORT GEOM_IBlocksOperations_i :
public virtual POA_GEOM::GEOM_IBlocksOperations,
public virtual GEOM_IOperations_i
{
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
//
+
#include <Standard_Stream.hxx>
#include "GEOM_IBooleanOperations_i.hh"
/*!
* MakeBoolean
*/
-//=============================================================================
+//=============================================================================
GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakeBoolean
(GEOM::GEOM_Object_ptr theShape1,
GEOM::GEOM_Object_ptr theShape2,
/*!
* MakePartition
*/
-//=============================================================================
+//=============================================================================
GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition
(const GEOM::ListOfGO& theShapes,
const GEOM::ListOfGO& theTools,
const GEOM::ListOfGO& theKeepIns,
const GEOM::ListOfGO& theRemoveIns,
- const CORBA::Short theLimit,
- const CORBA::Boolean theRemoveWebs,
+ CORBA::Short theLimit,
+ CORBA::Boolean theRemoveWebs,
+ const GEOM::ListOfLong& theMaterials)
+{
+ GEOM::GEOM_Object_var aGEOMObject;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+
+ int ind, aLen;
+ Handle(TColStd_HSequenceOfTransient) aShapes = new TColStd_HSequenceOfTransient;
+ Handle(TColStd_HSequenceOfTransient) aTools = new TColStd_HSequenceOfTransient;
+ Handle(TColStd_HSequenceOfTransient) aKeepIns = new TColStd_HSequenceOfTransient;
+ Handle(TColStd_HSequenceOfTransient) aRemIns = new TColStd_HSequenceOfTransient;
+ Handle(TColStd_HArray1OfInteger) aMaterials;
+
+ //Get the shapes
+ aLen = theShapes.length();
+ for (ind = 0; ind < aLen; ind++) {
+ if (theShapes[ind] == NULL) return aGEOMObject._retn();
+ Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
+ (theShapes[ind]->GetStudyID(), theShapes[ind]->GetEntry());
+ if (aSh.IsNull()) return aGEOMObject._retn();
+ aShapes->Append(aSh);
+ }
+
+ //Get the tools
+ aLen = theTools.length();
+ for (ind = 0; ind < aLen; ind++) {
+ if (theTools[ind] == NULL) return aGEOMObject._retn();
+ Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
+ (theTools[ind]->GetStudyID(), theTools[ind]->GetEntry());
+ if (aSh.IsNull()) return aGEOMObject._retn();
+ aTools->Append(aSh);
+ }
+
+ //Get the keep inside shapes
+ aLen = theKeepIns.length();
+ for (ind = 0; ind < aLen; ind++) {
+ if (theKeepIns[ind] == NULL) return aGEOMObject._retn();
+ Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
+ (theKeepIns[ind]->GetStudyID(), theKeepIns[ind]->GetEntry());
+ if (aSh.IsNull()) return aGEOMObject._retn();
+ aKeepIns->Append(aSh);
+ }
+
+ //Get the remove inside shapes
+ aLen = theRemoveIns.length();
+ for (ind = 0; ind < aLen; ind++) {
+ if (theRemoveIns[ind] == NULL) return aGEOMObject._retn();
+ Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject
+ (theRemoveIns[ind]->GetStudyID(), theRemoveIns[ind]->GetEntry());
+ if (aSh.IsNull()) return aGEOMObject._retn();
+ aRemIns->Append(aSh);
+ }
+
+ //Get the materials
+ aLen = theMaterials.length();
+ if ( aLen ) {
+ aMaterials = new TColStd_HArray1OfInteger (1, aLen);
+ for (ind = 0; ind < aLen; ind++) {
+ aMaterials->SetValue(ind+1, theMaterials[ind]);
+ }
+ }
+
+ // Make Partition
+ Handle(GEOM_Object) anObject =
+ GetOperations()->MakePartition(aShapes, aTools, aKeepIns, aRemIns,
+ theLimit, theRemoveWebs, aMaterials,
+ /*PerformSelfIntersections*/Standard_True);
+ if (!GetOperations()->IsDone() || anObject.IsNull())
+ return aGEOMObject._retn();
+
+ return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ * MakePartitionNonSelfIntersectedShape
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartitionNonSelfIntersectedShape
+ (const GEOM::ListOfGO& theShapes,
+ const GEOM::ListOfGO& theTools,
+ const GEOM::ListOfGO& theKeepIns,
+ const GEOM::ListOfGO& theRemoveIns,
+ CORBA::Short theLimit,
+ CORBA::Boolean theRemoveWebs,
const GEOM::ListOfLong& theMaterials)
{
GEOM::GEOM_Object_var aGEOMObject;
// Make Partition
Handle(GEOM_Object) anObject =
GetOperations()->MakePartition(aShapes, aTools, aKeepIns, aRemIns,
- theLimit, theRemoveWebs, aMaterials);
+ theLimit, theRemoveWebs, aMaterials,
+ /*PerformSelfIntersections*/Standard_False);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
/*!
* MakeHalfPartition
*/
-//=============================================================================
+//=============================================================================
GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakeHalfPartition
(GEOM::GEOM_Object_ptr theShape,
GEOM::GEOM_Object_ptr thePlane)
#ifndef _GEOM_IBooleanOperations_i_HeaderFile
#define _GEOM_IBooleanOperations_i_HeaderFile
+#include "GEOMImpl_Gen.hxx"
#include <SALOMEconfig.h>
#include "GEOMImpl_IBooleanOperations.hxx"
-class GEOM_IBooleanOperations_i :
+class GEOM_I_EXPORT GEOM_IBooleanOperations_i :
public virtual POA_GEOM::GEOM_IBooleanOperations,
public virtual GEOM_IOperations_i
{
const GEOM::ListOfGO& theTools,
const GEOM::ListOfGO& theKeepInside,
const GEOM::ListOfGO& theRemoveInside,
- CORBA::Short theLimit,
- CORBA::Boolean theRemoveWebs,
+ CORBA::Short theLimit,
+ CORBA::Boolean theRemoveWebs,
const GEOM::ListOfLong& theMaterials);
+ GEOM::GEOM_Object_ptr MakePartitionNonSelfIntersectedShape (const GEOM::ListOfGO& theShapes,
+ const GEOM::ListOfGO& theTools,
+ const GEOM::ListOfGO& theKeepInside,
+ const GEOM::ListOfGO& theRemoveInside,
+ CORBA::Short theLimit,
+ CORBA::Boolean theRemoveWebs,
+ const GEOM::ListOfLong& theMaterials);
+
GEOM::GEOM_Object_ptr MakeHalfPartition (GEOM::GEOM_Object_ptr theShape,
GEOM::GEOM_Object_ptr thePlane);
#ifndef _GEOM_ICurvesOperations_i_HeaderFile
#define _GEOM_ICurvesOperations_i_HeaderFile
+#include "GEOMImpl_Gen.hxx"
#include <SALOMEconfig.h>
#include "GEOMImpl_ICurvesOperations.hxx"
-class GEOM_ICurvesOperations_i :
+class GEOM_I_EXPORT GEOM_ICurvesOperations_i :
public virtual POA_GEOM::GEOM_ICurvesOperations,
public virtual GEOM_IOperations_i
{
#ifndef _GEOM_IGroupOperations_i_HeaderFile
#define _GEOM_IGroupOperations_i_HeaderFile
+#include "GEOMImpl_Gen.hxx"
#include <SALOMEconfig.h>
#include "GEOMImpl_IGroupOperations.hxx"
-class GEOM_IGroupOperations_i :
+class GEOM_I_EXPORT GEOM_IGroupOperations_i :
public virtual POA_GEOM::GEOM_IGroupOperations,
public virtual GEOM_IOperations_i
{
#ifndef _GEOM_IHealingOperations_i_HeaderFile
#define _GEOM_IHealingOperations_i_HeaderFile
+#include "GEOMImpl_Gen.hxx"
#include <SALOMEconfig.h>
#include <TColStd_HArray1OfExtendedString.hxx>
#include <TColStd_HArray1OfInteger.hxx>
-class GEOM_IHealingOperations_i :
+class GEOM_I_EXPORT GEOM_IHealingOperations_i :
public virtual POA_GEOM::GEOM_IHealingOperations,
public virtual GEOM_IOperations_i
{
#ifndef _GEOM_IInsertOperations_i_HeaderFile
#define _GEOM_IInsertOperations_i_HeaderFile
+#include "GEOMImpl_Gen.hxx"
#include <SALOMEconfig.h>
#include "GEOMImpl_IInsertOperations.hxx"
-class GEOM_IInsertOperations_i :
+class GEOM_I_EXPORT GEOM_IInsertOperations_i :
public virtual POA_GEOM::GEOM_IInsertOperations,
public virtual GEOM_IOperations_i
{
#ifndef _GEOM_ILocalOperations_i_HeaderFile
#define _GEOM_ILocalOperations_i_HeaderFile
+#include "GEOMImpl_Gen.hxx"
#include <SALOMEconfig.h>
#include "GEOMImpl_ILocalOperations.hxx"
-class GEOM_ILocalOperations_i :
+class GEOM_I_EXPORT GEOM_ILocalOperations_i :
public virtual POA_GEOM::GEOM_ILocalOperations,
public virtual GEOM_IOperations_i
{
#ifndef _GEOM_IMeasureOperations_i_HeaderFile
#define _GEOM_IMeasureOperations_i_HeaderFile
+#include "GEOMImpl_Gen.hxx"
#include <SALOMEconfig.h>
#include "GEOMImpl_IMeasureOperations.hxx"
-class GEOM_IMeasureOperations_i :
+class GEOM_I_EXPORT GEOM_IMeasureOperations_i :
public virtual POA_GEOM::GEOM_IMeasureOperations,
public virtual GEOM_IOperations_i
{
GEOM_IOperations_i::GEOM_IOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, ::GEOM_IOperations* theImpl)
:SALOME::GenericObj_i( thePOA ), _impl(theImpl), _engine(theEngine)
{
- thePOA->activate_object(this);
}
//=============================================================================
#ifndef _GEOM_IOperations_i_HeaderFile
#define _GEOM_IOperations_i_HeaderFile
+#include "GEOMImpl_Gen.hxx"
#include <SALOMEconfig.h>
#include "GEOM_Object_i.hh"
#include "GEOM_Object.hxx"
-class GEOM_IOperations_i : public virtual POA_GEOM::GEOM_IOperations, public virtual SALOME::GenericObj_i
+class GEOM_I_EXPORT GEOM_IOperations_i : public virtual POA_GEOM::GEOM_IOperations, public virtual SALOME::GenericObj_i
{
public:
GEOM_IOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, ::GEOM_IOperations* theImpl);
return aSeq._retn();
}
+//=============================================================================
+/*!
+ * GetShapesOnPlaneWithLocation
+ */
+//=============================================================================
+GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnPlaneWithLocation
+ (GEOM::GEOM_Object_ptr theShape,
+ const CORBA::Long theShapeType,
+ GEOM::GEOM_Object_ptr theAx1,
+ GEOM::GEOM_Object_ptr thePnt,
+ const GEOM::shape_state theState)
+{
+ GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+
+ if (theShape == NULL || theAx1 == NULL || thePnt == NULL) return aSeq._retn();
+
+ //Get the reference objects
+ Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
+ (theShape->GetStudyID(), theShape->GetEntry());
+ Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject
+ (theAx1->GetStudyID(), theAx1->GetEntry());
+ Handle(GEOM_Object) anPnt = GetOperations()->GetEngine()->GetObject
+ (thePnt->GetStudyID(), thePnt->GetEntry());
+
+ if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn();
+
+ //Get Shapes On Plane
+ Handle(TColStd_HSequenceOfTransient) aHSeq =
+ GetOperations()->GetShapesOnPlaneWithLocation(aShape, theShapeType, anAx1, anPnt, ShapeState(theState));
+ if (!GetOperations()->IsDone() || aHSeq.IsNull())
+ return aSeq._retn();
+
+ Standard_Integer aLength = aHSeq->Length();
+ aSeq->length(aLength);
+ for (Standard_Integer i = 1; i <= aLength; i++)
+ aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+ return aSeq._retn();
+}
+
//=============================================================================
/*!
* GetShapesOnCylinder
return aSeq._retn();
}
+//=============================================================================
+/*!
+ * GetShapesOnPlaneWithLocationIDs
+ */
+//=============================================================================
+GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnPlaneWithLocationIDs
+ (GEOM::GEOM_Object_ptr theShape,
+ const CORBA::Long theShapeType,
+ GEOM::GEOM_Object_ptr theAx1,
+ GEOM::GEOM_Object_ptr thePnt,
+ const GEOM::shape_state theState)
+{
+ GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+
+ if (theShape == NULL || theAx1 == NULL || thePnt == NULL) return aSeq._retn();
+
+ //Get the reference objects
+ Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
+ (theShape->GetStudyID(), theShape->GetEntry());
+ Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject
+ (theAx1->GetStudyID(), theAx1->GetEntry());
+ Handle(GEOM_Object) anPnt = GetOperations()->GetEngine()->GetObject
+ (thePnt->GetStudyID(), thePnt->GetEntry());
+
+ if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn();
+
+ //Get Shapes On Plane
+ Handle(TColStd_HSequenceOfInteger) aHSeq =
+ GetOperations()->GetShapesOnPlaneWithLocationIDs(aShape, theShapeType, anAx1, anPnt, ShapeState(theState));
+ if (!GetOperations()->IsDone() || aHSeq.IsNull())
+ return aSeq._retn();
+
+ Standard_Integer aLength = aHSeq->Length();
+ aSeq->length(aLength);
+ for (Standard_Integer i = 1; i <= aLength; i++)
+ aSeq[i-1] = aHSeq->Value(i);
+
+ return aSeq._retn();
+}
+
//=============================================================================
/*!
* GetShapesOnCylinderIDs
return aSeq._retn();
}
+//=============================================================================
+/*!
+ * GetShapesOnBox
+ */
+//=============================================================================
+GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnBox
+ (GEOM::GEOM_Object_ptr theBox,
+ GEOM::GEOM_Object_ptr theShape,
+ CORBA::Long theShapeType,
+ GEOM::shape_state theState)
+{
+ GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+
+ if ( theShape == NULL || theBox == NULL )
+ return aSeq._retn();
+
+ //Get the reference objects
+ Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
+ (theShape->GetStudyID(), theShape->GetEntry());
+ Handle(GEOM_Object) aBox = GetOperations()->GetEngine()->GetObject
+ (theShape->GetStudyID(), theBox->GetEntry());
+
+ if (aShape.IsNull() || aBox.IsNull() )
+ return aSeq._retn();
+
+ //Get Shapes On Box
+ Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->GetShapesOnBox
+ (aBox,aShape, theShapeType,ShapeState(theState));
+ if (!GetOperations()->IsDone() || aHSeq.IsNull())
+ return aSeq._retn();
+
+ Standard_Integer aLength = aHSeq->Length();
+ aSeq->length(aLength);
+ for (Standard_Integer i = 1; i <= aLength; i++)
+ aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+ return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ * GetShapesOnQuadrangleIDs
+ */
+//=============================================================================
+GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnBoxIDs
+ (GEOM::GEOM_Object_ptr theBox,
+ GEOM::GEOM_Object_ptr theShape,
+ CORBA::Long theShapeType,
+ GEOM::shape_state theState)
+{
+ GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+
+ if ( theShape == NULL || theBox == NULL )
+ return aSeq._retn();
+
+ //Get the reference objects
+ Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
+ (theShape->GetStudyID(), theShape->GetEntry());
+ Handle(GEOM_Object) aBox = GetOperations()->GetEngine()->GetObject
+ (theShape->GetStudyID(), theBox->GetEntry());
+
+ if (aShape.IsNull() || aBox.IsNull() )
+ return aSeq._retn();
+
+ //Get Shapes On Box
+ Handle(TColStd_HSequenceOfInteger) aHSeq = GetOperations()->GetShapesOnBoxIDs
+ (aBox,aShape, theShapeType,ShapeState(theState));
+ if (!GetOperations()->IsDone() || aHSeq.IsNull())
+ return aSeq._retn();
+
+ Standard_Integer aLength = aHSeq->Length();
+ aSeq->length(aLength);
+ for (Standard_Integer i = 1; i <= aLength; i++)
+ aSeq[i-1] = aHSeq->Value(i);
+
+ return aSeq._retn();
+}
+
//=============================================================================
/*!
* GetInPlace
return GetObject(anObject);
}
+
+//=============================================================================
+/*!
+ * GetSame
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetSame
+ (GEOM::GEOM_Object_ptr theShapeWhere,
+ GEOM::GEOM_Object_ptr theShapeWhat)
+{
+ GEOM::GEOM_Object_var aGEOMObject;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+
+ if (theShapeWhere == NULL ||
+ theShapeWhat == NULL) return aGEOMObject._retn();
+
+ //Get the reference objects
+ Handle(GEOM_Object) aShapeWhere = GetOperations()->GetEngine()->GetObject
+ (theShapeWhere->GetStudyID(), theShapeWhere->GetEntry());
+ Handle(GEOM_Object) aShapeWhat = GetOperations()->GetEngine()->GetObject
+ (theShapeWhat->GetStudyID(), theShapeWhat->GetEntry());
+
+ if (aShapeWhere.IsNull() ||
+ aShapeWhat.IsNull()) return aGEOMObject._retn();
+
+ //Get Shapes in place of aShapeWhat
+ Handle(GEOM_Object) anObject =
+ GetOperations()->GetSame(aShapeWhere, aShapeWhat);
+ if (!GetOperations()->IsDone() || anObject.IsNull())
+ return aGEOMObject._retn();
+
+ return GetObject(anObject);
+}
+
#ifndef _GEOM_IShapesOperations_i_HeaderFile
#define _GEOM_IShapesOperations_i_HeaderFile
+#include "GEOMImpl_Gen.hxx"
#include <SALOMEconfig.h>
#include "GEOMImpl_IShapesOperations.hxx"
-class GEOM_IShapesOperations_i :
+class GEOM_I_EXPORT GEOM_IShapesOperations_i :
public virtual POA_GEOM::GEOM_IShapesOperations,
public virtual GEOM_IOperations_i
{
GEOM::GEOM_Object_ptr theAx1,
GEOM::shape_state theState);
+ GEOM::ListOfGO* GetShapesOnPlaneWithLocation(GEOM::GEOM_Object_ptr theShape,
+ CORBA::Long theShapeType,
+ GEOM::GEOM_Object_ptr theAx1,
+ GEOM::GEOM_Object_ptr thePnt,
+ GEOM::shape_state theState);
+
GEOM::ListOfGO* GetShapesOnCylinder (GEOM::GEOM_Object_ptr theShape,
CORBA::Long theShapeType,
GEOM::GEOM_Object_ptr theAxis,
GEOM::GEOM_Object_ptr theAx1,
GEOM::shape_state theState);
+ GEOM::ListOfLong* GetShapesOnPlaneWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
+ CORBA::Long theShapeType,
+ GEOM::GEOM_Object_ptr theAx1,
+ GEOM::GEOM_Object_ptr thePnt,
+ GEOM::shape_state theState);
+
GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape,
CORBA::Long theShapeType,
GEOM::GEOM_Object_ptr theAxis,
GEOM::GEOM_Object_ptr theBottomRigthPoint,
GEOM::shape_state theState);
+ GEOM::ListOfGO* GetShapesOnBox (GEOM::GEOM_Object_ptr theBox,
+ GEOM::GEOM_Object_ptr theShape,
+ CORBA::Long theShapeType,
+ GEOM::shape_state theState);
+
+ GEOM::ListOfLong* GetShapesOnBoxIDs (GEOM::GEOM_Object_ptr theBox,
+ GEOM::GEOM_Object_ptr theShape,
+ CORBA::Long theShapeType,
+ GEOM::shape_state theState);
+
GEOM::GEOM_Object_ptr GetInPlace (GEOM::GEOM_Object_ptr theShapeWhere,
GEOM::GEOM_Object_ptr theShapeWhat);
+ GEOM::GEOM_Object_ptr GetSame (GEOM::GEOM_Object_ptr theShapeWhere,
+ GEOM::GEOM_Object_ptr theShapeWhat);
+
::GEOMImpl_IShapesOperations* GetOperations()
{ return (::GEOMImpl_IShapesOperations*)GetImpl(); }
};
return GetObject(anObject);
}
+
+//=============================================================================
+/*!
+ * RotateThreePoints
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePoints
+ (GEOM::GEOM_Object_ptr theObject,
+ GEOM::GEOM_Object_ptr theCentPoint,
+ GEOM::GEOM_Object_ptr thePoint1,
+ GEOM::GEOM_Object_ptr thePoint2)
+{
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+ GEOM::GEOM_Object_var aGEOMObject;
+
+ if (theCentPoint == NULL || thePoint1 == NULL || thePoint2 == NULL || theObject == NULL) return aGEOMObject._retn();
+
+ //check if the object is a subshape
+ if(!theObject->IsMainShape()) {
+ GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
+ return aGEOMObject._retn();
+ }
+
+ aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
+
+ //Get the object itself
+ Handle(GEOM_Object) anObject =
+ GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
+ if (anObject.IsNull()) return aGEOMObject._retn();
+
+ //Get the central point of rotation
+ Handle(GEOM_Object) aCentPoint =
+ GetOperations()->GetEngine()->GetObject(theCentPoint->GetStudyID(), theCentPoint->GetEntry());
+ if (aCentPoint.IsNull()) return aGEOMObject._retn();
+
+ //Get the first point
+ Handle(GEOM_Object) aPoint1 =
+ GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), thePoint1->GetEntry());
+ if (aPoint1.IsNull()) return aGEOMObject._retn();
+
+ //Get the second point
+ Handle(GEOM_Object) aPoint2 =
+ GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), thePoint2->GetEntry());
+ if (aPoint2.IsNull()) return aGEOMObject._retn();
+
+ //Perform the translation
+ GetOperations()->RotateThreePoints(anObject, aCentPoint, aPoint1, aPoint2);
+
+ return aGEOMObject._retn();
+}
+
+//=============================================================================
+/*!
+ * RotateThreePointsCopy
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePointsCopy
+ (GEOM::GEOM_Object_ptr theObject,
+ GEOM::GEOM_Object_ptr theCentPoint,
+ GEOM::GEOM_Object_ptr thePoint1,
+ GEOM::GEOM_Object_ptr thePoint2)
+{
+ GEOM::GEOM_Object_var aGEOMObject;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+
+ if (theCentPoint == NULL || thePoint1 == NULL || thePoint2 == NULL || theObject == NULL) return aGEOMObject._retn();
+
+ //Get the object itself
+ Handle(GEOM_Object) aBasicObject =
+ GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry());
+ if (aBasicObject.IsNull()) return aGEOMObject._retn();
+
+ //Get the central point of rotation
+ Handle(GEOM_Object) aCentPoint =
+ GetOperations()->GetEngine()->GetObject(theCentPoint->GetStudyID(), theCentPoint->GetEntry());
+ if (aCentPoint.IsNull()) return aGEOMObject._retn();
+
+ //Get the first point
+ Handle(GEOM_Object) aPoint1 =
+ GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), thePoint1->GetEntry());
+ if (aPoint1.IsNull()) return aGEOMObject._retn();
+
+ //Get the second point
+ Handle(GEOM_Object) aPoint2 =
+ GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), thePoint2->GetEntry());
+ if (aPoint2.IsNull()) return aGEOMObject._retn();
+
+ //Perform the rotation
+ Handle(GEOM_Object) anObject =
+ GetOperations()->RotateThreePointsCopy(aBasicObject, aCentPoint, aPoint1, aPoint2);
+ if (!GetOperations()->IsDone() || anObject.IsNull())
+ return aGEOMObject._retn();
+
+ return GetObject(anObject);
+}
+
#ifndef _GEOM_ITransformOperations_i_HeaderFile
#define _GEOM_ITransformOperations_i_HeaderFile
+#include "GEOMImpl_Gen.hxx"
#include <SALOMEconfig.h>
#include "GEOMImpl_ITransformOperations.hxx"
-class GEOM_ITransformOperations_i :
+class GEOM_I_EXPORT GEOM_ITransformOperations_i :
public virtual POA_GEOM::GEOM_ITransformOperations,
public virtual GEOM_IOperations_i
{
GEOM::GEOM_Object_ptr theStartLCS,
GEOM::GEOM_Object_ptr theEndLCS);
+ GEOM::GEOM_Object_ptr RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
+ GEOM::GEOM_Object_ptr theCentPoint,
+ GEOM::GEOM_Object_ptr thePoint1,
+ GEOM::GEOM_Object_ptr thePoint2);
+
+ GEOM::GEOM_Object_ptr RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
+ GEOM::GEOM_Object_ptr theCentPoint,
+ GEOM::GEOM_Object_ptr thePoint1,
+ GEOM::GEOM_Object_ptr thePoint2);
+
+
::GEOMImpl_ITransformOperations* GetOperations() { return (::GEOMImpl_ITransformOperations*)GetImpl(); }
};
Handle(GEOM_Object) theImpl)
: SALOME::GenericObj_i( thePOA ), _engine(theEngine), _impl(theImpl)
{
- thePOA->activate_object(this);
}
//=============================================================================
const TDF_Label& aLabel = _impl->GetEntry();
TCollection_AsciiString anEntry;
TDF_Tool::Entry(aLabel, anEntry);
- return CORBA::string_dup(anEntry.ToCString());
+ const char* anEntstr = anEntry.ToCString();
+ return CORBA::string_dup(anEntstr);
}
//=============================================================================
char* GEOM_Object_i::GetName()
{
char* aName = _impl->GetName();
- if(aName) return strdup(aName);
+ if (aName)
+ return aName; // this is already copy of pointer (see implementation of _impl)
return strdup("");
}
#ifndef _GEOM_Object_i_HeaderFile
#define _GEOM_Object_i_HeaderFile
+#include "GEOM_GEOM_I.hxx"
+
+#include "GEOMImpl_Gen.hxx"
#include <SALOMEconfig.h>
#include CORBA_CLIENT_HEADER(SALOMEDS)
#include <TopoDS_Shape.hxx>
-class GEOM_Object_i : public virtual POA_GEOM::GEOM_Object, public virtual SALOME::GenericObj_i
+class GEOM_I_EXPORT GEOM_Object_i : public virtual POA_GEOM::GEOM_Object, public virtual SALOME::GenericObj_i
{
public:
GEOM_Object_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, Handle(GEOM_Object) theImpl);
GEOM_DumpPython.cc
# SALOME_Component.idl
-LIB_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Component.idl SALOME_Exception.idl
+LIB_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Component.idl SALOME_Exception.idl SALOME_GenericObj.idl
#SALOME_Exception.idl SALOME_GenericObj.idl
LIB_SERVER_IDL = GEOM_Gen.idl
GEOM_ITransformOperations_i.hh \
GEOM_IMeasureOperations_i.hh \
GEOM_IGroupOperations_i.hh \
- GEOM_Gen_i.hh
+ GEOM_Gen_i.hh \
+ GEOM_GEOM_I.hxx
# additionnal information to compil and link file
CPPFLAGS += $(OCC_INCLUDES) $(BOOST_CPPFLAGS) $(KERNEL_CXXFLAGS)
endService( " GEOM_Superv_i::RotateCopy" );
return anObj;
}
+//=============================================================================
+// RotateThreePoints:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
+ GEOM::GEOM_Object_ptr theCentPoint,
+ GEOM::GEOM_Object_ptr thePoint1,
+ GEOM::GEOM_Object_ptr thePoint2)
+{
+ beginService( " GEOM_Superv_i::RotateThreePoints" );
+ MESSAGE("GEOM_Superv_i::RotateThreePoints");
+ getTransfOp();
+ GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2);
+ endService( " GEOM_Superv_i::RotateThreePoints" );
+ return anObj;
+}
+
+//=============================================================================
+// RotateThreePointsCopy:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
+ GEOM::GEOM_Object_ptr theCentPoint,
+ GEOM::GEOM_Object_ptr thePoint1,
+ GEOM::GEOM_Object_ptr thePoint2)
+{
+ beginService( " GEOM_Superv_i::RotateThreePointsCopy" );
+ MESSAGE("GEOM_Superv_i::RotateThreePointsCopy");
+ getTransfOp();
+ GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2);
+ endService( " GEOM_Superv_i::RotateThreePointsCopy" );
+ return anObj;
+}
//=============================================================================
// MultiRotate1D:
GEOM::GEOM_Object_ptr RotateCopy (GEOM::GEOM_Object_ptr theObject,
GEOM::GEOM_Object_ptr theAxis,
CORBA::Double theAngle);
+
+ GEOM::GEOM_Object_ptr RotateThreePoints (GEOM::GEOM_Object_ptr theObject,
+ GEOM::GEOM_Object_ptr theCentPoint,
+ GEOM::GEOM_Object_ptr thePoint1,
+ GEOM::GEOM_Object_ptr thePoint2);
+
+ GEOM::GEOM_Object_ptr RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject,
+ GEOM::GEOM_Object_ptr theCentPoint,
+ GEOM::GEOM_Object_ptr thePoint1,
+ GEOM::GEOM_Object_ptr thePoint2);
+
GEOM::GEOM_Object_ptr MultiRotate1D (GEOM::GEOM_Object_ptr theObject,
GEOM::GEOM_Object_ptr theAxis,
CORBA::Long theNbTimes);
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-#####################################################################\r
-#Created :17/02/2005\r
-#Auhtor :MASLOV Eugeny, KOVALTCHUK Alexey \r
-#####################################################################\r
-\r
-import geompy\r
-import salome\r
-import os\r
-import math\r
-\r
-#Sketcher_1 creation\r
-Sketcher_1 = geompy.MakeSketcher("Sketcher:F 100 -57.7:TT 100 57.7:TT 0 115.47:TT -100 57.7:TT -100 -57.7:TT 0 -115.47:WW") \r
-geompy.addToStudy(Sketcher_1, "Sketcher_1")\r
-Face_1 = geompy.MakeFace(Sketcher_1, 1)\r
-geompy.addToStudy(Face_1, "Face_1")\r
-\r
-#Line creation\r
-Line_1 = geompy.MakeLineTwoPnt(geompy.MakeVertex(0,0,0), geompy.MakeVertex(0,0,100))\r
-geompy.addToStudy(Line_1, "Line_1")\r
-\r
-#Prism creation\r
-Prism_1 = geompy.MakePrismVecH(Face_1, Line_1, 100)\r
-geompy.addToStudy(Prism_1, "Prism_1")\r
-\r
-#Sketcher_2 creation\r
-Sketcher_2 = geompy.MakeSketcher("Sketcher:F 50 0:TT 80 0:TT 112 13:TT 112 48:TT 80 63:TT 80 90:TT 50 90:WW", [0,0,0, 1,0,0, 0,1,0]) \r
-geompy.addToStudy(Sketcher_2, "Sketcher_2")\r
-Face_2 = geompy.MakeFace(Sketcher_2, 1)\r
-geompy.addToStudy(Face_2, "Face_2")\r
-\r
-#Revolution creation\r
-Revolution_1 = geompy.MakeRevolution(Face_2, Line_1, 2*math.pi)\r
-geompy.addToStudy(Revolution_1, "Revolution_1")\r
-\r
-#Common applying\r
-Common_1 = geompy.MakeBoolean(Revolution_1, Prism_1, 1)\r
-geompy.addToStudy(Common_1, "Common_1")\r
-\r
-#Explode Common_1 on edges\r
-CommonExplodedListEdges = geompy.SubShapeAll(Common_1, geompy.ShapeType["EDGE"])\r
-for i in range(0, len(CommonExplodedListEdges)):\r
- name = "Edge_"+str(i+1)\r
- geompy.addToStudyInFather(Common_1, CommonExplodedListEdges[i], name)\r
-\r
-#Fillet applying\r
-#ID = geompy.GetSubShapeID(Common_1, CommonExplodedListEdges[0])\r
-Fillet_1 = geompy.MakeFillet(Common_1, 10, geompy.ShapeType["EDGE"], [6])\r
-geompy.addToStudy(Fillet_1, "Fillet_1")\r
-\r
-#Chamfer applying\r
-Chamfer_1 = geompy.MakeChamferEdge(Fillet_1, 10, 10, 16, 50 )\r
-geompy.addToStudy(Chamfer_1, "Chamfer_1")\r
-\r
-Chamfer_2 = geompy.MakeChamferEdge(Chamfer_1, 10, 10, 21, 31 )\r
-geompy.addToStudy(Chamfer_2, "Chamfer_2")\r
-\r
-#Import of the shape from "slots.brep"\r
-thePath = os.getenv("DATA_DIR")\r
-theFileName = thePath + "/Shapes/Brep/slots.brep"\r
-theShapeForCut = geompy.ImportBREP(theFileName)\r
-geompy.addToStudy(theShapeForCut, "slot.brep_1")\r
-\r
-#Cut applying\r
-Cut_1 = geompy.MakeBoolean(Chamfer_2, theShapeForCut, 2)\r
-geompy.addToStudy(Cut_1, "Cut_1")\r
-\r
-salome.sg.updateObjBrowser(1)\r
-\r
+#####################################################################
+#Created :17/02/2005
+#Auhtor :MASLOV Eugeny, KOVALTCHUK Alexey
+#####################################################################
+
+import geompy
+import salome
+import os
+import math
+
+#Sketcher_1 creation
+Sketcher_1 = geompy.MakeSketcher("Sketcher:F 100 -57.7:TT 100 57.7:TT 0 115.47:TT -100 57.7:TT -100 -57.7:TT 0 -115.47:WW")
+geompy.addToStudy(Sketcher_1, "Sketcher_1")
+Face_1 = geompy.MakeFace(Sketcher_1, 1)
+geompy.addToStudy(Face_1, "Face_1")
+
+#Line creation
+Line_1 = geompy.MakeLineTwoPnt(geompy.MakeVertex(0,0,0), geompy.MakeVertex(0,0,100))
+geompy.addToStudy(Line_1, "Line_1")
+
+#Prism creation
+Prism_1 = geompy.MakePrismVecH(Face_1, Line_1, 100)
+geompy.addToStudy(Prism_1, "Prism_1")
+
+#Sketcher_2 creation
+Sketcher_2 = geompy.MakeSketcher("Sketcher:F 50 0:TT 80 0:TT 112 13:TT 112 48:TT 80 63:TT 80 90:TT 50 90:WW", [0,0,0, 1,0,0, 0,1,0])
+geompy.addToStudy(Sketcher_2, "Sketcher_2")
+Face_2 = geompy.MakeFace(Sketcher_2, 1)
+geompy.addToStudy(Face_2, "Face_2")
+
+#Revolution creation
+Revolution_1 = geompy.MakeRevolution(Face_2, Line_1, 2*math.pi)
+geompy.addToStudy(Revolution_1, "Revolution_1")
+
+#Common applying
+Common_1 = geompy.MakeBoolean(Revolution_1, Prism_1, 1)
+geompy.addToStudy(Common_1, "Common_1")
+
+#Explode Common_1 on edges
+CommonExplodedListEdges = geompy.SubShapeAll(Common_1, geompy.ShapeType["EDGE"])
+for i in range(0, len(CommonExplodedListEdges)):
+ name = "Edge_"+str(i+1)
+ geompy.addToStudyInFather(Common_1, CommonExplodedListEdges[i], name)
+
+#Fillet applying
+#ID = geompy.GetSubShapeID(Common_1, CommonExplodedListEdges[0])
+Fillet_1 = geompy.MakeFillet(Common_1, 10, geompy.ShapeType["EDGE"], [6])
+geompy.addToStudy(Fillet_1, "Fillet_1")
+
+#Chamfer applying
+Chamfer_1 = geompy.MakeChamferEdge(Fillet_1, 10, 10, 16, 50 )
+geompy.addToStudy(Chamfer_1, "Chamfer_1")
+
+Chamfer_2 = geompy.MakeChamferEdge(Chamfer_1, 10, 10, 21, 31 )
+geompy.addToStudy(Chamfer_2, "Chamfer_2")
+
+#Import of the shape from "slots.brep"
+thePath = os.getenv("DATA_DIR")
+theFileName = thePath + "/Shapes/Brep/slots.brep"
+theShapeForCut = geompy.ImportBREP(theFileName)
+geompy.addToStudy(theShapeForCut, "slot.brep_1")
+
+#Cut applying
+Cut_1 = geompy.MakeBoolean(Chamfer_2, theShapeForCut, 2)
+geompy.addToStudy(Cut_1, "Cut_1")
+
+salome.sg.updateObjBrowser(1)
+
# --
-alveole = geompy.MakePartition([colis_cc_multi, barier])
+Compound1 = geompy.MakeCompound([colis_cc_multi, barier])
+SubShape_theShape = geompy.SubShapeAll(Compound1,geompy.ShapeType["SOLID"])
+alveole = geompy.MakePartition(SubShape_theShape)
+#alveole = geompy.MakePartition([colis_cc_multi, barier])
geompy.addToStudy(alveole, "alveole before explode")
-# GEOM GEOM_SWIG : binding of C++ omplementaion with Python\r
-#\r
-# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,\r
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS \r
-# \r
-# This library is free software; you can redistribute it and/or \r
-# modify it under the terms of the GNU Lesser General Public \r
-# License as published by the Free Software Foundation; either \r
-# version 2.1 of the License. \r
-# \r
-# This library is distributed in the hope that it will be useful, \r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of \r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU \r
-# Lesser General Public License for more details. \r
-# \r
-# You should have received a copy of the GNU Lesser General Public \r
-# License along with this library; if not, write to the Free Software \r
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA \r
-# \r
+# GEOM GEOM_SWIG : binding of C++ omplementaion with Python
+#
+# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#\r
-#\r
-#\r
-# File : GEOM_Sketcher.py\r
-# Author : Damien COQUERET, Open CASCADE\r
-# Module : GEOM\r
-# $Header$\r
-\r
-import geompy\r
-\r
-#SKETCHER INFOS\r
-#Init Sketcher\r
-#Create a string beginning by :"Sketcher:"\r
-#Each command must be separated by ":"\r
-#"F x y" : Create first point at X & Y\r
-\r
-#To Make Segment\r
-#"R angle" : Set the direction by angle\r
-#"D dx dy" : Set the direction by DX & DY\r
-\r
-#"TT x y" : Create by point at X & Y\r
-#"T dx dy" : Create by point with DX & DY\r
-#"L length" : Create by direction & Length\r
-#"IX x" : Create by direction & Intersect. X\r
-#"IY y" : Create by direction & Intersect. Y\r
-\r
-#To Make Arc\r
-#"C radius length" : Create by direction, radius and length(in degree)\r
-\r
-#To finish\r
-#"WW" : Close Wire\r
-\r
-#Create Sketcher\r
-Cmd = "Sketch:F 0 0:TT 0 100:C 100 180:WW"\r
-Sketcher = geompy.MakeSketcher(Cmd) #(string)->GEOM_Shape_ptr\r
-\r
-#Add In Study\r
-id_Sketcher = geompy.addToStudy(Sketcher, "Sketcher")\r
+#
+#
+#
+# File : GEOM_Sketcher.py
+# Author : Damien COQUERET, Open CASCADE
+# Module : GEOM
+# $Header$
+
+import geompy
+
+#SKETCHER INFOS
+#Init Sketcher
+#Create a string beginning by :"Sketcher:"
+#Each command must be separated by ":"
+#"F x y" : Create first point at X & Y
+
+#To Make Segment
+#"R angle" : Set the direction by angle
+#"D dx dy" : Set the direction by DX & DY
+
+#"TT x y" : Create by point at X & Y
+#"T dx dy" : Create by point with DX & DY
+#"L length" : Create by direction & Length
+#"IX x" : Create by direction & Intersect. X
+#"IY y" : Create by direction & Intersect. Y
+
+#To Make Arc
+#"C radius length" : Create by direction, radius and length(in degree)
+
+#To finish
+#"WW" : Close Wire
+
+#Create Sketcher
+Cmd = "Sketch:F 0 0:TT 0 100:C 100 180:WW"
+Sketcher = geompy.MakeSketcher(Cmd) #(string)->GEOM_Shape_ptr
+
+#Add In Study
+id_Sketcher = geompy.addToStudy(Sketcher, "Sketcher")
############# MakeSpanner #############
-def MakeSpanner (salome, geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None, hasGUI = 0):
+def MakeSpanner (geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None):
### Variables ###
Block_new = geompy.MakeHexa2Faces(Face_g_1, Face_g_1_tr)
id_block_new = geompy.addToStudy(Block_new, "Block New")
- if isMeshTest == 1:
+ if isMeshTest == 1 and smesh is not None:
print "##################### Build Mesh #####################"
- import StdMeshers
# ---- add a middle block of spanner handle in study
Id_Edge1 = geompy.addToStudyInFather(FaceTop, Edge1, "Edge 1")
Id_Edge2 = geompy.addToStudyInFather(FaceTop, Edge2, "Edge 2")
- # ---- launch SMESH
+ print "-------------------------- Algorithm and Hypothesis"
- smeshgui = None
- if hasGUI == 1:
- smeshgui = salome.ImportComponentGUI("SMESH")
- smeshgui.Init(salome.myStudyId)
-
- print "-------------------------- create Hypothesis"
-
- print "-------------------------- NumberOfSegments"
-
- hypNbSeg3 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
- hypNbSeg3.SetNumberOfSegments(3)
- print hypNbSeg3.GetName()
- print hypNbSeg3.GetId()
- print hypNbSeg3.GetNumberOfSegments()
-
- if hasGUI == 1:
- idseg = salome.ObjectToID(hypNbSeg3)
- smeshgui.SetName(idseg, "NumberOfSegments_3");
-
- print "-------------------------- LocalLength"
-
- hypLen1 = smesh.CreateHypothesis("LocalLength", "libStdMeshersEngine.so")
- hypLen1.SetLength(10)
- print hypLen1.GetName()
- print hypLen1.GetId()
- print hypLen1.GetLength()
-
- if hasGUI == 1:
- idlength = salome.ObjectToID(hypLen1)
- smeshgui.SetName(idlength, "Local_Length_10");
-
- print "-------------------------- Propagation"
-
- hypProp = smesh.CreateHypothesis("Propagation", "libStdMeshersEngine.so")
- print hypProp.GetName()
- print hypProp.GetId()
-
- if hasGUI == 1:
- idprop = salome.ObjectToID(hypProp)
- smeshgui.SetName(idprop, "Propagation hypothesis");
+ print "---- Init a Mesh with the Spanner"
- #print "-------------------------- NumberOfSegments"
- #
- #hypNbSeg15 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
- #hypNbSeg15.SetNumberOfSegments(15)
- #print hypNbSeg15.GetName()
- #print hypNbSeg15.GetId()
- #print hypNbSeg15.GetNumberOfSegments()
- #
- #if hasGUI == 1:
- # idseg15 = salome.ObjectToID(hypNbSeg15)
- # smeshgui.SetName(idseg15, "NumberOfSegments_15");
+ mesh = smesh.Mesh(Spanner, "Meshed Spanner")
- print "-------------------------- Regular_1D"
+ print "-------------------------- add hypothesis to Spanner"
- algoReg = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
+ print "-------------------------- NumberOfSegments"
+ algoReg = mesh.Segment()
listHyp = algoReg.GetCompatibleHypothesis()
for hyp in listHyp:
- print hyp
+ print hyp
print algoReg.GetName()
print algoReg.GetId()
-
- if hasGUI == 1:
- idreg = salome.ObjectToID(algoReg)
- smeshgui.SetName(idreg, "Regular_1D");
+ algoReg.SetName("Regular_1D")
+
+
+ hypNbSeg3 = algoReg.NumberOfSegments(3)
+ print hypNbSeg3.GetName()
+ print hypNbSeg3.GetId()
+ print hypNbSeg3.GetNumberOfSegments()
+ smesh.SetName(hypNbSeg3, "NumberOfSegments_3")
print "-------------------------- Quadrangle_2D"
- algoQuad = smesh.CreateHypothesis("Quadrangle_2D", "libStdMeshersEngine.so")
+ algoQuad = mesh.Quadrangle()
listHyp = algoQuad.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp
print algoQuad.GetName()
print algoQuad.GetId()
-
- if hasGUI == 1:
- idquad = salome.ObjectToID(algoQuad)
- smeshgui.SetName(idquad, "Quadrangle_2D");
-
- print "---- Init a Mesh with the Spanner"
-
- mesh = smesh.CreateMesh(Spanner)
- if hasGUI == 1:
- idmesh = salome.ObjectToID(mesh)
- smeshgui.SetName(idmesh, "Meshed Spanner");
-
- print "-------------------------- add hypothesis to Spanner"
-
- mesh.AddHypothesis(Spanner, algoReg)
- mesh.AddHypothesis(Spanner, hypNbSeg3)
- mesh.AddHypothesis(Spanner, algoQuad)
+ algoQuad.SetName("Quadrangle_2D")
print "-------------------------- add hypothesis to the Middle Block"
-
- submesh_bl = mesh.GetSubMesh(BlockMh, "SubMesh Middle Block")
- mesh.AddHypothesis(BlockMh, hypLen1)
+
+ print "-------------------------- LocalLength"
+ algoRegMb = mesh.Segment(BlockMh)
+ hypLen1 = algoRegMb.LocalLength(10)
+ print hypLen1.GetName()
+ print hypLen1.GetId()
+ print hypLen1.GetLength()
+ smesh.SetName(hypLen1, "Local_Length_10")
print "-------------------------- add hypothesis to the long edges of the Top Face of the Middle Block"
- submesh_e1 = mesh.GetSubMesh(Edge1, "SubMesh Edge 1 of Top Face")
- mesh.AddHypothesis(Edge1, hypProp)
- #mesh.AddHypothesis(Edge1, hypNbSeg15)
-
- submesh_e2 = mesh.GetSubMesh(Edge2, "SubMesh Edge 2 of Top Face")
- mesh.AddHypothesis(Edge2, hypProp)
- #mesh.AddHypothesis(Edge2, hypNbSeg15)
-
+ algoRegE1 = mesh.Segment(Edge1)
+ hypPropE1 = algoRegE1.Propagation()
+ print hypPropE1.GetName()
+ print hypPropE1.GetId()
+ smesh.SetName(hypPropE1, "Propagation hypothesis")
+ smesh.SetName(algoRegE1.GetSubMesh(), "SubMesh Edge 1 of Top Face")
+
+ algoRegE2 = mesh.Segment(Edge2)
+ hypPropE2 = algoRegE2.Propagation()
+ print hypPropE2.GetName()
+ print hypPropE2.GetId()
+ smesh.SetName(hypPropE2, "Propagation hypothesis")
+ smesh.SetName(algoRegE2.GetSubMesh(), "SubMesh Edge 2 of Top Face")
+
print "-------------------------- compute the mesh"
- smesh.Compute(mesh, Spanner)
+ mesh.Compute()
print "Information about the Mesh:"
print "Number of nodes : ", mesh.NbNodes()
Sewing = geompy.MakeSewing([Face, S], precision) #(List Of GEOM_Object_ptr, Double)->GEOM_Object_ptr
#Transform objects
- Translation = geompy.MakeTranslationTwoPoints(Box, px, pz) #(3 GEOM_Object_ptr)->GEOM_Object_ptr
- TranslVect = geompy.MakeTranslationVector(Box, vxyz) #(2 GEOM_Object_ptr)->GEOM_Object_ptr
- Rotation = geompy.MakeRotation(Box, vz, angle1) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr
- Scale = geompy.MakeScaleTransform(Box, p0, factor) #
- Mirror = geompy.MakeMirrorByPlane(Box, Plane) #(2 GEOM_Object_ptr)->GEOM_Object_ptr
- MirrorAxis = geompy.MakeMirrorByAxis(Box, Line1) #
- MirrorPnt = geompy.MakeMirrorByPoint(Box, p200) #
- Position = geompy.MakePosition(Box, cs1, cs2) #(3 GEOM_Object_ptr)->GEOM_Object_ptr
- Offset = geompy.MakeOffset(Box, 10.) #(GEOM_Object_ptr, Double)->GEOM_Object_ptr
+ Translation = geompy.MakeTranslationTwoPoints(Box, px, pz) #(3 GEOM_Object_ptr)->GEOM_Object_ptr
+ TranslVect = geompy.MakeTranslationVector(Box, vxyz) #(2 GEOM_Object_ptr)->GEOM_Object_ptr
+ Rotation = geompy.MakeRotation(Box, vz, angle1) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr
+ RotatPnt = geompy.MakeRotationThreePoints(Box, px, py, pz) #(4 GEOM_Object_ptr)->GEOM_Object_ptr
+ Scale = geompy.MakeScaleTransform(Box, p0, factor) #
+ Mirror = geompy.MakeMirrorByPlane(Box, Plane) #(2 GEOM_Object_ptr)->GEOM_Object_ptr
+ MirrorAxis = geompy.MakeMirrorByAxis(Box, Line1) #
+ MirrorPnt = geompy.MakeMirrorByPoint(Box, p200) #
+ Position = geompy.MakePosition(Box, cs1, cs2) #(3 GEOM_Object_ptr)->GEOM_Object_ptr
+ Offset = geompy.MakeOffset(Box, 10.) #(GEOM_Object_ptr, Double)->GEOM_Object_ptr
Orientation = geompy.ChangeOrientation(Box)
#IDList for Fillet/Chamfer
id_Translation = geompy.addToStudy(Translation, "Translation")
id_TranslVect = geompy.addToStudy(TranslVect , "Translation along vector")
id_Rotation = geompy.addToStudy(Rotation, "Rotation")
+ id_RotatPnt = geompy.addToStudy(RotatPnt, "Rotation by three points")
id_Scale = geompy.addToStudy(Scale, "Scale")
id_Mirror = geompy.addToStudy(Mirror, "Mirror by Plane")
id_MirrorAxis = geompy.addToStudy(MirrorAxis, "Mirror by Axis")
print "Test Export/Import ...",
+ tmpDir = os.getenv("TEMP")
+ if tmpDir == None:
+ tmpDir = "/tmp"
+
# Files for Export/Import testing
- fileExportImport = "/tmp/testExportImport.brep"
- fileExportImportBREP = "/tmp/testExportImportBREP.brep"
- fileExportImportIGES = "/tmp/testExportImportIGES.iges"
- fileExportImportSTEP = "/tmp/testExportImportSTEP.step"
+ fileExportImport = tmpDir + "/testExportImport.brep"
+ fileExportImportBREP = tmpDir + "/testExportImportBREP.brep"
+ fileExportImportIGES = tmpDir + "/testExportImportIGES.iges"
+ fileExportImportSTEP = tmpDir + "/testExportImportSTEP.step"
if os.access(fileExportImport, os.F_OK):
if os.access(fileExportImport, os.W_OK):
os.remove(fileExportImport)
else:
- fileExportImport = "/tmp/testExportImport1.brep"
+ fileExportImport = tmpDir + "/testExportImport1.brep"
if os.access(fileExportImportBREP, os.W_OK):
os.remove(fileExportImportBREP)
else:
- fileExportImportBREP = "/tmp/testExportImportBREP1.brep"
+ fileExportImportBREP = tmpDir + "/testExportImportBREP1.brep"
if os.access(fileExportImportIGES, os.W_OK):
os.remove(fileExportImportIGES)
else:
- fileExportImportIGES = "/tmp/testExportImportIGES1.iges"
+ fileExportImportIGES = tmpDir + "/testExportImportIGES1.iges"
if os.access(fileExportImportSTEP, os.W_OK):
os.remove(fileExportImportSTEP)
else:
- fileExportImportSTEP = "/tmp/testExportImportSTEP1.step"
+ fileExportImportSTEP = tmpDir + "/testExportImportSTEP1.step"
# Export
geompy.Export(shape, fileExportImport, "BREP")
p100 = geompy.MakeVertex(100, 100, 100)
p300 = geompy.MakeVertex(300, 300, 300)
Box1 = geompy.MakeBoxTwoPnt(p100, p300)
- Partition = geompy.Partition([Box], [Box1], [], [Box])
+ #Partition = geompy.Partition([Box], [Box1], [], [Box])
+ Partition = geompy.Partition([Box], [Box1])
id_Partition = geompy.addToStudy(Partition, "Partition of Box by Box1")
# MakeMultiRotation1D, MakeMultiRotation2D
v_n0p = geompy.MakeVectorDXDYDZ(-1, 0, 1)
v_pp0 = geompy.MakeVectorDXDYDZ( 1, 1, 0)
v_np0 = geompy.MakeVectorDXDYDZ(-1, 1, 0)
+ v_0n0 = geompy.MakeVectorDXDYDZ( 0, -1, 0)
pln_0pp = geompy.MakePlane(p0, v_0pp, 300)
pln_0np = geompy.MakePlane(p0, v_0np, 300)
pln_pp0 = geompy.MakePlane(p0, v_pp0, 300)
pln_np0 = geompy.MakePlane(p0, v_np0, 300)
- part_tool_1 = geompy.MakePartition([b0, pln_0pp, pln_0np, pln_p0p, pln_n0p, pln_pp0, pln_np0],
- [],
- [],
- [b0])
+ #part_tool_1 = geompy.MakePartition([b0, pln_0pp, pln_0np, pln_p0p, pln_n0p, pln_pp0, pln_np0],
+ # [],
+ # [],
+ # [b0])
+ part_tool_1 = geompy.MakePartition([b0, pln_0pp, pln_0np, pln_p0p, pln_n0p, pln_pp0, pln_np0])
+
+ id_part_tool_1 = geompy.addToStudy(part_tool_1, "part_tool_1")
pt_pnt_1 = geompy.MakeVertex( 55, 0, 55)
pt_pnt_2 = geompy.MakeVertex( 0, 55, 55)
pt_face_11 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_11)
pt_face_12 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_12)
- pt_box = geompy.GetBlockNearPoint(part_tool_1, p0)
-
- part_tool = geompy.MakeCompound([pt_face_1, pt_face_4, pt_face_7, pt_face_10,
- pt_face_2, pt_face_5, pt_face_8, pt_face_11,
- pt_face_3, pt_face_6, pt_face_9, pt_face_12, pt_box])
- id_part_tool = geompy.addToStudy(part_tool, "part_tool")
-
- part = geompy.MakePartition([s0], [part_tool])
+ #pt_box = geompy.GetBlockNearPoint(part_tool_1, p0)
+
+ #part_tool = geompy.MakeCompound([pt_face_1, pt_face_4, pt_face_7, pt_face_10,
+ # pt_face_2, pt_face_5, pt_face_8, pt_face_11,
+ # #pt_face_3, pt_face_6, pt_face_9, pt_face_12, pt_box])
+ # pt_face_3, pt_face_6, pt_face_9, pt_face_12)
+ #id_part_tool = geompy.addToStudy(part_tool, "part_tool")
+
+ #part = geompy.MakePartition([s0], [part_tool])
+ #part = geompy.MakePartition([s0], [ pt_face_1, pt_face_4, pt_face_7, pt_face_10,
+ # pt_face_2, pt_face_5, pt_face_8, pt_face_11,
+ # pt_face_3, pt_face_6, pt_face_9, pt_face_12, b0] )
+
+ p1 = geompy.MakeVertex(50, 0, 0)
+ p2 = geompy.MakeVertex(-50, 0, 0)
+ p3 = geompy.MakeVertex(0, 50, 0)
+ p4 = geompy.MakeVertex(0, -50, 0)
+ p5 = geompy.MakeVertex(0, 0, 50)
+ p6 = geompy.MakeVertex(0, 0, -50)
+
+ vx = geompy.MakeVectorDXDYDZ( 1, 0, 0)
+ vy = geompy.MakeVectorDXDYDZ( 0, 1, 0)
+ vz = geompy.MakeVectorDXDYDZ( 0, 0, 1)
+
+ plnX1 = geompy.MakePlane(p1, vx, 300)
+ plnX2 = geompy.MakePlane(p2, vx, 300)
+ plnY1 = geompy.MakePlane(p3, vy, 300)
+ plnY2 = geompy.MakePlane(p4, vy, 300)
+ plnZ1 = geompy.MakePlane(p5, vz, 300)
+ plnZ2 = geompy.MakePlane(p6, vz, 300)
+
+ #part = geompy.MakePartition([s0], [plnX1,plnX2,plnY1,plnY2,plnZ1,plnZ2])
+ part = geompy.MakePartition([s0], [plnX1])
+ part = geompy.MakePartition([part], [plnX2])
+ part = geompy.MakePartition([part], [plnY1])
+ part = geompy.MakePartition([part], [plnY2])
+ part = geompy.MakePartition([part], [plnZ1])
+ part = geompy.MakePartition([part], [plnZ2])
geompy.addToStudy(part, "part")
# GetFreeFacesIDs
geompy.UnionIDs(faces_above, faces_above_pln_ids)
geompy.addToStudy(faces_above, "Group of faces above Plane (N = (0, 1, 1))")
+ # GetShapesOnPlaneWithLocation
+ Loc = geompy.MakeVertex(0, -50, 0)
+ edges_on_pln = geompy.GetShapesOnPlaneWithLocation(blocksComp, geompy.ShapeType["EDGE"],
+ v_0n0, Loc, geompy.GEOM.ST_ON)
+ for edge_i in edges_on_pln:
+ geompy.addToStudy(edge_i, "Edge on Plane (N = (0, -1, 0) & Location = (0, -50, 0)")
+
+ # GetShapesOnPlaneWithLocationIDs
+ edges_on_pln_ids = geompy.GetShapesOnPlaneWithLocationIDs(blocksComp, geompy.ShapeType["EDGE"],
+ v_0n0, Loc, geompy.GEOM.ST_ON)
+ group_edges_on_pln = geompy.CreateGroup(blocksComp, geompy.ShapeType["EDGE"])
+ geompy.UnionIDs(group_edges_on_pln, edges_on_pln_ids)
+ geompy.addToStudy(group_edges_on_pln, "Group of edges on Plane (N = (0, -1, 0) & Location = (0, -50, 0))")
+
# GetShapesOnCylinder
edges_out_cyl = geompy.GetShapesOnCylinder(blocksComp, geompy.ShapeType["EDGE"],
vy, 55, geompy.GEOM.ST_OUT)
smesh = None
-GEOM_Spanner.MakeSpanner(salome, geompy, math, isBlocksTest, isMeshTest, smesh)
+GEOM_Spanner.MakeSpanner(geompy, math, isBlocksTest, isMeshTest, smesh)
salome.sg.updateObjBrowser(1);
-# GEOM GEOM_SWIG : binding of C++ omplementaion with Python\r
-#\r
-# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,\r
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS \r
-# \r
-# This library is free software; you can redistribute it and/or \r
-# modify it under the terms of the GNU Lesser General Public \r
-# License as published by the Free Software Foundation; either \r
-# version 2.1 of the License. \r
-# \r
-# This library is distributed in the hope that it will be useful, \r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of \r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU \r
-# Lesser General Public License for more details. \r
-# \r
-# You should have received a copy of the GNU Lesser General Public \r
-# License along with this library; if not, write to the Free Software \r
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA \r
-# \r
+# GEOM GEOM_SWIG : binding of C++ omplementaion with Python
+#
+# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#\r
-#\r
-#\r
-# File : GEOM_example5.py\r
-# Author : Damien COQUERET, Open CASCADE\r
-# Module : GEOM\r
-# $Header$\r
-\r
-import salome\r
-import geompy\r
-\r
-geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM")\r
-\r
-#Create Points\r
-BasicOp = geom.GetIBasicOperations(salome.myStudyId)\r
-Vertex1 = BasicOp.MakePointXYZ(0., 0., 0.)\r
-Vertex2 = BasicOp.MakePointXYZ(100., 20., 30.)\r
-Vertex3 = BasicOp.MakePointXYZ(150., 100., -25.)\r
-Vertex4 = BasicOp.MakePointXYZ(40., -80., 79.)\r
-\r
-#GEOM_Objects List for Splines\r
-GOList = []\r
-GOList.append(Vertex1)\r
-GOList.append(Vertex2)\r
-GOList.append(Vertex3)\r
-GOList.append(Vertex4)\r
-\r
-#Create Splines\r
-Bezier = geompy.MakeBezier(GOList)\r
-Interpol = geompy.MakeInterpol(GOList)\r
-\r
-#Add In Study\r
-id_Bezier = geompy.addToStudy(Bezier, "Bezier")\r
-id_Interpol = geompy.addToStudy(Interpol, "Interpol")\r
+#
+#
+#
+# File : GEOM_example5.py
+# Author : Damien COQUERET, Open CASCADE
+# Module : GEOM
+# $Header$
+
+import salome
+import geompy
+
+geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM")
+
+#Create Points
+BasicOp = geom.GetIBasicOperations(salome.myStudyId)
+Vertex1 = BasicOp.MakePointXYZ(0., 0., 0.)
+Vertex2 = BasicOp.MakePointXYZ(100., 20., 30.)
+Vertex3 = BasicOp.MakePointXYZ(150., 100., -25.)
+Vertex4 = BasicOp.MakePointXYZ(40., -80., 79.)
+
+#GEOM_Objects List for Splines
+GOList = []
+GOList.append(Vertex1)
+GOList.append(Vertex2)
+GOList.append(Vertex3)
+GOList.append(Vertex4)
+
+#Create Splines
+Bezier = geompy.MakeBezier(GOList)
+Interpol = geompy.MakeInterpol(GOList)
+
+#Add In Study
+id_Bezier = geompy.addToStudy(Bezier, "Bezier")
+id_Interpol = geompy.addToStudy(Interpol, "Interpol")
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-#==============================================================================\r
-# Info.\r
-# Bug (from script, bug) : tube_geom_gg2_corrected.py, PAL5243\r
-# Modified : 25/11/2004\r
-# Author : Kovaltchuk Alexey\r
-# Project : PAL/SALOME\r
-#==============================================================================\r
-#\r
-# Geometrie du cas test\r
-#\r
-\r
-from geompy import *\r
-import salome\r
-#\r
-# base de l'assemblage\r
-#\r
-L_base = 300.\r
-l_base = 150.\r
-h_base = 75.\r
-e_base = 6.\r
-\r
-base_bot = MakeBox(0.,0.,0.,L_base,l_base,e_base)\r
-base_top = MakeTranslation(base_bot,0.,0.,h_base-e_base)\r
-base_front = MakeBox(0,0,0,L_base,e_base,h_base)\r
-base_rear = MakeTranslation(base_front,0.,l_base,0.)\r
-\r
-tmp = MakeBoolean(base_top,base_rear,3)\r
-tmp = MakeBoolean(tmp,base_bot,3)\r
-base = MakeBoolean(tmp,base_front,3)\r
-\r
-baseId = addToStudy(base,"base")\r
-#\r
-# traverse\r
-#\r
-L_trav = 60.\r
-h_trav = 300.\r
-e_trav = 7.\r
-marge = 15.\r
-\r
-flange_left = MakeBox(0.,0.,0,e_trav,L_trav,h_trav)\r
-flange_right = MakeTranslation(flange_left,L_trav-e_trav,0.,0.)\r
-flange_front = MakeBox(0.,0.,0,L_trav,e_trav,h_trav)\r
-flange_rear = MakeTranslation(flange_front,0.,L_trav-e_trav,0.)\r
-\r
-tmp = MakeBoolean(flange_left,flange_rear,3)\r
-tmp = MakeBoolean(tmp,flange_right,3)\r
-flange = MakeBoolean(tmp,flange_front,3)\r
-#\r
-# left chamfer\r
-#\r
-import math\r
-length = e_trav/math.sin(math.pi/4.)\r
-yaxis = MakeVectorDXDYDZ(0.,1.,0.)\r
-cut_left = MakeBox(0.,-marge,0.,-length,L_trav+marge,length)\r
-cut_left = MakeRotation(cut_left,yaxis,-math.pi/4.)\r
-cut_left = MakeTranslation(cut_left,e_trav,0.,0.)\r
-#\r
-# right chamfer\r
-#\r
-symPlaneYZ = MakePlane(\r
- MakeVertex(L_trav/2.,0.,0.),\r
- MakeVectorDXDYDZ(1.,0.,0.), 10000. )\r
-cut_right = MakeMirrorByPlane(cut_left,symPlaneYZ)\r
-#\r
-# front chamfer\r
-#\r
-xaxis = MakeVectorDXDYDZ(1.,0.,0.)\r
-cut_front = MakeBox(-marge,0.,0.,L_trav+marge,length,length)\r
-cut_front = MakeRotation(cut_front,xaxis,3.*math.pi/4.)\r
-cut_front = MakeTranslation(cut_front,0.,e_trav,0.)\r
-#\r
-# rear chamfer\r
-#\r
-symPlaneXZ = MakePlane(\r
- MakeVertex(0.,L_trav/2.,0.),\r
- MakeVectorDXDYDZ(0.,1.,0.), 10000. )\r
-cut_rear = MakeMirrorByPlane(cut_front,symPlaneXZ)\r
-#\r
-# chamfer\r
-#\r
-trav = MakeBoolean(flange,cut_left,2)\r
-trav = MakeBoolean(trav,cut_right,2)\r
-trav = MakeBoolean(trav,cut_front,2)\r
-trav = MakeBoolean(trav,cut_rear,2)\r
-trav = MakeTranslation(trav,\r
- L_base/2.-L_trav/2.,\r
- l_base/2.-L_trav/2.,\r
- h_base)\r
-travId = addToStudy(trav,"trav")\r
-#\r
-# Welding\r
-#\r
-ground = MakeBox(-1000.,-1000.,0.,1000.,1000.,-1000.)\r
-weld_left = MakeBoolean(cut_left,ground,2)\r
-weld_right = MakeBoolean(cut_right,ground,2)\r
-weld_front = MakeBoolean(cut_front,ground,2)\r
-weld_rear = MakeBoolean(cut_rear,ground,2)\r
-#\r
-# Assembly\r
-#\r
-coarse_weld = MakeBoolean(weld_left,weld_rear,3)\r
-coarse_weld = MakeBoolean(coarse_weld,weld_right,3)\r
-coarse_weld = MakeBoolean(coarse_weld,weld_front,3)\r
-#\r
-# Cleaners\r
-#\r
-left_cleaner = MakeBox(0.,-10*marge,0.,-10.*marge,10.*marge,10.*marge)\r
-left_cleaner = MakeRotation(left_cleaner,yaxis,math.pi/4.)\r
-left_cleaner = MakeTranslation(left_cleaner,-e_trav-2.*marge,0.,-2.*marge)\r
-\r
-right_cleaner = MakeMirrorByPlane(left_cleaner,symPlaneYZ)\r
-\r
-front_cleaner = MakeBox(-10*marge,0.,0.,10.*marge,10.*marge,10.*marge)\r
-front_cleaner = MakeRotation(front_cleaner,xaxis,3.*math.pi/4.)\r
-front_cleaner = MakeTranslation(front_cleaner,0.,2.*marge-e_trav,2.*marge)\r
-\r
-rear_cleaner = MakeMirrorByPlane(front_cleaner,symPlaneXZ)\r
-#\r
-# Welding\r
-#\r
-weld = MakeBoolean(coarse_weld,left_cleaner,2)\r
-weld = MakeBoolean(weld,rear_cleaner,2)\r
-weld = MakeBoolean(weld,right_cleaner,2)\r
-weld = MakeBoolean(weld,front_cleaner,2)\r
-weld = MakeTranslation(weld,\r
- L_base/2.-L_trav/2.,\r
- l_base/2.-L_trav/2.,\r
- h_base)\r
-weldId = addToStudy(weld,"weld")\r
-#\r
-# Assembly\r
-#\r
-#assemblage = MakePartition([base.,weld.GetName()])\r
-assemblage = MakePartition([base,weld])\r
-addToStudy(assemblage, "base+weld")\r
-#print assemblage.GetName()\r
-#print trav.GetName()\r
-#assemblage = MakePartition([assemblage.GetName(),trav.GetName()])\r
-assemblage = MakePartition([assemblage,trav])\r
-assemblageId = addToStudy(assemblage, "assemblage")\r
-\r
-#\r
-# Display\r
-#\r
-gg = ImportComponentGUI("GEOM")\r
-import salome_ComponentGUI\r
-if not isinstance(gg, type(salome_ComponentGUI)):\r
- gg.initGeomGen()\r
- gg.createAndDisplayGO(baseId)\r
- gg.setTransparency(baseId,0.5)\r
- gg.setDisplayMode(baseId,1)\r
- gg.setColor(baseId,255,0,0)\r
- gg.createAndDisplayGO(travId)\r
- gg.setTransparency(travId,0.5)\r
- gg.setDisplayMode(travId,1)\r
- gg.setColor(travId,255,0,0)\r
- gg.createAndDisplayGO(weldId)\r
- gg.setTransparency(weldId,0.5)\r
- gg.setDisplayMode(weldId,1)\r
- gg.setColor(weldId,0,0,255)\r
+#==============================================================================
+# Info.
+# Bug (from script, bug) : tube_geom_gg2_corrected.py, PAL5243
+# Modified : 25/11/2004
+# Author : Kovaltchuk Alexey
+# Project : PAL/SALOME
+#==============================================================================
+#
+# Geometrie du cas test
+#
+
+from geompy import *
+import salome
+#
+# base de l'assemblage
+#
+L_base = 300.
+l_base = 150.
+h_base = 75.
+e_base = 6.
+
+base_bot = MakeBox(0.,0.,0.,L_base,l_base,e_base)
+base_top = MakeTranslation(base_bot,0.,0.,h_base-e_base)
+base_front = MakeBox(0,0,0,L_base,e_base,h_base)
+base_rear = MakeTranslation(base_front,0.,l_base,0.)
+
+tmp = MakeBoolean(base_top,base_rear,3)
+tmp = MakeBoolean(tmp,base_bot,3)
+base = MakeBoolean(tmp,base_front,3)
+
+baseId = addToStudy(base,"base")
+#
+# traverse
+#
+L_trav = 60.
+h_trav = 300.
+e_trav = 7.
+marge = 15.
+
+flange_left = MakeBox(0.,0.,0,e_trav,L_trav,h_trav)
+flange_right = MakeTranslation(flange_left,L_trav-e_trav,0.,0.)
+flange_front = MakeBox(0.,0.,0,L_trav,e_trav,h_trav)
+flange_rear = MakeTranslation(flange_front,0.,L_trav-e_trav,0.)
+
+tmp = MakeBoolean(flange_left,flange_rear,3)
+tmp = MakeBoolean(tmp,flange_right,3)
+flange = MakeBoolean(tmp,flange_front,3)
+#
+# left chamfer
+#
+import math
+length = e_trav/math.sin(math.pi/4.)
+yaxis = MakeVectorDXDYDZ(0.,1.,0.)
+cut_left = MakeBox(0.,-marge,0.,-length,L_trav+marge,length)
+cut_left = MakeRotation(cut_left,yaxis,-math.pi/4.)
+cut_left = MakeTranslation(cut_left,e_trav,0.,0.)
+#
+# right chamfer
+#
+symPlaneYZ = MakePlane(
+ MakeVertex(L_trav/2.,0.,0.),
+ MakeVectorDXDYDZ(1.,0.,0.), 10000. )
+cut_right = MakeMirrorByPlane(cut_left,symPlaneYZ)
+#
+# front chamfer
+#
+xaxis = MakeVectorDXDYDZ(1.,0.,0.)
+cut_front = MakeBox(-marge,0.,0.,L_trav+marge,length,length)
+cut_front = MakeRotation(cut_front,xaxis,3.*math.pi/4.)
+cut_front = MakeTranslation(cut_front,0.,e_trav,0.)
+#
+# rear chamfer
+#
+symPlaneXZ = MakePlane(
+ MakeVertex(0.,L_trav/2.,0.),
+ MakeVectorDXDYDZ(0.,1.,0.), 10000. )
+cut_rear = MakeMirrorByPlane(cut_front,symPlaneXZ)
+#
+# chamfer
+#
+trav = MakeBoolean(flange,cut_left,2)
+trav = MakeBoolean(trav,cut_right,2)
+trav = MakeBoolean(trav,cut_front,2)
+trav = MakeBoolean(trav,cut_rear,2)
+trav = MakeTranslation(trav,
+ L_base/2.-L_trav/2.,
+ l_base/2.-L_trav/2.,
+ h_base)
+travId = addToStudy(trav,"trav")
+#
+# Welding
+#
+ground = MakeBox(-1000.,-1000.,0.,1000.,1000.,-1000.)
+weld_left = MakeBoolean(cut_left,ground,2)
+weld_right = MakeBoolean(cut_right,ground,2)
+weld_front = MakeBoolean(cut_front,ground,2)
+weld_rear = MakeBoolean(cut_rear,ground,2)
+#
+# Assembly
+#
+coarse_weld = MakeBoolean(weld_left,weld_rear,3)
+coarse_weld = MakeBoolean(coarse_weld,weld_right,3)
+coarse_weld = MakeBoolean(coarse_weld,weld_front,3)
+#
+# Cleaners
+#
+left_cleaner = MakeBox(0.,-10*marge,0.,-10.*marge,10.*marge,10.*marge)
+left_cleaner = MakeRotation(left_cleaner,yaxis,math.pi/4.)
+left_cleaner = MakeTranslation(left_cleaner,-e_trav-2.*marge,0.,-2.*marge)
+
+right_cleaner = MakeMirrorByPlane(left_cleaner,symPlaneYZ)
+
+front_cleaner = MakeBox(-10*marge,0.,0.,10.*marge,10.*marge,10.*marge)
+front_cleaner = MakeRotation(front_cleaner,xaxis,3.*math.pi/4.)
+front_cleaner = MakeTranslation(front_cleaner,0.,2.*marge-e_trav,2.*marge)
+
+rear_cleaner = MakeMirrorByPlane(front_cleaner,symPlaneXZ)
+#
+# Welding
+#
+weld = MakeBoolean(coarse_weld,left_cleaner,2)
+weld = MakeBoolean(weld,rear_cleaner,2)
+weld = MakeBoolean(weld,right_cleaner,2)
+weld = MakeBoolean(weld,front_cleaner,2)
+weld = MakeTranslation(weld,
+ L_base/2.-L_trav/2.,
+ l_base/2.-L_trav/2.,
+ h_base)
+weldId = addToStudy(weld,"weld")
+#
+# Assembly
+#
+#assemblage = MakePartition([base.,weld.GetName()])
+assemblage = MakePartition([base,weld])
+addToStudy(assemblage, "base+weld")
+#print assemblage.GetName()
+#print trav.GetName()
+#assemblage = MakePartition([assemblage.GetName(),trav.GetName()])
+assemblage = MakePartition([assemblage,trav])
+assemblageId = addToStudy(assemblage, "assemblage")
+
+#
+# Display
+#
+gg = ImportComponentGUI("GEOM")
+import salome_ComponentGUI
+if not isinstance(gg, type(salome_ComponentGUI)):
+ gg.initGeomGen()
+ gg.createAndDisplayGO(baseId)
+ gg.setTransparency(baseId,0.5)
+ gg.setDisplayMode(baseId,1)
+ gg.setColor(baseId,255,0,0)
+ gg.createAndDisplayGO(travId)
+ gg.setTransparency(travId,0.5)
+ gg.setDisplayMode(travId,1)
+ gg.setColor(travId,255,0,0)
+ gg.createAndDisplayGO(weldId)
+ gg.setTransparency(weldId,0.5)
+ gg.setDisplayMode(weldId,1)
+ gg.setColor(weldId,0,0,255)
print "RotateCopy : ", TrsfOp.GetErrorCode()
return anObj
+def MakeRotationThreePoints(aShape, centpoint, point1, point2):
+ anObj = TrsfOp.RotateThreePointsCopy(aShape, centpoint, point1, point2)
+ if TrsfOp.IsDone() == 0:
+ print "RotateThreePointsCopy : ", TrsfOp.GetErrorCode()
+ return anObj
+
def MakeScaleTransform(aShape,theCenterofScale,factor):
anObj = TrsfOp.ScaleShapeCopy(aShape,theCenterofScale,factor)
if TrsfOp.IsDone() == 0:
return anObj
## Create a face on the given wire.
-# @param theWire Wire to build the face on.
+# @param theWire closed Wire or Edge to build the face on.
# @param isPlanarWanted If TRUE, only planar face will be built.
# If impossible, NULL object will be returned.
# @return New GEOM_Object, containing the created face.
return anObj
## Create a face on the given wires set.
-# @param theWires List of wires to build the face on.
+# @param theWires List of closed wires or edges to build the face on.
# @param isPlanarWanted If TRUE, only planar face will be built.
# If impossible, NULL object will be returned.
# @return New GEOM_Object, containing the created face.
print "GetShapesOnPlaneIDs : ", ShapesOp.GetErrorCode()
return aList
+## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
+# the specified plane by the certain way, defined through \a theState parameter.
+# @param theShape Shape to find sub-shapes of.
+# @param theShapeType Type of sub-shapes to be retrieved.
+# @param theAx1 Vector (or line, or linear edge), specifying normal
+# direction of the plane to find shapes on.
+# @param thePnt Point specifying location of the plane to find shapes on.
+# @param theState The state of the subshapes to find. It can be one of
+# ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
+# @return List of all found sub-shapes.
+#
+# Example: see GEOM_TestOthers.py
+def GetShapesOnPlaneWithLocation(theShape, theShapeType, theAx1, thePnt, theState):
+ aList = ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType, theAx1, thePnt, theState)
+ if ShapesOp.IsDone() == 0:
+ print "GetShapesOnPlaneWithLocation : ", ShapesOp.GetErrorCode()
+ return aList
+
+## Works like the above method, but returns list of sub-shapes indices
+#
+# Example: see GEOM_TestOthers.py
+def GetShapesOnPlaneWithLocationIDs(theShape, theShapeType, theAx1, thePnt, theState):
+ aList = ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType, theAx1, thePnt, theState)
+ if ShapesOp.IsDone() == 0:
+ print "GetShapesOnPlaneWithLocationIDs : ", ShapesOp.GetErrorCode()
+ return aList
+
## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
# the specified cylinder by the certain way, defined through \a theState parameter.
# @param theShape Shape to find sub-shapes of.
print "GetShapesOnQuadrangleIDs : ", ShapesOp.GetErrorCode()
return aList
+## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
+# the specified \a theBox by the certain way, defined through \a theState parameter.
+# @param theBox Shape for relative comparing.
+# @param theShape Shape to find sub-shapes of.
+# @param theShapeType Type of sub-shapes to be retrieved.
+# @param theState The state of the subshapes to find. It can be one of
+# ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
+# @return List of all found sub-shapes.
+#
+def GetShapesOnBox(theBox, theShape, theShapeType, theState):
+ aList = ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
+ if ShapesOp.IsDone() == 0:
+ print "GetShapesOnBox : ", ShapesOp.GetErrorCode()
+ return aList
+
+## Works like the above method, but returns list of sub-shapes indices
+#
+def GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState):
+ aList = ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
+ if ShapesOp.IsDone() == 0:
+ print "GetShapesOnBoxIDs : ", ShapesOp.GetErrorCode()
+ return aList
+
## Get sub-shape(s) of theShapeWhere, which are
# coincident with \a theShapeWhat or could be a part of it.
# @param theShapeWhere Shape to find sub-shapes of.
print "GetInPlace : ", ShapesOp.GetErrorCode()
return anObj
+## Get sub-shape of theShapeWhere, which is
+# equal to \a theShapeWhat.
+# @param theShapeWhere Shape to find sub-shape of.
+# @param theShapeWhat Shape, specifying what to find.
+# @return New GEOM_Object for found sub-shape.
+#
+def GetSame(theShapeWhere, theShapeWhat):
+ anObj = ShapesOp.GetSame(theShapeWhere, theShapeWhat)
+ if ShapesOp.IsDone() == 0:
+ print "GetSame : ", ShapesOp.GetErrorCode()
+ return anObj
+
# -----------------------------------------------------------------------------
# Access to sub-shapes by their unique IDs inside the main shape.
# -----------------------------------------------------------------------------
## Perform partition operation.
# @param ListShapes Shapes to be intersected.
# @param ListTools Shapes to intersect theShapes.
-# @param ListKeepInside Shapes, outside which the results will be deleted.
+# !!!NOTE: Each compound from ListShapes and ListTools will be exploded
+# in order to avoid possible intersection between shapes from
+# this compound.
+# @param Limit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
+#
+# After implementation new version of PartitionAlgo (October 2006)
+# other parameters are ignored by current functionality. They are kept
+# in this function only for support old versions.
+# Ignored parameters:
+# @param ListKeepInside Shapes, outside which the results will be deleted.
# Each shape from theKeepInside must belong to theShapes also.
-# @param ListRemoveInside Shapes, inside which the results will be deleted.
+# @param ListRemoveInside Shapes, inside which the results will be deleted.
# Each shape from theRemoveInside must belong to theShapes also.
-# @param Limit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
-# @param RemoveWebs If TRUE, perform Glue 3D algorithm.
-# @param ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
+# @param RemoveWebs If TRUE, perform Glue 3D algorithm.
+# @param ListMaterials Material indices for each shape. Make sence,
+# only if theRemoveWebs is TRUE.
+#
# @return New GEOM_Object, containing the result shapes.
#
# Example: see GEOM_TestAll.py
print "MakePartition : ", BoolOp.GetErrorCode()
return anObj
+## Perform partition operation.
+# This method may be useful if it is needed to make a partition for
+# compound contains nonintersected shapes. Performance will be better
+# since intersection between shapes from compound is not performed.
+#
+# Description of all parameters as in previous method MakePartition()
+#
+# !!!NOTE: Passed compounds (via ListShapes or via ListTools)
+# have to consist of nonintersecting shapes.
+#
+# @return New GEOM_Object, containing the result shapes.
+#
+def MakePartitionNonSelfIntersectedShape(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
+ Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[]):
+ anObj = BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
+ ListKeepInside, ListRemoveInside,
+ Limit, RemoveWebs, ListMaterials);
+ if BoolOp.IsDone() == 0:
+ print "MakePartitionNonSelfIntersectedShape : ", BoolOp.GetErrorCode()
+ return anObj
+
## Shortcut to MakePartition()
#
# Example: see GEOM_TestOthers.py
print "RotateCopy : ", TrsfOp.GetErrorCode()
return anObj
+## Rotate given object around vector perpendicular to plane
+# containing three points, creating its copy before the rotatation.
+# @param theObject The object to be rotated.
+# @param theCentPoint central point - the axis is the vector perpendicular to the plane
+# containing the three points.
+# @param thePoint1 and thePoint2 - in a perpendicular plan of the axis.
+# @return New GEOM_Object, containing the rotated object.
+#
+# Example: see GEOM_TestAll.py
+def MakeRotationThreePoints(theObject, theCentPoint, thePoint1, thePoint2):
+ anObj = TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
+ if TrsfOp.IsDone() == 0:
+ print "RotateThreePointsCopy : ", TrsfOp.GetErrorCode()
+ return anObj
+
## Scale the given object by the factor, creating its copy before the scaling.
# @param theObject The object to be scaled.
# @param thePoint Center point for scaling.
//=====================================================================================
extern "C"
{
-#ifdef WNT
- __declspec( dllexport )
-#endif
+GENERATIONGUI_EXPORT
GEOMGUI* GetLibGUI(GeometryGUI* parent)
{
return new GenerationGUI(parent);
#ifndef GENERATIONGUI_H
#define GENERATIONGUI_H
+#ifdef WNT
+# if defined GENERATIONGUI_EXPORTS
+# define GENERATIONGUI_EXPORT __declspec( dllexport )
+# else
+# define GENERATIONGUI_EXPORT __declspec( dllimport )
+# endif
+#else
+# define GENERATIONGUI_EXPORT
+#endif
+
#include "GEOMGUI.h"
//=================================================================================
// class : GenerationGUI
// purpose :
//=================================================================================
-class GenerationGUI : public GEOMGUI
+class GENERATIONGUI_EXPORT GenerationGUI : public GEOMGUI
{
public:
GenerationGUI(GeometryGUI* parent);
#ifndef DIALOGBOX_FILLING_H
#define DIALOGBOX_FILLING_H
+#include "GenerationGUI.h"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel5Spin.h"
// class : GenerationGUI_FillingDlg
// purpose :
//=================================================================================
-class GenerationGUI_FillingDlg : public GEOMBase_Skeleton
+class GENERATIONGUI_EXPORT GenerationGUI_FillingDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_PIPE_H
#define DIALOGBOX_PIPE_H
+#include "GenerationGUI.h"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_2Sel_QTD.h"
// class : GenerationGUI_PipeDlg
// purpose :
//=================================================================================
-class GenerationGUI_PipeDlg : public GEOMBase_Skeleton
+class GENERATIONGUI_EXPORT GenerationGUI_PipeDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_PRISM_H
#define DIALOGBOX_PRISM_H
+#include "GenerationGUI.h"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_2Sel1Spin2Check.h"
#include "DlgRef_3Sel_QTD.h"
// class : GenerationGUI_PrismDlg
// purpose :
//=================================================================================
-class GenerationGUI_PrismDlg : public GEOMBase_Skeleton
+class GENERATIONGUI_EXPORT GenerationGUI_PrismDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_REVOLUTION_H
#define DIALOGBOX_REVOLUTION_H
+#include "GenerationGUI.h"
+
#include "GEOMBase_Skeleton.h"
#include "DlgRef_2Sel1Spin2Check.h"
// class : GenerationGUI_RevolDlg
// purpose :
//=================================================================================
-class GenerationGUI_RevolDlg : public GEOMBase_Skeleton
+class GENERATIONGUI_EXPORT GenerationGUI_RevolDlg : public GEOMBase_Skeleton
{
Q_OBJECT
GEOM::ListOfGO anObjects;
GEOMBase::ConvertListOfIOInListOfGO(selectedIO(), anObjects);
+
GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations( getStudyId() );
- for (int i = 0; i < anObjects.length(); i++) {
- TopoDS_Shape aShape;
- if ( GEOMBase::GetShape(anObjects[i], aShape, getShapeType()) ) {
- CORBA::Long anIndex = aLocOp->GetSubShapeIndex( myMainObj, anObjects[i] );
- if ( anIndex >= 0 )
- aMapIndex.Add( anIndex );
- }
- }
+ GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
+
+ for (int i = 0; i < anObjects.length(); i++)
+ {
+ GEOM::GEOM_Object_var aGeomObj = anObjects[i];
+ GEOM::ListOfGO_var aSubObjects = new GEOM::ListOfGO();
+ TopoDS_Shape aShape;
+ if ( GEOMBase::GetShape(aGeomObj, aShape, getShapeType()) )
+ {
+ aSubObjects->length(1);
+ aSubObjects[0] = aGeomObj;
+ }
+ else if (aGeomObj->GetType() == GEOM_GROUP)
+ aSubObjects = aShapesOp->MakeExplode( aGeomObj, getShapeType(), false);
+ else
+ continue;
+
+ for (int i = 0; i < aSubObjects->length(); i++)
+ {
+ TopoDS_Shape aShape;
+ if ( GEOMBase::GetShape(aSubObjects[i], aShape, getShapeType()) )
+ {
+ CORBA::Long anIndex = aLocOp->GetSubShapeIndex( myMainObj, aSubObjects[i] );
+ if ( anIndex >= 0 )
+ aMapIndex.Add( anIndex );
+ }
+ }
+ }
if ( !myMainObj->_is_nil() )
localSelection( myMainObj, getShapeType() );
if ( !aMapIndex.Extent() ) {
GEOM::ListOfGO anObjects;
GEOMBase::ConvertListOfIOInListOfGO(selectedIO(), anObjects);
+
GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations( getStudyId() );
- for (int i = 0; i < anObjects.length(); i++) {
- TopoDS_Shape aShape;
- if ( GEOMBase::GetShape(anObjects[i], aShape, getShapeType()) ) {
- CORBA::Long anIndex = aLocOp->GetSubShapeIndex( myMainObj, anObjects[i] );
- if ( anIndex >= 0 )
- aMapIndex.Add( anIndex );
+ GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
+
+ for (int i = 0; i < anObjects.length(); i++)
+ {
+ GEOM::GEOM_Object_var aGeomObj = anObjects[i];
+ GEOM::ListOfGO_var aSubObjects = new GEOM::ListOfGO();
+ TopoDS_Shape aShape;
+ if ( GEOMBase::GetShape(aGeomObj, aShape, getShapeType()) )
+ {
+ aSubObjects->length(1);
+ aSubObjects[0] = aGeomObj;
+ }
+ else if (aGeomObj->GetType() == GEOM_GROUP)
+ aSubObjects = aShapesOp->MakeExplode( aGeomObj, getShapeType(), false);
+ else
+ break;
+
+ for (int i = 0; i < aSubObjects->length(); i++)
+ {
+ TopoDS_Shape aShape;
+ if ( GEOMBase::GetShape(aSubObjects[i], aShape, getShapeType()) )
+ {
+ CORBA::Long anIndex = aLocOp->GetSubShapeIndex( myMainObj, aSubObjects[i] );
+ if ( anIndex >= 0 )
+ aMapIndex.Add( anIndex );
+ }
+ }
}
- }
}
if ( aMapIndex.Extent() >= 1 ) {
// try to find out and process the object browser selection
if ( !aMapIndex.Extent() && !CORBA::is_nil( myMainObj ) ) {
- isAdd = true;
GEOM::ListOfGO anObjects;
GEOMBase::ConvertListOfIOInListOfGO(selectedIO(), anObjects);
+
GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations( getStudyId() );
- for (int i = 0; i < anObjects.length(); i++) {
- TopoDS_Shape aShape;
- if ( GEOMBase::GetShape(anObjects[i], aShape, getShapeType()) ) {
- CORBA::Long anIndex = aLocOp->GetSubShapeIndex( myMainObj, anObjects[i] );
- if ( anIndex >= 0 )
- aMapIndex.Add( anIndex );
- else
- isAdd = false;
- }
- else
- isAdd = false;
-
- if ( !isAdd ) {
- aMapIndex.Clear();
- break;
- }
- }
+ GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
+
+ isAdd = true;
+
+ for (int i = 0; i < anObjects.length(); i++)
+ {
+ GEOM::GEOM_Object_var aGeomObj = anObjects[i];
+ GEOM::ListOfGO_var aSubObjects = new GEOM::ListOfGO();
+ TopoDS_Shape aShape;
+ if ( GEOMBase::GetShape(aGeomObj, aShape, getShapeType()) )
+ {
+ aSubObjects->length(1);
+ aSubObjects[0] = aGeomObj;
+ }
+ else if (aGeomObj->GetType() == GEOM_GROUP)
+ aSubObjects = aShapesOp->MakeExplode( aGeomObj, getShapeType(), false);
+ else
+ {
+ aMapIndex.Clear();
+ break;
+ }
+
+ for (int i = 0; i < aSubObjects->length(); i++)
+ {
+ TopoDS_Shape aShape;
+ aSubObjects[i];
+ if ( GEOMBase::GetShape(aSubObjects[i], aShape, getShapeType()) )
+ {
+ CORBA::Long anIndex = aLocOp->GetSubShapeIndex( myMainObj, aSubObjects[i] );
+ if ( anIndex >= 0 )
+ aMapIndex.Add( anIndex );
+ else
+ isAdd = false;
+ }
+ else
+ isAdd = false;
+
+ if ( !isAdd ) {
+ aMapIndex.Clear();
+ break;
+ }
+ }
+
+ if ( !isAdd ) {
+ aMapIndex.Clear();
+ break;
+ }
+ }
}
-
+
isAdd = aMapIndex.Extent() > 0;
myAddBtn->setEnabled( !myEditCurrentArgument && !CORBA::is_nil( myMainObj ) && isAdd );
return;
Standard_Boolean isOk;
+ char* objIOR = GEOMBase::GetIORFromObject( myMainObj );
Handle(GEOM_AISShape) aSh =
- GEOMBase::ConvertIORinGEOMAISShape( GEOMBase::GetIORFromObject( myMainObj ), isOk, true );
+ GEOMBase::ConvertIORinGEOMAISShape( objIOR, isOk, true );
+ free( objIOR );
if ( !isOk || aSh.IsNull() )
return;
SalomeApp_Study* study = getStudy();
if ( study ) {
- string IOR = GEOMBase::GetIORFromObject( aGroup );
+ char* objIOR = GEOMBase::GetIORFromObject( aGroup );
+ string IOR( objIOR );
+ free( objIOR );
if ( IOR != "" ) {
_PTR(SObject) SO ( study->studyDS()->FindObjectIOR( IOR ) );
if ( SO ) {
}
return aFatherObj._retn();
}
+
#include <TopoDS_Shape.hxx>
#ifdef WNT
-#include <SALOME_WNT.hxx>
+ #if defined IGESEXPORT_EXPORTS
+ #if defined WIN32
+ #define IGESEXPORT_EXPORT __declspec( dllexport )
+ #else
+ #define IGESEXPORT_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define IGESEXPORT_EXPORT __declspec( dllimport )
+ #else
+ #define IGESEXPORT_EXPORT
+ #endif
+ #endif
#else
-#define SALOME_WNT_EXPORT
+ #define IGESEXPORT_EXPORT
#endif
//=============================================================================
extern "C"
{
-SALOME_WNT_EXPORT
- int Export(const TopoDS_Shape& theShape,
- const TCollection_AsciiString& theFileName,
- const TCollection_AsciiString& theFormatName)
+IGESEXPORT_EXPORT
+ int Export( const TopoDS_Shape& theShape,
+ const TCollection_AsciiString& theFileName,
+ const TCollection_AsciiString& theFormatName )
{
MESSAGE("Export IGES into file " << theFileName.ToCString());
try
#include <TopoDS_Shape.hxx>
#ifdef WNT
-#include <SALOME_WNT.hxx>
+ #if defined IGESIMPORT_EXPORTS
+ #if defined WIN32
+ #define IGESIMPORT_EXPORT __declspec( dllexport )
+ #else
+ #define IGESIMPORT_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define IGESIMPORT_EXPORT __declspec( dllimport )
+ #else
+ #define IGESIMPORT_EXPORT
+ #endif
+ #endif
#else
-#define SALOME_WNT_EXPORT
+ #define IGESIMPORT_EXPORT
#endif
//=============================================================================
extern "C"
{
-SALOME_WNT_EXPORT
+IGESIMPORT_EXPORT
TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& /*theFormatName*/,
TCollection_AsciiString& theError)
//=====================================================================================
extern "C"
{
-#ifdef WNT
- __declspec( dllexport )
-#endif
+GEOM_MEASUREGUI_EXPORT
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
return new MeasureGUI( parent );
#ifndef MEASUREGUI_H
#define MEASUREGUI_H
+#include "GEOM_MeasureGUI.hxx"
+
#include "GEOMGUI.h"
//=================================================================================
// class : MeasureGUI
// purpose :
//=================================================================================
-class MeasureGUI : public GEOMGUI
+class GEOM_MEASUREGUI_EXPORT MeasureGUI : public GEOMGUI
{
public:
MeasureGUI( GeometryGUI* parent );
#ifndef MEASUREGUI_1SEL12LINEEDIT_QTD_H
#define MEASUREGUI_1SEL12LINEEDIT_QTD_H
+#include "GEOM_MeasureGUI.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QLineEdit;
class QPushButton;
-class MeasureGUI_1Sel12LineEdit_QTD : public QWidget
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_1Sel12LineEdit_QTD : public QWidget
{
Q_OBJECT
#ifndef MEASUREGUI_1SEL1TEXTVIEW_QTD_H
#define MEASUREGUI_1SEL1TEXTVIEW_QTD_H
+#include "GEOM_MeasureGUI.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QPushButton;
class QTextEdit;
-class MeasureGUI_1Sel1TextView_QTD : public QWidget
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_1Sel1TextView_QTD : public QWidget
{
Q_OBJECT
#ifndef MEASUREGUI_1SEL3LINEEDIT_QTD_H
#define MEASUREGUI_1SEL3LINEEDIT_QTD_H
+#include "GEOM_MeasureGUI.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QLineEdit;
class QPushButton;
-class MeasureGUI_1Sel3LineEdit_QTD : public QWidget
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_1Sel3LineEdit_QTD : public QWidget
{
Q_OBJECT
#ifndef MEASUREGUI_1SEL6LINEEDIT_QTD_H
#define MEASUREGUI_1SEL6LINEEDIT_QTD_H
+#include "GEOM_MeasureGUI.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QLineEdit;
class QPushButton;
-class MeasureGUI_1Sel6LineEdit_QTD : public QWidget
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_1Sel6LineEdit_QTD : public QWidget
{
Q_OBJECT
#ifndef MEASUREGUI_2SEL1LINEEDIT_QTD_H
#define MEASUREGUI_2SEL1LINEEDIT_QTD_H
+#include "GEOM_MeasureGUI.hxx"
+
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QLineEdit;
class QPushButton;
-class MeasureGUI_2Sel1LineEdit_QTD : public QWidget
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_2Sel1LineEdit_QTD : public QWidget
{
Q_OBJECT
#ifndef DIALOGBOX_BNDBOX_H
#define DIALOGBOX_BNDBOX_H
+#include "GEOM_MeasureGUI.hxx"
+
#include "MeasureGUI_Skeleton.h"
class MeasureGUI_1Sel6LineEdit_QTD;
-#if defined WNT && defined MEASUREGUI_EXPORTS
-#define MEASUREGUI_EXPORT __declspec( dllexport )
-#else
-#define MEASUREGUI_EXPORT
-#endif
-
//=================================================================================
// class : DialogBox_PROPERTIES
// purpose :
//=================================================================================
-class MEASUREGUI_EXPORT MeasureGUI_BndBoxDlg : public MeasureGUI_Skeleton
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_BndBoxDlg : public MeasureGUI_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_CMASS_H
#define DIALOGBOX_CMASS_H
+#include "GEOM_MeasureGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
class MeasureGUI_1Sel3LineEdit_QTD;
-#if defined WNT && defined MEASUREGUI_EXPORTS
-#define MEASUREGUI_EXPORT __declspec( dllexport )
-#else
-#define MEASUREGUI_EXPORT
-#endif
-
//=================================================================================
// class : MeasureGUI_CenterMassDlg
// purpose :
//=================================================================================
-class MEASUREGUI_EXPORT MeasureGUI_CenterMassDlg : public GEOMBase_Skeleton
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_CenterMassDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_CHECKCOMPOUNDOFBLOCKSDLG_H
#define DIALOGBOX_CHECKCOMPOUNDOFBLOCKSDLG_H
+#include "GEOM_MeasureGUI.hxx"
+
#include "GEOMBase_Skeleton.h"
class MeasureGUI_1Sel1TextView_QTD;
class QListBox;
class QLabel;
-#if defined WNT && defined MEASUREGUI_EXPORTS
-#define MEASUREGUI_EXPORT __declspec( dllexport )
-#else
-#define MEASUREGUI_EXPORT
-#endif
-
//=================================================================================
// class : MeasureGUI_CheckCompoundOfBlocksDlg
// purpose :
//=================================================================================
-class MEASUREGUI_EXPORT MeasureGUI_CheckCompoundOfBlocksDlg : public GEOMBase_Skeleton
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_CheckCompoundOfBlocksDlg : public GEOMBase_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_CHECKSHAPEDLG_H
#define DIALOGBOX_CHECKSHAPEDLG_H
+#include "GEOM_MeasureGUI.hxx"
+
#include "MeasureGUI_Skeleton.h"
#include "MeasureGUI_1Sel1TextView_QTD.h"
class QCheckBox;
-#if defined WNT && defined MEASUREGUI_EXPORTS
-#define MEASUREGUI_EXPORT __declspec( dllexport )
-#else
-#define MEASUREGUI_EXPORT
-#endif
-
//=================================================================================
// class : MeasureGUI_1Sel1TextView1Check_QTD
// purpose :
// class : MeasureGUI_CheckShapeDlg
// purpose :
//=================================================================================
-class MEASUREGUI_EXPORT MeasureGUI_CheckShapeDlg : public MeasureGUI_Skeleton
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_CheckShapeDlg : public MeasureGUI_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_DISTANCE_H
#define DIALOGBOX_DISTANCE_H
+#include "GEOM_MeasureGUI.hxx"
+
#include "MeasureGUI_Skeleton.h"
class MeasureGUI_2Sel1LineEdit_QTD;
class gp_Pnt;
-#if defined WNT && defined MEASUREGUI_EXPORTS
-#define MEASUREGUI_EXPORT __declspec( dllexport )
-#else
-#define MEASUREGUI_EXPORT
-#endif
-
//=================================================================================
// class : MeasureGUI_DistanceDlg
// purpose :
//=================================================================================
-class MEASUREGUI_EXPORT MeasureGUI_DistanceDlg : public MeasureGUI_Skeleton
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_DistanceDlg : public MeasureGUI_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_INERTIA_H
#define DIALOGBOX_INERTIA_H
+#include "GEOM_MeasureGUI.hxx"
+
#include "MeasureGUI_Skeleton.h"
class MeasureGUI_1Sel12LineEdit_QTD;
class gp_XYZ;
class gp_Mat;
-#if defined WNT && defined MEASUREGUI_EXPORTS
-#define MEASUREGUI_EXPORT __declspec( dllexport )
-#else
-#define MEASUREGUI_EXPORT
-#endif
-
//=================================================================================
// class : MeasureGUI_InertiaDlg
// purpose : Dialog for displaying moment of inertia
//=================================================================================
-class MEASUREGUI_EXPORT MeasureGUI_InertiaDlg : public MeasureGUI_Skeleton
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_InertiaDlg : public MeasureGUI_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_MAXTOLERANCE_H
#define DIALOGBOX_MAXTOLERANCE_H
+#include "GEOM_MeasureGUI.hxx"
+
#include "MeasureGUI_Skeleton.h"
class MeasureGUI_1Sel6LineEdit_QTD;
-#if defined WNT && defined MEASUREGUI_EXPORTS
-#define MEASUREGUI_EXPORT __declspec( dllexport )
-#else
-#define MEASUREGUI_EXPORT
-#endif
-
//=================================================================================
// class : DialogBox_PROPERTIES
// purpose :
//=================================================================================
-class MEASUREGUI_EXPORT MeasureGUI_MaxToleranceDlg : public MeasureGUI_Skeleton
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_MaxToleranceDlg : public MeasureGUI_Skeleton
{
Q_OBJECT
#ifndef MEASUREGUI_POINTDLG_H
#define MEASUREGUI_POINTDLG_H
+#include "GEOM_MeasureGUI.hxx"
+
#include "MeasureGUI_Skeleton.h"
class QLineEdit;
-#if defined WNT && defined MEASUREGUI_EXPORTS
-#define MEASUREGUI_EXPORT __declspec( dllexport )
-#else
-#define MEASUREGUI_EXPORT
-#endif
-
//=================================================================================
// class : MeasureGUI_PointDlg
// purpose : Dialog for displaying point coordinates
//=================================================================================
-class MEASUREGUI_EXPORT MeasureGUI_PointDlg : public MeasureGUI_Skeleton
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_PointDlg : public MeasureGUI_Skeleton
{
Q_OBJECT
#ifndef DIALOGBOX_PROPERTIES_H
#define DIALOGBOX_PROPERTIES_H
+#include "GEOM_MeasureGUI.hxx"
+
#include "MeasureGUI_Skeleton.h"
class MeasureGUI_1Sel3LineEdit_QTD;
-#if defined WNT && defined MEASUREGUI_EXPORTS
-#define MEASUREGUI_EXPORT __declspec( dllexport )
-#else
-#define MEASUREGUI_EXPORT
-#endif
-
//=================================================================================
// class : MeasureGUI_PropertiesDlg
// purpose : Dialog for displaying length, area and volume
//=================================================================================
-class MEASUREGUI_EXPORT MeasureGUI_PropertiesDlg : public MeasureGUI_Skeleton
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_PropertiesDlg : public MeasureGUI_Skeleton
{
Q_OBJECT
if (app)
app->onHelpContextModule(myGeomGUI ? app->moduleName(myGeomGUI->moduleName()) : QString(""), myHelpFileName);
else {
+ QString platform;
+#ifdef WIN32
+ platform = "winapplication";
+#else
+ platform = "application";
+#endif
SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName),
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName),
QObject::tr("BUT_OK"));
}
}
#ifndef MEASUREGUI_SKELETON_H
#define MEASUREGUI_SKELETON_H
+#include "GEOM_MeasureGUI.hxx"
+
#include "MeasureGUI_Skeleton_QTD.h"
#include "GEOMBase_Helper.h"
class QPushButton;
class GEOM_Displayer;
-class MeasureGUI_Skeleton : public MeasureGUI_Skeleton_QTD,
- public GEOMBase_Helper
+class GEOM_MEASUREGUI_EXPORT
+ MeasureGUI_Skeleton : public MeasureGUI_Skeleton_QTD,
+ public GEOMBase_Helper
{
Q_OBJECT
#ifndef MEASUREGUI_SKELETON_QTD_H
#define MEASUREGUI_SKELETON_QTD_H
+#include "GEOM_MeasureGUI.hxx"
+
#include <qvariant.h>
#include <qdialog.h>
class QButtonGroup;
class QRadioButton;
-class MeasureGUI_Skeleton_QTD : public QDialog
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_Skeleton_QTD : public QDialog
{
Q_OBJECT
#ifndef DIALOGBOX_WHATIS_H
#define DIALOGBOX_WHATIS_H
+#include "GEOM_MeasureGUI.hxx"
+
#include "MeasureGUI_Skeleton.h"
class MeasureGUI_1Sel1TextView_QTD;
-#if defined WNT && defined MEASUREGUI_EXPORTS
-#define MEASUREGUI_EXPORT __declspec( dllexport )
-#else
-#define MEASUREGUI_EXPORT
-#endif
-
//=================================================================================
// class : DialogBox_PROPERTIES
// purpose :
//=================================================================================
-class MEASUREGUI_EXPORT MeasureGUI_WhatisDlg : public MeasureGUI_Skeleton
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_WhatisDlg : public MeasureGUI_Skeleton
{
Q_OBJECT
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) : public Handle(TCollection_MapNode) {
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)():Handle(TCollection_MapNode)() {}
Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle)
{
return *this;
}
- NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->()
- {
- return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger *)ControlAccess();
- }
-
- NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->() const
+ NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->() const
{
return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger *)ControlAccess();
}
- Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)();
+// Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)();
Standard_EXPORT static const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) DownCast(const Handle(Standard_Transient)& AnObject);
};
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) : public Handle(TCollection_MapNode) {
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)():Handle(TCollection_MapNode)() {}
Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& aHandle) : Handle(TCollection_MapNode)(aHandle)
{
return *this;
}
- NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->()
- {
- return (NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors *)ControlAccess();
- }
-
- NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->() const
+ NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->() const
{
return (NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors *)ControlAccess();
}
- Standard_EXPORT ~Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)();
+// Standard_EXPORT ~Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)();
Standard_EXPORT static const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) DownCast(const Handle(Standard_Transient)& AnObject);
};
LIB_SRC = \
NMTDS_CArray1OfIndexRange_0.cxx \
NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx \
+ NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx \
+ NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx \
NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx \
+ NMTDS_IndexedDataMapOfIntegerShape_0.cxx \
+ NMTDS_IndexedDataMapOfShapeBox_0.cxx \
NMTDS_IndexRange.cxx \
- NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx \
+ NMTDS_Iterator.cxx \
+ NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx \
+ NMTDS_ListIteratorOfListOfPassKey_0.cxx \
+ NMTDS_ListIteratorOfListOfPassKeyBoolean_0.cxx \
NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx \
+ NMTDS_ListNodeOfListOfPassKey_0.cxx \
+ NMTDS_ListNodeOfListOfPassKeyBoolean_0.cxx \
NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx \
- NMTDS_ShapesDataStructure.cxx
+ NMTDS_ListOfPassKey_0.cxx \
+ NMTDS_ListOfPassKeyBoolean_0.cxx \
+ NMTDS_MapIteratorOfMapOfPassKey_0.cxx \
+ NMTDS_MapIteratorOfMapOfPassKeyBoolean_0.cxx \
+ NMTDS_MapOfPassKey_0.cxx \
+ NMTDS_MapOfPassKeyBoolean_0.cxx \
+ NMTDS_PassKeyBoolean.cxx \
+ NMTDS_PassKey.cxx \
+ NMTDS_PassKeyMapHasher.cxx \
+ NMTDS_ShapesDataStructure.cxx \
+ NMTDS_StdMapNodeOfMapOfPassKey_0.cxx \
+ NMTDS_StdMapNodeOfMapOfPassKeyBoolean_0.cxx \
+ NMTDS_BoxBndTree.cxx
LIB_CLIENT_IDL =
LIB_SERVER_IDL =
# header files
EXPORT_HEADERS = \
- NMTDS_ShapesDataStructure.hxx \
- NMTDS_PShapesDataStructure.hxx \
+ Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx \
+ Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \
+ Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx \
+ Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \
+ Handle_NMTDS_ListNodeOfListOfPassKeyBoolean.hxx \
+ Handle_NMTDS_ListNodeOfListOfPassKey.hxx \
+ Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx \
+ Handle_NMTDS_StdMapNodeOfMapOfPassKey.hxx \
NMTDS_CArray1OfIndexRange.hxx \
+ NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx \
+ NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \
+ NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx \
NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx \
- Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx
+ NMTDS_IndexedDataMapOfIntegerShape.hxx \
+ NMTDS_IndexedDataMapOfShapeBox.hxx \
+ NMTDS_IndexRange.hxx \
+ NMTDS_Iterator.hxx \
+ NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \
+ NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx \
+ NMTDS_ListIteratorOfListOfPassKey.hxx \
+ NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \
+ NMTDS_ListNodeOfListOfPassKeyBoolean.hxx \
+ NMTDS_ListNodeOfListOfPassKey.hxx \
+ NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \
+ NMTDS_ListOfPassKeyBoolean.hxx \
+ NMTDS_ListOfPassKey.hxx \
+ NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx \
+ NMTDS_MapIteratorOfMapOfPassKey.hxx \
+ NMTDS_MapOfPassKeyBoolean.hxx \
+ NMTDS_MapOfPassKey.hxx \
+ NMTDS_PassKeyBoolean.hxx \
+ NMTDS_PassKey.hxx \
+ NMTDS_PassKeyMapHasher.hxx \
+ NMTDS_PShapesDataStructure.hxx \
+ NMTDS_ShapesDataStructure.hxx \
+ NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx \
+ NMTDS_StdMapNodeOfMapOfPassKey.hxx \
+ NMTDS_BoxBndTree.hxx
# idl files
EXPORT_IDLS=
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+--
-- File: NMTDS.cdl
-- Created: Fri Nov 28 10:13:19 2003
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright: Matra Datavision 2003
package NMTDS
BOPTColStd
is
class ShapesDataStructure;
- class IndexRange;
-
+ class IndexRange;
+
+ -- Modified to Add new classes Thu Sep 14 14:35:18 2006
+ -- Contribution of Samtech www.samcef.com BEGIN
+ class Iterator;
+ class PassKey;
+ class PassKeyBoolean;
+ class PassKeyMapHasher;
+ -- Contribution of Samtech www.samcef.com END
+
pointer PShapesDataStructure to ShapesDataStructure from NMTDS;
class CArray1OfIndexRange instantiates
IndexedDataMap from TCollection(Integer from Standard,
IndexedDataMapOfShapeInteger from BooleanOperations,
MapIntegerHasher from TColStd);
-
+
+ -- Modified to Add new classes Thu Sep 14 14:35:18 2006
+ -- Contribution of Samtech www.samcef.com BEGIN
+ class ListOfPassKey instantiates
+ List from TCollection(PassKey from NMTDS);
+
+ class MapOfPassKey instantiates
+ Map from TCollection(PassKey from NMTDS,
+ PassKeyMapHasher from NMTDS);
+
+ class ListOfPassKeyBoolean instantiates
+ List from TCollection(PassKeyBoolean from NMTDS);
+
+ class MapOfPassKeyBoolean instantiates
+ Map from TCollection(PassKeyBoolean from NMTDS,
+ PassKeyMapHasher from NMTDS);
+ -- Contribution of Samtech www.samcef.com END
+
+
+ class IndexedDataMapOfShapeBox
+ instantiates IndexedDataMap from TCollection (Shape from TopoDS,
+ Box from Bnd,
+ ShapeMapHasher from TopTools);
+ class IndexedDataMapOfIntegerShape
+ instantiates IndexedDataMap from TCollection (Integer from Standard,
+ Shape from TopoDS,
+ MapIntegerHasher from TColStd);
+
+
end NMTDS;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTDS_CArray1OfIndexRange {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTDS_CArray1OfIndexRange(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
+
+
Standard_EXPORT void Resize(const Standard_Integer theNewLength) ;
+
+
Standard_EXPORT void Destroy() ;
~NMTDS_CArray1OfIndexRange()
{
Destroy();
}
+
+
Standard_EXPORT Standard_Integer Length() const;
+
+
Standard_EXPORT Standard_Integer Extent() const;
+
+
Standard_EXPORT Standard_Integer FactLength() const;
+
+
Standard_EXPORT Standard_Integer Append(const NMTDS_IndexRange& Value) ;
+
+
Standard_EXPORT void Remove(const Standard_Integer Index) ;
+
+
Standard_EXPORT const NMTDS_IndexRange& Value(const Standard_Integer Index) const;
const NMTDS_IndexRange& operator ()(const Standard_Integer Index) const
{
return Value(Index);
}
+
+
Standard_EXPORT NMTDS_IndexRange& ChangeValue(const Standard_Integer Index) ;
NMTDS_IndexRange& operator ()(const Standard_Integer Index)
{
return ChangeValue(Index);
}
+
+
Standard_EXPORT void SetBlockLength(const Standard_Integer aBL) ;
+
+
Standard_EXPORT Standard_Integer BlockLength() const;
// Methods PRIVATE
//
+
+
Standard_EXPORT NMTDS_CArray1OfIndexRange(const NMTDS_CArray1OfIndexRange& AnArray);
+
+
Standard_EXPORT NMTDS_CArray1OfIndexRange& Assign(const NMTDS_CArray1OfIndexRange& Other) ;
NMTDS_CArray1OfIndexRange& operator =(const NMTDS_CArray1OfIndexRange& Other)
{
return Assign(Other);
}
+
+
Standard_EXPORT Standard_Boolean IsInvalidIndex(const Standard_Integer Index) const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+--
-- File: NMTDS_IndexRange.cdl
-- Created: Fri Nov 28 10:31:05 2003
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright: Matra Datavision 2003
-
class IndexRange from NMTDS
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTDS_IndexRange {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTDS_IndexRange();
+
+
Standard_EXPORT void SetFirst(const Standard_Integer aFirst) ;
+
+
Standard_EXPORT void SetLast(const Standard_Integer aLast) ;
+
+
Standard_EXPORT Standard_Integer First() const;
+
+
Standard_EXPORT Standard_Integer Last() const;
+
+
Standard_EXPORT Standard_Boolean IsInRange(const Standard_Integer aIndex) const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _NMTDS_IndexRange_HeaderFile
#include <NMTDS_IndexRange.hxx>
#endif
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger;
+
class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger : public TCollection_MapNode {
public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
// Methods PUBLIC
//
+
NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(const Standard_Integer& K1,const Standard_Integer K2,const BooleanOperations_IndexedDataMapOfShapeInteger& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
+
Standard_Integer& Key1() const;
+
Standard_Integer& Key2() const;
+
TCollection_MapNodePtr& Next2() const;
+
BooleanOperations_IndexedDataMapOfShapeInteger& Value() const;
-Standard_EXPORT ~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger();
+//Standard_EXPORT ~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger();
// Type management
//
- Standard_EXPORT friend Handle_Standard_Type& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile
#include <NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx>
#endif
-NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger() {}
+//NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger() {}
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
{
return STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) ;
}
-Standard_Boolean NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::~Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger() {}
+//Standard_Boolean NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) == AType || TCollection_MapNode::IsKind(AType));
+//}
+//Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::~Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger() {}
#define TheKey Standard_Integer
#define TheKey_hxx <Standard_Integer.hxx>
#define TheItem BooleanOperations_IndexedDataMapOfShapeInteger
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger : public TCollection_BasicMap {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(const Standard_Integer NbBuckets = 1);
+
+
Standard_EXPORT NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Assign(const NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Other) ;
NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& operator =(const NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Other)
{
return Assign(Other);
}
+
+
Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
+
+
Standard_EXPORT void Clear() ;
~NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger()
{
Clear();
}
+
+
Standard_EXPORT Standard_Integer Add(const Standard_Integer& K,const BooleanOperations_IndexedDataMapOfShapeInteger& I) ;
+
+
Standard_EXPORT void Substitute(const Standard_Integer I,const Standard_Integer& K,const BooleanOperations_IndexedDataMapOfShapeInteger& 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 BooleanOperations_IndexedDataMapOfShapeInteger& FindFromIndex(const Standard_Integer I) const;
const BooleanOperations_IndexedDataMapOfShapeInteger& operator ()(const Standard_Integer I) const
{
return FindFromIndex(I);
}
+
+
Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeInteger& ChangeFromIndex(const Standard_Integer I) ;
BooleanOperations_IndexedDataMapOfShapeInteger& operator ()(const Standard_Integer I)
{
return ChangeFromIndex(I);
}
+
+
Standard_EXPORT Standard_Integer FindIndex(const Standard_Integer& K) const;
+
+
Standard_EXPORT const BooleanOperations_IndexedDataMapOfShapeInteger& FindFromKey(const Standard_Integer& K) const;
+
+
Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeInteger& ChangeFromKey(const Standard_Integer& K) ;
// Methods PRIVATE
//
+
+
Standard_EXPORT NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(const NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Other);
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors();
+
+
Standard_EXPORT NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& L);
+
+
Standard_EXPORT void Initialize(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& L) ;
+
Standard_Boolean More() const;
+
+
Standard_EXPORT void Next() ;
+
+
Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& Value() const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors;
+
class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors : public TCollection_MapNode {
public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
// Methods PUBLIC
//
+
NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,const TCollection_MapNodePtr& n);
+
BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& Value() const;
-Standard_EXPORT ~NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors();
+//Standard_EXPORT ~NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors();
// Type management
//
- Standard_EXPORT friend Handle_Standard_Type& NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
#include <NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
#endif
-NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::~NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors() {}
+//NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::~NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors() {}
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
{
return STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) ;
}
-Standard_Boolean NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::~Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors() {}
+//Standard_Boolean NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) == AType || TCollection_MapNode::IsKind(AType));
+//}
+//Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::~Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors() {}
#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors
#define Item_hxx <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors();
+
+
Standard_EXPORT void Assign(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other) ;
void operator=(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other)
{
Assign(Other);
}
+
+
Standard_EXPORT Standard_Integer Extent() const;
+
+
Standard_EXPORT void Clear() ;
~NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors()
{
Clear();
}
+
Standard_Boolean IsEmpty() const;
+
+
Standard_EXPORT void Prepend(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I) ;
+
+
Standard_EXPORT void Prepend(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& theIt) ;
+
+
Standard_EXPORT void Prepend(NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other) ;
+
+
Standard_EXPORT void Append(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I) ;
+
+
Standard_EXPORT void Append(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& theIt) ;
+
+
Standard_EXPORT void Append(NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other) ;
+
+
Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& First() const;
+
+
Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& Last() const;
+
+
Standard_EXPORT void RemoveFirst() ;
+
+
Standard_EXPORT void Remove(NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ;
+
+
Standard_EXPORT void InsertBefore(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ;
+
+
Standard_EXPORT void InsertBefore(NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ;
+
+
Standard_EXPORT void InsertAfter(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ;
+
+
Standard_EXPORT void InsertAfter(NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ;
// Methods PRIVATE
//
+
+
Standard_EXPORT NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other);
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+--
-- File: NMTDS_ShapesDataStructure.cdl
-- Created: Mon Dec 1 10:17:05 2003
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright: Matra Datavision 2003
-
class ShapesDataStructure from NMTDS
inherits ShapesDataStructure from BooleanOperations
---Purpose:
uses
- Shape from TopoDS,
+ Shape from TopoDS,
+ IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations,
CArray1OfIndexRange from NMTDS,
IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger from NMTDS
--raises
is
Create
returns ShapesDataStructure from NMTDS;
- ---C++: alias "Standard_EXPORT virtual ~NMTDS_ShapesDataStructure();"
---modified by NIZNHY-PKV Wed Feb 2 11:44:38 2005ft
-
+
SetCompositeShape(me:out;
aS:Shape from TopoDS);
aS:Shape from TopoDS;
iRank:Integer from Standard)
returns Integer from Standard
- is redefined;
+ is redefined;
+
+-- Modified to Add new methods Thu Sep 14 14:35:18 2006
+-- Contribution of Samtech www.samcef.com BEGIN
+ FillMap (me;
+ aS :Shape from TopoDS;
+ aMSA: out IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations;
+ aMS : out IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations);
+
+ FillSubshapes (me;
+ aS :Shape from TopoDS;
+ aMSA:out IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations;
+ aMS :out IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations);
+-- Contribution of Samtech www.samcef.com END
+
fields
myCompositeShape: Shape from TopoDS is protected;
myRanges : CArray1OfIndexRange from NMTDS is protected;
#include <NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
#include <BooleanOperations_ShapeAndInterferences.hxx>
#include <NMTDS_IndexRange.hxx>
+//
+#include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
+#include <BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx>
+#include <TColStd_MapOfInteger.hxx>
//===========================================================================
//function : NMTDS_ShapesDataStructure::NMTDS_ShapesDataStructure
NMTDS_ShapesDataStructure::NMTDS_ShapesDataStructure()
:
BooleanOperations_ShapesDataStructure()
-{
- //printf(" NMTDS_ShapesDataStructure CREATE:%x\n", (int)this);
-}
-//modified by NIZNHY-PKV Wed Feb 2 11:45:04 2005f
-//===========================================================================
-//function : ~
-//purpose :
-//===========================================================================
- NMTDS_ShapesDataStructure::~NMTDS_ShapesDataStructure()
-{
- //printf(" NMTDS_ShapesDataStructure DELETE:%x\n", (int)this);
-}
-//modified by NIZNHY-PKV Wed Feb 2 11:45:06 2005t
+{}
//===========================================================================
//function : SetCompositeShape
//purpose :
{
return myRanges;
}
+// Modified to Add new methods Thu Sep 14 14:35:18 2006
+// Contribution of Samtech www.samcef.com BEGIN
+//===========================================================================
+//function : FillMap
+//purpose :
+//===========================================================================
+ void NMTDS_ShapesDataStructure::FillMap
+ (const TopoDS_Shape& aS,
+ BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,
+ BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const
+{
+ Standard_Integer iX, i, j, aIndex, aNbSc, aNbS;
+ BooleanOperations_AncestorsSeqAndSuccessorsSeq aAS;
+ //
+ aMSA.Add(aS, aAS);
+ aMS.Add(aS, aAS);
+ FillSubshapes(aS, aMSA, aMS);
+ //
+ aNbS=aMS.Extent();
+ for(i=1; i<=aNbS; ++i) {
+ TColStd_MapOfInteger aMFence;
+ //
+ const TopoDS_Shape& aSX=aMS.FindKey(i);
+ iX=aMSA.FindIndex(aSX);
+ const BooleanOperations_AncestorsSeqAndSuccessorsSeq& aAS1=aMSA(iX);
+ //
+ aNbSc=aAS1.NumberOfSuccessors();
+ for(j=1; j<=aNbSc; ++j) {
+ aIndex=aAS1.GetSuccessor(j);
+ if(aMFence.Add(aIndex)) {
+ BooleanOperations_AncestorsSeqAndSuccessorsSeq& aAS2=aMSA.ChangeFromIndex(aIndex);
+ aAS2.SetNewAncestor(iX);
+ }
+ }
+ }
+}
+//===========================================================================
+//function : FillSubshapes
+//purpose :
+//===========================================================================
+ void NMTDS_ShapesDataStructure::FillSubshapes
+ (const TopoDS_Shape& aS,
+ BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,
+ BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const
+{
+ Standard_Boolean bIsNewSubShape;
+ Standard_Integer aIndexSubShape, aIndex;
+ BooleanOperations_AncestorsSeqAndSuccessorsSeq aASx;
+ //
+ aIndex=aMSA.FindIndex(aS);
+ BooleanOperations_AncestorsSeqAndSuccessorsSeq& aAS=aMSA.ChangeFromIndex(aIndex);
+ //
+ TopoDS_Iterator anIt(aS, Standard_True);
+ for(; anIt.More(); anIt.Next()) {
+ const TopoDS_Shape& aSubShape = anIt.Value();
+ bIsNewSubShape = Standard_False;
+ if(!aMSA.Contains(aSubShape)) {
+ bIsNewSubShape=!bIsNewSubShape;
+ aIndexSubShape=aMSA.Add(aSubShape, aASx);
+ aMS.Add(aSubShape, aASx);
+ }
+ else {
+ aIndexSubShape=aMSA.FindIndex(aSubShape);
+ }
+ aAS.SetNewSuccessor(aIndexSubShape);
+ aAS.SetNewOrientation(aSubShape.Orientation());
+ //
+ if(bIsNewSubShape && (aSubShape.ShapeType() != TopAbs_VERTEX)) {
+ FillSubshapes(aSubShape, aMSA, aMS);
+ }
+ }
+}
+// Contribution of Samtech www.samcef.com END
//===========================================================================
//function : Init
//purpose :
NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors aLx;
NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors aLit;
TopoDS_Iterator anIt;
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors aMSA;
+ // Contribution of Samtech www.samcef.com END
//
- aNbS=0;
anIt.Initialize(myCompositeShape);
for (i=0; anIt.More(); anIt.Next(), ++i) {
- const TopoDS_Shape& aSx=anIt.Value();
- BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors aIndDatMapShape;
- FillIndexedMapOfShapesAncestorsAndSuccessors(aSx, aIndDatMapShape);
- aNbSx=aIndDatMapShape.Extent();
- aNbS+=aNbSx;
- aLx.Append(aIndDatMapShape);
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ const TopoDS_Shape& aSx=anIt.Value();
+ BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors aMS;
+ FillMap(aSx, aMSA, aMS);
+ aLx.Append(aMS);
+ // Contribution of Samtech www.samcef.com END
}
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ aNbS=aMSA.Extent();
+ // Contribution of Samtech www.samcef.com END
//
// Fill myRanges
myRanges.Resize(i);
aLit.Initialize(aLx);
for (i=1; aLit.More(); aLit.Next(), ++i) {
- const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aM=aLit.Value();
- aNbSx=aM.Extent();
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSx=aLit.Value();
+ aNbSx=aMSx.Extent();
+ // Contribution of Samtech www.samcef.com END
if (i==1) {
iFirst=1;
iLast=aNbSx;
}
//
myNumberOfShapesOfTheObject=aNbS;
- myNumberOfShapesOfTheTool=aNbS;
- myLength=3*aNbS;
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ //myNumberOfShapesOfTheTool=aNbS;
+ //myLength=3*aNbS;
+ myNumberOfShapesOfTheTool=0;
+ myLength=2*aNbS;
+ // Contribution of Samtech www.samcef.com END
//
// Allocate the whole Table
myListOfShapeAndInterferences = (BooleanOperations_PShapeAndInterferences)
Standard::Allocate(myLength*sizeof(BooleanOperations_ShapeAndInterferences));
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
//
// Fill the table
- for (i=0; i<2; ++i) {
- aShift=0;
- if (i) {
- aShift=myNumberOfShapesOfTheObject;
- }
- aLit.Initialize(aLx);
- for (; aLit.More(); aLit.Next()) {
- const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aM=aLit.Value();
- aNbSx=aM.Extent();
- for (j=1; j<=aNbSx; ++j) {
- const TopoDS_Shape& aSx=aM.FindKey(j);
- const BooleanOperations_AncestorsSeqAndSuccessorsSeq& aASx=aM.FindFromIndex(j);
- InsertShapeAndAncestorsSuccessors(aSx, aASx, aShift);
- }
- aShift+=aNbSx;
- }
+ //modified by NIZNHY-PKV Tue May 16 11:47:28 2006f
+
+ //aShift=0;
+ //for (i=0; i<2; ++i) {
+ // if (i) {
+ // aShift=aNbS;
+ // }
+ // for (j=1; j<=aNbS; ++j) {
+ // const TopoDS_Shape& aSx=aMSA.FindKey(j);
+ // const BooleanOperations_AncestorsSeqAndSuccessorsSeq& aASx=
+ // aMSA.FindFromIndex(j);
+ // InsertShapeAndAncestorsSuccessors(aSx, aASx, aShift);
+ // }
+ //}
+
+ aShift=0;
+ for (j=1; j<=aNbS; ++j) {
+ const TopoDS_Shape& aSx=aMSA.FindKey(j);
+ const BooleanOperations_AncestorsSeqAndSuccessorsSeq& aASx=aMSA.FindFromIndex(j);
+ InsertShapeAndAncestorsSuccessors(aSx, aASx, aShift);
}
+ // Contribution of Samtech www.samcef.com END
//
// myShapeIndexMap
myShapeIndexMap.Clear();
iFirst=aR.First();
iLast =aR.Last();
for (j=iFirst; j<=iLast; ++j) {
- const TopoDS_Shape& aS=GetShape(j);
+ const TopoDS_Shape& aS=Shape(j);
aSIM.Add(aS, j);
}
myShapeIndexMap.Add(i, aSIM);
if (!bFound) {
return aIndex;
}
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
//
- const BooleanOperations_IndexedDataMapOfShapeInteger& aSIM=myShapeIndexMap.FindFromKey(aRank);
+ //const BooleanOperations_IndexedDataMapOfShapeInteger& aSIM=
+ // myShapeIndexMap.FindFromKey(aRank);
//
- bFound=aSIM.Contains(aS);
- if (!bFound) {
- return aIndex;
- }
+ //bFound=aSIM.Contains(aS);
+ //if (!bFound) {
+ // return aIndex;
+ //}
//
- aIndex=aSIM.FindFromKey(aS);
+ //aIndex=aSIM.FindFromKey(aS);
+ //
+ Standard_Integer i, aNbRanks;
+ //
+ aNbRanks=myShapeIndexMap.Extent();
+ for (i=1; i<=aNbRanks; ++i){
+ const BooleanOperations_IndexedDataMapOfShapeInteger& aSIM=myShapeIndexMap.FindFromKey(i);
+ bFound=aSIM.Contains(aS);
+ if (bFound) {
+ aIndex=aSIM.FindFromKey(aS);
+ return aIndex;
+ }
+ }
+ // Contribution of Samtech www.samcef.com END
return aIndex;
}
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#endif
class TopoDS_Shape;
class NMTDS_CArray1OfIndexRange;
+class BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors;
#ifndef _Standard_HeaderFile
#include <Standard_Macro.hxx>
#endif
+
class NMTDS_ShapesDataStructure : public BooleanOperations_ShapesDataStructure {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTDS_ShapesDataStructure();
-Standard_EXPORT virtual ~NMTDS_ShapesDataStructure();
+
+
Standard_EXPORT void SetCompositeShape(const TopoDS_Shape& aS) ;
+
+
Standard_EXPORT void Init() ;
+
+
Standard_EXPORT const NMTDS_CArray1OfIndexRange& Ranges() const;
+
+
Standard_EXPORT const TopoDS_Shape& CompositeShape() const;
+
+
Standard_EXPORT Standard_Integer ShapeRangeIndex(const Standard_Integer aId) const;
+
+
Standard_EXPORT virtual Standard_Integer Rank(const Standard_Integer anIndex) const;
+
+
Standard_EXPORT virtual Standard_Integer ShapeIndex(const TopoDS_Shape& aS,const Standard_Integer iRank) const;
+Standard_EXPORT void FillMap(const TopoDS_Shape& aS,BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const;
+
+
+Standard_EXPORT void FillSubshapes(const TopoDS_Shape& aS,BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const;
+
+
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _NMTDS_CArray1OfIndexRange_HeaderFile
#include <NMTDS_CArray1OfIndexRange.hxx>
#endif
+#ifndef _BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
+#include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
+#endif
#ifndef _NMTDS_ShapesDataStructure_HeaderFile
#include <NMTDS_ShapesDataStructure.hxx>
#endif
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) : public Handle(TCollection_MapNode) {
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)():Handle(TCollection_MapNode)() {}
Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle)
{
return *this;
}
- NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->()
- {
- return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger *)ControlAccess();
- }
-
- NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->() const
+ NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->() const
{
return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger *)ControlAccess();
}
- Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)();
+// Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)();
Standard_EXPORT static const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) DownCast(const Handle(Standard_Transient)& AnObject);
};
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) : public Handle(TCollection_MapNode) {
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)():Handle(TCollection_MapNode)() {}
Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& aHandle) : Handle(TCollection_MapNode)(aHandle)
{
return *this;
}
- NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->()
- {
- return (NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors *)ControlAccess();
- }
-
- NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->() const
+ NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->() const
{
return (NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors *)ControlAccess();
}
- Standard_EXPORT ~Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)();
+// Standard_EXPORT ~Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)();
Standard_EXPORT static const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) DownCast(const Handle(Standard_Transient)& AnObject);
};
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) : public Handle(TCollection_MapNode) {
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)():Handle(TCollection_MapNode)() {}
Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle)
{
return *this;
}
- NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger* operator->()
- {
- return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger *)ControlAccess();
- }
-
- NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger* operator->() const
+ NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger* operator->() const
{
return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger *)ControlAccess();
}
- Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)();
+// Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)();
Standard_EXPORT static const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) DownCast(const Handle(Standard_Transient)& AnObject);
};
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) : public Handle(TCollection_MapNode) {
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)():Handle(TCollection_MapNode)() {}
Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle)
{
return *this;
}
- NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape* operator->()
- {
- return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape *)ControlAccess();
- }
-
- NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape* operator->() const
+ NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape* operator->() const
{
return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape *)ControlAccess();
}
- Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)();
+// Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)();
Standard_EXPORT static const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) DownCast(const Handle(Standard_Transient)& AnObject);
};
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) : public Handle(TCollection_MapNode) {
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)():Handle(TCollection_MapNode)() {}
Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)& aHandle) : Handle(TCollection_MapNode)(aHandle)
{
return *this;
}
- NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock* operator->()
- {
- return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock *)ControlAccess();
- }
-
- NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock* operator->() const
+ NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock* operator->() const
{
return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock *)ControlAccess();
}
- Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)();
+// Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)();
Standard_EXPORT static const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) DownCast(const Handle(Standard_Transient)& AnObject);
};
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Handle(NMTTools_ListNodeOfListOfCommonBlock) : public Handle(TCollection_MapNode) {
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
Handle(NMTTools_ListNodeOfListOfCommonBlock)():Handle(TCollection_MapNode)() {}
Handle(NMTTools_ListNodeOfListOfCommonBlock)(const Handle(NMTTools_ListNodeOfListOfCommonBlock)& aHandle) : Handle(TCollection_MapNode)(aHandle)
{
return *this;
}
- NMTTools_ListNodeOfListOfCommonBlock* operator->()
- {
- return (NMTTools_ListNodeOfListOfCommonBlock *)ControlAccess();
- }
-
- NMTTools_ListNodeOfListOfCommonBlock* operator->() const
+ NMTTools_ListNodeOfListOfCommonBlock* operator->() const
{
return (NMTTools_ListNodeOfListOfCommonBlock *)ControlAccess();
}
- Standard_EXPORT ~Handle(NMTTools_ListNodeOfListOfCommonBlock)();
+// Standard_EXPORT ~Handle(NMTTools_ListNodeOfListOfCommonBlock)();
Standard_EXPORT static const Handle(NMTTools_ListNodeOfListOfCommonBlock) DownCast(const Handle(Standard_Transient)& AnObject);
};
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class Handle(NMTTools_ListNodeOfListOfCoupleOfShape) : public Handle(TCollection_MapNode) {
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
Handle(NMTTools_ListNodeOfListOfCoupleOfShape)():Handle(TCollection_MapNode)() {}
Handle(NMTTools_ListNodeOfListOfCoupleOfShape)(const Handle(NMTTools_ListNodeOfListOfCoupleOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle)
{
return *this;
}
- NMTTools_ListNodeOfListOfCoupleOfShape* operator->()
- {
- return (NMTTools_ListNodeOfListOfCoupleOfShape *)ControlAccess();
- }
-
- NMTTools_ListNodeOfListOfCoupleOfShape* operator->() const
+ NMTTools_ListNodeOfListOfCoupleOfShape* operator->() const
{
return (NMTTools_ListNodeOfListOfCoupleOfShape *)ControlAccess();
}
- Standard_EXPORT ~Handle(NMTTools_ListNodeOfListOfCoupleOfShape)();
+// Standard_EXPORT ~Handle(NMTTools_ListNodeOfListOfCoupleOfShape)();
Standard_EXPORT static const Handle(NMTTools_ListNodeOfListOfCoupleOfShape) DownCast(const Handle(Standard_Transient)& AnObject);
};
# Libraries targets
LIB = libNMTTools.la
LIB_SRC = \
- NMTTools_CommonBlock.cxx \
NMTTools_CommonBlockAPI.cxx \
+ NMTTools_CommonBlock.cxx \
NMTTools_CommonBlockPool_0.cxx \
NMTTools_CoupleOfShape.cxx \
NMTTools_DEProcessor.cxx \
NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx \
NMTTools_ListOfCommonBlock_0.cxx \
NMTTools_ListOfCoupleOfShape_0.cxx \
- NMTTools_PaveFiller.cxx \
NMTTools_PaveFiller_0.cxx \
NMTTools_PaveFiller_1.cxx \
NMTTools_PaveFiller_2.cxx \
NMTTools_PaveFiller_7.cxx \
NMTTools_PaveFiller_8.cxx \
NMTTools_PaveFiller_9.cxx \
+ NMTTools_PaveFiller.cxx \
NMTTools_PCurveMaker.cxx \
- NMTTools_Tools.cxx
+ NMTTools_Tools.cxx \
+ NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_0.cxx \
+ NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_0.cxx \
+ NMTTools_DataMapOfIntegerListOfPaveBlock_0.cxx \
+ NMTTools_MapIteratorOfMapOfPaveBlock_0.cxx \
+ NMTTools_MapOfPaveBlock_0.cxx \
+ NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx
+
LIB_CLIENT_IDL =
LIB_SERVER_IDL =
# header files
EXPORT_HEADERS = \
- NMTTools_PDSFiller.hxx \
- NMTTools_DSFiller.hxx \
- NMTTools_PPaveFiller.hxx \
- NMTTools_PaveFiller.hxx \
- NMTTools_ListOfCoupleOfShape.hxx \
- NMTTools_Tools.hxx \
+ Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx \
+ Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \
+ Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx \
+ Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx \
+ Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx \
+ Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx \
+ Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx \
+ NMTDS_Iterator.hxx \
+ NMTTools_CommonBlockAPI.hxx \
+ NMTTools_CommonBlock.hxx \
+ NMTTools_CommonBlockPool.hxx \
NMTTools_CoupleOfShape.hxx \
- NMTTools_ListIteratorOfListOfCoupleOfShape.hxx \
+ NMTTools_DEProcessor.hxx \
+ NMTTools_DSFiller.hxx \
+ NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx \
+ NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx \
+ NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx \
+ NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx \
NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx \
+ NMTTools_IndexedDataMapOfShapePaveBlock.hxx \
NMTTools_IteratorOfCoupleOfShape.hxx \
- NMTTools_CommonBlockPool.hxx \
- Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx \
- Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx
+ NMTTools_ListIteratorOfListOfCommonBlock.hxx \
+ NMTTools_ListIteratorOfListOfCoupleOfShape.hxx \
+ NMTTools_ListNodeOfListOfCommonBlock.hxx \
+ NMTTools_ListNodeOfListOfCoupleOfShape.hxx \
+ NMTTools_ListOfCommonBlock.hxx \
+ NMTTools_ListOfCoupleOfShape.hxx \
+ NMTTools_PaveFiller.hxx \
+ NMTTools_PCurveMaker.hxx \
+ NMTTools_PDSFiller.hxx \
+ NMTTools_PPaveFiller.hxx \
+ NMTTools_Tools.hxx \
+ Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx \
+ Handle_NMTTools_StdMapNodeOfMapOfPaveBlock.hxx \
+ NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx \
+ NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx \
+ NMTTools_DataMapOfIntegerListOfPaveBlock.hxx \
+ NMTTools_MapIteratorOfMapOfPaveBlock.hxx \
+ NMTTools_MapOfPaveBlock.hxx \
+ NMTTools_StdMapNodeOfMapOfPaveBlock.hxx
# idl files
EXPORT_IDLS=
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+--
-- File: NMTTools.cdl
-- Created: Thu Dec 4 16:55:49 2003
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright: Matra Datavision 2003
package NMTTools
class PCurveMaker;
class DEProcessor;
class CoupleOfShape;
-
+
pointer PPaveFiller to PaveFiller from NMTTools;
pointer PDSFiller to DSFiller from NMTTools;
class ListOfCoupleOfShape instantiates
List from TCollection(CoupleOfShape from NMTTools);
+--
+ class DataMapOfIntegerListOfPaveBlock instantiates
+ DataMap from TCollection(Integer from Standard,
+ ListOfPaveBlock from BOPTools,
+ MapIntegerHasher from TColStd);
+
+ class MapOfPaveBlock instantiates
+ Map from TCollection (PaveBlock from BOPTools,
+ PaveBlockMapHasher from BOPTools);
+--
end NMTTools;
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+--
-- File: NMTTools_CommonBlock.cdl
-- Created: Tue Dec 9 12:11:48 2003
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright: Matra Datavision 2003
+
class CommonBlock from NMTTools
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTTools_CommonBlock {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTTools_CommonBlock();
+
+
Standard_EXPORT void AddPaveBlock(const BOPTools_PaveBlock& aPB) ;
+
+
Standard_EXPORT void AddFace(const Standard_Integer aF) ;
+
+
Standard_EXPORT void AddFaces(const TColStd_ListOfInteger& aLF) ;
+
+
Standard_EXPORT const BOPTools_ListOfPaveBlock& PaveBlocks() const;
+
+
Standard_EXPORT const TColStd_ListOfInteger& Faces() const;
+
+
Standard_EXPORT const BOPTools_PaveBlock& PaveBlock1() const;
+
+
Standard_EXPORT BOPTools_PaveBlock& PaveBlock1(const Standard_Integer anIx) ;
+
+
Standard_EXPORT BOPTools_PaveBlock& PaveBlockOnEdge(const Standard_Integer anIndex) ;
+
+
Standard_EXPORT Standard_Boolean IsPaveBlockOnFace(const Standard_Integer anIndex) const;
+
+
Standard_EXPORT Standard_Boolean IsPaveBlockOnEdge(const Standard_Integer anIndex) const;
+
+
Standard_EXPORT Standard_Boolean IsEqual(const NMTTools_CommonBlock& aCB) const;
+
+
Standard_EXPORT Standard_Boolean Contains(const BOPTools_PaveBlock& aPB) const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _BOPTools_PaveBlock_HeaderFile
#include <BOPTools_PaveBlock.hxx>
#endif
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+--
-- File: NMTTools_CommonBlockAPI.cdl
-- Created: Mon Dec 15 11:35:46 2003
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright: Matra Datavision 2003
class CommonBlockAPI from NMTTools
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTTools_CommonBlockAPI {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTTools_CommonBlockAPI(const NMTTools_ListOfCommonBlock& aList);
+
+
+//! Selector <br>
Standard_EXPORT const NMTTools_ListOfCommonBlock& List() const;
+
+
+//! Returns all PaveBlock-s (from the list) that are <br>
+//! common for the given edge with DS-index <anE> <br>
Standard_EXPORT const BOPTools_ListOfPaveBlock& CommonPaveBlocks(const Standard_Integer anE) const;
+
+
+//! Returns TRUE if given PaveBlock <aPB> is <br>
+//! common for the Blocks from the list <br>
Standard_EXPORT Standard_Boolean IsCommonBlock(const BOPTools_PaveBlock& aPB) const;
+
+
Standard_EXPORT NMTTools_CommonBlock& CommonBlock(const BOPTools_PaveBlock& aPB) const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _NMTTools_ListOfCommonBlock_HeaderFile
#include <NMTTools_ListOfCommonBlock.hxx>
#endif
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTTools_CommonBlockPool {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTTools_CommonBlockPool(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
+
+
Standard_EXPORT void Resize(const Standard_Integer theNewLength) ;
+
+
Standard_EXPORT void Destroy() ;
~NMTTools_CommonBlockPool()
{
Destroy();
}
+
+
Standard_EXPORT Standard_Integer Length() const;
+
+
Standard_EXPORT Standard_Integer Extent() const;
+
+
Standard_EXPORT Standard_Integer FactLength() const;
+
+
Standard_EXPORT Standard_Integer Append(const NMTTools_ListOfCommonBlock& Value) ;
+
+
Standard_EXPORT void Remove(const Standard_Integer Index) ;
+
+
Standard_EXPORT const NMTTools_ListOfCommonBlock& Value(const Standard_Integer Index) const;
const NMTTools_ListOfCommonBlock& operator ()(const Standard_Integer Index) const
{
return Value(Index);
}
+
+
Standard_EXPORT NMTTools_ListOfCommonBlock& ChangeValue(const Standard_Integer Index) ;
NMTTools_ListOfCommonBlock& operator ()(const Standard_Integer Index)
{
return ChangeValue(Index);
}
+
+
Standard_EXPORT void SetBlockLength(const Standard_Integer aBL) ;
+
+
Standard_EXPORT Standard_Integer BlockLength() const;
// Methods PRIVATE
//
+
+
Standard_EXPORT NMTTools_CommonBlockPool(const NMTTools_CommonBlockPool& AnArray);
+
+
Standard_EXPORT NMTTools_CommonBlockPool& Assign(const NMTTools_CommonBlockPool& Other) ;
NMTTools_CommonBlockPool& operator =(const NMTTools_CommonBlockPool& Other)
{
return Assign(Other);
}
+
+
Standard_EXPORT Standard_Boolean IsInvalidIndex(const Standard_Integer Index) const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+--
-- File: NMTTools_CoupleOfShape.cdl
-- Created: Wed Jan 28 15:03:39 2004
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright: Matra Datavision 2004
class CoupleOfShape from NMTTools
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTTools_CoupleOfShape {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTTools_CoupleOfShape();
+
+
Standard_EXPORT void SetShape1(const TopoDS_Shape& aS) ;
+
+
Standard_EXPORT void SetShape2(const TopoDS_Shape& aS) ;
+
+
Standard_EXPORT const TopoDS_Shape& Shape1() const;
+
+
Standard_EXPORT const TopoDS_Shape& Shape2() const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+--
-- File: NMTTools_DEProcessor.cdl
-- Created: Wed Sep 12 12:08:37 2001
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright: Matra Datavision 2001
class DEProcessor from NMTTools
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: BOPTools_DEProcessor.cxx
+// File: NMTTools_DEProcessor.cxx
// Created: Wed Sep 12 12:10:52 2001
// Author: Peter KURNEV
// <pkv@irinox>
#include <NMTDS_ShapesDataStructure.hxx>
-//#include <NMTTools_DSFiller.hxx>
#include <NMTTools_PaveFiller.hxx>
//
#include <BOPTools_SequenceOfCurves.hxx>
#include <BOPTools_Curve.hxx>
+//
+#include <Geom2d_TrimmedCurve.hxx>
+
+#include <ElCLib.hxx>
+#include <gp_Lin2d.hxx>
aNb=myDS->NumberOfShapesOfTheObject();
//
for (i=1; i<=aNb; i++) {
- const TopoDS_Shape& aF=myDS->Shape(i);
+ const TopoDS_Shape aF=myDS->Shape(i);//mpv
if (aF.ShapeType()==TopAbs_FACE) {
TopExp::MapShapesAndAncestors (aF, TopAbs_EDGE, TopAbs_FACE, aMEF);
}
}
//
for (i=1; i<=aNb; i++) {
- const TopoDS_Shape& aS=myDS->Shape(i);
+ const TopoDS_Shape aS=myDS->Shape(i);//mpv
if (aS.ShapeType()==TopAbs_EDGE) {
const TopoDS_Edge& aE=TopoDS::Edge(aS);
// Clear aPaveSet, aSplitEdges
aPaveSet.ChangeSet().Clear();
//
- const TopoDS_Edge& aDE=TopoDS::Edge(myDS->Shape(nED));
- const TopoDS_Face& aDF=TopoDS::Face(myDS->Shape(nFD));
+ const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED));//mpv
+ const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD));//mpv
//
// 2D Curve of degenerated edge on the face aDF
- Handle(Geom2d_Curve) aC2DDE=BRep_Tool::CurveOnSurface(aDE, aDF, aTD1, aTD2);
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ //Handle(Geom2d_Curve) aC2DDE=BRep_Tool::CurveOnSurface(aDE, aDF, aTD1, aTD2);
+ Handle(Geom2d_Curve) aC2DDE1=BRep_Tool::CurveOnSurface(aDE, aDF, aTD1, aTD2);
+ Handle(Geom2d_TrimmedCurve)aC2DDE=new Geom2d_TrimmedCurve(aC2DDE1, aTD1, aTD2);
+ // Contribution of Samtech www.samcef.com END
//
// Choose direction for Degenerated Edge
gp_Pnt2d aP2d1, aP2d2;
for (; anIt.More(); anIt.Next()) {
const BOPTools_PaveBlock& aPB=anIt.Value();
nE=aPB.Edge();
- const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE));
+ const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));//mpv
Handle(Geom2d_Curve) aC2D=BRep_Tool::CurveOnSurface(aE, aDF, aT1, aT2);
//
for (j=1; j<=aNbPoints; ++j) {
gp_Pnt2d aP2D=aGInter.Point(j).Value();
//
- aX=(bXDir) ? aP2D.X(): aP2D.Y();
+ // Modified to obtain exact parameter Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ Handle(Geom2d_Line) aCLDE=Handle(Geom2d_Line)::DownCast(aC2DDE1);
+ if (aCLDE.IsNull()) {
+ continue;
+ }
+ gp_Lin2d aLDE=aCLDE->Lin2d();
+ aX=ElCLib::Parameter(aLDE, aP2D);
+ //
+ //aX=(bXDir) ? aP2D.X(): aP2D.Y();
+ // Contribution of Samtech www.samcef.com END
//
if (fabs (aX-aTD1) < aDT || fabs (aX-aTD2) < aDT) {
continue;
TopoDS_Edge aE, aESplit;
TopoDS_Vertex aV1, aV2;
- const TopoDS_Edge& aDE=TopoDS::Edge(myDS->Shape(nED));
- const TopoDS_Face& aDF=TopoDS::Face(myDS->Shape(nFD));
+ const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED));//mpv
+ const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD));//mpv
BOPTools_ListIteratorOfListOfPaveBlock aPBIt(aSplitEdges);
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
+//! <br>
+//! The Algorithm to compute and store in interferences' pool <br>
+//! and in the Data Structure the following values <br>
+//! for degenerated edges <br>
+//! 1. Paves/Pave set(s) <br>
+//! 2. Split parts <br>
+//! 3. States (3D) for split parts <br>
+//! <br>
class NMTTools_DEProcessor {
public:
}
// Methods PUBLIC
//
+
+
+//! Constructor <br>
+//! <br>
+//! Constructor <br>
+//! <br>
Standard_EXPORT NMTTools_DEProcessor(NMTTools_PaveFiller& aFiller);
+
+
+//! Launches the processor <br>
Standard_EXPORT void Do() ;
+
+
+//! Returns TRUE if it is Ok <br>
Standard_EXPORT Standard_Boolean IsDone() const;
// Methods PROTECTED
//
+
+
Standard_EXPORT void FindDegeneratedEdges() ;
+
+
Standard_EXPORT void DoPaves() ;
+
+
Standard_EXPORT void FindPaveBlocks(const Standard_Integer nED,const Standard_Integer nVD,const Standard_Integer nFD,BOPTools_ListOfPaveBlock& aLPB) ;
+
+
Standard_EXPORT void FillPaveSet(const Standard_Integer nED,const Standard_Integer nVD,const Standard_Integer nFD,const BOPTools_ListOfPaveBlock& aLPB) ;
+
+
Standard_EXPORT void FillSplitEdgesPool(const Standard_Integer nED) ;
+
+
Standard_EXPORT void MakeSplitEdges(const Standard_Integer nED,const Standard_Integer nFD) ;
+
+
Standard_EXPORT void MakeSplitEdge(const TopoDS_Edge& aS1,const TopoDS_Face& aF,const TopoDS_Vertex& aV1,const Standard_Real aP1,const TopoDS_Vertex& aV2,const Standard_Real aP2,TopoDS_Edge& aNewEdge) ;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _NMTTools_PaveFiller_HeaderFile
#include <NMTTools_PaveFiller.hxx>
#endif
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+--
-- File: NMTTools_DSFiller.cdl
-- Created: Fri Dec 5 13:57:03 2003
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright: Matra Datavision 2003
class DSFiller from NMTTools
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTTools_DSFiller {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTTools_DSFiller();
+
+//! Destructor <br>
+//! <br>
+//! Selectors/Modifiers <br>
Standard_EXPORT void Destroy() ;
~NMTTools_DSFiller()
{
Destroy();
}
+
+
Standard_EXPORT void SetCompositeShape(const TopoDS_Shape& aS) ;
+
+
Standard_EXPORT const TopoDS_Shape& CompositeShape() const;
+
+
Standard_EXPORT void SetNewFiller(const Standard_Boolean aFlag) const;
+
+
Standard_EXPORT Standard_Boolean IsNewFiller() const;
+
+
Standard_EXPORT void Perform() ;
+
+
Standard_EXPORT const NMTDS_ShapesDataStructure& DS() const;
+
+
Standard_EXPORT const BOPTools_InterferencePool& InterfPool() const;
+
+
Standard_EXPORT Standard_Boolean IsDone() const;
+
+
Standard_EXPORT const NMTTools_PaveFiller& PaveFiller() const;
+
+
Standard_EXPORT NMTTools_PaveFiller& ChangePaveFiller() ;
// Methods PROTECTED
//
+
+
Standard_EXPORT void Clear() ;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class NMTTools_IndexedDataMapOfIndexedMapOfInteger;
+
class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger : public TCollection_MapNode {
public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
// Methods PUBLIC
//
+
NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger(const Standard_Integer& K1,const Standard_Integer K2,const TColStd_IndexedMapOfInteger& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
+
Standard_Integer& Key1() const;
+
Standard_Integer& Key2() const;
+
TCollection_MapNodePtr& Next2() const;
+
TColStd_IndexedMapOfInteger& Value() const;
-Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger();
+//Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger();
// Type management
//
- Standard_EXPORT friend Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile
#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
#endif
-NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger() {}
+//NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger() {}
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
{
return STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) ;
}
-Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger() {}
+//Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) == AType || TCollection_MapNode::IsKind(AType));
+//}
+//Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger() {}
#define TheKey Standard_Integer
#define TheKey_hxx <Standard_Integer.hxx>
#define TheItem TColStd_IndexedMapOfInteger
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class NMTTools_IndexedDataMapOfShapeIndexedMapOfShape;
+
class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape : public TCollection_MapNode {
public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
// Methods PUBLIC
//
+
NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape(const TopoDS_Shape& K1,const Standard_Integer K2,const TopTools_IndexedMapOfShape& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
+
TopoDS_Shape& Key1() const;
+
Standard_Integer& Key2() const;
+
TCollection_MapNodePtr& Next2() const;
+
TopTools_IndexedMapOfShape& Value() const;
-Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape();
+//Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape();
// Type management
//
- Standard_EXPORT friend Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
#include <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
#endif
-NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape() {}
+//NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape() {}
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
{
return STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) ;
}
-Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape() {}
+//Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) == AType || TCollection_MapNode::IsKind(AType));
+//}
+//Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape() {}
#define TheKey TopoDS_Shape
#define TheKey_hxx <TopoDS_Shape.hxx>
#define TheItem TopTools_IndexedMapOfShape
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class NMTTools_IndexedDataMapOfShapePaveBlock;
+
class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock : public TCollection_MapNode {
public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
// Methods PUBLIC
//
+
NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock(const TopoDS_Shape& K1,const Standard_Integer K2,const BOPTools_PaveBlock& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2);
+
TopoDS_Shape& Key1() const;
+
Standard_Integer& Key2() const;
+
TCollection_MapNodePtr& Next2() const;
+
BOPTools_PaveBlock& Value() const;
-Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock();
+//Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock();
// Type management
//
- Standard_EXPORT friend Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile
#include <NMTTools_IndexedDataMapOfShapePaveBlock.hxx>
#endif
-NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock() {}
+//NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock() {}
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
{
return STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) ;
}
-Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock() {}
+//Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) == AType || TCollection_MapNode::IsKind(AType));
+//}
+//Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock() {}
#define TheKey TopoDS_Shape
#define TheKey_hxx <TopoDS_Shape.hxx>
#define TheItem BOPTools_PaveBlock
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTTools_IndexedDataMapOfIndexedMapOfInteger : public TCollection_BasicMap {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTTools_IndexedDataMapOfIndexedMapOfInteger(const Standard_Integer NbBuckets = 1);
+
+
Standard_EXPORT NMTTools_IndexedDataMapOfIndexedMapOfInteger& Assign(const NMTTools_IndexedDataMapOfIndexedMapOfInteger& Other) ;
NMTTools_IndexedDataMapOfIndexedMapOfInteger& operator =(const NMTTools_IndexedDataMapOfIndexedMapOfInteger& Other)
{
return Assign(Other);
}
+
+
Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
+
+
Standard_EXPORT void Clear() ;
~NMTTools_IndexedDataMapOfIndexedMapOfInteger()
{
Clear();
}
+
+
Standard_EXPORT Standard_Integer Add(const Standard_Integer& K,const TColStd_IndexedMapOfInteger& I) ;
+
+
Standard_EXPORT void Substitute(const Standard_Integer I,const Standard_Integer& K,const TColStd_IndexedMapOfInteger& 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 TColStd_IndexedMapOfInteger& FindFromIndex(const Standard_Integer I) const;
const TColStd_IndexedMapOfInteger& operator ()(const Standard_Integer I) const
{
return FindFromIndex(I);
}
+
+
Standard_EXPORT TColStd_IndexedMapOfInteger& ChangeFromIndex(const Standard_Integer I) ;
TColStd_IndexedMapOfInteger& operator ()(const Standard_Integer I)
{
return ChangeFromIndex(I);
}
+
+
Standard_EXPORT Standard_Integer FindIndex(const Standard_Integer& K) const;
+
+
Standard_EXPORT const TColStd_IndexedMapOfInteger& FindFromKey(const Standard_Integer& K) const;
+
+
Standard_EXPORT TColStd_IndexedMapOfInteger& ChangeFromKey(const Standard_Integer& K) ;
// Methods PRIVATE
//
+
+
Standard_EXPORT NMTTools_IndexedDataMapOfIndexedMapOfInteger(const NMTTools_IndexedDataMapOfIndexedMapOfInteger& Other);
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTTools_IndexedDataMapOfShapeIndexedMapOfShape : public TCollection_BasicMap {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTTools_IndexedDataMapOfShapeIndexedMapOfShape(const Standard_Integer NbBuckets = 1);
+
+
Standard_EXPORT NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Assign(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Other) ;
NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& operator =(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Other)
{
return Assign(Other);
}
+
+
Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
+
+
Standard_EXPORT void Clear() ;
~NMTTools_IndexedDataMapOfShapeIndexedMapOfShape()
{
Clear();
}
+
+
Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const TopTools_IndexedMapOfShape& I) ;
+
+
Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const TopTools_IndexedMapOfShape& T) ;
+
+
Standard_EXPORT void RemoveLast() ;
+
+
Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const;
+
+
Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const;
+
+
Standard_EXPORT const TopTools_IndexedMapOfShape& FindFromIndex(const Standard_Integer I) const;
const TopTools_IndexedMapOfShape& operator ()(const Standard_Integer I) const
{
return FindFromIndex(I);
}
+
+
Standard_EXPORT TopTools_IndexedMapOfShape& ChangeFromIndex(const Standard_Integer I) ;
TopTools_IndexedMapOfShape& operator ()(const Standard_Integer I)
{
return ChangeFromIndex(I);
}
+
+
Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const;
+
+
Standard_EXPORT const TopTools_IndexedMapOfShape& FindFromKey(const TopoDS_Shape& K) const;
+
+
Standard_EXPORT TopTools_IndexedMapOfShape& ChangeFromKey(const TopoDS_Shape& K) ;
// Methods PRIVATE
//
+
+
Standard_EXPORT NMTTools_IndexedDataMapOfShapeIndexedMapOfShape(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Other);
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTTools_IndexedDataMapOfShapePaveBlock : public TCollection_BasicMap {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTTools_IndexedDataMapOfShapePaveBlock(const Standard_Integer NbBuckets = 1);
+
+
Standard_EXPORT NMTTools_IndexedDataMapOfShapePaveBlock& Assign(const NMTTools_IndexedDataMapOfShapePaveBlock& Other) ;
NMTTools_IndexedDataMapOfShapePaveBlock& operator =(const NMTTools_IndexedDataMapOfShapePaveBlock& Other)
{
return Assign(Other);
}
+
+
Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
+
+
Standard_EXPORT void Clear() ;
~NMTTools_IndexedDataMapOfShapePaveBlock()
{
Clear();
}
+
+
Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const BOPTools_PaveBlock& I) ;
+
+
Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const BOPTools_PaveBlock& T) ;
+
+
Standard_EXPORT void RemoveLast() ;
+
+
Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const;
+
+
Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const;
+
+
Standard_EXPORT const BOPTools_PaveBlock& FindFromIndex(const Standard_Integer I) const;
const BOPTools_PaveBlock& operator ()(const Standard_Integer I) const
{
return FindFromIndex(I);
}
+
+
Standard_EXPORT BOPTools_PaveBlock& ChangeFromIndex(const Standard_Integer I) ;
BOPTools_PaveBlock& operator ()(const Standard_Integer I)
{
return ChangeFromIndex(I);
}
+
+
Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const;
+
+
Standard_EXPORT const BOPTools_PaveBlock& FindFromKey(const TopoDS_Shape& K) const;
+
+
Standard_EXPORT BOPTools_PaveBlock& ChangeFromKey(const TopoDS_Shape& K) ;
// Methods PRIVATE
//
+
+
Standard_EXPORT NMTTools_IndexedDataMapOfShapePaveBlock(const NMTTools_IndexedDataMapOfShapePaveBlock& Other);
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+--
-- File: NMTTools_IteratorOfCoupleOfShape.cdl
-- Created: Thu Dec 4 16:57:48 2003
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright: Matra Datavision 2003
class IteratorOfCoupleOfShape from NMTTools
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTTools_IteratorOfCoupleOfShape : public BOPTools_IteratorOfCoupleOfShape {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTTools_IteratorOfCoupleOfShape();
+
+
Standard_EXPORT void SetDS(const NMTDS_PShapesDataStructure& pDS) ;
+
+
Standard_EXPORT virtual void Initialize(const TopAbs_ShapeEnum Type1,const TopAbs_ShapeEnum Type2) ;
+
+
Standard_EXPORT virtual void Current(Standard_Integer& Index1,Standard_Integer& Index2,Standard_Boolean& WithSubShape) const;
+
+
Standard_EXPORT virtual Standard_Boolean More() const;
+
+
Standard_EXPORT const NMTDS_ShapesDataStructure& DS() const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _Standard_NoSuchObject_HeaderFile
#include <Standard_NoSuchObject.hxx>
#endif
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTTools_ListIteratorOfListOfCommonBlock {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTTools_ListIteratorOfListOfCommonBlock();
+
+
Standard_EXPORT NMTTools_ListIteratorOfListOfCommonBlock(const NMTTools_ListOfCommonBlock& L);
+
+
Standard_EXPORT void Initialize(const NMTTools_ListOfCommonBlock& L) ;
+
Standard_Boolean More() const;
+
+
Standard_EXPORT void Next() ;
+
+
Standard_EXPORT NMTTools_CommonBlock& Value() const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTTools_ListIteratorOfListOfCoupleOfShape {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTTools_ListIteratorOfListOfCoupleOfShape();
+
+
Standard_EXPORT NMTTools_ListIteratorOfListOfCoupleOfShape(const NMTTools_ListOfCoupleOfShape& L);
+
+
Standard_EXPORT void Initialize(const NMTTools_ListOfCoupleOfShape& L) ;
+
Standard_Boolean More() const;
+
+
Standard_EXPORT void Next() ;
+
+
Standard_EXPORT NMTTools_CoupleOfShape& Value() const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class NMTTools_ListIteratorOfListOfCommonBlock;
+
class NMTTools_ListNodeOfListOfCommonBlock : public TCollection_MapNode {
public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
// Methods PUBLIC
//
+
NMTTools_ListNodeOfListOfCommonBlock(const NMTTools_CommonBlock& I,const TCollection_MapNodePtr& n);
+
NMTTools_CommonBlock& Value() const;
-Standard_EXPORT ~NMTTools_ListNodeOfListOfCommonBlock();
+//Standard_EXPORT ~NMTTools_ListNodeOfListOfCommonBlock();
// Type management
//
- Standard_EXPORT friend Handle_Standard_Type& NMTTools_ListNodeOfListOfCommonBlock_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _NMTTools_ListIteratorOfListOfCommonBlock_HeaderFile
#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
#endif
-NMTTools_ListNodeOfListOfCommonBlock::~NMTTools_ListNodeOfListOfCommonBlock() {}
+//NMTTools_ListNodeOfListOfCommonBlock::~NMTTools_ListNodeOfListOfCommonBlock() {}
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
{
return STANDARD_TYPE(NMTTools_ListNodeOfListOfCommonBlock) ;
}
-Standard_Boolean NMTTools_ListNodeOfListOfCommonBlock::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(NMTTools_ListNodeOfListOfCommonBlock) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_NMTTools_ListNodeOfListOfCommonBlock::~Handle_NMTTools_ListNodeOfListOfCommonBlock() {}
+//Standard_Boolean NMTTools_ListNodeOfListOfCommonBlock::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(NMTTools_ListNodeOfListOfCommonBlock) == AType || TCollection_MapNode::IsKind(AType));
+//}
+//Handle_NMTTools_ListNodeOfListOfCommonBlock::~Handle_NMTTools_ListNodeOfListOfCommonBlock() {}
#define Item NMTTools_CommonBlock
#define Item_hxx <NMTTools_CommonBlock.hxx>
#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
class NMTTools_ListIteratorOfListOfCoupleOfShape;
+
class NMTTools_ListNodeOfListOfCoupleOfShape : public TCollection_MapNode {
public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
// Methods PUBLIC
//
+
NMTTools_ListNodeOfListOfCoupleOfShape(const NMTTools_CoupleOfShape& I,const TCollection_MapNodePtr& n);
+
NMTTools_CoupleOfShape& Value() const;
-Standard_EXPORT ~NMTTools_ListNodeOfListOfCoupleOfShape();
+//Standard_EXPORT ~NMTTools_ListNodeOfListOfCoupleOfShape();
// Type management
//
- Standard_EXPORT friend Handle_Standard_Type& NMTTools_ListNodeOfListOfCoupleOfShape_Type_();
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
+ //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
protected:
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _NMTTools_ListIteratorOfListOfCoupleOfShape_HeaderFile
#include <NMTTools_ListIteratorOfListOfCoupleOfShape.hxx>
#endif
-NMTTools_ListNodeOfListOfCoupleOfShape::~NMTTools_ListNodeOfListOfCoupleOfShape() {}
+//NMTTools_ListNodeOfListOfCoupleOfShape::~NMTTools_ListNodeOfListOfCoupleOfShape() {}
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
{
return STANDARD_TYPE(NMTTools_ListNodeOfListOfCoupleOfShape) ;
}
-Standard_Boolean NMTTools_ListNodeOfListOfCoupleOfShape::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(NMTTools_ListNodeOfListOfCoupleOfShape) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_NMTTools_ListNodeOfListOfCoupleOfShape::~Handle_NMTTools_ListNodeOfListOfCoupleOfShape() {}
+//Standard_Boolean NMTTools_ListNodeOfListOfCoupleOfShape::IsKind(const Handle(Standard_Type)& AType) const
+//{
+// return (STANDARD_TYPE(NMTTools_ListNodeOfListOfCoupleOfShape) == AType || TCollection_MapNode::IsKind(AType));
+//}
+//Handle_NMTTools_ListNodeOfListOfCoupleOfShape::~Handle_NMTTools_ListNodeOfListOfCoupleOfShape() {}
#define Item NMTTools_CoupleOfShape
#define Item_hxx <NMTTools_CoupleOfShape.hxx>
#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTTools_ListOfCommonBlock {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTTools_ListOfCommonBlock();
+
+
Standard_EXPORT void Assign(const NMTTools_ListOfCommonBlock& Other) ;
void operator=(const NMTTools_ListOfCommonBlock& Other)
{
Assign(Other);
}
+
+
Standard_EXPORT Standard_Integer Extent() const;
+
+
Standard_EXPORT void Clear() ;
~NMTTools_ListOfCommonBlock()
{
Clear();
}
+
Standard_Boolean IsEmpty() const;
+
+
Standard_EXPORT void Prepend(const NMTTools_CommonBlock& I) ;
+
+
Standard_EXPORT void Prepend(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& theIt) ;
+
+
Standard_EXPORT void Prepend(NMTTools_ListOfCommonBlock& Other) ;
+
+
Standard_EXPORT void Append(const NMTTools_CommonBlock& I) ;
+
+
Standard_EXPORT void Append(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& theIt) ;
+
+
Standard_EXPORT void Append(NMTTools_ListOfCommonBlock& Other) ;
+
+
Standard_EXPORT NMTTools_CommonBlock& First() const;
+
+
Standard_EXPORT NMTTools_CommonBlock& Last() const;
+
+
Standard_EXPORT void RemoveFirst() ;
+
+
Standard_EXPORT void Remove(NMTTools_ListIteratorOfListOfCommonBlock& It) ;
+
+
Standard_EXPORT void InsertBefore(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& It) ;
+
+
Standard_EXPORT void InsertBefore(NMTTools_ListOfCommonBlock& Other,NMTTools_ListIteratorOfListOfCommonBlock& It) ;
+
+
Standard_EXPORT void InsertAfter(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& It) ;
+
+
Standard_EXPORT void InsertAfter(NMTTools_ListOfCommonBlock& Other,NMTTools_ListIteratorOfListOfCommonBlock& It) ;
// Methods PRIVATE
//
+
+
Standard_EXPORT NMTTools_ListOfCommonBlock(const NMTTools_ListOfCommonBlock& Other);
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
class NMTTools_ListOfCoupleOfShape {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTTools_ListOfCoupleOfShape();
+
+
Standard_EXPORT void Assign(const NMTTools_ListOfCoupleOfShape& Other) ;
void operator=(const NMTTools_ListOfCoupleOfShape& Other)
{
Assign(Other);
}
+
+
Standard_EXPORT Standard_Integer Extent() const;
+
+
Standard_EXPORT void Clear() ;
~NMTTools_ListOfCoupleOfShape()
{
Clear();
}
+
Standard_Boolean IsEmpty() const;
+
+
Standard_EXPORT void Prepend(const NMTTools_CoupleOfShape& I) ;
+
+
Standard_EXPORT void Prepend(const NMTTools_CoupleOfShape& I,NMTTools_ListIteratorOfListOfCoupleOfShape& theIt) ;
+
+
Standard_EXPORT void Prepend(NMTTools_ListOfCoupleOfShape& Other) ;
+
+
Standard_EXPORT void Append(const NMTTools_CoupleOfShape& I) ;
+
+
Standard_EXPORT void Append(const NMTTools_CoupleOfShape& I,NMTTools_ListIteratorOfListOfCoupleOfShape& theIt) ;
+
+
Standard_EXPORT void Append(NMTTools_ListOfCoupleOfShape& Other) ;
+
+
Standard_EXPORT NMTTools_CoupleOfShape& First() const;
+
+
Standard_EXPORT NMTTools_CoupleOfShape& Last() const;
+
+
Standard_EXPORT void RemoveFirst() ;
+
+
Standard_EXPORT void Remove(NMTTools_ListIteratorOfListOfCoupleOfShape& It) ;
+
+
Standard_EXPORT void InsertBefore(const NMTTools_CoupleOfShape& I,NMTTools_ListIteratorOfListOfCoupleOfShape& It) ;
+
+
Standard_EXPORT void InsertBefore(NMTTools_ListOfCoupleOfShape& Other,NMTTools_ListIteratorOfListOfCoupleOfShape& It) ;
+
+
Standard_EXPORT void InsertAfter(const NMTTools_CoupleOfShape& I,NMTTools_ListIteratorOfListOfCoupleOfShape& It) ;
+
+
Standard_EXPORT void InsertAfter(NMTTools_ListOfCoupleOfShape& Other,NMTTools_ListIteratorOfListOfCoupleOfShape& It) ;
// Methods PRIVATE
//
+
+
Standard_EXPORT NMTTools_ListOfCoupleOfShape(const NMTTools_ListOfCoupleOfShape& Other);
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+--
-- File: NMTTools_PCurveMaker.cdl
-- Created:
-- Author: Peter KURNEV
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <Standard_Macro.hxx>
#endif
+
+//! Class provides computation p-curves for the edges and theirs <br>
+//! split parts <br>
class NMTTools_PCurveMaker {
public:
}
// Methods PUBLIC
//
+
+
+//! Constructor <br>
Standard_EXPORT NMTTools_PCurveMaker(NMTTools_PDSFiller& aFiller);
+
+
+//! Launch the processor <br>
Standard_EXPORT void Do() ;
+
+
+//! Returns TRUE if Ok <br>
Standard_EXPORT Standard_Boolean IsDone() const;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _NMTTools_PCurveMaker_HeaderFile
#include <NMTTools_PCurveMaker.hxx>
#endif
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+--
-- File: NMTTools_PaveFiller.cdl
-- Created: Fri Dec 5 14:35:00 2003
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright: Matra Datavision 2003
class PaveFiller from NMTTools
---Purpose:
-uses
- ListOfInteger from TColStd,
+uses
+ -- Modified to add new definitions Thu Sep 14 14:35:18 2006
+ -- Contribution of Samtech www.samcef.com BEGIN
+ ListOfInteger from TColStd,
+ -- Contribution of Samtech www.samcef.com END
+ DataMapOfIntegerInteger from TColStd,
Pnt from gp,
ShapeEnum from TopAbs,
Vertex from TopoDS,
- Face from TopoDS,
+ Face from TopoDS,
+ -- Modified to add new definitions Thu Sep 14 14:35:18 2006
+ -- Contribution of Samtech www.samcef.com BEGIN
+ Edge from TopoDS,
+ ListOfShape from TopTools,
+ -- Contribution of Samtech www.samcef.com END
Context from IntTools,
ShrunkRange from IntTools,
-
+
IndexedDataMapOfShapeInteger from BooleanOperations,
InterferencePool from BOPTools,
CommonBlockPool from NMTTools,
CommonBlock from NMTTools,
- ListOfCommonBlock from NMTTools,
- IteratorOfCoupleOfShape from NMTTools,
-
- ShapesDataStructure from NMTDS,
- PShapesDataStructure from NMTDS
-
+ ListOfCommonBlock from NMTTools,
+ -- Modified to add new definitions Thu Sep 14 14:35:18 2006
+ -- Contribution of Samtech www.samcef.com BEGIN
+ IndexedDataMapOfIndexedMapOfInteger from NMTTools,
+ -- Contribution of Samtech www.samcef.com END
+ ShapesDataStructure from NMTDS,
+ -- Modified to add new definitions Thu Sep 14 14:35:18 2006
+ -- Contribution of Samtech www.samcef.com BEGIN
+ PShapesDataStructure from NMTDS,
+ Iterator from NMTDS
+ -- Contribution of Samtech www.samcef.com END
+
--raises
is
returns PInterferencePool from BOPTools;
--
-- Perform the algo
- Init (me:out)
- is protected;
+ -- Modified to add new method Thu Sep 14 14:35:18 2006
+ -- Contribution of Samtech www.samcef.com BEGIN
+ Init (me:out);
+ -- Contribution of Samtech www.samcef.com END
Perform (me:out)
is virtual;
PerformVV (me:out)
- is virtual protected;
+ is virtual ;
PerformVE (me:out)
is virtual protected;
is virtual protected;
PerformNewVertices (me:out)
- is virtual protected;
+ is virtual ;
PrepareEdges (me:out)
is virtual protected;
RealPaveBlock(me:out;
aPB:PaveBlock from BOPTools)
returns PaveBlock from BOPTools;
+ ---C++: return const &
+
+ -- Modified to add new method Thu Sep 14 14:35:18 2006
+ -- Contribution of Samtech www.samcef.com BEGIN
+ RealPaveBlock(me:out;
+ aPB:PaveBlock from BOPTools;
+ aLB:out ListOfInteger from TColStd)
+ returns PaveBlock from BOPTools;
---C++: return const &
- --
+ -- Contribution of Samtech www.samcef.com END
+
RealSplitsFace (me:out;
nF2 :Integer from Standard;
aLs :out ListOfPaveBlock from BOPTools);
PrepareSetForFace(me:out;
nF1 :Integer from Standard;
nF2 :Integer from Standard;
- --modified by NIZNHY-PKV Fri Apr 1 11:19:15 2005f
aLPB: ListOfPaveBlock from BOPTools;
- --modified by NIZNHY-PKV Fri Apr 1 10:54:16 2005t
aPSF:out PaveSet from BOPTools);
PutPaveOnCurve(me:out;
aTol: Real from Standard)
returns Integer from Standard;
--- IsExistingPaveBlock (me:out;
--- aPB : PaveBlock from BOPTools;
--- aFF : SSInterference from BOPTools)
--- returns Boolean from Standard;
-
---modified by NIZNHY-PKV Fri Apr 1 09:35:34 2005f
+
IsExistingPaveBlock (me:out;
aPB : PaveBlock from BOPTools;
aLPB: ListOfPaveBlock from BOPTools;
aTol: Real from Standard)
returns Boolean from Standard;
---modified by NIZNHY-PKV Fri Apr 1 09:35:39 2005t
MakePCurves (me:out);
+ -- Modified to add new methods Thu Sep 14 14:35:18 2006
+ -- Contribution of Samtech www.samcef.com BEGIN
+ PerformVF1(me:out)
+ is protected;
+
+ MakeAloneVertices(me:out)
+ is protected;
+
+ AloneVertices(me)
+ returns IndexedDataMapOfIndexedMapOfInteger from NMTTools;
+ ---C++: return const &
+ -- Contribution of Samtech www.samcef.com END
+
+ IsExistingPaveBlock (me:out;
+ aPB : PaveBlock from BOPTools;
+ aLPB: ListOfShape from TopTools;
+ aTol: Real from Standard)
+ returns Boolean from Standard;
+
+ --
+ CheckCoincidence (me:out;
+ aPB : PaveBlock from BOPTools;
+ aLPB: ListOfPaveBlock from BOPTools)
+ returns Boolean from Standard;
+ --
+
+ CheckIntermediatePoint(me:out;
+ aPB : PaveBlock from BOPTools;
+ aE : Edge from TopoDS;
+ aTol: Real from Standard)
+ returns Integer from Standard;
+
+ -- Modified to add new method Thu Sep 14 14:35:18 2006
+ -- Contribution of Samtech www.samcef.com BEGIN
+ SharedEdges(me:out;
+ nF1 :Integer from Standard;
+ nF2 :Integer from Standard;
+ aLNE :out ListOfInteger from TColStd;
+ aLSE :out ListOfShape from TopTools);
+ -- Contribution of Samtech www.samcef.com END
+
fields
myIntrPool : PInterferencePool from BOPTools is protected;
myDS : PShapesDataStructure from NMTDS is protected;
myIsDone : Boolean from Standard is protected;
myNbSources : Integer from Standard is protected;
- myNbEdges : Integer from Standard is protected;
- myDSIt : IteratorOfCoupleOfShape from NMTTools is protected;
- --
+ myNbEdges : Integer from Standard is protected;
+
+ -- Modified to add new field Thu Sep 14 14:35:18 2006
+ -- Contribution of Samtech www.samcef.com BEGIN
+ myDSIt : Iterator from NMTDS is protected;
+ -- Contribution of Samtech www.samcef.com END
+
myPavePool : PavePool from BOPTools is protected;
myPavePoolNew : PavePool from BOPTools is protected;
myCommonBlockPool : CommonBlockPool from NMTTools is protected;
mySplitShapesPool : SplitShapesPool from BOPTools is protected;
--
myContext : Context from IntTools is protected;
- mySectionAttribute : SSIntersectionAttribute from BOPTools is protected;
+ mySectionAttribute : SSIntersectionAttribute from BOPTools is protected;
+ myAloneVertices : IndexedDataMapOfIndexedMapOfInteger from NMTTools is protected;
+ --
+ myVSD : DataMapOfIntegerInteger from TColStd is protected;
+ --
end PaveFiller;
#include <BOPTColStd_Failure.hxx>
#include <NMTDS_ShapesDataStructure.hxx>
#include <NMTTools_DEProcessor.hxx>
-//QQ #include "utilities.h"
+//
//=======================================================================
// function: NMTTools_PaveFiller::NMTTools_PaveFiller
// purpose:
void NMTTools_PaveFiller::Init()
{
myDSIt.SetDS(myDS);
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ myDSIt.Prepare();
+ // Contribution of Samtech www.samcef.com END
}
+
//=======================================================================
// function: Perform
// purpose:
//=======================================================================
void NMTTools_PaveFiller::Perform()
{
+ myIsDone=Standard_False;
+ //
try {
// 0.
- Init();//myDSIt.SetDS(myDS);
- //
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ Init();
+ // Contribution of Samtech www.samcef.com END
//1.VV
+ //
PerformVV();
PerformNewVertices();
//
// 2.VE
myPavePool.Resize (myNbEdges);
- PrepareEdges();
+ PrepareEdges();
+
PerformVE();
//
// 3.VF
myCommonBlockPool.Resize (myNbEdges);
mySplitShapesPool.Resize (myNbEdges);
myPavePoolNew .Resize (myNbEdges);
-
+
PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE);
PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE);
//
//
// 5.EF
PreparePaveBlocks(TopAbs_EDGE, TopAbs_FACE);
+
PerformEF();
+ //
RefinePavePool();
//
myPavePoolNew.Destroy();
+
MakeSplitEdges();
+
UpdateCommonBlocks();
//
// 6. FF
PerformFF ();
+ //
MakeBlocks();
+ //
MakePCurves();
//
// 7.Postprocessing
NMTTools_DEProcessor aDEP(*this);
aDEP.Do();
//
- myIsDone = Standard_True;
+ // Modified to treat Alone Vertices Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ MakeAloneVertices();
+ // Contribution of Samtech www.samcef.com END
+ //
+ myIsDone=Standard_True;
}
- catch (BOPTColStd_Failure& /*x*/) {
- //QQ MESSAGE(x.Message() << flush);
- myIsDone = Standard_False;
+ catch (BOPTColStd_Failure& ) {
}
}
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
-#ifndef _NMTTools_IteratorOfCoupleOfShape_HeaderFile
-#include <NMTTools_IteratorOfCoupleOfShape.hxx>
+#ifndef _NMTDS_Iterator_HeaderFile
+#include <NMTDS_Iterator.hxx>
#endif
#ifndef _BOPTools_PavePool_HeaderFile
#include <BOPTools_PavePool.hxx>
#ifndef _BOPTools_SSIntersectionAttribute_HeaderFile
#include <BOPTools_SSIntersectionAttribute.hxx>
#endif
+#ifndef _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile
+#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
+#endif
+#ifndef _TColStd_DataMapOfIntegerInteger_HeaderFile
+#include <TColStd_DataMapOfIntegerInteger.hxx>
+#endif
#ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx>
#endif
class BOPTools_Curve;
class BOPTools_SSInterference;
class gp_Pnt;
+class NMTTools_IndexedDataMapOfIndexedMapOfInteger;
+class TopTools_ListOfShape;
+class TopoDS_Edge;
#ifndef _Standard_HeaderFile
#include <Standard_Macro.hxx>
#endif
+
class NMTTools_PaveFiller {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT NMTTools_PaveFiller();
+
+
Standard_EXPORT NMTTools_PaveFiller(const BOPTools_InterferencePool& aIP);
+
+
Standard_EXPORT virtual void Destroy() ;
Standard_EXPORT virtual ~NMTTools_PaveFiller(){Destroy();}
+
+
Standard_EXPORT void SetInterferencePool(const BOPTools_InterferencePool& aIP) ;
+
+
Standard_EXPORT BOPTools_PInterferencePool InterfPool() ;
+
+
+Standard_EXPORT void Init() ;
+
+
Standard_EXPORT virtual void Perform() ;
+
+
+Standard_EXPORT virtual void PerformVV() ;
+
+
+Standard_EXPORT virtual void PerformNewVertices() ;
+
+
Standard_EXPORT Standard_Boolean IsDone() const;
+
+
Standard_EXPORT NMTDS_PShapesDataStructure DS() ;
+
+
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_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) ;
+
+
// Methods PROTECTED
//
-Standard_EXPORT void Init() ;
-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 PerformNewVertices() ;
+
+
Standard_EXPORT virtual void PrepareEdges() ;
+
+
Standard_EXPORT void SortTypes(Standard_Integer& anInd1,Standard_Integer& anInd2) const;
+
+
Standard_EXPORT Standard_Integer ExpectedPoolLength() const;
+
+
Standard_EXPORT Standard_Boolean IsSuccesstorsComputed(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() ;
+
+
// Fields PROTECTED
//
BOPTools_PInterferencePool myIntrPool;
Standard_Boolean myIsDone;
Standard_Integer myNbSources;
Standard_Integer myNbEdges;
-NMTTools_IteratorOfCoupleOfShape myDSIt;
+NMTDS_Iterator myDSIt;
BOPTools_PavePool myPavePool;
BOPTools_PavePool myPavePoolNew;
NMTTools_CommonBlockPool myCommonBlockPool;
BOPTools_SplitShapesPool mySplitShapesPool;
IntTools_Context myContext;
BOPTools_SSIntersectionAttribute mySectionAttribute;
+NMTTools_IndexedDataMapOfIndexedMapOfInteger myAloneVertices;
+TColStd_DataMapOfIntegerInteger myVSD;
private:
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _BOPTools_InterferencePool_HeaderFile
#include <BOPTools_InterferencePool.hxx>
#endif
#ifndef _gp_Pnt_HeaderFile
#include <gp_Pnt.hxx>
#endif
+#ifndef _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile
+#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
+#endif
+#ifndef _TopTools_ListOfShape_HeaderFile
+#include <TopTools_ListOfShape.hxx>
+#endif
+#ifndef _TopoDS_Edge_HeaderFile
+#include <TopoDS_Edge.hxx>
+#endif
#ifndef _NMTTools_PaveFiller_HeaderFile
#include <NMTTools_PaveFiller.hxx>
#endif
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTTools_PaveFiller_0.cxx
-// Created: Mon Dec 8 11:45:51 2003
+// File: NMTTools_PaveFiller_1.cxx
+// Created: Mon Dec 8 11:47:55 2003
// Author: Peter KURNEV
// <pkv@irinox>
-
#include <NMTTools_PaveFiller.ixx>
#include <TopAbs_ShapeEnum.hxx>
{
Standard_Integer aNbIIs;
Standard_Real aCfPredict=.5;
-
- const BOPTools_ListOfCoupleOfInteger& aLC=myDSIt.ListOfCouple();
- aNbIIs=aLC.Extent();
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ //const BOPTools_ListOfCoupleOfInteger& aLC=myDSIt.ListOfCouple();
+ //aNbIIs=aLC.Extent();
+ aNbIIs=myDSIt.ExpectedLength();
+ // Contribution of Samtech www.samcef.com END
//
if (aNbIIs==1) {
return aNbIIs;
// Created: Mon Dec 8 11:47:55 2003
// Author: Peter KURNEV
// <pkv@irinox>
-
-
#include <NMTTools_PaveFiller.ixx>
-#include <TColStd_IndexedMapOfInteger.hxx>
-
+#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
+#include <TColStd_ListOfInteger.hxx>
+#include <TColStd_ListIteratorOfListOfInteger.hxx>
+#include <TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger.hxx>
+
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <BOPTools_CArray1OfVVInterference.hxx>
#include <BOPTools_VVInterference.hxx>
#include <BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx>
-#include <BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx>
#include <NMTDS_ShapesDataStructure.hxx>
#include <NMTTools_Tools.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-
-
//=======================================================================
// function: PerformVV
// purpose:
{
myIsDone=Standard_False;
//
- Standard_Integer n1, n2,anIndexIn, aFlag, aWhat, aWith, aNbVVs, aBlockLength;
- Standard_Boolean bJustAddInterference;
+ Standard_Integer anIndexIn, aWhat, aWith, aNbVVs, aBlockLength, aNbVSD;
+ Standard_Integer nVnew;
+ TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger aIt1;
+ TColStd_ListIteratorOfListOfInteger aIt;
+ TopTools_ListOfShape aLV;
+ TopoDS_Vertex aVnew;
+ TopoDS_Shape aS;
+ //
+ myVSD.Clear();
//
BOPTools_CArray1OfVVInterference& aVVs=myIntrPool->VVInterferences();
//
aVVs.SetBlockLength(aNbVVs);
}
//
- // V/V BooleanOperations_VertexVertex
- myDSIt.Initialize(TopAbs_VERTEX, TopAbs_VERTEX);
+ const TColStd_DataMapOfIntegerListOfInteger& aMVSD=myDSIt.SDVertices();
+ aNbVSD=aMVSD.Extent();
+ if (!aNbVSD) {
+ return;
+ }
//
- for (; myDSIt.More(); myDSIt.Next()) {
- myDSIt.Current(n1, n2, bJustAddInterference);
+ aIt1.Initialize(aMVSD);
+ for (; aIt1.More(); aIt1.Next()) {
+ aLV.Clear();
+ //
+ aWhat=aIt1.Key();
+ const TColStd_ListOfInteger& aLIV=aIt1.Value();
//
- if (!myIntrPool->IsComputed(n1, n2)) {
- anIndexIn=0;
- aWhat=n1;
- aWith=n2;
- SortTypes(aWhat, aWith);
- if (!bJustAddInterference) {
- const TopoDS_Shape& aS1=myDS->GetShape(aWhat);
- const TopoDS_Shape& aS2=myDS->GetShape(aWith);
- //
- const TopoDS_Vertex& aV1=TopoDS::Vertex(aS1);
- const TopoDS_Vertex& aV2=TopoDS::Vertex(aS2);
- aFlag=IntTools_Tools::ComputeVV (aV1, aV2);
- //
- if (!aFlag) {
- BOPTools_VVInterference anInterf (aWhat, aWith);
- anIndexIn=aVVs.Append(anInterf);
- }
- }
+ // new vertex
+ aIt.Initialize(aLIV);
+ for (; aIt.More(); aIt.Next()) {
+ aWith=aIt.Value();
+ aS=myDS->Shape(aWith);
+ aLV.Append(aS);
+ }
+ aS=myDS->Shape(aWhat);
+ aLV.Append(aS);
+ //
+ NMTTools_Tools::MakeNewVertex(aLV, aVnew);
+ //
+ BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
+ //
+ myDS->InsertShapeAndAncestorsSuccessors(aVnew, anASSeq);
+ nVnew=myDS->NumberOfInsertedShapes();
+ myDS->SetState (nVnew, BooleanOperations_ON);
+ //
+ // interferences
+ aIt.Initialize(aLIV);
+ for (; aIt.More(); aIt.Next()) {
+ aWith=aIt.Value();
+ BOPTools_VVInterference aVV(aWhat, aWith);
+ aVV.SetNewShape(nVnew);
+ anIndexIn=aVVs.Append(aVV);
myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexVertex, anIndexIn);
+ //
+ // to find SD-Vertices
+ myVSD.Bind(aWith, nVnew);
}
- }
+ myVSD.Bind(aWhat, nVnew);
+ }//for (; aIt1.More(); aIt1.Next()) {
myIsDone=Standard_True;
}
//=======================================================================
//=======================================================================
void NMTTools_PaveFiller::PerformNewVertices()
{
- myIsDone=Standard_False;
- //
- Standard_Integer i, aNb, anIndex1, anIndex2, aNewShape;
- TopoDS_Vertex aNewVertex;
- BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
- //
- Standard_Integer aNbChains, j, aNbV, aIdV, aNbL;
- TColStd_IndexedMapOfInteger aMapWhole;
- BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMapChains;//aMCV
- TopTools_ListOfShape aLV;
- TopTools_IndexedMapOfShape aM;
- //
- // 1. VV Interferences
- BOPTools_CArray1OfVVInterference& VVs=myIntrPool->VVInterferences();
- //
- NMTTools_Tools::FindChains(VVs, aMapChains);
- //
- aNbChains=aMapChains.Extent();
- for (i=1; i<=aNbChains; ++i) {
- const TColStd_IndexedMapOfInteger& aChain=aMapChains(i);
- //
- aM.Clear();
- aLV.Clear();
- aNbV=aChain.Extent();
- for (j=1; j<=aNbV; ++j) {
- aIdV=aChain(j);
- const TopoDS_Shape& aV=myDS->Shape(aIdV);
- if (!aM.Contains(aV)) {
- aM.Add(aV);
- aLV.Append(aV);
- }
- }
- //
- aNbL=aLV.Extent();
- if (aNbL==1){
- aNewShape=aChain(1);
- }
- else if (aNbL>1) {
- //
- // Make new Vertex
- NMTTools_Tools::MakeNewVertex(aLV, aNewVertex);
- // Insert New Vertex in DS;
- // aNewShape is # of DS-line, where aNewVertex is kept
- myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq);
- aNewShape=myDS->NumberOfInsertedShapes();
- //
- // State of New Vertex is ON
- myDS->SetState (aNewShape, BooleanOperations_ON);
- }
- //
- // Insert New Vertex in Interference
- aNb=VVs.Extent();
- for (j=1; j<=aNb; ++j) {
- BOPTools_VVInterference& VV=VVs(j);
- anIndex1=VV.Index1();
- anIndex2=VV.Index2();
- if (aChain.Contains(anIndex1) || aChain.Contains(anIndex2)) {
- VV.SetNewShape(aNewShape);
- }
- }
- }
- myIsDone=Standard_True;
}
-
//=======================================================================
// function: FindSDVertex
// purpose:
//=======================================================================
Standard_Integer NMTTools_PaveFiller::FindSDVertex(const Standard_Integer nV)const
{
- Standard_Integer i, aNb, anIndex1, anIndex2, aNewShape=0;
-
- BOPTools_CArray1OfVVInterference& VVs=myIntrPool->VVInterferences();
- aNb=VVs.Extent();
-
- for (i=1; i<=aNb; i++) {
- const BOPTools_VVInterference& VV=VVs(i);
- anIndex1=VV.Index1();
- anIndex2=VV.Index2();
- if (nV==anIndex1 || nV==anIndex2) {
- aNewShape=VV.NewShape();
- return aNewShape;
- }
+ Standard_Integer nVSD;
+ //
+ nVSD=0;
+ if (myVSD.IsBound(nV)) {
+ nVSD=myVSD.Find(nV);
}
- return aNewShape;
+ return nVSD;
}
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
+#include <TopoDS_Iterator.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <NMTDS_ShapesDataStructure.hxx>
//
+// Modified Thu Sep 14 14:35:18 2006
+// Contribution of Samtech www.samcef.com BEGIN
#include <BOPTools_IndexedMapOfCoupleOfInteger.hxx>
#include <BOPTools_CoupleOfInteger.hxx>
+#include <BooleanOperations_OnceExplorer.hxx>
+//
+static
+ Standard_Boolean Contains(const TopoDS_Edge& aE,
+ const TopoDS_Vertex& aV);
+// Contribution of Samtech www.samcef.com END
//=======================================================================
// function: PrepareEdges
// purpose:
}
// Edge
aE2=TopoDS::Edge(myDS->Shape(aWith));
- //
if (BRep_Tool::Degenerated(aE2)){
continue;
}
if (iSDV) {
nV1=iSDV;
aV1=TopoDS::Vertex(myDS->Shape(nV1));
+ // Modified to find same domain vertex Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ Standard_Integer nVE, iSDVE, iRet;
+ //
+ BooleanOperations_OnceExplorer aExp(*myDS);
+ iRet=0;
+ aExp.Init(aWith, TopAbs_VERTEX);
+ for (; aExp.More(); aExp.Next()) {
+ nVE=aExp.Current();
+ iSDVE=FindSDVertex(nVE);
+ if (iSDVE==iSDV) {
+ iRet=1;
+ break;
+ }
+ }
+ if (iRet) {
+ continue;
+ }
+ }
+ else {
+ if (Contains(aE2, aV1)) {
+ continue;
+ }
+ // Contribution of Samtech www.samcef.com END
}
//
aFlag=myContext.ComputeVE (aV1, aE2, aT);
//
if (!aFlag) {
- //
// Add Interference to the Pool
BOPTools_VEInterference anInterf (aWhat, aWith, aT);
anIndexIn=aVEs.Append(anInterf);
}
myIsDone=Standard_True;
}
-
-/*
-// A
-//
- // cto900/M2
- // Some of Edges can be [Semi] Infinite. Such Edges have no
- // vertices on correspondant INF ends. So we must provide
- // these vertices formally (to obtain Shrunk Ranges for e.g).
- // In reality this vertex(-es) does not belong to the INF Edge.
- // It just has reference in the DS.
- // PKV Tue Apr 23 10:21:45 2002
- {
- Standard_Real aT1, aT2, aTolE;
- Standard_Boolean bInf1, bInf2;
- gp_Pnt aPx;
- TopoDS_Vertex aVx;
- BRep_Builder aBB;
- BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
- //
- aTolE=BRep_Tool::Tolerance(aE);
- Handle(Geom_Curve) aC3D=BRep_Tool::Curve (aE, aT1, aT2);
- bInf1=Precision::IsNegativeInfinite(aT1);
- bInf2=Precision::IsPositiveInfinite(aT2);
-
- if (bInf1) {
- aC3D->D0(aT1, aPx);
- aBB.MakeVertex(aVx, aPx, aTolE);
- myDS->InsertShapeAndAncestorsSuccessors(aVx, anASSeq);
- nV=myDS->NumberOfInsertedShapes();
- BOPTools_Pave aPave(nV, aT1);
- aPaveSet.Append (aPave);
- }
-
- if (bInf2) {
- aC3D->D0(aT2, aPx);
- aBB.MakeVertex(aVx, aPx, aTolE);
- myDS->InsertShapeAndAncestorsSuccessors(aVx, anASSeq);
- nV=myDS->NumberOfInsertedShapes();
- BOPTools_Pave aPave(nV, aT2);
- aPaveSet.Append (aPave);
- }
- }
-*/
+// Modified Thu Sep 14 14:35:18 2006
+// Contribution of Samtech www.samcef.com BEGIN
+//=======================================================================
+//function : Contains
+//purpose :
+//=======================================================================
+Standard_Boolean Contains(const TopoDS_Edge& aE,
+ const TopoDS_Vertex& aV)
+{
+ Standard_Boolean bRet;
+ TopoDS_Iterator aIt;
+ //
+ bRet=Standard_False;
+ aIt.Initialize(aE);
+ for (; aIt.More(); aIt.Next()) {
+ const TopoDS_Shape& aVE=aIt.Value();
+ if (aVE.IsSame(aV)) {
+ bRet=!bRet;
+ break;
+ }
+ }
+ return bRet;
+}
+// Contribution of Samtech www.samcef.com END
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
#include <BOPTools_CArray1OfVSInterference.hxx>
#include <NMTDS_ShapesDataStructure.hxx>
+#include <TopExp_Explorer.hxx>
+// Modified Thu Sep 14 14:35:18 2006
+// Contribution of Samtech www.samcef.com BEGIN
+static
+ Standard_Boolean Contains(const TopoDS_Face& aF,
+ const TopoDS_Vertex& aV);
+// Contribution of Samtech www.samcef.com END
//=======================================================================
// function: PerformVF
// purpose:
//
aF2=TopoDS::Face(myDS->Shape(aWith));
//
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ if (Contains(aF2, aV1)) {
+ continue;
+ }
+ // Contribution of Samtech www.samcef.com END
+ //
aFlag=myContext.ComputeVS (aV1, aF2, aU, aV);
//
if (!aFlag) {
}
myIsDone=Standard_True;
}
+// Modified Thu Sep 14 14:35:18 2006
+// Contribution of Samtech www.samcef.com BEGIN
+//=======================================================================
+//function : Contains
+//purpose :
+//=======================================================================
+Standard_Boolean Contains(const TopoDS_Face& aF,
+ const TopoDS_Vertex& aV)
+{
+ Standard_Boolean bRet;
+ TopExp_Explorer aExp;
+ //
+ bRet=Standard_False;
+ aExp.Init(aF, TopAbs_VERTEX);
+ for (; aExp.More(); aExp.Next()) {
+ const TopoDS_Shape& aVF=aExp.Current();
+ if (aVF.IsSame(aV)) {
+ bRet=!bRet;
+ break;
+ }
+ }
+ return bRet;
+}
+// Contribution of Samtech www.samcef.com END
#include <NMTTools_PaveFiller.ixx>
//
+// Modified Thu Sep 14 14:35:18 2006
+// Contribution of Samtech www.samcef.com BEGIN
+#include <TColStd_ListOfInteger.hxx>
+#include <TColStd_ListIteratorOfListOfInteger.hxx>
+#include <BRepBndLib.hxx>
+#include <BOPTools_CArray1OfVSInterference.hxx>
+#include <BOPTools_VSInterference.hxx>
+// Contribution of Samtech www.samcef.com END
+
#include <stdio.h>
#include <Precision.hxx>
+#include <NCollection_UBTreeFiller.hxx>
+
#include <TColStd_MapOfInteger.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
+#include <TColStd_ListIteratorOfListOfInteger.hxx>
+#include <TColStd_MapOfInteger.hxx>
+
+#include <gp_XYZ.hxx>
+#include <gp_Pnt.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Compound.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
+#include <TopTools_DataMapOfShapeListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_DataMapOfShapeShape.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <Bnd_Box.hxx>
+#include <BRepBndLib.hxx>
#include <IntTools_ShrunkRange.hxx>
#include <IntTools_Range.hxx>
#include <BooleanOperations_KindOfInterference.hxx>
#include <NMTDS_ShapesDataStructure.hxx>
+#include <NMTDS_IndexedDataMapOfIntegerShape.hxx>
+#include <NMTDS_IndexedDataMapOfShapeBox.hxx>
+#include <NMTDS_BoxBndTree.hxx>
#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
#include <NMTTools_ListOfCommonBlock.hxx>
#include <NMTTools_CommonBlock.hxx>
#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
-//
+
+static
+ void TreatNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI,
+ TopTools_DataMapOfShapeListOfShape& myImages,
+ TopTools_DataMapOfShapeShape& myOrigins);
+
+static
+ void MakeNewVertex(const TopTools_ListOfShape& aLV,
+ TopoDS_Vertex& aNewVertex);
+
+
+
static
void VertexParameters(const IntTools_CommonPrt& aCPart,
Standard_Real& aT1,
Standard_Boolean IsOnPave(const Standard_Real& aT1,
const IntTools_Range& aRange,
const Standard_Real& aTolerance);
+static
+ void EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB);
+
static
void ProcessBlock(const BOPTools_PaveBlock& aPB,
const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB,
static
void FindChains(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB,
NMTTools_ListOfCommonBlock& aLCB);
-
//=======================================================================
// function: PerformEE
// purpose:
Standard_Boolean bJustAdd;
Standard_Integer n1, n2, anIndexIn, nE1, nE2, aNbVEs, aBlockLength;
Standard_Integer aTmp, aWhat, aWith, i, aNbCPrts, aDiscretize=30;
+ Standard_Integer aNbLPB1, aNbLPB2;
Standard_Real aTolE1, aTolE2, aDeflection=0.01;
BOPTools_ListIteratorOfListOfPaveBlock anIt1, anIt2;
TopoDS_Edge aEWhat, aEWith;
continue;
}
//
- const TopoDS_Edge& aE1=TopoDS::Edge(myDS->Shape(nE1));
- const TopoDS_Edge& aE2=TopoDS::Edge(myDS->Shape(nE2));
+ const TopoDS_Edge aE1=TopoDS::Edge(myDS->Shape(nE1));//mpv
+ const TopoDS_Edge aE2=TopoDS::Edge(myDS->Shape(nE2));//mpv
+
//
if (BRep_Tool::Degenerated(aE1) || BRep_Tool::Degenerated(aE2)){
continue;
aTolE2=BRep_Tool::Tolerance(aE2);
//
BOPTools_ListOfPaveBlock& aLPB1=mySplitShapesPool(myDS->RefEdge(nE1));
+ BOPTools_ListOfPaveBlock& aLPB2=mySplitShapesPool(myDS->RefEdge(nE2));
+ //
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ aNbLPB1=aLPB1.Extent();
+ aNbLPB2=aLPB2.Extent();
+
+ //if (aE1.IsSame(aE2) && aNbLPB1==1 && aNbLPB2==1) {
+ // continue;
+ //}
+ // Contribution of Samtech www.samcef.com END
//
for (anIt1.Initialize(aLPB1); anIt1.More(); anIt1.Next()) {
BOPTools_PaveBlock& aPB1=anIt1.Value();
const IntTools_Range& aSR1=aShrunkRange1.ShrunkRange();
const Bnd_Box& aBB1=aShrunkRange1.BndBox();
//
- BOPTools_ListOfPaveBlock& aLPB2=mySplitShapesPool(myDS->RefEdge(nE2));
- //
for (anIt2.Initialize(aLPB2); anIt2.More(); anIt2.Next()) {
BOPTools_PaveBlock& aPB2=anIt2.Value();
const IntTools_ShrunkRange& aShrunkRange2=aPB2.ShrunkRange();
//
EENewVertices (aMapVI);
EECommonBlocks(aMapCB);
- //
+ // Modified to invoke new nethod Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ PerformVF1();
+ // Contribution of Samtech www.samcef.com BEGIN
myIsDone=Standard_True;
}
//=======================================================================
//=======================================================================
void NMTTools_PaveFiller::EENewVertices (const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI)
{
- Standard_Integer aNb, i, j, aNewShape, aNbEdges, aNbIEE, aNbVV, aNbSimple;
- Standard_Integer aWhat, aWith, i1, i2, nE1, nE2, nE, nV, aFlag;
+ Standard_Integer aNb, aNbVSD, nVnew, nIEE, nE[2], j, iFlag;
Standard_Real aT;
- TopoDS_Compound aCompound;
- BRep_Builder aBB;
- NMTTools_IndexedDataMapOfIndexedMapOfInteger aMNVE, aMNVIEE;
- BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
+ TopoDS_Edge aE;
+ TopTools_DataMapOfShapeListOfShape myImages;
+ TopTools_DataMapOfShapeShape myOrigins;
+ TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
+ TopTools_ListIteratorOfListOfShape aIt;
+ BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
+ TColStd_MapOfInteger aMFence;
BOPTools_Pave aPave;
- TopoDS_Vertex aNewVertex;
- TopTools_IndexedMapOfShape aMNVComplex, aMNVSimple;
//
BOPTools_CArray1OfEEInterference& aEEs=myIntrPool->EEInterferences();
//
aNb=aMapVI.Extent();
- //
if (!aNb) { // no new vertices, no new problems
return;
}
//
// 0.
if (aNb==1) {
- aNewVertex=TopoDS::Vertex(aMapVI.FindKey(1));
- EENewVertices(aNewVertex, aMapVI);
+ TopoDS_Vertex aV1=TopoDS::Vertex(aMapVI.FindKey(1));
+ EENewVertices(aV1, aMapVI);
return;
}
//
- // 1. Make compound from new vertices
- aBB.MakeCompound(aCompound);
- for (i=1; i<=aNb; ++i) {
- const TopoDS_Shape& aV=aMapVI.FindKey(i);
- aBB.Add(aCompound, aV);
- }
- //
- // 2. VV intersection between these vertices
- // using the auxiliary Filler
- NMTDS_ShapesDataStructure tDS;
+ // 1.
+ TreatNewVertices(aMapVI, myImages, myOrigins);
//
- tDS.SetCompositeShape(aCompound);
- tDS.Init();
- //
- BOPTools_InterferencePool tInterfPool(tDS);
- NMTTools_PaveFiller tPaveFiller(tInterfPool);
+ aItIm.Initialize(myImages);
+ for (; aItIm.More(); aItIm.Next()) {
+ const TopoDS_Vertex& aVnew=TopoDS::Vertex(aItIm.Key());
+ const TopTools_ListOfShape& aLVSD=aItIm.Value();
+ //
+ aNbVSD=aLVSD.Extent();
+ if (aNbVSD==1) {// simple case aVnew=aVold
+ EENewVertices(aVnew, aMapVI);
+ continue;
+ }
+ //
+ // aNbVSD>1
+ myDS->InsertShapeAndAncestorsSuccessors(aVnew, anASSeq);
+ nVnew=myDS->NumberOfInsertedShapes();
+ myDS->SetState(nVnew, BooleanOperations_ON);
+ //
+ aMFence.Clear();
+ aIt.Initialize(aLVSD);
+ for (; aIt.More(); aIt.Next()) {
+ const TopoDS_Vertex& aVold=TopoDS::Vertex(aIt.Value());
+ nIEE=aMapVI.FindFromKey(aVold);
+ BOPTools_EEInterference& aEE=aEEs(nIEE);
+ aEE.Indices(nE[0], nE[1]);
+ aEE.SetNewShape(nVnew);
+ //
+ for (j=0; j<2; ++j) {
+ if (aMFence.Add(nE[j])) {
+ aE=TopoDS::Edge(myDS->Shape(nE[j]));
+ iFlag=myContext.ComputeVE (aVnew, aE, aT);
+ if (!iFlag) {
+ aPave.SetInterference(-1);
+ aPave.SetType (BooleanOperations_EdgeEdge);
+ aPave.SetIndex(nVnew);
+ aPave.SetParam(aT);
+ //
+ BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE[j]));
+ aPaveSet.Append(aPave);
+ }
+ }// if (aMFence.Add(nE[j])) {
+ }// for (j=0; j<2; ++j) {
+ }//for (; aIt.More(); aIt.Next()) {
+ }// for (; aItIm.More(); aItIm.Next())
+}
+//=======================================================================
+//function : TreatNewVertices
+//purpose :
+//=======================================================================
+void TreatNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI,
+ TopTools_DataMapOfShapeListOfShape& myImages,
+ TopTools_DataMapOfShapeShape& myOrigins)
+{
+ Standard_Integer j, i, aNbV, aIndex, aNbVSD;
+ Standard_Real aTol;
+ TColStd_ListIteratorOfListOfInteger aIt;
+ TopoDS_Shape aSTmp, aVF;
+ TopoDS_Vertex aVnew;
+ TopTools_IndexedMapOfShape aMV, aMVProcessed;
+ TopTools_ListIteratorOfListOfShape aItS;
+ TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
+ TopTools_DataMapOfShapeListOfShape aMVV;
+ NMTDS_IndexedDataMapOfIntegerShape aMIS;
+ NMTDS_IndexedDataMapOfShapeBox aMSB;
//
- tPaveFiller.Init();
//
- tPaveFiller.PerformVV();
- tPaveFiller.PerformNewVertices();
+ NMTDS_BoxBndTreeSelector aSelector;
+ NMTDS_BoxBndTree aBBTree;
+ NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
//
- const BOPTools_CArray1OfVVInterference& aVVInterfs=tInterfPool.VVInterfs();
//
- // 3. Separate Comlex and Simple new vertices
- aNbVV=aVVInterfs.Extent();
- for (i=1; i<=aNbVV; ++i) {
- const BOPTools_VVInterference& aVV=aVVInterfs(i);
- aVV.Indices(aWhat, aWith);
- const TopoDS_Shape& aV1=tDS.Shape(aWhat);
- const TopoDS_Shape& aV2=tDS.Shape(aWith);
- aMNVComplex.Add(aV1);
- aMNVComplex.Add(aV2);
- }
+ myImages.Clear();
+ myOrigins.Clear();
//
- for (i=1; i<=aNb; ++i) {
+ aNbV=aMapVI.Extent();
+ for (i=1; i<=aNbV; ++i) {
const TopoDS_Shape& aV=aMapVI.FindKey(i);
- if (!aMNVComplex.Contains(aV)) {
- aMNVSimple.Add(aV);
- }
+ aMV.Add(aV);
}
//
- // 4. Treat Simple new Vertices
- aNbSimple=aMNVSimple.Extent();
- for (i=1; i<=aNbSimple; ++i) {
- const TopoDS_Vertex& aV=TopoDS::Vertex(aMNVSimple(i));
- EENewVertices(aV, aMapVI);
+ for (i=1; i<=aNbV; ++i) {
+ const TopoDS_Shape& aV=aMV(i);
+ Bnd_Box aBox;
+ //
+ aTol=BRep_Tool::Tolerance(TopoDS::Vertex(aV));
+ aBox.SetGap(aTol);
+ BRepBndLib::Add(aV, aBox);
+ //
+ aTreeFiller.Add(i, aBox);
+ //
+ aMIS.Add(i, aV);
+ aMSB.Add(aV, aBox);
}
//
- // 3. Fill Maps : NewVertex-edges (aMNVE)
- // NewVertex-interferences (aMNVIEE)
- for (i=1; i<=aNbVV; ++i) {
- const BOPTools_VVInterference& aVV=aVVInterfs(i);
- aNewShape=aVV.NewShape();
- if (!aNewShape) {
+ aTreeFiller.Fill();
+ //
+ for (i=1; i<=aNbV; ++i) {
+ const TopoDS_Shape& aV=aMV(i);
+ //
+ if (aMVProcessed.Contains(aV)) {
continue;
}
//
- if (!aMNVE.Contains(aNewShape)) {
- TColStd_IndexedMapOfInteger aMx;
- aMNVE.Add(aNewShape, aMx);
- }
- if (!aMNVIEE.Contains(aNewShape)) {
- TColStd_IndexedMapOfInteger aMx;
- aMNVIEE.Add(aNewShape, aMx);
+ const Bnd_Box& aBoxV=aMSB.FindFromKey(aV);
+ aSelector.Clear();
+ aSelector.SetBox(aBoxV);
+ //
+ aNbVSD=aBBTree.Select(aSelector);
+ if (!aNbVSD) {
+ continue; // it must not be
}
//
- TColStd_IndexedMapOfInteger& aME=aMNVE.ChangeFromKey(aNewShape);
- TColStd_IndexedMapOfInteger& aMIEE=aMNVIEE.ChangeFromKey(aNewShape);
+ // Images
//
- aVV.Indices(aWhat, aWith);
- //aWhat
- const TopoDS_Shape& aV1=tDS.Shape(aWhat);
- i1=aMapVI.FindFromKey(aV1);
- const BOPTools_EEInterference& aEE1=aEEs(i1);
- aEE1.Indices(nE1, nE2);
- aME.Add(nE1);
- aME.Add(nE2);
- aMIEE.Add(i1);
- //aWith
- const TopoDS_Shape& aV2=tDS.Shape(aWith);
- i2=aMapVI.FindFromKey(aV2);
- const BOPTools_EEInterference& aEE2=aEEs(i2);
- aEE2.Indices(nE1, nE2);
- aME.Add(nE1);
- aME.Add(nE2);
- aMIEE.Add(i2);
+ TopTools_ListOfShape aLVSD;
+ //
+ const TColStd_ListOfInteger& aLI=aSelector.Indices();
+ aIt.Initialize(aLI);
+ for (j=0; aIt.More(); aIt.Next(), ++j) {
+ aIndex=aIt.Value();
+ const TopoDS_Shape& aVx=aMIS.FindFromKey(aIndex);
+ if(!j) {
+ aVF=aVx;
+ }
+ aLVSD.Append(aVx);
+ aMVProcessed.Add(aVx);
+ }
//
- //printf(" VV: (%d, %d) -> %d\n", aWhat, aWith, aNewShape);
+ myImages.Bind(aVF, aLVSD);
}
//
- // 4. Process new vertices
- aNb=aMNVE.Extent();
- for (i=1; i<=aNb; ++i) { // xx
- //
- // new Vertex
- nV=aMNVE.FindKey(i);
- aNewVertex=TopoDS::Vertex(tDS.Shape(nV));
- //
- // Insert New Vertex in DS;
- myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq);
- aNewShape=myDS->NumberOfInsertedShapes();
- myDS->SetState (aNewShape, BooleanOperations_ON);
- //
- // Update index of NewShape in EE interferences
- const TColStd_IndexedMapOfInteger& aMIEE=aMNVIEE.FindFromKey(nV);//(i);
- aNbIEE=aMIEE.Extent();
- for (j=1; j<=aNbIEE; ++j) {
- i1=aMIEE(j);
- BOPTools_EEInterference& aEE1=aEEs(i1);
- aEE1.SetNewShape(aNewShape);
+ // Make new vertices
+ aMV.Clear();
+ aItIm.Initialize(myImages);
+ for (; aItIm.More(); aItIm.Next()) {
+ const TopoDS_Shape& aV=aItIm.Key();
+ const TopTools_ListOfShape& aLVSD=aItIm.Value();
+ aNbVSD=aLVSD.Extent();
+ if (aNbVSD>1) {
+ aMV.Add(aV);
+ MakeNewVertex(aLVSD, aVnew);
+ aMVV.Bind(aVnew, aLVSD);
}
- //
- // Update Paves on edges
- const TColStd_IndexedMapOfInteger& aME=aMNVE(i);
- aNbEdges=aME.Extent();
- for (j=1; j<=aNbEdges; ++j) {
- nE=aME(j);
- const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE));
- //
- aFlag=myContext.ComputeVE (aNewVertex, aE, aT);
- //
- if (!aFlag) {
- aPave.SetInterference(-1);
- aPave.SetType (BooleanOperations_EdgeEdge);
- aPave.SetIndex(aNewShape);
- aPave.SetParam(aT);
- //
- BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE));
- aPaveSet.Append(aPave);
+ }
+ //
+ // UnBind old vertices
+ aNbV=aMV.Extent();
+ for (i=1; i<=aNbV; ++i) {
+ const TopoDS_Shape& aV=aMV(i);
+ myImages.UnBind(aV);
+ }
+ //
+ // Bind new vertices
+ aItIm.Initialize(aMVV);
+ for (; aItIm.More(); aItIm.Next()) {
+ const TopoDS_Shape& aV=aItIm.Key();
+ const TopTools_ListOfShape& aLVSD=aItIm.Value();
+ myImages.Bind(aV, aLVSD);
+ }
+ //
+ // Origins
+ aItIm.Initialize(myImages);
+ for (; aItIm.More(); aItIm.Next()) {
+ const TopoDS_Shape& aV=aItIm.Key();
+ const TopTools_ListOfShape& aLVSD=aItIm.Value();
+ //
+ aItS.Initialize(aLVSD);
+ for (; aItS.More(); aItS.Next()) {
+ const TopoDS_Shape& aVSD=aItS.Value();
+ if (!myOrigins.IsBound(aVSD)) {
+ myOrigins.Bind(aVSD, aV);
}
}
- }// for (i=1; i<=aNb; ++i) {// xx
+ }
+}
+//=======================================================================
+//function : MakeNewVertex
+//purpose :
+//=======================================================================
+void MakeNewVertex(const TopTools_ListOfShape& aLV,
+ TopoDS_Vertex& aNewVertex)
+{
+ Standard_Integer aNbV;
+ Standard_Real aTolV, aD, aDmax;
+ gp_XYZ aGC;
+ gp_Pnt aP3D, aPGC;
+ TopoDS_Vertex aVx;
+ BRep_Builder aBB;
+ TopTools_ListIteratorOfListOfShape aIt;
+ //
+ aNbV=aLV.Extent();
+ if (!aNbV) {
+ return;
+ }
+ //
+ // center of gravity
+ aGC.SetCoord(0.,0.,0.);
+ aIt.Initialize(aLV);
+ for (; aIt.More(); aIt.Next()) {
+ aVx=TopoDS::Vertex(aIt.Value());
+ aP3D=BRep_Tool::Pnt(aVx);
+ aGC+=aP3D.XYZ();
+ }
+ aGC/=(Standard_Real)aNbV;
+ aPGC.SetXYZ(aGC);
+ //
+ // tolerance value
+ aDmax=-1.;
+ aIt.Initialize(aLV);
+ for (; aIt.More(); aIt.Next()) {
+ aVx=TopoDS::Vertex(aIt.Value());
+ aP3D=BRep_Tool::Pnt(aVx);
+ aTolV=BRep_Tool::Tolerance(aVx);
+ aD=aPGC.Distance(aP3D)+aTolV;
+ if (aD>aDmax) {
+ aDmax=aD;
+ }
+ }
+ //
+ aBB.MakeVertex (aNewVertex, aPGC, aDmax);
}
//=======================================================================
// function:EENewVertices
Standard_Real d1121, d1122, d1222, d1221, aTolSum, aCoeff=1.05;
gp_Pnt aP11, aP12, aP21, aP22;
- const TopoDS_Vertex& aV11=TopoDS::Vertex(myDS->Shape(aPB1.Pave1().Index()));
- const TopoDS_Vertex& aV12=TopoDS::Vertex(myDS->Shape(aPB1.Pave2().Index()));
- const TopoDS_Vertex& aV21=TopoDS::Vertex(myDS->Shape(aPB2.Pave1().Index()));
- const TopoDS_Vertex& aV22=TopoDS::Vertex(myDS->Shape(aPB2.Pave2().Index()));
+ const TopoDS_Vertex aV11=TopoDS::Vertex(myDS->Shape(aPB1.Pave1().Index()));//mpv
+ const TopoDS_Vertex aV12=TopoDS::Vertex(myDS->Shape(aPB1.Pave2().Index()));//mpv
+ const TopoDS_Vertex aV21=TopoDS::Vertex(myDS->Shape(aPB2.Pave1().Index()));//mpv
+ const TopoDS_Vertex aV22=TopoDS::Vertex(myDS->Shape(aPB2.Pave2().Index()));//mpv
aTolV11=BRep_Tool::Tolerance(aV11);
aTolV12=BRep_Tool::Tolerance(aV12);
}
}
}
+ // Modified to provide the order of edges
+ // in common block where the edge with max
+ // tolerance value will be the first
+ // Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ Standard_Integer i, iMax, aNb, aNbCB, nSp;
+ Standard_Real aTolSp, aTolMax;
+ BOPTools_ListOfPaveBlock *pLPBE;
+ //
+ aNb=myDS->NumberOfShapesOfTheObject();
+ for (nE=1; nE<=aNb; ++nE) {
+ const TopoDS_Shape& aE=myDS->Shape(nE);
+ if (aE.ShapeType()!=TopAbs_EDGE) {
+ continue;
+ }
+ //
+ NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE));
+ aNbCB=aLCBE.Extent();
+ if (!aNbCB) {
+ continue;
+ }
+ //
+ anIt.Initialize(aLCBE);
+ for (; anIt.More(); anIt.Next()) {
+ NMTTools_CommonBlock& aCBE=anIt.Value();
+ const BOPTools_ListOfPaveBlock& aLPBE=aCBE.PaveBlocks();
+ //
+ aTolMax=-1.;
+ anItLPE.Initialize(aLPBE);
+ for (i=0; anItLPE.More(); anItLPE.Next(), ++i) {
+ const BOPTools_PaveBlock& aPB=anItLPE.Value();
+ nSp=aPB.OriginalEdge();
+ const TopoDS_Edge& aSp=TopoDS::Edge(myDS->Shape(nSp));
+ aTolSp=BRep_Tool::Tolerance(aSp);
+ if (aTolSp>aTolMax) {
+ iMax=i;
+ aTolSp=aTolMax;
+ }
+ }
+ //
+ BOPTools_ListOfPaveBlock aLPBx;
+ //
+ anItLPE.Initialize(aLPBE);
+ for (i=0; anItLPE.More(); anItLPE.Next(), ++i) {
+ const BOPTools_PaveBlock& aPB=anItLPE.Value();
+ if (i==iMax) {
+ aLPBx.Prepend(aPB);
+ }
+ else {
+ aLPBx.Append(aPB);
+ }
+ }
+ //
+ pLPBE=(BOPTools_ListOfPaveBlock *)&aLPBE;
+ pLPBE->Clear();
+ pLPBE->Append(aLPBx);
+ }//for (; anIt.More(); anIt.Next()) {
+ }//for (nE=1; nE<=aNb; ++nE) {
+ // Contribution of Samtech www.samcef.com END
}
//=======================================================================
// function: RemoveCommonBlocks
ProcessBlock(aPBx, aMapCB, aProcessedBlocks, aChain);
}
}
+// Modified to provide VS interference between
+// vertex as result of EE and a Face of argument
+// Thu Sep 14 14:35:18 2006
+// Contribution of Samtech www.samcef.com BEGIN
+//=======================================================================
+// function: PerformVF1
+// purpose:
+//=======================================================================
+ void NMTTools_PaveFiller::PerformVF1()
+{
+ Standard_Integer i, aNbEE, n1, n2, nNewShape, aNbS, nF;
+ Standard_Integer anIndexIn, aFlag;
+ Standard_Real aU, aV;
+ TColStd_ListOfInteger aLFI;
+ TColStd_ListIteratorOfListOfInteger aItLFI;
+ //
+ BOPTools_CArray1OfVSInterference& aVSs=myIntrPool->VSInterferences();
+ BOPTools_CArray1OfEEInterference& aEEs=myIntrPool->EEInterferences();
+ //
+ aNbS=myDS->NumberOfShapesOfTheObject();
+ for (i=1; i<=aNbS; ++i) {
+ const TopoDS_Shape& aF=myDS->Shape(i);
+ if (aF.ShapeType()==TopAbs_FACE) {
+ aLFI.Append(i);
+ }
+ }
+ if (!aLFI.Extent()) {
+ return;
+ }
+ //
+ aNbEE=aEEs.Extent();
+ for (i=1; i<=aNbEE; ++i) {
+ BOPTools_EEInterference& aEE=aEEs(i);
+ aEE.Indices(n1, n2);
+ nNewShape=aEE.NewShape();
+ if (!nNewShape) {
+ continue;
+ }
+ //
+ const TopoDS_Shape& aSnew=myDS->Shape(nNewShape);
+ if (aSnew.ShapeType()!=TopAbs_VERTEX) {
+ continue;
+ }
+ //
+ const TopoDS_Vertex& aVnew=TopoDS::Vertex(aSnew);
+ //
+ Bnd_Box aBV;
+ //
+ BRepBndLib::Add(aVnew, aBV);
+ //
+ aItLFI.Initialize(aLFI);
+ for (; aItLFI.More(); aItLFI.Next()) {
+ nF=aItLFI.Value();
+ //
+ const TopoDS_Face& aF=TopoDS::Face(myDS->Shape(nF));
+ const Bnd_Box& aBF=myDS->GetBoundingBox(nF);
+ if (aBF.IsOut(aBV)) {
+ continue;
+ }
+ //
+ anIndexIn=0;
+ aFlag=myContext.ComputeVS (aVnew, aF, aU, aV);
+ if (!aFlag) {
+ BOPTools_VSInterference anInterf (nNewShape, nF, aU, aV);
+ //
+ anIndexIn=aVSs.Append(anInterf);
+ BOPTools_VSInterference& aVS=aVSs(anIndexIn);
+ aVS.SetNewShape(nNewShape);//->
+ }
+ }
+ }
+}
+// Contribution of Samtech www.samcef.com END
#include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
#include <NMTTools_CommonBlockAPI.hxx>
#include <NMTTools_ListOfCommonBlock.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopExp.hxx>
static
void VertexParameter(const IntTools_CommonPrt& aCPart,
Standard_Boolean IsOnPave(const Standard_Real& aTR,
const IntTools_Range& aCPRange,
const Standard_Real& aTolerance);
-
+//
//=======================================================================
// function: PerformEF
// purpose:
BooleanOperations_IndexedDataMapOfShapeInteger aMapVI;
BOPTools_IDMapOfPaveBlockIMapOfInteger aMapCB;
BOPTools_IMapOfPaveBlock aIMPBx;
-
//
BOPTools_CArray1OfESInterference& aEFs=myIntrPool->ESInterferences();
//
continue;
}
// Edge
- const TopoDS_Edge& aE=TopoDS::Edge(myDS->GetShape(nE));
+ const TopoDS_Edge aE=TopoDS::Edge(myDS->GetShape(nE));//mpv
if (BRep_Tool::Degenerated(aE)){
continue;
}
- aTolE=BRep_Tool::Tolerance(aE);
// Face
- const TopoDS_Face& aF=TopoDS::Face(myDS->GetShape(nF));
+ const TopoDS_Face aF=TopoDS::Face(myDS->GetShape(nF));//mpv
+ //
+ // Modified
+ // to avoid intersection between face and edge from that face
+ // Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ TopTools_IndexedMapOfShape aME;
+ //
+ TopExp::MapShapes(aF, TopAbs_EDGE, aME);
+ if (aME.Contains(aE)) {
+ continue;
+ }
+ // Contribution of Samtech www.samcef.com END
+ //
aTolF=BRep_Tool::Tolerance(aF);
+
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ aTolE=BRep_Tool::Tolerance(aE);
+ // Contribution of Samtech www.samcef.com END
+
const Bnd_Box& aBBF=myDS->GetBoundingBox(nF);
//
// Process each PaveBlock on edge nE
aNbEdges=aME.Extent();
for (j=1; j<=aNbEdges; ++j) {
nE=aME(j);
- const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE));
+ const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));//mpv
//
aFlag=myContext.ComputeVE (aNewVertex, aE, aT);
//
aNbV=aMVF.Extent();
for (i=1; i<=aNbV; ++i) {
nVF=aMVF(i);
- const TopoDS_Vertex& aVF=TopoDS::Vertex(myDS->Shape(nVF));
+ const TopoDS_Vertex aVF=TopoDS::Vertex(myDS->Shape(nVF));//mpv
iFlag=IntTools_Tools::ComputeVV(aNewVertex, aVF);
if (!iFlag) {
return nVF;
+//
+// IMPROVED by NIZNHY-PKV Thu Oct 12 16:03:33 2006
+//
// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
#include <TColStd_MapOfInteger.hxx>
#include <Geom2d_Curve.hxx>
-#include <Geom2d_TrimmedCurve.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepBndLib.hxx>
-#include <BRepLib.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <NMTDS_ShapesDataStructure.hxx>
#include <NMTTools_IndexedDataMapOfShapePaveBlock.hxx>
#include <NMTTools_CommonBlockAPI.hxx>
+#include <Geom2d_Curve.hxx>
#include <NMTTools_Tools.hxx>
+#include <BRepLib.hxx>
+#include <Geom2d_TrimmedCurve.hxx>
+//
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TopoDS_Vertex.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TColStd_ListOfInteger.hxx>
+////
+#include <NMTTools_DataMapOfIntegerListOfPaveBlock.hxx>
+#include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
+#include <TColStd_ListIteratorOfListOfInteger.hxx>
+#include <NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx>
+#include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
+#include <TColStd_MapOfInteger.hxx>
+#include <TColStd_MapIteratorOfMapOfInteger.hxx>
+#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
+#include <TColStd_ListOfInteger.hxx>
+#include <TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger.hxx>
+#include <TColStd_ListIteratorOfListOfInteger.hxx>
+#include <NMTTools_MapOfPaveBlock.hxx>
static
Standard_Boolean IsPairFound(const Standard_Integer nF1,
Standard_Boolean IsFound(const TColStd_IndexedMapOfInteger& aMapWhat,
const TColStd_IndexedMapOfInteger& aMapWith);
+// Modified Thu Sep 14 14:35:18 2006
+// Contribution of Samtech www.samcef.com BEGIN
+static
+ void SharedEdges1(const TopoDS_Face& aF1,
+ const TopoDS_Face& aF2,
+ TopTools_ListOfShape& aLS);
+// Contribution of Samtech www.samcef.com END
//=======================================================================
// function: PerformFF
continue;
}
//
- const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1));
- const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2));
+ const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));//mpv
+ const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));//mpv
//
// FF
bToApproxC3d = mySectionAttribute.Approximation();
{
myIsDone=Standard_False;
//
- Standard_Boolean bIsExistingPaveBlock, bIsValidIn2D;
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ Standard_Boolean bIsExistingPaveBlock, bIsValidIn2D, bIsCoincided;
+ // Contribution of Samtech www.samcef.com END
+ //
Standard_Integer i, aNbFFs, nF1, nF2, aBid=0;
Standard_Integer nV1, nV2, j, aNbCurves;
Standard_Real aTolR3D, aTol2D, aT1, aT2, aTolPPC=Precision::PConfusion();
//
BOPTools_CArray1OfSSInterference& aFFs=myIntrPool->SSInterferences();
//
+ aNbFFs=aFFs.Extent();
+ //
+ NMTTools_DataMapOfIntegerListOfPaveBlock aMFInOn;
+ NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock aItMF;
+ //---
+ {
+ Standard_Integer aNbS, aNbF, nF, aNbOn, nSp;
+ TopAbs_ShapeEnum aType;
+ BOPTools_ListIteratorOfListOfPaveBlock anItPB;
+ NMTTools_ListIteratorOfListOfCommonBlock aItCB;
+ TColStd_ListIteratorOfListOfInteger aItF;
+ //
+ aNbS=myDS->NumberOfShapesOfTheObject();
+ for (i=1; i<=aNbS; ++i) {
+ const TopoDS_Shape& aS=myDS->Shape(i);
+ aType=aS.ShapeType();
+ //
+ if (aType==TopAbs_EDGE) {
+ const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(i));
+ aItCB.Initialize(aLCB);
+ for (; aItCB.More(); aItCB.Next()) {
+ const NMTTools_CommonBlock& aCB=aItCB.Value();
+ const BOPTools_PaveBlock &aPB1=aCB.PaveBlock1();
+ //
+ const TColStd_ListOfInteger& aLF=aCB.Faces();
+ aNbF=aLF.Extent();
+ if (aNbF) {
+ aItF.Initialize(aLF);
+ for (; aItF.More(); aItF.Next()) {
+ nF=aItF.Value();
+ if (aMFInOn.IsBound(nF)) {
+ BOPTools_ListOfPaveBlock& aLPB=aMFInOn.ChangeFind(nF);
+ aLPB.Append(aPB1);
+ }
+ else {
+ BOPTools_ListOfPaveBlock aLPB;
+ aLPB.Append(aPB1);
+ aMFInOn.Bind(nF, aLPB);
+ }
+ }
+ }// if (aNbF) {
+ } // for (; aItCB.More(); aItCB.Next()) {
+ }//if (aS.ShapeType()==TopAbs_EDGE) {
+ //
+ else if (aType==TopAbs_FACE) {
+ BOPTools_ListOfPaveBlock aLPBOn;
+ //
+ nF=i;
+ RealSplitsFace(nF, aLPBOn);
+ //
+ aNbOn=aLPBOn.Extent();
+ if (aNbOn) {
+ if (aMFInOn.IsBound(nF)) {
+ BOPTools_ListOfPaveBlock& aLPB=aMFInOn.ChangeFind(nF);
+ aLPB.Append(aLPBOn);
+ }
+ else {
+ aMFInOn.Bind(nF, aLPBOn);
+ }
+ }
+ }
+ } // for (i=1; i<=aNbS; ++i) {
+ //
+ // Refine ListOfPaveBlocks
+ aItMF.Initialize(aMFInOn);
+ for(; aItMF.More(); aItMF.Next()) {
+ TColStd_MapOfInteger aMTmp;
+ BOPTools_ListOfPaveBlock aLPBX;
+ //
+ nF=aItMF.Key();
+ BOPTools_ListOfPaveBlock& aLPB=aMFInOn.ChangeFind(nF);
+ anItPB.Initialize(aLPB);
+ for (; anItPB.More(); anItPB.Next()) {
+ const BOPTools_PaveBlock& aPB=anItPB.Value();
+ nSp=aPB.Edge();
+ if (aMTmp.Add(nSp)) {
+ aLPBX.Append(aPB);
+ }
+ }
+ aLPB.Clear();
+ aLPB.Append(aLPBX);
+ }
+ }
+ //---
+ //
// 1. Produce Section Edges from intersection curves
// between each pair of faces
//
aNbFFs=aFFs.Extent();
+ //
for (i=1; i<=aNbFFs; ++i) {
+
BOPTools_SSInterference& aFFi=aFFs(i);
//
// Faces
aFFi.Indices(nF1, nF2);
- const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1));
- const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2));
+ const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));//mpv
+ const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));//mpv
//
- BOPTools_ListOfPaveBlock aLPB, aLPBC;
+ BOPTools_ListOfPaveBlock aLPB;
//
+ //---
{
- Standard_Integer nFj1, nFj2, nE;
- TColStd_IndexedMapOfInteger aMFence;
- BOPTools_ListOfPaveBlock aLPBCx;
+ BOPTools_ListIteratorOfListOfPaveBlock anItPB;
+ NMTTools_MapOfPaveBlock aMPB;
//
- for (j=1; j<=aNbFFs; ++j) {
- BOPTools_SSInterference& aFFj=aFFs(j);
- aFFj.Indices(nFj1, nFj2);
- //
- if ((nF1==nFj1 && nFj2!=nF2) ||
- (nF1==nFj2 && nFj1!=nF2) ||
- (nF2==nFj1 && nFj2!=nF1) ||
- (nF2==nFj2 && nFj1!=nF1)) {
- RealSplitsInFace (aBid, nFj1, nFj2, aLPBCx);
- RealSplitsInFace (aBid, nFj2, nFj1, aLPBCx);
- RealSplitsOnFace (aBid, nFj1, nFj2, aLPBCx);
+ if (aMFInOn.IsBound(nF1)) {
+ const BOPTools_ListOfPaveBlock& aLPBF1=aMFInOn.Find(nF1);
+ anItPB.Initialize(aLPBF1);
+ for (; anItPB.More(); anItPB.Next()) {
+ const BOPTools_PaveBlock& aPB=anItPB.Value();
+ if (aMPB.Add(aPB)) {
+ aLPB.Append(aPB);
+ }
}
}
- //
- anIt.Initialize(aLPBCx);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPBCx=anIt.Value();
- //
- nE=aPBCx.Edge();
- if (!aMFence.Contains(nE)) {
- aMFence.Add(nE);
- aLPBC.Append(aPBCx);
+ if (aMFInOn.IsBound(nF2)) {
+ const BOPTools_ListOfPaveBlock& aLPBF2=aMFInOn.Find(nF2);
+ anItPB.Initialize(aLPBF2);
+ for (; anItPB.More(); anItPB.Next()) {
+ const BOPTools_PaveBlock& aPB=anItPB.Value();
+ if (aMPB.Contains(aPB)) {
+ aFFi.AppendBlock(aPB);
+ }
+ else {
+ aLPB.Append(aPB);
+ }
}
}
}
+ //---
//
- //
- RealSplitsInFace (aBid, nF1, nF2, aLPB);
- RealSplitsInFace (aBid, nF2, nF1, aLPB);
- RealSplitsOnFace (aBid, nF1, nF2, aLPB);
- //
- anIt.Initialize(aLPB);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPB=anIt.Value();
- aFFi.AppendBlock(aPB);
- }
+ TopTools_ListOfShape aLSE;
+ TColStd_ListOfInteger aLNE;
+ SharedEdges(nF1, nF2, aLNE, aLSE);
+ aFFi.SetSharedEdges(aLNE);
//
BOPTools_SequenceOfCurves& aSCvs=aFFi.Curves();
aNbCurves=aSCvs.Length();
continue;
}
//
+ // Contribution of Samtech www.samcef.com END
aTolR3D=aFFi.TolR3D();
aTol2D=(aTolR3D < 1.e-3) ? 1.e-3 : aTolR3D;
//
BOPTools_PaveSet aPSF;
//
- PrepareSetForFace (nF1, nF2, aLPBC, aPSF);
- //PrepareSetForFace (nF1, nF2, aPSF);
+ PrepareSetForFace (nF1, nF2, aLPB, aPSF);
//
// Put Paves On Curves
for (j=1; j<=aNbCurves; ++j) {
}
//
// 1
- const BOPTools_ListOfPaveBlock& aLPBFF=aFFi.PaveBlocks();
- bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLPBFF, aTolR3D);
- //bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aFFi);
+
+ bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLPB, aTolR3D);
if (bIsExistingPaveBlock) {
continue;
}
+ //
+ bIsCoincided=CheckCoincidence(aPBNew, aLPB);
+ if(bIsCoincided) {
+ continue;
+ }
+ //
+ // Modified
+ // to provide checking whether aPBNew already exists in list
+ // of section edges aLSE
+ // Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
// 2
- bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLPBC, aTolR3D);
+ bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLSE, aTolR3D);
if (bIsExistingPaveBlock) {
continue;
}
+ // Contribution of Samtech www.samcef.com END
+ //
// Checking of validity in 2D
//
bIsValidIn2D=myContext.IsValidBlockForFaces(aT1, aT2, aIC, aF1, aF2, aTol2D);
continue;
}
//
- //aBC.AppendNewBlock(aPBNew);
//
// Make Section Edge
TopoDS_Edge aES;
//
- const TopoDS_Vertex& aV1=TopoDS::Vertex(myDS->Shape(nV1));
- const TopoDS_Vertex& aV2=TopoDS::Vertex(myDS->Shape(nV2));
+ const TopoDS_Vertex aV1=TopoDS::Vertex(myDS->Shape(nV1));//mpv
+ const TopoDS_Vertex aV2=TopoDS::Vertex(myDS->Shape(nV2));//mpv
//
BOPTools_Tools::MakeSectEdge (aIC, aV1, aT1, aV2, aT2, aES);
//
+ //modified by NIZNHY-PKV Thu Nov 16 11:13:46 2006f SKL/PartC5
+ {
+ Handle(Geom2d_Curve) aC2D1, aC2D2;
+ //
+ aC2D1=aIC.FirstCurve2d();
+ aC2D2=aIC.SecondCurve2d();
+ //
+ NMTTools_Tools::MakePCurve(aES, aF1, aC2D1);
+ NMTTools_Tools::MakePCurve(aES, aF2, aC2D2);
+ NMTTools_Tools::UpdateEdge (aES, aTolR3D);
+ }
+
+ //
+ /*
{
Standard_Real aTolR2D;
+ Handle(Geom2d_Curve) aC2D1, aC2D2;
//
aTolR2D=aFFi.TolR2D();
- Handle(Geom2d_Curve) aC2D1=aIC.FirstCurve2d();
- Handle(Geom2d_Curve) aC2D2=aIC.SecondCurve2d();
+ aC2D1=aIC.FirstCurve2d();
+ aC2D2=aIC.SecondCurve2d();
//
NMTTools_Tools::MakePCurve(aES, aF1, aC2D1, aTolR2D);
NMTTools_Tools::MakePCurve(aES, aF2, aC2D2, aTolR2D);
}
+ */
+ //modified by NIZNHY-PKV Thu Nov 16 11:17:34 2006t
//
aMEPB.Add(aES, aPBNew);
aMapEI.Add(aES, i);
}
+
} // end of for (j=1; j<=aNbCurves; ++j)
}// for (i=1; i<=aNbFFs; ++i)
//=============================================================
for (j=1; j<=aNbSE; ++j) {
const BOPTools_PaveBlock& aPBSE=aMEPB(j);
nV1=aPBSE.Pave1().Index();
- const TopoDS_Shape& aV1=myDS->Shape(nV1);
+ const TopoDS_Shape aV1=myDS->Shape(nV1);//mpv
if (aV1.IsSame(aV)) {
aMNewOld.Add(i, nV1);
break;
}
nV2=aPBSE.Pave2().Index();
- const TopoDS_Shape& aV2=myDS->Shape(nV2);
+ const TopoDS_Shape aV2=myDS->Shape(nV2);//mpv
if (aV2.IsSame(aV)) {
aMNewOld.Add(i, nV2);
break;
BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
//
nV1=aPBSE.Pave1().Index();
- const TopoDS_Shape& aV1=myDS->Shape(nV1);
+ const TopoDS_Shape aV1=myDS->Shape(nV1);//mpv
nV2=aPBSE.Pave2().Index();
- const TopoDS_Shape& aV2=myDS->Shape(nV2);
+ const TopoDS_Shape aV2=myDS->Shape(nV2);//mpv
//
anASSeq.SetNewSuccessor(nV1);
anASSeq.SetNewOrientation(aV1.Orientation());
nF1=aPBSE.Face1();
nF2=aPBSE.Face2();
//
- //modified by NIZNHY-PKV Thu Jan 26 10:17:04 2006f
- //const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1));
- //const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2));
- //modified by NIZNHY-PKV Thu Jan 26 10:17:08 2006t
- //
const NMTTools_ListOfCommonBlock& aLCB=aCBP(tDS.RefEdge(i));
NMTTools_CommonBlockAPI aCBAPI(aLCB);
//
for (; aIt.More(); aIt.Next()) {
BOPTools_PaveBlock aPB=aIt.Value();
//
- ////modified by NIZNHY-PKV Thu Jan 26 10:16:36 2006f
- const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1));
- const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2));
- ////modified by NIZNHY-PKV Thu Jan 26 10:16:39 2006t
+ const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));
+ const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));
//
if (aCBAPI.IsCommonBlock(aPB)) {
// it can be Common Block
const TopoDS_Edge& aEx=TopoDS::Edge(tDS.Shape(mE));
aTolEx=BRep_Tool::Tolerance(aEx);
//
- // <- Block A was here
- //
aF1FWD=aF1;
aF1FWD.Orientation(TopAbs_FORWARD);
- NMTTools_Tools::MakePCurve(aEx, aF1FWD, aC2D1, aTolEx);
- //
aF2FWD=aF2;
aF2FWD.Orientation(TopAbs_FORWARD);
- NMTTools_Tools::MakePCurve(aEx, aF2FWD, aC2D2, aTolEx);
+ //
+ //modified by NIZNHY-PKV Thu Nov 16 12:49:13 2006f SKL/PartC5
+ //NMTTools_Tools::MakePCurve(aEx, aF1FWD, aC2D1, aTolEx);
+ //NMTTools_Tools::MakePCurve(aEx, aF2FWD, aC2D2, aTolEx);
+ NMTTools_Tools::MakePCurve(aEx, aF1FWD, aC2D1);
+ NMTTools_Tools::MakePCurve(aEx, aF2FWD, aC2D2);
+ NMTTools_Tools::UpdateEdge (aEx, aTolEx);
+ //modified by NIZNHY-PKV Thu Nov 16 12:49:24 2006t
} //if (aCBAPI.IsCommonBlock(aPB))
//
// new SE
aT1=aPave1.Param();
mV1=aPave1.Index(); // index in tDS
nV1=aMNewOld.FindFromKey(mV1); // index in myDS
- const TopoDS_Shape& aV1=myDS->Shape(nV1);
+ const TopoDS_Shape aV1=myDS->Shape(nV1);//mpv
//
const BOPTools_Pave& aPave2=aPB.Pave2();
aT2=aPave2.Param();
mV2=aPave2.Index();
nV2=aMNewOld.FindFromKey(mV2);
- const TopoDS_Shape& aV2=myDS->Shape(nV2);
+ const TopoDS_Shape aV2=myDS->Shape(nV2);//mpv
//
if (!aMNewOld.Contains(mE)) {
// add new SE to the myDS
BOPTools_SSInterference& aFF=aFFs(i);
aFF.Indices(nF1, nF2);
//
- const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1));
- const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2));
+ const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));//mpv
+ const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));//mpv
//
aF1FWD=aF1;
aF1FWD.Orientation(TopAbs_FORWARD);
for (; anIt.More(); anIt.Next()) {
const BOPTools_PaveBlock& aPB=anIt.Value();
nE=aPB.Edge();
- const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE));
+ const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));//mpv
BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF1FWD);
BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF2FWD);
return bFlag;
}
//=======================================================================
+// function: IsExistingPaveBlock
+// purpose:
+//=======================================================================
+ Standard_Boolean NMTTools_PaveFiller::IsExistingPaveBlock(const BOPTools_PaveBlock& aPBNew,
+ const TopTools_ListOfShape& aLSE,
+ const Standard_Real aTolR3D)
+{
+ Standard_Boolean bFlag;
+ Standard_Integer aNbSE, iC;
+ TopTools_ListIteratorOfListOfShape anIt;
+ //
+ bFlag=Standard_False;
+ //
+ aNbSE=aLSE.Extent();
+ if (!aNbSE) {
+ return bFlag;
+ }
+ //
+ anIt.Initialize(aLSE);
+ for (; anIt.More(); anIt.Next()) {
+ const TopoDS_Edge& aE=TopoDS::Edge(anIt.Value());
+ iC=CheckIntermediatePoint(aPBNew, aE, aTolR3D);
+ if (!iC) {
+ return !bFlag;
+ }
+ }
+ return bFlag;
+}
+//=======================================================================
// function: CheckIntermediatePoint
// purpose:
//=======================================================================
const Standard_Real aTolC)
{
- Standard_Real aT11, aT12, aTM, aTmp;
Standard_Integer iVM, nE2;
+ //
+ nE2=aPBR.Edge();
+ const TopoDS_Edge aE2=TopoDS::Edge(myDS->Shape(nE2));//mpv
+ iVM=CheckIntermediatePoint(aPB, aE2, aTolC);
+ //
+ return iVM;
+}
+//=======================================================================
+// function: CheckIntermediatePoint
+// purpose:
+//=======================================================================
+ Standard_Integer NMTTools_PaveFiller::CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,
+ const TopoDS_Edge& aE2,
+ const Standard_Real aTolC)
+{
+ Standard_Real aT11, aT12, aTM, aTmp;
+ Standard_Integer iVM;
gp_Pnt aPM;
BRep_Builder aBB;
TopoDS_Vertex aVM;
//
aBB.MakeVertex (aVM, aPM, aTolC);
//
- //Edge
- nE2=aPBR.Edge();
- const TopoDS_Edge& aE2=TopoDS::Edge(myDS->GetShape(nE2));
- // VE
iVM=myContext.ComputeVE(aVM, aE2, aTmp);
//
return iVM;
aFFi.Indices(nF1, nF2);
aTolR3D=aFFi.TolR3D();
//
- const TopoDS_Face& aF1=TopoDS::Face(myDS->GetShape(nF1));
- const TopoDS_Face& aF2=TopoDS::Face(myDS->GetShape(nF2));
+ const TopoDS_Face aF1=TopoDS::Face(myDS->GetShape(nF1));//mpv
+ const TopoDS_Face aF2=TopoDS::Face(myDS->GetShape(nF2));//mpv
//
bVF=myContext.IsValidPointForFaces (aP1, aF1, aF2, aTolR3D);
if (bVF) {
TColStd_ListOfInteger& aTVs=aBC.TechnoVertices();
aTVs.Append(nV);
}
-
if (bFound1 && !bFound2) {
nV=aPave1.Index();
aPave.SetIndex(nV);
aPave.SetParam(aT);
aFFiPS.Append(aPave);
//
- const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV));
+ const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));//mpv
BOPTools_Tools::UpdateVertex (aIC, aT, aV);
}
aPave.SetParam(aT);
aCPS.Append(aPave);
//
- const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV));
+ const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));//mpv
BOPTools_Tools::UpdateVertex (aIC, aT, aV);
}
}
for (; anIt.More(); anIt.Next()) {
const BOPTools_Pave& aPC=anIt.Value();
nV=aPC.Index();
- const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV));
+ const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));//mpv
bIsVertex=IntTools_Tools::IsVertex (aP, aTolPV, aV);
if (bIsVertex) {
aPave=aPC;
// function: PrepareSetForFace
// purpose:
//=======================================================================
- void NMTTools_PaveFiller::PrepareSetForFace(const Standard_Integer nF1,
- const Standard_Integer nF2,
+ void NMTTools_PaveFiller::PrepareSetForFace(const Standard_Integer ,//nF1,
+ const Standard_Integer ,//nF2,
const BOPTools_ListOfPaveBlock& aLPBC,
BOPTools_PaveSet& aPSF)
{
Standard_Integer nV1, nV2;
TColStd_MapOfInteger aMap;
- BOPTools_ListOfPaveBlock aLPB1, aLPB2, aLPBS;
BOPTools_ListIteratorOfListOfPaveBlock anIt;
//
- RealSplitsFace(nF1, aLPB1);
- anIt.Initialize(aLPB1);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPB=anIt.Value();
- aLPBS.Append(aPB);
- }
- //
- RealSplitsFace(nF2, aLPB2);
- anIt.Initialize(aLPB2);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPB=anIt.Value();
- aLPBS.Append(aPB);
- }
- //
anIt.Initialize(aLPBC);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPB=anIt.Value();
- aLPBS.Append(aPB);
- }
- //
- anIt.Initialize(aLPBS);
for (; anIt.More(); anIt.Next()) {
const BOPTools_PaveBlock& aPB=anIt.Value();
const BOPTools_Pave& aPave1=aPB.Pave1();
const BOPTools_Pave& aPave=anIt.Value();
//
nV=aPave.Index();
- const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV));
+ const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));//mpv
//
Bnd_Box aBBV;
BRepBndLib::Add(aV, aBBV);
}
return bFlag;
}
-//
-// Block A
-//
- //
- // Commented out by EAP in the frame of PAL9151
- //
-// Standard_Boolean bHasPCOnF, bFound;
-// Standard_Integer nF, k, nEOrx, nF1x, nF2x;
-// Standard_Real aTolEx, aT1x, aT2x;
-// BOPTools_ListIteratorOfListOfPaveBlock aItPBx;
- //
-// for (k=0; k<2; ++k) {
-// nF=(!k) ? nF1 : nF2;
-// const TopoDS_Face& aF=TopoDS::Face(myDS->Shape(nF));
-// //
-// bHasPCOnF=BOPTools_Tools2D::HasCurveOnSurface(aEx, aF);
-// if (bHasPCOnF) {
-// continue;
-// }
-// //
-// bFound=Standard_False;
-// aItPBx.Initialize(aLPBx);
-// for (; aItPBx.More(); aItPBx.Next()) {
-// BOPTools_PaveBlock& aPBx=aIt.Value();
-// nEOrx=aPBx.OriginalEdge();
-// const TopoDS_Shape& aEOrx=tDS.Shape(nEOrx);
-// BOPTools_PaveBlock& aPBSEx=aMEPB.ChangeFromKey(aEOrx);
-// aT1x=aPBSEx.Pave1().Param();
-// aT2x=aPBSEx.Pave2().Param();
-// const IntTools_Curve& aICx=aPBSEx.Curve();
-// //
-// nF1x=aPBSEx.Face1();
-// nF2x=aPBSEx.Face2();
-// //
-// if (nF1x==nF) {
-// Handle(Geom2d_Curve) aC2D1x=aICx.FirstCurve2d();
-// Handle(Geom2d_TrimmedCurve)aC2D1xT =new Geom2d_TrimmedCurve(aC2D1x, aT1x, aT2x);
-// aBB.UpdateEdge(aEx, aC2D1xT, aF, aTolEx);
-// bFound=!bFound;
-// break;
-// }
-// //
-// if (nF2x==nF) {
-// Handle(Geom2d_Curve) aC2D2x=aICx.SecondCurve2d();
-// Handle(Geom2d_TrimmedCurve)aC2D2xT =new Geom2d_TrimmedCurve(aC2D2x, aT1x, aT2x);
-// aBB.UpdateEdge(aEx, aC2D2xT, aF, aTolEx);
-// bFound=!bFound;
-// break;
-// }
-// }
-// if (bFound){
-// BRepLib::SameParameter(aEx, aTolEx, Standard_True);
-// }
-// }
- //
- // The code till the if block end is restored from V2_2_2 revision
+// Modified Thu Sep 14 14:35:18 2006
+// Contribution of Samtech www.samcef.com BEGIN
+//=======================================================================
+//function : SharedEdges1
+//purpose :
+//=======================================================================
+void SharedEdges1(const TopoDS_Face& aF1,
+ const TopoDS_Face& aF2,
+ TopTools_ListOfShape& aLS)
+{
+ Standard_Integer i, aNbE, aNbF;;
+ TopTools_IndexedDataMapOfShapeListOfShape aMEF;
+ //
+ TopExp::MapShapesAndAncestors(aF1, TopAbs_EDGE, TopAbs_FACE, aMEF);
+ TopExp::MapShapesAndAncestors(aF2, TopAbs_EDGE, TopAbs_FACE, aMEF);
+ //
+ aNbE=aMEF.Extent();
+ for (i=1; i<=aNbE; ++i) {
+ const TopTools_ListOfShape& aLF=aMEF.FindFromIndex(i);
+ aNbF=aLF.Extent();
+ if (aNbF>1) {
+ if (aNbF==2) {
+ const TopoDS_Shape& aF1x=aLF.First();
+ const TopoDS_Shape& aF2x=aLF.Last();
+ if (aF1x.IsSame(aF2x)) {
+ continue;
+ }
+ }
+ const TopoDS_Shape& aE=aMEF.FindKey(i);
+ aLS.Append (aE);
+ }
+ }
+}
+//=======================================================================
+// function: CheckCoincidence
+// purpose:
+//=======================================================================
+ Standard_Boolean NMTTools_PaveFiller::CheckCoincidence(const BOPTools_PaveBlock& aPBNew,
+ const BOPTools_ListOfPaveBlock& aLPBFF)
+
+{
+ Standard_Boolean bRet;
+ Standard_Real aTE;
+ Standard_Integer nV11, nV12, nV21, nV22, iVV, iVE, nE2;
+ Standard_Integer iV, iCount, iCountExt;
+ BOPTools_ListIteratorOfListOfPaveBlock anIt;
+ // V11
+ const BOPTools_Pave& aPave11=aPBNew.Pave1();
+ nV11=aPave11.Index();
+ const TopoDS_Vertex& aV11=TopoDS::Vertex(myDS->Shape(nV11));
+
+ // V12
+ const BOPTools_Pave& aPave12=aPBNew.Pave2();
+ nV12=aPave12.Index();
+ const TopoDS_Vertex& aV12=TopoDS::Vertex(myDS->Shape(nV12));
+ //
+ iCountExt=1;
+ iCount=0;
+ anIt.Initialize(aLPBFF);
+ for (; anIt.More(); anIt.Next()) {
+ iCount=0;
+ //
+ const BOPTools_PaveBlock& aPBR=anIt.Value();
+ // V21
+ const BOPTools_Pave& aPave21=aPBR.Pave1();
+ nV21=aPave21.Index();
+
+ // V22
+ const BOPTools_Pave& aPave22=aPBR.Pave2();
+ nV22=aPave22.Index();
+ //modified by NIZNHY-PKV Wed Nov 15 13:08:13 2006f
+ if (nV11==nV21 || nV11==nV22 || nV12==nV21 || nV12==nV22) {
+ continue;
+ }
+ //modified by NIZNHY-PKV Wed Nov 15 13:08:15 2006t
+ // E2
+ nE2=aPBR.Edge();
+ //
+ const TopoDS_Vertex& aV21=TopoDS::Vertex(myDS->Shape(nV21));
+ const TopoDS_Vertex& aV22=TopoDS::Vertex(myDS->Shape(nV22));
+ const TopoDS_Edge& aE2=TopoDS::Edge(myDS->Shape(nE2));
+ //
+ // VV
+ iV=0;
+ iVV=IntTools_Tools::ComputeVV (aV11, aV21);
+ if (!iVV) {
+ iCount++;
+ iV++;
+ if (iCount>iCountExt) {
+ break;
+ }
+ }
+ //
+ iVV=IntTools_Tools::ComputeVV (aV11, aV22);
+ if (!iVV) {
+ iCount++;
+ iV++;
+ if (iCount>iCountExt) {
+ break;
+ }
+ }
+ // VE
+ if (!iV) {
+ iVE=myContext.ComputeVE (aV11, aE2, aTE);
+ if (!iVE) {
+ iCount++;
+ if (iCount>iCountExt) {
+ break;
+ }
+ }
+ }
+ // VV
+ iV=0;
+ iVV=IntTools_Tools::ComputeVV (aV12, aV21);
+ if (!iVV) {
+ iCount++;
+ iV++;
+ if (iCount>iCountExt) {
+ break;
+ }
+ }
+ //
+ iVV=IntTools_Tools::ComputeVV (aV12, aV22);
+ if (!iVV) {
+ iCount++;
+ iV++;
+ if (iCount>iCountExt) {
+ break;
+ }
+ }
+ // VE
+ if (!iV) {
+ iVE=myContext.ComputeVE (aV12, aE2, aTE);
+ if (!iVE) {
+ iCount++;
+ if (iCount>iCountExt) {
+ break;
+ }
+ }
+ }
+ } // next aPBR
+ bRet=(Standard_Boolean)(iCount>iCountExt);
+ return bRet;
+}
+//
+// Contribution of Samtech www.samcef.com END
#include <TopExp.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
+//
+#include <IntTools_SequenceOfPntOn2Faces.hxx>
+#include <IntTools_PntOnFace.hxx>
+#include <IntTools_PntOn2Faces.hxx>
+#include <BOPTools_Tools.hxx>
+#include <TopTools_DataMapOfShapeListOfInteger.hxx>
+#include <TColStd_ListOfInteger.hxx>
+#include <TopoDS_Compound.hxx>
+#include <BRep_Builder.hxx>
+#include <BOPTools_CArray1OfVVInterference.hxx>
+#include <BOPTools_VVInterference.hxx>
+#include <TopTools_DataMapOfShapeShape.hxx>
+#include <TopTools_DataMapOfShapeListOfInteger.hxx>
+#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfInteger.hxx>
+#include <TColStd_MapOfInteger.hxx>
+#include <TColStd_ListIteratorOfListOfInteger.hxx>
+#include <TopTools_DataMapOfIntegerShape.hxx>
+#include <Bnd_HArray1OfBox.hxx>
+#include <Bnd_BoundSortBox.hxx>
+#include <Bnd_Box.hxx>
+#include <BRepBndLib.hxx>
+#include <TopTools_DataMapIteratorOfDataMapOfIntegerShape.hxx>
+#include <TopTools_DataMapOfShapeInteger.hxx>
+#include <TopTools_DataMapIteratorOfDataMapOfShapeInteger.hxx>
+#include <TopTools_DataMapOfShapeInteger.hxx>
+#include <BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx>
+
+// Modified Thu Sep 14 14:35:18 2006
+// Contribution of Samtech www.samcef.com BEGIN
+static
+ void FuseVertices(const TopoDS_Shape& aCompound,
+ TopTools_DataMapOfShapeShape& aDMVV);
+// Contribution of Samtech www.samcef.com END
+
//=======================================================================
// function: MakeSplitEdges
// purpose:
for(i=1; i<=aNbF; ++i) {
nF=aMF(i);
iRankF=myDS->Rank(nF);
- const TopoDS_Shape& aF=myDS->Shape(nF);
+ const TopoDS_Shape aF=myDS->Shape(nF);//mpv
aExp.Init(aF, TopAbs_EDGE);
for(; aExp.More(); aExp.Next()) {
aE=TopoDS::Edge(aExp.Current());
}
}
}
+// Modified
+// to treat Alone Vertices between faces
+// Thu Sep 14 14:35:18 2006
+// Contribution of Samtech www.samcef.com BEGIN
+//=======================================================================
+// function: MakeAloneVertices
+// purpose:
+//=======================================================================
+ void NMTTools_PaveFiller::MakeAloneVertices()
+{
+ Standard_Integer i, aNbFFs, nF1, nF2, j, aNbPnts, nFx, aNbV;
+ Standard_Real aTolF1, aTolF2, aTolSum, aTolV;
+ TColStd_ListIteratorOfListOfInteger aIt;
+ TColStd_ListOfInteger aLI;
+ TopoDS_Vertex aV;
+ TopoDS_Compound aCompound;
+ BRep_Builder aBB;
+ TopTools_DataMapOfShapeListOfInteger aDMVFF, aDMVFF1;
+ TopTools_DataMapIteratorOfDataMapOfShapeListOfInteger aItDMVFF;
+ TopTools_DataMapOfShapeShape aDMVV;
+ TopTools_DataMapOfIntegerShape aDMIV;
+ TopTools_DataMapOfShapeInteger aDMVI;
+ TopTools_DataMapIteratorOfDataMapOfShapeInteger aItDMVI;
+ TopTools_DataMapIteratorOfDataMapOfIntegerShape aItDMIV;
+ //
+ aBB.MakeCompound(aCompound);
+ //
+ myAloneVertices.Clear();
+ //
+ BOPTools_CArray1OfSSInterference& aFFs=myIntrPool->SSInterferences();
+ //
+ // 1. Collect alone vertices from FFs
+ aNbV=0;
+ aNbFFs=aFFs.Extent();
+ for (i=1; i<=aNbFFs; ++i) {
+ BOPTools_SSInterference& aFFi=aFFs(i);
+ aFFi.Indices(nF1, nF2);
+ //
+ const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));//mpv
+ const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));//mpv
+ //
+ aTolF1=BRep_Tool::Tolerance(aF1);
+ aTolF2=BRep_Tool::Tolerance(aF2);
+ aTolSum=aTolF1+aTolF2;
+ //
+ aLI.Clear();
+ aLI.Append(nF1);
+ aLI.Append(nF2);
+ //
+ const IntTools_SequenceOfPntOn2Faces& aSeqAlonePnts=aFFi.AlonePnts();
+ aNbPnts=aSeqAlonePnts.Length();
+ for (j=1; j<=aNbPnts; ++j) {
+ const gp_Pnt& aP=aSeqAlonePnts(j).P1().Pnt();
+ BOPTools_Tools::MakeNewVertex(aP, aTolSum, aV);
+ aDMVFF.Bind(aV, aLI);
+ aBB.Add(aCompound, aV);
+ ++aNbV;
+ }
+ }
+ if (!aNbV) {
+ return;
+ }
+ //
+ // 2. Try to fuse alone vertices themselves;
+ FuseVertices(aCompound, aDMVV);
+ //
+ // if some are fused, replace them by new ones
+ aItDMVFF.Initialize(aDMVFF);
+ for (; aItDMVFF.More(); aItDMVFF.Next()) {
+ const TopoDS_Shape& aVx=aItDMVFF.Key();
+ const TColStd_ListOfInteger& aLIx=aItDMVFF.Value();
+ //
+ if (!aDMVV.IsBound(aVx)) {
+ aDMVFF1.Bind(aVx, aLIx);
+ }
+ else {
+ const TopoDS_Shape& aVy=aDMVV.Find(aVx);
+
+ if (aDMVFF1.IsBound(aVy)) {
+ TColStd_ListOfInteger& aLIy=aDMVFF1.ChangeFind(aVy);
+ aIt.Initialize(aLIx);
+ for(; aIt.More(); aIt.Next()) {
+ nFx=aIt.Value();
+ aLIy.Append(nFx);
+ }
+ }
+ else {
+ aDMVFF1.Bind(aVy, aLIx);
+ }
+ }
+ }
+ aDMVFF.Clear();
+ //
+ // refine lists of faces in aDMVFF1;
+ aItDMVFF.Initialize(aDMVFF1);
+ for (; aItDMVFF.More(); aItDMVFF.Next()) {
+ TColStd_MapOfInteger aMIy;
+ TColStd_ListOfInteger aLIy;
+ //
+ const TopoDS_Shape& aVx=aItDMVFF.Key();
+ TColStd_ListOfInteger& aLIx=aDMVFF1.ChangeFind(aVx);
+ aIt.Initialize(aLIx);
+ for(; aIt.More(); aIt.Next()) {
+ nFx=aIt.Value();
+ if (aMIy.Add(nFx)) {
+ aLIy.Append(nFx);
+ }
+ }
+ aLIx.Clear();
+ aLIx.Append(aLIy);
+ }
+ //==================================
+ //
+ // 3. Collect vertices from DS
+ Standard_Integer aNbS, nV, nVSD, aNbVDS, i1, i2, aNbVSD;
+ //
+ aNbS=myDS->NumberOfShapesOfTheObject();
+ // old shapes
+ for (i=1; i<=aNbS; ++i) {
+ const TopoDS_Shape& aS=myDS->Shape(i);
+ if (aS.ShapeType() != TopAbs_VERTEX){
+ continue;
+ }
+ //
+ nVSD=FindSDVertex(i);
+ nV=(nVSD) ? nVSD : i;
+ const TopoDS_Shape& aVx=myDS->Shape(nV);
+ if (!aDMVI.IsBound(aVx)) {
+ aDMVI.Bind(aVx, nV);
+ }
+ }
+ // new shapes
+ i1=myDS->NumberOfSourceShapes()+1;
+ i2=myDS->NumberOfInsertedShapes();
+ for (i=i1; i<=i2; ++i) {
+ const TopoDS_Shape aS=myDS->Shape(i);//mpv
+ if (aS.ShapeType() != TopAbs_VERTEX){
+ continue;
+ }
+ if (!aDMVI.IsBound(aS)) {
+ aDMVI.Bind(aS, i);
+ }
+ }
+ //
+ // 4. Initialize BoundSortBox on aDMVI
+ //
+ Handle(Bnd_HArray1OfBox) aHAB;
+ Bnd_BoundSortBox aBSB;
+ //
+ aNbVDS=aDMVI.Extent();
+ aHAB=new Bnd_HArray1OfBox(1, aNbVDS);
+ //
+ aItDMVI.Initialize(aDMVI);
+ for (i=1; aItDMVI.More(); aItDMVI.Next(), ++i) {
+ Bnd_Box aBox;
+ //
+ nV=aItDMVI.Value();
+ aV=TopoDS::Vertex(aItDMVI.Key());
+ aTolV=BRep_Tool::Tolerance(aV);
+ aBox.SetGap(aTolV);
+ BRepBndLib::Add(aV, aBox);
+ aHAB->SetValue(i, aBox);
+ //
+ aDMIV.Bind(i, aV);
+ }
+ aBSB.Initialize(aHAB);
+ //
+ // 5. Compare
+ aItDMVFF.Initialize(aDMVFF1);
+ for (; aItDMVFF.More(); aItDMVFF.Next()) {
+ Bnd_Box aBoxV;
+ //
+ const TColStd_ListOfInteger& aLIFF=aItDMVFF.Value();
+ aV=TopoDS::Vertex(aItDMVFF.Key());
+ //
+ aTolV=BRep_Tool::Tolerance(aV);
+ aBoxV.SetGap(aTolV);
+ BRepBndLib::Add(aV, aBoxV);
+ //
+ const TColStd_ListOfInteger& aLIVSD=aBSB.Compare(aBoxV);
+ aNbVSD=aLIVSD.Extent();
+ if (aNbVSD==0) {
+ // add new vertex in DS and update map myAloneVertices
+ BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
+ //
+ myDS->InsertShapeAndAncestorsSuccessors(aV, anASSeq);
+ nV=myDS->NumberOfInsertedShapes();
+ //
+ aIt.Initialize(aLIFF);
+ for (; aIt.More(); aIt.Next()) {
+ nFx=aIt.Value();
+ if (myAloneVertices.Contains(nFx)) {
+ TColStd_IndexedMapOfInteger& aMVx=myAloneVertices.ChangeFromKey(nFx);
+ aMVx.Add(nV);
+ }
+ else {
+ TColStd_IndexedMapOfInteger aMVx;
+ aMVx.Add(nV);
+ myAloneVertices.Add(nFx, aMVx);
+ }
+ }
+ }
+ }
+}
+//=======================================================================
+// function: AloneVertices
+// purpose:
+//=======================================================================
+ const NMTTools_IndexedDataMapOfIndexedMapOfInteger& NMTTools_PaveFiller::AloneVertices()const
+{
+ return myAloneVertices;
+}
+//=======================================================================
+// function: FuseVertices
+// purpose:
+//=======================================================================
+void FuseVertices(const TopoDS_Shape& aCompound,
+ TopTools_DataMapOfShapeShape& aDMVV)
+{
+ Standard_Integer i, aNbVV, n1, n2, nX;
+ NMTDS_ShapesDataStructure tDS;
+ //
+ tDS.SetCompositeShape(aCompound);
+ tDS.Init();
+ //
+ BOPTools_InterferencePool tInterfPool(tDS);
+ NMTTools_PaveFiller tPaveFiller(tInterfPool);
+ //
+ tPaveFiller.Init();
+ //
+ tPaveFiller.PerformVV();
+ tPaveFiller.PerformNewVertices();
+ //
+ const BOPTools_CArray1OfVVInterference& aVVt=tInterfPool.VVInterfs();
+ //
+ aNbVV=aVVt.Extent();
+ for (i=1; i<=aNbVV; ++i) {
+ const BOPTools_VVInterference& aVV=aVVt(i);
+ aVV.Indices(n1, n2);
+ nX=aVV.NewShape();
+ if (nX) {
+ const TopoDS_Shape& aV1=tDS.Shape(n1);
+ const TopoDS_Shape& aV2=tDS.Shape(n2);
+ const TopoDS_Shape& aVx=tDS.Shape(nX);
+ aDMVV.Bind(aV1, aVx);
+ aDMVV.Bind(aV2, aVx);
+ }
+ }
+}
+// Contribution of Samtech www.samcef.com END
#include <NMTTools_PaveFiller.ixx>
+#include <TColStd_MapOfInteger.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <NMTTools_CommonBlock.hxx>
#include <NMTTools_CommonBlockAPI.hxx>
+
+// Modified to add new method Thu Sep 14 14:35:18 2006
+// Contribution of Samtech www.samcef.com BEGIN
+//=======================================================================
+// function: SharedEdges
+// purpose:
+//=======================================================================
+ void NMTTools_PaveFiller::SharedEdges(const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ TColStd_ListOfInteger& aLNE,
+ TopTools_ListOfShape& aLSE)
+{
+ Standard_Integer nE1, nE2;
+ TColStd_MapOfInteger aM1;
+ //
+ BooleanOperations_ShapesDataStructure *pDS=myDS;
+ BooleanOperations_OnceExplorer aExp(*pDS);
+ //
+ aExp.Init(nF1, TopAbs_EDGE);
+ for (; aExp.More(); aExp.Next()) {
+ nE1=aExp.Current();
+ aM1.Add(nE1);
+ }
+
+ aExp.Init(nF2, TopAbs_EDGE);
+ for (; aExp.More(); aExp.Next()) {
+ nE2=aExp.Current();
+ if (aM1.Contains(nE2)) {
+ aLNE.Append(nE2);
+ const TopoDS_Shape& aE2=myDS->Shape(nE2);
+ aLSE.Append(aE2);
+ }
+ }
+}
+// Contribution of Samtech www.samcef.com END
+//
+//=======================================================================
+// function: RealPaveBlock
+// purpose:
+//=======================================================================
+ const BOPTools_PaveBlock& NMTTools_PaveFiller::RealPaveBlock(const BOPTools_PaveBlock& aPB,
+ TColStd_ListOfInteger& aLB)
+{
+ Standard_Integer nE, nSpx;
+ BOPTools_ListIteratorOfListOfPaveBlock aItPBx;
+ //
+ aLB.Clear();
+ nE=aPB.OriginalEdge();
+ const NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE));
+ NMTTools_CommonBlockAPI aCBAPI(aLCBE);
+ if (aCBAPI.IsCommonBlock(aPB)) {
+ NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB);
+ //
+ const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks();
+ aItPBx.Initialize(aLPBx);
+ for (; aItPBx.More(); aItPBx.Next()) {
+ const BOPTools_PaveBlock& aPBx=aItPBx.Value();
+ nSpx=aPBx.Edge();
+ aLB.Append(nSpx);
+ }
+ //
+ const BOPTools_PaveBlock& aPBx=aCB.PaveBlock1();
+ return aPBx;
+ }
+ return aPB;
+}
+//
//=======================================================================
// function: RealPaveBlock
// purpose:
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
+-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License.
+--
+-- This library is distributed in the hope that it will be useful
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
-- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+--
+
-- File: NMTTools_Tools.cdl
-- Created: Mon Dec 8 10:32:34 2003
-- Author: Peter KURNEV
-- <pkv@irinox>
----Copyright: Matra Datavision 2003
class Tools from NMTTools
FindChains(myclass;
aM1: IndexedDataMapOfShapeIndexedMapOfShape from NMTTools;
aM2:out IndexedDataMapOfShapeIndexedMapOfShape from NMTTools);
-
+
+--modified by NIZNHY-PKV Thu Nov 16 10:58:08 2006f
+-- MakePCurve(myclass;
+-- aE : Edge from TopoDS;
+-- aF : Face from TopoDS;
+-- aC2D: Curve from Geom2d;
+-- aTolR2D: Real from Standard);
+
MakePCurve(myclass;
- aE : Edge from TopoDS;
- aF : Face from TopoDS;
- aC2D: Curve from Geom2d;
- aTolR2D: Real from Standard);
+ aE : Edge from TopoDS;
+ aF : Face from TopoDS;
+ aC2D : Curve from Geom2d);
+
+ UpdateEdge(myclass;
+ aE : Edge from TopoDS;
+ aTol : Real from Standard);
+--modified by NIZNHY-PKV Thu Nov 16 10:58:14 2006t
--fields
end Tools;
#include <BRepLib.hxx>
#include <BOPTools_Tools3D.hxx>
#include <TopExp_Explorer.hxx>
+//
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_MapIteratorOfMapOfShape.hxx>
+#include <TopoDS_Iterator.hxx>
static
void ProcessBlock(const Standard_Integer iV,
TopTools_IndexedMapOfShape& aProcessed,
TopTools_IndexedMapOfShape& aChain);
+//modified by NIZNHY-PKV Thu Nov 16 10:46:53 2006f SKL/PartC5
+//=======================================================================
+// function: UpdateEdge
+// purpose:
+//=======================================================================
+ void NMTTools_Tools::UpdateEdge(const TopoDS_Edge& aE,
+ const Standard_Real aTolR)
+{
+ Standard_Real aTolE, aTolES, aTolV;
+ TopoDS_Iterator aIt;
+ BRep_Builder aBB;
+ //
+ aTolE=BRep_Tool::Tolerance(aE);
+ aTolES=Max(aTolR, aTolE);
+ aBB.UpdateEdge(aE, aTolES);
+ //
+ aIt.Initialize(aE);
+ for (; aIt.More(); aIt.Next()) {
+ const TopoDS_Vertex& aV=TopoDS::Vertex(aIt.Value());
+ aTolV=BRep_Tool::Tolerance(aV);
+ if (aTolV<aTolES) {
+ aBB.UpdateVertex(aV, aTolES);
+ }
+ }
+}
+//=======================================================================
+// function: MakePCurve
+// purpose:
+//=======================================================================
+ void NMTTools_Tools::MakePCurve(const TopoDS_Edge& aE,
+ const TopoDS_Face& aF,
+ const Handle(Geom2d_Curve)& aC2Dx1)
+
+{
+ Standard_Real aTolE, aT1, aT2, aOutFirst, aOutLast, aOutTol;
+ Handle(Geom2d_Curve) aC2D, aC2DA;
+ TopoDS_Face aFFWD;
+ BRep_Builder aBB;
+ //
+ aFFWD=aF;
+ aFFWD.Orientation(TopAbs_FORWARD);
+ //
+ aTolE=BRep_Tool::Tolerance(aE);
+ //
+ const Handle(Geom_Curve)& aC3DE=BRep_Tool::Curve(aE, aT1, aT2);
+ Handle(Geom_TrimmedCurve)aC3DETrim=new Geom_TrimmedCurve(aC3DE, aT1, aT2);
+ //
+ aC2D=aC2Dx1;
+ if (aC2D.IsNull()) { // ?
+ BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aFFWD);
+ BOPTools_Tools2D::CurveOnSurface(aE, aFFWD, aC2D, aOutFirst, aOutLast, aOutTol, Standard_True);
+ }
+ //
+ if (aC3DE->IsPeriodic()) {
+ BOPTools_Tools2D::AdjustPCurveOnFace(aFFWD, aT1, aT2, aC2D, aC2DA);
+ }
+ else {
+ BOPTools_Tools2D::AdjustPCurveOnFace(aFFWD, aC3DETrim, aC2D, aC2DA);
+ }
+ //
+ aBB.UpdateEdge(aE, aC2DA, aFFWD, aTolE);
+ BRepLib::SameParameter(aE);
+}
+/*
//=======================================================================
// function: MakePCurve
// purpose:
aBB.UpdateEdge(aE, aC2DA, aFFWD, aTolFact);
BRepLib::SameParameter(aE);
}
-
+*/
+//modified by NIZNHY-PKV Thu Nov 16 10:46:55 2006t
//=======================================================================
// function: IsSplitInOnFace
// purpose:
IntTools_Context& aCtx)
{
Standard_Boolean bFlag;
- Standard_Integer i, aNbE1, aNbE2;
-
- TopTools_IndexedMapOfShape aME1, aME2;
- TopoDS_Edge aEF1, aEF2;
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
+ Standard_Integer aNbE1, aNbE2;
+ Standard_Real aTolF1, aTolF2, aTol;
+ gp_Pnt2d aP2D;
+ gp_Pnt aP;
TopoDS_Face aF1, aF2;
+ TopExp_Explorer aExp;
+ TopTools_MapOfShape aME1, aME2;
+ TopTools_MapIteratorOfMapOfShape aIt;
+ //
+ bFlag=Standard_False;
+ // Contribution of Samtech www.samcef.com END
//
aF1=aF1x;
aF1.Orientation(TopAbs_FORWARD);
aF2=aF2y;
aF2.Orientation(TopAbs_FORWARD);
//
- TopExp::MapShapes(aF1, TopAbs_EDGE, aME1);
- TopExp::MapShapes(aF2, TopAbs_EDGE, aME2);
+ // Modified Thu Sep 14 14:35:18 2006
+ // Contribution of Samtech www.samcef.com BEGIN
//
- bFlag=Standard_False;
+ // 1
+ aExp.Init(aF1, TopAbs_EDGE);
+ for (; aExp.More(); aExp.Next()) {
+ const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current());
+ if (!BRep_Tool::Degenerated(aE)) {
+ aME1.Add(aE);
+ }
+ }
+ //
+ aExp.Init(aF2, TopAbs_EDGE);
+ for (; aExp.More(); aExp.Next()) {
+ const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current());
+ if (!BRep_Tool::Degenerated(aE)) {
+ if (!aME1.Contains(aE)) {
+ return bFlag;
+ }
+ aME2.Add(aE);
+ }
+ }
+ //
+ // Contribution of Samtech www.samcef.com END
//
aNbE1=aME1.Extent();
aNbE2=aME2.Extent();
return bFlag;
}
//
- for (i=1; i<=aNbE1; ++i) {
- const TopoDS_Edge& aE1=TopoDS::Edge(aME1(i));
- if (BRep_Tool::Degenerated(aE1)) {
- // not try to compare deg edges because it
- // can not have same TShape on different faces at all
- continue;
- }
- if (!aME2.Contains(aE1)) {
- return bFlag;
- }
- }
- //
- Standard_Real aTolF1, aTolF2, aTol;
- gp_Pnt2d aP2D;
- gp_Pnt aP;
- TopExp_Explorer anExp;
- //
- aTolF1=BRep_Tool::Tolerance(aF1);
- aTolF2=BRep_Tool::Tolerance(aF2);
- aTol=aTolF1+aTolF2;
- //
- anExp.Init(aF1, TopAbs_EDGE);
- for (; anExp.More(); anExp.Next()) {
- const TopoDS_Edge& aE1=TopoDS::Edge(anExp.Current());
- if (!BRep_Tool::Degenerated(aE1)) {
- BOPTools_Tools3D::PointNearEdge(aE1, aF1, aP2D, aP);
- bFlag=aCtx.IsValidPointForFace(aP, aF2, aTol);
- break;
- }
- }
- return bFlag;
- /*
- //
- Standard_Real aU1, aU2, aV1, aV2;
- Standard_Real dU, dV, aU, aV;
- Standard_Integer aNbP=5, aNbP1, j;
- gp_Pnt2d aP2D;
- gp_Pnt aP;
- //
+ // 2
aTolF1=BRep_Tool::Tolerance(aF1);
aTolF2=BRep_Tool::Tolerance(aF2);
aTol=aTolF1+aTolF2;
//
- BRepTools::UVBounds(aF1, aU1, aU2, aV1, aV2);
- Handle(Geom_Surface) aS1=BRep_Tool::Surface(aF1);
- //
- aNbP1=aNbP+1;
- dU=(aU2-aU1)/aNbP1;
- dV=(aV2-aV1)/aNbP1;
- //
- for (i=1; i<=aNbP; ++i) {
- aU=aU1+i*dU;
- for (j=1; j<=aNbP; ++j) {
- aV=aV1+j*dV;
- aP2D.SetCoord(aU, aV);
- //
- if(aCtx.IsPointInFace(aF1, aP2D)) {
- aP=aS1->Value(aU, aV);
- bFlag=aCtx.IsValidPointForFace(aP, aF2, aTol);
- if (!bFlag) {
- return bFlag;
- }
- }
- }
+ aIt.Initialize(aME1);
+ for (; aIt.More(); aIt.Next()) {
+ const TopoDS_Edge& aE=TopoDS::Edge(aIt.Key());
+ BOPTools_Tools3D::PointNearEdge(aE, aF1, aP2D, aP);
+ bFlag=aCtx.IsValidPointForFace(aP, aF2, aTol);
+ break;
}
- */
//
return bFlag;
}
#include <Standard_Macro.hxx>
#endif
+
class NMTTools_Tools {
public:
}
// Methods PUBLIC
//
+
+
Standard_EXPORT static void MakeNewVertex(const TopTools_ListOfShape& aLV,TopoDS_Vertex& aNewVertex) ;
+
+
Standard_EXPORT static void FindChains(const BOPTools_CArray1OfVVInterference& aVVs,BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
+
+
Standard_EXPORT static void FindChains(const BOPTools_CArray1OfSSInterference& aVVs,BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
+
+
Standard_EXPORT static void FindChains(const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV,BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
+
+
Standard_EXPORT static Standard_Boolean IsSplitInOnFace(const TopoDS_Edge& aE,const TopoDS_Face& aF,IntTools_Context& aCtx) ;
+
+
Standard_EXPORT static Standard_Boolean AreFacesSameDomain(const TopoDS_Face& aF1,const TopoDS_Face& aF2,IntTools_Context& aCtx) ;
+
+
Standard_EXPORT static void FindChains(const NMTTools_ListOfCoupleOfShape& aLCS,NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM) ;
+
+
Standard_EXPORT static void FindChains(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM1,NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM2) ;
-Standard_EXPORT static void MakePCurve(const TopoDS_Edge& aE,const TopoDS_Face& aF,const Handle(Geom2d_Curve)& aC2D,const Standard_Real aTolR2D) ;
+
+
+Standard_EXPORT static void MakePCurve(const TopoDS_Edge& aE,const TopoDS_Face& aF,const Handle(Geom2d_Curve)& aC2D) ;
+
+
+Standard_EXPORT static void UpdateEdge(const TopoDS_Edge& aE,const Standard_Real aTol) ;
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// 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
// Copyright (C) 2005 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
+// 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
+//
+// 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
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+
#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
#endif
#ifndef _GEOM_AISShape_HeaderFile
#define _GEOM_AISShape_HeaderFile
+#include "GEOM_OBJECT_defs.hxx"
+
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
class SALOME_InteractiveObject;
class TopoDS_Shape;
-#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
-#define OBJECT_WNT_EXPORT __declspec( dllexport )
-#else
-#define OBJECT_WNT_EXPORT
-#endif
-class OBJECT_WNT_EXPORT GEOM_AISShape : public SALOME_AISShape {
+class GEOM_OBJECT_EXPORT GEOM_AISShape : public SALOME_AISShape {
public:
-// GEOM_AISTrihedron : Filter for VTK viewer\r
-//\r
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,\r
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS\r
-//\r
-// This library is free software; you can redistribute it and/or\r
-// modify it under the terms of the GNU Lesser General Public\r
-// License as published by the Free Software Foundation; either\r
-// version 2.1 of the License.\r
-//\r
-// This library is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-// Lesser General Public License for more details.\r
-//\r
-// You should have received a copy of the GNU Lesser General Public\r
-// License along with this library; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-//\r
+// GEOM_AISTrihedron : Filter for VTK viewer
+//
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//\r
-//\r
-//\r
-// File : GEOM_AISTrihedron.cxx\r
-// Author : Sergey LITONIN\r
-// Module : SALOME\r
-\r
-#include "GEOM_AISTrihedron.hxx"\r
-#include <Geom_Axis2Placement.hxx>\r
-\r
-IMPLEMENT_STANDARD_HANDLE(GEOM_AISTrihedron, AIS_Trihedron)\r
-IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISTrihedron, AIS_Trihedron)\r
-\r
-/*\r
- Class : GEOM_AISTrihedron\r
- Description : Interactive object for displaying local CS\r
-*/\r
-\r
-GEOM_AISTrihedron::GEOM_AISTrihedron( const Handle(Geom_Axis2Placement)& thePlc )\r
-: AIS_Trihedron( thePlc )\r
-{\r
-\r
-}\r
-Handle(SALOME_InteractiveObject) GEOM_AISTrihedron::getIO()\r
-{\r
- return myObject;\r
-}\r
-Standard_Boolean GEOM_AISTrihedron::hasIO()\r
-{\r
- return !myObject.IsNull();\r
-}\r
-\r
-Standard_CString GEOM_AISTrihedron::getName()\r
-{\r
- return myName.ToCString();\r
-}\r
-void GEOM_AISTrihedron::setName( Standard_CString aName )\r
-{\r
- myName = TCollection_AsciiString( aName );\r
-}\r
-\r
-void GEOM_AISTrihedron::setIO( const Handle(SALOME_InteractiveObject)& theIO )\r
-{\r
- myObject = theIO;\r
-}\r
-\r
-\r
-\r
-\r
-\r
-\r
-
\ No newline at end of file
+//
+//
+//
+// File : GEOM_AISTrihedron.cxx
+// Author : Sergey LITONIN
+// Module : SALOME
+
+#include "GEOM_AISTrihedron.hxx"
+#include <Geom_Axis2Placement.hxx>
+
+IMPLEMENT_STANDARD_HANDLE(GEOM_AISTrihedron, AIS_Trihedron)
+IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISTrihedron, AIS_Trihedron)
+
+/*
+ Class : GEOM_AISTrihedron
+ Description : Interactive object for displaying local CS
+*/
+
+GEOM_AISTrihedron::GEOM_AISTrihedron( const Handle(Geom_Axis2Placement)& thePlc )
+: AIS_Trihedron( thePlc )
+{
+
+}
+Handle(SALOME_InteractiveObject) GEOM_AISTrihedron::getIO()
+{
+ return myObject;
+}
+Standard_Boolean GEOM_AISTrihedron::hasIO()
+{
+ return !myObject.IsNull();
+}
+
+Standard_CString GEOM_AISTrihedron::getName()
+{
+ return myName.ToCString();
+}
+void GEOM_AISTrihedron::setName( Standard_CString aName )
+{
+ myName = TCollection_AsciiString( aName );
+}
+
+void GEOM_AISTrihedron::setIO( const Handle(SALOME_InteractiveObject)& theIO )
+{
+ myObject = theIO;
+}
+
+
+
+
+
+
+
-// GEOM_AISTrihedron : Filter for VTK viewer\r
-//\r
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,\r
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS\r
-//\r
-// This library is free software; you can redistribute it and/or\r
-// modify it under the terms of the GNU Lesser General Public\r
-// License as published by the Free Software Foundation; either\r
-// version 2.1 of the License.\r
-//\r
-// This library is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-// Lesser General Public License for more details.\r
-//\r
-// You should have received a copy of the GNU Lesser General Public\r
-// License along with this library; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-//\r
+// GEOM_AISTrihedron : Filter for VTK viewer
+//
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//\r
-//\r
-//\r
-// File : GEOM_AISTrihedron.hxx\r
-// Author : Sergey LITONIN\r
-// Module : SALOME\r
-\r
-#ifndef GEOM_AISTrihedron_HeaderFile\r
-#define GEOM_AISTrihedron_HeaderFile\r
-\r
-#include <SALOME_InteractiveObject.hxx>\r
-\r
-#include <AIS_Trihedron.hxx>\r
-#include <Standard_DefineHandle.hxx>\r
-#include <TCollection_AsciiString.hxx>\r
-\r
-class Handle(Geom_Axis2Placement);\r
-\r
-DEFINE_STANDARD_HANDLE(GEOM_AISTrihedron, AIS_Trihedron)\r
-\r
-/*\r
- Class : GEOM_AISTrihedron\r
- Description : Interactive object for displaying local CS\r
-*/\r
-\r
-class GEOM_AISTrihedron : public AIS_Trihedron\r
-{\r
-public:\r
-\r
- Standard_EXPORT GEOM_AISTrihedron( const Handle(Geom_Axis2Placement)& );\r
-\r
- Standard_EXPORT Handle(SALOME_InteractiveObject) getIO();\r
- Standard_EXPORT void setIO( const Handle(SALOME_InteractiveObject)& );\r
- Standard_EXPORT Standard_Boolean hasIO();\r
- Standard_EXPORT Standard_CString getName();\r
- Standard_EXPORT void setName( Standard_CString aName );\r
-\r
-private:\r
-\r
- TCollection_AsciiString myName;\r
- Handle(SALOME_InteractiveObject) myObject;\r
-\r
-public:\r
- DEFINE_STANDARD_RTTI(GEOM_AISTrihedron)\r
-};\r
-\r
-#endif\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
+//
+//
+//
+// File : GEOM_AISTrihedron.hxx
+// Author : Sergey LITONIN
+// Module : SALOME
+
+#ifndef GEOM_AISTrihedron_HeaderFile
+#define GEOM_AISTrihedron_HeaderFile
+
+#include <SALOME_InteractiveObject.hxx>
+
+#include <AIS_Trihedron.hxx>
+#include <Standard_DefineHandle.hxx>
+#include <TCollection_AsciiString.hxx>
+
+class Handle(Geom_Axis2Placement);
+
+DEFINE_STANDARD_HANDLE(GEOM_AISTrihedron, AIS_Trihedron)
+
+/*
+ Class : GEOM_AISTrihedron
+ Description : Interactive object for displaying local CS
+*/
+
+class GEOM_AISTrihedron : public AIS_Trihedron
+{
+public:
+
+ Standard_EXPORT GEOM_AISTrihedron( const Handle(Geom_Axis2Placement)& );
+
+ Standard_EXPORT Handle(SALOME_InteractiveObject) getIO();
+ Standard_EXPORT void setIO( const Handle(SALOME_InteractiveObject)& );
+ Standard_EXPORT Standard_Boolean hasIO();
+ Standard_EXPORT Standard_CString getName();
+ Standard_EXPORT void setName( Standard_CString aName );
+
+private:
+
+ TCollection_AsciiString myName;
+ Handle(SALOME_InteractiveObject) myObject;
+
+public:
+ DEFINE_STANDARD_RTTI(GEOM_AISTrihedron)
+};
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef GEOM_ACTOR_H
#define GEOM_ACTOR_H
+#include "GEOM_OBJECT_defs.hxx"
+
#include "SALOME_Actor.h"
//OpenCASCADE
class vtkCamera;
class TopoDS_Shape;
-#ifdef WNT
-#include <SALOME_WNT.hxx>
-#else
-#define SALOME_WNT_EXPORT
-#endif
-
-class SALOME_WNT_EXPORT GEOM_Actor : public SALOME_Actor {
+class GEOM_OBJECT_EXPORT GEOM_Actor : public SALOME_Actor {
public:
vtkTypeMacro(GEOM_Actor,SALOME_Actor);
// Module : GEOM
// $Header$
+#include "GEOM_OBJECT_defs.hxx"
+
#include <vtkAssembly.h>
#include <vtkPropAssembly.h>
#include <vtkActorCollection.h>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
-#ifdef WNT
-#include <SALOME_WNT.hxx>
-#else
-#define SALOME_WNT_EXPORT
-#endif
-
-class SALOME_WNT_EXPORT GEOM_AssemblyBuilder {
+class GEOM_OBJECT_EXPORT GEOM_AssemblyBuilder {
private:
#ifndef GEOM_OCCREADER_H
#define GEOM_OCCREADER_H
+#include "GEOM_OBJECT_defs.hxx"
+
#include <vtkPolyDataSource.h>
class vtkPoints;
#include <GeomAbs_IsoType.hxx>
#include <BRepAdaptor_Surface.hxx>
-#ifdef _WIN_32
-#define VTKOCC_EXPORT __declspec (dllexport)
-#else
-#define VTKOCC_EXPORT
-#endif
-
-class VTKOCC_EXPORT GEOM_OCCReader : public vtkPolyDataSource {
+class GEOM_OBJECT_EXPORT GEOM_OCCReader : public vtkPolyDataSource {
// methods
#ifndef GEOM_VTKTrihedron_H
#define GEOM_VTKTrihedron_H
+#include "GEOM_OBJECT_defs.hxx"
+
#include <Geom_Axis2Placement.hxx>
#include "SALOME_Actor.h"
#include "VTKViewer_Trihedron.h"
-#ifdef WNT
-#include <SALOME_WNT.hxx>
-#else
-#define SALOME_WNT_EXPORT
-#endif
-
-
class vtkActorCollection;
class vtkRenderer;
class vtkPolyDataMapper;
Placement of trihedron is chahged with SetPlacement() method
*/
-class SALOME_WNT_EXPORT GEOM_VTKTrihedron : public SALOME_Actor
+class GEOM_OBJECT_EXPORT GEOM_VTKTrihedron : public SALOME_Actor
{
protected:
GEOM_InteractiveObject.hxx \
Handle_GEOM_InteractiveObject.hxx \
GEOM_AISTrihedron.hxx \
- GEOM_VTKTrihedron.hxx
+ GEOM_VTKTrihedron.hxx \
+ GEOM_OBJECT_defs.hxx
# Libraries targets
RadioButton3->close(TRUE);
// Full partition (contains half-space partition)
- GroupPoints = new DlgRef_4Sel1List1Check_QTD(this, "GroupPoints");
+ GroupPoints = new DlgRef_2Sel1List_QTD(this, "GroupPoints");
GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION"));
- GroupPoints->GroupBox2->setTitle(tr("SUPPRESS_RESULT"));
GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS"));
GroupPoints->TextLabel2->setText(tr("GEOM_TOOL_OBJECT"));
GroupPoints->TextLabel3->setText(tr("GEOM_RECONSTRUCTION_LIMIT"));
- GroupPoints->TextLabel4->setText(tr("GEOM_SUPPRESS_RESULT_INSIDE"));
- GroupPoints->TextLabel5->setText(tr("GEOM_SUPPRESS_RESULT_OUTSIDE"));
- GroupPoints->CheckBox1->setText(tr("GEOM_REMOVE_WEBS"));
GroupPoints->PushButton1->setPixmap(image2);
GroupPoints->PushButton2->setPixmap(image2);
- GroupPoints->PushButton3->setPixmap(image2);
- GroupPoints->PushButton4->setPixmap(image2);
- GroupPoints->PushButton5->setText(tr("GEOM_SET_MATERIALS"));
GroupPoints->LineEdit1->setReadOnly( true );
GroupPoints->LineEdit2->setReadOnly( true );
- GroupPoints->LineEdit3->setReadOnly( true );
- GroupPoints->LineEdit4->setReadOnly( true );
Layout1->addWidget(GroupPoints, 2, 0);
/***************************************************************/
connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
- connect(GroupPoints->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
- connect(GroupPoints->PushButton4, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
- connect(GroupPoints->PushButton5, SIGNAL(clicked()), this, SLOT(SetMaterials()));
connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
- connect(GroupPoints->LineEdit3, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
- connect(GroupPoints->LineEdit4, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
-
- connect(GroupPoints->CheckBox1, SIGNAL(toggled(bool)), this, SLOT(onRemoveWebs(bool)));
connect(GroupPoints->ComboBox1, SIGNAL(activated(int)), this, SLOT(ComboTextChanged()));
resize(0, 0);
GroupPoints->TextLabel3->show();
GroupPoints->ComboBox1->show();
- GroupPoints->GroupBox2->show();
GroupPoints->ComboBox1->setCurrentItem(0);
- GroupPoints->LineEdit3->clear();
- GroupPoints->LineEdit4->clear();
break;
}
case 1: /*Half-space partition */
{
GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION_HALFSPACE"));
- GroupPoints->GroupBox2->hide();
GroupPoints->TextLabel3->hide();
GroupPoints->ComboBox1->hide();
GroupPoints->TextLabel2->setText(tr("GEOM_PLANE"));
myEditCurrentArgument = GroupPoints->LineEdit1;
GroupPoints->LineEdit1->clear();
GroupPoints->LineEdit2->clear();
- onRemoveWebs(false);
myEditCurrentArgument->setFocus();
connect(myGeomGUI->getApp()->selectionMgr(),
}
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 )
myListTools.length( 0 );
- else if ( myEditCurrentArgument == GroupPoints->LineEdit3 )
- myListRemoveInside.length( 0 );
- else if ( myEditCurrentArgument == GroupPoints->LineEdit4 )
- myListKeepInside.length( 0 );
}
// One and only one plane can be selected
if ( !myListTools.length() )
return;
}
- else if(myEditCurrentArgument == GroupPoints->LineEdit3)
- {
- GEOMBase::ConvertListOfIOInListOfGO( selectedIO(), myListRemoveInside, true );
- if (!myListRemoveInside.length())
- return;
- }
- else if(myEditCurrentArgument == GroupPoints->LineEdit4)
- {
- GEOMBase::ConvertListOfIOInListOfGO( selectedIO(), myListKeepInside, true );
- if ( !myListKeepInside.length() )
- return;
- }
myEditCurrentArgument->setText( aString );
}
if( getConstructorId()==1 )
globalSelection( GEOM_PLANE );
}
- else if(send == GroupPoints->PushButton3)
- myEditCurrentArgument = GroupPoints->LineEdit3;
- else if(send == GroupPoints->PushButton4)
- myEditCurrentArgument = GroupPoints->LineEdit4;
globalSelection( GEOM_ALLSHAPES );
QLineEdit* send = (QLineEdit*)sender();
if(send == GroupPoints->LineEdit1 ||
- send == GroupPoints->LineEdit2 ||
- send == GroupPoints->LineEdit3 ||
- send == GroupPoints->LineEdit4 )
+ send == GroupPoints->LineEdit2 )
{
myEditCurrentArgument = send;
GEOMBase_Skeleton::LineEditReturnPressed();
aLimit = GEOM::SHAPE;
if (isValid( msg )) {
- if (aConstructorId == 0 && !toRemoveWebs())
- myListMaterials.length(0);
anObj = GEOM::GEOM_IBooleanOperations::_narrow(getOperation())->
MakePartition(myListShapes, myListTools,
myListKeepInside, myListRemoveInside,
- aLimit, toRemoveWebs(), myListMaterials);
+ aLimit, false, myListMaterials);
res = true;
}
void OperationGUI_PartitionDlg::ComboTextChanged()
{
bool IsEnabled = GroupPoints->ComboBox1->currentItem() < 3;
- GroupPoints->LineEdit3->setEnabled(IsEnabled);
- GroupPoints->LineEdit4->setEnabled(IsEnabled);
- GroupPoints->TextLabel4->setEnabled(IsEnabled);
- GroupPoints->TextLabel5->setEnabled(IsEnabled);
- GroupPoints->PushButton3->setEnabled(IsEnabled);
- GroupPoints->PushButton4->setEnabled(IsEnabled);
-}
-
-
-//=================================================================================
-// function : SetMaterials()
-// purpose :
-//=================================================================================
-void OperationGUI_PartitionDlg::SetMaterials()
-{
- OperationGUI_MaterialDlg* aDlg =
- new OperationGUI_MaterialDlg(myGeomGUI, this, "", myListShapes, true);
- aDlg->show();
-}
-
-
-//=================================================================================
-// function : onRemoveWebs()
-// purpose :
-//=================================================================================
-void OperationGUI_PartitionDlg::onRemoveWebs(bool isChecked)
-{
- if (GroupPoints->CheckBox1->isChecked() != isChecked)
- GroupPoints->CheckBox1->setChecked(isChecked);
-
- GroupPoints->PushButton5->setEnabled(isChecked);
-}
-
-
-//=================================================================================
-// function : toRemoveWebs()
-// purpose :
-//=================================================================================
-bool OperationGUI_PartitionDlg::toRemoveWebs() const
-{
- return GroupPoints->CheckBox1->isChecked();
+ //GroupPoints->LineEdit3->setEnabled(IsEnabled);
+ //GroupPoints->LineEdit4->setEnabled(IsEnabled);
+ //GroupPoints->TextLabel4->setEnabled(IsEnabled);
+ //GroupPoints->TextLabel5->setEnabled(IsEnabled);
+ //GroupPoints->PushButton3->setEnabled(IsEnabled);
+ //GroupPoints->PushButton4->setEnabled(IsEnabled);
}
#define DIALOGBOX_PARTITION_H
#include "GEOMBase_Skeleton.h"
-#include "DlgRef_4Sel1List1Check_QTD.h"
+#include "DlgRef_2Sel1List_QTD.h"
//=================================================================================
// class : OperationGUI_PartitionDlg
private:
void Init();
void enterEvent(QEvent* e);
- bool toRemoveWebs() const;
int GetLimit() const;
GEOM::ListOfGO myListShapes;
GEOM::ListOfGO myListRemoveInside;
GEOM::ListOfGO myListKeepInside;
- DlgRef_4Sel1List1Check_QTD* GroupPoints;
+ DlgRef_2Sel1List_QTD* GroupPoints;
private slots:
void ClickOnOk();
void SelectionIntoArgument();
void SetEditCurrentArgument();
void ComboTextChanged();
- void onRemoveWebs(bool);
- void SetMaterials();
void ConstructorsClicked(int constructorId);
};
// Module : GEOM
// $Header$
-using namespace std;
#include "Partition_Inter2d.ixx"
#include "utilities.h"
static Standard_Integer NbE2d = 0;
#endif
+using namespace std;
+
//=======================================================================
//function : getOtherShape
//purpose :
// Module : GEOM
// $Header$
-using namespace std;
#include "Partition_Inter2d.hxx"
#include "Partition_Inter3d.ixx"
#include "utilities.h"
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
#include <stdio.h>
+using namespace std;
+
//=======================================================================
//function : Partition_Inter3d
//purpose :
// Module : GEOM
// $Header$
-using namespace std;
#include <stdio.h>
#include "Partition_Loop.ixx"
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
+using namespace std;
+
static char* name = new char[100];
static int nbe = 0;
// Module : GEOM
// $Header$
-using namespace std;
#include "Partition_Loop2d.ixx"
#include "utilities.h"
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
+using namespace std;
+
//=======================================================================
//function : Partition_Loop2d
//purpose :
// File : Partition_Loop3d.cxx
// Module : GEOM
-using namespace std;
#include "Partition_Loop3d.ixx"
#include <TopExp_Explorer.hxx>
#include <gp_Dir2d.hxx>
#include <Geom_Curve.hxx>
+using namespace std;
+
//=======================================================================
//function : Partition_Loop3d
//purpose :
// Module : GEOM
// $Header$
-using namespace std;
#include "Partition_Inter2d.hxx"
#include "Partition_Inter3d.hxx"
#include "Partition_Loop2d.hxx"
# include <OSD_Chronometer.hxx>
#endif
+using namespace std;
+
//=======================================================================
//function : isClosed
//purpose : check id a shape is closed, ie is a solid or a closed shell
if (app)
app->onHelpContextModule(myGeomGUI ? app->moduleName(myGeomGUI->moduleName()) : QString(""), myHelpFileName);
else {
+ QString platform;
+#ifdef WIN32
+ platform = "winapplication";
+#else
+ platform = "application";
+#endif
SUIT_MessageBox::warn1
(0, tr("WRN_WARNING"), tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName),
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName),
tr("BUT_OK"));
}
}
if (app)
app->onHelpContextModule(myGeomGUI ? app->moduleName(myGeomGUI->moduleName()) : QString(""), myHelpFileName);
else {
+ QString platform;
+#ifdef WIN32
+ platform = "winapplication";
+#else
+ platform = "application";
+#endif
SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName),
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName),
QObject::tr("BUT_OK"));
}
}
if ( CORBA::is_nil( theObj ) )
return;
- string IOR = myGeomGUI->getApp()->orb()->object_to_string( theObj );
- TCollection_AsciiString asciiIOR( strdup( IOR.c_str() ) );
+ CORBA::String_var IOR = myGeomGUI->getApp()->orb()->object_to_string( theObj );
+ TCollection_AsciiString asciiIOR( (char *)( IOR.in() ) );
myGeomGUI->GetShapeReader().RemoveShapeFromBuffer( asciiIOR );
if ( !getStudy() || !( getStudy()->studyDS() ) )
return;
_PTR(Study) aStudy = getStudy()->studyDS();
- _PTR(SObject) aSObj ( aStudy->FindObjectIOR( IOR ) );
+ _PTR(SObject) aSObj ( aStudy->FindObjectIOR( string( IOR.in() ) ) );
if ( !aSObj )
return;
#include <TopoDS_Shape.hxx>
#ifdef WNT
-#include <SALOME_WNT.hxx>
+ #if defined STEPEXPORT_EXPORTS
+ #if defined WIN32
+ #define STEPEXPORT_EXPORT __declspec( dllexport )
+ #else
+ #define STEPEXPORT_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define STEPEXPORT_EXPORT __declspec( dllimport )
+ #else
+ #define STEPEXPORT_EXPORT
+ #endif
+ #endif
#else
-#define SALOME_WNT_EXPORT
+ #define STEPEXPORT_EXPORT
#endif
//=============================================================================
extern "C"
{
-SALOME_WNT_EXPORT
- int Export(const TopoDS_Shape& theShape,
- const TCollection_AsciiString& theFileName,
- const TCollection_AsciiString& /*theFormatName*/)
+STEPEXPORT_EXPORT
+ int Export(const TopoDS_Shape& theShape, const TCollection_AsciiString& theFileName)
{
MESSAGE("Export STEP into file " << theFileName.ToCString());
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
#ifdef WNT
-#include <SALOME_WNT.hxx>
+ #if defined STEPIMPORT_EXPORTS
+ #if defined WIN32
+ #define STEPIMPORT_EXPORT __declspec( dllexport )
+ #else
+ #define STEPIMPORT_EXPORT
+ #endif
+ #else
+ #if defined WIN32
+ #define STEPIMPORT_EXPORT __declspec( dllimport )
+ #else
+ #define STEPIMPORT_EXPORT
+ #endif
+ #endif
#else
-#define SALOME_WNT_EXPORT
+ #define STEPIMPORT_EXPORT
#endif
//=============================================================================
extern "C"
{
-SALOME_WNT_EXPORT
+STEPIMPORT_EXPORT
TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
const TCollection_AsciiString& /*theFormatName*/,
TCollection_AsciiString& theError)
//=================================================================================
bool TransformationGUI_OffsetDlg::isValid( QString& msg )
{
- return !(myObjects.length() == 0);
+ //return !(myObjects.length() == 0);
+ if (myObjects.length() == 0) return false;
+
+ for (int i = 0; i < myObjects.length(); i++)
+ {
+ GEOM::shape_type aType = myObjects[i]->GetShapeType();
+ if( aType != GEOM::FACE && aType != GEOM::SHELL && aType != GEOM::SOLID ){
+ msg = tr("ERROR_SHAPE_TYPE");
+ return false;
+ }
+ }
+ return true;
}
if (GroupPoints->CheckButton1->isChecked() || IsPreview())
for (int i = 0; i < myObjects.length(); i++)
{
+
anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->OffsetShapeCopy( myObjects[i], GetOffset() );
if ( !anObj->_is_nil() )
objects.push_back( anObj._retn() );
:GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize |
WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{
- QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_ROTATION")));
- QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
+ SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr();
+ QPixmap image0 (aResMgr->loadPixmap("GEOM",tr("ICON_DLG_ROTATION")));
+ QPixmap image1 (aResMgr->loadPixmap("GEOM",tr("ICON_SELECT")));
+ QPixmap image2 (aResMgr->loadPixmap("GEOM",tr("ICON_DLG_ROTATION_THREE_POINTS")));
setCaption(tr("GEOM_ROTATION_TITLE"));
/***************************************************************/
GroupConstructors->setTitle(tr("GEOM_ROTATION"));
RadioButton1->setPixmap(image0);
- RadioButton2->close(TRUE);
+ RadioButton2->setPixmap(image2);
RadioButton3->close(TRUE);
- GroupPoints = new DlgRef_2Sel1Spin2Check(this, "GroupPoints");
+ GroupPoints = new DlgRef_4Sel1Spin2Check(this, "GroupPoints");
GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS"));
GroupPoints->TextLabel2->setText(tr("GEOM_AXIS"));
GroupPoints->TextLabel3->setText(tr("GEOM_ANGLE"));
+ GroupPoints->TextLabel4->setText(tr("GEOM_POINT_I").arg("1"));
+ GroupPoints->TextLabel5->setText(tr("GEOM_POINT_I").arg("2"));
+
GroupPoints->LineEdit1->setReadOnly(true);
GroupPoints->LineEdit2->setReadOnly(true);
+ GroupPoints->LineEdit4->setReadOnly(true);
+ GroupPoints->LineEdit5->setReadOnly(true);
GroupPoints->PushButton1->setPixmap(image1);
GroupPoints->PushButton2->setPixmap(image1);
+ GroupPoints->PushButton4->setPixmap(image1);
+ GroupPoints->PushButton5->setPixmap(image1);
GroupPoints->CheckButton1->setText(tr("GEOM_CREATE_COPY"));
GroupPoints->CheckButton2->setText(tr("GEOM_REVERSE"));
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
-
+ connect(GroupConstructors, SIGNAL(clicked(int)), SLOT(ConstructorsClicked(int)));
+
connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
-
+ connect(GroupPoints->PushButton4, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+ connect(GroupPoints->PushButton5, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+
connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
myEditCurrentArgument = GroupPoints->LineEdit1;
GroupPoints->LineEdit2->clear();
- myAxis = GEOM::GEOM_Object::_nil();
+ myAxis = myCentPoint = myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil();
initName( tr( "GEOM_ROTATION" ) );
+ ConstructorsClicked( 0 );
}
+//=================================================================================
+// function : ConstructorsClicked()
+// purpose : Radio button management
+//=================================================================================
+void TransformationGUI_RotationDlg::ConstructorsClicked(int constructorId)
+{
+ disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
+
+ myEditCurrentArgument = GroupPoints->LineEdit1;
+ globalSelection();
+
+ switch (constructorId)
+ {
+ case 0: /* rotation an object angle and axis */
+ {
+ GroupPoints->ShowRows(2,3,false);
+ resize(0,0);
+ GroupPoints->TextLabel2->setText(tr("GEOM_AXIS"));
+ GroupPoints->LineEdit2->clear();
+ GroupPoints->ShowRows(4,4,true);
+ myAxis = GEOM::GEOM_Object::_nil();
+ break;
+ }
+ case 1: /* rotation an object by 3 points */
+ {
+ GroupPoints->ShowRows(4,4,false);
+ resize(0,0);
+ GroupPoints->ShowRows(2,3,true);
+ GroupPoints->TextLabel2->setText(tr("GEOM_CENTRAL_POINT"));
+ GroupPoints->TextLabel4->setText(tr("GEOM_POINT_I").arg("1"));
+ GroupPoints->TextLabel5->setText(tr("GEOM_POINT_I").arg("2"));
+ GroupPoints->LineEdit2->clear();
+ GroupPoints->LineEdit4->clear();
+ GroupPoints->LineEdit5->clear();
+ myCentPoint = myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil();
+ break;
+ }
+ }
+
+ myEditCurrentArgument->setFocus();
+ connect(myGeomGUI->getApp()->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+}
//=================================================================================
// function : ClickOnOk()
if ( !onAccept( GroupPoints->CheckButton1->isChecked()) )
return false;
- Init();
+ initName();
+ ConstructorsClicked( getConstructorId() );
return true;
}
if (!myObjects.length())
return;
}
- else if(myEditCurrentArgument == GroupPoints->LineEdit2)
+ else
{
if(IObjectCount() != 1)
{
- myAxis = GEOM::GEOM_Object::_nil();
+ if(myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 0)
+ myAxis = GEOM::GEOM_Object::_nil();
+ else if(myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 1)
+ myCentPoint = GEOM::GEOM_Object::_nil();
+ else if(myEditCurrentArgument == GroupPoints->LineEdit4)
+ myPoint1 = GEOM::GEOM_Object::_nil();
+ else if(myEditCurrentArgument == GroupPoints->LineEdit5)
+ myPoint2 = GEOM::GEOM_Object::_nil();
return;
}
+
Standard_Boolean testResult = Standard_False;
- myAxis = GEOMBase::ConvertIOinGEOMObject(firstIObject(), testResult );
- if(!testResult || CORBA::is_nil( myAxis ))
+ GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(firstIObject(), testResult );
+ if(!testResult || CORBA::is_nil( aSelectedObject ))
return;
- aName = GEOMBase::GetName( myAxis );
+
+ if(myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 0)
+ myAxis = aSelectedObject;
+ else if(myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 1)
+ myCentPoint = aSelectedObject;
+ else if(myEditCurrentArgument == GroupPoints->LineEdit4)
+ myPoint1 = aSelectedObject;
+ else if(myEditCurrentArgument == GroupPoints->LineEdit5)
+ myPoint2 = aSelectedObject;
+
+ aName = GEOMBase::GetName( aSelectedObject );
}
myEditCurrentArgument->setText( aName );
}
else if(send == GroupPoints->PushButton2) {
myEditCurrentArgument = GroupPoints->LineEdit2;
- globalSelection( GEOM_LINE );
+ getConstructorId() == 0 ? globalSelection( GEOM_LINE ) :
+ globalSelection( GEOM_POINT );
}
-
+ else if (send == GroupPoints->PushButton4)
+ {
+ myEditCurrentArgument = GroupPoints->LineEdit4;
+ globalSelection( GEOM_POINT );
+ }
+ else if (send == GroupPoints->PushButton5)
+ {
+ myEditCurrentArgument = GroupPoints->LineEdit5;
+ globalSelection( GEOM_POINT );
+ }
+
myEditCurrentArgument->setFocus();
SelectionIntoArgument();
}
GEOMBase_Skeleton::ActivateThisDialog();
connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
- globalSelection();
- GroupPoints->LineEdit1->setFocus();
- myEditCurrentArgument = GroupPoints->LineEdit1;
- GroupPoints->LineEdit2->clear();
- myAxis = GEOM::GEOM_Object::_nil();
+
+ ConstructorsClicked( getConstructorId() );
}
//=================================================================================
bool TransformationGUI_RotationDlg::isValid( QString& msg )
{
- return !(myObjects.length() == 0 || myAxis->_is_nil());
+ switch (getConstructorId())
+ {
+ case 0:
+ {
+ return !(myObjects.length() == 0 || myAxis->_is_nil());
+ break;
+ }
+ case 1:
+ {
+ return !(myObjects.length() == 0 || myCentPoint->_is_nil() || myPoint1->_is_nil() || myPoint2->_is_nil() );
+ break;
+ }
+ default: return false;
+ }
}
bool TransformationGUI_RotationDlg::execute( ObjectList& objects )
{
bool res = false;
-
+ bool toCreateCopy = IsPreview() || GroupPoints->CheckButton1->isChecked();
+
GEOM::GEOM_Object_var anObj;
- if (GroupPoints->CheckButton1->isChecked() || IsPreview())
- for (int i = 0; i < myObjects.length(); i++)
+ switch ( getConstructorId() )
+ {
+ case 0 :
{
- anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateCopy( myObjects[i], myAxis, GetAngle() * PI180 );
- if ( !anObj->_is_nil() )
- objects.push_back( anObj._retn() );
+ if (toCreateCopy)
+ for (int i = 0; i < myObjects.length(); i++)
+ {
+ anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateCopy( myObjects[i], myAxis, GetAngle() * PI180 );
+ if ( !anObj->_is_nil() )
+ objects.push_back( anObj._retn() );
+ }
+ else
+ for (int i = 0; i < myObjects.length(); i++)
+ {
+ anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->Rotate( myObjects[i], myAxis, GetAngle() * PI180 );
+ if ( !anObj->_is_nil() )
+ objects.push_back( anObj._retn() );
+ }
+ res = true;
+ break;
}
- else
- for (int i = 0; i < myObjects.length(); i++)
+ case 1 :
{
- anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->Rotate( myObjects[i], myAxis, GetAngle() * PI180 );
- if ( !anObj->_is_nil() )
- objects.push_back( anObj._retn() );
+ if (toCreateCopy)
+ for (int i = 0; i < myObjects.length(); i++)
+ {
+ anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateThreePointsCopy( myObjects[i], myCentPoint, myPoint1, myPoint2 );
+ if ( !anObj->_is_nil() )
+ objects.push_back( anObj._retn() );
+ }
+ else
+ for (int i = 0; i < myObjects.length(); i++)
+ {
+ anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateThreePoints( myObjects[i], myCentPoint, myPoint1, myPoint2 );
+ if ( !anObj->_is_nil() )
+ objects.push_back( anObj._retn() );
+ }
+ res = true;
+ break;
}
- res = true;
+ }
return res;
}
#define DIALOGBOX_ROTATION_H
#include "GEOMBase_Skeleton.h"
-#include "DlgRef_2Sel1Spin2Check.h"
+#include "DlgRef_4Sel1Spin2Check.h"
//=================================================================================
// class : TransformationGUI_RotationDlg
double GetAngle() const;
GEOM::ListOfGO myObjects;
- GEOM::GEOM_Object_var myAxis;
+ GEOM::GEOM_Object_var myAxis, myCentPoint, myPoint1, myPoint2;
- DlgRef_2Sel1Spin2Check* GroupPoints;
+ DlgRef_4Sel1Spin2Check* GroupPoints;
private slots:
void ClickOnOk();
void SetEditCurrentArgument();
void ValueChangedInSpinBox();
void CreateCopyModeChanged(bool isCreateCopy);
+ void ConstructorsClicked(int constructorId);
void onReverse();
};