View Issue Details

IDProjectCategoryView StatusLast Update
0028880CommunityOCCT:Modeling Algorithmspublic2020-12-02 17:11
Reportereryar Assigned Tobugmaster  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2015 
Product Version7.1.0 
Target Version7.5.0Fixed in Version7.5.0 
Summary0028880: Modeling Algorithms - add missing BRepFeat_SplitShape::Right() getter
DescriptionThere is a Left() to get the left shapes of the split,
I think it should have a Right() to get the other parts of the split shape.
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberbugs/moddata_1/buc60854

Activities

msv

2017-07-03 10:09

developer   ~0067927

Right() is simply realized by getting all faces from the result except those returned by Left(). Usually this is implemented on application side. Do you really insist on implementation of this method in the algorithm?

eryar

2017-07-03 11:26

developer   ~0067930

Hi msv,
Yes, I really insist on implementation the 'Right()' method.

When using the split algorithm, User want to do some operation on the splitted two parts.

Meanwhile there have classify algorithm in the BRepFeat_SplitShape, so it is more straightforward and efficient to provide both Left() and Right() to get the splitting two parts of the splitted shape.

Best Regards,

msv

2017-07-03 12:50

developer   ~0067939

OK, we will make this development as we have free resources. If it is important and urgent for you then you can contribute by speeding up development via support contact.

git

2020-03-02 12:17

administrator   ~0090757

Branch CR28880 has been created by antonavt.

SHA-1: 1697c4525bc4777647494e011530ae4d26ab9b48


Detailed log of new commits:

Author: antonavt
Date: Mon Mar 2 12:16:14 2020 +0300

    Added Right() to BRepFeat_SplitShape

msv

2020-03-02 17:14

developer   ~0090778

Remarks:
- Implementation of Right() is not optimal. Its complexity is O(n^2), because the method Contains() of the List class makes iterations to find the goal. Consider using a Map.
- The calculation of myRight must be cached not to compute it each time the method is called. Also, this cache is to be reset on initialization with another shape.

git

2020-03-03 22:59

administrator   ~0090805

Branch CR28880 has been updated by antonavt.

SHA-1: 1f6fbfd89e0d51cf9c79eb82cd109435178398b1


Detailed log of new commits:

Author: antonavt
Date: Tue Mar 3 22:42:13 2020 +0300

    0028880: Modeling Algorithms - add missing BRepFeat_SplitShape::Right() getter
    
    - A list is replaced by a map in the method "Contains";
    - Added method "setMyRight" calculating myRight and called from Build().

Author: antonavt
Date: Tue Mar 3 21:55:10 2020 +0300

    0028880: Modeling Algorithms - add missing BRepFeat_SplitShape::Right() getter \n\n -tratata

msv

2020-03-04 10:18

developer   ~0090806

Dear Anton, please change status to Resolved when put a bug to review stage.

msv

2020-03-05 10:04

developer   ~0090827

New remarks follow.

Please try following the OCCT coding rules available in online doc:
https://dev.opencascade.org/doc/overview/html/occt_dev_guides__coding_rules.html
Legacy code may not follow, but the newly inserted code must follow.

In particular, do not insert tabs (tune your editor to insert spaces). Also, name local variables using 'a' prefix (mapOfLeft -> aMapOfLeft, fac->aFace).

Move setMyRight() method off fields definition section to the protected section.

If the caller is not going to use Right() method then calculations made in setMyRight() are redundant. So, call it from Right() with condition if it is the first call after the latest Build(). Please read my above comment 0028880:0090778.

In commit message, all lines not intended to be put in the final commit must be prefixed by '#'.

git

2020-03-06 13:02

administrator   ~0090848

Branch CR28880 has been updated by antonavt.

SHA-1: 0622ee3882bb8673fb5d4edff15f81c1b89a179f


Detailed log of new commits:

Author: antonavt
Date: Fri Mar 6 12:53:27 2020 +0300

    0028880: Modeling Algorithms - add missing BRepFeat_SplitShape::Right() getter
    
    - Marqued myRight field as mutable;
    - Moved myRight clearing in Build();
    - Deleted setMyRight() method and moved its code inside Right() method with checking myRight emptiness.

