Improvements for HYDRO module: 1. General mechanism for activation of GUI Geometry operations. 2. Plugins mechanism in Geometry module.

This commit is contained in:
jfa 2013-09-04 13:49:39 +00:00
parent 119b200b5f
commit bc9708cd0a
59 changed files with 2345 additions and 1017 deletions

View File

@ -19,6 +19,7 @@
SET(GEOM_CXXFLAGS -I${GEOM_ROOT_DIR}/include/salome)
FIND_LIBRARY(AdvancedEngine AdvancedEngine ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(AdvancedGUI AdvancedGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(BasicGUI BasicGUI ${GEOM_ROOT_DIR}/lib/salome)
FIND_LIBRARY(BlocksGUI BlocksGUI ${GEOM_ROOT_DIR}/lib/salome)

View File

@ -19,14 +19,16 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
import os, sys
from salome_utils import getTmpDir, generateFileName, uniteFiles
from setenv import salome_subdir
from setenv import add_path, get_lib_dir, salome_subdir
# -----------------------------------------------------------------------------
def set_env( args ):
"""Add to the PATH-variables modules specific paths"""
psep = os.pathsep
python_version="python%d.%d" % sys.version_info[0:2]
tmp_dir = getTmpDir()
env_dir = generateFileName( tmp_dir, prefix="env", with_port=True )
@ -45,3 +47,49 @@ def set_env( args ):
pass
pass
# find plugins
plugin_list = []
resource_path_list = []
for env_var in os.environ.keys():
value = os.environ[env_var]
if env_var[-9:] == "_ROOT_DIR" and value:
plugin_root = value
plugin = env_var[:-9] # plugin name may have wrong case
# look for NAMEOFPlugin.xml file among resource files
resource_dir = os.path.join(plugin_root,"share",salome_subdir,"resources",plugin.lower())
if not os.access( resource_dir, os.F_OK ): continue
for resource_file in os.listdir( resource_dir ):
if not resource_file.endswith( ".xml") or \
resource_file.lower() != plugin.lower() + ".xml":
continue
# use "name" attribute of "geom-plugin" as name of plugin in a right case
from xml.dom.minidom import parse
xml_doc = parse( os.path.join( resource_dir, resource_file ))
plugin_nodes = xml_doc.getElementsByTagName("geom-plugin")
if not plugin_nodes or not plugin_nodes[0].hasAttribute("name"): continue
plugin = plugin_nodes[0].getAttribute("name")
if plugin in plugin_list: continue
# add paths of plugin
plugin_list.append(plugin)
if not os.environ.has_key("SALOME_"+plugin+"Resources"):
resource_path = os.path.join(plugin_root,"share",salome_subdir,"resources",plugin.lower())
os.environ["SALOME_"+plugin+"Resources"] = resource_path
resource_path_list.append( resource_path )
add_path(os.path.join(plugin_root,get_lib_dir(),python_version, "site-packages",salome_subdir), "PYTHONPATH")
add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "PYTHONPATH")
if sys.platform == "win32":
add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "PATH")
add_path(os.path.join(plugin_root,"bin",salome_subdir), "PYTHONPATH")
else:
add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "LD_LIBRARY_PATH")
add_path(os.path.join(plugin_root,"bin",salome_subdir), "PYTHONPATH")
add_path(os.path.join(plugin_root,"bin",salome_subdir), "PATH")
pass
pass
break
plugin_list.append("GEOMActions")
os.environ["GEOM_PluginsList"] = ":".join(plugin_list)
os.environ["SalomeAppConfig"] = os.environ["SalomeAppConfig"] + psep + psep.join(resource_path_list)

View File

@ -489,6 +489,7 @@ AC_OUTPUT([ \
doc/salome/tui/static/header.html \
src/Makefile \
src/AdvancedGUI/Makefile \
src/AdvancedEngine/Makefile \
src/ARCHIMEDE/Makefile \
src/BREPExport/Makefile \
src/BREPImport/Makefile \

View File

@ -4563,8 +4563,8 @@ module GEOM
in boolean theInheritFirstArg,
in boolean theAddPrefix);
// # Methods to access interfaces for objects creation and transformation
// # Methods to access interfaces for objects creation and transformation
GEOM_IBasicOperations GetIBasicOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception);
GEOM_I3DPrimOperations GetI3DPrimOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
@ -4577,10 +4577,12 @@ module GEOM
GEOM_IMeasureOperations GetIMeasureOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
GEOM_IBlocksOperations GetIBlocksOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
GEOM_IGroupOperations GetIGroupOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
GEOM_IAdvancedOperations GetIAdvancedOperations (in long theStudyID) raises (SALOME::SALOME_Exception);
// # Objects Management
GEOM_IOperations GetPluginOperations (in long theStudyID,
in string theLibName) raises (SALOME::SALOME_Exception);
// # Objects Management
/*!
* \brief Removes the object from the GEOM component

62
resources/GEOMActions.xml Normal file
View File

@ -0,0 +1,62 @@
<?xml version='1.0' encoding='us-ascii'?>
<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
<!--
Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-->
<!-- GUI customization for GEOM component -->
<geom-plugins>
<geom-plugin name="AdvancedGUI"
server-lib="AdvancedEngine"
gui-lib="AdvancedGUI">
<actions>
<action label="TShape_Basic"
icon="pipetshape.png"
menu="NEW_ENTITY/PRIMITIVES/PIPETSHAPE"
tooltip="PRIMITIVES/PIPETSHAPE"
status-bar="Create new Pipe TShape object">
</action>
<action label="DividedDisk"
icon="divided_disk.png"
menu="NEW_ENTITY/BLOCKS/DIVIDEDDISK"
tooltip="BLOCKS/DIVIDEDDISK"
status-bar="Divided Disk">
</action>
<action label="DividedCylinder"
icon="dividedcylinder.png"
menu="NEW_ENTITY/BLOCKS/DIVIDEDCYLINDER"
tooltip="BLOCKS/DIVIDEDCYLINDER"
status-bar="Divided Cylinder">
</action>
<action label="SmoothingSurface"
icon="smoothingsurface.png"
menu="NEW_ENTITY/ADVANCED/SMOOTHINGSURFACE"
tooltip="ADVANCED/SMOOTHINGSURFACE"
status-bar="Smoothing Surface">
</action>
</actions>
</geom-plugin>
</geom-plugins>

View File

@ -25,6 +25,7 @@
include $(top_srcdir)/adm_local/unix/make_common_starter.am
dist_salomeres_DATA = \
GEOMActions.xml \
GEOM_en.xml \
GEOM_fr.xml \
GEOM.config \

View File

@ -37,6 +37,7 @@
<section name="resources">
<!-- Module resources -->
<parameter name="GEOM" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
<parameter name="AdvancedGUI" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
</section>
<section name="Geometry" >
<!-- Other module preferences -->

View File

@ -0,0 +1,43 @@
// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#include "GEOM_AdvancedEngine.hxx"
#include "AdvancedEngine_OperationsCreator.hh"
//=============================================================================
/*!
*
*/
//=============================================================================
extern "C"
{
ADVANCEDENGINE_EXPORT
GEOM_GenericOperationsCreator* GetOperationsCreator()
{
//MESSAGE("GetOperationsCreator");
AdvancedEngine_OperationsCreator* aCreator = new AdvancedEngine_OperationsCreator();
return aCreator;
}
}

View File

@ -0,0 +1,72 @@
// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#include "GEOM_AdvancedEngine.hxx"
#include "AdvancedEngine_OperationsCreator.hh"
#include "GEOM_IAdvancedOperations_i.hh"
// Operations
#include <GEOMImpl_PipeTShapeDriver.hxx>
#include <GEOMImpl_DividedDiskDriver.hxx>
// #include <GEOMImpl_DividedCylinderDriver.hxx>
#include <GEOMImpl_SmoothingSurfaceDriver.hxx>
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
#include <TFunction_Driver.hxx>
#include <TFunction_DriverTable.hxx>
#include "Utils_ExceptHandlers.hxx"
#include "utilities.h"
//============================================================================
// function : Create
// purpose :
//============================================================================
GEOM_IOperations_i* AdvancedEngine_OperationsCreator::Create (PortableServer::POA_ptr thePOA,
int theStudyId,
GEOM::GEOM_Gen_ptr theEngine,
::GEOMImpl_Gen* theGenImpl)
{
Unexpect aCatch(SALOME_SalomeException);
MESSAGE( "AdvancedEngine_OperationsCreator::Create" );
if (_mapOfOperations.find(theStudyId) == _mapOfOperations.end()) {
_mapOfOperations[theStudyId] = new GEOMImpl_IAdvancedOperations (theGenImpl, theStudyId);
// Advanced operations
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PipeTShapeDriver::GetID(),
new GEOMImpl_PipeTShapeDriver());
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_DividedDiskDriver::GetID(),
new GEOMImpl_DividedDiskDriver());
//TFunction_DriverTable::Get()->AddDriver(GEOMImpl_DividedCylinderDriver::GetID(),
// new GEOMImpl_DividedCylinderDriver());
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_SmoothingSurfaceDriver::GetID(),
new GEOMImpl_SmoothingSurfaceDriver());
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
}
GEOM_IAdvancedOperations_i* aServant =
new GEOM_IAdvancedOperations_i (thePOA, theEngine, _mapOfOperations[theStudyId]);
return aServant;
}

View File

@ -0,0 +1,51 @@
// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _GEOM_ADVANCEDENGINE_OPERATIONSCREATOR_HXX_
#define _GEOM_ADVANCEDENGINE_OPERATIONSCREATOR_HXX_
#include "GEOM_AdvancedEngine.hxx"
#include "GEOM_Gen_i.hh"
#include "GEOMImpl_IAdvancedOperations.hxx"
#include <map>
//=====================================================================
// Operations creator
//=====================================================================
class ADVANCEDENGINE_EXPORT AdvancedEngine_OperationsCreator : public GEOM_GenericOperationsCreator
{
public:
// Create operations
virtual GEOM_IOperations_i* Create (PortableServer::POA_ptr thePOA,
int theStudyId,
GEOM::GEOM_Gen_ptr theEngine,
::GEOMImpl_Gen* theGenImpl);
// return the name of IDL module
//virtual std::string GetModuleName();
private:
std::map <int, GEOMImpl_IAdvancedOperations*> _mapOfOperations;
};
#endif

View File

@ -0,0 +1,37 @@
// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// Advanced functions (base = 200)
#define ADVANCED_BASE 200 // NO OPERATION (advanced operations base)
#define GEOM_TSHAPE 201
#define GEOM_DIVIDEDDISK 202
#define GEOM_DIVIDEDCYLINDER 203
#define GEOM_SMOOTHINGSURFACE 204
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
// Advanced functions sub-operations codes
#define TSHAPE_BASIC 1
#define TSHAPE_CHAMFER 2
#define TSHAPE_FILLET 3
#define DIVIDEDDISK_R_RATIO 1
#define DIVIDEDDISK_R_VECTOR_PNT 2
#define DIVIDEDCYLINDER_R_H 1
#define SMOOTHINGSURFACE_LPOINTS 1
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/

View File

@ -18,10 +18,11 @@
// 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 "AdvancedEngine_Types.hxx"
#include <GEOMImpl_DividedDiskDriver.hxx>
#include <GEOMImpl_IDividedDisk.hxx>
#include <GEOMImpl_Types.hxx>

View File

@ -92,6 +92,8 @@
#include <cmath>
#include "AdvancedEngine_Types.hxx"
#include <Standard_Stream.hxx>
#include <Standard_Failure.hxx>
#include <StdFail_NotDone.hxx>

View File

@ -15,7 +15,6 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <GEOMImpl_PipeTShapeDriver.hxx>
@ -71,6 +70,8 @@
#include <vector>
//@@ include required header files here @@//
#include "AdvancedEngine_Types.hxx"
//=======================================================================
//function : GetID
//purpose :

View File

@ -21,6 +21,8 @@
#include <Standard_Stream.hxx>
#include "AdvancedEngine_Types.hxx"
#include <GEOMImpl_SmoothingSurfaceDriver.hxx>
#include <GEOMImpl_ISmoothingSurface.hxx>
#include <GEOMImpl_Types.hxx>

View File

@ -0,0 +1,43 @@
// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#ifndef _GEOM_ADVANCEDENGINE_HXX_
#define _GEOM_ADVANCEDENGINE_HXX_
#ifdef WNT
#if defined ADVANCEDENGINE_EXPORTS || defined AdvancedEngine_EXPORTS
#if defined WIN32
#define ADVANCEDENGINE_EXPORT __declspec( dllexport )
#else
#define ADVANCEDENGINE_EXPORT
#endif
#else
#if defined WIN32
#define ADVANCEDENGINE_EXPORT __declspec( dllimport )
#else
#define ADVANCEDENGINE_EXPORT
#endif
#endif
#else
#define ADVANCEDENGINE_EXPORT
#endif
#endif

View File

@ -0,0 +1,83 @@
# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can 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
include $(top_srcdir)/adm_local/unix/make_common_starter.am
# Libraries targets
lib_LTLIBRARIES = libAdvancedEngine.la
# header files
salomeinclude_HEADERS = \
AdvancedEngine_Types.hxx \
AdvancedEngine_OperationsCreator.hh \
GEOM_AdvancedEngine.hxx \
GEOMImpl_IAdvancedOperations.hxx \
GEOM_IAdvancedOperations_i.hh
ADVANCED_INCLUDES =
ADVANCED_INCLUDES += GEOMImpl_IPipeTShape.hxx GEOMImpl_PipeTShapeDriver.hxx
ADVANCED_INCLUDES += GEOMImpl_IDividedDisk.hxx GEOMImpl_DividedDiskDriver.hxx
##ADVANCED_INCLUDES += GEOMImpl_IDividedCylinder.hxx GEOMImpl_DividedCylinderDriver.hxx
ADVANCED_INCLUDES += GEOMImpl_ISmoothingSurface.hxx GEOMImpl_SmoothingSurfaceDriver.hxx
##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@##
salomeinclude_HEADERS += $(ADVANCED_INCLUDES)
dist_libAdvancedEngine_la_SOURCES = \
AdvancedEngine.cxx \
AdvancedEngine_OperationsCreator.cc \
GEOMImpl_IAdvancedOperations.cxx \
GEOM_IAdvancedOperations_i.cc
ADVANCED_SOURCES =
ADVANCED_SOURCES += GEOMImpl_PipeTShapeDriver.cxx
ADVANCED_SOURCES += GEOMImpl_DividedDiskDriver.cxx
##ADVANCED_SOURCES += GEOMImpl_DividedCylinderDriver.cxx
ADVANCED_SOURCES += GEOMImpl_SmoothingSurfaceDriver.cxx
##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@##
dist_libAdvancedEngine_la_SOURCES += $(ADVANCED_SOURCES)
# additional information to compile and link file
libAdvancedEngine_la_CPPFLAGS = \
$(CORBA_CXXFLAGS) \
$(CORBA_INCLUDES) \
$(CAS_CPPFLAGS) \
$(BOOST_CPPFLAGS) \
$(KERNEL_CXXFLAGS) \
-I$(srcdir)/../GEOMUtils \
-I$(srcdir)/../NMTDS \
-I$(srcdir)/../NMTTools \
-I$(srcdir)/../GEOMAlgo \
-I$(srcdir)/../GEOM \
-I$(srcdir)/../GEOMImpl \
-I$(srcdir)/../GEOM_I \
-I$(top_builddir)/idl \
-I$(top_builddir)
libAdvancedEngine_la_LDFLAGS = \
../../idl/libSalomeIDLGEOM.la \
../GEOMUtils/libGEOMUtils.la \
../GEOMAlgo/libGEOMAlgo.la \
../GEOM/libGEOMbasic.la \
../GEOMImpl/libGEOMimpl.la \
../GEOM_I/libGEOMEngine.la \
$(KERNEL_LDFLAGS) -lOpUtil -lSalomeNS -lSalomeContainer -lSalomeGenericObj -lTOOLSDS \
$(CAS_DATAEXCHANGE) \
$(CAS_LDPATH) -lTKFillet -lTKOffset

View File

@ -23,7 +23,7 @@
#include "AdvancedGUI.h"
#include "GeometryGUI.h"
#include "GeometryGUI_Operations.h"
//#include "GeometryGUI_Operations.h"
#include <SUIT_Desktop.h>
#include <SalomeApp_Application.h>
@ -36,11 +36,13 @@
#include <QDialog>
#include <iostream>
//=======================================================================
// function : AdvancedGUI()
// purpose : Constructor
//=======================================================================
AdvancedGUI::AdvancedGUI( GeometryGUI* parent ) : GEOMGUI( parent )
AdvancedGUI::AdvancedGUI( GeometryGUI* parent ) : GEOMPluginGUI( parent )
{
}
@ -57,6 +59,28 @@ AdvancedGUI::~AdvancedGUI()
// purpose :
//=======================================================================
bool AdvancedGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
{
switch ( theCommandID ) {
case 1:
return OnGUIEvent("TShape_Basic", parent);
case 2:
return OnGUIEvent("DividedDisk", parent);
case 3:
return OnGUIEvent("DividedCylinder", parent);
case 4:
return OnGUIEvent("SmoothingSurface", parent);
//@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@//
default:
return OnGUIEvent("", parent);
}
return false;
}
//=======================================================================
// function : OnGUIEvent()
// purpose :
//=======================================================================
bool AdvancedGUI::OnGUIEvent( const QString& theCommandID, SUIT_Desktop* parent )
{
SalomeApp_Application* app = getGeometryGUI()->getApp();
if ( !app ) return false;
@ -65,26 +89,24 @@ bool AdvancedGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
QDialog* aDlg = NULL;
switch ( theCommandID ) {
case GEOMOp::OpPipeTShape:
if (theCommandID == "TShape_Basic") {
aDlg = new AdvancedGUI_PipeTShapeDlg( getGeometryGUI(), parent );
break;
// case GEOMOp::OpPipeTShapeGroups:
// aDlg = new AdvancedGUI_PipeTShapeGroupsDlg( getGeometryGUI(), parent );
// break;
case GEOMOp::OpDividedDisk:
}
//else if (theCommandID == "TShape_Groups") {
// aDlg = new AdvancedGUI_PipeTShapeGroupsDlg( getGeometryGUI(), parent );
//}
else if (theCommandID == "DividedDisk") {
aDlg = new AdvancedGUI_DividedDiskDlg( getGeometryGUI(), parent );
break;
case GEOMOp::OpDividedCylinder:
}
else if (theCommandID == "DividedCylinder") {
aDlg = new AdvancedGUI_DividedCylinderDlg( getGeometryGUI(), parent );
break;
case GEOMOp::OpSmoothingSurface:
}
else if (theCommandID == "SmoothingSurface") {
aDlg = new AdvancedGUI_SmoothingSurfaceDlg( getGeometryGUI(), parent );
break;
}
//@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@//
default:
else {
app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) );
break;
}
if ( aDlg != NULL )
@ -101,7 +123,7 @@ extern "C"
#ifdef WIN32
__declspec( dllexport )
#endif
GEOMGUI* GetLibGUI( GeometryGUI* parent )
GEOMPluginGUI* GetLibGUI( GeometryGUI* parent )
{
return new AdvancedGUI( parent );
}

View File

@ -23,19 +23,20 @@
#ifndef ADVANCEDGUI_H
#define ADVANCEDGUI_H
#include "GEOMGUI.h"
#include "GEOMPluginGUI.h"
//=================================================================================
// class : AdvancedGUI
// purpose :
//=================================================================================
class AdvancedGUI : public GEOMGUI
class AdvancedGUI : public GEOMPluginGUI
{
public:
AdvancedGUI( GeometryGUI* );
~AdvancedGUI();
bool OnGUIEvent( int, SUIT_Desktop* );
bool OnGUIEvent( const QString&, SUIT_Desktop* );
};
#endif // ADVANCEDGUI_H

View File

@ -217,7 +217,8 @@ void AdvancedGUI_DividedCylinderDlg::ValueChangedInSpinBox()
//=================================================================================
GEOM::GEOM_IOperations_ptr AdvancedGUI_DividedCylinderDlg::createOperation()
{
return getGeomEngine()->GetIAdvancedOperations(getStudyId());
//return getGeomEngine()->GetIAdvancedOperations(getStudyId());
return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
}
//=================================================================================

View File

@ -392,7 +392,8 @@ void AdvancedGUI_DividedDiskDlg::ValueChangedInSpinBox()
//=================================================================================
GEOM::GEOM_IOperations_ptr AdvancedGUI_DividedDiskDlg::createOperation()
{
return getGeomEngine()->GetIAdvancedOperations(getStudyId());
//return getGeomEngine()->GetIAdvancedOperations(getStudyId());
return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
}
//=================================================================================

View File

