Merge branch 'master' into rnc/t_shape_plugin

This commit is contained in:
Paul RASCLE 2016-01-07 18:01:56 +01:00
commit 5e3080a50e
1389 changed files with 34975 additions and 10456 deletions

View File

@ -1,4 +1,4 @@
# Copyright (C) 2013-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2013-2015 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
@ -30,8 +30,8 @@ CMAKE_POLICY(SET CMP0003 NEW)
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
SET(${PROJECT_NAME_UC}_MINOR_VERSION 4)
SET(${PROJECT_NAME_UC}_PATCH_VERSION 1)
SET(${PROJECT_NAME_UC}_MINOR_VERSION 7)
SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
SET(${PROJECT_NAME_UC}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
@ -108,7 +108,9 @@ IF(SALOME_BUILD_GUI)
IF(EXISTS ${GUI_ROOT_DIR})
LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
FIND_PACKAGE(SalomeGUI)
FULL_GUI(TRUE) #check whether GUI builded in full mode and with CORBA
SALOME_GUI_WITH_CORBA() #check whether GUI builded with CORBA
SALOME_GUI_MODE(SALOME_USE_OCCVIEWER SALOME_USE_VTKVIEWER SALOME_USE_SALOMEOBJECT
OPTIONAL SALOME_USE_PLOT2DVIEWER SALOME_USE_GRAPHICSVIEW SALOME_USE_PYCONSOLE)
ADD_DEFINITIONS(${GUI_DEFINITIONS})
INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS})
ELSE(EXISTS ${GUI_ROOT_DIR})
@ -125,12 +127,6 @@ IF(SALOME_BUILD_GUI)
# Qt4
FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml)
# Optional prerequisites for GUI
IF(SALOME_USE_GLVIEWER)
FIND_PACKAGE(SalomeOpenGL)
SALOME_LOG_OPTIONAL_PACKAGE(OpenGL SALOME_USE_GLVIEWER)
ENDIF()
ENDIF(SALOME_BUILD_GUI)
##
@ -231,9 +227,12 @@ IF(SALOME_BUILD_GUI)
LIST(APPEND _${PROJECT_NAME}_exposed_targets
AdvancedGUI BasicGUI BlocksGUI BooleanGUI BuildGUI DisplayGUI DlgRef CurveCreator EntityGUI GEOMBase
GEOMFiltersSelection GEOM GEOMToolsGUI GenerationGUI GroupGUI Material MeasureGUI GEOMObject
OperationGUI PrimitiveGUI RepairGUI TransformationGUI DependencyTree
OperationGUI PrimitiveGUI RepairGUI TransformationGUI
STLPluginGUI BREPPluginGUI STEPPluginGUI IGESPluginGUI XAOPluginGUI VTKPluginGUI
)
IF(SALOME_USE_GRAPHICSVIEW)
LIST(APPEND _${PROJECT_NAME}_exposed_targets DependencyTree)
ENDIF(SALOME_USE_GRAPHICSVIEW)
ENDIF(SALOME_BUILD_GUI)
IF(SALOME_GEOM_USE_OPENCV)

View File

@ -1,4 +1,4 @@
// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
// Copyright (C) 2007-2015 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

View File

@ -1,4 +1,4 @@
# Copyright (C) 2013-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2013-2015 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

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2007-2015 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

View File

@ -1,4 +1,4 @@
# Copyright (C) 2012-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2012-2015 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

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2007-2015 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

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2007-2015 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

View File

@ -1,4 +1,4 @@
# Copyright (C) 2013-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2013-2015 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
@ -23,7 +23,14 @@
#
# !! Please read the generic detection procedure in SalomeMacros.cmake !!
#
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenCV OpenCV_DIR 2)
SET(UpCount 2)
IF (WIN32)
SET(UpCount 0)
ENDIF (WIN32)
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenCV OpenCV_DIR ${UpCount})
#MARK_AS_ADVANCED()
IF(OpenCV_FOUND)

View File

@ -1,4 +1,4 @@
# Copyright (C) 2012-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2012-2015 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

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2007-2015 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

View File

@ -1,4 +1,4 @@
dnl Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
dnl Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
dnl
dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS

View File

@ -1,4 +1,4 @@
dnl Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
dnl Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
dnl
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public

View File

@ -1,4 +1,4 @@
dnl Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
dnl Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
dnl
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public

View File

@ -1,4 +1,4 @@
# Copyright (C) 2012-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2012-2015 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

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2007-2015 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

View File

