MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0032450Open CASCADE[OCCT] OCCT:Modeling Algorithmspublic2021-06-16 19:032021-08-02 20:58
Reporterasuraven 
Assigned Toasuraven 
PrioritynormalSeverityminor 
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.6.0*Fixed in Version 
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 number
Attached Filespatch file icon 0029059_6-It-is-necessary-to-have-a-unique-way-of-chec.patch (70,299 bytes) 2021-06-16 19:03

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

-  Notes
(0102852)
git (administrator)
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 (developer)
2021-07-28 20:34

(0102875)
asuraven (developer)
2021-07-29 19:06

(0102898)
git (administrator)
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 (developer)
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 (developer)
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 (developer)
2021-08-02 20:58


- 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 View Revisions
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 View Revisions
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


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker