MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031137Open CASCADE[OCCT] OCCT:Modeling Datapublic2019-11-06 23:292019-11-10 11:41
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeverityintegration request 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.5.0*Fixed in Version 
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
Attached Files

- Relationships
related to 0031136newkgv Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces 

-  Notes
(0088757)
git (administrator)
2019-11-06 23:44

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.
(0088761)
kgv (developer)
2019-11-07 08:02
edited on: 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.

(0088789)
msv (developer)
2019-11-08 11:49

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.
(0088790)
kgv (developer)
2019-11-08 12:15

> 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.
(0088791)
kgv (developer)
2019-11-08 12:31

> 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.
(0088792)
git (administrator)
2019-11-08 12:42

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

(0088793)
git (administrator)
2019-11-08 12:46

Branch CR31137 has been updated forcibly by kgv.

SHA-1: 02d98729ec0f43853015fce66e9950288fd1dc1a
(0088794)
git (administrator)
2019-11-08 12:48

Branch CR31137 has been updated forcibly by kgv.

SHA-1: bc639e2c8f9fbaac96966010abfe2b20c2fcad50
(0088795)
kgv (developer)
2019-11-08 12:49

Remarks have been pushed to branch.
(0088801)
msv (developer)
2019-11-08 14:40

The new ctor of Poly_Polygon2D is better to declare explicit.
(0088802)
git (administrator)
2019-11-08 14:57

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

(0088803)
kgv (developer)
2019-11-08 14:57

> The new ctor of Poly_Polygon2D is better to declare explicit.
Fixed.
(0088804)
msv (developer)
2019-11-08 15:07

Reviewed.
(0088823)
git (administrator)
2019-11-09 13:50

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.
(0088830)
git (administrator)
2019-11-10 11:41

Branch CR31137_1 has been deleted by inv.

SHA-1: 23332b6f9c937a0a0d82030e26879bef90eb23ce
(0088831)
git (administrator)
2019-11-10 11:41

Branch CR31137 has been deleted by inv.

SHA-1: df262840050b365d338d976b16cb91f0ebfc04c7

- Related Changesets
occt: master 6b467e52
Timestamp: 2019-11-06 16:26:24
Author: 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.
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 View Revisions
2019-11-07 08:03 kgv Note Edited: 0088761 View Revisions
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


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker