Merge branch 'V7_7_BR' into hydro/imps_2015

This commit is contained in:
Paul RASCLE 2016-02-01 11:39:48 +01:00
commit 46f10dcf9b
226 changed files with 5710 additions and 2478 deletions

View File

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

View File

@ -68,6 +68,7 @@ SET(GOOD_TESTS
complex_objs_ex09.py
complex_objs_ex10.py
complex_objs_ex11.py
fast_intersection.py
free_boundaries.py
free_faces.py
GEOM_box.py
@ -131,9 +132,9 @@ SET(GOOD_TESTS
working_with_groups_ex05.py
working_with_groups_ex06.py
)
IF(CAS_VERSION_STR VERSION_GREATER "6.8.0")
IF(CAS_VERSION_STR VERSION_GREATER "6.9.0")
LIST(APPEND GOOD_TESTS
fast_intersection.py
check_self_intersections_fast.py
)
ENDIF()

View File

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

View File

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

View File

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

View File

@ -118,15 +118,21 @@ if __name__ == "__main__":
f = open(options.output, "w")
if len(args) > 1:
plugins_names = " ".join(args) + " plugins"
elif len(args) == 1:
plugins_names = args[0] + " plugin"
else:
plugins_names = ""
output = []
if options.dummygeomhelp:
output.append( "## @package geomBuilder" )
output.append( "# Documentation of the methods dynamically added by the " + plugin_name + " Geometry plug-in to the geomBuilder class." )
output.append( "# Documentation of the methods dynamically added by the " + plugins_names + " to the @b %geomBuilder class." )
# Add dummy Geometry help
# This is supposed to be done when generating documentation for Geometry module plug-ins
output.append( "# @note The documentation below does not provide complete description of class @b %geomBuilder" )
output.append( "# from @b geomBuilder package. This documentation provides only information about" )
output.append( "# the methods dynamically added to the %geomBuilder class by the " + plugin_name + " plugin" )
output.append( "# the methods dynamically added to the %geomBuilder class by the " + plugins_names + "." )
output.append( "# For more details on the %geomBuilder class, please refer to the SALOME %Geometry module" )
output.append( "# documentation." )
pass

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 30 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB

View File

@ -10,25 +10,24 @@ This operation is available in <b>OCC Viewer</b> only.
The \b Result will be a \b GEOM_Object.
\n Location of a new vertex on a selected edge can be defined two ways:
\n The location of a new vertex on the selected edge can be defined in two ways:
<ol>
<li> We can specify a position (ranging from 0.0 to 1.0) of the
vertex on the selected edge either by length or by parameter.
<li> By specifying the position (ranging from 0.0 to 1.0) by length or by parameter.
<p>
<b>TUI Command:</b> <em>geompy.DivideEdge(Shape, EdgeID, Value,
IsByParameter)</em>
<ul>
<li> \em Shape is a shape which contains an edge to be divided</li>
<li> \em Shape is a shape, which contains an edge to be divided;</li>
<li>\em EdgeID is the ID of the edge to be divided, if it is = -1,
then \em Shape should be an edge itself.</li>
then \em Shape should be an edge itself;</li>
<li> \em Value is a value of parameter on edge or length parameter,
depending on \em IsByParameter. </li>
<li> \em IsByParameter is a boolean flag, specifying operation mode:
- \c True: \em Value is treated as a curve parameter [0..1]
- \c False: \em Value is treated as a length parameter [0..1] </li>
depending on \em IsByParameter;</li>
<li> \em IsByParameter is a boolean flag, specifying the operation mode:
- \c True: \em Value is treated as a curve parameter; [0..1]
- \c False: \em Value is treated as a length parameter. [0..1] </li>
</ul>
\b Arguments: Name + 1 Edge + 1 Value setting the position of
the point according to one of the selected modes.
the point according to the selected mode.
The difference between "by parameter" and "by length" modes becomes
apparent on the edges with irregular parametrization (for example,
@ -41,15 +40,15 @@ The \b Result will be a \b GEOM_Object.
\image html repair8.png
\n\n
</li>
<li>We can select several points that will be projected to the selected
<li> By selecting several points that will be projected to the selected
edge to find the location of new vertices.
<p>
<b>TUI Command:</b> <em>geompy.DivideEdgeByPoint(Shape, Edge, Points)</em>
<b>TUI Command:</b> <em>geompy.DivideEdgeByPoint(Shape, Edge, Points):</em>
<ul>
<li> \em Shape is a shape which contains an edge to be divided</li>
<li>\em Edge is an edge to be divided (or it's ID, if it is = -1,
then \em Shape should be an edge itself).</li>
<li> \em Points is a list of points to project to \a Edge. </li>
<li> \em Shape is a shape, which contains an edge to be divided;</li>
<li>\em Edge is an edge to be divided (or its ID, if it is = -1,
then \em Shape should be an edge itself);</li>
<li> \em Points is a list of points to be projected to the \a Edge.</li>
</ul>
\b Arguments: Name + 1 Edge + 1 or more Points.

View File

@ -2,16 +2,17 @@
\page check_compound_of_blocks_page Check Compound of Blocks
This operation checks whether a shape is a compound of glued blocks.
This operation checks whether a shape is a compound of glued blocks
and tries to improve the shape to make it include only valid blocks.
\image html measures10.png
To be considered as a compound of blocks, the given shape must satisfy the
following conditions:
- Each element of the compound should be a Block (6 quadrangle faces);
- Each quadrangle face is a face that has 1 wire with 4 edges. If there are
more than 4 edges in a single wire and C1 continuity mode is switched on,
a face is quadrangular if it has 4 bounds of C1 continuity.
- Each element of the compound should be a Block, i.e. have 6 quadrangle faces;
- Each quadrangle face should have one wire with four edges. If there are
more than four edges in a single wire and C1 continuity mode is switched on,
a face is quadrangular if it has four bounds with C1 continuity.
- Blocks can be connected only via an entire quadrangle face or an entire edge;
- The compound should be connected;
- Each couple of connecting quadrangle faces should be glued.
@ -20,14 +21,22 @@ a face is quadrangular if it has 4 bounds of C1 continuity.
In this dialog:
- \b Object - the checked object. \b Selection button allows picking it in the viewer or in the object browser.
- <b>Use C1 criterion</b> - option that shitches on/off the C1 continuity mode.
- <b>Use C1 criterion</b> - option switches on/off the C1 continuity mode.
- <b>Angular Tolerance</b> - angular tolerance to check C1 continuity between neighbor edges in a wire.
- \b Errors list informs of possible errors, for example:
- Not a block;
- Not glued;
- Not connected;
- Extra or degenerated edge.
- <b>Incriminated Sub-shapes</b> field outputs the list of sub-shapes that cause problem. It is possible to select them in the list and publish in the study for further analysis by clicking \b Apply or <b>Apply and Close</b> button.
- <b>Incriminated Sub-shapes</b> field outputs the list of sub-shapes that cause problem.
- \b Apply and <b>Apply and Close</b> buttons launch an improving process
and publish a result shape which includes valid blocks only. The
improving process tries to
- remove seam edges and degenerated edges of surfaces of revolution;
- re-approximate surfaces to exclude singularities on boundaries;
- unite edges and faces;
- glue faces.
\n <b>TUI Command:</b>

View File

@ -2,6 +2,14 @@
\page check_self_intersections_page Detect Self-intersections
\n To <b>Detect Self-intersections</b> in the <b>Main Menu</b> select
<b>Inspection - > Detect Self-intersections</b>.
There are two ways to check self-intersections.
\anchor check_self_intersections_topological
<br><h3>Check topological intersections</h3>
This operation checks the topology of the selected shape to detect self-intersections.
\image html measures11.png
@ -9,17 +17,14 @@ This operation checks the topology of the selected shape to detect self-intersec
In this dialog:
- \b Object - the checked object. \b Selection button allows picking it in the viewer or in the object browser.
- <b>Level of check</b> - The combo box that allows to set the level of checking shape on self-interference.
It defines which interferferences will be checked. Default value is "All interferences".
- <b>Compute self-intersections</b> button computes self-interferences.
- \b Summary section contains the general report if the object has self-intersections and/or if errors are occured during computation.
- \b Self-intersections list contains the list of self-intersections detected.
Select the intersection(s) to show <b>Sub-shapes</b> in the field to the right.
- \b Apply and <b>Apply and Close</b> buttons are used to store interferences selected in the "Self-intersections" list box in the study for further analysis.
If no any interference is selected, all interferences are published in the study. Each interference is published as a child
compound of the source shape and contains a couple of intersecting sub-shapes.
- <b>Level of check</b> - combo box allows setting the level of self-interference checking. It defines, which interferences will be checked. The default value is "All interferences".
- <b>Compute self-intersections</b> button performs the computation.
- \b Summary section contains the general report about self-intersections of the object and/or errors that occurred during the computation.
- \b Self-intersections list contains the list of detected self-intersections. Select the intersection to show <b>Sub-shapes</b> in the field to the right.
- \b Apply and <b>Apply and Close</b> buttons store the interferences selected in the <b>Self-intersections</b> list box in the study for further analysis.
If no interferences are selected, all of them are published in the study. Each interference is published as a child compound of the source shape and contains a couple of intersecting sub-shapes.
\note This tool is useful for detection of shapes, not suitable for
\note This tool is useful for detection of shapes that are not suitable as
arguments of Boolean operations and Partition algorithm.
For more information about Partition and Boolean Operations Algorithms
and their limitations refer to <a href="SALOME_BOA_PA.pdf">this document</a>.
@ -32,5 +37,28 @@ where: \n
See also a \ref tui_check_self_intersections_page "TUI example".
\anchor check_self_intersections_fast
<br><h3>Fast intersection</h3>
This operations allows to quickly detect self-interferences of the given shape by means of algorithm based on mesh intersections.
\image html measures13.png
This algorithm works on the faces level, i.e. it computes only face-to-face intersections. No additional types of intersections is computed.
This case can be useful in order to detect all the intersections between the subshapes of type "surface" inside assembly.
Quality of result will depend on the quality of tesselation (managed via the deflection parameter). However, small values of deflection can
significantly decrease performance of the algorithm.
Nevertheless, performance of Fast Intersect algorithm is much higher than topological intersection.
\n <b>Result:</b> Boolean.
\n <b>TUI Command:</b> <em>geompy.CheckSelfIntersectionsFast(theShape, theDeflection, theTolerance),</em> \n
where: \n
\em theShape is the shape checked for validity. \n
\em theDeflection is a linear deflection coefficient that specifies quality of tesselation. If theDeflection <= 0, default deflection 0.001 is used.
\em theTolerance Specifies a distance between shapes used for detecting gaps:
- if theTolerance <= 0, algorithm detects intersections;
- if theTolerance > 0, algorithm detects gaps.
See also a \ref tui_check_self_intersections_fast_page "TUI example".
*/

View File

@ -15,10 +15,8 @@ axis, creating a body of revolution.</li>
<li>\subpage create_extrusion_alongpath_page "Extrude an object along a path",
creating a more complex trajectory object.</li>
<li>\subpage create_pipe_path_page "Restore Path" of a pipe-like shape.</li>
<li>\subpage create_thickness_page "Thickness" operation that allows to add a thickness to objects.</li>
<li>\subpage create_groups_page "Generate Groups".
This cross-operation functionality allows creation of groups for certain generation operations.</li>
<li>\subpage create_thickness_page "Add thickness" to objects.</li>
<li>\subpage create_groups_page "Generate Groups" for certain generation operations.</li>
</ul>
<b> New entity -> Advanced </b> sub-menu allows creating new geometric

View File

@ -16,7 +16,7 @@ obtain from it.
The \b Result of the operation will be a List of \b GEOM_Objects
(vertexes, edges, wires, faces, shells or solids).
Available choices in the <b>Sub Shapes Type</b> combo box depend on the type
The choices available in the <b>Sub Shapes Type</b> combo box depend on the type
of selected <b>Main Object</b>:
- \b Compound: to extract compounds;
- \b Compsolid: to extract compsolids;
@ -29,72 +29,70 @@ of selected <b>Main Object</b>:
- \b Shape: to extract top-level contents of the compound shape;
- \b Flat: to extract "flat" contents of the compound shape.
Note: "flat" contents means top-level simple-type sub-shapes extracted from
the compound object recursively (i.e. there is no compounds in the result).
For example, if a compound C1 contains a solid S1 and another compound C2 that
contains solids S2 and S3 (see picture below):
Note: "flat" contents means that top-level simple-type sub-shapes are extracted from
the compound object recursively (i.e. there are no compounds in the result).
Let us take, for example, compound C1 that contains solid S1 and another compound C2 that
contains solids S2 and S3 (see the picture below):
- Explode operation with \b Shape type given as parameter will return S1 and C2;
- Explode operation with \b Flat type given as parameter will return S1, S2 and S3.
\image html flat_contents.png
Switching on <b>Select Sub-shapes</b> check box allows manual selection of sub-shapes
to be extracted from the main object. In this mode the user can select sub-shapes
to be extracted from the main object. In this mode it is possible to select sub-shapes
directly in 3D viewer.
When <b>Select Sub-shapes</b> check box is switched on, additional \b Filter controls
allow to automatically pick up entites which satisfy specified threshold value(s).
The numerical functor for each sub-shape that is compared with threshold value(s)
is computed according to the shape's topological properties:
- length for edges and wires
- area for faces and shells
- volume for solids, compounds, compsolids
allow to automatically pick up entities, which satisfy the specified threshold value(s).
The numerical functor for each sub-shape that is compared with the threshold value(s)
is computed according to the topological properties of the shape:
- length for edges and wires;
- area for faces and shells;
- volume for solids, compounds and compsolids.
Filtering capabilities are not available for vertices.
In order to filter out some entities:
- Activate one or two filtering controls by switching on corresponding check boxes;
- Select required threshold comparator type; the following choices are available:
To filter out some entities it is necessary to do the following:
- Activate one or two filtering controls by switching on the corresponding check boxes;
- Select the required threshold comparator type; the following choices are available:
- <b>Less Than</b> or <b>Equal or Less Than</b> for the first comparator;
- <b>Greater Than</b> or <b>Equal or Greater Than</b> for the second comparator;
- Enter required threshold value (values);
- Enter the required threshold value (values);
- Press \b Apply button in the \b Filter group.
The entities which satisfy entered filtering parameters will be automatically highlighted
The entities, which correspond to the entered filtering parameters, will be automatically highlighted
in the 3D viewer.
Using <b>TUI Commands</b> you can perform this operation in a
variety of ways:
- <em>geompy.ExtractShapes(Shape, Type, isSorted)</em> explodes a
Shape into sub-shapes of a given Type and returns a List of sub-shapes.
This method does not return the Shape itself if it matches the
Type.
- <em>geompy.SubShapeAll(Shape, Type)</em> explodes a Shape on
This method does not return the Shape itself if it matches the Type.
- <em>geompy.SubShapeAll(Shape, Type)</em> explodes a Shape into
sub-shapes of a given Type and returns a List of sub-shapes.
- <em>geompy.SubShapeAllIDs(Shape, Type)</em> explodes a Shape on
sub-shapes of a given Type and returns a List of IDs of
sub-shapes.
- <em>geompy.SubShapeAllIDs(Shape, Type)</em> explodes a Shape into sub-shapes of a given Type and returns a List of IDs of sub-shapes.
- <em>geompy.SubShapeAllSortedCentres(Shape, Type)</em> explodes a
shape on sub-shapes of a given type and sorts them taking into account
shape into sub-shapes of a given type and sorts them taking into account
their gravity centers, to provide a stable order of sub-shapes.
It returns a list of sub-shapes.
- <em>geompy.SubShapeAllSortedCentresIDs(Shape, Type)</em> explodes
a shape on sub-shapes of a given type and sorts them taking into
a shape into sub-shapes of a given type and sorts them taking into
account their gravity centers, to provide a stable order of sub-shapes.
It returns a List of IDs of sub-shapes.
- <em>geompy.SubShape(Shape, Type, ListOfInd)</em> allows to obtain
a compound of sub-shapes of the Shape, selected by they indices in a
a compound of sub-shapes of the Shape, selected by their indexes in a
list of all sub-shapes of the given Type. Each index is in the range
[1, Nb_Sub-Shapes_Of_Given_Type].
- <em>geompy.SubShapeSortedCentres(Shape, Type, ListOfInd)</em>
allows to obtain a compound of sub-shapes of the Shape, selected by
they indices in sorted list of all sub-shapes of the given Type. Each
their indexes in a sorted list of all sub-shapes of the given Type. Each
index is in the range [1, Nb_Sub-Shapes_Of_Given_Type]
<b>Arguments: </b>1 SHAPE + 1 type of SubShape.
<b>Example:</b>
\image html explode.png "A box, exploded into faces"
\image html explode.png "A box exploded into faces"
*/

View File

@ -72,18 +72,33 @@ Additional controls:
- If <b>With contact</b> is checked, the section is translated in contact with the spine.
- If <b>With correction</b> is checked, the section is rotated to be orthogonal to the spine
tangent in the corresponding point.
- If <b>Step-by-step generation</b> is checked, the result is created
step-by-step, i.e. it creates pipes between each pair of neighbor sections and
fuses them into a single shape.
\note If <b>Step-by-step generation</b> is checked, <b>With contact</b> and
<b>With correction</b> controls are disabled as corrections of bases are
not allowed in step-by-step mode.
<b>Generate groups</b> checkbox - if checked allows to create groups of
sub-shapes. For more details on groups creation please refer to
\ref create_groups_page "this description".
\n The \b Result of the operation will be a shell or a solid.
\n <b>TUI Command:</b> <em>geompy.MakePipeWithDifferentSections(baseShape, locations, pathShape, withContact, withCorrection,
\n <b>TUI Commands:</b>
- <em>geompy.MakePipeWithDifferentSections(baseShape, locations, pathShape, withContact, withCorrection,
IsGenerateGroups=False)</em>
\n <b>Arguments:</b> Name + list of shapes (edges, planar wires, faces or shells) serving as base object +
list of locations (vertices) on the path corresponding specified list of the shapes +
1 shape (edge or wire) for definition of the path +
3 Boolean parameters (withContact, withCorrection, IsGenerateGroups).
- <em>geompy.MakePipeWithDifferentSectionsBySteps(baseShape, locations, pathShape,
IsGenerateGroups=False)</em>
\n <b>Arguments:</b> Name + list of shapes (edges, planar wires, faces or shells) serving as base object +
list of locations (vertices) on the path corresponding specified list of the shapes +
1 shape (edge or wire) for definition of the path +
Boolean parameter.
\n <b>Advanced options</b> \ref preview_anchor "Preview"
\image html pipe3.png

View File

@ -11,7 +11,7 @@ of the operation will be a GEOM_Object (FACE).
\n Firstly, to create a \b Face you need to select input shape(s). The list of
input shapes can include shapes of any type except vertices; if the shapes are
neither wires nor edges, the algorithm extracts all edges from
the input shapes and works on the obtaineed edges.
the input shapes and works on the obtained edges.
\n The edges and wires do not necessarily have to be closed, the
algorithm automatically builds a wire of maximum length from all
given edges and wires. If several closed wires are detected the algorithm tries
@ -26,7 +26,7 @@ exceeds 1e-06, a warning will be shown, but the face will be created
and published in the study in a normal way. Using such faces can lead to failures
or unpredictable results in most operations.
\n The \b Result will be a \b GEOM_Object (FACE).
\n The \b Result will be a \b GEOM_Object. It can be either a single face or, in specific cases, a compound of faces.
\n <b>TUI Command:</b> <em>geompy.MakeFaceWires([list of Shapes], isPlanarWanted)</em>
\n <b>Arguments:</b> Name + 1 wire.
@ -35,7 +35,7 @@ or unpredictable results in most operations.
\n Secondly, it is possible to create a face based on another face's surface and bounded by a wire.
\n The \b Result will be a \b GEOM_Object (FACE).
\n The \b Result will be a \b GEOM_Object (face).
\n <b>TUI Command:</b> <em>geompy.MakeFaceFromSurface(theFace, theWire)</em>
\n <b>Arguments:</b> Name + 1 face + 1 wire.
@ -50,7 +50,7 @@ and constraints:
\note Please note, that the constraint face must be connected to a reference edge.
\n The \b Result will be a \b GEOM_Object (FACE).
\n The \b Result will be a \b GEOM_Object (face).
\n <b>TUI Command:</b> <em>geompy.MakeFaceWithConstraints([List of constraints])</em>
\n <b>Arguments:</b> Name + List of input edges and constraint faces. If a constraint

View File

@ -5,6 +5,8 @@
\b Isoline is a 3D curve built on a bounded face limited by <em> [Umin, Umax] </em> and <em> [Vmin, Vmax] </em>
values of U and V parameters. For all points of the isoline U or V parameter value is constant.
Result of this operation is either a single edge or a compound of edges.
To create an \b Isoline of a face in the <b>Main Menu</b> select <b>New Entity - > Basic - > Isoline</b>.
\image html isoline1.png

View File

@ -28,9 +28,10 @@ the position of this point regarding the reference one.
\n Thirdly, we can define a point by an \b Edge and a \b Parameter
indicating its position on the Edge, ranging from 0.0 to 1.0. For example, 0.5 means that the
point is located in the middle of the edge.
\n <b>TUI Command:</b> <em>geompy.MakeVertexOnCurve(Edge,Parameter).</em>
\n <b>TUI Command:</b> <em>geompy.MakeVertexOnCurve(Edge,Parameter,takeOrientationIntoAccount).</em>
\n <b>Arguments:</b> Name + 1 edge + 1 Parameter defining the
position of the point on the given edge.
position of the point on the given edge + flag that tells if it is necessary
to take the edge orientation into account.
\image html point3.png
Alternatively, it is possible to define a point by an \b Edge and a \b Length.

View File

@ -6,7 +6,7 @@ To create a \b Shell in the <b>Main Menu</b> select <b>New Entity - >
Build - > Shell</b>
\n You can create a \b Shell from a compound of faces or a list of faces or shells.
\n The \b Result will be a \b GEOM_Object (shell).
\n The \b Result will be a \b GEOM_Object. It can be either a single shell or, in specific cases, a compound of shells.
\n <b>TUI Command:</b> <em>geompy.MakeShell(ListOfShape)</em>
\n <b>Arguments:</b> Name + Compound of faces or List of faces having connected edges.

View File

@ -4,10 +4,10 @@
To create a <b>Surface From Face</B> in the <b>Main Menu</b> select <b>New Entity - > Basic - > Surface From Face</b>
\n This function takes some face as input parameter and creates new
GEOM_Object, i.e. topological shape by extracting underlying surface
of the source face and limiting it by the Umin, Umax, Vmin, Vmax
parameters of the source face (in the parametrical space).
\n This function takes a face at input and creates a new
<b>GEOM_Object</b>, i.e. topological shape by extracting the underlying surface
of the source face and limiting it by the <b>Umin, Umax, Vmin</b> and <b>Vmax</b>
parameters of the source face (in the parametric space).
\n
\ref restore_presentation_parameters_page "Advanced options".

View File

@ -2,26 +2,28 @@
\page create_thickness_page Thickness Construction
To add a \b Thickness to a shape in the <b>Main Menu</b> select <b>New Entity - > Generation - > Thickness</b>
\n
It is possible to create a Solid from a Face or a Shell by applying a
\b Thickness. To do it you should define an \b Object that is a Face or a
Shell, \b Thickness and to define the thickness direction by means of
<b>Thicken towards the inside</b> check box.
To add \b Thickness to a shape in the <b>Main Menu</b> select <b>New Entity - > Generation - > Thickness</b>.
Switch between adding thickness to a Face (Shell) or a Solid using radio buttons.
Firstly, \b Thickness can be applied to a Face or a Shell to create a Solid.
\image html thickness.png
It is necessary to define an \b Object (Face or Shell) and the value of \b Thickness.
<b>Thicken towards the inside</b> check box allows changing the thickness direction.
<b>Example:</b>
\image html thickness_result.png "Thickness of Shell"
It is possible to apply \b Thickness to a Solid. The result of this operation
is the hollowed Solid. To do it you should define an \b Object that is a Solid,
\b Faces to be removed from result, \b Thickness and the thickness direction by
means of <b>Thicken towards the inside</b> check box.
Secondly, the \b Thickness can be applied to a Solid to create a hollowed Solid.
\image html thicksolid.png
It is necessary to define a Solid \b Object \b Faces to be removed from the result and \b Thickness.
<b>Thicken towards the inside</b> check box allows changing the thickness direction.
<b>Example:</b>
\image html thicksolid_result.png "Thickness of Solid"
@ -36,8 +38,8 @@ Modifies a shape to make it a thick solid.
<b>Arguments:</b> Name + 1 shape (face, shell or solid) + thickness +
the list of face IDs.
\n If the shape is face or shell the list of face IDs is not used.
The thickness can be positive or negative for thicken towards the inside.
\n If the shape is a face or a shell the list of face IDs is not used.
The thickness can be positive or negative for thickening towards the inside.
\n\n <b>Advanced options</b> \ref preview_anchor "Preview"
Our <b>TUI Scripts</b> provide you with useful examples of creation of

View File

@ -28,13 +28,15 @@ It is also possible to select an object(s) directly in the "Dependency Tree" vie
All necessary parameters of Dependency Tree Viewer can be edited in the \ref pref_dependency_tree "Preferences".
\note This functionality is available only if GUI module is builded with Graphics view (set option SALOME_USE_GRAPHICSVIEW to ON when building GUI module).
<hr>
\anchor dependency_tree_nodes_anchor <h2>Nodes</h2>
Tree nodes in the Dependency Viewer are named according to the study
names of the corresponding objects.
All nodes have fixed size, so long names are cut; the full object name can be seen in the tooltip
All nodes have fixed size, so long names are cut; the full object name can be seen in the tool-tip
when the cursor is hovered over the node.
"Dependency Tree" view supports the following states of nodes:
@ -61,11 +63,11 @@ Browser, OCC Viewer or Dependency Tree Viewer;</li></ul>
Dependency Tree Viewer shows oriented links between nodes to
represent the dependency direction. The viewer supports the following states of links:
<ul><li><b>Unidirectional link</b> - shows that object B depends on object A;</li></ul>
<ul><li><b>Unidirectional link</b> - shows that object \b B depends on object \b A;</li></ul>
\image html tree_unidir_link.png
<ul><li><b>Bidirectional link</b> - shows that object B depends on
object A and, at the same time, object A depends on object B;</li></ul>
<ul><li><b>Bidirectional link</b> - shows that object \b B depends on
object \b A and, at the same time, object \b A depends on object \b B;</li></ul>
\image html tree_bidir_link.png
<ul><li><b>Self-dependency link</b> - shows that an object depends on itself;</li></ul>

View File

@ -29,7 +29,7 @@ functionality for all objects in the current view via the main menu
\n <b>TUI Command:</b> <em>gg.setVectorsMode(ID, Bool)</em>
\n Also it is possible to show the vertices of the selected
\n It is possible to show the vertices of the selected
shape. For this, choose in the context menu of the shape
<b>Display mode -> Show Vertices</b>, or apply this
functionality for all objects in the current view via the main menu
@ -40,10 +40,9 @@ functionality for all objects in the current view via the main menu
\n <b>TUI Command:</b> <em>gg.setVerticesMode(ID, Bool)</em>
\n Moreover user can show the name of the selected
shape. For this, choose in the context menu of the shape
\n To show the name of the selected shape, choose in its context menu
<b>Display mode -> Show Name</b>, or apply this
functionality for all objects in the current view via the main menu
functionality for all objects in the current view via the main menu option
<b> View -> Display Mode -> Show/Hide Name.</b>
\image html name_mode.png

View File

@ -1,25 +1,20 @@
/*!
\page extension_operation_page Extension of an Edge or a Face
\page extension_operation_page Extension
\n To produce an \b Extension in the <b>Main Menu</b> select
<b>Operations - > Transformation - > Extension</b>
\n To produce an \b Extension of an Edge or a Face select in the <b>Main Menu</b>
<b>Operations - > Transformation - > Extension</b>. The type of extension is defined using the radio buttons.
\n This operation resizes an \b Edge by means of first
and last parameters modification or a \b Face by means of modification
of minimal and maximal U- and V-Parameters. \n
\ref restore_presentation_parameters_page "Advanced options".
Firstly it is possible to resize an \b Edge by modifying its first
and last parameters
The type of extension is defined using the radio buttons.
\image html extension1.png "Edge Extension"
Firstly it is possible to resize an \b Edge.
\n <b>TUI Command:</b> <em>geompy.ExtendEdge(theEdge, theMin, theMax)</em>,
where \em theEdge the input edge to be resized, \em theMin the minimal
parameter value, \em theMax the maximal parameter value.
\n <b>Arguments:</b> Name + Object (Edge) + 2 values (Min and Max Parameters).
\image html extension1.png "Extension of an Edge"
\n <b>Example:</b>
\image html extend_edge_example.png "Original edge (white) and extended edge"
@ -29,7 +24,11 @@ parameter value, \em theMax the maximal parameter value.
\b theMin parameter. If \b theMax is greater than 1, the Edge is
extended, otherwise it is shrinked by \b theMax parameter.
Secondly it is possible to resize a \b Face.
Secondly it is possible to resize a \b Face by modifying its
minimal and maximal U- and V-Parameters.
\image html extension2.png "Face Extension"
\n <b>TUI Command:</b> <em>geompy.ExtendFace(theFace, theUMin, theUMax,
theVMin, theVMax)</em>, where \em theFace the input face to be resized,
\em theUMin the minimal U-Parameter value, \em theUMax the maximal U-Parameter
@ -38,18 +37,16 @@ V-Parameter value.
\n <b>Arguments:</b> Name + Object (Face) + 4 values (Min and Max U- and
V-Parameters).
\image html extension2.png "Extension of a Face"
\n <b>Example:</b>
\image html extend_face_example.png "The original face (gray) and a result
face shrinked along U-Direction and extended along V-Direction"
\image html extend_face_example.png "The original face (gray) and a result face shrinked along U-Direction and extended along V-Direction"
\note The input Face U- and V-Parameters range is [0, 1]. If \b theUMin
parameter is negative, the input Face is extended, otherwise it is
shrinked along U-Direction by \b theUMin parameter. If theUMax is
shrinked along U-Direction by \b theUMin parameter. If \b theUMax is
greater than 1, the Face is extended, otherwise it is shrinked along
U-Direction by \b theUMax parameter. So as for \b theVMin, \b theVMax
U-Direction by \b theUMax parameter. The same applies to \b theVMin, \b theVMax
and V-Direction of the input Face.
Our <b>TUI Scripts</b> provide you with useful examples of the use of

View File

@ -1,11 +1,11 @@
/*!
\page fast_intersection_page Fast intersection
This operation checks whether or not two selected shapes are overlapped.
This operation checks if two selected shapes are overlapped.
This tool is useful for fast detection of intersections and gaps.
In contrast to Boolean Operations, Partition and Detect Self-intersection
algorithms that compute topological intersections, this algoritm computes
algorithms that compute topological intersections, this algorithm computes
intersections by generating tessellation (triangulation) of the source
shapes and detecting overlapping of resulting meshes. High performance is
achieved through the use of existing triangulation of faces.
@ -28,22 +28,21 @@ of the GUI module's documentation.
In this dialog:
- \b Object 1 - first checked object. \b Selection button allows picking it in the viewer or in the object browser.
- \b Object 2 - second checked object. \b Selection button allows picking it in the viewer or in the object browser.
- <b> Object 1 </b> and <b> Object 2 </b> the checked objects. \b Selection button allows picking them in the viewer or in the object browser.
- <b>Deflection coefficient</b> specifies the quality of shapes tessellation.
- <b>Detect gaps</b> - when switched on, allows detecting gaps between shapes.
- <b>Tolerance</b> - specifies a distance between shapes used for detecting gaps.
- <b>Tolerance</b> - specifies the distance between shapes used for detecting gaps.
- <b>Compute intersections</b> - press this button to compute interferences.
- <b>Sub-shapes of Object 1</b> - list of sub-shapes from the first source shape that localize the intersection.
- <b>Sub-shapes of Object 2</b> - list of sub-shapes from the second source shape that localize the intersection.
- \b Apply and <b>Apply and Close</b> buttons are used to store selected intersected shapes in the study for
further analysis (see below).
\note Quality of the result depends on the quality of triangulation. Changing a value of the deflection coefficient
parameter can strongly affect the result. On the other hand, small values of deflection coefficient might lead to
\note The result quality depends on the quality of triangulation. Changing the value of the deflection coefficient
parameter can strongly affect the result. However, small values of the deflection coefficient might lead to
some performance loss of the algorithm, as number of triangles of the tesselation mesh depends on this parameter.
It is possible to store sub-shapes selected by the user in the study, for the further analysis.
Press <b>Apply and Close</b> or \b Apply button to store the selected sub-shapes in the study for further analysis.
The selection will be published as a compound containing intersected sub-shapes from both source objects.
<b>TUI Command:</b> <em>geompy.FastIntersect(theShape1, theShape2, theTolerance = 0.0, theDeflection = 0.001),</em> \n

View File

@ -17,7 +17,7 @@ given tolerance value.
\n <b>TUI Command:</b>
<p><em>geompy.MakeGlueEdges( theShapes, theTolerance )</em>,
\n where \em theShapes is either a list or compound of shapes to be
\n where \em theShapes is a list or compound of shapes to be
glued, and \em theTolerance is a maximum distance between two
edges, which can be considered as coincident.
@ -41,12 +41,12 @@ The selected edges will be marked in white.
theTolerance is a maximum distance between two edges, which can
be considered as coincident. The \b Result will be a list of \b
GEOM_Objects (edges), containing one sub-shape per each detected set of
coincident sub-shapes. For example if there are two coincident edges
in selected shapes, the result list contains one of the two coincident edges.
coincident sub-shapes. For example, if there are two coincident edges
in the selected shapes, the result list contains one of the two coincident edges.
<em>geompy.MakeGlueEdgesByList( theShapes, theTolerance, theEdges )</em>,
\n where \em theShape is either a list or compound of shapes to be glued, \em
theTolerance is a maximum distance between two edges, which can
\n where \em theShape is a list or compound of shapes to be glued,
\em theTolerance is a maximum distance between two edges, which can
be considered as coincident, \em theEdges is a list of
edges to be glued.

View File

@ -41,12 +41,12 @@ The selected faces will be marked in white.
When the faces are glued their edges are glued as well. By default, other
edges are not glued. To force gluing of all edges, check <b>Glue all coincident edges</b>
checkbox.
check-box.
\n <b>TUI Commands:</b>
<em>geompy.GetGlueFaces( theShapes, theTolerance )</em>,
\n where \em theShapes is either a list or compound of shapes to be glued, \em
\n where \em theShapes is a list or compound of shapes to be glued, \em
theTolerance is a maximum distance between two faces, which can
be considered as coincident. The \b Result will be a list of \b
GEOM_Objects (faces), containing one sub-shape per each detected set of

View File

@ -12,11 +12,11 @@ In this dialog:
- Click on the "selection" button and select an object to inspect in the Object Browser or in the viewer.
- Show/hide sub-shape(s) in the 3D viewer, by pressing “eye” icon in the first column of the tree view.
- Show/hide all sub-shapes in the 3D viewer, by pressing “eye” icon in the first column of the tree view header.
- Rename selected sub-shape by double-clicking on the item or pressing <F2> key.
- Show selected sub-shape(s) in the 3D viewer by pressing <b>Show Selected</b> button.
- Show selected sub-shape(s) in the 3D viewer and erase all currently shown objects by pressing <b>Show Only Selected</b> button.
- Hide selected sub-shape(s) from the 3D viewer by pressing <b>Hide Selected</b> button.
- Publish selected sub-shapes in the study, by pressing <b>Publish Selected</b> button.
- Rename the selected sub-shape by double-clicking on the item or pressing <F2> key.
- Show the selected sub-shape(s) in the 3D viewer by pressing <b>Show Selected</b> button.
- Show the selected sub-shape(s) in the 3D viewer and erase all currently shown objects by pressing <b>Show Only Selected</b> button.
- Hide the selected sub-shape(s) from the 3D viewer by pressing <b>Hide Selected</b> button.
- Publish the selected sub-shapes in the study, by pressing <b>Publish Selected</b> button.
- Close dialog box, by pressing <b>Close</b> button.
*/

View File

@ -14,24 +14,31 @@ To make a projection it is necessary to define:
- \b Object to be projected. It can be either a planar wire or a face;
- \b Radius of the cylinder;
- <b>Starting angle</b> from the cylinder's X axis around Z axis. This is
the angle of the projection starting.
- <b>Length angle</b> in which to project the total length of
the wire. If it is unchecked the projection is not scaled and natural
the angle of the projection start.
- <b>Length angle</b> where the total length of
the wire should be projected. If it is unchecked the projection is not scaled and the natural
wire length is kept for the projection.
\ref restore_presentation_parameters_page "Advanced options".
- <b>Rotation angle</b> the desired angle between the tangent vector to
the first curve at the first point of the theObject's projection in 2D space
and U-direction of cylinder's 2D space.
- \ref restore_presentation_parameters_page "Advanced options".
\image html proj_on_cyl_dlg.png
\n The following figure explains meaning of each input angle:
\image html proj_on_cyl_angles.png "Input angles of projection on the cylinder"
\n <b>Example:</b>
\image html proj_on_cyl_preview.png "The curve (in red) and its projection on the cylinder"
\n <b>TUI Command:</b> <em>geompy.MakeProjectionOnCylinder(theObject, theRadius,
theStartAngle=0.0, theAngleLength=-1.0),</em>
where \em theObject is a shape which has to be projected, \em theRadius
is a cylinder radius, \em theStartAngle the starting angle of projection in
radians, \em theAngleLength the projection length angle in radians.
theStartAngle=0.0, theAngleLength=-1.0, theAngleRotation=0.0),</em>
where \em theObject is a shape to be projected, \em theRadius
is a cylinder radius, \em theStartAngle is the starting angle of projection in
radians, \em theAngleLength the projection length angle in radians,
\em theAngleRotation projection rotation angle in radians.
The \em Result will be a \em GEOM_Object.
Our <b>TUI Scripts</b> provide you with useful examples of the use of

View File

@ -3,18 +3,18 @@
\page sewing_operation_page Sewing
\b Sewing operation allows uniting several faces (possibly contained
in a shell, solid or compound) into one shell while geometrically
in a shell, solid or compound) into one shell. Geometrically
coincident (within a specified tolerance) edges (or parts of edges) of
different faces are replaced by one edge thus producing a shell of
faces with shared boundaries.<p>
This operation is similar to <b>New Entity - > Build - > Shell</b>
operation, the difference is that with \b Sewing you can specify the
tolerance and can get a non-manifold result. <p>
Possibility to create a non-manifold shell can be used e.g. to create a
tolerance and get a non-manifold result. <p>
The possibility to create a non-manifold shell can be used e.g. to create a
shell forming several closed domains and then to create several solids
with shared boundaries from this shell.
\note Geometrically coincident faces (or part of faces) won't be
\note Geometrically coincident faces (or parts of faces) will not be
replaced by one face during \b Sewing.
To produce a \b Sewing operation in the <b>Main Menu</b> select <b>Repair - > Sewing</b>.

View File

@ -56,22 +56,22 @@ merge with neighboring edges.</li>
<li><b>3D Tolerance</b> (DropSmallEdges.Tolerance3d) - defines minimum
possible distance between two parallel edges.</li>
</ul>
<li><b>Drop Small Solids</b> (DropSmallSolids) - either removes small
<li><b>Drop Small Solids</b> (DropSmallSolids) - removes small
solids or merges them with neighboring ones.</li>
<ul>
<li><b>Width factor tol.</b> (DropSmallSolids.WidthFactorThreshold) -
defines maximum value of <em>2V/S</em> of a solid which is
considered small, where \a V is volume and \a S is surface area of
defines the maximum value of <em>2V/S</em> of a solid, which is
considered small, where \a V is the volume and \a S is the surface area of
the solid.</li>
<li><b>Volume tol.</b> (DropSmallSolids.VolumeThreshold) - defines
maximum volume of a solid which is considered small.</li>
the maximum volume of a solid, which is considered small.</li>
<li><b>To merge solids</b> (DropSmallSolids.MergeSolids) - if
activated, small solids are removed, else small solids are merged to
adjacent non-small solids or left untouched if cannot be merged.
adjacent non-small solids or left untouched if they cannot be merged.
</li>
</ul>
If the both tolerances are activated a solid is considered small if
it meets the both criteria.
it meets both criteria.
<li><b>Split Angle</b> (SplitAngle) - splits faces based on conical
surfaces, surfaces of revolution and cylindrical surfaces in segments
using a certain angle.</li>

View File

@ -0,0 +1,30 @@
/*!
\page shape_statistics_operation_page Shape Statistics
This operation allows plotting a distribution histogram for the numerical parameters and creating the corresponding geometrical groups of the given shape.
To call <b>Shape Statistics</b> dialog box, in the <b>Main Menu</b> select <b>Inspection - > Shape Statistics</b>.
\image html shape_statistics.png
In this dialog:
- "Selected objects" standard selection box allows selecting one or more geometrical objects.
- "Type" combo-box with the following items: "Edges length", "Faces area", "Solids volume".
\note "Type" combo-box includes only parameters applied to the currently selected shape (e.g. "Solids volume" will not be available for face or shell being selected); multiple selection is processed correspondingly (i.e. only types applicable for all selected shapes will be available).
- "Number of intervals" spin box is used to specify number of distribution histogram ranges.
- "Scalar range" checkable group box that, when switched ON, allows specifying custom values range used for plotting and creating groups.
\note By default, "Scalar range" controls is empty; pressing "Compute" button allows automatic computing initial range of the chosen parameter. This is needed as computation of the parameters range can be time-consuming for large or complex models. In case of multiple selection, scalar range is computed as common from all selected shapes.
- "Plot" button opens or uses an opened Plot2d viewer and plots the distribution histogram for the selected shape(s).
- "Create groups" button allows creating a groups according to the currently specified parameters. The groups names will include numerical values of the range, e.g. "Edges_length_0-20", "Edges_length_20-40", etc. Empty groups are not created.
- Close dialog box, by pressing <b>Close</b> button.
\note This functionality is available only if GUI module is builded with Plot 2D Viewer (set option SALOME_USE_PLOT2DVIEWER to ON when building GUI module).
*/

View File

@ -15,22 +15,22 @@ Shared Shapes.</b> The following dialog box will appear.
In this dialog:
- <b>Name</b> is the base name of the resulting shapes.
- <b>Shapes</b> are the shapes to fing shared sub-shapes of.
- <b>Shapes</b> are the shapes whose shared sub-shapes should be found.
- <b>Sub-shapes Type</b> is the type of required sub-shapes.
- <b>Shared by all</b> option specifies what type of shared sub-shapes should be checked:
- \b On: causes to search sub-shapes from the first input shape shared with all other input shapes;
- \b Off: causes to search sub-shapes shared between couples of input shapes.
- \b On: searches for sub-shapes from the first input shape shared with all other input shapes;
- \b Off: searches for sub-shapes shared between couples of input shapes.
\note For the case when "Shared by all" option is switched off - if an input list of shapes
contains single compound, the sub-shapes shared between all possible couples of its top-level shapes
are searched; otherwise, only sub-shapes that are shared between first input shape and all rest input
shapes are searched.
contains a single compound, the sub-shapes shared between all possible couples of its top-level shapes
are searched for; otherwise, only sub-shapes that are shared between the first input shape and
all other input shapes are searched.
<b>Advanced options:</b> \ref preview_anchor "Preview"
<b>TUI Command:</b> <em> geompy.GetSharedShapesMulti( Shapes, Type ),</em>
<br> where \em Shapes is a list or compound of shapes to fing shared sub-
shapes of and \em Type is the type of required sub-shapes.
<br> where \em Shapes is a list or compound of shapes, whose shared sub-
shapes should be found and \em Type is the type of required sub-shapes.
Our <b>TUI Scripts</b> provide you with useful examples of the use of
Get Shared Shapes functionality:

View File

@ -4,37 +4,33 @@
\tableofcontents
This document determines the range of numbers (tolerances, locations
and sizes) that are to be taken into account for any 3D model design
in Salome. Although it is not obligatory to create models within this range,
algorithms can fail or return unexpected result in this case.
In Salome and Open CASCADE Technology (OCCT), which is a modeling core
of Salome %GEOM module, any model has its location in the 3D-space and size.
This document refers mainly to Open CASCADE Technology (OCCT). However it
concerns Salome as well as OCCT is a modeling core of Salome %GEOM module.
This document defines the range of values (tolerances, locations
and sizes) that should be taken into account for any 3D model design.
Any model in 3D-space has its location and sizes. The last two things in Salome
and OCCT are represented by the double precision floating point numbers.
The goal of the document is to define the range of numbers that can be used in
modeling algorithms provided by Salome and Open CASCADE Technology.
It is not obligatory to create models within this range,
however, algorithms can fail or return unexpected results if the
recommendations are not followed.
\section sec1 Maximal Size of the Model
The Maximal Size of the model is a number defined as the maximal diameter of
The Maximal Size of the model corresponds to the maximal diameter of
enclosed sphere built for the model. In OCCT any model has a location defined
relative the absolute origin. Thus the maximal diameter above should be built
relatively to the absolute origin. Thus the maximal diameter should be built
taking into account the model itself and its location.
In Open CASCADE there are two tolerances: Tolerance Confusion (TolC)
In OCCT there are two tolerances: Tolerance Confusion (TolC)
and Tolerance Angular (TolA) (see OCCT Precision package for more details).
These values are used for geometric comparisons. They are not used inside
low-level algorithms (intersection for e.g.), where more precise values are
These values are used for geometric comparisons. However, they are not used inside
low-level algorithms (e.g. intersection), where more precise values are
used instead. The value TolC guarantees that the error associated with
the computations for given geometric entity is not greater than TolC.
the computations for a given geometric entity is not greater than TolC.
- TolC - precision value when checking coincidence of two points
- TolC - precision value used to check the coincidence of two points
[by default 1.e-7];
- TolA - precision value when checking the equality of two angles
- TolA - precision value used to check the equality of two angles
[by default 1.e-12].
For more information on tolerance definition please see
@ -43,8 +39,8 @@ that are due to modeling errors or inaccuracies of tolerance usage please
refer to <a href="SALOME_BOA_PA.pdf">Chapter 9.2.2 of the same document</a>.
To provide robust geometric modeling the computations should be consistent,
i.e. the one tolerance value should be used for all computations. To provide
consistent computations the values TolC and TolA should be consistent:
i.e. the one tolerance value should be used for all computations. Thus, the
TolC and TolA values should be consistent:
<CENTER><B><PRE>Smax = TolC / TolA (1)</PRE></B></CENTER>
@ -56,16 +52,16 @@ In accordance with <B>(1)</B> the Maximal Size for the Model is [by default]:
\section sec2 Minimal Size of the Model
The Minimal Size of the Model is defined as maximal diameter of enclosed
The Minimal Size of the Model is defined as the maximal diameter of enclosed
sphere built for the smallest BRep entity of the Model.
All models in Open CASCADE Technology are represented using double precision
All models in OCCT are represented using double precision
floating point numbers. This representation contains approximately 14-16
significant digits.
From the experience of using it is considered that the least four significant
From the experience, it is considered that the last four significant
digits contain rounding-off errors occurring during the computation. So
(taking in account the worst cases), there are ten reliable significant digits
(taking into account the worst cases), there are ten reliable significant digits
for double precision floating point numbers. Having the estimation it is
possible to compute the value of the Minimal size of the model:
@ -78,7 +74,7 @@ In accordance with <B>(2)</B> for the default value it will be [by default]:
\section sec3 Full Range of Sizes
The values <B>Smax (2)</B>, <B>Smin (4)</B> are theoretical. Taking into
account the practical purposes of improving the reliability the lower limit
account the practical purposes of improving the reliability, the lower limit
should be restricted by one order. Thus, the full Range of Sizes of the Models
is:

View File

@ -21,24 +21,23 @@ In this dialog:
<ul>
<li> <b>Source Shape</b> is an object that is a source of non-topological data.</li>
<li> <b>Destination Shape</b> is a data destination object. </li>
<li> <b>Type of detection operation</b> is the method to search sub-shapes of
<b>Source Shape</b> in <b>Destination Shape</b>. Data are transferred
from these corresponding sub-shapes. This is a combo-box with the following
possible values:
<li> <b>Type of detection operation</b> allows choosing how to search sub-shapes of the
<b>Source Shape</b> in the <b>Destination Shape</b>. The data are transferred
from these corresponding sub-shapes. The following methods are possible:
<ul>
<li><b>Get In Place</b> - current implementation of Get In Place algorithm
<li><b>Get In Place</b> - the current implementation of Get In Place algorithm
(default value).</li>
<li><b>Get In Place (old)</b> - old implementation of Get In Place
<li><b>Get In Place (old)</b> - the old implementation of Get In Place
algorithm.</li>
<li><b>Get In Place By History</b> - Get In Place By History algorithm.</li>
</ul>
</li>
</ul>
To copy data click on \b Apply or <b>Apply and Close</b> button. As the result
it is possible to see how many names and materials are copied as well as
maximum number of names and materials available for copying. This information is
provided on the following message box:
To copy the data click on \b Apply or <b>Apply and Close</b> button.
It is possible to see how many names and materials are copied as well as
the maximum number of names and materials available for copying. This information is
provided in the following message box:
\image html transfer_data2.png "Transfer Data Information"

View File

@ -0,0 +1,6 @@
/*!
\page tui_check_self_intersections_fast_page Detect Self-intersections fast
\tui_script{check_self_intersections_fast.py}
*/

View File

@ -19,6 +19,7 @@
<li>\subpage tui_check_compound_of_blocks_page</li>
<li>\subpage tui_get_non_blocks_page</li>
<li>\subpage tui_check_self_intersections_page</li>
<li>\subpage tui_check_self_intersections_fast_page</li>
<li>\subpage tui_fast_intersection_page</li>
</ul>

View File

@ -17,7 +17,10 @@
\until Detect Self-intersections
\anchor swig_CheckSelfIntersections
\until Detect Fast intersection
\until Detect Self-intersections fast
\anchor swig_CheckSelfIntersectionsFast
\until Fast intersection
\anchor swig_FastIntersection
\until WhatIs

View File

@ -19,6 +19,7 @@
<li>\subpage managing_dimensions_page "Dimensions"</li>
<li>\subpage whatis_page "WhatIs"</li>
<li>\subpage inspect_object_operation_page "Inspect Object"</li>
<li>\subpage shape_statistics_operation_page "Shape Statistics"</li>
</ul>
\n To check their integrity:

View File

@ -5,13 +5,13 @@
This operation provides the list of types and quantities of all topological
entities, composing the selected geometrical object.
For the \em COMPOUND or \em COMPSOLID shape, additionally the information about
"flat" content is shown - a number of "simple" top-level shapes enclosed into the compound.
The information about \em COMPOUND or \em COMPSOLID shapes additionally shows
"flat" content - the number of "simple" top-level shapes enclosed into the compound.
\image html measures8.png
\note This dialog supports navigation through the selectable objects (in OCC 3D viewer only):
- Scroll mouse wheel with pressed \em Ctrl key or press \em "S", \em "P" keys when input focus is
- Scroll mouse wheel with pressed \em Ctrl key or press \em "S", \em "P" keys when the input focus is
in the viewer to navigate between selectable objects.
- Press left mouse button to select an appropriate object to the dialog box.
.

View File

@ -24,7 +24,7 @@ This functionality is available in OCC viewer only.
To create a group of sub-shapes of a geometrical object in the main
menu select <b>New entity > Group > Create</b>
\n The following menu will appear:
\n The following dialog box will appear:
\image html geomcreategroup.png
@ -81,26 +81,31 @@ creation of other groups), or skip it by clicking \b Close button.
\n The Result of the operation will be a \b GEOM_Object.
The \b Filter controls allow to automatically pick up entites which satisfy specified
The \b Filter controls allow to automatically pick up entities, which satisfy specified
threshold value(s). The numerical functor for each sub-shape that is compared with
threshold value(s) is computed according to the shape's topological properties:
- length for edges and wires
- area for faces and shells
- volume for solids, compounds, compsolids
- length for edges and wires;
- area for faces and shells;
- volume for solids, compounds, compsolids.
Filtering capabilities are not available for vertices.
In order to filter out some entities:
- Activate one or two filtering controls by switching on corresponding check boxes;
- Select required threshold comparator type; the following choices are available:
- Activate one or two filtering controls by switching on the corresponding check boxes;
- Select the required threshold comparator type; the following choices are available:
- <b>Less Than</b> or <b>Equal or Less Than</b> for the first comparator;
- <b>Greater Than</b> or <b>Equal or Greater Than</b> for the second comparator;
- Enter required threshold value (values);
- Enter the required threshold value (values);
- Press \b Apply button in the \b Filter group.
The entities which satisfy entered filtering parameters will be automatically highlighted
The entities, which satisfy the entered filtering parameters, will be automatically highlighted
in the 3D viewer.
\b Plot button into "Filter" group box provides an access
to the \ref shape_statistics_operation_page "Shape Statistics" functionality with simplified look-n-feel:
\image html shape_statistics_simple.png
\n <b>TUI Command:</b> <em>geompy.CreateGroup(MainShape,
ShapeType),</em> where MainShape is a shape for which the group is
created, ShapeType is a type of shapes in the created group.

