#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
-PROJECT_NAME = "SALOME v.3.1.0a"
+PROJECT_NAME = "SALOME v.3.1.0"
PROJECT_NUMBER = id#1.1
OUTPUT_DIRECTORY = ../
CREATE_SUBDIRS = NO
Handle(DDS_DicItem) aDicItem = new DDS_DicItem();
aDicItem->myComponent = this;
- aDicItem->FillDataMap( anID, aQuantity, theComponentData, theDocElement, unitSystems );
+ aDicItem->FillDataMap( anID, aQuantity, theDocElement, unitSystems );
myDataMap.Add( anID, aDicItem );
}
}
Parse record in XML file and retrieve information relevant for this data dic item
*/
void DDS_DicItem::FillDataMap( TCollection_AsciiString theID, const LDOM_Element& theDatum,
- const LDOM_Element& theCompElement, const LDOM_Element& theDocElement,
- const TColStd_SequenceOfAsciiString& theSystems )
+ const LDOM_Element& theDocElement, const TColStd_SequenceOfAsciiString& theSystems )
{
TCollection_AsciiString aLabel = theDatum.getAttribute( DDS_Dictionary::KeyWord( "DATUM_LABEL" ) );
TCollection_AsciiString aFormat = theDatum.getAttribute( DDS_Dictionary::KeyWord( "DATUM_FORMAT" ) );
LDOMString aListId = aListRef.getAttribute( DDS_Dictionary::KeyWord( "VLR_LIST" ) );
aDefV = aListRef.getAttribute( DDS_Dictionary::KeyWord( "VD_DEFV" ) );
aDefV.RemoveAll( ' ' );
- LDOM_Element foundListItem;
- for ( LDOM_Element aListItem = theCompElement.GetChildByTagName( DDS_Dictionary::KeyWord( "VALUE_LIST" ) );
- aListItem != NULL && foundListItem == NULL; aListItem = aListItem.GetSiblingByTagName() )
+ for ( LDOM_Element aListItem = theDocElement.GetChildByTagName( DDS_Dictionary::KeyWord( "VALUE_LIST" ) );
+ aListItem != NULL; aListItem = aListItem.GetSiblingByTagName() )
{
if ( aListItem.getAttribute( DDS_Dictionary::KeyWord( "VALUE_LIST_ID" ) ).equals( aListId ) )
- foundListItem = aListItem;
-
- }
- for ( LDOM_Element aLstItem = theDocElement.GetChildByTagName( DDS_Dictionary::KeyWord( "VALUE_LIST" ) );
- aLstItem != NULL && foundListItem == NULL; aLstItem = aLstItem.GetSiblingByTagName() )
- {
- if ( aLstItem.getAttribute( DDS_Dictionary::KeyWord( "VALUE_LIST_ID" ) ).equals( aListId ) )
- foundListItem = aLstItem;
- }
-
- if ( foundListItem != NULL )
- {
- // The appropriate list of values is found: store the list name
- aListName = foundListItem.getAttribute( DDS_Dictionary::KeyWord( "VALUE_LIST_NAME" ) );
- // Iteration through the list of values
- LDOM_Element aListItemValue = foundListItem.GetChildByTagName( DDS_Dictionary::KeyWord( "VALUE_LIST_VALUE" ) );
- while ( aListItemValue != NULL )
{
- // read value ID
- TCollection_AsciiString aListValueID = aListItemValue.getAttribute( DDS_Dictionary::KeyWord( "VALUE_LIST_VALUEID" ) );
- if ( aListValueID.IsIntegerValue() )
+ // The appropriate list of values is found: store the list name
+ aListName = aListItem.getAttribute( DDS_Dictionary::KeyWord( "VALUE_LIST_NAME" ) );
+ // Iteration through the list of values
+ LDOM_Element aListItemValue = aListItem.GetChildByTagName( DDS_Dictionary::KeyWord( "VALUE_LIST_VALUE" ) );
+ while ( aListItemValue != NULL )
{
- // Read the text in the element "value"
- LDOM_Text aListItemTxt = (const LDOM_Text&)aListItemValue.getFirstChild();
- if ( !aListItemTxt.isNull() )
+ // read value ID
+ TCollection_AsciiString aListValueID = aListItemValue.getAttribute( DDS_Dictionary::KeyWord( "VALUE_LIST_VALUEID" ) );
+ if ( aListValueID.IsIntegerValue() )
{
- // adding ID and text value to sequence
- aSeqOfValueID.Append( aListValueID.IntegerValue() );
- aSeqOfValue.Append( aListItemTxt.getData() );
- // adding icon file name (optional) to sequence
- TCollection_ExtendedString aListValueIcon = aListItemValue.getAttribute( DDS_Dictionary::KeyWord( "VALUE_LIST_VALUEICON" ) );
- aSeqOfValueIconName.Append( aListValueIcon );
+ // Read the text in the element "value"
+ LDOM_Text aListItemTxt = (const LDOM_Text&)aListItemValue.getFirstChild();
+ if ( !aListItemTxt.isNull() )
+ {
+ // adding ID and text value to sequence
+ aSeqOfValueID.Append( aListValueID.IntegerValue() );
+ aSeqOfValue.Append( aListItemTxt.getData() );
+ // adding icon file name (optional) to sequence
+ TCollection_ExtendedString aListValueIcon = aListItemValue.getAttribute( DDS_Dictionary::KeyWord( "VALUE_LIST_VALUEICON" ) );
+ aSeqOfValueIconName.Append( aListValueIcon );
+ }
}
aListItemValue = aListItemValue.GetSiblingByTagName();
}
void operator=( const DDS_DicItem& );
// Assignment operator
- void FillDataMap( TCollection_AsciiString, const LDOM_Element&,
- const LDOM_Element&, const LDOM_Element&,
+ void FillDataMap( TCollection_AsciiString,
+ const LDOM_Element&,const LDOM_Element&,
const TColStd_SequenceOfAsciiString& );
// prepares formants for each unit systems
}
/*!Deactivate module.*/
-bool LightApp_Module::deactivateModule( SUIT_Study* )
+bool LightApp_Module::deactivateModule( SUIT_Study* study )
{
delete mySwitchOp;
mySwitchOp = 0;
- return true;
+ // abort all operations
+ MapOfOperation::const_iterator anIt;
+ for( anIt = myOperations.begin(); anIt != myOperations.end(); anIt++ ) {
+ anIt.data()->abort();
+ }
+
+ return CAM_Module::activateModule( study );
}
/*!NOT IMPLEMENTED*/
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#include "LightApp_OBSelector.h"
#include "LightApp_DataOwner.h"
#include <OB_Browser.h>
#include <SUIT_DataObjectIterator.h>
+#include <qdatetime.h>
/*!
Constructor
*/
void LightApp_OBSelector::getSelection( SUIT_DataOwnerPtrList& theList ) const
{
- if ( !myBrowser )
- return;
-
- DataObjectList objlist;
- myBrowser->getSelected( objlist );
- for ( DataObjectListIterator it( objlist ); it.current(); ++it )
- {
- LightApp_DataObject* obj = dynamic_cast<LightApp_DataObject*>( it.current() );
- if ( obj )
+ if (mySelectedList.count() == 0 ) {
+ if ( !myBrowser )
+ return;
+ DataObjectList objlist;
+ myBrowser->getSelected( objlist );
+ LightApp_OBSelector* that = (LightApp_OBSelector*)this;
+ for ( DataObjectListIterator it( objlist ); it.current(); ++it )
{
- Handle( SALOME_InteractiveObject ) aSObj = new SALOME_InteractiveObject
- ( obj->entry(), obj->componentDataType(), obj->name() );
- LightApp_DataOwner* owner = new LightApp_DataOwner( aSObj );
- theList.append( SUIT_DataOwnerPtr( owner ) );
+ LightApp_DataObject* obj = dynamic_cast<LightApp_DataObject*>( it.current() );
+ if ( obj )
+ {
+ Handle(SALOME_InteractiveObject) aSObj = new SALOME_InteractiveObject
+ ( obj->entry(), obj->componentDataType(), obj->name() );
+ LightApp_DataOwner* owner = new LightApp_DataOwner( aSObj );
+ that->mySelectedList.append( SUIT_DataOwnerPtr( owner ) );
+ }
}
}
+ theList = mySelectedList;
}
/*!Sets selection.*/
/*!On selection changed.*/
void LightApp_OBSelector::onSelectionChanged()
{
+ QTime t1 = QTime::currentTime();
+ mySelectedList.clear();
selectionChanged();
+ QTime t2 = QTime::currentTime();
+ qDebug( QString( "selection time = %1 msecs" ).arg( t1.msecsTo( t2 ) ) );
}
/*!Fill entries.*/
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef LIGHTAPP_OBSELECTOR_H
#define LIGHTAPP_OBSELECTOR_H
#include "LightApp.h"
#include <SUIT_Selector.h>
+#include <SUIT_DataOwner.h>
class OB_Browser;
class LightApp_DataObject;
private:
OB_Browser* myBrowser;
+ SUIT_DataOwnerPtrList mySelectedList;
QMap<QString, LightApp_DataObject*> myEntries;
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#include "LightApp_VTKSelector.h"
#include "LightApp_DataOwner.h"
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef LIGHTAPP_VTKSELECTOR_H
#define LIGHTAPP_VTKSELECTOR_H
BIN =
BIN_SRC =
-CPPFLAGS+=$(PYTHON_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(QT_INCLUDES) $(OGL_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
+CPPFLAGS+=$(PYTHON_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(QT_INCLUDES) $(OGL_INCLUDES)
LDFLAGS+= $(PYTHON_LIBS) $(VTK_LIBS) $(QT_LIBS) $(OGL_LIBS) $(CAS_LDPATH) -lTKV3d -lVTKViewer -lsuit
if( autoOpen )
autoOpenBranches();
- setModified();
-
if ( selNum != numberOfSelected() )
emit selectionChanged();
}
QtxWorkstack.h \
QtxResourceEdit.h \
QtxListView.h \
- QtxDirListEditor.h
+ QtxDirListEditor.h \
+ QtxDblValidator.h
# .po files to transform in .qm
QtxResourceEdit.cxx \
QtxWorkstack.cxx \
QtxListView.cxx \
- QtxDirListEditor.cxx
+ QtxDirListEditor.cxx \
+ QtxDblValidator.cxx
LIB_MOC = \
QtxAction.h \
QtxWorkstack.h \
QtxListView.h \
QtxListResourceEdit.h \
- QtxDirListEditor.h
+ QtxDirListEditor.h \
+ QtxDblValidator.h
RESOURCES_FILES = \
--- /dev/null
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
+// File: QtxDblValidator.cxx
+// Author: Alexandre SOLOVYOV
+
+#include "QtxDblValidator.h"
+
+QtxDblValidator::QtxDblValidator( const double bot, const double top, const int dec,
+ QObject* o, const char* name )
+: QDoubleValidator( bot, top, dec, o, name )
+{
+}
+
+QtxDblValidator::~QtxDblValidator()
+{
+}
+
+void QtxDblValidator::fixup( QString& str ) const
+{
+ bool ok = false;
+ double d = str.toDouble( &ok );
+ if( ok )
+ {
+ if( d<bottom() )
+ str = QString::number( bottom() );
+ else if( d>top() )
+ str = QString::number( top() );
+ }
+ else
+ str = "0";
+}
--- /dev/null
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
+// File: QtxDblValidator.h
+// Author: Alexandre SOLOVYOV
+
+#ifndef QTX_DOUBLE_VALIDATOR
+#define QTX_DOUBLE_VALIDATOR
+
+#include <qvalidator.h>
+
+class QtxDblValidator : public QDoubleValidator
+{
+ Q_OBJECT
+
+public:
+ QtxDblValidator( const double, const double, const int,
+ QObject*, const char* = 0 );
+ ~QtxDblValidator();
+
+ virtual void fixup( QString& ) const;
+};
+
+#endif
return;
if ( study() )
- study()->start( op, false );
+ study()->start( op, check );
else
{
connect( this, SIGNAL( stopped( SUIT_Operation* ) ), op, SLOT( abort() ) );
top_srcdir=@top_srcdir@
top_builddir=../..
srcdir=@srcdir@
-VPATH=.:@srcdir@
+VPATH=.:@srcdir@:@srcdir@/resources
@COMMENCE@
SVTK_Event.h \
SVTK_ViewModelBase.h
+PO_FILES = SVTK_msg_en.po
+
# Libraries targets
LIB = libSVTK.la
$(QT_INCLUDES) \
$(OCC_INCLUDES) \
$(VTK_INCLUDES) \
- $(BOOST_CPPFLAGS) \
- -I$(KERNEL_ROOT_DIR)/include/salome
+ $(BOOST_CPPFLAGS)
LDFLAGS+= \
$(QT_MT_LIBS) \
$(OCC_LIBS) \
- $(VTK_LIBS) \
- -L$(KERNEL_ROOT_DIR)/lib/salome
+ $(VTK_LIBS)
-LIBS+= -lsuit -lCAM -lSalomeObject -lSalomePrs -lVTKViewer -lOpUtil -lToolsGUI -lSalomeDS
+LIBS+= -lqtx -lsuit -lstd -lCAM -lSalomeObject -lSalomePrs -lVTKViewer
-LDFLAGSFORBIN=$(LDFLAGS) $(LIBS) \
- -lqtx -lstd -lSALOMELocalTrace -lSalomeNS -lTOOLSDS -lSalomeHDFPersist -lSalomeDSImpl \
- -lSalomeGenericObj -lSalomeLifeCycleCORBA -lSALOMEBasics -lSalomeContainer \
- -lSalomeResourcesManager -lRegistry -lSalomeNotification
+LDFLAGSFORBIN=$(LDFLAGS) $(LIBS)
@CONCLUDE@
#include <TColStd_MapOfInteger.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
-#include "utilities.h"
-
using namespace std;
-#ifdef _DEBUG_
-static int MYDEBUG = 1;
-#else
-static int MYDEBUG = 0;
-#endif
-
#if defined __GNUC__
#if __GNUC__ == 2
#define __GNUC_2__
myOutline(vtkOutlineSource::New()),
myOutlineActor(VTKViewer_Actor::New())
{
- if(MYDEBUG) MESSAGE("SALOME_Actor::SALOME_Actor - this = "<<this);
-
vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor,
myPolygonOffsetUnits);
SALOME_Actor
::~SALOME_Actor()
{
- if(MYDEBUG) MESSAGE("SALOME_Actor::~SALOME_Actor - this = "<<this);
-
SetPreviewProperty(NULL);
myGeomFilter->UnRegisterAllOutputs();
myHighlightActor->SetVisibility( false );
myOutlineActor->SetVisibility( false );
- if(MYDEBUG) MESSAGE("SALOME_Actor::highlight - this = "<<this<<
- "; theIsHighlight = "<<theIsHighlight<<
- "; mySelectionMode = "<<mySelectionMode);
-
if(mySelector.GetPointer()){
if(mySelectionMode != ActorSelection){
TColStd_IndexedMapOfInteger aMapIndex;
#include <vtkCell.h>
#include <vtkPolyData.h>
-#include "utilities.h"
-
using namespace std;
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
static
void
::SVTK_Actor():
myUnstructuredGrid(vtkUnstructuredGrid::New())
{
- if(MYDEBUG) INFOS("SVTK_Actor - "<<this);
-
myIsShaded = true;
Visibility = Pickable = false;
SVTK_Actor
::~SVTK_Actor()
{
- if(MYDEBUG) INFOS("~SVTK_Actor()");
}
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef SVTK_Functor_H
#define SVTK_Functor_H
#include "SVTK_GenericRenderWindowInteractor.h"
#include "SVTK_Selector.h"
-#include "utilities.h"
-
#include <vtkObjectFactory.h>
#include <vtkCommand.h>
using namespace std;
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
//----------------------------------------------------------------------------
vtkStandardNewMacro(QVTK_GenericRenderWindowInteractor);
QVTK_GenericRenderWindowInteractor
::QVTK_GenericRenderWindowInteractor()
{
- if(MYDEBUG) INFOS("QVTK_GenericRenderWindowInteractor() - "<<this);
myTimer = new QTimer( ) ;
connect(myTimer, SIGNAL(timeout()), this, SLOT(OnTimeOut())) ;
}
QVTK_GenericRenderWindowInteractor
::~QVTK_GenericRenderWindowInteractor()
{
- if(MYDEBUG) INFOS("~QVTK_GenericRenderWindowInteractor() - "<<this);
delete myTimer;
}
::SVTK_GenericRenderWindowInteractor():
myRenderWidget(NULL)
{
- if(MYDEBUG) INFOS("SVTK_GenericRenderWindowInteractor() - "<<this);
}
SVTK_GenericRenderWindowInteractor
::~SVTK_GenericRenderWindowInteractor()
{
- if(MYDEBUG) INFOS("~SVTK_GenericRenderWindowInteractor() - "<<this);
}
SVTK_Selector*
//VRV: porting on Qt 3.0.5
#include <algorithm>
-#include "utilities.h"
-
using namespace std;
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
namespace
{
inline
{
myPicker->Delete();
- if(MYDEBUG) INFOS("SVTK_InteractorStyle() - "<<this);
-
this->MotionFactor = 10.0;
this->State = VTK_INTERACTOR_STYLE_CAMERA_NONE;
this->RadianToDegree = 180.0 / vtkMath::Pi();
SVTK_InteractorStyle
::~SVTK_InteractorStyle()
{
- if(MYDEBUG) INFOS("~SVTK_InteractorStyle() - "<<this);
}
//----------------------------------------------------------------------------
#include <qimage.h>
-#include "utilities.h"
-
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
//----------------------------------------------------------------------------
SVTK_MainWindow
SUIT_ResourceMgr* theResourceMgr) :
QMainWindow(theParent,theName,0)
{
- if(MYDEBUG) INFOS("SVTK_MainWindow() - "<<this);
-
myToolBar = new QToolBar(this);
myToolBar->setCloseMode(QDockWindow::Undocked);
myToolBar->setLabel(tr("LBL_TOOLBAR_LABEL"));
SVTK_MainWindow
::~SVTK_MainWindow()
{
- if(MYDEBUG) INFOS("~SVTK_MainWindow() - "<<this);
}
}
//----------------------------------------------------------------------------
+#if defined(WIN32) && !defined(_DEBUG)
+#pragma optimize( "", off )
+#endif
+
void
SVTK_MainWindow
::createActions(SUIT_ResourceMgr* theResourceMgr)
myCubeAxesDlg = new SVTK_CubeAxesDlg(this,"SVTK_CubeAxesDlg",anAction);
}
+#if defined(WIN32) && !defined(_DEBUG)
+#pragma optimize( "", on )
+#endif
+
//----------------------------------------------------------------------------
void
SVTK_MainWindow
#include "QtxDblSpinBox.h"
#include "QtxAction.h"
-#include "utilities.h"
-
#include <qgroupbox.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qcolordialog.h>
#include <qpaintdevice.h>
-#include "utilities.h"
-
using namespace std;
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-static int MYVTKDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-static int MYVTKDEBUG = 0;
-#endif
-
static bool GENERATE_SUIT_EVENTS = false;
QWidget(theParent,theName,Qt::WNoAutoErase),
myRenderWindow(vtkRenderWindow::New())
{
- if(MYDEBUG) INFOS("QVTK_RenderWindowInteractor() - "<<this);
setMouseTracking(true);
myRenderWindow->Delete();
QVTK_RenderWindowInteractor
::~QVTK_RenderWindowInteractor()
{
- if(MYDEBUG) INFOS("~QVTK_RenderWindowInteractor() - "<<this);
-
if(SVTK_SpaceMouse* aSpaceMouse = SVTK_SpaceMouse::getInstance())
if(aSpaceMouse->isSpaceMouseOn())
aSpaceMouse->close(x11Display());
QVTK_RenderWindowInteractor(theParent,theName),
myEventCallbackCommand(vtkCallbackCommand::New())
{
- if(MYDEBUG) INFOS("SVTK_RenderWindowInteractor() - "<<this);
-
myEventCallbackCommand->Delete();
myEventCallbackCommand->SetClientData(this);
SVTK_RenderWindowInteractor
::~SVTK_RenderWindowInteractor()
{
- if(MYDEBUG) INFOS("~SVTK_RenderWindowInteractor() - "<<this);
-
// Sequence of the destruction call are fixed and should be changed.
// vtkRenderWindow instance should be destroyed after all vtkRenderer's
- if(MYVTKDEBUG){
- getRenderWindow()->DebugOn();
- getRenderer()->DebugOn();
- GetDevice()->DebugOn();
- }
GetDevice()->SetInteractorStyle(NULL);
while(!myInteractorStyles.empty()){
const PInteractorStyle& aStyle = myInteractorStyles.top();
aStyle->SetInteractor(NULL);
- if(MYVTKDEBUG) aStyle->DebugOn();
myInteractorStyles.pop();
}
#undef min
#undef max
-#include "utilities.h"
-
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
//----------------------------------------------------------------------------
vtkStandardNewMacro(SVTK_Renderer);
myTrihedron(SVTK_Trihedron::New()),
myTrihedronSize(105)
{
- if(MYDEBUG) INFOS("SVTK_Renderer() - "<<this);
-
myDevice->Delete();
myTransform->Delete();
SVTK_Renderer
::~SVTK_Renderer()
{
- if(MYDEBUG) INFOS("~SVTK_Renderer() - "<<this);
vtkActorCollection* anActors = GetDevice()->GetActors();
anActors->InitTraversal();
while(vtkActor* anAct = anActors->GetNextActor()){
#include "SALOME_Actor.h"
-#include "utilities.h"
-
#include <TColStd_MapIteratorOfMapOfInteger.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
#include <vtkActorCollection.h>
#include <vtkRenderer.h>
-#include "utilities.h"
-
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
//----------------------------------------------------------------------------
SVTK_SignalHandler
QObject(theMainWindow),
myMainWindow(theMainWindow)
{
- if(MYDEBUG) INFOS("SVTK_SignalHandler() - "<<this);
-
SVTK_RenderWindowInteractor* anInteractor = theMainWindow->GetInteractor();
connect(anInteractor,SIGNAL(KeyPressed(QKeyEvent*)),
SVTK_SignalHandler
::~SVTK_SignalHandler()
{
- if(MYDEBUG) INFOS("~SVTK_SignalHandler() - "<<this);
}
SVTK_MainWindow*
::SVTK_View(SVTK_MainWindow* theMainWindow) :
SVTK_SignalHandler(theMainWindow)
{
- if(MYDEBUG) INFOS("SVTK_View() - "<<this);
}
//----------------------------------------------------------------------------
SVTK_View
::~SVTK_View()
{
- if(MYDEBUG) INFOS("~SVTK_View() - "<<this);
}
//----------------------------------------------------------------
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#include "SVTK_ViewManager.h"
#include "SVTK_ViewModel.h"
-#include <VTKViewer_ViewManager.h>
-
int SVTK_ViewManager::_SVTKViewMgr_Id = 0;
//***************************************************************
void SVTK_ViewManager::setViewName(SUIT_ViewWindow* theView)
{
int aPos = myViews.find(theView);
- theView->setCaption( VTKViewer_ViewManager::tr( "VTK_VIEW_TITLE" ).arg( myId ).arg( aPos + 1 ) );
+ theView->setCaption( tr( "VTK_VIEW_TITLE" ).arg( myId ).arg( aPos + 1 ) );
}
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef SVTK_VIEWMANAGER_H
#define SVTK_VIEWMANAGER_H
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#include <qpopupmenu.h>
#include <qcolordialog.h>
#include "VTKViewer_ViewModel.h"
-#include "SALOME_Actor.h"
-#include "SALOME_InteractiveObject.hxx"
+#include <SALOME_Actor.h>
+#include <SALOME_InteractiveObject.hxx>
// in order NOT TO link with SalomeApp, here the code returns SALOMEDS_Study.
// SalomeApp_Study::studyDS() does it as well, but -- here it is retrieved from
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef SVTK_VIEWMODEL_H
#define SVTK_VIEWMODEL_H
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#include "SALOME_Actor.h"
#include <qapplication.h>
-#include <qpushbutton.h>
-#include <qsplitter.h>
-#include <qlayout.h>
#include <qimage.h>
#include <vtkTextProperty.h>
#include "SUIT_Session.h"
#include "SUIT_ToolButton.h"
#include "SUIT_MessageBox.h"
+#include "SUIT_Accel.h"
#include "SUIT_Tools.h"
#include "SUIT_ResourceMgr.h"
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef SVTK_VIEWWINDOW_H
#define SVTK_VIEWWINDOW_H
return false;
bool isMultiFile = resMgr->booleanValue( "Study", "multi_file", false ),
- isAscii = resMgr->booleanValue( "Study", "ascii_file", false );
- isAscii ? SalomeApp_Application::studyMgr()->SaveAsASCII( theFileName.latin1(), studyDS(), isMultiFile ) :
- SalomeApp_Application::studyMgr()->SaveAs ( theFileName.latin1(), studyDS(), isMultiFile );
+ isAscii = resMgr->booleanValue( "Study", "ascii_file", false ),
+ res = isAscii ?
+ SalomeApp_Application::studyMgr()->SaveAsASCII( theFileName.latin1(), studyDS(), isMultiFile ) :
+ SalomeApp_Application::studyMgr()->SaveAs ( theFileName.latin1(), studyDS(), isMultiFile ) &&
+ CAM_Study::saveDocumentAs( theFileName ) && //SRN: BugID IPAL9377, removed usage of uninitialized variable <res>
+ saveStudyData(theFileName);
- bool res = CAM_Study::saveDocumentAs( theFileName ); //SRN: BugID IPAL9377, removed usage of uninitialized variable <res>
- res = res && saveStudyData(theFileName);
if ( res )
emit saved( this );
return false;
bool isMultiFile = resMgr->booleanValue( "Study", "multi_file", false ),
- isAscii = resMgr->booleanValue( "Study", "ascii_file", false );
- isAscii ? SalomeApp_Application::studyMgr()->SaveASCII( studyDS(), isMultiFile ) :
- SalomeApp_Application::studyMgr()->Save ( studyDS(), isMultiFile );
-
- bool res = CAM_Study::saveDocument();
+ isAscii = resMgr->booleanValue( "Study", "ascii_file", false ),
+ res = isAscii ?
+ SalomeApp_Application::studyMgr()->SaveASCII( studyDS(), isMultiFile ) :
+ SalomeApp_Application::studyMgr()->Save ( studyDS(), isMultiFile ) && CAM_Study::saveDocument();
res = res && saveStudyData(studyName());
if ( res )
<parameter name="xterm" value="no"/>
<parameter name="portkill" value="no"/>
<parameter name="killall" value="no"/>
+ <parameter name="noexcepthandler" value="no"/>
<parameter name="modules" value="GEOM,SMESH,VISU,SUPERV,MED,COMPONENT"/>
<parameter name="pyModules" value=""/>
- <parameter name="embedded" value="SalomeAppEngine,study"/>
- <parameter name="standalone" value="pyContainer,cppContainer,registry,moduleCatalog"/>
+ <parameter name="embedded" value="SalomeAppEngine,study,cppContainer,registry,moduleCatalog"/>
+ <parameter name="standalone" value="pyContainer,supervContainer"/>
</section>
<section name="language">
<parameter name="language" value="en"/>
<parameter name="MED" value="${MED_ROOT_DIR}/share/salome/resources"/>
<parameter name="StdMeshers" value="${SMESH_ROOT_DIR}/share/salome/resources"/>
<parameter name="COMPONENT" value="${COMPONENT_ROOT_DIR}/share/salome/resources"/>
- <parameter name="HELLO" value="${HELLO1_ROOT_DIR}/share/salome/resources"/>
+ <parameter name="HELLO" value="${HELLO_ROOT_DIR}/share/salome/resources"/>
+ <parameter name="PYHELLO" value="${PYHELLO_ROOT_DIR}/share/salome/resources"/>
<parameter name="NETGENPlugin" value="${NETGENPLUGIN_ROOT_DIR}/share/salome/resources"/>
<parameter name="GHS3DPlugin" value="${GHS3DPLUGIN_ROOT_DIR}/share/salome/resources"/>
<parameter name="ToolsGUI" value="${SUITRoot}/resources"/>
</section>
+ <section name="PyConsole">
+ <parameter name="font" value="Helvetic,12" />
+ </section>
+ <section name="Study">
+ <parameter name="store_positions" value="false" />
+ </section>
<section name="GEOM">
<parameter name="name" value="Geometry"/>
<parameter name="icon" value="ModuleGeom.png"/>
<parameter name="name" value="Hello"/>
<parameter name="icon" value="HELLO.png"/>
</section>
+ <section name="PYHELLO">
+ <parameter name="name" value="PyHello"/>
+ <parameter name="icon" value="PYHELLO.png"/>
+ <parameter name="library" value="SalomePyQtGUI"/>
+ </section>
<!-- values below this line are just an example, they are not used -->
<section name="application">
</section>
<section name="ObjectBrowser" >
<parameter value="false" name="auto_size" />
- <parameter value="true" name="visibility_column_0" />
+ <parameter value="true" name="auto_size_first" />
+ <parameter value="true" name="visibility_column_0" />
<parameter value="false" name="visibility_column_1" />
<parameter value="false" name="visibility_column_2" />
<parameter value="false" name="visibility_column_3" />
</section>
<section name="VTKViewer" >
<parameter value="0, 0, 0" name="background" />
- <parameter value="100" name="trihedron_size" />
+ <parameter value="105" name="trihedron_size" />
+ <parameter value="true" name="relative_size" />
</section>
+ <section name="ExternalBrowser" >
+ <parameter value="/usr/bin/mozilla" name="application" />
+ </section>
<section name="Plot2d" >
<parameter value="255, 255, 255" name="Background" />
<parameter value="1" name="CurveType" />
<parameter value="5" name="selection_width" />
<parameter value="5" name="highlight_width" />
<parameter value="0" name="controls_precision" />
- <parameter value="0.12" name="scalar_bar_horizontal_height" />
- <parameter value="0.6" name="scalar_bar_horizontal_width" />
- <parameter value="0.2" name="scalar_bar_horizontal_x" />
+ <parameter value="0.05" name="scalar_bar_horizontal_height" />
+ <parameter value="0.5" name="scalar_bar_horizontal_width" />
+ <parameter value="0.01" name="scalar_bar_horizontal_x" />
<parameter value="0.01" name="scalar_bar_horizontal_y" />
<parameter value="255, 255, 255" name="scalar_bar_label_color" />
<parameter value="Arial,12" name="scalar_bar_label_font" />
<parameter value="0" name="scalar_bar_orientation" />
<parameter value="255, 255, 255" name="scalar_bar_title_color" />
<parameter value="Arial,12" name="scalar_bar_title_font" />
- <parameter value="0.8" name="scalar_bar_vertical_height" />
- <parameter value="0.1" name="scalar_bar_vertical_width" />
+ <parameter value="0.5" name="scalar_bar_vertical_height" />
+ <parameter value="0.05" name="scalar_bar_vertical_width" />
<parameter value="0.01" name="scalar_bar_vertical_x" />
- <parameter value="0.1" name="scalar_bar_vertical_y" />
+ <parameter value="0.01" name="scalar_bar_vertical_y" />
<parameter value="true" name="DisplayMode" />
<parameter value="true" name="auto_update" />
<parameter value="1" name="display_mode" />
+ <parameter value="false" name="auto_groups" />
</section>
<section name="VISU" >
<parameter value="false" name="full_med_loading" />
- <parameter value="0.12" name="scalar_bar_horizontal_height" />
- <parameter value="0.6" name="scalar_bar_horizontal_width" />
- <parameter value="0.2" name="scalar_bar_horizontal_x" />
+ <parameter value="false" name="represent_shading" />
+ <parameter value="0.05" name="scalar_bar_horizontal_height" />
+ <parameter value="0.5" name="scalar_bar_horizontal_width" />
+ <parameter value="0.01" name="scalar_bar_horizontal_x" />
<parameter value="0.01" name="scalar_bar_horizontal_y" />
<parameter value="255, 255, 255" name="scalar_bar_label_color" />
<parameter value="Arial,Bold,Italic,Underline,12" name="scalar_bar_label_font" />
<parameter value="0" name="scalar_bar_orientation" />
<parameter value="255, 255, 255" name="scalar_bar_title_color" />
<parameter value="Arial,Bold,Italic,Underline,12" name="scalar_bar_title_font" />
- <parameter value="0.8" name="scalar_bar_vertical_height" />
- <parameter value="0.1" name="scalar_bar_vertical_width" />
+ <parameter value="0.5" name="scalar_bar_vertical_height" />
+ <parameter value="0.05" name="scalar_bar_vertical_width" />
<parameter value="0.01" name="scalar_bar_vertical_x" />
- <parameter value="0.1" name="scalar_bar_vertical_y" />
+ <parameter value="0.01" name="scalar_bar_vertical_y" />
<parameter value="0" name="scalar_range_max" />
<parameter value="0" name="scalar_range_min" />
<parameter value="0" name="scalar_range_type" />
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifdef WNT
#ifdef VTKVIEWER_EXPORTS
#define VTKVIEWER_EXPORT __declspec( dllexport )
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#include "VTKViewer_Actor.h"
#include "VTKViewer_Transform.h"
#include "VTKViewer_GeometryFilter.h"
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef VTKVIEVER_ACTOR_H
#define VTKVIEVER_ACTOR_H
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#include <VTKViewer_CellRectPicker.h>
#include "vtkGenericCell.h"
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#include <vtkUnstructuredGrid.h>
#include <vtkTriangle.h>
#include <vtkConvexPointSet.h>
+#include <vtkUnstructuredGridWriter.h>
#include <vtkMath.h>
+#include <vtkSmartPointer.h>
#include <set>
#include <iterator>
#include <algorithm>
#include <math.h>
+typedef vtkUnstructuredGrid TInput;
+
typedef std::set<vtkIdType> TUIDS; // unique ids
typedef std::map<vtkIdType,TUIDS> TPTOIDS; // id points -> unique ids
namespace CONVEX_TOOL
{
+ void
+ WriteToFile(vtkUnstructuredGrid* theDataSet, const std::string& theFileName)
+ {
+ vtkUnstructuredGridWriter* aWriter = vtkUnstructuredGridWriter::New();
+ aWriter->SetFileName(theFileName.c_str());
+ aWriter->SetInput(theDataSet);
+ aWriter->Write();
+ aWriter->Delete();
+ }
static float FACE_ANGLE_TOLERANCE=1.5;
+#define EPS 1.0e-38
+#define EPS_T 1.0e-3
#ifdef _DEBUG_
static int MYDEBUG = 0;
+ static int MYDEBUG_REMOVE = 0;
#else
static int MYDEBUG = 0;
+ static int MYDEBUG_REMOVE = 0;
#endif
-/*! \fn static void GetCenter(vtkUnstructuredGrid* theGrid,TCell theptIds,float *center)
+/*! \fn static void GetCenter(TInput* theGrid,TCell theptIds,float *center)
* \brief Calculation of geometry center.
- * \param theGrid - vtkUnstructuredGrid cell.
+ * \param theGrid - TInput cell.
* \param theptIds - point ids.
* \retval center - output array[3] with coordinates of geometry center.
*/
-static void GetCenter(vtkUnstructuredGrid* theGrid,TCell theptIds,float center[3])
+static void GetCenter(vtkPoints* thePoints,float center[3])
{
float p[3];
center[0] = center[1] = center[2] = 0.0;
- int numIds = theptIds.size();
- if (numIds == 0) return;
+ int numPts = thePoints->GetNumberOfPoints();
+ if (numPts == 0) return;
// get the center of the cell
- for (int i = 0; i < numIds; i++)
+ for (int i = 0; i < numPts; i++)
{
- theGrid->GetPoint(theptIds[i], p);
+ thePoints->GetPoint(i, p);
for (int j = 0; j < 3; j++)
{
center[j] += p[j];
}
for (int j = 0; j < 3; j++)
{
- center[j] /= numIds;
+ center[j] /= numPts;
}
}
}
}
-/*! \fn bool IsConnectedFacesOnOnePlane( vtkUnstructuredGrid* theGrid,vtkIdType theFId1, vtkIdType theFId2,TUIDS FpIds1, TUIDS FpIds2 )
+/*! \fn bool IsConnectedFacesOnOnePlane( TInput* theGrid,vtkIdType theFId1, vtkIdType theFId2,TUIDS FpIds1, TUIDS FpIds2 )
* \brief Check is connected faces on one plane.
- * \param theGrid - vtkUnstructuredGrid
+ * \param theGrid - TInput
* \param theFId1 - id of first face
* \param theFId2 - id of second face
* \param FpIds1 - first face points ids.
* \param FpIds2 - second face points ids.
* \return TRUE if two faces on one plane, else FALSE.
*/
-bool IsConnectedFacesOnOnePlane( vtkUnstructuredGrid* theGrid,
+bool IsConnectedFacesOnOnePlane( TInput* theGrid,
vtkIdType theFId1, vtkIdType theFId2,
TUIDS FpIds1, TUIDS FpIds2 )
{
}
cout << p[k][2] << ") ";
}
- cout << "angle="<<angle<<" status="<<status<<endl;
+ if(status) cout << "angle="<<angle<<" status="<<status<<endl;
}
} else if (common_ids.size() >2){
if(MYDEBUG) cout << endl;
}
+static void GetAndRemoveIdsOnOneLine(vtkPoints* points,
+ TUIDS input_points_ids,
+ TUIDS input_two_points_ids,
+ TUIDS& out_two_points_ids,
+ TUIDS& removed_points_ids){
+ if (MYDEBUG_REMOVE) cout << EPS <<endl;
+ float P[3][3];
+ vtkIdType current_points_ids[2];
+ if(MYDEBUG_REMOVE)
+ if(input_two_points_ids.size()!=2) cout << "Error. Must be two ids in variable input_two_points_ids"<<endl;
+ TUIDS::const_iterator aInPointsIter = input_two_points_ids.begin();
+ for(int i=0;i<2 && aInPointsIter!=input_two_points_ids.end();aInPointsIter++,i++){
+ current_points_ids[i] = *aInPointsIter;
+ if (MYDEBUG_REMOVE) cout << " " << *aInPointsIter;
+ }
+ if (MYDEBUG_REMOVE) cout << endl;
+ bool iscurrent_points_changed = false;
+ points->GetPoint(current_points_ids[0],P[0]);
+ points->GetPoint(current_points_ids[1],P[1]);
+ TUIDS::iterator aPointsIter = input_points_ids.begin();
+ for(;aPointsIter!=input_points_ids.end();aPointsIter++){
+ if(iscurrent_points_changed){
+ points->GetPoint(current_points_ids[0],P[0]);
+ points->GetPoint(current_points_ids[1],P[1]);
+ iscurrent_points_changed = false;
+ if (MYDEBUG_REMOVE)
+ cout << " " << current_points_ids[0] << " " << current_points_ids[1] << endl;
+ }
+ // check: is point on line input_two_points_ids
+ points->GetPoint(*aPointsIter,P[2]);
+ if (MYDEBUG_REMOVE) {
+ cout << "\t" << current_points_ids[0] << ":"<<P[0][0]<<","<<P[0][1]<<","<<P[0][2]<<endl;
+ cout << "\t" << current_points_ids[1] << ":"<<P[1][0]<<","<<P[1][1]<<","<<P[1][2]<<endl;
+ cout << "\t" << *aPointsIter << ":"<<P[2][0]<<","<<P[2][1]<<","<<P[2][2]<<endl;
+ }
+
+ // x-x1=(x2-x1)*t -> coeff[0][0] = (x-x1), coeff[0][1] = x2-x1
+ // y-y1=(y2-y1)*t -> coeff[1][0] = (y-y1), coeff[1][1] = y2-y1
+ // z-z1=(z2-z1)*t -> coeff[2][0] = (z-z1), coeff[2][1] = z2-z1
+ float coeff[3][2];
+ for(int i=0;i<3;i++){
+ coeff[i][0] = P[2][i]-P[0][i];
+ coeff[i][1] = P[1][i]-P[0][i];
+ }
+ bool isok_coord[3];
+ bool isok = true;
+ float t[3];
+ for(int i=0;i<3;i++){
+ isok_coord[i] = false;
+ if( fabs(coeff[i][0]) <= EPS && fabs(coeff[i][1]) <= EPS) {
+ isok_coord[i] = true;
+ continue;
+ }
+ if( fabs(coeff[i][1]) <= EPS && fabs(coeff[i][0]) > EPS) {isok = false;t[i]=1.0/EPS;break;}
+ t[i] = (coeff[i][0])/(coeff[i][1]);
+ }
+ for(int i=0;i<3;i++)
+ if (MYDEBUG_REMOVE)
+ cout << __LINE__ << " "
+ << coeff[i][0] << ","<<coeff[i][1]
+ <<" t="<<t[i]<<" isok_coord="<<isok_coord[i]<<endl;
+ if(!isok) continue;
+
+ if (!isok_coord[0] && !isok_coord[1]){
+ if (fabs(t[0]-t[1]) <= EPS_T) isok = true;
+ else isok = false;
+ }
+ if (MYDEBUG_REMOVE) cout << __LINE__ << " 1000 " << isok << endl;
+ if(!isok) continue;
+ if (!isok_coord[1] && !isok_coord[2]){
+ if (fabs(t[1] - t[2]) <= EPS_T) isok = true;
+ else isok = false;
+ }
+ if (MYDEBUG_REMOVE) cout << __LINE__ << " 2000 " << isok << endl;
+ if(!isok) continue;
+ if (!isok_coord[0] && !isok_coord[2]){
+ if (fabs(t[0] - t[2]) <= EPS_T) isok = true;
+ else isok = false;
+ }
+ if (MYDEBUG_REMOVE) cout << __LINE__ << " 3000 " << isok<<endl;
+ if(!isok) continue;
+
+ float param[3]; // parametric coord for P[0],P[1],P[2] <--->t[0],t[1],t[2]
+ // anilize bounds of line
+ for(int i=0;i<3;i++){
+ for(int j=0;j<3;j++)
+ if(!isok_coord[j]) param[i] = (P[i][j]-P[0][j])/(P[1][j]-P[0][j]);
+ }
+ if (MYDEBUG_REMOVE) cout << "Params: " << param[0] << "," << param[1] << "," << param[2] << endl;
+ vtkIdType imax,imin;
+ float min,max;
+ for(vtkIdType i=0;i<3;i++)
+ if(!isok_coord[i]){
+ min = param[0];imin=0;
+ max = param[0];imax=0;
+ break;
+ }
+ for(vtkIdType i=0;i<3;i++){
+ if(min > param[i]) {min = param[i]; imin=i;}
+ if(max < param[i]) {max = param[i]; imax=i;}
+ }
+ if (MYDEBUG_REMOVE)
+ cout << "\t min="<<min<<" max="<<max<<" - "<<"imin="<<imin<<" imax="<<imax<<endl;
+ // imin - index of left point
+ // imax - index of right point
+
+ // add id to removed point
+ vtkIdType rem_id,id1,id2;
+ for(vtkIdType i=0;i<3;i++)
+ if (i!=imin && i!=imax) {rem_id = i; break;}
+
+ if(rem_id == 0) {
+ rem_id = current_points_ids[0];
+ id1=current_points_ids[1];
+ id2=*aPointsIter;
+ }
+ else if (rem_id == 1) {
+ rem_id = current_points_ids[1];
+ id1=current_points_ids[0];
+ id2=*aPointsIter;
+ }
+ else if (rem_id == 2) {
+ rem_id = *aPointsIter;
+ id1=current_points_ids[0];
+ id2=current_points_ids[1];
+ }
+ if (MYDEBUG_REMOVE)
+ cout << " " << current_points_ids[0] <<","<<current_points_ids[1]<<"---->"<<id1<<","<<id2<<endl;
+ if((current_points_ids[0] == id1 && current_points_ids[1] == id2) ||
+ (current_points_ids[0] == id2 && current_points_ids[1] == id1))
+ {}
+ else {
+ iscurrent_points_changed = true;
+ current_points_ids[0] = id1;
+ current_points_ids[1] = id2;
+ }
+
+ removed_points_ids.insert(rem_id);
+ }
+ out_two_points_ids.insert(current_points_ids[0]);
+ out_two_points_ids.insert(current_points_ids[1]);
+}
+
+static vtkConvexPointSet* RemoveAllUnneededPoints(vtkConvexPointSet* convex){
+ vtkSmartPointer<vtkConvexPointSet> out = vtkConvexPointSet::New();
+
+ TUIDS two_points,input_points,out_two_points_ids,removed_points_ids,loc_removed_points_ids;
+ vtkIdList* aPointIds = convex->GetPointIds();
+ int numIds = aPointIds->GetNumberOfIds();
+ // all pairs
+ typedef std::pair<vtkIdType,vtkIdType> TPair;
+ typedef std::set<TPair> TSet;
+ TSet good_point_ids;
+ TSet aLists[numIds-2];
+ for(int i=0;i<numIds-2;i++){
+ for(int j=i+1;j<numIds-1;j++){
+ TPair aPair(i,j);
+ aLists[i].insert(aPair);
+ }
+ }
+ for(vtkIdType i=0;i<numIds-2;i++){
+ TUIDS::iterator aRemIter=removed_points_ids.find(i);
+ if(aRemIter!=removed_points_ids.end()) continue;
+ TSet::iterator aPairIter=aLists[i].begin();
+ loc_removed_points_ids.clear();
+ out_two_points_ids.clear();
+ input_points.clear();
+ two_points.clear();
+ for(;aPairIter!=aLists[i].end();aPairIter++){
+ vtkIdType aFirId = (*aPairIter).first;
+ vtkIdType aSecId = (*aPairIter).second;
+ aRemIter=removed_points_ids.find(aSecId);
+ if(aRemIter!=removed_points_ids.end()) continue;
+ TPair aPair1(aFirId,aSecId);
+ TPair aPair2(aSecId,aFirId);
+ TSet::iterator aGoodIter=good_point_ids.find(aPair1);
+ if(aGoodIter!=good_point_ids.end()) continue;
+ aGoodIter=good_point_ids.find(aPair2);
+ if(aGoodIter!=good_point_ids.end()) continue;
+ two_points.insert(aFirId);
+ two_points.insert(aSecId);
+ if (MYDEBUG_REMOVE)
+ cout << "\nInput: " << aFirId<<":"<<aPointIds->GetId(aFirId) << "," << aSecId <<":"<<aPointIds->GetId(aSecId)<< " --- ";
+ for(vtkIdType k=aSecId+1;k<numIds;k++) {
+ input_points.insert(k);
+ if (MYDEBUG_REMOVE) cout << k<<":"<<aPointIds->GetId(k) << ",";
+ }
+ if (MYDEBUG_REMOVE) {
+ cout << endl;
+ cout << "\t";
+ for(TUIDS::iterator aDelIter = loc_removed_points_ids.begin();aDelIter!=loc_removed_points_ids.end();aDelIter++)
+ cout << *aDelIter<<",";
+ cout << endl;
+ }
+ GetAndRemoveIdsOnOneLine(convex->Points,
+ input_points,
+ two_points,
+ out_two_points_ids,
+ loc_removed_points_ids);
+ TUIDS::iterator aOutIter = out_two_points_ids.begin();
+ vtkIdType aFirst=*aOutIter;aOutIter++;vtkIdType aSecond=*aOutIter;
+ TPair aPair(aFirst,aSecond);
+ good_point_ids.insert(aPair);
+ if (MYDEBUG_REMOVE){
+ cout << "Output: ";
+ TUIDS::iterator aIter = out_two_points_ids.begin();
+ for(;aIter!=out_two_points_ids.end();aIter++)
+ cout << *aIter << ",";
+ cout << " --- ";
+ }
+ TUIDS::iterator aDelIter = loc_removed_points_ids.begin();
+ for(;aDelIter!=loc_removed_points_ids.end();aDelIter++){
+ removed_points_ids.insert(*aDelIter);
+ if (MYDEBUG_REMOVE) cout << *aDelIter << ",";
+ }
+ if (MYDEBUG_REMOVE) cout << endl;
+ }
+ }
+ if (MYDEBUG_REMOVE) {
+ cout << "============ Resultat ================" <<endl;
+ cout << "Removed:";
+ for(TUIDS::iterator aIter=removed_points_ids.begin();aIter!=removed_points_ids.end();aIter++)
+ cout << *aIter << ",";
+ cout << endl;
+ }
+
+ TUIDS result_ids,all_ids;
+ for(vtkIdType i=0;i<numIds;i++) all_ids.insert(i);
+ std::set_difference(all_ids.begin(),
+ all_ids.end(),
+ removed_points_ids.begin(),
+ removed_points_ids.end(),
+ std::inserter(result_ids,result_ids.begin()));
+
+ out->Points->SetNumberOfPoints(result_ids.size());
+ out->PointIds->SetNumberOfIds(result_ids.size());
+ int aId=0;
+ if(MYDEBUG_REMOVE) cout << "Result out:";
+ for(TUIDS::iterator aIter=result_ids.begin();aIter!=result_ids.end();aIter++,aId++){
+ float P[3];
+ convex->Points->GetPoint(*aIter,P);
+ out->Points->SetPoint(aId,P);
+ out->PointIds->SetId(aId,aPointIds->GetId(*aIter));
+ if (MYDEBUG_REMOVE) cout << *aIter << ":" << aPointIds->GetId(*aIter) << " , ";
+ }
+ if(MYDEBUG_REMOVE) cout << endl;
+ out->Modified();
+ out->Initialize();
+
+ return out.GetPointer();
+}
+
void GetPolygonalFaces(vtkUnstructuredGrid* theGrid,int cellId,TCellArray &outputCellArray)
{
if (theGrid->GetCellType(cellId) == VTK_CONVEX_POINT_SET){
// get vtkCell type = VTK_CONVEX_POINT_SET
- if(vtkConvexPointSet* convex = static_cast<vtkConvexPointSet*>(theGrid->GetCell(cellId))){
+ if(vtkConvexPointSet* convex_in = static_cast<vtkConvexPointSet*>(theGrid->GetCell(cellId))){
+ vtkConvexPointSet* convex = RemoveAllUnneededPoints(convex_in);
TCellArray f2points;
float convex_center[3]; // convex center point coorinat
int aNbFaces = convex->GetNumberOfFaces();
int numPts = convex->GetNumberOfPoints();
- TCell convex_ids;
+ if(MYDEBUG_REMOVE) cout << "aNbFaces="<<aNbFaces<<endl;
+ if(MYDEBUG_REMOVE) cout << "numPts="<<numPts<<endl;
TPTOIDS p2faces; // key=pointId , value facesIds set
- for(int i=0;i<numPts;i++)
- convex_ids.push_back(convex->GetPointId(i));
-
- GetCenter(theGrid,convex_ids,convex_center);
+ GetCenter(convex->Points,convex_center);
for (vtkIdType faceId=0; faceId < aNbFaces; faceId++){
vtkCell *aFace = convex->GetFace(faceId);
* \param cellId - id of cell type VTK_CONVEX_POINT_SET
* \retval outputCellArray - output array with new cells types VTK_POLYGON
*/
+ void
+ WriteToFile(vtkUnstructuredGrid* theDataSet, const std::string& theFileName);
void GetPolygonalFaces(vtkUnstructuredGrid* theCell,int cellId,TCellArray &outputCellArray);
}
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef VTKVIEWER_EXTRACTUNSTRUCTUREDGRID_H
#define VTKVIEWER_EXTRACTUNSTRUCTUREDGRID_H
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef VTKVIEWER_GEOMETRYFILTER_H
#define VTKVIEWER_GEOMETRYFILTER_H
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef VTKVIEWER_PASSTHROUGHFILTER_H
#define VTKVIEWER_PASSTHROUGHFILTER_H
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#include "VTKViewer_RenderWindow.h"
#include <qcolordialog.h>
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef VTKVIEWER_RENDERWINDOW_H
#define VTKVIEWER_RENDERWINDOW_H
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#include "VTKViewer_RenderWindowInteractor.h"
#include "VTKViewer_RenderWindow.h"
#include "VTKViewer_InteractorStyle.h"
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef VTKVIEWER_RENDERWINDOWINTERACTOR_H
#define VTKVIEWER_RENDERWINDOWINTERACTOR_H
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef VTKVIEWER_SHRINKFILTER_H
#define VTKVIEWER_SHRINKFILTER_H
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef VTKVIEWER_TRANSFORM_H
#define VTKVIEWER_TRANSFORM_H
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef VTKVIEWER_TRANSFORMFILTER_H
#define VTKVIEWER_TRANSFORMFILTER_H
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#include "VTKViewer_Trihedron.h"
#include "VTKViewer_Actor.h"
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef VTKVIEWER_TRIHEDRON_H
#define VTKVIEWER_TRIHEDRON_H
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#include "VTKViewer_Actor.h"
// VTK Includes
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef VTKVIEWER_UTILITIES_H
#define VTKVIEWER_UTILITIES_H
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
/*=========================================================================
Program: Visualization Toolkit
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
/*=========================================================================
Program: Visualization Toolkit
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#include "VTKViewer_ViewManager.h"
#include "VTKViewer_ViewModel.h"
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef VTKVIEWER_VIEWMANAGER_H
#define VTKVIEWER_VIEWMANAGER_H
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#include "VTKViewer_ViewModel.h"
#include "VTKViewer_ViewWindow.h"
#include "VTKViewer_ViewManager.h"
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef VTKVIEWER_VIEWMODEL_H
#define VTKVIEWER_VIEWMODEL_H
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#include "VTKViewer_ViewWindow.h"
#include "VTKViewer_ViewModel.h"
#include "VTKViewer_RenderWindow.h"
+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can 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/
+//
#ifndef VTKVIEWER_VIEWWINDOW_H
#define VTKVIEWER_VIEWWINDOW_H