This commit is contained in:
Anthony Geay 2015-01-22 09:48:16 +01:00
commit 5a2b52664a
57 changed files with 1144 additions and 1117 deletions

View File

@ -30,7 +30,7 @@ CMAKE_POLICY(SET CMP0003 NEW)
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
SET(${PROJECT_NAME_UC}_MINOR_VERSION 4)
SET(${PROJECT_NAME_UC}_MINOR_VERSION 5)
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})

View File

@ -20,7 +20,7 @@
#
import os, sys, string
from salome_utils import getTmpDir, generateFileName, uniteFiles
from salome_utils import getLogDir, generateFileName, uniteFiles
from setenv import add_path, get_lib_dir, salome_subdir
# -----------------------------------------------------------------------------
@ -30,7 +30,7 @@ def set_env( args ):
psep = os.pathsep
python_version="python%d.%d" % sys.version_info[0:2]
tmp_dir = getTmpDir()
tmp_dir = getLogDir()
env_dir = generateFileName( tmp_dir, prefix="env", with_port=True )
res_dir = os.path.join( os.getenv( "GEOM_ROOT_DIR" ), "share", salome_subdir, "resources", "geom" )

View File

@ -74,6 +74,7 @@ SET(GOOD_TESTS
min_distance.py
normal_face.py
notebook_geom.py
polyline.py
point_coordinates.py
primitives_ex01.py
primitives_ex02.py

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -36,11 +36,10 @@ and then displays only the children of the selected object(s).
to change the order (ascending / descending) by clicking the corresponding title bar of the objects list.
</li>
<li>\ref dependency_tree_page "Show dependency tree" - shows dependency tree of selected objects
in new 2D View Window.</li>
<li>\ref dependency_tree_page "Show dependency tree" - shows the dependency tree with parents and children of the selected object
in a new 2D View Window.</li>
<li>\ref reduce_study_page "Reduce study" - allows to reduce study
by automatic removing objects according to user's options.</li>
<li>\ref reduce_study_page "Reduce study" - allows reducing the study by removing objects from it.</li>
</ul>
<h2> Folders </h2>

View File

@ -10,8 +10,8 @@ Entity - > Primitives - > Cylinder</b>
\n Firstly, you can define a \b Cylinder by the <b>Base Point</b> (the central
point of the cylinder base), the \b Vector (the axis of the cylinder),
and its dimensions: the \b Radius and the \b Height. Also, you can optionally specify
the \b Angle in order to create a portion of cylinder.
and its dimensions: the \b Radius and the \b Height. You can optionally specify
the \b Angle to create a portion of cylinder.
\n <b>TUI Command:</b> <em>geompy.MakeCylinder(Point, Axis, Radius, Height)</em>
\n <b>Arguments:</b> Name + 1 vertex + 1 vector + 2 values
@ -26,8 +26,8 @@ the \b Angle in order to create a portion of cylinder.
\n Secondly, you can define a \b Cylinder by the given \b Radius and
\b Height at the origin of coordinate system. The axis of the cylinder
will be collinear to the OZ axis of the coordinate system.
Similarly to first constructor, you can optionally specify the \b Angle
in order to create a portion of cylinder.
Similarly to the first constructor, you can optionally specify the \b Angle
to create a portion of cylinder.
\n <b>TUI Command:</b> <em>geompy.MakeCylinderRH(Radius, Height)</em>
\n <b>Arguments:</b> Name + 2 values (Dimensions at origin: radius and

View File

@ -26,11 +26,11 @@ sub-shapes of a given Type and returns a List of IDs of
sub-shapes.</li>
<li><em>geompy.SubShapeAllSortedCentres(Shape, Type)</em> explodes a
shape on sub-shapes of a given type and sorts them taking into account
their gravity centers, to provide stable order of sub-shapes.
their gravity centers, to provide a stable order of sub-shapes.
It returns a list of sub-shapes.</li>
<li><em>geompy.SubShapeAllSortedCentresIDs(Shape, Type)</em> explodes
a shape on sub-shapes of a given type and sorts them taking into
account their gravity centers, to provide stable order of sub-shapes.
account their gravity centers, to provide a stable order of sub-shapes.
It returns a List of IDs of sub-shapes.</li>
<li><em>geompy.SubShape(Shape, Type, ListOfInd)</em> allows to obtain
a compound of sub-shapes of the Shape, selected by they indices in a

View File

@ -9,93 +9,68 @@ To create a <b>2D Polyline</b> select in the main menu <b>New Entity -> Basic -
\image html polyline_dlg.png
A polyline represents a section or a set of sections. Each section is constructed from a sequence of 2D points
connected either by linear setgments or an interpolation curve. Every section has its own attributes:
connected by either linear segments or an interpolation curve. Every section has its own attributes:
- \b Name,
- \b Type (Polyline or Spline),
- \b Closed flag.
A Polyline created represents a shape that lies on the XOY plane. It can have the following types:
A created Polyline represents a shape that lies on the XOY plane. Its type can be one of the following:
- \b Vertex for a single section with only 1 point.
- \b Wire for a single section with 2 or more points. A Wire can have multiple edges for more then 2 points if the section type is Polyline.
A single edge in the result wire is obtained for a Spline or Polyline with 2 points.
- \b Wire for a single section with 2 or more points. A Wire can have multiple edges for more then 2 points if the section type is Polyline. A single edge in the resulting wire is obtained for a Spline or Polyline with 2 points.
- \b Compound of Wires and/or Vertices if there are several sections.
For the moment only one reference coordinate system for polyline creation is supported. The XOY plane of the <b>Global coordinate system</b>
is suggested. Implementation of another reference coordinate system is a subject of further development of this functionality.
Restore button orientates the viewer correspondingly to the chosen working plane and fits the scene to show all objects.
For the moment only one reference coordinate system for polyline creation is supported, which is the XOY plane of the <b>Global coordinate system</b>.
\b Restore button orientates the viewer correspondingly to the chosen working plane and fits the scene to show all objects.
For the moment this button works with only one plane.
It is possible to import a shape in this dialog using <b>Import polyline</b> selection button. To do it an imported object should satisfy conditions
for polyline shapes mentioned above. If a valid shape is selected, when dialog is opened, it is initialized by this shape.
Though the shape can be on any plane, an imported polyline will be defined on XOY plane only due to the limitation.
It is possible to import a shape in this dialog using <b>Import polyline</b> selection button. An imported object should meet the conditions for polyline shapes mentioned above. If a valid shape is selected, when the dialog is opened, it is initialized by this shape.
Though the shape can be on any plane, the imported polyline will be defined on XOY plane only due to the limitation.
The group \b Sections in this dialog represents the Polyline construction framework. Its toolbar has the following operations:
- \b Undo
- \b Redo
- <b>Insert new section</b>
- <b>Addition mode</b>
- <b>Modification mode</b> - not implemented
- <b>Detection mode</b> - not implemented
- \b Remove
- <b>Join selected sections</b>
The group \b Sections in this dialog represents the Polyline construction framework.
<b>Undo/Redo</b> buttons allows to undo/redo changes of the polyline.
The buttons <b>Undo</b> and <b>Redo</b> allow to undo or redo the changes of the polyline.
<b>Insert new section</b> button opens a dialog that allows to add a new section:
<b>Insert new section</b> button opens the corresponding dialog:
\image html polyline_dlg_add_section.png
In this dialog it is possible to choose:
- \b Name of section
- \b Type of section
- \b Closed flag
- \b Name of section;
- \b Type of section;
- Set \b Closed flag.
To create a new section \b Add button should be clicked. \b Cancel button is used to cancel this operation.
After clicking \b Add button a new section is appeared on the list. Its name supplemented by its type and closedness
information (see icon) and the number of points (equal to 0 after creation).
To create a new section, click \b Add button. \b Cancel button is used to cancel this operation.
After clicking \b Add button a new section appears in the list. Its name is generated automatically depending on its type, closed or opened state and the number of points (equal to 0 after creation).
To modify section parameters it is possible to double-click on a section in the list. In this case the following dialog appears:
To modify section parameters, double-click on a section in the list. In this case the following dialog appears:
\image html polyline_dlg_edit_section.png
To apply modifications the button \b Ok should be clicked.
To apply the modifications, click \b Ok button.
<b>Addition mode</b> allows to add points to a section. It is necessary to select a particular section in a list of sections
and make some mouse clicks in the viewer. A section preview is recomputed after each click.
<b>Addition mode</b> allows adding points to a section. Select a particular section in the list of sections
and left-click in the viewer to add new nodes to the section. A section preview is recomputed after each click.
<b>Modification mode</b> and <b>Detection mode</b> are not implemented for the moment.
\b Remove button allows to remove a section. It is available if all modes are deactivated and one section is selected.
\b Remove button allows removing a section. It is available if all modes are deactivated and one section is selected.
<b>Join selected sections</b> button is available in modification mode if two or more sections are selected. It is used to
merge several sections into the first one from selection list. Joined section has parameters of the first selected one. Points of
the other sections are appended at the end of the list of the first section points.
merge several sections into the first one from the selection list. The points of the merged sections are appended at the end of the list of points of the first section.
Some actions are available via popup menu by right mouse button click.
Some actions are available via the context menu activated by right mouse button click.
- <b>Join all sections</b> - joins all defined sections into the first one.
- \b Join - joins two or more selected sections.
- <b>Clear all</b> - removes all selected sections.
- <b>Set closed</b> - sets \b Closed flag for all selected section.
- <b>Set open</b> - unset \b Closed flag for all selected sections.
- <b>Set polyline</b> - sets the type of all selected sections to Polyline.
- <b>Set spline</b> - set the type of all selected sections to Spline.
If all modes are deactivated:
- <b>Join all sections</b> - join all defined sections into the first one.
- \b Join - join sections. Available if two or more sections are selected.
In <b>Addition mode</b>:
- <b>Join all sections</b> - join all defined sections into the first one.
In <b>Modification mode</b>:
- <b>Join all sections</b> - join all defined sections into the first one.
- \b Join - join sections. Available if two or more sections are selected.
- <b>Clear all</b> - remove all sections. Available if at least one section is selected.
- <b>Set closed</b> - set all selected section's Closed flag. Available if at least one section is selected.
- <b>Set open</b> - reset all selected section's Closed flag. Available if at least one section is selected.
- <b>Set polyline</b> - set all selected section's type to Polyline. Available if at least one section is selected.
- <b>Set spline</b> - set all selected section's type to Spline. Available if at least one section is selected.
In <b>Detection mode</b>:
- <b>Join all sections</b> - join all defined sections into the first one.
- \b Join - join sections. Available if two or more sections are selected.
Different actions are available depending on the mode and selection.
<h2>TUI Commands</h2>
To create the 2D polyline in TUI Polyline2D interface is used.
<em>pl = geompy.Polyline2D()</em> - returns an instance of Polyline2D interface <i>pl</i>.
@ -103,5 +78,5 @@ To create the 2D polyline in TUI Polyline2D interface is used.
See the \ref gsketcher.Polyline2D "Polyline2D" interface documentation for more information.
Our <b>TUI Scripts</b> provide you with useful examples of the use of
\ref tui_polyline_page "2D Polyline".
\ref tui_creation_polyline "2D Polyline".
*/

View File

@ -14,11 +14,11 @@ In this dialog you can specify the following parameters:
- <b>Max BSpline surface degree</b> of the resulting BSpline surface;
- <b>3D tolerance of initial approximation</b>
\note <b>3D tolerance of initial approximation</b> represents a tolerance of
\note <b>3D tolerance of the initial approximation</b> represents the tolerance of
initial plate surface approximation. If this parameter is equal to 0 (default),
its value is automatically computed as <em> max(0.0001, 10*error)</em>,
where <em>error</em> is a 3D tolerance of the surface representing a maximal
distance between computed plate surface and given points.
where <em>error</em> is the 3D tolerance of the surface representing the maximal
distance between the computed plate surface and given points.
<b>Advanced options:</b> \ref preview_anchor "Preview"
@ -28,7 +28,7 @@ Press "Apply" or "Apply & Close" button to get the resulting <em>GEOM_Object(Sur
- \em thelPoints is a list of points or compounds of points;
- \em theNbMax maximum number of Bezier pieces in the resulting surface;
- \em theDegMax maximum degree;
- \em theDMax specifies 3D tolerance of initial approximation
- \em theDMax specifies 3D tolerance of the initial approximation.
Example:

View File

@ -13,23 +13,20 @@
\anchor dependency_tree_general_description_anchor <h2>General description</h2>
In order to better understand the relations between the %GEOM
objects in a study the user has a possibility to display the
ascendants and descendant of the object(s) in a family tree.
You can display the ascendants and descendants of object(s) in a tree structure to better understand the relations between the %GEOM
objects in a study .
User can build the dependency tree by selecting desirable object
in Object Browser or OCC Viewer and calling "Show dependency tree"
popup item. It will open a new or clear the existing "Dependency
Tree" view window (only one view is supported) and display a
dependency tree for the selected object or objects (multiple
selection is supported). Also user can rebuild the tree if to select
some object(s) right in the "Dependency Tree" view and call
"Rebuild the tree" popup menu item.
To build the dependency tree, select the necessary object or objects (multiple
selection is supported) in the Object Browser or OCC Viewer and call "Show dependency tree" context menu item.
\image html tree_example.png
User can change all necessary parameters of Dependency Tree Viewer
in \ref pref_dependency_tree "Preferences".
"Dependency Tree" view window will display the dependency tree for the selected object.
It is also possible to select an object(s) directly in the "Dependency Tree" view and to rebuild the tree by selecting
"Rebuild the tree" context menu item.
All necessary parameters of Dependency Tree Viewer can be edited in the \ref pref_dependency_tree "Preferences".
<hr>
\anchor dependency_tree_nodes_anchor <h2>Nodes</h2>
@ -37,62 +34,48 @@ in \ref pref_dependency_tree "Preferences".
Tree nodes in the Dependency Viewer are named according to the study
names of the corresponding objects.
Non-published objects are shown in the tree as "unpublished" and
colored in special color.
All nodes have the fixed size, so the long names are cut and shown
with ellipsis; full name of the object can be seen in the tooltip
if to keep the cursor over the node.
All nodes have fixed size, so long names are cut; the full object name can be seen in the tooltip
when the cursor is hovered over the node.
"Dependency Tree" view supports the following states of nodes:
<ul><li><b>Main node</b> - node of main object(s), which were selected in Object
Browser, OCC Viewer or Dependency Tree Viewer in order to build the
dependency tree;</li></ul>
<ul><li><b>Main node</b> - corresponds to the main object(s) selected in Object
Browser, OCC Viewer or Dependency Tree Viewer;</li></ul>
\image html tree_main_node.png
<ul><li><b>Default node</b> - node of published in study object, which participate in building of
dependency tree as ascendant or descendant;</li></ul>
<ul><li><b>Default node</b> - ascendant or descendant node of the dependency tree corresponding to an object published in the study;</li></ul>
\image html tree_default_node.png
<ul><li><b>Unpublished node</b> - the same as "Default node", but
corresponding object was not published in study;</li></ul>
<ul><li><b>Unpublished node</b> - corresponds to an object that was not published in the study;</li></ul>
\image html tree_unpublished_node.png
<ul><li><b>Highlighted node</b> - the state of node when mouse
cursor is over it;</li></ul>
<ul><li><b>Highlighted node</b> - the state of a node when the mouse cursor is hovered over it;</li></ul>
\image html tree_highlighted_node.png
<ul><li><b>Selected node</b> - the state of node when user
clicks the left mouse button on node.</li></ul>
<ul><li><b>Selected node</b> - the state of node when the user clicks the left mouse button it.</li></ul>
\image html tree_selected_node.png
<hr>
\anchor dependency_tree_links_anchor <h2>Links</h2>
Dependency Tree Viewer shows oriented links between nodes to
represent dependency direction. Viewer supports the following states
of links:
represent the dependency direction. The viewer supports the following states of links:
<ul><li><b>Unidirectional link</b> - shows that A object depends on
B object;</li></ul>
<ul><li><b>Unidirectional link</b> - shows that object B depends on object A;</li></ul>
\image html tree_unidir_link.png
<ul><li><b>Bidirectional link</b> - shows that A object depends on
B object and, at the same time, B object depends on
A object;</li></ul>
<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>
\image html tree_bidir_link.png
<ul><li><b>Self-dependency link</b> - shows that object depends on
itself;</li></ul>
<ul><li><b>Self-dependency link</b> - shows that an object depends on itself;</li></ul>
\image html tree_selfdep_link.png
<ul><li><b>Cyclic dependency links</b> - shows cyclic dependency of
some nodes.</li></ul>
<ul><li><b>Cyclic dependency links</b> - shows cyclic dependency of some nodes.</li></ul>
\image html tree_cycldep_link.png
<hr>
\anchor dependency_tree_operations_anchor <h2>Operations</h2>
\anchor dependency_tree_operations_anchor <h2>Viewer Operations</h2>
The dependency tree of a chosen %GEOM object is displayed in
the dedicated 2D view window.
@ -105,8 +88,7 @@ mouse button.
\image tree_tool_bar
<b>Dump View</b> - exports an object from the viewer in bmp, png or
jpeg image format.
<b>Dump View</b> - exports the current scene in bmp, png or jpeg image format.
\image html tree_view_dump.png
<b>Fit all</b> - scales the presentation so that it could fit within
@ -140,38 +122,32 @@ levels to be shown in the dependency tree.
<ul>
<li>Level 1 corresponds to the parents and children of the selected
object(s);</li>
<li>Level 2 is Level 1 plus the grand-parents and grand-children
<li>Level 2 adds the grand-parents and grand-children
of the selected object(s);</li>
<li>etc...</li>
</ul>
<b>Display ascendants</b> - allows user to control the displaying
of ascendants.
<b>Display ascendants</b> - allows showing/hiding the ascendants.
\image html tree_disp_ascendants.png
<b>Display descendants</b> - allows user to control the displaying
of descendants.
<b>Display descendants</b> - allows showing/hiding the descendants.
\image html tree_disp_descendants.png
<b>Move nodes</b> - enables/disables of moving the nodes.
<b>Move nodes</b> -if checked, it is possible to move nodes in the viewer.
\image html tree_move_nodes.png
<b>Update</b> - allows user to update a dependency tree model and the view.
<b>Update</b> - updates the dependency tree view, reflecting changes introduced in the hierarchy.
\image html tree_button_update.png
<hr>
\anchor dependency_tree_navigation_anchor <h2>Navigation</h2>
Dependency Tree 2D Viewer supports the following navigation mode:
\anchor dependency_tree_navigation_anchor <h2>Selection and Shortcuts</h2>
<ul>
<li>rectangle selection in this mode is performed by the left mouse
button</li>;
<li>multiple selection is available when \b Shift button
<li>It is possible to select multiple nodes in the view by rectangle selection or by clicking nodes when \b Shift button
is pressed.</li>
</ul>
Also, holding \b Ctrl key with pressed mouse buttons performs
Holding \b Ctrl key with pressed mouse buttons performs
the following view transformations:
<ul>
<li>Ctrl + left mouse button - zooming;</li>
@ -179,33 +155,23 @@ the following view transformations:
</ul>
<hr>
\anchor dependency_tree_popup_menu_anchor <h2>Popup Menu</h2>
\anchor dependency_tree_popup_menu_anchor <h2>Context Menu</h2>
After the object has appeared in the Dependency Tree 2D Viewer,
user can select it with left mouse click to change its presentation
parameters and get access to other useful options by right-clicking on
the selected object.
The following operations are available from the context menu of the selected object.
\image html tree_popup_menu1.png
<ul>
<li>\b Show - allows to show selected object(s) in OCC 3D Viewer;</li>
<li><b> Show Only</b> - allows to show only selected object(s)
in OCC 3D Viewer;</li>
<li><b> Rebuild the tree</b> - allows to rebuild the dependency tree
<li>\b Show - shows the selected object(s) in OCC 3D Viewer;</li>
<li><b> Show Only</b> - shows only the selected object(s) in OCC 3D Viewer;</li>
<li><b> Rebuild the tree</b> - rebuilds the dependency tree
for selected object(s);</li>
<li>\ref reduce_study_page "Reduce study" - allows to reduce study.</li>
</ul>
Some functionalities are available through right-clicking on
the viewer background:
<li>\ref reduce_study_page "Reduce study" - allows reducing the study.</li>
\image html tree_popup_menu2.png
Dependency Tree 2D Viewer background can be customized using the
"Change background" popup menu command that opens standard
"Select Color" dialog box:
\image html selectcolor.png
<li>It is also possible to customize the background of Dependency Tree 2D Viewer using the
corresponding context menu command.</li>
</ul>
*/

View File

@ -4,10 +4,9 @@
\anchor pref_settings <h2>Settings</h2>
In the \b Geometry module you can set preferences for visualisation of
In the \b Geometry module you can set preferences for visualization of
geometrical figures, which can be used in later sessions with this module.
There is also a special group of preferences controlling input
precision for floating-point data.
\image html pref15.png
@ -67,7 +66,7 @@ of values set in spin boxes.</li>
</ul>
<ul>
<li><b>Dimensions (Measurements)</b></li>
<li><b>Dimensions (Measurements)</b> - a group of preferences controlling the presentation of dimensions.</li>
<ul>
<li><b>Color</b> - allows to define color for persistent dimension presentations.</li>
<li><b>Line width</b> - allows to define pixel width of dimension lines.</li>
@ -91,7 +90,8 @@ By default <b>Along U</b> and <b>Along V</b> are null and isolines are not drawn
</ul>
<ul>
<li><b>Input fields precision</b></li>
<li><b>Input fields precision</b> - a group of preferences controlling input
precision for floating-point data.</li>
<ul>
<li><b>Length precision</b> - allows to adjust input precision of coordinates and dimensions.</li>
<li><b>Angular precision</b> - allows to adjust input precision of angles.</li>
@ -147,32 +147,29 @@ system immediately after the module activation.</li>
\anchor pref_dependency_tree <h2>Dependency Tree</h2>
Also user can set preferences for visualisation of <b>Dependency Tree</b> in 2D Viewer.
This tab groups preferences for visualization of <b>Dependency Tree</b> in the 2D Viewer.
\image html pref_dep_tree.png
<ul>
<li><b>General</b></li>
<ul>
<li><b>Hierarchy type</b> - allows to choose default displaying mode of dependency tree.</li>
<li><b>Possibility to move nodes</b> - enable/disable the possibility of moving nodes by default.</li>
<li><b>Hierarchy type</b> - allows to choose the default display mode of the dependency tree.</li>
<li><b>Possibility to move nodes</b> - enables/disables the possibility of moving nodes by default.</li>
</ul>
</ul>
<ul>
<li><b>Color</b></li>
<ul>
<li><b>Background color</b> - allows to select default background color.</li>
<li><b>Default node color</b> - allows to select default node color.</li>
<li><b>Main node color</b> - allows to select default main node color.</li>
<li><b>Unpublished node color</b> - allows to select default node color
for unpublished objects.</li>
<li><b>Selected node color</b> - allows to select default selected node color.</li>
<li><b>Default arrow color</b> - allows to select default arrow color.</li>
<li><b>Highlighted arrow color</b> - allows to select default highlighted
arrow color.</li>
<li><b>Selected arrow color</b> - allows to select default selected
arrow color.</li>
<li><b>Background color</b> - allows to select the default background color.</li>
<li><b>Default node color</b> - allows to select the default node color.</li>
<li><b>Main node color</b> - allows to select the default main node color.</li>
<li><b>Unpublished node color</b> - allows to select the default node color for unpublished objects.</li>
<li><b>Selected node color</b> - allows to select the default selected node color.</li>
<li><b>Default arrow color</b> - allows to select the default arrow color.</li>
<li><b>Highlighted arrow color</b> - allows to select the default highlighted arrow color.</li>
<li><b>Selected arrow color</b> - allows to select the default selected arrow color.</li>
</ul>
</ul>

View File

@ -31,6 +31,7 @@ provided by Geometry module.
<li>\ref tui_working_with_groups_page</li>
<li>\ref tui_building_by_blocks_page</li>
<li>\ref tui_sketcher_page</li>
<li>\ref tui_3dsketcher_page</li>
<li>\ref tui_advanced_geom_objs_page</li>
</ul>
<li>\subpage tui_viewing_geom_objs_page</li>

View File

@ -2,55 +2,52 @@
\page reduce_study_page Reduce Study
The user sometimes needs to keep in the study only some objects that
It can be sometimes necessary to keep in the study only the objects that
present the final result(s) of the design operations and to delete all
other objects which do not contribute to these results.
other objects, which do not contribute to these results.
The feature is especially useful when the user designs the whole model
through the GUI and wants to generate simplified "clean" Python dump only
at the end of the model construction with no "useless" objects in the
%GEOM module.
This is especially useful when the model is designed using the GUI
and it is necessary to generate a simplified "clean" Python dump without "useless" objects
at the end of the model construction.
User can open dialog box by selecting desirable object(s) in Object
Browser or OCC Viewer and calling "Reduce study" popup item.
This feature can be activated by selecting the desirable object(s) in Object
Browser or OCC Viewer and calling "Reduce study" context item.
\image html reduce_study_dialog.png
<ul>
<li><b> Objects to be kept</b> - objects that will be kept in the study after
applying operation of reduce study. The list of objects being selected by
applying reduce study operation. The objects selected by
the user are highlighted in bold font.</li>
<li><b> Objects to be removed</b> - objects that will be deleted.</li>
\note Mentioned views provide possibility to show/hide object(s) in
current Viewer using "eye" icon near each item of tree. Also user can
show/hide ALL objects in tree by clicking "eye" icon in the head of tree view.
\note It is possible to show/hide object(s) in the
current Viewer using "eye" icon next to each tree item.
ALL objects in the tree can be shown/hidden by clicking the "eye" icon in the head of the tree view.
<li><b> Intermediate objects</b> group box allows choosing what should be done with the objects that are used to produce the selected object(s):
<li><b> Sub-objects</b> group box allows choosing the same operations for
sub-objects of the selected object(s).</li>
<li><b> Intermediate objects</b> group box allows to choose an action
that will be performed with the objects that took part in the operations
chain to produce the selected object(s):
<ul>
<li>Keep - object(s) will be kept in the study;</li>
<li>Unpublish - object(s) will be unpublished (hidden) from the study;</li>
<li>Remove - object(s) will be removed from the study. \note Since use of
this option can lead to the broken Dump Python script, the warning message
will be shown at the operation commiting to confirm/reject removing
intermediate objects.</li>
this option can cause a broken Dump Python script, the warning message
is shown confirm/reject removing intermediate objects.</li>
</ul>
</li>
<li><b> Sub-objects</b> group box allows to choose the same operations for
sub-objects of selected item(s): keep, unpublish or remove.</li>
<li><b> Remove empty folders</b> - if this option is checked, then all folders,
<li><b> Remove empty folders</b> - if this option is checked, all folders,
which will become empty after removing unused objects from the study,
will be also removed; otherwise, empty folders will be kept.</li>
<li><b> Soft removal</b> - if this option is checked, operation will just
unpublish the redundant objects from the study instead of their hard delete.
\n Soft removal would keep all the data in the study to give the user a
<li><b> Soft removal</b> - if this option is checked, the operation will
unpublish the redundant objects from the study instead of deleting them.
\n So, soft removal keeps all data in the study to give the user a
chance to revert this operation using \ref publish_hidden_objects
"Publish Objects" dialog box.</li>

View File

@ -38,4 +38,8 @@
<br><h2>Creation of a Local Coordinate System</h2>
\tui_script{basic_geom_objs_ex09.py}
\anchor tui_creation_polyline
<br><h2>Creation of 2D Polyline</h2>
\tui_script{polyline.py}
*/

View File

@ -1,6 +0,0 @@
/*!
\page tui_polyline_page 2D Polyline
\tui_script{polyline.py}
*/

View File

@ -64,10 +64,9 @@ geometrical object. TUI Command: <em>sg.DisplayOnly(ID)</em></li>
<li><b>Show all dimensions</b> - shows all of the persistent dimensions created for the selected geometrical object.</li>
<li><b>Hide all dimensions</b> - hides all of the persistent dimensions created for the selected geometrical object.</li>
<li>\subpage dependency_tree_page "Show dependency tree" - shows dependency tree of selected objects
in new 2D View Window.</li>
<li>\subpage reduce_study_page "Reduce study" - allows to reduce study
by automatic removing objects according to user's options.</li>
<li>\subpage dependency_tree_page "Show dependency tree" - shows the dependency tree with parents and children of the selected object
in a new 2D View Window.</li>
<li>\subpage reduce_study_page "Reduce study" - allows reducing the study by removing objects from it.</li>
<li><b>Dump view</b> - exports an object from the viewer in bmp, png,
jpg or jpeg image format.</li>
<li><b>Change background</b> - allows to redefine the background

View File

@ -109,6 +109,10 @@
#define FIND_GROUPS_BY_POINTS 1
// Undefine below macro to enable workaround about fillet problem in MakePipeTShapeFillet
// VSR 30/12/2014: macro enabled
#define FILLET_FIX_TOLERANCE
//=============================================================================
/*!
* Constructor
@ -2842,6 +2846,17 @@ AdvancedEngine_IOperations::MakePipeTShapeFillet
aFillet->GetLastFunction()->SetDescription("");
TopoDS_Shape aFilletShape = aFillet->GetValue();
#ifdef FILLET_FIX_TOLERANCE
// VSR: 30/12/2014: temporary workaround about Fillet problem
if (theHexMesh) {
GEOMUtils::FixShapeTolerance(aFilletShape, TopAbs_FACE);
}
else {
GEOMUtils::FixShapeCurves(aFilletShape);
}
#endif
aFunction->SetValue(aFilletShape);
// END of fillet
@ -3087,6 +3102,17 @@ AdvancedEngine_IOperations::MakePipeTShapeFilletWithPosition
aFillet->GetLastFunction()->SetDescription("");
TopoDS_Shape aFilletShape = aFillet->GetValue();
#ifdef FILLET_FIX_TOLERANCE
// VSR: 30/12/2014: temporary workaround about Fillet problem
if (theHexMesh) {
GEOMUtils::FixShapeTolerance(aFilletShape, TopAbs_FACE);
}
else {
GEOMUtils::FixShapeCurves(aFilletShape);
}
#endif
aFunction->SetValue(aFilletShape);
// END of fillet

View File

@ -63,6 +63,11 @@
#include <vector>
// Undefine below macro to enable workaround about problem with wrong
// tolerances of intersection curves in MakePipeTShape and MakeQuarterPipeTShape
// VSR 30/12/2014: macro enabled
#define FIX_CURVES_TOLERANCES
//=======================================================================
//function : GetID
//purpose :
@ -341,7 +346,14 @@ TopoDS_Shape AdvancedEngine_PipeTShapeDriver::MakePipeTShape (const double r1, c
StdFail_NotDone::Raise("Coudn't cut cylinders");
}
return Te.Shape();
TopoDS_Shape aShape = Te.Shape();
// VSR: 30/12/2014: temporary workaround about intersection curves problem
#ifdef FIX_CURVES_TOLERANCES
GEOMUtils::FixShapeCurves(aShape);
#endif
return aShape;
}
//=======================================================================
@ -373,6 +385,13 @@ TopoDS_Shape AdvancedEngine_PipeTShapeDriver::MakeQuarterPipeTShape (const doubl
StdFail_NotDone::Raise("Couldn't cut Pipe Tshape with box");
}
TopoDS_Shape aShape = Te4.Shape();
// VSR: 30/12/2014: temporary workaround about intersection curves problem
#ifdef FIX_CURVES_TOLERANCES
GEOMUtils::FixShapeCurves(aShape);
#endif
return Te4.Shape();
}

View File

@ -21,7 +21,7 @@
</message>
<message>
<source>GEOM_DIVIDEDDISK</source>
<translation>Divided_Disk</translation>
<translation></translation>
</message>
<message>
<source>GEOM_DIVIDEDDISK_TITLE</source>
@ -29,7 +29,7 @@
</message>
<message>
<source>GEOM_DIVIDEDCYLINDER</source>
<translation>Divided_Cylinder</translation>
<translation></translation>
</message>
<message>
<source>GEOM_DIVIDEDCYLINDER_TITLE</source>
@ -117,15 +117,15 @@
</message>
<message>
<source>JUNCTION_FACE_1</source>
<translation>Junction 1</translation>
<translation>1</translation>
</message>
<message>
<source>JUNCTION_FACE_2</source>
<translation>Junction 2</translation>
<translation>2</translation>
</message>
<message>
<source>JUNCTION_FACE_3</source>
<translation>Junction 3</translation>
<translation>3</translation>
</message>
<message>
<source>INTERNAL_FACES</source>
@ -140,7 +140,7 @@
</message>
<message>
<source>GEOM_PIPE_TSHAPE</source>
<translation>PipeTShape</translation>
<translation>T型パイプ</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_MPIPE</source>
@ -200,11 +200,11 @@
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L1</source>
<translation>New L1</translation>
<translation>T型パイプの位置 L1</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
<translation>New L2</translation>
<translation>T型パイプの位置 L2</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_LEFT_TR</source>
@ -248,27 +248,27 @@
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_L</source>
<translation type="unfinished">rL</translation>
<translation>rL</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_L</source>
<translation type="unfinished">+rL+wL</translation>
<translation>+rL+wL</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_R</source>
<translation type="unfinished">rR</translation>
<translation>rR</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_R</source>
<translation type="unfinished">+rR+wR</translation>
<translation>+rR+wR</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_I</source>
<translation type="unfinished">rl</translation>
<translation>rl</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_I</source>
<translation type="unfinished">+rI+wI</translation>
<translation>+rI+wI</translation>
</message>
</context>
<context>
@ -295,7 +295,7 @@
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_ARG_NB_MAX</source>
<translation></translation>
<translation>&lt;</translation>
</message>
<message>
<source>GEOM_SMOOTHINGSURFACE_ARG_DEG_MAX</source>

View File

@ -1,46 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="ja" sourcelanguage="en">
<context>
<context>
<name>@default</name>
<message>
<source>MEN_EXPORTBREP</source>
<translation type="unfinished">BREP</translation>
<translation>BREPエキスポート</translation>
</message>
<message>
<source>TOP_EXPORTBREP</source>
<translation type="unfinished">Export BREP</translation>
<translation>BREPエキスポート</translation>
</message>
<message>
<source>STB_EXPORTBREP</source>
<translation type="unfinished">Export BREP</translation>
<translation>BREPエキスポート</translation>
</message>
<message>
<source>MEN_IMPORTBREP</source>
<translation type="unfinished">BREP</translation>
<translation>BREPインポート</translation>
</message>
<message>
<source>TOP_IMPORTBREP</source>
<translation type="unfinished">Import BREP</translation>
<translation>BREPインポート</translation>
</message>
<message>
<source>STB_IMPORTBREP</source>
<translation type="unfinished">Import BREP</translation>
<translation>BREPインポート</translation>
</message>
</context>
<context>
</context>
<context>
<name>BREPPlugin_GUI</name>
<message>
<source>BREP_FILES</source>
<translation type="unfinished">BREP files( *.brep )</translation>
<translation>BREPファイル</translation>
</message>
<message>
<source>EXPORT_TITLE</source>
<translation type="unfinished">Export BREP</translation>
<translation>BREPエキスポート</translation>
</message>
<message>
<source>IMPORT_TITLE</source>
<translation type="unfinished">Import BREP</translation>
<translation>BREPインポート</translation>
</message>
</context>
</context>
</TS>

View File

@ -5,32 +5,34 @@
<name>DependencyTree_View</name>
<message>
<source>DEPENDENCY_TREE</source>
<translation type="unfinished">Dependency Tree</translation>
<translation>Arbre des dépendances</translation>
</message>
<message>
<source>MOVE_NODES</source>
<translation type="unfinished">Move nodes</translation>
<translation>Déplacer les noeuds</translation>
</message>
<message>
<source>HIERARCHY_DEPTH</source>
<translation type="unfinished">Hierarchy depth </translation>
<translation>Niveau hiérarchique</translation>
</message>
<message>
<source>DISPLAY_ASCENDANTS</source>
<translation type="unfinished">Display ascendants</translation>
<translation>Montrer les liens ascendants</translation>
</message>
<message>
<source>DISPLAY_DESCENDANTS</source>
<translation type="unfinished">Display descendants</translation>
<translation>Montrer les liens descendants</translation>
</message>
<message>
<source>SHOW_ALL</source>
<translation type="unfinished">Show all</translation>
<translation>Montrer tout</translation>
</message>
<message>
<source>UPDATE</source>
<translation type="unfinished">Update</translation>
<translation>Mise à jour</translation>
</message>
</context>
<context>
<name>DependencyTree_ViewModel</name>
<message>
<source>MEN_REBUILD_THE_TREE</source>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS>
<context>
<TS version="2.0" language="ja" sourcelanguage="en">
<context>
<name>DependencyTree_View</name>
<message>
<source>DEPENDENCY_TREE</source>
@ -40,5 +40,5 @@
<source>MEN_REDUCE_STUDY</source>
<translation type="unfinished">Reduce study</translation>
</message>
</context>
</context>
</TS>

View File

@ -2259,7 +2259,7 @@ QString EntityGUI_SketcherDlg::GetNewCommand( QString& theParameters )
+ ":TT " + QString::number( myX2, Format, DigNum) + " " + QString::number( myY1, Format, DigNum)
+ ":WW";
theParameters = myX1Str + ":" + myY1Str + ":" + myX2Str + ":" + myY2Str ;
theParameters = myX1Str + ":" + myY1Str + ":" + myX1Str + ":" + myY2Str + ":" + myX2Str + ":" + myY2Str + ":" + myX2Str + ":" + myY1Str;
}
return myNewCommand;
}

View File

@ -134,6 +134,9 @@
// Hard-coded value of shape deflection coefficient for VTK viewer
const double VTK_MIN_DEFLECTION = 0.001;
// If the next macro is defined, the deflection coefficient for VTK presentation
// is limited by VTK_MIN_DEFLECTION
//#define LIMIT_DEFLECTION_FOR_VTK
// Pixmap caching support
namespace
@ -474,25 +477,24 @@ GEOM_Displayer::GEOM_Displayer( SalomeApp_Study* st )
myHasDisplayMode = false;
int aType = resMgr->integerValue("Geometry", "type_of_marker", (int)Aspect_TOM_PLUS);
myWidth = resMgr->integerValue("Geometry", "edge_width", -1);
myIsosWidth = resMgr->integerValue("Geometry", "isolines_width", -1);
myTransparency = resMgr->integerValue("Geometry", "transparency", 0) / 100.;
myHasTransparency = false;
myTypeOfMarker = (Aspect_TypeOfMarker)(std::min((int)Aspect_TOM_RING3, std::max((int)Aspect_TOM_POINT, aType)));
myScaleOfMarker = (resMgr->integerValue("Geometry", "marker_scale", 1)-(int)GEOM::MS_10)*0.5 + 1.0;
myScaleOfMarker = std::min(7.0, std::max(1., myScaleOfMarker));
// Next properties provide a way to customize displaying of presentations;
// for instance, this is useful for preview
myColor = -1;
// This color is used for shape displaying. If it is equal -1 then
// default color is used.
myTexture = "";
myNbIsos = -1;
myWidth = -1;
myTransparency = -1;
myType = -1;
myIsosColor = -1;
myIsosWidth = -1;
// This parameter is used for activisation/deactivisation (selection) of objects to be displayed
myToActivate = true;
// This parameter is used for activisation/deactivisation of objects to be displayed
// Activate parallel vizualisation only for testing purpose
// and if the corresponding env variable is set to 1
@ -865,12 +867,34 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
int isosWidth = propMap.value( GEOM::propertyName( GEOM::IsosWidth ) ).toInt();
Handle(Prs3d_IsoAspect) uIsoAspect = AISShape->Attributes()->UIsoAspect();
Handle(Prs3d_IsoAspect) vIsoAspect = AISShape->Attributes()->VIsoAspect();
if ( HasIsosColor() ) {
uIsoAspect->SetColor( (Quantity_NameOfColor)GetIsosColor() );
vIsoAspect->SetColor( (Quantity_NameOfColor)GetIsosColor() );
}
else {
uIsoAspect->SetColor( isosColor );
uIsoAspect->SetWidth( isosWidth );
uIsoAspect->SetNumber( uIsos );
vIsoAspect->SetColor( isosColor );
}
if ( HasIsosWidth() ) {
uIsoAspect->SetWidth( GetIsosWidth() );
vIsoAspect->SetWidth( GetIsosWidth() );
}
else {
uIsoAspect->SetWidth( isosWidth );
vIsoAspect->SetWidth( isosWidth );
}
if ( HasNbIsos() ) {
uIsoAspect->SetNumber( GetNbIsos() );
vIsoAspect->SetNumber( GetNbIsos() );
}
else {
uIsoAspect->SetNumber( uIsos );
vIsoAspect->SetNumber( vIsos );
}
AISShape->Attributes()->SetUIsoAspect( uIsoAspect );
AISShape->Attributes()->SetVIsoAspect( vIsoAspect );
@ -1022,7 +1046,11 @@ void GEOM_Displayer::updateActorProperties( GEOM_Actor* actor, bool create )
// actor->SetShape(myShape,aDefPropMap.value(GEOM::propertyName( GEOM::Deflection )).toDouble(),myType == GEOM_VECTOR);
/////////////////////////////////////////////////////////////////////////
if ( !actor->getTopo().IsSame( myShape ) )
#ifdef LIMIT_DEFLECTION_FOR_VTK
actor->SetShape( myShape, VTK_MIN_DEFLECTION, myType == GEOM_VECTOR );
#else
actor->SetShape( myShape, qMax( propMap.value( GEOM::propertyName( GEOM::Deflection ) ).toDouble(), GEOM::minDeflection() ), myType == GEOM_VECTOR );
#endif
// set material
Material_Model material;
@ -1036,15 +1064,24 @@ void GEOM_Displayer::updateActorProperties( GEOM_Actor* actor, bool create )
// - set number of iso-lines
int nbIsos[2]= { 1, 1 };
if ( HasNbIsos() ) {
nbIsos[0] = GetNbIsos();
nbIsos[1] = GetNbIsos();
}
else {
QStringList isos = propMap.value( GEOM::propertyName( GEOM::NbIsos ) ).toString().split( GEOM::subSectionSeparator() );
nbIsos[0] = isos[0].toInt();
nbIsos[1] = isos[1].toInt();
}
actor->SetNbIsos( nbIsos );
// - set iso-lines width
actor->SetIsosWidth( propMap.value( GEOM::propertyName( GEOM::IsosWidth ) ).toInt() );
actor->SetIsosWidth( HasIsosWidth() ? GetIsosWidth() : propMap.value( GEOM::propertyName( GEOM::IsosWidth ) ).toInt() );
// - set iso-lines color
if ( HasIsosColor() )
c = SalomeApp_Tools::color( Quantity_Color((Quantity_NameOfColor)GetIsosColor()) );
else
c = propMap.value( GEOM::propertyName( GEOM::IsosColor ) ).value<QColor>();
actor->SetIsosColor( c.redF(), c.greenF(), c.blueF() );
@ -2023,15 +2060,9 @@ void GEOM_Displayer::UnsetColor()
//=================================================================
double GEOM_Displayer::SetTransparency( const double transparency )
{
double aPrevTransparency = myTransparency;
if ( transparency < 0 ) {
UnsetTransparency();
}
else {
double prevTransparency = myTransparency;
myTransparency = transparency;
myHasTransparency = true;
}
return aPrevTransparency;
return prevTransparency;
}
//=================================================================
@ -2053,7 +2084,7 @@ double GEOM_Displayer::GetTransparency() const
//=================================================================
bool GEOM_Displayer::HasTransparency() const
{
return myHasTransparency;
return myTransparency >= 0;
}
//=================================================================
@ -2064,27 +2095,17 @@ bool GEOM_Displayer::HasTransparency() const
//=================================================================
double GEOM_Displayer::UnsetTransparency()
{
double aPrevTransparency = myTransparency;
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
myTransparency = resMgr->integerValue("Geometry", "transparency", 0) / 100.;
myHasTransparency = false;
return aPrevTransparency;
return SetTransparency( -1 );
}
//=================================================================
/*!
* GEOM_Displayer::SetTexture
* Set color for shape displaying. If it is equal -1 then default color is used.
* Available values are from Quantity_NameOfColor enumeration
*/
//=================================================================
void GEOM_Displayer::SetTexture( const std::string& texureFileName )
{
if(texureFileName!="")
{
myTexture = texureFileName;
}
}
bool GEOM_Displayer::HasTexture() const
@ -2123,7 +2144,6 @@ void GEOM_Displayer::UnsetWidth()
myWidth = -1;
}
int GEOM_Displayer::GetIsosWidth() const
{
return myIsosWidth;
@ -2139,6 +2159,49 @@ bool GEOM_Displayer::HasIsosWidth() const
return myIsosWidth != -1;
}
int GEOM_Displayer::SetNbIsos( const int nbIsos )
{
int prevNbIsos = myNbIsos;
myNbIsos = nbIsos;
return prevNbIsos;
}
int GEOM_Displayer::UnsetNbIsos()
{
return SetNbIsos( -1 );
}
int GEOM_Displayer::GetNbIsos() const
{
return myNbIsos;
}
bool GEOM_Displayer::HasNbIsos() const
{
return myNbIsos >= 0;
}
int GEOM_Displayer::SetIsosColor( const int color )
{
int prevColor = myIsosColor;
myIsosColor = color;
return prevColor;
}
int GEOM_Displayer::GetIsosColor() const
{
return myIsosColor;
}
bool GEOM_Displayer::HasIsosColor() const
{
return myIsosColor != -1;
}
int GEOM_Displayer::UnsetIsosColor()
{
return SetIsosColor( -1 );
}
//=================================================================
/*!

View File

@ -163,6 +163,19 @@ public:
int GetIsosWidth () const;
bool HasIsosWidth () const;
/* Set nb iso-libes for displaying. Use -1 to set default values. */
int SetNbIsos( const int );
int UnsetNbIsos();
int GetNbIsos() const;
bool HasNbIsos() const;
/* Set color for iso-lines displaying. If it is equal -1 then default color is used.
Available values are from Quantity_NameOfColor enumeration */
int SetIsosColor ( const int );
int UnsetIsosColor();
int GetIsosColor () const;
bool HasIsosColor () const;
/* Set display mode shape displaying. If it is equal -1 then display mode is used. */
int SetDisplayMode( const int );
int GetDisplayMode() const;
@ -289,13 +302,14 @@ protected:
int myColor;
double myWidth;
int myIsosWidth;
int myNbIsos;
int myIsosColor;
bool myToActivate;
int myDisplayMode;
bool myHasDisplayMode;
Aspect_TypeOfMarker myTypeOfMarker;
double myScaleOfMarker;
double myTransparency;
bool myHasTransparency;
private:
SalomeApp_Application* myApp;

View File

@ -185,7 +185,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message>
<message>
<source>GEOM_BEZIER</source>
<translation>Bezier</translation>
<translation>Bézier</translation>
</message>
<message>
<source>GEOM_BINORMAL</source>
@ -237,11 +237,11 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message>
<message>
<source>GEOM_BNDBOX_TITLE</source>
<translation>Boîte englobante</translation>
<translation>Informations sur la Boîte englobante</translation>
</message>
<message>
<source>GEOM_BOX</source>
<translation>Boite</translation>
<translation>Boîte</translation>
</message>
<message>
<source>GEOM_BOX_OBJ</source>
@ -253,7 +253,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message>
<message>
<source>GEOM_BSplineRestriction</source>
<translation>Limitation BSpline</translation>
<translation>LimitationB-Spline</translation>
</message>
<message>
<source>GEOM_BUT_APPLY</source>
@ -341,7 +341,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message>
<message>
<source>GEOM_CHAMFER_FACES</source>
<translation>Chanfrein sur des faces</translation>
<translation>Chanfrein sur les faces sélectionnées</translation>
</message>
<message>
<source>GEOM_CHAMFER_TITLE</source>
@ -405,11 +405,11 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message>
<message>
<source>GEOM_GETNONBLOCKS_TITLE</source>
<translation>Récupérer les solides non-hexahédres et les faces non-quadrangles</translation>
<translation>Récupérer les solides qui ne sontpas des hexahédres et les faces qui ne sont pas des quadrangles</translation>
</message>
<message>
<source>GEOM_GETNONBLOCKS</source>
<translation>Récupérer les solides non blocs</translation>
<translation>Récupérer les solides qui ne sont pas des blocs</translation>
</message>
<message>
<source>GEOM_NONBLOCKS</source>
@ -417,7 +417,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message>
<message>
<source>GEOM_CHECK_INFOS</source>
<translation>Objet et son information topologique</translation>
<translation>Objet et ses informations topologiques</translation>
</message>
<message>
<source>GEOM_CHECK_SHAPE</source>
@ -549,7 +549,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message>
<message>
<source>GEOM_CYLINDER_ANGLE_ERR</source>
<translation>Les valeurs de l'angle 0 et 360 sont à éviter pour construire des volumes sains. Veuillez décocher la case "Angle" pour utiliser le constructeur de cylindre complet.</translation>
<translation>Les valeurs de l&apos;angle 0 et 360 sont à éviter pour construire des volumes sains. Veuillez décocher la case &quot;Angle&quot; pour utiliser le constructeur de cylindre complet.</translation>
</message>
<message>
<source>GEOM_D1</source>
@ -2894,7 +2894,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message>
<message>
<source>MEN_POP_VERTICES</source>
<translation type="unfinished">Show Vertices</translation>
<translation>Montrer les sommets</translation>
</message>
<message>
<source>MEN_PREFERENCES</source>
@ -3066,11 +3066,11 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message>
<message>
<source>MEN_VERTICES_MODE_ON</source>
<translation type="unfinished">Show Vertices</translation>
<translation>Montrer les sommets</translation>
</message>
<message>
<source>MEN_VERTICES_MODE_OFF</source>
<translation type="unfinished">Hide Vertices</translation>
<translation>Cacher les sommets</translation>
</message>
<message>
<source>MEN_WIREFRAME</source>
@ -3762,7 +3762,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message>
<message>
<source>STB_POP_VERTICES</source>
<translation type="unfinished">Show Vertices</translation>
<translation>Montrer les sommets</translation>
</message>
<message>
<source>STB_POP_SETTEXTURE</source>
@ -4706,11 +4706,11 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message>
<message>
<source>MEN_POP_SHOW_DEPENDENCY_TREE</source>
<translation type="unfinished">Show dependency tree</translation>
<translation>Montrer l&apos;arbre des dépendances</translation>
</message>
<message>
<source>MEN_POP_SHOW_REDUCE_STUDY</source>
<translation type="unfinished">Reduce study</translation>
<translation>Etude réduite</translation>
</message>
<message>
<source>MEN_POP_SHOW_ALL_DIMENSIONS</source>
@ -4978,63 +4978,63 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message>
<message>
<source>PREF_TAB_DEPENDENCY_VIEW</source>
<translation type="unfinished">Dependency Tree</translation>
<translation>Arbre des dépendances</translation>
</message>
<message>
<source>PREF_HIERARCHY_TYPE</source>
<translation type="unfinished">Hierarchy type</translation>
<translation>Type de hiérarchie</translation>
</message>
<message>
<source>MEN_ONLY_ASCENDANTS</source>
<translation type="unfinished">Display only ascendants tree</translation>
<translation>Montrer seulement les liens ascendants</translation>
</message>
<message>
<source>MEN_ONLY_DESCENDANTS</source>
<translation type="unfinished">Display only descendants tree</translation>
<translation>Montrer seulement les liens descendants</translation>
</message>
<message>
<source>MEN_BOTH_ASCENDANTS_DESCENDANTS</source>
<translation type="unfinished">Display both ascendants and descendants trees</translation>
<translation>Montrer les liens ascendants et descendants</translation>
</message>
<message>
<source>GEOM_MOVE_POSSIBILITY</source>
<translation type="unfinished">Possibility to move nodes</translation>
<translation>Possibilité de déplacer des noeuds</translation>
</message>
<message>
<source>PREF_GROUP_DEPENDENCY_VIEW_COLOR</source>
<translation type="unfinished">Color</translation>
<translation>Couleur</translation>
</message>
<message>
<source>PREF_DEPENDENCY_VIEW_BACKGROUND_COLOR</source>
<translation type="unfinished">Background color</translation>
<translation>Couleur du fond</translation>
</message>
<message>
<source>PREF_DEPENDENCY_VIEW_NODE_COLOR</source>
<translation type="unfinished">Default node color</translation>
<translation>Couleur des noeuds par défaut</translation>
</message>
<message>
<source>PREF_DEPENDENCY_VIEW_MAIN_NODE_COLOR</source>
<translation type="unfinished">Main node color</translation>
<translation>Couleur des noeuds principaux</translation>
</message>
<message>
<source>PREF_DEPENDENCY_VIEW_UNPUBLISH_NODE_COLOR</source>
<translation type="unfinished">Unpublished node color</translation>
<translation>Couleur des noeuds non publiés</translation>
</message>
<message>
<source>PREF_DEPENDENCY_VIEW_SELECT_NODE_COLOR</source>
<translation type="unfinished">Selected node color</translation>
<translation>Couleurs des noeuds sélectionnés</translation>
</message>
<message>
<source>PREF_DEPENDENCY_VIEW_ARROW_COLOR</source>
<translation type="unfinished">Arrow color</translation>
<translation>Couleur des flèches par défaut</translation>
</message>
<message>
<source>PREF_DEPENDENCY_VIEW_HIGHLIGHT_ARROW_COLOR</source>
<translation type="unfinished">Highlighted arrow color</translation>
<translation>Couleur des flèches en surbrillance</translation>
</message>
<message>
<source>PREF_DEPENDENCY_VIEW_SELECT_ARROW_COLOR</source>
<translation type="unfinished">Selected arrow color</translation>
<translation>Couleur des flèches sélectionnées</translation>
</message>
<message>
<source>GEOM_ALL_IMPORT_FILES</source>
@ -6835,55 +6835,55 @@ Voulez-vous en créer un nouveau ?</translation>
<name>GEOMToolsGUI_ReduceStudyDlg</name>
<message>
<source>GEOM_REDUCE_STUDY_TITLE</source>
<translation type="unfinished">Reduce study</translation>
<translation>Etude réduite</translation>
</message>
<message>
<source>GEOM_REDUCE_STUDY_KEPT_OBJECTS</source>
<translation type="unfinished">Objects to be kept</translation>
<translation>Objets à conserver</translation>
</message>
<message>
<source>GEOM_REDUCE_STUDY_REMOVE_OBJECTS</source>
<translation type="unfinished">Objects to be removed</translation>
<translation>Objets à enlever</translation>
</message>
<message>
<source>GEOM_REDUCE_STUDY_NAME</source>
<translation type="unfinished">Name</translation>
<translation>Nom</translation>
</message>
<message>
<source>GEOM_REDUCE_STUDY_OPTIONS</source>
<translation type="unfinished">Options</translation>
<translation>Options</translation>
</message>
<message>
<source>GEOM_REDUCE_STUDY_INTERMEDIATES</source>
<translation type="unfinished">Intermediate objects</translation>
<translation>Objets intermédiaires</translation>
</message>
<message>
<source>GEOM_REDUCE_STUDY_SUB_OBJECTS</source>
<translation type="unfinished">Sub-objects</translation>
<translation>Sous-objets</translation>
</message>
<message>
<source>GEOM_REDUCE_STUDY_KEEP</source>
<translation type="unfinished">Keep</translation>
<translation>Conserver</translation>
</message>
<message>
<source>GEOM_REDUCE_STUDY_UNPUBLISH</source>
<translation type="unfinished">Unpublish</translation>
<translation>Dépublier</translation>
</message>
<message>
<source>GEOM_REDUCE_STUDY_REMOVE</source>
<translation type="unfinished">Remove</translation>
<translation>Enlever</translation>
</message>
<message>
<source>GEOM_REDUCE_STUDY_REMOVE_EMPTY_FOLDER</source>
<translation type="unfinished">Remove empty folders</translation>
<translation>Enlever les dossiers vide</translation>
</message>
<message>
<source>GEOM_REDUCE_STUDY_SOFT_REMOVAL</source>
<translation type="unfinished">Soft removal</translation>
<translation>Dépublication seulement</translation>
</message>
<message>
<source>GEOM_REDUCE_STUDY_WARNING_DELETE</source>
<translation type="unfinished">Do you really want to delete intermediate objects? After applying this operation study will be broken.</translation>
<translation>Voulez-vous vraiment supprimer les objets intermédiaires ? Après la confirmation de cette opération, l&apos;étude sera cassée.</translation>
</message>
</context>
<context>

View File

@ -531,6 +531,10 @@
<source>GEOM_CYLINDER_TITLE</source>
<translation></translation>
</message>
<message>
<source>GEOM_CYLINDER_ANGLE_ERR</source>
<translation type="unfinished">Angle values 0 and 360 are unsafe to build proper volumes. Please uncheck the "Angle" box to use the regular cylinder constructor.</translation>
</message>
<message>
<source>GEOM_D1</source>
<translation>D1 </translation>
@ -1449,7 +1453,7 @@
</message>
<message>
<source>GEOM_PRP_EXPORT</source>
<translation> %1 </translation>
<translation> %1 ...</translation>
</message>
<message>
<source>GEOM_PRP_LOADING</source>
@ -2351,6 +2355,14 @@
<source>MEN_CURVE_CREATOR</source>
<translation></translation>
</message>
<message>
<source>TOP_CURVE_CREATOR</source>
<translation type="unfinished">Create 2D polyline</translation>
</message>
<message>
<source>STB_CURVE_CREATOR</source>
<translation type="unfinished">Create 2D polyline</translation>
</message>
<message>
<source>MEN_ALL_SEL_ONLY</source>
<translation></translation>
@ -2677,7 +2689,7 @@
</message>
<message>
<source>MEN_IMPORT</source>
<translation></translation>
<translation>...</translation>
</message>
<message>
<source>MEN_INERTIA</source>
@ -4700,7 +4712,7 @@
<translation type="unfinished">Show dependency tree</translation>
</message>
<message>
<source>MEN_POP_SHOW_REDUCE_STUDY</source>
<source>MEN_POP_REDUCE_STUDY</source>
<translation type="unfinished">Reduce study</translation>
</message>
<message>
@ -5017,7 +5029,7 @@
</message>
<message>
<source>PREF_DEPENDENCY_VIEW_ARROW_COLOR</source>
<translation type="unfinished">Arrow color</translation>
<translation type="unfinished">Default arrow color</translation>
</message>
<message>
<source>PREF_DEPENDENCY_VIEW_HIGHLIGHT_ARROW_COLOR</source>
@ -5092,55 +5104,71 @@
<name>GeometryGUI</name>
<message>
<source>TOOL_BASIC</source>
<translation></translation>
<translation type="unfinished">Basic</translation>
</message>
<message>
<source>TOOL_BLOCKS</source>
<translation></translation>
<translation type="unfinished">Blocks</translation>
</message>
<message>
<source>TOOL_BOOLEAN</source>
<translation></translation>
<translation type="unfinished">Boolean operations</translation>
</message>
<message>
<source>TOOL_FEATURES</source>
<translation></translation>
<translation type="unfinished">Modification</translation>
</message>
<message>
<source>TOOL_GENERATION</source>
<translation>/</translation>
<translation type="unfinished">Generation</translation>
</message>
<message>
<source>TOOL_PRIMITIVES</source>
<translation></translation>
<translation type="unfinished">Primitives</translation>
</message>
<message>
<source>TOOL_TRANSFORMATION</source>
<translation>//</translation>
<translation type="unfinished">Transformation</translation>
</message>
<message>
<source>TOOL_BUILD</source>
<translation></translation>
<translation type="unfinished">Build</translation>
</message>
<message>
<source>TOOL_OPERATIONS</source>
<translation></translation>
<translation type="unfinished">Operations</translation>
</message>
<message>
<source>TOOL_PICTURES</source>
<translation></translation>
<translation type="unfinished">Pictures</translation>
</message>
<message>
<source>TOOL_ADVANCED</source>
<translation></translation>
<translation type="unfinished">Advanced</translation>
</message>
<message>
<source>TOOL_MEASURES</source>
<translation>/</translation>
<translation type="unfinished">Measures</translation>
</message>
<message>
<source>TOOL_IMPORTEXPORT</source>
<translation>/</translation>
<translation type="unfinished">Import / Export XAO</translation>
</message>
<message>
<source>TABLE_SECTION</source>
<translation type="unfinished">Section</translation>
</message>
<message>
<source>TABLE_INDEX</source>
<translation type="unfinished">Index</translation>
</message>
<message>
<source>TABLE_X</source>
<translation type="unfinished">X</translation>
</message>
<message>
<source>TABLE_Y</source>
<translation type="unfinished">Y</translation>
</message>
</context>
<context>
@ -5383,74 +5411,39 @@
<translation> 2 V</translation>
</message>
</context>
<context>
<name>CurveCreator_NewPointDlg</name>
<message>
<source>ADD_NEW_POINT</source>
<translation></translation>
</message>
<message>
<source>X_COORD</source>
<translation>X</translation>
</message>
<message>
<source>Y_COORD</source>
<translation>Y</translation>
</message>
<message>
<source>Z_COORD</source>
<translation>Z</translation>
</message>
<message>
<source>ADD_BTN</source>
<translation></translation>
</message>
<message>
<source>ADD_CONTINUE_BTN</source>
<translation></translation>
</message>
<message>
<source>ADD_NEW_POINT_TO_%1</source>
<translation>%1</translation>
</message>
<message>
<source>SET_POINT_COORDINATES</source>
<translation></translation>
</message>
</context>
<context>
<name>CurveCreator_NewSectionDlg</name>
<message>
<source>NAME</source>
<translation></translation>
<source>SECTION_NAME</source>
<translation type="unfinished">Name</translation>
</message>
<message>
<source>LINE_TYPE</source>
<translation></translation>
<source>SECTION_LINE_TYPE</source>
<translation type="unfinished">Type</translation>
</message>
<message>
<source>POLYLINE_TYPE</source>
<translation></translation>
<source>SECTION_POLYLINE_TYPE</source>
<translation type="unfinished">Polyline</translation>
</message>
<message>
<source>SPLINE_TYPE</source>
<translation></translation>
<source>SECTION_SPLINE_TYPE</source>
<translation type="unfinished">Spline</translation>
</message>
<message>
<source>LINE_CLOSED</source>
<translation></translation>
<source>SECTION_LINE_CLOSED</source>
<translation type="unfinished">Closed</translation>
</message>
<message>
<source>OK</source>
<translation>Ok</translation>
<source>SECTION_ADD_BTN</source>
<translation type="unfinished">Add</translation>
</message>
<message>
<source>ADD_BTN</source>
<translation></translation>
<source>SECTION_OK_BTN</source>
<translation type="unfinished">Ok</translation>
</message>
<message>
<source>ADD_CONTINUE_BTN</source>
<translation></translation>
<source>SECTION_CANCEL_BTN</source>
<translation type="unfinished">Cancel</translation>
</message>
<message>
<source>ADD_NEW_SECTION</source>
@ -5465,22 +5458,18 @@
<name>CurveCreator_TreeViewModel</name>
<message>
<source>X=%1, Y=%2</source>
<translation>X=%1, Y=%2</translation>
<translation type="unfinished">X=%1, Y=%2</translation>
</message>
<message>
<source>X=%1, Y=%2, Z=%3</source>
<translation>X=%1, Y=%2, Z=%3</translation>
<translation type="unfinished">X=%1, Y=%2, Z=%3</translation>
</message>
</context>
<context>
<name>CurveCreator_Widget</name>
<message>
<source>CURVE_NAME_TLT</source>
<translation></translation>
</message>
<message>
<source>SECTION_GROUP_TLT</source>
<translation></translation>
<source>SECTION_GROUP_TITLE</source>
<translation type="unfinished">Sections</translation>
</message>
<message>
<source>UNDO</source>
@ -5506,22 +5495,6 @@
<source>NEW_SECTION_TLT</source>
<translation></translation>
</message>
<message>
<source>INSERT_SECTION_BEFORE</source>
<translation></translation>
</message>
<message>
<source>INSERT_SECTION_BEFORE_TLT</source>
<translation></translation>
</message>
<message>
<source>INSERT_SECTION_AFTER</source>
<translation></translation>
</message>
<message>
<source>INSERT_SECTION_AFTER_TLT</source>
<translation></translation>
</message>
<message>
<source>ADDITION_MODE</source>
<translation></translation>
@ -5546,18 +5519,6 @@
<source>DETECTION_MODE_TLT</source>
<translation></translation>
</message>
<message>
<source>INSERT_POINT_BEFORE</source>
<translation></translation>
</message>
<message>
<source>INSERT_POINT_BEFORE_TLT</source>
<translation></translation>
</message>
<message>
<source>INSERT_POINT_AFTER</source>
<translation></translation>
</message>
<message>
<source>CLOSE_SECTIONS</source>
<translation></translation>
@ -5606,22 +5567,6 @@
<source>JOIN_TLT</source>
<translation></translation>
</message>
<message>
<source>STEP_UP</source>
<translation></translation>
</message>
<message>
<source>STEP_UP_TLT</source>
<translation></translation>
</message>
<message>
<source>STEP_DOWN</source>
<translation></translation>
</message>
<message>
<source>STEP_DOWN_TLT</source>
<translation></translation>
</message>
<message>
<source>CLEAR_ALL</source>
<translation></translation>
@ -5639,6 +5584,33 @@
<translation></translation>
</message>
</context>
<context>
<name>EntityGUI_PolylineDlg</name>
<message>
<source>POLYLINE_DLG_TITLE</source>
<translation type="unfinished">Polyline Construction</translation>
</message>
<message>
<source>POLYLINE_TITLE</source>
<translation type="unfinished">Polyline</translation>
</message>
<message>
<source>POLYLINE_NAME</source>
<translation type="unfinished">Polyline</translation>
</message>
<message>
<source>POLYLINE_IMPORT</source>
<translation type="unfinished">Import polyline</translation>
</message>
<message>
<source>POLYLINE_ADD_SECTION</source>
<translation type="unfinished">Add section</translation>
</message>
<message>
<source>POLYLINE_EDIT_SECTION</source>
<translation type="unfinished">Edit section</translation>
</message>
</context>
<context>
<name>EntityGUI_SketcherDlg</name>
<message>
@ -6160,15 +6132,15 @@
</message>
<message>
<source>X</source>
<translation>X</translation>
<translation type="unfinished">X</translation>
</message>
<message>
<source>Y</source>
<translation>Y</translation>
<translation type="unfinished">Y</translation>
</message>
<message>
<source>Z</source>
<translation>Z</translation>
<translation type="unfinished">Z</translation>
</message>
</context>
<context>
@ -6484,7 +6456,7 @@
<name>OperationGUI_ChamferDlg</name>
<message>
<source>D</source>
<translation>D</translation>
<translation type="unfinished">D</translation>
</message>
<message>
<source>FACE_1</source>

View File

@ -83,6 +83,27 @@
#define PLANAR_FACE_MAX_TOLERANCE 1e-06
// The following macro, when enabled, causes pcurves upgrade after MakeFilling algorithm
// in MakeAnyFace function;
// WARNING: it may lead to extra vertices generation by partition algorithm
// in some cases, for example when fillet is made on a PipeTShape -
// see issues 0021568 and 0021550
// VSR (15/05/2012): macro commented out (disabled) to avoid extra vertices!
//#define MAKE_FACE_UPGRADE_PCURVES
// The following macro, when enabled, causes fixing tolerance for pcurves
// after BRepBuilderAPI_MakeFace + ShHealOper_ShapeProcess in MakeAnyFace function;
// This sometimes allows to fix problems of extra vertices generation
// see issue 0022706
// VSR (17/11/2014): macro enabled
#define MAKE_FACE_PCURVES_FIX_TOLERANCE
#ifdef MAKE_FACE_PCURVES_FIX_TOLERANCE
#include <BOPTools_AlgoTools.hxx>
#include <NCollection_DataMap.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#endif
static Standard_Integer mod4 (Standard_Integer nb)
{
if (nb <= 0) return nb + 4;
@ -1362,11 +1383,7 @@ TCollection_AsciiString GEOMImpl_Block6Explorer::MakeAnyFace (const TopoDS_Wire&
// 12.04.2006 for PAL12149 begin
Handle(Geom_Surface) aGS = BRep_Tool::Surface(TopoDS::Face(aFace));
// VSR: debug issues 0021568 and 0021550 (15/05/2012) - BEGIN
// the following block, when enabled, leads to extra vertices generation by partition algorithm
// in some cases, for example when fillet is made on a PipeTShape
#if 0
// VSR: debug issues 0021568 and 0021550 (15/05/2012) - END
#ifdef MAKE_FACE_UPGRADE_PCURVES
BRep_Builder BB;
TopoDS_Iterator itw(theWire);
for (; itw.More(); itw.Next())
@ -1396,7 +1413,46 @@ TCollection_AsciiString GEOMImpl_Block6Explorer::MakeAnyFace (const TopoDS_Wire&
}
// 12.04.2006 for PAL12149 end
if (theResult.IsNull()) { // try to deal with pure result of filling
if (!theResult.IsNull()) {
// try to deal with result of BRepBuilderAPI_MakeFace + ShHealOper_ShapeProcess
#if OCC_VERSION_LARGE >= 0x06080000
#ifdef MAKE_FACE_PCURVES_FIX_TOLERANCE
// check and fix pcurves, if necessary
Standard_Real aT, aTolE, aD, aDMax;
TopExp_Explorer aExpF, aExpE;
NCollection_DataMap<TopoDS_Shape, Standard_Real, TopTools_ShapeMapHasher> aDMETol;
aExpF.Init(theResult, TopAbs_FACE);
for (; aExpF.More(); aExpF.Next()) {
const TopoDS_Face& aF = *(TopoDS_Face*)&aExpF.Current();
aExpE.Init(aF, TopAbs_EDGE);
for (; aExpE.More(); aExpE.Next()) {
const TopoDS_Edge& aE = *(TopoDS_Edge*)&aExpE.Current();
if (!BOPTools_AlgoTools::ComputeTolerance(aF, aE, aDMax, aT)) continue;
aTolE = BRep_Tool::Tolerance(aE);
if (aDMax < aTolE) continue;
if (aDMETol.IsBound(aE)) {
aD = aDMETol.Find(aE);
if (aDMax > aD) {
aDMETol.UnBind(aE);
aDMETol.Bind(aE, aDMax);
}
}
else {
aDMETol.Bind(aE, aDMax);
}
}
}
NCollection_DataMap<TopoDS_Shape, Standard_Real, TopTools_ShapeMapHasher>::Iterator aDMETolIt(aDMETol);
ShapeFix_ShapeTolerance sat;
for (; aDMETolIt.More(); aDMETolIt.Next()) {
sat.LimitTolerance(aDMETolIt.Key(), aDMETolIt.Value());
}
#endif
#endif
}
else {
// try to deal with pure result of BRepOffsetAPI_MakeFilling
// Update tolerance
Standard_Real aTol = MF.G0Error();

View File

@ -31,16 +31,11 @@
#include <TNaming_CopyShape.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <ShapeFix_Shape.hxx>
#include <BRep_Builder.hxx>
#include <BRepAlgo.hxx>
#include <BRepAlgoAPI_Common.hxx>
#include <BRepAlgoAPI_Cut.hxx>
#include <BRepAlgoAPI_Fuse.hxx>
#include <BRepAlgoAPI_Section.hxx>
#include <BRepCheck_Analyzer.hxx>
#include <BOPAlgo_CheckerSI.hxx>
#include <BOPDS_DS.hxx>
@ -73,33 +68,23 @@ static TopoDS_Shape RemoveExtraEdges(const TopoDS_Shape &theShape)
{
TopoDS_Shape aResult;
if (theShape.IsNull() == Standard_False) {
if (!theShape.IsNull()) {
BlockFix_BlockFixAPI aTool;
aTool.OptimumNbFaces() = 0;
aTool.SetShape(theShape);
aTool.Perform();
aResult = aTool.Shape();
TopoDS_Shape aShape = aTool.Shape();
// Repair result
BRepCheck_Analyzer anAna (aResult, false);
Standard_Boolean isValid = anAna.IsValid();
if (!isValid) {
if (GEOMUtils::CheckShape(aShape)) {
aResult = aShape;
}
else {
TopoDS_Shape aFixed;
ShHealOper_ShapeProcess aHealer;
aHealer.Perform(aResult, aFixed);
if (aHealer.isDone()) {
if (aHealer.isDone() && GEOMUtils::CheckShape(aFixed))
aResult = aFixed;
anAna.Init(aResult, false);
isValid = anAna.IsValid();
}
}
if (!isValid) {
aResult.Nullify();
}
}
@ -153,11 +138,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
if (!aShape1.IsNull() && !aShape2.IsNull()) {
// check arguments for Mantis issue 0021019
BRepCheck_Analyzer ana (aShape1, Standard_True);
if (!ana.IsValid())
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is not valid");
ana.Init(aShape2);
if (!ana.IsValid())
if (!GEOMUtils::CheckShape(aShape1, true) || !GEOMUtils::CheckShape(aShape2, true))
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is not valid");
if (isCheckSelfInte) {
@ -211,10 +192,9 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
aShape = aRefShape->GetValue();
if (!aShape.IsNull()) {
BRepCheck_Analyzer anAna (aShape, Standard_True);
if (!anAna.IsValid()) {
// check arguments for Mantis issue 0021019
if (!GEOMUtils::CheckShape(aShape, true))
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is not valid");
}
BOPAlgo_CheckerSI aCSI; // checker of self-interferences
@ -239,11 +219,9 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
for (i = 2; i <= nbShapes; i++) {
aRefShape = Handle(GEOM_Function)::DownCast(aShapes->Value(i));
aShape2 = aRefShape->GetValue();
anAna.Init(aShape2);
if (!anAna.IsValid()) {
if (!GEOMUtils::CheckShape(aShape2, true))
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is not valid");
}
if (isCheckSelfInte) {
BOPCol_ListOfShape aList2;
@ -280,11 +258,8 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
if (!aShape.IsNull()) {
// check arguments for Mantis issue 0021019
BRepCheck_Analyzer anAna (aShape, Standard_True);
if (!anAna.IsValid()) {
if (!GEOMUtils::CheckShape(aShape, true))
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is not valid");
}
BOPAlgo_CheckerSI aCSI; // checker of self-interferences
@ -315,11 +290,9 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
for (i = 1; i <= nbShapes; i++) {
aRefTool = Handle(GEOM_Function)::DownCast(aTools->Value(i));
aTool = aRefTool->GetValue();
anAna.Init(aTool);
if (!anAna.IsValid()) {
if (!GEOMUtils::CheckShape(aTool, true))
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is not valid");
}
if (isCheckSelfInte) {
BOPCol_ListOfShape aList2;
@ -572,19 +545,8 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
}
// 08.07.2008 skl for bug 19761 from Mantis
BRepCheck_Analyzer ana (aShape, Standard_True);
ana.Init(aShape);
if (!ana.IsValid()) {
ShapeFix_ShapeTolerance aSFT;
aSFT.LimitTolerance(aShape, Precision::Confusion(),
Precision::Confusion(), TopAbs_SHAPE);
Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape);
aSfs->Perform();
aShape = aSfs->Shape();
ana.Init(aShape);
if (!ana.IsValid())
if ( !GEOMUtils::CheckShape(aShape, true) && !GEOMUtils::FixShapeTolerance(aShape) )
Standard_ConstructionError::Raise("Boolean operation aborted : non valid shape result");
}
// BEGIN: Mantis issue 0021060: always limit tolerance of BOP result
// 1. Get shape parameters for comparison
@ -616,15 +578,8 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
TopoDS_Shape aShapeCopy;
TColStd_IndexedDataMapOfTransientTransient aMapTShapes;
TNaming_CopyShape::CopyTool(aShape, aMapTShapes, aShapeCopy);
ShapeFix_ShapeTolerance aSFT;
aSFT.LimitTolerance(aShapeCopy, Precision::Confusion(), Precision::Confusion(), TopAbs_SHAPE);
Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape (aShapeCopy);
aSfs->Perform();
aShapeCopy = aSfs->Shape();
// 3. Check parameters
ana.Init(aShapeCopy);
if (ana.IsValid()) {
if ( GEOMUtils::FixShapeTolerance(aShapeCopy, true) ) {
int iType, nbTypesCopy [TopAbs_SHAPE];
for (iType = 0; iType < TopAbs_SHAPE; ++iType)

View File

@ -20,14 +20,12 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <Standard_Stream.hxx>
#include <GEOMImpl_ChamferDriver.hxx>
#include <GEOMImpl_IChamfer.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOMImpl_ILocalOperations.hxx>
#include <GEOMImpl_Block6Explorer.hxx>
#include <GEOMUtils.hxx>
#include <GEOM_Function.hxx>
#include <BRepLib.hxx>
@ -35,22 +33,16 @@
#include <BRepTools.hxx>
#include <BRepFilletAPI_MakeChamfer.hxx>
#include <ShapeFix_Shape.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <TopAbs.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <Precision.hxx>
#include <gp_Pnt.hxx>
#include <StdFail_NotDone.hxx>
//=======================================================================
@ -63,7 +55,6 @@ const Standard_GUID& GEOMImpl_ChamferDriver::GetID()
return aChamferDriver;
}
//=======================================================================
//function : GEOMImpl_ChamferDriver
//purpose :
@ -269,12 +260,7 @@ Standard_Integer GEOMImpl_ChamferDriver::Execute(TFunction_Logbook& log) const
if (aShape.IsNull()) return 0;
// reduce tolerances
ShapeFix_ShapeTolerance aSFT;
aSFT.LimitTolerance(aShape, Precision::Confusion(),
Precision::Confusion(), TopAbs_SHAPE);
Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape);
aSfs->Perform();
aShape = aSfs->Shape();
GEOMUtils::FixShapeTolerance( aShape );
// fix SameParameter flag
BRepLib::SameParameter(aShape, 1.E-5, Standard_True);

View File

@ -17,34 +17,25 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <Standard_Stream.hxx>
#include <GEOMImpl_Fillet2dDriver.hxx>
#include <GEOMImpl_IFillet2d.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOMImpl_ILocalOperations.hxx>
#include <GEOMImpl_Block6Explorer.hxx>
#include <GEOM_Function.hxx>
#include <GEOMUtils.hxx>
#include <BRepFilletAPI_MakeFillet2d.hxx>
#include <BRepCheck_Analyzer.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopAbs.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <ShapeFix_Shape.hxx>
#include <Precision.hxx>
#include <gp_Pnt.hxx>
#include <StdFail_NotDone.hxx>
//=======================================================================

View File

@ -20,31 +20,30 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <Standard_Stream.hxx>
#include <GEOMImpl_FilletDriver.hxx>
#include <GEOMImpl_IFillet.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOMImpl_ILocalOperations.hxx>
#include <GEOMUtils.hxx>
#include <GEOM_Function.hxx>
#include <BRepFilletAPI_MakeFillet.hxx>
#include <BRepCheck_Analyzer.hxx>
#include <BRep_Tool.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Edge.hxx>
#include <TopAbs.hxx>
#include <TopExp_Explorer.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <ShapeFix_Shape.hxx>
#include <Precision.hxx>
#include <gp_Pnt.hxx>
#include <StdFail_NotDone.hxx>
// Debug PipeTShape function: uncomment the macro below to correct tolerance
// of resulting face after fillet creation
// VSR 30/12/2014: macro disabled
//#define FIX_FACE_TOLERANCE
// Debug PipeTShape function: uncomment the macro below to correct tolerance
// of resulting curves after fillet creation
// VSR 30/12/2014: macro disabled
//#define FIX_CURVES_TOLERANCES
//=======================================================================
//function : GetID
//purpose :
@ -135,20 +134,16 @@ Standard_Integer GEOMImpl_FilletDriver::Execute(TFunction_Logbook& log) const
if (aShape.IsNull()) return 0;
// Check shape validity
BRepCheck_Analyzer ana (aShape, false);
if (!ana.IsValid()) {
#if defined(FIX_CURVES_TOLERANCES)
bool isOk = GEOMUtils::FixShapeCurves(aShape);
#elif defined(FIX_FACE_TOLERANCE)
bool isOk = GEOMUtils::FixShapeTolerance(aShape, TopAbs_FACE);
#else
// 08.07.2008 added by skl during fixing bug 19761 from Mantis
ShapeFix_ShapeTolerance aSFT;
aSFT.LimitTolerance(aShape, Precision::Confusion(),
Precision::Confusion(), TopAbs_SHAPE);
Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape);
aSfs->Perform();
aShape = aSfs->Shape();
ana.Init(aShape);
if (!ana.IsValid())
bool isOk = GEOMUtils::CheckShape(aShape) || GEOMUtils::FixShapeTolerance(aShape);
#endif
if ( !isOk )
StdFail_NotDone::Raise("Fillet algorithm have produced an invalid shape result");
}
aFunction->SetValue(aShape);

View File

@ -20,8 +20,6 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <Standard_Stream.hxx>
#include <GEOMImpl_HealingDriver.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOMImpl_IHealing.hxx>
@ -44,12 +42,8 @@
#include <TNaming_CopyShape.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <ShapeFix_Shape.hxx>
#include <BRep_Builder.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepCheck_Analyzer.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <TopExp.hxx>
@ -541,6 +535,8 @@ void GEOMImpl_HealingDriver::LimitTolerance (GEOMImpl_IHealing* theHI,
TopoDS_Shape& theOutShape) const
{
Standard_Real aTol = theHI->GetTolerance();
TopAbs_ShapeEnum aType = theHI->GetType();
if (aTol < Precision::Confusion())
aTol = Precision::Confusion();
@ -550,17 +546,10 @@ void GEOMImpl_HealingDriver::LimitTolerance (GEOMImpl_IHealing* theHI,
TNaming_CopyShape::CopyTool(theOriginalShape, aMapTShapes, aShapeCopy);
// 2. Limit tolerance.
ShapeFix_ShapeTolerance aSFT;
aSFT.LimitTolerance(aShapeCopy, aTol, aTol, TopAbs_SHAPE);
// 3. Fix obtained shape.
Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape (aShapeCopy);
aSfs->Perform();
theOutShape = aSfs->Shape();
BRepCheck_Analyzer ana (theOutShape, Standard_True);
if (!ana.IsValid())
if (!GEOMUtils::FixShapeTolerance(aShapeCopy, aType, aTol))
StdFail_NotDone::Raise("Non valid shape result");
theOutShape = aShapeCopy;
}
//=======================================================================
@ -735,8 +724,7 @@ void GEOMImpl_HealingDriver::FuseCollinearEdges (const TopoDS_Shape& theOriginal
}
theOutShape = aFinalWire;
BRepCheck_Analyzer ana (theOutShape, Standard_True);
if (!ana.IsValid())
if (!GEOMUtils::CheckShape(theOutShape, true))
StdFail_NotDone::Raise("Non valid shape result");
}
@ -902,6 +890,7 @@ GetCreationInformation(std::string& theOperationName,
theOperationName = "LIMIT_TOLERANCE";
AddParam( theParams, "Selected shape", aCI.GetOriginal() );
AddParam( theParams, "Tolerance", aCI.GetTolerance() );
AddParam( theParams, "Type", aCI.GetType() );
break;
case FUSE_COLLINEAR_EDGES:
theOperationName = "FUSE_EDGES";

View File

@ -24,7 +24,8 @@
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_HArray1OfExtendedString.hxx>
#include "TColStd_HSequenceOfTransient.hxx"
#include <TColStd_HSequenceOfTransient.hxx>
#include <TopAbs.hxx>
class GEOMImpl_IHealing
{
@ -41,7 +42,8 @@ public:
ARG_DEV_EDGE_VALUE = 8,
ARG_IS_BY_PARAMETER = 9,
ARG_SUBSHAPE_INDEX = 10,
ARG_LIST_SHAPES = 11
ARG_LIST_SHAPES = 11,
ARG_TYPE = 12
};
GEOMImpl_IHealing(Handle(GEOM_Function) theFunction): _func(theFunction) {}
@ -73,6 +75,9 @@ public:
void SetTolerance( Standard_Real val ) { _func->SetReal(ARG_TOLERANCE, val); }
Standard_Real GetTolerance() { return _func->GetReal(ARG_TOLERANCE); }
void SetType( TopAbs_ShapeEnum val ) { _func->SetInteger(ARG_TYPE, (Standard_Integer)val); }
TopAbs_ShapeEnum GetType() { TopAbs_ShapeEnum type = (TopAbs_ShapeEnum)(_func->GetInteger(ARG_TYPE)); return _func->IsDone() ? type : TopAbs_SHAPE; }
void SetDevideEdgeValue( Standard_Real val ) { _func->SetReal(ARG_DEV_EDGE_VALUE, val); }
Standard_Real GetDevideEdgeValue() { return _func->GetReal(ARG_DEV_EDGE_VALUE); }

View File

@ -1056,7 +1056,8 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::ChangeOrientationCopy (Handle(G
*/
//=============================================================================
Handle(GEOM_Object) GEOMImpl_IHealingOperations::LimitTolerance (Handle(GEOM_Object) theObject,
double theTolerance)
double theTolerance,
TopAbs_ShapeEnum theType)
{
// Set error code, check parameters
SetErrorCode(KO);
@ -1084,6 +1085,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::LimitTolerance (Handle(GEOM_Obj
GEOMImpl_IHealing HI (aFunction);
HI.SetOriginal(aLastFunction);
HI.SetTolerance(theTolerance);
HI.SetType(theType);
// Compute
try {

View File

@ -27,6 +27,7 @@
#include "GEOM_Engine.hxx"
#include "GEOM_Object.hxx"
#include <TopAbs.hxx>
#include <TColStd_HArray1OfExtendedString.hxx>
#include <TColStd_HArray1OfInteger.hxx>
@ -96,7 +97,8 @@ class GEOMImpl_IHealingOperations : public GEOM_IOperations {
Standard_EXPORT Handle(GEOM_Object) ChangeOrientationCopy( Handle(GEOM_Object) theObject);
Standard_EXPORT Handle(GEOM_Object) LimitTolerance( Handle(GEOM_Object) theObject,
double theTolerance );
double theTolerance,
TopAbs_ShapeEnum theType = TopAbs_SHAPE );
};

View File

@ -26,29 +26,16 @@
#include <GEOMImpl_IOffset.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOM_Function.hxx>
#include <GEOMUtils.hxx>
#include <BRepOffsetAPI_MakeOffsetShape.hxx>
#include <BRep_Tool.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <Precision.hxx>
#include <gp_Pnt.hxx>
#include <BRepCheck_Analyzer.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <ShapeFix_Shape.hxx>
#include <Standard_ConstructionError.hxx>
#include <StdFail_NotDone.hxx>
#include "utilities.h"
//=======================================================================
//function : GetID
//purpose :
@ -59,7 +46,6 @@ const Standard_GUID& GEOMImpl_OffsetDriver::GetID()
return aOffsetDriver;
}
//=======================================================================
//function : GEOMImpl_OffsetDriver
//purpose :
@ -100,21 +86,9 @@ Standard_Integer GEOMImpl_OffsetDriver::Execute(TFunction_Logbook& log) const
aTol);
if (MO.IsDone()) {
aShape = MO.Shape();
// 23.04.2010 skl for bug 21699 from Mantis
BRepCheck_Analyzer ana (aShape, Standard_True);
ana.Init(aShape);
if (!ana.IsValid()) {
ShapeFix_ShapeTolerance aSFT;
aSFT.LimitTolerance(aShape, Precision::Confusion(),
Precision::Confusion(), TopAbs_SHAPE);
Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape);
aSfs->Perform();
aShape = aSfs->Shape();
ana.Init(aShape);
if (!ana.IsValid())
if ( !GEOMUtils::CheckShape(aShape, true) && !GEOMUtils::FixShapeTolerance(aShape) )
Standard_ConstructionError::Raise("Boolean operation aborted : non valid shape result");
}
}
else {
StdFail_NotDone::Raise("Offset construction failed");
}

View File

@ -20,47 +20,29 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <Standard_Stream.hxx>
#include <GEOMImpl_PartitionDriver.hxx>
#include <GEOMImpl_IPartition.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOMUtils.hxx>
#include <GEOM_Object.hxx>
#include <GEOM_Function.hxx>
#include <GEOMAlgo_Splitter.hxx>
#include <TDataStd_IntegerArray.hxx>
#include <TNaming_CopyShape.hxx>
//#include <BRepBuilderAPI_Copy.hxx>
#include <BRep_Tool.hxx>
#include <BRepAlgo.hxx>
#include <BRepTools.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <ShapeFix_Shape.hxx>
#include <TColStd_IndexedDataMapOfTransientTransient.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <Standard_NullObject.hxx>
#include <StdFail_NotDone.hxx>
#include <Precision.hxx>
#include <gp_Pnt.hxx>
#include <BOPAlgo_CheckerSI.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPCol_ListOfShape.hxx>
@ -444,17 +426,8 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const
Standard_ConstructionError::Raise("Partition aborted : non valid shape result");
//end of IPAL21418
if (!BRepAlgo::IsValid(aShape)) {
// 08.07.2008 added by skl during fixing bug 19761 from Mantis
ShapeFix_ShapeTolerance aSFT;
aSFT.LimitTolerance(aShape, Precision::Confusion(),
Precision::Confusion(), TopAbs_SHAPE);
Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape);
aSfs->Perform();
aShape = aSfs->Shape();
if (!BRepAlgo::IsValid(aShape))
if ( !GEOMUtils::CheckShape(aShape, true) && !GEOMUtils::FixShapeTolerance(aShape) )
Standard_ConstructionError::Raise("Partition aborted : non valid shape result");
}
aFunction->SetValue(aShape);

View File

@ -38,8 +38,6 @@
#include <ShapeAnalysis_Edge.hxx>
#include <ShapeFix_Face.hxx>
#include <ShapeFix_Shell.hxx>
#include <ShapeFix_Shape.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
@ -47,7 +45,6 @@
#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <BRepBuilderAPI_Sewing.hxx>
#include <BRepCheck_Analyzer.hxx>
#include <BRepGProp.hxx>
#include <GeomFill_Trihedron.hxx>
#include <GeomFill_CorrectedFrenet.hxx>
@ -2573,19 +2570,8 @@ Standard_Integer GEOMImpl_PipeDriver::Execute (TFunction_Logbook& log) const
if (aShape.IsNull()) return 0;
BRepCheck_Analyzer ana (aShape, Standard_False);
if (!ana.IsValid()) {
ShapeFix_ShapeTolerance aSFT;
aSFT.LimitTolerance(aShape,Precision::Confusion(),Precision::Confusion());
Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape);
aSfs->SetPrecision(Precision::Confusion());
aSfs->Perform();
aShape = aSfs->Shape();
ana.Init(aShape, Standard_False);
if (!ana.IsValid())
if ( !GEOMUtils::CheckShape(aShape) && !GEOMUtils::FixShapeTolerance(aShape) )
Standard_ConstructionError::Raise("Algorithm have produced an invalid shape result");
}
if (aType != PIPE_BASE_PATH &&
aType != PIPE_SHELLS_WITHOUT_PATH) {

View File

@ -20,83 +20,16 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <Standard_Stream.hxx>
#include <Basics_OCCTVersion.hxx>
#include <GEOMImpl_PipePathDriver.hxx>
#include <GEOMImpl_IShapesOperations.hxx>
#include <GEOMImpl_ShapeDriver.hxx>
#include <GEOMImpl_IPipePath.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOM_Function.hxx>
#include <ShapeAnalysis_FreeBounds.hxx>
#include <ShapeAnalysis_Edge.hxx>
#include <ShapeFix_Face.hxx>
#include <ShapeFix_Shell.hxx>
#include <ShapeFix_Shape.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <BRepBuilderAPI_Copy.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <BRepBuilderAPI_Sewing.hxx>
#include <BRepCheck_Analyzer.hxx>
#include <BRepGProp.hxx>
#include <BRepOffsetAPI_MakePipe.hxx>
#include <BRepOffsetAPI_MakePipeShell.hxx>
#include <BRepOffsetAPI_MiddlePath.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Compound.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TopTools_HSequenceOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <GProp_GProps.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <GeomAPI_Interpolate.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom_Plane.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_BezierSurface.hxx>
#include <Geom_Line.hxx>
#include <Geom_Conic.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_BSplineSurface.hxx>
#include <GeomFill_BSplineCurves.hxx>
#include <GeomConvert_ApproxCurve.hxx>
#include <GeomConvert.hxx>
#include <TColgp_SequenceOfPnt.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColgp_Array2OfPnt.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
#include <Precision.hxx>
#include <Standard_NullObject.hxx>
#include <Standard_TypeMismatch.hxx>
#include <Standard_ConstructionError.hxx>
#include "utilities.h"
//=======================================================================
//function : GetID

View File

@ -20,27 +20,20 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <Standard_Stream.hxx>
#include <GEOMImpl_ScaleDriver.hxx>
#include <GEOMImpl_IScale.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOMUtils.hxx>
#include <GEOM_Function.hxx>
#include <ShapeFix_Shape.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <BRepBuilderAPI_GTransform.hxx>
#include <BRep_Tool.hxx>
#include <BRepAlgo.hxx>
#include <BRepCheck_Analyzer.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <Precision.hxx>
@ -175,19 +168,8 @@ Standard_Integer GEOMImpl_ScaleDriver::Execute(TFunction_Logbook& log) const
if (aShape.IsNull()) return 0;
BRepCheck_Analyzer ana (aShape, Standard_False);
if (!ana.IsValid()) {
ShapeFix_ShapeTolerance aSFT;
aSFT.LimitTolerance(aShape,Precision::Confusion(),Precision::Confusion());
Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape);
aSfs->SetPrecision(Precision::Confusion());
aSfs->Perform();
aShape = aSfs->Shape();
ana.Init(aShape, Standard_False);
if (!ana.IsValid())
if ( !GEOMUtils::CheckShape(aShape) && !GEOMUtils::FixShapeTolerance(aShape) )
Standard_ConstructionError::Raise("Scaling aborted : algorithm has produced an invalid shape result");
}
aFunction->SetValue(aShape);

View File

@ -20,19 +20,16 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <Standard_Stream.hxx>
#include <GEOMImpl_ThruSectionsDriver.hxx>
#include <GEOMImpl_IThruSections.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOM_Function.hxx>
#include <GEOMUtils.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
#include <Precision.hxx>
#include <BRepCheck_Analyzer.hxx>
#include <BRepOffsetAPI_ThruSections.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopAbs.hxx>
@ -41,12 +38,9 @@
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>
#include <Standard_NullObject.hxx>
#include <Standard_TypeMismatch.hxx>
#include <Standard_ConstructionError.hxx>
#include <ShapeFix_Shape.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <Precision.hxx>
//=======================================================================
//function : GetID
//purpose :
@ -132,21 +126,11 @@ Standard_Integer GEOMImpl_ThruSectionsDriver::Execute(TFunction_Logbook& log) co
return 0;
}
BRepCheck_Analyzer ana (aShape, Standard_False);
if (!ana.IsValid()) {
if ( !GEOMUtils::CheckShape(aShape) && !GEOMUtils::FixShapeTolerance(aShape) ) {
//algoritm thru section creats on the arcs invalid shapes gka
ShapeFix_ShapeTolerance aSFT;
aSFT.LimitTolerance(aShape,Precision::Confusion(),Precision::Confusion());
Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape);
aSfs->SetPrecision(Precision::Confusion());
aSfs->Perform();
aShape = aSfs->Shape();
//ana.Init(aShape, Standard_False);
//if (!ana.IsValid())
// Standard_ConstructionError::Raise("Algorithm have produced an invalid shape result");
}
aFunction->SetValue(aShape);
log.SetTouched(Label());

View File

@ -20,22 +20,14 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <Standard_Stream.hxx>
#include <GEOMImpl_TranslateDriver.hxx>
#include <GEOMImpl_ITranslate.hxx>
#include <GEOMImpl_ITransformOperations.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOM_Function.hxx>
#include <GEOMUtils.hxx>
#include <ShapeFix_Shape.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <BRepCheck_Analyzer.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
@ -43,8 +35,6 @@
#include <TopoDS_Compound.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Edge.hxx>
#include <gp_Trsf.hxx>
#include <gp_Pnt.hxx>
@ -197,7 +187,6 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
B.Add(aCompound, anOriginal.Located(aLocRes));
}
aShape = aCompound;
//aShape = GEOMImpl_ITransformOperations::TranslateShape1D(anOriginal, &TI);
}
else if (aType == TRANSLATE_2D) {
Standard_Integer nbtimes1 = TI.GetNbIter1(), nbtimes2 = TI.GetNbIter2();
@ -242,25 +231,13 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
}
}
aShape = aCompound;
//aShape = GEOMImpl_ITransformOperations::TranslateShape2D(anOriginal, &TI);
}
else return 0;
if (aShape.IsNull()) return 0;
BRepCheck_Analyzer ana (aShape, Standard_True);
if (!ana.IsValid()) {
ShapeFix_ShapeTolerance aSFT;
aSFT.LimitTolerance(aShape,Precision::Confusion(),Precision::Confusion());
Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape);
aSfs->SetPrecision(Precision::Confusion());
aSfs->Perform();
aShape = aSfs->Shape();
ana.Init(aShape, Standard_False);
if (!ana.IsValid())
if ( !GEOMUtils::CheckShape(aShape, true) && !GEOMUtils::FixShapeTolerance(aShape) )
Standard_ConstructionError::Raise("Scaling aborted : algorithm has produced an invalid shape result");
}
aFunction->SetValue(aShape);

View File

@ -43,6 +43,21 @@
#include <Standard_ConstructionError.hxx>
namespace
{
Handle(GEOM_Object) GetOwner( const TDF_Label& l )
{
TDF_Label label = l;
// object is stored on a grandfather label of a driver label
if ( !label.IsNull() )
label = label.Father();
if ( !label.IsNull() )
label = label.Father();
return GEOM_Object::GetObject( label );
}
}
//=======================================================================
//function : GetID
//purpose :
@ -179,8 +194,7 @@ GetCreationInformation(std::string& theOperationName,
AddParam( theParams, "Dz", aCI.GetDZ() );
break;
case VECTOR_TWO_PNT: {
TDF_Label label = Label();
Handle(GEOM_Object) obj = GEOM_Object::GetObject( label );
Handle(GEOM_Object) obj = GetOwner( Label() );
if ( !obj.IsNull() && obj->GetType() == GEOM_EDGE )
theOperationName = "EDGE";
else

View File

@ -42,6 +42,7 @@ SET(_link_LIBRARIES
${CAS_TKG3d}
${CAS_TKV3d}
${CAS_TKGeomBase}
${CAS_TKBO}
${LIBXML2_LIBRARIES}
${KERNEL_SALOMELocalTrace}
)

View File

@ -26,7 +26,6 @@
#include <Basics_OCCTVersion.hxx>
#include <utilities.h>
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>
@ -44,9 +43,14 @@
#include <BRepClass3d_SolidClassifier.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRepBuilderAPI_Sewing.hxx>
#include <BRepCheck_Analyzer.hxx>
#include <Bnd_Box.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
@ -82,12 +86,14 @@
#include <ShapeAnalysis.hxx>
#include <ShapeFix_Shape.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <ProjLib.hxx>
#include <ElSLib.hxx>
#include <vector>
#include <sstream>
#include <algorithm>
#include <Standard_Failure.hxx>
#include <Standard_NullObject.hxx>
@ -95,6 +101,12 @@
#define STD_SORT_ALGO 1
// When the following macro is defined, ShapeFix_ShapeTolerance function is used to set max tolerance of curve
// in GEOMUtils::FixShapeCurves function; otherwise less restrictive BRep_Builder::UpdateEdge/UpdateVertex
// approach is used
// VSR (29/12/2014): macro disabled
//#define USE_LIMIT_TOLERANCE
namespace
{
/**
@ -112,7 +124,6 @@ namespace
TopoDS_Shape &theModifiedShape,
Standard_Real &theAddDist)
{
Standard_Boolean isModified = Standard_False;
TopExp_Explorer anExp;
int nbf = 0;
@ -136,7 +147,28 @@ namespace
const Standard_Boolean isShell =
(sh.ShapeType()==TopAbs_SHELL || sh.ShapeType()==TopAbs_FACE);
if( isShell || S->IsUPeriodic() ) {
if ( !isShell && S->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ) {
Handle(Geom_SphericalSurface) SS = Handle(Geom_SphericalSurface)::DownCast(S);
gp_Pnt PC = SS->Location();
BRep_Builder B;
TopoDS_Vertex V;
B.MakeVertex(V,PC,1.e-7);
theModifiedShape = V;
theAddDist = SS->Radius();
return Standard_True;
}
if ( !isShell && S->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)) ) {
Handle(Geom_ToroidalSurface) TS = Handle(Geom_ToroidalSurface)::DownCast(S);
gp_Ax3 ax3 = TS->Position();
Handle(Geom_Circle) C = new Geom_Circle(ax3.Ax2(),TS->MajorRadius());
BRep_Builder B;
TopoDS_Edge E;
B.MakeEdge(E,C,1.e-7);
theModifiedShape = E;
theAddDist = TS->MinorRadius();
return Standard_True;
}
// non solid case or any periodic surface (Mantis 22454).
double U1,U2,V1,V2;
// changes for 0020677: EDF 1219 GEOM: MinDistance gives 0 instead of 20.88
@ -147,69 +179,42 @@ namespace
new Geom_RectangularTrimmedSurface(S,U1,(U1+U2)/2.,V1,V2);
Handle(Geom_RectangularTrimmedSurface) TrS2 =
new Geom_RectangularTrimmedSurface(S,(U1+U2)/2.,U2,V1,V2);
BRep_Builder B;
TopoDS_Face F1,F2;
TopoDS_Shape aMShape;
TopoDS_Face F1 = BRepBuilderAPI_MakeFace(TrS1, Precision::Confusion());
TopoDS_Face F2 = BRepBuilderAPI_MakeFace(TrS2, Precision::Confusion());
if (isShell) {
BRep_Builder B;
B.MakeCompound(TopoDS::Compound(aMShape));
B.Add(aMShape, F1);
B.Add(aMShape, F2);
} else {
B.MakeShell(TopoDS::Shell(aMShape));
}
B.MakeFace(F1,TrS1,1.e-7);
B.Add(aMShape,F1);
B.MakeFace(F2,TrS2,1.e-7);
B.Add(aMShape,F2);
Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape;
if (!isShell) {
// The original shape is a solid.
BRepBuilderAPI_Sewing aSewing (Precision::Confusion()*10.0);
aSewing.Add(F1);
aSewing.Add(F2);
aSewing.Perform();
aMShape = aSewing.SewedShape();
BRep_Builder B;
TopoDS_Solid aSolid;
B.MakeSolid(aSolid);
B.Add(aSolid, aMShape);
aMShape = aSolid;
}
Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape;
sfs->Init(aMShape);
sfs->SetPrecision(1.e-6);
sfs->SetMaxTolerance(1.0);
sfs->Perform();
theModifiedShape = sfs->Shape();
isModified = Standard_True;
}
else {
if( S->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ) {
Handle(Geom_SphericalSurface) SS = Handle(Geom_SphericalSurface)::DownCast(S);
gp_Pnt PC = SS->Location();
BRep_Builder B;
TopoDS_Vertex V;
B.MakeVertex(V,PC,1.e-7);
theModifiedShape = V;
theAddDist = SS->Radius();
isModified = Standard_True;
}
else {
Handle(Geom_ToroidalSurface) TS = Handle(Geom_ToroidalSurface)::DownCast(S);
gp_Ax3 ax3 = TS->Position();
Handle(Geom_Circle) C = new Geom_Circle(ax3.Ax2(),TS->MajorRadius());
BRep_Builder B;
TopoDS_Edge E;
B.MakeEdge(E,C,1.e-7);
theModifiedShape = E;
theAddDist = TS->MinorRadius();
isModified = Standard_True;
return Standard_True;
}
}
} else {
theModifiedShape = theShape;
}
}
else
theModifiedShape = theShape;
return isModified;
theModifiedShape = theShape;
return Standard_False;
}
//=======================================================================
@ -1039,19 +1044,19 @@ gp_Pnt GEOMUtils::ConvertClickToPoint( int x, int y, Handle(V3d_View) aView )
// function : ConvertTreeToString()
// purpose : Returns the string representation of dependency tree
//=======================================================================
void GEOMUtils::ConvertTreeToString( const TreeModel &tree,
std::string &treeStr )
void GEOMUtils::ConvertTreeToString( const TreeModel& tree,
std::string& dependencyStr )
{
TreeModel::const_iterator i;
for ( i = tree.begin(); i != tree.end(); ++i ) {
treeStr.append( i->first );
treeStr.append( "-" );
dependencyStr.append( i->first );
dependencyStr.append( "-" );
std::vector<LevelInfo> upLevelList = i->second.first;
treeStr.append( "upward" );
parseWard( upLevelList, treeStr );
dependencyStr.append( "upward" );
parseWard( upLevelList, dependencyStr );
std::vector<LevelInfo> downLevelList = i->second.second;
treeStr.append( "downward" );
parseWard( downLevelList, treeStr );
dependencyStr.append( "downward" );
parseWard( downLevelList, dependencyStr );
}
}
@ -1059,23 +1064,113 @@ void GEOMUtils::ConvertTreeToString( const TreeModel &tree,
// function : ConvertStringToTree()
// purpose : Returns the dependency tree
//=======================================================================
void GEOMUtils::ConvertStringToTree( const std::string &theData,
TreeModel &tree )
void GEOMUtils::ConvertStringToTree( const std::string& dependencyStr,
TreeModel& tree )
{
std::size_t cursor = 0;
while( theData.find('-',cursor) != std::string::npos ) //find next selected object
while( dependencyStr.find('-',cursor) != std::string::npos ) //find next selected object
{
std::size_t objectIndex = theData.find( '-', cursor );
std::string objectEntry = theData.substr( cursor, objectIndex - cursor );
std::size_t objectIndex = dependencyStr.find( '-', cursor );
std::string objectEntry = dependencyStr.substr( cursor, objectIndex - cursor );
cursor = objectIndex;
std::size_t upwardIndexBegin = theData.find("{",cursor) + 1;
std::size_t upwardIndexFinish = theData.find("}",upwardIndexBegin);
LevelsList upwardList = parseWard( theData, cursor );
std::size_t upwardIndexBegin = dependencyStr.find("{",cursor) + 1;
std::size_t upwardIndexFinish = dependencyStr.find("}",upwardIndexBegin);
LevelsList upwardList = parseWard( dependencyStr, cursor );
LevelsList downwardList = parseWard( theData, cursor );
LevelsList downwardList = parseWard( dependencyStr, cursor );
tree[objectEntry] = std::pair<LevelsList,LevelsList>( upwardList, downwardList );
}
}
bool GEOMUtils::CheckShape( TopoDS_Shape& shape,
bool checkGeometry )
{
BRepCheck_Analyzer analyzer( shape, checkGeometry );
return analyzer.IsValid();
}
bool GEOMUtils::FixShapeTolerance( TopoDS_Shape& shape,
TopAbs_ShapeEnum type,
Standard_Real tolerance,
bool checkGeometry )
{
ShapeFix_ShapeTolerance aSft;
aSft.LimitTolerance( shape, tolerance, tolerance, type );
Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape( shape );
aSfs->Perform();
shape = aSfs->Shape();
return CheckShape( shape, checkGeometry );
}
bool GEOMUtils::FixShapeTolerance( TopoDS_Shape& shape,
Standard_Real tolerance,
bool checkGeometry )
{
return FixShapeTolerance( shape, TopAbs_SHAPE, tolerance, checkGeometry );
}
bool GEOMUtils::FixShapeTolerance( TopoDS_Shape& shape,
bool checkGeometry )
{
return FixShapeTolerance( shape, Precision::Confusion(), checkGeometry );
}
bool GEOMUtils::FixShapeCurves( TopoDS_Shape& shape )
{
Standard_Real aT, aTolE, aD, aDMax;
TopExp_Explorer aExpF, aExpE;
NCollection_DataMap<TopoDS_Edge, Standard_Real, TopTools_ShapeMapHasher> aDMETol;
aExpF.Init(shape, TopAbs_FACE);
for (; aExpF.More(); aExpF.Next()) {
const TopoDS_Face& aF = *(TopoDS_Face*)&aExpF.Current();
aExpE.Init(aF, TopAbs_EDGE);
for (; aExpE.More(); aExpE.Next()) {
const TopoDS_Edge& aE = *(TopoDS_Edge*)&aExpE.Current();
try {
if (!BOPTools_AlgoTools::ComputeTolerance(aF, aE, aDMax, aT)) {
continue;
}
}
catch(...) {
continue;
}
aTolE = BRep_Tool::Tolerance(aE);
if (aDMax < aTolE) continue;
if (aDMETol.IsBound(aE)) {
aD = aDMETol.Find(aE);
if (aDMax > aD) {
aDMETol.UnBind(aE);
aDMETol.Bind(aE, aDMax);
}
}
else {
aDMETol.Bind(aE, aDMax);
}
}
}
NCollection_DataMap<TopoDS_Edge, Standard_Real, TopTools_ShapeMapHasher>::Iterator aDMETolIt(aDMETol);
#ifdef USE_LIMIT_TOLERANCE
ShapeFix_ShapeTolerance sat;
#else
BRep_Builder b;
#endif
for (; aDMETolIt.More(); aDMETolIt.Next()) {
#ifdef USE_LIMIT_TOLERANCE
sat.LimitTolerance(aDMETolIt.Key(), aDMETolIt.Value()*1.001);
#else
TopoDS_Iterator itv(aDMETolIt.Key());
for (; itv.More(); itv.Next())
b.UpdateVertex(TopoDS::Vertex(itv.Value()), aDMETolIt.Value()*1.001);
b.UpdateEdge(aDMETolIt.Key(), aDMETolIt.Value()*1.001);
#endif
}
return CheckShape( shape );
}
bool GEOMUtils::Write( const TopoDS_Shape& shape, const char* fileName )
{
return BRepTools::Write( shape, fileName );
}

View File

@ -193,12 +193,91 @@ namespace GEOMUtils
*/
Standard_EXPORT gp_Pnt ConvertClickToPoint( int x, int y, Handle(V3d_View) theView );
Standard_EXPORT void ConvertTreeToString( const TreeModel &theTree,
std::string &DependencyStr );
/*!
* \brief Convert dependency tree data to the string representation
*
* \param tree dependency tree data
* \param dependencyStr output string
*/
Standard_EXPORT void ConvertTreeToString( const TreeModel& tree,
std::string& dependencyStr );
Standard_EXPORT void ConvertStringToTree( const std::string &theDependencyStr,
TreeModel &tree );
/*!
* \brief Restore dependency tree data from the string representation
*
* \param dependencyStr string representation of tree data
* \param tree output dependency tree data
*/
Standard_EXPORT void ConvertStringToTree( const std::string& dependencyStr,
TreeModel& tree );
/*!
* \brief Check shape
*
* \param shape input shape object
* \param checkGeometry when set to \c true, causes check of underlying geometry
* in addition to the topology
* \return \c true if shape is valid or \c false otherwise
*/
Standard_EXPORT bool CheckShape( TopoDS_Shape& shape, bool checkGeometry = false );
/*!
* \brief Limit shape tolerance to the given value
*
* \param shape shape being fixed
* \param type topology type which tolerance is to be limited; TopAbs_SHAPE means
* all types of topology
* \param tolerance expected tolerance value (1e-7 by default)
* \param checkGeometry check geometry validity of result
* \return \c true if resulting shape is valid
*
* \note Resulting tolerance of the shape is not mandatory equal to requested value
* as it might be changed by fixshape operation in order to get valid shape where possible
* \note By default, result only checked for topology validity; check of geometry can be done by
* passing \c true to \a checkGeometry parameter
*/
Standard_EXPORT bool FixShapeTolerance( TopoDS_Shape& shape,
TopAbs_ShapeEnum type,
Standard_Real tolerance = Precision::Confusion(),
bool checkGeometry = false );
/*!
* \brief Limit shape tolerance to the given value
* This is overloaded function, it behaves exactly as previous one
*/
Standard_EXPORT bool FixShapeTolerance( TopoDS_Shape& shape,
Standard_Real tolerance = Precision::Confusion(),
bool checkGeometry = false );
/*!
* \brief Limit shape tolerance to the given value
* This is overloaded function, it behaves exactly as previous one
*/
Standard_EXPORT bool FixShapeTolerance( TopoDS_Shape& shape,
bool checkGeometry );
/*!
* \brief Fix curves of the given shape
*
* The function checks each curve of the input shape in the following way:
* - compute deviation of the curve from the underlying surface in a set of points
* computed with the certain discretization step value
* - find maximum tolerance between computed deviation values
* - limit tolerance of the curve with the computed maximum value
*
* \param shape shape being fixed
* \return \c true if resulting shape is valid
*/
Standard_EXPORT bool FixShapeCurves( TopoDS_Shape& shape );
/*!
* \brief Write shape to the BREP file
*
* \param source shape
* \return \c true if file was written or \c false otherwise
*/
Standard_EXPORT bool Write( const TopoDS_Shape& shape,
const char* fileName );
};
#endif

View File

@ -364,15 +364,19 @@ bool GEOM_Object_i::IsShape()
return !_impl->GetValue().IsNull() && _impl->GetType() != GEOM_MARKER;
}
bool GEOM_Object_i::IsSame(GEOM::GEOM_Object_ptr other)
bool GEOM_Object_i::IsSame(GEOM::GEOM_BaseObject_ptr other)
{
TopoDS_Shape thisShape = _impl->GetValue();
TopoDS_Shape otherShape;
if ( !CORBA::is_nil( other ) ) {
bool result = false;
GEOM::GEOM_Object_var shapePtr = GEOM::GEOM_Object::_narrow( other );
if ( !CORBA::is_nil( shapePtr ) ) {
Handle(GEOM_Object) otherObject = Handle(GEOM_Object)::DownCast
( GEOM_Engine::GetEngine()->GetObject( other->GetStudyID(), other->GetEntry(), false ));
if ( !otherObject.IsNull() )
otherShape = otherObject->GetValue();
( GEOM_Engine::GetEngine()->GetObject( shapePtr->GetStudyID(), shapePtr->GetEntry(), false ));
if ( !otherObject.IsNull() ) {
TopoDS_Shape thisShape = _impl->GetValue();
TopoDS_Shape otherShape = otherObject->GetValue();
result = !thisShape.IsNull() && !otherShape.IsNull() && thisShape.IsSame( otherShape );
}
return thisShape.IsSame( otherShape );
}
return result;
}

View File

@ -75,7 +75,7 @@ class GEOM_I_EXPORT GEOM_Object_i : public virtual POA_GEOM::GEOM_Object, public
virtual GEOM::GEOM_Object_ptr GetMainShape();
virtual bool IsSame(GEOM::GEOM_Object_ptr other);
virtual bool IsSame(GEOM::GEOM_BaseObject_ptr other);
virtual bool IsShape();

View File

@ -1160,11 +1160,16 @@ class Sketcher2D:
if self.closed:
self.myCommand = self.myCommand + ":WW"
from salome.geom.geomBuilder import ParseSketcherCommand, RaiseIfFailed
Command,Parameters = ParseSketcherCommand(self.myCommand)
import GEOM
if isinstance(WorkingPlane, list): wire = self.geompyD.CurvesOp.MakeSketcher(self.myCommand, WorkingPlane)
if isinstance(WorkingPlane, GEOM._objref_GEOM_Object): wire = self.geompyD.CurvesOp.MakeSketcherOnPlane(self.myCommand, WorkingPlane)
if isinstance(WorkingPlane, list): wire = self.geompyD.CurvesOp.MakeSketcher(Command, WorkingPlane)
if isinstance(WorkingPlane, GEOM._objref_GEOM_Object): wire = self.geompyD.CurvesOp.MakeSketcherOnPlane(Command, WorkingPlane)
self.myCommand = "Sketcher"
RaiseIfFailed("Sketcher", self.geompyD.CurvesOp)
wire.SetParameters(Parameters)
self.geompyD._autoPublish(wire, theName, "wire")
return wire
@ -1204,11 +1209,16 @@ class Sketcher2D:
else:
raise RuntimeError, "Sketcher2D.close() : can't build face on unclosed wire"
from salome.geom.geomBuilder import ParseSketcherCommand, RaiseIfFailed
Command,Parameters = ParseSketcherCommand(self.myCommand)
import GEOM
if isinstance(WorkingPlane, list): face = self.geompyD.CurvesOp.MakeSketcher(self.myCommand, WorkingPlane)
if isinstance(WorkingPlane, GEOM._objref_GEOM_Object): face = self.geompyD.CurvesOp.MakeSketcherOnPlane(self.myCommand, WorkingPlane)
if isinstance(WorkingPlane, list): face = self.geompyD.CurvesOp.MakeSketcher(Command, WorkingPlane)
if isinstance(WorkingPlane, GEOM._objref_GEOM_Object): face = self.geompyD.CurvesOp.MakeSketcherOnPlane(Command, WorkingPlane)
self.myCommand = "Sketcher"
RaiseIfFailed("Sketcher", self.geompyD.CurvesOp)
face.SetParameters(Parameters)
self.geompyD._autoPublish(face, theName, "face")
return face

View File

@ -1,57 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="ja" sourcelanguage="en">
<context>
<context>
<name>@default</name>
<message>
<source>MEN_EXPORTIGES</source>
<translation type="unfinished">IGES</translation>
<translation>IGESエクスポート</translation>
</message>
<message>
<source>TOP_EXPORTIGES</source>
<translation type="unfinished">Export IGES</translation>
<translation>IGESエクスポート</translation>
</message>
<message>
<source>STB_EXPORTIGES</source>
<translation type="unfinished">Export IGES</translation>
<translation>IGESエクスポート</translation>
</message>
<message>
<source>MEN_IMPORTIGES</source>
<translation type="unfinished">IGES</translation>
<translation>IGESインポート</translation>
</message>
<message>
<source>TOP_IMPORTIGES</source>
<translation type="unfinished">Import IGES</translation>
<translation>IGESインポート</translation>
</message>
<message>
<source>STB_IMPORTIGES</source>
<translation type="unfinished">Import IGES</translation>
<translation>IGESインポート</translation>
</message>
</context>
<context>
</context>
<context>
<name>IGESPlugin_GUI</name>
<message>
<source>IGES_FILES</source>
<translation type="unfinished">IGES Files ( *.iges *.igs )</translation>
<translation>IGESファイル</translation>
</message>
<message>
<source>EXPORT_TITLE</source>
<translation type="unfinished">Export IGES</translation>
<translation>IGESエクスポート</translation>
</message>
<message>
<source>IMPORT_TITLE</source>
<translation type="unfinished">Import IGES</translation>
<translation>IGESインポート</translation>
</message>
<message>
<source>SCALE_DIMENSIONS</source>
<translation></translation>
</message>
</context>
<context>
</context>
<context>
<name>IGESPlugin_ExportDlg</name>
<message>
<source>IGES_VERSION</source>
<translation type="unfinished">Version</translation>
<translation>IGESバージョン</translation>
</message>
</context>
</context>
</TS>

View File

@ -354,8 +354,13 @@ bool RepairGUI_FreeFacesDlg::execute( ObjectList& objects )
aFace = anIndices.FindKey( aFaceLst[i] );
try {
getDisplayer()->SetColor( Quantity_NOC_RED );
getDisplayer()->SetToActivate( false );
getDisplayer()->SetTransparency( transparency );
getDisplayer()->SetWidth( 2 );
getDisplayer()->SetNbIsos( 1 );
getDisplayer()->SetIsosWidth( 1 );
getDisplayer()->SetIsosColor( Quantity_NOC_RED );
getDisplayer()->SetDisplayMode( 0 );
getDisplayer()->SetToActivate( false );
aPrs = !aFace.IsNull() ? getDisplayer()->BuildPrs( aFace ) : 0;
if ( aPrs )
displayPreview( aPrs, true );

View File

@ -1,50 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="ja" sourcelanguage="en">
<context>
<context>
<name>@default</name>
<message>
<source>MEN_EXPORTSTEP</source>
<translation type="unfinished">STEP</translation>
<translation>STEPエクスポート</translation>
</message>
<message>
<source>TOP_EXPORTSTEP</source>
<translation type="unfinished">Export STEP</translation>
<translation>STEPエクスポート</translation>
</message>
<message>
<source>STB_EXPORTSTEP</source>
<translation type="unfinished">Export STEP</translation>
<translation>STEPエクスポート</translation>
</message>
<message>
<source>MEN_IMPORTSTEP</source>
<translation type="unfinished">STEP</translation>
<translation>STEPインポート</translation>
</message>
<message>
<source>TOP_IMPORTSTEP</source>
<translation type="unfinished">Import STEP</translation>
<translation>STEPインポート</translation>
</message>
<message>
<source>STB_IMPORTSTEP</source>
<translation type="unfinished">Import STEP</translation>
<translation>STEPインポート</translation>
</message>
</context>
<context>
</context>
<context>
<name>STEPPlugin_GUI</name>
<message>
<source>STEP_FILES</source>
<translation type="unfinished">STEP Files ( *.step *.stp )</translation>
<translation>STEPファイル</translation>
</message>
<message>
<source>EXPORT_TITLE</source>
<translation type="unfinished">Export STEP</translation>
<translation>STEPエクスポート</translation>
</message>
<message>
<source>IMPORT_TITLE</source>
<translation type="unfinished">Import STEP</translation>
<translation>STEPインポート</translation>
</message>
<message>
<source>SCALE_DIMENSIONS</source>
<translation></translation>
</message>
</context>
</context>
</TS>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="fr_US">
<TS version="2.0" language="fr_FR">
<context>
<name>@default</name>
<message>
@ -47,7 +47,7 @@
<name>STLPlugin_ExportDlg</name>
<message>
<source>ASCII</source>
<translation type="unfinished">Save as ASCII</translation>
<translation>Sauver au format ASCII</translation>
</message>
<message>
<source>RELATIVE</source>

View File

@ -1,53 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="ja" sourcelanguage="en">
<context>
<context>
<name>@default</name>
<message>
<source>MEN_EXPORTSTL</source>
<translation type="unfinished">STL</translation>
<translation>STLエクスポート</translation>
</message>
<message>
<source>TOP_EXPORTSTL</source>
<translation type="unfinished">Export STL</translation>
<translation>STLエクスポート</translation>
</message>
<message>
<source>STB_EXPORTSTL</source>
<translation type="unfinished">Export STL</translation>
<translation>STLエクスポート</translation>
</message>
<message>
<source>MEN_IMPORTSTL</source>
<translation type="unfinished">STL</translation>
<translation>STLインポート</translation>
</message>
<message>
<source>TOP_IMPORTSTL</source>
<translation type="unfinished">Import STL</translation>
<translation>STLインポート</translation>
</message>
<message>
<source>STB_IMPORTSTL</source>
<translation type="unfinished">Import STL</translation>
<translation>STLインポート</translation>
</message>
</context>
<context>
</context>
<context>
<name>STLPlugin_GUI</name>
<message>
<source>STL_FILES</source>
<translation type="unfinished">STL files( *.stl )</translation>
<translation>STLファイル</translation>
</message>
<message>
<source>EXPORT_TITLE</source>
<translation type="unfinished">Export STL</translation>
<translation>STLエクスポート</translation>
</message>
<message>
<source>IMPORT_TITLE</source>
<translation type="unfinished">Import STL</translation>
<translation>STLインポート</translation>
</message>
</context>
<context>
</context>
<context>
<name>STLPlugin_ExportDlg</name>
<message>
<source>ASCII</source>
<translation type="unfinished">Save as ASCII</translation>
<translation></translation>
</message>
<message>
<source>RELATIVE</source>
@ -57,5 +57,5 @@
<source>DEFLECTION</source>
<translation type="unfinished">Deflection</translation>
</message>
</context>
</context>
</TS>

View File

@ -1,49 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="ja" sourcelanguage="en">
<context>
<context>
<name>@default</name>
<message>
<source>MEN_EXPORTVTK</source>
<translation type="unfinished">VTK</translation>
<translation>VTKエクスポート</translation>
</message>
<message>
<source>TOP_EXPORTVTK</source>
<translation type="unfinished">Export VTK</translation>
<translation>VTKエクスポート</translation>
</message>
<message>
<source>STB_EXPORTVTK</source>
<translation type="unfinished">Export VTK</translation>
<translation>VTKエクスポート</translation>
</message>
<message>
<source>MEN_IMPORTVTK</source>
<translation type="unfinished">VTK</translation>
<translation>VTKインポート</translation>
</message>
<message>
<source>TOP_IMPORTVTK</source>
<translation type="unfinished">Import VTK</translation>
<translation>VTKインポート</translation>
</message>
<message>
<source>STB_IMPORTVTK</source>
<translation type="unfinished">Import VTK</translation>
<translation>VTKインポート</translation>
</message>
</context>
<context>
</context>
<context>
<name>VTKPlugin_GUI</name>
<message>
<source>VTK_FILES</source>
<translation type="unfinished">VTK files( *.vtk )</translation>
<translation>VTKファイル</translation>
</message>
<message>
<source>EXPORT_TITLE</source>
<translation type="unfinished">Export VTK</translation>
<translation>VTKエクスポート</translation>
</message>
</context>
<context>
</context>
<context>
<name>VTKPlugin_ExportDlg</name>
<message>
<source>DEFLECTION</source>
<translation type="unfinished">Deflection</translation>
</message>
</context>
</context>
</TS>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="ja" sourcelanguage="en">
<context>
<context>
<name>@default</name>
<message>
<source>MEN_EXPORTXAO</source>
@ -39,8 +39,8 @@
<source>XAOPLUGIN_FILES</source>
<translation> (*.xao)</translation>
</message>
</context>
<context>
</context>
<context>
<name>XAOPlugin_ExportDlg</name>
<message>
<source>XAOPLUGIN_EXPORT_TITLE</source>
@ -70,8 +70,8 @@
<source>XAOPLUGIN_EXPORT_LFIELDS</source>
<translation></translation>
</message>
</context>
<context>
</context>
<context>
<name>XAOPlugin_ImportDlg</name>
<message>
<source>XAOPLUGIN_IMPORT_TITLE</source>
@ -101,5 +101,5 @@
<source>XAOPLUGIN_STEP</source>
<translation>Step</translation>
</message>
</context>
</context>
</TS>