View File

@ -732,10 +732,13 @@ module GEOM
* Create a point, corresponding to the given parameter on the given curve.
* \param theRefCurve The referenced curve.
* \param theParameter Value of parameter on the referenced curve.
* \param takeOrientationIntoAccount flag that tells if it is necessary
* to take the curve's orientation into account.
* \return New GEOM_Object, containing the created point.
*/
GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve,
in double theParameter);
in double theParameter,
in boolean takeOrientationIntoAccount);
/*!
* \brief Create a point, corresponding to the given length on the given curve.
@ -1439,13 +1442,17 @@ module GEOM
* to project the total length of the wire. If it is negative the
* projection is not scaled and natural wire length is kept for
* the projection.
* \param theAngleRotation the desired angle between the tangent vector
* to the first curve at the first point of the theObject's
* projection in 2D space and U-direction of cylinder's 2D space.
* \return A wire or a face or a compound of faces that represents a
* projection of the source shape onto a cylinder.
*/
GEOM_Object MakeProjectionOnCylinder (in GEOM_Object theObject,
in double theRadius,
in double theStartAngle,
in double theAngleLength);
in double theAngleLength,
in double theAngleRotation);
};
/*!
@ -1801,9 +1808,13 @@ module GEOM
* should be equal to number of bases or list of locations can be empty.
* \param thePath - Path shape to extrude the base shape along it.
* \param theWithContact - the mode defining that the section is translated to be in
* contact with the spine.
* contact with the spine. Ignored if IsBySteps is set.
* \param theWithCorrection - defining that the section is rotated to be
* orthogonal to the spine tangent in the correspondent point
* orthogonal to the spine tangent in
* the correspondent point. Ignored if IsBySteps is set.
* \param IsBySteps - flag that tells if the result should be created
* step by step or as a whole. If IsBySteps is set no correction
* of bases is allowed.
* \param IsGenerateGroups flag that tells if it is necessary to
* return groups (true) or not (false).
* \return The list of objects. The first one is a result pipe,
@ -1816,6 +1827,7 @@ module GEOM
in GEOM_Object thePath,
in boolean theWithContact ,
in boolean theWithCorrection,
in boolean IsBySteps,
in boolean IsGenerateGroups);
/*!
@ -4204,6 +4216,7 @@ module GEOM
// VERTEX
VERTEX,
// ADVANCED shapes
LCS,
/*! all advanced shapes (temporary implementation) */
ADVANCED
};
@ -4448,6 +4461,21 @@ module GEOM
in long theCheckLevel,
out ListOfLong theIntersections);
/*!
* \brief Detect self-intersections of the given shape with algorithm based on mesh intersections.
* \param theShape Shape to check validity of.
* \param theDeflection Linear deflection coefficient that specifies quality of tesselation.
* \param theTolerance Specifies a distance between sub-shapes used for detecting gaps:
* - if \a theTolerance <= 0, algorithm detects intersections
* - if \a theTolerance > 0, algorithm detects gaps
* \param theIntersections Output. List of intersected sub-shapes IDs, it contains pairs of IDs.
* \return TRUE, if the shape does not have any self-intersections.
*/
boolean CheckSelfIntersectionsFast (in GEOM_Object theShape,
in float theDeflection,
in double theTolerance,
out ListOfLong theIntersections);
/*!
* \brief Detect intersections of the given shapes with algorithm based on mesh intersections.
* \param theShape1 First source object

View File

@ -35,6 +35,7 @@ SET( _res_files
GEOM.config
GEOMDS_Resources
ShHealing
Y14.5M-2009.ttf
3dsketch.png
isoline.png
isoline_v.png
@ -113,6 +114,7 @@ SET( _res_files
fuse_collinear_edges.png
geometry.png
import_picture.png
import.png
limit_tolerance.png
line.png
line2points.png

View File

@ -92,12 +92,13 @@
<!-- Dimension presentation properties -->
<parameter name="dimensions_color" value="#ffffff" />
<parameter name="dimensions_line_width" value="1" />
<parameter name="dimensions_font_height" value="10" />
<parameter name="dimensions_font" value="Y14.5M-2009,14" />
<parameter name="dimensions_arrow_length" value="5" />
<parameter name="dimensions_show_units" value="0" />
<parameter name="dimensions_length_units" value="m" />
<parameter name="dimensions_angle_units" value="deg" />
<parameter name="dimensions_default_flyout" value="20" />
<parameter name="dimensions_use_text3d" value="0" />
<!-- Scalar bar for field step presentation -->
<parameter name="scalar_bar_x_position" value="0.05" />

BIN
resources/Y14.5M-2009.ttf Normal file

Binary file not shown.

BIN
resources/import.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -335,11 +335,11 @@ void AdvancedGUI_DividedDiskDlg::SetEditCurrentArgument()
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
if (myEditCurrentArgument == GroupPntVecR->LineEdit2) {
globalSelection(); // close local contexts, if any
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
localSelection(TopAbs_EDGE);
}
else {
globalSelection(); // close local contexts, if any
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
localSelection(TopAbs_VERTEX);
}
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
this, SLOT(SelectionIntoArgument()));

View File

@ -642,7 +642,7 @@ void AdvancedGUI_PipeTShapeDlg::SetEditCurrentArgument()
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
//globalSelection(GEOM_POINT);
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
this, SLOT(SelectionIntoArgument()));
}

View File

@ -120,7 +120,7 @@ void AdvancedGUI_SmoothingSurfaceDlg::Init()
showOnlyPreviewControl();
globalSelection();
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
//@@ initialize dialog box widgets here @@//
// Signal/slot connections
@ -163,7 +163,7 @@ bool AdvancedGUI_SmoothingSurfaceDlg::ClickOnApply()
initName();
globalSelection();
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
return true;
}
@ -175,7 +175,7 @@ void AdvancedGUI_SmoothingSurfaceDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
globalSelection();
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
//displayPreview();
}
@ -363,6 +363,6 @@ void AdvancedGUI_SmoothingSurfaceDlg::SetEditCurrentArgument()
myEditCurrentArgument = GroupPoints->LineEdit1;
myEditCurrentArgument->setFocus();
globalSelection();
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
SelectionIntoArgument();
}

View File

@ -36,10 +36,13 @@
#include "GEOM_Operation.h"
#include "GEOMBase.h"
#include "GEOM_Displayer.h"
#include "GEOM_GenericObjPtr.h"
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(BREPPlugin)
typedef GEOM::GenericObjPtr<GEOM::IBREPOperations> BREPOpPtr;
//=======================================================================
// function : BREPPlugin_GUI()
// purpose : Constructor
@ -111,8 +114,8 @@ bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "BREPPluginEngine" );
GEOM::IBREPOperations_var brepOp = GEOM::IBREPOperations::_narrow( op );
if ( CORBA::is_nil( brepOp ) ) return false;
BREPOpPtr brepOp = GEOM::IBREPOperations::_narrow( op );
if ( brepOp.isNull() ) return false;
QStringList fileNames = app->getOpenFileNames( SUIT_FileDlg::getLastVisitedPath().isEmpty() ? QDir::currentPath() : QString(""),
tr( "BREP_FILES" ),
@ -126,7 +129,7 @@ bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
foreach( QString fileName, fileNames )
{
SUIT_OverrideCursor wc;
GEOM_Operation transaction( app, brepOp.in() );
GEOM_Operation transaction( app, brepOp.get() );
try
{
@ -145,6 +148,7 @@ bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
entryList.append( so->GetID() );
transaction.commit();
GEOM_Displayer( study ).Display( main.in() );
main->UnRegister();
}
else
{
@ -183,8 +187,8 @@ bool BREPPlugin_GUI::exportBREP( SUIT_Desktop* parent )
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "BREPPluginEngine" );
GEOM::IBREPOperations_var brepOp = GEOM::IBREPOperations::_narrow( op );
if ( CORBA::is_nil( brepOp ) ) return false;
BREPOpPtr brepOp = GEOM::IBREPOperations::_narrow( op );
if ( brepOp.isNull() ) return false;
LightApp_SelectionMgr* sm = app->selectionMgr();
if ( !sm ) return false;
@ -212,7 +216,7 @@ bool BREPPlugin_GUI::exportBREP( SUIT_Desktop* parent )
SUIT_OverrideCursor wc;
GEOM_Operation transaction( app, brepOp.in() );
GEOM_Operation transaction( app, brepOp.get() );
try
{

View File

@ -330,7 +330,7 @@ void BasicGUI_ArcDlg::SelectionIntoArgument()
void BasicGUI_ArcDlg::SetEditCurrentArgument()
{
globalSelection(); // close local selection to clear it
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
QPushButton* send = (QPushButton*)sender();
switch ( getConstructorId() ) {
@ -580,7 +580,7 @@ void BasicGUI_ArcDlg::ConstructorsClicked( int constructorId )
}
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); //Select Vertex on All Shapes
localSelection( TopAbs_VERTEX ); //Select Vertex on All Shapes
qApp->processEvents();
updateGeometry();

View File

@ -283,7 +283,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
myEditCurrentArgument->setFocus();
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
@ -471,7 +471,7 @@ void BasicGUI_CircleDlg::SetEditCurrentArgument()
TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) ?
TopAbs_EDGE : TopAbs_VERTEX;
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), aNeedType );
localSelection( aNeedType );
myEditCurrentArgument->setFocus();
// SelectionIntoArgument();

View File

@ -280,15 +280,15 @@ void BasicGUI_CurveDlg::SetEditCurrentArgument()
if (sender() == myGroupPoints->PushButton1) {
myEditCurrentArgument = myGroupPoints->LineEdit1;
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
localSelection(TopAbs_VERTEX);
}
else if (sender() == myPushBtnV1) {
myEditCurrentArgument = myLineEditV1;
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
localSelection(TopAbs_EDGE);
}
else if (sender() == myPushBtnV2) {
myEditCurrentArgument = myLineEditV2;
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
localSelection(TopAbs_EDGE);
}
myEditCurrentArgument->setFocus();

View File

@ -155,7 +155,7 @@ void BasicGUI_EllipseDlg::Init()
initName( tr( "GEOM_ELLIPSE" ) );
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
resize( minimumSizeHint() );
SelectionIntoArgument();
@ -212,7 +212,7 @@ bool BasicGUI_EllipseDlg::ClickOnApply()
myEditCurrentArgument = GroupPoints->LineEdit1;
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
displayPreview(true);
return true;
@ -303,7 +303,7 @@ void BasicGUI_EllipseDlg::SetEditCurrentArgument()
myEditCurrentArgument == GroupPoints->LineEdit3 ) ?
TopAbs_EDGE : TopAbs_VERTEX;
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), aNeedType );
localSelection( aNeedType );
myEditCurrentArgument->setFocus();
//SelectionIntoArgument();
@ -333,7 +333,7 @@ void BasicGUI_EllipseDlg::ActivateThisDialog()
myDir.nullify();
//globalSelection( GEOM_POINT );
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
}
//=================================================================================

View File

@ -220,7 +220,7 @@ void BasicGUI_LineDlg::ConstructorsClicked( int constructorId )
myEditCurrentArgument == GroupFaces->LineEdit2 ) ?
TopAbs_FACE : TopAbs_VERTEX;
globalSelection(); // close local selection to clear it
localSelection( GEOM::GEOM_Object::_nil(), aNeedType );
localSelection( aNeedType );
qApp->processEvents();
updateGeometry();
@ -318,7 +318,7 @@ void BasicGUI_LineDlg::SetEditCurrentArgument()
myEditCurrentArgument == GroupFaces->LineEdit2 ) ?
TopAbs_FACE : TopAbs_VERTEX;
globalSelection(); // close local selection to clear it
localSelection( GEOM::GEOM_Object::_nil(), aNeedType );
localSelection( aNeedType );
myEditCurrentArgument->setFocus();
// SelectionIntoArgument();

View File

@ -228,7 +228,7 @@ void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId )
{
if ( myConstructorId == constructorId && myConstructorId == 0 ) {
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
activate( GEOM_MARKER );
return;
}
@ -244,7 +244,7 @@ void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId )
Group2->hide();
aMainGrp->show();
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
activate( GEOM_MARKER );
break;
}
@ -269,7 +269,7 @@ void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId )
Group2->PushButton2->setDown( false );
Group2->PushButton3->setDown( false );
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
myEditCurrentArgument = Group2->LineEdit1;
Group2->LineEdit1->setText( "" );
Group2->LineEdit2->setText( "" );
@ -442,7 +442,7 @@ void BasicGUI_MarkerDlg::SetEditCurrentArgument()
}
else if ( send == Group2->PushButton1 ) {
myEditCurrentArgument = Group2->LineEdit1;
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
Group2->PushButton2->setDown( false );
Group2->PushButton3->setDown( false );
Group2->LineEdit1->setEnabled( true );
@ -451,7 +451,7 @@ void BasicGUI_MarkerDlg::SetEditCurrentArgument()
}
else if ( send == Group2->PushButton2 ) {
myEditCurrentArgument = Group2->LineEdit2;
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE );
localSelection( TopAbs_EDGE );
Group2->PushButton1->setDown( false );
Group2->PushButton3->setDown( false );
Group2->LineEdit1->setEnabled( false );
@ -460,7 +460,7 @@ void BasicGUI_MarkerDlg::SetEditCurrentArgument()
}
else if ( send == Group2->PushButton3 ) {
myEditCurrentArgument = Group2->LineEdit3;
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE );
localSelection( TopAbs_EDGE );
Group2->PushButton1->setDown( false );
Group2->PushButton2->setDown( false );
Group2->LineEdit1->setEnabled( false );

View File

@ -291,7 +291,7 @@ void BasicGUI_PlaneDlg::ConstructorsClicked( int constructorId )
/* for the first argument */
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
break;
}
case 1: /* plane from 3 points */
@ -315,7 +315,7 @@ void BasicGUI_PlaneDlg::ConstructorsClicked( int constructorId )
/* for the first argument */
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
break;
}
case 2: /* plane from a planar face */
@ -331,7 +331,7 @@ void BasicGUI_PlaneDlg::ConstructorsClicked( int constructorId )
GroupFace->PushButton1->setDown( true );
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_FACE );
localSelection( TopAbs_FACE );
break;
}
case 3: /* plane from a 2 Vectors */
@ -347,7 +347,7 @@ void BasicGUI_PlaneDlg::ConstructorsClicked( int constructorId )
Group2Vec->PushButton1->setDown( true );
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE );
localSelection( TopAbs_EDGE );
break;
}
case 4: /* plane from a LCS */
@ -575,7 +575,7 @@ void BasicGUI_PlaneDlg::SetEditCurrentArgument()
if ( myEditCurrentArgument == GroupPntDir->LineEdit2 ||
myEditCurrentArgument == Group2Vec->LineEdit1 ||
myEditCurrentArgument == Group2Vec->LineEdit2 ) {
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE );
localSelection( TopAbs_EDGE );
} else if ( myEditCurrentArgument == GroupFace->LineEdit1 ) {
TColStd_MapOfInteger aMap;
aMap.Add( GEOM_PLANE );
@ -585,7 +585,7 @@ void BasicGUI_PlaneDlg::SetEditCurrentArgument()
globalSelection( GEOM_MARKER );
}
else { // 3 Pnts
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
}
// SelectionIntoArgument();

