0029604: Uniform mechanism providing History of shape's modifications for OCCT algori...
authoremv <emv@opencascade.com>
Wed, 21 Mar 2018 13:59:29 +0000 (16:59 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 12 Apr 2018 10:30:56 +0000 (13:30 +0300)
commit4f7d41eac3772171777d2990e6cdfc80b1bc0f4c
treeaaa5f8635d9879a906efea6ea71cbd90468be4a7
parenta3d3777de9af4b76fd72d3a7d74337e3d35dec8e
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.
94 files changed:
dox/user_guides/boolean_operations/boolean_operations.md
dox/user_guides/draw_test_harness/draw_test_harness.md
dox/user_guides/modeling_algos/modeling_algos.md
src/BOPAlgo/BOPAlgo_Builder_4.cxx
src/BOPAlgo/BOPAlgo_CellsBuilder.cxx
src/BOPTest/BOPTest.cxx
src/BOPTest/BOPTest.hxx
src/BOPTest/BOPTest_APICommands.cxx
src/BOPTest/BOPTest_BOPCommands.cxx
src/BOPTest/BOPTest_CellsCommands.cxx
src/BOPTest/BOPTest_HistoryCommands.cxx [deleted file]
src/BOPTest/BOPTest_PartitionCommands.cxx
src/BOPTest/BOPTest_RemoveFeaturesCommands.cxx
src/BOPTest/FILES
src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.hxx
src/BRepFill/BRepFill_PipeShell.hxx
src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx
src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx
src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx
src/BRepTest/BRepTest.cxx
src/BRepTest/BRepTest.hxx
src/BRepTest/BRepTest_DrawableHistory.cxx [new file with mode: 0644]
src/BRepTest/BRepTest_DrawableHistory.hxx [new file with mode: 0644]
src/BRepTest/BRepTest_FeatureCommands.cxx
src/BRepTest/BRepTest_FilletCommands.cxx
src/BRepTest/BRepTest_HistoryCommands.cxx [new file with mode: 0644]
src/BRepTest/BRepTest_Objects.cxx [new file with mode: 0644]
src/BRepTest/BRepTest_Objects.hxx [new file with mode: 0644]
src/BRepTest/BRepTest_SweepCommands.cxx
src/BRepTest/FILES
src/BRepTools/BRepTools_History.cxx
src/BRepTools/BRepTools_History.hxx
src/SWDRAW/SWDRAW_ShapeUpgrade.cxx
tests/boolean/history/A1
tests/boolean/history/A2
tests/boolean/history/A3
tests/boolean/history/A4
tests/boolean/history/A5
tests/boolean/history/A6
tests/boolean/history/A7 [new file with mode: 0644]
tests/boolean/history/A8 [new file with mode: 0644]
tests/boolean/removefeatures/A6
tests/boolean/removefeatures/A7
tests/boolean/removefeatures/B1
tests/boolean/removefeatures/B2
tests/boolean/removefeatures/B3
tests/boolean/removefeatures/B4
tests/boolean/removefeatures/B5
tests/boolean/removefeatures/B7
tests/boolean/removefeatures/B8
tests/boolean/removefeatures/B9
tests/boolean/removefeatures/C1
tests/boolean/removefeatures/C3
tests/boolean/removefeatures/C4
tests/boolean/removefeatures/C5
tests/boolean/removefeatures/E1
tests/boolean/removefeatures/G1
tests/boolean/removefeatures/begin
tests/bugs/heal/bug26489_4
tests/bugs/modalg_4/bug22646
tests/bugs/modalg_6/bug26150_1
tests/bugs/modalg_6/bug26150_10
tests/bugs/modalg_6/bug26150_11
tests/bugs/modalg_6/bug26150_12
tests/bugs/modalg_6/bug26150_13
tests/bugs/modalg_6/bug26150_14
tests/bugs/modalg_6/bug26150_15
tests/bugs/modalg_6/bug26150_16
tests/bugs/modalg_6/bug26150_17
tests/bugs/modalg_6/bug26150_18
tests/bugs/modalg_6/bug26150_2
tests/bugs/modalg_6/bug26150_3
tests/bugs/modalg_6/bug26150_4
tests/bugs/modalg_6/bug26150_5
tests/bugs/modalg_6/bug26150_6
tests/bugs/modalg_6/bug26150_7
tests/bugs/modalg_6/bug26150_8
tests/bugs/modalg_6/bug26150_9
tests/bugs/modalg_6/bug26393
tests/bugs/modalg_6/bug27283
tests/bugs/modalg_6/bug27386_1
tests/bugs/modalg_6/bug27386_2
tests/bugs/modalg_6/bug27386_3
tests/bugs/modalg_6/bug27386_4
tests/bugs/modalg_6/bug27386_5
tests/bugs/modalg_6/bug27386_6
tests/bugs/modalg_6/bug27386_7
tests/bugs/modalg_6/bug27386_8
tests/bugs/modalg_6/bug27822
tests/bugs/step/bug27316
tests/heal/unify_same_domain/A4
tests/heal/unify_same_domain/A6
tests/heal/unify_same_domain/end
tests/pipe/bugs/bug24909_3