@ -1,6 +1,6 @@
#! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2007-2015 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
@ -20,7 +20,7 @@
#
import os, sys, string
from salome_utils import getTmpDir, generateFileName, uniteFiles
from salome_utils import getLogDir, generateFileName, uniteFiles
from setenv import add_path, get_lib_dir, salome_subdir
# -----------------------------------------------------------------------------
@ -29,8 +29,8 @@ def set_env( args ):
"""Add to the PATH-variables modules specific paths"""
psep = os.pathsep
python_version="python%d.%d" % sys.version_info[0:2]
tmp_dir = getTmpDir()
tmp_dir = getLogDir()
env_dir = generateFileName( tmp_dir, prefix="env", with_port=True )
res_dir = os.path.join( os.getenv( "GEOM_ROOT_DIR" ), "share", salome_subdir, "resources", "geom" )

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2007-2015 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

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2007-2015 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

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2007-2015 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
@ -18,114 +18,125 @@
#
SET(BAD_TESTS
repairing_operations_ex09.py
repairing_operations_ex09.py
)
SET(GOOD_TESTS
3dsketcher.py
advanced_geom_objs_ex01.py
advanced_geom_objs_ex02.py
advanced_geom_objs_ex03.py
angle.py
arranging_study_objects.py
basic_geom_objs_ex01.py
basic_geom_objs_ex02.py
basic_geom_objs_ex03.py
basic_geom_objs_ex04.py
basic_geom_objs_ex05.py
basic_geom_objs_ex06.py
basic_geom_objs_ex07.py
basic_geom_objs_ex08.py
basic_geom_objs_ex09.py
basic_operations_ex01.py
basic_operations_ex02.py
basic_operations_ex03.py
basic_properties.py
blocks_operations_ex01.py
blocks_operations_ex02.py
blocks_operations_ex03.py
boolean_operations_ex01.py
boolean_operations_ex02.py
boolean_operations_ex03.py
boolean_operations_ex04.py
bounding_box.py
building_by_blocks_ex01.py
building_by_blocks_ex02.py
center_of_mass.py
check_compound_of_blocks.py
check_self_intersections.py
check_shape.py
complex_objs_ex01.py
complex_objs_ex02.py
complex_objs_ex03.py
complex_objs_ex04.py
complex_objs_ex05.py
complex_objs_ex06.py
complex_objs_ex07.py
complex_objs_ex08.py
complex_objs_ex09.py
complex_objs_ex10.py
free_boundaries.py
free_faces.py
GEOM_box.py
get_non_blocks.py
import_export.py
inertia.py
min_distance.py
normal_face.py
notebook_geom.py
point_coordinates.py
primitives_ex01.py
primitives_ex02.py
primitives_ex03.py
primitives_ex04.py
primitives_ex05.py
primitives_ex06.py
primitives_ex07.py
repairing_operations_ex01.py
repairing_operations_ex02.py
repairing_operations_ex03.py
repairing_operations_ex04.py
repairing_operations_ex05.py
repairing_operations_ex06.py
repairing_operations_ex07.py
repairing_operations_ex08.py
repairing_operations_ex10.py
repairing_operations_ex11.py
repairing_operations_ex12.py
sketcher.py
tolerance.py
topological_geom_objs_ex01.py
topological_geom_objs_ex02.py
topological_geom_objs_ex03.py
topological_geom_objs_ex04.py
topological_geom_objs_ex05.py
topological_geom_objs_ex06.py
transformation_operations_ex01.py
transformation_operations_ex02.py
transformation_operations_ex03.py
transformation_operations_ex04.py
transformation_operations_ex05.py
transformation_operations_ex06.py
transformation_operations_ex07.py
transformation_operations_ex08.py
transformation_operations_ex09.py
transformation_operations_ex10.py
transformation_operations_ex11.py
transformation_operations_ex12.py
transformation_operations_ex13.py
viewing_geom_objs_ex01.py
viewing_geom_objs_ex02.py
viewing_geom_objs_ex03.py
viewing_geom_objs_ex04.py
whatis.py
working_with_groups_ex01.py
working_with_groups_ex02.py
working_with_groups_ex03.py
working_with_groups_ex04.py
working_with_groups_ex05.py
3dsketcher.py
advanced_geom_objs_ex01.py
advanced_geom_objs_ex02.py
advanced_geom_objs_ex03.py
angle.py
arranging_study_objects.py
basic_geom_objs_ex01.py
basic_geom_objs_ex02.py
basic_geom_objs_ex03.py
basic_geom_objs_ex04.py
basic_geom_objs_ex05.py
basic_geom_objs_ex06.py
basic_geom_objs_ex07.py
basic_geom_objs_ex08.py
basic_geom_objs_ex09.py
basic_geom_objs_ex10.py
basic_operations_ex01.py
basic_operations_ex02.py
basic_operations_ex03.py
basic_operations_ex04.py
basic_properties.py
blocks_operations_ex01.py
blocks_operations_ex02.py
blocks_operations_ex03.py
boolean_operations_ex01.py
boolean_operations_ex02.py
boolean_operations_ex03.py
boolean_operations_ex04.py
bounding_box.py
building_by_blocks_ex01.py
building_by_blocks_ex02.py
center_of_mass.py
check_compound_of_blocks.py
check_self_intersections.py
check_shape.py
complex_objs_ex01.py
complex_objs_ex02.py
complex_objs_ex03.py
complex_objs_ex04.py
complex_objs_ex05.py
complex_objs_ex06.py
complex_objs_ex07.py
complex_objs_ex08.py
complex_objs_ex09.py
complex_objs_ex10.py
complex_objs_ex11.py
fast_intersection.py
free_boundaries.py
free_faces.py
GEOM_box.py
get_non_blocks.py
import_export.py
inertia.py
min_distance.py
normal_face.py
notebook_geom.py
polyline.py
point_coordinates.py
primitives_ex01.py
primitives_ex02.py
primitives_ex03.py
primitives_ex04.py
primitives_ex05.py
primitives_ex06.py
primitives_ex07.py
repairing_operations_ex01.py
repairing_operations_ex02.py
repairing_operations_ex03.py
repairing_operations_ex04.py
repairing_operations_ex05.py
repairing_operations_ex06.py
repairing_operations_ex07.py
repairing_operations_ex08.py
repairing_operations_ex10.py
repairing_operations_ex11.py
repairing_operations_ex12.py
sketcher.py
tolerance.py
topological_geom_objs_ex01.py
topological_geom_objs_ex02.py
topological_geom_objs_ex03.py
topological_geom_objs_ex04.py
topological_geom_objs_ex05.py
topological_geom_objs_ex06.py
transformation_operations_ex01.py
transformation_operations_ex02.py
transformation_operations_ex03.py
transformation_operations_ex04.py
transformation_operations_ex05.py
transformation_operations_ex06.py
transformation_operations_ex07.py
transformation_operations_ex08.py
transformation_operations_ex09.py
transformation_operations_ex10.py
transformation_operations_ex11.py
transformation_operations_ex12.py
transformation_operations_ex13.py
transformation_operations_ex14.py
viewing_geom_objs_ex01.py
viewing_geom_objs_ex02.py
viewing_geom_objs_ex03.py
viewing_geom_objs_ex04.py
whatis.py
working_with_groups_ex01.py
working_with_groups_ex02.py
working_with_groups_ex03.py
working_with_groups_ex04.py
working_with_groups_ex05.py
working_with_groups_ex06.py
)
IF(CAS_VERSION_STR VERSION_GREATER "6.9.0")
LIST(APPEND GOOD_TESTS
check_self_intersections_fast.py
)
ENDIF()
SET(EXAMPLES_TESTS ${BAD_TESTS} ${GOOD_TESTS} testme.py)
@ -133,10 +144,19 @@ SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
FOREACH(test ${GOOD_TESTS})
GET_FILENAME_COMPONENT(testname ${test} NAME_WE)
ADD_TEST(NAME ${testname}
ADD_TEST(NAME ${testname}
COMMAND ${PYTHON_EXECUTABLE} -B ${CMAKE_SOURCE_DIR}/doc/salome/examples/testme.py ${CMAKE_CURRENT_SOURCE_DIR}/${test})
SET_TESTS_PROPERTIES(${testname} PROPERTIES ENVIRONMENT "${tests_env}")
SET_TESTS_PROPERTIES(${testname} PROPERTIES ENVIRONMENT "${tests_env}")
ENDFOREACH()
# install Python scripts
SALOME_INSTALL_SCRIPTS("${EXAMPLES_TESTS}" ${SALOME_INSTALL_DOC}/examples/GEOM)
# Application tests
SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test)
INSTALL(FILES ${GOOD_TESTS} DESTINATION ${TEST_INSTALL_DIRECTORY})
INSTALL(FILES CTestTestfileInstall.cmake
DESTINATION ${TEST_INSTALL_DIRECTORY}
RENAME CTestTestfile.cmake)