View File

@ -125,13 +125,17 @@ BasicGUI_PointDlg::BasicGUI_PointDlg(GeometryGUI* theGeometryGUI, QWidget* paren
GroupXYZ->TextLabel2->setText(tr("GEOM_Y"));
GroupXYZ->TextLabel3->setText(tr("GEOM_Z"));
GroupOnCurve = new DlgRef_2Sel1Spin(centralWidget());
GroupOnCurve = new DlgRef_2Sel1Spin2Check(centralWidget());
GroupOnCurve->GroupBox1->setTitle(tr("GEOM_POINT_ON_EDGE"));
GroupOnCurve->TextLabel1->setText(tr("GEOM_EDGE"));
GroupOnCurve->TextLabel2->setText(tr("GEOM_START_POINT"));
GroupOnCurve->TextLabel3->setText(tr("GEOM_PARAMETER"));
GroupOnCurve->PushButton1->setIcon(image2);
GroupOnCurve->PushButton2->setIcon(image2);
GroupOnCurve->TextLabel3->setText(tr("GEOM_PARAMETER"));
GroupOnCurve->CheckButton1->setText(tr("GEOM_TAKE_ORIENTATION_INTO_ACCOUNT"));
GroupOnCurve->CheckButton2->setAttribute( Qt::WA_DeleteOnClose );
GroupOnCurve->CheckButton2->close();
GroupOnSurface = new DlgRef_1Sel2Spin(centralWidget());
GroupOnSurface->GroupBox1->setTitle(tr("GEOM_POINT_ON_FACE"));
@ -258,6 +262,7 @@ void BasicGUI_PointDlg::Init()
initSpinBox(GroupOnCurve->SpinBox_DX, 0., 1., step, "parametric_precision");
GroupOnCurve->SpinBox_DX->setValue(0.5);
GroupOnCurve->CheckButton1->setChecked(true);
initSpinBox(GroupOnSurface->SpinBox_DX, 0., 1., step, "parametric_precision");
GroupOnSurface->SpinBox_DX->setValue(0.5);
@ -275,6 +280,8 @@ void BasicGUI_PointDlg::Init()
connect(myParamCoord, SIGNAL(buttonClicked(int)), this, SLOT(ClickParamCoord(int)));
connect(GroupOnCurve->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(CheckBoxClicked()));
connect(GroupOnCurve->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(GroupOnCurve->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(GroupOnSurface->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
@ -328,7 +335,7 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId)
{
globalSelection(); // close local contexts, if any
myNeedType = TopAbs_VERTEX;
localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
localSelection(myNeedType);
GroupRefPoint->hide();
GroupOnCurve->hide();
@ -343,7 +350,7 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId)
{
globalSelection(); // close local contexts, if any
myNeedType = TopAbs_VERTEX;
localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
localSelection(myNeedType);
myEditCurrentArgument = GroupRefPoint->LineEdit1;
myEditCurrentArgument->setText("");
@ -362,7 +369,7 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId)
{
globalSelection(); // close local contexts, if any
myNeedType = TopAbs_EDGE;
localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
localSelection(myNeedType);
myEditCurrentArgument = GroupOnCurve->LineEdit1;
myEditCurrentArgument->setText("");
@ -385,7 +392,7 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId)
globalSelection(); // close local contexts, if any
std::list<int> needTypes;
needTypes.push_back( TopAbs_EDGE ), needTypes.push_back( TopAbs_WIRE );
localSelection(GEOM::GEOM_Object::_nil(), needTypes );
localSelection(needTypes );
myEditCurrentArgument = GroupLineIntersection->LineEdit1;
GroupLineIntersection->LineEdit1->setText("");
@ -409,7 +416,7 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId)
{
globalSelection(); // close local contexts, if any
myNeedType = TopAbs_FACE;
localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
localSelection(myNeedType);
myEditCurrentArgument = GroupOnSurface->LineEdit1;
myEditCurrentArgument->setText("");
@ -568,14 +575,14 @@ void BasicGUI_PointDlg::SetEditCurrentArgument()
GroupRefPoint->LineEdit1->setFocus();
myEditCurrentArgument = GroupRefPoint->LineEdit1;
globalSelection(); // close local contexts, if any
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
localSelection(TopAbs_VERTEX);
}
else if (send == GroupOnCurve->PushButton1) {
GroupOnCurve->LineEdit1->setFocus();
myEditCurrentArgument = GroupOnCurve->LineEdit1;
globalSelection(); // close local contexts, if any
myNeedType = TopAbs_EDGE;
localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
localSelection(myNeedType);
GroupOnCurve->PushButton2->setDown(false);
GroupOnCurve->LineEdit1->setEnabled(true);
GroupOnCurve->LineEdit2->setEnabled(false);
@ -585,7 +592,7 @@ void BasicGUI_PointDlg::SetEditCurrentArgument()
myEditCurrentArgument = GroupOnCurve->LineEdit2;
globalSelection(); // close local contexts, if any
myNeedType = TopAbs_VERTEX;
localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
localSelection(myNeedType);
GroupOnCurve->PushButton1->setDown(false);
GroupOnCurve->LineEdit2->setEnabled(true);
GroupOnCurve->LineEdit1->setEnabled(false);
@ -595,7 +602,7 @@ void BasicGUI_PointDlg::SetEditCurrentArgument()
GroupOnSurface->LineEdit1->setFocus();
myEditCurrentArgument = GroupOnSurface->LineEdit1;
globalSelection(); // close local contexts, if any
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_FACE);
localSelection(TopAbs_FACE);
}
else if (send == GroupLineIntersection->PushButton1) {
GroupLineIntersection->LineEdit1->setFocus();
@ -669,7 +676,7 @@ void BasicGUI_PointDlg::ValueChangedInSpinBox(double newValue)
// function : CheckBoxClicked()
// purpose : Check Boxes Management
//=================================================================================
void BasicGUI_PointDlg::CheckBoxClicked(int State)
void BasicGUI_PointDlg::CheckBoxClicked()
{
displayPreview(true);
}
@ -821,7 +828,9 @@ bool BasicGUI_PointDlg::execute(ObjectList& objects)
case GEOM_POINT_EDGE :
{
if (myParamCoord->checkedId() == PARAM_VALUE) {
anObj = anOper->MakePointOnCurve(myEdge.get(), getParameter());
bool isUseOrientation = GroupOnCurve->CheckButton1->isChecked();
anObj = anOper->MakePointOnCurve(myEdge.get(), getParameter(), isUseOrientation);
aParameters<<GroupOnCurve->SpinBox_DX->text();
}
else if (myParamCoord->checkedId() == LENGTH_VALUE) {
@ -973,6 +982,7 @@ void BasicGUI_PointDlg::updateParamCoord(bool theIsUpdate)
GroupOnCurve->LineEdit2->setVisible(isLength);
GroupOnCurve->TextLabel3->setVisible(isParam || isLength);
GroupOnCurve->SpinBox_DX->setVisible(isParam || isLength);
GroupOnCurve->CheckButton1->setVisible(isParam);
if (isParam){
initSpinBox(GroupOnCurve->SpinBox_DX, 0., 1., 0.1, "parametric_precision");
GroupOnCurve->SpinBox_DX->setValue(0.5);

View File

@ -31,7 +31,7 @@
#include "GEOM_GenericObjPtr.h"
#include <QMap>
class DlgRef_2Sel1Spin;
class DlgRef_2Sel1Spin2Check;
class DlgRef_3Spin;
class DlgRef_2Sel;
class DlgRef_1Sel3Spin;
@ -88,7 +88,7 @@ private:
DlgRef_3Spin* GroupXYZ;
DlgRef_1Sel3Spin* GroupRefPoint;
DlgRef_2Sel1Spin* GroupOnCurve;
DlgRef_2Sel1Spin2Check* GroupOnCurve;
DlgRef_2Sel* GroupLineIntersection;
DlgRef_1Sel2Spin* GroupOnSurface;
@ -115,7 +115,7 @@ private slots:
void ValueChangedInSpinBox( double );
void SetDoubleSpinBoxStep( double );
void ClickParamCoord( int );
void CheckBoxClicked( int );
void CheckBoxClicked();
void updateSize();
};

View File

@ -204,7 +204,7 @@ void BasicGUI_VectorDlg::ConstructorsClicked( int constructorId )
GroupPoints->LineEdit2->setEnabled( false );
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
connect( myGeomGUI->getApp()->selectionMgr(),
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
break;
@ -325,7 +325,7 @@ void BasicGUI_VectorDlg::SetEditCurrentArgument()
myEditCurrentArgument->setFocus();
// SelectionIntoArgument();
globalSelection(); // close local selection to clear it
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
send->setDown(true);
displayPreview(true);
}

View File

@ -88,6 +88,37 @@
#include "utilities.h"
//=======================================================================
//function : IsToMerge
//purpose : This method return Standard_True if two edges have common
// vertex. This vertex is returned by output parameter. The
// difference with the method TopExp::CommonVertex is only in
// the case if there are two common vertices. In this case
// this method returns the last vertex of theEdge1, not the first
// one that TopExp::CommonVertex does.
//=======================================================================
static Standard_Boolean GetCommonVertex(const TopoDS_Edge &theEdge1,
const TopoDS_Edge &theEdge2,
TopoDS_Vertex &theCommon)
{
Standard_Boolean isFound = Standard_True;
ShapeAnalysis_Edge aSae;
TopoDS_Vertex aVF1 = aSae.FirstVertex(theEdge1);
TopoDS_Vertex aVL1 = aSae.LastVertex(theEdge1);
TopoDS_Vertex aVF2 = aSae.FirstVertex(theEdge2);
TopoDS_Vertex aVL2 = aSae.LastVertex(theEdge2);
if (aVL1.IsSame(aVF2) || aVL1.IsSame(aVL2)) {
theCommon = aVL1;
} else if (aVF1.IsSame(aVL2) || aVF1.IsSame(aVF2)) {
theCommon = aVF1;
} else {
theCommon.Nullify();
isFound = Standard_False;
}
return isFound;
}
//=======================================================================
//function : IsToMerge
@ -148,7 +179,7 @@ static Standard_Boolean IsToMerge
// that are connected to the common vertex.
TopoDS_Vertex aVCommon;
if (TopExp::CommonVertex(theEdge1, theEdge2, aVCommon)) {
if (GetCommonVertex(theEdge1, theEdge2, aVCommon)) {
TopTools_IndexedDataMapOfShapeListOfShape aMapVE;
TopExp::MapShapesAndAncestors
@ -328,7 +359,7 @@ static TopoDS_Edge GlueEdgesWithPCurves(const TopTools_SequenceOfShape& aChain,
if (i > 1)
{
TopExp::CommonVertex(PrevEdge, anEdge, CV);
GetCommonVertex(PrevEdge, anEdge, CV);
Standard_Real Tol = BRep_Tool::Tolerance(CV);
tabtolvertex(i-2) = Tol;
}

View File

@ -138,8 +138,9 @@ static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges,
{
//map of edges
TopTools_MapOfShape aNewEdges;
TopExp_Explorer exp(aShape,TopAbs_EDGE);
//add edges without seams
for(TopExp_Explorer exp(aShape,TopAbs_EDGE); exp.More(); exp.Next()) {
for(; exp.More(); exp.Next()) {
TopoDS_Shape edge = exp.Current();
if(aNewEdges.Contains(edge))
aNewEdges.Remove(edge);
@ -164,9 +165,14 @@ static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges,
}
}
//add edges to the sequemce
for(TopTools_MapIteratorOfMapOfShape anIter(aNewEdges); anIter.More(); anIter.Next())
edges.Append(anIter.Key());
//add edges to the sequence
for(exp.ReInit(); exp.More(); exp.Next()) {
const TopoDS_Shape &anEdge = exp.Current();
if (aNewEdges.Contains(anEdge)) {
edges.Append(anEdge);
}
}
return isDropped;
}

View File

@ -387,7 +387,7 @@ void BlocksGUI_BlockDlg::SetEditCurrentArgument()
aSender->setDown(true);
globalSelection(); // close local contexts, if any
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_FACE); //Select Faces on All Shapes
localSelection(TopAbs_FACE); //Select Faces on All Shapes
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
this, SLOT(SelectionIntoArgument()));
}
@ -400,7 +400,7 @@ void BlocksGUI_BlockDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
globalSelection(); // close local contexts, if any
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_FACE); //Select Faces on All Shapes
localSelection(TopAbs_FACE); //Select Faces on All Shapes
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
this, SLOT(SelectionIntoArgument()));
displayPreview(true);

View File

@ -46,7 +46,7 @@
// purpose : Constructs a BlocksGUI_ExplodeDlg which is a child of 'parent'.
//=================================================================================
BlocksGUI_ExplodeDlg::BlocksGUI_ExplodeDlg( GeometryGUI* theGeometryGUI, QWidget* parent )
: GEOMBase_Skeleton( theGeometryGUI, parent )
: GEOMBase_Skeleton( theGeometryGUI, parent ), myNbBlocks( 0 )
{
QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_BLOCK_EXPLODE" ) ) );
QPixmap imageS( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
@ -189,7 +189,7 @@ bool BlocksGUI_ExplodeDlg::ClickOnApply()
}
}
if ( !onAccept() )
if ( !onAccept( true, true, false ) )
return false;
activateSelection();
@ -351,7 +351,7 @@ void BlocksGUI_ExplodeDlg::updateButtonState()
//=================================================================================
bool BlocksGUI_ExplodeDlg::isAllSubShapes() const
{
return !myGrp1->CheckBox1->isChecked() || !myGrp1->CheckBox1->isEnabled();
return !(myGrp1->CheckBox1->isEnabled() && myGrp1->CheckBox1->isChecked());
}
//=================================================================================

View File

@ -466,11 +466,11 @@ void BlocksGUI_QuadFaceDlg::activateSelection()
myEditCurrentArgument == mySelName[Vertex3] ||
myEditCurrentArgument == mySelName[Vertex4])
{
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX); //Select Vertices on All Shapes
localSelection(TopAbs_VERTEX); //Select Vertices on All Shapes
}
else
{
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE); //Select Edges on All Shapes
localSelection(TopAbs_EDGE); //Select Edges on All Shapes
}
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
this, SLOT(SelectionIntoArgument()));

View File

@ -219,7 +219,6 @@ bool BlocksGUI_TrsfDlg::ClickOnApply()
//=================================================================================
void BlocksGUI_TrsfDlg::SelectionIntoArgument()
{
erasePreview();
myEditCurrentArgument->setText("");
// Get index of current selection focus
@ -273,7 +272,6 @@ void BlocksGUI_TrsfDlg::SelectionIntoArgument()
}
myEditCurrentArgument->setText(aName);
myFaces[aCurrFocus] = anIndex;
processPreview();
}
switch (aCurrFocus) {
@ -316,6 +314,8 @@ void BlocksGUI_TrsfDlg::SelectionIntoArgument()
default:
break;
}
processPreview();
}
//=================================================================================
@ -379,6 +379,8 @@ void BlocksGUI_TrsfDlg::SetEditCurrentArgument()
aSender->setDown(true);
activateSelection();
processPreview();
}
//=================================================================================

View File

@ -198,10 +198,7 @@ void BooleanGUI_Dialog::Init()
mainFrame()->RadioButton1->setFocus();
globalSelection(GEOM_ALLSHAPES);
std::list<int> needTypes;
needTypes.push_back( TopAbs_VERTEX ), needTypes.push_back( TopAbs_EDGE ), needTypes.push_back( TopAbs_WIRE ), needTypes.push_back( TopAbs_FACE ), needTypes.push_back( TopAbs_SHELL ), needTypes.push_back( TopAbs_SOLID ), needTypes.push_back( TopAbs_COMPOUND );
localSelection(GEOM::GEOM_Object::_nil(), needTypes );
//localSelection(TopAbs_SHAPE); // VSR 24/09/2015: dectivate local selection in BOP (CoTech decision)
myGroup->PushButton1->click();
resize(100,100);
@ -341,10 +338,7 @@ void BooleanGUI_Dialog::SetEditCurrentArgument()
}
globalSelection(GEOM_ALLSHAPES);
std::list<int> needTypes;
needTypes.push_back( TopAbs_VERTEX ), needTypes.push_back( TopAbs_EDGE ), needTypes.push_back( TopAbs_WIRE ), needTypes.push_back( TopAbs_FACE ), needTypes.push_back( TopAbs_SHELL ), needTypes.push_back( TopAbs_SOLID ), needTypes.push_back( TopAbs_COMPOUND );
localSelection(GEOM::GEOM_Object::_nil(), needTypes );
//localSelection(TopAbs_SHAPE); // VSR 24/09/2015: dectivate local selection in BOP (CoTech decision)
// enable line edit
myEditCurrentArgument->setEnabled(true);

