View Issue Details

IDProjectCategoryView StatusLast Update
0029604Open CASCADEOCCT:DRAWpublic2018-06-29 21:19
ReporteremvAssigned Tobugmaster  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Product Version7.2.0 
Target Version7.3.0Fixed in Version7.3.0 
Summary0029604: Uniform mechanism providing History of shape's modifications for OCCT algorithms in DRAW
DescriptionFor most of the algorithms in OCCT there are no DRAW commands for tracking the history of shapes modifications.
And the algorithms for which such commands are present have their own implementation of these commands.

It is proposed to implement the mechanism which will provide:
1. Easy DRAW history support for the algorithms;
2. Unification of all history commands implementation.

Usage of the BRepTools_History algorithm will allow to implement such mechanism with minimal effort.
It is proposed:
1. Keep the BRepTools_History object in session;
2. Overwrite the history kept in session after running the algorithm for which the history is required;
3. Create DRAW object for BRepTools_History;
4. Implement Draw command for creation of the Drawable history from the one kept in session.
5. Provide single implementation of the draw commands "modified", "generated" and "isdeleted" taking as an input the Drawable history object.

This steps will allow working with the history in the following way:

box b1 10 10 10
box b2 5 0 0 10 10 10

# this will overwrite the History in session
bfuse r b1 b2
# get fuse history
gethistory fuse_hist

isdeleted fuse_hist b1

# this will overwrite the History in session
unifysamedom ru r
# get usd history
gethistory usd_hist

modified usd_hist <modif_shapes> r
Steps To ReproduceNot needed.
TagsNo tags attached.
Test case numberboolean history A7 boolean history A8

Relationships

related to 0029653 newjgv Unable to get generated shapes for some of the arguments of Thrusections operation 

Activities

git

2018-03-23 14:53

administrator   ~0074825

Branch CR29604 has been created by emv.

SHA-1: c6ae4d27a54017d4c9704e884ed1404b035ea957


Detailed log of new commits:

Author: emv
Date: Wed Mar 21 16:59:29 2018 +0300

    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.

git

2018-03-26 07:48

administrator   ~0074907

Branch CR29604 has been updated forcibly by emv.

SHA-1: 6e391b7966ad634725a3dd3c40cbd03d6ad06179

git

2018-03-26 13:03

administrator   ~0074914

Branch CR29604 has been updated by emv.

SHA-1: 4005d57980d79a30d519582d8451a732b9015e55


Detailed log of new commits:

Author: emv
Date: Mon Mar 26 13:03:31 2018 +0300

    # Corrections in Thrusections algorithm to avoid exceptions when filling history.

git

2018-03-27 14:50

administrator   ~0074959

Branch CR29604 has been updated forcibly by emv.

SHA-1: ccdbf29b2ed15679df7c0744c076e4f3d588a3b8

git

2018-03-27 15:42

administrator   ~0074962

Branch CR29604 has been updated forcibly by emv.

SHA-1: 633019bbf5afaee739e12b92decd8d3f11b0d0b9

git

2018-04-10 09:44

administrator   ~0075254

Branch CR29604 has been updated forcibly by emv.

SHA-1: 5cb9b0e6d5d71c3540668eb0918e6c03f350b00e

emv

2018-04-10 12:00

developer   ~0075262

Dear Mikhail, could you please review the git branch CR29604?
Tests results - http://jenkins-test-11.nnov.opencascade.com:8080/view/CR29604-master-emv/view/COMPARE/.

msv

2018-04-10 17:54

developer   ~0075279

Remarks:

dox/user_guides/modeling_algos/modeling_algos.md
- 1295: "are" => "do"

dox/user_guides/draw_test_harness/draw_test_harness.md
- 7328: use bold style for the command name, *removefeatures* => **removefeatures**
- 8037: "includes to commands" => "includes the command"
- 8054: "is save" => "is saved"
- 8105,8128: the result is one shape; tell about its structure (compound).
- 8163: "into the command implementation just after the operation is done"
- 8165: misprint BRetTest_Objects