View File

@ -0,0 +1,141 @@
# Copyright (C) 2015 CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, 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
#
SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py")
SET(COMPONENT_NAME GEOM)
SET(TIMEOUT 300)
SET(GOOD_TESTS
3dsketcher
advanced_geom_objs_ex01
advanced_geom_objs_ex02
advanced_geom_objs_ex03
angle
arranging_study_objects
basic_geom_objs_ex01
basic_geom_objs_ex02
basic_geom_objs_ex03
basic_geom_objs_ex04
basic_geom_objs_ex05
basic_geom_objs_ex06
basic_geom_objs_ex07
basic_geom_objs_ex08
basic_geom_objs_ex09
basic_geom_objs_ex10
basic_operations_ex01
basic_operations_ex02
basic_operations_ex03
basic_operations_ex04
basic_properties
blocks_operations_ex01
blocks_operations_ex02
blocks_operations_ex03
boolean_operations_ex01
boolean_operations_ex02
boolean_operations_ex03
boolean_operations_ex04
bounding_box
building_by_blocks_ex01
building_by_blocks_ex02
center_of_mass
check_compound_of_blocks
check_self_intersections
check_shape
complex_objs_ex01
complex_objs_ex02
complex_objs_ex03
complex_objs_ex04
complex_objs_ex05
complex_objs_ex06
complex_objs_ex07
complex_objs_ex08
complex_objs_ex09
complex_objs_ex10
complex_objs_ex11
free_boundaries
free_faces
GEOM_box
get_non_blocks
import_export
inertia
min_distance
normal_face
notebook_geom
polyline
point_coordinates
primitives_ex01
primitives_ex02
primitives_ex03
primitives_ex04
primitives_ex05
primitives_ex06
primitives_ex07
repairing_operations_ex01
repairing_operations_ex02
repairing_operations_ex03
repairing_operations_ex04
repairing_operations_ex05
repairing_operations_ex06
repairing_operations_ex07
repairing_operations_ex08
repairing_operations_ex10
repairing_operations_ex11
repairing_operations_ex12
sketcher
tolerance
topological_geom_objs_ex01
topological_geom_objs_ex02
topological_geom_objs_ex03
topological_geom_objs_ex04
topological_geom_objs_ex05
topological_geom_objs_ex06
transformation_operations_ex01
transformation_operations_ex02
transformation_operations_ex03
transformation_operations_ex04
transformation_operations_ex05
transformation_operations_ex06
transformation_operations_ex07
transformation_operations_ex08
transformation_operations_ex09
transformation_operations_ex10
transformation_operations_ex11
transformation_operations_ex12
transformation_operations_ex13
transformation_operations_ex14
viewing_geom_objs_ex01
viewing_geom_objs_ex02
viewing_geom_objs_ex03
viewing_geom_objs_ex04
whatis
working_with_groups_ex01
working_with_groups_ex02
working_with_groups_ex03
working_with_groups_ex04
working_with_groups_ex05
working_with_groups_ex06
)
# CAS_VERSION > "6.8.0"
LIST(APPEND GOOD_TESTS fast_intersection)
FOREACH(tfile ${GOOD_TESTS})
SET(TEST_NAME GEOM_${tfile})
ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
ENDFOREACH()

View File