View File

@ -145,7 +145,7 @@ void BuildGUI_EdgeDlg::Init()
myEditCurrentArgument = GroupPoints->LineEdit1;
GroupPoints->PushButton1->setDown(true);
globalSelection(); // close local contexts, if any
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
localSelection(TopAbs_VERTEX);
// signals and slots connections
connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
@ -210,7 +210,7 @@ void BuildGUI_EdgeDlg::ConstructorsClicked(int constructorId)
case 0:
{
globalSelection(); // close local contexts, if any
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
localSelection(TopAbs_VERTEX);
myEditCurrentArgument = GroupPoints->LineEdit1;
GroupPoints->LineEdit1->setText("");
@ -229,7 +229,7 @@ void BuildGUI_EdgeDlg::ConstructorsClicked(int constructorId)
case 1:
{
globalSelection(); // close local contexts, if any
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_WIRE);
localSelection(TopAbs_WIRE);
myEditCurrentArgument = GroupWire->LineEdit1;
GroupWire->LineEdit1->setText("");
@ -244,7 +244,7 @@ void BuildGUI_EdgeDlg::ConstructorsClicked(int constructorId)
case 2:
{
globalSelection(); // close local contexts, if any
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
localSelection(TopAbs_EDGE);
myEditCurrentArgument = GroupOnCurve->LineEdit1;
GroupOnCurve->LineEdit1->setText("");
@ -302,7 +302,7 @@ void BuildGUI_EdgeDlg::SelectionIntoArgument()
myEditCurrentArgument->setText(aName);
globalSelection();
localSelection(GEOM::GEOM_Object::_nil(), aNeedType);
localSelection(aNeedType);
if (myEditCurrentArgument == GroupPoints->LineEdit1) {
myPoint1 = aSelectedObject;
@ -359,7 +359,7 @@ void BuildGUI_EdgeDlg::SetEditCurrentArgument()
GroupOnCurve->LineEdit2->setEnabled(false);
globalSelection(); // close local contexts, if any
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
localSelection(TopAbs_EDGE);
}
else if (send == GroupOnCurve->PushButton2) {
myEditCurrentArgument = GroupOnCurve->LineEdit2;
@ -367,7 +367,7 @@ void BuildGUI_EdgeDlg::SetEditCurrentArgument()
GroupOnCurve->LineEdit1->setEnabled(false);
globalSelection(); // close local contexts, if any
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
localSelection(TopAbs_VERTEX);
}
// enable line edit

View File

@ -263,7 +263,7 @@ void BuildGUI_FaceDlg::ConstructorsClicked(int constructorId)
case 1:
{
globalSelection(GEOM_FACE); // For the first element.
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_FACE );
localSelection( TopAbs_FACE );
myEditCurrentArgument = myGroupSurf->LineEdit1;
myGroupSurf->LineEdit1->setText("");
@ -277,7 +277,7 @@ void BuildGUI_FaceDlg::ConstructorsClicked(int constructorId)
case 2:
{
globalSelection();
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_WIRE );
localSelection( TopAbs_WIRE );
myTreeConstraints->clear();
myCurrentItem = 0;
@ -323,7 +323,7 @@ void BuildGUI_FaceDlg::updateConstraintsTree()
myEditCurrentArgument->setEnabled(false);
globalSelection();
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_FACE );
localSelection( TopAbs_FACE );
myTreeConstraints->resizeColumnToContents(0);
QTreeWidgetItem* firstItem = myTreeConstraints->topLevelItem(0);
@ -509,21 +509,21 @@ void BuildGUI_FaceDlg::SetEditCurrentArgument()
}
else if (send == myGroupSurf->PushButton1) {
globalSelection(GEOM_FACE);
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_FACE );
localSelection( TopAbs_FACE );
myEditCurrentArgument = myGroupSurf->LineEdit1;
myGroupSurf->PushButton2->setDown(false);
myGroupSurf->LineEdit2->setEnabled(false);
}
else if (send == myGroupSurf->PushButton2) {
globalSelection(GEOM_WIRE);
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_WIRE );
localSelection( TopAbs_WIRE );
myEditCurrentArgument = myGroupSurf->LineEdit2;
myGroupSurf->PushButton1->setDown(false);
myGroupSurf->LineEdit1->setEnabled(false);
}
else if (send == myGroupWireConstraints->PushButton1) {
globalSelection();
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_WIRE );
localSelection( TopAbs_WIRE );
myEditCurrentArgument = myGroupWireConstraints->LineEdit1;
myCurrentItem = 0;
}
@ -659,8 +659,6 @@ bool BuildGUI_FaceDlg::execute( ObjectList& objects )
}
if (!anObj->_is_nil()) {
objects.push_back(anObj._retn());
if ( !anOper->IsDone() && QString(anOper->GetErrorCode()) == "MAKE_FACE_TOLERANCE_TOO_BIG") {
if ( !IsPreview() ) {
SUIT_OverrideCursor wc;
@ -670,6 +668,14 @@ bool BuildGUI_FaceDlg::execute( ObjectList& objects )
}
anOper->SetErrorCode("PAL_NO_ERROR");
}
else if ( anObj->GetShapeType() == GEOM::COMPOUND ) {
if ( !IsPreview() ) {
SUIT_MessageBox::warning(this,
QObject::tr("GEOM_WRN_WARNING"),
QObject::tr("GEOM_WRN_FACES_NOT_FACE"));
}
}
objects.push_back(anObj._retn());
}
return res;

View File

@ -262,10 +262,7 @@ bool BuildGUI_ShellDlg::execute( ObjectList& objects )
GEOM::GEOM_Object_var anObj = anOper->MakeShell( objlist.in() );
if ( !anObj->_is_nil() ) {
TopoDS_Shape aShell;
GEOMBase::GetShape(anObj, aShell, TopAbs_SHELL);
if (aShell.IsNull()) {
if (anObj->GetShapeType() == GEOM::COMPOUND) {
SUIT_MessageBox::warning(this,
QObject::tr("GEOM_WRN_WARNING"),
QObject::tr("GEOM_WRN_FACES_NOT_SHELL"));

View File

@ -121,7 +121,7 @@ void BuildGUI_WireDlg::Init()
myEdgesAndWires.clear();
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE );
localSelection( TopAbs_EDGE );
/* signals and slots connections */
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
@ -177,12 +177,12 @@ void BuildGUI_WireDlg::TypeButtonClicked()
{
if ( GroupType->RadioButton1->isChecked() ) {
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE );
localSelection( TopAbs_EDGE );
GroupArgs->TextLabel1->setText( tr( "GEOM_EDGE" ) );
}
else if ( GroupType->RadioButton2->isChecked() ) {
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_WIRE );
localSelection( TopAbs_WIRE );
GroupArgs->TextLabel1->setText( tr( "GEOM_WIRE" ) );
}
SelectionIntoArgument();

View File

@ -42,11 +42,14 @@ ENDIF()
IF(SALOME_BUILD_GUI)
SET(SUBDIRS_GUI
OBJECT DlgRef GEOMFiltersSelection Material GEOMGUI
GEOMBase DependencyTree GEOMToolsGUI DisplayGUI BasicGUI PrimitiveGUI GenerationGUI
CurveCreator EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI
RepairGUI MeasureGUI GroupGUI BlocksGUI AdvancedGUI
GEOMBase GEOMToolsGUI DisplayGUI BasicGUI PrimitiveGUI GenerationGUI
CurveCreator MeasureGUI EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI
RepairGUI GroupGUI BlocksGUI AdvancedGUI
GEOM_SWIG_WITHIHM
)
IF(SALOME_USE_GRAPHICSVIEW)
LIST(APPEND SUBDIRS_GUI DependencyTree)
ENDIF()
ENDIF()
SET(SUBDIRS

View File

@ -39,6 +39,7 @@ INCLUDE_DIRECTORIES(
${PROJECT_SOURCE_DIR}/src/GEOMImpl
${PROJECT_SOURCE_DIR}/src/GEOMGUI
${PROJECT_SOURCE_DIR}/src/GEOMBase
${PROJECT_SOURCE_DIR}/src/MeasureGUI
${PROJECT_SOURCE_DIR}/src/SKETCHER
${PROJECT_SOURCE_DIR}/src/CurveCreator
${PROJECT_SOURCE_DIR}/src/ShapeRecognition
@ -67,6 +68,7 @@ SET(_link_LIBRARIES
DlgRef
GEOMSketcher
CurveCreator
MeasureGUI
)
# optional sources

View File

@ -327,7 +327,7 @@ void EntityGUI_3DSketcherDlg::Init()
myLengthPrs = dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
myTextPrs = dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
localSelection(TopAbs_VERTEX);
/* Get setting of step value from file configuration */
double step = SUIT_Session::session()->resourceMgr()->doubleValue("Geometry", "SettingsGeomStep", 100.0);
@ -823,7 +823,7 @@ void EntityGUI_3DSketcherDlg::ActivateThisDialog()
connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
localSelection(TopAbs_VERTEX);
GEOMBase_Helper::displayPreview(true, false, true, true, myLineWidth);
}

View File

@ -541,7 +541,7 @@ void EntityGUI_SketcherDlg::InitClick()
Group4Spin->hide();
GroupRect->hide();
globalSelection(); // close local selection to clear it
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
localSelection( TopAbs_VERTEX );
}
@ -1571,7 +1571,7 @@ void EntityGUI_SketcherDlg::SetEditCurrentArgument()
selButton->setDown(true);
}
globalSelection(); // close local selection to clear it
localSelection(GEOM::GEOM_Object::_nil(), myNeedType);
localSelection( myNeedType );
}

View File

@ -30,6 +30,9 @@
#include <GeometryGUI.h>
#include <GEOMBase.h>
#include <GEOMUtils.hxx>
#ifndef DISABLE_PLOT2DVIEWER
#include <MeasureGUI_ShapeStatisticsDlg.h>
#endif
#include <OCCViewer_ViewModel.h>
#include <SVTK_ViewModel.h>
@ -165,6 +168,9 @@ EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg(GeometryGUI* theGeometryGUI, QWidge
myLessFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
myGreaterFilterSpin = new SalomeApp_DoubleSpinBox(myFilterGrp);
myApplyFilterButton = new QPushButton(tr("GEOM_BUT_APPLY"), myFilterGrp);
#ifndef DISABLE_PLOT2DVIEWER
myPlotDistributionButton = new QPushButton(tr("GEOM_PLOT_DISTRIBUTION"), myFilterGrp);
#endif
QGridLayout* filterLayout = new QGridLayout(myFilterGrp);
filterLayout->addWidget(myLessFilterCheck, 0, 0);
@ -174,6 +180,9 @@ EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg(GeometryGUI* theGeometryGUI, QWidge
filterLayout->addWidget(myGreaterFilterCombo, 1, 1);
filterLayout->addWidget(myGreaterFilterSpin, 1, 2);
filterLayout->addWidget(myApplyFilterButton, 0, 3);
#ifndef DISABLE_PLOT2DVIEWER
filterLayout->addWidget(myPlotDistributionButton, 1, 3);
#endif
QVBoxLayout* layout = new QVBoxLayout(centralWidget());
layout->setMargin(0); layout->setSpacing(6);
@ -250,6 +259,9 @@ void EntityGUI_SubShapeDlg::Init()
connect(GroupPoints->PushButton4, SIGNAL(clicked()), this, SLOT(showOnlySelected()));
connect(myApplyFilterButton, SIGNAL(clicked()), this, SLOT(ClickOnOkFilter()));
#ifndef DISABLE_PLOT2DVIEWER
connect(myPlotDistributionButton, SIGNAL(clicked()), this, SLOT(ClickOnPlot()));
#endif
connect(myLessFilterCheck, SIGNAL(stateChanged(int)), this, SLOT(MeasureToggled()));
connect(myGreaterFilterCheck, SIGNAL(stateChanged(int)), this, SLOT(MeasureToggled()));
@ -322,7 +334,7 @@ void EntityGUI_SubShapeDlg::ClickOnOk()
}
if (isOk)
isOk = onAccept();
isOk = onAccept( true, true, false );
if (isOk)
ClickOnCancel();
@ -491,6 +503,13 @@ void EntityGUI_SubShapeDlg::SubShapeToggled()
GroupPoints->CheckButton1->isChecked() &&
shapeType() < GEOM::VERTEX);
#ifndef DISABLE_PLOT2DVIEWER
myPlotDistributionButton->setEnabled( myFilterGrp->isEnabled() &&
( shapeType() == TopAbs_EDGE ||
shapeType() == TopAbs_FACE ||
shapeType() == TopAbs_SOLID ) );
#endif
activateSelection();
}
@ -936,6 +955,20 @@ void EntityGUI_SubShapeDlg::ClickOnOkFilter()
updateButtonState();
}
#ifndef DISABLE_PLOT2DVIEWER
//=================================================================================
// function : ClickOnPlot()
// purpose : opens "Shape Statistics" dialog box in order to plot sub-shapes distribution.
//=================================================================================
void EntityGUI_SubShapeDlg::ClickOnPlot()
{
QDialog* dlg = new MeasureGUI_ShapeStatisticsDlg( this, myShape, (TopAbs_ShapeEnum)shapeType() );
if ( dlg ) {
dlg->show();
}
}
#endif
//=================================================================================
// function : MeasureToggled()
// purpose :

View File

@ -73,6 +73,9 @@ private slots:
void showOnlySelected();
void ClickOnOkFilter();
#ifndef DISABLE_PLOT2DVIEWER
void ClickOnPlot();
#endif
void MeasureToggled();
private:
@ -102,6 +105,7 @@ private:
SalomeApp_DoubleSpinBox* myLessFilterSpin;
SalomeApp_DoubleSpinBox* myGreaterFilterSpin;
QPushButton* myApplyFilterButton;
QPushButton* myPlotDistributionButton;
QGroupBox* myFilterGrp;
};

View File