@ -844,7 +844,8 @@ void AdvancedGUI_PipeTShapeDlg::DisplayPreview (const bool activate, const bool
//=================================================================================
GEOM::GEOM_IOperations_ptr AdvancedGUI_PipeTShapeDlg::createOperation()
{
return getGeomEngine()->GetIAdvancedOperations(getStudyId());
//return getGeomEngine()->GetIAdvancedOperations(getStudyId());
return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
}
//=================================================================================

View File

@ -158,7 +158,8 @@ void AdvancedGUI_SmoothingSurfaceDlg::enterEvent (QEvent*)
//=================================================================================
GEOM::GEOM_IOperations_ptr AdvancedGUI_SmoothingSurfaceDlg::createOperation()
{
return getGeomEngine()->GetIAdvancedOperations(getStudyId());
//return getGeomEngine()->GetIAdvancedOperations(getStudyId());
return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
}
//=================================================================================

View File

@ -0,0 +1,177 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="en_US">
<context>
<name>@default</name>
<message>
<source>ICON_OBJBROWSER_ADVANCED_201</source>
<translation>tree_pipetshape.png</translation>
</message>
<message>
<source>ICON_OBJBROWSER_ADVANCED_202</source>
<translation>divided_disk.png</translation>
</message>
<message>
<source>ICON_OBJBROWSER_ADVANCED_203</source>
<translation>dividedcylinder.png</translation>
</message>
<message>
<source>ICON_OBJBROWSER_ADVANCED_204</source>
<translation>tree_smoothingsurface.png</translation>
</message>
<message>
<source>ICON_DLG_PIPETSHAPE</source>
<translation>pipetshape.png</translation>
</message>
<message>
<source>ICO_PIPETSHAPE</source>
<translation>pipetshape.png</translation>
</message>
<message>
<source>ICO_PIPETSHAPE_IMPORT</source>
<translation>pipetshape_import_icon.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE</source>
<translation>dlg_pipetshape.png</translation>
</message>
<message>
<source>IMG_PIPETSHAPE_SECT</source>
<translation>pipetshape_section.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_L1</source>
<translation>dlg_pipetshapel1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_R1</source>
<translation>dlg_pipetshaper1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_W1</source>
<translation>dlg_pipetshapew1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_L2</source>
<translation>dlg_pipetshapel2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_R2</source>
<translation>dlg_pipetshaper2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_W2</source>
<translation>dlg_pipetshapew2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_FILLET</source>
<translation>dlg_pipetshapefillet.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_FILLET_L1</source>
<translation>dlg_pipetshapefilletl1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_FILLET_R1</source>
<translation>dlg_pipetshapefilletr1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_FILLET_W1</source>
<translation>dlg_pipetshapefilletw1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_FILLET_L2</source>
<translation>dlg_pipetshapefilletl2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_FILLET_R2</source>
<translation>dlg_pipetshapefilletr2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_FILLET_W2</source>
<translation>dlg_pipetshapefilletw2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_FILLET_RF</source>
<translation>dlg_pipetshapefilletrf.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER</source>
<translation>dlg_pipetshapechamfer.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER_L1</source>
<translation>dlg_pipetshapechamferl1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER_R1</source>
<translation>dlg_pipetshapechamferr1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER_W1</source>
<translation>dlg_pipetshapechamferw1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER_L2</source>
<translation>dlg_pipetshapechamferl2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER_R2</source>
<translation>dlg_pipetshapechamferr2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER_W2</source>
<translation>dlg_pipetshapechamferw2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER_H</source>
<translation>dlg_pipetshapechamferh.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER_W</source>
<translation>dlg_pipetshapechamferw.png</translation>
</message>
<!--
<message>
<source>ICON_DLG_PIPETSHAPEGROUPS</source>
<translation>pipetshapegroups.png</translation>
</message>
<message>
<source>ICO_PIPETSHAPEGROUPS</source>
<translation>pipetshapegroups.png</translation>
</message>
-->
<message>
<source>ICON_DLG_DIVIDEDDISK_R_RATIO</source>
<translation>divided_disk.png</translation>
</message>
<message>
<source>ICO_DIVIDEDDISK</source>
<translation>divided_disk.png</translation>
</message>
<message>
<source>ICON_DLG_DIVIDEDCYLINDER_R_H</source>
<translation>dividedcylinder_r_h.png</translation>
</message>
<message>
<source>ICO_DIVIDEDCYLINDER</source>
<translation>dividedcylinder.png</translation>
</message>
<message>
<source>ICON_DLG_SMOOTHINGSURFACE_LPOINTS</source>
<translation>smoothingsurface_lpoints.png</translation>
</message>
<message>
<source>ICO_SMOOTHINGSURFACE</source>
<translation>smoothingsurface.png</translation>
</message>
<!-- @@ insert new functions before this line @@ do not remove this line @@ -->
</context>
</TS>

View File

@ -0,0 +1,273 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="en_US">
<context>
<name>@default</name>
<message>
<source>GEOM_ADVANCED</source>
<translation>Advanced shape: type %1</translation>
</message>
<message>
<source>GEOM_ADVANCED_201</source>
<translation>Pipe TShape</translation>
</message>
<message>
<source>GEOM_ADVANCED_202</source>
<translation>Divided Disk</translation>
</message>
<message>
<source>GEOM_ADVANCED_203</source>
<translation>Divided Cylinder</translation>
</message>
<message>
<source>GEOM_DIVIDEDDISK</source>
<translation>Divided Disk</translation>
</message>
<message>
<source>GEOM_DIVIDEDDISK_TITLE</source>
<translation>Divided Disk construction</translation>
</message>
<message>
<source>GEOM_DIVIDEDCYLINDER</source>
<translation>Divided Cylinder</translation>
</message>
<message>
<source>GEOM_DIVIDEDCYLINDER_TITLE</source>
<translation>Divided Cylinder construction</translation>
</message>
<message>
<source>MEN_DIVIDEDCYLINDER</source>
<translation>Divided Cylinder</translation>
</message>
<message>
<source>TOP_DIVIDEDCYLINDER</source>
<translation>Divided Cylinder</translation>
</message>
<message>
<source>STB_DIVIDEDCYLINDER</source>
<translation>Divided Cylinder</translation>
</message>
<message>
<source>MEN_DIVIDEDDISK</source>
<translation>Divided Disk</translation>
</message>
<message>
<source>TOP_DIVIDEDDISK</source>
<translation>Divided Disk</translation>
</message>
<message>
<source>STB_DIVIDEDDISK</source>
<translation>Divided Disk</translation>
</message>
<message>
<source>TOP_PIPETSHAPE</source>
<translation>Create Pipe TShape</translation>
</message>
<message>
<source>MEN_PIPETSHAPE</source>
<translation>Pipe TShape</translation>
</message>
<message>
<source>STB_PIPETSHAPE</source>
<translation>Create new Pipe TShape object</translation>
</message>
<message>
<source>TOP_SMOOTHINGSURFACE</source>
<translation type="unfinished">Smoothing Surface</translation>
</message>
<message>
<source>MEN_SMOOTHINGSURFACE</source>
<translation type="unfinished">Smoothing Surface</translation>
</message>
<message>
<source>STB_SMOOTHINGSURFACE</source>
<translation type="unfinished">Smoothing Surface</translation>
</message>
<message>
<source>HALF_LENGTH_MAIN_PIPE</source>
<translation>Main pipe half length</translation>
</message>
<message>
<source>HALF_LENGTH_INCIDENT_PIPE</source>
<translation>Incident pipe half length</translation>
</message>
<message>
<source>CIRCULAR_QUARTER_PIPE</source>
<translation>Circular quarter of pipe</translation>
</message>
<message>
<source>THICKNESS</source>
<translation>Thickness</translation>
</message>
<message>
<source>FLANGE</source>
<translation>Flange</translation>
</message>
<message>
<source>CHAMFER_OR_FILLET</source>
<translation>Chamfer or fillet</translation>
</message>
<message>
<source>CHAMFER</source>
<translation>Chamfer</translation>
</message>
<message>
<source>FILLET</source>
<translation>Fillet</translation>
</message>
<message>
<source>JUNCTION_FACE_1</source>
<translation>Junction 1</translation>
</message>
<message>
<source>JUNCTION_FACE_2</source>
<translation>Junction 2</translation>
</message>
<message>
<source>JUNCTION_FACE_3</source>
<translation>Junction 3</translation>
</message>
<message>
<source>INTERNAL_FACES</source>
<translation>Internal faces</translation>
</message>
</context>
<context>
<name>AdvancedGUI_PipeTShapeDlg</name>
<message>
<source>GEOM_PIPE_TSHAPE_TITLE</source>
<translation>Pipe TShape Construction</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE</source>
<translation>PipeTShape</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_MPIPE</source>
<translation>Main pipe</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_R</source>
<translation>Radius</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_W</source>
<translation>Width</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_L</source>
<translation>Half-length</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_IPIPE</source>
<translation>Incident pipe</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_CHAMFER</source>
<translation>Chamfer</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_CHAMFER_H</source>
<translation>Height</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_CHAMFER_W</source>
<translation>Width</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_FILLET</source>
<translation>Fillet</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_HEX</source>
<translation>Prepare for hex mesh</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION</source>
<translation>Set position</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_P1</source>
<translation>Junction P1</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_P2</source>
<translation>Junction P2</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_P3</source>
<translation>Junction P3</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L1</source>
<translation>New L1</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
<translation>New L2</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_LEFT_TR</source>
<translation>Left thickness reduction</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_RIGHT_TR</source>
<translation>Right thickness reduction</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_INCI_TR</source>
<translation>Incident pipe thickness reduction</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_R</source>
<translation>Radius (r%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_W</source>
<translation>Width (w%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_L_TRANS</source>
<translation>Transition length (ltrans%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_L_THIN</source>
<translation>Thin part length (lthin%1)</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPMAIN</source>
<translation>Main parameters</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPREDUCT</source>
<translation>Thickness reduction</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPPOS</source>
<translation>Position</translation>
</message>
</context>
<context>
<name>AdvancedGUI_SmoothingSurfaceDlg</name>
<message>
<source>GEOM_SMOOTHINGSURFACE_TITLE</source>
<translation>Smoothing surface Construction</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE</source>
<translation>Smoothing surface</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_RESULT</source>
<translation>Result name</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_ARG</source>
<translation>Nodes</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_ARG_POINTS</source>
<translation>Points</translation>
</message>
</context>
</TS>

View File

@ -0,0 +1,273 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="en_US">
<context>
<name>@default</name>
<message>
<source>GEOM_ADVANCED</source>
<translation>Objet géométrique avancé : type %1</translation>
</message>
<message>
<source>GEOM_ADVANCED_201</source>
<translation>Tuyau en T</translation>
</message>
<message>
<source>GEOM_ADVANCED_202</source>
<translation>Disque prédécoupé</translation>
</message>
<message>
<source>GEOM_ADVANCED_203</source>
<translation>Cylindre prédécoupé</translation>
</message>
<message>
<source>GEOM_DIVIDEDDISK</source>
<translation>Disque prédécoupé</translation>
</message>
<message>
<source>GEOM_DIVIDEDDISK_TITLE</source>
<translation>Construction d&apos;un disque prédécoupé</translation>
</message>
<message>
<source>GEOM_DIVIDEDCYLINDER</source>
<translation>Cylinder prédécoupé</translation>
</message>
<message>
<source>GEOM_DIVIDEDCYLINDER_TITLE</source>
<translation>Construction d&apos;un cylindre prédécoupé</translation>
</message>
<message>
<source>MEN_DIVIDEDCYLINDER</source>
<translation>Cylinder prédécoupé</translation>
</message>
<message>
<source>TOP_DIVIDEDCYLINDER</source>
<translation>Cylinder prédécoupé</translation>
</message>
<message>
<source>STB_DIVIDEDCYLINDER</source>
<translation>Cylinder prédécoupé</translation>
</message>
<message>
<source>MEN_DIVIDEDDISK</source>
<translation>Disque prédécoupé</translation>
</message>
<message>
<source>TOP_DIVIDEDDISK</source>
<translation>Disque prédécoupé</translation>
</message>
<message>
<source>STB_DIVIDEDDISK</source>
<translation>Disque prédécoupé</translation>
</message>
<message>
<source>TOP_PIPETSHAPE</source>
<translation>Créer un tuyau en T</translation>
</message>
<message>
<source>MEN_PIPETSHAPE</source>
<translation>Tuyau en T</translation>
</message>
<message>
<source>STB_PIPETSHAPE</source>
<translation>Créer un tuyau en T</translation>
</message>
<message>
<source>TOP_SMOOTHINGSURFACE</source>
<translation type="unfinished">Smoothing Surface</translation>
</message>
<message>
<source>MEN_SMOOTHINGSURFACE</source>
<translation type="unfinished">Smoothing Surface</translation>
</message>
<message>
<source>STB_SMOOTHINGSURFACE</source>
<translation type="unfinished">Smoothing Surface</translation>
</message>
<message>
<source>HALF_LENGTH_MAIN_PIPE</source>
<translation>Demi-longueur du tuyau principal </translation>
</message>
<message>
<source>HALF_LENGTH_INCIDENT_PIPE</source>
<translation>Demi-longueur du tuyau incident</translation>
</message>
<message>
<source>CIRCULAR_QUARTER_PIPE</source>
<translation>Un quart circulaire du tuyau</translation>
</message>
<message>
<source>THICKNESS</source>
<translation>Epaisseur</translation>
</message>
<message>
<source>FLANGE</source>
<translation>Collerette</translation>
</message>
<message>
<source>CHAMFER_OR_FILLET</source>
<translation>Chanfrein ou congé</translation>
</message>
<message>
<source>CHAMFER</source>
<translation>Chanfrein</translation>
</message>
<message>
<source>FILLET</source>
<translation>Congé</translation>
</message>
<message>
<source>JUNCTION_FACE_1</source>
<translation>Jonction 1</translation>
</message>
<message>
<source>JUNCTION_FACE_2</source>
<translation>Jonction 2</translation>
</message>
<message>
<source>JUNCTION_FACE_3</source>
<translation>Jonction 3</translation>
</message>
<message>
<source>INTERNAL_FACES</source>
<translation type="unfinished">Internal faces</translation>
</message>
</context>
<context>
<name>AdvancedGUI_PipeTShapeDlg</name>
<message>
<source>GEOM_PIPE_TSHAPE_TITLE</source>
<translation>Construction d&apos;un tuyau en T</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE</source>
<translation>Tuyau en T</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_MPIPE</source>
<translation>Tuyau principal</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_R</source>
<translation>Rayon</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_W</source>
<translation>Largeur</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_L</source>
<translation>Demi-longueur</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_IPIPE</source>
<translation>Tuyau incident</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_CHAMFER</source>
<translation>Chanfrein</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_CHAMFER_H</source>
<translation>Hauteur</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_CHAMFER_W</source>
<translation>Largeur</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_FILLET</source>
<translation>Congé</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_HEX</source>
<translation>Préparer pour un maillage hexaédrique</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION</source>
<translation>Définir la position</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_P1</source>
<translation>Jonction P1</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_P2</source>
<translation>Jonction P2</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_P3</source>
<translation>Jonction P3</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L1</source>
<translation>Nouvelle L1</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
<translation>Nouvelle L2</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_LEFT_TR</source>
<translation>Réduction d&apos;épaisseur à gauche</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_RIGHT_TR</source>
<translation>Réduction d&apos;épaisseur à droite</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_INCI_TR</source>
<translation>Réduction d&apos;épaisseur du tuyau incident</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_R</source>
<translation>Rayon (r%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_W</source>
<translation>Epaisseur (w%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_L_TRANS</source>
<translation>Longueur de transition (ltrans%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_L_THIN</source>
<translation>Longueur de la partie étroite (lthin%1)</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPMAIN</source>
<translation>Paramètres principaux</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPREDUCT</source>
<translation>Réduction d&apos;épaisseur</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPPOS</source>
<translation>Position</translation>
</message>
</context>
<context>
<name>AdvancedGUI_SmoothingSurfaceDlg</name>
<message>
<source>GEOM_SMOOTHINGSURFACE_TITLE</source>
<translation>Constructions de surface lisse</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE</source>
<translation>Surface lissee</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_RESULT</source>
<translation>Nom du résultat</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_ARG</source>
<translation>Noeuds</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_ARG_POINTS</source>
<translation>Points</translation>
</message>
</context>
</TS>

View File

@ -0,0 +1,233 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="en_US">
<context>
<name>@default</name>
<message>
<source>GEOM_ADVANCED</source>
<translation>:%1 </translation>
</message>
<message>
<source>GEOM_ADVANCED_201</source>
<translation>TShape </translation>
</message>
<message>
<source>GEOM_ADVANCED_202</source>
<translation></translation>
</message>
<message>
<source>GEOM_ADVANCED_203</source>
<translation></translation>
</message>
<message>
<source>GEOM_DIVIDEDDISK</source>
<translation></translation>
</message>
<message>
<source>GEOM_DIVIDEDDISK_TITLE</source>
<translation></translation>
</message>
<message>
<source>GEOM_DIVIDEDCYLINDER</source>
<translation></translation>
</message>
<message>
<source>GEOM_DIVIDEDCYLINDER_TITLE</source>
<translation></translation>
</message>
<message>
<source>MEN_DIVIDEDCYLINDER</source>
<translation></translation>
</message>
<message>
<source>TOP_DIVIDEDCYLINDER</source>
<translation></translation>
</message>
<message>
<source>STB_DIVIDEDCYLINDER</source>
<translation></translation>
</message>
<message>
<source>MEN_DIVIDEDDISK</source>
<translation></translation>
</message>
<message>
<source>TOP_DIVIDEDDISK</source>
<translation></translation>
</message>
<message>
<source>STB_DIVIDEDDISK</source>
<translation></translation>
</message>
<message>
<source>TOP_PIPETSHAPE</source>
<translation>TShape </translation>
</message>
<message>
<source>MEN_PIPETSHAPE</source>
<translation>TShape </translation>
</message>
<message>
<source>STB_PIPETSHAPE</source>
<translation> TShape </translation>
</message>
<message>
<source>TOP_SMOOTHINGSURFACE</source>
<translation type="unfinished">Smoothing Surface</translation>
</message>
<message>
<source>MEN_SMOOTHINGSURFACE</source>
<translation type="unfinished">Smoothing Surface</translation>
</message>
<message>
<source>STB_SMOOTHINGSURFACE</source>
<translation type="unfinished">Smoothing Surface</translation>
</message>
<message>
<source>HALF_LENGTH_MAIN_PIPE</source>
<translation></translation>
</message>
<message>
<source>HALF_LENGTH_INCIDENT_PIPE</source>
<translation></translation>
</message>
<message>
<source>CIRCULAR_QUARTER_PIPE</source>
<translation></translation>
</message>
<message>
<source>THICKNESS</source>
<translation></translation>
</message>
<message>
<source>FLANGE</source>
<translation></translation>
</message>
<message>
<source>CHAMFER_OR_FILLET</source>
<translation></translation>
</message>
<message>
<source>CHAMFER</source>
<translation></translation>
</message>
<message>
<source>FILLET</source>
<translation></translation>
</message>
<message>
<source>JUNCTION_FACE_1</source>
<translation> 1</translation>
</message>
<message>
<source>JUNCTION_FACE_2</source>
<translation> 2</translation>
</message>
<message>
<source>JUNCTION_FACE_3</source>
<translation> 3</translation>
</message>
<message>
<source>INTERNAL_FACES</source>
<translation type="unfinished">Internal faces</translation>
</message>
</context>
<context>
<name>AdvancedGUI_PipeTShapeDlg</name>
<message>
<source>GEOM_PIPE_TSHAPE_TITLE</source>
<translation> TShape </translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE</source>
<translation>PipeTShape</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_MPIPE</source>
<translation></translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_R</source>
<translation></translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_W</source>
<translation></translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_L</source>
<translation></translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_IPIPE</source>
<translation></translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_CHAMFER</source>
<translation></translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_CHAMFER_H</source>
<translation></translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_CHAMFER_W</source>
<translation></translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_FILLET</source>
<translation></translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_HEX</source>
<translation>16 </translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION</source>
<translation></translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_P1</source>
<translation> P1</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_P2</source>
<translation> P2</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_P3</source>
<translation> P3</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L1</source>
<translation> L1</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
<translation> L2</translation>
</message>
</context>
<context>
<name>AdvancedGUI_SmoothingSurfaceDlg</name>
<message>
<source>GEOM_SMOOTHINGSURFACE_TITLE</source>
<translation type="unfinished">Smoothing surface Construction</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE</source>
<translation type="unfinished">Smoothing surface</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_RESULT</source>
<translation type="unfinished">Result name</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_ARG</source>
<translation type="unfinished">Nodes</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_ARG_POINTS</source>
<translation type="unfinished">Points</translation>
</message>
</context>
</TS>

View File

@ -15,14 +15,13 @@
# 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 : Makefile.am
# Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
# header files
# header files
salomeinclude_HEADERS = \
AdvancedGUI.h
@ -65,6 +64,13 @@ MOC_FILES += $(ADVANCED_MOC_FILES)
nodist_libAdvancedGUI_la_SOURCES = \
$(MOC_FILES)
# resources files
nodist_salomeres_DATA = \
AdvancedGUI_images.qm \
AdvancedGUI_msg_en.qm \
AdvancedGUI_msg_fr.qm \
AdvancedGUI_msg_ja.qm
# additional information to compile and link file
libAdvancedGUI_la_CPPFLAGS = \

View File

@ -0,0 +1,157 @@
// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// GEOM GEOMGUI : reading of xml file with list of available plugin actions
// File : GEOMGUI_XmlHandler.cxx
// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
#include "GEOMGUI_XmlHandler.h"
#include "GEOMGUI.h"
// SALOME KERNEL includes
#include <utilities.h>
/*!
* Constructor
*/
GEOMGUI_XmlHandler::GEOMGUI_XmlHandler()
{
}
/*!
* Destructor
*/
GEOMGUI_XmlHandler::~GEOMGUI_XmlHandler()
{
}
/*!
* Starts parsing of document. Does some initialization
*
* Reimplemented from QXmlDefaultHandler.
*/
bool GEOMGUI_XmlHandler::startDocument()
{
myErrorProt = "";
return true;
}
/*!
* Does different actions depending on the name of the tag and the
* state you are in document.
*
* Reimplemented from QXmlDefaultHandler.
*/
bool GEOMGUI_XmlHandler::startElement (const QString&, const QString&,
const QString& qName,
const QXmlAttributes& atts)
{
if (qName == "geom-plugins") { // set of plugins
//myHypothesesMap.clear();
//myAlgorithmsMap.clear();
}
else if (qName == "geom-plugin") { // group of actions
myPluginData.myName = atts.value("name");
myPluginData.myServerLib = atts.value("server-lib");
myPluginData.myClientLib = atts.value("gui-lib");
//QString aResName = atts.value("resources");
//if (aResName != "") {
// SUIT_ResourceMgr* resMgr = GEOMGUI::resourceMgr();
// QString lang = resMgr->stringValue( resMgr->langSection(), "language", "en" );
// resMgr->loadTranslator( "resources", QString( "%1_msg_%2.qm" ).arg( aResName, lang ) );
// resMgr->loadTranslator( "resources", QString( "%1_images.qm" ).arg( aResName, lang ) );
//}
}
else if (qName == "actions") { // group of actions
}
else if (qName == "action") { // an action
GEOMGUI_ActionData aData;
aData.myLabel = atts.value("label");
aData.myIcon = atts.value("icon");
aData.myMenu = atts.value("menu");
aData.myTooltip = atts.value("tooltip");
aData.myStatusBar = atts.value("status-bar");
myPluginData.myListOfActions.append(aData);
}
else {
// error
return false;
}
return true;
}
/*!
* Reimplemented from QXmlDefaultHandler.
*/
bool GEOMGUI_XmlHandler::endElement (const QString&, const QString&, const QString&)
{
return true;
}
/*!
* Reimplemented from QXmlDefaultHandler.
*/
bool GEOMGUI_XmlHandler::characters (const QString& ch)
{
// we are not interested in whitespaces
//QString ch_simplified = ch.simplified();
//if ( ch_simplified.isEmpty() )
// return true;
return true;
}
/*!
* Returns the default error string.
*
* Reimplemented from QXmlDefaultHandler.
*/
QString GEOMGUI_XmlHandler::errorString()
{
return "the document is not in the quote file format";
}
/*!
* Returns the error protocol if parsing failed
*
* Reimplemented from QXmlDefaultHandler.
*/
QString GEOMGUI_XmlHandler::errorProtocol()
{
return myErrorProt;
}
/*!
* Returns exception
*
* Reimplemented from QXmlDefaultHandler.
*/
bool GEOMGUI_XmlHandler::fatalError (const QXmlParseException& exception)
{
myErrorProt += QString("fatal parsing error: %1 in line %2, column %3\n")
.arg(exception.message())
.arg(exception.lineNumber())
.arg(exception.columnNumber());
return QXmlDefaultHandler::fatalError( exception );
}

View File

@ -0,0 +1,90 @@
// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// GEOM GEOMGUI : reading of xml file with list of available plugin actions
// File : GEOMGUI_XmlHandler.h
// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
#ifndef GEOMGUI_XMLHANDLER_H
#define GEOMGUI_XMLHANDLER_H
// GEOM includes
#include "GEOMGUI.h"
// Qt includes
#include <QXmlDefaultHandler>
#include <QMap>
#include <QList>
//GUI includes
#include <QtxMap.h>
//class HypothesisData;
//class HypothesesSet;
struct GEOMGUI_ActionData
{
QString myLabel; // unique ID
QString myIcon;
QString myMenu;
QString myTooltip;
QString myStatusBar;
//int myAccel;
//bool myToggle;
//QString myShortcut;
};
struct GEOMGUI_PluginData
{
QString myName;
QString myServerLib;
QString myClientLib;
//QList<GEOMGUI_ActionData*> myListOfActions;
QList<GEOMGUI_ActionData> myListOfActions;
};
class GEOMGUI_EXPORT GEOMGUI_XmlHandler : public QXmlDefaultHandler
{
public:
GEOMGUI_XmlHandler();
virtual ~GEOMGUI_XmlHandler();
bool startDocument();
bool startElement( const QString&, const QString&,
const QString&, const QXmlAttributes& );
bool endElement( const QString&, const QString&, const QString& );
bool characters( const QString& );
QString errorString();
QString errorProtocol();
bool fatalError( const QXmlParseException& );
public:
GEOMGUI_PluginData myPluginData;
private:
QString myErrorProt;
};
#endif // GEOMGUI_XMLHANDLER_H

View File

@ -0,0 +1,54 @@
// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// GEOM GEOMGUI : GUI for Geometry component
// File : GEOMPluginGUI.cxx
#include "GEOMPluginGUI.h"
#include "GeometryGUI.h"
#include <SUIT_Desktop.h>
//=================================================================================
// function : GEOMPluginGUI::GEOMPluginGUI
// purpose : Constructor
//=================================================================================
GEOMPluginGUI::GEOMPluginGUI (GeometryGUI* parent)
: GEOMGUI (parent)
{
}
//=================================================================================
// function : GEOMPluginGUI::~GEOMPluginGUI
// purpose : Destructor
//=================================================================================
GEOMPluginGUI::~GEOMPluginGUI()
{
}
//=================================================================================
// class : GEOMPluginGUI::OnGUIEvent
// purpose : Main/popup menu events processing
//=================================================================================
bool GEOMPluginGUI::OnGUIEvent (const QString& /*action*/, SUIT_Desktop* /*parent*/)
{
return true;
}

View File

@ -0,0 +1,49 @@
// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// GEOM GEOMGUI : GUI for Geometry component
// File : GEOMPluginGUI.h
#ifndef GEOMPLUGINGUI_H
#define GEOMPLUGINGUI_H
#include "GEOMGUI.h"
#include <QObject>
//=================================================================================
// class : GEOMPluginGUI
// purpose : Base class for all geometry Plugins
//=================================================================================
class GEOMGUI_EXPORT GEOMPluginGUI : public GEOMGUI
{
public :
// Constructor
GEOMPluginGUI (GeometryGUI* parent);
// Destructor
virtual ~GEOMPluginGUI();
//! Parameter action specifies the operation ID
virtual bool OnGUIEvent (const QString& action, SUIT_Desktop* parent);
//virtual bool OnGUIEvent (const QString& action, SUIT_Desktop* parent, const QVariant& theParam);
};
#endif // GEOMPluginGUI_H

View File

@ -1211,171 +1211,5 @@
<source>ICON_DLG_SCALE_ALONG_AXES</source>
<translation>scale_along_axes.png</translation>
</message>
<message>
<source>ICON_DLG_PIPETSHAPE</source>
<translation>pipetshape.png</translation>
</message>
<message>
<source>ICO_PIPETSHAPE</source>
<translation>pipetshape.png</translation>
</message>
<message>
<source>ICO_PIPETSHAPE_IMPORT</source>
<translation>pipetshape_import_icon.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE</source>
<translation>dlg_pipetshape.png</translation>
</message>
<message>
<source>IMG_PIPETSHAPE_SECT</source>
<translation>pipetshape_section.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_L1</source>
<translation>dlg_pipetshapel1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_R1</source>
<translation>dlg_pipetshaper1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_W1</source>
<translation>dlg_pipetshapew1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_L2</source>
<translation>dlg_pipetshapel2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_R2</source>
<translation>dlg_pipetshaper2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_W2</source>
<translation>dlg_pipetshapew2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_FILLET</source>
<translation>dlg_pipetshapefillet.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_FILLET_L1</source>
<translation>dlg_pipetshapefilletl1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_FILLET_R1</source>
<translation>dlg_pipetshapefilletr1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_FILLET_W1</source>
<translation>dlg_pipetshapefilletw1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_FILLET_L2</source>
<translation>dlg_pipetshapefilletl2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_FILLET_R2</source>
<translation>dlg_pipetshapefilletr2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_FILLET_W2</source>
<translation>dlg_pipetshapefilletw2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_FILLET_RF</source>
<translation>dlg_pipetshapefilletrf.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER</source>
<translation>dlg_pipetshapechamfer.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER_L1</source>
<translation>dlg_pipetshapechamferl1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER_R1</source>
<translation>dlg_pipetshapechamferr1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER_W1</source>
<translation>dlg_pipetshapechamferw1.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER_L2</source>
<translation>dlg_pipetshapechamferl2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER_R2</source>
<translation>dlg_pipetshapechamferr2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER_W2</source>
<translation>dlg_pipetshapechamferw2.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER_H</source>
<translation>dlg_pipetshapechamferh.png</translation>
</message>
<message>
<source>DLG_PIPETSHAPE_CHAMFER_W</source>
<translation>dlg_pipetshapechamferw.png</translation>
</message>
<message>
<source>ICON_OBJBROWSER_ADVANCED_201</source>
<translation>tree_pipetshape.png</translation>
</message>
<!--
<message>
<source>ICON_DLG_PIPETSHAPEGROUPS</source>
<translation>pipetshapegroups.png</translation>
</message>
<message>
<source>ICO_PIPETSHAPEGROUPS</source>
<translation>pipetshapegroups.png</translation>
</message>
-->
<message>
<source>ICON_DLG_DIVIDEDDISK_R_RATIO</source>
<translation>divided_disk.png</translation>
</message>
<message>
<source>ICO_DIVIDEDDISK</source>
<translation>divided_disk.png</translation>
</message>
<message>
<source>ICON_OBJBROWSER_ADVANCED_202</source>
<translation>divided_disk.png</translation>
</message>
<message>
<source>ICON_DLG_DIVIDEDCYLINDER_R_H</source>
<translation>dividedcylinder_r_h.png</translation>
</message>
<message>
<source>ICO_DIVIDEDCYLINDER</source>
<translation>dividedcylinder.png</translation>
</message>
<message>
<source>ICON_OBJBROWSER_ADVANCED_203</source>
<translation>dividedcylinder.png</translation>
</message>
<message>
<source>ICON_DLG_SMOOTHINGSURFACE_LPOINTS</source>
<translation>smoothingsurface_lpoints.png</translation>
</message>
<message>
<source>ICO_SMOOTHINGSURFACE</source>
<translation>smoothingsurface.png</translation>
</message>
<message>
<source>ICON_OBJBROWSER_ADVANCED_204</source>
<translation>tree_smoothingsurface.png</translation>
</message>
<!-- @@ insert new functions before this line @@ do not remove this line @@ -->
</context>
</TS>

View File

@ -559,22 +559,6 @@ Please, select face, shell or solid and try again</translation>
<source>GEOM_DIVIDE_EDGE_TITLE</source>
<translation>Addition of point</translation>
</message>
<message>
<source>GEOM_DIVIDEDDISK</source>
<translation>Divided Disk</translation>
</message>
<message>
<source>GEOM_DIVIDEDDISK_TITLE</source>
<translation>Divided Disk construction</translation>
</message>
<message>
<source>GEOM_DIVIDEDCYLINDER</source>
<translation>Divided Cylinder</translation>
</message>
<message>
<source>GEOM_DIVIDEDCYLINDER_TITLE</source>
<translation>Divided Cylinder construction</translation>
</message>
<message>
<source>GEOM_DX</source>
<translation>Dx :</translation>
@ -2496,30 +2480,6 @@ Please, select face, shell or solid and try again</translation>
<source>MEN_DISK</source>
<translation>Disk</translation>
</message>
<message>
<source>MEN_DIVIDEDDISK</source>
<translation>Divided Disk</translation>
</message>
<message>
<source>TOP_DIVIDEDDISK</source>
<translation>Divided Disk</translation>
</message>
<message>
<source>STB_DIVIDEDDISK</source>
<translation>Divided Disk</translation>
</message>
<message>
<source>MEN_DIVIDEDCYLINDER</source>
<translation>Divided Cylinder</translation>
</message>
<message>
<source>TOP_DIVIDEDCYLINDER</source>
<translation>Divided Cylinder</translation>
</message>
<message>
<source>STB_DIVIDEDCYLINDER</source>
<translation>Divided Cylinder</translation>
</message>
<message>
<source>MEN_DISPLAY_ALL</source>
<translation>Show All</translation>
@ -4892,87 +4852,11 @@ shells and solids on the other hand.</translation>
<translation>Take into account the units (%1) embedded to the file?
Ignoring units will cause model scaling (as dimensions are supposed to be specified in meters).</translation>
</message>
<message>
<source>GEOM_ADVANCED</source>
<translation>Advanced shape: type %1</translation>
</message>
<message>
<source>GEOM_ADVANCED_202</source>
<translation>Divided Disk</translation>
</message>
<message>
<source>GEOM_ADVANCED_203</source>
<translation>Divided Cylinder</translation>
</message>
<message>
<source>GEOM_PRECISION_HINT</source>
<translation>Input value precision can be adjusted using
&apos;%1&apos; parameter in Geometry module preferences.</translation>
</message>
<message>
<source>TOP_PIPETSHAPE</source>
<translation>Create Pipe TShape</translation>
</message>
<message>
<source>MEN_PIPETSHAPE</source>
<translation>Pipe TShape</translation>
</message>
<message>
<source>STB_PIPETSHAPE</source>
<translation>Create new Pipe TShape object</translation>
</message>
<message>
<source>GEOM_ADVANCED_201</source>
<translation>Pipe TShape</translation>
</message>
<message>
<source>HALF_LENGTH_MAIN_PIPE</source>
<translation>Main pipe half length</translation>
</message>
<message>
<source>HALF_LENGTH_INCIDENT_PIPE</source>
<translation>Incident pipe half length</translation>
</message>
<message>
<source>CIRCULAR_QUARTER_PIPE</source>
<translation>Circular quarter of pipe</translation>
</message>
<message>
<source>THICKNESS</source>
<translation>Thickness</translation>
</message>
<message>
<source>FLANGE</source>
<translation>Flange</translation>
</message>
<message>
<source>CHAMFER_OR_FILLET</source>
<translation>Chamfer or fillet</translation>
</message>
<message>
<source>CHAMFER</source>
<translation>Chamfer</translation>
</message>
<message>
<source>FILLET</source>
<translation>Fillet</translation>
</message>
<message>
<source>JUNCTION_FACE_1</source>
<translation>Junction 1</translation>
</message>
<message>
<source>JUNCTION_FACE_2</source>
<translation>Junction 2</translation>
</message>
<message>
<source>JUNCTION_FACE_3</source>
<translation>Junction 3</translation>
</message>
<message>
<source>INTERNAL_FACES</source>
<translation>Internal faces</translation>
</message>
<message>
<source>GEOM_PLUGINS_OTHER</source>
<translation>Other</translation>
@ -4993,14 +4877,6 @@ Ignoring units will cause model scaling (as dimensions are supposed to be specif
<source>TOP_SMOOTHINGSURFACE</source>
<translation type="unfinished">Smoothing Surface</translation>
</message>
<message>
<source>MEN_SMOOTHINGSURFACE</source>
<translation type="unfinished">Smoothing Surface</translation>
</message>
<message>
<source>STB_SMOOTHINGSURFACE</source>
<translation type="unfinished">Smoothing Surface</translation>
</message>
<message>
<source>GEOM_SELECT_IMAGE</source>
<translation>Select image...</translation>
@ -5823,144 +5699,6 @@ Do you want to create new material?</translation>
<translation>Shared_%1</translation>
</message>
</context>
<context>
<name>AdvancedGUI_PipeTShapeDlg</name>
<message>
<source>GEOM_PIPE_TSHAPE_TITLE</source>
<translation>Pipe TShape Construction</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE</source>
<translation>PipeTShape</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_MPIPE</source>
<translation>Main pipe</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_R</source>
<translation>Radius</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_W</source>
<translation>Width</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_L</source>
<translation>Half-length</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_IPIPE</source>
<translation>Incident pipe</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_CHAMFER</source>
<translation>Chamfer</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_CHAMFER_H</source>
<translation>Height</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_CHAMFER_W</source>
<translation>Width</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_FILLET</source>
<translation>Fillet</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_HEX</source>
<translation>Prepare for hex mesh</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION</source>
<translation>Set position</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_P1</source>
<translation>Junction P1</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_P2</source>
<translation>Junction P2</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_P3</source>
<translation>Junction P3</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L1</source>
<translation>New L1</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
<translation>New L2</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_LEFT_TR</source>
<translation>Left thickness reduction</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_RIGHT_TR</source>
<translation>Right thickness reduction</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_INCI_TR</source>
<translation>Incident pipe thickness reduction</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_R</source>
<translation>Radius (r%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_W</source>
<translation>Width (w%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_L_TRANS</source>
<translation>Transition length (ltrans%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_L_THIN</source>
<translation>Thin part length (lthin%1)</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPMAIN</source>
<translation>Main parameters</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPREDUCT</source>
<translation>Thickness reduction</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPPOS</source>
<translation>Position</translation>
</message>
</context>
<context>
<name>AdvancedGUI_SmoothingSurfaceDlg</name>
<message>
<source>GEOM_SMOOTHINGSURFACE_TITLE</source>
<translation>Smoothing surface Construction</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE</source>
<translation>Smoothing surface</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_RESULT</source>
<translation>Result name</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_ARG</source>
<translation>Nodes</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_ARG_POINTS</source>
<translation>Points</translation>
</message>
</context>
<context>
<name>GEOMToolsGUI_PublishDlg</name>
<message>

View File

@ -565,22 +565,6 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
<source>GEOM_DIVIDE_EDGE_TITLE</source>
<translation>Ajouter un point</translation>
</message>
<message>
<source>GEOM_DIVIDEDDISK</source>
<translation>Disque prédécoupé</translation>
</message>
<message>
<source>GEOM_DIVIDEDDISK_TITLE</source>
<translation>Construction d&apos;un disque prédécoupé</translation>
</message>
<message>
<source>GEOM_DIVIDEDCYLINDER</source>
<translation>Cylinder prédécoupé</translation>
</message>
<message>
<source>GEOM_DIVIDEDCYLINDER_TITLE</source>
<translation>Construction d&apos;un cylindre prédécoupé</translation>
</message>
<message>
<source>GEOM_DX</source>
<translation>Dx :</translation>
@ -2502,30 +2486,6 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
<source>MEN_DISK</source>
<translation>Disque</translation>
</message>
<message>
<source>MEN_DIVIDEDDISK</source>
<translation>Disque prédécoupé</translation>
</message>
<message>
<source>TOP_DIVIDEDDISK</source>
<translation>Disque prédécoupé</translation>
</message>
<message>
<source>STB_DIVIDEDDISK</source>
<translation>Disque prédécoupé</translation>
</message>
<message>
<source>MEN_DIVIDEDCYLINDER</source>
<translation>Cylinder prédécoupé</translation>
</message>
<message>
<source>TOP_DIVIDEDCYLINDER</source>
<translation>Cylinder prédécoupé</translation>
</message>
<message>
<source>STB_DIVIDEDCYLINDER</source>
<translation>Cylinder prédécoupé</translation>
</message>
<message>
<source>MEN_DISPLAY_ALL</source>
<translation>Afficher tout</translation>
@ -4898,87 +4858,11 @@ les coques et solides d&apos;un autre.</translation>
<translation>Voulez-vous prendre les unités du fichier (%1) en considération?
Sinon le modèle sera mis à l&apos;échelle GEOM (unités interprétées comme des mètres).</translation>
</message>
<message>
<source>GEOM_ADVANCED</source>
<translation>Objet géométrique avancé : type %1</translation>
</message>
<message>
<source>GEOM_ADVANCED_202</source>
<translation>Disque prédécoupé</translation>
</message>
<message>
<source>GEOM_ADVANCED_203</source>
<translation>Cylindre prédécoupé</translation>
</message>
<message>
<source>GEOM_PRECISION_HINT</source>
<translation>Il est possible d&apos;ajuster la précision de la valeur d&apos;entrée avec
le paramètre &apos;%1&apos; aux préférences du module Géométrie.</translation>
</message>
<message>
<source>TOP_PIPETSHAPE</source>
<translation>Créer un tuyau en T</translation>
</message>
<message>
<source>MEN_PIPETSHAPE</source>
<translation>Tuyau en T</translation>
</message>
<message>
<source>STB_PIPETSHAPE</source>
<translation>Créer un tuyau en T</translation>
</message>
<message>
<source>GEOM_ADVANCED_201</source>
<translation>Tuyau en T</translation>
</message>
<message>
<source>HALF_LENGTH_MAIN_PIPE</source>
<translation>Demi-longueur du tuyau principal </translation>
</message>
<message>
<source>HALF_LENGTH_INCIDENT_PIPE</source>
<translation>Demi-longueur du tuyau incident</translation>
</message>
<message>
<source>CIRCULAR_QUARTER_PIPE</source>
<translation>Un quart circulaire du tuyau</translation>
</message>
<message>
<source>THICKNESS</source>
<translation>Epaisseur</translation>
</message>
<message>
<source>FLANGE</source>
<translation>Collerette</translation>
</message>
<message>
<source>CHAMFER_OR_FILLET</source>
<translation>Chanfrein ou congé</translation>
</message>
<message>
<source>CHAMFER</source>
<translation>Chanfrein</translation>
</message>
<message>
<source>FILLET</source>
<translation>Congé</translation>
</message>
<message>
<source>JUNCTION_FACE_1</source>
<translation>Jonction 1</translation>
</message>
<message>
<source>JUNCTION_FACE_2</source>
<translation>Jonction 2</translation>
</message>
<message>
<source>JUNCTION_FACE_3</source>
<translation>Jonction 3</translation>
</message>
<message>
<source>INTERNAL_FACES</source>
<translation type="unfinished">Internal faces</translation>
</message>
<message>
<source>GEOM_PLUGINS_OTHER</source>
<translation>Autre</translation>
@ -5829,144 +5713,6 @@ Voulez-vous en créer un nouveau ?</translation>
<translation>Partagé_%1</translation>
</message>
</context>
<context>
<name>AdvancedGUI_PipeTShapeDlg</name>
<message>
<source>GEOM_PIPE_TSHAPE_TITLE</source>
<translation>Construction d&apos;un tuyau en T</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE</source>
<translation>Tuyau en T</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_MPIPE</source>
<translation>Tuyau principal</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_R</source>
<translation>Rayon</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_W</source>
<translation>Largeur</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_L</source>
<translation>Demi-longueur</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_IPIPE</source>
<translation>Tuyau incident</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_CHAMFER</source>
<translation>Chanfrein</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_CHAMFER_H</source>
<translation>Hauteur</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_CHAMFER_W</source>
<translation>Largeur</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_FILLET</source>
<translation>Congé</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_HEX</source>
<translation>Préparer pour un maillage hexaédrique</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION</source>
<translation>Définir la position</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_P1</source>
<translation>Jonction P1</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_P2</source>
<translation>Jonction P2</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_P3</source>
<translation>Jonction P3</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L1</source>
<translation>Nouvelle L1</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
<translation>Nouvelle L2</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_LEFT_TR</source>
<translation>Réduction d&apos;épaisseur à gauche</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_RIGHT_TR</source>
<translation>Réduction d&apos;épaisseur à droite</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_INCI_TR</source>
<translation>Réduction d&apos;épaisseur du tuyau incident</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_R</source>
<translation>Rayon (r%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_W</source>
<translation>Epaisseur (w%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_L_TRANS</source>
<translation>Longueur de transition (ltrans%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_L_THIN</source>
<translation>Longueur de la partie étroite (lthin%1)</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPMAIN</source>
<translation>Paramètres principaux</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPREDUCT</source>
<translation>Réduction d&apos;épaisseur</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPPOS</source>
<translation>Position</translation>
</message>
</context>
<context>
<name>AdvancedGUI_SmoothingSurfaceDlg</name>
<message>
<source>GEOM_SMOOTHINGSURFACE_TITLE</source>
<translation>Constructions de surface lisse</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE</source>
<translation>Surface lissee</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_RESULT</source>
<translation>Nom du résultat</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_ARG</source>
<translation>Noeuds</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_ARG_POINTS</source>
<translation>Points</translation>
</message>
</context>
<context>
<name>GEOMToolsGUI_PublishDlg</name>
<message>

View File

@ -551,22 +551,6 @@
<source>GEOM_DIVIDE_EDGE_TITLE</source>
<translation></translation>
</message>
<message>
<source>GEOM_DIVIDEDDISK</source>
<translation></translation>
</message>
<message>
<source>GEOM_DIVIDEDDISK_TITLE</source>
<translation></translation>
</message>
<message>
<source>GEOM_DIVIDEDCYLINDER</source>
<translation></translation>
</message>
<message>
<source>GEOM_DIVIDEDCYLINDER_TITLE</source>
<translation></translation>
</message>
<message>
<source>GEOM_DX</source>
<translation>Dx:</translation>
@ -2459,30 +2443,6 @@
<source>MEN_DISK</source>
<translation></translation>
</message>
<message>
<source>MEN_DIVIDEDDISK</source>
<translation></translation>
</message>
<message>
<source>TOP_DIVIDEDDISK</source>
<translation></translation>
</message>
<message>
<source>STB_DIVIDEDDISK</source>
<translation></translation>
</message>
<message>
<source>MEN_DIVIDEDCYLINDER</source>
<translation></translation>
</message>
<message>
<source>TOP_DIVIDEDCYLINDER</source>
<translation></translation>
</message>
<message>
<source>STB_DIVIDEDCYLINDER</source>
<translation></translation>
</message>
<message>
<source>MEN_DISPLAY_ALL</source>
<translation></translation>
@ -4751,82 +4711,10 @@
<source>GEOM_SCALE_DIMENSIONS</source>
<translation> (%1) </translation>
</message>
<message>
<source>GEOM_ADVANCED</source>
<translation>:%1 </translation>
</message>
<message>
<source>GEOM_ADVANCED_202</source>
<translation></translation>
</message>
<message>
<source>GEOM_ADVANCED_203</source>
<translation></translation>
</message>
<message>
<source>GEOM_PRECISION_HINT</source>
<translation> '%1' 使調</translation>
</message>
<message>
<source>TOP_PIPETSHAPE</source>
<translation>TShape </translation>
</message>
<message>
<source>MEN_PIPETSHAPE</source>
<translation>TShape </translation>
</message>
<message>
<source>STB_PIPETSHAPE</source>
<translation> TShape </translation>
</message>
<message>
<source>GEOM_ADVANCED_201</source>
<translation>TShape </translation>
</message>
<message>
<source>HALF_LENGTH_MAIN_PIPE</source>
<translation></translation>
</message>
<message>
<source>HALF_LENGTH_INCIDENT_PIPE</source>
<translation></translation>
</message>
<message>
<source>CIRCULAR_QUARTER_PIPE</source>
<translation></translation>
</message>
<message>
<source>THICKNESS</source>
<translation></translation>
</message>
<message>
<source>FLANGE</source>
<translation></translation>
</message>
<message>
<source>CHAMFER_OR_FILLET</source>
<translation></translation>
</message>
<message>
<source>CHAMFER</source>
<translation></translation>
</message>
<message>
<source>FILLET</source>
<translation></translation>
</message>
<message>
<source>JUNCTION_FACE_1</source>
<translation> 1</translation>
</message>
<message>
<source>JUNCTION_FACE_2</source>
<translation> 2</translation>
</message>
<message>
<source>JUNCTION_FACE_3</source>
<translation> 3</translation>
</message>
<message>
<source>GEOM_PLUGINS_OTHER</source>
<translation></translation>

View File

@ -29,6 +29,8 @@
#include "Python.h"
#include "GeometryGUI.h"
#include "GeometryGUI_Operations.h"
#include "GEOMPluginGUI.h"
#include "GEOMGUI_XmlHandler.h"
#include "GEOMGUI_OCCSelector.h"
#include "GEOMGUI_Selection.h"
#include "GEOMGUI_CreationInfoWdg.h"
@ -82,6 +84,7 @@
#include <Basics_OCCTVersion.hxx>
// External includes
#include <QDir>
#include <QMenu>
#include <QTime>
#include <QAction>
@ -277,6 +280,50 @@ GEOMGUI* GeometryGUI::getLibrary( const QString& libraryName )
return myGUIMap.contains( libraryName ) ? myGUIMap[ libraryName ] : 0;
}
//=======================================================================
// function : GeometryGUI::getPluginLibrary()
// purpose : get or load GUI Plugin library by name [ internal ]
//=======================================================================
typedef GEOMPluginGUI* (*PluginLibraryGUI)( GeometryGUI* );
GEOMPluginGUI* GeometryGUI::getPluginLibrary( const QString& libraryName )
{
if ( !myGUIMap.contains( libraryName ) ) {
// try to load library if it is not loaded yet
#ifndef WNT
QString dirs = getenv( "LD_LIBRARY_PATH" );
QString sep = ":";
#else
QString dirs = getenv( "PATH" );
QString sep = ";";
#endif
if ( !dirs.isEmpty() ) {
QStringList dirList = dirs.split(sep, QString::SkipEmptyParts ); // skip empty entries
QListIterator<QString> it( dirList ); it.toBack();
while ( it.hasPrevious() ) {
QFileInfo fi( Qtx::addSlash( it.previous() ) + libraryName );
if ( fi.exists() ) {
OSD_SharedLibrary aSharedLibrary( fi.fileName().toLatin1().constData() );
bool res = aSharedLibrary.DlOpen( OSD_RTLD_LAZY );
if ( !res ) {
MESSAGE( "Can't open library : " << aSharedLibrary.DlError() );
continue; // continue search further
}
OSD_Function osdF = aSharedLibrary.DlSymb( "GetLibGUI" );
if ( osdF != NULL ) {
PluginLibraryGUI func = (GEOMPluginGUI* (*) (GeometryGUI*))osdF;
GEOMPluginGUI* libGUI = (*func)( this );
if ( libGUI ) {
myGUIMap[ libraryName ] = libGUI;
break; // found and loaded!
}
}
}
}
}
}
return myGUIMap.contains( libraryName ) ? (GEOMPluginGUI*)myGUIMap[ libraryName ] : 0;
}
//=======================================================================
// function : GeometryGUI::ActiveWorkingPlane()
// purpose : Activate Working Plane View
@ -393,8 +440,10 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
<< GEOMOp::OpPointMarker
<< GEOMOp::OpCreateFolder
<< GEOMOp::OpSortChildren;
if ( !ViewOCC && !ViewVTK && !NotViewerDependentCommands.contains( id ) )
return;
if ( !ViewOCC && !ViewVTK && !NotViewerDependentCommands.contains( id ) ) {
// activate OCC viewer
getApp()->getViewManager(OCCViewer_Viewer::Type(), /*create=*/true);
}
// fix for IPAL9103, point 2
if ( CORBA::is_nil( GetGeomGen() ) ) {
@ -590,16 +639,45 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
case GEOMOp::OpExplodeBlock: // MENU BLOCKS - EXPLODE ON BLOCKS
libName = "BlocksGUI";
break;
case GEOMOp::OpAdvancedNoOp: // NO OPERATION (advanced operations base)
case GEOMOp::OpPipeTShape: // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE
// case GEOMOp::OpPipeTShapeGroups: // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE GROUPS
case GEOMOp::OpDividedDisk: // MENU NEW ENTITY - ADVANCED - DIVIDEDDISK
case GEOMOp::OpDividedCylinder: // MENU NEW ENTITY - ADVANCED - DIVIDEDCYLINDER
case GEOMOp::OpSmoothingSurface: // MENU NEW ENTITY - ADVANCED - SMOOTHINGSURFACE
//@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@//
libName = "AdvancedGUI";
break;
//case GEOMOp::OpAdvancedNoOp: // NO OPERATION (advanced operations base)
//case GEOMOp::OpPipeTShape: // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE
//case GEOMOp::OpPipeTShapeGroups: // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE GROUPS
//case GEOMOp::OpDividedDisk: // MENU NEW ENTITY - ADVANCED - DIVIDEDDISK
//case GEOMOp::OpDividedCylinder: // MENU NEW ENTITY - ADVANCED - DIVIDEDCYLINDER
//case GEOMOp::OpSmoothingSurface: // MENU NEW ENTITY - ADVANCED - SMOOTHINGSURFACE
//@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@//
//libName = "AdvancedGUI";
//break;
default:
if (myPluginActions.contains(id)) {
libName = myPluginActions[id].first;
GEOMPluginGUI* library = 0;
if ( !libName.isEmpty() ) {
#ifndef WNT
libName = QString( "lib" ) + libName + ".so";
#else
libName = libName + ".dll";
#endif
library = getPluginLibrary( libName );
}
// call method of corresponding GUI library
if ( library ) {
//QString action ("%1");
//action = action.arg(id);
//if( !theParam.isValid() )
library->OnGUIEvent( myPluginActions[id].second, desk );
//else
// library->OnGUIEvent( id, desk, theParam);
}
else
SUIT_MessageBox::critical( desk, tr( "GEOM_ERROR" ), tr( "GEOM_ERR_LIB_NOT_FOUND" ), tr( "GEOM_BUT_OK" ) );
updateCreationInfo();
return;
}
break;
}
@ -626,6 +704,57 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
updateCreationInfo();
}
//=================================================================================
// function : GeometryGUI::activateOperation()
// purpose :
//=================================================================================
bool GeometryGUI::activateOperation( int actionId )
{
OnGUIEvent(actionId);
return true;
}
//=================================================================================
// function : GeometryGUI::activateOperation()
// purpose :
//=================================================================================
bool GeometryGUI::activateOperation( const QString& actionId )
{
bool isOk = false;
int id = actionId.toInt(&isOk);
if (isOk)
OnGUIEvent(id);
return isOk;
}
//=================================================================================
// function : GeometryGUI::activateOperation()
// purpose :
//=================================================================================
bool GeometryGUI::activateOperation( const QString& actionId, const QString& plugin )
{
bool isOk = false;
QString pluginLib = plugin;
// TODO: if <plugin> is a plugin name, find plugin library name
if (myPluginLibs.contains(plugin))
pluginLib = myPluginLibs[plugin];
QMap<int, PluginAction>::iterator actionsIter = myPluginActions.begin();
for (; actionsIter != myPluginActions.end(); ++actionsIter) {
const PluginAction& anAction = actionsIter.value();
if (anAction.first == pluginLib && anAction.second == actionId) {
// activate operation
OnGUIEvent(actionsIter.key());
isOk = true;
}
}
return isOk;
}
//=================================================================================
// function : GeometryGUI::OnKeyPress()
// purpose : Called when any key is pressed by user [static]
@ -909,8 +1038,6 @@ void GeometryGUI::initialize( CAM_Application* app )
createGeomAction( GEOMOp::OpCreateFolder, "POP_CREATE_FOLDER" );
createGeomAction( GEOMOp::OpSortChildren, "POP_SORT_CHILD_ITEMS" );
createGeomAction( GEOMOp::OpPipeTShape, "PIPETSHAPE" );
// Create actions for increase/decrease transparency shortcuts
createGeomAction( GEOMOp::OpIncrTransparency, "", "", 0, false,
"Geometry:Increase transparency");
@ -923,10 +1050,10 @@ void GeometryGUI::initialize( CAM_Application* app )
createGeomAction( GEOMOp::OpDecrNbIsos, "", "", 0, false,
"Geometry:Decrease number of isolines");
// createGeomAction( GEOMOp::OpPipeTShapeGroups, "PIPETSHAPEGROUPS" );
createGeomAction( GEOMOp::OpDividedDisk, "DIVIDEDDISK" );
createGeomAction( GEOMOp::OpDividedCylinder, "DIVIDEDCYLINDER" );
createGeomAction( GEOMOp::OpSmoothingSurface, "SMOOTHINGSURFACE" );
//createGeomAction( GEOMOp::OpPipeTShape, "PIPETSHAPE" );
//createGeomAction( GEOMOp::OpDividedDisk, "DIVIDEDDISK" );
//createGeomAction( GEOMOp::OpDividedCylinder, "DIVIDEDCYLINDER" );
//createGeomAction( GEOMOp::OpSmoothingSurface, "SMOOTHINGSURFACE" );
//@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@//
// ---- create menus --------------------------
@ -965,7 +1092,7 @@ void GeometryGUI::initialize( CAM_Application* app )
createMenu( GEOMOp::OpCone, primId, -1 );
createMenu( GEOMOp::OpRectangle, primId, -1 );
createMenu( GEOMOp::OpDisk, primId, -1 );
createMenu( GEOMOp::OpPipeTShape,primId, -1 );
//createMenu( GEOMOp::OpPipeTShape,primId, -1 );
int genId = createMenu( tr( "MEN_GENERATION" ), newEntId, -1 );
createMenu( GEOMOp::OpPrism, genId, -1 );
@ -976,9 +1103,9 @@ void GeometryGUI::initialize( CAM_Application* app )
createMenu( GEOMOp::OpPipePath, genId, -1 );
#endif
int advId = createMenu( tr( "MEN_ADVANCED" ), newEntId, -1 );
createMenu( GEOMOp::OpSmoothingSurface, advId, -1 );
//@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@//
//int advId = createMenu( tr( "MEN_ADVANCED" ), newEntId, -1 );
//createMenu( GEOMOp::OpSmoothingSurface, advId, -1 );
//@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@//
createMenu( separator(), newEntId, -1 );
@ -994,8 +1121,8 @@ void GeometryGUI::initialize( CAM_Application* app )
int blocksId = createMenu( tr( "MEN_BLOCKS" ), newEntId, -1 );
createMenu( GEOMOp::OpQuadFace, blocksId, -1 );
createMenu( GEOMOp::OpHexaSolid, blocksId, -1 );
createMenu( GEOMOp::OpDividedDisk, blocksId, -1 );
createMenu( GEOMOp::OpDividedCylinder, blocksId, -1 );
//createMenu( GEOMOp::OpDividedDisk, blocksId, -1 );
//createMenu( GEOMOp::OpDividedCylinder, blocksId, -1 );
createMenu( separator(), newEntId, -1 );
@ -1108,7 +1235,7 @@ void GeometryGUI::initialize( CAM_Application* app )
createMenu( separator(), toolsId, -1 );
createMenu( GEOMOp::OpCheckGeom, toolsId, -1 );
#endif
createMenu( separator(), toolsId, -1 );
createMenu( GEOMOp::OpMaterialsLibrary, toolsId, -1 );
createMenu( separator(), toolsId, -1 );
@ -1168,14 +1295,11 @@ void GeometryGUI::initialize( CAM_Application* app )
createTool( GEOMOp::OpCone, primTbId );
createTool( GEOMOp::OpRectangle, primTbId );
createTool( GEOMOp::OpDisk, primTbId );
createTool( GEOMOp::OpPipeTShape, primTbId ); //rnc
//createTool( GEOMOp::OpPipeTShape, primTbId ); //rnc
int blocksTbId = createTool( tr( "TOOL_BLOCKS" ) );
createTool( GEOMOp::OpDividedDisk, blocksTbId );
createTool( GEOMOp::OpDividedCylinder, blocksTbId );
// int advancedTbId = createTool( tr( "TOOL_ADVANCED" ) ); //rnc
// createTool( GEOMOp::OpPipeTShape, advancedTbId );
//int blocksTbId = createTool( tr( "TOOL_BLOCKS" ) );
//createTool( GEOMOp::OpDividedDisk, blocksTbId );
//createTool( GEOMOp::OpDividedCylinder, blocksTbId );
int boolTbId = createTool( tr( "TOOL_BOOLEAN" ) );
createTool( GEOMOp::OpFuse, boolTbId );
@ -1250,12 +1374,12 @@ void GeometryGUI::initialize( CAM_Application* app )
int picturesTbId = createTool( tr( "TOOL_PICTURES" ) );
createTool( GEOMOp::OpPictureImport, picturesTbId );
#ifdef WITH_OPENCV
createTool( GEOMOp::OpFeatureDetect, picturesTbId );
#endif
#ifdef WITH_OPENCV
createTool( GEOMOp::OpFeatureDetect, picturesTbId );
#endif
int advancedTbId = createTool( tr( "TOOL_ADVANCED" ) );
createTool( GEOMOp::OpSmoothingSurface, advancedTbId );
//int advancedTbId = createTool( tr( "TOOL_ADVANCED" ) );
//createTool( GEOMOp::OpSmoothingSurface, advancedTbId );
//@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@//
// ---- create popup menus --------------------------
@ -1316,7 +1440,7 @@ void GeometryGUI::initialize( CAM_Application* app )
mgr->setRule( action( GEOMOp::OpVectors ), clientOCCorVTK_AndSomeVisible + " and ($component={'GEOM'})", QtxPopupMgr::VisibleRule );
mgr->setRule( action( GEOMOp::OpVectors ), clientOCCorVTK + " and isVectorsMode", QtxPopupMgr::ToggleRule );
mgr->insert( separator(), -1, -1 ); // -----------
mgr->insert( action( GEOMOp::OpColor ), -1, -1 ); // color
mgr->setRule( action( GEOMOp::OpColor ), clientOCCorVTKorOB_AndSomeVisible + " and ($component={'GEOM'})" + "and isPhysicalMaterial=false", QtxPopupMgr::VisibleRule );
mgr->insert( action( GEOMOp::OpTransparency ), -1, -1 ); // transparency
@ -1328,9 +1452,9 @@ void GeometryGUI::initialize( CAM_Application* app )
mgr->insert( action( GEOMOp::OpPointMarker ), -1, -1 ); // point marker
//mgr->setRule( action( GEOMOp::OpPointMarker ), QString( "selcount>0 and $typeid in {%1}" ).arg(GEOM_POINT ), QtxPopupMgr::VisibleRule );
mgr->setRule( action( GEOMOp::OpPointMarker ), QString( "selcount>0 and ( $typeid in {%1} or compoundOfVertices=true ) " ).arg(GEOM::VERTEX).arg(GEOM::COMPOUND), QtxPopupMgr::VisibleRule );
// material properties
mgr->insert( action( GEOMOp::OpMaterialProperties ), -1, -1 );
mgr->insert( action( GEOMOp::OpMaterialProperties ), -1, -1 );
mgr->setRule( action( GEOMOp::OpMaterialProperties ), clientOCCorVTK_AndSomeVisible + " and ($component={'GEOM'})", QtxPopupMgr::VisibleRule );
// texture
@ -1424,6 +1548,144 @@ void GeometryGUI::initialize( CAM_Application* app )
QColor c = resMgr->colorValue( "Geometry", "toplevel_color", QColor( 170, 85, 0 ) );
GEOM_AISShape::setTopLevelColor(SalomeApp_Tools::color(c));
}
// create plugin actions and menus
addPluginActions();
}
//=======================================================================
// function : GeometryGUI::addPluginActions()
// purpose :
//=======================================================================
void GeometryGUI::addPluginActions()
{
// Resource manager
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
if (!resMgr) return;
// Find names of a resource XML files ("GEOMActions.xml" and others);
QString PluginsXml;
char* cenv = getenv("GEOM_PluginsList");
if (cenv)
PluginsXml.sprintf("%s", cenv);
QStringList PluginsXmlList = PluginsXml.split(":", QString::SkipEmptyParts);
if (PluginsXmlList.count() == 0) return;
// get full names of xml files from PluginsXmlList
QStringList xmlFiles;
xmlFiles.append(QDir::home().filePath("CustomGeomPlugins.xml")); // may be inexistent
for (int i = 0; i < PluginsXmlList.count(); i++) {
PluginsXml = PluginsXmlList[ i ];
// Find full path to the resource XML file
QString xmlFile = resMgr->path("resources", "GEOM", PluginsXml + ".xml");
if ( xmlFile.isEmpty() ) // try PLUGIN resources
xmlFile = resMgr->path("resources", PluginsXml, PluginsXml + ".xml");
if ( !xmlFile.isEmpty() )
xmlFiles.append( xmlFile );
}
// create "Advanced Operations" menu and corresponding toolbar
//int advancedMenuId = createMenu(tr("MEN_ADVANCED"), -1, -1, 10);
//int advancedTbarId = createTool(tr("TOOL_ADVANCED"));
int id = GEOMOp::OpLastOperationID; // TODO?
// loop on xmlFiles
QString aNoAccessFiles;
for (int i = 0; i < xmlFiles.count(); i++) {
QString xmlFile = xmlFiles[ i ];
QFile file (xmlFile);
if (file.exists() && file.open(QIODevice::ReadOnly)) {
file.close();
GEOMGUI_XmlHandler* aXmlHandler = new GEOMGUI_XmlHandler();
ASSERT(aXmlHandler);
QXmlInputSource source (&file);
QXmlSimpleReader reader;
reader.setContentHandler(aXmlHandler);
reader.setErrorHandler(aXmlHandler);
bool ok = reader.parse(source);
file.close();
if (ok) {
// bind action lib and label to its ID for activateOperation() method proper work
myPluginLibs[aXmlHandler->myPluginData.myName] = aXmlHandler->myPluginData.myClientLib;
QListIterator<GEOMGUI_ActionData> anActionsIter (aXmlHandler->myPluginData.myListOfActions);
while (anActionsIter.hasNext()) {
GEOMGUI_ActionData anActionData = anActionsIter.next();
//QPixmap icon = resMgr->loadPixmap("GEOM", tr(anActionData.myIcon.toLatin1().constData()));
QPixmap icon = resMgr->loadPixmap(aXmlHandler->myPluginData.myName,
anActionData.myIcon.toLatin1().constData());
// path to action in menu
QStringList smenus = anActionData.myMenu.split( "/" );
QString actionName = smenus.last();
actionName = actionName.toUpper().prepend("MEN_");
smenus.removeLast();
// path to action in toolbar
QStringList stools = anActionData.myTooltip.split( "/" );
QString actionTool = stools.last();
actionTool = actionTool.toUpper().prepend("TOP_");
stools.removeLast();
createAction(id, // ~ anActionData.myLabel
tr(actionTool.toLatin1().constData()),
icon,
tr(actionName.toLatin1().constData()),
anActionData.myStatusBar.toLatin1().constData(),
0 /*accel*/,
application()->desktop(),
false /*toggle*/,
this, SLOT(OnGUIEvent()),
QString() /*shortcutAction*/);
int menuId = -1;
foreach (QString subMenu, smenus) {
subMenu = subMenu.toUpper().prepend("MEN_");
menuId = createMenu(tr(subMenu.toLatin1().constData()), menuId, -1);
}
//createMenu(id, pluginMenuId, -1);
createMenu(id, menuId, -1);
QString subTool = stools[0];
subTool = subTool.toUpper().prepend("TOOL_");
int toolId = createTool(tr(subTool.toLatin1().constData()));
//createTool(id, advancedTbarId);
createTool(id, toolId);
// add action id to map
PluginAction anAction (aXmlHandler->myPluginData.myClientLib, anActionData.myLabel);
myPluginActions[id] = anAction;
id++;
}
}
else {
SUIT_MessageBox::critical(application()->desktop(),
tr("INF_PARSE_ERROR"),
tr(aXmlHandler->errorProtocol().toLatin1().data()));
}
delete aXmlHandler;
}
else if ( i > 0 ) { // 1st is ~/CustomGeomPlugins.xml
if (aNoAccessFiles.isEmpty())
aNoAccessFiles = xmlFile;
else
aNoAccessFiles += ", " + xmlFile;
}
} // end loop on xmlFiles
if (!aNoAccessFiles.isEmpty()) {
QString aMess = QObject::tr("PLUGIN_FILE_CANT_OPEN") + " " + aNoAccessFiles + "\n";
aMess += QObject::tr("PLUGIN_FILE_CHECK_VARIABLE");
SUIT_MessageBox::warning(application()->desktop(), tr("GEOM_WRN_WARNING"), aMess);
}
}
//=======================================================================
@ -1687,13 +1949,14 @@ void GeometryGUI::onViewManagerRemoved( SUIT_ViewManager* vm )
//================================================================================
/*!
* \brief Slot called when selection changed. Shows creation info of a selected object
* \brief Slot called when selection changed. Shows creation info of a selected object
*/
//================================================================================
void GeometryGUI::updateCreationInfo()
{
myCreationInfoWdg->clear();
if ( myCreationInfoWdg )
myCreationInfoWdg->clear();
// Code below is commented to have myCreationInfoWdg filled as soon as it is shown again
// if ( !myCreationInfoWdg->isVisible() )
@ -1726,34 +1989,32 @@ void GeometryGUI::updateCreationInfo()
// pass creation info of geomObj to myCreationInfoWdg
QPixmap icon;
QString operationName;
myCreationInfoWdg->setOperation( icon, operationName );
if ( myCreationInfoWdg ) {
QPixmap icon;
QString operationName;
myCreationInfoWdg->setOperation( icon, operationName );
try
{
OCC_CATCH_SIGNALS;
GEOM::CreationInformation_var info = geomObj->GetCreationInformation();
if ( &info.in() )
{
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
QString name = info->operationName.in();
if ( !name.isEmpty() )
{
icon = resMgr->loadPixmap( "GEOM", tr( ("ICO_"+name).toLatin1().constData() ), false );
operationName = tr( ("MEN_"+name).toLatin1().constData() );
if ( operationName.startsWith( "MEN_" ))
operationName = name; // no translation
myCreationInfoWdg->setOperation( icon, operationName );
try {
OCC_CATCH_SIGNALS;
GEOM::CreationInformation_var info = geomObj->GetCreationInformation();
if ( &info.in() ) {
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
QString name = info->operationName.in();
if ( !name.isEmpty() ) {
icon = resMgr->loadPixmap( "GEOM", tr( ("ICO_"+name).toLatin1().constData() ), false );
operationName = tr( ("MEN_"+name).toLatin1().constData() );
if ( operationName.startsWith( "MEN_" ))
operationName = name; // no translation
myCreationInfoWdg->setOperation( icon, operationName );
for ( size_t i = 0; i < info->params.length(); ++i )
myCreationInfoWdg->addParam( info->params[i].name.in(),
info->params[i].value.in() );
for ( size_t i = 0; i < info->params.length(); ++i )
myCreationInfoWdg->addParam( info->params[i].name.in(),
info->params[i].value.in() );
}
}
}
}
catch (...)
{
catch (...) {
}
}
}
@ -1880,7 +2141,7 @@ void GeometryGUI::contextMenuPopup( const QString& client, QMenu* menu, QString&
if( isPredefMat ){
QMenu* matMenu = new QMenu();
QSignalMapper* signalMapper = new QSignalMapper( matMenu );
//Get current material model for the object
QVariant v;
LightApp_Application* anApp = dynamic_cast<LightApp_Application*>( getApp() );
@ -1895,13 +2156,13 @@ void GeometryGUI::contextMenuPopup( const QString& client, QMenu* menu, QString&
// get list of all predefined materials
QStringList materials = Material_ResourceMgr::resourceMgr()->materials();
bool found = false;
foreach ( QString material, materials )
foreach ( QString material, materials )
{
QAction* menAct = matMenu->addAction( material );
connect(menAct, SIGNAL( toggled( bool ) ), signalMapper, SLOT( map() ) );
signalMapper->setMapping( menAct, material );
menAct->setCheckable( true );
// Set checked if this material is current
// Set checked if this material is current
Material_Model aModel;
aModel.fromResources( material );
if ( !found && aModel.toProperties() == curModel ) {
@ -2013,15 +2274,15 @@ void GeometryGUI::createPreferences()
addPreference( tr( "PREF_AUTO_BRING_TO_FRONT" ), genGroup,
LightApp_Preferences::Bool, "Geometry", "auto_bring_to_front" );
int isoGroup = addPreference( tr( "PREF_ISOS" ), tabId );
setPreferenceProperty( isoGroup, "columns", 2 );
int isoU = addPreference( tr( "PREF_ISOS_U" ), isoGroup,
LightApp_Preferences::IntSpin, "Geometry", "iso_number_u" );
LightApp_Preferences::IntSpin, "Geometry", "iso_number_u" );
setPreferenceProperty( isoU, "min", 0 );
setPreferenceProperty( isoU, "max", 100000 );
int isoV = addPreference( tr( "PREF_ISOS_V" ), isoGroup,
LightApp_Preferences::IntSpin, "Geometry", "iso_number_v" );
LightApp_Preferences::IntSpin, "Geometry", "iso_number_v" );
setPreferenceProperty( isoV, "min", 0 );
setPreferenceProperty( isoV, "max", 100000 );
@ -2109,7 +2370,7 @@ void GeometryGUI::createPreferences()
// Set property for default material
setPreferenceProperty( material, "strings", Material_ResourceMgr::resourceMgr()->materials() );
// Set property vertex marker type
QList<QVariant> aMarkerTypeIndicesList;
QList<QVariant> aMarkerTypeIconsList;

View File

@ -38,9 +38,11 @@
#include <SALOMEDSClient.hxx>
#include "GEOMGUI.h"
#include "GEOMPluginGUI.h"
// QT Includes
#include <QMap>
#include <QPair>
// OCCT Includes
#include <gp_Ax3.hxx>
@ -113,6 +115,9 @@ public:
// Process action
void OnGUIEvent( int id, const QVariant& theParam = QVariant( QVariant::Invalid ) );
virtual bool activateOperation( int actionId );
virtual bool activateOperation( const QString& actionId );
virtual bool activateOperation( const QString& actionId, const QString& plugin );
// The Working Plane management
void SetWorkingPlane( gp_Ax3 wp ) { myWorkingPlane = wp; }
@ -180,6 +185,7 @@ protected:
private:
GEOMGUI* getLibrary( const QString& libraryName );
GEOMPluginGUI* getPluginLibrary( const QString& libraryName );
void createGeomAction( const int id, const QString& po_id,
const QString& icon_id = QString(""),
const int key = 0, const bool toggle = false,
@ -188,6 +194,7 @@ private:
const bool isSingle = false, const int isVisible = -1,
const bool isExpandAll = false, const bool isOCC = false,
const int parentId = -1 );
void addPluginActions();
void createOriginAndBaseVectors();
@ -205,12 +212,17 @@ private:
typedef QMap<long, TextureMap> StudyTextureMap;
typedef QMap<QString, GEOMGUI*> GUIMap;
typedef QPair<QString, QString> PluginAction;
GUIMap myGUIMap; // GUI libraries map
QDialog* myActiveDialogBox; // active dialog box
gp_Ax3 myWorkingPlane;
QMap<int,QString> myRules; // popup rules
//QMap<int,QString> myRules; // popup rules
static StudyTextureMap myTextureMap; // texture map
QMap<int, PluginAction> myPluginActions; // plugin actions
QMap<QString, QString> myPluginLibs; // plugin name to plugin client library
QList<GEOMGUI_OCCSelector*> myOCCSelectors;
QList<LightApp_VTKSelector*> myVTKSelectors;

View File

@ -195,12 +195,13 @@ namespace GEOMOp {
OpExplodeBlock = 6104, // MENU BLOCKS - EXPLODE ON BLOCKS
// AdvancedGUI -----------------//--------------------------------
OpAdvancedNoOp = 10000, // NO OPERATION (advanced operations base)
OpPipeTShape = 10001, // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE
//OpPipeTShapeGroups = 10002, // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE GROUPS
OpDividedDisk = 10003, // MENU NEW ENTITY - ADVANCED - DIVIDEDDISK
OpDividedCylinder = 10004, // MENU NEW ENTITY - ADVANCED - DIVIDEDCYLINDER
OpSmoothingSurface = 10005, // MENU NEW ENTITY - ADVANCED - SMOOTHINGSURFACE
//OpPipeTShape = 10001, // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE
//OpPipeTShapeGroups = 10002, // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE GROUPS
//OpDividedDisk = 10003, // MENU NEW ENTITY - ADVANCED - DIVIDEDDISK
//OpDividedCylinder = 10004, // MENU NEW ENTITY - ADVANCED - DIVIDEDCYLINDER
//OpSmoothingSurface = 10005, // MENU NEW ENTITY - ADVANCED - SMOOTHINGSURFACE
//@@ insert new functions before this line @@ do not remove this line @@//
OpLastOperationID = 20000 // DO NOT USE OPERATION IDs MORE THAN 20000 !!!
};
}

View File

@ -32,6 +32,8 @@ salomeinclude_HEADERS = \
GeometryGUI.h \
GeometryGUI_Operations.h\
GEOMGUI.h \
GEOMPluginGUI.h \
GEOMGUI_XmlHandler.h \
GEOM_Displayer.h \
GEOMGUI_OCCSelector.h \
GEOMGUI_Selection.h \
@ -41,6 +43,8 @@ salomeinclude_HEADERS = \
dist_libGEOM_la_SOURCES = \
GeometryGUI.cxx \
GEOMGUI.cxx \
GEOMPluginGUI.cxx \
GEOMGUI_XmlHandler.cxx \
GEOM_Displayer.cxx \
GEOMGUI_OCCSelector.cxx \
GEOMGUI_Selection.cxx \

View File

@ -82,12 +82,6 @@
#include <GEOMImpl_FillingDriver.hxx>
#include <GEOMImpl_GlueDriver.hxx>
#include <GEOMImpl_MeasureDriver.hxx>
// Advanced operations
#include <GEOMImpl_PipeTShapeDriver.hxx>
#include <GEOMImpl_DividedDiskDriver.hxx>
// #include <GEOMImpl_DividedCylinderDriver.hxx>
#include <GEOMImpl_SmoothingSurfaceDriver.hxx>
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
//=============================================================================
/*!
@ -169,13 +163,6 @@ GEOMImpl_Gen::GEOMImpl_Gen()
// Measurements
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_MeasureDriver::GetID(), new GEOMImpl_MeasureDriver());
// Advanced operations
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PipeTShapeDriver::GetID(), new GEOMImpl_PipeTShapeDriver());
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_DividedDiskDriver::GetID(), new GEOMImpl_DividedDiskDriver());
// TFunction_DriverTable::Get()->AddDriver(GEOMImpl_DividedCylinderDriver::GetID(), new GEOMImpl_DividedCylinderDriver());
TFunction_DriverTable::Get()->AddDriver(GEOMImpl_SmoothingSurfaceDriver::GetID(), new GEOMImpl_SmoothingSurfaceDriver());
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
SetEngine(this);
}
@ -405,18 +392,3 @@ GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations(int theDocID)
return _mapOfGroupOperations[theDocID];
}
//=============================================================================
/*!
* GetIAdvancedOperations
*/
//=============================================================================
GEOMImpl_IAdvancedOperations* GEOMImpl_Gen::GetIAdvancedOperations(int theDocID)
{
if(_mapOfAdvancedOperations.find(theDocID) == _mapOfAdvancedOperations.end()) {
_mapOfAdvancedOperations[theDocID] = new GEOMImpl_IAdvancedOperations(this, theDocID);
}
return _mapOfAdvancedOperations[theDocID];
}

View File

@ -39,7 +39,6 @@
#include "GEOMImpl_IInsertOperations.hxx"
#include "GEOMImpl_IMeasureOperations.hxx"
#include "GEOMImpl_IGroupOperations.hxx"
#include "GEOMImpl_IAdvancedOperations.hxx"
#include "GEOM_Engine.hxx"
class GEOMIMPL_EXPORT GEOMImpl_Gen : public GEOM_Engine
@ -72,8 +71,6 @@ class GEOMIMPL_EXPORT GEOMImpl_Gen : public GEOM_Engine
GEOMImpl_IGroupOperations* GetIGroupOperations(int theDocID);
GEOMImpl_IAdvancedOperations* GetIAdvancedOperations(int theDocID);
private:
std::map <int, GEOMImpl_IBasicOperations*> _mapOfBasicOperations;
@ -88,7 +85,6 @@ class GEOMIMPL_EXPORT GEOMImpl_Gen : public GEOM_Engine
std::map <int, GEOMImpl_IInsertOperations*> _mapOfInsertOperations;
std::map <int, GEOMImpl_IMeasureOperations*> _mapOfMeasureOperations;
std::map <int, GEOMImpl_IGroupOperations*> _mapOfGroupOperations;
std::map <int, GEOMImpl_IAdvancedOperations*> _mapOfAdvancedOperations;
};
#endif

View File

@ -50,8 +50,6 @@
#define GEOM_CIRC_ARC 19
#define GEOM_FILLET 20
#define GEOM_FILLET_2D 45
#define GEOM_FILLET_1D 46
#define GEOM_CHAMFER 21
#define GEOM_EDGE 22
@ -105,6 +103,9 @@
#define GEOM_THICKENING 49
#define GEOM_FILLET_2D 50
#define GEOM_FILLET_1D 51
//GEOM_Function types
#define COPY_WITH_REF 1
@ -353,17 +354,3 @@
// Advanced functions (base = 200)
#define ADVANCED_BASE 200 // NO OPERATION (advanced operations base)
#define GEOM_TSHAPE 201
#define GEOM_DIVIDEDDISK 202
#define GEOM_DIVIDEDCYLINDER 203
#define GEOM_SMOOTHINGSURFACE 204
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
// Advanced functions sub-operations codes
#define TSHAPE_BASIC 1
#define TSHAPE_CHAMFER 2
#define TSHAPE_FILLET 3
#define DIVIDEDDISK_R_RATIO 1
#define DIVIDEDDISK_R_VECTOR_PNT 2
#define DIVIDEDCYLINDER_R_H 1
#define SMOOTHINGSURFACE_LPOINTS 1
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/

View File

@ -43,7 +43,6 @@ salomeinclude_HEADERS = \
GEOMImpl_IInsertOperations.hxx \
GEOMImpl_IMeasureOperations.hxx \
GEOMImpl_IGroupOperations.hxx \
GEOMImpl_IAdvancedOperations.hxx \
GEOMImpl_IGlue.hxx \
GEOMImpl_PointDriver.hxx \
GEOMImpl_IPoint.hxx \
@ -146,15 +145,6 @@ salomeinclude_HEADERS = \
GEOMImpl_Types.hxx \
GEOM_GEOMImpl.hxx
ADVANCED_INCLUDES =
ADVANCED_INCLUDES += GEOMImpl_IPipeTShape.hxx GEOMImpl_PipeTShapeDriver.hxx
ADVANCED_INCLUDES += GEOMImpl_IDividedDisk.hxx GEOMImpl_DividedDiskDriver.hxx
##ADVANCED_INCLUDES += GEOMImpl_IDividedCylinder.hxx GEOMImpl_DividedCylinderDriver.hxx
ADVANCED_INCLUDES += GEOMImpl_ISmoothingSurface.hxx GEOMImpl_SmoothingSurfaceDriver.hxx
##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@##
salomeinclude_HEADERS += $(ADVANCED_INCLUDES)
dist_libGEOMimpl_la_SOURCES = \
GEOMImpl_IBasicOperations.cxx \
GEOMImpl_ITransformOperations.cxx \
@ -168,7 +158,6 @@ dist_libGEOMimpl_la_SOURCES = \
GEOMImpl_IInsertOperations.cxx \
GEOMImpl_IMeasureOperations.cxx \
GEOMImpl_IGroupOperations.cxx \
GEOMImpl_IAdvancedOperations.cxx \
GEOMImpl_Gen.cxx \
GEOMImpl_PointDriver.cxx \
GEOMImpl_VectorDriver.cxx \
@ -220,15 +209,6 @@ dist_libGEOMimpl_la_SOURCES = \
GEOMImpl_FillingDriver.cxx \
GEOMImpl_GlueDriver.cxx
ADVANCED_SOURCES =
ADVANCED_SOURCES += GEOMImpl_PipeTShapeDriver.cxx
ADVANCED_SOURCES += GEOMImpl_DividedDiskDriver.cxx
##ADVANCED_SOURCES += GEOMImpl_DividedCylinderDriver.cxx
ADVANCED_SOURCES += GEOMImpl_SmoothingSurfaceDriver.cxx
##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@##
dist_libGEOMimpl_la_SOURCES += $(ADVANCED_SOURCES)
# additional information to compile and link file
libGEOMimpl_la_CPPFLAGS = \

View File

@ -18,7 +18,6 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifdef WNT
#pragma warning( disable:4786 )
@ -64,6 +63,25 @@
#include <SALOMEDS_Tool.hxx>
#include <SALOMEDS_wrap.hxx>
#ifdef WNT
#include <windows.h>
#include <process.h>
#else
#include <dlfcn.h>
#endif
#ifdef WNT
#define LibHandle HMODULE
#define LoadLib( name ) LoadLibrary( name )
#define GetProc GetProcAddress
#define UnLoadLib( handle ) FreeLibrary( handle );
#else
#define LibHandle void*
#define LoadLib( name ) dlopen( name, RTLD_LAZY )
#define GetProc dlsym
#define UnLoadLib( handle ) dlclose( handle );
#endif
//============================================================================
// function : GEOM_Gen_i()
// purpose : constructor to be called for servant creation.
@ -243,30 +261,30 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
} else {
GEOM::shape_type myshapetype=aShape->GetShapeType();
if ( myshapetype == GEOM::COMPOUND ) {
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_COMPOUND" );
aShapeName = "Compound_";
} else if ( myshapetype == GEOM::COMPSOLID ) {
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_COMPSOLID");
aShapeName = "Compsolid_";
} else if ( myshapetype == GEOM::SOLID ) {
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_SOLID");
aShapeName = "Solid_";
} else if ( myshapetype == GEOM::SHELL ) {
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_SHELL");
aShapeName = "Shell_";
} else if ( myshapetype == GEOM::FACE ) {
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_FACE");
aShapeName = "Face_";
} else if ( myshapetype == GEOM::WIRE ) {
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_WIRE");
aShapeName = "Wire_";
} else if ( myshapetype == GEOM::EDGE ) {
aResultSO->SetAttrString("AttributePixMap", "ICON_OBJBROWSER_EDGE");
aShapeName = "Edge_";
} else if ( myshapetype == GEOM::VERTEX ) {
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_VERTEX" );
aShapeName = "Vertex_";
}
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_COMPOUND" );
aShapeName = "Compound_";
} else if ( myshapetype == GEOM::COMPSOLID ) {
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_COMPSOLID");
aShapeName = "Compsolid_";
} else if ( myshapetype == GEOM::SOLID ) {
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_SOLID");
aShapeName = "Solid_";
} else if ( myshapetype == GEOM::SHELL ) {
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_SHELL");
aShapeName = "Shell_";
} else if ( myshapetype == GEOM::FACE ) {
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_FACE");
aShapeName = "Face_";
} else if ( myshapetype == GEOM::WIRE ) {
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_WIRE");
aShapeName = "Wire_";
} else if ( myshapetype == GEOM::EDGE ) {
aResultSO->SetAttrString("AttributePixMap", "ICON_OBJBROWSER_EDGE");
aShapeName = "Edge_";
} else if ( myshapetype == GEOM::VERTEX ) {
aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_VERTEX" );
aShapeName = "Vertex_";
}
}
//if (strlen(theName) == 0) aShapeName += TCollection_AsciiString(aResultSO->Tag());
//else aShapeName = TCollection_AsciiString(CORBA::string_dup(theName));
@ -2316,22 +2334,78 @@ GEOM::GEOM_IGroupOperations_ptr GEOM_Gen_i::GetIGroupOperations(CORBA::Long theS
}
//============================================================================
// function : GetIAdvancedOperations
// function : GetPluginOperations
// purpose :
//============================================================================
GEOM::GEOM_IAdvancedOperations_ptr GEOM_Gen_i::GetIAdvancedOperations(CORBA::Long theStudyID)
GEOM::GEOM_IOperations_ptr GEOM_Gen_i::GetPluginOperations(CORBA::Long theStudyID,
const char* theLibName)
throw ( SALOME::SALOME_Exception )
{
std::string aPlatformLibName;
#ifdef WNT
aPlatformLibName = theLibName;
aPlatformLibName += ".dll" ;
#else
aPlatformLibName = "lib";
aPlatformLibName += theLibName;
aPlatformLibName += ".so";
#endif
Unexpect aCatch(SALOME_SalomeException);
MESSAGE( "GEOM_Gen_i::GetIAdvancedOperations" );
MESSAGE( "GEOM_Gen_i::GetPluginOperations" );
GEOM::GEOM_Gen_ptr engine = _this();
GEOM_IAdvancedOperations_i* aServant =
new GEOM_IAdvancedOperations_i(_poa, engine, _impl->GetIAdvancedOperations(theStudyID));
GEOM_IOperations_i* aServant = 0;
GEOM::GEOM_IOperations_var operations;
try {
// check, if corresponding operations are already created
if (myOpCreatorMap.find(std::string(theLibName)) == myOpCreatorMap.end()) {
// load plugin library
LibHandle libHandle = LoadLib( aPlatformLibName.c_str()/*theLibName*/ );
if (!libHandle) {
// report any error, if occured
#ifndef WNT
const char* anError = dlerror();
throw(SALOME_Exception(anError));
#else
throw(SALOME_Exception(LOCALIZED( "Can't load server geometry plugin library" )));
#endif
}
// get method, returning operations creator
typedef GEOM_GenericOperationsCreator* (*GetOperationsCreator)();
GetOperationsCreator procHandle =
(GetOperationsCreator)GetProc( libHandle, "GetOperationsCreator" );
if (!procHandle) {
throw(SALOME_Exception(LOCALIZED("bad geometry plugin library")));
UnLoadLib(libHandle);
}
// get operations creator
GEOM_GenericOperationsCreator* aCreator = procHandle();
if (!aCreator) {
throw(SALOME_Exception(LOCALIZED("bad geometry plugin library implementation")));
}
// map operations creator to a plugin name
myOpCreatorMap[std::string(theLibName)] = aCreator;
}
// create a new operations object, store its ref. in engine
aServant = myOpCreatorMap[std::string(theLibName)]->Create(_poa, theStudyID, engine, _impl);
//??? aServant->SetLibName(aPlatformLibName/*theLibName*/); // for persistency assurance
}
catch (SALOME_Exception& S_ex) {
THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM);
}
if (!aServant)
return operations._retn();
// activate the CORBA servant
GEOM::GEOM_IAdvancedOperations_var operations = aServant->_this();
operations = GEOM::GEOM_IOperations::_narrow( aServant->_this() );
return operations._retn();
}

View File

@ -18,7 +18,6 @@
// 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_GEN_I_H__
#define __GEOM_GEN_I_H__
@ -50,16 +49,31 @@
#include "GEOM_IInsertOperations_i.hh"
#include "GEOM_IMeasureOperations_i.hh"
#include "GEOM_IGroupOperations_i.hh"
#include "GEOM_IAdvancedOperations_i.hh"
#include <TopTools_IndexedMapOfShape.hxx>
#include <map>
#include <set>
#include <string>
//#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
//=====================================================================
// Generic operations creator (for plugins mechanism)
//=====================================================================
class GEOM_I_EXPORT GEOM_GenericOperationsCreator
{
public:
// Create operations
virtual GEOM_IOperations_i* Create (PortableServer::POA_ptr thePOA,
int theStudyId,
GEOM::GEOM_Gen_ptr theEngine,
::GEOMImpl_Gen* theGenImpl) = 0;
// return the name of IDL module
//virtual std::string GetModuleName() = 0;
};
//=====================================================================
// GEOM_Gen_i : class definition
//=====================================================================
@ -242,8 +256,9 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
virtual GEOM::GEOM_IGroupOperations_ptr GetIGroupOperations (CORBA::Long theStudyID)
throw (SALOME::SALOME_Exception);
//Returns a pointer to AdvancedOperations interface
virtual GEOM::GEOM_IAdvancedOperations_ptr GetIAdvancedOperations (CORBA::Long theStudyID)
//Returns a pointer to corresponding plugin operations interface
virtual GEOM::GEOM_IOperations_ptr GetPluginOperations (CORBA::Long theStudyID,
const char* theLibName)
throw (SALOME::SALOME_Exception);
//Adds a new sub-shape
@ -342,6 +357,9 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
::GEOMImpl_Gen* _impl;
SALOME_NamingService * name_service;
char * _name;
// plugin operations managing
std::map<std::string, GEOM_GenericOperationsCreator*> myOpCreatorMap;
};
#endif

View File

@ -44,7 +44,6 @@ salomeinclude_HEADERS = \
GEOM_ITransformOperations_i.hh \
GEOM_IMeasureOperations_i.hh \
GEOM_IGroupOperations_i.hh \
GEOM_IAdvancedOperations_i.hh \
GEOM_Gen_i.hh \
GEOM_GEOM_I.hxx \
GEOM_wrap.hxx
@ -64,7 +63,6 @@ dist_libGEOMEngine_la_SOURCES = \
GEOM_ITransformOperations_i.cc \
GEOM_IMeasureOperations_i.cc \
GEOM_IGroupOperations_i.cc \
GEOM_IAdvancedOperations_i.cc \
GEOM_Gen_i.cc \
GEOM_DumpPython.cc

View File

@ -398,8 +398,9 @@ void GEOM_Superv_i::getAdvancedOp()
if (CORBA::is_nil(myAdvancedOp) || isNewStudy(myLastStudyID,myStudyID)) {
//rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
// Try to get id of the study from the SALOME Session
if(myStudyID < 0 ) SetStudyID(-1);
myAdvancedOp = myGeomEngine->GetIAdvancedOperations(myStudyID);
if(myStudyID < 0 ) SetStudyID(-1);
//myAdvancedOp = myGeomEngine->GetIAdvancedOperations(myStudyID);
myAdvancedOp = GEOM::GEOM_IAdvancedOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "AdvancedEngine"));
}
}

View File

@ -459,6 +459,18 @@ class info:
CLOSED = 1
UNCLOSED = 2
##! Private class used to bind calls of plugin operations to geomBuilder
class PluginOperation:
def __init__(self, operation, function):
self.operation = operation
self.function = function
pass
def __call__(self, *args):
res = self.function(self.operation, *args)
RaiseIfFailed(self.function.__name__, self.operation)
return res
# Warning: geom is a singleton
geom = None
engine = None
@ -684,13 +696,28 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
self.MeasuOp = self.GetIMeasureOperations (self.myStudyId)
self.BlocksOp = self.GetIBlocksOperations (self.myStudyId)
self.GroupOp = self.GetIGroupOperations (self.myStudyId)
self.AdvOp = self.GetIAdvancedOperations (self.myStudyId)
#self.AdvOp = self.GetIAdvancedOperations (self.myStudyId)
self.AdvOp = self.GetPluginOperations (self.myStudyId, "AdvancedEngine")
# set GEOM as root in the use case tree
self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
self.myUseCaseBuilder.SetRootCurrent()
self.myUseCaseBuilder.Append(self.father)
pass
def GetPluginOperations(self, studyID, libraryName):
op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
if op:
# bind methods of operations to self
methods = op.__class__.__dict__['__methods__']
avoid_methods = self.BasicOp.__class__.__dict__['__methods__']
for meth_name in methods:
if not meth_name in avoid_methods: # avoid basic methods
function = getattr(op.__class__, meth_name)
if callable(function):
#self.__dict__[meth_name] = self.__PluginOperation(op, function)
self.__dict__[meth_name] = PluginOperation(op, function)
return op
## Enable / disable results auto-publishing
#
# The automatic publishing is managed in the following way:

View File

@ -34,7 +34,8 @@ if GEOM_ENABLE_GUI
SUBDIRS += OBJECT DlgRef GEOMFiltersSelection Material GEOMGUI GEOMBase \
GEOMToolsGUI DisplayGUI BasicGUI PrimitiveGUI GenerationGUI \
EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI \
RepairGUI MeasureGUI GroupGUI BlocksGUI AdvancedGUI GEOM_SWIG_WITHIHM
RepairGUI MeasureGUI GroupGUI BlocksGUI AdvancedGUI AdvancedEngine \
GEOM_SWIG_WITHIHM
endif
DIST_SUBDIRS = ARCHIMEDE NMTDS NMTTools BlockFix GEOMAlgo SKETCHER \
@ -45,4 +46,4 @@ DIST_SUBDIRS = ARCHIMEDE NMTDS NMTTools BlockFix GEOMAlgo SKETCHER \
GEOMToolsGUI DisplayGUI BasicGUI PrimitiveGUI GenerationGUI \
EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI \
RepairGUI MeasureGUI GroupGUI BlocksGUI AdvancedGUI \
GEOM_SWIG_WITHIHM GEOM_PY ShapeRecognition
AdvancedEngine GEOM_SWIG_WITHIHM GEOM_PY ShapeRecognition