@ -0,0 +1,37 @@
# Creation of a Surface From Face
import salome
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
import math
import SALOMEDS
# Create Vertices, Edges, Wire, Face and Disk
Vertex_1 = geompy.MakeVertex(0, 0, 0)
Vertex_2 = geompy.MakeVertex(100, 0, 0)
Vertex_3 = geompy.MakeVertex(50, 100, 0)
Edge_1 = geompy.MakeEdge(Vertex_1, Vertex_2)
Edge_2 = geompy.MakeEdge(Vertex_2, Vertex_3)
Edge_3 = geompy.MakeEdge(Vertex_3, Vertex_1)
Wire_1 = geompy.MakeWire([Edge_1, Edge_2, Edge_3])
Face_1 = geompy.MakeFace(Wire_1, True)
Disk_1 = geompy.MakeDiskR(100, 1)
# Create Surfaces From Faces.
SurfaceFromFace_1 = geompy.MakeSurfaceFromFace(Face_1)
SurfaceFromFace_2 = geompy.MakeSurfaceFromFace(Disk_1)
#Add created object to study
geompy.addToStudy( Vertex_1, "Vertex_1" )
geompy.addToStudy( Vertex_2, "Vertex_2" )
geompy.addToStudy( Vertex_3, "Vertex_3" )
geompy.addToStudy( Edge_1, "Edge_1" )
geompy.addToStudy( Edge_2, "Edge_2" )
geompy.addToStudy( Edge_3, "Edge_3" )
geompy.addToStudy( Wire_1, "Wire_1" )
geompy.addToStudy( Face_1, "Face_1" )
geompy.addToStudy( Disk_1, "Disk_1" )
geompy.addToStudy( SurfaceFromFace_1, "SurfaceFromFace_1" )
geompy.addToStudy( SurfaceFromFace_2, "SurfaceFromFace_2" )

View File

@ -22,23 +22,17 @@ box = geompy.MakeBoxTwoPnt(p0, p200)
trimsize = 500.
plane = geompy.MakePlane(pz, vxyz, trimsize)
# create partition objects
partition1 = geompy.MakePartition([box], [plane])
partition2 = geompy.Partition([box], [plane])
partition3 = geompy.MakeHalfPartition(box, plane)
# create partition
partition = geompy.MakePartition([box], [plane])
# add objects in the study
id_box = geompy.addToStudy(box,"Box")
id_plane = geompy.addToStudy(plane,"Plane")
id_partition1 = geompy.addToStudy(partition1,"MakePartition")
id_partition2 = geompy.addToStudy(partition2,"Partition")
id_partition3 = geompy.addToStudy(partition3,"MakeHalfPartition")
id_partition = geompy.addToStudy(partition,"Partition")
# display the partition objects and the plane
gg.createAndDisplayGO(id_box)
gg.setDisplayMode(id_box,1)
gg.createAndDisplayGO(id_plane)
gg.setDisplayMode(id_plane,1)
gg.createAndDisplayGO(id_partition1)
gg.createAndDisplayGO(id_partition2)
gg.createAndDisplayGO(id_partition3)
gg.createAndDisplayGO(id_partition)

View File

@ -0,0 +1,40 @@
# Get shared sub-shapes
import salome
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
import SALOMEDS
# create a box and partigion it by two planes
box = geompy.MakeBoxDXDYDZ(200, 200, 200)
p = geompy.MakeVertex(100, 100, 100)
v1 = geompy.MakeVectorDXDYDZ(1, 1, 0)
v2 = geompy.MakeVectorDXDYDZ(1, -1, 0)
pln1 = geompy.MakePlane(p, v1, 2000)
pln2 = geompy.MakePlane(p, v2, 2000)
partition = geompy.MakePartition([box], [pln1, pln2])
# extract solids from result of partition
solids = geompy.SubShapeAllSorted(partition, geompy.ShapeType['SOLID'])
# get shared shapes from the partition (compound of 4 solids)
# a) faces that are shared by all 4 solids (0 found)
pF_T = geompy.GetSharedShapesMulti(partition, geompy.ShapeType['FACE'])
# b) faces that are shared by any couple of solids (4 found)
pF_F = geompy.GetSharedShapesMulti(partition, geompy.ShapeType['FACE'], False)
# c) edges that are shared by all 4 solids (1 found)
pE_T = geompy.GetSharedShapesMulti(partition, geompy.ShapeType['EDGE'])
# d) edges that are shared by any couple of solids (13 found)
pE_F = geompy.GetSharedShapesMulti(partition, geompy.ShapeType['EDGE'], False)
# get shared shapes from the list of solids
# a) faces that are shared by all 4 solids (0 found)
sF_T = geompy.GetSharedShapesMulti(solids, geompy.ShapeType['FACE'])
# b) faces that are shared by 1st/2nd, 1st/3rd and 1st/4th solids (2 found)
sF_F = geompy.GetSharedShapesMulti(solids, geompy.ShapeType['FACE'], False)
# c) edges that are shared by all 4 solids (1 found)
sE_T = geompy.GetSharedShapesMulti(solids, geompy.ShapeType['EDGE'])
# d) edges that are shared by 1st/2nd, 1st/3rd and 1st/4th solids (7 found)
sE_F = geompy.GetSharedShapesMulti(solids, geompy.ShapeType['EDGE'], False)

View File

@ -7,9 +7,15 @@ from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
# create a box
box = geompy.MakeBoxDXDYDZ(100,30,100)
IsValid = geompy.CheckSelfIntersections(box)
if IsValid == 0:
raise RuntimeError, "Box with self-intersections created"
box = geompy.MakeBoxDXDYDZ(100,100,100)
# create a cylinder
cylinder = geompy.MakeCylinderRH(100, 300)
# make a compound
compound = geompy.MakeCompound([box, cylinder])
# check self-intersection
IsValid = geompy.CheckSelfIntersections(compound)
if not IsValid:
print "Shape is self-intersected!"
else:
print "\nBox is valid"
print "No self-intersection detected in a shape"