dox/user_guides/boolean_operations/boolean_operations.md
- 2954: "the tool faces" => "the tool face"
- 3031: "Example of interfering faces" => "As for operation with intersecting faces. consider the following example"

msv

2018-04-10 19:03

developer   ~0075284

src/BRepTest/BRepTest_Objects.hxx
- 40: "Sets" => "Adds"

src/BRepTest/BRepTest_HistoryCommands.cxx
- Avoid putting '\n' as the last character to theDI before return. Because this generates one extra empty line.
- 150: make compound outside of the loop.

src/BRepTest/BRepTest_FeatureCommands.cxx
- 2175: Please delete old instance of the algorithm to avoid memory leakage.

src/BRepTest/BRepTest_FilletCommands.cxx
- Check Rakk->IsDone() before saving history.

src/BOPTest/BOPTest_RemoveFeaturesCommands.cxx
- Do not save history if -nohist option is set, or if the algorithm is failed.

src/BOPTest/BOPTest_APICommands.cxx
src/BOPTest/BOPTest_BOPCommands.cxx
src/BOPTest/BOPTest_CellsCommands.cxx
src/BOPTest/BOPTest_PartitionCommands.cxx
src/BRepTest/BRepTest_SweepCommands.cxx
- Do not save history if the algorithm is failed.

git

2018-04-11 15:24

administrator   ~0075378

Branch CR29604 has been updated forcibly by emv.

SHA-1: 982c1ec970be3dcd35708af1b4c95a83c75bcffc

emv

2018-04-11 17:04

developer   ~0075383

All remarks have been considered, except for
> src/BOPTest/BOPTest_APICommands.cxx
> src/BOPTest/BOPTest_BOPCommands.cxx
> src/BOPTest/BOPTest_CellsCommands.cxx
> src/BOPTest/BOPTest_PartitionCommands.cxx
> - Do not save history if the algorithm is failed.

For booleans, I think it may be useful to have the history information for debug purposes even if the algorithm is failed.

Please review again. Tests are regenerated.

msv

2018-04-11 18:44

developer   ~0075385

Reviewed.

bugmaster

2018-04-12 13:29

administrator   ~0075417

