0022616: [CEA 1038] Improve the quality of stl and vtk exports
@ -234,16 +234,18 @@ INCLUDE(CMakePackageConfigHelpers)
|
||||
# List of targets in this project we want to make visible to the rest of the world.
|
||||
# They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
|
||||
SET(_${PROJECT_NAME}_exposed_targets
|
||||
GEOMArchimede BREPExport BREPImport BlockFix GEOMbasic GEOMAlgo GEOMClient GEOMImpl
|
||||
GEOMUtils GEOMEngine GEOM_SupervEngine IGESExport IGESImport GEOMSketcher
|
||||
SalomeIDLGEOM STEPExport STEPImport STLExport STLImport ShHealOper XAO AdvancedEngine OCC2VTK
|
||||
VTKExport
|
||||
GEOMArchimede BlockFix GEOMbasic GEOMAlgo GEOMClient GEOMImpl
|
||||
GEOMUtils GEOMEngine GEOM_SupervEngine GEOMSketcher
|
||||
SalomeIDLGEOM SalomeIDLGEOMSuperv SalomeIDLAdvancedGEOM ShHealOper XAO AdvancedEngine OCC2VTK
|
||||
SalomeIDLSTLPlugin SalomeIDLBREPPlugin SalomeIDLSTEPPlugin SalomeIDLIGESPlugin SalomeIDLXAOPlugin SalomeIDLVTKPlugin
|
||||
STLPluginEngine BREPPluginEngine STEPPluginEngine IGESPluginEngine XAOPluginEngine VTKPluginEngine
|
||||
)
|
||||
IF(SALOME_BUILD_GUI)
|
||||
LIST(APPEND _${PROJECT_NAME}_exposed_targets
|
||||
AdvancedGUI BasicGUI BlocksGUI BooleanGUI BuildGUI DisplayGUI DlgRef EntityGUI GEOMBase
|
||||
GEOMFiltersSelection GEOM GEOMToolsGUI GenerationGUI GroupGUI Material MeasureGUI GEOMObject
|
||||
OperationGUI PrimitiveGUI RepairGUI TransformationGUI ImportExportGUI DependencyTree
|
||||
OperationGUI PrimitiveGUI RepairGUI TransformationGUI DependencyTree
|
||||
STLPluginGUI BREPPluginGUI STEPPluginGUI IGESPluginGUI XAOPluginGUI VTKPluginGUI
|
||||
)
|
||||
ENDIF(SALOME_BUILD_GUI)
|
||||
|
||||
|
@ -129,8 +129,6 @@ ENDIF(SALOME_GEOM_BUILD_GUI)
|
||||
|
||||
# Exposed GEOM targets:
|
||||
SET(GEOM_GEOMArchimede GEOMArchimede)
|
||||
SET(GEOM_BREPExport BREPExport)
|
||||
SET(GEOM_BREPImport BREPImport)
|
||||
SET(GEOM_BlockFix BlockFix)
|
||||
SET(GEOM_GEOMbasic GEOMbasic)
|
||||
SET(GEOM_GEOMAlgo GEOMAlgo)
|
||||
@ -139,14 +137,16 @@ SET(GEOM_GEOMImpl GEOMImpl)
|
||||
SET(GEOM_GEOMUtils GEOMUtils)
|
||||
SET(GEOM_GEOMEngine GEOMEngine)
|
||||
SET(GEOM_GEOM_SupervEngine GEOM_SupervEngine)
|
||||
SET(GEOM_IGESExport IGESExport)
|
||||
SET(GEOM_IGESImport IGESImport)
|
||||
SET(GEOM_GEOMSketcher GEOMSketcher)
|
||||
SET(GEOM_SalomeIDLGEOM SalomeIDLGEOM)
|
||||
SET(GEOM_STEPExport STEPExport)
|
||||
SET(GEOM_STEPImport STEPImport)
|
||||
SET(GEOM_STLExport STLExport)
|
||||
SET(GEOM_STLImport STLImport)
|
||||
SET(GEOM_SalomeIDLGEOMSuperv SalomeIDLGEOMSuperv)
|
||||
SET(GEOM_SalomeIDLAdvancedGEOM SalomeIDLAdvancedGEOM)
|
||||
SET(GEOM_SalomeIDLSTLPlugin SalomeIDLSTLPlugin)
|
||||
SET(GEOM_SalomeIDLBREPPlugin SalomeIDLBREPPlugin)
|
||||
SET(GEOM_SalomeIDLSTEPPlugin SalomeIDLSTEPPlugin)
|
||||
SET(GEOM_SalomeIDLIGESPlugin SalomeIDLIGESPlugin)
|
||||
SET(GEOM_SalomeIDLXAOPlugin SalomeIDLXAOPlugin)
|
||||
SET(GEOM_SalomeIDLVTKPlugin SalomeIDLVTKPlugin)
|
||||
SET(GEOM_ShHealOper ShHealOper)
|
||||
SET(GEOM_XAO XAO)
|
||||
SET(GEOM_AdvancedEngine AdvancedEngine)
|
||||
@ -169,11 +169,21 @@ SET(GEOM_Material Material)
|
||||
SET(GEOM_MeasureGUI MeasureGUI)
|
||||
SET(GEOM_GEOMObject GEOMObject)
|
||||
SET(GEOM_OCC2VTK OCC2VTK)
|
||||
SET(GEOM_VTKExport VTKExport)
|
||||
SET(GEOM_OperationGUI OperationGUI)
|
||||
SET(GEOM_PrimitiveGUI PrimitiveGUI)
|
||||
SET(GEOM_RepairGUI RepairGUI)
|
||||
SET(GEOM_TransformationGUI TransformationGUI)
|
||||
SET(GEOM_ImportExportGUI ImportExportGUI)
|
||||
SET(GEOM_STLPluginGUI STLPluginGUI)
|
||||
SET(GEOM_STLPluginEngine STLPluginEngine)
|
||||
SET(GEOM_BREPPluginGUI BREPPluginGUI)
|
||||
SET(GEOM_BREPPluginEngine BREPPluginEngine)
|
||||
SET(GEOM_STEPPluginGUI STEPPluginGUI)
|
||||
SET(GEOM_STEPPluginEngine STEPPluginEngine)
|
||||
SET(GEOM_IGESPluginGUI IGESPluginGUI)
|
||||
SET(GEOM_IGESPluginEngine IGESPluginEngine)
|
||||
SET(GEOM_XAOPluginGUI XAOPluginGUI)
|
||||
SET(GEOM_XAOPluginEngine XAOPluginEngine)
|
||||
SET(GEOM_VTKPluginGUI VTKPluginGUI)
|
||||
SET(GEOM_VTKPluginEngine VTKPluginEngine)
|
||||
SET(GEOM_GEOMShapeRec GEOMShapeRec)
|
||||
SET(GEOM_CurveCreator CurveCreator)
|
||||
|
@ -21,8 +21,6 @@ SET(GEOM_CXXFLAGS -I${GEOM_ROOT_DIR}/include/salome) # to be removed
|
||||
SET(GEOM_INCLUDE_DIRS ${GEOM_ROOT_DIR}/include/salome)
|
||||
|
||||
FIND_LIBRARY(GEOM_GEOMArchimede GEOMArchimede ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_BREPExport BREPExport ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_BREPImport BREPImport ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_BlockFix BlockFix ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_GEOMbasic GEOMbasic ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_GEOMAlgo GEOMAlgo ${GEOM_ROOT_DIR}/lib/salome)
|
||||
@ -31,14 +29,14 @@ FIND_LIBRARY(GEOM_GEOMimpl GEOMimpl ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_GEOMUtils GEOMUtils ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_GEOMEngine GEOMEngine ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_SupervEngine GEOM_SupervEngine ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_IGESExport IGESExport ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_IGESImport IGESImport ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_GEOMSketcher GEOMSketcher ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_SalomeIDLGEOM SalomeIDLGEOM ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_STEPExport STEPExport ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_STEPImport STEPImport ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_STLExport STLExport ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_STLImport STLImport ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_SalomeIDLSTLPlugin SalomeIDLSTLPlugin ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_SalomeIDLBREPPlugin SalomeIDLBREPPlugin ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_SalomeIDLSTEPPlugin SalomeIDLSTEPPlugin ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_SalomeIDLIGESPlugin SalomeIDLIGESPlugin ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_SalomeIDLVTKPlugin SalomeIDLVTKPlugin ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_SalomeIDLXAOPlugin SalomeIDLXAOPlugin ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_ShHealOper ShHealOper ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_XAO XAO ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_AdvancedEngine AdvancedEngine ${GEOM_ROOT_DIR}/lib/salome)
|
||||
@ -61,11 +59,21 @@ FIND_LIBRARY(GEOM_Material Material ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_MeasureGUI MeasureGUI ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_GEOMObject GEOMObject ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_OCC2VTK OCC2VTK ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_VTKExport VTKExport ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_OperationGUI OperationGUI ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_PrimitiveGUI PrimitiveGUI ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_RepairGUI RepairGUI ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_TransformationGUI TransformationGUI ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_ImportExportGUI ImportExportGUI ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_STLPluginGUI STLPluginGUI ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_STLPluginEngine STLPluginEngine ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_BREPPluginGUI BREPPluginGUI ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_BREPPluginEngine BREPPluginEngine ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_STEPPluginGUI STEPPluginGUI ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_STEPPluginEngine STEPPluginEngine ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_IGESPluginGUI IGESPluginGUI ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_IGESPluginEngine IGESPluginEngine ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_XAOPluginGUI XAOPluginGUI ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_XAOPluginEngine XAOPluginEngine ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_VTKPluginGUI VTKPluginGUI ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_VTKPluginEngine VTKPluginEngine ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_GEOMShapeRec GEOMShapeRec ${GEOM_ROOT_DIR}/lib/salome)
|
||||
FIND_LIBRARY(GEOM_CurveCreator CurveCreator ${GEOM_ROOT_DIR}/lib/salome)
|
||||
|
@ -36,28 +36,28 @@ def set_env( args ):
|
||||
|
||||
csf_list = ["Plugin", "GEOMDS_Resources", "ShHealing"]
|
||||
|
||||
for csf_file in csf_list:
|
||||
uniteFiles( os.path.join( res_dir, csf_file ), os.path.join( env_dir, csf_file ) )
|
||||
pass
|
||||
|
||||
for csf_string in csf_list:
|
||||
csf_var = "CSF_" + csf_string + "Defaults"
|
||||
for csf in csf_list:
|
||||
uniteFiles( os.path.join( res_dir, csf ), os.path.join( env_dir, csf ) )
|
||||
csf_var = "CSF_%sDefaults" % csf
|
||||
if not os.getenv( csf_var ):
|
||||
os.environ[ csf_var ] = env_dir
|
||||
pass
|
||||
pass
|
||||
|
||||
# find plugins
|
||||
# collect plugins
|
||||
plugin_list = []
|
||||
resource_path_list = []
|
||||
plugins_dir_var = "GEOM_ENGINE_RESOURCES_DIR"
|
||||
if os.environ.has_key(plugins_dir_var):
|
||||
# reverse the user's paths list, because the used 'add_path' prepends a new path,
|
||||
# but we want to append it: [a, b, c] => [c, b, a]
|
||||
plugins_dirs = os.environ[plugins_dir_var].split(os.pathsep)
|
||||
plugins_dirs.reverse()
|
||||
os.environ[plugins_dir_var] = string.join(plugins_dirs, os.pathsep)
|
||||
pass
|
||||
|
||||
# standard plugins
|
||||
plugin_list.append("BREPPlugin")
|
||||
plugin_list.append("STEPPlugin")
|
||||
plugin_list.append("IGESPlugin")
|
||||
plugin_list.append("STLPlugin")
|
||||
plugin_list.append("XAOPlugin")
|
||||
plugin_list.append("VTKPlugin")
|
||||
plugin_list.append("AdvancedGEOM")
|
||||
|
||||
# find additional plugins
|
||||
for env_var in os.environ.keys():
|
||||
value = os.environ[env_var]
|
||||
if env_var[-9:] == "_ROOT_DIR" and value:
|
||||
@ -67,29 +67,29 @@ def set_env( args ):
|
||||
# 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 resource_file.endswith(".xml") and \
|
||||
resource_file.lower() == plugin.lower() + ".xml":
|
||||
# use "name" attribute of "geom-plugin" as name of plugin in a right case
|
||||
from xml.dom.minidom import parse
|
||||
try:
|
||||
from xml.dom.minidom import parse
|
||||
xml_doc = parse(os.path.join(resource_dir, resource_file))
|
||||
plugin_nodes = xml_doc.getElementsByTagName("geom-plugin")
|
||||
except:
|
||||
continue
|
||||
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)
|
||||
|
||||
# add paths of 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")
|
||||
@ -100,26 +100,13 @@ def set_env( args ):
|
||||
pass
|
||||
pass
|
||||
pass
|
||||
elif resource_file == "ImportExport" and plugin.upper() != "GEOM":
|
||||
# add 'ImportExport' plugin file path into variable
|
||||
add_path(resource_dir, plugins_dir_var)
|
||||
# add plugin's library path into environment
|
||||
if sys.platform == "win32":
|
||||
add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "PATH")
|
||||
else:
|
||||
add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "LD_LIBRARY_PATH")
|
||||
except:
|
||||
continue
|
||||
pass
|
||||
pass
|
||||
pass
|
||||
plugin_list.append("GEOMActions")
|
||||
pass
|
||||
|
||||
os.environ["GEOM_PluginsList"] = ":".join(plugin_list)
|
||||
os.environ["SalomeAppConfig"] = os.environ["SalomeAppConfig"] + psep + psep.join(resource_path_list)
|
||||
|
||||
if os.environ.has_key(plugins_dir_var):
|
||||
# reverse back the plugin paths:
|
||||
# [f, e, d, c, b, a] => [a, b, c, d, e, f]
|
||||
plugins_dirs = os.environ[plugins_dir_var].split(os.pathsep)
|
||||
plugins_dirs.reverse()
|
||||
os.environ[plugins_dir_var] = string.join(plugins_dirs, os.pathsep)
|
||||
pass
|
||||
pass
|
||||
|
@ -25,7 +25,7 @@ print "UnitName2 = ", UnitName2
|
||||
# import shapes
|
||||
Shape1 = geompy.ImportIGES(theFileName1)
|
||||
Shape2 = geompy.ImportIGES(theFileName2)
|
||||
Shape3 = geompy.ImportFile(theFileName2,"IGES_SCALE")
|
||||
Shape3 = geompy.ImportIGES(theFileName2, True)
|
||||
[Xmin1,Xmax1, Ymin1,Ymax1, Zmin1,Zmax1] = geompy.BoundingBox(Shape1)
|
||||
[Xmin2,Xmax2, Ymin2,Ymax2, Zmin2,Zmax2] = geompy.BoundingBox(Shape2)
|
||||
[Xmin3,Xmax3, Ymin3,Ymax3, Zmin3,Zmax3] = geompy.BoundingBox(Shape3)
|
||||
|
@ -25,12 +25,23 @@ SALOME_CONFIGURE_FILE(doxyfile_tui.in doxyfile_tui)
|
||||
SALOME_CONFIGURE_FILE(static/header.html.in ${CMAKE_CURRENT_BINARY_DIR}/static/header.html)
|
||||
SALOME_CONFIGURE_FILE(static/header_py.html.in ${CMAKE_CURRENT_BINARY_DIR}/static/header_py.html)
|
||||
|
||||
# Generate a temporary python file, needed for the genaration of the documentation
|
||||
# of the built-in Geometry plugins.
|
||||
SET(DOC_GEOM_PluginsList AdvancedGEOM STLPlugin BREPPlugin STEPPlugin IGESPlugin XAOPlugin VTKPlugin)
|
||||
SALOME_ACCUMULATE_ENVIRONMENT(GEOM_PluginsList NOCHECK ${DOC_GEOM_PluginsList})
|
||||
SET(geom_file "${CMAKE_CURRENT_SOURCE_DIR}/collect_geom_methods.py")
|
||||
SET(plugins_cmd_options ${geom_file} -o tmp1/geomBuilder.py ${DOC_GEOM_PluginsList})
|
||||
SALOME_GENERATE_ENVIRONMENT_SCRIPT(plugins_cmd env_script "${PYTHON_EXECUTABLE}" "${plugins_cmd_options}")
|
||||
# Install a script
|
||||
SALOME_INSTALL_SCRIPTS(collect_geom_methods.py ${SALOME_INSTALL_BINS})
|
||||
|
||||
SET(f "$ENV{KERNEL_ROOT_DIR}/bin/salome/prepare_generating_doc.py")
|
||||
IF(WIN32)
|
||||
STRING(REPLACE "/" "\\" f ${f})
|
||||
ENDIF(WIN32)
|
||||
|
||||
ADD_CUSTOM_TARGET(usr_docs ${CMAKE_COMMAND} -E make_directory tmp
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory tmp1
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/geomBuilder.py ${CMAKE_SOURCE_DIR}/src/GEOM_SWIG/geomBuilder.py
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/gsketcher.py ${CMAKE_SOURCE_DIR}/src/GEOM_SWIG/gsketcher.py
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/geomtools.py ${CMAKE_SOURCE_DIR}/src/GEOM_PY/geomtools.py
|
||||
@ -38,10 +49,12 @@ ADD_CUSTOM_TARGET(usr_docs ${CMAKE_COMMAND} -E make_directory tmp
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/structelem.py ${CMAKE_SOURCE_DIR}/src/GEOM_PY/structelem/__init__.py
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/parts.py ${CMAKE_SOURCE_DIR}/src/GEOM_PY/structelem/parts.py
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/orientation.py ${CMAKE_SOURCE_DIR}/src/GEOM_PY/structelem/orientation.py
|
||||
COMMAND ${plugins_cmd}
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_tui
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory tmp
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory tmp1
|
||||
VERBATIM
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
148
doc/salome/gui/GEOM/collect_geom_methods.py
Normal file
@ -0,0 +1,148 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2012-2014 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, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# 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: collect_geom_methods.py
|
||||
# Author: Roman NIKOLAEV, Open CASCADE S.A.S (roman.nikolaev@opencascade.com)
|
||||
#
|
||||
#################################################################################
|
||||
#
|
||||
# Extraction of the methods dynamically added by the Geometry
|
||||
# module plug-in(s) to the geomBuilder class.
|
||||
#
|
||||
# This script is intended for internal usage - only
|
||||
# for generatation of the extra developer documentation for
|
||||
# the Geometry module plug-in(s).
|
||||
#
|
||||
# Usage:
|
||||
# collect_geom_methods.py <plugin_name>
|
||||
# where
|
||||
# <plugin_name> is a name of the plug-in module
|
||||
#
|
||||
# Notes:
|
||||
# - the script is supposed to be run in correct environment
|
||||
# i.e. PYTHONPATH, GEOM_PluginsList and other important
|
||||
# variables are set properly; otherwise the script will fail.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
import sys
|
||||
import inspect
|
||||
|
||||
def generate(plugin_name, output):
|
||||
plugin_module_name = plugin_name + "Builder"
|
||||
plugin_module = "salome.%s.%s" % (plugin_name, plugin_module_name)
|
||||
import_str = "from salome.%s import %s" % (plugin_name, plugin_module_name)
|
||||
exec( import_str )
|
||||
exec( "import %s" % plugin_module )
|
||||
exec( "mod = %s" % plugin_module )
|
||||
functions = []
|
||||
for attr in dir( mod ):
|
||||
if attr.startswith( '_' ): continue # skip an internal methods
|
||||
item = getattr( mod, attr )
|
||||
if type( item ).__name__ == 'function':
|
||||
if item not in functions:
|
||||
functions.append( item )
|
||||
pass
|
||||
pass
|
||||
pass
|
||||
if functions:
|
||||
for function in functions:
|
||||
comments = inspect.getcomments(function)
|
||||
if comments:
|
||||
comments = comments.strip().split("\n")
|
||||
comments = "\t" + "\n\t".join(comments)
|
||||
output.append(comments)
|
||||
pass
|
||||
sources = inspect.getsource(function)
|
||||
if sources is not None:
|
||||
sources_list = sources.split("\n")
|
||||
sources_new_list = []
|
||||
found = False
|
||||
for item in sources_list:
|
||||
if '"""' in item:
|
||||
if found == True:
|
||||
found = False
|
||||
continue
|
||||
else:
|
||||
found = True
|
||||
continue
|
||||
pass
|
||||
pass
|
||||
if found == False :
|
||||
sources_new_list.append(item)
|
||||
pass
|
||||
pass
|
||||
sources = "\n".join(sources_new_list)
|
||||
sources = "\t" + sources.replace("\n", "\n\t")
|
||||
output.append(sources)
|
||||
pass
|
||||
pass
|
||||
pass
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
import optparse
|
||||
parser = optparse.OptionParser(usage="%prog [options] plugin")
|
||||
h = "Output file (geomBuilder.py by default)"
|
||||
parser.add_option("-o", "--output", dest="output",
|
||||
action="store", default=None, metavar="file",
|
||||
help=h)
|
||||
h = "If this option is True, dummy help for geomBuiler class is added. "
|
||||
h += "This option should be False (default) when building documentation for Geometry module "
|
||||
h += "and True when building documentation for Geometry module plug-ins."
|
||||
parser.add_option("-d", "--dummy-geom-help", dest="dummygeomhelp",
|
||||
action="store_true", default=False,
|
||||
help=h)
|
||||
(options, args) = parser.parse_args()
|
||||
if len( args ) < 1: sys.exit("Plugin name is not specified")
|
||||
|
||||
f = open(options.output, "w")
|
||||
|
||||
output = []
|
||||
if options.dummygeomhelp:
|
||||
output.append( "## @package geomBuilder" )
|
||||
output.append( "# Documentation of the methods dynamically added by the " + plugin_name + " Geometry plug-in to the geomBuilder class." )
|
||||
# Add dummy Geometry help
|
||||
# This is supposed to be done when generating documentation for Geometry module plug-ins
|
||||
output.append( "# @note The documentation below does not provide complete description of class @b %geomBuilder" )
|
||||
output.append( "# from @b geomBuilder package. This documentation provides only information about" )
|
||||
output.append( "# the methods dynamically added to the %geomBuilder class by the " + plugin_name + " plugin" )
|
||||
output.append( "# For more details on the %geomBuilder class, please refer to the SALOME %Geometry module" )
|
||||
output.append( "# documentation." )
|
||||
pass
|
||||
else:
|
||||
# Extend documentation for geomBuilder class with information about dynamically added methods.
|
||||
# This is supposed to be done only when building documentation for Geometry module
|
||||
output.append( "## @package geomBuilder" )
|
||||
output.append( "# @note Some methods are dynamically added to the @b %geomBuilder class in runtime by the" )
|
||||
output.append( "# plug-in modules. If you fail to find help on some methods in the documentation of Geometry module, " )
|
||||
output.append( "# try to look into the documentation for the Geometry module plug-ins." )
|
||||
pass
|
||||
output.append("class geomBuilder():")
|
||||
|
||||
for arg in args:
|
||||
generate( arg, output )
|
||||
pass
|
||||
|
||||
for line in output: f.write( line + "\n" )
|
||||
f.close()
|
@ -99,7 +99,14 @@ EXAMPLE_RECURSIVE = NO
|
||||
#---------------------------------------------------------------------------
|
||||
#Input related options
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = tmp @CMAKE_SOURCE_DIR@/idl/GEOM_Gen.idl
|
||||
INPUT = tmp tmp1 @CMAKE_SOURCE_DIR@/idl/GEOM_Gen.idl \
|
||||
@CMAKE_SOURCE_DIR@/idl/AdvancedGEOM_Gen.idl \
|
||||
@CMAKE_SOURCE_DIR@/idl/STLPlugin.idl \
|
||||
@CMAKE_SOURCE_DIR@/idl/BREPPlugin.idl \
|
||||
@CMAKE_SOURCE_DIR@/idl/STEPPlugin.idl \
|
||||
@CMAKE_SOURCE_DIR@/idl/IGESPlugin.idl \
|
||||
@CMAKE_SOURCE_DIR@/idl/XAOPlugin.idl \
|
||||
@CMAKE_SOURCE_DIR@/idl/VTKPlugin.idl
|
||||
FILE_PATTERNS =
|
||||
IMAGE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/images
|
||||
EXAMPLE_PATH = @CMAKE_SOURCE_DIR@/src/GEOM_SWIG
|
||||
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 28 KiB |
BIN
doc/salome/gui/GEOM/images/importxao_dlg.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 7.0 KiB |
@ -2,34 +2,44 @@
|
||||
|
||||
\page import_export_geom_obj_page Importing/exporting geometrical objects
|
||||
|
||||
In Geometry module you can import and export geometrical objects
|
||||
from/into BREP, IGES, STEP, ACIS and STL files. The mechanisms of import and export
|
||||
are implemented via plug-ins, which gives the opportunity to
|
||||
expand the range of available formats by adding more plug-ins (for
|
||||
example, CATIA 5).
|
||||
\tableofcontents
|
||||
|
||||
The \subpage xao_format_page "import and export of shapes in XAO format" is implemented differently.
|
||||
\section io_general General information
|
||||
|
||||
In Geometry module you can import and export geometrical objects
|
||||
from/into \b BREP, \b IGES, \b STEP, \b STL, \b XAO, \b VTK (only export)
|
||||
and others files.
|
||||
The mechanisms of import and export are implemented via plugins,
|
||||
which gives the opportunity to expand the range of available formats
|
||||
by adding more plugins (for example, CATIA 5 or ACIS).
|
||||
|
||||
\note If a plugin supports import of materials associated with shapes, these
|
||||
shapes are grouped corresponding to the imported materials. For the moment STEP
|
||||
import is the only plugin that supports this feature.
|
||||
|
||||
<em>To import geometrical objects from a BREP, IGES, STEP, ACIS or STL file:</em>
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_import_export_page
|
||||
|
||||
\section io_import Import file
|
||||
|
||||
<em>To import geometrical objects from a BREP, IGES, STEP or STL file:</em>
|
||||
|
||||
\par
|
||||
From the \b File menu choose \b Import. In the opening dialog box \b Import
|
||||
select the required format of the file for importation and search for
|
||||
a *.brep, *.iges, *.step, *.sat or *.stl file.
|
||||
From the \b File menu choose <b>Import/<FormatName></b>, where <b><FormatName></b> is a name
|
||||
of desirable format. In the <b>Import <FormatName></b> dialog box select the file to import
|
||||
and press \b Open. The file will be imported in the module and its contents (geometrical object)
|
||||
will be displayed in the <b>Object Browser</b>.
|
||||
|
||||
The dialog box to import the file can provide additional parameters.
|
||||
|
||||
For example, dialog box for importing files in STL format:
|
||||
|
||||
\image html geomimport.png
|
||||
|
||||
\par
|
||||
Select the required file and click \b Open. Your file will be imported in
|
||||
the module and its contents (geometrical object) will be displayed in
|
||||
the <b>Object Browser</b>.
|
||||
|
||||
\note If the selected file is in IGES or STEP format and the length
|
||||
is not expressed in meters, it will be asked whether to take or not these
|
||||
\note If the selected file is in IGES or STEP format and the model size
|
||||
is not expressed in meters, the user will be asked whether to take or not the
|
||||
units into account (see the picture below). This feature can be
|
||||
helpful if some wrong units have been written to the IGES or STEP file by a
|
||||
3rd-party software.
|
||||
@ -38,15 +48,6 @@ helpful if some wrong units have been written to the IGES or STEP file by a
|
||||
|
||||
\par
|
||||
|
||||
\note If the selected file is in ACIS format (the use of this format
|
||||
requires licensing) and the file contains names for some shapes, it
|
||||
will be suggested to create groups by types (solid, face, edge and
|
||||
vertex) for all named shapes:
|
||||
|
||||
\image html sat_named_shapes.png
|
||||
|
||||
\par
|
||||
|
||||
\note It is possible to re-open from the initial file a previously imported shape if
|
||||
the file has been changed on disk. For this, select
|
||||
<b>Reload From Disk</b> in the context menu of the imported
|
||||
@ -55,21 +56,52 @@ as before this operation.
|
||||
|
||||
\image html geomimport_reopen.png
|
||||
|
||||
\n <em>To export geometrical objects into a BREP, IGES, STEP, ACIS or STL
|
||||
\section io_export Export file
|
||||
|
||||
\n <em>To export geometrical objects into a BREP, IGES, STEP, STL or VTK
|
||||
file:</em>
|
||||
|
||||
\par
|
||||
Select the object you wish to export, then from the \b File menu choose
|
||||
\b Export. In the opening dialog box \b Export define the required format,
|
||||
the name and the location of the file for exportation.
|
||||
<b>Export/<FormatName></b>, where <b><FormatName></b> is a name of desirable format.
|
||||
In the <b>Export <FormatName></b> dialog box define the name and the location
|
||||
of the file to export and press \b Save.
|
||||
|
||||
The dialog box to export the file can provide additional advanced parameters.
|
||||
|
||||
For example, dialog box for exporting files in STL format:
|
||||
|
||||
\image html geomexport.png
|
||||
|
||||
\par
|
||||
Click \b Save to confirm your exportation.
|
||||
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_import_export_page
|
||||
\section io_xao Import and export of shapes in XAO format
|
||||
|
||||
XAO is a file format which describes a shape with its topology, groups and fields.
|
||||
|
||||
<em>To import a shape in the \b XAO format:</em>
|
||||
|
||||
\par
|
||||
In the \b File menu select <b>Import/XAO</b>.
|
||||
|
||||
\image html importxao_dlg.png
|
||||
|
||||
\par
|
||||
|
||||
<em>To export a shape in the \b XAO format:</em>
|
||||
|
||||
\par
|
||||
In the \b File menu select <b>Export/XAO</b>.
|
||||
|
||||
\image html exportxao_dlg.png
|
||||
|
||||
In this dialog:
|
||||
- Click the arrow button and select in the Object Browser or in the Viewer the <b>Shape</b> to be exported.
|
||||
- Input the <b>File name</b> to create a new file or click browse button to save in an existing file.
|
||||
- Select the \b Groups of the chosen shape to be exported.
|
||||
- Select the \b Fields of the chosen shape to be exported.
|
||||
- Press "Apply" or "Apply & Close" button to get the result.
|
||||
|
||||
It also possible to export a shape using the TUI Command: <em>geompy.ExportXAO(Shape, FileName, Groups, Fields)</em>
|
||||
|
||||
*/
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
\b Geometry module of SALOME is destined for:
|
||||
- \subpage import_export_geom_obj_page "import and export of geometrical models"
|
||||
in IGES, BREP, STEP, ACIS and STL formats;
|
||||
in IGES, BREP, STEP, STL, XAO and VTK formats;
|
||||
- \subpage create_geom_obj_page "construction of geometrical objects"
|
||||
using a wide range of functions;
|
||||
- \subpage view_geom_obj_page "viewing geometrical objects" in the OCC
|
||||
|
@ -10,7 +10,7 @@ geompy = geomBuilder.New(salome.myStudy)
|
||||
gg = salome.ImportComponentGUI("GEOM")
|
||||
|
||||
# create ExportXAO object
|
||||
exportxao = geompy.MakeExportXAO([value], [value], [value], [value])
|
||||
exportxao = geompy.ExportXAO([value], [value], [value], [value])
|
||||
|
||||
# add object in the study
|
||||
id_exportxao = geompy.addToStudy(exportxao,"ExportXAO")
|
||||
|
@ -1,24 +0,0 @@
|
||||
/*!
|
||||
|
||||
\page xao_format_page Import and export of shapes in XAO format
|
||||
|
||||
XAO is a file format which describes a shape with its topology, groups and fields.
|
||||
|
||||
To import a shape in the \b XAO format, in the <b>Main Menu</b> select <b>New Entity ->
|
||||
Import / Export -> Import XAO. </b>
|
||||
|
||||
To export a shape in the \b XAO format, in the <b>Main Menu</b> select <b>New Entity ->
|
||||
Import / Export -> Export XAO. </b>
|
||||
|
||||
\image html exportxao_dlg.png
|
||||
|
||||
In this dialog:
|
||||
- Click the arrow button and select in the Object Browser or in the Viewer the <b>Shape</b> to be exported.
|
||||
- Input the <b>File name</b> to create a new file or click browse button to save in an existing file.
|
||||
- Select the \b Groups of the chosen shape to be exported.
|
||||
- Select the \b Fields of the chosen shape to be exported.
|
||||
- Press "Apply" or "Apply & Close" button to get the result.
|
||||
|
||||
It also possible to export a shape using the TUI Command: <em>geompy.MakeExportXAO(Shape, FileName, Groups, Fields)</em>
|
||||
|
||||
*/
|
479
idl/AdvancedGEOM.idl
Normal file
@ -0,0 +1,479 @@
|
||||
// Copyright (C) 2007-2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 : AdvancedGEOM.idl
|
||||
// Author : Roman NIKOLAEV
|
||||
|
||||
#ifndef __AdvancedGEOM_IDL__
|
||||
#define __AdvancedGEOM_IDL__
|
||||
|
||||
#include "GEOM_Gen.idl"
|
||||
|
||||
module GEOM
|
||||
{
|
||||
/*!
|
||||
* \brief Pattern for block division of the disk
|
||||
*/
|
||||
enum pattern {
|
||||
/*! Square */
|
||||
SQUARE,
|
||||
/*! Hexagon */
|
||||
HEXAGON
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Interface for advanced modeling functions.
|
||||
*/
|
||||
interface IAdvancedOperations : GEOM::GEOM_IOperations
|
||||
{
|
||||
// T-Shape WITHOUT Thickness reduction
|
||||
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
GEOM::ListOfGO MakePipeTShape (in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in boolean theHexMesh);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* The extremities of the main pipe are located on junctions points P1 and P2.
|
||||
* The extremity of the incident pipe is located on junction point P3.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \param theP1 1st junction point of main pipe
|
||||
* \param theP2 2nd junction point of main pipe
|
||||
* \param theP3 Junction point of incident pipe
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
GEOM::ListOfGO MakePipeTShapeWithPosition (in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in boolean theHexMesh,
|
||||
in GEOM::GEOM_Object theP1, in GEOM::GEOM_Object theP2,
|
||||
in GEOM::GEOM_Object theP3);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length). A chamfer is created
|
||||
* on the junction of the pipes.
|
||||
*
|
||||
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
* \param theH Height of the chamfer.
|
||||
* \param theW Width of the chamfer.
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
GEOM::ListOfGO MakePipeTShapeChamfer (in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theH, in double theW, in boolean theHexMesh);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* A chamfer is created on the junction of the pipes.
|
||||
* The extremities of the main pipe are located on junctions points P1 and P2.
|
||||
* The extremity of the incident pipe is located on junction point P3.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
* \param theH Height of the chamfer.
|
||||
* \param theW Width of the chamfer.
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \param theP1 1st junction point of main pipe
|
||||
* \param theP2 2nd junction point of main pipe
|
||||
* \param theP3 Junction point of incident pipe
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
GEOM::ListOfGO MakePipeTShapeChamferWithPosition (in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theH, in double theW, in boolean theHexMesh,
|
||||
in GEOM::GEOM_Object theP1, in GEOM::GEOM_Object theP2,
|
||||
in GEOM::GEOM_Object theP3);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* A fillet is created on the junction of the pipes.
|
||||
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
* \param theRF Radius of curvature of fillet.
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
GEOM::ListOfGO MakePipeTShapeFillet (in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRF, in boolean theHexMesh);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* A fillet is created on the junction of the pipes.
|
||||
* The extremities of the main pipe are located on junctions points P1 and P2.
|
||||
* The extremity of the incident pipe is located on junction point P3.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
* \param theRF Radius of curvature of fillet.
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \param theP1 1st junction point of main pipe
|
||||
* \param theP2 2nd junction point of main pipe
|
||||
* \param theP3 Junction point of incident pipe
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
GEOM::ListOfGO MakePipeTShapeFilletWithPosition (in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRF, in boolean theHexMesh,
|
||||
in GEOM::GEOM_Object theP1, in GEOM::GEOM_Object theP2,
|
||||
in GEOM::GEOM_Object theP3);
|
||||
|
||||
// T-Shape WITH Thickness reduction
|
||||
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
*
|
||||
* \param theRL Internal radius of left thickness reduction
|
||||
* \param theWL Width of left thickness reduction
|
||||
* \param theLtransL Length of left transition part
|
||||
* \param theLthinL Length of left thin part
|
||||
*
|
||||
* \param theRR Internal radius of right thickness reduction
|
||||
* \param theWR Width of right thickness reduction
|
||||
* \param theLtransR Length of right transition part
|
||||
* \param theLthinR Length of right thin part
|
||||
*
|
||||
* \param theRI Internal radius of incident thickness reduction
|
||||
* \param theWI Width of incident thickness reduction
|
||||
* \param theLtransI Length of incident transition part
|
||||
* \param theLthinI Length of incident thin part
|
||||
*
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
GEOM::ListOfGO MakePipeTShapeTR (in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||
in boolean theHexMesh);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* The extremities of the main pipe are located on junctions points P1 and P2.
|
||||
* The extremity of the incident pipe is located on junction point P3.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
*
|
||||
* \param theRL Internal radius of left thickness reduction
|
||||
* \param theWL Width of left thickness reduction
|
||||
* \param theLtransL Length of left transition part
|
||||
* \param theLthinL Length of left thin part
|
||||
*
|
||||
* \param theRR Internal radius of right thickness reduction
|
||||
* \param theWR Width of right thickness reduction
|
||||
* \param theLtransR Length of right transition part
|
||||
* \param theLthinR Length of right thin part
|
||||
*
|
||||
* \param theRI Internal radius of incident thickness reduction
|
||||
* \param theWI Width of incident thickness reduction
|
||||
* \param theLtransI Length of incident transition part
|
||||
* \param theLthinI Length of incident thin part
|
||||
*
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \param theP1 1st junction point of main pipe
|
||||
* \param theP2 2nd junction point of main pipe
|
||||
* \param theP3 Junction point of incident pipe
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
GEOM::ListOfGO MakePipeTShapeTRWithPosition(in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||
in boolean theHexMesh,
|
||||
in GEOM::GEOM_Object theP1, in GEOM::GEOM_Object theP2, in GEOM::GEOM_Object theP3);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length). A chamfer is created
|
||||
* on the junction of the pipes.
|
||||
*
|
||||
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
*
|
||||
* \param theRL Internal radius of left thickness reduction
|
||||
* \param theWL Width of left thickness reduction
|
||||
* \param theLtransL Length of left transition part
|
||||
* \param theLthinL Length of left thin part
|
||||
*
|
||||
* \param theRR Internal radius of right thickness reduction
|
||||
* \param theWR Width of right thickness reduction
|
||||
* \param theLtransR Length of right transition part
|
||||
* \param theLthinR Length of right thin part
|
||||
*
|
||||
* \param theRI Internal radius of incident thickness reduction
|
||||
* \param theWI Width of incident thickness reduction
|
||||
* \param theLtransI Length of incident transition part
|
||||
* \param theLthinI Length of incident thin part
|
||||
*
|
||||
* \param theH Height of the chamfer.
|
||||
* \param theW Width of the chamfer.
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
GEOM::ListOfGO MakePipeTShapeTRChamfer(in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||
in double theH, in double theW, in boolean theHexMesh);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* A chamfer is created on the junction of the pipes.
|
||||
* The extremities of the main pipe are located on junctions points P1 and P2.
|
||||
* The extremity of the incident pipe is located on junction point P3.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
*
|
||||
* \param theRL Internal radius of left thickness reduction
|
||||
* \param theWL Width of left thickness reduction
|
||||
* \param theLtransL Length of left transition part
|
||||
* \param theLthinL Length of left thin part
|
||||
*
|
||||
* \param theRR Internal radius of right thickness reduction
|
||||
* \param theWR Width of right thickness reduction
|
||||
* \param theLtransR Length of right transition part
|
||||
* \param theLthinR Length of right thin part
|
||||
*
|
||||
* \param theRI Internal radius of incident thickness reduction
|
||||
* \param theWI Width of incident thickness reduction
|
||||
* \param theLtransI Length of incident transition part
|
||||
* \param theLthinI Length of incident thin part
|
||||
*
|
||||
* \param theH Height of the chamfer.
|
||||
* \param theW Width of the chamfer.
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \param theP1 1st junction point of main pipe
|
||||
* \param theP2 2nd junction point of main pipe
|
||||
* \param theP3 Junction point of incident pipe
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
GEOM::ListOfGO MakePipeTShapeTRChamferWithPosition(in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||
in double theH, in double theW, in boolean theHexMesh,
|
||||
in GEOM::GEOM_Object theP1, in GEOM::GEOM_Object theP2, in GEOM::GEOM_Object theP3);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* A fillet is created on the junction of the pipes.
|
||||
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
*
|
||||
* \param theRL Internal radius of left thickness reduction
|
||||
* \param theWL Width of left thickness reduction
|
||||
* \param theLtransL Length of left transition part
|
||||
* \param theLthinL Length of left thin part
|
||||
*
|
||||
* \param theRR Internal radius of right thickness reduction
|
||||
* \param theWR Width of right thickness reduction
|
||||
* \param theLtransR Length of right transition part
|
||||
* \param theLthinR Length of right thin part
|
||||
*
|
||||
* \param theRI Internal radius of incident thickness reduction
|
||||
* \param theWI Width of incident thickness reduction
|
||||
* \param theLtransI Length of incident transition part
|
||||
* \param theLthinI Length of incident thin part
|
||||
*
|
||||
* \param theRF Radius of curvature of fillet.
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
GEOM::ListOfGO MakePipeTShapeTRFillet(in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||
in double theRF, in boolean theHexMesh);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* A fillet is created on the junction of the pipes.
|
||||
* The extremities of the main pipe are located on junctions points P1 and P2.
|
||||
* The extremity of the incident pipe is located on junction point P3.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
*
|
||||
* \param theRL Internal radius of left thickness reduction
|
||||
* \param theWL Width of left thickness reduction
|
||||
* \param theLtransL Length of left transition part
|
||||
* \param theLthinL Length of left thin part
|
||||
*
|
||||
* \param theRR Internal radius of right thickness reduction
|
||||
* \param theWR Width of right thickness reduction
|
||||
* \param theLtransR Length of right transition part
|
||||
* \param theLthinR Length of right thin part
|
||||
*
|
||||
* \param theRI Internal radius of incident thickness reduction
|
||||
* \param theWI Width of incident thickness reduction
|
||||
* \param theLtransI Length of incident transition part
|
||||
* \param theLthinI Length of incident thin part
|
||||
*
|
||||
* \param theRF Radius of curvature of fillet.
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \param theP1 1st junction point of main pipe
|
||||
* \param theP2 2nd junction point of main pipe
|
||||
* \param theP3 Junction point of incident pipe
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
GEOM::ListOfGO MakePipeTShapeTRFilletWithPosition(in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||
in double theRF, in boolean theHexMesh,
|
||||
in GEOM::GEOM_Object theP1, in GEOM::GEOM_Object theP2,
|
||||
in GEOM::GEOM_Object theP3);
|
||||
|
||||
/*!
|
||||
* This function allows to create a disk already divided into blocks. It
|
||||
* can be use to create divided pipes for later meshing in hexaedra.
|
||||
* \param theR Radius of the disk
|
||||
* \param theRatio Relative size of the central square diagonal against the disk diameter
|
||||
* \param theOrientation Plane on which the disk will be built
|
||||
* \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
|
||||
* \return New GEOM_Object, containing the created shape.
|
||||
*/
|
||||
GEOM::GEOM_Object MakeDividedDisk (in double theR,
|
||||
in double theRatio,
|
||||
in short theOrientation,
|
||||
in GEOM::pattern thePattern);
|
||||
|
||||
/*!
|
||||
* \brief Create a Disk prepared for hexa meshing with given center, normal vector and radius.
|
||||
* \param thePnt disk center.
|
||||
* \param theVec Vector, normal to the plane of the disk.
|
||||
* \param theR Disk radius.
|
||||
* \param theRatio Relative size of the central square diagonal against the disk diameter
|
||||
* \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
|
||||
* \return New GEOM_Object, containing the created disk.
|
||||
*/
|
||||
GEOM::GEOM_Object MakeDividedDiskPntVecR ( in GEOM::GEOM_Object thePnt,
|
||||
in GEOM::GEOM_Object theVec,
|
||||
in double theR,
|
||||
in double theRatio,
|
||||
in GEOM::pattern thePattern);
|
||||
|
||||
/*!
|
||||
* Builds a cylinder prepared for hexa meshes
|
||||
* \param theR Radius of the cylinder
|
||||
* \param theH Height of the cylinder
|
||||
* \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
|
||||
* \return New GEOM_Object, containing the created shape.
|
||||
*/
|
||||
GEOM::GEOM_Object MakeDividedCylinder (in double theR,
|
||||
in double theH,
|
||||
in GEOM::pattern thePattern );
|
||||
/*!
|
||||
*
|
||||
* Create a smoothing surface from a set of points
|
||||
* \param thelPoints list of points. Compounds of ggpoints are accepted as well.
|
||||
* \param theNbMax maximum number of Bezier pieces in the resulting surface.
|
||||
* \param theDegMax maximum degree of the resulting BSpline surface
|
||||
* \param theDMax specifies maximum value of the GeomPlate_PlateG0Criterion criterion.
|
||||
* \return New GEOM_Object, containing the created shape.
|
||||
*/
|
||||
GEOM::GEOM_Object MakeSmoothingSurface (in GEOM::ListOfGO thelPoints,
|
||||
in long theNbMax,
|
||||
in long theDegMax,
|
||||
in double theDMax);
|
||||
|
||||
/*@@ insert new functions before this line @@ do not remove this line @@*/
|
||||
};
|
||||
};
|
||||
|
||||
#endif // __AdvancedGEOM_IDL__
|
51
idl/BREPPlugin.idl
Normal file
@ -0,0 +1,51 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 __BREPPlugin_IDL__
|
||||
#define __BREPPlugin_IDL__
|
||||
|
||||
#include "GEOM_Gen.idl"
|
||||
|
||||
module GEOM
|
||||
{
|
||||
/*!
|
||||
* \brief Interface for BREPPlugin modeling functions.
|
||||
*/
|
||||
interface IBREPOperations : GEOM::GEOM_IOperations
|
||||
{
|
||||
/*!
|
||||
* \brief Export the given shape into a file with given name in BREP format.
|
||||
*
|
||||
* \param theObject Shape to be stored in the file.
|
||||
* \param theFileName Name of the file to store the given shape in.
|
||||
*/
|
||||
void ExportBREP( in GEOM::GEOM_Object theObject,
|
||||
in string theFileName );
|
||||
|
||||
/*!
|
||||
* \brief Import a shape from the BREP file.
|
||||
*
|
||||
* \param theFileName The file, containing the shape.
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
GEOM::ListOfGO ImportBREP( in string theFileName );
|
||||
};
|
||||
};
|
||||
|
||||
#endif // __BREPPlugin_IDL__
|
@ -32,9 +32,40 @@ ENDIF(WIN32)
|
||||
|
||||
SET(SalomeIDLGEOM_IDLSOURCES
|
||||
GEOM_Gen.idl
|
||||
)
|
||||
|
||||
SET(SalomeIDLGEOMSuperv_IDLSOURCES
|
||||
GEOM_Superv.idl
|
||||
)
|
||||
|
||||
SET(SalomeIDLAdvancedGEOM_IDLSOURCES
|
||||
AdvancedGEOM.idl
|
||||
)
|
||||
|
||||
SET(SalomeIDLSTLPlugin_IDLSOURCES
|
||||
STLPlugin.idl
|
||||
)
|
||||
|
||||
SET(SalomeIDLBREPPlugin_IDLSOURCES
|
||||
BREPPlugin.idl
|
||||
)
|
||||
|
||||
SET(SalomeIDLSTEPPlugin_IDLSOURCES
|
||||
STEPPlugin.idl
|
||||
)
|
||||
|
||||
SET(SalomeIDLIGESPlugin_IDLSOURCES
|
||||
IGESPlugin.idl
|
||||
)
|
||||
|
||||
SET(SalomeIDLXAOPlugin_IDLSOURCES
|
||||
XAOPlugin.idl
|
||||
)
|
||||
|
||||
SET(SalomeIDLVTKPlugin_IDLSOURCES
|
||||
VTKPlugin.idl
|
||||
)
|
||||
|
||||
SET(IDL_INCLUDE_DIRS
|
||||
${KERNEL_ROOT_DIR}/idl/salome
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
@ -45,3 +76,35 @@ SET(IDL_LINK_FLAGS
|
||||
|
||||
OMNIORB_ADD_MODULE(SalomeIDLGEOM "${SalomeIDLGEOM_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
|
||||
INSTALL(TARGETS SalomeIDLGEOM EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
OMNIORB_ADD_MODULE(SalomeIDLAdvancedGEOM "${SalomeIDLAdvancedGEOM_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
|
||||
ADD_DEPENDENCIES(SalomeIDLAdvancedGEOM SalomeIDLGEOM)
|
||||
INSTALL(TARGETS SalomeIDLAdvancedGEOM EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
OMNIORB_ADD_MODULE(SalomeIDLSTLPlugin "${SalomeIDLSTLPlugin_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
|
||||
ADD_DEPENDENCIES(SalomeIDLSTLPlugin SalomeIDLGEOM)
|
||||
INSTALL(TARGETS SalomeIDLSTLPlugin EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
OMNIORB_ADD_MODULE(SalomeIDLBREPPlugin "${SalomeIDLBREPPlugin_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
|
||||
ADD_DEPENDENCIES(SalomeIDLBREPPlugin SalomeIDLGEOM)
|
||||
INSTALL(TARGETS SalomeIDLBREPPlugin EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
OMNIORB_ADD_MODULE(SalomeIDLSTEPPlugin "${SalomeIDLSTEPPlugin_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
|
||||
ADD_DEPENDENCIES(SalomeIDLSTEPPlugin SalomeIDLGEOM)
|
||||
INSTALL(TARGETS SalomeIDLSTEPPlugin EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
OMNIORB_ADD_MODULE(SalomeIDLIGESPlugin "${SalomeIDLIGESPlugin_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
|
||||
ADD_DEPENDENCIES(SalomeIDLIGESPlugin SalomeIDLGEOM)
|
||||
INSTALL(TARGETS SalomeIDLIGESPlugin EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
OMNIORB_ADD_MODULE(SalomeIDLXAOPlugin "${SalomeIDLXAOPlugin_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
|
||||
ADD_DEPENDENCIES(SalomeIDLXAOPlugin SalomeIDLGEOM)
|
||||
INSTALL(TARGETS SalomeIDLXAOPlugin EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
OMNIORB_ADD_MODULE(SalomeIDLVTKPlugin "${SalomeIDLVTKPlugin_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
|
||||
ADD_DEPENDENCIES(SalomeIDLVTKPlugin SalomeIDLGEOM)
|
||||
INSTALL(TARGETS SalomeIDLVTKPlugin EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
OMNIORB_ADD_MODULE(SalomeIDLGEOMSuperv "${SalomeIDLGEOMSuperv_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
|
||||
ADD_DEPENDENCIES(SalomeIDLGEOMSuperv SalomeIDLGEOM SalomeIDLAdvancedGEOM)
|
||||
INSTALL(TARGETS SalomeIDLGEOMSuperv EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
509
idl/GEOM_Gen.idl
@ -177,19 +177,6 @@ module GEOM
|
||||
Interpolation
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Pattern for block division of the disk
|
||||
*
|
||||
* Used in the functions GEOM_IAdvancedOperations.MakeDividedDisk(), GEOM_ICurvesOperations.MakeDividedDiskPntVecR()
|
||||
*/
|
||||
enum pattern {
|
||||
/*! Square */
|
||||
SQUARE,
|
||||
|
||||
/*! Hexagon */
|
||||
HEXAGON
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Type of field data
|
||||
*/
|
||||
@ -3710,20 +3697,24 @@ module GEOM
|
||||
GEOM_Object MakeCopy (in GEOM_Object theOriginal);
|
||||
|
||||
/*!
|
||||
* \brief Deprecated method. Use Export<FormatName> (from the
|
||||
* corresponding plugin) instead; here <FormatName> is a name of format.
|
||||
*
|
||||
* \brief Export the given shape into a file with given name.
|
||||
* \param theObject Shape to be stored in the file.
|
||||
* \param theFileName Name of the file to store the given shape in.
|
||||
* \param theFormatName Specify format for the shape storage.
|
||||
* Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
|
||||
*/
|
||||
void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
|
||||
|
||||
/*!
|
||||
* \brief Import a shape from the BRep or IGES or STEP file
|
||||
* \brief Deprecated method. Use Import<FormatName> (from the
|
||||
* corresponding plugin) instead; here <FormatName> is a name of format.
|
||||
*
|
||||
* \brief Import a shape from the STL, BREP, IGES or STEP file
|
||||
* (depends on given format) with given name.
|
||||
* \param theFileName The file, containing the shape.
|
||||
* \param theFormatName Specify format for the file reading.
|
||||
* Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
|
||||
* If format 'IGES_SCALE' is used instead of 'IGES' or
|
||||
* format 'STEP_SCALE' is used instead of 'STEP',
|
||||
* file length unit will be ignored (set to 'meter') and result model will be scaled.
|
||||
@ -3732,34 +3723,17 @@ module GEOM
|
||||
ListOfGO ImportFile (in string theFileName, in string theFormatName);
|
||||
|
||||
/*!
|
||||
* \brief Deprecated method. Use ReadValue (from the corresponding plugin) instead.
|
||||
*
|
||||
* \brief Read a value of parameter from a file, containing a shape.
|
||||
* \param theFileName The file, containing the shape.
|
||||
* \param theFormatName Specify format for the file reading.
|
||||
* Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
|
||||
* \param theParameterName Specify the parameter. For example, pass "LEN_UNITS"
|
||||
* to obtain length units, in which the file is written.
|
||||
* \return Value of requested parameter in form of text string.
|
||||
*/
|
||||
string ReadValue (in string theFileName, in string theFormatName, in string theParameterName);
|
||||
|
||||
/*!
|
||||
* \brief Get the supported import formats and corresponding patterns for File dialog.
|
||||
* \param theFormats Output. List of formats, available for import.
|
||||
* \param thePatterns Output. List of file patterns, corresponding to available formats.
|
||||
* \return Returns available formats and patterns through the arguments.
|
||||
*/
|
||||
void ImportTranslators (out string_array theFormats,
|
||||
out string_array thePatterns);
|
||||
|
||||
/*!
|
||||
* \brief Get the supported export formats and corresponding patterns for File dialog.
|
||||
* \param theFormats Output. List of formats, available for export.
|
||||
* \param thePatterns Output. List of file patterns, corresponding to available formats.
|
||||
* \return Returns available formats and patterns through the arguments.
|
||||
*/
|
||||
void ExportTranslators (out string_array theFormats,
|
||||
out string_array thePatterns);
|
||||
|
||||
/*!
|
||||
* \brief Read a shape from the binary stream, containing its bounding representation (BRep).
|
||||
* \note GEOM_Object::GetShapeStream() method can be used to obtain the shape's BRep stream.
|
||||
@ -3799,30 +3773,6 @@ module GEOM
|
||||
*/
|
||||
ListOfLong GetAllTextures();
|
||||
|
||||
/*!
|
||||
* Export a shape to XAO format
|
||||
* \param shape The shape to export
|
||||
* \param groups The list of groups to export
|
||||
* \param fields The list of fields to export
|
||||
* \param author The author of the export
|
||||
* \param fileName The name of the file to export
|
||||
* \return boolean indicating if export was successful.
|
||||
*/
|
||||
boolean ExportXAO(in GEOM_Object shape,
|
||||
in ListOfGO groups, in ListOfFields fields,
|
||||
in string author, in string fileName);
|
||||
|
||||
/*!
|
||||
* Import a shape from XAO format
|
||||
* \param fileName The name of the file to import
|
||||
* \param shape The imported shape
|
||||
* \param subShapes The list of imported subShapes
|
||||
* \param groups The list of imported groups
|
||||
* \param fields The list of imported fields
|
||||
* \return boolean indicating if import was successful.
|
||||
*/
|
||||
boolean ImportXAO(in string fileName, out GEOM_Object shape,
|
||||
out ListOfGO subShapes, out ListOfGO groups, out ListOfFields fields);
|
||||
};
|
||||
|
||||
// # GEOM_IKindOfShape:
|
||||
@ -4391,447 +4341,6 @@ module GEOM
|
||||
ListOfLong GetObjects (in GEOM_Object theGroup);
|
||||
};
|
||||
|
||||
// # GEOM_IAdvancedOperations:
|
||||
/*!
|
||||
* \brief Interface for advanced modeling functions.
|
||||
*/
|
||||
interface GEOM_IAdvancedOperations : GEOM_IOperations
|
||||
{
|
||||
// T-Shape WITHOUT Thickness reduction
|
||||
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
ListOfGO MakePipeTShape (in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in boolean theHexMesh);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* The extremities of the main pipe are located on junctions points P1 and P2.
|
||||
* The extremity of the incident pipe is located on junction point P3.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \param theP1 1st junction point of main pipe
|
||||
* \param theP2 2nd junction point of main pipe
|
||||
* \param theP3 Junction point of incident pipe
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
ListOfGO MakePipeTShapeWithPosition (in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in boolean theHexMesh,
|
||||
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length). A chamfer is created
|
||||
* on the junction of the pipes.
|
||||
*
|
||||
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
* \param theH Height of the chamfer.
|
||||
* \param theW Width of the chamfer.
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
ListOfGO MakePipeTShapeChamfer (in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theH, in double theW, in boolean theHexMesh);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* A chamfer is created on the junction of the pipes.
|
||||
* The extremities of the main pipe are located on junctions points P1 and P2.
|
||||
* The extremity of the incident pipe is located on junction point P3.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
* \param theH Height of the chamfer.
|
||||
* \param theW Width of the chamfer.
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \param theP1 1st junction point of main pipe
|
||||
* \param theP2 2nd junction point of main pipe
|
||||
* \param theP3 Junction point of incident pipe
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
ListOfGO MakePipeTShapeChamferWithPosition (in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theH, in double theW, in boolean theHexMesh,
|
||||
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* A fillet is created on the junction of the pipes.
|
||||
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
* \param theRF Radius of curvature of fillet.
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
ListOfGO MakePipeTShapeFillet (in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRF, in boolean theHexMesh);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* A fillet is created on the junction of the pipes.
|
||||
* The extremities of the main pipe are located on junctions points P1 and P2.
|
||||
* The extremity of the incident pipe is located on junction point P3.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
* \param theRF Radius of curvature of fillet.
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \param theP1 1st junction point of main pipe
|
||||
* \param theP2 2nd junction point of main pipe
|
||||
* \param theP3 Junction point of incident pipe
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
ListOfGO MakePipeTShapeFilletWithPosition (in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRF, in boolean theHexMesh,
|
||||
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
|
||||
|
||||
// T-Shape WITH Thickness reduction
|
||||
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
*
|
||||
* \param theRL Internal radius of left thickness reduction
|
||||
* \param theWL Width of left thickness reduction
|
||||
* \param theLtransL Length of left transition part
|
||||
* \param theLthinL Length of left thin part
|
||||
*
|
||||
* \param theRR Internal radius of right thickness reduction
|
||||
* \param theWR Width of right thickness reduction
|
||||
* \param theLtransR Length of right transition part
|
||||
* \param theLthinR Length of right thin part
|
||||
*
|
||||
* \param theRI Internal radius of incident thickness reduction
|
||||
* \param theWI Width of incident thickness reduction
|
||||
* \param theLtransI Length of incident transition part
|
||||
* \param theLthinI Length of incident thin part
|
||||
*
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
ListOfGO MakePipeTShapeTR (in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||
in boolean theHexMesh);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* The extremities of the main pipe are located on junctions points P1 and P2.
|
||||
* The extremity of the incident pipe is located on junction point P3.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
*
|
||||
* \param theRL Internal radius of left thickness reduction
|
||||
* \param theWL Width of left thickness reduction
|
||||
* \param theLtransL Length of left transition part
|
||||
* \param theLthinL Length of left thin part
|
||||
*
|
||||
* \param theRR Internal radius of right thickness reduction
|
||||
* \param theWR Width of right thickness reduction
|
||||
* \param theLtransR Length of right transition part
|
||||
* \param theLthinR Length of right thin part
|
||||
*
|
||||
* \param theRI Internal radius of incident thickness reduction
|
||||
* \param theWI Width of incident thickness reduction
|
||||
* \param theLtransI Length of incident transition part
|
||||
* \param theLthinI Length of incident thin part
|
||||
*
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \param theP1 1st junction point of main pipe
|
||||
* \param theP2 2nd junction point of main pipe
|
||||
* \param theP3 Junction point of incident pipe
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
ListOfGO MakePipeTShapeTRWithPosition
|
||||
(in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||
in boolean theHexMesh,
|
||||
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length). A chamfer is created
|
||||
* on the junction of the pipes.
|
||||
*
|
||||
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
*
|
||||
* \param theRL Internal radius of left thickness reduction
|
||||
* \param theWL Width of left thickness reduction
|
||||
* \param theLtransL Length of left transition part
|
||||
* \param theLthinL Length of left thin part
|
||||
*
|
||||
* \param theRR Internal radius of right thickness reduction
|
||||
* \param theWR Width of right thickness reduction
|
||||
* \param theLtransR Length of right transition part
|
||||
* \param theLthinR Length of right thin part
|
||||
*
|
||||
* \param theRI Internal radius of incident thickness reduction
|
||||
* \param theWI Width of incident thickness reduction
|
||||
* \param theLtransI Length of incident transition part
|
||||
* \param theLthinI Length of incident thin part
|
||||
*
|
||||
* \param theH Height of the chamfer.
|
||||
* \param theW Width of the chamfer.
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
ListOfGO MakePipeTShapeTRChamfer
|
||||
(in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||
in double theH, in double theW, in boolean theHexMesh);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* A chamfer is created on the junction of the pipes.
|
||||
* The extremities of the main pipe are located on junctions points P1 and P2.
|
||||
* The extremity of the incident pipe is located on junction point P3.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
*
|
||||
* \param theRL Internal radius of left thickness reduction
|
||||
* \param theWL Width of left thickness reduction
|
||||
* \param theLtransL Length of left transition part
|
||||
* \param theLthinL Length of left thin part
|
||||
*
|
||||
* \param theRR Internal radius of right thickness reduction
|
||||
* \param theWR Width of right thickness reduction
|
||||
* \param theLtransR Length of right transition part
|
||||
* \param theLthinR Length of right thin part
|
||||
*
|
||||
* \param theRI Internal radius of incident thickness reduction
|
||||
* \param theWI Width of incident thickness reduction
|
||||
* \param theLtransI Length of incident transition part
|
||||
* \param theLthinI Length of incident thin part
|
||||
*
|
||||
* \param theH Height of the chamfer.
|
||||
* \param theW Width of the chamfer.
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \param theP1 1st junction point of main pipe
|
||||
* \param theP2 2nd junction point of main pipe
|
||||
* \param theP3 Junction point of incident pipe
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
ListOfGO MakePipeTShapeTRChamferWithPosition
|
||||
(in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||
in double theH, in double theW, in boolean theHexMesh,
|
||||
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* A fillet is created on the junction of the pipes.
|
||||
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
*
|
||||
* \param theRL Internal radius of left thickness reduction
|
||||
* \param theWL Width of left thickness reduction
|
||||
* \param theLtransL Length of left transition part
|
||||
* \param theLthinL Length of left thin part
|
||||
*
|
||||
* \param theRR Internal radius of right thickness reduction
|
||||
* \param theWR Width of right thickness reduction
|
||||
* \param theLtransR Length of right transition part
|
||||
* \param theLthinR Length of right thin part
|
||||
*
|
||||
* \param theRI Internal radius of incident thickness reduction
|
||||
* \param theWI Width of incident thickness reduction
|
||||
* \param theLtransI Length of incident transition part
|
||||
* \param theLthinI Length of incident thin part
|
||||
*
|
||||
* \param theRF Radius of curvature of fillet.
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
ListOfGO MakePipeTShapeTRFillet
|
||||
(in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||
in double theRF, in boolean theHexMesh);
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
*
|
||||
* A fillet is created on the junction of the pipes.
|
||||
* The extremities of the main pipe are located on junctions points P1 and P2.
|
||||
* The extremity of the incident pipe is located on junction point P3.
|
||||
* \param theR1 Internal radius of main pipe
|
||||
* \param theW1 Width of main pipe
|
||||
* \param theL1 Half-length of main pipe
|
||||
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||
* \param theL2 Half-length of incident pipe
|
||||
*
|
||||
* \param theRL Internal radius of left thickness reduction
|
||||
* \param theWL Width of left thickness reduction
|
||||
* \param theLtransL Length of left transition part
|
||||
* \param theLthinL Length of left thin part
|
||||
*
|
||||
* \param theRR Internal radius of right thickness reduction
|
||||
* \param theWR Width of right thickness reduction
|
||||
* \param theLtransR Length of right transition part
|
||||
* \param theLthinR Length of right thin part
|
||||
*
|
||||
* \param theRI Internal radius of incident thickness reduction
|
||||
* \param theWI Width of incident thickness reduction
|
||||
* \param theLtransI Length of incident transition part
|
||||
* \param theLthinI Length of incident thin part
|
||||
*
|
||||
* \param theRF Radius of curvature of fillet.
|
||||
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||
* \param theP1 1st junction point of main pipe
|
||||
* \param theP2 2nd junction point of main pipe
|
||||
* \param theP3 Junction point of incident pipe
|
||||
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||
*/
|
||||
ListOfGO MakePipeTShapeTRFilletWithPosition
|
||||
(in double theR1, in double theW1, in double theL1,
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||
in double theRF, in boolean theHexMesh,
|
||||
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
|
||||
|
||||
/*!
|
||||
* This function allows to create a disk already divided into blocks. It
|
||||
* can be use to create divided pipes for later meshing in hexaedra.
|
||||
* \param theR Radius of the disk
|
||||
* \param theRatio Relative size of the central square diagonal against the disk diameter
|
||||
* \param theOrientation Plane on which the disk will be built
|
||||
* \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
|
||||
* \return New GEOM_Object, containing the created shape.
|
||||
*/
|
||||
GEOM_Object MakeDividedDisk (in double theR,
|
||||
in double theRatio,
|
||||
in short theOrientation,
|
||||
in pattern thePattern);
|
||||
|
||||
/*!
|
||||
* \brief Create a Disk prepared for hexa meshing with given center, normal vector and radius.
|
||||
* \param thePnt disk center.
|
||||
* \param theVec Vector, normal to the plane of the disk.
|
||||
* \param theR Disk radius.
|
||||
* \param theRatio Relative size of the central square diagonal against the disk diameter
|
||||
* \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
|
||||
* \return New GEOM_Object, containing the created disk.
|
||||
*/
|
||||
GEOM_Object MakeDividedDiskPntVecR ( in GEOM_Object thePnt,
|
||||
in GEOM_Object theVec,
|
||||
in double theR,
|
||||
in double theRatio,
|
||||
in pattern thePattern);
|
||||
|
||||
/*!
|
||||
* Builds a cylinder prepared for hexa meshes
|
||||
* \param theR Radius of the cylinder
|
||||
* \param theH Height of the cylinder
|
||||
* \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
|
||||
* \return New GEOM_Object, containing the created shape.
|
||||
*/
|
||||
GEOM_Object MakeDividedCylinder (in double theR,
|
||||
in double theH,
|
||||
in pattern thePattern );
|
||||
/*!
|
||||
*
|
||||
* Create a smoothing surface from a set of points
|
||||
* \param thelPoints list of points. Compounds of points are accepted as well.
|
||||
* \param theNbMax maximum number of Bezier pieces in the resulting surface.
|
||||
* \param theDegMax maximum degree of the resulting BSpline surface
|
||||
* \param theDMax specifies maximum value of the GeomPlate_PlateG0Criterion criterion.
|
||||
* \return New GEOM_Object, containing the created shape.
|
||||
*/
|
||||
GEOM_Object MakeSmoothingSurface (in ListOfGO thelPoints,
|
||||
in long theNbMax,
|
||||
in long theDegMax,
|
||||
in double theDMax);
|
||||
|
||||
/*@@ insert new functions before this line @@ do not remove this line @@*/
|
||||
};
|
||||
|
||||
// # GEOM_IFieldOperations:
|
||||
/*!
|
||||
* \brief Interface for field operation.
|
||||
|
@ -26,6 +26,7 @@
|
||||
#define __GEOM_SUPERV__
|
||||
|
||||
#include "GEOM_Gen.idl"
|
||||
#include "AdvancedGEOM.idl"
|
||||
|
||||
module GEOM
|
||||
{
|
||||
@ -272,15 +273,6 @@ module GEOM
|
||||
GEOM_Object MakeCopy (in GEOM_Object theOriginal) ;
|
||||
void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName) ;
|
||||
GEOM_Object ImportFile (in string theFileName, in string theFormatName) ;
|
||||
void ImportTranslators (out string_array theFormats,
|
||||
out string_array thePatterns) ;
|
||||
void ExportTranslators (out string_array theFormats,
|
||||
out string_array thePatterns) ;
|
||||
boolean ExportXAO(in GEOM_Object shape,
|
||||
in ListOfGO groups, in ListOfFields fields,
|
||||
in string author, in string fileName);
|
||||
boolean ImportXAO(in string fileName, out GEOM_Object shape,
|
||||
out ListOfGO subShapes, out ListOfGO groups, out ListOfFields fields);
|
||||
|
||||
//-----------------------------------------------------------//
|
||||
// TransformOperations //
|
||||
@ -644,6 +636,46 @@ module GEOM
|
||||
|
||||
GEOM_Object MakeSmoothingSurface (in GEOM_List thelPoints);
|
||||
|
||||
//-----------------------------------------------------------//
|
||||
// Import/Export Operations //
|
||||
//-----------------------------------------------------------//
|
||||
void ExportSTL( in GEOM::GEOM_Object theObject,
|
||||
in string theFileName,
|
||||
in boolean theIsASCII,
|
||||
in double theDeflection,
|
||||
in boolean theIsRelative );
|
||||
GEOM_Object ImportSTL( in string theFileName );
|
||||
|
||||
void ExportBREP( in GEOM::GEOM_Object theObject,
|
||||
in string theFileName );
|
||||
GEOM_Object ImportBREP( in string theFileName );
|
||||
|
||||
void ExportSTEP( in GEOM::GEOM_Object theObject,
|
||||
in string theFileName );
|
||||
GEOM_Object ImportSTEP( in string theFileName,
|
||||
in boolean theIsIgnoreUnits );
|
||||
|
||||
void ExportIGES( in GEOM::GEOM_Object theObject,
|
||||
in string theFileName,
|
||||
in string theVersion );
|
||||
GEOM_Object ImportIGES( in string theFileName,
|
||||
in boolean theIsIgnoreUnits );
|
||||
|
||||
boolean ExportXAO( in GEOM_Object shape,
|
||||
in ListOfGO groups,
|
||||
in ListOfFields fields,
|
||||
in string author,
|
||||
in string fileName );
|
||||
boolean ImportXAO( in string fileName,
|
||||
out GEOM_Object shape,
|
||||
out ListOfGO subShapes,
|
||||
out ListOfGO groups,
|
||||
out ListOfFields fields );
|
||||
|
||||
void ExportVTK( in GEOM::GEOM_Object theObject,
|
||||
in string theFileName,
|
||||
in double theDeflection );
|
||||
|
||||
/*@@ insert new functions before this line @@ do not remove this line @@*/
|
||||
};
|
||||
};
|
||||
|
67
idl/IGESPlugin.idl
Normal file
@ -0,0 +1,67 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 __IGESPlugin_IDL__
|
||||
#define __IGESPlugin_IDL__
|
||||
|
||||
#include "GEOM_Gen.idl"
|
||||
|
||||
module GEOM
|
||||
{
|
||||
/*!
|
||||
* \brief Interface for IGESPlugin modeling functions.
|
||||
*/
|
||||
interface IIGESOperations : GEOM::GEOM_IOperations
|
||||
{
|
||||
/*!
|
||||
* \brief Export the given shape into a file with given name in IGES format.
|
||||
*
|
||||
* \param theObject Shape to be stored in the file.
|
||||
* \param theFileName Name of the file to store the given shape in.
|
||||
* \param theVersion Version of IGES format which defines, whether to write
|
||||
* only faces (5.1 IGES format) or shells and solids also (5.3 IGES format).
|
||||
*/
|
||||
void ExportIGES( in GEOM::GEOM_Object theObject,
|
||||
in string theFileName,
|
||||
in string theVersion );
|
||||
|
||||
/*!
|
||||
* \brief Import a shape from the IGES file.
|
||||
*
|
||||
* \param theFileName The file, containing the shape.
|
||||
* \param theIsIgnoreUnits If True, file length units will be ignored (set to 'meter')
|
||||
* and result model will be scaled, if its units are not meters.
|
||||
* If False (default), file length units will be taken into account.
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
GEOM::ListOfGO ImportIGES( in string theFileName,
|
||||
in boolean theIsIgnoreUnits );
|
||||
|
||||
/*!
|
||||
* \brief Read a value of parameter from a file, containing a shape.
|
||||
* \param theFileName The file, containing the shape.
|
||||
* \param theParameterName Specify the parameter. For example, pass "LEN_UNITS"
|
||||
* to obtain length units, in which the file is written.
|
||||
* \return Value of requested parameter in form of text string.
|
||||
*/
|
||||
string ReadValue( in string theFileName, in string theParameterName);
|
||||
};
|
||||
};
|
||||
|
||||
#endif // __IGESPlugin_IDL__
|
66
idl/STEPPlugin.idl
Normal file
@ -0,0 +1,66 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 __STEPPlugin_IDL__
|
||||
#define __STEPPlugin_IDL__
|
||||
|
||||
#include "GEOM_Gen.idl"
|
||||
|
||||
module GEOM
|
||||
{
|
||||
/*!
|
||||
* \brief Interface for STEPPlugin modeling functions.
|
||||
*/
|
||||
interface ISTEPOperations : GEOM::GEOM_IOperations
|
||||
{
|
||||
/*!
|
||||
* \brief Export the given shape into a file with given name in STEP format.
|
||||
*
|
||||
* \param theObject Shape to be stored in the file.
|
||||
* \param theFileName Name of the file to store the given shape in.
|
||||
*/
|
||||
void ExportSTEP( in GEOM::GEOM_Object theObject,
|
||||
in string theFileName );
|
||||
|
||||
/*!
|
||||
* \brief Import a shape from the STEP file.
|
||||
*
|
||||
* \param theFileName The file, containing the shape.
|
||||
* \param theIsIgnoreUnits If True, file length units will be ignored (set to 'meter')
|
||||
* and result model will be scaled, if its units are not meters.
|
||||
* If False (default), file length units will be taken into account.
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
GEOM::ListOfGO ImportSTEP( in string theFileName,
|
||||
in boolean theIsIgnoreUnits );
|
||||
|
||||
/*!
|
||||
* \brief Read a value of parameter from a file, containing a shape.
|
||||
* \param theFileName The file, containing the shape.
|
||||
* \param theParameterName Specify the parameter. For example, pass "LEN_UNITS"
|
||||
* to obtain length units, in which the file is written.
|
||||
* \return Value of requested parameter in form of text string.
|
||||
*/
|
||||
string ReadValue( in string theFileName,
|
||||
in string theParameterName );
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
#endif // __STEPPlugin_IDL__
|
59
idl/STLPlugin.idl
Normal file
@ -0,0 +1,59 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 __STLPlugin_IDL__
|
||||
#define __STLPlugin_IDL__
|
||||
|
||||
#include "GEOM_Gen.idl"
|
||||
|
||||
module GEOM
|
||||
{
|
||||
/*!
|
||||
* \brief Interface for STLPlugin modeling functions.
|
||||
*/
|
||||
interface ISTLOperations : GEOM::GEOM_IOperations
|
||||
{
|
||||
/*!
|
||||
* \brief Export the given shape into a file with given name in STL format.
|
||||
*
|
||||
* \param theObject Shape to be stored in the file.
|
||||
* \param theFileName Name of the file to store the given shape in.
|
||||
* \param theIsASCII The format of the exported file (ASCII or Binary).
|
||||
* \param theDeflection Deflection of the given shape.
|
||||
* \param theIsRelative Mode for writing the file. If True (default value), the
|
||||
* deflection is calculated from the relative size of the
|
||||
* shape; if False, the user defined deflection is used.
|
||||
*/
|
||||
void ExportSTL( in GEOM::GEOM_Object theObject,
|
||||
in string theFileName,
|
||||
in boolean theIsASCII,
|
||||
in double theDeflection,
|
||||
in boolean theIsRelative );
|
||||
|
||||
/*!
|
||||
* \brief Import a shape from the STL file.
|
||||
*
|
||||
* \param theFileName The file, containing the shape.
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
GEOM::ListOfGO ImportSTL( in string theFileName );
|
||||
};
|
||||
};
|
||||
|
||||
#endif // __STLPlugin_IDL__
|
45
idl/VTKPlugin.idl
Normal file
@ -0,0 +1,45 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 __VTKPlugin_IDL__
|
||||
#define __VTKPlugin_IDL__
|
||||
|
||||
#include "GEOM_Gen.idl"
|
||||
|
||||
module GEOM
|
||||
{
|
||||
/*!
|
||||
* \brief Interface for VTKPlugin modeling functions.
|
||||
*/
|
||||
interface IVTKOperations : GEOM::GEOM_IOperations
|
||||
{
|
||||
/*!
|
||||
* \brief Export the given shape into a file with given name in VTK format.
|
||||
*
|
||||
* \param theObject Shape to be stored in the file.
|
||||
* \param theFileName Name of the file to store the given shape in.
|
||||
* \param theDeflection Deflection of the given shape.
|
||||
*/
|
||||
void ExportVTK( in GEOM::GEOM_Object theObject,
|
||||
in string theFileName,
|
||||
in double theDeflection );
|
||||
};
|
||||
};
|
||||
|
||||
#endif // __VTKPlugin_IDL__
|
64
idl/XAOPlugin.idl
Normal file
@ -0,0 +1,64 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 __XAOPlugin_IDL__
|
||||
#define __XAOPlugin_IDL__
|
||||
|
||||
#include "GEOM_Gen.idl"
|
||||
|
||||
module GEOM
|
||||
{
|
||||
/*!
|
||||
* \brief Interface for XAOPlugin modeling functions.
|
||||
*/
|
||||
interface IXAOOperations : GEOM::GEOM_IOperations
|
||||
{
|
||||
/*!
|
||||
* Export a shape to XAO format
|
||||
* \param shape The shape to export
|
||||
* \param groups The list of groups to export
|
||||
* \param fields The list of fields to export
|
||||
* \param author The author of the export
|
||||
* \param fileName The name of the file to export
|
||||
* \return boolean indicating if export was successful.
|
||||
*/
|
||||
boolean ExportXAO( in GEOM::GEOM_Object shape,
|
||||
in GEOM::ListOfGO groups,
|
||||
in GEOM::ListOfFields fields,
|
||||
in string author,
|
||||
in string fileName );
|
||||
|
||||
/*!
|
||||
* Import a shape from XAO format
|
||||
* \param fileName The name of the file to import
|
||||
* \param shape The imported shape
|
||||
* \param subShapes The list of imported subShapes
|
||||
* \param groups The list of imported groups
|
||||
* \param fields The list of imported fields
|
||||
* \return boolean indicating if import was successful.
|
||||
*/
|
||||
boolean ImportXAO( in string fileName,
|
||||
out GEOM::GEOM_Object shape,
|
||||
out GEOM::ListOfGO subShapes,
|
||||
out GEOM::ListOfGO groups,
|
||||
out GEOM::ListOfFields fields );
|
||||
};
|
||||
};
|
||||
|
||||
#endif // __XAOPlugin_IDL__
|
@ -28,7 +28,7 @@
|
||||
|
||||
<geom-plugins>
|
||||
|
||||
<geom-plugin name="AdvancedGUI"
|
||||
<geom-plugin name="AdvancedGEOM"
|
||||
server-lib="AdvancedEngine"
|
||||
gui-lib="AdvancedGUI">
|
||||
<actions>
|
45
resources/BREPPlugin.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version='1.0' encoding='us-ascii'?>
|
||||
<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
|
||||
<!--
|
||||
Copyright (C) 2014 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, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
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="BREPPlugin"
|
||||
server-lib="BREPPluginEngine"
|
||||
gui-lib="BREPPluginGUI">
|
||||
<actions>
|
||||
<action label="Import_BREP"
|
||||
menu="FILE/IMPORT:10/IMPORTBREP"
|
||||
status-bar="IMPORTBREP"
|
||||
accel="Ctrl+I">
|
||||
</action>
|
||||
<action label="Export_BREP"
|
||||
menu="FILE/EXPORT:10/EXPORTBREP"
|
||||
status-bar="EXPORTBREP"
|
||||
accel="Ctrl+E">
|
||||
</action>
|
||||
</actions>
|
||||
</geom-plugin>
|
||||
|
||||
</geom-plugins>
|
@ -23,12 +23,17 @@
|
||||
|
||||
# These files are data, module or lib files
|
||||
SET( _res_files
|
||||
GEOMActions.xml
|
||||
AdvancedGEOM.xml
|
||||
STLPlugin.xml
|
||||
BREPPlugin.xml
|
||||
STEPPlugin.xml
|
||||
IGESPlugin.xml
|
||||
XAOPlugin.xml
|
||||
VTKPlugin.xml
|
||||
GEOM_en.xml
|
||||
GEOM_fr.xml
|
||||
GEOM.config
|
||||
GEOMDS_Resources
|
||||
ImportExport
|
||||
ShHealing
|
||||
3dsketch.png
|
||||
isoline.png
|
||||
|
43
resources/IGESPlugin.xml
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version='1.0' encoding='us-ascii'?>
|
||||
<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
|
||||
<!--
|
||||
Copyright (C) 2014 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, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
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="IGESPlugin"
|
||||
server-lib="IGESPluginEngine"
|
||||
gui-lib="IGESPluginGUI">
|
||||
<actions>
|
||||
<action label="Import_IGES"
|
||||
menu="FILE/IMPORT:10/IMPORTIGES"
|
||||
status-bar="IMPORTIGES">
|
||||
</action>
|
||||
<action label="Export_IGES"
|
||||
menu="FILE/EXPORT:10/EXPORTIGES"
|
||||
status-bar="EXPORTIGES">
|
||||
</action>
|
||||
</actions>
|
||||
</geom-plugin>
|
||||
|
||||
</geom-plugins>
|
@ -1,30 +0,0 @@
|
||||
Import: BREP|IGES|STEP|STL
|
||||
Export: BREP|IGES|IGES_5_3|STEP|STL_Bin|STL_ASCII|VTK
|
||||
|
||||
BREP.Import: BREPImport
|
||||
BREP.Export: BREPExport
|
||||
BREP.Pattern: BREP Files ( *.brep )
|
||||
|
||||
IGES.Import: IGESImport
|
||||
IGES.Export: IGESExport
|
||||
IGES.Pattern: IGES Files ( *.iges *.igs )
|
||||
IGES.ExportPattern: IGES 5.1 Files ( *.iges *.igs )
|
||||
|
||||
IGES_5_3.Export: IGESExport
|
||||
IGES_5_3.Pattern: IGES 5.3 Files ( *.iges *.igs )
|
||||
|
||||
STEP.Import: STEPImport
|
||||
STEP.Export: STEPExport
|
||||
STEP.Pattern: STEP Files ( *.step *.stp )
|
||||
|
||||
STL.Import: STLImport
|
||||
STL.Pattern: STL Files ( *.stl )
|
||||
|
||||
STL_Bin.Export: STLExport
|
||||
STL_Bin.Pattern: STL Binary Files ( *.stl )
|
||||
|
||||
STL_ASCII.Export: STLExport
|
||||
STL_ASCII.Pattern: STL ASCII Files ( *.stl )
|
||||
|
||||
VTK.Export: VTKExport
|
||||
VTK.Pattern: VTK Files ( *.vtk )
|
43
resources/STEPPlugin.xml
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version='1.0' encoding='us-ascii'?>
|
||||
<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
|
||||
<!--
|
||||
Copyright (C) 2014 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, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
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="STEPPlugin"
|
||||
server-lib="STEPPluginEngine"
|
||||
gui-lib="STEPPluginGUI">
|
||||
<actions>
|
||||
<action label="Import_STEP"
|
||||
menu="FILE/IMPORT:10/IMPORTSTEP"
|
||||
status-bar="IMPORTSTEP">
|
||||
</action>
|
||||
<action label="Export_STEP"
|
||||
menu="FILE/EXPORT:10/EXPORTSTEP"
|
||||
status-bar="EXPORTSTEP">
|
||||
</action>
|
||||
</actions>
|
||||
</geom-plugin>
|
||||
|
||||
</geom-plugins>
|
43
resources/STLPlugin.xml
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version='1.0' encoding='us-ascii'?>
|
||||
<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
|
||||
<!--
|
||||
Copyright (C) 2014 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, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
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="STLPlugin"
|
||||
server-lib="STLPluginEngine"
|
||||
gui-lib="STLPluginGUI">
|
||||
<actions>
|
||||
<action label="Import_STL"
|
||||
menu="FILE/IMPORT:10/IMPORTSTL"
|
||||
status-bar="IMPORTSTL">
|
||||
</action>
|
||||
<action label="Export_STL"
|
||||
menu="FILE/EXPORT:10/EXPORTSTL"
|
||||
status-bar="EXPORTSTL">
|
||||
</action>
|
||||
</actions>
|
||||
</geom-plugin>
|
||||
|
||||
</geom-plugins>
|
@ -37,8 +37,14 @@
|
||||
<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"/>
|
||||
<parameter name="DependencyTree" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
|
||||
<parameter name="AdvancedGEOM" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
|
||||
<parameter name="STLPlugin" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
|
||||
<parameter name="BREPPlugin" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
|
||||
<parameter name="STEPPlugin" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
|
||||
<parameter name="IGESPlugin" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
|
||||
<parameter name="XAOPlugin" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
|
||||
<parameter name="VTKPlugin" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
|
||||
</section>
|
||||
<section name="Geometry" >
|
||||
<!-- Other module preferences -->
|
||||
|
39
resources/VTKPlugin.xml
Normal file
@ -0,0 +1,39 @@
|
||||
<?xml version='1.0' encoding='us-ascii'?>
|
||||
<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
|
||||
<!--
|
||||
Copyright (C) 2014 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, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
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="VTKPlugin"
|
||||
server-lib="VTKPluginEngine"
|
||||
gui-lib="VTKPluginGUI">
|
||||
<actions>
|
||||
<action label="Export_VTK"
|
||||
menu="FILE/EXPORT:10/EXPORTVTK"
|
||||
status-bar="EXPORTVTK">
|
||||
</action>
|
||||
</actions>
|
||||
</geom-plugin>
|
||||
|
||||
</geom-plugins>
|
43
resources/XAOPlugin.xml
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version='1.0' encoding='us-ascii'?>
|
||||
<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
|
||||
<!--
|
||||
Copyright (C) 2014 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, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
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="XAOPlugin"
|
||||
server-lib="XAOPluginEngine"
|
||||
gui-lib="XAOPluginGUI">
|
||||
<actions>
|
||||
<action label="Import_XAO"
|
||||
menu="FILE/IMPORT:10/IMPORTXAO"
|
||||
status-bar="IMPORTXAO">
|
||||
</action>
|
||||
<action label="Export_XAO"
|
||||
menu="FILE/EXPORT:10/EXPORTXAO"
|
||||
status-bar="EXPORTXAO">
|
||||
</action>
|
||||
</actions>
|
||||
</geom-plugin>
|
||||
|
||||
</geom-plugins>
|
@ -20,25 +20,14 @@
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#include "GEOM_AdvancedEngine.hxx"
|
||||
|
||||
#include "AdvancedEngine_OperationsCreator.hh"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
#include "AdvancedEngine.hxx"
|
||||
#include "AdvancedEngine_OperationsCreator.hxx"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
ADVANCEDENGINE_EXPORT
|
||||
GEOM_GenericOperationsCreator* GetOperationsCreator()
|
||||
{
|
||||
//MESSAGE("GetOperationsCreator");
|
||||
|
||||
AdvancedEngine_OperationsCreator* aCreator = new AdvancedEngine_OperationsCreator();
|
||||
|
||||
return aCreator;
|
||||
return new AdvancedEngine_OperationsCreator();
|
||||
}
|
||||
}
|
||||
|
@ -22,12 +22,11 @@
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#include "AdvancedEngine_DividedDiskDriver.hxx"
|
||||
#include "AdvancedEngine_IDividedDisk.hxx"
|
||||
#include "AdvancedEngine_Types.hxx"
|
||||
|
||||
#include <GEOMImpl_DividedDiskDriver.hxx>
|
||||
#include <GEOMImpl_IDividedDisk.hxx>
|
||||
#include <GEOMImpl_Types.hxx>
|
||||
#include <GEOM_Function.hxx>
|
||||
#include "GEOM_Function.hxx"
|
||||
|
||||
// OCCT includes
|
||||
#include <gp_Pnt.hxx>
|
||||
@ -56,28 +55,28 @@
|
||||
#include <TopExp.hxx>
|
||||
|
||||
#include <utilities.h>
|
||||
//@@ include required header files here @@//
|
||||
|
||||
enum
|
||||
{
|
||||
SQUARE,
|
||||
HEXAGON
|
||||
};
|
||||
|
||||
//=======================================================================
|
||||
//function : GetID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& GEOMImpl_DividedDiskDriver::GetID()
|
||||
const Standard_GUID& AdvancedEngine_DividedDiskDriver::GetID()
|
||||
{
|
||||
static Standard_GUID aGUID("0b01da9a-c5da-11e1-8d80-78e7d1879630");
|
||||
return aGUID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_DividedDiskDriver
|
||||
//function : AdvancedEngine_DividedDiskDriver
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
GEOMImpl_DividedDiskDriver::GEOMImpl_DividedDiskDriver()
|
||||
AdvancedEngine_DividedDiskDriver::AdvancedEngine_DividedDiskDriver()
|
||||
{
|
||||
}
|
||||
|
||||
@ -85,12 +84,12 @@ GEOMImpl_DividedDiskDriver::GEOMImpl_DividedDiskDriver()
|
||||
//function : Execute
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Integer GEOMImpl_DividedDiskDriver::Execute(TFunction_Logbook& log) const
|
||||
Standard_Integer AdvancedEngine_DividedDiskDriver::Execute(TFunction_Logbook& log) const
|
||||
{
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
||||
|
||||
GEOMImpl_IDividedDisk aData (aFunction);
|
||||
AdvancedEngine_IDividedDisk aData (aFunction);
|
||||
Standard_Integer aType = aFunction->GetType();
|
||||
|
||||
TopoDS_Shape aShape;
|
||||
@ -150,7 +149,7 @@ Standard_Integer GEOMImpl_DividedDiskDriver::Execute(TFunction_Logbook& log) con
|
||||
//function : MakeDiskHexagon
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
TopoDS_Shell GEOMImpl_DividedDiskDriver::MakeDiskHexagon(double R, double Ratio) const
|
||||
TopoDS_Shell AdvancedEngine_DividedDiskDriver::MakeDiskHexagon(double R, double Ratio) const
|
||||
{
|
||||
// Geometry
|
||||
gp_Dir ZDir(0,0,1);
|
||||
@ -312,7 +311,7 @@ TopoDS_Shell GEOMImpl_DividedDiskDriver::MakeDiskHexagon(double R, double Ratio)
|
||||
//function : MakeDiskSquare
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
TopoDS_Shape GEOMImpl_DividedDiskDriver::MakeDiskSquare(double R, double Ratio) const
|
||||
TopoDS_Shape AdvancedEngine_DividedDiskDriver::MakeDiskSquare(double R, double Ratio) const
|
||||
{
|
||||
// Geometry
|
||||
gp_Dir ZDir(0,0,1);
|
||||
@ -430,7 +429,7 @@ TopoDS_Shape GEOMImpl_DividedDiskDriver::MakeDiskSquare(double R, double Ratio)
|
||||
//purpose : Perform shape transformation accordingly with specified
|
||||
// orientation
|
||||
//=======================================================================
|
||||
TopoDS_Shape GEOMImpl_DividedDiskDriver::TransformShape(TopoDS_Shape theShape, int theOrientation) const
|
||||
TopoDS_Shape AdvancedEngine_DividedDiskDriver::TransformShape(TopoDS_Shape theShape, int theOrientation) const
|
||||
{
|
||||
gp_Dir N, Vx;
|
||||
gp_Pnt theOrigin = gp::Origin();
|
||||
@ -467,7 +466,7 @@ TopoDS_Shape GEOMImpl_DividedDiskDriver::TransformShape(TopoDS_Shape theShape, i
|
||||
//purpose : Perform shape transformation accordingly with specified
|
||||
// pnt and direction
|
||||
//=======================================================================
|
||||
TopoDS_Shape GEOMImpl_DividedDiskDriver::TransformShape(TopoDS_Shape theShape, gp_Pnt P, gp_Dir V) const
|
||||
TopoDS_Shape AdvancedEngine_DividedDiskDriver::TransformShape(TopoDS_Shape theShape, gp_Pnt P, gp_Dir V) const
|
||||
{
|
||||
gp_Ax3 aWPlane( P, V );
|
||||
return WPlaneTransform(theShape, aWPlane);
|
||||
@ -478,7 +477,7 @@ TopoDS_Shape GEOMImpl_DividedDiskDriver::TransformShape(TopoDS_Shape theShape, g
|
||||
//purpose : Perform shape transformation accordingly with the given
|
||||
// Working Plane
|
||||
//=======================================================================
|
||||
TopoDS_Shape GEOMImpl_DividedDiskDriver::WPlaneTransform(TopoDS_Shape theShape, gp_Ax3 theWPlane) const
|
||||
TopoDS_Shape AdvancedEngine_DividedDiskDriver::WPlaneTransform(TopoDS_Shape theShape, gp_Ax3 theWPlane) const
|
||||
{
|
||||
gp_Trsf aTrans;
|
||||
aTrans.SetTransformation(theWPlane);
|
||||
@ -493,14 +492,14 @@ TopoDS_Shape GEOMImpl_DividedDiskDriver::WPlaneTransform(TopoDS_Shape theShape,
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
bool GEOMImpl_DividedDiskDriver::
|
||||
bool AdvancedEngine_DividedDiskDriver::
|
||||
GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
|
||||
|
||||
GEOMImpl_IDividedDisk aCI( function );
|
||||
AdvancedEngine_IDividedDisk aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "DIVIDEDDISK";
|
||||
@ -525,5 +524,5 @@ GetCreationInformation(std::string& theOperationName,
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_DividedDiskDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_DividedDiskDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_HANDLE (AdvancedEngine_DividedDiskDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_DividedDiskDriver,GEOM_BaseDriver);
|
@ -20,39 +20,39 @@
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#ifndef _GEOMImpl_DividedDiskDriver_HXX
|
||||
#define _GEOMImpl_DividedDiskDriver_HXX
|
||||
#ifndef _AdvancedEngine_DividedDiskDriver_HXX
|
||||
#define _AdvancedEngine_DividedDiskDriver_HXX
|
||||
|
||||
#include "AdvancedEngine.hxx"
|
||||
|
||||
#include "GEOM_BaseDriver.hxx"
|
||||
|
||||
#include <TFunction_Driver.hxx>
|
||||
|
||||
class Handle_Standard_Type;
|
||||
class GEOMImpl_DividedDiskDriver;
|
||||
class TopoDS_Shape;
|
||||
class TopoDS_Shell;
|
||||
class gp_Pnt;
|
||||
class gp_Dir;
|
||||
class gp_Ax3;
|
||||
|
||||
#include "GEOM_BaseDriver.hxx"
|
||||
DEFINE_STANDARD_HANDLE( AdvancedEngine_DividedDiskDriver, GEOM_BaseDriver );
|
||||
|
||||
DEFINE_STANDARD_HANDLE( GEOMImpl_DividedDiskDriver, GEOM_BaseDriver );
|
||||
|
||||
class GEOMImpl_DividedDiskDriver : public GEOM_BaseDriver {
|
||||
class ADVANCEDENGINE_EXPORT AdvancedEngine_DividedDiskDriver : public GEOM_BaseDriver
|
||||
{
|
||||
public:
|
||||
// Methods PUBLIC
|
||||
//
|
||||
Standard_EXPORT GEOMImpl_DividedDiskDriver();
|
||||
Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const;
|
||||
Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {}
|
||||
Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const
|
||||
AdvancedEngine_DividedDiskDriver();
|
||||
virtual Standard_Integer Execute(TFunction_Logbook& log) const;
|
||||
virtual void Validate(TFunction_Logbook&) const {}
|
||||
Standard_Boolean MustExecute(const TFunction_Logbook&) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
Standard_EXPORT static const Standard_GUID& GetID();
|
||||
Standard_EXPORT ~GEOMImpl_DividedDiskDriver() {};
|
||||
static const Standard_GUID& GetID();
|
||||
~AdvancedEngine_DividedDiskDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
virtual bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
private:
|
||||
TopoDS_Shape TransformShape (TopoDS_Shape aShape, int theOrientation) const;
|
||||
@ -61,7 +61,7 @@ private:
|
||||
TopoDS_Shell MakeDiskHexagon (double R, double Ratio) const;
|
||||
TopoDS_Shape MakeDiskSquare (double R, double Ratio) const;
|
||||
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_DividedDiskDriver )
|
||||
DEFINE_STANDARD_RTTI( AdvancedEngine_DividedDiskDriver )
|
||||
};
|
||||
|
||||
#endif // _GEOMImpl_DividedDiskDriver_HXX
|
||||
#endif // _AdvancedEngine_DividedDiskDriver_HXX
|
@ -20,8 +20,8 @@
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#ifndef _GEOMImpl_IDividedDisk_HXX_
|
||||
#define _GEOMImpl_IDividedDisk_HXX_
|
||||
#ifndef _AdvancedEngine_IDividedDisk_HXX_
|
||||
#define _AdvancedEngine_IDividedDisk_HXX_
|
||||
|
||||
#include "GEOM_Function.hxx"
|
||||
|
||||
@ -34,10 +34,10 @@
|
||||
|
||||
#define DIVIDEDDISK_ARG_TYPE 6
|
||||
|
||||
class GEOMImpl_IDividedDisk
|
||||
class AdvancedEngine_IDividedDisk
|
||||
{
|
||||
public:
|
||||
GEOMImpl_IDividedDisk(Handle(GEOM_Function) theFunction): _func(theFunction) {}
|
||||
AdvancedEngine_IDividedDisk(Handle(GEOM_Function) theFunction): _func(theFunction) {}
|
||||
|
||||
void SetR(double theR) { _func->SetReal(DIVIDEDDISK_ARG_R, theR); }
|
||||
double GetR() { return _func->GetReal(DIVIDEDDISK_ARG_R); }
|
||||
@ -61,4 +61,4 @@ private:
|
||||
Handle(GEOM_Function) _func;
|
||||
};
|
||||
|
||||
#endif // _GEOMImpl_IDividedDisk_HXX_
|
||||
#endif // _AdvancedEngine_IDividedDisk_HXX_
|
@ -16,10 +16,16 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File : GEOMImpl_IAdvancedOperations.cxx
|
||||
// File : AdvancedEngine_IOperations.cxx
|
||||
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
|
||||
|
||||
#include "GEOMImpl_IAdvancedOperations.hxx"
|
||||
#include "AdvancedEngine_IOperations.hxx"
|
||||
#include "AdvancedEngine_PipeTShapeDriver.hxx"
|
||||
#include "AdvancedEngine_IPipeTShape.hxx"
|
||||
#include "AdvancedEngine_DividedDiskDriver.hxx"
|
||||
#include "AdvancedEngine_IDividedDisk.hxx"
|
||||
#include "AdvancedEngine_SmoothingSurfaceDriver.hxx"
|
||||
#include "AdvancedEngine_ISmoothingSurface.hxx"
|
||||
|
||||
#include <Basics_OCCTVersion.hxx>
|
||||
|
||||
@ -45,15 +51,7 @@
|
||||
#include "GEOMImpl_ILocalOperations.hxx"
|
||||
#include "GEOMImpl_IHealingOperations.hxx"
|
||||
#include "GEOMImpl_IGroupOperations.hxx"
|
||||
|
||||
#include "GEOMImpl_GlueDriver.hxx"
|
||||
#include "GEOMImpl_PipeTShapeDriver.hxx"
|
||||
#include "GEOMImpl_IPipeTShape.hxx"
|
||||
#include "GEOMImpl_DividedDiskDriver.hxx"
|
||||
#include "GEOMImpl_IDividedDisk.hxx"
|
||||
#include <GEOMImpl_SmoothingSurfaceDriver.hxx>
|
||||
#include <GEOMImpl_ISmoothingSurface.hxx>
|
||||
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
|
||||
|
||||
#include <TDF_Tool.hxx>
|
||||
#include <TFunction_DriverTable.hxx>
|
||||
@ -116,10 +114,10 @@
|
||||
* Constructor
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOMImpl_IAdvancedOperations::GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngine, int theDocID) :
|
||||
AdvancedEngine_IOperations::AdvancedEngine_IOperations(GEOM_Engine* theEngine, int theDocID) :
|
||||
GEOM_IOperations(theEngine, theDocID)
|
||||
{
|
||||
MESSAGE("GEOMImpl_IAdvancedOperations::GEOMImpl_IAdvancedOperations");
|
||||
MESSAGE("AdvancedEngine_IOperations::AdvancedEngine_IOperations");
|
||||
myBasicOperations = new GEOMImpl_IBasicOperations(GetEngine(), GetDocID());
|
||||
myBooleanOperations = new GEOMImpl_IBooleanOperations(GetEngine(), GetDocID());
|
||||
myShapesOperations = new GEOMImpl_IShapesOperations(GetEngine(), GetDocID());
|
||||
@ -136,9 +134,9 @@ GEOMImpl_IAdvancedOperations::GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngin
|
||||
* Destructor
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOMImpl_IAdvancedOperations::~GEOMImpl_IAdvancedOperations()
|
||||
AdvancedEngine_IOperations::~AdvancedEngine_IOperations()
|
||||
{
|
||||
MESSAGE("GEOMImpl_IAdvancedOperations::~GEOMImpl_IAdvancedOperations");
|
||||
MESSAGE("AdvancedEngine_IOperations::~AdvancedEngine_IOperations");
|
||||
delete myBasicOperations;
|
||||
delete myBooleanOperations;
|
||||
delete myShapesOperations;
|
||||
@ -155,7 +153,7 @@ GEOMImpl_IAdvancedOperations::~GEOMImpl_IAdvancedOperations()
|
||||
* SetPosition
|
||||
*/
|
||||
//=============================================================================
|
||||
gp_Trsf GEOMImpl_IAdvancedOperations::GetPositionTrsf(double theL1, double theL2,
|
||||
gp_Trsf AdvancedEngine_IOperations::GetPositionTrsf(double theL1, double theL2,
|
||||
Handle(GEOM_Object) theP1,
|
||||
Handle(GEOM_Object) theP2,
|
||||
Handle(GEOM_Object) theP3)
|
||||
@ -196,7 +194,7 @@ gp_Trsf GEOMImpl_IAdvancedOperations::GetPositionTrsf(double theL1, double theL2
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
bool GEOMImpl_IAdvancedOperations::CheckCompatiblePosition(double& theL1, double& theL2,
|
||||
bool AdvancedEngine_IOperations::CheckCompatiblePosition(double& theL1, double& theL2,
|
||||
Handle(GEOM_Object) theP1,
|
||||
Handle(GEOM_Object) theP2,
|
||||
Handle(GEOM_Object) theP3,
|
||||
@ -267,7 +265,7 @@ bool GEOMImpl_IAdvancedOperations::CheckCompatiblePosition(double& theL1, double
|
||||
* Generate the propagation groups of a Pipe T-Shape used for hexa mesh
|
||||
*/
|
||||
//=============================================================================
|
||||
bool GEOMImpl_IAdvancedOperations::MakeGroups(Handle(GEOM_Object) theShape, int shapeType,
|
||||
bool AdvancedEngine_IOperations::MakeGroups(Handle(GEOM_Object) theShape, int shapeType,
|
||||
double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
double theH, double theW, double theRF,
|
||||
@ -807,7 +805,7 @@ bool GEOMImpl_IAdvancedOperations::MakeGroups(Handle(GEOM_Object) theShape, int
|
||||
* Return faces that are laying on surface.
|
||||
*/
|
||||
//=============================================================================
|
||||
bool GEOMImpl_IAdvancedOperations::GetFacesOnSurf
|
||||
bool AdvancedEngine_IOperations::GetFacesOnSurf
|
||||
(const TopoDS_Shape &theShape,
|
||||
const Handle_Geom_Surface& theSurface,
|
||||
const Standard_Real theTolerance,
|
||||
@ -863,7 +861,7 @@ bool GEOMImpl_IAdvancedOperations::GetFacesOnSurf
|
||||
* Creates and returns conical face.
|
||||
*/
|
||||
//=============================================================================
|
||||
TopoDS_Shape GEOMImpl_IAdvancedOperations::MakeConicalFace
|
||||
TopoDS_Shape AdvancedEngine_IOperations::MakeConicalFace
|
||||
(const gp_Ax2 &theAxis,
|
||||
const double theRadius,
|
||||
const double theRadiusThin,
|
||||
@ -902,7 +900,7 @@ TopoDS_Shape GEOMImpl_IAdvancedOperations::MakeConicalFace
|
||||
* Generate the internal group of a Pipe T-Shape
|
||||
*/
|
||||
//=============================================================================
|
||||
bool GEOMImpl_IAdvancedOperations::MakeInternalGroup
|
||||
bool AdvancedEngine_IOperations::MakeInternalGroup
|
||||
(const Handle(GEOM_Object) &theShape,
|
||||
const double theR1, const double theLen1,
|
||||
const double theR2, const double theLen2,
|
||||
@ -1074,7 +1072,7 @@ bool GEOMImpl_IAdvancedOperations::MakeInternalGroup
|
||||
Handle(GEOM_Object) aCone =
|
||||
GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
|
||||
Handle(GEOM_Function) aFunction =
|
||||
aCone->AddFunction(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
|
||||
aCone->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
|
||||
TopTools_ListIteratorOfListOfShape aFIter(aConicalFaces);
|
||||
Handle(GEOM_Object) aConeFromShape;
|
||||
|
||||
@ -1133,7 +1131,7 @@ bool GEOMImpl_IAdvancedOperations::MakeInternalGroup
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(Handle(GEOM_Object) theShape,
|
||||
bool AdvancedEngine_IOperations::MakePipeTShapePartition(Handle(GEOM_Object) theShape,
|
||||
double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
double theH, double theW,
|
||||
@ -1617,7 +1615,7 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(Handle(GEOM_Object) t
|
||||
}
|
||||
|
||||
// Mirror and glue faces
|
||||
bool GEOMImpl_IAdvancedOperations::MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape,
|
||||
bool AdvancedEngine_IOperations::MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape,
|
||||
double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2)
|
||||
{
|
||||
@ -1726,7 +1724,7 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapeMirrorAndGlue(Handle(GEOM_Objec
|
||||
//purpose : Static method. Add thiskness reduction elements at the three
|
||||
// open ends of the T-Shape.
|
||||
//=======================================================================
|
||||
TopoDS_Shape GEOMImpl_IAdvancedOperations::MakePipeTShapeThicknessReduction
|
||||
TopoDS_Shape AdvancedEngine_IOperations::MakePipeTShapeThicknessReduction
|
||||
(TopoDS_Shape theShape,
|
||||
double r1, double w1, double l1,
|
||||
double r2, double w2, double l2,
|
||||
@ -1757,7 +1755,7 @@ TopoDS_Shape GEOMImpl_IAdvancedOperations::MakePipeTShapeThicknessReduction
|
||||
if (rL > aTol && wL > aTol && ltransL > aTol) {
|
||||
gp_Pnt aPLeft (-l1, 0, 0);
|
||||
gp_Ax2 anAxesLeft (aPLeft, -aVX, aVZ);
|
||||
TopoDS_Shape aReductionLeft = GEOMImpl_IAdvancedOperations::MakeThicknessReduction
|
||||
TopoDS_Shape aReductionLeft = AdvancedEngine_IOperations::MakeThicknessReduction
|
||||
(anAxesLeft, r1, w1, rL, wL, ltransL, lthinL, fuseReductions);
|
||||
|
||||
if (fuseReductions) {
|
||||
@ -1780,7 +1778,7 @@ TopoDS_Shape GEOMImpl_IAdvancedOperations::MakePipeTShapeThicknessReduction
|
||||
if (rR > aTol && wR > aTol && ltransR > aTol) {
|
||||
gp_Pnt aPRight (l1, 0, 0);
|
||||
gp_Ax2 anAxesRight (aPRight, aVX, aVZ);
|
||||
TopoDS_Shape aReductionRight = GEOMImpl_IAdvancedOperations::MakeThicknessReduction
|
||||
TopoDS_Shape aReductionRight = AdvancedEngine_IOperations::MakeThicknessReduction
|
||||
(anAxesRight, r1, w1, rR, wR, ltransR, lthinR, fuseReductions);
|
||||
|
||||
if (fuseReductions) {
|
||||
@ -1803,7 +1801,7 @@ TopoDS_Shape GEOMImpl_IAdvancedOperations::MakePipeTShapeThicknessReduction
|
||||
if (rI > aTol && wI > aTol && ltransI > aTol) {
|
||||
gp_Pnt aPInci (0, 0, l2);
|
||||
gp_Ax2 anAxesInci (aPInci, aVZ, aVX);
|
||||
TopoDS_Shape aReductionInci = GEOMImpl_IAdvancedOperations::MakeThicknessReduction
|
||||
TopoDS_Shape aReductionInci = AdvancedEngine_IOperations::MakeThicknessReduction
|
||||
(anAxesInci, r2, w2, rI, wI, ltransI, lthinI, fuseReductions);
|
||||
|
||||
if (fuseReductions) {
|
||||
@ -1848,7 +1846,7 @@ TopoDS_Shape GEOMImpl_IAdvancedOperations::MakePipeTShapeThicknessReduction
|
||||
//function : MakeThicknessReduction
|
||||
//purpose : Static method. Create one thickness reduction element.
|
||||
//=======================================================================
|
||||
TopoDS_Shape GEOMImpl_IAdvancedOperations::MakeThicknessReduction (gp_Ax2 theAxes,
|
||||
TopoDS_Shape AdvancedEngine_IOperations::MakeThicknessReduction (gp_Ax2 theAxes,
|
||||
const double R, const double W,
|
||||
const double Rthin, const double Wthin,
|
||||
const double Ltrans, const double Lthin,
|
||||
@ -1956,26 +1954,26 @@ TopoDS_Shape GEOMImpl_IAdvancedOperations::MakeThicknessReduction (gp_Ax2 theAxe
|
||||
*/
|
||||
//=============================================================================
|
||||
Handle(TColStd_HSequenceOfTransient)
|
||||
GEOMImpl_IAdvancedOperations::MakePipeTShape(double theR1, double theW1, double theL1,
|
||||
AdvancedEngine_IOperations::MakePipeTShape(double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||
double theRR, double theWR, double theLtransR, double theLthinR,
|
||||
double theRI, double theWI, double theLtransI, double theLthinI,
|
||||
bool theHexMesh)
|
||||
{
|
||||
MESSAGE("GEOMImpl_IAdvancedOperations::MakePipeTShape");
|
||||
MESSAGE("AdvancedEngine_IOperations::MakePipeTShape");
|
||||
SetErrorCode(KO);
|
||||
//Add a new object
|
||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
|
||||
|
||||
//Add a new shape function with parameters
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
|
||||
if (aFunction.IsNull()) return NULL;
|
||||
|
||||
//Check if the function is set correctly
|
||||
if (aFunction->GetDriverGUID() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL;
|
||||
if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL;
|
||||
|
||||
GEOMImpl_IPipeTShape aData (aFunction);
|
||||
AdvancedEngine_IPipeTShape aData (aFunction);
|
||||
|
||||
aData.SetR1(theR1);
|
||||
aData.SetW1(theW1);
|
||||
@ -2110,7 +2108,7 @@ Handle(TColStd_HSequenceOfTransient)
|
||||
*/
|
||||
//=============================================================================
|
||||
Handle(TColStd_HSequenceOfTransient)
|
||||
GEOMImpl_IAdvancedOperations::MakePipeTShapeWithPosition
|
||||
AdvancedEngine_IOperations::MakePipeTShapeWithPosition
|
||||
(double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||
@ -2128,18 +2126,18 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeWithPosition
|
||||
// TSHAPE CODE
|
||||
/////////////////
|
||||
//Add a new shape function with parameters
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
|
||||
if (aFunction.IsNull()) return NULL;
|
||||
|
||||
//Check if the function is set correctly
|
||||
if (aFunction->GetDriverGUID() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL;
|
||||
if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL;
|
||||
|
||||
// Check new position
|
||||
if (!CheckCompatiblePosition(theL1, theL2, theP1, theP2, theP3, 0.01)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GEOMImpl_IPipeTShape aData(aFunction);
|
||||
AdvancedEngine_IPipeTShape aData(aFunction);
|
||||
|
||||
aData.SetR1(theR1);
|
||||
aData.SetW1(theW1);
|
||||
@ -2282,7 +2280,7 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeWithPosition
|
||||
*/
|
||||
//=============================================================================
|
||||
Handle(TColStd_HSequenceOfTransient)
|
||||
GEOMImpl_IAdvancedOperations::MakePipeTShapeChamfer
|
||||
AdvancedEngine_IOperations::MakePipeTShapeChamfer
|
||||
(double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||
@ -2295,13 +2293,13 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeChamfer
|
||||
//Add a new object
|
||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
|
||||
//Add a new shape function with parameters
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
|
||||
if (aFunction.IsNull()) return NULL;
|
||||
|
||||
//Check if the function is set correctly
|
||||
if (aFunction->GetDriverGUID() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL;
|
||||
if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL;
|
||||
|
||||
GEOMImpl_IPipeTShape aData(aFunction);
|
||||
AdvancedEngine_IPipeTShape aData(aFunction);
|
||||
|
||||
aData.SetR1(theR1);
|
||||
aData.SetW1(theW1);
|
||||
@ -2513,7 +2511,7 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeChamfer
|
||||
*/
|
||||
//=============================================================================
|
||||
Handle(TColStd_HSequenceOfTransient)
|
||||
GEOMImpl_IAdvancedOperations::MakePipeTShapeChamferWithPosition
|
||||
AdvancedEngine_IOperations::MakePipeTShapeChamferWithPosition
|
||||
(double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||
@ -2529,18 +2527,18 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeChamferWithPosition
|
||||
//Add a new object
|
||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
|
||||
//Add a new shape function with parameters
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
|
||||
if (aFunction.IsNull()) return NULL;
|
||||
|
||||
//Check if the function is set correctly
|
||||
if (aFunction->GetDriverGUID() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL;
|
||||
if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL;
|
||||
|
||||
// Check new position
|
||||
if (!CheckCompatiblePosition(theL1, theL2, theP1, theP2, theP3, 0.01)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GEOMImpl_IPipeTShape aData(aFunction);
|
||||
AdvancedEngine_IPipeTShape aData(aFunction);
|
||||
|
||||
aData.SetR1(theR1);
|
||||
aData.SetW1(theW1);
|
||||
@ -2752,7 +2750,7 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeChamferWithPosition
|
||||
*/
|
||||
//=============================================================================
|
||||
Handle(TColStd_HSequenceOfTransient)
|
||||
GEOMImpl_IAdvancedOperations::MakePipeTShapeFillet
|
||||
AdvancedEngine_IOperations::MakePipeTShapeFillet
|
||||
(double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||
@ -2764,13 +2762,13 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeFillet
|
||||
//Add a new object
|
||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
|
||||
//Add a new shape function with parameters
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
|
||||
if (aFunction.IsNull()) return NULL;
|
||||
|
||||
//Check if the function is set correctly
|
||||
if (aFunction->GetDriverGUID() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL;
|
||||
if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL;
|
||||
|
||||
GEOMImpl_IPipeTShape aData(aFunction);
|
||||
AdvancedEngine_IPipeTShape aData(aFunction);
|
||||
|
||||
aData.SetR1(theR1);
|
||||
aData.SetW1(theW1);
|
||||
@ -2994,7 +2992,7 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeFillet
|
||||
*/
|
||||
//=============================================================================
|
||||
Handle(TColStd_HSequenceOfTransient)
|
||||
GEOMImpl_IAdvancedOperations::MakePipeTShapeFilletWithPosition
|
||||
AdvancedEngine_IOperations::MakePipeTShapeFilletWithPosition
|
||||
(double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||
@ -3009,18 +3007,18 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeFilletWithPosition
|
||||
//Add a new object
|
||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
|
||||
//Add a new shape function with parameters
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
|
||||
if (aFunction.IsNull()) return NULL;
|
||||
|
||||
//Check if the function is set correctly
|
||||
if (aFunction->GetDriverGUID() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL;
|
||||
if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL;
|
||||
|
||||
// Check new position
|
||||
if (!CheckCompatiblePosition(theL1, theL2, theP1, theP2, theP3, 0.01)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GEOMImpl_IPipeTShape aData(aFunction);
|
||||
AdvancedEngine_IPipeTShape aData(aFunction);
|
||||
|
||||
aData.SetR1(theR1);
|
||||
aData.SetW1(theW1);
|
||||
@ -3238,7 +3236,7 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeFilletWithPosition
|
||||
* \return New GEOM_Object, containing the created shape.
|
||||
*/
|
||||
//=============================================================================
|
||||
Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDisk (double theR, double theRatio,
|
||||
Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDisk (double theR, double theRatio,
|
||||
int theOrientation, int thePattern)
|
||||
{
|
||||
SetErrorCode(KO);
|
||||
@ -3254,13 +3252,13 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDisk (double theR,
|
||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);
|
||||
|
||||
//Add a new shape function with parameters
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_DividedDiskDriver::GetID(), DIVIDEDDISK_R_RATIO);
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_DividedDiskDriver::GetID(), DIVIDEDDISK_R_RATIO);
|
||||
if (aFunction.IsNull()) return NULL;
|
||||
|
||||
//Check if the function is set correctly
|
||||
if (aFunction->GetDriverGUID() != GEOMImpl_DividedDiskDriver::GetID()) return NULL;
|
||||
if (aFunction->GetDriverGUID() != AdvancedEngine_DividedDiskDriver::GetID()) return NULL;
|
||||
|
||||
GEOMImpl_IDividedDisk aData (aFunction);
|
||||
AdvancedEngine_IDividedDisk aData (aFunction);
|
||||
|
||||
aData.SetR(theR);
|
||||
aData.SetRatio(theRatio);
|
||||
@ -3312,7 +3310,7 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDisk (double theR,
|
||||
* \return New GEOM_Object, containing the created shape.
|
||||
*/
|
||||
//=============================================================================
|
||||
Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDiskPntVecR (Handle(GEOM_Object) thePnt,
|
||||
Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDiskPntVecR (Handle(GEOM_Object) thePnt,
|
||||
Handle(GEOM_Object) theVec,
|
||||
double theR,
|
||||
double theRatio,
|
||||
@ -3324,13 +3322,13 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDiskPntVecR (Handle
|
||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);
|
||||
|
||||
//Add a new shape function with parameters
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_DividedDiskDriver::GetID(), DIVIDEDDISK_R_VECTOR_PNT);
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_DividedDiskDriver::GetID(), DIVIDEDDISK_R_VECTOR_PNT);
|
||||
if (aFunction.IsNull()) return NULL;
|
||||
|
||||
//Check if the function is set correctly
|
||||
if (aFunction->GetDriverGUID() != GEOMImpl_DividedDiskDriver::GetID()) return NULL;
|
||||
if (aFunction->GetDriverGUID() != AdvancedEngine_DividedDiskDriver::GetID()) return NULL;
|
||||
|
||||
GEOMImpl_IDividedDisk aData (aFunction);
|
||||
AdvancedEngine_IDividedDisk aData (aFunction);
|
||||
|
||||
Handle(GEOM_Function) aRefPnt = thePnt->GetLastFunction();
|
||||
Handle(GEOM_Function) aRefVec = theVec->GetLastFunction();
|
||||
@ -3389,7 +3387,7 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDiskPntVecR (Handle
|
||||
* \return New GEOM_Object, containing the created shape.
|
||||
*/
|
||||
//=============================================================================
|
||||
Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedCylinder (double theR,
|
||||
Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedCylinder (double theR,
|
||||
double theH,
|
||||
int thePattern)
|
||||
{
|
||||
@ -3436,7 +3434,7 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedCylinder (double th
|
||||
* \return New GEOM_Object, containing the created shape.
|
||||
*/
|
||||
//=============================================================================
|
||||
Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeSmoothingSurface (std::list<Handle(GEOM_Object)> thelPoints,
|
||||
Handle(GEOM_Object) AdvancedEngine_IOperations::MakeSmoothingSurface (std::list<Handle(GEOM_Object)> thelPoints,
|
||||
int theNbMax,
|
||||
int theDegMax,
|
||||
double theDMax)
|
||||
@ -3447,13 +3445,13 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeSmoothingSurface (std::lis
|
||||
Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_SMOOTHINGSURFACE);
|
||||
|
||||
//Add a new shape function with parameters
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_SmoothingSurfaceDriver::GetID(), SMOOTHINGSURFACE_LPOINTS);
|
||||
Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_SmoothingSurfaceDriver::GetID(), SMOOTHINGSURFACE_LPOINTS);
|
||||
if (aFunction.IsNull()) return NULL;
|
||||
|
||||
//Check if the function is set correctly
|
||||
if (aFunction->GetDriverGUID() != GEOMImpl_SmoothingSurfaceDriver::GetID()) return NULL;
|
||||
if (aFunction->GetDriverGUID() != AdvancedEngine_SmoothingSurfaceDriver::GetID()) return NULL;
|
||||
|
||||
GEOMImpl_ISmoothingSurface aData (aFunction);
|
||||
AdvancedEngine_ISmoothingSurface aData (aFunction);
|
||||
|
||||
int aLen = thelPoints.size();
|
||||
aData.SetLength(aLen);
|
||||
@ -3505,4 +3503,3 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeSmoothingSurface (std::lis
|
||||
|
||||
return aShape;
|
||||
}
|
||||
/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
|
@ -16,13 +16,14 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File : GEOMImpl_IAdvancedOperations.hxx
|
||||
// File : AdvancedEngine_IOperations.hxx
|
||||
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
|
||||
|
||||
#ifndef _GEOMImpl_IAdvancedOperations_HXX_
|
||||
#define _GEOMImpl_IAdvancedOperations_HXX_
|
||||
#ifndef _AdvancedEngine_IOperations_HXX_
|
||||
#define _AdvancedEngine_IOperations_HXX_
|
||||
|
||||
#include "AdvancedEngine.hxx"
|
||||
|
||||
#include <Utils_SALOME_Exception.hxx>
|
||||
#include "GEOM_IOperations.hxx"
|
||||
#include "GEOM_Engine.hxx"
|
||||
#include "GEOM_Object.hxx"
|
||||
@ -42,7 +43,8 @@ class GEOMImpl_IGroupOperations;
|
||||
class Handle_Geom_Surface;
|
||||
class TopTools_ListOfShape;
|
||||
|
||||
class GEOMImpl_IAdvancedOperations: public GEOM_IOperations {
|
||||
class ADVANCEDENGINE_EXPORT AdvancedEngine_IOperations: public GEOM_IOperations
|
||||
{
|
||||
private:
|
||||
bool MakePipeTShapePartition(Handle(GEOM_Object) theShape,
|
||||
double theR1, double theW1, double theL1,
|
||||
@ -129,7 +131,7 @@ public:
|
||||
* false to obtain parts, useful for hexameshing)
|
||||
* \retval TopoDS_Shape - Resulting shape
|
||||
*/
|
||||
Standard_EXPORT static TopoDS_Shape MakePipeTShapeThicknessReduction
|
||||
static TopoDS_Shape MakePipeTShapeThicknessReduction
|
||||
(TopoDS_Shape theShape,
|
||||
double r1, double w1, double l1,
|
||||
double r2, double w2, double l2,
|
||||
@ -155,17 +157,17 @@ public:
|
||||
* false to obtain parts, useful for hexameshing)
|
||||
* \retval TopoDS_Shape - Resulting shape
|
||||
*/
|
||||
Standard_EXPORT static TopoDS_Shape MakeThicknessReduction (gp_Ax2 theAxes,
|
||||
static TopoDS_Shape MakeThicknessReduction (gp_Ax2 theAxes,
|
||||
const double R, const double W,
|
||||
const double Rthin, const double Wthin,
|
||||
const double Ltrans, const double Lthin,
|
||||
bool fuse);
|
||||
|
||||
public:
|
||||
Standard_EXPORT GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngine, int theDocID);
|
||||
Standard_EXPORT ~GEOMImpl_IAdvancedOperations();
|
||||
AdvancedEngine_IOperations(GEOM_Engine* theEngine, int theDocID);
|
||||
~AdvancedEngine_IOperations();
|
||||
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||
Handle(TColStd_HSequenceOfTransient)
|
||||
MakePipeTShape(double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||
@ -173,7 +175,7 @@ public:
|
||||
double theRI, double theWI, double theLtransI, double theLthinI,
|
||||
bool theHexMesh = true);
|
||||
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||
Handle(TColStd_HSequenceOfTransient)
|
||||
MakePipeTShapeWithPosition(double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||
@ -184,7 +186,7 @@ public:
|
||||
Handle(GEOM_Object) P2 = 0,
|
||||
Handle(GEOM_Object) P3 = 0);
|
||||
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||
Handle(TColStd_HSequenceOfTransient)
|
||||
MakePipeTShapeChamfer(double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||
@ -193,7 +195,7 @@ public:
|
||||
double theH, double theW,
|
||||
bool theHexMesh = true);
|
||||
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||
Handle(TColStd_HSequenceOfTransient)
|
||||
MakePipeTShapeChamferWithPosition(double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
double theH, double theW,
|
||||
@ -205,7 +207,7 @@ public:
|
||||
Handle(GEOM_Object) P2 = 0,
|
||||
Handle(GEOM_Object) P3 = 0);
|
||||
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||
Handle(TColStd_HSequenceOfTransient)
|
||||
MakePipeTShapeFillet(double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||
@ -213,7 +215,7 @@ public:
|
||||
double theRI, double theWI, double theLtransI, double theLthinI,
|
||||
double theRF, bool theHexMesh = true);
|
||||
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||
Handle(TColStd_HSequenceOfTransient)
|
||||
MakePipeTShapeFilletWithPosition(double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||
@ -224,22 +226,22 @@ public:
|
||||
Handle(GEOM_Object) P2 = 0,
|
||||
Handle(GEOM_Object) P3 = 0);
|
||||
|
||||
Standard_EXPORT Handle(GEOM_Object) MakeDividedDisk (double theR, double theRatio,
|
||||
Handle(GEOM_Object) MakeDividedDisk (double theR, double theRatio,
|
||||
int theOrientation, int thePattern);
|
||||
Standard_EXPORT Handle(GEOM_Object) MakeDividedDiskPntVecR (Handle(GEOM_Object) thePnt,
|
||||
Handle(GEOM_Object) MakeDividedDiskPntVecR (Handle(GEOM_Object) thePnt,
|
||||
Handle(GEOM_Object) theVec,
|
||||
double theR,
|
||||
double theRatio,
|
||||
int thePattern);
|
||||
|
||||
Standard_EXPORT Handle(GEOM_Object) MakeDividedCylinder (double theR,
|
||||
Handle(GEOM_Object) MakeDividedCylinder (double theR,
|
||||
double theH,
|
||||
int thePattern);
|
||||
|
||||
Standard_EXPORT Handle(GEOM_Object) MakeSmoothingSurface (std::list<Handle(GEOM_Object)> thelPoints,
|
||||
Handle(GEOM_Object) MakeSmoothingSurface (std::list<Handle(GEOM_Object)> thelPoints,
|
||||
int theNbMax,
|
||||
int theDegMax,
|
||||
double theDMax);
|
||||
/*@@ insert new functions before this line @@ do not remove this line @@*/
|
||||
};
|
||||
|
||||
#endif
|
@ -22,7 +22,8 @@
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#include "GEOM_IAdvancedOperations_i.hh"
|
||||
#include "AdvancedEngine_IOperations_i.hh"
|
||||
#include "AdvancedEngine_IOperations.hxx"
|
||||
|
||||
#include <utilities.h>
|
||||
#include <OpUtil.hxx>
|
||||
@ -36,10 +37,10 @@
|
||||
* constructor:
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM_IAdvancedOperations_i::GEOM_IAdvancedOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, ::GEOMImpl_IAdvancedOperations* theImpl)
|
||||
AdvancedEngine_IOperations_i::AdvancedEngine_IOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, AdvancedEngine_IOperations* theImpl)
|
||||
:GEOM_IOperations_i(thePOA, theEngine, theImpl)
|
||||
{
|
||||
MESSAGE("GEOM_IAdvancedOperations_i::GEOM_IAdvancedOperations_i");
|
||||
MESSAGE("AdvancedEngine_IOperations_i::AdvancedEngine_IOperations_i");
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -47,9 +48,9 @@ GEOM_IAdvancedOperations_i::GEOM_IAdvancedOperations_i(PortableServer::POA_ptr t
|
||||
* destructor
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM_IAdvancedOperations_i::~GEOM_IAdvancedOperations_i()
|
||||
AdvancedEngine_IOperations_i::~AdvancedEngine_IOperations_i()
|
||||
{
|
||||
MESSAGE("GEOM_IAdvancedOperations_i::~GEOM_IAdvancedOperations_i");
|
||||
MESSAGE("AdvancedEngine_IOperations_i::~AdvancedEngine_IOperations_i");
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -68,7 +69,7 @@ GEOM_IAdvancedOperations_i::~GEOM_IAdvancedOperations_i()
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape
|
||||
GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShape
|
||||
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Boolean theHexMesh)
|
||||
@ -114,7 +115,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition
|
||||
GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeWithPosition
|
||||
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Boolean theHexMesh,
|
||||
@ -166,7 +167,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer
|
||||
GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeChamfer
|
||||
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh)
|
||||
@ -215,7 +216,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamferWithPosition
|
||||
GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeChamferWithPosition
|
||||
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
|
||||
@ -265,7 +266,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamferWithPosition
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFillet
|
||||
GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeFillet
|
||||
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Double theRF, CORBA::Boolean theHexMesh)
|
||||
@ -313,7 +314,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFillet
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFilletWithPosition
|
||||
GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeFilletWithPosition
|
||||
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Double theRF, CORBA::Boolean theHexMesh,
|
||||
@ -361,7 +362,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFilletWithPosition
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTR
|
||||
GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeTR
|
||||
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
|
||||
@ -412,7 +413,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTR
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRWithPosition
|
||||
GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeTRWithPosition
|
||||
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
|
||||
@ -469,7 +470,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRWithPosition
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRChamfer
|
||||
GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeTRChamfer
|
||||
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
|
||||
@ -523,7 +524,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRChamfer
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRChamferWithPosition
|
||||
GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeTRChamferWithPosition
|
||||
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
|
||||
@ -578,7 +579,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRChamferWithPosition
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRFillet
|
||||
GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeTRFillet
|
||||
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
|
||||
@ -631,7 +632,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRFillet
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRFilletWithPosition
|
||||
GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeTRFilletWithPosition
|
||||
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
|
||||
@ -677,7 +678,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRFilletWithPosition
|
||||
* \return New GEOM_Object, containing the created shape.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDisk (CORBA::Double theR,
|
||||
GEOM::GEOM_Object_ptr AdvancedEngine_IOperations_i::MakeDividedDisk (CORBA::Double theR,
|
||||
CORBA::Double theRatio,
|
||||
CORBA::Short theOrientation,
|
||||
GEOM::pattern thePattern)
|
||||
@ -700,7 +701,7 @@ GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDisk (CORBA::Double
|
||||
* MakeDividedDiskPntVecR
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDiskPntVecR (GEOM::GEOM_Object_ptr thePnt,
|
||||
GEOM::GEOM_Object_ptr AdvancedEngine_IOperations_i::MakeDividedDiskPntVecR (GEOM::GEOM_Object_ptr thePnt,
|
||||
GEOM::GEOM_Object_ptr theVec,
|
||||
CORBA::Double theR,
|
||||
CORBA::Double theRatio,
|
||||
@ -734,7 +735,7 @@ GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDiskPntVecR (GEOM::
|
||||
* \return New GEOM_Object, containing the created shape.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedCylinder (CORBA::Double theR,
|
||||
GEOM::GEOM_Object_ptr AdvancedEngine_IOperations_i::MakeDividedCylinder (CORBA::Double theR,
|
||||
CORBA::Double theH,
|
||||
GEOM::pattern thePattern)
|
||||
{
|
||||
@ -761,7 +762,7 @@ GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedCylinder (CORBA::Do
|
||||
* \return New GEOM_Object, containing the created shape.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeSmoothingSurface (const GEOM::ListOfGO& thelPoints,
|
||||
GEOM::GEOM_Object_ptr AdvancedEngine_IOperations_i::MakeSmoothingSurface (const GEOM::ListOfGO& thelPoints,
|
||||
CORBA::Long theNbMax,
|
||||
CORBA::Long theDegMax,
|
||||
CORBA::Double theDMax)
|
||||
@ -789,4 +790,8 @@ GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeSmoothingSurface (const GE
|
||||
return GetObject(anObject);
|
||||
}
|
||||
|
||||
/*@@ insert new functions before this line @@ do not remove this line @@*/
|
||||
AdvancedEngine_IOperations* AdvancedEngine_IOperations_i::GetOperations()
|
||||
{
|
||||
return (AdvancedEngine_IOperations*)GetImpl();
|
||||
}
|
||||
|
@ -17,31 +17,31 @@
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// File : GEOM_IAdvancedOperations.hh
|
||||
// File : AdvancedEngine_IOperations_i.hh
|
||||
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
|
||||
|
||||
#ifndef _GEOM_IAdvancedOperations_i_HeaderFile
|
||||
#define _GEOM_IAdvancedOperations_i_HeaderFile
|
||||
#ifndef _AdvancedEngine_IOperations_i_HeaderFile
|
||||
#define _AdvancedEngine_IOperations_i_HeaderFile
|
||||
|
||||
#include "GEOMImpl_Gen.hxx"
|
||||
#include "AdvancedEngine.hxx"
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
|
||||
#include CORBA_SERVER_HEADER(GEOM_Gen)
|
||||
#include "GEOM_IOperations_i.hh"
|
||||
#include "GEOM_Object_i.hh"
|
||||
#include "GEOM_AdvancedEngine.hxx"
|
||||
|
||||
#include "GEOMImpl_IAdvancedOperations.hxx"
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(GEOM_Gen)
|
||||
#include CORBA_SERVER_HEADER(AdvancedGEOM)
|
||||
|
||||
class ADVANCEDENGINE_EXPORT GEOM_IAdvancedOperations_i :
|
||||
public virtual POA_GEOM::GEOM_IAdvancedOperations,
|
||||
class AdvancedEngine_IOperations;
|
||||
|
||||
class ADVANCEDENGINE_EXPORT AdvancedEngine_IOperations_i :
|
||||
public virtual POA_GEOM::IAdvancedOperations,
|
||||
public virtual GEOM_IOperations_i
|
||||
{
|
||||
public:
|
||||
GEOM_IAdvancedOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine,
|
||||
::GEOMImpl_IAdvancedOperations* theImpl);
|
||||
~GEOM_IAdvancedOperations_i();
|
||||
AdvancedEngine_IOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine,
|
||||
AdvancedEngine_IOperations* theImpl);
|
||||
~AdvancedEngine_IOperations_i();
|
||||
|
||||
// PipeTShape without thickness reduction
|
||||
GEOM::ListOfGO* MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
@ -131,10 +131,8 @@ class ADVANCEDENGINE_EXPORT GEOM_IAdvancedOperations_i :
|
||||
CORBA::Long theNbMax,
|
||||
CORBA::Long theDegMax,
|
||||
CORBA::Double theDMax);
|
||||
/*@@ insert new functions before this line @@ do not remove this line @@*/
|
||||
|
||||
::GEOMImpl_IAdvancedOperations* GetOperations()
|
||||
{ return (::GEOMImpl_IAdvancedOperations*)GetImpl(); }
|
||||
AdvancedEngine_IOperations* GetOperations();
|
||||
};
|
||||
|
||||
#endif
|
@ -17,17 +17,17 @@
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#ifndef _GEOMImpl_IPipeTShape_HXX_
|
||||
#define _GEOMImpl_IPipeTShape_HXX_
|
||||
#ifndef _AdvancedEngine_IPipeTShape_HXX_
|
||||
#define _AdvancedEngine_IPipeTShape_HXX_
|
||||
|
||||
#include "GEOM_Function.hxx"
|
||||
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
|
||||
class GEOMImpl_IPipeTShape
|
||||
class AdvancedEngine_IPipeTShape
|
||||
{
|
||||
public:
|
||||
GEOMImpl_IPipeTShape(Handle(GEOM_Function) theFunction): _func(theFunction) {}
|
||||
AdvancedEngine_IPipeTShape(Handle(GEOM_Function) theFunction): _func(theFunction) {}
|
||||
|
||||
void SetR1(double theR1) { _func->SetReal(TSHAPE_ARG_R1, theR1); }
|
||||
double GetR1() { return _func->GetReal(TSHAPE_ARG_R1); }
|
||||
@ -100,4 +100,4 @@ private:
|
||||
Handle(GEOM_Function) _func;
|
||||
};
|
||||
|
||||
#endif // _GEOMImpl_IPipeTShape_HXX_
|
||||
#endif // _AdvancedEngine_IPipeTShape_HXX_
|
@ -20,8 +20,8 @@
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#ifndef _GEOMImpl_ISmoothingSurface_HXX_
|
||||
#define _GEOMImpl_ISmoothingSurface_HXX_
|
||||
#ifndef _AdvancedEngine_ISmoothingSurface_HXX_
|
||||
#define _AdvancedEngine_ISmoothingSurface_HXX_
|
||||
|
||||
#include "GEOM_Function.hxx"
|
||||
|
||||
@ -31,10 +31,10 @@
|
||||
#define SMOOTHINGSURFACE_ARG_DEG_MAX 4
|
||||
#define SMOOTHINGSURFACE_ARG_D_MAX 5
|
||||
|
||||
class GEOMImpl_ISmoothingSurface
|
||||
class AdvancedEngine_ISmoothingSurface
|
||||
{
|
||||
public:
|
||||
GEOMImpl_ISmoothingSurface(Handle(GEOM_Function) theFunction): _func(theFunction) {}
|
||||
AdvancedEngine_ISmoothingSurface(Handle(GEOM_Function) theFunction): _func(theFunction) {}
|
||||
|
||||
void SetLength(int theLen) { _func->SetInteger(SMOOTHINGSURFACE_ARG_LENG, theLen); }
|
||||
int GetLength() { return _func->GetInteger(SMOOTHINGSURFACE_ARG_LENG); }
|
||||
@ -55,4 +55,4 @@ private:
|
||||
Handle(GEOM_Function) _func;
|
||||
};
|
||||
|
||||
#endif // _GEOMImpl_ISmoothingSurface_HXX_
|
||||
#endif // _AdvancedEngine_ISmoothingSurface_HXX_
|
@ -1,73 +0,0 @@
|
||||
// Copyright (C) 2007-2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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;
|
||||
}
|
69
src/AdvancedEngine/AdvancedEngine_OperationsCreator.cxx
Normal file
@ -0,0 +1,69 @@
|
||||
// Copyright (C) 2007-2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 "AdvancedEngine_OperationsCreator.hxx"
|
||||
#include "AdvancedEngine_IOperations_i.hh"
|
||||
#include "AdvancedEngine_IOperations.hxx"
|
||||
#include <AdvancedEngine_PipeTShapeDriver.hxx>
|
||||
#include <AdvancedEngine_DividedDiskDriver.hxx>
|
||||
#include <AdvancedEngine_SmoothingSurfaceDriver.hxx>
|
||||
|
||||
#include <TFunction_Driver.hxx>
|
||||
#include <TFunction_DriverTable.hxx>
|
||||
|
||||
#include "Utils_ExceptHandlers.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
std::map <int, AdvancedEngine_IOperations*> AdvancedEngine_OperationsCreator::_mapOfOperations;
|
||||
|
||||
AdvancedEngine_OperationsCreator::AdvancedEngine_OperationsCreator()
|
||||
{
|
||||
// Register drivers
|
||||
TFunction_DriverTable::Get()->AddDriver(AdvancedEngine_PipeTShapeDriver::GetID(),
|
||||
new AdvancedEngine_PipeTShapeDriver());
|
||||
TFunction_DriverTable::Get()->AddDriver(AdvancedEngine_DividedDiskDriver::GetID(),
|
||||
new AdvancedEngine_DividedDiskDriver());
|
||||
TFunction_DriverTable::Get()->AddDriver(AdvancedEngine_SmoothingSurfaceDriver::GetID(),
|
||||
new AdvancedEngine_SmoothingSurfaceDriver());
|
||||
}
|
||||
|
||||
AdvancedEngine_OperationsCreator::~AdvancedEngine_OperationsCreator()
|
||||
{
|
||||
}
|
||||
|
||||
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" );
|
||||
return new AdvancedEngine_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
|
||||
}
|
||||
|
||||
AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
|
||||
int theStudyId )
|
||||
{
|
||||
if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
|
||||
_mapOfOperations[theStudyId] = new AdvancedEngine_IOperations( theGenImpl, theStudyId );
|
||||
return _mapOfOperations[theStudyId];
|
||||
}
|
@ -23,30 +23,33 @@
|
||||
#ifndef _GEOM_ADVANCEDENGINE_OPERATIONSCREATOR_HXX_
|
||||
#define _GEOM_ADVANCEDENGINE_OPERATIONSCREATOR_HXX_
|
||||
|
||||
#include "GEOM_AdvancedEngine.hxx"
|
||||
#include "AdvancedEngine.hxx"
|
||||
|
||||
#include "GEOM_Gen_i.hh"
|
||||
|
||||
#include "GEOMImpl_IAdvancedOperations.hxx"
|
||||
|
||||
#include <map>
|
||||
|
||||
class AdvancedEngine_IOperations;
|
||||
|
||||
//=====================================================================
|
||||
// Operations creator
|
||||
//=====================================================================
|
||||
class ADVANCEDENGINE_EXPORT AdvancedEngine_OperationsCreator : public GEOM_GenericOperationsCreator
|
||||
{
|
||||
public:
|
||||
// Create operations
|
||||
virtual GEOM_IOperations_i* Create (PortableServer::POA_ptr thePOA,
|
||||
AdvancedEngine_OperationsCreator();
|
||||
~AdvancedEngine_OperationsCreator();
|
||||
|
||||
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;
|
||||
static AdvancedEngine_IOperations* get( ::GEOMImpl_Gen* theGenImpl,
|
||||
int theStudyId );
|
||||
private:
|
||||
static std::map <int, AdvancedEngine_IOperations*> _mapOfOperations;
|
||||
};
|
||||
|
||||
#endif
|
@ -17,36 +17,29 @@
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#include <GEOMImpl_PipeTShapeDriver.hxx>
|
||||
#include "AdvancedEngine_PipeTShapeDriver.hxx"
|
||||
#include "AdvancedEngine_IPipeTShape.hxx"
|
||||
#include "AdvancedEngine_Types.hxx"
|
||||
#include "AdvancedEngine_IOperations.hxx"
|
||||
|
||||
#include <GEOMImpl_IPipeTShape.hxx>
|
||||
#include <GEOMImpl_Types.hxx>
|
||||
#include <GEOMImpl_Block6Explorer.hxx>
|
||||
#include <GEOMImpl_IAdvancedOperations.hxx>
|
||||
|
||||
#include <GEOM_Function.hxx>
|
||||
#include <GEOM_IOperations.hxx>
|
||||
|
||||
#include <GEOMUtils.hxx>
|
||||
|
||||
#include <GEOMAlgo_FinderShapeOn1.hxx>
|
||||
#include <GEOMAlgo_FinderShapeOn2.hxx>
|
||||
#include <GEOMAlgo_ClsfBox.hxx>
|
||||
|
||||
#include <TFunction_Logbook.hxx>
|
||||
#include <StdFail_NotDone.hxx>
|
||||
|
||||
// Partition includes
|
||||
#include <GEOMAlgo_Splitter.hxx>
|
||||
#include <Geom_CylindricalSurface.hxx>
|
||||
#include "GEOMImpl_Block6Explorer.hxx"
|
||||
#include "GEOM_Function.hxx"
|
||||
#include "GEOM_IOperations.hxx"
|
||||
#include "GEOMUtils.hxx"
|
||||
#include "GEOMAlgo_FinderShapeOn1.hxx"
|
||||
#include "GEOMAlgo_FinderShapeOn2.hxx"
|
||||
#include "GEOMAlgo_ClsfBox.hxx"
|
||||
#include "GEOMAlgo_Splitter.hxx"
|
||||
|
||||
#include "Geom_CylindricalSurface.hxx"
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Ax2.hxx>
|
||||
#include <gp_Pln.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Trsf.hxx>
|
||||
|
||||
#include <TFunction_Logbook.hxx>
|
||||
#include <StdFail_NotDone.hxx>
|
||||
#include <BRepPrimAPI_MakeCone.hxx>
|
||||
#include <BRepPrimAPI_MakeCylinder.hxx>
|
||||
#include <BRepAlgoAPI_Fuse.hxx>
|
||||
@ -69,25 +62,22 @@
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
|
||||
#include <vector>
|
||||
//@@ include required header files here @@//
|
||||
|
||||
#include "AdvancedEngine_Types.hxx"
|
||||
|
||||
//=======================================================================
|
||||
//function : GetID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& GEOMImpl_PipeTShapeDriver::GetID()
|
||||
const Standard_GUID& AdvancedEngine_PipeTShapeDriver::GetID()
|
||||
{
|
||||
static Standard_GUID aGUID("1C3A0F3F-729D-4E83-8232-78E74FC5637C");
|
||||
return aGUID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_PipeTShapeDriver
|
||||
//function : AdvancedEngine_PipeTShapeDriver
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
GEOMImpl_PipeTShapeDriver::GEOMImpl_PipeTShapeDriver()
|
||||
AdvancedEngine_PipeTShapeDriver::AdvancedEngine_PipeTShapeDriver()
|
||||
{
|
||||
}
|
||||
|
||||
@ -103,7 +93,7 @@ GEOMImpl_PipeTShapeDriver::GEOMImpl_PipeTShapeDriver()
|
||||
*/
|
||||
//=======================================================================
|
||||
Handle(TColStd_HSequenceOfInteger)
|
||||
GEOMImpl_PipeTShapeDriver::GetShapesOnBoxIDs(const TopoDS_Shape& aBox,
|
||||
AdvancedEngine_PipeTShapeDriver::GetShapesOnBoxIDs(const TopoDS_Shape& aBox,
|
||||
const TopoDS_Shape& aShape,
|
||||
const Standard_Integer theShapeType,
|
||||
GEOMAlgo_State theState) const
|
||||
@ -176,7 +166,7 @@ GEOMImpl_PipeTShapeDriver::GetShapesOnBoxIDs(const TopoDS_Shape& aBox,
|
||||
*/
|
||||
//=======================================================================
|
||||
Handle(TColStd_HSequenceOfInteger)
|
||||
GEOMImpl_PipeTShapeDriver::GetShapesOnSurfaceIDs(const Handle(Geom_Surface)& theSurface,
|
||||
AdvancedEngine_PipeTShapeDriver::GetShapesOnSurfaceIDs(const Handle(Geom_Surface)& theSurface,
|
||||
const TopoDS_Shape& theShape,
|
||||
TopAbs_ShapeEnum theShapeType,
|
||||
GEOMAlgo_State theState) const
|
||||
@ -255,7 +245,7 @@ Handle(TColStd_HSequenceOfInteger)
|
||||
//purpose : return the common shapes between 2 cylindrical surfaces
|
||||
// along OX and OZ
|
||||
//=======================================================================
|
||||
void GEOMImpl_PipeTShapeDriver::GetCommonShapesOnCylinders(const TopoDS_Shape& theShape,
|
||||
void AdvancedEngine_PipeTShapeDriver::GetCommonShapesOnCylinders(const TopoDS_Shape& theShape,
|
||||
TopAbs_ShapeEnum theShapeType,
|
||||
double r1,
|
||||
double r2,
|
||||
@ -308,7 +298,7 @@ void GEOMImpl_PipeTShapeDriver::GetCommonShapesOnCylinders(const TopoDS_Shape& t
|
||||
//function : MakePipeTShape
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakePipeTShape (const double r1, const double w1, const double l1,
|
||||
TopoDS_Shape AdvancedEngine_PipeTShapeDriver::MakePipeTShape (const double r1, const double w1, const double l1,
|
||||
const double r2, const double w2, const double l2) const
|
||||
{
|
||||
double r1Ext = r1 + w1;
|
||||
@ -358,7 +348,7 @@ TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakePipeTShape (const double r1, const d
|
||||
//function : MakeQuarterPipeTShape
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakeQuarterPipeTShape (const double r1, const double w1, const double l1,
|
||||
TopoDS_Shape AdvancedEngine_PipeTShapeDriver::MakeQuarterPipeTShape (const double r1, const double w1, const double l1,
|
||||
const double r2, const double w2, const double l2) const
|
||||
{
|
||||
TopoDS_Shape Te = MakePipeTShape(r1, w1, l1, r2, w2, l2);
|
||||
@ -390,12 +380,12 @@ TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakeQuarterPipeTShape (const double r1,
|
||||
//function : Execute
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Integer GEOMImpl_PipeTShapeDriver::Execute (TFunction_Logbook& log) const
|
||||
Standard_Integer AdvancedEngine_PipeTShapeDriver::Execute (TFunction_Logbook& log) const
|
||||
{
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
||||
|
||||
GEOMImpl_IPipeTShape aData (aFunction);
|
||||
AdvancedEngine_IPipeTShape aData (aFunction);
|
||||
Standard_Integer aType = aFunction->GetType();
|
||||
|
||||
TopoDS_Shape aShape, Te4, Te4Part;
|
||||
@ -624,14 +614,14 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute (TFunction_Logbook& log) con
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
bool GEOMImpl_PipeTShapeDriver::
|
||||
bool AdvancedEngine_PipeTShapeDriver::
|
||||
GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
|
||||
|
||||
GEOMImpl_IPipeTShape aCI( function );
|
||||
AdvancedEngine_IPipeTShape aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "PIPETSHAPE";
|
||||
@ -674,5 +664,5 @@ GetCreationInformation(std::string& theOperationName,
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PipeTShapeDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PipeTShapeDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_HANDLE (AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver);
|
@ -17,51 +17,41 @@
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#ifndef _GEOMImpl_PipeTShapeDriver_HXX
|
||||
#define _GEOMImpl_PipeTShapeDriver_HXX
|
||||
#ifndef _AdvancedEngine_PipeTShapeDriver_HXX
|
||||
#define _AdvancedEngine_PipeTShapeDriver_HXX
|
||||
|
||||
#include <TFunction_Driver.hxx>
|
||||
#include "AdvancedEngine.hxx"
|
||||
|
||||
#include "GEOM_BaseDriver.hxx"
|
||||
#include "GEOMAlgo_State.hxx"
|
||||
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopTools_HSequenceOfShape.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TColStd_HSequenceOfInteger.hxx>
|
||||
#include <gp_Ax2.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
|
||||
#include <Handle_Geom_Surface.hxx>
|
||||
DEFINE_STANDARD_HANDLE( AdvancedEngine_PipeTShapeDriver, GEOM_BaseDriver );
|
||||
|
||||
class Handle_Standard_Type;
|
||||
class GEOMImpl_PipeTShapeDriver;
|
||||
|
||||
|
||||
|
||||
#include "GEOM_BaseDriver.hxx"
|
||||
|
||||
DEFINE_STANDARD_HANDLE( GEOMImpl_PipeTShapeDriver, GEOM_BaseDriver );
|
||||
|
||||
class GEOMImpl_PipeTShapeDriver : public GEOM_BaseDriver {
|
||||
class ADVANCEDENGINE_EXPORT AdvancedEngine_PipeTShapeDriver : public GEOM_BaseDriver
|
||||
{
|
||||
public:
|
||||
// Methods PUBLIC
|
||||
//
|
||||
Standard_EXPORT GEOMImpl_PipeTShapeDriver();
|
||||
Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const;
|
||||
Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {}
|
||||
Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const
|
||||
AdvancedEngine_PipeTShapeDriver();
|
||||
virtual Standard_Integer Execute(TFunction_Logbook& log) const;
|
||||
virtual void Validate(TFunction_Logbook&) const {}
|
||||
Standard_Boolean MustExecute(const TFunction_Logbook&) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
Standard_EXPORT static const Standard_GUID& GetID();
|
||||
Standard_EXPORT ~GEOMImpl_PipeTShapeDriver() {};
|
||||
static const Standard_GUID& GetID();
|
||||
~AdvancedEngine_PipeTShapeDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
virtual bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
// Type management
|
||||
//
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_PipeTShapeDriver )
|
||||
DEFINE_STANDARD_RTTI( AdvancedEngine_PipeTShapeDriver )
|
||||
|
||||
private:
|
||||
|
||||
@ -131,4 +121,4 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#endif // _GEOMImpl_PipeTShapeDriver_HXX
|
||||
#endif // _AdvancedEngine_PipeTShapeDriver_HXX
|
@ -19,17 +19,15 @@
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#include "AdvancedEngine_SmoothingSurfaceDriver.hxx"
|
||||
#include "AdvancedEngine_ISmoothingSurface.hxx"
|
||||
#include "AdvancedEngine_Types.hxx"
|
||||
|
||||
#include <GEOMImpl_SmoothingSurfaceDriver.hxx>
|
||||
#include <GEOMImpl_ISmoothingSurface.hxx>
|
||||
#include <GEOMImpl_Types.hxx>
|
||||
#include <GEOM_Function.hxx>
|
||||
#include "GEOM_Function.hxx"
|
||||
|
||||
#include <TFunction_Logbook.hxx>
|
||||
#include <StdFail_NotDone.hxx>
|
||||
|
||||
//@@ include required header files here @@//
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Compound.hxx>
|
||||
@ -76,21 +74,22 @@
|
||||
#include <gp_Vec.hxx>
|
||||
|
||||
#include <GC_MakePlane.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : GetID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& GEOMImpl_SmoothingSurfaceDriver::GetID()
|
||||
const Standard_GUID& AdvancedEngine_SmoothingSurfaceDriver::GetID()
|
||||
{
|
||||
static Standard_GUID aGUID("1C3A0F30-729D-4E83-8232-78E74FC5637C");
|
||||
return aGUID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMImpl_SmoothingSurfaceDriver
|
||||
//function : AdvancedEngine_SmoothingSurfaceDriver
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
GEOMImpl_SmoothingSurfaceDriver::GEOMImpl_SmoothingSurfaceDriver()
|
||||
AdvancedEngine_SmoothingSurfaceDriver::AdvancedEngine_SmoothingSurfaceDriver()
|
||||
{
|
||||
}
|
||||
|
||||
@ -98,7 +97,7 @@ GEOMImpl_SmoothingSurfaceDriver::GEOMImpl_SmoothingSurfaceDriver()
|
||||
//function : MakeSmoothingSurfaceUnClosed
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
TopoDS_Shape GEOMImpl_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed
|
||||
TopoDS_Shape AdvancedEngine_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed
|
||||
(const Handle_TColgp_HArray1OfPnt &theListOfPoints,
|
||||
const Standard_Integer theNbMax,
|
||||
const Standard_Integer theDegMax,
|
||||
@ -166,7 +165,7 @@ TopoDS_Shape GEOMImpl_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed
|
||||
//function : Execute
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Integer GEOMImpl_SmoothingSurfaceDriver::Execute(TFunction_Logbook& log) const
|
||||
Standard_Integer AdvancedEngine_SmoothingSurfaceDriver::Execute(TFunction_Logbook& log) const
|
||||
{
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
||||
@ -177,7 +176,7 @@ Standard_Integer GEOMImpl_SmoothingSurfaceDriver::Execute(TFunction_Logbook& log
|
||||
if (aType != SMOOTHINGSURFACE_LPOINTS) return 0;
|
||||
// cout << "Youhou : " << aType << endl;
|
||||
|
||||
GEOMImpl_ISmoothingSurface aData (aFunction);
|
||||
AdvancedEngine_ISmoothingSurface aData (aFunction);
|
||||
|
||||
// Fill the map of vertices.
|
||||
Standard_Integer aNbShapes = aData.GetLength();
|
||||
@ -217,7 +216,7 @@ Standard_Integer GEOMImpl_SmoothingSurfaceDriver::Execute(TFunction_Logbook& log
|
||||
const Standard_Real aDMax = aData.GetDMax();
|
||||
|
||||
// Make smoothing surface.
|
||||
TopoDS_Shape aShape = GEOMImpl_SmoothingSurfaceDriver::
|
||||
TopoDS_Shape aShape = AdvancedEngine_SmoothingSurfaceDriver::
|
||||
MakeSmoothingSurfaceUnClosed(anArrayofPnt, aNbMax, aDegMax, aDMax);
|
||||
|
||||
if (aShape.IsNull()) return 0;
|
||||
@ -235,14 +234,14 @@ Standard_Integer GEOMImpl_SmoothingSurfaceDriver::Execute(TFunction_Logbook& log
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
bool GEOMImpl_SmoothingSurfaceDriver::
|
||||
bool AdvancedEngine_SmoothingSurfaceDriver::
|
||||
GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams)
|
||||
{
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
|
||||
|
||||
GEOMImpl_ISmoothingSurface aCI( function );
|
||||
AdvancedEngine_ISmoothingSurface aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "SMOOTHINGSURFACE";
|
||||
@ -272,5 +271,5 @@ GetCreationInformation(std::string& theOperationName,
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE (GEOMImpl_SmoothingSurfaceDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SmoothingSurfaceDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_HANDLE (AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver);
|
||||
IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver);
|
@ -17,50 +17,39 @@
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#ifndef _GEOMImpl_SmoothingSurfaceDriver_HXX
|
||||
#define _GEOMImpl_SmoothingSurfaceDriver_HXX
|
||||
|
||||
#ifndef _TFunction_Driver_HeaderFile
|
||||
#include <TFunction_Driver.hxx>
|
||||
#endif
|
||||
#ifndef _TFunction_Logbook_HeaderFile
|
||||
#include <TFunction_Logbook.hxx>
|
||||
#endif
|
||||
#ifndef _Standard_CString_HeaderFile
|
||||
#include <Standard_CString.hxx>
|
||||
#endif
|
||||
#include <TColgp_HArray1OfPnt.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
class Handle_Standard_Type;
|
||||
class GEOMImpl_SmoothingSurfaceDriver;
|
||||
|
||||
#ifndef _AdvancedEngine_SmoothingSurfaceDriver_HXX
|
||||
#define _AdvancedEngine_SmoothingSurfaceDriver_HXX
|
||||
|
||||
#include "AdvancedEngine.hxx"
|
||||
|
||||
#include "GEOM_BaseDriver.hxx"
|
||||
|
||||
DEFINE_STANDARD_HANDLE( GEOMImpl_SmoothingSurfaceDriver, GEOM_BaseDriver );
|
||||
#include <TFunction_Logbook.hxx>
|
||||
#include <TColgp_HArray1OfPnt.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
class GEOMImpl_SmoothingSurfaceDriver : public GEOM_BaseDriver {
|
||||
DEFINE_STANDARD_HANDLE( AdvancedEngine_SmoothingSurfaceDriver, GEOM_BaseDriver );
|
||||
|
||||
class ADVANCEDENGINE_EXPORT AdvancedEngine_SmoothingSurfaceDriver : public GEOM_BaseDriver
|
||||
{
|
||||
public:
|
||||
// Methods PUBLIC
|
||||
//
|
||||
Standard_EXPORT GEOMImpl_SmoothingSurfaceDriver();
|
||||
Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const;
|
||||
Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {}
|
||||
Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const
|
||||
AdvancedEngine_SmoothingSurfaceDriver();
|
||||
virtual Standard_Integer Execute(TFunction_Logbook& log) const;
|
||||
virtual void Validate(TFunction_Logbook&) const {}
|
||||
Standard_Boolean MustExecute(const TFunction_Logbook&) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
Standard_EXPORT static const Standard_GUID& GetID();
|
||||
Standard_EXPORT ~GEOMImpl_SmoothingSurfaceDriver() {};
|
||||
static const Standard_GUID& GetID();
|
||||
~AdvancedEngine_SmoothingSurfaceDriver() {};
|
||||
|
||||
Standard_EXPORT virtual
|
||||
bool GetCreationInformation(std::string& theOperationName,
|
||||
virtual bool GetCreationInformation(std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params);
|
||||
// Type management
|
||||
//
|
||||
DEFINE_STANDARD_RTTI( GEOMImpl_SmoothingSurfaceDriver )
|
||||
DEFINE_STANDARD_RTTI( AdvancedEngine_SmoothingSurfaceDriver )
|
||||
|
||||
private:
|
||||
TopoDS_Shape MakeSmoothingSurfaceUnClosed
|
||||
@ -70,4 +59,4 @@ private:
|
||||
const Standard_Real theDMax) const;
|
||||
};
|
||||
|
||||
#endif // _GEOMImpl_SmoothingSurfaceDriver_HXX
|
||||
#endif // _AdvancedEngine_SmoothingSurfaceDriver_HXX
|
@ -20,13 +20,14 @@
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#include "GEOMImpl_Types.hxx"
|
||||
|
||||
// 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 @@*/
|
||||
#define GEOM_TSHAPE ( USER_TYPE + 1 )
|
||||
#define GEOM_DIVIDEDDISK ( USER_TYPE + 2 )
|
||||
#define GEOM_DIVIDEDCYLINDER ( USER_TYPE + 3 )
|
||||
#define GEOM_SMOOTHINGSURFACE ( USER_TYPE + 4 )
|
||||
|
||||
// Advanced functions sub-operations codes
|
||||
#define TSHAPE_BASIC 1
|
||||
#define TSHAPE_CHAMFER 2
|
||||
@ -35,4 +36,3 @@
|
||||
#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 @@*/
|
||||
|
@ -45,6 +45,7 @@ ADD_DEFINITIONS(
|
||||
SET(_link_LIBRARIES
|
||||
GEOMEngine
|
||||
SalomeIDLGEOM
|
||||
SalomeIDLAdvancedGEOM
|
||||
${KERNEL_SALOMELocalTrace}
|
||||
${KERNEL_SalomeGenericObj}
|
||||
${KERNEL_TOOLSDS}
|
||||
@ -55,30 +56,28 @@ SET(_link_LIBRARIES
|
||||
# --- headers ---
|
||||
|
||||
SET(AdvancedEngine_HEADERS
|
||||
AdvancedEngine.hxx
|
||||
AdvancedEngine_Types.hxx
|
||||
# AdvancedEngine_OperationsCreator.hh
|
||||
# GEOM_AdvancedEngine.hxx
|
||||
# GEOMImpl_IAdvancedOperations.hxx
|
||||
# GEOM_IAdvancedOperations_i.hh
|
||||
# #ADVANCED_INCLUDES:
|
||||
# GEOMImpl_IPipeTShape.hxx GEOMImpl_PipeTShapeDriver.hxx
|
||||
# GEOMImpl_IDividedDisk.hxx GEOMImpl_DividedDiskDriver.hxx
|
||||
# GEOMImpl_IDividedCylinder.hxx GEOMImpl_DividedCylinderDriver.hxx
|
||||
# GEOMImpl_ISmoothingSurface.hxx GEOMImpl_SmoothingSurfaceDriver.hxx
|
||||
AdvancedEngine_DividedDiskDriver.hxx
|
||||
AdvancedEngine_PipeTShapeDriver.hxx
|
||||
AdvancedEngine_SmoothingSurfaceDriver.hxx
|
||||
AdvancedEngine_IPipeTShape.hxx
|
||||
AdvancedEngine_ISmoothingSurface.hxx
|
||||
AdvancedEngine_IDividedDisk.hxx
|
||||
AdvancedEngine_IOperations.hxx
|
||||
AdvancedEngine_IOperations_i.hh
|
||||
AdvancedEngine_OperationsCreator.hxx
|
||||
)
|
||||
# --- sources ---
|
||||
|
||||
SET(AdvancedEngine_SOURCES
|
||||
AdvancedEngine.cxx
|
||||
AdvancedEngine_OperationsCreator.cc
|
||||
GEOMImpl_IAdvancedOperations.cxx
|
||||
GEOM_IAdvancedOperations_i.cc
|
||||
# ADVANCED_SOURCES:
|
||||
GEOMImpl_PipeTShapeDriver.cxx
|
||||
GEOMImpl_DividedDiskDriver.cxx
|
||||
#GEOMImpl_DividedCylinderDriver.cxx
|
||||
GEOMImpl_SmoothingSurfaceDriver.cxx
|
||||
##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@##
|
||||
AdvancedEngine_DividedDiskDriver.cxx
|
||||
AdvancedEngine_PipeTShapeDriver.cxx
|
||||
AdvancedEngine_SmoothingSurfaceDriver.cxx
|
||||
AdvancedEngine_IOperations.cxx
|
||||
AdvancedEngine_IOperations_i.cc
|
||||
AdvancedEngine_OperationsCreator.cxx
|
||||
)
|
||||
|
||||
# --- rules ---
|
||||
|
@ -216,7 +216,6 @@ void AdvancedGUI_DividedCylinderDlg::ValueChangedInSpinBox()
|
||||
//=================================================================================
|
||||
GEOM::GEOM_IOperations_ptr AdvancedGUI_DividedCylinderDlg::createOperation()
|
||||
{
|
||||
//return getGeomEngine()->GetIAdvancedOperations(getStudyId());
|
||||
return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
|
||||
}
|
||||
|
||||
@ -243,7 +242,7 @@ bool AdvancedGUI_DividedCylinderDlg::execute (ObjectList& objects)
|
||||
|
||||
GEOM::GEOM_Object_var anObj;
|
||||
|
||||
GEOM::GEOM_IAdvancedOperations_var anOper = GEOM::GEOM_IAdvancedOperations::_narrow(getOperation());
|
||||
GEOM::IAdvancedOperations_var anOper = GEOM::IAdvancedOperations::_narrow(getOperation());
|
||||
|
||||
//@@ retrieve input values from the widgets here @@//
|
||||
CORBA::Double theR = GroupParams->SpinBox_DX->value();
|
||||
|
@ -25,6 +25,9 @@
|
||||
|
||||
#include <GEOMBase_Skeleton.h>
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(AdvancedGEOM)
|
||||
|
||||
class DlgRef_2Spin;
|
||||
class DlgRef_3Radio;
|
||||
|
||||
|
@ -392,7 +392,6 @@ void AdvancedGUI_DividedDiskDlg::ValueChangedInSpinBox()
|
||||
//=================================================================================
|
||||
GEOM::GEOM_IOperations_ptr AdvancedGUI_DividedDiskDlg::createOperation()
|
||||
{
|
||||
//return getGeomEngine()->GetIAdvancedOperations(getStudyId());
|
||||
return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
|
||||
}
|
||||
|
||||
@ -419,7 +418,8 @@ bool AdvancedGUI_DividedDiskDlg::execute (ObjectList& objects)
|
||||
|
||||
GEOM::GEOM_Object_var anObj;
|
||||
|
||||
GEOM::GEOM_IAdvancedOperations_var anOper = GEOM::GEOM_IAdvancedOperations::_narrow(getOperation());
|
||||
GEOM::IAdvancedOperations_var anOper = GEOM::IAdvancedOperations::_narrow(getOperation());
|
||||
|
||||
CORBA::Double theRatio = 67; // About 2/3
|
||||
CORBA::Double theR = 0;
|
||||
|
||||
|
@ -25,6 +25,9 @@
|
||||
|
||||
#include <GEOMBase_Skeleton.h>
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(AdvancedGEOM)
|
||||
|
||||
class DlgRef_1Spin;
|
||||
class DlgRef_3Radio;
|
||||
class DlgRef_2Sel1Spin;
|
||||
|
@ -19,6 +19,9 @@
|
||||
|
||||
#include "AdvancedGUI_PipeTShapeDlg.h"
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(AdvancedGEOM)
|
||||
|
||||
#include <DlgRef.h>
|
||||
#include <GeometryGUI.h>
|
||||
#include <GEOMBase.h>
|
||||
@ -844,7 +847,6 @@ void AdvancedGUI_PipeTShapeDlg::DisplayPreview (const bool activate, const bool
|
||||
//=================================================================================
|
||||
GEOM::GEOM_IOperations_ptr AdvancedGUI_PipeTShapeDlg::createOperation()
|
||||
{
|
||||
//return getGeomEngine()->GetIAdvancedOperations(getStudyId());
|
||||
return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
|
||||
}
|
||||
|
||||
@ -1059,7 +1061,7 @@ bool AdvancedGUI_PipeTShapeDlg::executeNoCheck (ObjectList& objects)
|
||||
// GEOM::GEOM_Object_var anObj;
|
||||
GEOM::ListOfGO_var anObj;
|
||||
|
||||
GEOM::GEOM_IAdvancedOperations_var anOper = GEOM::GEOM_IAdvancedOperations::_narrow(getOperation());
|
||||
GEOM::IAdvancedOperations_var anOper = GEOM::IAdvancedOperations::_narrow(getOperation());
|
||||
|
||||
//@@ retrieve input values from the widgets here @@//
|
||||
CORBA::Double theR1 = MainTubeGroupParams->SpinBox_DX->value();
|
||||
|
@ -19,6 +19,9 @@
|
||||
|
||||
#include "AdvancedGUI_SmoothingSurfaceDlg.h"
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(AdvancedGEOM)
|
||||
|
||||
#include <DlgRef.h>
|
||||
#include <GeometryGUI.h>
|
||||
#include <GEOMBase.h>
|
||||
@ -187,7 +190,6 @@ void AdvancedGUI_SmoothingSurfaceDlg::enterEvent (QEvent*)
|
||||
//=================================================================================
|
||||
GEOM::GEOM_IOperations_ptr AdvancedGUI_SmoothingSurfaceDlg::createOperation()
|
||||
{
|
||||
//return getGeomEngine()->GetIAdvancedOperations(getStudyId());
|
||||
return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
|
||||
}
|
||||
|
||||
@ -219,7 +221,7 @@ bool AdvancedGUI_SmoothingSurfaceDlg::execute (ObjectList& objects)
|
||||
|
||||
GEOM::GEOM_Object_var anObj;
|
||||
|
||||
GEOM::GEOM_IAdvancedOperations_var anOper = GEOM::GEOM_IAdvancedOperations::_narrow(getOperation());
|
||||
GEOM::IAdvancedOperations_var anOper = GEOM::IAdvancedOperations::_narrow(getOperation());
|
||||
|
||||
//@@ retrieve input values from the widgets here @@//
|
||||
GEOM::ListOfGO_var points = new GEOM::ListOfGO();
|
||||
|
@ -38,7 +38,11 @@ INCLUDE_DIRECTORIES(
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMImpl
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMGUI
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMBase
|
||||
${PROJECT_SOURCE_DIR}/src/GEOM
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
|
||||
${PROJECT_SOURCE_DIR}/src/DlgRef
|
||||
${PROJECT_SOURCE_DIR}/src/AdvancedEngine
|
||||
${PROJECT_SOURCE_DIR}/src/GEOM_I
|
||||
${PROJECT_BINARY_DIR}/src/DlgRef
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
@ -54,6 +58,7 @@ ADD_DEFINITIONS(
|
||||
# libraries to link to
|
||||
SET(_link_LIBRARIES
|
||||
GEOMBase
|
||||
SalomeIDLAdvancedGEOM
|
||||
)
|
||||
|
||||
# --- resources ---
|
||||
@ -64,10 +69,10 @@ SET(_uic_files
|
||||
|
||||
# resource files / to be processed by lrelease
|
||||
SET(AdvancedGUI_RESOURCES
|
||||
AdvancedGUI_images.ts
|
||||
AdvancedGUI_msg_en.ts
|
||||
AdvancedGUI_msg_fr.ts
|
||||
AdvancedGUI_msg_ja.ts
|
||||
AdvancedGEOM_images.ts
|
||||
AdvancedGEOM_msg_en.ts
|
||||
AdvancedGEOM_msg_fr.ts
|
||||
AdvancedGEOM_msg_ja.ts
|
||||
)
|
||||
|
||||
# --- headers ---
|
||||
|
@ -1,64 +0,0 @@
|
||||
// Copyright (C) 2007-2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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: BREPExport.cxx
|
||||
// Created: Wed May 19 13:10:05 2004
|
||||
// Author: Pavel TELKOV
|
||||
// <ptv@mutex.nnov.opencascade.com>
|
||||
//
|
||||
#include "utilities.h"
|
||||
|
||||
#include <BRepTools.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined BREPEXPORT_EXPORTS || defined BREPExport_EXPORTS
|
||||
#define BREPEXPORT_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
#define BREPEXPORT_EXPORT __declspec( dllimport )
|
||||
#endif
|
||||
#else
|
||||
#define BREPEXPORT_EXPORT
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
extern "C"
|
||||
{
|
||||
BREPEXPORT_EXPORT int Export (const TopoDS_Shape& theShape,
|
||||
const TCollection_AsciiString& theFileName,
|
||||
const TCollection_AsciiString& /*theFormatName*/)
|
||||
{
|
||||
MESSAGE("Export BREP into file " << theFileName.ToCString());
|
||||
|
||||
if ( !BRepTools::Write( theShape, theFileName.ToCString() ) )
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
# Copyright (C) 2012-2014 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, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
# --- options ---
|
||||
|
||||
# additional include directories
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CAS_INCLUDE_DIRS}
|
||||
${PTHREAD_INCLUDE_DIR}
|
||||
${KERNEL_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# additional preprocessor / compiler flags
|
||||
ADD_DEFINITIONS(
|
||||
${CAS_DEFINITIONS}
|
||||
)
|
||||
|
||||
# libraries to link to
|
||||
SET(_link_LIBRARIES
|
||||
${CAS_TKBRep}
|
||||
${KERNEL_SALOMELocalTrace}
|
||||
)
|
||||
|
||||
# --- sources ---
|
||||
|
||||
SET(BREPExport_SOURCES
|
||||
BREPExport.cxx
|
||||
)
|
||||
|
||||
# --- rules ---
|
||||
|
||||
ADD_LIBRARY(BREPExport ${BREPExport_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(BREPExport ${_link_LIBRARIES})
|
||||
INSTALL(TARGETS BREPExport EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
|
@ -1,70 +0,0 @@
|
||||
// Copyright (C) 2007-2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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: BREPImport.cxx
|
||||
// Created: Wed May 19 14:29:52 2004
|
||||
// Author: Pavel TELKOV
|
||||
// <ptv@mutex.nnov.opencascade.com>
|
||||
//
|
||||
#include "utilities.h"
|
||||
|
||||
#include <BRepTools.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TDF_Label.hxx>
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined BREPIMPORT_EXPORTS || defined BREPImport_EXPORTS
|
||||
#define BREPIMPORT_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
#define BREPIMPORT_EXPORT __declspec( dllimport )
|
||||
#endif
|
||||
#else
|
||||
#define BREPIMPORT_EXPORT
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
extern "C"
|
||||
{
|
||||
BREPIMPORT_EXPORT
|
||||
TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
|
||||
const TCollection_AsciiString& /*theFormatName*/,
|
||||
TCollection_AsciiString& theError,
|
||||
const TDF_Label&)
|
||||
{
|
||||
MESSAGE("Import BREP from file " << theFileName);
|
||||
TopoDS_Shape aShape;
|
||||
BRep_Builder B;
|
||||
BRepTools::Read(aShape, theFileName.ToCString(), B);
|
||||
if (aShape.IsNull()) {
|
||||
theError = "BREP Import failed";
|
||||
}
|
||||
return aShape;
|
||||
}
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
# Copyright (C) 2012-2014 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, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
# --- options ---
|
||||
|
||||
# additional include directories
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CAS_INCLUDE_DIRS}
|
||||
${PTHREAD_INCLUDE_DIR}
|
||||
${KERNEL_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# additional preprocessor / compiler flags
|
||||
ADD_DEFINITIONS(
|
||||
${CAS_DEFINITIONS}
|
||||
)
|
||||
|
||||
# libraries to link to
|
||||
SET(_link_LIBRARIES
|
||||
${CAS_TKBRep}
|
||||
${KERNEL_SALOMELocalTrace}
|
||||
)
|
||||
|
||||
# --- sources ---
|
||||
|
||||
SET(BREPImport_SOURCES
|
||||
BREPImport.cxx
|
||||
)
|
||||
|
||||
# --- rules ---
|
||||
|
||||
ADD_LIBRARY(BREPImport ${BREPImport_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(BREPImport ${_link_LIBRARIES})
|
||||
INSTALL(TARGETS BREPImport EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
|
31
src/BREPPlugin/BREPPlugin_Engine.cxx
Normal file
@ -0,0 +1,31 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// internal includes
|
||||
#include "BREPPlugin_Engine.hxx"
|
||||
#include "BREPPlugin_OperationsCreator.hxx"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
BREPPLUGINENGINE_EXPORT
|
||||
GEOM_GenericOperationsCreator* GetOperationsCreator()
|
||||
{
|
||||
return new BREPPlugin_OperationsCreator();
|
||||
}
|
||||
}
|
33
src/BREPPlugin/BREPPlugin_Engine.hxx
Executable file
@ -0,0 +1,33 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 _BREPPLUGIN_ENGINE_HXX_
|
||||
#define _BREPPLUGIN_ENGINE_HXX_
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined BREPPLUGINENGINE_EXPORTS || defined BREPPLUGINENGINE_EXPORTS
|
||||
#define BREPPLUGINENGINE_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
#define BREPPLUGINENGINE_EXPORT __declspec( dllimport )
|
||||
#endif
|
||||
#else
|
||||
#define BREPPLUGINENGINE_EXPORT
|
||||
#endif
|
||||
|
||||
#endif
|
108
src/BREPPlugin/BREPPlugin_ExportDriver.cxx
Normal file
@ -0,0 +1,108 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// internal includes
|
||||
#include "BREPPlugin_ExportDriver.hxx"
|
||||
#include "BREPPlugin_IExport.hxx"
|
||||
|
||||
// KERNEL includes
|
||||
#include <utilities.h>
|
||||
#include <Basics_Utils.hxx>
|
||||
|
||||
// GEOM includes
|
||||
#include "GEOM_Function.hxx"
|
||||
|
||||
// OOCT includes
|
||||
#include <BRepTools.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : GetID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& BREPPlugin_ExportDriver::GetID()
|
||||
{
|
||||
static Standard_GUID aGUID("4c1fd92e-bcf3-4695-89b7-a8353038174f");
|
||||
return aGUID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : BREPPlugin_ExportDriver
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
BREPPlugin_ExportDriver::BREPPlugin_ExportDriver()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Execute
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Integer BREPPlugin_ExportDriver::Execute( TFunction_Logbook& log ) const
|
||||
{
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
|
||||
|
||||
BREPPlugin_IExport aData (aFunction);
|
||||
|
||||
// retrieve the being exported shape
|
||||
TopoDS_Shape aShape;
|
||||
Handle(GEOM_Function) aRefFunction = aData.GetOriginal();
|
||||
if( aRefFunction.IsNull() ) return 0;
|
||||
aShape = aRefFunction->GetValue();
|
||||
if( aShape.IsNull() ) return 0;
|
||||
// set the result of function to be used by next operations
|
||||
aFunction->SetValue( aShape );
|
||||
|
||||
TCollection_AsciiString aFileName = aData.GetFileName();
|
||||
|
||||
MESSAGE("Export BREP into file " << aFileName.ToCString());
|
||||
|
||||
// Set "C" numeric locale to save numbers correctly
|
||||
Kernel_Utils::Localizer loc;
|
||||
|
||||
if ( !BRepTools::Write( aShape, aFileName.ToCString() ) )
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : MustExecute
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean BREPPlugin_ExportDriver::MustExecute( const TFunction_Logbook& ) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
bool BREPPlugin_ExportDriver::
|
||||
GetCreationInformation( std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE( BREPPlugin_ExportDriver,GEOM_BaseDriver );
|
||||
IMPLEMENT_STANDARD_RTTIEXT( BREPPlugin_ExportDriver,GEOM_BaseDriver );
|
51
src/BREPPlugin/BREPPlugin_ExportDriver.hxx
Normal file
@ -0,0 +1,51 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 _BREPPlugin_ExportDriver_HXX
|
||||
#define _BREPPlugin_ExportDriver_HXX
|
||||
|
||||
// internal includes
|
||||
#include "BREPPlugin_Engine.hxx"
|
||||
|
||||
// GEOM includes
|
||||
#include "GEOM_BaseDriver.hxx"
|
||||
|
||||
// OCCT includes
|
||||
#include <TFunction_Logbook.hxx>
|
||||
|
||||
DEFINE_STANDARD_HANDLE( BREPPlugin_ExportDriver, GEOM_BaseDriver );
|
||||
|
||||
class BREPPLUGINENGINE_EXPORT BREPPlugin_ExportDriver : public GEOM_BaseDriver
|
||||
{
|
||||
public:
|
||||
BREPPlugin_ExportDriver();
|
||||
~BREPPlugin_ExportDriver() {};
|
||||
|
||||
static const Standard_GUID& GetID();
|
||||
virtual Standard_Integer Execute( TFunction_Logbook& log ) const;
|
||||
Standard_Boolean MustExecute( const TFunction_Logbook& ) const;
|
||||
virtual void Validate( TFunction_Logbook& ) const {}
|
||||
|
||||
virtual bool GetCreationInformation( std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params );
|
||||
|
||||
DEFINE_STANDARD_RTTI( BREPPlugin_ExportDriver )
|
||||
};
|
||||
|
||||
#endif // _BREPPlugin_ExportDriver_HXX
|
266
src/BREPPlugin/BREPPlugin_GUI.cxx
Normal file
@ -0,0 +1,266 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// internal includes
|
||||
#include "BREPPlugin_GUI.h"
|
||||
|
||||
// GUI includes
|
||||
#include <SUIT_Desktop.h>
|
||||
#include <SUIT_FileDlg.h>
|
||||
#include <SUIT_MessageBox.h>
|
||||
#include <SUIT_OverrideCursor.h>
|
||||
#include <SUIT_Tools.h>
|
||||
#include <LightApp_SelectionMgr.h>
|
||||
#include <SalomeApp_Application.h>
|
||||
#include <SalomeApp_Study.h>
|
||||
#include <SALOME_ListIteratorOfListIO.hxx>
|
||||
|
||||
// GEOM includes
|
||||
#include "GeometryGUI.h"
|
||||
#include "GEOM_Operation.h"
|
||||
#include "GEOMBase.h"
|
||||
#include "GEOM_Displayer.h"
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(BREPPlugin)
|
||||
|
||||
//=======================================================================
|
||||
// function : BREPPlugin_GUI()
|
||||
// purpose : Constructor
|
||||
//=======================================================================
|
||||
BREPPlugin_GUI::BREPPlugin_GUI( GeometryGUI* parent ) : GEOMPluginGUI( parent )
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : ~BREPPlugin_GUI
|
||||
// purpose : Destructor
|
||||
//=======================================================================
|
||||
BREPPlugin_GUI::~BREPPlugin_GUI()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : OnGUIEvent()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
bool BREPPlugin_GUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
|
||||
{
|
||||
QString cmd;
|
||||
switch ( theCommandID ) {
|
||||
case 1:
|
||||
cmd = "Export_BREP"; break;
|
||||
case 2:
|
||||
cmd = "Import_BREP"; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return OnGUIEvent( cmd, parent );
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : OnGUIEvent()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
bool BREPPlugin_GUI::OnGUIEvent( const QString& theCommandID, SUIT_Desktop* parent )
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if ( theCommandID == "Export_BREP" )
|
||||
{
|
||||
result = exportBREP( parent );
|
||||
}
|
||||
else if ( theCommandID == "Import_BREP" )
|
||||
{
|
||||
result = importBREP( parent );
|
||||
}
|
||||
else
|
||||
{
|
||||
getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : importBREP
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
|
||||
{
|
||||
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
||||
if ( !app ) return false;
|
||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
|
||||
if ( !study ) return false;
|
||||
|
||||
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
||||
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "BREPPluginEngine" );
|
||||
GEOM::IBREPOperations_var brepOp = GEOM::IBREPOperations::_narrow( op );
|
||||
if ( CORBA::is_nil( brepOp ) ) return false;
|
||||
|
||||
QStringList fileNames = app->getOpenFileNames( SUIT_FileDlg::getLastVisitedPath().isEmpty() ? QDir::currentPath() : QString(""),
|
||||
tr( "BREP_FILES" ),
|
||||
tr( "IMPORT_TITLE" ),
|
||||
parent );
|
||||
if ( fileNames.count() > 0 )
|
||||
{
|
||||
QStringList entryList;
|
||||
QStringList errors;
|
||||
|
||||
foreach( QString fileName, fileNames )
|
||||
{
|
||||
SUIT_OverrideCursor wc;
|
||||
GEOM_Operation transaction( app, brepOp.in() );
|
||||
|
||||
try
|
||||
{
|
||||
app->putInfo( tr( "GEOM_PRP_LOADING" ).arg( fileName ) );
|
||||
transaction.start();
|
||||
GEOM::ListOfGO_var result = brepOp->ImportBREP( fileName.toUtf8().constData() );
|
||||
if ( result->length() > 0 && brepOp->IsDone() )
|
||||
{
|
||||
GEOM::GEOM_Object_var main = result[0];
|
||||
QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
|
||||
SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( dsStudy,
|
||||
SALOMEDS::SObject::_nil(),
|
||||
main.in(),
|
||||
publishName.toUtf8().constData() );
|
||||
|
||||
entryList.append( so->GetID() );
|
||||
transaction.commit();
|
||||
GEOM_Displayer( study ).Display( main.in() );
|
||||
}
|
||||
else
|
||||
{
|
||||
transaction.abort();
|
||||
errors.append( QString( "%1 : %2" ).arg( fileName ).arg( brepOp->GetErrorCode() ) );
|
||||
}
|
||||
}
|
||||
catch( const SALOME::SALOME_Exception& e )
|
||||
{
|
||||
transaction.abort();
|
||||
}
|
||||
}
|
||||
getGeometryGUI()->updateObjBrowser( true );
|
||||
app->browseObjects( entryList );
|
||||
|
||||
if ( errors.count() > 0 )
|
||||
{
|
||||
SUIT_MessageBox::critical( parent,
|
||||
tr( "GEOM_ERROR" ),
|
||||
tr( "GEOM_IMPORT_ERRORS" ) + "\n" + errors.join( "\n" ) );
|
||||
}
|
||||
}
|
||||
return fileNames.count() > 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : exportBREP
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
bool BREPPlugin_GUI::exportBREP( SUIT_Desktop* parent )
|
||||
{
|
||||
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
||||
if ( !app ) return false;
|
||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
|
||||
if ( !study ) return false;
|
||||
|
||||
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
||||
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "BREPPluginEngine" );
|
||||
GEOM::IBREPOperations_var brepOp = GEOM::IBREPOperations::_narrow( op );
|
||||
if ( CORBA::is_nil( brepOp ) ) return false;
|
||||
|
||||
LightApp_SelectionMgr* sm = app->selectionMgr();
|
||||
if ( !sm ) return false;
|
||||
|
||||
SALOME_ListIO selectedObjects;
|
||||
sm->selectedObjects( selectedObjects );
|
||||
bool ok = false;
|
||||
|
||||
SALOME_ListIteratorOfListIO it( selectedObjects );
|
||||
for ( ; it.More(); it.Next() )
|
||||
{
|
||||
Handle(SALOME_InteractiveObject) io = it.Value();
|
||||
GEOM::GEOM_Object_var obj = GEOMBase::ConvertIOinGEOMObject( io );
|
||||
|
||||
if ( CORBA::is_nil( obj ) ) continue;
|
||||
|
||||
QString fileName = app->getFileName( false,
|
||||
QString( io->getName() ),
|
||||
tr( "BREP_FILES" ),
|
||||
tr( "EXPORT_TITLE" ),
|
||||
parent );
|
||||
|
||||
if ( fileName.isEmpty() )
|
||||
return false;
|
||||
|
||||
SUIT_OverrideCursor wc;
|
||||
|
||||
GEOM_Operation transaction( app, brepOp.in() );
|
||||
|
||||
try
|
||||
{
|
||||
app->putInfo( tr( "GEOM_PRP_EXPORT" ).arg( fileName ) );
|
||||
transaction.start();
|
||||
|
||||
brepOp->ExportBREP( obj, fileName.toUtf8().constData() );
|
||||
|
||||
if ( brepOp->IsDone() )
|
||||
{
|
||||
transaction.commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
transaction.abort();
|
||||
SUIT_MessageBox::critical( parent,
|
||||
tr( "GEOM_ERROR" ),
|
||||
tr( "GEOM_PRP_ABORT" ) + "\n" + tr( brepOp->GetErrorCode() ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch ( const SALOME::SALOME_Exception& e )
|
||||
{
|
||||
transaction.abort();
|
||||
return false;
|
||||
}
|
||||
ok = true;
|
||||
}
|
||||
|
||||
if ( !ok )
|
||||
{
|
||||
SUIT_MessageBox::warning( parent,
|
||||
tr( "WRN_WARNING" ),
|
||||
tr( "GEOM_WRN_NO_APPROPRIATE_SELECTION" ) );
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
//=====================================================================================
|
||||
// EXPORTED METHODS
|
||||
//=====================================================================================
|
||||
extern "C"
|
||||
{
|
||||
#ifdef WIN32
|
||||
__declspec( dllexport )
|
||||
#endif
|
||||
GEOMGUI* GetLibGUI( GeometryGUI* parent )
|
||||
{
|
||||
return new BREPPlugin_GUI( parent );
|
||||
}
|
||||
}
|
40
src/BREPPlugin/BREPPlugin_GUI.h
Normal file
@ -0,0 +1,40 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 BREPPlugin_GUI_H
|
||||
#define BREPPlugin_GUI_H
|
||||
|
||||
#include "GEOMPluginGUI.h"
|
||||
|
||||
class BREPPlugin_GUI: public GEOMPluginGUI
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
BREPPlugin_GUI( GeometryGUI* parent );
|
||||
~BREPPlugin_GUI();
|
||||
|
||||
bool OnGUIEvent( int commandId, SUIT_Desktop* );
|
||||
bool OnGUIEvent( const QString&, SUIT_Desktop* );
|
||||
|
||||
private:
|
||||
bool importBREP( SUIT_Desktop* );
|
||||
bool exportBREP( SUIT_Desktop* );
|
||||
};
|
||||
|
||||
#endif // BREPPlugin_GUI_H
|
72
src/BREPPlugin/BREPPlugin_IECallBack.cxx
Executable file
@ -0,0 +1,72 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// internal includes
|
||||
#include "BREPPlugin_IECallBack.hxx"
|
||||
#include "BREPPlugin_IOperations.hxx"
|
||||
#include "BREPPlugin_OperationsCreator.hxx"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* constructor
|
||||
*/
|
||||
//=============================================================================
|
||||
BREPPlugin_IECallBack::BREPPlugin_IECallBack()
|
||||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* destructor
|
||||
*/
|
||||
//=============================================================================
|
||||
BREPPlugin_IECallBack::~BREPPlugin_IECallBack()
|
||||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Export
|
||||
*/
|
||||
//=============================================================================
|
||||
bool
|
||||
BREPPlugin_IECallBack::Export( int theDocId,
|
||||
const Handle(GEOM_Object) theOriginal,
|
||||
const TCollection_AsciiString& theFileName,
|
||||
const TCollection_AsciiString& theFormatName )
|
||||
{
|
||||
BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine(), theDocId );
|
||||
aPluginOperations->ExportBREP( theOriginal, theFileName );
|
||||
return true;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Import
|
||||
*/
|
||||
//=============================================================================
|
||||
Handle(TColStd_HSequenceOfTransient)
|
||||
BREPPlugin_IECallBack::Import( int theDocId,
|
||||
const TCollection_AsciiString& theFormatName,
|
||||
const TCollection_AsciiString& theFileName )
|
||||
{
|
||||
BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine(), theDocId );
|
||||
return aPluginOperations->ImportBREP( theFileName );
|
||||
}
|
||||
|
49
src/BREPPlugin/BREPPlugin_IECallBack.hxx
Normal file
@ -0,0 +1,49 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 _BREPPlugin_IECallBack_HXX_
|
||||
#define _BREPPlugin_IECallBack_HXX_
|
||||
|
||||
// internal includes
|
||||
#include "BREPPlugin_Engine.hxx"
|
||||
|
||||
// GEOM includes
|
||||
#include "GEOM_Object.hxx"
|
||||
#include "GEOMImpl_IECallBack.hxx"
|
||||
|
||||
// OCC includes
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
class BREPPLUGINENGINE_EXPORT BREPPlugin_IECallBack : public GEOMImpl_IECallBack
|
||||
{
|
||||
public:
|
||||
BREPPlugin_IECallBack();
|
||||
~BREPPlugin_IECallBack();
|
||||
|
||||
bool Export( int theDocId,
|
||||
const Handle(GEOM_Object) theOriginal,
|
||||
const TCollection_AsciiString& theFileName,
|
||||
const TCollection_AsciiString& theFormatName );
|
||||
|
||||
Handle(TColStd_HSequenceOfTransient) Import( int theDocId,
|
||||
const TCollection_AsciiString& theFormatName,
|
||||
const TCollection_AsciiString& theFileName );
|
||||
};
|
||||
|
||||
#endif
|
48
src/BREPPlugin/BREPPlugin_IExport.hxx
Normal file
@ -0,0 +1,48 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 _BREPPlugin_IExport_HXX_
|
||||
#define _BREPPlugin_IExport_HXX_
|
||||
|
||||
#include "GEOM_Function.hxx"
|
||||
|
||||
#define EXPORTBREP_ARG_ORIGINAL 1
|
||||
#define EXPORTBREP_ARG_FILENAME 2
|
||||
|
||||
class BREPPlugin_IExport
|
||||
{
|
||||
public:
|
||||
BREPPlugin_IExport( Handle(GEOM_Function) theFunction )
|
||||
: _func(theFunction) {}
|
||||
|
||||
void SetOriginal( Handle( GEOM_Function ) theOriginal)
|
||||
{ _func->SetReference( EXPORTBREP_ARG_ORIGINAL, theOriginal ); }
|
||||
Handle( GEOM_Function ) GetOriginal()
|
||||
{ return _func->GetReference( EXPORTBREP_ARG_ORIGINAL ); }
|
||||
|
||||
void SetFileName( const TCollection_AsciiString& theFileName )
|
||||
{ _func->SetString( EXPORTBREP_ARG_FILENAME, theFileName ); }
|
||||
TCollection_AsciiString GetFileName()
|
||||
{ return _func->GetString( EXPORTBREP_ARG_FILENAME ); }
|
||||
|
||||
private:
|
||||
Handle(GEOM_Function) _func;
|
||||
};
|
||||
|
||||
#endif // _BREPPlugin_IExport_HXX_
|
42
src/BREPPlugin/BREPPlugin_IImport.hxx
Normal file
@ -0,0 +1,42 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 _BREPPlugin_IImport_HXX_
|
||||
#define _BREPPlugin_IImport_HXX_
|
||||
|
||||
#include "GEOM_Function.hxx"
|
||||
|
||||
#define IMPORTBREP_ARG_FILENAME 1
|
||||
|
||||
class BREPPlugin_IImport
|
||||
{
|
||||
public:
|
||||
BREPPlugin_IImport( Handle(GEOM_Function) theFunction)
|
||||
: _func(theFunction) {}
|
||||
|
||||
void SetFileName( const TCollection_AsciiString& theFileName )
|
||||
{ _func->SetString( IMPORTBREP_ARG_FILENAME, theFileName ); }
|
||||
TCollection_AsciiString GetFileName()
|
||||
{ return _func->GetString( IMPORTBREP_ARG_FILENAME ); }
|
||||
|
||||
private:
|
||||
Handle(GEOM_Function) _func;
|
||||
};
|
||||
|
||||
#endif // _BREPPlugin_IImport_HXX_
|
171
src/BREPPlugin/BREPPlugin_IOperations.cxx
Normal file
@ -0,0 +1,171 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// internal includes
|
||||
#include "BREPPlugin_IOperations.hxx"
|
||||
#include "BREPPlugin_ExportDriver.hxx"
|
||||
#include "BREPPlugin_ImportDriver.hxx"
|
||||
#include "BREPPlugin_IExport.hxx"
|
||||
#include "BREPPlugin_IImport.hxx"
|
||||
|
||||
// KERNEL includes
|
||||
#include <utilities.h>
|
||||
|
||||
// GEOM includes
|
||||
#include "GEOM_PythonDump.hxx"
|
||||
#include "GEOMImpl_Types.hxx"
|
||||
|
||||
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Constructor
|
||||
*/
|
||||
//=============================================================================
|
||||
BREPPlugin_IOperations::BREPPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
|
||||
: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
|
||||
{
|
||||
MESSAGE( "BREPPlugin_IOperations::BREPPlugin_IOperations" );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Destructor
|
||||
*/
|
||||
//=============================================================================
|
||||
BREPPlugin_IOperations::~BREPPlugin_IOperations()
|
||||
{
|
||||
MESSAGE( "BREPPlugin_IOperations::~BREPPlugin_IOperations" );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* ExportBREP
|
||||
* Export a shape to BREP format
|
||||
* \param theOriginal The shape to export
|
||||
* \param theFileName The name of the file to exported
|
||||
* \param theIsASCII The format of the exported file (ASCII or Binary)
|
||||
* \param theDeflection The deflection of the shape to exported
|
||||
*/
|
||||
//=============================================================================
|
||||
void BREPPlugin_IOperations::ExportBREP( const Handle(GEOM_Object) theOriginal,
|
||||
const TCollection_AsciiString& theFileName )
|
||||
{
|
||||
SetErrorCode(KO);
|
||||
if( theOriginal.IsNull() ) return;
|
||||
|
||||
Handle(GEOM_Function) aRefFunction = theOriginal->GetLastFunction();
|
||||
if( aRefFunction.IsNull() ) return; //There is no function which creates an object to be exported
|
||||
|
||||
//Add a new result object
|
||||
Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
|
||||
|
||||
//Add an Export function
|
||||
Handle(GEOM_Function) aFunction = result->AddFunction( BREPPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
|
||||
if( aFunction.IsNull() ) return;
|
||||
|
||||
//Check if the function is set correctly
|
||||
if( aFunction->GetDriverGUID() != BREPPlugin_ExportDriver::GetID() ) return;
|
||||
|
||||
//Set parameters
|
||||
BREPPlugin_IExport aCI( aFunction );
|
||||
aCI.SetOriginal( aRefFunction );
|
||||
aCI.SetFileName( theFileName );
|
||||
|
||||
//Perform the Export
|
||||
try {
|
||||
#if OCC_VERSION_LARGE > 0x06010000
|
||||
OCC_CATCH_SIGNALS;
|
||||
#endif
|
||||
if( !GetSolver()->ComputeFunction( aFunction ) ) {
|
||||
SetErrorCode( "Not enough space on disk, or you haven't permissions to write this directory" );
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch( Standard_Failure ) {
|
||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||
SetErrorCode( aFail->GetMessageString() );
|
||||
return;
|
||||
}
|
||||
|
||||
//Make a Python command
|
||||
GEOM::TPythonDump(aFunction) << "geompy.ExportBREP(" << theOriginal << ", \""
|
||||
<< theFileName.ToCString() << "\" )";
|
||||
|
||||
SetErrorCode(OK);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* ImportBREP
|
||||
* Import a shape from BREP format
|
||||
* \param theFileName The name of the file to import
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
//=============================================================================
|
||||
Handle(TColStd_HSequenceOfTransient)
|
||||
BREPPlugin_IOperations::ImportBREP( const TCollection_AsciiString& theFileName )
|
||||
{
|
||||
SetErrorCode(KO);
|
||||
if( theFileName.IsEmpty() ) return NULL;
|
||||
|
||||
//Add a new result object
|
||||
Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
|
||||
|
||||
//Add an Import function
|
||||
Handle(GEOM_Function) aFunction =
|
||||
anImported->AddFunction( BREPPlugin_ImportDriver::GetID(), IMPORT_SHAPE);
|
||||
if (aFunction.IsNull()) return NULL;
|
||||
|
||||
//Check if the function is set correctly
|
||||
if (aFunction->GetDriverGUID() != BREPPlugin_ImportDriver::GetID()) return NULL;
|
||||
|
||||
//Set parameters
|
||||
BREPPlugin_IImport aCI( aFunction );
|
||||
aCI.SetFileName( theFileName );
|
||||
|
||||
//Perform the Import
|
||||
Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
|
||||
|
||||
try {
|
||||
#if OCC_VERSION_LARGE > 0x06010000
|
||||
OCC_CATCH_SIGNALS;
|
||||
#endif
|
||||
if( !GetSolver()->ComputeFunction( aFunction ) ) {
|
||||
SetErrorCode( "Import driver failed" );
|
||||
return NULL;
|
||||
}
|
||||
aSeq->Append(anImported);
|
||||
|
||||
// Greate material groups.
|
||||
// MakeMaterialGroups( anImported, aSeq );
|
||||
}
|
||||
catch( Standard_Failure ) {
|
||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||
SetErrorCode( aFail->GetMessageString() );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//Make a Python command
|
||||
GEOM::TPythonDump pd (aFunction);
|
||||
pd << aSeq << " = geompy.ImportBREP(\"" << theFileName.ToCString() << "\" )";
|
||||
SetErrorCode(OK);
|
||||
|
||||
return aSeq;
|
||||
}
|
42
src/BREPPlugin/BREPPlugin_IOperations.hxx
Normal file
@ -0,0 +1,42 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 : BREPPlugin_IOperations.hxx
|
||||
|
||||
#ifndef _BREPPlugin_IOperations_HXX_
|
||||
#define _BREPPlugin_IOperations_HXX_
|
||||
|
||||
// internal includes
|
||||
#include "BREPPlugin_Engine.hxx"
|
||||
|
||||
// GEOM includes
|
||||
#include "GEOMImpl_IBaseIEOperations.hxx"
|
||||
|
||||
class BREPPLUGINENGINE_EXPORT BREPPlugin_IOperations: public GEOMImpl_IBaseIEOperations
|
||||
{
|
||||
public:
|
||||
BREPPlugin_IOperations( GEOM_Engine*, int );
|
||||
~BREPPlugin_IOperations();
|
||||
|
||||
void ExportBREP( const Handle(GEOM_Object),
|
||||
const TCollection_AsciiString& );
|
||||
|
||||
Handle(TColStd_HSequenceOfTransient) ImportBREP( const TCollection_AsciiString& );
|
||||
};
|
||||
|
||||
#endif
|
108
src/BREPPlugin/BREPPlugin_IOperations_i.cc
Normal file
@ -0,0 +1,108 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// internal includes
|
||||
#include "BREPPlugin_IOperations_i.hh"
|
||||
#include "BREPPlugin_IOperations.hxx"
|
||||
|
||||
// KERNEL includes
|
||||
#include <utilities.h>
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* constructor:
|
||||
*/
|
||||
//=============================================================================
|
||||
BREPPlugin_IOperations_i::BREPPlugin_IOperations_i( PortableServer::POA_ptr thePOA,
|
||||
GEOM::GEOM_Gen_ptr theEngine,
|
||||
BREPPlugin_IOperations* theImpl )
|
||||
:GEOM_IOperations_i( thePOA, theEngine, theImpl )
|
||||
{
|
||||
MESSAGE( "BREPPlugin_IOperations_i::BREPPlugin_IOperations_i" );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* destructor
|
||||
*/
|
||||
//=============================================================================
|
||||
BREPPlugin_IOperations_i::~BREPPlugin_IOperations_i()
|
||||
{
|
||||
MESSAGE( "BREPPlugin_IOperations_i::~BREPPlugin_IOperations_i" );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* ExportBREP
|
||||
* Export a shape to BREP format
|
||||
* \param theOriginal The shape to export
|
||||
* \param theFileName The name of the exported file
|
||||
*/
|
||||
//=============================================================================
|
||||
void BREPPlugin_IOperations_i::ExportBREP( GEOM::GEOM_Object_ptr theOriginal,
|
||||
const char* theFileName )
|
||||
{
|
||||
// duplicate the original shape
|
||||
GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate( theOriginal );
|
||||
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
//Get the reference shape
|
||||
Handle(GEOM_Object) anOriginal = GetObjectImpl( theOriginal );
|
||||
if (anOriginal.IsNull()) return;
|
||||
|
||||
//Export the shape to the file
|
||||
GetOperations()->ExportBREP( anOriginal, theFileName );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* ImportBREP
|
||||
* Import a shape from BREP format
|
||||
* \param theFileName The name of the file to import
|
||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::ListOfGO* BREPPlugin_IOperations_i::ImportBREP( const char* theFileName )
|
||||
{
|
||||
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
|
||||
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
//Import the shape from the file
|
||||
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->ImportBREP( theFileName );
|
||||
|
||||
if( !GetOperations()->IsDone() || aHSeq.IsNull() )
|
||||
return aSeq._retn();
|
||||
|
||||
// Copy created objects.
|
||||
Standard_Integer aLength = aHSeq->Length();
|
||||
aSeq->length( aLength );
|
||||
for( Standard_Integer i = 1; i <= aLength; i++ )
|
||||
aSeq[i-1] = GetObject( Handle(GEOM_Object)::DownCast( aHSeq->Value(i) ) );
|
||||
|
||||
return aSeq._retn();
|
||||
}
|
||||
|
||||
BREPPlugin_IOperations* BREPPlugin_IOperations_i::GetOperations()
|
||||
{
|
||||
return (BREPPlugin_IOperations*)GetImpl();
|
||||
}
|
52
src/BREPPlugin/BREPPlugin_IOperations_i.hh
Normal file
@ -0,0 +1,52 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 _BREPPlugin_IOperations_i_HeaderFile
|
||||
#define _BREPPlugin_IOperations_i_HeaderFile
|
||||
|
||||
// idl includes
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER( GEOM_Gen )
|
||||
#include CORBA_SERVER_HEADER( BREPPlugin )
|
||||
|
||||
// internal includes
|
||||
#include "BREPPlugin_Engine.hxx"
|
||||
|
||||
// GEOM includes
|
||||
#include "GEOM_IOperations_i.hh"
|
||||
|
||||
class BREPPlugin_IOperations;
|
||||
|
||||
class BREPPLUGINENGINE_EXPORT BREPPlugin_IOperations_i :
|
||||
public virtual POA_GEOM::IBREPOperations,
|
||||
public virtual GEOM_IOperations_i
|
||||
{
|
||||
public:
|
||||
BREPPlugin_IOperations_i( PortableServer::POA_ptr thePOA,
|
||||
GEOM::GEOM_Gen_ptr theEngine,
|
||||
BREPPlugin_IOperations* theImpl );
|
||||
~BREPPlugin_IOperations_i();
|
||||
|
||||
void ExportBREP( GEOM::GEOM_Object_ptr, const char* );
|
||||
GEOM::ListOfGO* ImportBREP( const char* );
|
||||
|
||||
BREPPlugin_IOperations* GetOperations();
|
||||
};
|
||||
|
||||
#endif // _BREPPlugin_IOperations_i_HeaderFile
|
122
src/BREPPlugin/BREPPlugin_ImportDriver.cxx
Normal file
@ -0,0 +1,122 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// internal includes
|
||||
#include "BREPPlugin_ImportDriver.hxx"
|
||||
#include "BREPPlugin_IImport.hxx"
|
||||
|
||||
// KERNEL includes
|
||||
#include <utilities.h>
|
||||
#include <Basics_Utils.hxx>
|
||||
|
||||
// GEOM includes
|
||||
#include "GEOM_Function.hxx"
|
||||
#include "GEOMImpl_Types.hxx"
|
||||
|
||||
// OOCT includes
|
||||
#include <BRepTools.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : GetID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Standard_GUID& BREPPlugin_ImportDriver::GetID()
|
||||
{
|
||||
static Standard_GUID aGUID("7e1b28ec-8513-4217-b09c-7652fbe8149e");
|
||||
return aGUID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : BREPPlugin_ImportDriver
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
BREPPlugin_ImportDriver::BREPPlugin_ImportDriver()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Execute
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Integer BREPPlugin_ImportDriver::Execute( TFunction_Logbook& log ) const
|
||||
{
|
||||
if( Label().IsNull() ) return 0;
|
||||
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
|
||||
|
||||
BREPPlugin_IImport aData( aFunction );
|
||||
|
||||
TCollection_AsciiString aFileName = aData.GetFileName().ToCString();
|
||||
|
||||
MESSAGE("Import BREP from file " << aFileName);
|
||||
|
||||
// Set "C" numeric locale to save numbers correctly
|
||||
Kernel_Utils::Localizer loc;
|
||||
|
||||
TopoDS_Shape aShape;
|
||||
BRep_Builder B;
|
||||
BRepTools::Read(aShape, aFileName.ToCString(), B);
|
||||
if( aShape.IsNull() ) return 0;
|
||||
|
||||
aFunction->SetValue( aShape );
|
||||
|
||||
log.SetTouched( Label() );
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : MustExecute
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean BREPPlugin_ImportDriver::MustExecute( const TFunction_Logbook& ) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Returns a name of creation operation and names and values of creation parameters
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
bool BREPPlugin_ImportDriver::
|
||||
GetCreationInformation( std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& theParams )
|
||||
{
|
||||
if( Label().IsNull() ) return 0;
|
||||
Handle(GEOM_Function) function = GEOM_Function::GetFunction( Label() );
|
||||
|
||||
BREPPlugin_IImport aCI( function );
|
||||
Standard_Integer aType = function->GetType();
|
||||
|
||||
theOperationName = "ImportBREP";
|
||||
|
||||
switch ( aType ) {
|
||||
case IMPORT_SHAPE:
|
||||
AddParam( theParams, "File name", aCI.GetFileName() );
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE( BREPPlugin_ImportDriver, GEOM_BaseDriver );
|
||||
IMPLEMENT_STANDARD_RTTIEXT( BREPPlugin_ImportDriver, GEOM_BaseDriver );
|
51
src/BREPPlugin/BREPPlugin_ImportDriver.hxx
Normal file
@ -0,0 +1,51 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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 _BREPPlugin_ImportDriver_HXX
|
||||
#define _BREPPlugin_ImportDriver_HXX
|
||||
|
||||
// internal includes
|
||||
#include "BREPPlugin_Engine.hxx"
|
||||
|
||||
// GEOM includes
|
||||
#include "GEOM_BaseDriver.hxx"
|
||||
|
||||
// OCCT includes
|
||||
#include <TFunction_Logbook.hxx>
|
||||
|
||||
DEFINE_STANDARD_HANDLE( BREPPlugin_ImportDriver, GEOM_BaseDriver );
|
||||
|
||||
class BREPPLUGINENGINE_EXPORT BREPPlugin_ImportDriver : public GEOM_BaseDriver
|
||||
{
|
||||
public:
|
||||
BREPPlugin_ImportDriver();
|
||||
~BREPPlugin_ImportDriver() {};
|
||||
|
||||
static const Standard_GUID& GetID();
|
||||
virtual Standard_Integer Execute( TFunction_Logbook& log ) const;
|
||||
Standard_Boolean MustExecute( const TFunction_Logbook& ) const;
|
||||
virtual void Validate( TFunction_Logbook& ) const {}
|
||||
|
||||
virtual bool GetCreationInformation( std::string& theOperationName,
|
||||
std::vector<GEOM_Param>& params );
|
||||
|
||||
DEFINE_STANDARD_RTTI( BREPPlugin_ImportDriver )
|
||||
};
|
||||
|
||||
#endif // _BREPPlugin_ImportDriver_HXX
|
69
src/BREPPlugin/BREPPlugin_OperationsCreator.cxx
Normal file
@ -0,0 +1,69 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// internal includes
|
||||
#include "BREPPlugin_OperationsCreator.hxx"
|
||||
#include "BREPPlugin_IOperations_i.hh"
|
||||
#include "BREPPlugin_IOperations.hxx"
|
||||
#include "BREPPlugin_ExportDriver.hxx"
|
||||
#include "BREPPlugin_ImportDriver.hxx"
|
||||
#include "BREPPlugin_IECallBack.hxx"
|
||||
|
||||
// KERNEL includes
|
||||
#include <Utils_ExceptHandlers.hxx>
|
||||
#include <utilities.h>
|
||||
|
||||
// OCCT includes
|
||||
#include <TFunction_DriverTable.hxx>
|
||||
|
||||
std::map <int, BREPPlugin_IOperations*> BREPPlugin_OperationsCreator::_mapOfOperations;
|
||||
|
||||
BREPPlugin_OperationsCreator::BREPPlugin_OperationsCreator()
|
||||
{
|
||||
// Register drivers
|
||||
TFunction_DriverTable::Get()->AddDriver( BREPPlugin_ExportDriver::GetID(),
|
||||
new BREPPlugin_ExportDriver() );
|
||||
TFunction_DriverTable::Get()->AddDriver( BREPPlugin_ImportDriver::GetID(),
|
||||
new BREPPlugin_ImportDriver() );
|
||||
// Register callback
|
||||
BREPPlugin_IECallBack* callback = new BREPPlugin_IECallBack();
|
||||
GEOMImpl_IECallBack::Register( "BREP", callback );
|
||||
}
|
||||
|
||||
BREPPlugin_OperationsCreator::~BREPPlugin_OperationsCreator()
|
||||
{
|
||||
}
|
||||
|
||||
GEOM_IOperations_i* BREPPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
GEOM::GEOM_Gen_ptr theEngine,
|
||||
::GEOMImpl_Gen* theGenImpl )
|
||||
{
|
||||
Unexpect aCatch( SALOME_SalomeException );
|
||||
MESSAGE( "BREPPlugin_OperationsCreator::Create" );
|
||||
return new BREPPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
|
||||
}
|
||||
|
||||
BREPPlugin_IOperations* BREPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
|
||||
int theStudyId )
|
||||
{
|
||||
if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
|
||||
_mapOfOperations[theStudyId] = new BREPPlugin_IOperations( theGenImpl, theStudyId );
|
||||
return _mapOfOperations[theStudyId];
|
||||
}
|
57
src/BREPPlugin/BREPPlugin_OperationsCreator.hxx
Executable file
@ -0,0 +1,57 @@
|
||||
// Copyright (C) 2014 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, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// 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_BREPPlugin_OperationsCreator_HXX_
|
||||
#define _GEOM_BREPPlugin_OperationsCreator_HXX_
|
||||
|
||||
// internal includes
|
||||
#include "BREPPlugin_Engine.hxx"
|
||||
|
||||
// GEOM includes
|
||||
#include "GEOM_Gen_i.hh"
|
||||
|
||||
// C++ includes
|
||||
#include <map>
|
||||
|
||||
class BREPPlugin_IOperations;
|
||||
|
||||
//=====================================================================
|
||||
// Operations creator
|
||||
//=====================================================================
|
||||
class BREPPLUGINENGINE_EXPORT BREPPlugin_OperationsCreator : public GEOM_GenericOperationsCreator
|
||||
{
|
||||
public:
|
||||
BREPPlugin_OperationsCreator();
|
||||
~BREPPlugin_OperationsCreator();
|
||||
|
||||
GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
GEOM::GEOM_Gen_ptr theEngine,
|
||||
::GEOMImpl_Gen* theGenImpl );
|
||||
private:
|
||||
static BREPPlugin_IOperations* get( ::GEOMImpl_Gen* theGenImpl,
|
||||
int theStudyId );
|
||||
|
||||
private:
|
||||
static std::map <int, BREPPlugin_IOperations*> _mapOfOperations;
|
||||
|
||||
friend class BREPPlugin_IECallBack;
|
||||
};
|
||||
|
||||
#endif
|
46
src/BREPPlugin/BREPPlugin_msg_en.ts
Normal file
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="en_US">
|
||||
<context>
|
||||
<name>@default</name>
|
||||
<message>
|
||||
<source>MEN_EXPORTBREP</source>
|
||||
<translation>BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TOP_EXPORTBREP</source>
|
||||
<translation>Export BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>STB_EXPORTBREP</source>
|
||||
<translation>Export BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MEN_IMPORTBREP</source>
|
||||
<translation>BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TOP_IMPORTBREP</source>
|
||||
<translation>Import BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>STB_IMPORTBREP</source>
|
||||
<translation>Import BREP</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BREPPlugin_GUI</name>
|
||||
<message>
|
||||
<source>BREP_FILES</source>
|
||||
<translation>BREP files( *.brep )</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>EXPORT_TITLE</source>
|
||||
<translation>Export BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>IMPORT_TITLE</source>
|
||||
<translation>Import BREP</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
46
src/BREPPlugin/BREPPlugin_msg_fr.ts
Normal file
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="fr_US">
|
||||
<context>
|
||||
<name>@default</name>
|
||||
<message>
|
||||
<source>MEN_EXPORTBREP</source>
|
||||
<translation>BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TOP_EXPORTBREP</source>
|
||||
<translation>Exporter BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>STB_EXPORTBREP</source>
|
||||
<translation>Exporter BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MEN_IMPORTBREP</source>
|
||||
<translation>BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TOP_IMPORTBREP</source>
|
||||
<translation>Importer BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>STB_IMPORTBREP</source>
|
||||
<translation>Importer BREP</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BREPPlugin_GUI</name>
|
||||
<message>
|
||||
<source>BREP_FILES</source>
|
||||
<translation>BREP Fichiers( *.brep )</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>EXPORT_TITLE</source>
|
||||
<translation>Exporter BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>IMPORT_TITLE</source>
|
||||
<translation>Importer BREP</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
46
src/BREPPlugin/BREPPlugin_msg_ja.ts
Normal file
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="ja" sourcelanguage="en">
|
||||
<context>
|
||||
<name>@default</name>
|
||||
<message>
|
||||
<source>MEN_EXPORTBREP</source>
|
||||
<translation type="unfinished">BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TOP_EXPORTBREP</source>
|
||||
<translation type="unfinished">Export BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>STB_EXPORTBREP</source>
|
||||
<translation type="unfinished">Export BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MEN_IMPORTBREP</source>
|
||||
<translation type="unfinished">BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TOP_IMPORTBREP</source>
|
||||
<translation type="unfinished">Import BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>STB_IMPORTBREP</source>
|
||||
<translation type="unfinished">Import BREP</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BREPPlugin_GUI</name>
|
||||
<message>
|
||||
<source>BREP_FILES</source>
|
||||
<translation type="unfinished">BREP files( *.brep )</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>EXPORT_TITLE</source>
|
||||
<translation type="unfinished">Export BREP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>IMPORT_TITLE</source>
|
||||
<translation type="unfinished">Import BREP</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
147
src/BREPPlugin/CMakeLists.txt
Normal file
@ -0,0 +1,147 @@
|
||||
# Copyright (C) 2014 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, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
IF(SALOME_BUILD_GUI)
|
||||
INCLUDE(UseQt4Ext)
|
||||
INCLUDE(${QT_USE_FILE})
|
||||
ENDIF()
|
||||
|
||||
# --- options ---
|
||||
|
||||
# additional include directories
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CAS_INCLUDE_DIRS}
|
||||
${KERNEL_INCLUDE_DIRS}
|
||||
${PROJECT_BINARY_DIR}/idl
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
|
||||
${PROJECT_SOURCE_DIR}/src/GEOM
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMImpl
|
||||
${PROJECT_SOURCE_DIR}/src/GEOM_I
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMClient
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMUtils
|
||||
)
|
||||
|
||||
IF(SALOME_BUILD_GUI)
|
||||
INCLUDE_DIRECTORIES(
|
||||
${QT_INCLUDE_DIRS}
|
||||
${GUI_INCLUDE_DIRS}
|
||||
${PROJECT_SOURCE_DIR}/src/OBJECT
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMGUI
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMBase
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
# additional preprocessor / compiler flags
|
||||
ADD_DEFINITIONS(
|
||||
${CAS_DEFINITIONS}
|
||||
)
|
||||
|
||||
IF(SALOME_BUILD_GUI)
|
||||
ADD_DEFINITIONS(
|
||||
${QT_DEFINITIONS}
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
# libraries to link to
|
||||
SET(_link_engine_LIBRARIES
|
||||
${CAS_TKBREP}
|
||||
${KERNEL_SALOMELocalTrace}
|
||||
${KERNEL_OpUtil}
|
||||
SalomeIDLGEOM
|
||||
SalomeIDLBREPPlugin
|
||||
GEOMEngine
|
||||
GEOMClient
|
||||
)
|
||||
|
||||
IF(SALOME_BUILD_GUI)
|
||||
SET(_link_gui_LIBRARIES
|
||||
SalomeIDLBREPPlugin
|
||||
GEOMObject
|
||||
GEOM
|
||||
GEOMBase
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
||||
# --- headers ---
|
||||
|
||||
SET(BREPPluginEngine_HEADERS
|
||||
BREPPlugin_IOperations_i.hh
|
||||
BREPPlugin_Engine.hxx
|
||||
BREPPlugin_OperationsCreator.hxx
|
||||
BREPPlugin_IOperations.hxx
|
||||
BREPPlugin_IExport.hxx
|
||||
BREPPlugin_IImport.hxx
|
||||
BREPPlugin_ImportDriver.hxx
|
||||
BREPPlugin_ExportDriver.hxx
|
||||
BREPPlugin_IECallBack.hxx
|
||||
)
|
||||
|
||||
IF(SALOME_BUILD_GUI)
|
||||
# header files / to be processed by moc
|
||||
SET(_moc_HEADERS
|
||||
BREPPlugin_GUI.h
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
# --- sources ---
|
||||
|
||||
IF(SALOME_BUILD_GUI)
|
||||
# sources / moc wrappings
|
||||
QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
|
||||
|
||||
SET(BREPPluginGUI_SOURCES
|
||||
BREPPlugin_GUI.cxx
|
||||
${_moc_SOURCES}
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
SET(BREPPluginEngine_SOURCES
|
||||
BREPPlugin_Engine.cxx
|
||||
BREPPlugin_OperationsCreator.cxx
|
||||
BREPPlugin_IOperations_i.cc
|
||||
BREPPlugin_IOperations.cxx
|
||||
BREPPlugin_ExportDriver.cxx
|
||||
BREPPlugin_ImportDriver.cxx
|
||||
BREPPlugin_IECallBack.cxx
|
||||
)
|
||||
|
||||
# resource files / to be processed by lrelease
|
||||
SET(BREPPlugin_RESOURCES
|
||||
BREPPlugin_msg_en.ts
|
||||
BREPPlugin_msg_fr.ts
|
||||
BREPPlugin_msg_ja.ts
|
||||
)
|
||||
|
||||
# --- rules ---
|
||||
|
||||
ADD_LIBRARY(BREPPluginEngine ${BREPPluginEngine_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(BREPPluginEngine ${_link_engine_LIBRARIES})
|
||||
INSTALL(TARGETS BREPPluginEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
IF(SALOME_BUILD_GUI)
|
||||
ADD_LIBRARY(BREPPluginGUI ${BREPPluginGUI_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(BREPPluginGUI ${_link_gui_LIBRARIES})
|
||||
INSTALL(TARGETS BREPPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
QT4_INSTALL_TS_RESOURCES("${BREPPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
|
||||
ENDIF()
|
||||
|
||||
|
||||
INSTALL(FILES ${BREPPluginEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
|
@ -21,10 +21,10 @@
|
||||
# Common packages
|
||||
##
|
||||
SET(SUBDIRS_COMMON
|
||||
ARCHIMEDE BlockFix GEOMAlgo SKETCHER GEOM BREPExport
|
||||
BREPImport IGESExport IGESImport STEPExport STEPImport STLExport STLImport
|
||||
ShHealOper GEOMUtils XAO XAO_Swig GEOMImpl GEOM_I GEOMClient GEOM_I_Superv GEOM_SWIG GEOM_PY
|
||||
AdvancedEngine OCC2VTK VTKExport
|
||||
ARCHIMEDE BlockFix GEOMAlgo SKETCHER GEOM ShHealOper GEOMUtils XAO XAO_Swig
|
||||
GEOMImpl GEOM_I GEOMClient GEOM_I_Superv GEOM_SWIG GEOM_PY
|
||||
AdvancedEngine OCC2VTK
|
||||
STLPlugin BREPPlugin STEPPlugin IGESPlugin XAOPlugin VTKPlugin
|
||||
)
|
||||
|
||||
##
|
||||
@ -53,7 +53,7 @@ IF(SALOME_BUILD_GUI)
|
||||
OBJECT DlgRef GEOMFiltersSelection Material GEOMGUI
|
||||
GEOMBase DependencyTree GEOMToolsGUI DisplayGUI BasicGUI PrimitiveGUI GenerationGUI
|
||||
EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI
|
||||
RepairGUI MeasureGUI GroupGUI BlocksGUI AdvancedGUI ImportExportGUI
|
||||
RepairGUI MeasureGUI GroupGUI BlocksGUI AdvancedGUI
|
||||
GEOM_SWIG_WITHIHM
|
||||
)
|
||||
ENDIF()
|
||||
|
@ -101,7 +101,6 @@ SET(_uic_files
|
||||
DlgRef_4Sel1Spin3Check_QTD.ui
|
||||
DlgRef_4Spin_QTD.ui
|
||||
DlgRef_6Sel_QTD.ui
|
||||
DlgRef_Skeleton_QTD.ui
|
||||
)
|
||||
|
||||
# --- headers ---
|
||||
|
@ -898,20 +898,6 @@ DlgRef_6Sel::~DlgRef_6Sel()
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////
|
||||
// DlgRef_Skeleton
|
||||
//////////////////////////////////////////
|
||||
|
||||
DlgRef_Skeleton::DlgRef_Skeleton( QWidget* parent, Qt::WindowFlags f )
|
||||
: QWidget( parent, f )
|
||||
{
|
||||
setupUi( this );
|
||||
}
|
||||
|
||||
DlgRef_Skeleton::~DlgRef_Skeleton()
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////
|
||||
// Utility functions
|
||||
//////////////////////////////////////////
|
||||
|
@ -972,22 +972,6 @@ public:
|
||||
~DlgRef_6Sel();
|
||||
};
|
||||
|
||||
//////////////////////////////////////////
|
||||
// DlgRef_Skeleton
|
||||
//////////////////////////////////////////
|
||||
|
||||
#include "ui_DlgRef_Skeleton_QTD.h"
|
||||
|
||||
class DLGREF_EXPORT DlgRef_Skeleton : public QWidget,
|
||||
public Ui::DlgRef_Skeleton_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DlgRef_Skeleton( QWidget* = 0, Qt::WindowFlags = 0 );
|
||||
~DlgRef_Skeleton();
|
||||
};
|
||||
|
||||
//////////////////////////////////////////
|
||||
// Utility functions
|
||||
//////////////////////////////////////////
|
||||
|
@ -65,6 +65,7 @@ SET(GEOM_HEADERS
|
||||
GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx
|
||||
GEOM_DataMapOfAsciiStringTransient.hxx
|
||||
Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx
|
||||
GEOM_BaseObject.hxx
|
||||
)
|
||||
|
||||
# --- sources ---
|
||||
|