View File

@ -0,0 +1,21 @@
# Detect Self-intersections fast
import salome
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
# create a box
box = geompy.MakeBoxDXDYDZ(100,100,100)
# create a cylinder
cylinder = geompy.MakeCylinderRH(100, 300)
# make a compound
compound = geompy.MakeCompound([box, cylinder])
# check self-intersection
IsValid = geompy.CheckSelfIntersectionsFast(compound)
if not IsValid:
print "Shape is self-intersected!"
else:
print "No self-intersection detected in a shape"

View File

@ -10,7 +10,7 @@ geompy = geomBuilder.New(salome.myStudy)
box = geompy.MakeBoxDXDYDZ(100,30,100)
(IsValid, err) = geompy.CheckShape(box, 0, 2)
if IsValid == 0:
geompy.PrintShapeError(box, err)
geompy.PrintShapeErrors(box, err)
raise RuntimeError, "Invalid box created"
else:
print "\nBox is valid"

View File

@ -20,14 +20,12 @@ p3 = geompy.MakeVertex( -30., -30., 10.)
# create an arc from three points
arc = geompy.MakeArc(p1, p2, p3)
ShapeListCompound = []
i = 0
while i <= 3 :
ContoursList = []
for i in range(4):
S = geompy.MakeTranslation(arc, i * 50., 0., 0.)
ShapeListCompound.append(S)
i = i + 1
ContoursList.append(S)
compound = geompy.MakeCompound(ShapeListCompound)
compound = geompy.MakeCompound(ContoursList)
# create a filling
filling = geompy.MakeFilling(compound, mindeg, maxdeg, tol3d, tol2d, nbiter)

View File

@ -18,18 +18,22 @@ circles.append(geompy.MakeCircle(vertices[1], edges[0], 40))
circles.append(geompy.MakeCircle(vertices[2], edges[2], 30))
circles.append(geompy.MakeCircle(vertices[3], edges[2], 20))
# create pipe
Pipe = geompy.MakePipeWithDifferentSections(circles, vertices, Wire_1, 0, 0)
# create pipes
Pipe1 = geompy.MakePipeWithDifferentSections(circles, vertices, Wire_1, 0, 0)
Pipe2 = geompy.MakePipeWithDifferentSectionsBySteps(circles, vertices, Wire_1)
# add objects in the study
geompy.addToStudy(circles[0], "circles1")
geompy.addToStudy(circles[1], "circles2")
geompy.addToStudy(circles[2], "circles3")
geompy.addToStudy(circles[3], "circles4")
id_wire = geompy.addToStudy(Wire_1, "Path")
id_pipe = geompy.addToStudy(Pipe, "Pipe")
id_wire = geompy.addToStudy(Wire_1, "Path")
id_pipe1 = geompy.addToStudy(Pipe1, "Pipe1")
id_pipe2 = geompy.addToStudy(Pipe2, "Pipe2")
# display the wire(path) and the pipe
gg.createAndDisplayGO(id_wire)
gg.createAndDisplayGO(id_pipe)
gg.setDisplayMode(id_pipe,1)
gg.createAndDisplayGO(id_pipe1)
gg.createAndDisplayGO(id_pipe2)
gg.setDisplayMode(id_pipe1,1)
gg.setDisplayMode(id_pipe2,1)

View File

@ -0,0 +1,39 @@
# Apply thickness for shell
import salome
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
gg = salome.ImportComponentGUI("GEOM")
# create box
box = geompy.MakeBoxDXDYDZ(100, 100, 100)
# get the list of faces
faces = geompy.SubShapeAllSortedCentres(box, geompy.ShapeType["FACE"])
# get the list of face IDs
faceIDs = geompy.SubShapeAllSortedCentresIDs(box, geompy.ShapeType["FACE"])
# make a shell from 3 faces
shell = geompy.MakeShell([faces[0], faces[1], faces[2]])
# apply thickness
solid = geompy.MakeThickSolid(shell, 30.)
# create box
hsolid = geompy.MakeBoxDXDYDZ(100, 100, 100)
# make hollowed solid
geompy.Thicken(hsolid, 30., [faceIDs[0], faceIDs[1]])
# add objects in the study
id_shell = geompy.addToStudy(shell, "Shell")
id_solid = geompy.addToStudy(solid, "Solid")
id_hsolid = geompy.addToStudy(hsolid, "Hollowed Solid")
# display the shell and the result thicknen solid and hollowed solid
gg.createAndDisplayGO(id_shell)
gg.createAndDisplayGO(id_solid)
gg.createAndDisplayGO(id_hsolid)

View File

@ -0,0 +1,34 @@
# Fast intersection
import salome
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
# create a box
box = geompy.MakeBoxDXDYDZ(100,100,100)
# create a cylinder
cylinder = geompy.MakeCylinderRH(100, 300)
isOk, res1, res2 = geompy.FastIntersect(box, cylinder)
if isOk == 0:
raise RuntimeError, "No intersection!"
else:
print "\nTwo lists of indexes of sub-shapes localize the intersection:"
print res1, res2
# create two boxes with gap
Ver1 = geompy.MakeVertex(0, 0, 0)
Ver2 = geompy.MakeVertex(100, 100, 100)
Ver3 = geompy.MakeVertex(100.1, 0, 0)
Ver4 = geompy.MakeVertex(200, 200, 200)
box1 = geompy.MakeBoxTwoPnt(Ver1, Ver2)
box2 = geompy.MakeBoxTwoPnt(Ver3, Ver4)
isOk1, aRes1, aRes2 = geompy.FastIntersect(box1, box2, 1.)
if isOk1 == 0:
raise RuntimeError, "No gaps!"
else:
print "\nTwo lists of indexes of sub-shapes localize the gap:"
print aRes1, aRes2

View File

@ -1,27 +1,26 @@
# Sewing
import salome
import salome, math
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
import math
gg = salome.ImportComponentGUI("GEOM")
gg = salome.ImportComponentGUI("GEOM")
# create base points
px = geompy.MakeVertex(100., 0., 0.)
py = geompy.MakeVertex(0., 100., 0.)
pz = geompy.MakeVertex(0., 0., 100.)
# create base geometry 2D & 3D
# create base geometry 2D
vector = geompy.MakeVector(px, py)
arc = geompy.MakeArc(py, pz, px)
arc = geompy.MakeArc(py, pz, px)
# create base objects
angle = 45. * math.pi / 180
WantPlanarFace = 1 #True
wire = geompy.MakeWire([vector, arc])
face = geompy.MakeFace(wire, WantPlanarFace)
WantPlanarFace = True
wire = geompy.MakeWire([vector, arc])
face = geompy.MakeFace(wire, WantPlanarFace)
face_rot = geompy.MakeRotation(face, vector, angle)
# make sewing
@ -29,9 +28,9 @@ precision = 0.00001
sewing = geompy.MakeSewing([face, face_rot], precision)
# add objects in the study
id_face = geompy.addToStudy(face, "Face")
id_face = geompy.addToStudy(face, "Face")
id_face_rot = geompy.addToStudy(face_rot, "Face rotation")
id_sewing = geompy.addToStudy(sewing, "Sewing")
id_sewing = geompy.addToStudy(sewing, "Sewing")
# display the results
gg.createAndDisplayGO(id_face)
@ -40,3 +39,12 @@ gg.createAndDisplayGO(id_face_rot)
gg.setDisplayMode(id_face_rot,1)
gg.createAndDisplayGO(id_sewing)
gg.setDisplayMode(id_sewing,1)
# Example 2: make a shell of a multiply translated face
quad = geompy.MakeFaceHW( 10, 20, 1 )
quadCompound = geompy.MakeMultiTranslation1D( quad, geompy.MakeVectorDXDYDZ(1,0,0), 10, 3)
shell = geompy.Sew( quadCompound, 1e-6 )
id_shell = geompy.addToStudy( shell, "3 quads shell")
gg.createAndDisplayGO(id_shell)

View File

