DiscussionsIssue archiveOCCT:Modeling Algorithms

Archived issue #0024876

Add protection of shapes against modification of geometry

Open CASCADEOCCT:Modeling Algorithmsclosed7 public notes

Search issues

Description

Implementation of topological data model and modeling algorithms in OCCT should follow general approach that each operation produces new shape without modifying its arguments. This is especially important for OCAF which relies on this feature for its Undo/Redo mechanism.

The problem is that this rule seems to be not documented and is not always followed, see #24302.

OCCT shape data structure (TopoDS_Shape) and low-level tools modifying it (BRep package) use special flag Free/Frozen to protect against modification of topology. The idea is to add similar flag for modification of geometric data in the shapes (including tolerances), and use it to protect against modification of input shapes by algorithms. Having this protection available, it will be possible to find all places in the code violating the rule, and fix them.

Public activity

7 archived notes

Participants are labeled by their role within this record.

01Commenter 1
Added flag "locked" for protection of geometric data in the shapes (including tolerances). To set a flag added command "setflags".
These changes are located in branch CR24876. Please review.
02Commenter 2
Branch CR24876 is ready to be tested.
03Commenter 3
Dear Commenter 2,

Branch CR24876 (and products from GIT master) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]

Number of compiler warnings:

Linux: 17 (17 on master)
Windows: 0 (0 on master)
MacOS: 202 (202 on master)

products component :
Linux: 11 (11 on master)
Windows: 2 (2 on master)

Regressions/Differences:
http://occt-tests/CR24876-master-occt/Debian60-64/summary.html
http://occt-tests/CR24876-master-occt/Windows-32-VC9/summary.html
boolean - bopcut_2d (005) - D5

Testing cases:
Absent

Testing on Linux:
Total MEMORY difference: 359749648 / 359742796
Total CPU difference: 51283.3099999998 / 51526.670000000115

Testing on Windows:
Total MEMORY difference: 382183620 / 382734216
Total CPU difference: 38962.71875 / 39034.0625

04Commenter 4
This fix is rebased on current master, test case "bopcut_2d(005) D5" was modified.
Branch CR24876_1 is ready to be tested.
05Commenter 5
Dear Commenter 2,

Branch CR24876_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]

Number of compiler warnings:

occt component :
Linux: 15 (15 on master)
Windows: 0 (0 on master)
MacOS: 199 (199 on master)

products component :
Linux: 11 (11 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 350220960 / 349968948
Total CPU difference: 54527.42000000005 / 52504.370000000075

Testing on Windows:
Total MEMORY difference: 377051416 / 377481972
Total CPU difference: 39175.96875 / 39673.921875

There are no differences in images found by testdiff.
06Commenter 3
Branch [archived branch] has been deleted by Participant.

[revision removed]
07Commenter 3
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records