Combination -
OCCT branch : CR29604 SHA - 982c1ec970be3dcd35708af1b4c95a83c75bcffc
Products branch : master SHA - 8471189e8649026d76950924f8ec2b4878cba528
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian70-64:
OCCT
Total CPU difference: 18114.73999999991 / 18092.32999999989 [+0.12%]
Products
Total CPU difference: 7437.979999999972 / 7480.610000000005 [-0.57%]
Windows-64-VC10:
OCCT
Total CPU difference: 17895.13991169853 / 17813.754189998494 [+0.46%]
Products
Total CPU difference: 8102.988341900006 / 8149.242638399972 [-0.57%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2018-05-24 18:13

administrator   ~0076252

Branch CR29604 has been deleted by kgv.

SHA-1: 982c1ec970be3dcd35708af1b4c95a83c75bcffc

Related Changesets

occt: master 4f7d41ea

2018-03-21 13:59:29

emv


Committer: bugmaster Details Diff
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.
Affected Issues
0029604
mod - dox/user_guides/boolean_operations/boolean_operations.md Diff File
mod - dox/user_guides/draw_test_harness/draw_test_harness.md Diff File
mod - dox/user_guides/modeling_algos/modeling_algos.md Diff File
mod - src/BOPAlgo/BOPAlgo_Builder_4.cxx Diff File
mod - src/BOPAlgo/BOPAlgo_CellsBuilder.cxx Diff File
mod - src/BOPTest/BOPTest.cxx Diff File
mod - src/BOPTest/BOPTest.hxx Diff File
mod - src/BOPTest/BOPTest_APICommands.cxx Diff File
mod - src/BOPTest/BOPTest_BOPCommands.cxx Diff File
mod - src/BOPTest/BOPTest_CellsCommands.cxx Diff File
rm - src/BOPTest/BOPTest_HistoryCommands.cxx Diff File
mod - src/BOPTest/BOPTest_PartitionCommands.cxx Diff File
mod - src/BOPTest/BOPTest_RemoveFeaturesCommands.cxx Diff File
mod - src/BOPTest/FILES Diff File
mod - src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.hxx Diff File
mod - src/BRepFill/BRepFill_PipeShell.hxx Diff File
mod - src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx Diff File
mod - src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx Diff File
mod - src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx Diff File
mod - src/BRepTest/BRepTest.cxx Diff File
mod - src/BRepTest/BRepTest.hxx Diff File
add - src/BRepTest/BRepTest_DrawableHistory.cxx Diff File
add - src/BRepTest/BRepTest_DrawableHistory.hxx Diff File
mod - src/BRepTest/BRepTest_FeatureCommands.cxx Diff File
mod - src/BRepTest/BRepTest_FilletCommands.cxx Diff File
add - src/BRepTest/BRepTest_HistoryCommands.cxx Diff File
add - src/BRepTest/BRepTest_Objects.cxx Diff File
add - src/BRepTest/BRepTest_Objects.hxx Diff File
mod - src/BRepTest/BRepTest_SweepCommands.cxx Diff File
mod - src/BRepTest/FILES Diff File
mod - src/BRepTools/BRepTools_History.cxx Diff File
mod - src/BRepTools/BRepTools_History.hxx Diff File
mod - src/SWDRAW/SWDRAW_ShapeUpgrade.cxx Diff File
mod - tests/boolean/history/A1 Diff File
mod - tests/boolean/history/A2 Diff File
mod - tests/boolean/history/A3 Diff File
mod - tests/boolean/history/A4 Diff File
mod - tests/boolean/history/A5 Diff File
mod - tests/boolean/history/A6 Diff File
add - tests/boolean/history/A7 Diff File
add - tests/boolean/history/A8 Diff File
mod - tests/boolean/removefeatures/A6 Diff File
mod - tests/boolean/removefeatures/A7 Diff File
mod - tests/boolean/removefeatures/B1 Diff File
mod - tests/boolean/removefeatures/B2 Diff File
mod - tests/boolean/removefeatures/B3 Diff File
mod - tests/boolean/removefeatures/B4 Diff File
mod - tests/boolean/removefeatures/B5 Diff File
mod - tests/boolean/removefeatures/B7 Diff File
mod - tests/boolean/removefeatures/B8 Diff File
mod - tests/boolean/removefeatures/B9 Diff File
mod - tests/boolean/removefeatures/begin Diff File
mod - tests/boolean/removefeatures/C1 Diff File
mod - tests/boolean/removefeatures/C3 Diff File
mod - tests/boolean/removefeatures/C4 Diff File
mod - tests/boolean/removefeatures/C5 Diff File
mod - tests/boolean/removefeatures/E1 Diff File
mod - tests/boolean/removefeatures/G1 Diff File
mod - tests/bugs/heal/bug26489_4 Diff File
mod - tests/bugs/modalg_4/bug22646 Diff File
mod - tests/bugs/modalg_6/bug26150_1 Diff File
mod - tests/bugs/modalg_6/bug26150_10 Diff File
mod - tests/bugs/modalg_6/bug26150_11 Diff File
mod - tests/bugs/modalg_6/bug26150_12 Diff File
mod - tests/bugs/modalg_6/bug26150_13 Diff File
mod - tests/bugs/modalg_6/bug26150_14 Diff File
mod - tests/bugs/modalg_6/bug26150_15 Diff File
mod - tests/bugs/modalg_6/bug26150_16 Diff File
mod - tests/bugs/modalg_6/bug26150_17 Diff File
mod - tests/bugs/modalg_6/bug26150_18 Diff File
mod - tests/bugs/modalg_6/bug26150_2 Diff File
mod - tests/bugs/modalg_6/bug26150_3 Diff File
mod - tests/bugs/modalg_6/bug26150_4 Diff File
mod - tests/bugs/modalg_6/bug26150_5 Diff File
mod - tests/bugs/modalg_6/bug26150_6 Diff File
mod - tests/bugs/modalg_6/bug26150_7 Diff File
mod - tests/bugs/modalg_6/bug26150_8 Diff File
mod - tests/bugs/modalg_6/bug26150_9 Diff File
mod - tests/bugs/modalg_6/bug26393 Diff File
mod - tests/bugs/modalg_6/bug27283 Diff File
mod - tests/bugs/modalg_6/bug27386_1 Diff File
mod - tests/bugs/modalg_6/bug27386_2 Diff File
mod - tests/bugs/modalg_6/bug27386_3 Diff File
mod - tests/bugs/modalg_6/bug27386_4 Diff File
mod - tests/bugs/modalg_6/bug27386_5 Diff File
mod - tests/bugs/modalg_6/bug27386_6 Diff File
mod - tests/bugs/modalg_6/bug27386_7 Diff File
mod - tests/bugs/modalg_6/bug27386_8 Diff File
mod - tests/bugs/modalg_6/bug27822 Diff File
mod - tests/bugs/step/bug27316 Diff File
mod - tests/heal/unify_same_domain/A4 Diff File
mod - tests/heal/unify_same_domain/A6 Diff File
mod - tests/heal/unify_same_domain/end Diff File
mod - tests/pipe/bugs/bug24909_3 Diff File

Issue History

Date Modified Username Field Change
2018-03-21 12:24 emv New Issue
2018-03-21 12:24 emv Assigned To => apn
2018-03-21 12:24 emv Assigned To apn => emv
2018-03-23 14:53 git Note Added: 0074825
2018-03-26 07:48 git Note Added: 0074907
2018-03-26 13:03 git Note Added: 0074914
2018-03-27 14:50 git Note Added: 0074959
2018-03-27 15:15 emv Relationship added related to 0029653
2018-03-27 15:42 git Note Added: 0074962
2018-04-10 09:44 git Note Added: 0075254
2018-04-10 12:00 emv Note Added: 0075262
2018-04-10 12:00 emv Assigned To emv => msv
2018-04-10 12:00 emv Status new => resolved
2018-04-10 12:00 emv Steps to Reproduce Updated
2018-04-10 17:54 msv Note Added: 0075279
2018-04-10 19:03 msv Note Added: 0075284
2018-04-10 19:18 msv Assigned To msv => emv
2018-04-10 19:18 msv Status resolved => assigned
2018-04-11 15:24 git Note Added: 0075378
2018-04-11 17:04 emv Note Added: 0075383
2018-04-11 17:04 emv Assigned To emv => apn
2018-04-11 17:04 emv Status assigned => resolved
2018-04-11 18:32 msv Assigned To apn => msv
2018-04-11 18:44 msv Note Added: 0075385
2018-04-11 18:44 msv Assigned To msv => bugmaster
2018-04-11 18:44 msv Status resolved => reviewed
2018-04-12 11:58 bugmaster Target Version 7.4.0 => 7.3.0
2018-04-12 13:29 bugmaster Test case number => boolean history A7 boolean history A8
2018-04-12 13:29 bugmaster Note Added: 0075417
2018-04-12 13:29 bugmaster Status reviewed => tested
2018-04-16 14:46 bugmaster Changeset attached => occt master 4f7d41ea
2018-04-16 14:46 bugmaster Status tested => verified
2018-04-16 14:46 bugmaster Resolution open => fixed
2018-05-24 18:13 git Note Added: 0076252
2018-06-29 21:13 aiv Fixed in Version => 7.3.0
2018-06-29 21:19 aiv Status verified => closed