@ -6,6 +6,8 @@ import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
# Variant 1: using DivideEdge()
# create vertices
p1 = geompy.MakeVertex(0,0,50)
p2 = geompy.MakeVertex(60,0,50)
@ -27,4 +29,15 @@ edge_points = geompy.SubShapeAllSortedCentres(divide, geompy.ShapeType["VERTEX"]
for point in edge_points:
geompy.addToStudyInFather(divide, point, "Edge's point after divide")
# Variant 2: using DivideEdgeByPoint()
box = geompy.MakeBox(0,0,0, 10,10,10, theName="box")
p1 = geompy.MakeVertex( 3, -2, 1, theName="point 1 to project" )
p2 = geompy.MakeVertex( 7, -2, 1, theName="point 2 to project" )
edge = geompy.GetEdgeNearPoint( box, p1, theName="edge to split")
div = geompy.DivideEdgeByPoint( box, edge, [p1, p2], theName="box (edge divided)")
salome.sg.updateObjBrowser(1)

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2007-2015 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
@ -24,11 +24,21 @@ import unittest, sys, os
class SalomeSession(object):
def __init__(self, script):
import runSalome
sys.argv = ["runSalome.py"]
run_script = "runSalome.py"
if sys.platform == 'win32':
module_dir = os.getenv("KERNEL_ROOT_DIR")
if module_dir: run_script = os.path.join(module_dir, "bin", "salome", run_script)
pass
sys.argv = [run_script]
sys.argv += ["--terminal"]
sys.argv += ["--modules=GEOM"]
sys.argv += ["%s" % script]
if sys.platform == 'win32':
main_module_path = sys.modules['__main__'].__file__
sys.modules['__main__'].__file__ = ''
clt, d = runSalome.main()
if sys.platform == 'win32':
sys.modules['__main__'].__file__ = main_module_path
return
def __del__(self):

View File

@ -30,17 +30,29 @@ sketcher2 = geompy.MakeSketcher("Sketcher:F 0 0:TT 70 0:TT 70 70:TT 0 70:WW")
sketcher3 = geompy.MakeSketcher("Sketcher:F 20 20:TT 50 20:TT 50 50:TT 20 50:WW")
isPlanarFace = 1
sphere = geompy.MakeSphereR(100)
box = geompy.MakeBoxDXDYDZ(200, 200, 200)
cut = geompy.MakeCutList(sphere, [box], True)
# create a face from the wire
face1 = geompy.MakeFace(wire, isPlanarFace)
# create faces from two wires
face2 = geompy.MakeFaceWires([wire, sketcher1],isPlanarFace)
face3 = geompy.MakeFaces([sketcher2, sketcher3],isPlanarFace)
face4 = geompy.MakeFaceFromSurface(face1, sketcher1)
# create face from edges with constraints
face5 = geompy.MakeFaceWithConstraints([geompy.GetSubShape(cut, [5]), geompy.GetSubShape(cut, [3]),
geompy.GetSubShape(cut, [11]), geompy.GetSubShape(cut, [3]),
geompy.GetSubShape(cut, [13]), geompy.GetSubShape(cut, [3])])
# add objects in the study
id_face1 = geompy.addToStudy(face1,"Face1")
id_face2 = geompy.addToStudy(face2,"Face2")
id_face3 = geompy.addToStudy(face3,"Face3")
id_face4 = geompy.addToStudy(face4,"Face4")
id_face5 = geompy.addToStudy(face5,"Face5")
# display the faces
gg.createAndDisplayGO(id_face1)
@ -52,3 +64,9 @@ gg.setTransparency(id_face2,0.2)
gg.createAndDisplayGO(id_face3)
gg.setDisplayMode(id_face3,1)
gg.setTransparency(id_face3,0.2)
gg.createAndDisplayGO(id_face4)
gg.setDisplayMode(id_face4,1)
gg.setTransparency(id_face4,0.2)
gg.createAndDisplayGO(id_face5)
gg.setDisplayMode(id_face5,1)
gg.setTransparency(id_face5,0.2)

View File

@ -0,0 +1,46 @@
# Creation of a Solid(s) from connected faces
import salome
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
gg = salome.ImportComponentGUI("GEOM")
# create a box
box = geompy.MakeBoxDXDYDZ(200, 200, 200)
# make a copy of a box translated by X coordinate
box_translation = geompy.MakeTranslation(box, 200, 0, 0)
# extract shells from boxes
box_shell = geompy.SubShapeAllSorted(box, geompy.ShapeType["SHELL"])[0]
box_translation_shell = geompy.SubShapeAllSorted(box_translation, geompy.ShapeType["SHELL"])[0]
# extract faces from boxes
box_faces = geompy.SubShapeAllSorted(box, geompy.ShapeType["FACE"])
box_translation_faces = geompy.SubShapeAllSorted(box_translation, geompy.ShapeType["FACE"])
# create solids from shells
msf_shells_noint = geompy.MakeSolidFromConnectedFaces([box_shell, box_translation_shell],0)
msf_shells_int = geompy.MakeSolidFromConnectedFaces([box_shell, box_translation_shell], 1)
# create solids from faces
msf_faces_noint = geompy.MakeSolidFromConnectedFaces(box_faces+box_translation_faces, 0)
msf_faces_int = geompy.MakeSolidFromConnectedFaces(box_faces+box_translation_faces, 1)
# add objects in the study
id_solid_shells_noint = geompy.addToStudy(msf_shells_noint,"Solid_from_shells_no_intersect")
id_solid_shells_int = geompy.addToStudy(msf_shells_int,"Solid_from_shells_intersect")
id_solid_faces_noint = geompy.addToStudy(msf_faces_noint,"Solid_from_faces_no_intersect")
id_solid_faces_int = geompy.addToStudy(msf_faces_int,"Solid_from_faces_intersect")
# display the results
gg.createAndDisplayGO(id_solid_shells_noint)
gg.setDisplayMode(id_solid_shells_noint,1)
gg.createAndDisplayGO(id_solid_shells_int)
gg.setDisplayMode(id_solid_shells_int,1)
gg.createAndDisplayGO(id_solid_faces_noint)
gg.setDisplayMode(id_solid_faces_noint,1)
gg.createAndDisplayGO(id_solid_faces_int)
gg.setDisplayMode(id_solid_faces_int,1)

View File

@ -2,7 +2,6 @@
import salome
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
@ -25,24 +24,33 @@ projection = geompy.MakeProjection(curve, face_cyl)
# add objects in the study
geompy.addToStudy(cylinder, "cylinder")
geompy.addToStudyInFather(cylinder, face_cyl, "face_cyl")
geompy.addToStudy(p1, "p1")
geompy.addToStudy(p2, "p2")
geompy.addToStudy(p3, "p3")
geompy.addToStudy(p4, "p4")
geompy.addToStudy(p5, "p5")
geompy.addToStudy(curve, "curve")
geompy.addToStudy(projection, "projection")
#projection of point on wire.
#projection of point on wire
e1 = geompy.MakeLineTwoPnt(p1, p2)
e2 = geompy.MakeLineTwoPnt(p2, p3)
w1 = geompy.MakeWire([e1, e2], 1.e-7)
v1 = geompy.MakeVertex(300, 40, 100)
prj = geompy.MakeProjectionOnWire(v1, w1)
geompy.addToStudy(e1, "e1")
geompy.addToStudy(e2, "e2")
prj = geompy.MakeProjection(v1, w1)
geompy.addToStudy(w1, "w1")
geompy.addToStudy(v1, "v1")
geompy.addToStudy(prj[1], "projOnWire")
geompy.addToStudy(prj, "projOnWire")
#projection of a wire on cylinder
pp1 = geompy.MakeVertex(100, 200, 0)
pp2 = geompy.MakeVertex(100, 200, 80)
pp3 = geompy.MakeVertex(100, 220, 90)
pp4 = geompy.MakeVertex(100, 130, 80)
pp5 = geompy.MakeVertex(100, 90, 80)
cc1 = geompy.MakeInterpol([pp1, pp2, pp3, pp4, pp5], True, False)
ww1 = geompy.MakeWire([cc1], 1.e-7)
vx = geompy.MakeVectorDXDYDZ(100, 0, 0)
pln1 = geompy.MakePlane(pp1, vx, 200)
face1 = geompy.MakeFaceFromSurface(pln1, ww1)
prj_cyl = geompy.MakeProjectionOnCylinder(face1, 100)
geompy.addToStudy(face1, "pln_face")
geompy.addToStudy(prj_cyl, "projOnCylinder")

View File

@ -0,0 +1,75 @@
# Extend Edge and Face
import salome
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
gg = salome.ImportComponentGUI("GEOM")
# create vertices
p1 = geompy.MakeVertex( 0., 0., 0.)
p2 = geompy.MakeVertex(100., 100., 0.)
p3 = geompy.MakeVertex( 0., 100., 0.)
# create edges
edge1 = geompy.MakeEdge(p1, p2)
edge2 = geompy.MakeCircleR(100)
# create faces
face1 = geompy.MakePlaneThreePnt(p1, p2, p3, 200)
sphere1 = geompy.MakeSpherePntR(p1, 100)
faces2 = geompy.SubShapeAllSorted(sphere1, GEOM.FACE)
face2 = faces2[0]
# perform edge extension
resEdge1 = geompy.ExtendEdge(edge1, 0.2, 0.8)
resEdge2 = geompy.ExtendEdge(edge1, -0.3, 1.3)
resEdge3 = geompy.ExtendEdge(edge2, 0.5, 1)
resEdge4 = geompy.ExtendEdge(edge2, 0.2, 0.5)
# perform face extension
resFace1 = geompy.ExtendFace(face1, 0.2, 0.8, -0.3, 1.3)
resFace2 = geompy.ExtendFace(face1, 0, 0.5, 1, 2)
resFace3 = geompy.ExtendFace(face2, 0.2, 0.8, 0.3, 0.7)
resFace4 = geompy.ExtendFace(face2, 0.5, 1, 0.5, 1)
# add objects in the study
id_edge1 = geompy.addToStudy(edge1, "Edge 1")
id_edge2 = geompy.addToStudy(edge2, "Edge 2")
id_face1 = geompy.addToStudy(face1, "Face 1")
id_face2 = geompy.addToStudy(face2, "Face 2")
id_resEdge1 = geompy.addToStudy(resEdge1, "Extended Edge 1")
id_resEdge2 = geompy.addToStudy(resEdge2, "Extended Edge 1")
id_resEdge3 = geompy.addToStudy(resEdge3, "Extended Edge 2")
id_resEdge4 = geompy.addToStudy(resEdge4, "Extended Edge 3")
id_resFace1 = geompy.addToStudy(resFace1, "Extended Face 1")
id_resFace2 = geompy.addToStudy(resFace2, "Extended Face 2")
id_resFace3 = geompy.addToStudy(resFace3, "Extended Face 3")
id_resFace4 = geompy.addToStudy(resFace4, "Extended Face 4")
# display the prism and the results of chamfer operation
gg.createAndDisplayGO(id_edge1)
gg.setDisplayMode(id_edge1, 1)
gg.createAndDisplayGO(id_edge2)
gg.setDisplayMode(id_edge2, 1)
gg.createAndDisplayGO(id_face1)
gg.setDisplayMode(id_face1, 1)
gg.createAndDisplayGO(id_face2)
gg.setDisplayMode(id_face2, 1)
gg.createAndDisplayGO(id_resEdge1)
gg.setDisplayMode(id_resEdge1, 1)
gg.createAndDisplayGO(id_resEdge2)
gg.setDisplayMode(id_resEdge2, 1)
gg.createAndDisplayGO(id_resEdge3)
gg.setDisplayMode(id_resEdge3, 1)
gg.createAndDisplayGO(id_resEdge4)
gg.setDisplayMode(id_resEdge4, 1)
gg.createAndDisplayGO(id_resFace1)
gg.setDisplayMode(id_resFace1, 1)
gg.createAndDisplayGO(id_resFace2)
gg.setDisplayMode(id_resFace2, 1)
gg.createAndDisplayGO(id_resFace3)
gg.setDisplayMode(id_resFace3, 1)
gg.createAndDisplayGO(id_resFace4)
gg.setDisplayMode(id_resFace4, 1)

View File

@ -17,3 +17,4 @@ gg.createAndDisplayGO(fuse_id)
gg.setDisplayMode(fuse_id,1)
gg.setVectorsMode(fuse_id, 1)
gg.setVerticesMode(fuse_id, 1)
gg.setNameMode(fuse_id, 1)

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2007-2015 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

View File

@ -1,4 +1,4 @@
# Copyright (C) 2012-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2012-2015 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

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2012-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2012-2015 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
@ -117,16 +117,22 @@ if __name__ == "__main__":
if len( args ) < 1: sys.exit("Plugin name is not specified")
f = open(options.output, "w")
if len(args) > 1:
plugins_names = " ".join(args) + " plugins"
elif len(args) == 1:
plugins_names = args[0] + " plugin"
else:
plugins_names = ""
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." )
output.append( "# Documentation of the methods dynamically added by the " + plugins_names + " to the @b %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( "# the methods dynamically added to the %geomBuilder class by the " + plugins_names + "." )
output.append( "# For more details on the %geomBuilder class, please refer to the SALOME %Geometry module" )
output.append( "# documentation." )
pass

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2007-2015 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

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2007-2015 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

View File

@ -1,4 +1,4 @@
# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
# Copyright (C) 2007-2015 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 903 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
doc/salome/gui/GEOM/images/filling.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
doc/salome/gui/GEOM/images/measures10.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
doc/salome/gui/GEOM/images/neo-detect2.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
doc/salome/gui/GEOM/images/neo-obj6.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 26 KiB

BIN
doc/salome/gui/GEOM/images/pipe.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 26 KiB

BIN
doc/salome/gui/GEOM/images/pipe2.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 30 KiB

BIN
doc/salome/gui/GEOM/images/point3.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

BIN
doc/salome/gui/GEOM/images/repair1.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 12 KiB

BIN
doc/salome/gui/GEOM/images/repair6.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 21 KiB

BIN
doc/salome/gui/GEOM/images/repair8.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Some files were not shown because too many files have changed in this diff Show More