View Issue Details

IDProjectCategoryView StatusLast Update
0032450Open CASCADEOCCT:Modeling Algorithmspublic2021-09-11 14:06
ReporterasuravenAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.6.0Fixed in Version7.6.0 
Summary0032450: Modeling Algorithms - change BRepLib_CheckCurveOnSurface & GeomLib_CheckCurveOnSurface interfaces to adaptors
DescriptionIt 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.
Steps To Reproducenot exist
TagsNo tags attached.
Test case numberNot required

Attached Files

  • 0029059_6-It-is-necessary-to-have-a-unique-way-of-chec.patch (70,299 bytes)

Relationships

related to 0029059 closedbugmaster Modeling Algorithms - It is necessary to have a unique way of checking of the validity of the edge and its 2D curves 
related to 0032449 closedbugmaster Modeling Algorithms - make curves adaptors classes thread safe 
related to 0032485 closedbugmaster Modeling Algorithms - Add Clone() function for adapters 

Activities

asuraven

2021-06-16 19:03

reporter  

0029059_6-It-is-necessary-to-have-a-unique-way-of-chec.patch (70,299 bytes)

git

2021-07-28 17:31

administrator   ~0102852

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

asuraven

2021-07-28 20:34

reporter   ~0102863

asuraven

2021-07-29 19:06

reporter   ~0102875

git

2021-07-30 17:21

administrator   ~0102898

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

asuraven

2021-07-30 18:15

reporter   ~0102901

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

msv

2021-08-02 20:58

developer   ~0102940

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.

msv

2021-08-02 20:58

developer   ~0102941

git

2021-08-16 18:17

administrator   ~0103243

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

asuraven

2021-08-17 11:31

reporter   ~0103248

git

2021-08-17 11:47

administrator   ~0103250

Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: 836179704443501e6533ef8c453638e6170cd763

git

2021-08-17 12:56

administrator   ~0103255

Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: 004a33ee2c49ad858a4b77a36e3092b655d8598d

git

2021-08-17 13:19

administrator   ~0103257

Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: 2631f178e50a1ebeb00e9441e89ab8e2babc1994

git

2021-08-17 14:03

administrator   ~0103260

Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: a3a07bdd52f75021badb6db0eebc9816f2c1e5b6

git

2021-08-17 15:07

administrator   ~0103261

Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: cceb303aa6981944d2117d91bff127c562fca54d

asuraven

2021-08-17 17:34

reporter   ~0103265

git

2021-08-30 12:23

administrator   ~0103530

Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: d0aadfaee4d58fea8da7e060a89e531579e16534

asuraven

2021-08-31 19:34

reporter   ~0103596

remarks fixed in branch CR32450_2

kgv

2021-08-31 19:47

developer   ~0103598

+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.

asuraven

2021-09-01 12:38

reporter   ~0103617

tests results:
http://jenkins-test-occt.nnov.opencascade.com/view/CR32450_2-master-ASURAVEN/view/COMPARE/

msv

2021-09-01 13:09

developer   ~0103621

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.

git

2021-09-01 13:48

administrator   ~0103623

Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: 1dc1eef23f7e76fa4e1b16f161c9cf7a350ca8ae

asuraven

2021-09-01 13:52

reporter   ~0103627

fixed

msv

2021-09-01 14:30

developer   ~0103629

For integration:
occt - CR32450_2
products - none

smoskvin

2021-09-02 11:55

administrator   ~0103665

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/

git

2021-09-02 14:34

administrator   ~0103677

Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: cfaf08f983443bd91e9b906e2e9daf8a002687fe

git

2021-09-06 15:00

administrator   ~0103866

Branch CR32450_2 has been updated forcibly by asuraven.

SHA-1: 6342b1c888b29df22bd2109f5986b859032f0789

asuraven

2021-09-07 12:47

reporter   ~0103885

Linux compilation problem fixed

git

2021-09-08 12:39

administrator   ~0103919

Branch CR32450_2 has been updated forcibly by msv.

SHA-1: 1a59c817447bffcd2571c62d842108cfa9f9c429

msv

2021-09-08 12:40

developer   ~0103920

For integration:
occt - CR32450_2
products - none

smoskvin

2021-09-11 13:23

administrator   ~0104002

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

git

2021-09-11 14:06

administrator   ~0104040

Branch CR32450 has been deleted by mnt.

SHA-1: 546dcf2f43b12c9d5ba6d043b5e9582cd68d480b

git

2021-09-11 14:06

administrator   ~0104041

Branch CR32450_1 has been deleted by mnt.

SHA-1: ef0409d05da7b89bcf0d834a7ad078d5ced342c4

git

2021-09-11 14:06

administrator   ~0104042

Branch CR32450_2 has been deleted by mnt.

SHA-1: 1a59c817447bffcd2571c62d842108cfa9f9c429

Related Changesets

occt: master 9ae88397

2021-07-13 14:17:51

asuraven


