View Issue Details

IDProjectCategoryView StatusLast Update
0031137Open CASCADEOCCT:Modeling Datapublic2020-12-02 17:12
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityintegration request 
Status closedResolutionfixed 
Target Version7.5.0Fixed in Version7.5.0 
Summary0031137: Modeling Data, BinTools_ShapeSet - avoid allocation of temporary arrays
DescriptionBinTools_ShapeSet allocates temporary arrays while reading triangulation and polygonal data, which looks redundant, although might be not critical from performance point of view.
Steps To ReproduceN/A
TagsNo tags attached.
Test case number

Relationships

related to 0031136 closedbugmaster Open CASCADE Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces 

Activities

git

2019-11-06 23:44

administrator   ~0088757

Branch CR31137 has been created by kgv.

SHA-1: 2d022b7f07ae71c8479ff68e0b89165052a1275a


Detailed log of new commits:

Author: kgv
Date: Wed Nov 6 19:26:24 2019 +0300

    0031137: Modeling Data, BinTools_ShapeSet - avoid allocation of temporary arrays
    
    BinTools_ShapeSet now defines maps with proper types instead of Standard_Transient.
    BinTools_ShapeSet now avoids allocation of temporary arrays while reading
    triangulation and polygonal data.
    
    Classes Poly_Triangle, Poly_PolygonOnTriangulation, Poly_Polygon3D and Poly_Polygon2D
    have been cleared from .lxx files and extended by new methods for preallocating and filling array,
    as alternative to passing arrays by copy.
    
    wavefront command - export "f" instead of obsolete "fo" keys into file.
    BinTools - added missing tools for reading/writing short reals.

kgv

2019-11-07 08:02

developer   ~0088761

Last edited: 2019-11-07 08:03

Patch is ready for review.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR31137-master-KGV

The CPU time of XOpen is reduced up-to 9% on manually checked XBF files.

msv

2019-11-08 11:49

developer   ~0088789

Poly_PolygonOnTriangulation has new method:
  Standard_EXPORT void SetParameters (const Handle(TColStd_HArray1OfReal)& theParameters);
Why not to use the notion like in the method ChangeNodes(), and as it is in Poly_Polygon3D.hxx:
  TColStd_Array1OfReal& ChangeParameters() const { return myParameters->ChangeArray1(); }
I think it is needed to have the same convention on methods in the same family of classes.
Also, it is better to have the new constructor of Poly_PolygonOnTriangulation accepting the bool flag theHasParams.

Poly_Polygon2D does not have ctor for preallocating array, as alternative to passing array by copy.

The new ctors in above classes (if they have two parameters) do not need to be declared explicit.

BinTools_ShapeSet does not define the map with proper type instead of Standard_Transient for myPolygons2D.

kgv

2019-11-08 12:15

developer   ~0088790

> BinTools_ShapeSet does not define the map with proper type instead of Standard_Transient for myPolygons2D.
In fact, class fills in myPolygons2D but doesn't use it in any way.
This is why I have decided not to change this map definition.

kgv

2019-11-08 12:31

developer   ~0088791

> Why not to use the notion like in the method ChangeNodes(), and as it is in Poly_Polygon3D.hxx:
I can add Boolean flag for consistency, but SetParameters() will be still needed.
This is because BinTools_ShapeSet writing hasParameters flag in unfortunate place, unlike other collections.

git

2019-11-08 12:42

administrator   ~0088792

Branch CR31137 has been updated by kgv.

SHA-1: 0661576c86dd0466268053132fbdc3a521167ce7


Detailed log of new commits:

Author: kgv
Date: Fri Nov 8 12:41:12 2019 +0300

    # remarks

git

2019-11-08 12:46

administrator   ~0088793

Branch CR31137 has been updated forcibly by kgv.

SHA-1: 02d98729ec0f43853015fce66e9950288fd1dc1a

git

2019-11-08 12:48

administrator   ~0088794

Branch CR31137 has been updated forcibly by kgv.

SHA-1: bc639e2c8f9fbaac96966010abfe2b20c2fcad50

kgv

2019-11-08 12:49

developer   ~0088795

Remarks have been pushed to branch.

msv

2019-11-08 14:40

developer   ~0088801

The new ctor of Poly_Polygon2D is better to declare explicit.

git

2019-11-08 14:57

administrator   ~0088802

Branch CR31137 has been updated by kgv.

SHA-1: df262840050b365d338d976b16cb91f0ebfc04c7


Detailed log of new commits:

Author: kgv
Date: Fri Nov 8 14:55:53 2019 +0300

    # remarks 2

kgv

2019-11-08 14:57

developer   ~0088803

> The new ctor of Poly_Polygon2D is better to declare explicit.
Fixed.

msv

2019-11-08 15:07

developer   ~0088804

Reviewed.

git

2019-11-09 13:50

administrator   ~0088823

Branch CR31137_1 has been created by kgv.

SHA-1: 23332b6f9c937a0a0d82030e26879bef90eb23ce


Detailed log of new commits:

Author: kgv
Date: Wed Nov 6 19:26:24 2019 +0300

    0031137: Modeling Data, BinTools_ShapeSet - avoid allocation of temporary arrays
    
    BinTools_ShapeSet now defines maps with proper types instead of Standard_Transient.
    BinTools_ShapeSet now avoids allocation of temporary arrays while reading
    triangulation and polygonal data.
    
    Classes Poly_Triangle, Poly_PolygonOnTriangulation, Poly_Polygon3D and Poly_Polygon2D
    have been cleared from .lxx files and extended by new methods for preallocating and filling array,
    as alternative to passing arrays by copy.
    
    wavefront command - export "f" instead of obsolete "fo" keys into file.
    BinTools - added missing tools for reading/writing short reals.

git

2019-11-10 11:41

administrator   ~0088830

Branch CR31137_1 has been deleted by inv.

SHA-1: 23332b6f9c937a0a0d82030e26879bef90eb23ce

git

2019-11-10 11:41

administrator   ~0088831

Branch CR31137 has been deleted by inv.

SHA-1: df262840050b365d338d976b16cb91f0ebfc04c7

Related Changesets

occt: master 6b467e52

2019-11-06 16:26:24

kgv


Committer: bugmaster Details Diff
0031137: Modeling Data, BinTools_ShapeSet - avoid allocation of temporary arrays

BinTools_ShapeSet now defines maps with proper types instead of Standard_Transient.
BinTools_ShapeSet now avoids allocation of temporary arrays while reading
triangulation and polygonal data.

Classes Poly_Triangle, Poly_PolygonOnTriangulation, Poly_Polygon3D and Poly_Polygon2D
have been cleared from .lxx files and extended by new methods for preallocating and filling array,
as alternative to passing arrays by copy.

wavefront command - export "f" instead of obsolete "fo" keys into file.
BinTools - added missing tools for reading/writing short reals.
Affected Issues
0031137
mod - src/BinTools/BinTools.cxx Diff File
mod - src/BinTools/BinTools.hxx Diff File
mod - src/BinTools/BinTools_ShapeSet.cxx Diff File
mod - src/BinTools/BinTools_ShapeSet.hxx Diff File
mod - src/MeshTest/MeshTest.cxx Diff File
mod - src/Poly/FILES Diff File
mod - src/Poly/Poly_Polygon2D.cxx Diff File
mod - src/Poly/Poly_Polygon2D.hxx Diff File
rm - src/Poly/Poly_Polygon2D.lxx Diff File
mod - src/Poly/Poly_Polygon3D.cxx Diff File
mod - src/Poly/Poly_Polygon3D.hxx Diff File
rm - src/Poly/Poly_Polygon3D.lxx Diff File
mod - src/Poly/Poly_PolygonOnTriangulation.cxx Diff File
mod - src/Poly/Poly_PolygonOnTriangulation.hxx Diff File
rm - src/Poly/Poly_PolygonOnTriangulation.lxx Diff File
rm - src/Poly/Poly_Triangle.cxx Diff File
mod - src/Poly/Poly_Triangle.hxx Diff File
rm - src/Poly/Poly_Triangle.lxx Diff File

Issue History

Date Modified Username Field Change
2019-11-06 23:29 kgv New Issue
2019-11-06 23:29 kgv Assigned To => msv
2019-11-06 23:44 git Note Added: 0088757
2019-11-07 08:02 kgv Note Added: 0088761
2019-11-07 08:02 kgv Status new => resolved
2019-11-07 08:02 kgv Steps to Reproduce Updated
2019-11-07 08:03 kgv Note Edited: 0088761
2019-11-07 11:25 kgv Relationship added related to 0031136
2019-11-08 11:49 msv Note Added: 0088789
2019-11-08 11:49 msv Assigned To msv => kgv
2019-11-08 11:49 msv Status resolved => assigned
2019-11-08 12:15 kgv Note Added: 0088790
2019-11-08 12:31 kgv Note Added: 0088791
2019-11-08 12:42 git Note Added: 0088792
2019-11-08 12:46 git Note Added: 0088793
2019-11-08 12:48 git Note Added: 0088794
2019-11-08 12:49 kgv Note Added: 0088795
2019-11-08 12:49 kgv Assigned To kgv => msv
2019-11-08 12:49 kgv Status assigned => resolved
2019-11-08 14:40 msv Note Added: 0088801
2019-11-08 14:40 msv Assigned To msv => kgv
2019-11-08 14:40 msv Status resolved => assigned
2019-11-08 14:57 git Note Added: 0088802
2019-11-08 14:57 kgv Note Added: 0088803
2019-11-08 14:57 kgv Assigned To kgv => msv
2019-11-08 14:57 kgv Status assigned => resolved
2019-11-08 15:07 msv Note Added: 0088804
2019-11-08 15:07 msv Assigned To msv => bugmaster
2019-11-08 15:07 msv Status resolved => reviewed
2019-11-09 13:50 git Note Added: 0088823
2019-11-10 11:18 bugmaster Changeset attached => occt master 6b467e52
2019-11-10 11:18 bugmaster Status reviewed => verified
2019-11-10 11:18 bugmaster Resolution open => fixed
2019-11-10 11:41 git Note Added: 0088830
2019-11-10 11:41 git Note Added: 0088831
2020-12-02 16:22 emo Fixed in Version => 7.5.0
2020-12-02 17:12 emo Status verified => closed