1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

3 Commits

Author SHA1 Message Date
emv
948fe6ca88 0028747: Incorrect result of the section operation after edge refinement
Implementation of the method for simplification of the result of Boolean Operation on the API level.
The method BRepAlgoAPI_BuilderAlgo::SimplifyResult has been added, so the derived classes such as BooleanOpeation and Splitter can also use this method.
The result shape simplification should be called after the operation is done. The simplification is performed by the means of ShapeUpgrade_UnifySameDomain algorithm.

Draw command "bsimplify" has been added to control the simplification options.
Documentation for new functionality and draw commands controlling the options of Boolean operations.
Test cases for the new functionality.

Side-effect change:
The algorithms in Boolean component have been changed to use the BRepTools_History as a History tool.
Now it became possible to disable the collection of shapes modifications during Boolean Operations, which may be useful for performance sake (in draw the option is controlled by *setfillhistory* command).
Draw command "unifysamedom" has been changed to accept the angular tolerance in degrees instead of radians.
2018-06-14 14:03:06 +03:00
emv
4f7d41eac3 0029604: Uniform mechanism providing History of shape's modifications for OCCT algorithms in DRAW
Implementation of the mechanism for unification of the history commands for all OCCT algorithms.
The following Draw commands should be used to track the history of shapes modifications of any operation:
- modified - to find the shapes modified from the given shape in the given history.
- generated - to find the shapes generated from the given shape in the given history.
- isdeleted - to check if the given shape has been deleted during operation.

The mechanism allows fast & easy enabling of the DRAW history support for the algorithms supporting the history on the API level (i.e. the algorithm should have the methods Modified(), Generated() and IsDeleted()).
To enable the draw history support it is necessary to store the history of the algorithm into the session. For instance:

TopTools_ListOfShape Objects = ...; // Objects
TopTools_ListOfShape Tools = ...; // Tools

BRepAlgoAPI_Cut aCut(Objects, Tools); // Boolean cut operation

BRepTest_Objects::SetHistory(Objects, aCut); // Store the history for the Objects (overwrites the history in the session)
BRepTest_Objects::AddHistory(Tools, aCut);   // Add the history for the Tools

To get the stored history in draw the command "savehistory" should be used. It saves the history kept in session into a Drawable object with the given name:

# perform cut
bcut r s1 s2

# save history of cut
savehistory cut_history

explode s1 f
modified m cut_history s1_1

The Draw History commands of the following algorithms have been removed:
- Boolean Operations;
- Defeaturing;
- Unify same domain;
- Sweep;
- Thrusections;

All these algorithms have been switched to support the new Draw history mechanism.

The Fillet and Blend algorithms have been also enabled to support history commands.
2018-04-12 13:30:56 +03:00
emv
803a8cafe5 0029363: No history for shapes which were produced as a result of intersection
1. Implementation of the *Generated* method for the algorithms in Boolean Component.
In terms of these algorithms the shape from the arguments can have Generated shapes only if these new shapes have been obtained as a result of pure intersection (not overlapping) of this shape with any other shapes from arguments.
Thus, the Generated shapes are always:
* VERTICES created from the intersection points and may be Generated from edges and faces only;
* EDGES created from the intersection edges and may be Generated from faces only.

So, only EDGES and FACES could have information about Generated shapes. For all other types of shapes the list of Generated shapes will be empty.

2. Optimization and simplification of the Modified and IsDeleted methods based on the correct filling of the BOPAlgo_BuilderShape::myImagesResult map.

3. Provide history of unification of the solids in the CellsBuilder algorithm.

4. Update of the documentation of Boolean Operations User guide with new chapter "History Information" describing rules for filling history for operations in Boolean Component.

5. Test cases for the issue. New grid "history" has been added into "boolean" category.
2017-12-20 18:50:21 +03:00