@ -144,7 +144,7 @@ namespace GEOM
TPythonDump::operator<< (const std::list<Handle(GEOM_Object)>& theObjects)
{
Standard_Integer aLength = theObjects.size();
if ( aLength > 1 ) {
if ( aLength != 1 ) {
myStream << "[";
}
std::list<Handle(GEOM_Object)>::const_iterator obj = theObjects.begin();
@ -152,7 +152,7 @@ namespace GEOM
*this << *obj;
if ( i < aLength ) myStream << ", ";
}
if ( aLength > 1 ) {
if ( aLength != 1 ) {
myStream << "]";
}
return *this;

View File

@ -59,7 +59,10 @@ SET(GEOMAlgo_HEADERS
GEOMAlgo_DataMapOfPassKeyInteger.hxx
GEOMAlgo_DataMapOfShapeMapOfShape.hxx
GEOMAlgo_DataMapOfShapePnt.hxx
GEOMAlgo_FinderShapeOn.hxx
GEOMAlgo_FinderShapeOn1.hxx
GEOMAlgo_FinderShapeOn2.hxx
GEOMAlgo_FinderShapeOnQuad.hxx
GEOMAlgo_GetInPlace.hxx
GEOMAlgo_GetInPlaceAPI.hxx
GEOMAlgo_GlueAnalyser.hxx
@ -77,6 +80,7 @@ SET(GEOMAlgo_HEADERS
GEOMAlgo_IndexedDataMapOfShapeState.hxx
GEOMAlgo_KindOfBounds.hxx
GEOMAlgo_KindOfClosed.hxx
GEOMAlgo_KindOfDef.hxx
GEOMAlgo_KindOfName.hxx
GEOMAlgo_KindOfShape.hxx
GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx

View File

@ -11,25 +11,28 @@ GEOMAlgo_ShellSolid.cxx
GEOMAlgo_AlgoTools.hxx
GEOMAlgo_AlgoTools.cxx
GEOMAlgo_AlgoTools_1.cxx
GEOMAlgo_AlgoTools_2.cxx
GEOMAlgo_SolidSolid.hxx
GEOMAlgo_SolidSolid.cxx
GEOMAlgo_ShapeAlgo.hxx
GEOMAlgo_ShapeAlgo.cxx
GEOMAlgo_FinderShapeOn.hxx
GEOMAlgo_FinderShapeOn.cxx
GEOMAlgo_FinderShapeOn1.hxx
GEOMAlgo_FinderShapeOn1.cxx
GEOMAlgo_HAlgo.hxx
GEOMAlgo_HAlgo.cxx
GEOMAlgo_Clsf.hxx
GEOMAlgo_Clsf.cxx
GEOMAlgo_ClsfBox.hxx
GEOMAlgo_ClsfBox.cxx
GEOMAlgo_ClsfQuad.hxx
GEOMAlgo_ClsfQuad.cxx
GEOMAlgo_ClsfSolid.hxx
GEOMAlgo_ClsfSolid.cxx
GEOMAlgo_ClsfSurf.hxx
GEOMAlgo_ClsfSurf.cxx
GEOMAlgo_FinderShapeOn2.hxx
GEOMAlgo_FinderShapeOn2.cxx
GEOMAlgo_FinderShapeOnQuad.hxx
GEOMAlgo_FinderShapeOnQuad.cxx
GEOMAlgo_Gluer.hxx
GEOMAlgo_Gluer.cxx
GEOMAlgo_GlueAnalyser.hxx
@ -50,8 +53,6 @@ GEOMAlgo_GetInPlace.cxx
GEOMAlgo_GetInPlace_1.cxx
GEOMAlgo_GetInPlace_2.cxx
GEOMAlgo_GetInPlace_3.cxx
GEOMAlgo_GetInPlaceAPI.hxx
GEOMAlgo_GetInPlaceAPI.cxx
GEOMAlgo_Splitter.hxx
GEOMAlgo_Splitter.cxx
GEOMAlgo_ShapeInfoFiller.hxx
@ -106,3 +107,5 @@ GEOMAlgo_ShapeInfo.cxx
GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx
Basics_OCCTVersion.hxx
GEOMAlgo_KindOfDef.hxx

0
src/GEOMAlgo/GEOMAlgo.cdl Executable file → Normal file
View File

View File

@ -713,7 +713,7 @@ Standard_Integer GEOMAlgo_AlgoTools::FindSDShapes
return 0; // Nothing to do
}
//
while(1) {
for(;;) {
aNbEProcessed=aMProcessed.Extent();
if (aNbEProcessed==aNbE) {
break;
@ -1004,8 +1004,14 @@ Standard_Integer GEOMAlgo_AlgoTools::PntInFace(const TopoDS_Face& aF,
}
//
// 4.
aVx=aVMin;
aNbDomains=aHatcher.NbDomains(aIx);
for (i=1; i<=aNbDomains; ++i) {
if (!aNbDomains) {
iErr=5;
return iErr;
}
//
i=1;
const HatchGen_Domain& aDomain=aHatcher.Domain (aIx, i) ;
bHasFirstPoint=aDomain.HasFirstPoint();
if (!bHasFirstPoint) {
@ -1025,9 +1031,6 @@ Standard_Integer GEOMAlgo_AlgoTools::PntInFace(const TopoDS_Face& aF,
//
aVx=IntTools_Tools::IntermediatePoint(aV1, aV2);
//
break;
}
//
aS->D0(aUx, aVx, aPx);
//
theP2D.SetCoord(aUx, aVx);

View File

@ -62,7 +62,6 @@
#include <BRepLib_MakeFace.hxx>
#include <BRepLib_FaceError.hxx>
//#include <BOPTools_DSFiller.hxx>
#include <GEOMAlgo_WireSolid.hxx>
#include <GEOMAlgo_ShellSolid.hxx>
@ -300,7 +299,6 @@ void GEOMAlgo_FinderShapeOn::Find(const TopoDS_Shape& aS)
{
myErrorStatus=0;
//
Standard_Boolean bIsDone;
Standard_Integer i, iErr;
TopAbs_State aSts[]={TopAbs_IN, TopAbs_OUT, TopAbs_ON};
TopTools_ListIteratorOfListOfShape aIt;

View File

@ -309,6 +309,9 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges()
aType1=myGAS.GetType();
//
TopExp::MapShapes(myShape, TopAbs_EDGE, aM);
//
bIsConformState=Standard_False;
//
aNb=aM.Extent();
for (i=1; i<=aNb; ++i) {
GEOMAlgo_ListOfPnt aLP;
@ -427,6 +430,8 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces()
}
}
//
bIsConformState=Standard_False;
//
aExp.Init(aF, TopAbs_EDGE);
for (; aExp.More(); aExp.Next()) {
const TopoDS_Shape& aE=aExp.Current();
@ -500,6 +505,9 @@ void GEOMAlgo_FinderShapeOn1::ProcessSolids()
const TopoDS_Shape& aSd=aM(i);
aMF.Clear();
TopExp::MapShapes(aSd, TopAbs_FACE, aMF);
//
bIsConformState=Standard_False;
//
aNbF=aMF.Extent();
for (j=1; j<=aNbF; ++j) {
const TopoDS_Shape& aF=aMF(j);
@ -660,7 +668,6 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF,
}// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder)
}// if (!aNb && myNbPntsMin) {
}
//modified by NIZNHY-PKV Thu Jan 26 09:56:20 2012f
//=======================================================================
//function : InnerPoints
//purpose :
@ -676,7 +683,6 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE,
aLP.Clear();
InnerPoints(aE, aNbPntsMin, aLP);
}
//modified by NIZNHY-PKV Thu Jan 26 09:56:32 2012t
//=======================================================================
//function : InnerPoints
//purpose :
@ -702,16 +708,6 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE,
return;
}
//
//modified by NIZNHY-PKV Thu Jan 26 09:51:20 2012f
/*
aNbT=myNbPntsMin+1;
dT=(aT2-aT1)/aNbT;
for (j=1; j<=aNbPntsMin; ++j) {
aT=aT1+j*dT;
aC3D->D0(aT, aP);
aLP.Append(aP);
}
*/
aNbT=aNbPntsMin+1;
dT=(aT2-aT1)/aNbT;
for (j=1; j<aNbT; ++j) {
@ -719,7 +715,6 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE,
aC3D->D0(aT, aP);
aLP.Append(aP);
}
//modified by NIZNHY-PKV Thu Jan 26 09:51:24 2012t
}
//=======================================================================

View File

@ -362,6 +362,8 @@ void GEOMAlgo_FinderShapeOn2::ProcessEdges()
//
const TopoDS_Edge& aE=TopoDS::Edge(aM(i));
//
bIsConformState=Standard_False;
//
aExp.Init(aE, TopAbs_VERTEX);
for (; aExp.More(); aExp.Next()) {
const TopoDS_Shape& aV=aExp.Current();
@ -475,6 +477,9 @@ void GEOMAlgo_FinderShapeOn2::ProcessFaces()
}
}
//
//
bIsConformState=Standard_False;
//
aExp.Init(aF, TopAbs_EDGE);
for (; aExp.More(); aExp.Next()) {
const TopoDS_Shape& aE=aExp.Current();
@ -558,6 +563,9 @@ void GEOMAlgo_FinderShapeOn2::ProcessSolids()
const TopoDS_Shape& aSd=aM(i);
aMF.Clear();
TopExp::MapShapes(aSd, TopAbs_FACE, aMF);
//
bIsConformState=Standard_False;
//
aNbF=aMF.Extent();
for (j=1; j<=aNbF; ++j) {
const TopoDS_Shape& aF=aMF(j);

View File

@ -126,93 +126,75 @@ Standard_Integer GEOMAlgo_GetInPlaceAPI::GetInPlaceOld
return 1;
}
TopoDS_Shape aPntShape;
TopoDS_Vertex aVertex;
bool isFound = false;
TopAbs_ShapeEnum iType = TopAbs_SOLID;
//Standard_Real aWhat_Mass = 0., aWhere_Mass = 0.;
Standard_Real tab_aWhat[4], tab_aWhere[4];
Standard_Real dl_l = 1e-3;
Standard_Real min_l, Tol_0D, Tol_1D, Tol_2D, Tol_3D, Tol_Mass;
Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
Bnd_Box BoundingBox;
gp_Pnt aPnt, aPnt_aWhat, tab_Pnt[2];
GProp_GProps aProps;
// Check shape type.
TopAbs_ShapeEnum iType = GEOMUtils::GetTypeOfSimplePart(theWhat);
iType = GEOMUtils::GetTypeOfSimplePart(theWhat);
if (iType == TopAbs_SHAPE) {
// Error: An attempt to extract a shape of not supported type.
return 2;
}
// Compute confusion tolerance.
Standard_Real aTolConf = Precision::Confusion();
Standard_Integer i;
for (i = 0; i < 2; ++i) {
TopExp_Explorer anExp(i == 0 ? theWhere : theWhat, TopAbs_VERTEX);
for (; anExp.More(); anExp.Next()) {
const TopoDS_Vertex aVtx = TopoDS::Vertex(anExp.Current());
const Standard_Real aTolVtx = BRep_Tool::Tolerance(aVtx);
if (aTolVtx > aTolConf) {
aTolConf = aTolVtx;
}
}
}
// Compute mass tolerance.
Bnd_Box aBoundingBox;
Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
Standard_Real aMassTol;
BRepBndLib::Add(theWhere, aBoundingBox);
BRepBndLib::Add(theWhat, aBoundingBox);
aBoundingBox.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
aMassTol = Max(aXmax - aXmin, aYmax - aYmin);
aMassTol = Max(aMassTol, aZmax - aZmin);
aMassTol *= aTolConf;
// Compute the result.
TopExp_Explorer Exp_aWhat (theWhat, iType);
TopExp_Explorer Exp_aWhere (theWhere, iType);
TopExp_Explorer Exp_Edge ( theWhere, TopAbs_EDGE );
// Find the shortest edge in theShapeWhere shape
BRepBndLib::Add(theWhere, BoundingBox);
BoundingBox.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
min_l = fabs(aXmax - aXmin);
if( min_l < fabs(aYmax - aYmin) ) min_l = fabs(aYmax - aYmin);
if( min_l < fabs(aZmax - aZmin) ) min_l = fabs(aZmax - aZmin);
min_l /= dl_l;
// Mantis issue 0020908 BEGIN
if (!Exp_Edge.More()) {
min_l = Precision::Confusion();
}
// Mantis issue 0020908 END
for ( Standard_Integer nbEdge = 0; Exp_Edge.More(); Exp_Edge.Next(), nbEdge++ ) {
TopExp_Explorer Exp_Vertex( Exp_Edge.Current(), TopAbs_VERTEX);
for ( Standard_Integer nbVertex = 0; Exp_Vertex.More(); Exp_Vertex.Next(), nbVertex++ ) {
aPnt = BRep_Tool::Pnt( TopoDS::Vertex( Exp_Vertex.Current() ) );
tab_Pnt[nbVertex] = aPnt;
}
if ( ! tab_Pnt[0].IsEqual(tab_Pnt[1], dl_l) ) {
BRepGProp::LinearProperties(Exp_Edge.Current(), aProps);
if ( aProps.Mass() < min_l ) min_l = aProps.Mass();
}
}
// Compute tolerances
Tol_0D = dl_l;
Tol_1D = dl_l * min_l;
Tol_2D = dl_l * ( min_l * min_l) * ( 2. + dl_l);
Tol_3D = dl_l * ( min_l * min_l * min_l ) * ( 3. + (3 * dl_l) + (dl_l * dl_l) );
if (Tol_0D < Precision::Confusion()) Tol_0D = Precision::Confusion();
if (Tol_1D < Precision::Confusion()) Tol_1D = Precision::Confusion();
if (Tol_2D < Precision::Confusion()) Tol_2D = Precision::Confusion();
if (Tol_3D < Precision::Confusion()) Tol_3D = Precision::Confusion();
Tol_Mass = Tol_3D;
if ( iType == TopAbs_VERTEX ) Tol_Mass = Tol_0D;
else if ( iType == TopAbs_EDGE ) Tol_Mass = Tol_1D;
else if ( iType == TopAbs_FACE ) Tol_Mass = Tol_2D;
// Searching for the sub-shapes inside the ShapeWhere shape
Standard_Real tab_aWhat[4], tab_aWhere[4];
gp_Pnt aPnt, aPnt_aWhat;
TopoDS_Shape aPntShape;
TopoDS_Vertex aVertex;
bool isFound = false;
TopTools_MapOfShape map_aWhere;
for ( Exp_aWhere.ReInit(); Exp_aWhere.More(); Exp_aWhere.Next() ) {
for (; Exp_aWhere.More(); Exp_aWhere.Next()) {
if (!map_aWhere.Add(Exp_aWhere.Current()))
continue; // skip repeated shape to avoid mass addition
GetShapeProperties( Exp_aWhere.Current(), tab_aWhere, aPnt );
for ( Exp_aWhat.ReInit(); Exp_aWhat.More(); Exp_aWhat.Next() ) {
GetShapeProperties( Exp_aWhat.Current(), tab_aWhat, aPnt_aWhat );
if ( fabs(tab_aWhat[3] - tab_aWhere[3]) <= Tol_Mass && aPnt_aWhat.Distance(aPnt) <= Tol_1D )
if (fabs(tab_aWhat[3] - tab_aWhere[3]) <= aMassTol && aPnt_aWhat.Distance(aPnt) <= aTolConf)
isFound = true;
else {
if ( (tab_aWhat[3] - tab_aWhere[3]) > Tol_Mass ) {
if (tab_aWhat[3] > tab_aWhere[3]) {
aPntShape = BRepBuilderAPI_MakeVertex( aPnt ).Shape();
aVertex = TopoDS::Vertex( aPntShape );
BRepExtrema_DistShapeShape aWhereDistance ( aVertex, Exp_aWhere.Current() );
BRepExtrema_DistShapeShape aWhatDistance ( aVertex, Exp_aWhat.Current() );
if (aWhereDistance.IsDone() && aWhatDistance.IsDone() &&
fabs(aWhereDistance.Value() - aWhatDistance.Value()) <= Tol_1D )
fabs(aWhereDistance.Value() - aWhatDistance.Value()) <= aTolConf)
{
// 0020162: "EDF 961 GEOM : Getinplace is getting additionnal orthogonal faces"
// aVertex must be projected to the same point on Where and on What
gp_Pnt pOnWhat = aWhatDistance.PointOnShape2(1);
gp_Pnt pOnWhere = aWhereDistance.PointOnShape2(1);
isFound = ( pOnWhat.Distance(pOnWhere) <= Tol_1D );
isFound = (pOnWhat.Distance(pOnWhere) <= aTolConf);
if ( isFound && iType == TopAbs_FACE )
{
// check normals at pOnWhat and pOnWhere

View File

@ -239,7 +239,6 @@ Standard_Integer PntInSolid(const TopoDS_Solid& aZ,
gp_Pnt aPx;
gp_Pnt2d aP2Dx;
gp_Vec aDNx;
TopoDS_Face aF;
TopExp_Explorer aExp;
//
@ -247,9 +246,8 @@ Standard_Integer PntInSolid(const TopoDS_Solid& aZ,
aCoef=10.;
//
aExp.Init (aZ, TopAbs_FACE);
for (; aExp.More() ; aExp.Next()) {
if (aExp.More()) {
aF=*((TopoDS_Face*)&aExp.Current());
break;
}
//
iErr=PntInFace(aF, aPx, aP2Dx);
@ -368,7 +366,12 @@ Standard_Integer PntInFace(const TopoDS_Face& aF,
//
// 4.
aNbDomains=aHatcher.NbDomains(aIx);
for (i=1; i<=aNbDomains; ++i) {
if (!aNbDomains) {
iErr=5;
return iErr;
}
//
i=1;
const HatchGen_Domain& aDomain=aHatcher.Domain (aIx, i) ;
bHasFirstPoint=aDomain.HasFirstPoint();
if (!bHasFirstPoint) {
@ -388,9 +391,6 @@ Standard_Integer PntInFace(const TopoDS_Face& aF,
//
aVx=IntTools_Tools::IntermediatePoint(aV1, aV2);
//
break;
}
//
aS->D0(aUx, aVx, aPx);
//
theP2D.SetCoord(aUx, aVx);

View File

@ -90,7 +90,6 @@ GEOMAlgo_GlueDetector::GEOMAlgo_GlueDetector()
//=======================================================================
GEOMAlgo_GlueDetector::~GEOMAlgo_GlueDetector()
{}
//modified by NIZNHY-PKV Tue Mar 13 12:26:50 2012f
//=======================================================================
//function : StickedShapes
//purpose :
@ -100,7 +99,6 @@ const TopTools_IndexedDataMapOfShapeListOfShape&
{
return myStickedShapes;
}
//modified by NIZNHY-PKV Tue Mar 13 12:26:54 2012t
//=======================================================================
//function : Perform
//purpose :
@ -124,12 +122,10 @@ void GEOMAlgo_GlueDetector::Perform()
return;
}
//
//modified by NIZNHY-PKV Wed Mar 14 08:00:09 2012f
CheckDetected();
if (myErrorStatus) {
return;
}
//modified by NIZNHY-PKV Wed Mar 14 08:00:12 2012t
//
DetectEdges();
if (myErrorStatus) {
@ -206,7 +202,7 @@ void GEOMAlgo_GlueDetector::DetectVertices()
TColStd_MapIteratorOfMapOfInteger aIt1;
//
aMIP.Add(i);
while(1) {
for(;;) {
aNbIP=aMIP.Extent();
aIt1.Initialize(aMIP);
for(; aIt1.More(); aIt1.Next()) {
@ -460,7 +456,6 @@ void GEOMAlgo_GlueDetector::EdgePassKey(const TopoDS_Edge& aE,
//
aPK.SetShapes(aLV);
}
//modified by NIZNHY-PKV Tue Mar 13 09:54:18 2012f
//=======================================================================
//function : CheckDetected
//purpose :
@ -607,4 +602,3 @@ Standard_Integer CheckAncesstors
//
return iRet;
}
//modified by NIZNHY-PKV Tue Mar 13 09:54:59 2012t

17
src/GEOMAlgo/GEOMAlgo_Gluer.cxx Executable file → Normal file
View File

@ -228,10 +228,7 @@ void GEOMAlgo_Gluer::MakeVertices()
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
TopTools_DataMapOfShapeListOfShape aMVV;
GEOMAlgo_IndexedDataMapOfIntegerShape aMIS;
//modified by NIZNHY-PKV Thu Jan 21 10:03:07 2010f
//GEOMAlgo_IndexedDataMapOfShapeBox aMSB;
GEOMAlgo_IndexedDataMapOfShapeBndSphere aMSB;
//modified by NIZNHY-PKV Thu Jan 21 10:03:10 2010t
//
GEOMAlgo_BndSphereTreeSelector aSelector;
GEOMAlgo_BndSphereTree aBBTree;
@ -278,7 +275,7 @@ void GEOMAlgo_Gluer::MakeVertices()
TColStd_MapIteratorOfMapOfInteger aIt1;
//
aMIP.Add(i);
while(1) {
for(;;) {
aNbIP=aMIP.Extent();
aIt1.Initialize(aMIP);
for(; aIt1.More(); aIt1.Next()) {
@ -288,10 +285,7 @@ void GEOMAlgo_Gluer::MakeVertices()
}
//
const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
//modified by NIZNHY-PKV Thu Jan 21 10:04:09 2010f
const GEOMAlgo_BndSphere& aBoxVP=aMSB.FindFromKey(aVP);
//const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP);
//modified by NIZNHY-PKV Thu Jan 21 10:04:11 2010t
//
aSelector.Clear();
aSelector.SetBox(aBoxVP);
@ -468,7 +462,8 @@ void GEOMAlgo_Gluer::MakeSubShapes (const TopoDS_Shape& theShape,
aER.Orientation(TopAbs_FORWARD);
if (!BRep_Tool::Degenerated(aER)) {
// orient image
Standard_Boolean bIsToReverse=GEOMAlgo_AlgoTools::IsSplitToReverse(aER, aE, myContext);
Standard_Boolean bIsToReverse=
GEOMAlgo_AlgoTools::IsSplitToReverse(aER, aE, myContext);
if (bIsToReverse) {
aER.Reverse();
}
@ -490,8 +485,7 @@ void GEOMAlgo_Gluer::MakeSubShapes (const TopoDS_Shape& theShape,
aBB.Add(theResult, aShapeR);
}
}
else
{
else {
if (myKeepNonSolids) {
// just add image
const TopoDS_Shape& aShapeR = myOrigins.Find(theShape);
@ -1111,7 +1105,8 @@ void GetSubShapes(const TopoDS_Shape& aS,
//function : Modified
//purpose :
//=======================================================================
const TopTools_ListOfShape& GEOMAlgo_Gluer::Modified (const TopoDS_Shape& aS)
const TopTools_ListOfShape& GEOMAlgo_Gluer::Modified
(const TopoDS_Shape& aS)
{
TopAbs_ShapeEnum aType;
//

View File

@ -84,11 +84,8 @@ void GEOMAlgo_Gluer2::Clear()
myImagesToWork.Clear();
myOriginsToWork.Clear();
myKeepNonSolids=Standard_False;
//modified by NIZNHY-PKV Tue Mar 13 13:38:28 2012f
myDetector.Clear();
//modified by NIZNHY-PKV Tue Mar 13 13:38:30 2012t
}
//modified by NIZNHY-PKV Tue Mar 13 12:26:50 2012f
//=======================================================================
//function : StickedShapes
//purpose :
@ -98,12 +95,12 @@ const TopTools_IndexedDataMapOfShapeListOfShape&
{
return myDetector.StickedShapes();
}
//modified by NIZNHY-PKV Tue Mar 13 12:26:54 2012t
//=======================================================================
//function : SetShapesToGlue
//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM)
void GEOMAlgo_Gluer2::SetShapesToGlue
(const TopTools_DataMapOfShapeListOfShape& aM)
{
myShapesToGlue=aM;
}
@ -241,6 +238,7 @@ void GEOMAlgo_Gluer2::CheckData()
myWarningStatus=0;
//
aNbSG=myShapesToGlue.Extent();
aType=TopAbs_SHAPE;
if (aNbSG) {
// Check myShapesToGlue
aItDMSLS.Initialize(myShapesToGlue);
@ -587,6 +585,7 @@ void GEOMAlgo_Gluer2::BuildResult()
myErrorStatus=0;
myWarningStatus=0;
//
bHasImage=Standard_False;
aItC.Initialize(myArgument);
for (; aItC.More(); aItC.Next()) {
const TopoDS_Shape& aCx=aItC.Value();

View File

@ -0,0 +1,37 @@
// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// 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
//
//GEOMAlgo_KindOfDef
#ifndef _GEOMAlgo_KindOfDef_HeaderFile
#define _GEOMAlgo_KindOfDef_HeaderFile
enum GEOMAlgo_KindOfDef {
GEOMAlgo_KD_UNKNOWN,
GEOMAlgo_KD_SPECIFIED,
GEOMAlgo_KD_ARBITRARY
};
#ifndef _Standard_PrimitiveTypes_HeaderFile
#include <Standard_PrimitiveTypes.hxx>
#endif
#endif

View File

@ -44,7 +44,8 @@ GEOMAlgo_KN_DISKELLIPSE,
GEOMAlgo_KN_RECTANGLE,
GEOMAlgo_KN_TRIANGLE,
GEOMAlgo_KN_QUADRANGLE,
GEOMAlgo_KN_ARCELLIPSE
GEOMAlgo_KN_ARCELLIPSE,
GEOMAlgo_KN_SOLID
};
#ifndef _Standard_PrimitiveTypes_HeaderFile

View File

@ -35,9 +35,7 @@ GEOMAlgo_KS_PLANE,
GEOMAlgo_KS_CIRCLE,
GEOMAlgo_KS_LINE,
GEOMAlgo_KS_DEGENERATED,
//modified by NIZNHY-PKV Tue Jul 03 10:28:09 2012f
GEOMAlgo_KS_BSPLINE
//modified by NIZNHY-PKV Tue Jul 03 10:28:11 2012t
};
#ifndef _Standard_PrimitiveTypes_HeaderFile

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