Committer: bugmaster Details Diff
0032450: Modeling Algorithms - change BRepLib_CheckCurveOnSurface & GeomLib_CheckCurveOnSurface interfaces to adapters Affected Issues
0032450
mod - dox/upgrade/upgrade.md Diff File
mod - src/BRepLib/BRepLib_CheckCurveOnSurface.cxx Diff File
mod - src/BRepLib/BRepLib_CheckCurveOnSurface.hxx Diff File
mod - src/BRepTools/BRepTools.cxx Diff File
mod - src/GeomLib/GeomLib_CheckCurveOnSurface.cxx Diff File
mod - src/GeomLib/GeomLib_CheckCurveOnSurface.hxx Diff File
mod - src/IntTools/IntTools_Tools.cxx Diff File

Issue History

Date Modified Username Field Change
2021-06-16 19:03 asuraven New Issue
2021-06-16 19:03 asuraven Assigned To => msv
2021-06-16 19:03 asuraven File Added: 0029059_6-It-is-necessary-to-have-a-unique-way-of-chec.patch
2021-06-16 19:04 asuraven Relationship added related to 0029059
2021-06-16 19:04 asuraven Relationship added related to 0032449
2021-06-16 19:29 msv Description Updated
2021-07-19 12:43 asuraven Relationship added related to 0032485
2021-07-28 11:31 asuraven Assigned To msv => asuraven
2021-07-28 11:31 asuraven Status new => assigned
2021-07-28 17:31 git Note Added: 0102852
2021-07-28 20:34 asuraven Note Added: 0102863
2021-07-29 19:06 asuraven Note Added: 0102875
2021-07-30 17:21 git Note Added: 0102898
2021-07-30 18:15 asuraven Note Added: 0102901
2021-07-30 18:15 asuraven Assigned To asuraven => msv
2021-07-30 18:15 asuraven Status assigned => resolved
2021-07-30 18:15 asuraven Steps to Reproduce Updated
2021-08-02 20:58 msv Note Added: 0102940
2021-08-02 20:58 msv Note Added: 0102941
2021-08-02 20:58 msv Assigned To msv => asuraven
2021-08-02 20:58 msv Status resolved => assigned
2021-08-16 18:17 git Note Added: 0103243
2021-08-17 11:31 asuraven Note Added: 0103248
2021-08-17 11:47 git Note Added: 0103250
2021-08-17 12:56 git Note Added: 0103255
2021-08-17 13:19 git Note Added: 0103257
2021-08-17 14:03 git Note Added: 0103260
2021-08-17 15:07 git Note Added: 0103261
2021-08-17 17:34 asuraven Note Added: 0103265
2021-08-30 12:23 git Note Added: 0103530
2021-08-31 19:34 asuraven Note Added: 0103596
2021-08-31 19:34 asuraven Assigned To asuraven => msv
2021-08-31 19:34 asuraven Status assigned => resolved
2021-08-31 19:47 kgv Note Added: 0103598
2021-09-01 12:38 asuraven Note Added: 0103617
2021-09-01 13:09 msv Note Added: 0103621
2021-09-01 13:09 msv Assigned To msv => asuraven
2021-09-01 13:09 msv Status resolved => assigned
2021-09-01 13:48 git Note Added: 0103623
2021-09-01 13:52 asuraven Note Added: 0103627
2021-09-01 13:52 asuraven Assigned To asuraven => msv
2021-09-01 13:52 asuraven Status assigned => resolved
2021-09-01 14:30 msv Note Added: 0103629
2021-09-01 14:30 msv Assigned To msv => bugmaster
2021-09-01 14:30 msv Status resolved => reviewed
2021-09-02 11:55 smoskvin Note Added: 0103665
2021-09-02 11:55 smoskvin Assigned To bugmaster => asuraven
2021-09-02 11:55 smoskvin Status reviewed => assigned
2021-09-02 14:34 git Note Added: 0103677
2021-09-06 15:00 git Note Added: 0103866
2021-09-07 12:47 asuraven Note Added: 0103885
2021-09-07 12:47 asuraven Assigned To asuraven => msv
2021-09-07 12:47 asuraven Status assigned => resolved
2021-09-08 12:39 git Note Added: 0103919
2021-09-08 12:40 msv Note Added: 0103920
2021-09-08 12:40 msv Assigned To msv => bugmaster
2021-09-08 12:40 msv Status resolved => reviewed
2021-09-11 13:23 smoskvin Note Added: 0104002
2021-09-11 13:23 smoskvin Status reviewed => tested
2021-09-11 13:38 smoskvin Test case number => Not required
2021-09-11 13:43 bugmaster Changeset attached => occt master 9ae88397
2021-09-11 13:43 bugmaster Status tested => verified
2021-09-11 13:43 bugmaster Resolution open => fixed
2021-09-11 14:06 git Note Added: 0104040
2021-09-11 14:06 git Note Added: 0104041
2021-09-11 14:06 git Note Added: 0104042