antonavt

2020-03-06 13:11

reporter   ~0090849

I've done necessary corrections.

msv

2020-03-10 09:44

developer   ~0090877

OK, one new small remark. In the line 89:
      const TopoDS_Face& aFace = TopoDS::Face(anExplorer.Current());
the variable aFace does not need to be of type TopoDS_Face. It is enough to have it of base type TopoDS_Shape. And therefore casting is not needed.

And now, to prepare for integration, please rebase the branch on new master and combine all is one commit with the proper message.

git

2020-03-10 15:13

administrator   ~0090881

Branch CR28880_2 has been created by antonavt.

SHA-1: a29ee42cbf7cb9d83528ef2d7ce1426d7d9ae0ec


Detailed log of new commits:

Author: antonavt
Date: Mon Mar 2 12:16:14 2020 +0300

    0028880: Modeling Algorithms - add missing BRepFeat_SplitShape::Right() getter
    
    Added Right() method to BRepFeat_SplitShape

msv

2020-03-10 17:51

developer   ~0090884

You have not rebased new branch on new master. You based on origin/IR-2020-02-28.
origin/master is updated each weekend.

By the way, now, as you don't use TopoDS casting methods, please remove include of TopoDS.hxx

git

2020-03-11 06:31

administrator   ~0090889

Branch CR28880_3 has been created by antonavt.

SHA-1: a30abfe330684c3318d051e37807d3e70b837f22


Detailed log of new commits:

Author: antonavt
Date: Mon Mar 2 12:16:14 2020 +0300

    0028880: Modeling Algorithms - add missing BRepFeat_SplitShape::Right() getter
    
    Added Right() method to BRepFeat_SplitShape

msv

2020-03-11 10:12

developer   ~0090892

OK with the code. It's perfect. And now we need to create a non-regression test case for this issue.

There is a test code in the file QABugs_14.cxx in the method BUC60854 that uses the Left() method of BRepFeat_SplitShape. There is the same-name draw command and the test case using it.

The test case is tests\bugs\moddata_1\buc60854 and can be run with the command "test bugs moddata_1 buc60854". Now it has 'bad' state and it is wrong. I have studied this test script and found out that the result is OK.

I propose to improve this test by making it valid. And, in addition, add in it testing of the new method Right(). For that, please add a new option in the command buc60854 so that to select which method Left() or Right() to use as the result.

All new modifications are to be done in the same branch.

git

2020-03-18 08:37

administrator   ~0090996

Branch CR28880_3 has been updated by antonavt.

SHA-1: 4e3e5c3dd936b8a67d34e943bd676dc37f0b4eab


Detailed log of new commits:

Author: antonavt
Date: Wed Mar 18 08:35:19 2020 +0300

    Merge branch 'master' of git.dev.opencascade.org:occt into CR28880

Author: antonavt
Date: Wed Mar 18 08:24:45 2020 +0300

    0028880: Modeling Algorithms - add missing BRepFeat_SplitShape::Right() getter
    
    - Modified test case buc60854. Now its state is "OK";
    - Added an option in command buc60854 which allows to select method Left() or Right();
    - Modified method BUC60854 in QABugs_14.cxx.

kgv

2020-03-18 09:08

developer   ~0090998

Last edited: 2020-03-18 09:08

> Merge branch 'master' of into CR28880
Please prepare branch without merges.

msv

2020-03-18 10:18

developer   ~0091007

Dear Anton,
We maintain master branch being a set of flat commits without merge loops. So, when you actualize your branch on the current master please do 'git rebase' instead of 'git pull'.

msv

2020-03-18 10:57

developer   ~0091009

Please update the help of the command BUC60854 (line 1059), considering new option.

Update the test case buc60854 with adding check of Right() function and check its result.

git

2020-03-19 11:23

administrator   ~0091045

Branch CR28880_4 has been created by antonavt.

SHA-1: 4ab08aed4c1f12bb26209a6f22a2870fb2bf7a56


Detailed log of new commits:

