MantisBT - Open CASCADE
View Issue Details
0027651Open CASCADE[OCCT] OCCT:Modeling Algorithmspublic2016-06-28 10:512019-10-04 18:34
aml 
ifv 
normalminor 
assignedopen 
[OCCT] 7.0.0 
[OCCT] 7.5.0* 
0027651: Modeling Algorithms - Add projection support in sewing pcurves handling
This bug is child of CR27531 issue.

It is necessary to check possibility of adding projection in sewing pcurves handling and add it if possible.

Pseudo-code of current shared edge handling:

1) Take pcurve from the first face and try to bind it on the second.
2) If 1) failed, take pcurve from the second and bind on the first.

The proposed solution is to add following parts:
3) Project the first 3d curve on the second face.
4) if 3) failed, project the second 3d curve on the first face.

test bugs modalg_6 bug27651
No tags attached.
related to 0030435verified ifv Open CASCADE Improving performance of Approx_ComputeCLine 
child of 0027531assigned ifv Open CASCADE Modeling Algorithms - Make the algorithm Approx_SameParameter more clear and robust 
Not all the children of this issue are yet resolved or closed.
Issue History
2016-06-28 10:51amlNew Issue
2016-06-28 10:51amlAssigned To => msv
2016-06-28 10:51amlRelationship addedchild of 0027531
2016-06-28 11:25amlSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14068#r14068
2016-06-28 11:40msvAssigned Tomsv => ifv
2016-06-28 11:40msvStatusnew => assigned
2016-10-28 11:53msvTarget Version7.1.0 => 7.2.0
2017-07-24 09:32msvTarget Version7.2.0 => 7.3.0
2017-12-05 17:08msvTarget Version7.3.0 => 7.4.0
2018-05-08 11:09msvAssigned Toifv => gka
2018-05-08 12:29msvAssigned Togka => msv
2018-05-08 12:32msvNote Added: 0075873
2018-05-08 12:32msvAssigned Tomsv => ifv
2018-05-21 12:55gkaRelationship addedparent of 0029732
2018-06-05 17:31gitNote Added: 0076626
2018-06-07 12:09gitNote Added: 0076661
2018-07-06 17:44gitNote Added: 0077314
2018-07-09 13:36gitNote Added: 0077391
2018-07-23 16:40gitNote Added: 0077929
2018-07-24 17:31gitNote Added: 0077970
2018-08-29 14:09gitNote Added: 0078832
2018-08-31 13:22gitNote Added: 0078885
2018-09-03 15:30gitNote Added: 0078941
2018-12-29 13:35gitNote Added: 0081652
2019-01-10 13:06ifvRelationship addedrelated to 0030435
2019-04-26 12:23gitNote Added: 0084008
2019-05-14 15:47gitNote Added: 0084340
2019-05-14 22:16kgvSummaryAdd projection support in sewing pcurves handling => Modeling Algorithms - Add projection support in sewing pcurves handling
2019-05-17 14:55gitNote Added: 0084428
2019-05-21 16:21gitNote Added: 0084512
2019-05-24 11:02gitNote Added: 0084594
2019-05-24 15:52gitNote Added: 0084606
2019-05-27 16:48gitNote Added: 0084668
2019-06-21 15:59gitNote Added: 0085199
2019-07-02 16:25gitNote Added: 0085381
2019-08-12 17:46msvTarget Version7.4.0 => 7.5.0*
2019-10-01 15:43gitNote Added: 0087665
2019-10-02 13:52gitNote Added: 0087687
2019-10-02 13:54ifvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=21929#r21929
2019-10-02 14:18ifvNote Added: 0087690
2019-10-02 14:18ifvAssigned Toifv => msv
2019-10-02 14:18ifvStatusassigned => resolved
2019-10-04 18:33msvNote Added: 0087838
2019-10-04 18:33msvAssigned Tomsv => ifv
2019-10-04 18:33msvStatusresolved => assigned
2019-10-04 18:34msvNote Added: 0087839

Notes
(0075873)
msv   
2018-05-08 12:32   
After discussion it is decided to make additional methods in BRepLib that will update/add pcurve with checking it for same parameter property, and re-projecting if necessary.
Such method will be called from sewing instead of SameParameter().
(0076626)
git   
2018-06-05 17:31   
Branch CR27651 has been created by ifv.

SHA-1: f68f3b28dd72fcc241885e6e843bf802b6dc9aee


Detailed log of new commits:

Author: ifv
Date: Fri May 25 15:21:04 2018 +0300

    0027651: Add projection support in sewing pcurves handling
