MantisBT - Open CASCADE
View Issue Details
0032450Open CASCADE[OCCT] OCCT:Modeling Algorithmspublic2021-06-16 19:032021-09-11 14:06
asuraven 
bugmaster 
normalminor 
verifiedfixed 
 
[OCCT] 7.6.0* 
Not required
0032450: Modeling Algorithms - change BRepLib_CheckCurveOnSurface & GeomLib_CheckCurveOnSurface interfaces to adaptors
It is more correct to use adaptors instead of geometry in BRepLib_CheckCurveOnSurface & GeomLib_CheckCurveOnSurface classes’ interfaces. It should be borne in mind that the adaptors classes aren’t thread safe.
A patch file with implementation of this task (without thread safety) from CR29059-6 branch is attached.
not exist
No tags attached.
related to 0029059verified bugmaster Modeling Algorithms - It is necessary to have a unique way of checking of the validity of the edge and its 2D curves 
related to 0032449closed bugmaster Modeling Algorithms - make curves adaptors classes thread safe 
related to 0032485verified bugmaster Modeling Algorithms - Add Clone() function for adapters 
patch 0029059_6-It-is-necessary-to-have-a-unique-way-of-chec.patch (70,299) 2021-06-16 19:03
https://tracker.dev.opencascade.org/
Issue History
2021-06-16 19:03asuravenNew Issue
2021-06-16 19:03asuravenAssigned To => msv
2021-06-16 19:03asuravenFile Added: 0029059_6-It-is-necessary-to-have-a-unique-way-of-chec.patch
2021-06-16 19:04asuravenRelationship addedrelated to 0029059
2021-06-16 19:04asuravenRelationship addedrelated to 0032449
2021-06-16 19:29msvDescription Updatedbug_revision_view_page.php?rev_id=25385#r25385
2021-07-19 12:43asuravenRelationship addedrelated to 0032485
2021-07-28 11:31asuravenAssigned Tomsv => asuraven
2021-07-28 11:31asuravenStatusnew => assigned
2021-07-28 17:31gitNote Added: 0102852
2021-07-28 20:34asuravenNote Added: 0102863
2021-07-29 19:06asuravenNote Added: 0102875
2021-07-30 17:21gitNote Added: 0102898
2021-07-30 18:15asuravenNote Added: 0102901
2021-07-30 18:15asuravenAssigned Toasuraven => msv
2021-07-30 18:15asuravenStatusassigned => resolved
2021-07-30 18:15asuravenSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=25566#r25566
2021-08-02 20:58msvNote Added: 0102940
2021-08-02 20:58msvNote Added: 0102941
2021-08-02 20:58msvAssigned Tomsv => asuraven
2021-08-02 20:58msvStatusresolved => assigned
2021-08-16 18:17gitNote Added: 0103243
2021-08-17 11:31asuravenNote Added: 0103248
2021-08-17 11:47gitNote Added: 0103250
2021-08-17 12:56gitNote Added: 0103255
2021-08-17 13:19gitNote Added: 0103257
2021-08-17 14:03gitNote Added: 0103260
2021-08-17 15:07gitNote Added: 0103261
2021-08-17 17:34asuravenNote Added: 0103265
2021-08-30 12:23gitNote Added: 0103530
2021-08-31 19:34asuravenNote Added: 0103596
2021-08-31 19:34asuravenAssigned Toasuraven => msv
2021-08-31 19:34asuravenStatusassigned => resolved
2021-08-31 19:47kgvNote Added: 0103598
2021-09-01 12:38asuravenNote Added: 0103617
2021-09-01 13:09msvNote Added: 0103621
2021-09-01 13:09msvAssigned Tomsv => asuraven
2021-09-01 13:09msvStatusresolved => assigned
2021-09-01 13:48gitNote Added: 0103623
2021-09-01 13:52asuravenNote Added: 0103627
2021-09-01 13:52asuravenAssigned Toasuraven => msv
2021-09-01 13:52asuravenStatusassigned => resolved
2021-09-01 14:30msvNote Added: 0103629
2021-09-01 14:30msvAssigned Tomsv => bugmaster
2021-09-01 14:30msvStatusresolved => reviewed
2021-09-02 11:55smoskvinNote Added: 0103665
2021-09-02 11:55smoskvinAssigned Tobugmaster => asuraven
2021-09-02 11:55smoskvinStatusreviewed => assigned
2021-09-02 14:34gitNote Added: 0103677
2021-09-06 15:00gitNote Added: 0103866
2021-09-07 12:47asuravenNote Added: 0103885
2021-09-07 12:47asuravenAssigned Toasuraven => msv
2021-09-07 12:47asuravenStatusassigned => resolved
2021-09-08 12:39gitNote Added: 0103919
2021-09-08 12:40msvNote Added: 0103920
2021-09-08 12:40msvAssigned Tomsv => bugmaster
2021-09-08 12:40msvStatusresolved => reviewed
2021-09-11 13:23smoskvinNote Added: 0104002
2021-09-11 13:23smoskvinStatusreviewed => tested
2021-09-11 13:38smoskvinTest case number => Not required
2021-09-11 13:43bugmasterChangeset attached => occt master 9ae88397
2021-09-11 13:43bugmasterStatustested => verified
2021-09-11 13:43bugmasterResolutionopen => fixed
2021-09-11 14:06gitNote Added: 0104040
2021-09-11 14:06gitNote Added: 0104041
2021-09-11 14:06gitNote Added: 0104042