Author: antonavt
Date: Mon Mar 2 12:16:14 2020 +0300

    0028880: Modeling Algorithms - add missing BRepFeat_SplitShape::Right() getter
    
    - Added Right() method to BRepFeat_SplitShape;
    - Added an option in command buc60854, which allows to select Left() or Right() method;
    - Modified method BUC60854 in QABugs_14.cxx;
    - Added new option to the help of command buc60854;
    - Modified test case buc60854. Now its state is "OK";
    - Added check Right() in buc60854 test case.

git

2020-03-23 10:20

administrator   ~0091188

Branch CR28880_4 has been updated forcibly by msv.

SHA-1: 7bcb535cefdd35eca2cabea006bfdbc41716a1bc

msv

2020-03-23 10:25

developer   ~0091189

I have rebased on master and made 2 minor corrections.
Tests are running
http://jenkins-test-12.nnov.opencascade.com/view/CR28880-master-msv/view/COMPARE/.

msv

2020-03-23 12:03

developer   ~0091192

For integration:
OCCT - CR28880_4
Products - none

bugmaster

2020-03-26 12:44

administrator   ~0091262

Combination -
OCCT branch : WEEK-13
master SHA - 89180f98222651faa3f1cffe9f6d5a9abae8a4e8
fe4497f3246e6bc1ced97ac331c148f0809ded15
Products branch : WEEK-13 SHA - f10b867b449ebfa55e0a3c8cb276ae511f9cf7f2
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:
Debian80-64:
OCCT
Total CPU difference: 16843.850000000195 / 16846.320000000138 [-0.01%]
Products
Total CPU difference: 11298.030000000097 / 11306.210000000074 [-0.07%]
Windows-64-VC14:
OCCT
Total CPU difference: 18288.453125 / 18268.796875 [+0.11%]
Products
Total CPU difference: 13126.15625 / 13110.609375 [+0.12%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2020-03-28 13:46

administrator   ~0091327

Branch CR28880_4 has been deleted by inv.

SHA-1: 7bcb535cefdd35eca2cabea006bfdbc41716a1bc

git

2020-03-28 13:47

administrator   ~0091330

Branch CR28880_3 has been deleted by inv.

SHA-1: 4e3e5c3dd936b8a67d34e943bd676dc37f0b4eab

git

2020-03-28 13:47

administrator   ~0091331

Branch CR28880_2 has been deleted by inv.

SHA-1: a29ee42cbf7cb9d83528ef2d7ce1426d7d9ae0ec

git

2020-03-28 13:47

administrator   ~0091332

Branch CR28880 has been deleted by inv.

SHA-1: 0622ee3882bb8673fb5d4edff15f81c1b89a179f

Related Changesets

occt: master 68064d7b

2020-03-02 09:16:14

antonavt


Committer: bugmaster Details Diff
0028880: Modeling Algorithms - add missing BRepFeat_SplitShape::Right() getter

- Added Right() method to BRepFeat_SplitShape;
- Added an option in command buc60854, which allows to select Left() or Right() method;
- Modified method BUC60854 in QABugs_14.cxx;
- Added new option to the help of command buc60854;
- Modified test case buc60854. Now its state is "OK";
- Added check Right() in buc60854 test case.
Affected Issues
0028880
mod - src/BRepFeat/BRepFeat_SplitShape.cxx Diff File
mod - src/BRepFeat/BRepFeat_SplitShape.hxx Diff File
mod - src/QABugs/QABugs_14.cxx Diff File
mod - tests/bugs/moddata_1/buc60854 Diff File

Issue History

Date Modified Username Field Change
2017-06-30 11:55 eryar New Issue
2017-06-30 11:55 eryar Assigned To => msv
2017-07-03 10:09 msv Note Added: 0067927
2017-07-03 10:09 msv Assigned To msv => eryar
2017-07-03 10:09 msv Status new => feedback
2017-07-03 11:26 eryar Note Added: 0067930
2017-07-03 12:50 msv Note Added: 0067939
2017-07-03 12:50 msv Assigned To eryar => msv
2017-07-03 12:50 msv Status feedback => assigned
2020-02-13 17:26 utverdov Assigned To msv => antonavt
2020-03-02 12:17 git Note Added: 0090757
2020-03-02 12:19 antonavt Assigned To antonavt => msv
2020-03-02 15:55 kgv Summary Add Right function for BRepFeat_SplitShape => Modeling Algorithms - add missing BRepFeat_SplitShape::Right() getter
2020-03-02 15:55 kgv Description Updated
2020-03-02 17:14 msv Note Added: 0090778
2020-03-02 17:14 msv Assigned To msv => eryar
2020-03-02 17:14 msv Assigned To eryar => antonavt
2020-03-03 22:59 git Note Added: 0090805
2020-03-03 23:01 antonavt Assigned To antonavt => eryar
2020-03-03 23:01 antonavt Assigned To eryar => msv
2020-03-04 10:18 msv Note Added: 0090806
2020-03-04 10:19 msv Status assigned => resolved
2020-03-04 10:19 msv Steps to Reproduce Updated
2020-03-05 10:04 msv Note Added: 0090827
2020-03-05 10:04 msv Assigned To msv => antonavt
2020-03-05 10:04 msv Status resolved => assigned
2020-03-06 13:02 git Note Added: 0090848
2020-03-06 13:11 antonavt Note Added: 0090849
2020-03-06 13:11 antonavt Assigned To antonavt => msv
2020-03-06 13:11 antonavt Status assigned => resolved
2020-03-10 09:44 msv Note Added: 0090877
2020-03-10 09:44 msv Assigned To msv => antonavt
2020-03-10 09:44 msv Status resolved => assigned
2020-03-10 15:13 git Note Added: 0090881
2020-03-10 15:15 antonavt Assigned To antonavt => msv
2020-03-10 15:15 antonavt Status assigned => resolved
2020-03-10 17:51 msv Note Added: 0090884
2020-03-10 17:51 msv Assigned To msv => antonavt
2020-03-10 17:51 msv Status resolved => assigned
2020-03-11 06:31 git Note Added: 0090889
2020-03-11 06:32 antonavt Assigned To antonavt => msv
2020-03-11 06:32 antonavt Status assigned => resolved
2020-03-11 10:12 msv Note Added: 0090892
2020-03-11 10:12 msv Assigned To msv => antonavt
2020-03-11 10:12 msv Status resolved => assigned
2020-03-18 08:37 git Note Added: 0090996
2020-03-18 08:38 antonavt Assigned To antonavt => msv
2020-03-18 08:38 antonavt Status assigned => resolved
2020-03-18 09:08 kgv Note Added: 0090998
2020-03-18 09:08 kgv Note Edited: 0090998
2020-03-18 10:18 msv Note Added: 0091007
2020-03-18 10:57 msv Note Added: 0091009
2020-03-18 10:58 msv Assigned To msv => antonavt
2020-03-18 10:58 msv Status resolved => assigned
2020-03-19 11:23 git Note Added: 0091045
2020-03-19 11:24 antonavt Assigned To antonavt => msv
2020-03-19 11:24 antonavt Status assigned => resolved
2020-03-23 10:20 git Note Added: 0091188
2020-03-23 10:25 msv Note Added: 0091189
2020-03-23 12:03 msv Note Added: 0091192
2020-03-23 12:03 msv Assigned To msv => bugmaster
2020-03-23 12:03 msv Status resolved => reviewed
2020-03-26 12:44 bugmaster Note Added: 0091262
2020-03-26 12:44 bugmaster Status reviewed => tested
2020-03-26 12:48 bugmaster Test case number => bugs/moddata_1/buc60854
2020-03-28 13:36 bugmaster Changeset attached => occt master 68064d7b
2020-03-28 13:36 bugmaster Status tested => verified
2020-03-28 13:36 bugmaster Resolution open => fixed
2020-03-28 13:46 git Note Added: 0091327
2020-03-28 13:47 git Note Added: 0091330
2020-03-28 13:47 git Note Added: 0091331
2020-03-28 13:47 git Note Added: 0091332
2020-09-11 17:51 abv Target Version => 7.5.0
2020-12-02 16:40 emo Fixed in Version => 7.5.0
2020-12-02 17:11 emo Status verified => closed