(0076661)
git   
2018-06-07 12:09   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: 5352fb5f2973e71e6f5aa3e36996ef68eb0fc1c0
(0077314)
git   
2018-07-06 17:44   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: b42d1da7b3579a2254f7aa204c5d4d7311ea7bfd
(0077391)
git   
2018-07-09 13:36   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: c3ad9fcb2a849abf960d5b51791d21ca313d34d4
(0077929)
git   
2018-07-23 16:40   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: 10e41cab48dea3960f9c7fed4390abf817b4a86d
(0077970)
git   
2018-07-24 17:31   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: 397a0178fcd377072b868c86bef0cd74d28122fd
(0078832)
git   
2018-08-29 14:09   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: 011c677e09cfe9517c8bd3142a7606ba21b926dd
(0078885)
git   
2018-08-31 13:22   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: 9f56e3580ea124959ffe942944176824f7f54989
(0078941)
git   
2018-09-03 15:30   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: 402d52899e43deb7bca45480665e6c52b8a23561
(0081652)
git   
2018-12-29 13:35   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: 8d654b253801fb0f6c9770288da3c6dcbc7392f9
(0084008)
git   
2019-04-26 12:23   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: e219e0f0fb805e599ff723a81b418e47825f811d
(0084340)
git   
2019-05-14 15:47   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: 1fb772b64a9481180215f340573fb6a385840b0d
(0084428)
git   
2019-05-17 14:55   
Branch CR27651 has been updated by ifv.

SHA-1: 08d0acc067c5dfeb8078c1ae159e869a5c398f36


Detailed log of new commits:

Author: ifv
Date: Fri May 17 14:46:35 2019 +0300

    Fix regressions

(0084512)
git   
2019-05-21 16:21   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: 251990c497d42584ccbf322011c0bf9e363c16dd
(0084594)
git   
2019-05-24 11:02   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: 99e1bdb9bd500bb0d3a56ea2447e0cf56e1a1f97
(0084606)
git   
2019-05-24 15:52   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: d89e6298920cfc42b739d864495e9aaacac0b279
(0084668)
git   
2019-05-27 16:48   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: 1461508de0f09515868b39e6aecff2426b93bbb7
(0085199)
git   
2019-06-21 15:59   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: f90e18e2523c974bb613b6979e80f990c168a27c
(0085381)
git   
2019-07-02 16:25   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: e2059f336d42f1286d5596ae9d068f30b5c0ac8d
(0087665)
git   
2019-10-01 15:43   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: 5cd726c55e9cbe44df09e467978e67e1c95ab371
(0087687)
git   
2019-10-02 13:52   
Branch CR27651 has been updated forcibly by ifv.

SHA-1: 979161afe000ab12ca987e0da89edf53381b3116
(0087690)
ifv   
2019-10-02 14:18   
CR27651 is ready for review.
Test results is CR27651-master-IFV
Some comments:
Patch fixes #29732 and improves 0027614 (decrease tolerance 10.18 -> 5.8)

Patch has some problems with performance (see CPU difference), for example,
most difference:
CPU bugs modalg_2 bug22804: 57.15 / 0.16 [+35618.75%]
CPU bugs modalg_7 bug28700_2: 57.05 / 0.04 [+142525.00%]

The reason is:
when pcurve is bad, the old sewing algo only calculates tolerance, usually tolerance is very large and update edge, now algorithm try to get new pcurve by projection. For these cases (both cases have the same shape) projection time is rathe large.
Result tolerance for old algo is 2352.4, for patch is 291.2
sewing is performed with tol = 200
(0087838)
msv   
2019-10-04 18:33   
Remarks:

src/BRepLib/BRepLib_1.cxx
- In the new methods SetPCurve, please check the presence of geometry (surface and curve) in input shapes before further processing (lines 384, 537). It is because we more and more deal with shapes with no geometry (only triangulation), and it is needed to protect low-level functionality from crashes on such shapes.
- 428, 578: Please check this condition, I suspect it is wrong:
if (theMaxTol >= aMaxTol || aNewTol > 10. * theMaxTol)
- 478, 648: Checking aNewTol is redundant here, it is always > 0.
- 565: Why edge tolerance is not updated here, by analogy with another SetPCurve method?

src/BRepTest/BRepTest_BasicCommands.cxx
- 1430: change addpcurve to setpcurve.
(0087839)
msv   
2019-10-04 18:34   
Dear Galina,
Please review the file BRepBuilderAPI_Sewing.cxx in this patch.