Notes
(0102852)
git   
2021-07-28 17:31   
Branch CR32450 has been created by asuraven.

SHA-1: 546dcf2f43b12c9d5ba6d043b5e9582cd68d480b


Detailed log of new commits:

Author: asuraven
Date: Tue Jul 13 17:17:51 2021 +0300

    0032450: Modeling Algorithms - change BRepLib_CheckCurveOnSurface & GeomLib_CheckCurveOnSurface interfaces to adapters
(0102863)
asuraven   
2021-07-28 20:34   
(0102875)
asuraven   
2021-07-29 19:06   
(0102898)
git   
2021-07-30 17:21   
Branch CR32450_1 has been created by asuraven.

SHA-1: ef0409d05da7b89bcf0d834a7ad078d5ced342c4


Detailed log of new commits:

Author: asuraven
Date: Tue Jul 13 17:17:51 2021 +0300

    0032450: Modeling Algorithms - change BRepLib_CheckCurveOnSurface & GeomLib_CheckCurveOnSurface interfaces to adapters
(0102901)
asuraven   
2021-07-30 18:15   
Michael, please make a preliminary review of the code in the CR32450_1 branch. There are no test results in the branch because the server is currently off
(0102940)
msv   
2021-08-02 20:58   
src/GeomLib/GeomLib_CheckCurveOnSurface.hxx
class GeomAdaptor_Curve;
class Adaptor2d_Curve2d;
class Geom_Surface;
class Geom2d_Curve;

These definitions are not used and can be omitted.

  //! and 2d curve <thePCurve>

thePCurve -> theCurveOnSurface

typedef NCollection_Shared<NCollection_Array1<Handle(Adaptor3d_Curve)> > HArray1OfHCurve;


Move this definition out of global scope, inside the class or in the cpp file.

src/GeomLib/GeomLib_CheckCurveOnSurface.cxx
-   const Adaptor3d_Curve& myCurve1;
-   const Adaptor3d_Curve& myCurve2;
+   const Handle(Adaptor3d_Curve)& myCurve1;
+   const Handle(Adaptor3d_Curve)& myCurve2;

It is better to leave here adaptors by reference to value.

-  if(((myCurve->FirstParameter() - myFirst) > myTolRange) ||
-     ((myCurve->LastParameter() - myLast) < -myTolRange) ||
-     ((thePCurve->FirstParameter() - myFirst) > myTolRange) ||
-     ((thePCurve->LastParameter() - myLast) < -myTolRange))
-  {
-    myErrorStatus = 2;
-    return;
-  }

Do not throw away these checks, as you need to check the ends of myCurve and theCurveOnSurface.

    if (isMultiThread)

Why not to use OSD_ThreadPool::Launcher in both cases? You create HArray1OfHCurve in any way. It is better to avoid such code duplication.

      const int aNbThreads = isMultiThread ? Min(anIntervals.Size(), aThreadPool->NbDefaultThreadsToLaunch()) 
: 1;

In this place isMultiThread is always true.

      Handle(HArray1OfHCurve) aCurveArray = new HArray1OfHCurve(0, aNbThreads - 1);

The usage of handle here is not justified. Replace with:
      Array1OfHCurve aCurveArray (0, aNbThreads - 1);

And make GeomLib_CheckCurveOnSurface_Local accepting arrays by reference instead of handles.

src/BRepLib/BRepLib_CheckCurveOnSurface.hxx
  Standard_EXPORT void Perform(const Standard_Boolean isMultiThread = Standard_True);

Change default value to false.

src/BRepLib/BRepLib_CheckCurveOnSurface.cxx
#include <GeomAdaptor_Surface.hxx>

Useless include.

Please add info about changed API in upgrade guide.
(0102941)
msv   
2021-08-02 20:58   
(0103243)
git   
2021-08-16 18:17   
Branch CR32450_2 has been created by asuraven.

SHA-1: 9cd2cd687a50d54c212dc4524a5491fb98abed26


Detailed log of new commits:

Author: asuraven
Date: Tue Jul 13 17:17:51 2021 +0300

    0032450: Modeling Algorithms - change BRepLib_CheckCurveOnSurface & GeomLib_CheckCurveOnSurface interfaces to adapters
