mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-05-26 00:20:48 +05:00
Compare commits
20 Commits
V9_13_0rc3
...
master
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f897399166 | ||
![]() |
3dada3ac1c | ||
![]() |
3628387a8b | ||
![]() |
d77455bec0 | ||
![]() |
386c243bd1 | ||
![]() |
419b248e23 | ||
![]() |
0c82f25ea9 | ||
![]() |
42b1e5a1ea | ||
![]() |
1e56cfc237 | ||
![]() |
4698ac46c4 | ||
![]() |
512bf4c67a | ||
![]() |
67feb126ff | ||
![]() |
0d99124b62 | ||
![]() |
086dfca578 | ||
![]() |
ad427fadef | ||
![]() |
c4da8107c8 | ||
![]() |
55b640ee17 | ||
![]() |
78d008f3a2 | ||
![]() |
d72c6cd028 | ||
![]() |
ae49976071 |
@ -41,6 +41,17 @@ ENDIF()
|
||||
SALOME_SETUP_VERSION(9.13.0)
|
||||
MESSAGE(STATUS "Building ${PROJECT_NAME_UC} ${${PROJECT_NAME_UC}_VERSION} from \"${${PROJECT_NAME_UC}_GIT_SHA1}\"")
|
||||
|
||||
# Find SalomeBootstrap
|
||||
# ===========
|
||||
SET(SALOMEBOOTSTRAP_ROOT_DIR $ENV{SALOMEBOOTSTRAP_ROOT_DIR} CACHE PATH "Path to the Salome Bootstrap")
|
||||
IF(EXISTS ${SALOMEBOOTSTRAP_ROOT_DIR})
|
||||
FIND_PACKAGE(SalomeBootstrap REQUIRED)
|
||||
ADD_DEFINITIONS(${SALOMEBOOTSTRAP_DEFINITIONS})
|
||||
INCLUDE_DIRECTORIES(${SALOMEBOOTSTRAP_INCLUDE_DIRS})
|
||||
ELSE(EXISTS ${SALOMEBOOTSTRAP_ROOT_DIR})
|
||||
MESSAGE(FATAL_ERROR "We absolutely need a Salome Bootstrap, please define SALOMEBOOTSTRAP_ROOT_DIR")
|
||||
ENDIF(EXISTS ${SALOMEBOOTSTRAP_ROOT_DIR})
|
||||
|
||||
# Find KERNEL
|
||||
# ===========
|
||||
SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL")
|
||||
@ -140,6 +151,13 @@ ENDIF(SALOME_BUILD_GUI)
|
||||
|
||||
FIND_PACKAGE(SalomeOpenCASCADE REQUIRED)
|
||||
|
||||
SET(CommonGeomLib_ROOT_DIR $ENV{CommonGeomLib_ROOT_DIR} CACHE PATH "Path to the CommonGeomLib tool")
|
||||
IF(EXISTS ${CommonGeomLib_ROOT_DIR})
|
||||
FIND_PACKAGE(SalomeCommonGeomLib REQUIRED)
|
||||
ELSE(EXISTS ${CommonGeomLib_ROOT_DIR})
|
||||
MESSAGE(FATAL_ERROR "We absolutely need the CommonGeomLib tool, please define CommonGeomLib_ROOT_DIR !")
|
||||
ENDIF(EXISTS ${CommonGeomLib_ROOT_DIR})
|
||||
|
||||
IF(SALOME_GEOM_USE_VTK)
|
||||
FIND_PACKAGE(SalomeVTK REQUIRED)
|
||||
ADD_DEFINITIONS(-DWITH_VTK)
|
||||
@ -279,19 +297,21 @@ EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
|
||||
SET(KERNEL_ROOT_DIR "${KERNEL_ROOT_DIR}")
|
||||
SET(GUI_ROOT_DIR "${GUI_ROOT_DIR}")
|
||||
SET(OPENCASCADE_ROOT_DIR "${OPENCASCADE_ROOT_DIR}")
|
||||
SET(CommonGeomLib_ROOT_DIR "${CommonGeomLib_ROOT_DIR}")
|
||||
SET(VTK_ROOT_DIR "${VTK_ROOT_DIR}")
|
||||
SET(OPENCV_ROOT_DIR "${OPENCV_ROOT_DIR}")
|
||||
|
||||
SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include")
|
||||
|
||||
# Build variables that will be expanded when configuring Salome<MODULE>Config.cmake:
|
||||
SALOME_CONFIGURE_PREPARE(OpenCV OpenCASCADE VTK)
|
||||
SALOME_CONFIGURE_PREPARE(OpenCV OpenCASCADE CommonGeomLib VTK)
|
||||
|
||||
CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
|
||||
${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
|
||||
INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
|
||||
PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX
|
||||
KERNEL_ROOT_DIR GUI_ROOT_DIR OPENCASCADE_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR)
|
||||
KERNEL_ROOT_DIR GUI_ROOT_DIR OPENCASCADE_ROOT_DIR CommonGeomLib_ROOT_DIR
|
||||
VTK_ROOT_DIR OPENCV_ROOT_DIR)
|
||||
|
||||
# - in the install tree (VSR 16/08/2013: TEMPORARILY COMMENT THIS - TO REMOVE?):
|
||||
# Get the relative path of the include directory so
|
||||
|
2
README
2
README
@ -38,7 +38,7 @@ site:
|
||||
|
||||
* Check Release Notes and Software Requirements of the latest SALOME release at
|
||||
|
||||
<https://www.salome-platform.org/?page_id=15/>
|
||||
<https://github.com/SalomePlatform/.github/wiki/SAT/>
|
||||
|
||||
Note: SALOME Geometry module needs SALOME KERNEL and SALOME GUI as
|
||||
pre-requisites.
|
||||
|
56
doc/salome/examples/check_bop.py
Normal file
56
doc/salome/examples/check_bop.py
Normal file
@ -0,0 +1,56 @@
|
||||
# ExtractBOPFailure example
|
||||
|
||||
import math
|
||||
import salome
|
||||
salome.salome_init()
|
||||
import GEOM
|
||||
from salome.geom import geomBuilder
|
||||
geompy = geomBuilder.New()
|
||||
|
||||
### Prepare shapes for Partition
|
||||
OX = geompy.MakeVectorDXDYDZ(1, 0, 0, theName="OX")
|
||||
OY = geompy.MakeVectorDXDYDZ(0, 1, 0, theName="OY")
|
||||
OZ = geompy.MakeVectorDXDYDZ(0, 0, 1, theName="OZ")
|
||||
|
||||
Vertex_1 = geompy.MakeVertex(0, 0, 0, theName="Vertex_1")
|
||||
Vertex_2 = geompy.MakeVertex(10, 0, 0, theName="Vertex_2")
|
||||
Vertex_3 = geompy.MakeVertex(0, 0.005, 0, theName="Vertex_3")
|
||||
Vertex_4 = geompy.MakeVertex(10, 0.015, 0, theName="Vertex_4")
|
||||
Vertex_5 = geompy.MakeVertex(0, 0.02, 0, theName="Vertex_5")
|
||||
Vertex_6 = geompy.MakeVertex(10, 0.02, 0, theName="Vertex_6")
|
||||
|
||||
Line_1 = geompy.MakeLineTwoPnt(Vertex_1, Vertex_2, theName="Line_1")
|
||||
Line_2 = geompy.MakeLineTwoPnt(Vertex_3, Vertex_4, theName="Line_2")
|
||||
Line_3 = geompy.MakeLineTwoPnt(Vertex_5, Vertex_6, theName="Line_3")
|
||||
|
||||
Extrusion_1 = geompy.MakePrismVecH(Line_1, OY, 1, theName="Extrusion_1")
|
||||
Extrusion_2 = geompy.MakePrismVecH(Line_2, OZ, 1, theName="Extrusion_2")
|
||||
Extrusion_3 = geompy.MakePrismVecH(Line_3, OY, -1, theName="Extrusion_3")
|
||||
|
||||
Limit_tolerance_1 = geompy.LimitTolerance(Extrusion_2, 0.01, theName="Limit_tolerance_1")
|
||||
|
||||
Extrusion_4 = geompy.MakePrismVecH(Extrusion_1, OZ, -1, theName="Extrusion_4")
|
||||
Extrusion_5 = geompy.MakePrismVecH(Extrusion_3, OZ, -1, theName="Extrusion_5")
|
||||
|
||||
Revolution_1 = geompy.MakeRevolution(Limit_tolerance_1, OX, 45*math.pi/180.0, theName="Revolution_1")
|
||||
|
||||
### Try Partition
|
||||
try :
|
||||
Partition_1 = geompy.MakePartition([Extrusion_4, Extrusion_5, Revolution_1], [], [], [], geompy.ShapeType["SOLID"], 0, [], 0, theName="Partition_1")
|
||||
except :
|
||||
print("EXCEPTION: Partition problem")
|
||||
|
||||
### Extract failures
|
||||
(IsValid, ShapeRes, ShapeErrors) = geompy.ExtractBOPFailure([Extrusion_4, Extrusion_5, Revolution_1], theTimer=True, theVerbose=True, theName="InvalidBOPResult")
|
||||
|
||||
### Publish incriminated sub-shapes (reflect errors in their names)
|
||||
for shapeError in ShapeErrors:
|
||||
list_ids = shapeError.incriminated
|
||||
list_subs = geompy.SubShapes(ShapeRes, list_ids)
|
||||
ii = 1
|
||||
for subshape in list_subs:
|
||||
geompy.addToStudyInFather( ShapeRes, subshape, 'SubShape_with_%s_%d'%(str(shapeError.error),ii) )
|
||||
ii = ii+1
|
||||
|
||||
if salome.sg.hasDesktop():
|
||||
salome.sg.updateObjBrowser()
|
@ -58,6 +58,8 @@ SET(GOOD_TESTS
|
||||
check_compound_of_blocks.py
|
||||
check_self_intersections.py
|
||||
check_shape.py
|
||||
check_conformity.py
|
||||
check_bop.py
|
||||
complex_objs_ex01.py
|
||||
complex_objs_ex02.py
|
||||
complex_objs_ex03.py
|
||||
|
@ -13,14 +13,17 @@ box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
|
||||
# create a new object as offset of the given object
|
||||
offset = geompy.MakeOffset(box, 70.)
|
||||
offset2 = geompy.MakeOffsetIntersectionJoin(box, 70.)
|
||||
offset3 = geompy.MakeOffsetPartial(box, 70., [13, 33])
|
||||
|
||||
# add objects in the study
|
||||
id_box = geompy.addToStudy(box, "Box")
|
||||
id_offset = geompy.addToStudy(offset, "Offset")
|
||||
id_offset2 = geompy.addToStudy(offset2, "Offset_intersection_join")
|
||||
id_offset3 = geompy.addToStudy(offset3, "Offset_Partial")
|
||||
|
||||
# display the results
|
||||
gg.createAndDisplayGO(id_box)
|
||||
gg.setDisplayMode(id_box,1)
|
||||
gg.createAndDisplayGO(id_offset)
|
||||
gg.createAndDisplayGO(id_offset2)
|
||||
gg.createAndDisplayGO(id_offset3)
|
||||
|
BIN
doc/salome/gui/GEOM/images/transformation11a.png
Normal file
BIN
doc/salome/gui/GEOM/images/transformation11a.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
32
doc/salome/gui/GEOM/input/check_bop.doc
Normal file
32
doc/salome/gui/GEOM/input/check_bop.doc
Normal file
@ -0,0 +1,32 @@
|
||||
/*!
|
||||
|
||||
\page check_bop_page Extract BOP Failure
|
||||
|
||||
The Extract BOP Failure tool makes it possible to analyse a BOP or Partition failure, in case the result is invalid. \n
|
||||
It performs the general fuse BOP and returns the resulting shape and the list of errors from Check Shape point of view.
|
||||
|
||||
This is a TUI-only functionality.
|
||||
|
||||
<b>TUI Command:</b>
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>
|
||||
<em>(IsValid, ShapeRes, ShapeErrors) = geompy.ExtractBOPFailure(theShapes, theTimer=False, theTopo=False, theParallel=False, theExact=False, theVerbose=True),</em> \n
|
||||
where \n
|
||||
\em theShapes is the list of argument shapes for BOP. \n
|
||||
\em theTimer - if True, the time of the operation is measured. \n
|
||||
\em theTopo - if True, only the topological entities will be checked, otherwise geometry and topology are checked. \n
|
||||
\em theParallel - if True, the operation will be executed in parallel. \n
|
||||
\em theExact - if True, an exact check will be performed. \n
|
||||
\em theVerbose - if True, prints execution errors and check results. \n
|
||||
\em Returns: \n
|
||||
\em IsValid - a boolean value (whether result shape is valid or not) \n
|
||||
\em ShapeRes - the result shape itself \n
|
||||
\em ShapeErrors - the list of GEOM.GEOM_IMeasureOperations.ShapeError \n
|
||||
</LI>
|
||||
|
||||
</UL>
|
||||
See also a \ref tui_check_bop_page "TUI example".
|
||||
|
||||
*/
|
@ -19,14 +19,10 @@ corresponds to OX axis of the global coordinate system.
|
||||
<EM> Vmaj' = (Vn * Vmaj) * Vn</em>, where \em Vn is a normal vector and
|
||||
\em Vmaj is an original vector of the major axis.
|
||||
|
||||
\n <b>TUI Command (without the major axis):</b> <em>geompy.MakeEllipse(Point, Vector, RadiusMajor, RadiusMinor)</em>
|
||||
\n <b>TUI Command (without the major axis):</b> <em>geompy.MakeEllipse(Point, Vector, RadiusMajor, RadiusMinor, VectorMajor=None)</em>
|
||||
\n <b>Arguments:</b> Name + 1 vertex (for the center) + 1 edge (for
|
||||
the direction) + 1 X Radius + 1 Y Radius.
|
||||
|
||||
\n <b>TUI Command (with the major axis):</b> <em>geompy.MakeEllipseVec(Point, Vector, RadiusMajor, RadiusMinor, VectorMajor)</em>
|
||||
\n <b>Arguments:</b> Name + 1 vertex (for the center) + 1 edge (for
|
||||
the normal direction) + 1 X Radius + 1 Y Radius + 1 edge (for the
|
||||
major axis direction).
|
||||
the direction) + 1 X Radius + 1 Y Radius + 1 optional edge (for the major axis direction).
|
||||
\n If the <b>VectorMajor</b> argument is omitted, the ellipse's major axis will be along the X-axis.
|
||||
|
||||
\image html ellipse.png
|
||||
|
||||
|
@ -8,22 +8,22 @@
|
||||
\n The \b Result of each operation will be a GEOM_Object (SOLID).
|
||||
|
||||
\n Firstly, you can define a \b Sphere by the <b>Center Point</b> and the \b Radius.
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeSphere(Point, Radius)</em>
|
||||
\n <b>Arguments:</b> Name + 1 vertex + 1 value (Radius).
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeSpherePntR(Point, Radius)</em>
|
||||
|
||||
\image html sphere1.png
|
||||
|
||||
\n Secondly, you can define a \b Sphere with the center at the origin of
|
||||
coordinate system by the \b Radius.
|
||||
\n <b>TUI Command:</b> <em>geompy. MakeSphereR(Radius)</em>
|
||||
\n <b>Arguments:</b> Name + 1 value (Radius from the origin).
|
||||
\n <b>Arguments:</b> Name + 1 value (Radius).
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeSphereR(Radius)</em>
|
||||
|
||||
\image html sphere2.png
|
||||
|
||||
\n <b>NB!</b> The is another way to create a \b Sphere, which is
|
||||
currently accessible only via \b TUI commands.
|
||||
\n You can define the \b Sphere by the coordinates of the <b>Center
|
||||
Point</b> and its \b Radius (in this way you don't need to create it in advance).
|
||||
Point</b> and its \b Radius (in this way you don't need to create the center point in advance).
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeSphere(X, Y, Z, Radius)</em>
|
||||
|
||||
<b>Example:</b>
|
||||
|
@ -5,6 +5,10 @@
|
||||
\n To produce an <b>Offset Surface</b> in the <b>Main Menu</b> select
|
||||
<b>Operations - > Transformation - > Offset Surface</b>
|
||||
|
||||
\n There are 2 algorithms for creation of an \b Offset.
|
||||
|
||||
\n Firstly, you can offset all faces of selected shape(s) to the same value.
|
||||
|
||||
\n This operation translates each point of an \b Object (a set of
|
||||
Objects) along a local normal by a given \b Offset distance (signed
|
||||
number, negative value meaning inner offset). Gaps between translated
|
||||
@ -13,12 +17,12 @@ adjacent surfaces are filled in either of two ways:
|
||||
- else the surfaces are extended and intersected, so that sharp edges
|
||||
are preserved.
|
||||
|
||||
\n \b Offset operation is applicable to faces, shells and solids.
|
||||
\n \ref restore_presentation_parameters_page "Advanced options".
|
||||
|
||||
|
||||
\image html transformation11.png
|
||||
|
||||
\n <b>Arguments:</b> Name + Object(s) (face(s), shell(s), solid(s)) + Offset value.
|
||||
\n The \b Result will be a \b GEOM_Object.
|
||||
\n \ref restore_presentation_parameters_page "Advanced options".
|
||||
|
||||
\n <b>Example:</b>
|
||||
|
||||
\image html offsetsn.png "The box and its offset surface (Join by pipes activated)"
|
||||
@ -27,11 +31,27 @@ adjacent surfaces are filled in either of two ways:
|
||||
- Gaps filled by pipes: <em>geompy.MakeOffset(Shape, Offset),</em>
|
||||
- Gaps filled by intersection: <em>geompy.MakeOffsetIntersectionJoin(Shape, Offset),</em>
|
||||
|
||||
where Shape is a shape(s) which has to be an offset, Offset is a value of
|
||||
where \b Shape is a shape(s) which has to be an offset, \b Offset is a value of
|
||||
the offset.
|
||||
\n <b>Arguments:</b> Name + Object (face(s), shell(s), solid(s)) +
|
||||
Offset value.
|
||||
|
||||
\n Secondly, you can offset only selected faces of the shape to the given value,
|
||||
other faces will stay at their initial places,
|
||||
but could be extended to join with offset faces.
|
||||
Gaps between adjacent surfaces are filled by intersection of extended surfaces.
|
||||
|
||||
\image html transformation11a.png
|
||||
|
||||
\n <b>Arguments:</b> Name + Object (shell or solid) +
|
||||
Face(s) of the object + Offset value.
|
||||
\n The \b Result will be a \b GEOM_Object.
|
||||
\n \ref restore_presentation_parameters_page "Advanced options".
|
||||
|
||||
\n <b>TUI Command:</b>
|
||||
- <em>geompy.MakeOffsetPartial(Shape, Offset, ListOfFacesIDs),</em>
|
||||
|
||||
where \b Shape is a shape(s) which has to be an offset,
|
||||
\b Offset is a value of the offset,
|
||||
\b ListOfFacesIDs is a list of integer IDs of sub-faces.
|
||||
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_offset "Transformation Operations".
|
||||
|
6
doc/salome/gui/GEOM/input/tui_check_bop.doc
Normal file
6
doc/salome/gui/GEOM/input/tui_check_bop.doc
Normal file
@ -0,0 +1,6 @@
|
||||
/*!
|
||||
|
||||
\page tui_check_bop_page Extract BOP Failure
|
||||
\tui_script{check_bop.py}
|
||||
|
||||
*/
|
@ -22,6 +22,7 @@
|
||||
<li>\subpage tui_check_self_intersections_fast_page</li>
|
||||
<li>\subpage tui_fast_intersection_page</li>
|
||||
<li>\subpage tui_check_conformity_page</li>
|
||||
<li>\subpage tui_check_bop_page</li>
|
||||
<li>\subpage tui_shape_proximity_page</li>
|
||||
<li>\subpage tui_xyz_to_uv_page</li>
|
||||
<li>\subpage tui_kind_of_shape_page</li>
|
||||
|
@ -31,6 +31,7 @@
|
||||
<li>\subpage free_faces_page "Check Free Faces"</li>
|
||||
<li>\subpage check_shape_page "Check Shape"</li>
|
||||
<li>\subpage check_conformity_page "Check Conformity"</li>
|
||||
<li>\subpage check_bop_page "Extract BOP Failures"</li>
|
||||
<li>\subpage check_compound_of_blocks_page "Check compound of blocks"</li>
|
||||
<li>\subpage get_non_blocks_page "Get non blocks"</li>
|
||||
<li>\subpage check_self_intersections_page "Detect Self-intersections"</li>
|
||||
|
@ -1345,6 +1345,18 @@ module GEOM
|
||||
in double theOffset,
|
||||
in boolean theJoinByPipes);
|
||||
|
||||
/*!
|
||||
* \brief Create new object as offset of the given one.
|
||||
* Only indexed faces are offset, others keep they original location.
|
||||
* \param theObject The base object for the offset.
|
||||
* \param theOffset Offset value.
|
||||
* \param theFacesIDs The list of face IDs indicating faces to be offset.
|
||||
* \return New GEOM_Object, containing the offset object.
|
||||
*/
|
||||
GEOM_Object OffsetShapePartialCopy (in GEOM_Object theObject,
|
||||
in double theOffset,
|
||||
in ListOfLong theFacesIDs);
|
||||
|
||||
/*!
|
||||
* \brief Create new object as projection of the given one on a 2D surface.
|
||||
* \param theSource The source object for the projection. It can be a point, edge or wire.
|
||||
@ -4785,6 +4797,25 @@ module GEOM
|
||||
string PrintShapeErrors (in GEOM_Object theShape,
|
||||
in ShapeErrors theErrors);
|
||||
|
||||
// /*!
|
||||
// * \brief Extract and identify any problem in the source shapes used in a Boolean Operation.
|
||||
// * \param theShapes Shapes being used in the Boolean Operation
|
||||
// * \param theUseTimer Whether to chronometrize computation time
|
||||
// * \param theTopoOnly Whether to check topology only
|
||||
// * \param theRunParallel Whether to run the computations in parallel
|
||||
// * \param theDoExact Whether to perform exact checking
|
||||
// * \param theResultShape Output parameter. The result of BOP General Fuse. Indices of its sub-shapes are reported in theErrors structure.
|
||||
// * \param theErrors Output parameter. Structure, containing discovered errors and incriminated sub-shapes.
|
||||
// * \return TRUE, if the input shapes "seem to be valid" for BOP.
|
||||
// */
|
||||
boolean ExtractBOPFailure (in ListOfGO theShapes,
|
||||
in boolean theUseTimer,
|
||||
in boolean theTopoOnly,
|
||||
in boolean theRunParallel,
|
||||
in boolean theDoExact,
|
||||
out GEOM_Object theResultShape,
|
||||
out ShapeErrors theErrors);
|
||||
|
||||
/*!
|
||||
* \brief Check a topology of the given shape on self-intersections presence.
|
||||
* \param theShape Shape to check validity of.
|
||||
|
@ -33,6 +33,7 @@ SET( _res_files
|
||||
ShHealing
|
||||
Y14.5M-2009.ttf
|
||||
action_assets.json
|
||||
action_id_mutations.json
|
||||
3dsketch.png
|
||||
isoline.png
|
||||
isoline_v.png
|
||||
@ -132,6 +133,7 @@ SET( _res_files
|
||||
multitranslationsimple.png
|
||||
normale.png
|
||||
offset.png
|
||||
offset_partial.png
|
||||
projection.png
|
||||
projection_on_edge.png
|
||||
projection_on_wire.png
|
||||
|
@ -114,198 +114,202 @@
|
||||
<section name="action_assets">
|
||||
<parameter name="%GEOM_ROOT_DIR%/share/salome/resources/geom/action_assets.json" value=""/>
|
||||
</section>
|
||||
<section name="shortcuts:GEOM">
|
||||
<parameter name="Isolines/Increase number" value="Meta+I"/>
|
||||
<parameter name="Isolines/Decrease number" value="Meta+D"/>
|
||||
<parameter name="Transparency/Increase" value="Meta+Y"/>
|
||||
<parameter name="Transparency/Decrease" value="Meta+T"/>
|
||||
<parameter name="AdvancedGEOM/DividedCylinder" value=""/>
|
||||
<parameter name="AdvancedGEOM/DividedDisk" value=""/>
|
||||
<parameter name="AdvancedGEOM/SmoothingSurface" value=""/>
|
||||
<parameter name="AdvancedGEOM/TShape_Basic" value=""/>
|
||||
<parameter name="BREPPlugin/Export_BREP" value="Ctrl+E"/>
|
||||
<parameter name="BREPPlugin/Import_BREP" value="Ctrl+I"/>
|
||||
<parameter name="IGESPlugin/Export_IGES" value=""/>
|
||||
<parameter name="IGESPlugin/Import_IGES" value=""/>
|
||||
<parameter name="STEPPlugin/Export_STEP" value=""/>
|
||||
<parameter name="STEPPlugin/Import_STEP" value=""/>
|
||||
<parameter name="STLPlugin/Export_STL" value=""/>
|
||||
<parameter name="STLPlugin/Import_STL" value=""/>
|
||||
<parameter name="VTKPlugin/Export_VTK" value=""/>
|
||||
<parameter name="XAOPlugin/Export_XAO" value=""/>
|
||||
<parameter name="XAOPlugin/Import_XAO" value=""/>
|
||||
<parameter name="STB_DELETE" value="Del"/>
|
||||
<parameter name="STB_POINT" value=""/>
|
||||
<parameter name="STB_LINE" value=""/>
|
||||
<parameter name="STB_CIRCLE" value=""/>
|
||||
<parameter name="STB_ELLIPSE" value=""/>
|
||||
<parameter name="STB_ARC" value=""/>
|
||||
<parameter name="STB_CURVE" value=""/>
|
||||
<parameter name="STB_ISOLINE" value=""/>
|
||||
<parameter name="STB_VECTOR" value=""/>
|
||||
<parameter name="STB_PLANE" value=""/>
|
||||
<parameter name="STB_LOCAL_CS" value=""/>
|
||||
<parameter name="STB_ORIGIN_AND_VECTORS" value=""/>
|
||||
<parameter name="STB_SURFACE_FROM_FACE" value=""/>
|
||||
<parameter name="STB_BOX" value=""/>
|
||||
<parameter name="STB_CYLINDER" value=""/>
|
||||
<parameter name="STB_SPHERE" value=""/>
|
||||
<parameter name="STB_TORUS" value=""/>
|
||||
<parameter name="STB_CONE" value=""/>
|
||||
<parameter name="STB_RECTANGLE" value=""/>
|
||||
<parameter name="STB_DISK" value=""/>
|
||||
<parameter name="STB_EXTRUSION" value=""/>
|
||||
<parameter name="STB_REVOLUTION" value=""/>
|
||||
<parameter name="STB_FILLING" value=""/>
|
||||
<parameter name="STB_PIPE" value=""/>
|
||||
<parameter name="STB_PIPE_PATH" value=""/>
|
||||
<parameter name="STB_THICKNESS" value=""/>
|
||||
<parameter name="STB_GROUP_CREATE" value=""/>
|
||||
<parameter name="STB_GROUP_EDIT" value=""/>
|
||||
<parameter name="STB_GROUP_UNION" value=""/>
|
||||
<parameter name="STB_GROUP_INTERSECT" value=""/>
|
||||
<parameter name="STB_GROUP_CUT" value=""/>
|
||||
<parameter name="STB_FIELD_CREATE" value=""/>
|
||||
<parameter name="STB_FIELD_EDIT" value=""/>
|
||||
<parameter name="STB_RELOAD_IMPORTED" value=""/>
|
||||
<parameter name="STB_Q_FACE" value=""/>
|
||||
<parameter name="STB_HEX_SOLID" value=""/>
|
||||
<parameter name="STB_SKETCH" value=""/>
|
||||
<parameter name="STB_3DSKETCH" value=""/>
|
||||
<parameter name="STB_EXPLODE" value=""/>
|
||||
<parameter name="STB_FEATURE_DETECTION" value=""/>
|
||||
<parameter name="STB_PICTURE_IMPORT" value=""/>
|
||||
<parameter name="STB_CURVE_CREATOR" value=""/>
|
||||
<parameter name="STB_EDGE" value=""/>
|
||||
<parameter name="STB_WIRE" value=""/>
|
||||
<parameter name="STB_FACE" value=""/>
|
||||
<parameter name="STB_SHELL" value=""/>
|
||||
<parameter name="STB_SOLID" value=""/>
|
||||
<parameter name="STB_COMPOUND" value=""/>
|
||||
<parameter name="STB_FUSE" value=""/>
|
||||
<parameter name="STB_COMMON" value=""/>
|
||||
<parameter name="STB_CUT" value=""/>
|
||||
<parameter name="STB_SECTION" value=""/>
|
||||
<parameter name="STB_TRANSLATION" value=""/>
|
||||
<parameter name="STB_ROTATION" value=""/>
|
||||
<parameter name="STB_MODIFY_LOCATION" value=""/>
|
||||
<parameter name="STB_MIRROR" value=""/>
|
||||
<parameter name="STB_SCALE" value=""/>
|
||||
<parameter name="STB_OFFSET" value=""/>
|
||||
<parameter name="STB_PROJECTION" value=""/>
|
||||
<parameter name="STB_PROJ_ON_CYL" value=""/>
|
||||
<parameter name="STB_MUL_TRANSLATION" value=""/>
|
||||
<parameter name="STB_MUL_ROTATION" value=""/>
|
||||
<parameter name="STB_EXTENSION" value=""/>
|
||||
<parameter name="STB_PARTITION" value=""/>
|
||||
<parameter name="STB_ARCHIMEDE" value=""/>
|
||||
<parameter name="STB_FILLET" value=""/>
|
||||
<parameter name="STB_CHAMFER" value=""/>
|
||||
<parameter name="STB_GET_SHAPES_ON_SHAPE" value=""/>
|
||||
<parameter name="STB_GET_SHARED_SHAPES" value=""/>
|
||||
<parameter name="STB_TRANSFER_DATA" value=""/>
|
||||
<parameter name="STB_EXTRACTION" value=""/>
|
||||
<parameter name="STB_EXTRUDED_CUT" value=""/>
|
||||
<parameter name="STB_EXTRUDED_BOSS" value=""/>
|
||||
<parameter name="STB_FILLET_1D" value=""/>
|
||||
<parameter name="STB_FILLET_2D" value=""/>
|
||||
<parameter name="STB_MUL_TRANSFORM" value=""/>
|
||||
<parameter name="STB_EXPLODE_BLOCKS" value=""/>
|
||||
<parameter name="STB_PROPAGATE" value=""/>
|
||||
<parameter name="STB_SEWING" value=""/>
|
||||
<parameter name="STB_GLUE_FACES" value=""/>
|
||||
<parameter name="STB_GLUE_EDGES" value=""/>
|
||||
<parameter name="STB_LIMIT_TOLERANCE" value=""/>
|
||||
<parameter name="STB_SUPPRESS_FACES" value=""/>
|
||||
<parameter name="STB_SUPPERSS_HOLES" value=""/>
|
||||
<parameter name="STB_SHAPE_PROCESS" value=""/>
|
||||
<parameter name="STB_CLOSE_CONTOUR" value=""/>
|
||||
<parameter name="STB_SUPPRESS_INT_WIRES" value=""/>
|
||||
<parameter name="STB_POINT_ON_EDGE" value=""/>
|
||||
<parameter name="STB_CHECK_FREE_BNDS" value=""/>
|
||||
<parameter name="STB_CHECK_FREE_FACES" value=""/>
|
||||
<parameter name="STB_CHANGE_ORIENTATION" value=""/>
|
||||
<parameter name="STB_REMOVE_WEBS" value=""/>
|
||||
<parameter name="STB_REMOVE_EXTRA_EDGES" value=""/>
|
||||
<parameter name="STB_FUSE_EDGES" value=""/>
|
||||
<parameter name="STB_UNION_FACES" value=""/>
|
||||
<parameter name="STB_INSPECT_OBJECT" value=""/>
|
||||
<parameter name="STB_POINT_COORDS" value=""/>
|
||||
<parameter name="STB_BASIC_PROPS" value=""/>
|
||||
<parameter name="STB_MASS_CENTER" value=""/>
|
||||
<parameter name="STB_INERTIA" value=""/>
|
||||
<parameter name="STB_NORMALE" value=""/>
|
||||
<parameter name="STB_BND_BOX" value=""/>
|
||||
<parameter name="STB_MIN_DIST" value=""/>
|
||||
<parameter name="STB_MEASURE_ANGLE" value=""/>
|
||||
<parameter name="STB_MANAGE_DIMENSIONS" value=""/>
|
||||
<parameter name="STB_ANNOTATION" value=""/>
|
||||
<parameter name="STB_EDIT_ANNOTATION" value=""/>
|
||||
<parameter name="STB_DELETE_ANNOTATION" value=""/>
|
||||
<parameter name="STB_TOLERANCE" value=""/>
|
||||
<parameter name="STB_WHAT_IS" value=""/>
|
||||
<parameter name="STB_CHECK" value=""/>
|
||||
<parameter name="STB_CHECK_COMPOUND" value=""/>
|
||||
<parameter name="STB_GET_NON_BLOCKS" value=""/>
|
||||
<parameter name="STB_CHECK_SELF_INTERSECTIONS" value=""/>
|
||||
<parameter name="STB_FAST_CHECK_INTERSECTIONS" value=""/>
|
||||
<parameter name="STB_SHAPE_STATISTICS" value=""/>
|
||||
<parameter name="STB_MATERIALS_LIBRARY" value=""/>
|
||||
<parameter name="STB_WIREFRAME" value=""/>
|
||||
<parameter name="STB_SHADING" value=""/>
|
||||
<parameter name="STB_SHADING_WITH_EDGES" value=""/>
|
||||
<parameter name="STB_TEXTURE" value=""/>
|
||||
<parameter name="STB_DISPLAY_ALL" value=""/>
|
||||
<parameter name="STB_ERASE_ALL" value=""/>
|
||||
<parameter name="STB_DISPLAY" value=""/>
|
||||
<parameter name="STB_VECTOR_MODE" value=""/>
|
||||
<parameter name="STB_VERTICES_MODE" value=""/>
|
||||
<parameter name="STB_NAME_MODE" value=""/>
|
||||
<parameter name="STB_VERTEX_SEL_ONLY" value=""/>
|
||||
<parameter name="STB_EDGE_SEL_ONLY" value=""/>
|
||||
<parameter name="STB_WIRE_SEL_ONLY" value=""/>
|
||||
<parameter name="STB_FACE_SEL_ONLY" value=""/>
|
||||
<parameter name="STB_SHELL_SEL_ONLY" value=""/>
|
||||
<parameter name="STB_SOLID_SEL_ONLY" value=""/>
|
||||
<parameter name="STB_COMPOUND_SEL_ONLY" value=""/>
|
||||
<parameter name="STB_ALL_SEL_ONLY" value=""/>
|
||||
<parameter name="STB_DISPLAY_ONLY" value=""/>
|
||||
<parameter name="STB_SHOW_ONLY_CHILDREN" value=""/>
|
||||
<parameter name="STB_BRING_TO_FRONT" value=""/>
|
||||
<parameter name="STB_CLS_BRING_TO_FRONT" value=""/>
|
||||
<parameter name="STB_ERASE" value=""/>
|
||||
<parameter name="STB_POP_WIREFRAME" value=""/>
|
||||
<parameter name="STB_POP_SHADING" value=""/>
|
||||
<parameter name="STB_POP_SHADING_WITH_EDGES" value=""/>
|
||||
<parameter name="STB_POP_TEXTURE" value=""/>
|
||||
<parameter name="STB_EDGE_WIDTH" value=""/>
|
||||
<parameter name="STB_ISOS_WIDTH" value=""/>
|
||||
<parameter name="STB_POP_VECTORS" value=""/>
|
||||
<parameter name="STB_POP_VERTICES" value=""/>
|
||||
<parameter name="STB_POP_SHOW_NAME" value=""/>
|
||||
<parameter name="STB_POP_DEFLECTION" value=""/>
|
||||
<parameter name="STB_POP_COLOR" value=""/>
|
||||
<parameter name="STB_POP_SETTEXTURE" value=""/>
|
||||
<parameter name="STB_POP_TRANSPARENCY" value=""/>
|
||||
<parameter name="STB_POP_ISOS" value=""/>
|
||||
<parameter name="STB_POP_AUTO_COLOR" value=""/>
|
||||
<parameter name="STB_POP_DISABLE_AUTO_COLOR" value=""/>
|
||||
<parameter name="STB_POP_CREATE_GROUP" value=""/>
|
||||
<parameter name="STB_POP_EDIT_FIELD" value=""/>
|
||||
<parameter name="STB_POP_DISCLOSE_CHILDREN" value=""/>
|
||||
<parameter name="STB_POP_CONCEAL_CHILDREN" value=""/>
|
||||
<parameter name="STB_POP_UNPUBLISH_OBJ" value=""/>
|
||||
<parameter name="STB_POP_PUBLISH_OBJ" value=""/>
|
||||
<parameter name="STB_POP_POINT_MARKER" value=""/>
|
||||
<parameter name="STB_POP_MATERIAL_PROPERTIES" value=""/>
|
||||
<parameter name="STB_POP_PREDEF_MATER_CUSTOM" value=""/>
|
||||
<parameter name="STB_POP_CREATE_FOLDER" value=""/>
|
||||
<parameter name="STB_POP_SORT_CHILD_ITEMS" value=""/>
|
||||
<parameter name="STB_POP_SHOW_DEPENDENCY_TREE" value=""/>
|
||||
<parameter name="STB_POP_REDUCE_STUDY" value=""/>
|
||||
<parameter name="STB_POP_SHOW_ALL_DIMENSIONS" value=""/>
|
||||
<parameter name="STB_POP_HIDE_ALL_DIMENSIONS" value=""/>
|
||||
<parameter name="STB_POP_SHOW_ALL_ANNOTATIONS" value=""/>
|
||||
<parameter name="STB_POP_HIDE_ALL_ANNOTATIONS" value=""/>
|
||||
<section name="actionID_mutations">
|
||||
<parameter name="%GEOM_ROOT_DIR%/share/salome/resources/geom/action_id_mutations.json" value=""/>
|
||||
</section>
|
||||
</document>
|
||||
<section name="shortcuts_vA1.0:GEOM">
|
||||
<parameter name="Edit/DELETE" value="Del"/>
|
||||
<parameter name="Inspection/ANNOTATION" value=""/>
|
||||
<parameter name="Inspection/ANNOTATION/DELETE_ANNOTATION" value=""/>
|
||||
<parameter name="Inspection/ANNOTATION/EDIT_ANNOTATION" value=""/>
|
||||
<parameter name="Inspection/BASIC_PROPS" value=""/>
|
||||
<parameter name="Inspection/CHECK" value=""/>
|
||||
<parameter name="Inspection/CHECK_COMPOUND" value=""/>
|
||||
<parameter name="Inspection/CHECK_SELF_INTERSECTIONS" value=""/>
|
||||
<parameter name="Inspection/Dimensions/BND_BOX" value=""/>
|
||||
<parameter name="Inspection/Dimensions/MANAGE_DIMENSIONS" value=""/>
|
||||
<parameter name="Inspection/Dimensions/MEASURE_ANGLE" value=""/>
|
||||
<parameter name="Inspection/Dimensions/MIN_DIST" value=""/>
|
||||
<parameter name="Inspection/FAST_CHECK_INTERSECTIONS" value=""/>
|
||||
<parameter name="Inspection/GET_NON_BLOCKS" value=""/>
|
||||
<parameter name="Inspection/INERTIA" value=""/>
|
||||
<parameter name="Inspection/MASS_CENTER" value=""/>
|
||||
<parameter name="Inspection/NORMALE" value=""/>
|
||||
<parameter name="Inspection/POINT_COORDS" value=""/>
|
||||
<parameter name="Inspection/SHAPE_STATISTICS" value=""/>
|
||||
<parameter name="Inspection/TOLERANCE" value=""/>
|
||||
<parameter name="Inspection/WHAT_IS" value=""/>
|
||||
<parameter name="NewEntity/Basic/3DSKETCH" value=""/>
|
||||
<parameter name="NewEntity/Basic/ARC" value=""/>
|
||||
<parameter name="NewEntity/Basic/CIRCLE" value=""/>
|
||||
<parameter name="NewEntity/Basic/CURVE" value=""/>
|
||||
<parameter name="NewEntity/Basic/CURVE_CREATOR" value=""/>
|
||||
<parameter name="NewEntity/Basic/ELLIPSE" value=""/>
|
||||
<parameter name="NewEntity/Basic/ISOLINE" value=""/>
|
||||
<parameter name="NewEntity/Basic/LINE" value=""/>
|
||||
<parameter name="NewEntity/Basic/LOCAL_CS" value=""/>
|
||||
<parameter name="NewEntity/Basic/ORIGIN_AND_VECTORS" value=""/>
|
||||
<parameter name="NewEntity/Basic/PLANE" value=""/>
|
||||
<parameter name="NewEntity/Basic/POINT" value=""/>
|
||||
<parameter name="NewEntity/Basic/SKETCH" value=""/>
|
||||
<parameter name="NewEntity/Basic/SURFACE_FROM_FACE" value=""/>
|
||||
<parameter name="NewEntity/Basic/VECTOR" value=""/>
|
||||
<parameter name="NewEntity/Blocks/HEX_SOLID" value=""/>
|
||||
<parameter name="NewEntity/Blocks/Q_FACE" value=""/>
|
||||
<parameter name="NewEntity/Build/COMPOUND" value=""/>
|
||||
<parameter name="NewEntity/Build/EDGE" value=""/>
|
||||
<parameter name="NewEntity/Build/FACE" value=""/>
|
||||
<parameter name="NewEntity/Build/SHELL" value=""/>
|
||||
<parameter name="NewEntity/Build/SOLID" value=""/>
|
||||
<parameter name="NewEntity/Build/WIRE" value=""/>
|
||||
<parameter name="NewEntity/EXPLODE" value=""/>
|
||||
<parameter name="NewEntity/FEATURE_DETECTION" value=""/>
|
||||
<parameter name="NewEntity/Field/FIELD_CREATE" value=""/>
|
||||
<parameter name="NewEntity/Field/FIELD_EDIT" value=""/>
|
||||
<parameter name="NewEntity/Generation/EXTRUSION" value=""/>
|
||||
<parameter name="NewEntity/Generation/FILLING" value=""/>
|
||||
<parameter name="NewEntity/Generation/PIPE" value=""/>
|
||||
<parameter name="NewEntity/Generation/PIPE_PATH" value=""/>
|
||||
<parameter name="NewEntity/Generation/REVOLUTION" value=""/>
|
||||
<parameter name="NewEntity/Generation/THICKNESS" value=""/>
|
||||
<parameter name="NewEntity/Group/GROUP_CREATE" value=""/>
|
||||
<parameter name="NewEntity/Group/GROUP_CUT" value=""/>
|
||||
<parameter name="NewEntity/Group/GROUP_EDIT" value=""/>
|
||||
<parameter name="NewEntity/Group/GROUP_INTERSECT" value=""/>
|
||||
<parameter name="NewEntity/Group/GROUP_UNION" value=""/>
|
||||
<parameter name="NewEntity/PICTURE_IMPORT" value=""/>
|
||||
<parameter name="NewEntity/Primitives/BOX" value=""/>
|
||||
<parameter name="NewEntity/Primitives/CONE" value=""/>
|
||||
<parameter name="NewEntity/Primitives/CYLINDER" value=""/>
|
||||
<parameter name="NewEntity/Primitives/DISK" value=""/>
|
||||
<parameter name="NewEntity/Primitives/RECTANGLE" value=""/>
|
||||
<parameter name="NewEntity/Primitives/SPHERE" value=""/>
|
||||
<parameter name="NewEntity/Primitives/TORUS" value=""/>
|
||||
<parameter name="Operations/ARCHIMEDE" value=""/>
|
||||
<parameter name="Operations/Blocks/EXPLODE_BLOCKS" value=""/>
|
||||
<parameter name="Operations/Blocks/MUL_TRANSFORM" value=""/>
|
||||
<parameter name="Operations/Blocks/PROPAGATE" value=""/>
|
||||
<parameter name="Operations/Boolean/COMMON" value=""/>
|
||||
<parameter name="Operations/Boolean/CUT" value=""/>
|
||||
<parameter name="Operations/Boolean/FUSE" value=""/>
|
||||
<parameter name="Operations/Boolean/SECTION" value=""/>
|
||||
<parameter name="Operations/CHAMFER" value=""/>
|
||||
<parameter name="Operations/EXTRACTION" value=""/>
|
||||
<parameter name="Operations/EXTRUDED_BOSS" value=""/>
|
||||
<parameter name="Operations/EXTRUDED_CUT" value=""/>
|
||||
<parameter name="Operations/FILLET" value=""/>
|
||||
<parameter name="Operations/FILLET_1D" value=""/>
|
||||
<parameter name="Operations/FILLET_2D" value=""/>
|
||||
<parameter name="Operations/GET_SHAPES_ON_SHAPE" value=""/>
|
||||
<parameter name="Operations/GET_SHARED_SHAPES" value=""/>
|
||||
<parameter name="Operations/PARTITION" value=""/>
|
||||
<parameter name="Operations/TRANSFER_DATA" value=""/>
|
||||
<parameter name="Operations/Transformation/EXTENSION" value=""/>
|
||||
<parameter name="Operations/Transformation/MIRROR" value=""/>
|
||||
<parameter name="Operations/Transformation/MODIFY_LOCATION" value=""/>
|
||||
<parameter name="Operations/Transformation/MUL_ROTATION" value=""/>
|
||||
<parameter name="Operations/Transformation/MUL_TRANSLATION" value=""/>
|
||||
<parameter name="Operations/Transformation/OFFSET" value=""/>
|
||||
<parameter name="Operations/Transformation/PROJ_ON_CYL" value=""/>
|
||||
<parameter name="Operations/Transformation/PROJECTION" value=""/>
|
||||
<parameter name="Operations/Transformation/ROTATION" value=""/>
|
||||
<parameter name="Operations/Transformation/SCALE" value=""/>
|
||||
<parameter name="Operations/Transformation/TRANSLATION" value=""/>
|
||||
<parameter name="Plugins/AdvancedGEOM/DividedCylinder" value=""/>
|
||||
<parameter name="Plugins/AdvancedGEOM/DividedDisk" value=""/>
|
||||
<parameter name="Plugins/AdvancedGEOM/SmoothingSurface" value=""/>
|
||||
<parameter name="Plugins/AdvancedGEOM/TShape_Basic" value=""/>
|
||||
<parameter name="Plugins/BREPPlugin/Export_BREP" value="Ctrl+E"/>
|
||||
<parameter name="Plugins/BREPPlugin/Import_BREP" value="Ctrl+I"/>
|
||||
<parameter name="Plugins/IGESPlugin/Export_IGES" value=""/>
|
||||
<parameter name="Plugins/IGESPlugin/Import_IGES" value=""/>
|
||||
<parameter name="Plugins/STEPPlugin/Export_STEP" value=""/>
|
||||
<parameter name="Plugins/STEPPlugin/Import_STEP" value=""/>
|
||||
<parameter name="Plugins/STLPlugin/Export_STL" value=""/>
|
||||
<parameter name="Plugins/STLPlugin/Import_STL" value=""/>
|
||||
<parameter name="Plugins/VTKPlugin/Export_VTK" value=""/>
|
||||
<parameter name="Plugins/XAOPlugin/Export_XAO" value=""/>
|
||||
<parameter name="Plugins/XAOPlugin/Import_XAO" value=""/>
|
||||
<parameter name="Repair/CHANGE_ORIENTATION" value=""/>
|
||||
<parameter name="Repair/CHECK_FREE_BNDS" value=""/>
|
||||
<parameter name="Repair/CHECK_FREE_FACES" value=""/>
|
||||
<parameter name="Repair/CLOSE_CONTOUR" value=""/>
|
||||
<parameter name="Repair/FUSE_EDGES" value=""/>
|
||||
<parameter name="Repair/GLUE_EDGES" value=""/>
|
||||
<parameter name="Repair/GLUE_FACES" value=""/>
|
||||
<parameter name="Repair/INSPECT_OBJECT" value=""/>
|
||||
<parameter name="Repair/LIMIT_TOLERANCE" value=""/>
|
||||
<parameter name="Repair/POINT_ON_EDGE" value=""/>
|
||||
<parameter name="Repair/REMOVE_EXTRA_EDGES" value=""/>
|
||||
<parameter name="Repair/REMOVE_WEBS" value=""/>
|
||||
<parameter name="Repair/SEWING" value=""/>
|
||||
<parameter name="Repair/SHAPE_PROCESS" value=""/>
|
||||
<parameter name="Repair/SUPPERSS_HOLES" value=""/>
|
||||
<parameter name="Repair/SUPPRESS_FACES" value=""/>
|
||||
<parameter name="Repair/SUPPRESS_INT_WIRES" value=""/>
|
||||
<parameter name="Repair/UNION_FACES" value=""/>
|
||||
<parameter name="Selection/ALL_SEL_ONLY" value=""/>
|
||||
<parameter name="Selection/COMPOUND_SEL_ONLY" value=""/>
|
||||
<parameter name="Selection/DisplayMode/POP_SHADING" value=""/>
|
||||
<parameter name="Selection/DisplayMode/POP_SHADING_WITH_EDGES" value=""/>
|
||||
<parameter name="Selection/DisplayMode/POP_SHOW_NAME" value=""/>
|
||||
<parameter name="Selection/DisplayMode/POP_TEXTURE" value=""/>
|
||||
<parameter name="Selection/DisplayMode/POP_VECTORS" value=""/>
|
||||
<parameter name="Selection/DisplayMode/POP_VERTICES" value=""/>
|
||||
<parameter name="Selection/DisplayMode/POP_WIREFRAME" value=""/>
|
||||
<parameter name="Selection/EDGE_SEL_ONLY" value=""/>
|
||||
<parameter name="Selection/EDGE_WIDTH" value=""/>
|
||||
<parameter name="Selection/FACE_SEL_ONLY" value=""/>
|
||||
<parameter name="Selection/ISOS_WIDTH" value=""/>
|
||||
<parameter name="Selection/POP_AUTO_COLOR" value=""/>
|
||||
<parameter name="Selection/POP_COLOR" value=""/>
|
||||
<parameter name="Selection/POP_CONCEAL_CHILDREN" value=""/>
|
||||
<parameter name="Selection/POP_CREATE_FOLDER" value=""/>
|
||||
<parameter name="Selection/POP_CREATE_GROUP" value=""/>
|
||||
<parameter name="Selection/POP_DEFLECTION" value=""/>
|
||||
<parameter name="Selection/POP_DISABLE_AUTO_COLOR" value=""/>
|
||||
<parameter name="Selection/POP_DISCLOSE_CHILDREN" value=""/>
|
||||
<parameter name="Selection/POP_EDIT_FIELD" value=""/>
|
||||
<parameter name="Selection/POP_HIDE_ALL_ANNOTATIONS" value=""/>
|
||||
<parameter name="Selection/POP_HIDE_ALL_DIMENSIONS" value=""/>
|
||||
<parameter name="Selection/POP_ISOS" value=""/>
|
||||
<parameter name="Selection/POP_ISOS/Decrease number" value="Meta+D"/>
|
||||
<parameter name="Selection/POP_ISOS/Increase number" value="Meta+I"/>
|
||||
<parameter name="Selection/POP_MATERIAL_PROPERTIES" value=""/>
|
||||
<parameter name="Selection/POP_POINT_MARKER" value=""/>
|
||||
<parameter name="Selection/POP_PREDEF_MATER_CUSTOM" value=""/>
|
||||
<parameter name="Selection/POP_PUBLISH_OBJ" value=""/>
|
||||
<parameter name="Selection/POP_REDUCE_STUDY" value=""/>
|
||||
<parameter name="Selection/POP_SETTEXTURE" value=""/>
|
||||
<parameter name="Selection/POP_SHOW_ALL_ANNOTATIONS" value=""/>
|
||||
<parameter name="Selection/POP_SHOW_ALL_DIMENSIONS" value=""/>
|
||||
<parameter name="Selection/POP_SHOW_DEPENDENCY_TREE" value=""/>
|
||||
<parameter name="Selection/POP_SORT_CHILD_ITEMS" value=""/>
|
||||
<parameter name="Selection/POP_TRANSPARENCY" value=""/>
|
||||
<parameter name="Selection/POP_TRANSPARENCY/Decrease" value="Meta+T"/>
|
||||
<parameter name="Selection/POP_TRANSPARENCY/Increase" value="Meta+Y"/>
|
||||
<parameter name="Selection/POP_UNPUBLISH_OBJ" value=""/>
|
||||
<parameter name="Selection/RELOAD_IMPORTED" value=""/>
|
||||
<parameter name="Selection/SHELL_SEL_ONLY" value=""/>
|
||||
<parameter name="Selection/SOLID_SEL_ONLY" value=""/>
|
||||
<parameter name="Selection/VERTEX_SEL_ONLY" value=""/>
|
||||
<parameter name="Selection/WIRE_SEL_ONLY" value=""/>
|
||||
<parameter name="Tools/CHECK_GEOMETRY" value=""/>
|
||||
<parameter name="Tools/MATERIALS_LIBRARY" value=""/>
|
||||
<parameter name="View/BRING_TO_FRONT" value=""/>
|
||||
<parameter name="View/CLS_BRING_TO_FRONT" value=""/>
|
||||
<parameter name="View/DISPLAY" value=""/>
|
||||
<parameter name="View/DISPLAY_ALL" value=""/>
|
||||
<parameter name="View/DISPLAY_ONLY" value=""/>
|
||||
<parameter name="View/DisplayMode/NAME_MODE" value=""/>
|
||||
<parameter name="View/DisplayMode/SHADING" value=""/>
|
||||
<parameter name="View/DisplayMode/SHADING_WITH_EDGES" value=""/>
|
||||
<parameter name="View/DisplayMode/TEXTURE" value=""/>
|
||||
<parameter name="View/DisplayMode/VECTOR_MODE" value=""/>
|
||||
<parameter name="View/DisplayMode/VERTICES_MODE" value=""/>
|
||||
<parameter name="View/DisplayMode/WIREFRAME" value=""/>
|
||||
<parameter name="View/ERASE" value=""/>
|
||||
<parameter name="View/ERASE_ALL" value=""/>
|
||||
<parameter name="View/SHOW_ONLY_CHILDREN" value=""/>
|
||||
</section>
|
||||
</document>
|
File diff suppressed because it is too large
Load Diff
202
resources/action_id_mutations.json
Normal file
202
resources/action_id_mutations.json
Normal file
@ -0,0 +1,202 @@
|
||||
{
|
||||
"mutations": [
|
||||
{
|
||||
"sectionPrefixOld": "shortcuts",
|
||||
"sectionPrefixNew": "shortcuts_vA1.0",
|
||||
"oldToNewActionIDMap": {
|
||||
"GEOM/Isolines/Increase number" : "GEOM/Selection/POP_ISOS/Increase number",
|
||||
"GEOM/Isolines/Decrease number" : "GEOM/Selection/POP_ISOS/Decrease number",
|
||||
"GEOM/Transparency/Increase" : "GEOM/Selection/POP_TRANSPARENCY/Increase",
|
||||
"GEOM/Transparency/Decrease" : "GEOM/Selection/POP_TRANSPARENCY/Decrease",
|
||||
"GEOM/AdvancedGEOM/DividedCylinder" : "GEOM/Plugins/AdvancedGEOM/DividedCylinder",
|
||||
"GEOM/AdvancedGEOM/DividedDisk" : "GEOM/Plugins/AdvancedGEOM/DividedDisk",
|
||||
"GEOM/AdvancedGEOM/SmoothingSurface" : "GEOM/Plugins/AdvancedGEOM/SmoothingSurface",
|
||||
"GEOM/AdvancedGEOM/TShape_Basic" : "GEOM/Plugins/AdvancedGEOM/TShape_Basic",
|
||||
"GEOM/BREPPlugin/Export_BREP" : "GEOM/Plugins/BREPPlugin/Export_BREP",
|
||||
"GEOM/BREPPlugin/Import_BREP" : "GEOM/Plugins/BREPPlugin/Import_BREP",
|
||||
"GEOM/IGESPlugin/Export_IGES" : "GEOM/Plugins/IGESPlugin/Export_IGES",
|
||||
"GEOM/IGESPlugin/Import_IGES" : "GEOM/Plugins/IGESPlugin/Import_IGES",
|
||||
"GEOM/STEPPlugin/Export_STEP" : "GEOM/Plugins/STEPPlugin/Export_STEP",
|
||||
"GEOM/STEPPlugin/Import_STEP" : "GEOM/Plugins/STEPPlugin/Import_STEP",
|
||||
"GEOM/STLPlugin/Export_STL" : "GEOM/Plugins/STLPlugin/Export_STL",
|
||||
"GEOM/STLPlugin/Import_STL" : "GEOM/Plugins/STLPlugin/Import_STL",
|
||||
"GEOM/VTKPlugin/Export_VTK" : "GEOM/Plugins/VTKPlugin/Export_VTK",
|
||||
"GEOM/XAOPlugin/Export_XAO" : "GEOM/Plugins/XAOPlugin/Export_XAO",
|
||||
"GEOM/XAOPlugin/Import_XAO" : "GEOM/Plugins/XAOPlugin/Import_XAO",
|
||||
"GEOM/STB_DELETE" : "GEOM/Edit/DELETE",
|
||||
"GEOM/STB_POINT" : "GEOM/NewEntity/Basic/POINT",
|
||||
"GEOM/STB_LINE" : "GEOM/NewEntity/Basic/LINE",
|
||||
"GEOM/STB_CIRCLE" : "GEOM/NewEntity/Basic/CIRCLE",
|
||||
"GEOM/STB_ELLIPSE" : "GEOM/NewEntity/Basic/ELLIPSE",
|
||||
"GEOM/STB_ARC" : "GEOM/NewEntity/Basic/ARC",
|
||||
"GEOM/STB_CURVE" : "GEOM/NewEntity/Basic/CURVE",
|
||||
"GEOM/STB_ISOLINE" : "GEOM/NewEntity/Basic/ISOLINE",
|
||||
"GEOM/STB_VECTOR" : "GEOM/NewEntity/Basic/VECTOR",
|
||||
"GEOM/STB_PLANE" : "GEOM/NewEntity/Basic/PLANE",
|
||||
"GEOM/STB_LOCAL_CS" : "GEOM/NewEntity/Basic/LOCAL_CS",
|
||||
"GEOM/STB_ORIGIN_AND_VECTORS" : "GEOM/NewEntity/Basic/ORIGIN_AND_VECTORS",
|
||||
"GEOM/STB_SURFACE_FROM_FACE" : "GEOM/NewEntity/Basic/SURFACE_FROM_FACE",
|
||||
"GEOM/STB_BOX" : "GEOM/NewEntity/Primitives/BOX",
|
||||
"GEOM/STB_CYLINDER" : "GEOM/NewEntity/Primitives/CYLINDER",
|
||||
"GEOM/STB_SPHERE" : "GEOM/NewEntity/Primitives/SPHERE",
|
||||
"GEOM/STB_TORUS" : "GEOM/NewEntity/Primitives/TORUS",
|
||||
"GEOM/STB_CONE" : "GEOM/NewEntity/Primitives/CONE",
|
||||
"GEOM/STB_RECTANGLE" : "GEOM/NewEntity/Primitives/RECTANGLE",
|
||||
"GEOM/STB_DISK" : "GEOM/NewEntity/Primitives/DISK",
|
||||
"GEOM/STB_EXTRUSION" : "GEOM/NewEntity/Generation/EXTRUSION",
|
||||
"GEOM/STB_REVOLUTION" : "GEOM/NewEntity/Generation/REVOLUTION",
|
||||
"GEOM/STB_FILLING" : "GEOM/NewEntity/Generation/FILLING",
|
||||
"GEOM/STB_PIPE" : "GEOM/NewEntity/Generation/PIPE",
|
||||
"GEOM/STB_PIPE_PATH" : "GEOM/NewEntity/Generation/PIPE_PATH",
|
||||
"GEOM/STB_THICKNESS" : "GEOM/NewEntity/Generation/THICKNESS",
|
||||
"GEOM/STB_GROUP_CREATE" : "GEOM/NewEntity/Group/GROUP_CREATE",
|
||||
"GEOM/STB_GROUP_EDIT" : "GEOM/NewEntity/Group/GROUP_EDIT",
|
||||
"GEOM/STB_GROUP_UNION" : "GEOM/NewEntity/Group/GROUP_UNION",
|
||||
"GEOM/STB_GROUP_INTERSECT" : "GEOM/NewEntity/Group/GROUP_INTERSECT",
|
||||
"GEOM/STB_GROUP_CUT" : "GEOM/NewEntity/Group/GROUP_CUT",
|
||||
"GEOM/STB_FIELD_CREATE" : "GEOM/NewEntity/Field/FIELD_CREATE",
|
||||
"GEOM/STB_FIELD_EDIT" : "GEOM/NewEntity/Field/FIELD_EDIT",
|
||||
"GEOM/STB_RELOAD_IMPORTED" : "GEOM/Selection/RELOAD_IMPORTED",
|
||||
"GEOM/STB_Q_FACE" : "GEOM/NewEntity/Blocks/Q_FACE",
|
||||
"GEOM/STB_HEX_SOLID" : "GEOM/NewEntity/Blocks/HEX_SOLID",
|
||||
"GEOM/STB_SKETCH" : "GEOM/NewEntity/Basic/SKETCH",
|
||||
"GEOM/STB_3DSKETCH" : "GEOM/NewEntity/Basic/3DSKETCH",
|
||||
"GEOM/STB_EXPLODE" : "GEOM/NewEntity/EXPLODE",
|
||||
"GEOM/STB_FEATURE_DETECTION" : "GEOM/NewEntity/FEATURE_DETECTION",
|
||||
"GEOM/STB_PICTURE_IMPORT" : "GEOM/NewEntity/PICTURE_IMPORT",
|
||||
"GEOM/STB_CURVE_CREATOR" : "GEOM/NewEntity/Basic/CURVE_CREATOR",
|
||||
"GEOM/STB_EDGE" : "GEOM/NewEntity/Build/EDGE",
|
||||
"GEOM/STB_WIRE" : "GEOM/NewEntity/Build/WIRE",
|
||||
"GEOM/STB_FACE" : "GEOM/NewEntity/Build/FACE",
|
||||
"GEOM/STB_SHELL" : "GEOM/NewEntity/Build/SHELL",
|
||||
"GEOM/STB_SOLID" : "GEOM/NewEntity/Build/SOLID",
|
||||
"GEOM/STB_COMPOUND" : "GEOM/NewEntity/Build/COMPOUND",
|
||||
"GEOM/STB_FUSE" : "GEOM/Operations/Boolean/FUSE",
|
||||
"GEOM/STB_COMMON" : "GEOM/Operations/Boolean/COMMON",
|
||||
"GEOM/STB_CUT" : "GEOM/Operations/Boolean/CUT",
|
||||
"GEOM/STB_SECTION" : "GEOM/Operations/Boolean/SECTION",
|
||||
"GEOM/STB_TRANSLATION" : "GEOM/Operations/Transformation/TRANSLATION",
|
||||
"GEOM/STB_ROTATION" : "GEOM/Operations/Transformation/ROTATION",
|
||||
"GEOM/STB_MODIFY_LOCATION" : "GEOM/Operations/Transformation/MODIFY_LOCATION",
|
||||
"GEOM/STB_MIRROR" : "GEOM/Operations/Transformation/MIRROR",
|
||||
"GEOM/STB_SCALE" : "GEOM/Operations/Transformation/SCALE",
|
||||
"GEOM/STB_OFFSET" : "GEOM/Operations/Transformation/OFFSET",
|
||||
"GEOM/STB_PROJECTION" : "GEOM/Operations/Transformation/PROJECTION",
|
||||
"GEOM/STB_PROJ_ON_CYL" : "GEOM/Operations/Transformation/PROJ_ON_CYL",
|
||||
"GEOM/STB_MUL_TRANSLATION" : "GEOM/Operations/Transformation/MUL_TRANSLATION",
|
||||
"GEOM/STB_MUL_ROTATION" : "GEOM/Operations/Transformation/MUL_ROTATION",
|
||||
"GEOM/STB_EXTENSION" : "GEOM/Operations/Transformation/EXTENSION",
|
||||
"GEOM/STB_PARTITION" : "GEOM/Operations/PARTITION",
|
||||
"GEOM/STB_ARCHIMEDE" : "GEOM/Operations/ARCHIMEDE",
|
||||
"GEOM/STB_FILLET" : "GEOM/Operations/FILLET",
|
||||
"GEOM/STB_CHAMFER" : "GEOM/Operations/CHAMFER",
|
||||
"GEOM/STB_GET_SHAPES_ON_SHAPE" : "GEOM/Operations/GET_SHAPES_ON_SHAPE",
|
||||
"GEOM/STB_GET_SHARED_SHAPES" : "GEOM/Operations/GET_SHARED_SHAPES",
|
||||
"GEOM/STB_TRANSFER_DATA" : "GEOM/Operations/TRANSFER_DATA",
|
||||
"GEOM/STB_EXTRACTION" : "GEOM/Operations/EXTRACTION",
|
||||
"GEOM/STB_EXTRUDED_CUT" : "GEOM/Operations/EXTRUDED_CUT",
|
||||
"GEOM/STB_EXTRUDED_BOSS" : "GEOM/Operations/EXTRUDED_BOSS",
|
||||
"GEOM/STB_FILLET_1D" : "GEOM/Operations/FILLET_1D",
|
||||
"GEOM/STB_FILLET_2D" : "GEOM/Operations/FILLET_2D",
|
||||
"GEOM/STB_MUL_TRANSFORM" : "GEOM/Operations/Blocks/MUL_TRANSFORM",
|
||||
"GEOM/STB_EXPLODE_BLOCKS" : "GEOM/Operations/Blocks/EXPLODE_BLOCKS",
|
||||
"GEOM/STB_PROPAGATE" : "GEOM/Operations/Blocks/PROPAGATE",
|
||||
"GEOM/STB_SEWING" : "GEOM/Repair/SEWING",
|
||||
"GEOM/STB_GLUE_FACES" : "GEOM/Repair/GLUE_FACES",
|
||||
"GEOM/STB_GLUE_EDGES" : "GEOM/Repair/GLUE_EDGES",
|
||||
"GEOM/STB_LIMIT_TOLERANCE" : "GEOM/Repair/LIMIT_TOLERANCE",
|
||||
"GEOM/STB_SUPPRESS_FACES" : "GEOM/Repair/SUPPRESS_FACES",
|
||||
"GEOM/STB_SUPPERSS_HOLES" : "GEOM/Repair/SUPPERSS_HOLES",
|
||||
"GEOM/STB_SHAPE_PROCESS" : "GEOM/Repair/SHAPE_PROCESS",
|
||||
"GEOM/STB_CLOSE_CONTOUR" : "GEOM/Repair/CLOSE_CONTOUR",
|
||||
"GEOM/STB_SUPPRESS_INT_WIRES" : "GEOM/Repair/SUPPRESS_INT_WIRES",
|
||||
"GEOM/STB_POINT_ON_EDGE" : "GEOM/Repair/POINT_ON_EDGE",
|
||||
"GEOM/STB_CHECK_FREE_BNDS" : "GEOM/Repair/CHECK_FREE_BNDS",
|
||||
"GEOM/STB_CHECK_FREE_FACES" : "GEOM/Repair/CHECK_FREE_FACES",
|
||||
"GEOM/STB_CHANGE_ORIENTATION" : "GEOM/Repair/CHANGE_ORIENTATION",
|
||||
"GEOM/STB_REMOVE_WEBS" : "GEOM/Repair/REMOVE_WEBS",
|
||||
"GEOM/STB_REMOVE_EXTRA_EDGES" : "GEOM/Repair/REMOVE_EXTRA_EDGES",
|
||||
"GEOM/STB_FUSE_EDGES" : "GEOM/Repair/FUSE_EDGES",
|
||||
"GEOM/STB_UNION_FACES" : "GEOM/Repair/UNION_FACES",
|
||||
"GEOM/STB_INSPECT_OBJECT" : "GEOM/Repair/INSPECT_OBJECT",
|
||||
"GEOM/STB_POINT_COORDS" : "GEOM/Inspection/POINT_COORDS",
|
||||
"GEOM/STB_BASIC_PROPS" : "GEOM/Inspection/BASIC_PROPS",
|
||||
"GEOM/STB_MASS_CENTER" : "GEOM/Inspection/MASS_CENTER",
|
||||
"GEOM/STB_INERTIA" : "GEOM/Inspection/INERTIA",
|
||||
"GEOM/STB_NORMALE" : "GEOM/Inspection/NORMALE",
|
||||
"GEOM/STB_BND_BOX" : "GEOM/Inspection/Dimensions/BND_BOX",
|
||||
"GEOM/STB_MIN_DIST" : "GEOM/Inspection/Dimensions/MIN_DIST",
|
||||
"GEOM/STB_MEASURE_ANGLE" : "GEOM/Inspection/Dimensions/MEASURE_ANGLE",
|
||||
"GEOM/STB_MANAGE_DIMENSIONS" : "GEOM/Inspection/Dimensions/MANAGE_DIMENSIONS",
|
||||
"GEOM/STB_ANNOTATION" : "GEOM/Inspection/ANNOTATION",
|
||||
"GEOM/STB_EDIT_ANNOTATION" : "GEOM/Inspection/ANNOTATION/EDIT_ANNOTATION",
|
||||
"GEOM/STB_DELETE_ANNOTATION" : "GEOM/Inspection/ANNOTATION/DELETE_ANNOTATION",
|
||||
"GEOM/STB_TOLERANCE" : "GEOM/Inspection/TOLERANCE",
|
||||
"GEOM/STB_WHAT_IS" : "GEOM/Inspection/WHAT_IS",
|
||||
"GEOM/STB_CHECK" : "GEOM/Inspection/CHECK",
|
||||
"GEOM/STB_CHECK_COMPOUND" : "GEOM/Inspection/CHECK_COMPOUND",
|
||||
"GEOM/STB_GET_NON_BLOCKS" : "GEOM/Inspection/GET_NON_BLOCKS",
|
||||
"GEOM/STB_CHECK_SELF_INTERSECTIONS" : "GEOM/Inspection/CHECK_SELF_INTERSECTIONS",
|
||||
"GEOM/STB_FAST_CHECK_INTERSECTIONS" : "GEOM/Inspection/FAST_CHECK_INTERSECTIONS",
|
||||
"GEOM/STB_SHAPE_STATISTICS" : "GEOM/Inspection/SHAPE_STATISTICS",
|
||||
"GEOM/STB_MATERIALS_LIBRARY" : "GEOM/Tools/MATERIALS_LIBRARY",
|
||||
"GEOM/STB_WIREFRAME" : "GEOM/View/DisplayMode/WIREFRAME",
|
||||
"GEOM/STB_SHADING" : "GEOM/View/DisplayMode/SHADING",
|
||||
"GEOM/STB_SHADING_WITH_EDGES" : "GEOM/View/DisplayMode/SHADING_WITH_EDGES",
|
||||
"GEOM/STB_TEXTURE" : "GEOM/View/DisplayMode/TEXTURE",
|
||||
"GEOM/STB_DISPLAY_ALL" : "GEOM/View/DISPLAY_ALL",
|
||||
"GEOM/STB_ERASE_ALL" : "GEOM/View/ERASE_ALL",
|
||||
"GEOM/STB_DISPLAY" : "GEOM/View/DISPLAY",
|
||||
"GEOM/STB_VECTOR_MODE" : "GEOM/View/DisplayMode/VECTOR_MODE",
|
||||
"GEOM/STB_VERTICES_MODE" : "GEOM/View/DisplayMode/VERTICES_MODE",
|
||||
"GEOM/STB_NAME_MODE" : "GEOM/View/DisplayMode/NAME_MODE",
|
||||
"GEOM/STB_VERTEX_SEL_ONLY" : "GEOM/Selection/VERTEX_SEL_ONLY",
|
||||
"GEOM/STB_EDGE_SEL_ONLY" : "GEOM/Selection/EDGE_SEL_ONLY",
|
||||
"GEOM/STB_WIRE_SEL_ONLY" : "GEOM/Selection/WIRE_SEL_ONLY",
|
||||
"GEOM/STB_FACE_SEL_ONLY" : "GEOM/Selection/FACE_SEL_ONLY",
|
||||
"GEOM/STB_SHELL_SEL_ONLY" : "GEOM/Selection/SHELL_SEL_ONLY",
|
||||
"GEOM/STB_SOLID_SEL_ONLY" : "GEOM/Selection/SOLID_SEL_ONLY",
|
||||
"GEOM/STB_COMPOUND_SEL_ONLY" : "GEOM/Selection/COMPOUND_SEL_ONLY",
|
||||
"GEOM/STB_ALL_SEL_ONLY" : "GEOM/Selection/ALL_SEL_ONLY",
|
||||
"GEOM/STB_DISPLAY_ONLY" : "GEOM/View/DISPLAY_ONLY",
|
||||
"GEOM/STB_SHOW_ONLY_CHILDREN" : "GEOM/View/SHOW_ONLY_CHILDREN",
|
||||
"GEOM/STB_BRING_TO_FRONT" : "GEOM/View/BRING_TO_FRONT",
|
||||
"GEOM/STB_CLS_BRING_TO_FRONT" : "GEOM/View/CLS_BRING_TO_FRONT",
|
||||
"GEOM/STB_ERASE" : "GEOM/View/ERASE",
|
||||
"GEOM/STB_POP_WIREFRAME" : "GEOM/Selection/DisplayMode/POP_WIREFRAME",
|
||||
"GEOM/STB_POP_SHADING" : "GEOM/Selection/DisplayMode/POP_SHADING",
|
||||
"GEOM/STB_POP_SHADING_WITH_EDGES" : "GEOM/Selection/DisplayMode/POP_SHADING_WITH_EDGES",
|
||||
"GEOM/STB_POP_TEXTURE" : "GEOM/Selection/DisplayMode/POP_TEXTURE",
|
||||
"GEOM/STB_EDGE_WIDTH" : "GEOM/Selection/EDGE_WIDTH",
|
||||
"GEOM/STB_ISOS_WIDTH" : "GEOM/Selection/ISOS_WIDTH",
|
||||
"GEOM/STB_POP_VECTORS" : "GEOM/Selection/DisplayMode/POP_VECTORS",
|
||||
"GEOM/STB_POP_VERTICES" : "GEOM/Selection/DisplayMode/POP_VERTICES",
|
||||
"GEOM/STB_POP_SHOW_NAME" : "GEOM/Selection/DisplayMode/POP_SHOW_NAME",
|
||||
"GEOM/STB_POP_DEFLECTION" : "GEOM/Selection/POP_DEFLECTION",
|
||||
"GEOM/STB_POP_COLOR" : "GEOM/Selection/POP_COLOR",
|
||||
"GEOM/STB_POP_SETTEXTURE" : "GEOM/Selection/POP_SETTEXTURE",
|
||||
"GEOM/STB_POP_TRANSPARENCY" : "GEOM/Selection/POP_TRANSPARENCY",
|
||||
"GEOM/STB_POP_ISOS" : "GEOM/Selection/POP_ISOS",
|
||||
"GEOM/STB_POP_AUTO_COLOR" : "GEOM/Selection/POP_AUTO_COLOR",
|
||||
"GEOM/STB_POP_DISABLE_AUTO_COLOR" : "GEOM/Selection/POP_DISABLE_AUTO_COLOR",
|
||||
"GEOM/STB_POP_CREATE_GROUP" : "GEOM/Selection/POP_CREATE_GROUP",
|
||||
"GEOM/STB_POP_EDIT_FIELD" : "GEOM/Selection/POP_EDIT_FIELD",
|
||||
"GEOM/STB_POP_DISCLOSE_CHILDREN" : "GEOM/Selection/POP_DISCLOSE_CHILDREN",
|
||||
"GEOM/STB_POP_CONCEAL_CHILDREN" : "GEOM/Selection/POP_CONCEAL_CHILDREN",
|
||||
"GEOM/STB_POP_UNPUBLISH_OBJ" : "GEOM/Selection/POP_UNPUBLISH_OBJ",
|
||||
"GEOM/STB_POP_PUBLISH_OBJ" : "GEOM/Selection/POP_PUBLISH_OBJ",
|
||||
"GEOM/STB_POP_POINT_MARKER" : "GEOM/Selection/POP_POINT_MARKER",
|
||||
"GEOM/STB_POP_MATERIAL_PROPERTIES" : "GEOM/Selection/POP_MATERIAL_PROPERTIES",
|
||||
"GEOM/STB_POP_PREDEF_MATER_CUSTOM" : "GEOM/Selection/POP_PREDEF_MATER_CUSTOM",
|
||||
"GEOM/STB_POP_CREATE_FOLDER" : "GEOM/Selection/POP_CREATE_FOLDER",
|
||||
"GEOM/STB_POP_SORT_CHILD_ITEMS" : "GEOM/Selection/POP_SORT_CHILD_ITEMS",
|
||||
"GEOM/STB_POP_SHOW_DEPENDENCY_TREE" : "GEOM/Selection/POP_SHOW_DEPENDENCY_TREE",
|
||||
"GEOM/STB_POP_REDUCE_STUDY" : "GEOM/Selection/POP_REDUCE_STUDY",
|
||||
"GEOM/STB_POP_SHOW_ALL_DIMENSIONS" : "GEOM/Selection/POP_SHOW_ALL_DIMENSIONS",
|
||||
"GEOM/STB_POP_HIDE_ALL_DIMENSIONS" : "GEOM/Selection/POP_HIDE_ALL_DIMENSIONS",
|
||||
"GEOM/STB_POP_SHOW_ALL_ANNOTATIONS" : "GEOM/Selection/POP_SHOW_ALL_ANNOTATIONS",
|
||||
"GEOM/STB_POP_HIDE_ALL_ANNOTATIONS" : "GEOM/Selection/POP_HIDE_ALL_ANNOTATIONS"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
BIN
resources/offset_partial.png
Normal file
BIN
resources/offset_partial.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 870 B |
@ -25,6 +25,7 @@ INCLUDE_DIRECTORIES(
|
||||
${PTHREAD_INCLUDE_DIR}
|
||||
${OpenCASCADE_INCLUDE_DIR}
|
||||
${KERNEL_INCLUDE_DIRS}
|
||||
${CommonGeomLib_INCLUDE_DIRS}
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMImpl
|
||||
${PROJECT_SOURCE_DIR}/src/GEOM
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
|
||||
|
@ -26,6 +26,7 @@ ENDIF()
|
||||
# additional include directories
|
||||
INCLUDE_DIRECTORIES(
|
||||
${OpenCASCADE_INCLUDE_DIR}
|
||||
${CommonGeomLib_INCLUDE_DIRS}
|
||||
${KERNEL_INCLUDE_DIRS}
|
||||
${PROJECT_BINARY_DIR}/idl
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
|
||||
|
@ -1093,10 +1093,13 @@ void CurveCreator_Curve::constructAISObject()
|
||||
// myAISShape->SetColor( myCurveColor );
|
||||
myAISShape->SetWidth( myLineWidth );
|
||||
Handle(Prs3d_PointAspect) anAspect = myAISShape->Attributes()->PointAspect();
|
||||
anAspect->SetScale( 3.0 );
|
||||
anAspect->SetTypeOfMarker(Aspect_TOM_O_POINT);
|
||||
anAspect->SetColor(myPointAspectColor);
|
||||
myAISShape->Attributes()->SetPointAspect( anAspect );
|
||||
if (!anAspect.IsNull())
|
||||
{
|
||||
anAspect->SetScale( 3.0 );
|
||||
anAspect->SetTypeOfMarker(Aspect_TOM_O_POINT);
|
||||
anAspect->SetColor(myPointAspectColor);
|
||||
myAISShape->Attributes()->SetPointAspect( anAspect );
|
||||
}
|
||||
}
|
||||
|
||||
Handle(AIS_InteractiveObject) CurveCreator_Curve::getAISObject( const bool theNeedToBuild ) const
|
||||
|
@ -31,6 +31,7 @@ INCLUDE_DIRECTORIES(
|
||||
# additional preprocessor / compiler flags
|
||||
ADD_DEFINITIONS(
|
||||
${OpenCASCADE_DEFINITIONS}
|
||||
${OMNIORB_DEFINITIONS}
|
||||
)
|
||||
|
||||
# libraries to link to
|
||||
@ -57,6 +58,7 @@ SET(GEOM_HEADERS
|
||||
GEOM_PythonDump.hxx
|
||||
GEOM_DataMapOfAsciiStringTransient.hxx
|
||||
GEOM_BaseObject.hxx
|
||||
GEOM_ColorUtils.hxx
|
||||
)
|
||||
|
||||
# --- sources ---
|
||||
@ -73,6 +75,7 @@ SET(GEOM_SOURCES
|
||||
GEOM_BaseDriver.cxx
|
||||
GEOM_SubShapeDriver.cxx
|
||||
GEOM_PythonDump.cxx
|
||||
GEOM_ColorUtils.cxx
|
||||
)
|
||||
|
||||
# --- rules ---
|
||||
|
101
src/GEOM/GEOM_ColorUtils.cxx
Normal file
101
src/GEOM/GEOM_ColorUtils.cxx
Normal file
@ -0,0 +1,101 @@
|
||||
// Copyright (C) 2007-2024 CEA, EDF, 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_ColorUtils.hxx"
|
||||
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
#include <random>
|
||||
|
||||
namespace
|
||||
{
|
||||
struct ColorRGB
|
||||
{
|
||||
double r{0.0};
|
||||
double g{0.0};
|
||||
double b{0.0};
|
||||
};
|
||||
|
||||
ColorRGB fromHsv(const int h, const int s, const int v)
|
||||
{
|
||||
const double hh = h / 60.0;
|
||||
const double ss = s / 255.0;
|
||||
const double vv = v / 255.0;
|
||||
|
||||
const int i = static_cast<int>(std::floor(hh)) % 6;
|
||||
const double f = hh - std::floor(hh);
|
||||
const double p = vv * (1.0 - ss);
|
||||
const double q = vv * (1.0 - f * ss);
|
||||
const double t = vv * (1.0 - (1.0 - f) * ss);
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0: return { vv, t, p };
|
||||
case 1: return { q, vv, p };
|
||||
case 2: return { p, vv, t };
|
||||
case 3: return { p, q, vv };
|
||||
case 4: return { t, p, vv };
|
||||
case 5: return { vv, p, q };
|
||||
default: return { 0.0, 0.0, 0.0 };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SALOMEDS::Color GEOM_ColorUtils::getPredefinedUniqueColor()
|
||||
{
|
||||
static const std::vector<ColorRGB> colors = []()
|
||||
{
|
||||
std::vector<ColorRGB> tempColors;
|
||||
for (int s = 0; s < 2; s++)
|
||||
{
|
||||
for (int v = 100; v >= 40; v -= 20)
|
||||
{
|
||||
for (int h = 0; h < 359; h += 60)
|
||||
{
|
||||
tempColors.push_back(fromHsv(h, 255 - s * 127, v * 255 / 100));
|
||||
}
|
||||
}
|
||||
}
|
||||
return tempColors;
|
||||
}();
|
||||
|
||||
static int currentColor = randomize(colors.size());
|
||||
|
||||
const SALOMEDS::Color color
|
||||
{
|
||||
colors[currentColor].r,
|
||||
colors[currentColor].g,
|
||||
colors[currentColor].b
|
||||
};
|
||||
|
||||
currentColor = (currentColor + 1) % colors.size();
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
int GEOM_ColorUtils::randomize(int size)
|
||||
{
|
||||
std::random_device rd;
|
||||
std::mt19937 gen(rd());
|
||||
std::uniform_int_distribution<> dis(0, size - 1);
|
||||
return dis(gen);
|
||||
}
|
40
src/GEOM/GEOM_ColorUtils.hxx
Normal file
40
src/GEOM/GEOM_ColorUtils.hxx
Normal file
@ -0,0 +1,40 @@
|
||||
// Copyright (C) 2007-2024 CEA, EDF, 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
|
||||
//
|
||||
|
||||
#ifndef GEOMUTILS_COLOR_HXX
|
||||
#define GEOMUTILS_COLOR_HXX
|
||||
|
||||
#include "SALOMEDS_Attributes.hh"
|
||||
|
||||
#include <Standard_Macro.hxx>
|
||||
|
||||
|
||||
class GEOM_ColorUtils
|
||||
{
|
||||
public:
|
||||
Standard_EXPORT static SALOMEDS::Color getPredefinedUniqueColor();
|
||||
|
||||
private:
|
||||
Standard_EXPORT static int randomize(int size);
|
||||
};
|
||||
|
||||
#endif // GEOMUTILS_COLOR_HXX
|
@ -22,6 +22,9 @@
|
||||
|
||||
#include "GEOM_Object.hxx"
|
||||
|
||||
#include "GEOM_Engine.hxx"
|
||||
#include "GEOM_ColorUtils.hxx"
|
||||
|
||||
#include <TDataStd_Integer.hxx>
|
||||
#include <TDataStd_Real.hxx>
|
||||
#include <TDataStd_RealArray.hxx>
|
||||
@ -157,6 +160,18 @@ GEOM_Object::Color GEOM_Object::GetColor()
|
||||
void GEOM_Object::SetAutoColor(bool theAutoColor)
|
||||
{
|
||||
TDataStd_Integer::Set(_label.FindChild(AUTO_COLOR_LABEL), (int)theAutoColor);
|
||||
|
||||
// Set color for the object here, othrewise it will stay default forever, despite
|
||||
// the color displayed in viewver being defined on GEOM_Displayer::getColor() call.
|
||||
// It's not clear if we need to reset color when auto color is disabled.
|
||||
if (theAutoColor)
|
||||
{
|
||||
const SALOMEDS::Color color = GEOM_ColorUtils::getPredefinedUniqueColor();
|
||||
SetColor({ color.R, color.G, color.B });
|
||||
}
|
||||
|
||||
// Set color for all sub-shapes objects
|
||||
SetAutoColorSubShapes(theAutoColor);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -296,5 +311,34 @@ GEOM_Object::GetLastFunctions( const std::list< Handle(GEOM_Object) >& theObject
|
||||
return funs;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Toggles an auto color mode for sub-shapes of GEOM_Object
|
||||
*/
|
||||
//=============================================================================
|
||||
void GEOM_Object::SetAutoColorSubShapes(bool theAutoColor)
|
||||
{
|
||||
const int nbFunctions = GetNbFunctions();
|
||||
for (int i = 1; i <= nbFunctions; i++)
|
||||
{
|
||||
Handle(GEOM_Function) aFunction = GetFunction(i);
|
||||
if (aFunction.IsNull())
|
||||
continue;
|
||||
|
||||
const TDataStd_ListOfExtendedString& aListEntries = aFunction->GetSubShapeReferences();
|
||||
for (TDataStd_ListIteratorOfListOfExtendedString anIt(aListEntries); anIt.More(); anIt.Next())
|
||||
{
|
||||
const TCollection_AsciiString anEntry = anIt.Value();
|
||||
Handle(GEOM_Object) aSubObj =
|
||||
Handle(GEOM_Object)::DownCast(GEOM_Engine::GetEngine()->GetObject(anEntry.ToCString(), false));
|
||||
if (aSubObj.IsNull())
|
||||
continue;
|
||||
|
||||
aSubObj->SetAutoColor(theAutoColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(GEOM_Object, GEOM_BaseObject )
|
||||
|
||||
|
@ -114,6 +114,10 @@ class GEOM_Object : public GEOM_BaseObject
|
||||
Standard_EXPORT static Handle(TColStd_HSequenceOfTransient)
|
||||
GetLastFunctions( const std::list< Handle(GEOM_Object) >& theObjects );
|
||||
|
||||
protected:
|
||||
// Toggles an auto color mode for sub-shapes of GEOM_Object
|
||||
Standard_EXPORT void SetAutoColorSubShapes(bool theAutoColor);
|
||||
|
||||
public:
|
||||
DEFINE_STANDARD_RTTIEXT(GEOM_Object,GEOM_BaseObject)
|
||||
};
|
||||
|
@ -101,6 +101,7 @@
|
||||
|
||||
#include <ShapeUpgrade_ShapeDivideArea.hxx>
|
||||
#include <ShapeUpgrade_UnifySameDomain.hxx>
|
||||
#include <ShapeFix.hxx>
|
||||
|
||||
#include <GEOMAlgo_PassKeyShape.hxx>
|
||||
|
||||
@ -1015,6 +1016,13 @@ Standard_Integer GEOMAlgo_AlgoTools::PointCloudInFace(const TopoDS_Face& theFace
|
||||
tool.NbParts() = theNbPnts;
|
||||
tool.Perform();
|
||||
TopoDS_Shape res = tool.Result();
|
||||
if (res.IsNull())
|
||||
return -1;
|
||||
|
||||
// Splitting algorithm can produces invalid shapes that results in
|
||||
// infinite loop on ShapeUpgrade_UnifySameDomain::build() call.
|
||||
// Here is a fix from OCCT DRAW: SWDRAW_ShapeUpgrade: splitbynumber().
|
||||
ShapeFix::SameParameter(res, Standard_False);
|
||||
|
||||
BRep_Builder aBB;
|
||||
TopoDS_Compound aGlobalRes;
|
||||
@ -1528,6 +1536,12 @@ void ModifyFacesForGlobalResult(const TopoDS_Face& theInputFace,
|
||||
aLocalTool.SetNumbersUVSplits (1, aNumberToSplit);
|
||||
aLocalTool.Perform();
|
||||
aLocalResult = aLocalTool.Result();
|
||||
|
||||
// Splitting algorithm can produces invalid shapes that results in
|
||||
// infinite loop on ShapeUpgrade_UnifySameDomain::build() call.
|
||||
// Here is a fix from OCCT DRAW: SWDRAW_ShapeUpgrade: splitbynumber().
|
||||
ShapeFix::SameParameter(aLocalResult, Standard_False);
|
||||
|
||||
aNbFacesInLocalResult = aNumberToSplit;
|
||||
#endif
|
||||
}
|
||||
@ -1608,6 +1622,11 @@ void ModifyFacesForGlobalResult(const TopoDS_Face& theInputFace,
|
||||
aLocalTool.SetNumbersUVSplits (1, aNumberToSplit);
|
||||
aLocalTool.Perform();
|
||||
aLocalResult = aLocalTool.Result();
|
||||
|
||||
// Splitting algorithm can produces invalid shapes that results in
|
||||
// infinite loop on ShapeUpgrade_UnifySameDomain::build() call.
|
||||
// Here is a fix from OCCT DRAW: SWDRAW_ShapeUpgrade: splitbynumber().
|
||||
ShapeFix::SameParameter(aLocalResult, Standard_False);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@ -488,6 +488,32 @@ void GEOMBase::ConvertListOfIOInListOfGO( const SALOME_ListIO& IObjects,
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : GetObjectFromEntry()
|
||||
// purpose : Get the GEOM_Object from the study entry.
|
||||
//=======================================================================
|
||||
GEOM::GEOM_Object_ptr GEOMBase::GetObjectFromEntry(const char* entry)
|
||||
{
|
||||
GEOM::GEOM_Object_var object;
|
||||
|
||||
if (entry)
|
||||
{
|
||||
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(SUIT_Session::session()->activeApplication()->activeStudy());
|
||||
if (study)
|
||||
{
|
||||
_PTR(Study) studyDS = study->studyDS();
|
||||
_PTR(SObject) obj = studyDS->FindObjectID(entry);
|
||||
if (GeometryGUI::IsInGeomComponent(obj))
|
||||
{
|
||||
CORBA::Object_var corbaObj = GeometryGUI::ClientSObjectToObject(obj);
|
||||
object = GEOM::GEOM_Object::_narrow(corbaObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return object._retn();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : CreateArrowForLinearEdge()
|
||||
// purpose : Create a cone topology to be used to display an arrow in the middle
|
||||
@ -796,6 +822,23 @@ QString GEOMBase::GetName( GEOM::GEOM_Object_ptr object )
|
||||
return name;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : GetName()
|
||||
// purpose : Get name of objects
|
||||
//=======================================================================
|
||||
QString GEOMBase::GetName( const QList<GEOM::GeomObjPtr>& objects )
|
||||
{
|
||||
QString name;
|
||||
|
||||
int nbSel = objects.count();
|
||||
if (nbSel == 1)
|
||||
name = GEOMBase::GetName( objects[0].get() );
|
||||
else if (nbSel > 1)
|
||||
name = QObject::tr("%1_objects").arg( nbSel );
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : IsShape()
|
||||
// purpose : Return TRUE if object is valid and has shape
|
||||
|
@ -95,6 +95,8 @@ public :
|
||||
|
||||
static QString GetIORFromObject( GEOM::GEOM_Object_ptr object );
|
||||
|
||||
static GEOM::GEOM_Object_ptr GetObjectFromEntry(const char* entry);
|
||||
|
||||
/* Geometry */
|
||||
static bool VertexToPoint( const TopoDS_Shape& shape, gp_Pnt& point );
|
||||
|
||||
@ -122,6 +124,7 @@ public :
|
||||
|
||||
/* Gets name of object */
|
||||
static QString GetName( GEOM::GEOM_Object_ptr object );
|
||||
static QString GetName( const QList<GEOM::GeomObjPtr>& objects );
|
||||
|
||||
/* Check if object has shape */
|
||||
static bool IsShape( GEOM::GEOM_Object_ptr object );
|
||||
|
@ -37,6 +37,7 @@ INCLUDE_DIRECTORIES(
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMImpl
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMUtils
|
||||
${PROJECT_SOURCE_DIR}/src/GEOM_I
|
||||
${PROJECT_SOURCE_DIR}/src/GEOM
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include <GEOMGUI_AnnotationMgr.h>
|
||||
|
||||
#include <GEOMUtils.hxx>
|
||||
#include "GEOM_ColorUtils.hxx"
|
||||
|
||||
#include <Material_Model.h>
|
||||
|
||||
@ -295,19 +296,6 @@ namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint randomize( uint size )
|
||||
{
|
||||
static bool initialized = false;
|
||||
if ( !initialized ) {
|
||||
qsrand( QDateTime::currentDateTime().toTime_t() );
|
||||
initialized = true;
|
||||
}
|
||||
uint v = qrand();
|
||||
v = uint( (double)( v ) / RAND_MAX * size );
|
||||
v = qMax( uint(0), qMin ( v, size-1 ) );
|
||||
return v;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
//================================================================
|
||||
@ -2490,36 +2478,6 @@ bool GEOM_Displayer::HasDisplayMode() const
|
||||
return myHasDisplayMode;
|
||||
}
|
||||
|
||||
SALOMEDS::Color GEOM_Displayer::getPredefinedUniqueColor()
|
||||
{
|
||||
static QList<QColor> colors;
|
||||
|
||||
if ( colors.isEmpty() ) {
|
||||
|
||||
for (int s = 0; s < 2 ; s++)
|
||||
{
|
||||
for (int v = 100; v >= 40; v = v - 20)
|
||||
{
|
||||
for (int h = 0; h < 359 ; h = h + 60)
|
||||
{
|
||||
colors.append(QColor::fromHsv(h, 255 - s * 127, v * 255 / 100));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int currentColor = randomize( colors.size() );
|
||||
|
||||
SALOMEDS::Color color;
|
||||
color.R = (double)colors[currentColor].red() / 255.0;
|
||||
color.G = (double)colors[currentColor].green() / 255.0;
|
||||
color.B = (double)colors[currentColor].blue() / 255.0;
|
||||
|
||||
currentColor = (currentColor+1) % colors.count();
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
SALOMEDS::Color GEOM_Displayer::getUniqueColor( const QList<SALOMEDS::Color>& theReservedColors )
|
||||
{
|
||||
int aHue = -1;
|
||||
@ -2777,7 +2735,7 @@ SALOMEDS::Color GEOM_Displayer::getColor(GEOM::GEOM_Object_var theGeomObject, bo
|
||||
GEOM::GEOM_Object_var aMainObject = theGeomObject->GetMainShape();
|
||||
if ( !CORBA::is_nil( aMainObject ) && aMainObject->GetAutoColor() ) {
|
||||
#ifdef SIMPLE_AUTOCOLOR // simplified algorithm for auto-colors
|
||||
aSColor = getPredefinedUniqueColor();
|
||||
aSColor = GEOM_ColorUtils::getPredefinedUniqueColor();
|
||||
hasColor = true;
|
||||
#else // old algorithm for auto-colors
|
||||
QList<SALOMEDS::Color> aReservedColors;
|
||||
|
@ -209,7 +209,6 @@ public:
|
||||
SalomeApp_Study* getStudy() const;
|
||||
|
||||
static SALOMEDS::Color getUniqueColor( const QList<SALOMEDS::Color>& );
|
||||
static SALOMEDS::Color getPredefinedUniqueColor();
|
||||
|
||||
/*Get color of the geom object*/
|
||||
static SALOMEDS::Color getColor(GEOM::GEOM_Object_var aGeomObject, bool& hasColor);
|
||||
|
@ -451,6 +451,10 @@
|
||||
<source>ICON_DLG_OFFSET</source>
|
||||
<translation>offset.png</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ICON_DLG_OFFSET_PARTIAL</source>
|
||||
<translation>offset_partial.png</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ICON_DLG_PROJECTION_ON_FACE</source>
|
||||
<translation>projection.png</translation>
|
||||
|
@ -7982,6 +7982,14 @@ Do you want to create new material?</translation>
|
||||
<source>GEOM_JOIN_BY_PIPES</source>
|
||||
<translation>Join by pipes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TOOLTIP_OFFSET</source>
|
||||
<translation>Offset</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TOOLTIP_OFFSET_PARTIAL</source>
|
||||
<translation>Partial offset</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>OperationGUI_ExtractionDlg</name>
|
||||
|
@ -7960,6 +7960,21 @@ Voulez-vous en créer un nouveau ?</translation>
|
||||
<translation>Longueur de l'angle</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TransformationGUI_OffsetDlg</name>
|
||||
<message>
|
||||
<source>GEOM_JOIN_BY_PIPES</source>
|
||||
<translation>Rejoindre par des tuyaux</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TOOLTIP_OFFSET</source>
|
||||
<translation>Décalage</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TOOLTIP_OFFSET_PARTIAL</source>
|
||||
<translation>Décalage partiel</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>OperationGUI_ExtractionDlg</name>
|
||||
<message>
|
||||
|
@ -945,7 +945,23 @@ void GeometryGUI::createGeomAction( const int id, const QString& label, const QS
|
||||
void GeometryGUI::createGeomAction( const int id, const QString& label, const QString& icolabel,
|
||||
const int accel, const bool toggle)
|
||||
{
|
||||
createGeomAction( id, label, icolabel, accel, toggle, QString( "STB_%1" ).arg( label ) );
|
||||
createGeomAction( id, label, icolabel, accel, toggle, label );
|
||||
}
|
||||
|
||||
void GeometryGUI::createGeomAction(
|
||||
const int inMenuIdx,
|
||||
const QPair<QString, QString>& inModuleIDLastTokenAndPrefix,
|
||||
const QString& iconID,
|
||||
const bool toggle
|
||||
) {
|
||||
const QString& inModuleIDLastToken = inModuleIDLastTokenAndPrefix.first;
|
||||
const QString& inModuleIDPrefix = inModuleIDLastTokenAndPrefix.second;
|
||||
|
||||
QString inModuleActionID = inModuleIDLastToken;
|
||||
if (!inModuleIDPrefix.isEmpty())
|
||||
inModuleActionID = inModuleIDPrefix + "/" + inModuleActionID;
|
||||
|
||||
createGeomAction( inMenuIdx, inModuleIDLastToken, iconID, 0 /*keySequenceIntRepresentation*/, toggle, inModuleActionID );
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -999,223 +1015,223 @@ void GeometryGUI::initialize( CAM_Application* app )
|
||||
|
||||
// ----- create actions --------------
|
||||
|
||||
createGeomAction( GEOMOp::OpDelete, "DELETE", "", Qt::Key_Delete );
|
||||
createGeomAction( GEOMOp::OpDelete, {"DELETE", "Edit"} );
|
||||
|
||||
createGeomAction( GEOMOp::OpPoint, "POINT" );
|
||||
createGeomAction( GEOMOp::OpLine, "LINE" );
|
||||
createGeomAction( GEOMOp::OpCircle, "CIRCLE" );
|
||||
createGeomAction( GEOMOp::OpEllipse, "ELLIPSE" );
|
||||
createGeomAction( GEOMOp::OpArc, "ARC" );
|
||||
createGeomAction( GEOMOp::OpCurve, "CURVE" );
|
||||
createGeomAction( GEOMOp::OpIsoline, "ISOLINE" );
|
||||
createGeomAction( GEOMOp::OpVector, "VECTOR" );
|
||||
createGeomAction( GEOMOp::OpPlane, "PLANE" );
|
||||
createGeomAction( GEOMOp::OpLCS, "LOCAL_CS" );
|
||||
createGeomAction( GEOMOp::OpOriginAndVectors, "ORIGIN_AND_VECTORS" );
|
||||
createGeomAction( GEOMOp::OpSurfaceFromFace, "SURFACE_FROM_FACE" );
|
||||
createGeomAction( GEOMOp::OpPoint, {"POINT", "NewEntity/Basic"} );
|
||||
createGeomAction( GEOMOp::OpLine, {"LINE", "NewEntity/Basic"} );
|
||||
createGeomAction( GEOMOp::OpCircle, {"CIRCLE", "NewEntity/Basic"} );
|
||||
createGeomAction( GEOMOp::OpEllipse, {"ELLIPSE", "NewEntity/Basic"} );
|
||||
createGeomAction( GEOMOp::OpArc, {"ARC", "NewEntity/Basic"} );
|
||||
createGeomAction( GEOMOp::OpCurve, {"CURVE", "NewEntity/Basic"} );
|
||||
createGeomAction( GEOMOp::OpIsoline, {"ISOLINE", "NewEntity/Basic"} );
|
||||
createGeomAction( GEOMOp::OpVector, {"VECTOR", "NewEntity/Basic"} );
|
||||
createGeomAction( GEOMOp::OpPlane, {"PLANE", "NewEntity/Basic"} );
|
||||
createGeomAction( GEOMOp::OpLCS, {"LOCAL_CS", "NewEntity/Basic"} );
|
||||
createGeomAction( GEOMOp::OpOriginAndVectors, {"ORIGIN_AND_VECTORS", "NewEntity/Basic"} );
|
||||
createGeomAction( GEOMOp::OpSurfaceFromFace, {"SURFACE_FROM_FACE", "NewEntity/Basic"} );
|
||||
|
||||
createGeomAction( GEOMOp::OpBox, "BOX" );
|
||||
createGeomAction( GEOMOp::OpCylinder, "CYLINDER" );
|
||||
createGeomAction( GEOMOp::OpSphere, "SPHERE" );
|
||||
createGeomAction( GEOMOp::OpTorus, "TORUS" );
|
||||
createGeomAction( GEOMOp::OpCone, "CONE" );
|
||||
createGeomAction( GEOMOp::OpRectangle, "RECTANGLE" );
|
||||
createGeomAction( GEOMOp::OpDisk, "DISK" );
|
||||
createGeomAction( GEOMOp::OpBox, {"BOX", "NewEntity/Primitives"} );
|
||||
createGeomAction( GEOMOp::OpCylinder, {"CYLINDER", "NewEntity/Primitives"} );
|
||||
createGeomAction( GEOMOp::OpSphere, {"SPHERE", "NewEntity/Primitives"} );
|
||||
createGeomAction( GEOMOp::OpTorus, {"TORUS", "NewEntity/Primitives"} );
|
||||
createGeomAction( GEOMOp::OpCone, {"CONE", "NewEntity/Primitives"} );
|
||||
createGeomAction( GEOMOp::OpRectangle, {"RECTANGLE", "NewEntity/Primitives"} );
|
||||
createGeomAction( GEOMOp::OpDisk, {"DISK", "NewEntity/Primitives"} );
|
||||
|
||||
createGeomAction( GEOMOp::OpPrism, "EXTRUSION" );
|
||||
createGeomAction( GEOMOp::OpRevolution, "REVOLUTION" );
|
||||
createGeomAction( GEOMOp::OpFilling, "FILLING" );
|
||||
createGeomAction( GEOMOp::OpPipe, "PIPE" );
|
||||
createGeomAction( GEOMOp::OpPipePath, "PIPE_PATH" );
|
||||
createGeomAction( GEOMOp::OpThickness, "THICKNESS" );
|
||||
createGeomAction( GEOMOp::OpPrism, {"EXTRUSION", "NewEntity/Generation"} );
|
||||
createGeomAction( GEOMOp::OpRevolution, {"REVOLUTION", "NewEntity/Generation"} );
|
||||
createGeomAction( GEOMOp::OpFilling, {"FILLING", "NewEntity/Generation"} );
|
||||
createGeomAction( GEOMOp::OpPipe, {"PIPE", "NewEntity/Generation"} );
|
||||
createGeomAction( GEOMOp::OpPipePath, {"PIPE_PATH", "NewEntity/Generation"} );
|
||||
createGeomAction( GEOMOp::OpThickness, {"THICKNESS", "NewEntity/Generation"} );
|
||||
|
||||
createGeomAction( GEOMOp::OpGroupCreate, "GROUP_CREATE" );
|
||||
createGeomAction( GEOMOp::OpGroupEdit, "GROUP_EDIT" );
|
||||
createGeomAction( GEOMOp::OpGroupUnion, "GROUP_UNION" );
|
||||
createGeomAction( GEOMOp::OpGroupIntersect, "GROUP_INTERSECT" );
|
||||
createGeomAction( GEOMOp::OpGroupCut, "GROUP_CUT" );
|
||||
createGeomAction( GEOMOp::OpGroupCreate, {"GROUP_CREATE", "NewEntity/Group"} );
|
||||
createGeomAction( GEOMOp::OpGroupEdit, {"GROUP_EDIT", "NewEntity/Group"} );
|
||||
createGeomAction( GEOMOp::OpGroupUnion, {"GROUP_UNION", "NewEntity/Group"} );
|
||||
createGeomAction( GEOMOp::OpGroupIntersect, {"GROUP_INTERSECT", "NewEntity/Group"} );
|
||||
createGeomAction( GEOMOp::OpGroupCut, {"GROUP_CUT", "NewEntity/Group"} );
|
||||
|
||||
createGeomAction( GEOMOp::OpCreateField, "FIELD_CREATE" );
|
||||
createGeomAction( GEOMOp::OpEditField, "FIELD_EDIT" );
|
||||
createGeomAction( GEOMOp::OpCreateField, {"FIELD_CREATE", "NewEntity/Field"} );
|
||||
createGeomAction( GEOMOp::OpEditField, {"FIELD_EDIT", "NewEntity/Field"} );
|
||||
|
||||
createGeomAction( GEOMOp::OpReimport, "RELOAD_IMPORTED" );
|
||||
createGeomAction( GEOMOp::OpReimport, {"RELOAD_IMPORTED", "Selection"} );
|
||||
|
||||
createGeomAction( GEOMOp::OpQuadFace, "Q_FACE" );
|
||||
createGeomAction( GEOMOp::OpHexaSolid, "HEX_SOLID" );
|
||||
createGeomAction( GEOMOp::OpQuadFace, {"Q_FACE", "NewEntity/Blocks"} );
|
||||
createGeomAction( GEOMOp::OpHexaSolid, {"HEX_SOLID", "NewEntity/Blocks"} );
|
||||
|
||||
createGeomAction( GEOMOp::Op2dSketcher, "SKETCH" );
|
||||
createGeomAction( GEOMOp::Op3dSketcher, "3DSKETCH" );
|
||||
createGeomAction( GEOMOp::OpExplode, "EXPLODE" );
|
||||
createGeomAction( GEOMOp::Op2dSketcher, {"SKETCH", "NewEntity/Basic"} );
|
||||
createGeomAction( GEOMOp::Op3dSketcher, {"3DSKETCH", "NewEntity/Basic"} );
|
||||
createGeomAction( GEOMOp::OpExplode, {"EXPLODE", "NewEntity"} );
|
||||
#ifdef WITH_OPENCV
|
||||
createGeomAction( GEOMOp::OpFeatureDetect,"FEATURE_DETECTION" );
|
||||
createGeomAction( GEOMOp::OpFeatureDetect, {"FEATURE_DETECTION", "NewEntity"} );
|
||||
#endif
|
||||
createGeomAction( GEOMOp::OpPictureImport,"PICTURE_IMPORT" );
|
||||
createGeomAction( GEOMOp::Op2dPolylineEditor, "CURVE_CREATOR" );
|
||||
createGeomAction( GEOMOp::OpPictureImport, {"PICTURE_IMPORT", "NewEntity"} );
|
||||
createGeomAction( GEOMOp::Op2dPolylineEditor, {"CURVE_CREATOR", "NewEntity/Basic"} );
|
||||
|
||||
createGeomAction( GEOMOp::OpEdge, "EDGE" );
|
||||
createGeomAction( GEOMOp::OpWire, "WIRE" );
|
||||
createGeomAction( GEOMOp::OpFace, "FACE" );
|
||||
createGeomAction( GEOMOp::OpShell, "SHELL" );
|
||||
createGeomAction( GEOMOp::OpSolid, "SOLID" );
|
||||
createGeomAction( GEOMOp::OpCompound, "COMPOUND" );
|
||||
createGeomAction( GEOMOp::OpEdge, {"EDGE", "NewEntity/Build"} );
|
||||
createGeomAction( GEOMOp::OpWire, {"WIRE", "NewEntity/Build"} );
|
||||
createGeomAction( GEOMOp::OpFace, {"FACE", "NewEntity/Build"} );
|
||||
createGeomAction( GEOMOp::OpShell, {"SHELL", "NewEntity/Build"} );
|
||||
createGeomAction( GEOMOp::OpSolid, {"SOLID", "NewEntity/Build"} );
|
||||
createGeomAction( GEOMOp::OpCompound, {"COMPOUND", "NewEntity/Build"} );
|
||||
|
||||
createGeomAction( GEOMOp::OpFuse, "FUSE" );
|
||||
createGeomAction( GEOMOp::OpCommon, "COMMON" );
|
||||
createGeomAction( GEOMOp::OpCut, "CUT" );
|
||||
createGeomAction( GEOMOp::OpSection, "SECTION" );
|
||||
createGeomAction( GEOMOp::OpFuse, {"FUSE", "Operations/Boolean"} );
|
||||
createGeomAction( GEOMOp::OpCommon, {"COMMON", "Operations/Boolean"} );
|
||||
createGeomAction( GEOMOp::OpCut, {"CUT", "Operations/Boolean"} );
|
||||
createGeomAction( GEOMOp::OpSection, {"SECTION", "Operations/Boolean"} );
|
||||
|
||||
createGeomAction( GEOMOp::OpTranslate, "TRANSLATION" );
|
||||
createGeomAction( GEOMOp::OpRotate, "ROTATION" );
|
||||
createGeomAction( GEOMOp::OpChangeLoc, "MODIFY_LOCATION" );
|
||||
createGeomAction( GEOMOp::OpMirror, "MIRROR" );
|
||||
createGeomAction( GEOMOp::OpScale, "SCALE" );
|
||||
createGeomAction( GEOMOp::OpOffset, "OFFSET" );
|
||||
createGeomAction( GEOMOp::OpProjection, "PROJECTION" );
|
||||
createGeomAction( GEOMOp::OpProjOnCyl, "PROJ_ON_CYL" );
|
||||
createGeomAction( GEOMOp::OpMultiTranslate, "MUL_TRANSLATION" );
|
||||
createGeomAction( GEOMOp::OpMultiRotate, "MUL_ROTATION" );
|
||||
createGeomAction( GEOMOp::OpExtension, "EXTENSION" );
|
||||
createGeomAction( GEOMOp::OpTranslate, {"TRANSLATION", "Operations/Transformation"} );
|
||||
createGeomAction( GEOMOp::OpRotate, {"ROTATION", "Operations/Transformation"} );
|
||||
createGeomAction( GEOMOp::OpChangeLoc, {"MODIFY_LOCATION", "Operations/Transformation"} );
|
||||
createGeomAction( GEOMOp::OpMirror, {"MIRROR", "Operations/Transformation"} );
|
||||
createGeomAction( GEOMOp::OpScale, {"SCALE", "Operations/Transformation"} );
|
||||
createGeomAction( GEOMOp::OpOffset, {"OFFSET", "Operations/Transformation"} );
|
||||
createGeomAction( GEOMOp::OpProjection, {"PROJECTION", "Operations/Transformation"} );
|
||||
createGeomAction( GEOMOp::OpProjOnCyl, {"PROJ_ON_CYL", "Operations/Transformation"} );
|
||||
createGeomAction( GEOMOp::OpMultiTranslate, {"MUL_TRANSLATION", "Operations/Transformation"} );
|
||||
createGeomAction( GEOMOp::OpMultiRotate, {"MUL_ROTATION", "Operations/Transformation"} );
|
||||
createGeomAction( GEOMOp::OpExtension, {"EXTENSION", "Operations/Transformation"} );
|
||||
|
||||
createGeomAction( GEOMOp::OpPartition, "PARTITION" );
|
||||
createGeomAction( GEOMOp::OpArchimede, "ARCHIMEDE" );
|
||||
createGeomAction( GEOMOp::OpFillet3d, "FILLET" );
|
||||
createGeomAction( GEOMOp::OpChamfer, "CHAMFER" );
|
||||
createGeomAction( GEOMOp::OpShapesOnShape, "GET_SHAPES_ON_SHAPE" );
|
||||
createGeomAction( GEOMOp::OpSharedShapes, "GET_SHARED_SHAPES" );
|
||||
createGeomAction( GEOMOp::OpTransferData, "TRANSFER_DATA" );
|
||||
createGeomAction( GEOMOp::OpExtraction, "EXTRACTION" );
|
||||
createGeomAction( GEOMOp::OpExtrudedCut, "EXTRUDED_CUT" );
|
||||
createGeomAction( GEOMOp::OpExtrudedBoss, "EXTRUDED_BOSS" );
|
||||
createGeomAction( GEOMOp::OpFillet1d, "FILLET_1D" );
|
||||
createGeomAction( GEOMOp::OpFillet2d, "FILLET_2D" );
|
||||
createGeomAction( GEOMOp::OpPartition, {"PARTITION", "Operations"} );
|
||||
createGeomAction( GEOMOp::OpArchimede, {"ARCHIMEDE", "Operations"} );
|
||||
createGeomAction( GEOMOp::OpFillet3d, {"FILLET", "Operations"} );
|
||||
createGeomAction( GEOMOp::OpChamfer, {"CHAMFER", "Operations"} );
|
||||
createGeomAction( GEOMOp::OpShapesOnShape, {"GET_SHAPES_ON_SHAPE", "Operations"} );
|
||||
createGeomAction( GEOMOp::OpSharedShapes, {"GET_SHARED_SHAPES", "Operations"} );
|
||||
createGeomAction( GEOMOp::OpTransferData, {"TRANSFER_DATA", "Operations"} );
|
||||
createGeomAction( GEOMOp::OpExtraction, {"EXTRACTION", "Operations"} );
|
||||
createGeomAction( GEOMOp::OpExtrudedCut, {"EXTRUDED_CUT", "Operations"} );
|
||||
createGeomAction( GEOMOp::OpExtrudedBoss, {"EXTRUDED_BOSS", "Operations"} );
|
||||
createGeomAction( GEOMOp::OpFillet1d, {"FILLET_1D", "Operations"} );
|
||||
createGeomAction( GEOMOp::OpFillet2d, {"FILLET_2D", "Operations"} );
|
||||
|
||||
createGeomAction( GEOMOp::OpMultiTransform, "MUL_TRANSFORM" );
|
||||
createGeomAction( GEOMOp::OpExplodeBlock, "EXPLODE_BLOCKS" );
|
||||
createGeomAction( GEOMOp::OpPropagate, "PROPAGATE" );
|
||||
createGeomAction( GEOMOp::OpMultiTransform, {"MUL_TRANSFORM", "Operations/Blocks"} );
|
||||
createGeomAction( GEOMOp::OpExplodeBlock, {"EXPLODE_BLOCKS", "Operations/Blocks"} );
|
||||
createGeomAction( GEOMOp::OpPropagate, {"PROPAGATE", "Operations/Blocks"} );
|
||||
|
||||
createGeomAction( GEOMOp::OpSewing, "SEWING" );
|
||||
createGeomAction( GEOMOp::OpGlueFaces, "GLUE_FACES" );
|
||||
createGeomAction( GEOMOp::OpGlueEdges, "GLUE_EDGES" );
|
||||
createGeomAction( GEOMOp::OpLimitTolerance, "LIMIT_TOLERANCE" );
|
||||
createGeomAction( GEOMOp::OpSuppressFaces, "SUPPRESS_FACES" );
|
||||
createGeomAction( GEOMOp::OpSuppressHoles, "SUPPERSS_HOLES" );
|
||||
createGeomAction( GEOMOp::OpShapeProcess, "SHAPE_PROCESS" );
|
||||
createGeomAction( GEOMOp::OpCloseContour, "CLOSE_CONTOUR" );
|
||||
createGeomAction( GEOMOp::OpRemoveIntWires, "SUPPRESS_INT_WIRES" );
|
||||
createGeomAction( GEOMOp::OpAddPointOnEdge, "POINT_ON_EDGE" );
|
||||
createGeomAction( GEOMOp::OpFreeBoundaries, "CHECK_FREE_BNDS" );
|
||||
createGeomAction( GEOMOp::OpFreeFaces, "CHECK_FREE_FACES" );
|
||||
createGeomAction( GEOMOp::OpOrientation, "CHANGE_ORIENTATION" );
|
||||
createGeomAction( GEOMOp::OpRemoveWebs, "REMOVE_WEBS" );
|
||||
createGeomAction( GEOMOp::OpRemoveExtraEdges, "REMOVE_EXTRA_EDGES" );
|
||||
createGeomAction( GEOMOp::OpFuseEdges, "FUSE_EDGES" );
|
||||
createGeomAction( GEOMOp::OpUnionFaces, "UNION_FACES" );
|
||||
createGeomAction( GEOMOp::OpInspectObj, "INSPECT_OBJECT" );
|
||||
createGeomAction( GEOMOp::OpSewing, {"SEWING", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpGlueFaces, {"GLUE_FACES", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpGlueEdges, {"GLUE_EDGES", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpLimitTolerance, {"LIMIT_TOLERANCE", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpSuppressFaces, {"SUPPRESS_FACES", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpSuppressHoles, {"SUPPERSS_HOLES", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpShapeProcess, {"SHAPE_PROCESS", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpCloseContour, {"CLOSE_CONTOUR", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpRemoveIntWires, {"SUPPRESS_INT_WIRES", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpAddPointOnEdge, {"POINT_ON_EDGE", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpFreeBoundaries, {"CHECK_FREE_BNDS", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpFreeFaces, {"CHECK_FREE_FACES", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpOrientation, {"CHANGE_ORIENTATION", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpRemoveWebs, {"REMOVE_WEBS", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpRemoveExtraEdges, {"REMOVE_EXTRA_EDGES", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpFuseEdges, {"FUSE_EDGES", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpUnionFaces, {"UNION_FACES", "Repair"} );
|
||||
createGeomAction( GEOMOp::OpInspectObj, {"INSPECT_OBJECT", "Repair"} );
|
||||
|
||||
createGeomAction( GEOMOp::OpPointCoordinates, "POINT_COORDS" );
|
||||
createGeomAction( GEOMOp::OpProperties, "BASIC_PROPS" );
|
||||
createGeomAction( GEOMOp::OpCenterMass, "MASS_CENTER" );
|
||||
createGeomAction( GEOMOp::OpInertia, "INERTIA" );
|
||||
createGeomAction( GEOMOp::OpNormale, "NORMALE" );
|
||||
createGeomAction( GEOMOp::OpBoundingBox, "BND_BOX" );
|
||||
createGeomAction( GEOMOp::OpMinDistance, "MIN_DIST" );
|
||||
createGeomAction( GEOMOp::OpAngle, "MEASURE_ANGLE" );
|
||||
createGeomAction( GEOMOp::OpManageDimensions, "MANAGE_DIMENSIONS" );
|
||||
createGeomAction( GEOMOp::OpAnnotation, "ANNOTATION" );
|
||||
createGeomAction( GEOMOp::OpEditAnnotation, "EDIT_ANNOTATION" );
|
||||
createGeomAction( GEOMOp::OpDeleteAnnotation, "DELETE_ANNOTATION" );
|
||||
createGeomAction( GEOMOp::OpPointCoordinates, {"POINT_COORDS", "Inspection"} );
|
||||
createGeomAction( GEOMOp::OpProperties, {"BASIC_PROPS", "Inspection"} );
|
||||
createGeomAction( GEOMOp::OpCenterMass, {"MASS_CENTER", "Inspection"} );
|
||||
createGeomAction( GEOMOp::OpInertia, {"INERTIA", "Inspection"} );
|
||||
createGeomAction( GEOMOp::OpNormale, {"NORMALE", "Inspection"} );
|
||||
createGeomAction( GEOMOp::OpBoundingBox, {"BND_BOX", "Inspection/Dimensions"} );
|
||||
createGeomAction( GEOMOp::OpMinDistance, {"MIN_DIST", "Inspection/Dimensions"} );
|
||||
createGeomAction( GEOMOp::OpAngle, {"MEASURE_ANGLE", "Inspection/Dimensions"} );
|
||||
createGeomAction( GEOMOp::OpManageDimensions, {"MANAGE_DIMENSIONS", "Inspection/Dimensions"} );
|
||||
createGeomAction( GEOMOp::OpAnnotation, {"ANNOTATION", "Inspection"} );
|
||||
createGeomAction( GEOMOp::OpEditAnnotation, {"EDIT_ANNOTATION", "Inspection/ANNOTATION"} );
|
||||
createGeomAction( GEOMOp::OpDeleteAnnotation, {"DELETE_ANNOTATION", "Inspection/ANNOTATION"} );
|
||||
|
||||
createGeomAction( GEOMOp::OpTolerance, "TOLERANCE" );
|
||||
createGeomAction( GEOMOp::OpWhatIs, "WHAT_IS" );
|
||||
createGeomAction( GEOMOp::OpCheckShape, "CHECK" );
|
||||
createGeomAction( GEOMOp::OpCheckCompound, "CHECK_COMPOUND" );
|
||||
createGeomAction( GEOMOp::OpGetNonBlocks, "GET_NON_BLOCKS" );
|
||||
createGeomAction( GEOMOp::OpCheckSelfInters, "CHECK_SELF_INTERSECTIONS" );
|
||||
createGeomAction( GEOMOp::OpFastCheckInters, "FAST_CHECK_INTERSECTIONS" );
|
||||
createGeomAction( GEOMOp::OpTolerance, {"TOLERANCE", "Inspection"} );
|
||||
createGeomAction( GEOMOp::OpWhatIs, {"WHAT_IS", "Inspection"} );
|
||||
createGeomAction( GEOMOp::OpCheckShape, {"CHECK", "Inspection"} );
|
||||
createGeomAction( GEOMOp::OpCheckCompound, {"CHECK_COMPOUND", "Inspection"} );
|
||||
createGeomAction( GEOMOp::OpGetNonBlocks, {"GET_NON_BLOCKS", "Inspection"} );
|
||||
createGeomAction( GEOMOp::OpCheckSelfInters, {"CHECK_SELF_INTERSECTIONS", "Inspection"} );
|
||||
createGeomAction( GEOMOp::OpFastCheckInters, {"FAST_CHECK_INTERSECTIONS", "Inspection"} );
|
||||
#ifndef DISABLE_PLOT2DVIEWER
|
||||
createGeomAction( GEOMOp::OpShapeStatistics, "SHAPE_STATISTICS" );
|
||||
createGeomAction( GEOMOp::OpShapeStatistics, {"SHAPE_STATISTICS", "Inspection"} );
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_PYCONSOLE
|
||||
#ifdef _DEBUG_ // PAL16821
|
||||
createGeomAction( GEOMOp::OpCheckGeom, "CHECK_GEOMETRY" );
|
||||
createGeomAction( GEOMOp::OpCheckGeom, {"CHECK_GEOMETRY", "Tools"} );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
createGeomAction( GEOMOp::OpMaterialsLibrary, "MATERIALS_LIBRARY" );
|
||||
createGeomAction( GEOMOp::OpDMWireframe, "WIREFRAME" );
|
||||
createGeomAction( GEOMOp::OpDMShading, "SHADING" );
|
||||
createGeomAction( GEOMOp::OpDMShadingWithEdges, "SHADING_WITH_EDGES" );
|
||||
createGeomAction( GEOMOp::OpDMTexture, "TEXTURE" );
|
||||
createGeomAction( GEOMOp::OpShowAll, "DISPLAY_ALL" );
|
||||
createGeomAction( GEOMOp::OpHideAll, "ERASE_ALL" );
|
||||
createGeomAction( GEOMOp::OpShow, "DISPLAY" );
|
||||
createGeomAction( GEOMOp::OpSwitchVectors, "VECTOR_MODE");
|
||||
createGeomAction( GEOMOp::OpSwitchVertices, "VERTICES_MODE");
|
||||
createGeomAction( GEOMOp::OpSwitchName, "NAME_MODE");
|
||||
createGeomAction( GEOMOp::OpSelectVertex, "VERTEX_SEL_ONLY" ,"", 0, true );
|
||||
createGeomAction( GEOMOp::OpSelectEdge, "EDGE_SEL_ONLY", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpSelectWire, "WIRE_SEL_ONLY", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpSelectFace, "FACE_SEL_ONLY", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpSelectShell, "SHELL_SEL_ONLY", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpSelectSolid, "SOLID_SEL_ONLY", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpSelectCompound, "COMPOUND_SEL_ONLY", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpSelectAll, "ALL_SEL_ONLY", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpShowOnly, "DISPLAY_ONLY" );
|
||||
createGeomAction( GEOMOp::OpShowOnlyChildren, "SHOW_ONLY_CHILDREN" );
|
||||
createGeomAction( GEOMOp::OpBringToFront, "BRING_TO_FRONT", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpClsBringToFront, "CLS_BRING_TO_FRONT" );
|
||||
createGeomAction( GEOMOp::OpHide, "ERASE" );
|
||||
createGeomAction( GEOMOp::OpMaterialsLibrary, {"MATERIALS_LIBRARY", "Tools"} );
|
||||
createGeomAction( GEOMOp::OpDMWireframe, {"WIREFRAME", "View/DisplayMode"} );
|
||||
createGeomAction( GEOMOp::OpDMShading, {"SHADING", "View/DisplayMode"} );
|
||||
createGeomAction( GEOMOp::OpDMShadingWithEdges, {"SHADING_WITH_EDGES", "View/DisplayMode"} );
|
||||
createGeomAction( GEOMOp::OpDMTexture, {"TEXTURE", "View/DisplayMode"} );
|
||||
createGeomAction( GEOMOp::OpShowAll, {"DISPLAY_ALL", "View"} );
|
||||
createGeomAction( GEOMOp::OpHideAll, {"ERASE_ALL", "View"} );
|
||||
createGeomAction( GEOMOp::OpShow, {"DISPLAY", "View"} );
|
||||
createGeomAction( GEOMOp::OpSwitchVectors, {"VECTOR_MODE", "View/DisplayMode"});
|
||||
createGeomAction( GEOMOp::OpSwitchVertices, {"VERTICES_MODE", "View/DisplayMode"});
|
||||
createGeomAction( GEOMOp::OpSwitchName, {"NAME_MODE", "View/DisplayMode"});
|
||||
createGeomAction( GEOMOp::OpSelectVertex, {"VERTEX_SEL_ONLY", "Selection"}, "", true );
|
||||
createGeomAction( GEOMOp::OpSelectEdge, {"EDGE_SEL_ONLY", "Selection"}, "", true );
|
||||
createGeomAction( GEOMOp::OpSelectWire, {"WIRE_SEL_ONLY", "Selection"}, "", true );
|
||||
createGeomAction( GEOMOp::OpSelectFace, {"FACE_SEL_ONLY", "Selection"}, "", true );
|
||||
createGeomAction( GEOMOp::OpSelectShell, {"SHELL_SEL_ONLY", "Selection"}, "", true );
|
||||
createGeomAction( GEOMOp::OpSelectSolid, {"SOLID_SEL_ONLY", "Selection"}, "", true );
|
||||
createGeomAction( GEOMOp::OpSelectCompound, {"COMPOUND_SEL_ONLY", "Selection"}, "", true );
|
||||
createGeomAction( GEOMOp::OpSelectAll, {"ALL_SEL_ONLY", "Selection"}, "", true );
|
||||
createGeomAction( GEOMOp::OpShowOnly, {"DISPLAY_ONLY", "View"} );
|
||||
createGeomAction( GEOMOp::OpShowOnlyChildren, {"SHOW_ONLY_CHILDREN", "View"} );
|
||||
createGeomAction( GEOMOp::OpBringToFront, {"BRING_TO_FRONT", "View"}, "", true );
|
||||
createGeomAction( GEOMOp::OpClsBringToFront, {"CLS_BRING_TO_FRONT", "View"} );
|
||||
createGeomAction( GEOMOp::OpHide, {"ERASE", "View"} );
|
||||
|
||||
createGeomAction( GEOMOp::OpWireframe, "POP_WIREFRAME", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpShading, "POP_SHADING", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpShadingWithEdges, "POP_SHADING_WITH_EDGES", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpTexture, "POP_TEXTURE", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpEdgeWidth, "EDGE_WIDTH");
|
||||
createGeomAction( GEOMOp::OpIsosWidth, "ISOS_WIDTH");
|
||||
createGeomAction( GEOMOp::OpVectors, "POP_VECTORS", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpVertices, "POP_VERTICES", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpShowName, "POP_SHOW_NAME", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpDeflection, "POP_DEFLECTION" );
|
||||
createGeomAction( GEOMOp::OpColor, "POP_COLOR" );
|
||||
createGeomAction( GEOMOp::OpSetTexture, "POP_SETTEXTURE" );
|
||||
createGeomAction( GEOMOp::OpTransparency, "POP_TRANSPARENCY" );
|
||||
createGeomAction( GEOMOp::OpIsos, "POP_ISOS" );
|
||||
createGeomAction( GEOMOp::OpAutoColor, "POP_AUTO_COLOR" );
|
||||
createGeomAction( GEOMOp::OpNoAutoColor, "POP_DISABLE_AUTO_COLOR" );
|
||||
createGeomAction( GEOMOp::OpGroupCreatePopup, "POP_CREATE_GROUP" );
|
||||
createGeomAction( GEOMOp::OpEditFieldPopup, "POP_EDIT_FIELD" );
|
||||
createGeomAction( GEOMOp::OpDiscloseChildren, "POP_DISCLOSE_CHILDREN" );
|
||||
createGeomAction( GEOMOp::OpConcealChildren, "POP_CONCEAL_CHILDREN" );
|
||||
createGeomAction( GEOMOp::OpUnpublishObject, "POP_UNPUBLISH_OBJ" );
|
||||
createGeomAction( GEOMOp::OpPublishObject, "POP_PUBLISH_OBJ" );
|
||||
createGeomAction( GEOMOp::OpPointMarker, "POP_POINT_MARKER" );
|
||||
createGeomAction( GEOMOp::OpMaterialProperties, "POP_MATERIAL_PROPERTIES" );
|
||||
createGeomAction( GEOMOp::OpPredefMaterCustom, "POP_PREDEF_MATER_CUSTOM" );
|
||||
createGeomAction( GEOMOp::OpMaterialMenu, "POP_MATERIAL_PROPERTIES");
|
||||
createGeomAction( GEOMOp::OpWireframe, {"POP_WIREFRAME", "Selection/DisplayMode"}, "", true );
|
||||
createGeomAction( GEOMOp::OpShading, {"POP_SHADING", "Selection/DisplayMode"}, "", true );
|
||||
createGeomAction( GEOMOp::OpShadingWithEdges, {"POP_SHADING_WITH_EDGES", "Selection/DisplayMode"}, "", true );
|
||||
createGeomAction( GEOMOp::OpTexture, {"POP_TEXTURE", "Selection/DisplayMode"}, "", true );
|
||||
createGeomAction( GEOMOp::OpEdgeWidth, {"EDGE_WIDTH", "Selection"});
|
||||
createGeomAction( GEOMOp::OpIsosWidth, {"ISOS_WIDTH", "Selection"});
|
||||
createGeomAction( GEOMOp::OpVectors, {"POP_VECTORS", "Selection/DisplayMode"}, "", true );
|
||||
createGeomAction( GEOMOp::OpVertices, {"POP_VERTICES", "Selection/DisplayMode"}, "", true );
|
||||
createGeomAction( GEOMOp::OpShowName, {"POP_SHOW_NAME", "Selection/DisplayMode"}, "", true );
|
||||
createGeomAction( GEOMOp::OpDeflection, {"POP_DEFLECTION", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpColor, {"POP_COLOR", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpSetTexture, {"POP_SETTEXTURE", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpTransparency, {"POP_TRANSPARENCY", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpIsos, {"POP_ISOS", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpAutoColor, {"POP_AUTO_COLOR", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpNoAutoColor, {"POP_DISABLE_AUTO_COLOR", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpGroupCreatePopup, {"POP_CREATE_GROUP", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpEditFieldPopup, {"POP_EDIT_FIELD", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpDiscloseChildren, {"POP_DISCLOSE_CHILDREN", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpConcealChildren, {"POP_CONCEAL_CHILDREN", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpUnpublishObject, {"POP_UNPUBLISH_OBJ", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpPublishObject, {"POP_PUBLISH_OBJ", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpPointMarker, {"POP_POINT_MARKER", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpMaterialProperties, {"POP_MATERIAL_PROPERTIES", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpPredefMaterCustom, {"POP_PREDEF_MATER_CUSTOM", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpMaterialMenu, {"POP_MATERIAL_PROPERTIES", "Selection"});
|
||||
action(GEOMOp::OpMaterialMenu)->setMenu( new QMenu() );
|
||||
createGeomAction( GEOMOp::OpCreateFolder, "POP_CREATE_FOLDER" );
|
||||
createGeomAction( GEOMOp::OpSortChildren, "POP_SORT_CHILD_ITEMS" );
|
||||
createGeomAction( GEOMOp::OpCreateFolder, {"POP_CREATE_FOLDER", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpSortChildren, {"POP_SORT_CHILD_ITEMS", "Selection"} );
|
||||
#ifndef DISABLE_GRAPHICSVIEW
|
||||
createGeomAction( GEOMOp::OpShowDependencyTree, "POP_SHOW_DEPENDENCY_TREE" );
|
||||
createGeomAction( GEOMOp::OpShowDependencyTree, {"POP_SHOW_DEPENDENCY_TREE", "Selection"} );
|
||||
#endif
|
||||
createGeomAction( GEOMOp::OpReduceStudy, "POP_REDUCE_STUDY" );
|
||||
createGeomAction( GEOMOp::OpShowAllDimensions, "POP_SHOW_ALL_DIMENSIONS" );
|
||||
createGeomAction( GEOMOp::OpHideAllDimensions, "POP_HIDE_ALL_DIMENSIONS" );
|
||||
createGeomAction( GEOMOp::OpShowAllAnnotations, "POP_SHOW_ALL_ANNOTATIONS" );
|
||||
createGeomAction( GEOMOp::OpHideAllAnnotations, "POP_HIDE_ALL_ANNOTATIONS" );
|
||||
createGeomAction( GEOMOp::OpReduceStudy, {"POP_REDUCE_STUDY", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpShowAllDimensions, {"POP_SHOW_ALL_DIMENSIONS", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpHideAllDimensions, {"POP_HIDE_ALL_DIMENSIONS", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpShowAllAnnotations, {"POP_SHOW_ALL_ANNOTATIONS", "Selection"} );
|
||||
createGeomAction( GEOMOp::OpHideAllAnnotations, {"POP_HIDE_ALL_ANNOTATIONS", "Selection"} );
|
||||
|
||||
// Create actions for increase/decrease transparency shortcuts
|
||||
createGeomAction( GEOMOp::OpIncrTransparency, "", "", 0, false,
|
||||
"Transparency/Increase");
|
||||
"Selection/POP_TRANSPARENCY/Increase");
|
||||
createGeomAction( GEOMOp::OpDecrTransparency, "", "", 0, false,
|
||||
"Transparency/Decrease");
|
||||
"Selection/POP_TRANSPARENCY/Decrease");
|
||||
|
||||
// Create actions for increase/decrease number of isolines
|
||||
createGeomAction( GEOMOp::OpIncrNbIsos, "", "", 0, false,
|
||||
"Isolines/Increase number");
|
||||
"Selection/POP_ISOS/Increase number");
|
||||
createGeomAction( GEOMOp::OpDecrNbIsos, "", "", 0, false,
|
||||
"Isolines/Decrease number");
|
||||
"Selection/POP_ISOS/Decrease number");
|
||||
|
||||
//createGeomAction( GEOMOp::OpPipeTShape, "PIPETSHAPE" );
|
||||
//createGeomAction( GEOMOp::OpDividedDisk, "DIVIDEDDISK" );
|
||||
@ -1849,7 +1865,7 @@ void GeometryGUI::addPluginActions()
|
||||
application()->desktop(),
|
||||
false /*toggle*/,
|
||||
this, SLOT( OnGUIEvent() ),
|
||||
QString::fromStdString(pdata.name + "/" + adata.label)
|
||||
QString::fromStdString("Plugins/" + pdata.name + "/" + adata.label)
|
||||
);
|
||||
|
||||
int menuId = -1;
|
||||
|
@ -203,6 +203,11 @@ private:
|
||||
const QString& icon_id = QString(""),
|
||||
const int key = 0, const bool toggle = false);
|
||||
|
||||
void createGeomAction( const int inMenuIdx,
|
||||
const QPair<QString, QString>& inModuleIDLastTokenAndPrefix,
|
||||
const QString& iconID = QString(),
|
||||
const bool toggle = false);
|
||||
|
||||
void createPopupItem( const int, const QString& clients, const QString& types,
|
||||
const bool isSingle = false, const int isVisible = -1,
|
||||
const bool isExpandAll = false, const bool isOCC = false,
|
||||
|
@ -22,6 +22,7 @@
|
||||
# additional include directories
|
||||
INCLUDE_DIRECTORIES(
|
||||
${OpenCASCADE_INCLUDE_DIR}
|
||||
${CommonGeomLib_INCLUDE_DIRS}
|
||||
${PTHREAD_INCLUDE_DIR}
|
||||
${KERNEL_INCLUDE_DIRS}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
@ -46,6 +47,7 @@ ADD_DEFINITIONS(
|
||||
|
||||
# libraries to link to
|
||||
SET(_link_LIBRARIES
|
||||
${CommonGeomLib_GeomAnaTool}
|
||||
${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
|
||||
${PYTHON_LIBRARIES}
|
||||
ShHealOper GEOMbasic BlockFix GEOMAlgo GEOMUtils GEOMSketcher GEOMArchimede XAO
|
||||
|
@ -42,28 +42,6 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
//=======================================================================
|
||||
//function : ConvertShapesToIndices
|
||||
//purpose : Convert sub-shapes of shapes to sequence of indices
|
||||
//=======================================================================
|
||||
Handle(TColStd_HArray1OfInteger) ConvertShapesToIndices(const TopoDS_Shape& theShape,
|
||||
const TopTools_ListOfShape& theShapes)
|
||||
{
|
||||
Handle(TColStd_HArray1OfInteger) aSeqOfIDs = new TColStd_HArray1OfInteger(1, theShapes.Size());
|
||||
|
||||
TopTools_IndexedMapOfShape anIndices;
|
||||
TopExp::MapShapes(theShape, anIndices);
|
||||
|
||||
TopTools_ListIteratorOfListOfShape itSub(theShapes);
|
||||
for (int index = 1; itSub.More(); itSub.Next(), ++index)
|
||||
{
|
||||
int id = anIndices.FindIndex(itSub.Value());
|
||||
aSeqOfIDs->SetValue(index, id);
|
||||
}
|
||||
|
||||
return aSeqOfIDs;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ConvertShapesToIndices
|
||||
//purpose : Convert list of pair shapes to sequence of indices
|
||||
@ -203,6 +181,8 @@ Standard_Real GEOMImpl_ConformityDriver::updateTolerance(const TopoDS_Shape& the
|
||||
case TopAbs_FACE:
|
||||
aCurTolerance = BRep_Tool::Tolerance(TopoDS::Face(anExp.Value()));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
aTolerance = Min(aTolerance, aCurTolerance);
|
||||
}
|
||||
@ -228,6 +208,8 @@ Standard_Real GEOMImpl_ConformityDriver::updateTolerance(const TopoDS_Shape& the
|
||||
case TopAbs_FACE:
|
||||
aCurTolerance = BRep_Tool::Tolerance(TopoDS::Face(anExp.Value()));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
aResTol = Max(aResTol, aCurTolerance);
|
||||
}
|
||||
|
@ -34,6 +34,9 @@
|
||||
#include <GEOMImpl_IConformity.hxx>
|
||||
#include <GEOMImpl_ConformityDriver.hxx>
|
||||
|
||||
#include <GEOMImpl_IPartition.hxx>
|
||||
#include <GEOMImpl_PartitionDriver.hxx>
|
||||
|
||||
#include <GEOMUtils.hxx>
|
||||
|
||||
#include <GEOMAlgo_AlgoTools.hxx>
|
||||
@ -44,6 +47,12 @@
|
||||
|
||||
#include <utilities.h>
|
||||
|
||||
#include <Basics_OCCTVersion.hxx>
|
||||
|
||||
// CommonGeomLib Includes
|
||||
#include <GeomAnaTool_Tools.hxx>
|
||||
#include <GeomAnaTool_ExtractBOPFailure.hxx>
|
||||
|
||||
// OCCT Includes
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BOPAlgo_CheckerSI.hxx>
|
||||
@ -174,7 +183,7 @@ GEOMImpl_IMeasureOperations::ShapeKind GEOMImpl_IMeasureOperations::KindOfShape
|
||||
theDoubles->Append(aC.X());
|
||||
theDoubles->Append(aC.Y());
|
||||
theDoubles->Append(aC.Z());
|
||||
|
||||
|
||||
gp_Dir aD = anAx3.XDirection();
|
||||
theDoubles->Append(aD.X());
|
||||
theDoubles->Append(aD.Y());
|
||||
@ -578,7 +587,7 @@ GEOMImpl_IMeasureOperations::ShapeKind GEOMImpl_IMeasureOperations::KindOfShape
|
||||
{
|
||||
// (+) geompy.kind.PLANAR xo yo zo dx dy dz nb_edges nb_vertices
|
||||
aKind = SK_PLANAR;
|
||||
|
||||
|
||||
theIntegers->Append(anInfo.NbSubShapes(TopAbs_EDGE));
|
||||
theIntegers->Append(anInfo.NbSubShapes(TopAbs_VERTEX));
|
||||
}
|
||||
@ -1374,7 +1383,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetBoundingBox
|
||||
|
||||
//Make a Python command
|
||||
GEOM::TPythonDump aPd(aFunction);
|
||||
|
||||
|
||||
aPd << aBnd << " = geompy.MakeBoundingBox(" << theShape;
|
||||
|
||||
if (precise) {
|
||||
@ -1458,7 +1467,7 @@ void GEOMImpl_IMeasureOperations::GetTolerance
|
||||
//=============================================================================
|
||||
bool GEOMImpl_IMeasureOperations::CheckShape (Handle(GEOM_Object) theShape,
|
||||
const Standard_Boolean theIsCheckGeom,
|
||||
std::list<ShapeError> &theErrors)
|
||||
std::list<GeomAnaTool::ShapeError> &theErrors)
|
||||
{
|
||||
SetErrorCode(KO);
|
||||
theErrors.clear();
|
||||
@ -1482,7 +1491,7 @@ bool GEOMImpl_IMeasureOperations::CheckShape (Handle(GEOM_Object) theShape,
|
||||
if (ana.IsValid()) {
|
||||
isValid = true;
|
||||
} else {
|
||||
FillErrors(ana, aShape, theErrors);
|
||||
GeomAnaTool::FillErrors(ana, aShape, theErrors);
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure& aFail) {
|
||||
@ -1501,7 +1510,7 @@ bool GEOMImpl_IMeasureOperations::CheckShape (Handle(GEOM_Object) theShape,
|
||||
//=============================================================================
|
||||
TCollection_AsciiString GEOMImpl_IMeasureOperations::PrintShapeErrors
|
||||
(Handle(GEOM_Object) theShape,
|
||||
const std::list<ShapeError> &theErrors)
|
||||
const std::list<GeomAnaTool::ShapeError> &theErrors)
|
||||
{
|
||||
TCollection_AsciiString aDump;
|
||||
|
||||
@ -1525,7 +1534,7 @@ TCollection_AsciiString GEOMImpl_IMeasureOperations::PrintShapeErrors
|
||||
if (!theErrors.empty()) {
|
||||
// The shape is not valid. Prepare errors for dump.
|
||||
TopTools_IndexedMapOfShape anIndices;
|
||||
std::list<ShapeError>::const_iterator anIter = theErrors.begin();
|
||||
std::list<GeomAnaTool::ShapeError>::const_iterator anIter = theErrors.begin();
|
||||
Standard_Integer nbv, nbe, nbw, nbf, nbs, nbo;
|
||||
nbv = nbe = nbw = nbf = nbs = nbo = 0;
|
||||
|
||||
@ -1711,6 +1720,111 @@ TCollection_AsciiString GEOMImpl_IMeasureOperations::PrintShapeErrors
|
||||
return aDump;
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* ExtractBOPFailure
|
||||
*/
|
||||
//=============================================================================
|
||||
bool GEOMImpl_IMeasureOperations::ExtractBOPFailure
|
||||
(const Handle(TColStd_HSequenceOfTransient)& theShapes,
|
||||
const bool theUseTimer,
|
||||
const bool theTopoOnly,
|
||||
const bool theRunParallel,
|
||||
const bool theDoExact,
|
||||
Handle(GEOM_Object)& theResultShape,
|
||||
std::list<GeomAnaTool::ShapeError>& theErrors)
|
||||
{
|
||||
SetErrorCode(OK);
|
||||
theErrors.clear();
|
||||
|
||||
if (theShapes.IsNull()) return false;
|
||||
|
||||
Standard_Integer aNbShapes = theShapes->Length();
|
||||
if (!aNbShapes) return false;
|
||||
|
||||
Handle(TColStd_HSequenceOfTransient) aShapesSeq = new TColStd_HSequenceOfTransient;
|
||||
|
||||
TopTools_ListOfShape aList;
|
||||
for (int i = 1; i <= aNbShapes; i++) {
|
||||
Handle(GEOM_Object) aGeomObj = Handle(GEOM_Object)::DownCast(theShapes->Value(i));
|
||||
if (aGeomObj.IsNull())
|
||||
continue;
|
||||
|
||||
Handle(GEOM_Function) aRefShape = aGeomObj->GetLastFunction();
|
||||
if (aRefShape.IsNull())
|
||||
continue;
|
||||
|
||||
TopoDS_Shape aShape = aRefShape->GetValue();
|
||||
if (aShape.IsNull())
|
||||
continue;
|
||||
|
||||
aShapesSeq->Append(aRefShape);
|
||||
aList.Append(aShape);
|
||||
}
|
||||
|
||||
// Call the GeomAnaTool API to extract BOP failures
|
||||
bool isValid = false;
|
||||
try
|
||||
{
|
||||
OCC_CATCH_SIGNALS;
|
||||
GeomAnaTool_ExtractBOPFailure aTool (aList);
|
||||
aTool.SetUseTimer(theUseTimer);
|
||||
aTool.SetCheckGeometry(!theTopoOnly); // Either topo only or topo+geometry
|
||||
aTool.SetRunParallel(theRunParallel);
|
||||
aTool.SetExactCheck(theDoExact);
|
||||
aTool.Perform();
|
||||
|
||||
// Check, if there are execution errors
|
||||
const Handle(Message_Report) aReport = aTool.GetReport();
|
||||
Standard_SStream anOS;
|
||||
aReport->Dump(anOS);
|
||||
if (!anOS.str().empty()) {
|
||||
SetErrorCode(anOS.str().c_str());
|
||||
if (aTool.HasFailureAlerts()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
TopoDS_Shape aShapeRes = aTool.Result();
|
||||
if (aShapeRes.IsNull()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create Partition object.
|
||||
theResultShape = GetEngine()->AddObject(GEOM_PARTITION);
|
||||
Handle(GEOM_Function) aFunction = theResultShape->AddFunction
|
||||
(GEOMImpl_PartitionDriver::GetID(), PARTITION_GENERAL_FUSE);
|
||||
// For creation information filling
|
||||
GEOMImpl_IPartition aCI (aFunction);
|
||||
aCI.SetShapes(aShapesSeq);
|
||||
// Set General Fuse result right here
|
||||
// (without driver execution, as we already have the result shape)
|
||||
aFunction->SetValue(aShapeRes);
|
||||
|
||||
theErrors = aTool.ShapeErrors();
|
||||
isValid = theErrors.size() == 0;
|
||||
|
||||
//Make a Python command
|
||||
GEOM::TPythonDump aPD (aFunction);
|
||||
aPD << "(isBOPFailure, " << theResultShape
|
||||
<< ", anErrors) = geompy.ExtractBOPFailure([";
|
||||
for (int i = 1; i <= aNbShapes; i++) {
|
||||
aPD << Handle(GEOM_Object)::DownCast(theShapes->Value(i));
|
||||
if (i < aNbShapes) aPD << ", ";
|
||||
}
|
||||
aPD << "], " << theUseTimer << ", " << theTopoOnly
|
||||
<< ", " << theRunParallel << ", " << theDoExact << ")";
|
||||
}
|
||||
catch(Standard_Failure& aFail)
|
||||
{
|
||||
SetErrorCode(aFail.GetMessageString());
|
||||
return false;
|
||||
}
|
||||
|
||||
return isValid;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* CheckSelfIntersections
|
||||
@ -1830,11 +1944,11 @@ bool GEOMImpl_IMeasureOperations::CheckSelfIntersectionsFast
|
||||
|
||||
// Launch the checker
|
||||
aTool.Perform();
|
||||
|
||||
|
||||
const BRepExtrema_MapOfIntegerPackedMapOfInteger& intersections = aTool.OverlapElements();
|
||||
|
||||
|
||||
std::set<Standard_Integer> processed;
|
||||
|
||||
|
||||
for (BRepExtrema_MapOfIntegerPackedMapOfInteger::Iterator it(intersections); it.More(); it.Next()) {
|
||||
Standard_Integer idxLeft = it.Key();
|
||||
if (processed.count(idxLeft) > 0) continue; // already added
|
||||
@ -1952,14 +2066,14 @@ bool GEOMImpl_IMeasureOperations::FastIntersect (Handle(GEOM_Object) theShape1,
|
||||
|
||||
// 1. Launch the checker
|
||||
aBSP.Perform();
|
||||
|
||||
|
||||
// 2. Get sets of IDs of overlapped faces
|
||||
for (BRepExtrema_MapOfIntegerPackedMapOfInteger::Iterator anIt1 (aBSP.OverlapSubShapes1()); anIt1.More(); anIt1.Next())
|
||||
{
|
||||
const TopoDS_Shape& aS1 = aBSP.GetSubShape1(anIt1.Key());
|
||||
theIntersections1->Append(anIndices1.FindIndex(aS1));
|
||||
}
|
||||
|
||||
|
||||
for (BRepExtrema_MapOfIntegerPackedMapOfInteger::Iterator anIt2 (aBSP.OverlapSubShapes2()); anIt2.More(); anIt2.Next())
|
||||
{
|
||||
const TopoDS_Shape& aS2 = aBSP.GetSubShape2(anIt2.Key());
|
||||
@ -2319,12 +2433,6 @@ Standard_Integer GEOMImpl_IMeasureOperations::ClosestPoints (Handle(GEOM_Object)
|
||||
try {
|
||||
OCC_CATCH_SIGNALS;
|
||||
|
||||
// skl 30.06.2008
|
||||
// additional workaround for bugs 19899, 19908 and 19910 from Mantis
|
||||
gp_Pnt P1s, P2s;
|
||||
double dist = GEOMUtils::GetMinDistanceSingular(aShape1, aShape2, P1s, P2s);
|
||||
bool singularBetter = dist >= 0;
|
||||
|
||||
BRepExtrema_DistShapeShape dst (aShape1, aShape2);
|
||||
if (dst.IsDone()) {
|
||||
nbSolutions = dst.NbSolution();
|
||||
@ -2334,32 +2442,15 @@ Standard_Integer GEOMImpl_IMeasureOperations::ClosestPoints (Handle(GEOM_Object)
|
||||
for (int i = 1; i <= nbSolutions; i++) {
|
||||
P1 = dst.PointOnShape1(i);
|
||||
P2 = dst.PointOnShape2(i);
|
||||
|
||||
|
||||
theDoubles->Append(P1.X());
|
||||
theDoubles->Append(P1.Y());
|
||||
theDoubles->Append(P1.Z());
|
||||
theDoubles->Append(P2.X());
|
||||
theDoubles->Append(P2.Y());
|
||||
theDoubles->Append(P2.Z());
|
||||
|
||||
Standard_Real Dist = P1.Distance(P2);
|
||||
singularBetter = singularBetter && dist < Dist;
|
||||
}
|
||||
}
|
||||
|
||||
if (singularBetter) {
|
||||
if (theDoubles.IsNull()) theDoubles = new TColStd_HSequenceOfReal;
|
||||
else theDoubles->Clear();
|
||||
|
||||
nbSolutions = 1;
|
||||
|
||||
theDoubles->Append(P1s.X());
|
||||
theDoubles->Append(P1s.Y());
|
||||
theDoubles->Append(P1s.Z());
|
||||
theDoubles->Append(P2s.X());
|
||||
theDoubles->Append(P2s.Y());
|
||||
theDoubles->Append(P2s.Z());
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure& aFail) {
|
||||
SetErrorCode(aFail.GetMessageString());
|
||||
@ -3525,161 +3616,6 @@ double GEOMImpl_IMeasureOperations::ComputeTolerance(Handle(GEOM_Object) theEdge
|
||||
return aMaxDist;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : FillErrorsSub
|
||||
//purpose : Fill the errors list of subshapes on shape.
|
||||
//=======================================================================
|
||||
void GEOMImpl_IMeasureOperations::FillErrorsSub
|
||||
(const BRepCheck_Analyzer &theAna,
|
||||
const TopoDS_Shape &theShape,
|
||||
const TopAbs_ShapeEnum theSubType,
|
||||
TopTools_DataMapOfIntegerListOfShape &theMapErrors) const
|
||||
{
|
||||
TopExp_Explorer anExp(theShape, theSubType);
|
||||
TopTools_MapOfShape aMapSubShapes;
|
||||
|
||||
for (; anExp.More(); anExp.Next()) {
|
||||
const TopoDS_Shape &aSubShape = anExp.Current();
|
||||
|
||||
if (aMapSubShapes.Add(aSubShape)) {
|
||||
const Handle(BRepCheck_Result) &aRes = theAna.Result(aSubShape);
|
||||
|
||||
for (aRes->InitContextIterator();
|
||||
aRes->MoreShapeInContext();
|
||||
aRes->NextShapeInContext()) {
|
||||
if (aRes->ContextualShape().IsSame(theShape)) {
|
||||
BRepCheck_ListIteratorOfListOfStatus itl(aRes->StatusOnShape());
|
||||
|
||||
if (itl.Value() != BRepCheck_NoError) {
|
||||
// Add all errors for theShape and its sub-shape.
|
||||
for (;itl.More(); itl.Next()) {
|
||||
const Standard_Integer aStat = (Standard_Integer)itl.Value();
|
||||
|
||||
if (!theMapErrors.IsBound(aStat)) {
|
||||
TopTools_ListOfShape anEmpty;
|
||||
|
||||
theMapErrors.Bind(aStat, anEmpty);
|
||||
}
|
||||
|
||||
TopTools_ListOfShape &theShapes = theMapErrors.ChangeFind(aStat);
|
||||
|
||||
theShapes.Append(aSubShape);
|
||||
theShapes.Append(theShape);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : FillErrors
|
||||
//purpose : Fill the errors list.
|
||||
//=======================================================================
|
||||
void GEOMImpl_IMeasureOperations::FillErrors
|
||||
(const BRepCheck_Analyzer &theAna,
|
||||
const TopoDS_Shape &theShape,
|
||||
TopTools_DataMapOfIntegerListOfShape &theMapErrors,
|
||||
TopTools_MapOfShape &theMapShapes) const
|
||||
{
|
||||
if (theMapShapes.Add(theShape)) {
|
||||
// Fill errors of child shapes.
|
||||
for (TopoDS_Iterator iter(theShape); iter.More(); iter.Next()) {
|
||||
FillErrors(theAna, iter.Value(), theMapErrors, theMapShapes);
|
||||
}
|
||||
|
||||
// Fill errors of theShape.
|
||||
const Handle(BRepCheck_Result) &aRes = theAna.Result(theShape);
|
||||
|
||||
if (!aRes.IsNull()) {
|
||||
BRepCheck_ListIteratorOfListOfStatus itl(aRes->Status());
|
||||
|
||||
if (itl.Value() != BRepCheck_NoError) {
|
||||
// Add all errors for theShape.
|
||||
for (;itl.More(); itl.Next()) {
|
||||
const Standard_Integer aStat = (Standard_Integer)itl.Value();
|
||||
|
||||
if (!theMapErrors.IsBound(aStat)) {
|
||||
TopTools_ListOfShape anEmpty;
|
||||
|
||||
theMapErrors.Bind(aStat, anEmpty);
|
||||
}
|
||||
|
||||
theMapErrors.ChangeFind(aStat).Append(theShape);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add errors of subshapes on theShape.
|
||||
const TopAbs_ShapeEnum aType = theShape.ShapeType();
|
||||
|
||||
switch (aType) {
|
||||
case TopAbs_EDGE:
|
||||
FillErrorsSub(theAna, theShape, TopAbs_VERTEX, theMapErrors);
|
||||
break;
|
||||
case TopAbs_FACE:
|
||||
FillErrorsSub(theAna, theShape, TopAbs_WIRE, theMapErrors);
|
||||
FillErrorsSub(theAna, theShape, TopAbs_EDGE, theMapErrors);
|
||||
FillErrorsSub(theAna, theShape, TopAbs_VERTEX, theMapErrors);
|
||||
break;
|
||||
case TopAbs_SOLID:
|
||||
FillErrorsSub(theAna, theShape, TopAbs_SHELL, theMapErrors);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : FillErrors
|
||||
//purpose : Fill the errors list.
|
||||
//=======================================================================
|
||||
void GEOMImpl_IMeasureOperations::FillErrors
|
||||
(const BRepCheck_Analyzer &theAna,
|
||||
const TopoDS_Shape &theShape,
|
||||
std::list<ShapeError> &theErrors) const
|
||||
{
|
||||
// Fill the errors map.
|
||||
TopTools_DataMapOfIntegerListOfShape aMapErrors;
|
||||
TopTools_MapOfShape aMapShapes;
|
||||
|
||||
FillErrors(theAna, theShape, aMapErrors, aMapShapes);
|
||||
|
||||
// Map sub-shapes and their indices
|
||||
TopTools_IndexedMapOfShape anIndices;
|
||||
|
||||
TopExp::MapShapes(theShape, anIndices);
|
||||
|
||||
TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape aMapIter(aMapErrors);
|
||||
|
||||
for (; aMapIter.More(); aMapIter.Next()) {
|
||||
ShapeError anError;
|
||||
|
||||
anError.error = (BRepCheck_Status)aMapIter.Key();
|
||||
|
||||
TopTools_ListIteratorOfListOfShape aListIter(aMapIter.Value());
|
||||
TopTools_MapOfShape aMapUnique;
|
||||
|
||||
for (; aListIter.More(); aListIter.Next()) {
|
||||
const TopoDS_Shape &aShape = aListIter.Value();
|
||||
|
||||
if (aMapUnique.Add(aShape)) {
|
||||
const Standard_Integer anIndex = anIndices.FindIndex(aShape);
|
||||
|
||||
anError.incriminated.push_back(anIndex);
|
||||
}
|
||||
}
|
||||
|
||||
if (!anError.incriminated.empty()) {
|
||||
theErrors.push_back(anError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ShapeProximityCalculator
|
||||
//purpose : returns an object to compute the proximity value
|
||||
|
@ -25,6 +25,8 @@
|
||||
|
||||
#include "GEOM_IOperations.hxx"
|
||||
|
||||
#include <GeomAnaTool_Tools.hxx>
|
||||
|
||||
#include <BRepCheck_Analyzer.hxx>
|
||||
#include <BRepCheck_Status.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
@ -149,30 +151,34 @@ class GEOMImpl_IMeasureOperations : public GEOM_IOperations {
|
||||
Standard_Real& EdgeMin, Standard_Real& EdgeMax,
|
||||
Standard_Real& VertMin, Standard_Real& VertMax);
|
||||
|
||||
struct ShapeError {
|
||||
BRepCheck_Status error;
|
||||
std::list<int> incriminated;
|
||||
};
|
||||
|
||||
Standard_EXPORT bool CheckShape (Handle(GEOM_Object) theShape,
|
||||
const Standard_Boolean theIsCheckGeom,
|
||||
std::list<ShapeError> &theErrors);
|
||||
std::list<GeomAnaTool::ShapeError> &theErrors);
|
||||
|
||||
Standard_EXPORT TCollection_AsciiString PrintShapeErrors
|
||||
(Handle(GEOM_Object) theShape,
|
||||
const std::list<ShapeError> &theErrors);
|
||||
const std::list<GeomAnaTool::ShapeError> &theErrors);
|
||||
|
||||
Standard_EXPORT bool ExtractBOPFailure
|
||||
(const Handle(TColStd_HSequenceOfTransient)& theShapes,
|
||||
const bool theUseTimer,
|
||||
const bool theTopoOnly,
|
||||
const bool theRunParallel,
|
||||
const bool theDoExact,
|
||||
Handle(GEOM_Object)& theResultShape,
|
||||
std::list<GeomAnaTool::ShapeError>& theErrors);
|
||||
|
||||
Standard_EXPORT bool CheckSelfIntersections (Handle(GEOM_Object) theShape,
|
||||
const SICheckLevel theCheckLevel,
|
||||
Handle(TColStd_HSequenceOfInteger)& theIntersections);
|
||||
|
||||
|
||||
Standard_EXPORT bool CheckSelfIntersectionsFast (Handle(GEOM_Object) theShape,
|
||||
float deflection,
|
||||
float deflection,
|
||||
double tolerance,
|
||||
Handle(TColStd_HSequenceOfInteger)& theIntersections);
|
||||
|
||||
Standard_EXPORT bool CheckBOPArguments (const Handle(GEOM_Object) &theShape);
|
||||
|
||||
|
||||
Standard_EXPORT bool FastIntersect (Handle(GEOM_Object) theShape1, Handle(GEOM_Object) theShape2,
|
||||
double tolerance, float deflection,
|
||||
Handle(TColStd_HSequenceOfInteger)& theIntersections1,
|
||||
@ -271,21 +277,6 @@ class GEOMImpl_IMeasureOperations : public GEOM_IOperations {
|
||||
|
||||
private:
|
||||
|
||||
void FillErrorsSub
|
||||
(const BRepCheck_Analyzer &theAna,
|
||||
const TopoDS_Shape &theShape,
|
||||
const TopAbs_ShapeEnum theSubType,
|
||||
TopTools_DataMapOfIntegerListOfShape &theMapErrors) const;
|
||||
void FillErrors
|
||||
(const BRepCheck_Analyzer &theAna,
|
||||
const TopoDS_Shape &theShape,
|
||||
TopTools_DataMapOfIntegerListOfShape &theMapErrors,
|
||||
TopTools_MapOfShape &theMapShapes) const;
|
||||
|
||||
void FillErrors (const BRepCheck_Analyzer &theAna,
|
||||
const TopoDS_Shape &theShape,
|
||||
std::list<ShapeError> &theErrors) const;
|
||||
|
||||
Standard_Real getSurfaceCurvatures (const Handle(Geom_Surface)& aSurf,
|
||||
Standard_Real theUParam,
|
||||
Standard_Real theVParam,
|
||||
|
@ -1090,10 +1090,11 @@ GEOMImpl_ITransformOperations::OffsetShape (Handle(GEOM_Object) theObject,
|
||||
* OffsetShapeCopy
|
||||
*/
|
||||
//=============================================================================
|
||||
Handle(GEOM_Object)
|
||||
GEOMImpl_ITransformOperations::OffsetShapeCopy( Handle(GEOM_Object) theObject,
|
||||
double theOffset,
|
||||
bool theJoinByPipes)
|
||||
Handle(GEOM_Object) GEOMImpl_ITransformOperations::OffsetShapeCopy
|
||||
(Handle(GEOM_Object) theObject,
|
||||
double theOffset,
|
||||
bool theJoinByPipes,
|
||||
const Handle(TColStd_HArray1OfInteger)& theFacesIDs)
|
||||
{
|
||||
SetErrorCode(KO);
|
||||
|
||||
@ -1118,6 +1119,10 @@ GEOMImpl_ITransformOperations::OffsetShapeCopy( Handle(GEOM_Object) theObject,
|
||||
aTI.SetValue( theOffset );
|
||||
aTI.SetJoinByPipes( theJoinByPipes );
|
||||
|
||||
if (!theFacesIDs.IsNull()) {
|
||||
aTI.SetFaceIDs(theFacesIDs);
|
||||
}
|
||||
|
||||
//Compute the offset
|
||||
try {
|
||||
OCC_CATCH_SIGNALS;
|
||||
@ -1132,18 +1137,31 @@ GEOMImpl_ITransformOperations::OffsetShapeCopy( Handle(GEOM_Object) theObject,
|
||||
}
|
||||
|
||||
//Make a Python command
|
||||
if (theJoinByPipes)
|
||||
GEOM::TPythonDump(aFunction) << aCopy << " = geompy.MakeOffset("
|
||||
<< theObject << ", " << theOffset << ")";
|
||||
else
|
||||
GEOM::TPythonDump(aFunction) << aCopy << " = geompy.MakeOffsetIntersectionJoin("
|
||||
<< theObject << ", " << theOffset << ")";
|
||||
if (theFacesIDs.IsNull()) {
|
||||
if (theJoinByPipes)
|
||||
GEOM::TPythonDump(aFunction) << aCopy << " = geompy.MakeOffset("
|
||||
<< theObject << ", " << theOffset << ")";
|
||||
else
|
||||
GEOM::TPythonDump(aFunction) << aCopy << " = geompy.MakeOffsetIntersectionJoin("
|
||||
<< theObject << ", " << theOffset << ")";
|
||||
}
|
||||
else {
|
||||
GEOM::TPythonDump pd (aFunction);
|
||||
pd << aCopy << " = geompy.MakeOffsetPartial("
|
||||
<< theObject << ", " << theOffset << ", [";
|
||||
|
||||
// Dump faces IDs.
|
||||
for (Standard_Integer i = theFacesIDs->Lower(); i <= theFacesIDs->Upper(); ++i) {
|
||||
pd << theFacesIDs->Value(i) << ((i == theFacesIDs->Upper()) ? "" : ", ");
|
||||
}
|
||||
|
||||
pd << "])";
|
||||
}
|
||||
|
||||
SetErrorCode(OK);
|
||||
return aCopy;
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* ProjectShapeCopy
|
||||
|
@ -108,9 +108,11 @@ class GEOMImpl_ITransformOperations : public GEOM_IOperations
|
||||
double theOffset,
|
||||
bool theJoinByPipes);
|
||||
|
||||
Standard_EXPORT Handle(GEOM_Object) OffsetShapeCopy (Handle(GEOM_Object) theObject,
|
||||
double theOffset,
|
||||
bool theJoinByPipes);
|
||||
Standard_EXPORT Handle(GEOM_Object) OffsetShapeCopy
|
||||
(Handle(GEOM_Object) theObject,
|
||||
double theOffset,
|
||||
bool theJoinByPipes,
|
||||
const Handle(TColStd_HArray1OfInteger)& theFacesIDs = NULL);
|
||||
|
||||
Standard_EXPORT Handle(GEOM_Object) ProjectShapeCopy (Handle(GEOM_Object) theSource,
|
||||
Handle(GEOM_Object) theTarget);
|
||||
|
@ -28,12 +28,13 @@
|
||||
#include <GEOM_Function.hxx>
|
||||
#include <GEOMUtils.hxx>
|
||||
|
||||
#include <BRepClass3d_SolidClassifier.hxx>
|
||||
#include <BRepOffsetAPI_MakeOffsetShape.hxx>
|
||||
#include <BRepOffsetAPI_MakeThickSolid.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopAbs.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <BRepClass3d_SolidClassifier.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
#include <StdFail_NotDone.hxx>
|
||||
@ -88,24 +89,79 @@ Standard_Integer GEOMImpl_OffsetDriver::Execute(Handle(TFunction_Logbook)& log)
|
||||
|
||||
if ( aType == OFFSET_SHAPE || aType == OFFSET_SHAPE_COPY )
|
||||
{
|
||||
BRepOffsetAPI_MakeOffsetShape MO;
|
||||
BRepOffset_Mode aMode = BRepOffset_Skin;
|
||||
Standard_Boolean anIntersection = Standard_False, aSelfInter = Standard_False;
|
||||
MO.PerformByJoin( aShapeBase,
|
||||
aCI.GetValue(),
|
||||
aTol,
|
||||
aMode,
|
||||
anIntersection,
|
||||
aSelfInter,
|
||||
aCI.GetJoinByPipes() ? GeomAbs_Arc : GeomAbs_Intersection );
|
||||
Standard_Boolean anIntersection = Standard_False;
|
||||
Standard_Boolean aSelfInter = Standard_False;
|
||||
|
||||
if ( MO.IsDone() ) {
|
||||
aShape = MO.Shape();
|
||||
if ( !GEOMUtils::CheckShape(aShape, true) && !GEOMUtils::FixShapeTolerance(aShape) )
|
||||
Standard_ConstructionError::Raise("Boolean operation aborted : non valid shape result");
|
||||
Handle(TColStd_HArray1OfInteger) aFacesIDs = aCI.GetFaceIDs();
|
||||
if (aFacesIDs.IsNull() || aFacesIDs->Length() < 1) {
|
||||
// Offset entire shape (all faces) with the same offset value
|
||||
BRepOffsetAPI_MakeOffsetShape MO;
|
||||
MO.PerformByJoin( aShapeBase,
|
||||
anOffset,
|
||||
aTol,
|
||||
aMode,
|
||||
anIntersection,
|
||||
aSelfInter,
|
||||
aCI.GetJoinByPipes() ? GeomAbs_Arc : GeomAbs_Intersection );
|
||||
|
||||
if ( MO.IsDone() ) {
|
||||
aShape = MO.Shape();
|
||||
if ( !GEOMUtils::CheckShape(aShape, true) && !GEOMUtils::FixShapeTolerance(aShape) )
|
||||
Standard_ConstructionError::Raise("Offset aborted : non valid shape result");
|
||||
}
|
||||
else {
|
||||
StdFail_NotDone::Raise("Offset construction failed");
|
||||
}
|
||||
}
|
||||
else {
|
||||
StdFail_NotDone::Raise("Offset construction failed");
|
||||
// Offset selected faces of main shape by given value, other faces by 0
|
||||
BRepOffset_MakeOffset aMakeOffset;
|
||||
aMakeOffset.Initialize(aShapeBase,
|
||||
anOffset, // set offset on all faces to anOffset
|
||||
aTol,
|
||||
aMode,
|
||||
anIntersection,
|
||||
aSelfInter,
|
||||
aCI.GetJoinByPipes() ? GeomAbs_Arc : GeomAbs_Intersection,
|
||||
Standard_False);
|
||||
|
||||
// put selected faces into a map
|
||||
TopTools_MapOfShape aMapFaces;
|
||||
TopTools_IndexedMapOfShape anIndices;
|
||||
TopExp::MapShapes(aShapeBase, anIndices);
|
||||
Standard_Integer aNbShapes = anIndices.Extent();
|
||||
for (Standard_Integer i = aFacesIDs->Lower(); i <= aFacesIDs->Upper(); ++i) {
|
||||
const Standard_Integer anIndex = aFacesIDs->Value(i);
|
||||
if (anIndex < 1 || anIndex > aNbShapes) {
|
||||
Standard_ConstructionError::Raise("Offset aborted : Invalid face index given");
|
||||
}
|
||||
const TopoDS_Shape &aFace = anIndices.FindKey(anIndex);
|
||||
if (aFace.ShapeType() != TopAbs_FACE) {
|
||||
Standard_ConstructionError::Raise("Offset aborted : Shape by index is not a face");
|
||||
}
|
||||
aMapFaces.Add(aFace);
|
||||
}
|
||||
|
||||
// set offset on non-selected faces to zero
|
||||
TopExp_Explorer anExp (aShapeBase, TopAbs_FACE);
|
||||
for (; anExp.More(); anExp.Next()) {
|
||||
const TopoDS_Shape &aFace = anExp.Current();
|
||||
if (!aMapFaces.Contains(aFace)) {
|
||||
aMakeOffset.SetOffsetOnFace(TopoDS::Face(aFace), 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
// perform offset operation
|
||||
aMakeOffset.MakeOffsetShape();
|
||||
if ( aMakeOffset.IsDone() ) {
|
||||
aShape = aMakeOffset.Shape();
|
||||
if ( !GEOMUtils::CheckShape(aShape, true) && !GEOMUtils::FixShapeTolerance(aShape) )
|
||||
Standard_ConstructionError::Raise("Offset aborted : non valid shape result");
|
||||
}
|
||||
else {
|
||||
StdFail_NotDone::Raise("Offset construction failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (aType == OFFSET_THICKENING || aType == OFFSET_THICKENING_COPY)
|
||||
@ -216,6 +272,12 @@ GetCreationInformation(std::string& theOperationName,
|
||||
theOperationName = "OFFSET";
|
||||
AddParam( theParams, "Object", aCI.GetShape() );
|
||||
AddParam( theParams, "Offset", aCI.GetValue() );
|
||||
{
|
||||
Handle(TColStd_HArray1OfInteger) aFacesIDs = aCI.GetFaceIDs();
|
||||
if (!aFacesIDs.IsNull()) {
|
||||
AddParam(theParams, "Faces IDs", aFacesIDs);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case OFFSET_THICKENING:
|
||||
case OFFSET_THICKENING_COPY:
|
||||
|
@ -564,6 +564,9 @@ GetCreationInformation(std::string& theOperationName,
|
||||
AddParam( theParams, "Object", aCI.GetShape() );
|
||||
AddParam( theParams, "Plane", aCI.GetPlane() );
|
||||
break;
|
||||
case PARTITION_GENERAL_FUSE:
|
||||
AddParam( theParams, "Objects", aCI.GetShapes() );
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -531,10 +531,24 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(Handle(TFunction_Logbook)& log) c
|
||||
Handle(TopTools_HSequenceOfShape) aSeqClosedWires = new TopTools_HSequenceOfShape;
|
||||
Handle(TopTools_HSequenceOfShape) aSeqOpenWires = new TopTools_HSequenceOfShape;
|
||||
for (ind = 1; ind <= aSeqWiresOut->Length(); ind++) {
|
||||
if (aSeqWiresOut->Value(ind).Closed())
|
||||
aSeqClosedWires->Append(aSeqWiresOut->Value(ind));
|
||||
else
|
||||
aSeqOpenWires->Append(aSeqWiresOut->Value(ind));
|
||||
TopoDS_Shape aWireShape = aSeqWiresOut->Value(ind);
|
||||
if (aWireShape.Closed()) {
|
||||
TopoDS_Wire aWire = TopoDS::Wire(aWireShape);
|
||||
BRepTools_WireExplorer wexp (aWire);
|
||||
if (wexp.More()) {
|
||||
TopoDS_Edge anEdge = wexp.Current();
|
||||
wexp.Next();
|
||||
if (!wexp.More()) { // one edge in the wire
|
||||
if (BRep_Tool::Degenerated(anEdge) || !BRep_Tool::IsGeometric(anEdge)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
aSeqClosedWires->Append(aWireShape);
|
||||
}
|
||||
else {
|
||||
aSeqOpenWires->Append(aWireShape);
|
||||
}
|
||||
}
|
||||
|
||||
if (aSeqClosedWires->Length() < 1) {
|
||||
|
@ -268,6 +268,7 @@
|
||||
#define PARTITION_PARTITION 1
|
||||
#define PARTITION_HALF 2
|
||||
#define PARTITION_NO_SELF_INTERSECTIONS 3
|
||||
#define PARTITION_GENERAL_FUSE 4
|
||||
|
||||
#define POLYLINE_POINTS 1
|
||||
#define POLYLINE2D_PLN_COORDS 2
|
||||
|
@ -38,6 +38,7 @@ INCLUDE_DIRECTORIES(
|
||||
${PROJECT_SOURCE_DIR}/src/Material
|
||||
${PROJECT_SOURCE_DIR}/src/DependencyTree
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMUtils
|
||||
${PROJECT_SOURCE_DIR}/src/GEOM
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "GEOMToolsGUI_MaterialPropertiesDlg.h"
|
||||
#include "GEOMToolsGUI_LineWidthDlg.h"
|
||||
#include "GEOMToolsGUI_ReduceStudyDlg.h"
|
||||
#include "GEOM_ColorUtils.hxx"
|
||||
#include <Material_Model.h>
|
||||
|
||||
#include <GEOM_VTKPropertyMaterial.hxx>
|
||||
@ -186,7 +187,7 @@ void GEOMToolsGUI::OnAutoColor()
|
||||
#endif // GENERAL_AUTOCOLOR
|
||||
|
||||
#ifdef SIMPLE_AUTOCOLOR // simplified algorithm for auto-colors
|
||||
SALOMEDS::Color aColor = GEOM_Displayer::getPredefinedUniqueColor();
|
||||
SALOMEDS::Color aColor = GEOM_ColorUtils::getPredefinedUniqueColor();
|
||||
#else // old algorithm for auto-colors
|
||||
SALOMEDS::Color aColor = GEOM_Displayer::getUniqueColor( aReservedColors );
|
||||
aReservedColors.append( aColor );
|
||||
|
@ -119,112 +119,6 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
/**
|
||||
* This function constructs and returns modified shape from the original one
|
||||
* for singular cases. It is used for the method GetMinDistanceSingular.
|
||||
*
|
||||
* \param theShape the original shape
|
||||
* \param theModifiedShape output parameter. The modified shape.
|
||||
* \param theAddDist output parameter. The added distance for modified shape.
|
||||
* \retval true if the shape is modified; false otherwise.
|
||||
*
|
||||
* \internal
|
||||
*/
|
||||
Standard_Boolean ModifyShape(const TopoDS_Shape &theShape,
|
||||
TopoDS_Shape &theModifiedShape,
|
||||
Standard_Real &theAddDist)
|
||||
{
|
||||
TopExp_Explorer anExp;
|
||||
int nbf = 0;
|
||||
|
||||
theAddDist = 0.;
|
||||
theModifiedShape.Nullify();
|
||||
|
||||
for ( anExp.Init( theShape, TopAbs_FACE ); anExp.More(); anExp.Next() ) {
|
||||
nbf++;
|
||||
theModifiedShape = anExp.Current();
|
||||
}
|
||||
if(nbf==1) {
|
||||
TopoDS_Shape sh = theShape;
|
||||
while(sh.ShapeType()==TopAbs_COMPOUND) {
|
||||
TopoDS_Iterator it(sh);
|
||||
sh = it.Value();
|
||||
}
|
||||
Handle(Geom_Surface) S = BRep_Tool::Surface(TopoDS::Face(theModifiedShape));
|
||||
if( S->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ||
|
||||
S->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)) ||
|
||||
S->IsUPeriodic()) {
|
||||
const Standard_Boolean isShell =
|
||||
(sh.ShapeType()==TopAbs_SHELL || sh.ShapeType()==TopAbs_FACE);
|
||||
|
||||
if ( !isShell && S->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ) {
|
||||
Handle(Geom_SphericalSurface) SS = Handle(Geom_SphericalSurface)::DownCast(S);
|
||||
gp_Pnt PC = SS->Location();
|
||||
BRep_Builder B;
|
||||
TopoDS_Vertex V;
|
||||
B.MakeVertex(V,PC,1.e-7);
|
||||
theModifiedShape = V;
|
||||
theAddDist = SS->Radius();
|
||||
return Standard_True;
|
||||
}
|
||||
if ( !isShell && S->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)) ) {
|
||||
Handle(Geom_ToroidalSurface) TS = Handle(Geom_ToroidalSurface)::DownCast(S);
|
||||
gp_Ax3 ax3 = TS->Position();
|
||||
Handle(Geom_Circle) C = new Geom_Circle(ax3.Ax2(),TS->MajorRadius());
|
||||
BRep_Builder B;
|
||||
TopoDS_Edge E;
|
||||
B.MakeEdge(E,C,1.e-7);
|
||||
theModifiedShape = E;
|
||||
theAddDist = TS->MinorRadius();
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
// non solid case or any periodic surface (Mantis 22454).
|
||||
double U1,U2,V1,V2;
|
||||
BRepTools::UVBounds(TopoDS::Face(theModifiedShape),U1,U2,V1,V2);
|
||||
// end of changes for 020677 (dmv)
|
||||
Handle(Geom_RectangularTrimmedSurface) TrS1 =
|
||||
new Geom_RectangularTrimmedSurface(S,U1,(U1+U2)/2.,V1,V2);
|
||||
Handle(Geom_RectangularTrimmedSurface) TrS2 =
|
||||
new Geom_RectangularTrimmedSurface(S,(U1+U2)/2.,U2,V1,V2);
|
||||
TopoDS_Shape aMShape;
|
||||
|
||||
TopoDS_Face F1 = BRepBuilderAPI_MakeFace(TrS1, Precision::Confusion());
|
||||
TopoDS_Face F2 = BRepBuilderAPI_MakeFace(TrS2, Precision::Confusion());
|
||||
|
||||
if (isShell) {
|
||||
BRep_Builder B;
|
||||
B.MakeCompound(TopoDS::Compound(aMShape));
|
||||
B.Add(aMShape, F1);
|
||||
B.Add(aMShape, F2);
|
||||
} else {
|
||||
// The original shape is a solid.
|
||||
BRepBuilderAPI_Sewing aSewing (Precision::Confusion()*10.0);
|
||||
aSewing.Add(F1);
|
||||
aSewing.Add(F2);
|
||||
aSewing.Perform();
|
||||
aMShape = aSewing.SewedShape();
|
||||
BRep_Builder B;
|
||||
TopoDS_Solid aSolid;
|
||||
B.MakeSolid(aSolid);
|
||||
B.Add(aSolid, aMShape);
|
||||
aMShape = aSolid;
|
||||
}
|
||||
|
||||
Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape;
|
||||
sfs->Init(aMShape);
|
||||
sfs->SetPrecision(1.e-6);
|
||||
sfs->SetMaxTolerance(1.0);
|
||||
sfs->Perform();
|
||||
theModifiedShape = sfs->Shape();
|
||||
return Standard_True;
|
||||
}
|
||||
}
|
||||
|
||||
theModifiedShape = theShape;
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
void parseWard( const GEOMUtils::LevelsList &theLevelList, std::string &treeStr )
|
||||
{
|
||||
treeStr.append( "{" );
|
||||
@ -836,75 +730,6 @@ Standard_Boolean GEOMUtils::PreciseBoundingBox
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetMinDistanceSingular
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
double GEOMUtils::GetMinDistanceSingular(const TopoDS_Shape& aSh1,
|
||||
const TopoDS_Shape& aSh2,
|
||||
gp_Pnt& Ptmp1, gp_Pnt& Ptmp2)
|
||||
{
|
||||
TopoDS_Shape tmpSh1;
|
||||
TopoDS_Shape tmpSh2;
|
||||
Standard_Real AddDist1 = 0.;
|
||||
Standard_Real AddDist2 = 0.;
|
||||
Standard_Boolean IsChange1 = ModifyShape(aSh1, tmpSh1, AddDist1);
|
||||
Standard_Boolean IsChange2 = ModifyShape(aSh2, tmpSh2, AddDist2);
|
||||
|
||||
if( !IsChange1 && !IsChange2 )
|
||||
return -2.0;
|
||||
|
||||
BRepExtrema_DistShapeShape dst(tmpSh1,tmpSh2);
|
||||
if (dst.IsDone()) {
|
||||
double MinDist = 1.e9;
|
||||
gp_Pnt PMin1, PMin2, P1, P2;
|
||||
for (int i = 1; i <= dst.NbSolution(); i++) {
|
||||
P1 = dst.PointOnShape1(i);
|
||||
P2 = dst.PointOnShape2(i);
|
||||
Standard_Real Dist = P1.Distance(P2);
|
||||
if (MinDist > Dist) {
|
||||
MinDist = Dist;
|
||||
PMin1 = P1;
|
||||
PMin2 = P2;
|
||||
}
|
||||
}
|
||||
if(MinDist<1.e-7) {
|
||||
Ptmp1 = PMin1;
|
||||
Ptmp2 = PMin2;
|
||||
}
|
||||
else {
|
||||
gp_Dir aDir(gp_Vec(PMin1,PMin2));
|
||||
if( MinDist > (AddDist1+AddDist2) ) {
|
||||
Ptmp1 = gp_Pnt( PMin1.X() + aDir.X()*AddDist1,
|
||||
PMin1.Y() + aDir.Y()*AddDist1,
|
||||
PMin1.Z() + aDir.Z()*AddDist1 );
|
||||
Ptmp2 = gp_Pnt( PMin2.X() - aDir.X()*AddDist2,
|
||||
PMin2.Y() - aDir.Y()*AddDist2,
|
||||
PMin2.Z() - aDir.Z()*AddDist2 );
|
||||
return (MinDist - AddDist1 - AddDist2);
|
||||
}
|
||||
else {
|
||||
if( AddDist1 > 0 ) {
|
||||
Ptmp1 = gp_Pnt( PMin1.X() + aDir.X()*AddDist1,
|
||||
PMin1.Y() + aDir.Y()*AddDist1,
|
||||
PMin1.Z() + aDir.Z()*AddDist1 );
|
||||
Ptmp2 = Ptmp1;
|
||||
}
|
||||
else {
|
||||
Ptmp2 = gp_Pnt( PMin2.X() - aDir.X()*AddDist2,
|
||||
PMin2.Y() - aDir.Y()*AddDist2,
|
||||
PMin2.Z() - aDir.Z()*AddDist2 );
|
||||
Ptmp1 = Ptmp2;
|
||||
}
|
||||
}
|
||||
}
|
||||
double res = MinDist - AddDist1 - AddDist2;
|
||||
if(res<0.) res = 0.0;
|
||||
return res;
|
||||
}
|
||||
return -2.0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetMinDistance
|
||||
//purpose :
|
||||
@ -914,46 +739,7 @@ Standard_Real GEOMUtils::GetMinDistance
|
||||
const TopoDS_Shape& theShape2,
|
||||
gp_Pnt& thePnt1, gp_Pnt& thePnt2)
|
||||
{
|
||||
Standard_Real aResult = 1.e9;
|
||||
|
||||
// Issue 0020231: A min distance bug with torus and vertex.
|
||||
// Make GetMinDistance() return zero if a sole VERTEX is inside any of SOLIDs
|
||||
|
||||
// which of shapes consists of only one vertex?
|
||||
TopExp_Explorer exp1(theShape1,TopAbs_VERTEX), exp2(theShape2,TopAbs_VERTEX);
|
||||
TopoDS_Shape V1 = exp1.More() ? exp1.Current() : TopoDS_Shape();
|
||||
TopoDS_Shape V2 = exp2.More() ? exp2.Current() : TopoDS_Shape();
|
||||
exp1.Next(); exp2.Next();
|
||||
if ( exp1.More() ) V1.Nullify();
|
||||
if ( exp2.More() ) V2.Nullify();
|
||||
// vertex and container of solids
|
||||
TopoDS_Shape V = V1.IsNull() ? V2 : V1;
|
||||
TopoDS_Shape S = V1.IsNull() ? theShape1 : theShape2;
|
||||
if ( !V.IsNull() ) {
|
||||
// classify vertex against solids
|
||||
gp_Pnt p = BRep_Tool::Pnt( TopoDS::Vertex( V ) );
|
||||
for ( exp1.Init( S, TopAbs_SOLID ); exp1.More(); exp1.Next() ) {
|
||||
BRepClass3d_SolidClassifier classifier( exp1.Current(), p, 1e-6);
|
||||
if ( classifier.State() == TopAbs_IN ) {
|
||||
thePnt1 = p;
|
||||
thePnt2 = p;
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
// End Issue 0020231
|
||||
|
||||
// skl 30.06.2008
|
||||
// additional workaround for bugs 19899, 19908 and 19910 from Mantis
|
||||
#if OCC_VERSION_LARGE < 0x07070000
|
||||
aResult = GEOMUtils::GetMinDistanceSingular(theShape1, theShape2, thePnt1, thePnt2);
|
||||
#endif
|
||||
|
||||
/*
|
||||
if (dist > -1.0) {
|
||||
return dist;
|
||||
}
|
||||
*/
|
||||
Standard_Real aResult = -1.0;
|
||||
|
||||
BRepExtrema_DistShapeShape dst (theShape1, theShape2);
|
||||
if (dst.IsDone()) {
|
||||
@ -964,7 +750,7 @@ Standard_Real GEOMUtils::GetMinDistance
|
||||
P2 = dst.PointOnShape2(i);
|
||||
|
||||
Standard_Real Dist = P1.Distance(P2);
|
||||
if (aResult < 0 || aResult > Dist) {
|
||||
if (aResult < 0 || Dist < aResult ) {
|
||||
aResult = Dist;
|
||||
thePnt1 = P1;
|
||||
thePnt2 = P2;
|
||||
|
@ -181,20 +181,6 @@ namespace GEOMUtils
|
||||
*/
|
||||
Standard_EXPORT Standard_Boolean PreciseBoundingBox(const TopoDS_Shape &theShape, Bnd_Box &theBox);
|
||||
|
||||
/*!
|
||||
* \brief Computes minumal distance between two shapes for singular cases
|
||||
* (workaround for bugs 19899, 19908 and 19910 from Mantis).
|
||||
*
|
||||
* \param aSh1 the first shape
|
||||
* \param aSh2 the second shape
|
||||
* \param Ptmp1 the output result point on the first shape
|
||||
* \param Ptmp2 the output result point on the second shape
|
||||
* \retval negative value if it is not a singular case; actual distance for singular case.
|
||||
*/
|
||||
Standard_EXPORT Standard_Real GetMinDistanceSingular(const TopoDS_Shape& aSh1,
|
||||
const TopoDS_Shape& aSh2,
|
||||
gp_Pnt& Ptmp1, gp_Pnt& Ptmp2);
|
||||
|
||||
/*!
|
||||
* \brief Computes minumal distance between two shapes.
|
||||
*
|
||||
|
@ -25,6 +25,7 @@ INCLUDE_DIRECTORIES(
|
||||
${PTHREAD_INCLUDE_DIR}
|
||||
${OpenCASCADE_INCLUDE_DIR}
|
||||
${KERNEL_INCLUDE_DIRS}
|
||||
${CommonGeomLib_INCLUDE_DIRS}
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMImpl
|
||||
${PROJECT_SOURCE_DIR}/src/GEOM
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
|
||||
@ -47,6 +48,7 @@ ENDIF(WIN32)
|
||||
|
||||
# libraries to link to
|
||||
SET(_link_LIBRARIES
|
||||
${CommonGeomLib_GeomAnaTool}
|
||||
GEOMImpl
|
||||
GEOMUtils
|
||||
SalomeIDLGEOM
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
|
||||
#include "GEOM_IMeasureOperations_i.hh"
|
||||
|
||||
@ -42,7 +43,7 @@
|
||||
*/
|
||||
static void ConvertShapeError
|
||||
(const GEOM::GEOM_IMeasureOperations::ShapeErrors &theErrorsFrom,
|
||||
std::list<GEOMImpl_IMeasureOperations::ShapeError> &theErrorsTo)
|
||||
std::list<GeomAnaTool::ShapeError> &theErrorsTo)
|
||||
{
|
||||
int aNbErr = theErrorsFrom.length();
|
||||
int i = 0;
|
||||
@ -51,7 +52,7 @@ static void ConvertShapeError
|
||||
const GEOM::GEOM_IMeasureOperations::ShapeError anErr = theErrorsFrom[i];
|
||||
const GEOM::GEOM_IMeasureOperations::ShapeErrorType aType = anErr.error;
|
||||
const GEOM::ListOfLong anIncrims = anErr.incriminated;
|
||||
GEOMImpl_IMeasureOperations::ShapeError anErrStruct;
|
||||
GeomAnaTool::ShapeError anErrStruct;
|
||||
|
||||
switch (aType) {
|
||||
case GEOM::GEOM_IMeasureOperations::InvalidPointOnCurve:
|
||||
@ -176,7 +177,7 @@ static void ConvertShapeError
|
||||
* \param theErrorsTo result errors.
|
||||
*/
|
||||
static void ConvertShapeError
|
||||
(const std::list<GEOMImpl_IMeasureOperations::ShapeError> &theErrorsFrom,
|
||||
(const std::list<GeomAnaTool::ShapeError> &theErrorsFrom,
|
||||
GEOM::GEOM_IMeasureOperations::ShapeErrors_out &theErrorsTo)
|
||||
{
|
||||
const int aNbErr = theErrorsFrom.size();
|
||||
@ -186,7 +187,7 @@ static void ConvertShapeError
|
||||
anErrArray->length(aNbErr);
|
||||
|
||||
// fill the local CORBA array with values from lists
|
||||
std::list<GEOMImpl_IMeasureOperations::ShapeError>::const_iterator
|
||||
std::list<GeomAnaTool::ShapeError>::const_iterator
|
||||
anIt = theErrorsFrom.begin();
|
||||
int i = 0;
|
||||
|
||||
@ -644,7 +645,7 @@ CORBA::Boolean GEOM_IMeasureOperations_i::CheckShape
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::list<GEOMImpl_IMeasureOperations::ShapeError> anErrList;
|
||||
std::list<GeomAnaTool::ShapeError> anErrList;
|
||||
bool isOk = GetOperations()->CheckShape(aShape, false, anErrList);
|
||||
|
||||
ConvertShapeError(anErrList, theErrors);
|
||||
@ -672,7 +673,7 @@ CORBA::Boolean GEOM_IMeasureOperations_i::CheckShapeWithGeometry
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::list<GEOMImpl_IMeasureOperations::ShapeError> anErrList;
|
||||
std::list<GeomAnaTool::ShapeError> anErrList;
|
||||
bool isOk = GetOperations()->CheckShape(aShape, true, anErrList);
|
||||
|
||||
ConvertShapeError(anErrList, theErrors);
|
||||
@ -699,7 +700,7 @@ char* GEOM_IMeasureOperations_i::PrintShapeErrors
|
||||
}
|
||||
|
||||
// Convert the errors sequence
|
||||
std::list<GEOMImpl_IMeasureOperations::ShapeError> anErrList;
|
||||
std::list<GeomAnaTool::ShapeError> anErrList;
|
||||
|
||||
ConvertShapeError(theErrors, anErrList);
|
||||
|
||||
@ -709,6 +710,66 @@ char* GEOM_IMeasureOperations_i::PrintShapeErrors
|
||||
return CORBA::string_dup(aDescr.ToCString());
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* ExtractBOPFailure
|
||||
*/
|
||||
//=============================================================================
|
||||
CORBA::Boolean GEOM_IMeasureOperations_i::ExtractBOPFailure
|
||||
(const GEOM::ListOfGO& theShapes,
|
||||
CORBA::Boolean theUseTimer,
|
||||
CORBA::Boolean theTopoOnly,
|
||||
CORBA::Boolean theRunParallel,
|
||||
CORBA::Boolean theDoExact,
|
||||
GEOM::GEOM_Object_out theResultShape,
|
||||
GEOM::GEOM_IMeasureOperations::ShapeErrors_out theErrors)
|
||||
{
|
||||
GEOM::GEOM_Object_var aNullRes;
|
||||
theResultShape = aNullRes._retn();
|
||||
|
||||
// Set the not done flag
|
||||
theErrors = new GEOM::GEOM_IMeasureOperations::ShapeErrors;
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
// Check for existing shapes
|
||||
int aNbShapes = theShapes.length();
|
||||
if (!aNbShapes)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Create the sequence of GEOM objects for the failure shapes
|
||||
Handle(TColStd_HSequenceOfTransient) aSeqShapes = new TColStd_HSequenceOfTransient;
|
||||
for (int i = 0; i < aNbShapes; i++)
|
||||
{
|
||||
Handle(::GEOM_Object) aShape = GetObjectImpl(theShapes[i]);
|
||||
if (!aShape.IsNull())
|
||||
{
|
||||
aSeqShapes->Append(aShape);
|
||||
}
|
||||
}
|
||||
|
||||
if (!aSeqShapes->Length())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Perform partition operation and check for failures
|
||||
Handle(::GEOM_Object) aResultShape;
|
||||
std::list<GeomAnaTool::ShapeError> anErrList;
|
||||
bool isOk = GetOperations()->ExtractBOPFailure
|
||||
(aSeqShapes, theUseTimer, theTopoOnly, theRunParallel,
|
||||
theDoExact, aResultShape, anErrList);
|
||||
|
||||
if (!aResultShape.IsNull()) {
|
||||
theResultShape = GetObject(aResultShape);
|
||||
}
|
||||
|
||||
ConvertShapeError(anErrList, theErrors);
|
||||
|
||||
return isOk;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* CheckSelfIntersections
|
||||
@ -1366,8 +1427,8 @@ GEOM::GEOM_IMeasureOperations::SequenceOfPairOfShape* GEOM_IMeasureOperations_i:
|
||||
std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects>::iterator anIter(aSelfInters.begin());
|
||||
for (Standard_Integer i = 0; i < aLength; i++, ++anIter)
|
||||
{
|
||||
aSeq[i].first = GetObject(Handle(::GEOM_Object)::DownCast((*anIter).first));
|
||||
aSeq[i].second = GetObject(Handle(::GEOM_Object)::DownCast((*anIter).second));
|
||||
aSeq[i].first = GetObject((*anIter).first);
|
||||
aSeq[i].second = GetObject((*anIter).second);
|
||||
}
|
||||
|
||||
return aSeq._retn();
|
||||
@ -1404,8 +1465,8 @@ GEOM::GEOM_IMeasureOperations::SequenceOfPairOfShape* GEOM_IMeasureOperations_i:
|
||||
std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects>::iterator anIter(aSelfInterf.begin());
|
||||
for (Standard_Integer i = 0; i < aLength; i++, ++anIter)
|
||||
{
|
||||
aSeq[i].first = GetObject(Handle(::GEOM_Object)::DownCast((*anIter).first));
|
||||
aSeq[i].second = GetObject(Handle(::GEOM_Object)::DownCast((*anIter).second));
|
||||
aSeq[i].first = GetObject((*anIter).first);
|
||||
aSeq[i].second = GetObject((*anIter).second);
|
||||
}
|
||||
|
||||
return aSeq._retn();
|
||||
@ -1471,8 +1532,8 @@ GEOM::GEOM_IMeasureOperations::SequenceOfPairOfShape* GEOM_IMeasureOperations_i:
|
||||
std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects>::iterator anIter(aDistantS.begin());
|
||||
for (Standard_Integer i = 0; i < aLength; i++, ++anIter)
|
||||
{
|
||||
aSeq[i].first = GetObject(Handle(::GEOM_Object)::DownCast((*anIter).first));
|
||||
aSeq[i].second = GetObject(Handle(::GEOM_Object)::DownCast((*anIter).second));
|
||||
aSeq[i].first = GetObject((*anIter).first);
|
||||
aSeq[i].second = GetObject((*anIter).second);
|
||||
}
|
||||
|
||||
return aSeq._retn();
|
||||
@ -1502,8 +1563,8 @@ GEOM::GEOM_IMeasureOperations::CheckResults* GEOM_IMeasureOperations_i::CheckCon
|
||||
for (Standard_Integer i = 0; i < aLength; i++, ++anIntIt)
|
||||
{
|
||||
aRes[i].type = (*anIntIt).TypeOfCheck;
|
||||
aRes[i].failedShapes.first = GetObject(Handle(::GEOM_Object)::DownCast((*anIntIt).FailedShapes.first));
|
||||
aRes[i].failedShapes.second = GetObject(Handle(::GEOM_Object)::DownCast((*anIntIt).FailedShapes.second));
|
||||
aRes[i].failedShapes.first = GetObject((*anIntIt).FailedShapes.first);
|
||||
aRes[i].failedShapes.second = GetObject((*anIntIt).FailedShapes.second);
|
||||
}
|
||||
|
||||
return aRes._retn();
|
||||
@ -1530,7 +1591,7 @@ CORBA::Double GEOM_IMeasureOperations_i::UpdateTolerance(GEOM::GEOM_Object_ptr t
|
||||
void GEOM_IMeasureOperations_i::ConvertToList(const GEOM::GEOM_IMeasureOperations::CheckResults& theResuts,
|
||||
std::list<GEOMImpl_IMeasureOperations::FailedChecks>& theListOfResults)
|
||||
{
|
||||
for (Standard_Integer i = 0; i < theResuts.length(); ++i)
|
||||
for (size_t i = 0; i < theResuts.length(); ++i)
|
||||
{
|
||||
GEOMImpl_IMeasureOperations::FailedChecks aCheck;
|
||||
aCheck.TypeOfCheck = theResuts[i].type;
|
||||
|
@ -98,6 +98,15 @@ class GEOM_I_EXPORT GEOM_IMeasureOperations_i :
|
||||
( GEOM::GEOM_Object_ptr theShape,
|
||||
const GEOM::GEOM_IMeasureOperations::ShapeErrors &theErrors);
|
||||
|
||||
CORBA::Boolean ExtractBOPFailure
|
||||
(const GEOM::ListOfGO& theShapes,
|
||||
CORBA::Boolean theUseTimer,
|
||||
CORBA::Boolean theTopoOnly,
|
||||
CORBA::Boolean theRunParallel,
|
||||
CORBA::Boolean theDoExact,
|
||||
GEOM::GEOM_Object_out theResultShape,
|
||||
GEOM::GEOM_IMeasureOperations::ShapeErrors_out theErrors);
|
||||
|
||||
CORBA::Boolean CheckSelfIntersections (GEOM::GEOM_Object_ptr theShape,
|
||||
CORBA::Long theCheckLevel,
|
||||
GEOM::ListOfLong_out theIntersections);
|
||||
|
@ -668,6 +668,47 @@ GEOM_ITransformOperations_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject,
|
||||
return GetObject(anObject);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* OffsetShapePartialCopy
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::GEOM_Object_ptr
|
||||
GEOM_ITransformOperations_i::OffsetShapePartialCopy (GEOM::GEOM_Object_ptr theObject,
|
||||
CORBA::Double theOffset,
|
||||
const GEOM::ListOfLong& theFacesIDs)
|
||||
{
|
||||
GEOM::GEOM_Object_var aGEOMObject;
|
||||
|
||||
//Set a not done flag
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
//Get the basic object
|
||||
Handle(::GEOM_Object) aBasicObject = GetObjectImpl(theObject);
|
||||
if (aBasicObject.IsNull()) return aGEOMObject._retn();
|
||||
|
||||
// Get faces IDs.
|
||||
Handle(TColStd_HArray1OfInteger) aFaceIDs;
|
||||
Standard_Integer aNbIDs = theFacesIDs.length();
|
||||
if (aNbIDs > 0) {
|
||||
aFaceIDs = new TColStd_HArray1OfInteger (1, aNbIDs);
|
||||
for (Standard_Integer i = 0; i < aNbIDs; i++) {
|
||||
aFaceIDs->SetValue(i + 1, theFacesIDs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// join by pipes mode is not supported in combination with partial offset
|
||||
bool aJoinByPipes = false;
|
||||
|
||||
//Create the offset shape
|
||||
Handle(::GEOM_Object) anObject =
|
||||
GetOperations()->OffsetShapeCopy(aBasicObject, theOffset, aJoinByPipes, aFaceIDs);
|
||||
if (!GetOperations()->IsDone() || anObject.IsNull())
|
||||
return aGEOMObject._retn();
|
||||
|
||||
return GetObject(anObject);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* ProjectShapeCopy
|
||||
|
@ -142,6 +142,10 @@ class GEOM_I_EXPORT GEOM_ITransformOperations_i :
|
||||
CORBA::Double theOffset,
|
||||
CORBA::Boolean theJoinByPipes);
|
||||
|
||||
GEOM::GEOM_Object_ptr OffsetShapePartialCopy (GEOM::GEOM_Object_ptr theObject,
|
||||
CORBA::Double theOffset,
|
||||
const GEOM::ListOfLong& theFacesIDs);
|
||||
|
||||
GEOM::GEOM_Object_ptr ProjectShapeCopy (GEOM::GEOM_Object_ptr theSource,
|
||||
GEOM::GEOM_Object_ptr theTarget);
|
||||
|
||||
|
@ -3113,7 +3113,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
anObj.SetParameters(Parameters)
|
||||
self._autoPublish(anObj, theName, "cylinder")
|
||||
return anObj
|
||||
|
||||
|
||||
## Create a portion of cylinder with given base point, axis, radius, height and angle.
|
||||
# @param thePnt Central point of cylinder base.
|
||||
# @param theAxis Cylinder axis.
|
||||
@ -3196,7 +3196,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
anObj.SetParameters(Parameters)
|
||||
self._autoPublish(anObj, theName, "cylinder")
|
||||
return anObj
|
||||
|
||||
|
||||
## Create a portion of cylinder with given radius, height and angle at
|
||||
# the origin of coordinate system. Axis of the cylinder
|
||||
# will be collinear to the OZ axis of the coordinate system.
|
||||
@ -3999,7 +3999,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
# for result publication in the study. Otherwise, if automatic
|
||||
# publication is switched on, default value is used for result name.
|
||||
#
|
||||
# @return New GEOM.GEOM_Object, containing the created pipe if
|
||||
# @return New GEOM.GEOM_Object, containing the created pipe if
|
||||
# \a IsGenerateGroups is not set. Otherwise it returns a
|
||||
# list of GEOM.GEOM_Object. Its first element is the created pipe, the
|
||||
# remaining ones are created groups.
|
||||
@ -4039,7 +4039,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
publication is switched on, default value is used for result name.
|
||||
|
||||
Returns:
|
||||
New GEOM.GEOM_Object, containing the created pipe if
|
||||
New GEOM.GEOM_Object, containing the created pipe if
|
||||
IsGenerateGroups is not set. Otherwise it returns a
|
||||
list of GEOM.GEOM_Object. Its first element is the created pipe, the
|
||||
remaining ones are created groups.
|
||||
@ -4076,7 +4076,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
# for result publication in the study. Otherwise, if automatic
|
||||
# publication is switched on, default value is used for result name.
|
||||
#
|
||||
# @return New GEOM.GEOM_Object, containing the created pipe if
|
||||
# @return New GEOM.GEOM_Object, containing the created pipe if
|
||||
# \a IsGenerateGroups is not set. Otherwise it returns new
|
||||
# GEOM.ListOfGO. Its first element is the created pipe, the
|
||||
# remaining ones are created groups.
|
||||
@ -4112,7 +4112,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
publication is switched on, default value is used for result name.
|
||||
|
||||
Returns:
|
||||
New GEOM.GEOM_Object, containing the created pipe if
|
||||
New GEOM.GEOM_Object, containing the created pipe if
|
||||
IsGenerateGroups is not set. Otherwise it returns new
|
||||
GEOM.ListOfGO. Its first element is the created pipe, the
|
||||
remaining ones are created groups.
|
||||
@ -4197,7 +4197,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
# for result publication in the study. Otherwise, if automatic
|
||||
# publication is switched on, default value is used for result name.
|
||||
#
|
||||
# @return New GEOM.GEOM_Object, containing the created solids if
|
||||
# @return New GEOM.GEOM_Object, containing the created solids if
|
||||
# \a IsGenerateGroups is not set. Otherwise it returns new
|
||||
# GEOM.ListOfGO. Its first element is the created solids, the
|
||||
# remaining ones are created groups.
|
||||
@ -4242,7 +4242,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
publication is switched on, default value is used for result name.
|
||||
|
||||
Returns:
|
||||
New GEOM.GEOM_Object, containing the created solids if
|
||||
New GEOM.GEOM_Object, containing the created solids if
|
||||
IsGenerateGroups is not set. Otherwise it returns new
|
||||
GEOM.ListOfGO. Its first element is the created solids, the
|
||||
remaining ones are created groups.
|
||||
@ -4320,7 +4320,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
# for result publication in the study. Otherwise, if automatic
|
||||
# publication is switched on, default value is used for result name.
|
||||
#
|
||||
# @return New GEOM.GEOM_Object, containing the created solids if
|
||||
# @return New GEOM.GEOM_Object, containing the created solids if
|
||||
# \a IsGenerateGroups is not set. Otherwise it returns new
|
||||
# GEOM.ListOfGO. Its first element is the created solids, the
|
||||
# remaining ones are created groups.
|
||||
@ -4345,7 +4345,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
publication is switched on, default value is used for result name.
|
||||
|
||||
Returns:
|
||||
New GEOM.GEOM_Object, containing the created solids if
|
||||
New GEOM.GEOM_Object, containing the created solids if
|
||||
IsGenerateGroups is not set. Otherwise it returns new
|
||||
GEOM.ListOfGO. Its first element is the created solids, the
|
||||
remaining ones are created groups.
|
||||
@ -4378,7 +4378,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
# for result publication in the study. Otherwise, if automatic
|
||||
# publication is switched on, default value is used for result name.
|
||||
#
|
||||
# @return New GEOM.GEOM_Object, containing the created pipe if
|
||||
# @return New GEOM.GEOM_Object, containing the created pipe if
|
||||
# \a IsGenerateGroups is not set. Otherwise it returns new
|
||||
# GEOM.ListOfGO. Its first element is the created pipe, the
|
||||
# remaining ones are created groups.
|
||||
@ -4408,7 +4408,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
publication is switched on, default value is used for result name.
|
||||
|
||||
Returns:
|
||||
New GEOM.GEOM_Object, containing the created pipe if
|
||||
New GEOM.GEOM_Object, containing the created pipe if
|
||||
IsGenerateGroups is not set. Otherwise it returns new
|
||||
GEOM.ListOfGO. Its first element is the created pipe, the
|
||||
remaining ones are created groups.
|
||||
@ -4433,7 +4433,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
# @param theThickness Thickness of the resulting solid
|
||||
# @param theFacesIDs the list of face IDs to be removed from the
|
||||
# result. It is ignored if \a theShape is a face or a shell.
|
||||
# It is empty by default.
|
||||
# It is empty by default.
|
||||
# @param theInside If true the thickness is applied towards inside
|
||||
# @param theName Object name; when specified, this parameter is used
|
||||
# for result publication in the study. Otherwise, if automatic
|
||||
@ -4456,7 +4456,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
theThickness Thickness of the resulting solid
|
||||
theFacesIDs the list of face IDs to be removed from the
|
||||
result. It is ignored if theShape is a face or a
|
||||
shell. It is empty by default.
|
||||
shell. It is empty by default.
|
||||
theInside If true the thickness is applied towards inside
|
||||
theName Object name; when specified, this parameter is used
|
||||
for result publication in the study. Otherwise, if automatic
|
||||
@ -4483,7 +4483,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
# @param theThickness Thickness of the resulting solid
|
||||
# @param theFacesIDs the list of face IDs to be removed from the
|
||||
# result. It is ignored if \a theShape is a face or a shell.
|
||||
# It is empty by default.
|
||||
# It is empty by default.
|
||||
# @param theInside If true the thickness is applied towards inside
|
||||
#
|
||||
# @return The modified shape
|
||||
@ -4503,7 +4503,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
theThickness Thickness of the resulting solid
|
||||
theFacesIDs the list of face IDs to be removed from the
|
||||
result. It is ignored if \a theShape is a face or
|
||||
a shell. It is empty by default.
|
||||
a shell. It is empty by default.
|
||||
theInside If true the thickness is applied towards inside
|
||||
|
||||
Returns:
|
||||
@ -4960,7 +4960,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
RaiseIfFailed("MakeFaceFromSurface", self.ShapesOp)
|
||||
self._autoPublish(anObj, theName, "face")
|
||||
return anObj
|
||||
|
||||
|
||||
## Create a non-planar face from a list of closed edges and a list of vertices.
|
||||
# @param theEdges list of Edges(must be closed but not nesessarily belong to the same plane).
|
||||
# @param theVertices list of vertices through which the result face must pass.
|
||||
@ -4993,7 +4993,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
RaiseIfFailed("MakeWrappedFace", self.ShapesOp)
|
||||
self._autoPublish(anObj, theName, "face")
|
||||
return anObj
|
||||
|
||||
|
||||
## Create a face from a set of edges with the given constraints.
|
||||
# @param theConstraints List of edges and constraint faces (as a sequence of a Edge + Face couples):
|
||||
# - edges should form a closed wire;
|
||||
@ -5002,9 +5002,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
# @param theName Object name; when specified, this parameter is used
|
||||
# for result publication in the study. Otherwise, if automatic
|
||||
# publication is switched on, default value is used for result name.
|
||||
#
|
||||
#
|
||||
# @return New GEOM.GEOM_Object, containing the created face.
|
||||
#
|
||||
#
|
||||
# @ref tui_creation_face "Example"
|
||||
@ManageTransactions("ShapesOp")
|
||||
def MakeFaceWithConstraints(self, theConstraints, theName=None):
|
||||
@ -5123,7 +5123,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
RaiseIfFailed("MakeCompound", self.ShapesOp)
|
||||
self._autoPublish(anObj, theName, "compound")
|
||||
return anObj
|
||||
|
||||
|
||||
## Create a solid (or solids) from the set of faces and/or shells.
|
||||
# @param theFacesOrShells List of faces and/or shells.
|
||||
# @param isIntersect If TRUE, forces performing intersections
|
||||
@ -9623,6 +9623,51 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
self._autoPublish(anObj, theName, "offset")
|
||||
return anObj
|
||||
|
||||
## Create new object as partial offset of the given one.
|
||||
# Only indexed faces are offset, others keep they original location.
|
||||
# Gap between adjacent offset surfaces is filled
|
||||
# by extending and intersecting them.
|
||||
# @param theObject The base object for the offset.
|
||||
# @param theOffset Offset value.
|
||||
# @param theFacesIDs The list of face IDs indicating faces to be offset.
|
||||
# @param theName Object name; when specified, this parameter is used
|
||||
# for result publication in the study. Otherwise, if automatic
|
||||
# publication is switched on, default value is used for result name.
|
||||
#
|
||||
# @return New GEOM.GEOM_Object, containing the offset object.
|
||||
#
|
||||
# @ref tui_offset "Example"
|
||||
@ManageTransactions("TrsfOp")
|
||||
def MakeOffsetPartial(self, theObject, theOffset, theFacesIDs, theName=None):
|
||||
"""
|
||||
Create new object as partial offset of the given one.
|
||||
Only indexed faces are offset, others keep they original location.
|
||||
Gap between adjacent offset surfaces is filled
|
||||
by extending and intersecting them.
|
||||
|
||||
Parameters:
|
||||
theObject The base object for the offset.
|
||||
theOffset Offset value.
|
||||
theFacesIDs The list of face IDs indicating faces to be offset.
|
||||
theName Object name; when specified, this parameter is used
|
||||
for result publication in the study. Otherwise, if automatic
|
||||
publication is switched on, default value is used for result name.
|
||||
|
||||
Returns:
|
||||
New GEOM.GEOM_Object, containing the offset object.
|
||||
|
||||
Example of usage:
|
||||
box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
|
||||
# create a new object from the box, offsetting its top and front faces
|
||||
offset = geompy.MakeOffsetPartial(box, 70., [13, 33])
|
||||
"""
|
||||
theOffset, Parameters = ParseParameters(theOffset)
|
||||
anObj = self.TrsfOp.OffsetShapePartialCopy(theObject, theOffset, theFacesIDs)
|
||||
RaiseIfFailed("OffsetShapePartialCopy", self.TrsfOp)
|
||||
anObj.SetParameters(Parameters)
|
||||
self._autoPublish(anObj, theName, "offset")
|
||||
return anObj
|
||||
|
||||
## Create new object as projection of the given one on another.
|
||||
# @param theSource The source object for the projection. It can be a point, edge or wire.
|
||||
# Edge and wire are acceptable if @a theTarget is a face.
|
||||
@ -11937,6 +11982,56 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
|
||||
"""
|
||||
return self.MeasuOp.CheckBOPArguments(theShape)
|
||||
|
||||
|
||||
## Performs general fuse BOP on the given list of shapes
|
||||
# and extracts CheckShape information from its invalid result.
|
||||
# @param theShapes List of shapes for the BOP.
|
||||
# @param theTimer If True, the execution time of the operation is measured.
|
||||
# @param theTopo If True, only the topological entities will be checked.
|
||||
# @param theParallel If True, the operation will be executed in parallel.
|
||||
# @param theExact If True, an exact check will be performed.
|
||||
# @param theVerbose If True, prints execution errors and resulting shape errors.
|
||||
# @param theName Object name; when specified, this parameter is used
|
||||
# for result publication in the study. Otherwise, if automatic
|
||||
# publication is switched on, default value is used for result name.
|
||||
# @return (isValid, shapeResult, listOfErrors), where
|
||||
# isValid - a boolean value (whether result shape is valid or not),
|
||||
# shapeResult - the result shape itself as GEOM::Object,
|
||||
# listOfErrors - the list of GEOM.GEOM_IMeasureOperations.ShapeError.
|
||||
def ExtractBOPFailure(self, theShapes, theTimer=False, theTopo=False, theParallel=False, theExact=False, theVerbose=False, theName=None):
|
||||
"""
|
||||
Performs general fuse BOP on the given list of shapes
|
||||
and extracts CheckShape information from its invalid result.
|
||||
|
||||
Parameters:
|
||||
theShapes List of shapes for the BOP.
|
||||
theTimer If True, the time of the operation is measured.
|
||||
theTopo If True, only the topological entities will be checked.
|
||||
theParallel If True, the operation will be executed in parallel.
|
||||
theExact If True, an exact check will be performed.
|
||||
theVerbose If True, prints execution errors and resulting shape errors.
|
||||
theName Object name; when specified, this parameter is used
|
||||
for result publication in the study. Otherwise, if automatic
|
||||
publication is switched on, default value is used for result name.
|
||||
|
||||
Returns:
|
||||
(isValid, shapeResult, listOfErrors), where
|
||||
isValid - a boolean value (whether result shape is valid or not),
|
||||
shapeResult - the result shape itself as GEOM::Object,
|
||||
listOfErrors - the list of GEOM.GEOM_IMeasureOperations.ShapeError.
|
||||
"""
|
||||
(IsValid, ShapeRes, ShapeErrors) = self.MeasuOp.ExtractBOPFailure(theShapes, theTimer, theTopo, theParallel, theExact)
|
||||
if theVerbose:
|
||||
if not self.MeasuOp.IsDone():
|
||||
print("== ExtractBOPFailure execution trace:")
|
||||
print(self.MeasuOp.GetErrorCode())
|
||||
if not IsValid:
|
||||
print("== ExtractBOPFailure result errors:")
|
||||
self.PrintShapeErrors(ShapeRes, ShapeErrors)
|
||||
if ShapeRes:
|
||||
self._autoPublish(ShapeRes, theName, "InvalidBOPResult")
|
||||
return (IsValid, ShapeRes, ShapeErrors)
|
||||
|
||||
## Detect intersections of the given shapes with algorithm based on mesh intersections.
|
||||
# @param theShape1 First source object
|
||||
# @param theShape2 Second source object
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "GEOM_Swig_LocalSelector.h"
|
||||
#include "GEOMGUI_OCCSelector.h"
|
||||
#include "OCCViewer_ViewManager.h"
|
||||
#include "GEOMBase.h"
|
||||
|
||||
#include <SUIT_Desktop.h>
|
||||
#include <SUIT_Session.h>
|
||||
@ -430,6 +431,19 @@ void GEOM_Swig::setNameMode( const char* theEntry, bool theOn, bool theUpdateVie
|
||||
*/
|
||||
void GEOM_Swig::setColor( const char* theEntry, int theRed, int theGreen, int theBlue, bool theUpdateViewer )
|
||||
{
|
||||
// Update geom object color
|
||||
GEOM::GEOM_Object_var GeomObject = GEOMBase::GetObjectFromEntry(theEntry);
|
||||
if (!CORBA::is_nil(GeomObject))
|
||||
{
|
||||
SALOMEDS::Color aSColor;
|
||||
aSColor.R = theRed / 255.0;
|
||||
aSColor.G = theGreen / 255.0;
|
||||
aSColor.B = theBlue / 255.0;
|
||||
|
||||
GeomObject->SetColor(aSColor);
|
||||
}
|
||||
|
||||
// Update a color property stored in LightApp_Study view manager map
|
||||
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Color ),
|
||||
QColor( theRed, theGreen, theBlue ), theUpdateViewer ) );
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ ENDIF()
|
||||
# additional include directories
|
||||
INCLUDE_DIRECTORIES(
|
||||
${OpenCASCADE_INCLUDE_DIR}
|
||||
${CommonGeomLib_INCLUDE_DIRS}
|
||||
${KERNEL_INCLUDE_DIRS}
|
||||
${PROJECT_BINARY_DIR}/idl
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
|
||||
|
@ -26,6 +26,7 @@ ENDIF()
|
||||
# additional include directories
|
||||
INCLUDE_DIRECTORIES(
|
||||
${OpenCASCADE_INCLUDE_DIR}
|
||||
${CommonGeomLib_INCLUDE_DIRS}
|
||||
${KERNEL_INCLUDE_DIRS}
|
||||
${PROJECT_BINARY_DIR}/idl
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
|
||||
|
@ -26,6 +26,7 @@ ENDIF()
|
||||
# additional include directories
|
||||
INCLUDE_DIRECTORIES(
|
||||
${OpenCASCADE_INCLUDE_DIR}
|
||||
${CommonGeomLib_INCLUDE_DIRS}
|
||||
${KERNEL_INCLUDE_DIRS}
|
||||
${PROJECT_BINARY_DIR}/idl
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
|
||||
|
@ -35,6 +35,9 @@
|
||||
#include <SalomeApp_Application.h>
|
||||
#include <LightApp_SelectionMgr.h>
|
||||
|
||||
#include <TopExp.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
|
||||
//=================================================================================
|
||||
// class : TransformationGUI_OffsetDlg()
|
||||
// purpose : Constructs a TransformationGUI_OffsetDlg which is a child of 'parent', with the
|
||||
@ -42,31 +45,43 @@
|
||||
// The dialog will by default be modeless, unless you set 'modal' to
|
||||
// TRUE to construct a modal dialog.
|
||||
//=================================================================================
|
||||
TransformationGUI_OffsetDlg::TransformationGUI_OffsetDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||
TransformationGUI_OffsetDlg::TransformationGUI_OffsetDlg
|
||||
(GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl)
|
||||
: GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl)
|
||||
{
|
||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_OFFSET" ) ) );
|
||||
QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
||||
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
|
||||
QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
|
||||
QPixmap image1 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_OFFSET")));
|
||||
QPixmap image2 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_OFFSET_PARTIAL")));
|
||||
|
||||
setWindowTitle( tr( "GEOM_OFFSET_TITLE" ) );
|
||||
setWindowTitle(tr("GEOM_OFFSET_TITLE"));
|
||||
|
||||
/***************************************************************/
|
||||
mainFrame()->GroupConstructors->setTitle( tr( "GEOM_OFFSET" ) );
|
||||
mainFrame()->RadioButton1->setIcon( image0 );
|
||||
mainFrame()->RadioButton2->setAttribute( Qt::WA_DeleteOnClose );
|
||||
mainFrame()->RadioButton2->close();
|
||||
mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
||||
mainFrame()->GroupConstructors->setTitle(tr("GEOM_OFFSET"));
|
||||
mainFrame()->RadioButton1->setIcon(image1);
|
||||
mainFrame()->RadioButton2->setIcon(image2);
|
||||
mainFrame()->RadioButton1->setToolTip(tr("TOOLTIP_OFFSET"));
|
||||
mainFrame()->RadioButton2->setToolTip(tr("TOOLTIP_OFFSET_PARTIAL"));
|
||||
mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
|
||||
mainFrame()->RadioButton3->close();
|
||||
mainFrame()->RadioButton1->setChecked(true);
|
||||
|
||||
GroupPoints = new DlgRef_2Sel1Spin2Check( centralWidget() );
|
||||
|
||||
GroupPoints = new DlgRef_1Sel1Spin1Check( centralWidget() );
|
||||
GroupPoints->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
|
||||
|
||||
GroupPoints->TextLabel1->setText( tr( "GEOM_OBJECTS" ) );
|
||||
GroupPoints->TextLabel2->setText( tr( "GEOM_OFFSET" ) );
|
||||
GroupPoints->TextLabel2->setText( tr( "GEOM_FACES" ) );
|
||||
GroupPoints->TextLabel3->setText( tr( "GEOM_OFFSET" ) );
|
||||
|
||||
GroupPoints->PushButton1->setIcon( image0 );
|
||||
GroupPoints->PushButton2->setIcon( image0 );
|
||||
|
||||
GroupPoints->CheckButton1->setText( tr( "GEOM_JOIN_BY_PIPES" ) );
|
||||
GroupPoints->CheckButton1->setChecked( true );
|
||||
|
||||
GroupPoints->PushButton1->setIcon( image1 );
|
||||
GroupPoints->CheckButton2->setAttribute( Qt::WA_DeleteOnClose );
|
||||
GroupPoints->CheckButton2->close();
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||
@ -99,33 +114,76 @@ void TransformationGUI_OffsetDlg::Init()
|
||||
/* init variables */
|
||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||
GroupPoints->LineEdit1->setReadOnly( true );
|
||||
GroupPoints->LineEdit2->setReadOnly( true );
|
||||
|
||||
myObjects.clear();
|
||||
|
||||
/* Get setting of step value from file configuration */
|
||||
double step = 1;
|
||||
myFaces.clear();
|
||||
|
||||
/* min, max, step and decimals for spin boxes & initial values */
|
||||
double step = 1;
|
||||
initSpinBox( GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
|
||||
GroupPoints->SpinBox_DX->setValue( 1e-05 );
|
||||
|
||||
mainFrame()->GroupBoxPublish->show();
|
||||
|
||||
/* signals and slots connections */
|
||||
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||
connect(this, SIGNAL(constructorsClicked(int)),
|
||||
this, SLOT(ConstructorsClicked(int)));
|
||||
|
||||
connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
connect(GroupPoints->PushButton1, SIGNAL(clicked()),
|
||||
this, SLOT(SetEditCurrentArgument()));
|
||||
connect(GroupPoints->PushButton2, SIGNAL(clicked()),
|
||||
this, SLOT(SetEditCurrentArgument()));
|
||||
|
||||
connect( GroupPoints->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) );
|
||||
connect( GroupPoints->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( JoinModeChanged() ) );
|
||||
connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)),
|
||||
this, SLOT(ValueChangedInSpinBox()));
|
||||
connect(GroupPoints->CheckButton1, SIGNAL(toggled(bool)),
|
||||
this, SLOT(JoinModeChanged()));
|
||||
|
||||
initName( tr( "GEOM_OFFSET" ) );
|
||||
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
|
||||
this, SLOT(SelectionIntoArgument()));
|
||||
|
||||
globalSelection( GEOM_ALLSHAPES );
|
||||
resize(100,100);
|
||||
initName(tr("GEOM_OFFSET"));
|
||||
|
||||
ConstructorsClicked(0);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
// function : ConstructorsClicked()
|
||||
// purpose : Radio button management
|
||||
//==============================================================================
|
||||
void TransformationGUI_OffsetDlg::ConstructorsClicked (int constructorId)
|
||||
{
|
||||
switch (constructorId) {
|
||||
case 0:
|
||||
// disable faces selection
|
||||
GroupPoints->TextLabel2->hide();
|
||||
GroupPoints->PushButton2->hide();
|
||||
GroupPoints->LineEdit2->hide();
|
||||
|
||||
// enable joint type
|
||||
GroupPoints->CheckButton1->show();
|
||||
break;
|
||||
case 1:
|
||||
// enable faces selection
|
||||
GroupPoints->TextLabel2->show();
|
||||
GroupPoints->PushButton2->show();
|
||||
GroupPoints->LineEdit2->show();
|
||||
|
||||
// disable joint type
|
||||
GroupPoints->CheckButton1->hide();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
qApp->processEvents();
|
||||
updateGeometry();
|
||||
resize(minimumSizeHint());
|
||||
|
||||
GroupPoints->PushButton1->click();
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
|
||||
@ -152,6 +210,10 @@ bool TransformationGUI_OffsetDlg::ClickOnApply()
|
||||
return false;
|
||||
|
||||
initName();
|
||||
|
||||
// activate selection and connect selection manager
|
||||
ConstructorsClicked(getConstructorId());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -162,13 +224,27 @@ bool TransformationGUI_OffsetDlg::ClickOnApply()
|
||||
//=================================================================================
|
||||
void TransformationGUI_OffsetDlg::SelectionIntoArgument()
|
||||
{
|
||||
myObjects = getSelected( TopAbs_SHAPE, -1 );
|
||||
if ( !myObjects.isEmpty() ) {
|
||||
QString aName = myObjects.count() > 1 ? QString( "%1_objects").arg( myObjects.count() ) : GEOMBase::GetName( myObjects[0].get() );
|
||||
myEditCurrentArgument->setText( aName );
|
||||
myEditCurrentArgument->setText("");
|
||||
|
||||
if (myEditCurrentArgument == GroupPoints->LineEdit1) {
|
||||
if (getConstructorId() == 0) {
|
||||
myObjects = getSelected( TopAbs_SHAPE, -1 );
|
||||
myEditCurrentArgument->setText(GEOMBase::GetName(myObjects));
|
||||
}
|
||||
else if (getConstructorId() == 1) {
|
||||
myFaces.clear();
|
||||
GroupPoints->LineEdit2->setText("");
|
||||
myObjects = getSelected(TopAbs_SHAPE, 1); // only one object allowed
|
||||
if (!myObjects.isEmpty()) {
|
||||
myEditCurrentArgument->setText(GEOMBase::GetName(myObjects[0].get()));
|
||||
GroupPoints->PushButton2->click();
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
myEditCurrentArgument->setText("");
|
||||
else if (myEditCurrentArgument == GroupPoints->LineEdit2) {
|
||||
myFaces.clear();
|
||||
myFaces = getSelected(TopAbs_FACE, -1);
|
||||
myEditCurrentArgument->setText(GEOMBase::GetName(myFaces));
|
||||
}
|
||||
|
||||
processPreview();
|
||||
@ -184,11 +260,20 @@ void TransformationGUI_OffsetDlg::SetEditCurrentArgument()
|
||||
QPushButton* send = (QPushButton*)sender();
|
||||
|
||||
if ( send == GroupPoints->PushButton1 ) {
|
||||
GroupPoints->PushButton1->setDown(true);
|
||||
GroupPoints->PushButton2->setDown(false);
|
||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||
myEditCurrentArgument->setFocus();
|
||||
SelectionIntoArgument();
|
||||
globalSelection(GEOM_ALLSHAPES);
|
||||
}
|
||||
else if (send == GroupPoints->PushButton2) {
|
||||
GroupPoints->PushButton1->setDown(false);
|
||||
myEditCurrentArgument = GroupPoints->LineEdit2;
|
||||
globalSelection(); // close local contexts, if any
|
||||
if (myObjects.size() > 0)
|
||||
localSelection(myObjects[0].get(), TopAbs_FACE);
|
||||
}
|
||||
|
||||
myEditCurrentArgument->setFocus();
|
||||
send->setDown(true);
|
||||
}
|
||||
|
||||
|
||||
@ -210,11 +295,11 @@ void TransformationGUI_OffsetDlg::enterEvent( QEvent* )
|
||||
void TransformationGUI_OffsetDlg::ActivateThisDialog()
|
||||
{
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
|
||||
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
globalSelection( GEOM_ALLSHAPES );
|
||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||
myEditCurrentArgument->setFocus();
|
||||
|
||||
ConstructorsClicked(getConstructorId());
|
||||
}
|
||||
|
||||
|
||||
@ -243,14 +328,27 @@ GEOM::GEOM_IOperations_ptr TransformationGUI_OffsetDlg::createOperation()
|
||||
//=================================================================================
|
||||
bool TransformationGUI_OffsetDlg::isValid( QString& msg )
|
||||
{
|
||||
bool ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) && !myObjects.isEmpty();
|
||||
for ( int i = 0; i < myObjects.count() && ok; i++ ) {
|
||||
GEOM::shape_type aType = myObjects[i]->GetShapeType();
|
||||
ok = aType == GEOM::FACE || aType == GEOM::SHELL || aType == GEOM::SOLID;
|
||||
if ( !ok )
|
||||
msg = tr( "ERROR_SHAPE_TYPE" );
|
||||
bool isOk = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) && !myObjects.isEmpty();
|
||||
|
||||
if (isOk) {
|
||||
switch (getConstructorId()) {
|
||||
case 0:
|
||||
for ( int i = 0; i < myObjects.count() && isOk; i++ ) {
|
||||
GEOM::shape_type aType = myObjects[i]->GetShapeType();
|
||||
isOk = aType == GEOM::FACE || aType == GEOM::SHELL || aType == GEOM::SOLID;
|
||||
if ( !isOk )
|
||||
msg = tr( "ERROR_SHAPE_TYPE" );
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
isOk = myObjects.size() == 1 && !myFaces.isEmpty();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
|
||||
return isOk;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -263,28 +361,59 @@ bool TransformationGUI_OffsetDlg::execute( ObjectList& objects )
|
||||
|
||||
GEOM::GEOM_Object_var anObj;
|
||||
|
||||
GEOM::GEOM_ITransformOperations_var anOper = GEOM::GEOM_ITransformOperations::_narrow(getOperation());
|
||||
GEOM::GEOM_ITransformOperations_var anOper =
|
||||
GEOM::GEOM_ITransformOperations::_narrow(getOperation());
|
||||
|
||||
if ( true /*GroupPoints->CheckButton1->isChecked() || IsPreview()*/ ) {
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
|
||||
anObj = anOper->OffsetShapeCopy( myObjects[i].get(), GetOffset(), GetIsJoinByPipes() );
|
||||
if ( !anObj->_is_nil() ) {
|
||||
if(!IsPreview()) {
|
||||
if (getConstructorId() == 0) {
|
||||
for (int i = 0; i < myObjects.count(); i++) {
|
||||
anObj = anOper->OffsetShapeCopy(myObjects[i].get(), GetOffset(), GetIsJoinByPipes());
|
||||
if (!anObj->_is_nil()) {
|
||||
if (!IsPreview()) {
|
||||
anObj->SetParameters(GroupPoints->SpinBox_DX->text().toUtf8().constData());
|
||||
}
|
||||
objects.push_back( anObj._retn() );
|
||||
objects.push_back(anObj._retn());
|
||||
res = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for ( int i = 0; i < myObjects.count(); i++ ) {
|
||||
anObj = anOper->OffsetShape( myObjects[i].get(), GetOffset(), GetIsJoinByPipes() );
|
||||
if ( !anObj->_is_nil() )
|
||||
objects.push_back( anObj._retn() );
|
||||
else if (getConstructorId() == 1) {
|
||||
if (myObjects.count() == 1) {
|
||||
TopoDS_Shape aShape;
|
||||
if (GEOMBase::GetShape(myObjects[0].get(), aShape)) {
|
||||
TopTools_IndexedMapOfShape aMainMap;
|
||||
TopExp::MapShapes(aShape, aMainMap);
|
||||
|
||||
QList<int> aListIDs;
|
||||
for (int i = 0; i < myFaces.count(); i++) {
|
||||
TopoDS_Shape aFace;
|
||||
if (GEOMBase::GetShape(myFaces[i].get(), aFace)) {
|
||||
int anIndex = aMainMap.FindIndex(aFace);
|
||||
if (anIndex >= 0) {
|
||||
aListIDs << anIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GEOM::ListOfLong_var aFacesIDsList = new GEOM::ListOfLong();
|
||||
if (!aListIDs.empty()) {
|
||||
aFacesIDsList->length(aListIDs.length());
|
||||
for (int i = 0; i < aListIDs.length(); i++) {
|
||||
aFacesIDsList[i] = aListIDs[i];
|
||||
}
|
||||
}
|
||||
|
||||
anObj = anOper->OffsetShapePartialCopy
|
||||
(myObjects[0].get(), GetOffset(), aFacesIDsList);
|
||||
if (!anObj->_is_nil()) {
|
||||
if (!IsPreview()) {
|
||||
anObj->SetParameters(GroupPoints->SpinBox_DX->text().toUtf8().constData());
|
||||
}
|
||||
objects.push_back(anObj._retn());
|
||||
res = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
res = true;
|
||||
|
||||
return res;
|
||||
}
|
||||
@ -330,7 +459,6 @@ bool TransformationGUI_OffsetDlg::GetIsJoinByPipes() const
|
||||
void TransformationGUI_OffsetDlg::JoinModeChanged()
|
||||
{
|
||||
processPreview();
|
||||
//mainFrame()->GroupBoxName->setEnabled( GroupPoints->CheckButton1->isChecked() );
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
|
@ -30,14 +30,14 @@
|
||||
#include "GEOMBase_Skeleton.h"
|
||||
#include "GEOM_GenericObjPtr.h"
|
||||
|
||||
class DlgRef_1Sel1Spin1Check;
|
||||
|
||||
class DlgRef_2Sel1Spin2Check;
|
||||
|
||||
//=================================================================================
|
||||
// class : TransformationGUI_OffsetDlg
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
class TransformationGUI_OffsetDlg : public GEOMBase_Skeleton
|
||||
{
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
@ -52,24 +52,26 @@ protected:
|
||||
virtual bool execute( ObjectList& );
|
||||
virtual void restoreSubShapes( SALOMEDS::SObject_ptr );
|
||||
virtual QList<GEOM::GeomObjPtr> getSourceObjects();
|
||||
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void enterEvent( QEvent* );
|
||||
double GetOffset() const;
|
||||
bool GetIsJoinByPipes() const;
|
||||
|
||||
|
||||
private:
|
||||
QList<GEOM::GeomObjPtr> myObjects;
|
||||
|
||||
DlgRef_1Sel1Spin1Check* GroupPoints;
|
||||
|
||||
QList<GEOM::GeomObjPtr> myFaces;
|
||||
|
||||
DlgRef_2Sel1Spin2Check* GroupPoints;
|
||||
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
bool ClickOnApply();
|
||||
void ActivateThisDialog();
|
||||
void SelectionIntoArgument();
|
||||
void SetEditCurrentArgument();
|
||||
void ConstructorsClicked(int);
|
||||
void ValueChangedInSpinBox();
|
||||
void JoinModeChanged();
|
||||
};
|
||||
|
@ -26,6 +26,7 @@ ENDIF()
|
||||
# additional include directories
|
||||
INCLUDE_DIRECTORIES(
|
||||
${OpenCASCADE_INCLUDE_DIR}
|
||||
${CommonGeomLib_INCLUDE_DIRS}
|
||||
${KERNEL_INCLUDE_DIRS}
|
||||
${PROJECT_BINARY_DIR}/idl
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
|
||||
|
@ -26,6 +26,7 @@ ENDIF()
|
||||
# additional include directories
|
||||
INCLUDE_DIRECTORIES(
|
||||
${OpenCASCADE_INCLUDE_DIR}
|
||||
${CommonGeomLib_INCLUDE_DIRS}
|
||||
${KERNEL_INCLUDE_DIRS}
|
||||
${PROJECT_BINARY_DIR}/idl
|
||||
${PROJECT_SOURCE_DIR}/src/GEOMAlgo
|
||||
|
388
test/data/ExtractBOPFailure_compound1.brep
Normal file
388
test/data/ExtractBOPFailure_compound1.brep
Normal file
@ -0,0 +1,388 @@
|
||||
DBRep_DrawableShape
|
||||
|
||||
CASCADE Topology V3, (c) Open Cascade
|
||||
Locations 2
|
||||
1
|
||||
1 0 0 -7.567891
|
||||
0 1 0 -4.341567
|
||||
0 0 1 -6.123456
|
||||
2 1 -1 0
|
||||
Curve2ds 20
|
||||
1 5.2296342291324773 3.3322056701893321 -0.019393351731739859 -0.99981193126938084
|
||||
1 4.1177697329478473 -7.9576022773085979 0.74914523473738692 0.66240577991912586
|
||||
2 7.6778616423679917 5.5784416873630649 1.0327963672288199e-28 1 -1 1.0327963672288199e-28 13.996383126259545
|
||||
1 1.2238101114815878 -6.1633524984935972 -0.18530824692372716 -0.98268044328868942
|
||||
1 1.2235485004159372 -2.2110670843958085 6.6192351428950508e-05 -0.99999999780928628
|
||||
1 -0.76442260860377154 0.24528750719338177 0.62910141048581703 -0.77732323735030318
|
||||
1 -3.7293599477436921 -2.8998812708177271 0.68595070867481067 0.72764800918337236
|
||||
2 8.2082756373678425 6.9866174666722882 1 -5.2064482382916161e-32 5.2064482382916161e-32 1 15.500000020945576
|
||||
1 -5.5702632964129428 -0.1128096580751663 0.62013158110931121 0.78449781523651529
|
||||
1 -1.2787866923231981 5.3161253012195147 0.66335395303032052 -0.74830577506728313
|
||||
1 6.2831853071795862 -27.994292694933499 -1 0
|
||||
1 2.2305029134341128 -29.744292694933499 0 1
|
||||
1 1.1682335865018412e-13 -26.364292694933447 1 0
|
||||
1 2.2737127428085482 -25.744292694933499 0 -1
|
||||
1 1.1577157318429796e-13 -25.744292694933449 1 0
|
||||
1 2.2305029134341128 -25.744292694933399 0 1
|
||||
1 6.2831853071795862 -24.494292694933499 -1 0
|
||||
7 0 0 5 6 2 2.66538798008808 -22.744292694933499 2.6653879800880054 -23.468292694933499 2.6653879800879281 -24.192292694933485 2.6653879800878677 -24.916292694933531 2.6653879800877802 -25.6402926949335 2.6653879800877056 -26.3642926949335
|
||||
0 6 3.6200000000000001 6
|
||||
1 -1.5707963267948966 -26.364292694933503 1 0
|
||||
1 2.6969123268332003 -29.744292694933499 0 1
|
||||
Curves 20
|
||||
1 3.6643099095142699 2.9989666286603298 7.3799999999999901 0.99981193126938084 0.019393351731739859 0
|
||||
1 14.9541178570122 4.1108311248449603 7.3799999999999901 -0.66240577991912586 -0.74914523473738692 0
|
||||
2 1.4180738923405372 0.55073921542481585 7.3800000000004342 -2.974710134687989e-14 -1.1637659715336122e-14 -1 -1 0 2.974710134687989e-14 -3.46186642992605e-28 1 -1.1637659715336122e-14 13.996383126259545
|
||||
1 13.159868078197199 7.0047907463112198 7.3799999999999901 0.98268044328868942 0.18530824692372716 0
|
||||
1 9.2075826640994105 7.0050523573768704 7.3799999999999901 0.99999999780928628 -6.6192351428950508e-05 0
|
||||
1 6.7512280725102203 8.9930234663965791 7.3799999999999901 0.77732323735030318 -0.62910141048581703 0
|
||||
1 9.8963968505213291 11.9579608055365 7.3799999999999599 -0.72764800918337236 -0.68595070867481067 6.9864494891450316e-15
|
||||
2 0.0098981130313138266 0.020325220424965096 7.3800000000000123 -4.8764518640683504e-16 -3.985833116056589e-15 -1 0 -1 3.985833116056589e-15 -1 1.9436723328659514e-30 4.8764518640683504e-16 15.500000020945576
|
||||
1 7.1093252377787683 13.79886415420575 7.3799999999999537 -0.78449781523651529 -0.62013158110931121 2.951923868206801e-15
|
||||
1 1.6803902784840878 9.5073875501160057 7.3799999999999741 0.74830577506728313 -0.66335395303032052 1.65532199479636e-15
|
||||
2 0.048629684365062174 0.040085253947511945 5.75 -1.8938307431288352e-32 -1.4228181456116284e-32 1 -1 0 -1.8938307431288352e-32 2.6945767460408616e-64 -1 -1.4228181456116284e-32 15.447113622753015
|
||||
1 9.5159344006809405 12.245963374044599 4 0 0 1
|
||||
2 0.048629684364520642 0.040085253947925281 7.3800000000000505 -1.1682335865018412e-13 9.4687192060776203e-14 -1 -1 0 1.1682335865018412e-13 1.1061675797694924e-26 1 9.4687192060776203e-14 15.447113622753017
|
||||
1 10.0343474285764 11.8256170793334 8 0 0 -1
|
||||
2 0.048629684364520642 0.040085253947925281 8.0000000000000497 -1.1577157318429796e-13 9.3871390575314678e-14 -1 -1 0 1.1577157318429796e-13 1.0867638563901861e-26 1 9.3871390575314678e-14 15.447113622753017
|
||||
1 9.5159344006809405 12.245963374044599 8.0000000000000995 0 0 1
|
||||
2 0.048629684365062174 0.040085253947511945 9.25 -1.8938307431288352e-32 -1.4228181456116284e-32 1 -1 0 -1.8938307431288352e-32 2.6945767460408616e-64 -1 -1.4228181456116284e-32 15.447113622753015
|
||||
1 13.7771149464134 7.1211876881706102 11 -7.183940367077256e-13 1.4252564751486263e-12 -1
|
||||
2 0.048629684365860015 0.040085253945864707 7.3799999999999955 -8.9410861073054036e-15 1.7961675054224776e-14 -1 0 -1 -1.7961675054224776e-14 -1 -1.6059688329126317e-28 8.9410861073054036e-15 15.447113622753015
|
||||
1 13.9934840908598 6.6849595835271503 4 0 0 1
|
||||
Polygon3D 0
|
||||
PolygonOnTriangulations 0
|
||||
Surfaces 2
|
||||
1 6.9965155797036021 8.2286008577928076 7.3799999999999759 1.0131042642695293e-16 -3.4719227099992637e-15 -1 0 -1 3.4719227099992637e-15 -1 -3.5174197027144744e-31 -1.0131042642695293e-16
|
||||
2 0.048629684365062174 0.040085253947511945 33.744292694933499 -1.8938307431288352e-32 -1.4228181456116284e-32 1 -1 0 -1.8938307431288352e-32 -2.6945767460408616e-64 1 1.4228181456116284e-32 15.447113622753015
|
||||
Triangulations 0
|
||||
|
||||
TShapes 45
|
||||
Ve
|
||||
0.00100000000000355
|
||||
1.33968696229361 -1.24089670248843 1.25654399999999
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ve
|
||||
0.001
|
||||
6.582955015073 -1.13919303363718 1.25654399999999
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.001 1 1 0
|
||||
1 1 0 5.2442543330348 10.4885086660696
|
||||
2 1 1 0 5.2442543330348 10.4885086660696
|
||||
0
|
||||
|
||||
0101000
|
||||
+45 2 -44 2 *
|
||||
Ve
|
||||
0.001
|
||||
7.3862268570122 -0.23073587515504 1.25654399999999
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.001 1 1 0
|
||||
1 2 0 0 1.21265826218677
|
||||
2 2 1 0 0 1.21265826218677
|
||||
0
|
||||
|
||||
0101000
|
||||
+42 2 -44 2 *
|
||||
Ve
|
||||
0.001
|
||||
6.2085640030866 2.77949617536757 1.25654399999999
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.001 1 1 0
|
||||
1 3 0 2.65294738721352 2.88440884989702
|
||||
2 3 1 0 2.65294738721352 2.88440884989702
|
||||
0
|
||||
|
||||
0101000
|
||||
+40 2 -42 2 *
|
||||
Ve
|
||||
0.001
|
||||
5.5919770781972 2.66322374631122 1.25654399999999
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.001 1 1 0
|
||||
1 4 0 0 0.627454152670321
|
||||
2 4 1 0 0 0.627454152670321
|
||||
0
|
||||
|
||||
0101000
|
||||
+38 2 -40 2 *
|
||||
Ve
|
||||
0.001
|
||||
1.63969166409941 2.66348535737687 1.25654399999999
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.001 1 1 0
|
||||
1 5 0 0 3.95228542275611
|
||||
2 5 1 0 0 3.95228542275611
|
||||
0
|
||||
|
||||
0101000
|
||||
+36 2 -38 2 *
|
||||
Ve
|
||||
0.001
|
||||
-0.81666292748978 4.65145646639658 1.25654399999999
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.001 1 1 0
|
||||
1 6 0 0 3.16001693190374
|
||||
2 6 1 0 0 3.16001693190374
|
||||
0
|
||||
|
||||
0101000
|
||||
+34 2 -36 2 *
|
||||
Ve
|
||||
0.001
|
||||
2.32850585052133 7.6163938055365 1.25654399999996
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.001 1 1 0
|
||||
1 7 0 0 4.32237666882492
|
||||
2 7 1 0 0 4.32237666882492
|
||||
0
|
||||
|
||||
0101000
|
||||
+32 2 -34 2 *
|
||||
Ve
|
||||
0.00100000000000266
|
||||
-0.45856576222123 9.4572971542058 1.25654399999995
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.001 1 1 0
|
||||
1 8 0 3.61736770330259 3.83328128895929
|
||||
2 8 1 0 3.61736770330259 3.83328128895929
|
||||
0
|
||||
|
||||
0101000
|
||||
+30 2 -32 2 *
|
||||
Ve
|
||||
0.00100000000000355
|
||||
-5.88750072151591 5.16582055011601 1.25654399999997
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.00100000000000266 1 1 0
|
||||
1 9 0 0 6.92026778641561
|
||||
2 9 1 0 0 6.92026778641561
|
||||
0
|
||||
|
||||
0101000
|
||||
+30 2 -28 2 *
|
||||
Ed
|
||||
0.00100000000000355 1 1 0
|
||||
1 10 0 0 9.65806749675251
|
||||
2 10 1 0 0 9.65806749675251
|
||||
0
|
||||
|
||||
0101000
|
||||
+28 2 -45 2 *
|
||||
Wi
|
||||
|
||||
0101100
|
||||
-43 0 +41 0 +39 0 +37 0 +35 0 +33 0 +31 0 +29 0 -27 0 -26 0
|
||||
*
|
||||
Fa
|
||||
0 0.001 1 0
|
||||
|
||||
0111000
|
||||
+25 0 *
|
||||
Ve
|
||||
0.001100100001
|
||||
6.4255930908598 2.34339258352715 -0.373456
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ve
|
||||
0.001100100001
|
||||
1.94804340068094 7.9043963740446 -0.373456
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.0011 1 1 0
|
||||
1 11 0 3.58627298034639 4.05268239374548
|
||||
2 11 2 0 3.58627298034639 4.05268239374548
|
||||
0
|
||||
|
||||
0101000
|
||||
+23 2 -22 2 *
|
||||
Ve
|
||||
0.0011
|
||||
1.94804340068094 7.9043963740446 1.2565440000001
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.0011 1 1 0
|
||||
1 12 0 1.75 3.3800000000001
|
||||
2 12 2 0 1.75 3.3800000000001
|
||||
0
|
||||
|
||||
0101000
|
||||
+22 2 -20 2 *
|
||||
Ve
|
||||
0.0011
|
||||
2.4664564285764 7.4840500793334 1.256544
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.0011 1 1 0
|
||||
1 13 0 2.23050291343416 2.27371274280859
|
||||
2 13 2 0 2.23050291343416 2.27371274280859
|
||||
0
|
||||
|
||||
0101000
|
||||
+20 2 -18 2 *
|
||||
Ve
|
||||
0.0011
|
||||
2.4664564285764 7.4840500793334 1.876544
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.0011 1 1 0
|
||||
1 14 0 0 0.62
|
||||
2 14 2 0 0 0.62
|
||||
0
|
||||
|
||||
0101000
|
||||
+16 2 -18 2 *
|
||||
Ve
|
||||
0.0011
|
||||
1.94804340068094 7.9043963740446 1.8765440000001
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.0011 1 1 0
|
||||
1 15 0 2.23050291343416 2.27371274280859
|
||||
2 15 2 0 2.23050291343416 2.27371274280859
|
||||
0
|
||||
|
||||
0101000
|
||||
+14 2 -16 2 *
|
||||
Ve
|
||||
0.001100100001
|
||||
1.94804340068094 7.9043963740446 3.126544
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.0011 1 1 0
|
||||
1 16 0 0 1.2499999999999
|
||||
2 16 2 0 0 1.2499999999999
|
||||
0
|
||||
|
||||
0101000
|
||||
+14 2 -12 2 *
|
||||
Ve
|
||||
0.001100100001
|
||||
6.2092239464121 2.7796206881731 3.126544
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.0011 1 1 0
|
||||
1 17 0 3.61779732709169 4.05268239374548
|
||||
2 17 2 0 3.61779732709169 4.05268239374548
|
||||
0
|
||||
|
||||
0101000
|
||||
+10 2 -12 2 *
|
||||
Ve
|
||||
0.0011
|
||||
6.2092239464108 2.77962068817577 1.256544
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.0011 1 1 0
|
||||
1 18 0 1.75 3.62
|
||||
2 18 2 0 1.75 3.62
|
||||
0
|
||||
|
||||
0101000
|
||||
+10 2 -8 2 *
|
||||
Ve
|
||||
0.0011
|
||||
6.4255930908598 2.34339258352715 1.25654399999999
|
||||
0 0
|
||||
|
||||
0101101
|
||||
*
|
||||
Ed
|
||||
0.0011 1 1 0
|
||||
1 19 0 4.23618430688248 4.26770865362798
|
||||
2 19 2 0 4.23618430688248 4.26770865362798
|
||||
0
|
||||
|
||||
0101000
|
||||
+8 2 -6 2 *
|
||||
Ed
|
||||
0.0011 1 1 0
|
||||
1 20 0 1.75 3.37999999999999
|
||||
2 20 2 0 1.75 3.37999999999999
|
||||
0
|
||||
|
||||
0101000
|
||||
+23 2 -6 2 *
|
||||
Wi
|
||||
|
||||
0101100
|
||||
-21 0 -19 0 -17 0 +15 0 +13 0 -11 0 +9 0 -7 0 -5 0 +4 0
|
||||
*
|
||||
Fa
|
||||
0 0.0011 2 0
|
||||
|
||||
0111000
|
||||
+3 0 *
|
||||
Co
|
||||
|
||||
1100000
|
||||
+24 0 -2 0 *
|
||||
|
||||
+1 1
|
||||
0
|
||||
|
85
test/test_ExtractBOPFailure.py
Executable file
85
test/test_ExtractBOPFailure.py
Executable file
@ -0,0 +1,85 @@
|
||||
# Copyright (C) 2024 CEA, EDF
|
||||
#
|
||||
# This library is free software; you can 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
|
||||
#
|
||||
|
||||
# Test ExtractBOPFailure method
|
||||
|
||||
from inspect import getfile
|
||||
from os.path import abspath, dirname, join
|
||||
import salome
|
||||
from salome.geom import geomBuilder
|
||||
geompy = geomBuilder.New()
|
||||
|
||||
data_dir = abspath(join(dirname(getfile(lambda: None)), 'data'))
|
||||
|
||||
### Case 1: Invalid face with (3) intersecting wires
|
||||
Shapes_1 = geompy.ImportBREP(join(data_dir, "ExtractBOPFailure_compound1.brep"))
|
||||
geompy.addToStudy( Shapes_1, 'CompoundPostIdealisation' )
|
||||
|
||||
try :
|
||||
Partition_1 = geompy.MakePartition([Shapes_1],[])
|
||||
except :
|
||||
print("EXCEPTION: Partition problem")
|
||||
|
||||
print("Case 1: Invalid face with (3) intersecting wires")
|
||||
(IsValid, GFRes, ShapeErrors) = geompy.ExtractBOPFailure([Shapes_1], theTimer=True, theVerbose=True)
|
||||
|
||||
assert GFRes is not None, "Resulting shape expected in Case #1"
|
||||
geompy.addToStudy( GFRes, 'GFRes_Case_1' )
|
||||
assert not IsValid, "IsValid == False expected in Case #1"
|
||||
|
||||
assert len(ShapeErrors) == 1, "One error expected"
|
||||
list_ids = ShapeErrors[0].incriminated
|
||||
assert len(list_ids) == 1, "One incriminated shape expected"
|
||||
|
||||
[Face_1] = geompy.SubShapes(GFRes, list_ids)
|
||||
geompy.addToStudyInFather( GFRes, Face_1, 'Bad face' )
|
||||
|
||||
list_wires = geompy.ExtractShapes(Face_1, geompy.ShapeType["WIRE"], True, "Wire")
|
||||
|
||||
assert len(list_wires) == 3, "Three wires expected"
|
||||
|
||||
### Case 2: Empty list of input shapes
|
||||
print("Case 2: Empty list of input shapes")
|
||||
(IsValid, GFRes, ShapeErrors) = geompy.ExtractBOPFailure([], theVerbose=True)
|
||||
assert GFRes is None, "General Fuse result is NOT expected on empty list of shapes"
|
||||
assert not IsValid, "IsValid == False expected on empty list of shapes"
|
||||
assert len(ShapeErrors) == 0, "ExtractBOPFailure should report no errors on empty list of shapes"
|
||||
|
||||
### Case 3: One shape in list, and it is not a COMPOUND
|
||||
print("Case 3: One shape in list, and it is not a COMPOUND")
|
||||
(IsValid, GFRes, ShapeErrors) = geompy.ExtractBOPFailure([geompy.MakeBoxDXDYDZ(10,10,10)], theVerbose=True)
|
||||
assert GFRes is None, "General Fuse result is NOT expected"
|
||||
assert not IsValid, "IsValid == False expected"
|
||||
assert len(ShapeErrors) == 0, "ExtractBOPFailure should report no errors here"
|
||||
|
||||
### Case 4: Unusual type Case (two orthogonal faces, Partition OK)
|
||||
print("Case 4: Unusual type Case (two orthogonal faces, Partition OK)")
|
||||
origin = geompy.MakeVertex(0,0,0)
|
||||
oX = geompy.MakeVectorDXDYDZ(1,0,0)
|
||||
YOZ = geompy.MakePlane(origin, oX, 5)
|
||||
oY = geompy.MakeVectorDXDYDZ(0,1,0)
|
||||
XOZ = geompy.MakePlane(origin, oY, 5)
|
||||
(IsValid, GFRes, ShapeErrors) = geompy.ExtractBOPFailure([YOZ, XOZ], theVerbose=True)
|
||||
assert GFRes is not None, "General Fuse result is expected"
|
||||
geompy.addToStudy( GFRes, 'GFRes_Case_4' )
|
||||
assert IsValid, "Valid result is expected"
|
||||
assert len(ShapeErrors) == 0, "ExtractBOPFailure should report no errors here"
|
||||
|
||||
if salome.sg.hasDesktop():
|
||||
salome.sg.updateObjBrowser()
|
27
test/test_point_cloud_on_face_cone.py
Normal file
27
test/test_point_cloud_on_face_cone.py
Normal file
@ -0,0 +1,27 @@
|
||||
# Point Cloud on Face Cone
|
||||
|
||||
from salome.geom import geomBuilder
|
||||
geompy = geomBuilder.New()
|
||||
|
||||
# Create one closed cone face
|
||||
O = geompy.MakeVertex(0, 0, 0)
|
||||
OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
|
||||
OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
|
||||
OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
|
||||
Cone_1 = geompy.MakeConeR1R2H(50, 100, 50)
|
||||
[Face_1] = geompy.SubShapes(Cone_1, [3])
|
||||
geompy.addToStudy( O, 'O' )
|
||||
geompy.addToStudy( OX, 'OX' )
|
||||
geompy.addToStudy( OY, 'OY' )
|
||||
geompy.addToStudy( OZ, 'OZ' )
|
||||
geompy.addToStudy( Cone_1, 'Cone_1' )
|
||||
geompy.addToStudyInFather( Cone_1, Face_1, 'Face_1' )
|
||||
|
||||
# Make a cloud of given number of points in range 1-30 on the cone face
|
||||
try:
|
||||
for i in range(1, 31):
|
||||
PointCloudOnFilling = geompy.MakeVertexInsideFace(Face_1, i, "PointCloudOnFilling")
|
||||
except Exception as err:
|
||||
print(err)
|
||||
# this test should not fail in case of "Improper OCCT version"
|
||||
assert("Improper OCCT version" in str(err))
|
43
test/test_set_autocolor.py
Normal file
43
test/test_set_autocolor.py
Normal file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (C) 2007-2024 CEA, EDF, 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
|
||||
#
|
||||
|
||||
# Testing of setting and getting an automatically set color
|
||||
|
||||
import salome
|
||||
salome.salome_init()
|
||||
|
||||
from salome.geom import geomBuilder
|
||||
geompy = geomBuilder.New()
|
||||
|
||||
# Create a box and extract its faces
|
||||
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
||||
faces = geompy.ExtractShapes(Box_1, geompy.ShapeType["FACE"], True)
|
||||
Box_1.SetAutoColor(1)
|
||||
geompy.addToStudy(Box_1, 'Box_1')
|
||||
|
||||
# Add each face to the study with a numeric name
|
||||
for i, face in enumerate(faces, start=1):
|
||||
geompy.addToStudyInFather(Box_1, face, f'Face_{i}')
|
||||
|
||||
# Check color of each face
|
||||
for face in faces:
|
||||
color = face.GetColor()
|
||||
print(f'{face.GetName()}: {color}')
|
||||
assert color.R != -1 and color.G != -1 and color.B != -1, 'Auto color must be different than (-1, -1, -1)'
|
@ -20,10 +20,13 @@
|
||||
SET(ALL_TESTS
|
||||
test_perf_01.py
|
||||
test_patch_face_01.py
|
||||
)
|
||||
test_set_autocolor.py
|
||||
test_ExtractBOPFailure.py
|
||||
)
|
||||
|
||||
IF(${OpenCASCADE_VERSION}.${OpenCASCADE_SP_VERSION} VERSION_GREATER "7.5.3.3")
|
||||
LIST(APPEND ALL_TESTS
|
||||
test_point_cloud_on_face_cone.py
|
||||
test_point_cloud_on_face.py
|
||||
test_CR.py
|
||||
test_conformity.py
|
||||
|
Loading…
x
Reference in New Issue
Block a user