(0103248)
asuraven   
2021-08-17 11:31   
(0103250)
git   
2021-08-17 11:47   
Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: 836179704443501e6533ef8c453638e6170cd763
(0103255)
git   
2021-08-17 12:56   
Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: 004a33ee2c49ad858a4b77a36e3092b655d8598d
(0103257)
git   
2021-08-17 13:19   
Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: 2631f178e50a1ebeb00e9441e89ab8e2babc1994
(0103260)
git   
2021-08-17 14:03   
Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: a3a07bdd52f75021badb6db0eebc9816f2c1e5b6
(0103261)
git   
2021-08-17 15:07   
Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: cceb303aa6981944d2117d91bff127c562fca54d
(0103265)
asuraven   
2021-08-17 17:34   
(0103530)
git   
2021-08-30 12:23   
Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: d0aadfaee4d58fea8da7e060a89e531579e16534
(0103596)
asuraven   
2021-08-31 19:34   
remarks fixed in branch CR32450_2
(0103598)
kgv   
2021-08-31 19:47   
+Now the classes accept adaptors instead objects as incoming paramrters.
...
+The folowing functions in *GeomLib_CheckCurveOnSurface* have been modified:

paramrters->parameters
folowing->following
incoming->input

It would be helpful configuring a spellchecker within your text editor.
(0103617)
asuraven   
2021-09-01 12:38   
tests results:
http://jenkins-test-occt.nnov.opencascade.com/view/CR32450_2-master-ASURAVEN/view/COMPARE/ [^]
(0103621)
msv   
2021-09-01 13:09   
Please make a note in upgrade guide that the parameter isMultiThread changed its default value from true to false.

src/GeomLib/GeomLib_CheckCurveOnSurface.hxx
  //! and 2d curve <thePCurve>

Correct the comment: thePCurve -> theCurveOnSurface

src/GeomLib/GeomLib_CheckCurveOnSurface.cxx
      const Handle(Adaptor3d_Curve)& anAdaptorCurve = theCurveOnSurface;
      aCurveOnSurfaceArray.SetValue(anI, aNbThreads > 1 ? theCurveOnSurface->ShallowCopy() : anAdaptorCurve);


It is no need to introduce the new variable anAdaptorCurve.
(0103623)
git   
2021-09-01 13:48   
Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: 1dc1eef23f7e76fa4e1b16f161c9cf7a350ca8ae
(0103627)
asuraven   
2021-09-01 13:52   
fixed
(0103629)
msv   
2021-09-01 14:30   
For integration:
occt - CR32450_2
products - none
(0103665)
smoskvin   
2021-09-02 11:55   
The problems of compilation on Linux platform that block testing CR0-WEEK-35

Rebase branch to CR0-WEEK-35 and check compilation

http://jenkins-test-08.nnov.opencascade.com/view/CR0-WEEK-35/view/OCCT%20compile/job/CR0-WEEK-35-OCCT-Debian80-64-opt-compile/3/parsed_console/ [^]
(0103677)
git   
2021-09-02 14:34   
Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: cfaf08f983443bd91e9b906e2e9daf8a002687fe
(0103866)
git   
2021-09-06 15:00   
Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: 6342b1c888b29df22bd2109f5986b859032f0789
(0103885)
asuraven   
2021-09-07 12:47   
Linux compilation problem fixed
(0103919)
git   
2021-09-08 12:39   
Branch CR32450_2 has been updated forcibly by msv.

SHA-1: 1a59c817447bffcd2571c62d842108cfa9f9c429
(0103920)
msv   
2021-09-08 12:40   
For integration:
occt - CR32450_2
products - none
(0104002)
smoskvin   
2021-09-11 13:23   
Combination -
OCCT branch : IR-2021-09-10
master SHA - 9ae883970dd77a39d856b49e6883ed5d0e60d20f
49e51745631c52b6c452c65adae4d6dfa21a1b1e
Products branch : IR-2021-09-10 SHA - 2d2bc879e2da9d770a1938ab3410f5885c8555e7
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: 17358.54000000042 / 17496.500000000422 [-0.79%]
Products
Total CPU difference: 11397.800000000112 / 11567.680000000111 [-1.47%]
Windows-64-VC14:
OCCT
Total CPU difference: 19328.109375 / 19307.609375 [+0.11%]
Products
Total CPU difference: 12733.328125 / 12920.953125 [-1.45%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0104040)
git   
2021-09-11 14:06   
Branch CR32450 has been deleted by mnt.

SHA-1: 546dcf2f43b12c9d5ba6d043b5e9582cd68d480b
(0104041)
git   
2021-09-11 14:06   
Branch CR32450_1 has been deleted by mnt.

SHA-1: ef0409d05da7b89bcf0d834a7ad078d5ced342c4
(0104042)
git   
2021-09-11 14:06   
Branch CR32450_2 has been deleted by mnt.

SHA-1: 1a59c817447bffcd2571c62d842108cfa9f9c429