View Issue Details
30631 [Open CASCADE] OCCT:Visualization feature have not tried 2019-04-04 21:57 2021-01-15 18:40
kgv  
kgv  
normal  
new  
open  
none    
none  
  7.6.0*  
Visualization - Vulkan graphic driver prototype
It is proposed writing a Vulkan graphic driver prototype as alternative to OpenGl_GraphicDriver.

TODO:
- [0030635] Move functionality, not specific to OpenGL from TKOpenGl to TKV3d.
  This might include OpenGl_Layer and partial of OpenGl_ShaderManager.
- [0030640] Handle [0,1] depth range used by Vulkan, different from [-1,1] used by OpenGL. Note that NDC [-1,1] range is also pre-considered by various OCCT algorithms using Graphic3d_Camera (projection routines), including selection.
- Handle right-hand coordinate system in Vulkan (contrary to left-hand in OpenGL); (0,0) means top-left viewport corner in Vulkan rather than bottom-left corner in OpenGL. Since OCCT follows OpenGL coordinate system (including 2D presentations), it is undesirable changing convention and instead - flip image vertically during rendering.
- Migrate uniforms to uniform blocks within GLSL programs with embedded bindings and locations required by SPIR-V. This might include Matrix block, Standard Material block, Standard Light Sources block, PBR Material Block, Clipping Planes block, etc. GPU Resource manager should allocate large UBOs for multiple aspects, so that dynamic variables will be passed via offset in UBO to pipeline. SynchronizeAspects should access UBOs via sharable interface, probably generating map keys for reusing equal materials / transformations in the same way as TKOpenGl shares textures.
- Graphic3d_Buffer can be allocated directly accessible for GPU, when integrated GPU is used to avoid extra memory copies. This should be optional (application should NOT modify this memory while rendering), but algorithms like StdPrs_ShadedShape are designed to create Graphic3d_Buffer on-the-fly, so that these presentation builders can benefit on integrated GPUs.
- Retrieve Vulkan function pointers table.
  AMD publications claim that CPU overhead due to proxy vulkan-1.dll is not negligible (1-5%).
- Implement vulkan-1.dll loader to handle obsolete systems without Vulkan drivers.
- Vulkan_Device to search for known OpenGL context device.
  It could be particularly useful retrieving memory requirements using Vulkan API even while working with OpenGL API (where this information is unavailable) to estimate properly GPU memory usage by resources taking into account also various hardware-specific alignment limits.
- Redesign Shader Manager to be able generating standard GLSL programs without building OCCT through Tcl/CMake scripts. Generate SPIR-V shaders using this mechanism during OCCT project generation (to avoid bloating OCCT git with binaries).
- Is it possible loading the same Vulkan device as automatically returned by OpenGL (e.g. device connected to the main display)?
dtracelevel warn
pload MODELING VISUALIZATION
box b0 0 0 0 1 2 3
box b1 3 0 0 2 1 3
vclear
vinit View1 -disp vulkan
vglinfo
vdisplay -dispMode 0 b0
vdisplay -dispMode 1 b1
vfit
vk_amd.txt (6,576) 2019-04-13 16:21
https://tracker.dev.opencascade.org/
vk_geforce.txt (6,516) 2019-04-13 16:21
https://tracker.dev.opencascade.org/
vk_intel.txt (6,456) 2019-04-13 16:22
https://tracker.dev.opencascade.org/
vk.log (110,566) 2019-04-13 16:22
https://tracker.dev.opencascade.org/
Notes
(0083421)
git   
2019-04-04 23:26   
Branch CR30631 has been created by kgv.

SHA-1: bbbbed037f840eb2c08a7b1581ebaec22b9546f1


Detailed log of new commits:

Author: kgv
Date: Thu Apr 4 23:20:45 2019 +0300

    0030631: Visualization - Vulkan graphic driver prototype
(0083447)
git   
2019-04-05 20:07   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: cecbfee484f796000677f3d1b80abc7356c6ccac
(0083452)
git   
2019-04-06 16:55   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: c3790fbe2bf8d9acbba691aa8225cd6cf7ef4432
(0083453)
git   
2019-04-06 17:02   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: 75535d8b484a45e9db41998373d334382474ec00
(0083454)
git   
2019-04-06 18:24   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: 65e29450ef872cbefd62c328b10570cd0c579a28
(0083455)
git   
2019-04-06 21:39   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: ee12be16b37b0fa9c2b01df05212844252d1870f
(0083456)
git   
2019-04-06 23:20   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: e9b60673efcd8c375ab2076b071ecced2cf505b3
(0083457)
git   
2019-04-07 01:18   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: 34aa0c9b1a9fda1b47cb2727993d7cc738bc13a2
(0083458)
git   
2019-04-07 01:53   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: 9564b859c66bbafd28b3573303d7df193ca8e9b3
(0083459)
git   
2019-04-07 02:04   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: ca392675e1137ff333a789b524f9d9815e1a9bfc
(0083460)
git   
2019-04-07 03:09   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: fba13979e16691b03d03099897c0fc87af9afcda
(0083461)
git   
2019-04-07 14:54   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: 20d190b100b36864cb8386d799bf074e58400899
(0083462)
git   
2019-04-07 18:48   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: b3511f008a9cb3ec3a4b6a89992d775fc8b6b2b2
(0083463)
git   
2019-04-07 20:48   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: 4236edf853281a5505c2d4dcdf640ade48307192
(0083464)
git   
2019-04-07 22:27   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: f7f877354726b7e31e377e2c4605e7ef0ee51a88
(0083465)
git   
2019-04-07 22:56   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: 32ea24e2d72a558e4919a1c7e7168636ee366d48
(0083469)
git   
2019-04-08 01:19   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: bda89b53bc26d8952c8d3074bceb3e42c990820a
(0083470)
git   
2019-04-08 02:21   
Branch CR30631 has been updated forcibly by kgv.

SHA-1: 4e025bb8e10544224cdeec20950a400faa0b6e6c
(0083541)
git   
2019-04-08 20:16   
Branch CR30631_1 has been created by kgv.

SHA-1: 25cd7cda0be320170cfa341974b58860661b4671


Detailed log of new commits:

Author: kgv
Date: Thu Apr 4 23:20:45 2019 +0300

    0030631: Visualization - Vulkan graphic driver prototype

Author: kgv
Date: Mon Apr 8 19:47:20 2019 +0300

    0030640: Visualization, Graphic3d_Camera - add option creating Projection matrix with [0,1] depth range
    
    Added new property Graphic3d_Camera::IsZeroToOneDepth() and OpenGl_Caps::useZeroToOneDepth
    for activating [0,1] depth range instead of [-1,1] range using glClipControl() within OpenGL 4.5+.
(0083542)
git   
2019-04-08 20:19   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 861e4f6be5fa09b4dfafabfb1bb2abb67a4be442
(0083577)
git   
2019-04-09 14:39   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 6aa970af41ea25e058480653aab15d5c80058bbb
(0083592)
git   
2019-04-10 10:29   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 85adfb43bf000a511e417b5440a48f3dc1cd85d6
(0083601)
git   
2019-04-10 12:58   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: a4ab0add400d2ce745f665234097d48f64aae95f
(0083607)
git   
2019-04-10 15:32   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: a5537a8b0172fd19f4a1b1402b3d642f33555c94
(0083614)
git   
2019-04-10 19:17   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 2bc1423506fcf57df57d197426b7a4b854d1d014
(0083615)
git   
2019-04-10 19:36   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 5dcedaa06796e1f23d9b17aa551a62f6f15eed31
(0083616)
git   
2019-04-10 21:31   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 97bad4e8e82e823c01395847c611a3730173a0bc
(0083617)
git   
2019-04-10 22:07   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 67c073593959ef724681bf64b7492b3499377d03
(0083618)
git   
2019-04-10 22:49   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 499e140059492f80bd6f54a2b059e86dfa5c0ad1
(0083619)
git   
2019-04-10 22:52   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 9750e15b8d2c573bfd6bec79aed5efd265396cf6
(0083620)
git   
2019-04-11 00:12   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 1223afc170da78c32adbb07de7eeb057101b1949
(0083621)
git   
2019-04-11 00:26   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: abc22d780bf03890215a77e856c379f07c774659
(0083622)
git   
2019-04-11 01:06   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 0d0f8b594d0fe387f863d402e52ab3e411aa1934
(0083623)
git   
2019-04-11 02:03   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: f08c7349eda732fee79fce729bbd5341bfaa509d
(0083624)
git   
2019-04-11 03:35   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: e1a55d97c9b5ff36c6300956443ec5facbf15616
(0083636)
git   
2019-04-11 14:20   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 37d42d76020714f35c3e9827bdf33837344e97f8
(0083639)
git   
2019-04-11 15:26   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 7a9e8701da80b91e3647f6a5345f28ded9f92df0
(0083640)
git   
2019-04-11 15:32   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: fd346528a7f11b024301676e29461d4ce4bf9123
(0083641)
git   
2019-04-11 15:44   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 9c8c73bfcae938ff789a6dfe759e078c4c2bcccd
(0083690)
git   
2019-04-13 15:20   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: cd98a7033e46d8e03139e7d6c16d721a2042800f
(0083691)
git   
2019-04-13 16:17   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 680840c57a618b8fe4812ea448d59cfd3c08c016
(0083692)
git   
2019-04-13 17:49   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: aba6b97d44cad1a92569a63a741bbc019c4d6e43
(0083693)
git   
2019-04-13 18:00   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: f2c6125636eda8d9d11ab3146a685acaef2460a6
(0083694)
git   
2019-04-13 18:19   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 6a481a8ad76a868b679dbe680758ce9c464d710d
(0083695)
git   
2019-04-13 19:14   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 3e3e298670ed8ac37a7a56eac058a58444abdd30
(0083696)
git   
2019-04-13 19:28   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 72f51a7ea4f2397ad4fe627db9cd7aab7afbfd3c
(0083697)
git   
2019-04-13 19:36   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 22e94bbe2a47fa00aeb1f0fb530293408583f8b2
(0083698)
git   
2019-04-13 23:34   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 2db94f360bba4628e2ad646c2058a6681266e20d
(0083699)
git   
2019-04-14 00:21   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: e5097ed49441c712944e6c056945fa056981e69d
(0083700)
git   
2019-04-14 00:36   
Branch CR30631_1 has been updated forcibly by kgv.

SHA-1: 1a67767e781befecbba1af036845c791a493de81
(0083730)
git   
2019-04-14 19:36   
Branch CR30631_2 has been created by kgv.

SHA-1: 16a00cd08ae64454d85161d6d4522d481f5ad5a9


Detailed log of new commits:

Author: kgv
Date: Thu Apr 4 23:20:45 2019 +0300

    0030631: Visualization - Vulkan graphic driver prototype
(0083731)
git   
2019-04-14 20:09   
Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: 38bb36af05db4a29c951a852c2a1e2da21013de6
(0083732)
git   
2019-04-14 20:37   
Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: fdace77f07abb141a9fbd2e30b0a87804343b6fa
(0083733)
git   
2019-04-14 21:02   
Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: 3796634363a024cfa3a3b51270c6b33b875ea580
(0083734)
git   
2019-04-14 21:15   
Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: 0144ac98cf79f0886d8540995fd5365791a963a0
(0083735)
git   
2019-04-14 21:34   
Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: f6c8b4183dde362cb3a9df825acc2e425657dd5c
(0083736)
git   
2019-04-14 23:21   
Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: 745b75b6bea41f3d4297ac8dfa076cbcc207d960
(0083737)
git   
2019-04-14 23:55   
Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: 509939712a7ddd0f3d1c126c4908100c14f63efc
(0083738)
git   
2019-04-15 00:01   
Branch CR30631_2 has been updated forcibly by kgv.

SHA-1: c02d08647274c938c87b59cb70da6b063024ed7a
(0083739)
kgv   
2019-04-15 01:09   
(edited on: 2019-04-15 11:05)
Naive incomplete Vulkan prototype, 25k boxes, VSync is ON.

pload MODELING VISUALIZATION
set nx 50; set ny 50; set nz 10;
set bb {}
for {set x 1} {$x <= $nx} {incr x} { for {set y 1} {$y <= $ny} {incr y} { for {set z 1} {$z <= 
$nz} {incr z} { box b${x}_${y}_${z} $x $y $z 0.5 0.5 0.5; lappend bb b${x}_${y}_${z} } } }
for {set x 1} {$x <= $nx} {incr x} { for {set y 1} {$y <= $ny} {incr y} { for {set z 1} {$z <= 
$nz} {incr z} { box b${x}_${y}_${z} $x $y $z 0.5 0.5 0.5; incmesh b${x}_${y}_${z} 0.001 } } }

vclear
vinit View1 -disp vulkan
#vinit View1
vrenderparams -frustumCulling off -shadingModel phong
vdisplay -dispMode 1 {*}$bb
vfit


Radeon RX Vega, OpenGL:
FPS: 19.9
CPU: 43.5 msec


Radeon RX Vega, Vulkan:
FPS: 46.3
CPU: 19.3 msec


GeForce GTX 1060, OpenGL:
FPS: 30.0
CPU: 40.3 msec


GeForce GTX 1060, Vulkan:
FPS: 30.0
CPU: 17.5 msec


Intel(R) HD Graphics 630, OpenGL:
FPS: 17.9
CPU: 54.8 msec


Intel(R) HD Graphics 630, Vulkan:
FPS: 18.9
CPU: 22.1 msec


R9 380, OpenGL:
FPS: 19.9
CPU: 39.8 msec


R9 380, Vulkan:
FPS: 54.6
CPU: 16.2 msec







View Issue Details
32058 [Open CASCADE] OCCT:Modeling Data minor have not tried 2021-01-15 16:18 2021-01-15 16:33
ifv  
ifv  
normal  
new  
open  
none    
none  
  7.6.0*  
Modeling Data - Extrema curve-surface gives wrong result for planar surface of revolunion and circle
Circle practically fully coincides with planar surface of revolution, but algorithm produces two points with large distance between them.
Let c, s are given curve and surface from attached files bug32058_c and bug32058_s
Run draw command

extrema c s

Result ext_1 must be very short line, length ~ 1.e-13
but length of ext_1 is 80, see attached picture
res.jpg (31,701) 2021-01-15 16:26
https://tracker.dev.opencascade.org/
bug32058_c (183) 2021-01-15 16:27
https://tracker.dev.opencascade.org/
bug32058_s (99) 2021-01-15 16:27
https://tracker.dev.opencascade.org/
There are no notes attached to this issue.





View Issue Details
31136 [Open CASCADE] OCCT:Modeling Data minor have not tried 2019-11-06 18:51 2021-01-15 15:00
kgv  
kgv  
normal  
resolved 6.3.1  
open  
none    
none  
  7.6.0*  
Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
BinXCAF persistence (BinTools_ShapeSet) does not store per-vertex normal information.

This is a problem in case of triangulation-only Faces, as there is no analytical geometry to restore normals.
pload MODELING XDE OCAF VISUALIZATION
source $env(CSF_OCCTSamplesPath)/tcl/cad.tcl
trinfo res
wavefront res o
readobj o o.obj
binsave o b.bbrep
binrestore b.bbrep b
# same for ASCII format
#save o b.brep
#restore b.brep b
# and for XBF (using BinTools_ShapeSet internally)
#XSave D1 b.xbf
#XOpen b.xbf D2

vclear
vclose ALL

vinit v1/v1
vfront
vdisplay -dispMode 1 res
vfit
vrenderparams -shadingModel phong

vinit v2/v2
vbottom
vdisplay -dispMode 1 b
vfit
vrenderparams -shadingModel phong
cad_ref_OK.png (35,177) 2019-11-06 18:52
https://tracker.dev.opencascade.org/
cad_xcaf_KO.png (37,223) 2019-11-06 18:52
https://tracker.dev.opencascade.org/
Notes
(0088756)
git   
2019-11-06 19:27   
Branch CR31136 has been created by kgv.

SHA-1: b9e59ab73fd56c77484a2e80cde9df77d01fe97a


Detailed log of new commits:

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

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    BinTools - added missing tools for reading/writing short reals.
    BinTools_ShapeSet now defines maps with proper types instead of Standard_Transient.
    BinTools_ShapeSet::ReadTriangulation() - fixed inefficient reading of triangulation data
    with allocation or redundant temporary arrays.
    wavefront command - export "f" instead of obsolete "fo" keys into file.
(0090439)
git   
2020-02-10 10:21   
Branch CR31136 has been deleted by kgv.

SHA-1: b9e59ab73fd56c77484a2e80cde9df77d01fe97a
(0090800)
git   
2020-03-03 16:52   
Branch CR31136 has been created by asuraven.

SHA-1: bee13ef1cf7c244bcdf0592f42cf2b5e124c95fd


No new revisions were added by this update.
(0090929)
git   
2020-03-13 15:45   
Branch CR31136 has been updated by asuraven.

SHA-1: 3f104410c39099cdda90d0f8dbaa7c7c333a3ae9


Detailed log of new commits:

Author: asuraven
Date: Fri Mar 13 15:42:53 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces

(0090946)
kgv   
2020-03-15 11:17   
+  *  @f$ f_{3} @f$ -- IGNORED(version 1 olny) \\ checked (version 2 or later); 

olny
(0090970)
asuraven   
2020-03-16 15:13   
http://jenkins-test-12.nnov.opencascade.com/view/CR31136-master-ASURAVEN/view/COMPARE/ [^]
Pleace review
(0090972)
asuraven   
2020-03-16 16:07   
Details:
*** Binary Document ***
BinLDrivers_FormatVersion.hxx (added)
- enum class BinLDrivers_FormatVersion added

BinDrivers
- BinDrivers::StorageVersion() changed

BinLDrivers
- Current version type changed from #define to static const BinLDrivers_FormatVersion class member
- Current version value increased from 10 to 11
- BinLDrivers::StorageVersion() changed to BinLDrivers::StringStorageVersion()

BinLDrivers_DocumentRetrievalDriver
BinLDrivers_DocumentSection
BinMDataStd
BinMDataStd_AsciiStringDriver
BinMDataStd_ByteArrayDriver
BinMDataStd_ExtStringArrayDriver
BinMDataStd_IntegerArrayDriver
BinMDataStd_IntegerDriver
BinMDataStd_IntPackedMapDriver
BinMDataStd_NameDriver
BinMDataStd_RealArrayDriver
BinMDataStd_RealDriver
- Magic constants changed to BinLDrivers_FormatVersion enum

*** Binary Shape ***
BinTools_ShapeSet
- enum class BinTools_FormatVersion added
- Function SetFormatNb() is replaced by SetFormat() (behavior changed)
- Type of myTriangulations changed from NCollection_IndexedMap to NCollection_IndexedDataMap (for store info about the need to write normals into a file)
- Version info strings moved from global area to class private section
- Magic constants changed to BinTools_FormatVersion enum
- WriteTriangulation() / ReadTriangulation()
  * Save/Read NeedToWriteNormals for every triangulation (only for VERSION_4)
  * Save/Read triangulation's normals values if it needs (only for VERSION_4)

BinMNaming_NamedShapeDriver
- Current version type changed from #define to static const BinTools_FormatVersion class member
- Current version value increased from 3 to 4

BinMNaming_NamingDriver
BinMXCAFDoc_LocationDriver
BRepTools_ShapeSet
- Magic constants changed to BinTools_FormatVersion enum

BinTools
- added theVersion parameter to Write() functions

*** Text Shape ***
TopTools_ShapeSet
- enum class TopTools_FormatVersion added
- Function SetFormatNb() is replaced by SetFormat() (behavior changed)
- Current version value increased from 2 to 3
- Version info strings moved from global area to class private section

BRepTools_ShapeSet
- Type of myTriangulations changed from TColStd_IndexedMapOfTransient to NCollection_IndexedDataMap (for store info about the need to write normals into a file)
- WriteTriangulation() / ReadTriangulation()
  * Save/Read NeedToWriteNormals for every triangulation (only for VERSION_3)
  * Save/Read triangulation's normals values if it needs (only for VERSION_3)
  
Draw_SaveAndRestoreBase (added)
- Class Draw_SaveAndRestoreBase declaration moved from Draw_Appli.hxx and changed to abstract base class
- Class Draw_SaveAndRestoreBase realization moved from Draw_VariableCommands.cxx
- Draw_First static pointer moved from Draw_VariableCommands.cxx as static member
- GetFirst() static function added
- Derived class Draw_SaveAndRestoreNumber added

DBRep
- Draw_SaveAndRestoreDBRep derived from Draw_SaveAndRestoreBase class added
- Named argument "-version" added to global binsave() function
- static non-member functions changed to Draw_SaveAndRestoreDBRep overrided virtual functions

DrawTrSurf
- Following derived from Draw_SaveAndRestoreBase classes added:
  * Draw_SaveAndRestoreCurve
  * Draw_SaveAndRestoreBezierCurve
  * Draw_SaveAndRestoreBSplineCurve
  * Draw_SaveAndRestoreCurve2d
  * Draw_SaveAndRestoreBezierCurve2d
  * Draw_SaveAndRestoreBSplineCurve2d
  * Draw_SaveAndRestoreSurface
  * Draw_SaveAndRestoreBezierSurface
  * Draw_SaveAndRestoreBSplineSurface
  * Draw_SaveAndRestorePoint
  * Draw_SaveAndRestoreTriangulation
  * Draw_SaveAndRestorePolygon3D
  * Draw_SaveAndRestorePolygon2D
- static non-member functions changed to derived classes overrided virtual functions

HLRTest
- Derived class Draw_SaveAndRestoreHLRTest added
- static non-member functions changed to derived classes overrided virtual functions

Poly_Triangulation
- Poly_Triangulation constructor with "hasNormals" parameter added

StandardCommands
- Named argument "-version" added to tcl save() DRAW command
  
  
*** XML Document ***
XmlLDrivers_FormatVersion (added)
- enum class XmlLDrivers_FormatVersion added

XmlLDrivers
- Current version type changed from #define to static const XmlLDrivers_FormatVersion class member
- Current version value changed from 9 to 10
- int StorageVersion() replaced by TCollection_AsciiString XmlLDrivers::StringFormatVersion()

CDM_Document
XmlLDrivers_DocumentRetrievalDriver
XmlLDrivers_DocumentStorageDriver
XmlMDataStd_ByteArrayDriver
XmlMDataStd_ExtStringArrayDriver
XmlMDataStd_IntegerArrayDriver
XmlMDataStd_IntPackedMapDriver
XmlMDataStd_RealArrayDriver
XmlMDataStd_TreeNodeDriver
XmlMDF
XmlMNaming_NamedShapeDriver
XmlMNaming_NamingDriver
XmlMXCAFDoc_LocationDriver
- Magic constants changed to XmlLDrivers_FormatVersion enum

CDM_Document
- myStorageFormatVersion type changed from Standard_Integer to XmlLDrivers_FormatVersion


*** Common ***
Storage_HeaderData
- StorageVersion() string function replaced by StringStorageVersion(), BinStorageVersion() and XmlStorageVersion() for compatibility with format version`s enum classes
- SetStorageVersion(const BinLDrivers_FormatVersion&) and SetStorageVersion (const XmlLDrivers_FormatVersion&) overloaded fuctions added

*** Documentation ***
brep_wp.md
- Info about changes in BRep format added
upgrade.md
- Info about changes in API added
(0091046)
kgv   
2020-03-19 11:36   
+enum class BinLDrivers_FormatVersion : Standard_Integer

OCCT has to be compilable by some old compilers not supporting enum class.
(0093173)
msv   
2020-07-17 14:52   
Andrey, could you rebase on new master and run tests again?
(0093895)
git   
2020-09-02 16:50   
Branch CR31136 has been updated by asuraven.

SHA-1: e2443485f250d1366a612fa05407e2d1303e490a


Detailed log of new commits:

Author: asuraven
Date: Wed Sep 2 16:52:22 2020 +0300

    correction

Author: asuraven
Date: Wed Sep 2 16:38:56 2020 +0300

    Merge branch 'CR31136' of ssh://git.dev.opencascade.org/occt [^] into CR31136
    
    # Conflicts:
    # dox/dev_guides/upgrade/upgrade.md
    # src/BinLDrivers/BinLDrivers_DocumentSection.hxx
    # src/BinMNaming/BinMNaming_NamedShapeDriver.cxx
    # src/BinTools/BinTools.cxx
    # src/BinTools/BinTools.hxx
    # src/BinTools/BinTools_ShapeSet.hxx
    # src/DBRep/DBRep.cxx
    # src/Draw/FILES
    # src/Storage/Storage_Schema.cxx
    # src/TopTools/TopTools_ShapeSet.hxx

Author: asuraven
Date: Wed Sep 2 16:15:20 2020 +0300

    rebase to master

Author: asuraven
Date: Fri Mar 13 15:42:53 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces

(0094198)
git   
2020-09-07 15:19   
Branch CR31136 has been updated by asuraven.

SHA-1: 02c283b97313cd37743a4f4719d8eaa94206f291


Detailed log of new commits:

Author: asuraven
Date: Mon Sep 7 15:21:30 2020 +0300

    Merge branch 'CR31136' of ssh://git.dev.opencascade.org/occt [^] into CR31136
    
    # Conflicts:
    # src/BinMNaming/BinMNaming_NamingDriver.cxx
    # src/Storage/Storage_Schema.cxx
    # src/TopTools/TopTools_ShapeSet.hxx

Author: asuraven
Date: Mon Sep 7 15:11:54 2020 +0300

    Debug code changed

Author: asuraven
Date: Fri Mar 13 15:42:53 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces

Author: asuraven
Date: Wed Sep 2 16:15:20 2020 +0300

    rebase to master

Author: asuraven
Date: Fri Mar 13 15:42:53 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces

(0094382)
asuraven   
2020-09-10 15:32   
Mikhail, I have rebased and run tests.
Test results are here: http://occt-tests/CR31136-master-ASURAVEN-Products/Windows-64-VC14/diff_summary.html [^]
Pleace review
(0094384)
kgv   
2020-09-10 15:35   
Andrey, git log shows a broken branch.
Could you please correct branch to meet recommended practice (a single bug commit in front of current "master")?
(0094465)
git   
2020-09-11 15:28   
Branch CR31136_1 has been created by asuraven.

SHA-1: a867355764a752dca4b53024af20edb1d521d84c


Detailed log of new commits:

Author: asuraven
Date: Fri Mar 13 15:42:53 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces (cumulative commit)
(0094469)
asuraven   
2020-09-11 15:52   
emun class consructions excluded.
grammatical error fixed.
All changes are merged into one commit in Branch CR31136_1
Tests task created and is running now:
http://jenkins-test-12.nnov.opencascade.com/view/CR31136_1-master-ASURAVEN/ [^]
Mikhail, Pleace review
(0094768)
msv   
2020-09-14 18:06   
Andrey, please re-base on new master, there are conflicts.
And re-test.
(0094819)
git   
2020-09-15 12:05   
Branch CR31136_2 has been created by asuraven.

SHA-1: eece068da44cc796adb6c3d8f6c66ca884d55b71


Detailed log of new commits:

Author: asuraven
Date: Fri Mar 13 15:42:53 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces (cumulative commit)
(0094841)
asuraven   
2020-09-15 15:18   
New branch CR31136_2 has been created on new master
New tests results: http://jenkins-test-12.nnov.opencascade.com/view/CR31136_2-master-ASURAVEN/view/COMPARE/ [^]
Please review
(0094923)
msv   
2020-09-16 15:31   
In commit message, remove words "(cumulative commit)".
Also, add short information about what has changed.

Please remove all not relevant changes in formatting. It really makes reviewing hard work.

Revert renaming of StorageVersion to StringStorageVersion in BinLDrivers, Storage_Data, Storage_HeaderData, XmlLDrivers. It is unjustified change of API.
(0094925)
git   
2020-09-16 15:33   
Branch CR31136_2 has been updated by msv.

SHA-1: ea174cd1593a6b1c562a19024e206fb3c353b275


Detailed log of new commits:

Author: msv
Date: Wed Sep 16 15:35:56 2020 +0300

    #simplify text in upgrade guide

(0094933)
git   
2020-09-16 17:16   
Branch CR31136_2 has been updated by asuraven.

SHA-1: dacc123d84a20f633d043f7eec8598dd458f5960


Detailed log of new commits:

Author: asuraven
Date: Wed Sep 16 17:19:23 2020 +0300

    rollback refactoring

(0094960)
git   
2020-09-17 14:13   
Branch CR31136_3 has been created by asuraven.

SHA-1: 2aba087137b0bb7b8730c476ad64d82a87a585c3


Detailed log of new commits:

Author: asuraven
Date: Thu Sep 17 14:16:44 2020 +0300

    * 0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Files written with the new version will not be readable by applications of old versions
(0094961)
asuraven   
2020-09-17 14:28   
Commit messege changed.
Not relevant changes removed.
StorageVersion function names restored.
All changes commited in new branch CR31136_3
Tests task created and now in progress:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31136_3-master-ASURAVEN/ [^]
(0094966)
kgv   
2020-09-17 15:08   
(edited on: 2020-09-17 15:09)
Patch mixes up introduction of new format version and Draw Harness tools to manage versions (+ some methods and constants in public API listing old and new versions).
As the latter consumers considerable amount of patch, it would be better if this part will be moved to dedicated (preceding) patch.

-          myTriangulations.Add(CR->Triangulation());
+          myTriangulations.Add(CR->Triangulation(), Standard_False); // edge triangulation does not 
need normals
...
     // Add the surface geometry
+    Standard_Boolean needNormals(Standard_False);
     Handle(BRep_TFace) TF = Handle(BRep_TFace)::DownCast(S.TShape());
...
-      if (!Tr.IsNull()) myTriangulations.Add(Tr);
+      if (!Tr.IsNull()) myTriangulations.Add(Tr, needNormals);

This logic looks broken or fragile (if it works as expected - then the note is missing).
Triangulations are shared between polygon-on-edges and surfaces.
At the same time, NCollection_IndexedDataMap::Add() does not modify the value of already added key.
Therefore, behavior will depend on the order of adding the same triangulation for an Edge and for a Face of the surface.

+@subsection upgrade_750_visualizationOfTriangulation Changes in storage of shapes

Section name is misleading as patch is not directly related to visualization but rather to storage formats.

+    const Standard_Boolean NeedToWriteNormals = myTriangulations(i);

toWriteNormals (no upper-case for local variables in new code, please).

+      if (FormatNb() >= TOP_TOOLS_VERSION_3)
+        OS << ((T->HasNormals() && NeedToWriteNormals) ? "1" : "0") 
<< " ";

Here and in other places - please put single-line statements in brackets.

-  TColStd_IndexedMapOfTransient myTriangulations;
+  NCollection_IndexedDataMap<Handle(Standard_Transient), Standard_Boolean, TColStd_MapTransientHasher> 
myTriangulations;

NCollection_IndexedDataMap<Handle(Poly_Triangulation), Standard_Boolean>
and please put description of the value stored within the map.

+
+enum BinLDrivers_FormatVersion
+{
+  BIN_LDRIVERS_VERSION_2 = 2, // First supported version
...
 
+enum BinTools_FormatVersion
+{

Please add enumeration description and use "//!<" for values.

+// Created on: 2020-03-06
+// Created by: Andrey SURAVENKOV
+// Copyright (c) 2002-2020 OPEN CASCADE SAS

Copyright range looks confusing and non-realistic.

--- a/src/BinMNaming/BinMNaming_NamedShapeDriver.hxx
+++ b/src/BinMNaming/BinMNaming_NamedShapeDriver.hxx
@@ -80,6 +80,7 @@ public:
   //! get the format of topology
     BinTools_LocationSet& GetShapesLocations();
 
+  static const BinTools_FormatVersion THE_CURRENT_VERSION = BIN_TOOLS_VERSION_4;
...
   void SetWithTriangles (const Standard_Boolean isWithTriangles) { myWithTriangles = isWithTriangles; 
}
+  
+  static const BinTools_FormatVersion THE_CURRENT_VERSION = BIN_TOOLS_VERSION_4;
...
   Standard_Boolean myWithTriangles;
 
+  static Standard_CString Version_1, Version_2, Version_3, Version_4;
...
+  Standard_Boolean         myDisplay;
+
+  static Draw_SaveAndRestoreBase* Draw_FirstSaveAndRestore;

Please put constants and global variables into dedicated "public:" sections.

--- a/src/BinMNaming/BinMNaming_NamingDriver.cxx
+++ b/src/BinMNaming/BinMNaming_NamingDriver.cxx
-         if(!entry.IsEmpty() && !entry.IsEqual(TCollection_AsciiString(NULL_ENTRY))) 
-           {
-             TDF_Label tLab; // Null label.
-             TDF_Tool::Label(anAtt->Label().Data(),entry, tLab, Standard_True);
-             if (!tLab.IsNull()) 
-               aName.ContextLabel(tLab);

Please revert large formatting block changes - the functional changes are pretty local and could be put with previous formatting (even if it was broken).

+  myFormatNb = THE_CURRENT_VERSION;
+}
+//=======================================================================

Please add missing empty line.

+      std::cout << "Syntax error: unknown argument '" << aParam << "'\n";

+      return 1;

Please put error messages into either theDI or Message::SendFail() to make them appear in RED in Draw Harness console.

+               # set version
+        if { $arg == "-version" } {
...
+               # unsupported option
+        error "Error: unsupported option \"$arg\""

Broken indentation.

(0095051)
msv   
2020-09-18 19:45   
- if(aDocFormatVersion > 9) { // process user defined guid
+ if(aDocFormatVersion >= BIN_LDRIVERS_VERSION_8) { // process user defined guid

Why the condition has been changed?

- if(RelocTable.GetHeaderData()->StorageVersion().IntegerValue() > 8) { // process user defined guid
- const Standard_Integer& aPos = Source.Position();
- Standard_GUID aGuid;
- ok = Source >> aGuid;
- if (!ok) {
- Source.SetPosition(aPos);
- aStrAtt->SetID(TDataStd_AsciiString::GetID());
- ok = Standard_True;
- } else {
- aStrAtt->SetID(aGuid);
- }
+ if(RelocTable.GetHeaderData()->StorageVersion().IntegerValue() >= BIN_LDRIVERS_VERSION_9) { // process user defined guid
+ const Standard_Integer& aPos = Source.Position();
+ Standard_GUID aGuid;
+ ok = Source >> aGuid;
+ if (!ok) {
+ Source.SetPosition(aPos);
+ aStrAtt->SetID(TDataStd_AsciiString::GetID());
+ ok = Standard_True;
+ } else {
+ aStrAtt->SetID(aGuid);
+ }
   } else
- aStrAtt->SetID(TDataStd_AsciiString::GetID());
+ aStrAtt->SetID(TDataStd_AsciiString::GetID());

Not relevant space changes.

- : BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TNaming_NamedShape)->Name()), myShapeSet(Standard_False),myFormatNb(FORMAT_NUMBER)
+ : BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TNaming_NamedShape)->Name()), myShapeSet(Standard_False), myFormatNb(THE_CURRENT_VERSION)

Why do you create a new constant BinMNaming_NamedShapeDriver::THE_CURRENT_VERSION instead of using BinTools_ShapeSet::THE_CURRENT_VERSION?

Move enum BinTools_FormatVersion to a dedicated header file.

+ //! Sets the format version to <THE_CURRENT_VERSION>
+ void SetCurrentFormat();

This method is not used, please remove it.

+ static Standard_CString Version_1, Version_2, Version_3, Version_4;

Define each field on independent line.

In BinMNaming_NamingDriver.cxx there are a lot of not relevant space changes.

In CDM_Document.hxx, useless include XmlLDrivers_FormatVersion.hxx. In CDM_Document::CDM_Document(), why do you initialize myStorageFormatVersion with XML_LDRIVERS_VERSION_2? CDM is a base interface and it does not know about XML or BIN formats.

Move enum TopTools_FormatVersion to a dedicated header file.
Move description of format versions from description of TopTools_ShapeSet::FormatNb to the definition of TopTools_FormatVersion. Leave here only the reference to the type TopTools_FormatVersion.

+ static Standard_CString Version_1, Version_2, Version_3;

Define each field on independent line.

+       for {set narg 0} {$narg < [llength $args]} {incr narg} {
+        set arg [lindex $args $narg]
+               
+               # set version


Mix of tabs with spaces ruins indentation. Do not use tabs.

+ theVersion; // to suppress a warning

Use "(void) theVersion;"

+  Handle(DrawTrSurf_BezierCurve) N = new DrawTrSurf_BezierCurve(G,
+                                                                CurvColor,
+                                                                PolesColor,
+                                                                ShowPoles,
+                                                                                 Discret,
+                                                                Deflection,
+                                                                DrawMode);

Do not use tabs. The same in below changed lines in the file DrawTrSurf.cxx.

DrawTrSurf_SaveAndRestoreSurface* classes should be local to cxx file. Move them from the header.
The same is for Draw_SaveAndRestoreDBRep, HLRTest_SaveAndRestore.
Rename Draw_SaveAndRestoreDBRep to DBRep_SaveAndRestore.

+ //! enable a 2D representation). Here the hasNormals flag indicates whether
+ //! normals will be associated with 3D ones

will be given and associated with nodes

+void Storage_HeaderData::SetStorageVersion(const Standard_Integer aVersion)
+{
+  myStorageVersion = TCollection_AsciiString(aVersion);
+}

Make this method inline and call from it the method with the string.

+ if (theFormatNb >= TOP_TOOLS_VERSION_1 && theFormatNb <= THE_CURRENT_VERSION)
+ myFormatNb = theFormatNb;
+ else
+ myFormatNb = THE_CURRENT_VERSION;

It is better to not silently set current version, but make assertion here. The same is in BinTools_ShapeSet::SetFormatNb.

Remove Leading "* " from the first line of the commit message.
Make empty line after the first line of the commit message.

* Files written with the new version will not be readable by applications of old versions

This info is for upgrade guide, but not for commit message.

In commit it is worth mentioning the new optional parameter of save/binsave draw commands.
(0095165)
git   
2020-09-20 20:00   
Branch CR31136_3 has been updated by asuraven.

SHA-1: 4755e78f3753641e2e38627bef40725869e5676c


Detailed log of new commits:

Author: asuraven
Date: Sun Sep 20 20:03:28 2020 +0300

    fix formatting

(0095189)
git   
2020-09-21 16:05   
Branch CR31136_3 has been updated by asuraven.

SHA-1: 4d7c3a3934db011bc5f2928a1af7c4966c117f9e


Detailed log of new commits:

Author: asuraven
Date: Mon Sep 21 15:55:48 2020 +0300

    Merge branch 'CR31136_3' of ssh://git.dev.opencascade.org/occt [^] into CR31136_3
    
    # Conflicts:
    # src/Draw/Draw_VariableCommands.cxx
    # src/XmlMDF/XmlMDF.cxx

Author: asuraven
Date: Sun Sep 20 20:03:28 2020 +0300

    fix formatting

Author: asuraven
Date: Thu Sep 17 14:16:44 2020 +0300

    * 0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Files written with the new version will not be readable by applications of old versions

(0095198)
git   
2020-09-22 13:12   
Branch CR31136_3 has been deleted by asuraven.

SHA-1: 4d7c3a3934db011bc5f2928a1af7c4966c117f9e
(0095199)
git   
2020-09-22 13:12   
Branch CR31136_3 has been created by asuraven.

SHA-1: ad95ce6d8e322157db5716cb27aff330b7526193


Detailed log of new commits:

Author: asuraven
Date: Sun Sep 20 20:03:28 2020 +0300

    fixes for review

Author: asuraven
Date: Thu Sep 17 14:16:44 2020 +0300

    * 0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Files written with the new version will not be readable by applications of old versions
(0095207)
git   
2020-09-22 17:25   
Branch CR31136_3 has been updated by asuraven.

SHA-1: d1b8e2a83665bab5b0caa2130be4db723c3db960


Detailed log of new commits:

Author: asuraven
Date: Tue Sep 22 17:28:11 2020 +0300

    fix

(0095208)
git   
2020-09-22 17:32   
Branch CR31136_4 has been created by asuraven.

SHA-1: c9333c9d74e7a79e8469acadf8856aaf1c68d564


Detailed log of new commits:

Author: asuraven
Date: Thu Sep 17 14:16:44 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Add new optional -version parameter for save/binsave draw commands
(0095209)
git   
2020-09-22 17:35   
Branch CR31136_3 has been deleted by asuraven.

SHA-1: d1b8e2a83665bab5b0caa2130be4db723c3db960
(0095210)
git   
2020-09-22 17:36   
Branch CR31136_3 has been created by asuraven.

SHA-1: a7519080d0f0d899316a7ed32fb8468d320ca722


Detailed log of new commits:

Author: asuraven
Date: Sun Sep 20 20:03:28 2020 +0300

    fixes for review

Author: asuraven
Date: Thu Sep 17 14:16:44 2020 +0300

    * 0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Files written with the new version will not be readable by applications of old versions
(0095211)
asuraven   
2020-09-22 17:38   
The problems indicated by msv & kgv have been fixed, except for:
- Dividing the path to two part – because a lot of not relevant changes have been removed,
- Possible broken logic in store needNormals for triangulation – Current logic is correct because Bin(Brep)Tools_ShapeSet::AddGeometry() call from Bin(Brep)Tools_ShapeSet::Add() that recursively down from complex to elementary shapes. As a result, the TopAbs_FACE’s will be processed earlier than the TopAbs_EDGE’s.
The commit message problems have been fixed in new CR31136_4 containing one commit.
Tests task is created and now is in progress:
http://jenkins-test-12.nnov.opencascade.com/view/CR31136_4-master-ASURAVEN/ [^]
(0095212)
msv   
2020-09-22 19:17   
+ if (!Compact)
+ {
+ OS << std::setw(10) << j << " : ";
+ }
+ if (!Compact)
+ {
+ OS << std::setw(17);
+ }

Unite the two 'if' blocks.

BRepTools_ShapeSet::ReadTriangulation:
+ if (FormatNb() >= TOP_TOOLS_VERSION_3)
+ {
+ if (hasNormals)

hasNormals is enough condition, you can omit checking format here.

Please put definition of BinTools_ShapeSet::THE_CURRENT_VERSION into dedicated "public:" section.

Include of Draw_SaveAndRestore.hxx is extra in DrawTrSurf.hxx, DBRep.hxx.

It is better to make standard indents in the contents of classes inheriting Draw_SaveAndRestore (DrawTrSurf.cxx, DBRep.cxx, HLRTest.cxx)

Move the definition of inline method Storage_HeaderData::SetStorageVersion from cxx to hxx. The definition of inline method must be accessible via the header. And the word Standard_EXPORT must not be given in its declaration. The word inline is extra when the definition is included in the class.

+// Copyright (c) 2002-2020 OPEN CASCADE SAS

Remove 2002.

+ //! the file on reading calls Check() method.

"on reading" is the beginning of a new sentence.
(0095213)
msv   
2020-09-22 19:20   
Test results are not relevant to this branch. You have tested master-master configuration.
(0095214)
kgv   
2020-09-22 19:22   
> Current logic is correct because...
This notice should be put into the code (e.g. alongside "edge triangulation does not need normals" comment).

+
+enum BinLDrivers_FormatVersion
+{

It is desired having also description of enumeration itself, not only of its values.

+#include <Standard_Typedef.hxx>
+  //! two formats available for the moment:
+ 
+
+enum BinTools_FormatVersion

Broken formatting.

+#endif
+
+
+
+

Please remove redundant empty lines - only one empty line at end of file is expected.

--- /dev/null
+++ b/src/BinTools/BinTools_FormatVersion.hxx
@@ -0,0 +1,38 @@
+// Copyright (c) 2002-2020 OPEN CASCADE SAS
...
--- /dev/null
+++ b/src/TopTools/TopTools_FormatVersion.hxx
@@ -0,0 +1,32 @@
+// Copyright (c) 2002-2020 OPEN CASCADE SAS

It doesn't look like these files were created in '2002.

+  -version versnumber: a number of format version to save

Listing versions range and default version in command help would be helpful.

+inline void Storage_HeaderData::SetStorageVersion(const Standard_Integer aVersion)

It doesn't look like exported method could be inlined.
(0095215)
kgv   
2020-09-22 19:23   
It seems that test case has been lost for this patch.
(0095322)
git   
2020-09-25 15:09   
Branch CR31136_4 has been updated by asuraven.

SHA-1: 7867e0baab97b4252bc6de3a284f75e5ce702e50


Detailed log of new commits:

Author: asuraven
Date: Fri Sep 25 15:06:30 2020 +0300

    review fix

(0095325)
asuraven   
2020-09-25 15:25   
The another problems indicated by msv & kgv have been fixed.
Tests task started and now is in progress.
(0095328)
msv   
2020-09-25 16:00   
+ // Bin(Brep)Tools_ShapeSet::AddGeometry() call from Bin(Brep)Tools_ShapeSet::Add()

is called from

+ // that recursively down from complex to elementary shapes.

that processes shapes recursively from complex to elementary ones

+ // As a result, the TopAbs_FACE’s will be processed earlier than the TopAbs_EDGE’s.

Avoid using non-ascii characters.

+puts "=========="
+puts "31136_1"
+puts "=========="
+puts ""
+################################################################
+# Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
+################################################################

Move bug title from comments to the puts statement to leave it in the test log, like
puts "0031136: BinXCAF persistence loses normals from triangulation-only Faces"
(0095330)
msv   
2020-09-25 16:05   
+checkview -screenshot -3d -path ${imagedir}/${test_image_brep}.png
+vclear
+vclose ALL

Do not clear the view after test finish. It is useful to see the view after a test during interactive session.
(0095331)
msv   
2020-09-25 16:15   
+vinit v1/v1
...
+vinit v2/v2
...
+vinit v3/v3

Why don't you use the same v1 view name for each test?
(0095333)
git   
2020-09-25 16:36   
Branch CR31136_4 has been updated by asuraven.

SHA-1: 285bd4d8147f9189f32f511aafae88d1473fa50f


Detailed log of new commits:

Author: asuraven
Date: Fri Sep 25 16:38:54 2020 +0300

    # review fix 2

(0095334)
git   
2020-09-25 17:05   
Branch CR31136_4 has been updated by asuraven.

SHA-1: 72e2b12951806f3f4d2fdd59fd58e0b3e65244d5


Detailed log of new commits:

Author: asuraven
Date: Fri Sep 25 17:08:42 2020 +0300

    # fix 3

(0095424)
git   
2020-09-27 15:39   
Branch CR31136_4 has been deleted by asuraven.

SHA-1: 72e2b12951806f3f4d2fdd59fd58e0b3e65244d5
(0095425)
git   
2020-09-27 15:39   
Branch CR31136_4 has been created by asuraven.

SHA-1: 2b2ac9ceb1f2926654fbe66632241a21f7d18ea7


Detailed log of new commits:

Author: asuraven
Date: Fri Sep 25 16:38:54 2020 +0300

    # fix 2

Author: asuraven
Date: Thu Sep 17 14:16:44 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Add new optional -version parameter for save/binsave draw commands

Author: asuraven
Date: Fri Sep 25 15:06:30 2020 +0300

    review fix
(0095719)
git   
2020-10-05 11:18   
Branch CR31136_4 has been deleted by asuraven.

SHA-1: 2b2ac9ceb1f2926654fbe66632241a21f7d18ea7
(0095720)
git   
2020-10-05 11:18   
Branch CR31136_4 has been created by asuraven.

SHA-1: f4531ed911a9359e5a292ede5ff428a6ac695b16


Detailed log of new commits:

Author: asuraven
Date: Thu Sep 17 14:16:44 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Add new optional -version parameter for save/binsave draw commands
(0095728)
msv   
2020-10-05 15:04   
+puts "31136_1"
...
+puts "31136_2"
...
+puts "31136_1"

Please replace these lines with
puts "0031136: BinXCAF persistence loses normals from triangulation-only Faces"
(0096301)
git   
2020-10-27 13:47   
Branch CR31136_4 has been deleted by asuraven.

SHA-1: f4531ed911a9359e5a292ede5ff428a6ac695b16
(0096311)
git   
2020-10-27 18:41   
Branch CR31136_4 has been created by asuraven.

SHA-1: 3a42bb34d55d11236ebc095db37250afafda1d0a


Detailed log of new commits:

Author: asuraven
Date: Thu Sep 17 14:16:44 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Add new optional -version parameter for save/binsave draw commands
(0096335)
git   
2020-10-28 14:51   
Branch CR31136_4 has been updated by asuraven.

SHA-1: 839add9767a394717f150726714989d9d11bc07c


Detailed log of new commits:

Author: asuraven
Date: Wed Oct 28 14:54:45 2020 +0300

    fix Draw_SaveAndRestoreBase

(0096360)
git   
2020-10-29 11:41   
Branch CR31136_4 has been updated by asuraven.

SHA-1: a042906551226e246220f796208b0b9e57deac34


Detailed log of new commits:

Author: asuraven
Date: Thu Oct 29 11:45:08 2020 +0300

    temporary wavefront log

(0096410)
git   
2020-10-30 16:01   
Branch CR31136_4 has been updated by asuraven.

SHA-1: 45fb3f2a1a051c0fa906beee3239013a491529c6


Detailed log of new commits:

Author: asuraven
Date: Fri Oct 30 16:05:24 2020 +0300

    readobj log

(0096445)
git   
2020-11-02 12:50   
Branch CR31136_4 has been updated by asuraven.

SHA-1: 4b4465d6dc9c827fd2de470e0c7281c917f1bcc9


Detailed log of new commits:

Author: asuraven
Date: Mon Nov 2 12:50:20 2020 +0300

    add test log

(0096457)
git   
2020-11-02 14:02   
Branch CR31136_4 has been deleted by asuraven.

SHA-1: 4b4465d6dc9c827fd2de470e0c7281c917f1bcc9
(0096458)
git   
2020-11-02 14:02   
Branch CR31136_4 has been created by asuraven.

SHA-1: b58e52bce4a9056f0659d2809fa56e06c1f7ed50


Detailed log of new commits:

Author: asuraven
Date: Mon Nov 2 12:50:20 2020 +0300

    add test log

Author: asuraven
Date: Fri Oct 30 16:05:24 2020 +0300

    readobj log

Author: asuraven
Date: Thu Oct 29 11:45:08 2020 +0300

    temporary wavefront log

Author: asuraven
Date: Wed Oct 28 14:54:45 2020 +0300

    fix Draw_SaveAndRestoreBase

Author: asuraven
Date: Thu Sep 17 14:16:44 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Add new optional -version parameter for save/binsave draw commands
(0096479)
git   
2020-11-03 11:12   
Branch CR31136_4 has been deleted by asuraven.

SHA-1: b58e52bce4a9056f0659d2809fa56e06c1f7ed50
(0096480)
git   
2020-11-03 11:12   
Branch CR31136_4 has been created by asuraven.

SHA-1: 75e63b06c38ec1840521ae5cd21575e24644827b


Detailed log of new commits:

Author: asuraven
Date: Thu Sep 17 14:16:44 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Add new optional -version parameter for save/binsave draw commands
    * Change file path variable in wavefront function from char[100] to TCollection_AsciiString to prevent long file path problem
(0096483)
kgv   
2020-11-03 11:57   
 * Change file path variable in wavefront function from char[100] to TCollection_AsciiString to prevent 
long file path problem

This is unrelated to the bug - please register a dedicated issue and push related changes there.
(0096485)
git   
2020-11-03 12:11   
Branch CR31136_4 has been deleted by asuraven.

SHA-1: 75e63b06c38ec1840521ae5cd21575e24644827b
(0096486)
git   
2020-11-03 12:12   
Branch CR31136_4 has been created by asuraven.

SHA-1: f19de1e71b6656327d3780b1602b0243e80bf25a


Detailed log of new commits:

Author: asuraven
Date: Thu Sep 17 14:16:44 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Add new optional -version parameter for save/binsave draw commands
    * Change file path variable in wavefront function from char[100] to TCollection_AsciiString to prevent long file path problem
(0096495)
asuraven   
2020-11-03 14:53   
bug31136 Tests are OK:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31136_4-master-ASURAVEN/view/COMPARE/ [^]
No more warnings on Linux.
(0096498)
git   
2020-11-03 15:16   
Branch CR31136_4 has been deleted by asuraven.

SHA-1: f19de1e71b6656327d3780b1602b0243e80bf25a
(0096499)
git   
2020-11-03 15:16   
Branch CR31136_4 has been created by asuraven.

SHA-1: c6027ad43887e5e1a815f251e633341d14d233d3


Detailed log of new commits:

Author: asuraven
Date: Thu Sep 17 14:16:44 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Add new optional -version parameter for save/binsave draw commands
    * Change file path variable in wavefront function from char[100] to TCollection_AsciiString to prevent long file path problem
(0096501)
git   
2020-11-03 15:33   
Branch CR31136_4 has been deleted by asuraven.

SHA-1: c6027ad43887e5e1a815f251e633341d14d233d3
(0096502)
git   
2020-11-03 15:34   
Branch CR31136_4 has been created by asuraven.

SHA-1: 6cd4cb7540db4cc84c24d8a4cd4be9c9e0b2b09a


Detailed log of new commits:

Author: asuraven
Date: Thu Sep 17 14:16:44 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Add new optional -version parameter for save/binsave draw commands
(0096503)
asuraven   
2020-11-03 15:34   
kgv:
This is unrelated to the bug - please register a dedicated issue and push related changes there.

Kirill, the path variable lenght error prevented the bug31136 tests from running on Jenkins for Windows. We can't close 31136 issue without this change. I suggest not to separate this into a separate task to speed up the work
(0096504)
kgv   
2020-11-03 15:41   
(edited on: 2020-11-03 15:41)
> I suggest not to separate this into a separate task to speed up the work
Andrey, registering a trivial bugfix in scope of another issue should not slow down integration process.
In fact, many portions of your patch could be already in master if they would be put into separate issues.

(0096512)
git   
2020-11-03 17:42   
Branch CR31136_4 has been deleted by asuraven.

SHA-1: 6cd4cb7540db4cc84c24d8a4cd4be9c9e0b2b09a
(0096515)
git   
2020-11-03 17:50   
Branch CR31136_4 has been created by asuraven.

SHA-1: 0a9431cf218444bf02b58f8ca45b1650075d04d1


Detailed log of new commits:

Author: asuraven
Date: Thu Sep 17 14:16:44 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Add new optional -version parameter for save/binsave draw commands
(0096519)
git   
2020-11-03 18:12   
Branch CR31136_4 has been deleted by asuraven.

SHA-1: 0a9431cf218444bf02b58f8ca45b1650075d04d1
(0096520)
git   
2020-11-03 18:15   
Branch CR31136_4 has been created by asuraven.

SHA-1: 11be8e620d4878d4e126f51e7bfa7460fce98bdf


Detailed log of new commits:

Author: asuraven
Date: Thu Sep 17 14:16:44 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Add new optional -version parameter for save/binsave draw commands

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031908: Draw Harness, TKTopTest - wavefront file path length is limited to 100 characters
    
    * Change file path variable in wavefront function from char[100] to TCollection_AsciiString
(0096521)
git   
2020-11-03 18:17   
Branch CR31136_4 has been deleted by asuraven.

SHA-1: 11be8e620d4878d4e126f51e7bfa7460fce98bdf
(0096522)
git   
2020-11-03 18:17   
Branch CR31136_4 has been created by asuraven.

SHA-1: 9a55336146b17b508a7f3a04105ffe12bbcacbe3


Detailed log of new commits:

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Add new optional -version parameter for save/binsave draw commands
(0096531)
git   
2020-11-05 11:46   
Branch CR31136_4 has been deleted by asuraven.

SHA-1: 9a55336146b17b508a7f3a04105ffe12bbcacbe3
(0096532)
git   
2020-11-05 11:48   
Branch CR31136_4 has been created by asuraven.

SHA-1: 3965cca4cf88fce088f644c130b6e26be6e0aeb8


Detailed log of new commits:

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Add new optional -version parameter for save/binsave draw commands
(0096550)
msv   
2020-11-05 15:57   
For integration:
occt - CR31136_4
products - none
(0096693)
git   
2020-11-12 11:24   
Branch CR31136_4 has been updated by kgv.

SHA-1: 839d9d82b58760b41936c7c5351fa0cacfec0ddc


Detailed log of new commits:

Author: kgv
Date: Thu Nov 12 11:24:16 2020 +0300

    # fix compatibility with old compilers

(0096718)
git   
2020-11-12 16:20   
Branch CR31136_5 has been created by kgv.

SHA-1: 8be29599f539c932b04dbb02d89866ce651d6468


Detailed log of new commits:

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    * Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    * Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)
    * Add new optional -version parameter for save/binsave draw commands

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031908: Draw Harness, TKTopTest - wavefront file path length is limited to 100 characters
    
    * Change file path variable in wavefront function from char[100] to TCollection_AsciiString
(0096779)
kgv   
2020-11-15 13:10   
Andrey,

> * Add new optional -version parameter for save/binsave draw commands
I can see that commands save/binsave have been extended with version parameter.
But cannot find anything related to saving into XBF document (XSave command, test cases checking that saving into old/new version works as expected)...

How it is supposed to save an XBF document compatible with old OCCT?
Without such option (also available in Draw Harness) the patch cannot be integrated to OCCT.
(0096786)
msv   
2020-11-16 11:36   
Kirill, is it really necessary to have ability to save in old format? Up to now, each update of version of OCAF persistence was done without such compatibility.
(0096789)
abv   
2020-11-16 12:20   
Compatibility is important, and we need to understand clearly what possible implications on compatibility this change can produce.

Andrey, can you please describe the logic of using different versions of the format?

I see that currently plain "save" of the box shape generates BREP file with version V1. This means that V2 is generated in some specific cases, is it? How V3 will be applied?
(0096790)
kgv   
2020-11-16 12:25   
(edited on: 2020-11-16 12:26)
Mikhail,

format version bumps always caused compatibility issues and headache to OCCT-based applications in the past.
Although we have ignored such a problem in the past, it is not necessary to be done in the same in future.

In this case XBF format changes are caused not by fundamental OCAF changes but rather by local tool which maintains different versions anyway.

Moreover, current modification gives a small value to majority of applications, as most scenarios define exact geometry, which can be written lossless in previous version of format.

Thus, in my opinion we should give application a way for writing XBF file with geometry in previous version of format for compatibility with older OCCT releases (in fact, this might be even better making a DEFAULT, until we integrate some other breaking compatibility improvements to XBF or OCAF).

We should also check how old OCCT versions read new XBF files to ensure that user will see a meaningful message, and might need making some provisional changes for better reporting / clearer versioning in XBF format. As far as I understand, for now XBF format does not define any version at all - there is only a general OCAF version and B-Rep format version.

(0096835)
asuraven   
2020-11-17 16:28   
> How it is supposed to save an XBF document compatible with old OCCT?
Kirill, a "-version" option now added only for save/binsave commands.
In which other DRAW commands do I need to add this option? Save, SaveAs, XSave?
Should I do it as part of this issue or create a new one?

> Andrey, can you please describe the logic of using different versions of the format?
> I see that currently plain "save" of the box shape generates BREP file with version V1.
> This means that V2 is generated in some specific cases, is it? How V3 will be applied?
Andrey, I could not find out why V2 was created. This change was made a long time ago (about 20 years):
http://svn.nnov.opencascade.com/websvn/revision.php?repname=occt&path=%2Ftrunk%2Fsrc%2FBRepTools%2FBRepTools_ShapeSet.cxx&rev=5953&peg=8617 [^]
In this issue V3 format includes changes of V2 version. If it is wrong, what behavior should I implement?
(0096849)
git   
2020-11-17 20:54   
Branch CR31136_6 has been created by kgv.

SHA-1: 4789201394dacbe4e0326ce43bd953386d4c1b4e


Detailed log of new commits:

Author: kgv
Date: Tue Nov 17 20:37:01 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    Versions of formats have been changed (11 for BinOCAF, 10 for XmlOCAF, 4 for BRep Shape and 3 for Binary BRep Shape)

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031946: Modeling Data - replace version numbers with enumerations in TopTools and BinTools
    
    Added enumerations BinLDrivers_FormatVersion, BinTools_FormatVersion, TopTools_FormatVersion
    and XmlLDrivers_FormatVersion for more clear version tracking in the code.
    
    Add new optional -version parameter for save/binsave draw commands.
(0096851)
kgv   
2020-11-17 20:59   
Andrey (@asuraven), I have moved the patch adding version enumerations and extending "save" and "binsave" commands with -version parameter to dedicated patch 0031136. Version enumerations have been corrected to start with enum name, confusing "DEFAULT" items equal to "0" have been removed.

Apparently, patch for "binsave" is incomplete or has been broken at some step - version parameter is parsed but ignored. Could you please finalize that patch first?
(0096852)
git   
2020-11-17 21:01   
Branch CR31136_6 has been updated forcibly by kgv.

SHA-1: d1887417a11e761e7f3472717df57458ab99b7a4
(0096853)
git   
2020-11-17 21:03   
Branch CR31136_6 has been updated forcibly by kgv.

SHA-1: ab40dd9ebfada3f9a420a204c35ec085ef9323db
(0096857)
kgv   
2020-11-18 00:59   
(edited on: 2020-11-18 01:02)
Andrey (@asuraven),

> In which other DRAW commands do I need to add this option? Save, SaveAs, XSave?
The interface for setting format version to XML persistence has been introduced by #0028691.
Note that it looks like your current patch breaks this feature as XML driver sets shape format to new version unconditionally (I've put a TODO there in latest branch).

There is a command SetStorageVersion, but currently it operates only with XmlLDrivers, which doesn't look provisional - see also remarks to this interface within bug 0029217, which are desired to be taken into account to handle also BinLDrivers.

There is no need to support writing any version of BinLDrivers, so far backward-compatible export efforts could be started with this format version bump. It is necessary to handle this in scope of this bug (some preparations might be moved to another prerequisite patch, if found useful).

(0097003)
abv   
2020-11-23 09:36   
I propose we shall first elaborate and describe some consistent approach to versioning of data formats.

- what versions of formats are known for each format, how they correlate with OCCT versions?
- how they are combined for composite data formats (e.g. I guess that BREP V2 is used in XML persistence only, in some recent versions -- is that?)
- are different format versions forward and / or backward compatible, to what extent?
- how they can be managed in an understandable way?
(0097618)
git   
2020-12-15 19:05   
Branch CR31136_7 has been created by asuraven.

SHA-1: ce8e4ab118bb7f685586a40c9aed6756d4c08522


Detailed log of new commits:

Author: asuraven
Date: Tue Nov 17 20:37:01 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    Versions of formats have been changed (11 for TDocStd, 4 for BRep Shape and 3 for Binary BRep Shape)
(0097688)
git   
2020-12-17 15:50   
Branch CR31136_7 has been deleted by asuraven.

SHA-1: ce8e4ab118bb7f685586a40c9aed6756d4c08522
(0097689)
git   
2020-12-17 15:50   
Branch CR31136_7 has been created by asuraven.

SHA-1: 55c69dc363020f41a41884bbf1dc196808632173


Detailed log of new commits:

Author: asuraven
Date: Tue Nov 17 20:37:01 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    Versions of formats have been changed (11 for TDocStd, 4 for BRep Shape and 3 for Binary BRep Shape)
(0097719)
asuraven   
2020-12-18 15:57   
Tests results: http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31136_7-master-ASURAVEN/view/COMPARE/ [^]
(0097845)
git   
2020-12-21 19:10   
Branch CR31136_7 has been deleted by asuraven.

SHA-1: 55c69dc363020f41a41884bbf1dc196808632173
(0097846)
git   
2020-12-21 19:10   
Branch CR31136_7 has been created by asuraven.

SHA-1: a307ee7746a84c28ea05f39044658d5026995c0f


Detailed log of new commits:

Author: asuraven
Date: Tue Nov 17 20:37:01 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    Versions of formats have been changed (11 for TDocStd, 4 for BRep Shape and 3 for Binary BRep Shape)
(0097850)
kgv   
2020-12-21 21:07   
(edited on: 2020-12-21 21:11)
Please proceed remarks.

- Tools should provide an option writing Normals even when they can be restored from surface (as performance optimization).
- BinXCaf/XmlXCaf should write shapes in new persistence formats (TopTools_FormatVersion/BinTools_FormatVersion) only for new TDocStd_FormatVersion versions.
- Command "StoreTriangulation" should be also extended to propagate new withNormals option to BinXCaf/XmlXCaf drivers with new test case.

(0098055)
git   
2021-01-11 13:14   
Branch CR31136_7 has been updated by asuraven.

SHA-1: bac94083edd9ad86c81c859435da067bd42111e9


Detailed log of new commits:

Author: asuraven
Date: Mon Jan 11 13:14:51 2021 +0300

    * BRepTools::Write() theWithNormals parameter added
    * BRepTools_ShapeSet:
      - constructor theWithNormals parameter added
      - IsWithNormals()/SetWithNormals() function added
    * BinLDrivers_DocumentSection: theDocFormatVersion parameter added to WriteTOC()/Write()/ReadTOC() functions
    * BinLDrivers_DocumentStorageDriver::WriteShapeSection() theDocVer parameter added
    * BinMNaming_NamedShapeDriver::WriteShapeSection() theDocVer parameter added
    * BinTools_ShapeSet/TopTools_ShapeSet THE_ASCII_VERSIONS arrays created
    * BinTools_FormatVersion/TopTools_FormatVersion/TDocStd_FormatVersion LOWER/UPPER enums added

(0098057)
git   
2021-01-11 13:19   
Branch CR31136_7 has been deleted by asuraven.

SHA-1: bac94083edd9ad86c81c859435da067bd42111e9
(0098058)
git   
2021-01-11 13:19   
Branch CR31136_7 has been created by asuraven.

SHA-1: 5f7a038ada261848839c172d57e69c7a1991d32f


Detailed log of new commits:

Author: asuraven
Date: Mon Jan 11 13:14:51 2021 +0300

    Additional changes:
    
    * BRepTools::Write() theWithNormals parameter added
    * BRepTools_ShapeSet:
      - constructor theWithNormals parameter added
      - IsWithNormals()/SetWithNormals() function added
    * BinLDrivers_DocumentSection: theDocFormatVersion parameter added to WriteTOC()/Write()/ReadTOC() functions
    * BinLDrivers_DocumentStorageDriver::WriteShapeSection() theDocVer parameter added
    * BinMNaming_NamedShapeDriver::WriteShapeSection() theDocVer parameter added
    * BinTools_ShapeSet/TopTools_ShapeSet THE_ASCII_VERSIONS arrays created
    * BinTools_FormatVersion/TopTools_FormatVersion/TDocStd_FormatVersion LOWER/UPPER enums added

Author: asuraven
Date: Tue Nov 17 20:37:01 2020 +0300

    0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
    
    Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
    Versions of formats have been changed (11 for TDocStd, 4 for BRep Shape and 3 for Binary BRep Shape)
(0098126)
asuraven   
2021-01-14 18:26   
Test results for cumulative branch CR31136_8
 http://jenkins-test-12.nnov.opencascade.com/view/CR31136_8-master-ASURAVEN/view/COMPARE/ [^]
You can see also sequential new commints in branch CR31136_7
(0098129)
kgv   
2021-01-15 10:41   
-  myFormatNb (BinTools_FormatVersion_VERSION_1)
..
-  myShapeSet.SetFormatNb(myFormatNb);
+  if (theDocVer >= TDocStd_FormatVersion_VERSION_11)
+  {
+    myShapeSet.SetFormatNb(BinTools_FormatVersion_VERSION_4);

Please remove no more used class field BinMNaming_NamedShapeDriver::myFormatNb.

-  \<version\> = ("CASCADE Topology V1, (c)  Matra-Datavision" | "CASCADE Topology 
V2, (c) Matra-Datavision")\<_\\n\>;
+  \<version\> = ("CASCADE Topology V1, (c)  Matra-Datavision" | "CASCADE Topology 
V2, (c) Matra-Datavision" | "Open CASCADE Topology V3 (c)")\<_\\n\>;

Please update documentation to match source code.

-BinTools_ShapeSet::BinTools_ShapeSet (const Standard_Boolean theWithTriangles)
+BinTools_ShapeSet::BinTools_ShapeSet (const Standard_Boolean theWithTriangles,
+                                      const Standard_Boolean theWithNormals)

There is no much use in extending this class constructor, I propose keeping it the same (consider that we will add 10 more flags to the class in future, which would make class constructor argument list unreadable).
Calling BinTools_ShapeSet::SetWithNormals() and BinTools_ShapeSet::SetWithTriangles() will make code cleaner - just need to document default values of these properties in empty constructor.

+                                       //!< * BIN, XML: TopTools_FormatVersion_CURRENT changed 3 
and 

...changed _to_ 3...

+                                       //!< BinTools_FormatVersion_CURRENT changed to 4 to Stores 
per-vertex normal 

...to preserver per-vertex normal ...

+  "Open CASCADE Topology V4, (c) Open CASCADE"

(c) Open Cascade
(0098135)
asuraven   
2021-01-15 14:59   
Remarks fixed.
New tests results: http://jenkins-test-12.nnov.opencascade.com/view/CR31136_8-master-ASURAVEN/view/COMPARE/ [^]





View Issue Details
31798 [Open CASCADE] OCCT:Visualization minor have not tried 2020-09-27 12:31 2021-01-15 12:23
kgv  
age  
normal  
assigned 7.4.0  
open  
none    
none  
  7.6.0*  
Visualization, SelectMgr_ViewerSelector - fix comparing depth of direct and indirect triangle hits
Currently, SelectMgr_ViewerSelector sorts picking results basing on a depth along the ray (direct hit) or distance from eye to the closest point within the picking tolerance (indirect hit). In some cases, depth to indirect hit of a surface behind might become closer than distance to direct hit of a surface in front, leading to awkward picking results.

It is proposed to compute the smallest depth always considering picking tolerance, while keeping direct hit as result 3D point.

In addition, it might be reasonable allowing a 0 tolerance for triangulation sensitivities. In this case, selection volume will be implicitly upscaled to 1px, but indirect picking results will be rejected (only direct hits allowed).
pload MODELING VISUALIZATION
box b1 0 0 0 100  90 1
box b2 0 0 1 100 100 1
vinit View1
vdisplay -dispMode 1 b1
vdisplay -dispMode 1 b2 -highmode 1
vsetcolor b1 RED4
vsetcolor b2 GREEN4
vfit
vselprops -pixTol 10

vselprops -pixTol 100


vselprops -pixTol 2
vselprops -depthTol uniformpx 0.1
vviewparams -scale 2.28866 -proj 0.57735 -0.57735 0.57735 -up -0.408248 0.408248 0.816497 -at 24.7467 
48.7768 25.0301
vmoveto 220 231
vstate -entities
occt_pick_surf_behind.png (38,761) 2020-09-27 12:31
https://tracker.dev.opencascade.org/
occt_pick_vert_behind.png (53,132) 2020-09-27 12:31
https://tracker.dev.opencascade.org/
0031798.png (26,910) 2020-11-17 08:32
https://tracker.dev.opencascade.org/
0031798_1.png (209,461) 2020-11-17 08:32
https://tracker.dev.opencascade.org/
Engine V Twin Revision 02 Simplified.step (972,035) 2020-11-17 08:41
https://tracker.dev.opencascade.org/
Detection_KO.png (8,340) 2021-01-15 12:21
https://tracker.dev.opencascade.org/
Detection_OK.png (13,023) 2021-01-15 12:21
https://tracker.dev.opencascade.org/
Notes
(0095357)
git   
2020-09-27 12:39   
Branch CR31798_1 has been created by kgv.

SHA-1: b9513dc178fc229cd8398901920e3b1b54460d8f


Detailed log of new commits:

Author: kgv
Date: Sun Sep 27 12:42:10 2020 +0300

    0031798: Visualization, SelectMgr_ViewerSelector - fix comparing depth of direct and indirect triangle hits
    
    SelectMgr_RectangularFrustum now stores also a distance from picking Ray within SelectBasics_PickResult
    to better prioritize results and prefer entities closer to ray.
(0096807)
git   
2020-11-17 08:31   
Branch CR31798_2 has been created by age.

SHA-1: 6367fbdb3c085e3f9c82ea1aafedbedb6755678b


Detailed log of new commits:

Author: age
Date: Mon Nov 16 14:53:07 2020 +0300

    0031798: Visualization, SelectMgr_ViewerSelector - fix comparing depth of direct and indirect triangle hits
(0096808)
age   
2020-11-17 08:40   
In the branch CR31798_2 a new algorithm of depth calculation for triangles was implemented, It computes the nearest distance between projected on the triangle plane camera eye and intersected area of triangle and camera frustum. In most cases it works correctly but when the camera frustum is bigger than triangle (as in attached image 0031798.png) it gives incorrect result.
(0098130)
osa   
2021-01-15 12:20   
(edited on: 2021-01-15 12:21)
Algorithm implemented in branch CR31798_2 has better results in some cases. But on for "zoomed-out" objects there are incorrect results of detection even for big triangles.
Use the next steps to reproduce:

pload MODELING VISUALIZATION
box b1 0 0 0 100 90 1
box b2 0 0 1 100 100 1
vinit View1
vdisplay -dispMode 1 b1
vdisplay -dispMode 1 b2 -highmode 1
vaspects b1 -drawEdges 1
vaspects b2 -drawEdges 1
vsetcolor b1 RED4
vsetcolor b2 GREEN4
vfit
vselprops -pixTol 10

See results on different zoom - Detection_OK.png and Detection_KO.png






View Issue Details
28026 [Open CASCADE] OCCT:Modeling Data minor have not tried 2016-10-28 15:03 2021-01-15 08:27
kgv Windows  
akaftasev VC++ 2015  
normal 64 bit  
assigned 6.9.0  
open  
none    
none  
  7.6.0*  
bugs moddata_3 bug28026
Modeling Data - BRepTools::Clean() does not clean all triangulation from shape
It seems that in some cases BRepTools::Clean() does not clean all triangulation defined in the attached shape Ball.brep.

Ball.brep:
> PolygonOnTriangulations 53
> Triangulations 24

This is regression since OCCT 6.9.0 release.
pload MODELING
restore Ball.brep b
trinfo
# shows no triangulation, but it is there

tcopy b b2
save b2 b2.brep
# file does not contain triangulation (150 KB)

tclean b
save b b3.brep
# file still saved with triangulation (2 MB)
Ball.brep (2,319,146) 2016-10-28 15:03
https://tracker.dev.opencascade.org/
bug28026 (943) 2017-09-29 12:33
https://tracker.dev.opencascade.org/
25479_descr.PNG (20,027) 2020-12-01 12:59
https://tracker.dev.opencascade.org/
Notes
(0069873)
apv   
2017-08-25 13:59   
Problem described in issue is reproduced on current state of OCCT.
(0070819)
msv   
2017-09-25 12:41   
The default behavior of BRepTools::Clean() cannot be changed back without regression. It is because the method does not have access to all shapes that may share the same edges with the input shape. So, in order not to destruct possible other shapes in the current session it must not clean polygons of triangulations not related to faces of the current shape.
However, in order to have possibility to get rid of redundant polygons we shall add the optional Boolean flag to the method that will force removal.
The command tclean will be also extended with this optional flag.
(0070974)
apv   
2017-09-29 12:33   
Test scenario has been added
(0097112)
git   
2020-11-27 18:08   
Branch CR28026 has been created by akaftasev.

SHA-1: b63ca17625969689a692618121005e1d38b72263


Detailed log of new commits:

Author: akaftasev
Date: Fri Nov 27 18:07:39 2020 +0300

    0028026: Modeling Data - BRepTools::Clean() does not clean all triangulation from shape
    
    Added flag for force clean triangulation and treatment for it
(0097173)
git   
2020-11-30 16:05   
Branch CR28026 has been updated forcibly by akaftasev.

SHA-1: cc9f55ee813430de0a2991dcc367c140e6eef826
(0097183)
emv   
2020-12-01 10:32   
src/BRepTools/BRepTools.hxx
 - Why two Clean methods instead of one with default parameter?
 - Use const Standard_Boolean for similarity
 - Please give a meaningful name to the flag
 - The description of the method says:
   //! In case polygonal representation is the only available representation
   //! for the shape (shape does not have geometry) it is not removed.
   Will the new flag forcibly remove the only available representation?
   If so, please make it clear in the description.
   
src/BRepTools/BRepTools.cxx
 - It seems in force mode the 3D polygons of edges are not removed, only polygon on triangulation.

tests/bugs/moddata_3/bug28026
 - remove # source c:/repKaf/CR28026/bug28026
 - save tmp files into $imagedir/${casename}_b*.brep
 - replace "ERROR: OCC28026 is reproduced. The command" with "Error - the command ..."
(0097187)
kgv   
2020-12-01 11:13   
Method description states:
 151   //! Removes all cached polygonal representation of the shape,
 152   //! i.e. the triangulations of the faces of <S> and polygons on
 153   //! triangulations and polygons 3d of the edges.

therefore polygon-on-triangulation are expected to be cleared without any extra flags.

I may expect that enabling added code snippet would cause a regression for #0025479 use case.
(0097190)
emv   
2020-12-01 11:30   
(edited on: 2020-12-01 11:47)
>I may expect that enabling added code snippet would cause a regression for
#0025479 use case.
Yes, I guess so. Without force flag there should not be any change in 25479.

>therefore polygon-on-triangulation are expected to be cleared without any extra flags.
What are you proposing? Always clearing all polygons on triangulation or just changing the method description?

(0097193)
kgv   
2020-12-01 12:01   
(edited on: 2020-12-01 12:02)
My proposal is to understand why #0025479 causes regression and try to propose a solution which would handle both cases as expected.

So that as first step it is necessary to understand what #0025479 is supposed to fix (e.g. - was it intended to never clean polygon-on-triangulation, which would sounds strange, or something else?) and why it causes misbehavior in some cases (I guess not in every case).

(0097194)
emv   
2020-12-01 12:17   
I guess the initial version cleaned all polygons on triangulation, and version from #25479 cleans only those polygons built on the face contained in the given shape.
In my opinion, we cannot guess the user's intention for mesh removal, and should provide meaningful options so the user should decide which data to remove.

Same goes for CleanGeometry method - I guess after geometry removal, some edges may still have CurveOnSurface representations.
(0097195)
kgv   
2020-12-01 12:25   
(edited on: 2020-12-01 12:25)
> ...version from 0025479 cleans only those polygons built
> on the face contained in the given shape.
I have the same understanding - but within the given scenario, the whole shape is passed to BRepTools::Clean(), not some sub-shape! Hence, it looks like a bug in the logic introduced by #0025479.

> In my opinion, we cannot guess the user's intention for mesh removal,
> and should provide meaningful options so the user should decide
> which data to remove.
I agree that BRepTools::Clean() should provide an option clearing all polygonal representations without skipping potentially shared instances, as it was done before #0025479. But from my understanding this could be another issue on Bugtracker.

(0097197)
emv   
2020-12-01 12:51   
I don't have access to #0025479, but in the test case I see only the following call:
tclean a_2
tricheck a_1

So, it means not the whole shape is cleaned.

Why creating another issue if it is already done in frames of this one?
(0097198)
kgv   
2020-12-01 12:58   
> ...but in the test case I see only the following call
This issue is for another use case clearing the whole shape
> restore Ball.brep b
> tclean b

By the way, I would expect first expanding trinfo output (with new arguments?) or finding another command that would print information about polygonal representation of curves without saving shape to file for making test case simpler.

> Why creating another issue if it is already done in frames of this one?
No problem implementing this in scope of this issue - but current patch only implements this new flag.
(0097199)
msv   
2020-12-01 13:01   
I have attached the screenshot of summary and description of 0025479 for clarity.
(0097200)
emv   
2020-12-01 13:40   
> This issue is for another use case clearing the whole shape.
How would you know in the algorithm if it was given the whole shape or just a small part of it?

> I would expect first expanding trinfo output
I agree.

> but current patch only implements this new flag.
It seems the other flags are not needed. Except, may be, for the case when there is no geometry in edge/face. May be it would be helpful to introduce an additional flag for this case, so the user may explicitly specify whether to clean triangulation or not. What do you think?
(0097201)
msv   
2020-12-01 14:11   
In my opinion, the method Clean() must not make the given shape invalid. In this regard, the current version of the patch is dangerous. With the force flag it removes all triangulations regardless of face has or not a geometry. My vision is that the flag 'force' must act only as a permission to clean all polygons of edges, except for polygons that are needed for representation of faces of the given shape having only triangulation.

In addition, it is needed to allow removing polygons of edges that belong to the faces without triangulation. In the master version there is such code:
    if (aTriangulation.IsNull())
      continue;

It is needed to change this so that to allow removing polygons anyway.

I think it is better to add a flag (and name it "theForce") with default value false instead of creating a new overloaded method. It is needed to clearly explain its meaning that it permits removing all polygons that are not relevant to triangulations of belonging to the given shape faces.
(0097202)
msv   
2020-12-01 14:16   
>Same goes for CleanGeometry method - I guess after geometry
>removal, some edges may still have CurveOnSurface representations.
I support the idea to make the same behavior in the method CleanGeometry.
(0097203)
msv   
2020-12-01 14:21   
The command tclean must be implemented so that the order of options would be meaningless.

I propose the following description of the option -force:
-force : force delete all representations not relevant to the given shape
(0097204)
msv   
2020-12-01 14:23   
catch {exec rm $Ver_1FileName}
catch {exec rm $Ver_2FileName}

Do not use external command to remove a file. Use the tcl command 'file ...'
(0097205)
msv   
2020-12-01 14:26   
Instead of saving and comparing file size you may compare the length of the output of the command 'dump'.
(0097206)
kgv   
2020-12-01 14:28   
(edited on: 2020-12-01 14:30)
OK, I see now that my previous comments were actually floated away from use case described in this bug.

- #0025479 has modified BRepTools::Clean() so that now it removes Polygon-on-Triangulation representations of the TopoDS_Edge's only from Triangulations bound to TopoDS_Face's that are cleared by the same method call. E.g., BRepTools::Clean() will NOT clear Polygon-on-Triangulation while passing only TopoDS_Edge (and not TopoDS_Face containing this Edge) and it will NOT clear Polygon-on-Triangulation for triangulations of other TopoDS_Face's sharing the same Edge.
- 0027356 fixes the regression after #0025479 for removing 3d-polygon representations of free TopoDS_Edge (e.g. which do not have Polygon-on-Triangulation).
- I don't recall particular scenario where attached Ball.brep has appeared, but it has no Triangulations in TopoDS_Face but still has Polygon-on-Triangulation in Edges. As result, there is no way to remove these dead triangulations using BRepTools::Clean() implementing current behavior. In normal scenario, triangulating Ball.brep and calling BRepTools::Clean() will indeed remove Polygon-on-Triangulation as expected.
- #0029964 describes a similar use case, when TopoDS_Edge shape has been detached from TopoDS_Face with preserved Polygon-on-Triangulation representation. As result, there is no way to remove these dead triangulations using BRepTools::Clean().

Therefore, indeed, it looks like what we need is an option that would allow to eliminate "dead" representations from TopoDS_Edge using BRepTools::Clean() interface. Theoretically, BRepTools::Clean() might attempt to determine dead Triangulations no more attached to any TopoDS_Face, but I suppose this will be undesired overcomplication of the logic of this utility method.

One question could be discussed - if BRepTools::Clean() should clear all polygonal representations by default (restoring behavior before #0025479 and providing an option for new behavior) or to add a flag forcing such removal (as in current patch).

(0097207)
akaftasev   
2020-12-01 14:33   
> Instead of saving and comparing file size you may compare the length of the output of the command 'dump'.
It is another length of these files. For this reason was added variable "Tol" in test case.
(0097208)
emv   
2020-12-01 14:36   
Let's follow KGV's idea on extending trinfo output to check if polygons are really removed.
(0097209)
msv   
2020-12-01 14:41   
>One question could be discussed - if BRepTools::Clean() should
> clear all polygonal representations by default
I believe the method should by default make preference to not impact other shapes that may be present in the current process.
(0097210)
msv   
2020-12-01 14:42   
+1 for trinfo extension.

>It is another length of these files. For this reason was added
> variable "Tol" in test case.
You can use the tolerance to compare lengths of dumps as well.
(0097212)
akaftasev   
2020-12-01 14:52   
In this test:
  in original shape - 54 Locations;
  in "tcopy" shape - 42 Locations;
  in "tclean" shape - 28 Locations,
and I think, that this tolerance will be too big.
(0097213)
kgv   
2020-12-01 14:56   
>>One question could be discussed - if BRepTools::Clean() should
>> clear all polygonal representations by default
> I believe the method should by default make preference to not
> impact other shapes that may be present in the current process.
OK, lets stick to the new behavior introduced by #0025479 and add an option clearing all polygonal representations for shapes having geometry representation.
(0097214)
msv   
2020-12-01 15:29   
>and I think, that this tolerance will be too big.
OK, extend trinfo and use it for checking if cleaning was OK.
(0097233)
akaftasev   
2020-12-02 11:54   
(edited on: 2020-12-02 11:54)
As I undarstand, in addition to displaying the number of triangles and nodes, need to display number of segments of polygons on triangulation and segments of polygons 3D?

(0097308)
git   
2020-12-04 11:58   
Branch CR28026 has been updated forcibly by akaftasev.

SHA-1: f1063b6afa315f72e04c54ff8769160fb108672e
(0097588)
emv   
2020-12-14 17:59   
tests/bugs/moddata_3/bug28026
  after clean please check that polygonal representation is cleaned (tcopy may change its behavior one day)
  
src/MeshTest/MeshTest.cxx
  shape contains nb representations of what? Make it clear, e.g. shape contains nb polygons on triangulations.
  
src/DBRep/DBRep.cxx
  print help information if no enough arguments (di.PrintHelp(a[0]);)
  
src/BRepTools/BRepTools.hxx
  change comment to:
  //! theForce - allows removing all polygonal representations from the shape,
  //! including polygons on triangulations irrelevant for the faces of the given shape.
  //!
  //! In case polygonal representation is the only available representation
  //! for the shape (shape does not have geometry) it is not removed (even in the force mode).

src/BRepTools/BRepTools.cxx
  Why aShapeMap is only used in non-force mode?
  Polygon3d is still not removed in force mode. The point is that in force mode the block 842-859 should be applied additionally to removing polygons, not instead.
  Revert changes CleanGeometry method. The idea was to introduce similar force flag for this method, to force removal of irrelevant curves on surfaces (this should be done in a separate issue)
(0097865)
git   
2020-12-22 17:00   
Branch CR28026 has been updated forcibly by akaftasev.

SHA-1: 39b9b2cc53a88be4d526b04a5b0b0c80f3b10fb5
(0097866)
git   
2020-12-22 17:47   
Branch CR28026 has been updated forcibly by akaftasev.

SHA-1: 6b8529f94525b0bacf076713e013f147fb572c7c
(0097878)
kgv   
2020-12-23 11:22   
(edited on: 2020-12-23 11:22)
Andrey,

a new squashed branch (CR28026_1) is expected to be pushed for review.

(0097881)
git   
2020-12-23 13:39   
Branch CR28026_1 has been created by akaftasev.

SHA-1: b371e2ebe1f4318b9f4d3bdd198723a1c92268f4


Detailed log of new commits:

Author: akaftasev
Date: Fri Nov 27 18:07:39 2020 +0300

    0028026: Modeling Data - BRepTools::Clean() does not clean all triangulation from shape
    
    Added flag for force clean triangulation and treatment for it
    Command "trinfo" now show number of polygons on triangulation
(0097882)
kgv   
2020-12-23 14:11   
+      const Handle(BRep_TEdge)& aTE = *((Handle(BRep_TEdge)*) &anEdge.TShape());

It would be better using a static_cast<> instead of less safe C-cast.

+  //! theForce - allows removing all polygonal representations from the shape,

Please use @param [in] Doxygen tags.

+    di << "Syntax error: wrong usage of arguments: do not use 'force' and 'geom' flags together! 
";

Unexpected trailing space and exclamation sign.
(0097883)
git   
2020-12-23 16:20   
Branch CR28026_1 has been updated forcibly by akaftasev.

SHA-1: 8d864ee9cfef76a747b57eb9d90080e9324fe6ea
(0097884)
kgv   
2020-12-23 16:48   
-
+    .

Please discard unrelated empty spaces.

+  //! @param theForce  allows removing all polygonal representations from the shape,

This will generate a Doxygen warning that not all parameters are documented - please also add simple description @param theShape.

 406   for (Standard_Integer i = aStart; i < n; i++) {
 407     TopoDS_Shape S = DBRep::Get(a[i]);
 408     if (toRemoveGeometry)

While modifying the command, please improve handling of parameters and add NULL-checks:

TopoDS_Compound aCompound;
BRep_Builder().MakeCompound (aCompound);
for (Standard_Integer anArgIter = 1; anArgIter < n; ++anArgIter)
{
  if (strcmp (a[anArgIter], "-geom") == 0)
  { ... }
  else
  {
    TopoDS_Shape aShape = DBRep::Get (a[anArgIter]);
    if (aShape.IsNull{}) { syntax error: NULL shape }
    BRep_Builder().Add (aCompound, aShape);
  }
}
if (aCompound.NbChildren() == 0) { syntax error: wrong number of arguments }

Clean (aCompound);
(0097887)
git   
2020-12-24 11:12   
Branch CR28026_1 has been updated forcibly by akaftasev.

SHA-1: 37d88f563f54c74ddef1bc973e87dfa93c94dd03
(0097889)
git   
2020-12-24 12:07   
Branch CR28026 has been updated forcibly by akaftasev.

SHA-1: 9eaa63a78825ba65273c69c9b1dcd7992c1ae0cc
(0097893)
git   
2020-12-24 17:00   
Branch CR28026_1 has been updated forcibly by akaftasev.

SHA-1: 222ec2bf15f50bee1edce4f99a0e3d2e3b13af8b
(0097967)
emv   
2020-12-29 08:13   
src/BRepTools/BRepTools.hxx
Duplication of the string "In case polygonal representation ..." in the description

src/BRepTools/BRepTools.cxx
Add braces for the else statement:
        if (aCR->IsPolygonOnTriangulation())
        {
          aLCR.Remove(anIterCR);
        }
        else
          anIterCR.Next();


Put lines 861-863 before the force block:
    TopLoc_Location aLoc;
    Handle(Poly_Polygon3D) aPoly3d = BRep_Tool::Polygon3D(anEdge, aLoc);
    if (!aPoly3d.IsNull())
    {
      aBuilder.UpdateEdge(anEdge, aNullPoly3d);
    }
(0098056)
git   
2021-01-11 13:15   
Branch CR28026 has been updated forcibly by akaftasev.

SHA-1: 981fdf9c3134ebdbb975374b8fcc57f9ad749aad
(0098127)
emv   
2021-01-15 08:27   
CPU perf mesh bug30511: 14.328125 / 5.09375 [+181.29%]

Force option is not used in this case. What is the reason of such performance downgrade?





View Issue Details
31172 [Open CASCADE] OCCT:Modeling Algorithms minor have not tried 2019-11-17 23:19 2021-01-14 17:30
ssv Windows  
bugmaster VC++ 2013  
normal 64 bit  
reviewed 7.5.0  
open  
none    
none  
  7.6.0*  
Modeling Algorithms - Unexpected result of BRepTools::OuterWire()
The attached face contains three wires touching each other at vertices. As a result of BRepTools::OuterWire(), the incorrect wire is returned (the tool returns one of the circles instead of the outer contour).
The test case named bug31172
test-face.brep (2,916) 2019-11-17 23:19
https://tracker.dev.opencascade.org/
outer-wire-01.png (5,214) 2019-11-17 23:19
https://tracker.dev.opencascade.org/
Notes
(0089037)
ssv   
2019-11-17 23:31   
In BRepTools::OuterWire(), lines 620-623, there is an 'if' statement comparing double values like follows:

if ((umin <= UMin) &&
  (umax >= UMax) &&
  (vmin <= VMin) &&
  (vmax >= VMax)) ...

It is likely a good idea to use at least PConfusion() instead of naive equality checks which do not work for the provided test case.
(0094852)
msv   
2020-09-15 15:54   
Sergey (SZY), please consider this simple bug for fixing.
(0098110)
aavtamon   
2021-01-14 08:07   
Looks good.
http://jenkins-test-12.nnov.opencascade.com/view/CR31172-master-aavtamon/view/COMPARE/ [^]
(0098112)
msv   
2021-01-14 10:11   
Incorrect treatment of upper bounds. The correct code must look like this:
          if (((umin - UMin) <= Precision::PConfusion()) &&
              ((umax - UMax) >= -Precision::PConfusion()) &&
              ((vmin - VMin) <= Precision::PConfusion()) &&
              ((vmax - VMax) >= -Precision::PConfusion())) {
(0098115)
aavtamon   
2021-01-14 13:27   
Thank you for the remark, I have applied it.
The new test results:
http://jenkins-test-12.nnov.opencascade.com/view/CR31172-master-aavtamon/view/COMPARE/job/CR31172-master-aavtamon-OCCT-Debian80-64-opt-test-compare/ [^]
(0098116)
msv   
2021-01-14 13:47   
Too many differences in images. I see that you compared with the reference at OCCT-751dev. It is incorrect. You need to compare with the branch that is direct parent of yours.
(0098123)
aavtamon   
2021-01-14 17:09   
I retested the branch:
http://jenkins-test-12.nnov.opencascade.com/view/CR31172-master-aavtamon/view/COMPARE/ [^]
(0098125)
msv   
2021-01-14 17:30   
For integration:
occt - CR31172
products - none





View Issue Details
32056 [Open CASCADE] OCCT:Coding integration request have not tried 2021-01-14 09:50 2021-01-14 17:09
kgv  
bugmaster  
normal  
reviewed  
open  
none    
none  
  7.6.0*  
Coding Rules - remove package MMgt and other types deprecated since OCCT 7.2.0
MMgt_TShared has been deprecated since OCCT 7.2.0 (0028832) - it's time to remove the package.
N/A
Notes
(0098122)
kgv   
2021-01-14 17:07   
Please raise the patch
- OCCT: branch CR32056_1;
- OCC Products: branch CR32056_1.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR32056_1-CR32056_1-KGV [^]





View Issue Details
32057 [Open CASCADE] OCCT:Coding minor have not tried 2021-01-14 12:50 2021-01-14 14:09
bugmaster iOS  
bugmaster  
normal  
reviewed 7.5.0  
open  
none    
none  
  7.6.0*  
Coding Rules - eliminate CLang warning -Wunused-parameter when targeting iOS
Configuration:
arm64
http://jenkins-test-11.nnov.opencascade.com/view/master_master/view/OCCT%20compile/job/master_master-OCCT-MacOS-arm64-opt-compile/25/warnings10Result/ [^]
ios-sumulator
http://jenkins-test-11.nnov.opencascade.com/view/master_master/view/OCCT%20compile/job/master_master-OCCT-MacOS-ios-simulator-opt-compile/7/warnings10Result/ [^]

/OCCT_SRC/src/OpenGl/OpenGl_Context.cxx:774:74: warning: unused parameter 'theInterval' [-Wunused-parameter]

Standard_Boolean OpenGl_Context::SetSwapInterval (const Standard_Integer theInterval)
                                                                         ^
/OCCT_SRC/src/Cocoa/Cocoa_Window.mm:98:52: warning: unused parameter 'theTitle' [-Wunused-parameter]

Cocoa_Window::Cocoa_Window (const Standard_CString theTitle,
Notes
(0098119)
kgv   
2021-01-14 14:09   
Please check the patch in OCCT branch CR32057.





View Issue Details
32055 [Open CASCADE] OCCT:DRAW feature have not tried 2021-01-13 22:06 2021-01-14 09:50
kgv  
bugmaster  
normal  
reviewed  
open  
none    
none  
  7.6.0*  
Draw Harness, ViewerTest - add more vmanipulator position adjusting options
Currently vmanipulator has only option adjusting position to object center.
It is desired adding more options - adjusting position to object location transformation and to shape location.
N/A
Notes
(0098109)
kgv   
2021-01-14 07:41   
Patch is ready for review
- OCCT branch: CR32055_1.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR32055_1-master-KGV/ [^]
(0098111)
osa   
2021-01-14 09:50   
The patch was reviewed without remarks





View Issue Details
31704 [Open CASCADE] OCCT:Visualization feature have not tried 2020-08-11 09:39 2021-01-13 22:21
kgv  
mkrylova  
normal  
assigned  
open  
none    
none  
  7.6.0*  
Visualization - add an interactive object AIS_LightSource representing a light source
It is desired providing an interactive object representing a light source.
Minimal requirements to the object:
- Should be bound to Graphic3d_CLight;
- Represent the basic properties of light source:
   * Position via icon of positional light sources (point, spot),
   * Vector of directional light sources,
   * Spot light source cone shape,
   * Name,
   * Light color,
   * Light intensity,
   * On/off state,
   * Headlight mark,
   * Cut-off range (distance);
- Assigning Local Transformation to interactive object should move corresponding light source;
- Headlight flag should define transformation-persistence mode.
- Advanced selection modes:
   * Ability to turn light on/off.

Testing:
- vlight should be extended with an option creating/removing presentation of defined light sources.
- A representable scene should be defined for playing with multiple light sources of different type.
pload MODELING VISUALIZATION
vclear
vinit View1 -width 1280 -height 720
vviewcube vc
box r -2500 -2000 0 5000 4000 3000
explode r FACE
vdisplay -noupdate -dispMode 1 r_1 r_2 r_4 r_5 r_6
vsetmaterial -noupdate r_1 STONE
vsetmaterial -noupdate r_2 STONE
vsetmaterial -noupdate r_4 STONE
vsetmaterial -noupdate r_5 STONE
vsetmaterial -noupdate r_6 STONE
vfit
vtrihedron t 0 0 0

box b1 0 0 0 1000 1000 1000
psphere s1 500
vdisplay -noupdate -dispMode 1 b1 s1
vsetmaterial -noupdate b1 PLASTIC
vsetmaterial -noupdate s1 GOLD
vlocation b1 -location -2000 0   0
vlocation s1 -location  1500 500 500

vrenderparams -shadingModel PBR
#vrenderparams -shadingModel PHONG
vlight -clear
vlight -add AMBIENT -intensity 0.1

set pg {-1500 500 1500}
vlight -add POSITIONAL -intensity 1000000 -pos {*}$pg -color GREEN -constAtten 1 -linearAtten 0.01
#vlight -add POSITIONAL -intensity 1000000 -pos {*}$pg -color GREEN -range 1000 # KO range for Phong

vpoint pgp {*}$pg; vsetcolor pgp GREEN
psphere pgs 100; vdisplay -noupdate -dispMode 0 pgs; vlocation pgs -location {*}$pg; vsetcolor pgs GREEN


set sr {0 0 500}
vlight -add SPOT -intensity 100000000 -pos {*}$sr -dir 1 0 0 -color RED
vpoint srp {*}$sr; vsetcolor srp RED
vpoint srp2 [expr [lindex $sr 0] + 100] [lindex $sr 1] [lindex $sr 2]; vsegment srd srp srp2; vsetcolor 
srd RED; verase srp2

vlight -add SPOT -intensity 100000000 -pos 0 0 0 -dir 0 0.2 -1 -color WHITE -head 1
vlight -change 1 -name POSITIONAL_LIGHT 1
vlight -display
vmanipulator manipulator -attach Graphic3d_CLight_pos5
display_all.png (18,934) 2020-12-29 17:06
https://tracker.dev.opencascade.org/
manipulator.png (16,931) 2020-12-29 17:08
https://tracker.dev.opencascade.org/
head_light.png (43,089) 2020-12-29 17:14
https://tracker.dev.opencascade.org/
Notes
(0095600)
git   
2020-10-02 18:26   
Branch CR31704 has been created by mkrylova.

SHA-1: 449cb897fd43a804147007dceb93e3ee22622cfa


Detailed log of new commits:

Author: mkrylova
Date: Tue Sep 8 17:50:28 2020 +0300

    0031704: Visualization - add an interactive object AIS_LightSource representing a light source
    
    - Added new class AIS_LightSource - object representing a light source
    - Represented position, name, direction, Cut-off range and spot light source cone shape
    - Assigned Local Transformation to interactive object
    - Added an alternative function vlight, that manage the light by AIS_LightSource tools
(0095879)
git   
2020-10-09 19:03   
Branch CR31704 has been updated forcibly by mkrylova.

SHA-1: cec6ad406877f31bc45292c94fc5307e12457774
(0095880)
git   
2020-10-09 19:06   
Branch CR31704_1 has been created by mkrylova.

SHA-1: 43f03af5b8e1517a7dc485129b90fae304ae82da


Detailed log of new commits:

Author: mkrylova
Date: Tue Sep 8 17:50:28 2020 +0300

    0031704: Visualization - add an interactive object AIS_LightSource representing a light source
    
    - Added new class AIS_LightSource - object representing a light source
    - Represented position, name, direction, Cut-off range and spot light source cone shape
    - Assigned Local Transformation to interactive object
    - Added an alternative function vlight, that manage the light by AIS_LightSource tools
    - Added ability to turn on/off light interactively
    - Extended vlight_lightsource by opportunity to display light attributes
(0095885)
nds   
2020-10-12 12:34   
Dear Maria,

desired presentation!
But, how can you use class from AIS package in low-level V3d?

Best regards, Natalia
(0095980)
git   
2020-10-14 18:33   
Branch CR31704_1 has been updated by mkrylova.

SHA-1: 72b0666c5e2712df930500993cf28fa96d803b2d


Detailed log of new commits:

Author: mkrylova
Date: Wed Oct 14 17:41:34 2020 +0300

    krv remarks:
    - delete mentions of AIS_LightSource in V3d_View
    - delete a clone method of vlight
    - update method vlight with possibilities of presentation via AIS_LightSource tools
    - move all presentation to method Compute

(0095981)
git   
2020-10-14 18:38   
Branch CR31704_2 has been created by mkrylova.

SHA-1: 5ad480ce0af5a44b1570235dbe39c1f7ddd3f56a


Detailed log of new commits:

Author: mkrylova
Date: Tue Sep 8 17:50:28 2020 +0300

    0031704: Visualization - add an interactive object AIS_LightSource representing a light source
    
    - Added new class AIS_LightSource - object representing a light source
    - Represented position, name, direction, Cut-off range and spot light source cone shape
    - Assigned Local Transformation to interactive object
    - Updated function vlight with opportunities of presentation via AIS_LightSource tools
    - Added ability to turn on/off light intera
(0095982)
kgv   
2020-10-14 19:15   
+void AIS_LightSource::SetName (const TCollection_AsciiString& theName, Standard_Boolean theIsDisplay)

+{
+  myLightSource->SetName (theName);
+  isNameDisplayed = theIsDisplay;
+  // redisplay presentation
+  myCTXPtr->Display(this, Standard_True);
+  myCTXPtr->Redisplay(this, Standard_True);

This logic contradicts to AIS design - presentation itself is not supposed to redisplay itself on assigning some properties.

Use SetToUpdate() method to invalidate presentation and (re)display object outside (e.g. within vlight command, if needed).
(0095983)
kgv   
2020-10-14 19:17   
+  //! Alias for IsHeadlight().
+  Standard_Boolean Headlight() const { return myLightSource->Headlight(); }
+
+  //! Setup headlight flag.
+  void SetHeadlight (Standard_Boolean theValue) 
+  { 
+    myLightSource->SetHeadlight (theValue);
+  }

These is no point duplicating all Light properties within Interactive Object - it would be enough providing a getter to Light source itself.
(0095984)
kgv   
2020-10-14 19:19   
+      if (++anArgIt < theArgsNb)
+        if (Atof (theArgVec[anArgIt]) == 1)

Please never omit brackets within if statement.
(0096305)
git   
2020-10-27 17:32   
Branch CR31704_3 has been created by mkrylova.

SHA-1: c91df6ae54a18b45278e151f8a87bff72e249b0f


Detailed log of new commits:

Author: mkrylova
Date: Tue Sep 8 17:50:28 2020 +0300

    0031704: Visualization - add an interactive object AIS_LightSource representing a light source
    
    - Added new class AIS_LightSource - object representing a light source
    - Represented position, name, direction, Cut-off range and spot light source cone shape
    - Assigned Local Transformation to interactive object
    - Updated function vlight with opportunities of presentation via AIS_LightSource tools
    - Added ability to turn on/off light
    - Added Transformation-persistence mode
(0096323)
kgv   
2020-10-28 08:13   
Maria, could you please put a detailed textual description (as well as a couple of screenshors) of the current patch as a comment to this bug?
- Presentation aspects of each light source type;
- Implemented interaction mechanisms.

Please also put test cases for testing new functionality.
(0096336)
mkrylova   
2020-10-28 15:33   
This patch provides the opportunity for presentation of light sources. Presentation of directional light source consists of the name of light and a line that is co-directed with the light direction.
Presentation of positional light source is made of the name of light, position and three circles radius of which is equal to range of light.
Presentation of spot light consists of the name and position of light source, direction like in directional light presentation, 2 segments starting at the light source’s position, the length of which is equal to the range of light source. The angle between these segments is equal to the angle of the light source. The ends of these segments are connected by a third segment, which is the diameter of the circle, indicating the spot from the light source.
Similar presentation is used in light sources presentation with head light mark that activates transformation-persistence mode.
In addition, this patch extended function vlight. First, two new commands were added, they are –display and –del_pres, these commands add and delete presentations of light sources respectively. These commands without any arguments are applied to all the light sources, but the user can specify the light to which he wants to display/delete the presentation by adding the number of light as an argument to –display/-del_pres. Also, to show/hide a specific presentation element, new arguments were added to -name, -range, -pos, -dir, -angle commands. Now the user can put 1 or 0 after all the arguments describing the light source characteristic, if the user wants to display or hide this element accordingly. By default, the item is not displayed.
One more feature that is provided in this patch is the ability to turn on/off the specific light source interactively in Viewer3d by clicking on its position.
To manage the light source interactively a user can use vmanipulator command. To attach light source to manipulator use the light source id that is specified in the vlight command.
(0096339)
git   
2020-10-28 16:46   
Branch CR31704_3 has been updated by mkrylova.

SHA-1: 14f3ac93de797bcff084ca9f750d8aa9cde9e1fb


Detailed log of new commits:

Author: mkrylova
Date: Wed Oct 28 16:51:09 2020 +0300

    - fix code style mistakes
    - fix transformation for directional light sources

(0096372)
git   
2020-10-29 15:47   
Branch CR31704_3 has been updated by mkrylova.

SHA-1: ccb542c25a688aa9e7875b019d98379c62ab005c


Detailed log of new commits:

Author: mkrylova
Date: Thu Oct 29 15:51:58 2020 +0300

    - added comments
    - fixed displaying mistakes
    - fixed code style

(0096375)
git   
2020-10-29 15:48   
Branch CR31704_4 has been created by mkrylova.

SHA-1: 05aef6c35868126415104ff8fec707e37afae5a1


Detailed log of new commits:

Author: mkrylova
Date: Tue Sep 8 17:50:28 2020 +0300

    0031704: Visualization - add an interactive object AIS_LightSource representing a light source
    
    - Added new class AIS_LightSource - object representing a light source
    - Represented position, name, direction, Cut-off range and spot light source cone shape
    - Assigned Local Transformation to interactive object
    - Updated function vlight with opportunities of presentation via AIS_LightSource tools
    - Added ability to turn on/off light
    - Added Transformation-persistence mode
(0096434)
osa   
2020-11-02 09:39   
+ Graphic3d_TMF_CameraFullPers = Graphic3d_TMF_ZoomRotatePers
+ | Graphic3d_TMF_CameraPers, //!< object is in front of the camera and doesn't resize and rotate

Unexpected comma at the end of last enum item.
(0096435)
osa   
2020-11-02 09:44   
(edited on: 2020-11-02 10:23)
if ((!IsZoomOrRotate (theMode)) && (theMode != Graphic3d_TMF_None))
Redundant parentheses.

(0096436)
osa   
2020-11-02 10:08   
(edited on: 2020-11-02 10:24)
+class AIS_LightSource : public AIS_InteractiveObject
+{
+ //! constructors
=> //! Constructors

+ //! light properties
=> //! Light properties

+ //! Setup headlight flag.
+ //! Setup location of positional/spot light. theIsDisplay - should the position be displayed (Standard_True by default).
+ //! Setup location of positional/spot light. theIsDisplay - should the position be displayed (Standard_True by default).
=> Use "Sets".

+ if (theValue)
+ {
+ SetTransformPersistence(new Graphic3d_TransformPers(Graphic3d_TMF_CameraFullPers, myLightSource->Position()));
+ }
+ else
+ {
+ SetTransformPersistence(new Graphic3d_TransformPers(Graphic3d_TMF_None, gp_Pnt(0., 0., 0.)));
+ }
Add one space before parenthesis.

+ //! Angle in radians of the cone created by the spot, should be within range (0.0, M_PI). theIsDisplay - should the position be displayed (Standard_True by default).
=> "Sets angle"

+ //! Delete all displayed attributes from Viewer.
=> "Deletes"

+ //! Show all attributes of lights in Viewer.
=> "Shows"

+ //! Return bounding box.
=> "Returns"

+ Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, const Standard_Integer /*aMode*/) Standard_OVERRIDE;
+
+ Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePresentationManager*/, const Handle(Prs3d_Presentation)& thePresentation, const Standard_Integer theMode) Standard_OVERRIDE;
Add comments.

+ Standard_Boolean isNameDisplayed;
+ Standard_Boolean isPositionDisplayed;
+ Standard_Boolean isDirectionDisplayed;
+ Standard_Boolean isConeShapeDisplayed;
+ Standard_Boolean isRangeDisplayed;
=>myIs...
Move these fields to the end of all class fields.

+ myDirectionBeforeTransformation(0.0f, 0.0f, 0.0f, 0.0f),
Vec4 is zero vector by default

+ //! Initializes the light source.
+ Standard_EXPORT AIS_LightSource (Graphic3d_TypeOfLightSource theType, Handle(AIS_InteractiveContext) theContext);
+
+ //! Initializes the light source by copying Graphic3d_CLight settings.
+ Standard_EXPORT AIS_LightSource (const Handle(Graphic3d_CLight) & theLightSource, Handle(AIS_InteractiveContext) theContext);
=> const Handle(AIS_InteractiveContext)& theContext
But it is better to use base SetContext() method.

+ myCTXPtr = &*theContext;
myCTXPtr = theCtx.get();

(0096437)
osa   
2020-11-02 10:15   
+ myDirectionBeforeTransformation = Graphic3d_Vec4(float(theDir.X()), float(theDir.Y()), float(theDir.Z()), 0.0);
=> 0.f

+ SelectMgr_Vec3 mde (aMinPoint);
Bad variable name.
(0096450)
git   
2020-11-02 13:17   
Branch CR31704_4 has been updated forcibly by mkrylova.

SHA-1: 11c645005b1e6aa4c268b8f3e8a09ddf17ce1b1d
(0096452)
git   
2020-11-02 13:24   
Branch CR31704_5 has been created by mkrylova.

SHA-1: 119d554496104effd2c2473c210c57b1490d53b3


Detailed log of new commits:

Author: mkrylova
Date: Tue Sep 8 17:50:28 2020 +0300

    0031704: Visualization - add an interactive object AIS_LightSource representing a light source
    
    - Added new class AIS_LightSource - object representing a light source
    - Represented position, name, direction, Cut-off range and spot light source cone shape
    - Assigned Local Transformation to interactive object
    - Updated function vlight with opportunities of presentation via AIS_LightSource tools
    - Added ability to turn on/off light
    - Added Transformation-persistence mode
(0096544)
osa   
2020-11-05 15:33   
+ aMap.Bind (aLightNew->GetId(), new AIS_LightSource(aLightNew));
+ aMap.Find (aLightNew->GetId())->SetContext (ViewerTest::GetAISContext());
+ GetMapOfAIS().Bind (aMap.Find (aLightNew->GetId()), aLightNew->GetId());

Please avoid Find() method usage. It is not good by performance. You can save new object to additional variable instead of.
(0096545)
osa   
2020-11-05 15:37   
+ Standard_Boolean isNameDisplayed;
+ Standard_Boolean isPositionDisplayed;
+ Standard_Boolean isDirectionDisplayed;
+ Standard_Boolean isConeShapeDisplayed;
+ Standard_Boolean isRangeDisplayed;
Please rename. Use my***
(0096546)
osa   
2020-11-05 15:38   
+ //! Sets context.
+ //void SetContext(const Handle(AIS_InteractiveContext)& theContext) {myCTXPtr}
Remove unused code
(0096547)
osa   
2020-11-05 15:40   
+ if (theValue)
+ {
+ SetTransformPersistence (new Graphic3d_TransformPers(Graphic3d_TMF_CameraFullPers, myLightSource->Position()));
+ }
+ else
+ {
+ SetTransformPersistence (new Graphic3d_TransformPers(Graphic3d_TMF_None, gp_Pnt(0., 0., 0.)));
+ }

Maybe is it better to save input parameter to some temporary variable and call SetTransformPersistence() method only once?
(0096548)
kgv   
2020-11-05 15:42   
+ Standard_Boolean isNameDisplayed;
+ Standard_Boolean isPositionDisplayed;
+ Standard_Boolean isDirectionDisplayed;
+ Standard_Boolean isConeShapeDisplayed;
+ Standard_Boolean isRangeDisplayed;
> Please rename. Use my*** 

myToDisplayName and ToDisplayName()/SetDisplayName() will sound more natural for theses properties.
(0096594)
git   
2020-11-06 15:29   
Branch CR31704_5 has been updated by mkrylova.

SHA-1: 3423eb5436b2c186be29fb0d86c80b0b1b8173bd


Detailed log of new commits:

Author: mkrylova
Date: Fri Nov 6 15:30:17 2020 +0300

    osa and kgv remarks

(0096614)
git   
2020-11-09 11:51   
Branch CR31704_6 has been created by mkrylova.

SHA-1: 4e647c8f85c3ef1c8503d23b1be8b6f371af1b51


Detailed log of new commits:

Author: mkrylova
Date: Tue Sep 8 17:50:28 2020 +0300

    0031704: Visualization - add an interactive object AIS_LightSource representing a light source
    
    - Added new class AIS_LightSource - object representing a light source
    - Represented position, name, direction, Cut-off range and spot light source cone shape
    - Assigned Local Transformation to interactive object
    - Updated function vlight with opportunities of presentation via AIS_LightSource tools
    - Added ability to turn on/off light
    - Added Transformation-persistence mode
(0097602)
git   
2020-12-15 12:00   
Branch CR31704_7 has been created by kgv.

SHA-1: 6523a50b3c76aa8bb19931c8000dc99ff9c72b34


Detailed log of new commits:

Author: mkrylova
Date: Tue Sep 8 17:50:28 2020 +0300

    0031704: Visualization - add an interactive object AIS_LightSource representing a light source
    
    Added new class AIS_LightSource representing a light source presentation.
    
    Graphic3d_TMF_CameraPers - added new mode to Graphic3d_TransformPers
    defining 3D point relative to camera Eye position.
(0097603)
kgv   
2020-12-15 12:08   
Several remarks have been pushed to branch CR31704_7.

Please push test case(s) to the branch testing new functionality.
Please proceed with the following:

    Handle(Graphic3d_Group) aGroup = thePrs->NewGroup();
    Handle(Graphic3d_ArrayOfPoints) aPoints = new Graphic3d_ArrayOfPoints (1);
    aPoints->AddVertex (myLightSource->Position());
    aGroup->AddPrimitiveArray (aPoints);

Presentation group is created with undefined attributes.

    Handle(Geom_Line) aLine = new Geom_Line (myLightSource->Position(), myLightSource->Direction());
    
GeomAdaptor_Curve aCurve (aLine, 0.0, myLightSource->Range() != 0.0 ? myLightSource->Range() : 
Precision::Infinite());
    StdPrs_Curve::Add (thePrs, aCurve, myDrawer)

This is certainly an overkill creating Geom_Line for displaying a line segment.

Handle(Geom_Circle) aCircle = new Geom_Circle(anAxes, aRadius);
    GeomAdaptor_Curve aCircleCurv (aCircle);
    const Standard_Real aPrevDev = myDrawer->DeviationCoefficient();
    myDrawer->SetDeviationCoefficient (1.e-5);
    StdPrs_DeflectionCurve::Add (thePrs, aCircleCurv, myDrawer);
    myDrawer->SetDeviationCoefficient (aPrevDev);

This is overcomplication computing circle presentation through general tool StdPrs_DeflectionCurve.
Please simplify code to avoid Geom classes.

+    else if (anArgCase.IsEqual ("DELETE_PRESENTATION")
...
+            aLightSourceIter->DeleteAllDisplayedAttributes();
+            aLightSourceIter->SetToUpdate();
...
+      Handle(AIS_LightSource) aLightSourceCurr = new AIS_LightSource (aLight);
+      aMap.Bind (aLight->GetId(), aLightSourceCurr);
+      aLightSourceCurr->SetContext (ViewerTest::GetAISContext());
+      GetMapOfAIS().Bind (aLightSourceCurr, aLight->GetId());

This is not how show/hide works in AIS.
Please use AIS_InteractiveContext::Remove()/AIS_InteractiveContext::Display() for presentation management and try to remove unexpected AIS_LightSource::SetContext() calls.
(0097604)
kgv   
2020-12-15 12:19   
+Standard_Boolean AIS_LightSource::ProcessDragging (const Handle(AIS_InteractiveContext)& ,

Within the current implementation, overriding AIS_InteractiveObject::HandleMouseClick() might be straightforward.
(0097896)
git   
2020-12-24 17:08   
Branch CR31704_7 has been updated forcibly by mkrylova.

SHA-1: d1d5f8bc3c0c5bfda5873039169333c81ae3424f
(0097897)
git   
2020-12-24 17:12   
Branch CR31704_8 has been created by mkrylova.

SHA-1: e09a1c45b2640e8ce9602381f700313efb66374f


Detailed log of new commits:

Author: mkrylova
Date: Tue Sep 8 17:50:28 2020 +0300

    0031704: Visualization - add an interactive object AIS_LightSource representing a light source
    
    Added new class AIS_LightSource representing a light source presentation.
    
    Graphic3d_TMF_CameraPers - added new mode to Graphic3d_TransformPers
    defining 3D point relative to camera Eye position
(0097899)
kgv   
2020-12-24 17:25   
+    GeomAdaptor_Curve aCurve (new Geom_Line (myLightSource->Position(), myLightSource->Direction()),

+                              0.0, myLightSource->HasRange() ? myLightSource->Range() : Precision::Infinite());

+    StdPrs_Curve::Add (thePrs, aCurve, myDrawer);

Adaptors and Geom are still used in the code.
(0097980)
git   
2020-12-29 17:01   
Branch CR31704_8 has been updated forcibly by mkrylova.

SHA-1: dbcce6ac59514d34969783c2f462e09317e9d66c
(0097988)
git   
2020-12-30 12:27   
Branch CR31704_9 has been created by kgv.

SHA-1: 2bad57193efe66dfe8c9cab13ca6afe91e3ea005


Detailed log of new commits:

Author: mkrylova
Date: Tue Sep 8 17:50:28 2020 +0300

    0031704: Visualization - add an interactive object AIS_LightSource representing a light source
    
    Added new class AIS_LightSource representing a light source presentation.
    
    Graphic3d_TMF_CameraPers - added new mode to Graphic3d_TransformPers
    defining 3D point relative to camera Eye position
(0097989)
kgv   
2020-12-30 13:22   
(edited on: 2020-12-30 13:24)
Please don't forget pushing a squashed branch.
I've put a couple of corrections into CR31704_9.

@@ -438,6 +438,8 @@ void AIS_Manipulator::Detach()
   if (!aContext.IsNull())
   {
     aContext->Remove (this, Standard_False);
+    aContext->Display (anObject, true);
+    aContext->Redisplay (anObject, true);

This is unexpected hack, please consider fixing an issue (if any) in other way.

+# --------------------------------------
+# display presentations of light sources
+# --------------------------------------

Please print description using "puts".

+set anImage1 $imagedir/${casename}_1.png

These additional variables are not very useful for a single-time usage.
Please just call "vdump $imagedir/${casename}_1.png" in place.
Replacing numbers with some meaningful text would be also helpful.

--- /dev/null
+++ b/tests/v3d/light_source/display_all

New tests will not be executed without putting them into tests/v3d/grids.list

+    const Standard_Real aRadius = myLightSource->HasRange() ? myLightSource->Range() : UnitsAPI::AnyToLS 
(250000., "mm");

Please avoid using UnitsAPI. Make 250000 a user-configurable parameter.
If this is an infinite line - you may use Prs3d_Drawer::MaximalParameterValue() / 2.0 instead of hard-coded number.

It might be also reasonable setting myInfiniteState=true in constructor as light sources are not expected to be affected by fit all.

    const Handle(Prs3d_ShadingAspect)& anAspect = myDrawer->ShadingAspect();
+    anAspect->Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT);

This is not how it is supposed to work - aspects should not be modified by ::Compute().
Moreover, there are no Prs3d_Drawer::SetShadingAspect() calls, so that the code modifies global AIS_InteractiveContext aspects instead of local to object.
Please define necessary aspects in constructor.

+    Prs3d_ToolSphere aSphere (aRadius, THE_NB_SLICES, THE_NB_STACKS);
+    gp_Trsf aTrsf;
+    aTrsf.SetTranslation (gp_Vec(gp::Origin(), myLightSource->Position()));
+    Handle(Graphic3d_ArrayOfTriangles) aCenterArray;
+    aSphere.FillArray (aCenterArray, aTrsf);

Prs3d_ToolSphere::Create() will be more straight-forward here.

+    Prs3d_ToolCylinder aConus (aRadius, 0.0, aDistance, THE_NB_SLICES, THE_NB_STACKS);

conus -> cone.

+  static NCollection_DataMap<TCollection_AsciiString, Handle(AIS_LightSource)> aMap;

aLightPrsMap.

+    Handle(V3d_Light) aLight = aLightIter.Value();
+    if (!aMap.IsBound (aLight->GetId()))

It looks redundant relying on additional identifier - Handle(V3d_Light) can be used directly as a key.

+      ViewerTest::GetAISContext()->Display (anIter.Value(), true);
+      ViewerTest::GetAISContext()->Redisplay (anIter.Value(), true);

There should be no need calling Redisplay() right after Display() - make sure you've put necessary SetToUpdate() calls on modification of presentable object.
Moreover, Display() shouldn't be called with "true" flag requiring to redraw a view on iterating over each light source in a loop.

+      GetMapOfAIS().Bind (aLightSourceNew, aLightNew->GetId());

Please avoid using internal GetMapOfAIS() when possible - use ViewerTest::Display() instead.

+    else if (anArgCase.IsEqual ("DELETE_PRESENTATION")
...
+          aLightSourceIter->DeleteAllDisplayedAttributes();

Once again - AIS_InteractiveContext::Remove() is expected to be used instead.

+    else if (anArgCase.IsEqual ("DISPLAY")
+          || anArgCase.IsEqual ("-DISPLAY"))
+    {
+        for (V3d_ListOfLightIterator aLightIter(aView->ActiveLightIterator()); aLightIter.More(); 
aLightIter.Next())
+        {
+          Handle(AIS_LightSource) aLightSourceIter = aMap.Find (aLightIter.Value()->GetId());
+          aLightSourceIter->SetDisplayName (true);

So far it doesn't look reasonable performing Display/Remove action directly in the loop.
Instead, code may remember action and perform it after main loop (in the same place, where you try recomputing presentations).

(0098101)
mkrylova   
2021-01-13 13:07   
Branch CR31704_8 has been updated by mkrylova
# kgv remarks:
- deleted last changes in AIS_Manipulator
- fixed tests
- added tests in grids.list
- replaced UnitsAPI::AnyTools (250000., "mm") by Prs3d_Drawer::MaximalParameterValue()
- added new variables for aspects
- fixed map stored light sources
- replaced DeleteAllDisplayedAttributes() by Remove()
- fixed performing "-DISPLAY" action
- fixed code style
(0098102)
mkrylova   
2021-01-13 13:08   
Branch CR31704_10 has been created by mkrylova.

0031704: Visualization - add an interactive object AIS_LightSource representing a light source
    
Added new class AIS_LightSource representing a light source presentation.
    
Graphic3d_TMF_CameraPers - added new mode to Graphic3d_TransformPers
defining 3D point relative to camera Eye position
(0098105)
kgv   
2021-01-13 15:54   
Some remarks have been pushed to CR31704_10.

Extra questions:
- It seems DIRECTIONAL light sources are not displayed, do they?

testgrid v3d light_source
> vlight -clear 
> Error: no active viewer

Test cases are expected to pass, not to fail.

+          Handle(AIS_LightSource) aLightSourceIter = aLightPrsMap.Find (aLightIter.Value());
+          aLightSourceIter->SetDisplayName (true);
+          aLightSourceIter->SetDisplayPosition (true);
+          aLightSourceIter->SetDisplayDirection (true);
+          aLightSourceIter->SetDisplayAngle (true);
+          aLightSourceIter->SetDisplayRange (true);

Setting/unsetting options should not be done like this.

-      aLightCurr->SetDirection (anXYZ[0], anXYZ[1], anXYZ[2]);
+      aLightSourceCurr->SetDirection (gp_Dir (anXYZ[0], anXYZ[1], anXYZ[2]));

This is not how it is supposed to work.
You should set properties to Graphic3d_CLight and just invalidate presentation, so that AIS_InteractiveContext::Display() will do necessary staff.

+      ViewerTest::Display (anIter.Value()->Light()->GetId(), anIter.Value(), false);

This will produce a weirdly named presentations "0", "1", etc.
It will be better asking user to enter presentation name.
E.g.:
> vlight -change 0 -display "light0"
-prs/-presentation/-display could be aliases.

+  static NCollection_DataMap<Handle(V3d_Light), Handle(AIS_LightSource)> aLightPrsMap;

I propose removing this map altogether.
User will have to explicitly display each light source and he will be able to removed it from AIS_InteractiveContext at any time via "vremove" command.
It can be kept responsibility of user removing light source presentation right after removing light source itself via "vlight -delete" command,
or alternatively, command may iterate over all presentations in context and remove related light presentations.

-    "\n        -angle angleDeg"
+    "\n        -angle angleDeg {0|1} (display or not the angle of spot light source; 0 by default)"


Let's do not overload existing parameters setting light source properties.
It is better introducing a dedicated parameter(s) defining presentation style like -showAngle {0|1}/-showRange {0|1}/-showName {0|1}.
If "-display prsName" argument is not given, command can try to find related presentations in context to invalidate them or just report a syntax error.
Consider overriding AIS_KindOfInteractive property of AIS_LightSource object to filter out most of irrelevant presentations.
AIS_KOI_Datum and AIS_KOI_Object do not seems represent light source object well, so maybe it could be a new type AIS_KOI_LightSource.





View Issue Details
31382 [Open CASCADE] OCCT:Data Exchange feature have not tried 2020-02-18 17:30 2021-01-13 16:25
kgv  
skl  
normal  
assigned  
open  
none    
none  
  7.6.0*  
Data Exchange - BinXCAF should preserve length unit information
Currently, XCAF document (XBF) is loaded / written without length unit conversions, so that document implicitly preserves system units.
As different OCCT-based applications may choose different system units, opening the documents across such applications becomes problematic as there are no related information preserved in the file no standard tools for units conversion of XCAF document content.

As minimal requirement, it is necessary preserving length unit information within XBF/Xml file, which should be set and processed by unit-aware applications (by default, it might be reasonable keeping length unit UNDEFINED).
bug31382
Notes
(0096632)
git   
2020-11-10 07:53   
Branch CR31382 has been created by skl.

SHA-1: 8638eb6923dd4c515bd8d899cf3c8f233b1734e7


Detailed log of new commits:

Author: skl
Date: Tue Nov 10 07:52:30 2020 +0300

    0031382: Data Exchange - BinXCAF should preserve length unit information
    
    Add LengthUnit info to XCAF document.
(0096633)
git   
2020-11-10 07:55   
Branch CR31382 has been updated forcibly by skl.

SHA-1: 70bc6ab2cf4ecc77b2856b82f4324978a498398f
(0096634)
git   
2020-11-10 08:41   
Branch CR31382 has been updated forcibly by skl.

SHA-1: d3ebb3870574430d07f8657fc4f45114ca82f8d0
(0096638)
git   
2020-11-10 14:36   
Branch CR31382 has been updated forcibly by skl.

SHA-1: 3a4f47ea05b5faf8469cc349fc7d4fd8854effd8
(0096652)
git   
2020-11-11 10:19   
Branch CR31382 has been updated forcibly by skl.

SHA-1: 4bdf1ebadccec4c4696508d5b294fbbf7ae561ab
(0096659)
skl   
2020-11-11 15:54   
Result of tests:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31382-master/view/COMPARE/ [^]
(0096662)
msv   
2020-11-11 17:01   
It would be helpful to add to the LengthUnitTool a method that returned scale ratio between two units.
Use case:
  XCAFDoc_LengthUnitTool::UnitValue aUnit = aLUTool->GetLengthUnit();
  double aScale = XCAFDoc_LengthUnitTool::GetScale (XCAFDoc_LengthUnitTool::UV_METER, aUnit);

GetScale (XCAFDoc_LengthUnitTool::UV_METER, XCAFDoc_LengthUnitTool::UV_MILLIMETER) is expected to return 1000.
(0096664)
msv   
2020-11-11 17:05   
Sergey, you can make the code compact (and less error prone) by separating the code that converts a string to the unit enum into a dedicated function in XDEDRAW.cxx.
(0096666)
kgv   
2020-11-11 17:11   
(edited on: 2020-11-11 17:13)
To make patch actually useful, it is desired to:
1. Update existing XCAF document (e.g. STEP, IGES, glTF, JT) filling/creation tools to set up units information, when it is known.
2. Analyze how to convert XCAF document from one unit to another (while reading or by other means). This might be really complicated considering reading of TopoDS_Shape / PMI information / etc., but feasible.

This is not necessary to be put into this patch, but before processing with integration of this step we should analyze how to go further (and potentially alter this patch to suite better further needs).

(0096668)
msv   
2020-11-11 17:26   
What is missing in this fix is storing units in standard saving procedure. Can we use the current value of the parameter xstep.cascade.unit to store the unit in the saved file? If some unit-aware application does not use this parameter it will set the units in the document explicitly, and in this case the standard procedure must not override the value of unit set in the document.
(0096669)
mpv   
2020-11-11 17:28   
To get conversion from one unit to other you may use method UnitsMethods::GetLengthFactorValue

I don't know, may be it is worth synchronize somehow enumeration with integer values used in this method. May be we could use the same enum in both UnitsMethods and XCAFDoc_lengthUnitTool?

Also in XCAFDoc_LengthUnitTool::SetLengthUnit you may remove everything except the last line, because TDataStd_Integer::Set checks the attribute already exists and changes the value. You don't need to forget the attribute just to change it.
(0096690)
git   
2020-11-12 11:13   
Branch CR31382 has been updated forcibly by skl.

SHA-1: e068e892f3134df99842e18d7881e87e2d22984a
(0096726)
skl   
2020-11-12 18:10   
Result of tests:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31382-master/view/COMPARE/ [^]
(0096730)
kgv   
2020-11-12 19:16   
+  enum LengthUnit {

This should be moved to dedicated enum header following recommendations in OCCT Coding Rules.

+UnitsMethods::LengthUnit lengthUnitByStr(TCollection_AsciiString theStr)

static
const TCollection_AsciiString&

+  if (theStr.IsEqual("MM"))

It is preferred making comparison case-insensitive.

+  di.Add("XCheckLengthUnit",

This command makes no sense for general usage - it could be replaced by Tcl comparison check using XGetLengthUnit command.

+  di.Add("XDumpLengthUnit",

XDump* prefix is unusual for getters in Draw Harness plugins - other getters have XGet* prefix.
(0096778)
git   
2020-11-15 07:18   
Branch CR31382 has been updated forcibly by skl.

SHA-1: ab1c68a13e150ae3ec6b1ba806d092de4001f640
(0096788)
git   
2020-11-16 12:08   
Branch CR31382 has been updated forcibly by skl.

SHA-1: 763bab75800c94d58dae4db90953d1e9c98c6a5d
(0096818)
git   
2020-11-17 10:42   
Branch CR31382 has been updated forcibly by skl.

SHA-1: cfd5bf689758ece85287db5ba9c9357138906e70
(0096828)
skl   
2020-11-17 15:04   
In order to avoid situation with undefined length unit in the document special protection in the XCAFDoc_ShapeTool is added: before adding of first TopoDS_Shape to document value of length unit is checked and if it is undefined, a value from session (param xstep.cascade.unit) sets into document as length unit.

Results of tests:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31382-master/view/COMPARE/ [^]

(0096829)
kgv   
2020-11-17 15:10   
(edited on: 2020-11-17 15:10)
+  case UnitsMethods_LengthUnit::LU_MILLIMETER: return "MILLIMETER";

This enumeration value syntax will raise old compiler warning on weekly Jenkins, please drop it.

Please also rename enumeration values to include full enumeration name, e.g.:
- UnitsMethods_LengthUnit::LU_MILLIMETER -> UnitsMethods_LengthUnit_Millimeter

(0096831)
msv   
2020-11-17 15:55   
+XSetLengthUnit D IncH
Why last letter is capital? It causes reader to find a hidden sense of it. Please use the simple word instead.

+ Handle(XCAFDoc_LengthUnitTool) aLUTool = XCAFDoc_LengthUnitTool::Set(Label().Father().FindChild(11, Standard_True));
Use LengthUnitLabel from document tool to access to the label of units.
(0096833)
git   
2020-11-17 16:07   
Branch CR31382 has been updated forcibly by skl.

SHA-1: 05da37a7aac569198019f4b4cf1a0508d426f8c1
(0096858)
git   
2020-11-18 07:02   
Branch CR31382 has been updated forcibly by skl.

SHA-1: 7de4b54ab5b9f28877857fdde5f276e9e7845bc4
(0096873)
skl   
2020-11-18 11:34   
Result of tests:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31382-master/view/COMPARE/ [^]
(0096878)
msv   
2020-11-18 12:17   
Please rebase on the latest master.
(0096880)
git   
2020-11-18 12:28   
Branch CR31382 has been updated forcibly by skl.

SHA-1: cdaf43ee09e80fbc6d368d0c94b7fafb488142b5
(0096881)
msv   
2020-11-18 12:32   
For integration:
occt - CR31382
products - none
(0096891)
kgv   
2020-11-19 10:56   
(edited on: 2020-11-19 11:02)
--- a/src/TKXCAF/EXTERNLIB
+++ b/src/TKXCAF/EXTERNLIB
@@ -10,3 +10,5 @@ TKLCAF
 TKG3d
 TKCAF
 TKVCAF
+TKXSBase

Putting STEP reader/writer as dependency for XCAF document library doesn't look like an acceptable change.

+UnitsMethods_LengthUnitEnum.hxx

File name should be "UnitsMethods_LengthUnit.hxx" according to OCCT coding rules, not "UnitsMethods_LengthUnitEnum.hxx".

+UnitsMethods_LengthUnit lengthUnitByStr(TCollection_AsciiString theStr)

static

+UnitsMethods_LengthUnit lengthUnitByStr(TCollection_AsciiString theStr)
+{
...
+  else
+    return UnitsMethods_LengthUnit_Undefined;
...

+  TCollection_AsciiString aUnit(argv[2]);
+  aLUTool->SetLengthUnit(lengthUnitByStr(argv[2]));

Command is expected to print user an error in case of wrong input, not silently commit UNDEFINED unit.

+  if (argc < 3) {

Unknown arguments (>3) should be reported as a syntax error as well.

+  if (argc < 3) {
...
+enum UnitsMethods_LengthUnit {

Please follow OCCT coding rules in new code - put { on the next line.

@@ -548,6 +551,17 @@ TDF_Label XCAFDoc_ShapeTool::AddShape (const TopoDS_Shape& theShape,
...
+      aLU = (UnitsMethods_LengthUnit)Interface_Static::IVal("xstep.cascade.unit");

Reading STEP-specific parameter within the base tool is illogical.
In contrary, it is a STEP translator filling in XCAF document should put length unit information (and print a warning if document has already specified non-matching length unit).

+UnitsMethods_LengthUnit XCAFDoc_LengthUnitTool::GetLengthUnit() const
...
+    aVal = (UnitsMethods_LengthUnit)anAttribute->Get();

As there is no dedicated driver, no versioning and no guarantee that UnitsMethods_LengthUnit will not be extended in future, it would be helpful verifying the enumeration range before cast.
By the way, I think it might be more useful storing length unit as a string rather than enum in XCAF document.

+  static Standard_GUID LengthUnitID("4eba571f-de90-4840-8639-eab9b72360e0");

static const

+//! The Enumeration describes possible values for length units
+
+enum UnitsMethods_LengthUnit {

Unexpected empty line between documentation and enum.

+};
+#endif // _XCAFDoc_LengthUnitTool_HeaderFile

Please put an empty line after };

(0096900)
skl   
2020-11-19 15:11   
Package UnitsMethods is in toolkit TKXSBase.
Is it reasonable to move this package to another toolkit (for example to TKernel) in order to avoid dependency between TKXCAF and TKXSBase?
(0097032)
git   
2020-11-24 15:27   
Branch CR31382 has been updated forcibly by skl.

SHA-1: a1e2fe4eb0f4d439b71ea756b41793d9aeb1ca73
(0097453)
kgv   
2020-12-10 10:33   
> Is it reasonable to move this package to another toolkit
> (for example to TKernel) in order to avoid
> dependency between TKXCAF and TKXSBase?
UnitsMethods currently defines not only global "cascade units" property (GetCasCadeLengthUnit()), but also auxiliary geometry conversion methods.
So that while technically it looks reasonable moving GetCasCadeLengthUnit() outside, this cannot be done for the whole UnitsMethods package as it has to be split into parts.
(0097891)
git   
2020-12-24 16:30   
Branch CR31382 has been updated forcibly by skl.

SHA-1: 0425c2c264d1563a48e08a386a50d9d9b6032f39
(0097906)
git   
2020-12-25 16:47   
Branch CR31382 has been updated by skl.

SHA-1: 22a2d00cc3be85718bad5173f31d327326bb84bb


Detailed log of new commits:

Author: skl
Date: Fri Dec 25 16:47:44 2020 +0300

    0031382: Data Exchange - BinXCAF should preserve length unit information
    
    Split package UnitsMethods.

(0097907)
git   
2020-12-25 17:26   
Branch CR31382 has been updated forcibly by skl.

SHA-1: 3c5c03080bf878bed9c24bc86f6d6fbc00f254be
(0097958)
git   
2020-12-28 13:03   
Branch CR31382 has been updated by skl.

SHA-1: e250344fe147c0b792f013f4231824e145d9c35a


Detailed log of new commits:

Author: skl
Date: Mon Dec 28 13:03:29 2020 +0300

    0031382: Data Exchange - BinXCAF should preserve length unit information
    
    Try to avoid using "xstep.cascade.unit".

(0097962)
git   
2020-12-28 16:52   
Branch CR31382 has been updated forcibly by skl.

SHA-1: dd51932a9680eb7c6f2ab685ffb639758f3966db
(0097964)
git   
2020-12-28 18:59   
Branch CR31382 has been updated forcibly by skl.

SHA-1: 3e974687d560c8e8afe519b32f2de4b361ae7fbf
(0097969)
git   
2020-12-29 09:25   
Branch CR31382 has been updated forcibly by skl.

SHA-1: 3c086c829ba4912cd6616d5beb31b6e695342469
(0097985)
git   
2020-12-30 11:00   
Branch CR31382 has been updated forcibly by skl.

SHA-1: cccbf41f43b51078d31fb8c68cf8054468d312f5
(0097995)
skl   
2020-12-31 10:18   
Package UnitsMethods is splitted: geom methods was placed to new package UnitsGeomMethods which is in the toolkit TKXSBase. Package UnitsMethods is placed to toolkit TKernel.
Since for all supported formats value CasCadeLengthUnit is used for set unit of length it is reasonable to avoid using of parameter "xstep.cascade.unit".
New Draw command "setlengthunit" for set length unit is added. This command have to be used istead of command "param xstep.cascade.unit".
All using "xstep.cascade.unit" in the read/write classes is removed.
But for supporting of existed Draw tests and other using in "old" code setting for "xstep.cascade.unit" in class XSAlgo.cxx is kept.

Result of tests:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31382-CR31382-skl/view/COMPARE/ [^]


(0097997)
msv   
2020-12-31 11:49   
The description of the method UnitsMethods::GetLengthUnitByFactorValue is not valid. Please correct it.

The new methods FactRD and FactDR in UnitsMethods have unclear names and no description. Please rename them like FactorRadianDegree and add description.

Why did you remove the virtual method XSAlgo_AlgoContainer::PrepareForTransfer? It can be redefined in some other code.

I propose to replace in the tests usage of "param xstep.cascade.unit" with "setlengthunit". It is in order to remove the usage of obsolete mechanism from OCCT.
(0098000)
git   
2020-12-31 16:15   
Branch CR31382 has been updated forcibly by skl.

SHA-1: f96ad714e2d84bf57b637cf82c60c9b2ccd992b3
(0098050)
skl   
2021-01-11 12:05   
Needed changes is done.
Result of tests:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31382-CR31382-skl/view/COMPARE/ [^]
(0098061)
msv   
2021-01-11 14:11   
Again, the description of the method UnitsMethods::GetLengthUnitByFactorValue is not valid. Please correct it.
(0098066)
msv   
2021-01-11 14:26   
In XtControl_ActorRead::Transfer(), why did you commented out the following line? I think we should leave the call of this virtual method.
  //XSAlgo::AlgoContainer()->PrepareForTransfer();
(0098067)
msv   
2021-01-11 14:28   
Prepare new ready for integration branches with one commit in both occt and products.
(0098072)
git   
2021-01-11 15:19   
Branch CR31382 has been updated forcibly by skl.

SHA-1: cd6512ffde9a700723eafee98341526242620a48
(0098073)
git   
2021-01-11 15:22   
Branch CR31382 has been updated forcibly by skl.

SHA-1: d4fd7db52d1ec856ceda766cd822c1e102f0ef53
(0098083)
skl   
2021-01-12 10:04   
Needed changes is done.
Result of tests:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31382-CR31382-skl/view/COMPARE/ [^]
(0098085)
kgv   
2021-01-12 11:16   
> Add LengthUnit info to XCAF document.
> Split package UnitsMethods.
> Try to avoid using "xstep.cascade.unit".

This comment description is too basic - it is expected to see details on modifications (how UnitsMethods package has been split? which interface is introduced in XCAF for LengthUnit info? what does it mean "try to avoid using xstep.cascade.unit"?).

+  di << "current value of length unit is " << UnitsMethods::DumpLengthUnit(aLU);


This is an overloaded output for the command intended to return variable value - please consider removing redundant text and keep only output of value itself.
So that Tcl script could be able to use "set aUnit [lengthunit]" without necessity to parse text.

--- a/src/TKernel/PACKAGES
+++ b/src/TKernel/PACKAGES
@@ -14,3 +14,4 @@ Units
 UnitsAPI
 NCollection
 Message
+UnitsMethods

Please apply alphabetical order for new entities.

+
+class UnitsGeomMethods 

Please provide description for new class and it's methods.

+  
+protected:
+
+private:
+
+};

No need in copying empty sections.

+  if (fabs(1. - theFactorValue) < aPreci)

fabs() -> Abs()

+enum UnitsMethods_LengthUnit {

Please follow OCCT Coding Style (newline before opening bracket).
(0098086)
msv   
2021-01-12 11:24   
src/UnitsMethods/UnitsMethods.hxx
  //! Returns the enumeration corresnoding to the given scale factor
Misprint "corresnoding"
(0098098)
skl   
2021-01-13 12:37   
Results of tests:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31382-CR31382-skl/view/COMPARE/ [^]
(0098103)
msv   
2021-01-13 14:47   
I have corrected the spelling of commit message in CR31382_1.
(0098104)
msv   
2021-01-13 14:52   
For integration:
occt - CR31382_1
products - CR31382
(0098106)
kgv   
2021-01-13 16:24   
(edited on: 2021-01-13 16:25)
+static Standard_Integer setLengthUnit(Draw_Interpretor& di, Standard_Integer argc, const char** 
argv)
+{
+  if (argc < 2)
...
+static Standard_Integer lengthUnit(Draw_Interpretor& di, Standard_Integer 
+{
+  UnitsMethods_LengthUnit aLU = UnitsMethods::GetLengthUnitByFactorValue(UnitsMethods::GetCasCadeLengthUnit());

+  di << UnitsMethods::DumpLengthUnit(aLU);
+  return 0;

This is a weak check - it allows passing extra arguments to commands without user noticing they will be ignored. Please check for equality instead.

+  theCommands.Add("lengthunit", "return value of length unit"
+  theCommands.Add("setlengthunit", "set value of length unit"

Defining two commands for the same thing looks redundant - it will be simpler having a single command "lengthunit" doing both tasks depending on a number of arguments, as many other Draw Harness commands.

--- a/src/Interface/Interface_Static.cxx
+++ b/src/Interface/Interface_Static.cxx
+    if (strcmp(name, "xstep.cascade.unit") == 0)
+    {
+      Standard_Integer aUnit = item->IntegerValue();
+      UnitsMethods::SetCasCadeLengthUnit(aUnit);
+    }

Keeping this hack indefinitely within the basic interface for arbitrary parameters doesn't look like a good idea.
I propose generating a runtime warning (Message::SendWarning()) about deprecation of "xstep.cascade.unit" parameter, so that we will remove this code after a couple of OCCT releases.

+//! Class contains conversion methods for 2d geom objects
+class UnitsGeomMethods
+{

I don't know if these methods have been supposed to be public / have any use for external applications, but if yes - this API change should be mentioned in Upgrade Guide, as user will be unable to figure out where the methods have gone.






View Issue Details
32048 [Open CASCADE] OCCT:Configuration integration request have not tried 2021-01-11 17:35 2021-01-12 17:22
kgv  
bugmaster  
normal  
reviewed 7.6.0*  
open  
none    
none  
  7.6.0*  
Configuration - Extend batch files to build OCCT with Emscripten
It is proposed extending adm/scripts/wasm_build.bat with making an archive capabilities similar to android_build.bat.
N/A
Notes
(0098079)
kgv   
2021-01-11 20:13   
Patch is ready for review
- OCCT branch: CR32048.
(0098092)
osa   
2021-01-12 15:17   
The patch was reviewed





View Issue Details
32046 [Community] OCCT:Configuration minor have not tried 2021-01-10 16:39 2021-01-12 15:48
taoyouh Windows  
taoyouh VC++ 2015  
normal 64 bit  
feedback 7.5.0  
open  
none    
none  
  7.6.0*  
Configuration - CMake Installs .lib files to libd instead of lib on Windows
After using CMake install with the following settings, .lib files on Windows are installed in libd, but .so files on Linux are installed in lib. The .lib files are expected to be saved in "lib" as I configured, or they should have the same behavior on Windows and Linux.

INSTALL_DIR_LAYOUT=Unix
INSTALL_DIR_LIB=lib
CMAKE_BUILD_TYPE=Debug
Notes
(0098077)
bugmaster   
2021-01-11 16:21   
Hi,

For what reason you :
1. use Unix layout on Windows
2. are not satisfied condition for Windows
  lib - Release libraries
  libd - Debug libraries

(0098082)
taoyouh   
2021-01-12 07:36   
(edited on: 2021-01-12 07:36)
I am integrating Open Cascade with a package manager (conan), which maintains the list of lib files by itself without using CMake. Thus, I need a universal package layout, so I don't need to figure out whether they are in "win64/vc14" or "lin64/gcc", "lib" or "libd".

With the current behavior, I need to check whether the library files are in "lib" or "libd". Everyone using custom build systems or package managers will face this problem. I hope that files can be in the same directory across all platforms.






View Issue Details
32035 [Community] OCCT:Configuration major have not tried 2020-12-31 20:32 2021-01-12 15:48
efferre79 Linux  
efferre79 Gentoo  
normal rolling  
feedback 7.4.0  
open  
none    
none  
  7.6.0*  
Configuration - bug in OpenCASCADEConfig.cmake when using INSTALL_DIR_CMAKE
when using INSTALL_DIR_CMAKE during the configuration phase, it's possible to change the installation location of cmake files

OpenCASCADEConfig.cmake defines opencascade installation root (variable) OpenCASCADE_INSTALL_PREFIX starting from the path of cmake file itself by assuming the cmake file is installed below the same path of the include and lib files. This is true only in the case INSTALL_DIR_CMAKE is not defined externally

the result is that find_package(OpenCASCADE) sets wrong OpenCASCADE_*_DIR variables in 3rd part cmake files trying to look for opencascade

The same applies for latest 7.5.0.
configure opencascade by using
$ cmake -DINSTALL_DIR_CMAKE=/usr/lib64/cmake 
Notes
(0098068)
bugmaster   
2021-01-11 14:45   
Hi,

INSTALL_DIR_... variables set location of folders cmake, doc, samples, etc relative INSTALL_DIR variable.
If you really need to redefine INSTALL_DIR_CMAKE externally use relative paths.

(0098094)
efferre79   
2021-01-12 15:23   
I am working under Linux

The cmake files are found on typical locations as indicated in https://cmake.org/cmake/help/latest/command/find_package.html [^] so it's better to install below /usr/lib${LIB_SUFFIX}/cmake/opencascade-${VERSION}.

I am trying to create an installation where there are many parallel versions of opencascade available, the simplest way is to install everything under a separate directory but the cmake files which should be installed as explained above (in the past the root path was something like /usr/lib64/opencascade-7.4.0/ros). Alternatively by using -DINSTALL_DIR_WITH_VERSION=ON it's possible to install in the default destination (e.g. below /usr) but there are some files which are not versioned, e.g. some binaries

/usr/bin/custom.sh
/usr/bin/custom_gcc_64.sh
/usr/bin/draw.sh
/usr/bin/env.sh
/usr/bin/sample.sh
(0098095)
kgv   
2021-01-12 15:36   
(edited on: 2021-01-12 15:47)
Just to comment *.sh scripts. Files like
> /usr/bin/custom.sh
> /usr/bin/custom_gcc_64.sh
> /usr/bin/draw.sh
> /usr/bin/env.sh

are hacks to pre-configure environment to libraries and resources within development environment.
E.g., when OCCT is not actually installed system-wide but placed somewhere within $HOME directory.
This is a common way for developing OCCT-based application relying not on OCCT packages provided by Linux distributive.

When installing DRAWEXE system-wide, starting executable directly should not require any $LD_LIBRARY_PATH hacks and application should be able to find resource files in their default locations (hence global variables like $CSF_OCCTResourcePath/$CSF_DrawPluginDefaults should not be necessary as well).

searchResources() function in src/Draw/Draw.cxx defines resource look up by Draw Harness - at first it tries to find resources within "/share/opencascade-7.6.0.dev/" folder with fully qualified version and then fallbacks to shorter options:
 ("/share/opencascade-" OCC_VERSION_STRING_EXT "/") + theResName,
 ("/share/opencascade-" OCC_VERSION_COMPLETE "/") + theResName,
 ("/share/opencascade-" OCC_VERSION_STRING "/") + theResName,
 ("/share/opencascade/") + theResName,
 ("/share/occt-" OCC_VERSION_STRING_EXT "/") + theResName,
 ("/share/occt-" OCC_VERSION_COMPLETE "/") + theResName,
 ("/share/occt-" OCC_VERSION_STRING "/") + theResName,
 ("/share/occt/") + theResName,


Apart from Draw Harness plugins and Tcl scripts, there is no much global resource files in OCCT nowadays necessary for using OCCT in other applications (most resources are embedded into .so and plugin interface for loading OCAF documents has been superseded by direct linking and registering drivers).






View Issue Details
32050 [Open CASCADE] OCCT:Configuration integration request have not tried 2021-01-11 20:22 2021-01-12 15:17
kgv  
bugmaster  
normal  
reviewed 7.6.0*  
open  
none    
none  
  7.6.0*  
Configuration - define fallback Android API version within auxiliary batch files
It is proposed defining a fallback Android API version within adm/scripts/android_build.bat.
N/A
Notes
(0098080)
kgv   
2021-01-11 21:06   
Patch is ready for review
- OCCT branch: CR32050.
(0098093)
osa   
2021-01-12 15:17   
The patch was reviewed





View Issue Details
32045 [Open CASCADE] OCCT:Visualization integration request have not tried 2021-01-10 01:41 2021-01-12 14:58
kgv  
bugmaster  
normal  
reviewed  
open  
none    
none  
  7.6.0*  
Visualization, TKOpenGl - move light source functions from OpenGl_ShaderManager.cxx to Shaders
It is desired moving out light source GLSL functions from OpenGl_ShaderManager.cxx to Shaders.
Notes
(0098028)
git   
2021-01-10 01:42   
Branch CR32045 has been created by kgv.

SHA-1: 352a58bfedfb92858951823dc3474bb28ddbf8ca


Detailed log of new commits:

Author: kgv
Date: Sun Jan 10 01:43:03 2021 +0300

    0032045: Visualization, TKOpenGl - move light source functions from OpenGl_ShaderManager.cxx to Shaders

Author: kgv
Date: Sun Jan 3 03:05:32 2021 +0300

    0032036: Visualization, TKOpenGl - broken Cubemap background on GeForce 320M
    
    Enable GL_DEPTH_CLAMP while rendering skybox to workaround unexpected clamping issue on some GPUs.
(0098034)
git   
2021-01-10 02:34   
Branch CR32045 has been updated forcibly by kgv.

SHA-1: cbf9d595d62baa547fc811e6c8b6b0859fae2594
(0098038)
kgv   
2021-01-10 11:11   
Patch is ready for review
- OCCT branch: CR32045.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR32045-master-KGV/ [^]
(0098091)
osa   
2021-01-12 14:58   
The patch was reviewed without remarks





View Issue Details
32039 [Open CASCADE] OCCT:Visualization feature have not tried 2021-01-04 12:00 2021-01-12 14:43
kgv  
bugmaster  
normal  
reviewed  
open  
none    
none  
  7.6.0*  
Visualization, TKOpenGl - implement simple shadow mapping for a direct light source
It is proposed extending real-time renderer with basic shadow mapping capabilities - as a first step implementation could be limited to a single directional light source.
buggy_raytrace.png (35,965) 2021-01-10 04:31
https://tracker.dev.opencascade.org/
buggy_phong.png (34,057) 2021-01-10 04:32
https://tracker.dev.opencascade.org/
buggy_pbr.png (34,372) 2021-01-10 04:32
https://tracker.dev.opencascade.org/
Notes
(0098023)
git   
2021-01-09 23:38   
Branch CR32039 has been created by kgv.

SHA-1: dcd21d48b4495214aff20161514a062f72eb1d95


Detailed log of new commits:

Author: kgv
Date: Mon Jan 4 12:17:44 2021 +0300

    0032039: Visualization, TKOpenGl - implement simple shadow mapping for a direct light source
    
    Graphic3d_CLight::ToCastShadows() - added new property defining if light should cast shadows (ignored by Ray-Tracing).
    
    OpenGl_ShaderManager::stdComputeLighting() now implements shadow mapping for directional lights.
    OpenGl_ShaderManager::prepareGeomMainSrc() now handles copying of arrays.
    OpenGl_Context::ShadowMapTexUnit() - added property defining an offset for shadow map texture units.
    OpenGl_ShadowMap - added new class storing shadow map FBO with parameters.
    OpenGl_View::prepareFrameBuffers() - added resizing of shadow map FBOs.
    OpenGl_View::Redraw() - added section redrawing scene into shadow map FBOs via OpenGl_View::renderShadowMap() method.
    
    vrenderparams - added new parameters -shadowMapResolution and -shadowMapBias.
(0098033)
git   
2021-01-10 02:32   
Branch CR32039 has been updated forcibly by kgv.

SHA-1: a2415614578d62eafa019fc12c2117bcc301dff2
(0098037)
kgv   
2021-01-10 04:27   
Patch is ready for review
- OCCT branch: CR32039.

http://jenkins-test-12.nnov.opencascade.com/view/CR32039-master-KGV/ [^]
(0098089)
osa   
2021-01-12 14:37   
The patch was reviewed
(0098090)
kgv   
2021-01-12 14:43   
Please use branch CR32039_1 for integration.





View Issue Details
31129 [Open CASCADE] OCCT:Visualization minor have not tried 2019-11-05 10:48 2021-01-12 13:44
kgv  
kgv  
normal  
new  
open  
none    
none  
  7.6.0*  
Visualization - revise background / environment API
Existing API for configuring viewer background / environment is unreliable.
There is no public getter returning current state, too many setters, PBR supports only Cubemap and Ray Tracing supports only Equirectangular panorama, different ways for using environment for lighting / background (V3d_View::SetBackgroundCubeMap() for PBR and Graphic3d_RenderingParams::UseEnvironmentMapBackground for RaT Tracing), Graphic3d_TextureEnv/Graphic3d_CubeMap have no relationship although has similar nature, and result depends on the order of called methods.

OpenGl_View::myBackgroundType is inaccessible outside. OpenGl_View::myBackgroundCubeMap can be left defined after OpenGl_View::SetBackgroundImage (Handle(Graphic3d_TextureMap)()) without any option to make it active as background again.

It is proposed to:
- Move background / environment properties to Graphic3d_RenderingParams (preserving a couple of old V3d_View methods for compatibility). No setter is needed to switch state - renderer should be able tracking change.
- Support Cubemap within Ray-Tracing. Preserving support of equirectangular panorama to be considered, if not troublesome.
- Provide dedicated properties for Background Environment and IBL Environment.
  Renderer should be able reusing OpenGL resource created for Background Environment for baking IBL Environment when they are the same using normal resource sharing mechanism. Remove Graphic3d_RenderingParams::UseEnvironmentMapBackground flag.
There are no notes attached to this issue.





View Issue Details
32042 [Open CASCADE] OCCT:Visualization integration request have not tried 2021-01-07 11:20 2021-01-12 12:17
kgv  
bugmaster  
normal  
reviewed  
open  
none    
none  
  7.6.0*  
Visualization, TKOpenGl - pre-multiply headlight flag into light source position
Currently headlight flag is passed to GLSL program so that transformation has to be applied dynamically.

This looks like unnecessary overcomplication - as camera position remains static within frame, it makes sense premultiplying transformation and passing final headlight position.
Notes
(0098022)
git   
2021-01-09 23:34   
Branch CR32042 has been created by kgv.

SHA-1: c262aafaff5398237d85c2ab434141501460ab70


Detailed log of new commits:

Author: kgv
Date: Fri Jan 8 00:48:29 2021 +0300

    0032042: Visualization, TKOpenGl - pre-multiply headlight flag into light source position
    
    OpenGl_ShaderManager::pushLightSourceState() now pre-multiplies headlight transformation.
    Built-in shading GLSL programs have been updated to remove special handling if headlight flag;
    also removed redundant pre-normalization of light source direction
    (already normalized implicitly by Graphic3d_CLight interface).
    
    Graphic3d_CLight::SetHeadlight() now raises exception in case of ambient light type.
    OpenGl_ShaderManager::SetLastView() - removed unused property.
(0098032)
git   
2021-01-10 02:29   
Branch CR32042 has been updated forcibly by kgv.

SHA-1: f9be7ae44ff09900e41e2b41627ab91bdf803fe9
(0098036)
kgv   
2021-01-10 04:25   
Patch is ready for review
- OCCT branch: CR32042.

http://jenkins-test-12.nnov.opencascade.com/view/CR32042-master-KGV [^]
(0098088)
osa   
2021-01-12 12:17   
The patch was reviewed





View Issue Details
32044 [Open CASCADE] OCCT:Foundation Classes minor have not tried 2021-01-09 23:57 2021-01-12 11:29
kgv  
bugmaster  
normal  
reviewed 7.4.0  
open  
none    
none  
  7.6.0*  
Foundation Classes - NCollection_Array2::Resize() does not allocate pointer array
NCollection_Array2::Resize() has a logical error before calling NCollection_Array2::Allocate() leading to no allocation of pointer array.
Notes
(0098025)
git   
2021-01-10 00:34   
Branch CR32044 has been created by kgv.

SHA-1: b748da8fd72da682d5cbf7b5312317f603609494


Detailed log of new commits:

Author: kgv
Date: Sun Jan 10 00:04:32 2021 +0300

    0032044: Foundation Classes - NCollection_Array2::Resize() does not allocate pointer array
    
    NCollection_Array2::Resize() has been fixed to set myDeletable before calling Allocate().
(0098035)
kgv   
2021-01-10 03:41   
Patch is ready for review
- OCCT branch: CR32044.

http://jenkins-test-12.nnov.opencascade.com/view/CR32044-master-KGV/ [^]
(0098087)
osa   
2021-01-12 11:29   
The patch was reviewed





View Issue Details
32036 [Open CASCADE] OCCT:Visualization minor have not tried 2021-01-03 00:33 2021-01-12 11:15
kgv Mac  
bugmaster OS  
normal X  
reviewed 7.6.0*  
open  
none    
none  
  7.6.0*  
Visualization, TKOpenGl - broken Cubemap background on GeForce 320M
Cubemap background is displayed with artifacts on GeForce 320M after 0031649.
Draw[11]> vglinfo
OpenGL info:
  GLvendor: NVIDIA Corporation
  GLdevice: NVIDIA GeForce 320M OpenGL Engine
  GLversion: 2.1 NVIDIA-10.0.35 310.90.10.05b12
  GLSLversion: 1.20
  Max texture size: 8192
  Max FBO dump size: 8192x8192
  Max combined texture units: 16
  Max MSAA samples: 0
  Viewport: 484x423
  GPU memory: 256 MiB
  GPU Texture memory: 237 MiB
  ResolutionRatio: 1
pload VISUALIZATION
vinit
vbackground -cubemap /Users/kirill/develop/kiara_2k_cube.jpg

cubemap_KO.png (219,671) 2021-01-03 00:33
https://tracker.dev.opencascade.org/
Notes
(0098012)
git   
2021-01-03 03:05   
Branch CR32036 has been created by kgv.

SHA-1: 24a6c2b4fda6b60bd181d11ff16c7346f05d49d8


Detailed log of new commits:

Author: kgv
Date: Sun Jan 3 03:05:32 2021 +0300

    0032036: Visualization, TKOpenGl - broken Cubemap background on GeForce 320M
    
    Enable GL_DEPTH_CLAMP while rendering skybox to workaround unexpected clamping issue on some GPUs.
(0098013)
kgv   
2021-01-03 11:10   
Patch is ready for review
- OCCT branch: CR32036.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR32036-master-KGV [^]
(0098024)
git   
2021-01-09 23:53   
Branch CR32036_1 has been created by kgv.

SHA-1: 75c996d3405fa5bb82c6ca29aa761260c34b1be1


Detailed log of new commits:

Author: kgv
Date: Sun Jan 3 03:05:32 2021 +0300

    0032036: Visualization, TKOpenGl - broken Cubemap background on GeForce 320M
    
    Enable GL_DEPTH_CLAMP while rendering skybox to workaround unexpected clamping issue on some GPUs.
(0098084)
osa   
2021-01-12 11:15   
The patch was reviewed without remarks





View Issue Details
32049 [Community] OCCT:Data Exchange major have not tried 2021-01-11 19:24 2021-01-11 22:39
robertlipman  
dpasukhi  
normal  
new 7.5.0  
open  
none    
none  
  7.6.0*  
Data Exchange - STEP file import problems
I have three STEP files that cause import problems with CAD Assistant 1.5.0.2

Two of the files cannot be imported sp7_10_nx-242 and 'Parameter Test Part.stp'. I think I previously submitted the sp7 file as a problem.

The other file sp7_04_dx-242.stp can import correctly, but the part is not visible. The transparency is set to zero. I think I also submitted this file before because it could not be imported.

Other viewers (VariCAD, C3D Viewer, eDrawings) do not have problems importing and displaying the files.
Try the files in CAD Assistant 1.5.0.2
OCC-errors.zip (1,684,006) 2021-01-11 19:24
https://tracker.dev.opencascade.org/
There are no notes attached to this issue.





View Issue Details
30024 [Community] OCCT:Data Exchange feature have not tried 2018-08-07 10:10 2021-01-11 22:39
eryar Windows  
dpasukhi VC++ 2013  
normal 64 bit  
assigned 7.3.0  
open  
none    
none  
  7.6.0*  
Data Exchange - STEP, IGES export support of BRep shapes based on tessellated geometry
occt7.3.0 now support tessellated geometry shape visualization, such as:
readstl s test.stl triangulation
vdisplay s

But when save the tessellated shape to STEP or IGES, such as:
stepwrite 0 s test.step

The saved STEP file have no geometry data.
rec_prac_3dtess_geo_v1.pdf (989,463) 2018-11-26 05:45
https://tracker.dev.opencascade.org/
Notes
(0081251)
eryar   
2018-11-26 05:46   
I upload the Recommended Practices for 3D Tessellated Geometry for STEP,
the document can be downloaded from here:
https://www.cax-if.org/documents/rec_prac_3dtess_geo_v1.pdf [^]
(0081260)
gka   
2018-11-26 11:29   
Implementation of this functionality is not expected in the current version of the Open CASCADE. If you have an urgent need contact us via contact form:
https://www.opencascade.com/contact [^]
(0081273)
eryar   
2018-11-27 18:19   
Hello gka,

I do not have an urgent need for this functionality.

For the BRep shapes based on tessellated geometry, there are now serveral modeling alogirhtms support them, and can be displayed by the visualization module.

For data exchange module, it supports the BREP, STL tessellated shapes. Implementation other file format to exchange tessellated shapes data I think it is important functionality.

Best Regards,





View Issue Details
32028 [Open CASCADE] OCCT:Coding minor have not tried 2020-12-29 12:55 2021-01-11 16:24
kgv  
bugmaster  
normal  
reviewed 7.6.0*  
open  
none    
none  
  7.6.0*  
Coding Rules, StepFile - eliminate CLang warning -Wmisleading-indentation
There are new CLang compiler warnings since 0031756:
shared:INFO: (Emscripten: Running sanity checks)
C:\occt.git\src\StepFile\lex.step.cxx:954:13: warning: misleading indentation; statement is not part 
of the previous 'if' [-Wmisleading-indentation]
            if ( ! (yy_state_buf) )
            ^
C:\occt.git\src\StepFile\lex.step.cxx:952:9: note: previous statement is here
        if ( ! (yy_state_buf) )
        ^
C:\occt.git\src\StepFile\lex.step.cxx:1679:3: warning: misleading indentation; statement is not part 
of the previous 'if' [-Wmisleading-indentation]
                return yy_is_jam ? 0 : yy_current_state;
                ^
C:\occt.git\src\StepFile\lex.step.cxx:1676:2: note: previous statement is here
        if ( ! yy_is_jam )
        ^
2 warnings generated.


Compiler version:
c:\work\Develop\SDKs\emsdk\upstream\bin>clang.exe --version
clang version 12.0.0 (Cswircachegitchromium.googlesource.com-external-github.com-llvm-llvm--project f4c8b80318005ca61bfed9b40ee9e6039194159b)

Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: c:\work\Develop\SDKs\emsdk\upstream\bin
No test case ( the executable code has not been modified )
Notes
(0097987)
git   
2020-12-30 12:23   
Branch CR32028 has been created by dpasukhi.

SHA-1: e3294f3513d14fe07367acd3307d4e98be39aef3


Detailed log of new commits:

Author: dpasukhi
Date: Wed Dec 30 12:20:22 2020 +0300

    0032028: Coding Rules, StepFile - eliminate CLang warning -Wmisleading-indentation
    
    Fixed warning in clang version 10 and newer
(0098059)
git   
2021-01-11 13:55   
Branch CR32028_1 has been created by dpasukhi.

SHA-1: c07366175a40dfb5231e640d53956619f699d6b9


Detailed log of new commits:

Author: dpasukhi
Date: Wed Dec 30 12:20:22 2020 +0300

    0032028: Coding Rules, StepFile - eliminate CLang warning -Wmisleading-indentation
    
    Regenerated the StepFile/lex.step.cxx using the latest version of WinFlexBison
    - Fixed [-Wmisleading-indentation] warning
    - Removed empty lines
(0098060)
git   
2021-01-11 14:05   
Branch CR32028_1 has been updated forcibly by dpasukhi.

SHA-1: 62356acaf530506adae35b16b128a073b416976f
(0098074)
dpasukhi   
2021-01-11 15:47   
Dear kgv,
please review CR32028_1.
I generated step.lex.cxx with the new version of WinFlexBison.
It fixed the problems with incorrect syntax(tabs) and empty lines.
(0098075)
kgv   
2021-01-11 15:51   
Could you please add related fix / pull request in WinFlexBison project here as a comment?
(0098076)
kgv   
2021-01-11 15:51   
Dear bugmaster,

please check warnings on extended list of compilers.
(0098078)
dpasukhi   
2021-01-11 16:24   
Related pull request in WinFlexBison project:
https://github.com/lexxmark/winflexbison/pull/71 [^]

The pull request contains only syntax corrections, the main algorithm has not been modified.





View Issue Details
31918 [Open CASCADE] OCCT:Application Framework feature have not tried 2020-11-11 13:18 2021-01-11 14:58
mpv  
mpv  
normal  
new 7.5.0  
open  
none    
none  
  7.6.0*  
Application Framework - New binary format for fast reading part of OCAF document
In the current version of the binary format the shapes, geometry and triangulation are stored in shapes-section and there is no possibility during the reading of such file to skip this part or some sub-parts of it. So, to read part of the document it is necessary to read this section anyway and keep seek-position of objects that must be loaded during labels and attributes processing.

It is proposed to allow to store binary format in a fast-access mode (so, it can not be loaded by the standard binary format reader and older version of OCCT) for reading part of the document only. It will be quite bigger than standard file, but in case it is loaded partially, it should be much faster, without calling "seek" many times.

The ways to speed-up reading are the following:
- To store shapes, geometry, triangulation and other information just in section of TNaming_NamingShape attribute, where it is located in the data tree.
- To refer only shared shape elements, stored before this attribute (to add also flag to store references or always write copy without referencing).
- To write size of the stored section for each label to allow quickly ignore of reading not needed sections.
Notes
(0098002)
git   
2021-01-01 12:32   
Branch CR31918 has been created by mpv.

SHA-1: 192348a86a29e87ec62ec663ea3688c2c8811f65


Detailed log of new commits:

Author: mpv
Date: Fri Jan 1 12:32:51 2021 +0300

    0031918: Application Framework - New binary format for fast reading part of OCAF document
    
    Initial implementation of new format for quick reading and writing parts of the documents. It consists in writing shapes and all their contents right in the TNaming_NamedShape attribute placement and skipping the shape section.
    
    For the current moment it is implemented as a new version 12 of the binary format. It will be decided later to have it like this and make this version of the format as default, or setting a special flag for such version reading/writing.
    
    Modifications:
    BinLDrivers and BinDrivers packages - modifications related to the quick part tree format flag usage, skipping shape section writing and adding labels sizes into the document to be able to pass labels during the reading quickly.
    BinObjMgt_Persistent amd BinObjMgt_Position - to add possibility to write directly into the stream some data just after the attribute. Before this record a data-size is recorded.
    BinMXCAFDoc package modifications to write BinMXCAFDoc_LocationDriver location in the same way as shapes write location data right after the attribute (empty) data in this new format.
    BinTools package: creation of ShapeReader and ShapeWriter classes with same root class ShapeSetBase with ShapeSet class. These classes allows to write/read shapes directly to the stream. If some object is already in the stream, write a reference - relative position of the duplicated object.
    PCDM_ReaderFilter - modified to be able to browse labels tree quickly, without usage of referencing by entry-strings.
(0098008)
git   
2021-01-02 11:26   
Branch CR31918 has been updated by mpv.

SHA-1: 681f70b515dfd4d996ee1ec061c06a3ba2e2f3a5


Detailed log of new commits:

Author: mpv
Date: Sat Jan 2 11:27:38 2021 +0300

    # fixes for the compilation errors and warnings

(0098009)
git   
2021-01-02 11:59   
Branch CR31918 has been updated by mpv.

SHA-1: 9913d36a8e6b50a88591847e3772d5309d813db6


Detailed log of new commits:

Author: mpv
Date: Sat Jan 2 12:00:27 2021 +0300

    # fixes for the compilation errors and warnings

(0098039)
git   
2021-01-10 12:23   
Branch CR31918_1 has been created by mpv.

SHA-1: 4af86334b3cecda9b6ee2bed0ebe4a78f2a0ba39


Detailed log of new commits:

Author: mpv
Date: Sat Jan 9 18:01:53 2021 +0300

    0031918: Application Framework - New binary format for fast reading part of OCAF document
    
    Initial implementation of new format for quick reading and writing parts of the documents. It consists in writing shapes and all their contents right in the TNaming_NamedShape attribute placement and skipping the shape section.
    
    For the current moment it is implemented as a new version 12 of the binary format. It will be decided later to have it like this and make this version of the format as default, or setting a special flag for such version reading/writing.
    
    Modifications:
    BinLDrivers and BinDrivers packages - modifications related to the quick part tree format flag usage, skipping shape section writing and adding labels sizes into the document to be able to pass labels during the reading quickly.
    BinObjMgt_Persistent amd BinObjMgt_Position - to add possibility to write directly into the stream some data just after the attribute. Before this record a data-size is recorded.
    BinMXCAFDoc package modifications to write BinMXCAFDoc_LocationDriver location in the same way as shapes write location data right after the attribute (empty) data in this new format.
    BinTools package: creation of ShapeReader and ShapeWriter classes with same root class ShapeSetBase with ShapeSet class. These classes allows to write/read shapes directly to the stream. If some object is already in the stream, write a reference - relative position of the duplicated object.
    PCDM_ReaderFilter - modified to be able to browse labels tree quickly, without usage of referencing by entry-strings.
(0098040)
git   
2021-01-10 12:53   
Branch CR31918_1 has been updated by mpv.

SHA-1: c94423fbf0ea082625c683ea02ef617089236afd


Detailed log of new commits:

Author: mpv
Date: Sun Jan 10 12:53:55 2021 +0300

    # fixes for the compilation errors and warnings

(0098049)
git   
2021-01-11 11:59   
Branch CR31918_1 has been updated by mpv.

SHA-1: 58ec12d1a828a1797d971f3c59f1a3cd57a1f2ec


Detailed log of new commits:

Author: mpv
Date: Mon Jan 11 12:00:29 2021 +0300

    # fixes for the compilation errors and warnings

(0098069)
git   
2021-01-11 14:58   
Branch CR31918_1 has been updated by mpv.

SHA-1: 0c40b6e394d5f030fbcedcc6cbcef2fce4dabce8


Detailed log of new commits:

Author: mpv
Date: Mon Jan 11 14:58:55 2021 +0300

    # fixes for the compilation errors and warnings






View Issue Details
31939 [Community] OCCT:Coding minor have not tried 2020-11-15 18:11 2021-01-11 14:21
abv  
bugmaster  
normal  
reviewed 7.5.0  
reopened  
none    
none  
  7.6.0*  
Not required
Coding - correction of spelling errors in comments
The patch containing corrections of spelling errors in comments has been proposed on SALOME user's forum: https://www.salome-platform.org/forum/forum_9/875695368 [^]

According to comment, the corrections are made with codespell tool
N/A
Notes
(0096780)
git   
2020-11-15 18:13   
Branch CR31939 has been created by abv.

SHA-1: 4387239c7281f1371709ab60d503bcc6bf756cff


Detailed log of new commits:

Author: luz paz
Date: Fri Nov 13 10:46:02 2020 -0500

    Fix various typos
    
    Fixed via `codespell v2.0.dev`
(0096782)
git   
2020-11-16 08:58   
Branch CR31939 has been updated forcibly by abv.

SHA-1: 9d7e20e5c60a4af2aad00c7fe628ce50f889f743
(0096783)
abv   
2020-11-16 09:01   
Patch is pushed to branch CR31939, please review. Most of changes are in comments, yet there are some in text strings, and couple of places where spaces in the end of lines are cleared.
(0096932)
bugmaster   
2020-11-21 12:42   
Combination -
OCCT branch : IR-2020-11-20
master SHA - c5892d852bb462075f9db03f31085e35d7b59f35
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-11-20 SHA - a5d1f89f5fa83c955e6a604f57a5b590eb433b43
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: 18024.090000000127 / 17964.340000000077 [+0.33%]
Products
Total CPU difference: 12166.12000000011 / 12169.520000000111 [-0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19696.90625 / 19723.125 [-0.13%]
Products
Total CPU difference: 13644.875 / 13567.078125 [+0.57%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0096952)
git   
2020-11-21 13:27   
Branch CR31939 has been deleted by inv.

SHA-1: 9d7e20e5c60a4af2aad00c7fe628ce50f889f743
(0097009)
eap   
2020-11-23 12:33   
Another patch arrived https://www.salome-platform.org/forum/forum_9/875695368/620840338 [^]

Could you apply it as well?
(0097159)
git   
2020-11-30 12:55   
Branch CR31939 has been created by eap.

SHA-1: 41a907f472f2b9454a1946cb02ee058d5a2ebb2a


Detailed log of new commits:

Author: eap
Date: Mon Nov 30 12:55:48 2020 +0300

    From: luz paz <luzpaz@users.noreply.github.com>
    Date: Sun, 22 Nov 2020 12:07:56 -0500
    
     Fix typos pt.2
(0097160)
eap   
2020-11-30 13:02   
(edited on: 2020-11-30 13:03)
Patch nb.2 is pushed to branch CR31939, please review. Most of changes are in comments, yet there are some in text strings, and couple of places where spaces in the end of lines are cleared.

(0097162)
git   
2020-11-30 13:55   
Branch CR31939 has been updated forcibly by kgv.

SHA-1: ad42f1c3c888ed43ce3b658b240aed9d38832e8d
(0097164)
git   
2020-11-30 14:03   
Branch CR31939 has been updated forcibly by kgv.

SHA-1: a110c4a3777de359b6bbe2b3baeb99fe34f2bdf7
(0097165)
kgv   
2020-11-30 14:06   
Please raise the second patch
- OCCT branch: CR31939.
(0097343)
bugmaster   
2020-12-05 11:56   
Combination -
OCCT branch : IR-2020-12-04
master SHA - 1e08a76f1e872a1f38931a6c3e8cf71396fc1209
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-12-04 SHA - cb56638fb6b31df41b28133f69a1dc202dcb56aa
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: 18090.67999999998 / 18052.040000000085 [+0.21%]
Products
Total CPU difference: 12342.950000000128 / 12326.850000000131 [+0.13%]
Windows-64-VC14:
OCCT
Total CPU difference: 19751.5 / 19705.828125 [+0.23%]
Products
Total CPU difference: 13772.515625 / 13793.796875 [-0.15%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0097365)
git   
2020-12-05 13:01   
Branch CR31939 has been deleted by inv.

SHA-1: a110c4a3777de359b6bbe2b3baeb99fe34f2bdf7
(0097465)
git   
2020-12-10 11:40   
Branch CR31939 has been created by eap.

SHA-1: 39e626cb2552bd0fb584011d2e2dc7c286c0feed


Detailed log of new commits:

Author: eap
Date: Thu Dec 10 11:40:53 2020 +0300

    Fix typos (pt 3)
    
    From: luz paz <luzpaz@users.noreply.github.com>
    Date: Tue, 8 Dec 2020 13:41:05 -0500
    
    Found using `codespell 2.1.dev0`
(0097466)
eap   
2020-12-10 11:45   
Patch nb.3 is pushed to branch CR31939, please review. Most of changes are in comments and *.md files
(0097506)
git   
2020-12-11 18:54   
Branch CR31939 has been updated forcibly by kgv.

SHA-1: 7eccbd43b77c419ee8150b2048d4f05d1ffd509e
(0097508)
git   
2020-12-11 19:11   
Branch CR31939 has been updated forcibly by kgv.

SHA-1: 1fea54089d4e28204b9c28c8f50c3e6b018e19d0
(0097509)
kgv   
2020-12-11 19:11   
Please raise the patch
- OCCT branch: CR31939.

Testing is not needed.
(0097527)
bugmaster   
2020-12-12 12:56   
Combination -
OCCT branch : IR-2020-12-11
master SHA - a25d5aaa30ec81c1fb94a9a394b8afa740611203
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-12-11 SHA - 32a7f74b10f27f9251808f20fdfe1444ff30c60b
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: 17756.510000000126 / 18090.92999999998 [-1.85%]
Products
Total CPU difference: 12330.210000000125 / 12342.950000000128 [-0.10%]
Windows-64-VC14:
OCCT
Total CPU difference: 19429.09375 / 19751.71875 [-1.63%]
Products
Total CPU difference: 13755.5 / 13772.515625 [-0.12%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0097530)
git   
2020-12-12 13:46   
Branch CR31939 has been deleted by inv.

SHA-1: 1fea54089d4e28204b9c28c8f50c3e6b018e19d0
(0097629)
git   
2020-12-16 11:57   
Branch CR31939 has been created by eap.

SHA-1: ba4a7562e518822a77a4329b96cd2969f01bf1fe


Detailed log of new commits:

Author: eap
Date: Wed Dec 16 11:58:16 2020 +0300

    Coding - correction of spelling errors in comments [part 4]
    
    From: luz paz <luzpaz@users.noreply.github.com>
(0097630)
eap   
2020-12-16 12:03   
Patch nb.4 is pushed to branch CR31939, please review.
(0097642)
git   
2020-12-16 15:04   
Branch CR31939 has been updated forcibly by kgv.

SHA-1: 6b75472de65887261562b21eec61844164d437ed
(0097643)
kgv   
2020-12-16 15:05   
Please raise the patch.
(0097750)
bugmaster   
2020-12-19 14:50   
Combination -
OCCT branch : IR-2020-12-18
master SHA - 04114fd201c20efe9fbe85f00bec9a99ae3747ad
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-12-18 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
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: 17709.570000000054 / 17744.450000000124 [-0.20%]
Products
Total CPU difference: 12258.480000000121 / 12330.210000000125 [-0.58%]
Windows-64-VC14:
OCCT
Total CPU difference: 19272.796875 / 19429.1875 [-0.80%]
Products
Total CPU difference: 13712.859375 / 13755.5 [-0.31%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0097770)
git   
2020-12-19 15:22   
Branch CR31939 has been deleted by inv.

SHA-1: 6b75472de65887261562b21eec61844164d437ed
(0097824)
git   
2020-12-21 11:47   
Branch CR31939 has been created by eap.

SHA-1: 2e1e4ed33761094549eb0dce10386a38d4ad8b94


Detailed log of new commits:

Author: eap
Date: Mon Dec 21 11:48:18 2020 +0300

    Coding - correction of spelling errors in comments [part 5]
    
      From: luz paz <luzpaz@users.noreply.github.com>
      Fixed via `codespell v2.1.dev`
(0097825)
eap   
2020-12-21 11:51   
Patch nb 5 pushed to branch CR31939, please review.
(0097826)
git   
2020-12-21 12:55   
Branch CR31939 has been updated forcibly by kgv.

SHA-1: 30320fa35eb090f88452c483aec64619dbd056bd
(0097827)
kgv   
2020-12-21 12:55   
Please raise the patch.
(0097910)
bugmaster   
2020-12-26 12:14   
Combination -
OCCT branch : WEEK-52
master SHA - 41046145c4a15f5cedf5f3c5877952ee00d568b4
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : WEEK-52 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
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: 17722.770000000193 / 17710.950000000055 [+0.07%]
Products
Total CPU difference: 12416.490000000109 / 12412.520000000126 [+0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.5625 / 19274.6875 [+0.24%]
Products
Total CPU difference: 13844.421875 / 13853.046875 [-0.06%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0097946)
git   
2020-12-26 14:53   
Branch CR31939 has been deleted by inv.

SHA-1: 30320fa35eb090f88452c483aec64619dbd056bd
(0098053)
git   
2021-01-11 12:28   
Branch CR31939 has been created by eap.

SHA-1: c82ba66314eacf7ebdecd65ac0b00a5ad070dc50


Detailed log of new commits:

Author: eap
Date: Mon Jan 11 12:29:28 2021 +0300

    Coding - correction of spelling errors in comments [part 6]
(0098054)
eap   
2021-01-11 12:31   
Patch nb 6 pushed to branch CR31939, please review.
(0098062)
git   
2021-01-11 14:20   
Branch CR31939 has been updated forcibly by kgv.

SHA-1: 9b2082f4c4962b28531ece77e4213fffb755076d
(0098063)
kgv   
2021-01-11 14:21   
Please raise updated patch
- OCCT branch: CR31939.





View Issue Details
32008 [Open CASCADE] OCCT:Modeling Algorithms minor have not tried 2020-12-18 13:55 2021-01-11 11:57
kgv  
kgv  
normal  
assigned 7.5.0  
open  
none    
none  
  7.6.0*  
Modeling Algorithms - disallow implicit copy of Extrema algorithms
Extrema classes provides implicit copy constructors, however these tools look too heavy for such usage and better to be avoided.
Notes
(0097710)
git   
2020-12-18 14:29   
Branch CR32008 has been created by kgv.

SHA-1: f56afcbba711c2826f24d486a726c5293687e7db


Detailed log of new commits:

Author: kgv
Date: Fri Dec 18 14:29:59 2020 +0300

    0032008: Foundation Classes - NCollection_Array2::Resize() does not allocate pointer array
    
    NCollection_Array2::Resize() has been fixed to set myDeletable before calling Allocate().
    
    Extrema_GenExtPS now prefers resizing of Array2 tables instead of managing tables by extra handles.
    Removed unsafe casts to Adaptor3d_SurfacePtr/Adaptor3d_CurvePtr in Extrema classes.
(0097732)
git   
2020-12-18 22:11   
Branch CR32008 has been updated forcibly by kgv.

SHA-1: a6e54da0c0a51ea4c126b19d6e0a95fa669bae48
(0097807)
git   
2020-12-19 16:02   
Branch CR32008 has been updated forcibly by kgv.

SHA-1: acc3c3e62fd1610a17a170431f4adf63d68bda66
(0097810)
kgv   
2020-12-19 22:14   
Patch is ready for review
- OCCT branch: CR32008.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR32008-master-KGV/ [^]
(0098026)
git   
2021-01-10 00:34   
Branch CR32008_1 has been created by kgv.

SHA-1: 59254ea75a2acbf9a31ea7d0966d2c5c5938746f


Detailed log of new commits:

Author: kgv
Date: Fri Dec 18 14:29:59 2020 +0300

    0032008: Modeling Algorithms - disallow implicit copy of Extrema algorithms
    
    Extrema_GenExtPS now prefers resizing of Array2 tables instead of managing tables by extra handles.
    Removed unsafe casts to Adaptor3d_SurfacePtr/Adaptor3d_CurvePtr in Extrema classes.
    
    Extrema_GenExtPS, Extrema_GenExtSS, Extrema_ExtCS -
    copies by value are now disallowed;
    several unexpected places copying the object have been fixed.
    
    IntTools_Context - maps of void* have been replaced by typed maps.
(0098048)
msv   
2021-01-11 11:57   
Why didn't you get rid of void* for the type of curves in Extrema_ExtCC?
  Standard_Address myC[2];


+ myECC = Extrema_ECC (C1, C2),
...
+ myECC = Extrema_ECC (C1, C2, U1, U2, V1, V2),

(Use semicolon instead of comma at the end of statements.)
Avoid usage of these copy-ctors, as in Perform() the first thing is done is initialization of myECC.

+ NCollection_DataMap<Handle(Standard_Transient), GeomAPI_ProjectPointOnCurve*, TColStd_MapTransientHasher> myProjPTMap;

Please replace the key type Handle(Standard_Transient) with Handle(Geom_Curve).





View Issue Details
32043 [Community] OCCT:Visualization just a question have not tried 2021-01-08 05:32 2021-01-11 11:35
xuweibin Windows  
bugmaster VC++ 2013  
normal 64 bit  
feedback 7.5.0  
no change required  
none    
none  
  7.6.0*  
How to set a shape to disable zoom?
My code like below:
TopoDS_Shape box = BRepPrimAPI_MakeBox(gp_Pnt(300,0,0),gp_Pnt(400,100,100));
Handle(AIS_Shape) ais = new AIS_Shape(box);
Handle(Graphic3d_TransformPers) theTrsfPers = new Graphic3d_TransformPers(Graphic3d_TransModeFlags::Graphic3d_TMF_ZoomPers,gp_Pnt(300,0,0));
mycontext->Display(ais,true);

I want to disable zoom the box at point(300,0,0);The result is not what I want.
This is a mistake?Or how can I do to solve this problem?
Notes
(0098015)
kgv   
2021-01-08 13:05   
What do you mean result is not what do you expect?
If you expect box being non-zoomable from it's center, you would want to defining it's coordinate system appropriately (e.g. the box itself should be defined relative to 0,0,0, not anchor point 300,0,0 - the latter should be passed to transformation persistence parameters).
pload MODELING VISUALIZATION
vinit View1
box b -200 -50 -50 400 100 100
vdisplay -dispMode 0 b -trsfPers zoom -trsfPersPos 300 0 0
vtrihedron t -origin 300 0 0
(0098041)
xuweibin   
2021-01-11 06:05   
I do not understand.
My box is MakeBox(gp_Pnt(300,0,0),gp_Pnt(400,100,100))
Do you mean I should set the anchor point at the box's center point(50,50,50)?

pload MODELING VISUALIZATION
vinit View1
box b 300 0 0 400 100 100
vdisplay -dispMode 0 b -trsfPers zoom -trsfPersPos 50 50 50
vtrihedron t -origin 50 0 0

The result is not non-zoomable at point(50,50,50).
How can i do?
(0098042)
kgv   
2021-01-11 08:27   
> My box is MakeBox(gp_Pnt(300,0,0),gp_Pnt(400,100,100))
You are creating a box from 2 points, so that it is of size 100x100x100 and with center (350,50,50) within coordinate system having origin in (0,0,0). Then you are telling it to be non-zoomable at some point; start with anchor point (0,0,0) to see how it works - you will see that anchor point defines the new location of box's coordinate system, not box's center. To make it visible you can display a TopoDS_Compound containing your box and TopoDS_Vertex created from (0,0,0) point.
pload MODELING VISUALIZATION
box b -min 300 0 0 -max 400 100 100
vertex v 0 0 0
compound b v c
vdisplay -dispMode 0 c -trsfPers zoom -trsfPersPos 300 0 0
vtrihedron t -origin 300 0 0


If you would like box to be non-zoomable from it's center, then you should define the box in the way so that it's center will be (0,0,0) point - like MakeBox(gp_Pnt(-50,-50,-50),gp_Pnt(50,50,50)).
pload MODELING VISUALIZATION
box b -min -50 -50 -50 -max 50 50 50
vertex v 0 0 0
compound b v c
vdisplay -dispMode 0 c -trsfPers zoom -trsfPersPos 300 0 0
vtrihedron t -origin 300 0 0
(0098043)
xuweibin   
2021-01-11 09:16   
I test and see the result.
The method is not what I want;
If I want to disable zoon a box at its center,and the center of box is not point(0,0,0).How can I do to realize needs?
(0098045)
kgv   
2021-01-11 09:55   
(edited on: 2021-01-11 09:55)
> If I want to disable zoon a box at its center,and the center of box is not point(0,0,0). How can I do to realize needs?
You need either redefine the box or modify it's coordinate system (AIS_InteractiveObject::SetLocalTransformation()/AIS_InteractiveContext::SetLocation() or apply TopLoc_Location to TopoDS_Shape).

pload MODELING VISUALIZATION
box b -min 300 0 0 -max 400 100 100
vertex v 0 0 0
compound b v c
vdisplay -dispMode 0 c -trsfPers zoom -trsfPersPos 300 0 0
vlocation c -location -350 -50 -50
vtrihedron t -origin 300 0 0


(0098046)
xuweibin   
2021-01-11 11:32   
Thank you!I got it!
(0098047)
kgv   
2021-01-11 11:35   
Dear bugmaster,

please close this issue.





View Issue Details
32041 [Community] OCCT:Modeling Data crash have not tried 2021-01-07 10:10 2021-01-11 09:46
alexzkw Windows  
bugmaster Windows  
normal 10  
reviewed 5.2.2  
open  
none    
none  
  7.6.0*  
Modeling Data - Access violation ExchangeUV in Geom_BezierSurface
Calling method ExchangeUV() in Geom_BezierSurface may lead to Access Violation.
pload MODELING
beziersurf bs 4 4  0  0 0  4 0 0  8 0 0  12 0 0 0  4 0  4 4 1  8 4 0  12 4 0 0  8 0  4 8 0  8 8 -1  12 
8 0 0 12 0 4 12 0 8 12 0 12 12 0
exchuv bs


C++ Code to reproduce:
TColgp_Array2OfPnt anArr(1, 2, 1, 3);
anArr.SetValue(1, 1, gp_Pnt(0, 0, 0));
anArr.SetValue(1, 2, gp_Pnt(0, 1, 0));
anArr.SetValue(1, 3, gp_Pnt(0, 2, 0));
anArr.SetValue(2, 1, gp_Pnt(1, 0, 0));
anArr.SetValue(2, 2, gp_Pnt(1, 1, 0));
anArr.SetValue(2, 3, gp_Pnt(1, 2, 0));

const Handle(Geom_BezierSurface) aBezierSurf = new Geom_BezierSurface(anArr);
aBezierSurf->ExchangeUV();
Notes
(0098014)
zale_lzj   
2021-01-08 06:38   
There are no check the member variable (address of weights) exist or not, Geom_BSplineSurface has this problem also.
(0098018)
git   
2021-01-09 23:30   
Branch CR32041 has been created by kgv.

SHA-1: 873d7742233e98fb42f43d6ec20281a58b6a1014


Detailed log of new commits:

Author: kgv
Date: Thu Jan 7 23:10:27 2021 +0300

    0032041: Modeling Data - Access violation ExchangeUV in Geom_BezierSurface
    
    Added missing NULL-checks to Geom_BezierSurface::ExchangeUV() and Geom_BSplineSurface::ExchangeUV().
(0098027)
kgv   
2021-01-10 01:21   
Patch is ready for review
- OCCT branch: CR32041.

http://jenkins-test-12.nnov.opencascade.com/view/CR32041-master-KGV/ [^]
(0098044)
msv   
2021-01-11 09:46   
For integration:
occt - CR32041
products - none





View Issue Details
32037 [Open CASCADE] OCCT:Visualization integration request have not tried 2021-01-04 11:51 2021-01-10 02:05
kgv  
bugmaster  
normal  
reviewed  
open  
none    
none  
  7.6.0*  
Visualization - move V3d_View::FitMinMax() to Graphic3d_Camera::FitMinMax()
V3d_View::FitMinMax() is currently an internal method adjusting camera, but it could be useful also outside of V3d_View.

It is proposed moving implementation to Graphic3d_Camera::FitMinMax(), which will be consistent with another Graphic3d_Camera::ZFitAll() method.
N/A
Notes
(0098019)
git   
2021-01-09 23:33   
Branch CR32037 has been created by kgv.

SHA-1: 2eb1f2d2b2032f296a9bc2ac233e534076b16cc7


Detailed log of new commits:

Author: kgv
Date: Mon Jan 4 11:53:24 2021 +0300

    0032037: Visualization - move V3d_View::FitMinMax() to Graphic3d_Camera::FitMinMax()
(0098031)
kgv   
2021-01-10 02:05   
Please raise the patch
- OCCT branch: CR32037.





View Issue Details
32038 [Open CASCADE] OCCT:Visualization integration request have not tried 2021-01-04 11:55 2021-01-10 02:05
kgv  
bugmaster  
normal  
reviewed  
open  
none    
none  
  7.6.0*  
Visualization, OpenGl_View - move out framebuffer initialization from ::Redraw() to ::prepareFrameBuffers()
Currently OpenGl_View::Redraw() is overloaded with a large block initializing FBOs.
It is proposed moving out this block into dedicated method OpenGl_View::prepareFrameBuffers().
N/A
Notes
(0098020)
git   
2021-01-09 23:33   
Branch CR32038 has been created by kgv.

SHA-1: 2cb977151ff7b427d639b3a783525ea516507d88


Detailed log of new commits:

Author: kgv
Date: Mon Jan 4 03:26:51 2021 +0300

    0032038: Visualization, OpenGl_View - move out framebuffer initialization from ::Redraw() to ::prepareFrameBuffers()
(0098030)
kgv   
2021-01-10 02:04   
Please raise the patch
- OCCT branch: CR32038.





View Issue Details
32040 [Open CASCADE] OCCT:Visualization integration request have not tried 2021-01-04 12:02 2021-01-10 02:04
kgv  
bugmaster  
normal  
reviewed  
open  
none    
none  
  7.6.0*  
Visualization, OpenGl_View - merge OpenGl_View_Redraw.cxx into OpenGl_View.cxx
OpenGl_View_Redraw.cxx / OpenGl_View.cxx separation is obsolete and redundant - it is proposed merging these files.
N/A
Notes
(0098021)
git   
2021-01-09 23:34   
Branch CR32040 has been created by kgv.

SHA-1: 7ad364d52c09a668d77e0c50a3bc63e08015c6e1


Detailed log of new commits:

Author: kgv
Date: Mon Jan 4 12:13:38 2021 +0300

    0032040: Visualization, OpenGl_View - merge OpenGl_View_Redraw.cxx into OpenGl_View.cxx
(0098029)
kgv   
2021-01-10 02:04   
Please raise the patch
- OCCT branch: CR32040.





View Issue Details
31646 [Open CASCADE] OCCT:Visualization feature have not tried 2020-07-02 10:37 2021-01-09 23:24
kgv  
iko  
normal  
new  
open  
none    
none  
  7.6.0*  
Visualization - shadow mapping within real-time renderer
It is desired extending real-time renderer with shadow mapping capabilities.
Notes
(0098017)
git   
2021-01-09 23:24   
Branch CR31646_3 has been created by kgv.

SHA-1: ab34662b0346ac946e345f39781150ae31dee410


Detailed log of new commits:

Author: kgv
Date: Mon Jan 4 12:17:44 2021 +0300

    0032039: Visualization, TKOpenGl - implement simple shadow mapping for a direct light source
    
    Graphic3d_CLight::ToCastShadows() - added new property defining if light should cast shadows (ignored by Ray-Tracing).
    
    OpenGl_ShaderManager::stdComputeLighting() now implements shadow mapping for directional lights.
    OpenGl_ShaderManager::prepareGeomMainSrc() now handles copying of arrays.
    OpenGl_Context::ShadowMapTexUnit() - added property defining an offset for shadow map texture units.
    OpenGl_ShadowMap - added new class storing shadow map FBO with parameters.
    OpenGl_View::prepareFrameBuffers() - added resizing of shadow map FBOs.
    OpenGl_View::Redraw() - added section redrawing scene into shadow map FBOs via OpenGl_View::renderShadowMap() method.
    
    vrenderparams - added new parameters -shadowMapResolution and -shadowMapBias.

Author: kgv
Date: Thu Jan 7 23:10:27 2021 +0300

    0032041: Modeling Data - Access violation ExchangeUV in Geom_BezierSurface
    
    Added missing NULL-checks to Geom_BezierSurface::ExchangeUV() and Geom_BSplineSurface::ExchangeUV().

Author: kgv
Date: Fri Jan 8 00:48:29 2021 +0300

    0032042: Visualization, TKOpenGl - pre-multiply headlight flag into light source position
    
    OpenGl_ShaderManager::pushLightSourceState() now pre-multiplies headlight transformation.
    Built-in shading GLSL programs have been updated to remove special handling if headlight flag;
    also removed redundant pre-normalization of light source direction
    (already normalized implicitly by Graphic3d_CLight interface).
    
    Graphic3d_CLight::SetHeadlight() now raises exception in case of ambient light type.
    OpenGl_ShaderManager::SetLastView() - removed unused property.

Author: kgv
Date: Mon Jan 4 12:13:38 2021 +0300

    0032040: Visualization, OpenGl_View - merge OpenGl_View_Redraw.cxx into OpenGl_View.cxx

Author: kgv
Date: Mon Jan 4 03:26:51 2021 +0300

    0032038: Visualization, OpenGl_View - move out framebuffer initialization from ::Redraw() to ::prepareFrameBuffers()

Author: kgv
Date: Mon Jan 4 11:53:24 2021 +0300

    0032037: Visualization - move V3d_View::FitMinMax() to Graphic3d_Camera::FitMinMax()





View Issue Details
31920 [Open CASCADE] OCCT:Application Framework feature have not tried 2020-11-11 17:33 2021-01-02 12:19
nds  
nds  
normal  
feedback  
open  
none    
none  
  7.6.0*  
Application Framework - speed up methods of getting label by entry and vice versa
It's proposed to implement some cache for Label, Entry methods of TDF_Tool.

When these methods are called for the same values, it takes too much time in a custom application. If we have some cache, it lets save time. If cache used, it requires additional memory for it. By this reason, it would be nice to make such cache optional. Then, the application might decide which way is more preferable.

It's proposed to implement it on OCCT side, not in the custom application because there are some internal places in OCCT, where this methods are also used, e.g.
STEPCAFControl_Reader for TDF_Tool::Entry,
XCAFPrs_DocumentExplorer, for TDF_Tool::Label.

The proposal of container is:
- tbb::concurrent_unordered_map<TCollection_AsciiString, TDF_Label, TCollection_AsciiStringHash, TCollection_AsciiStringEqual> m_ELCache;
(if tbb is used)
or
- std::map<TCollection_AsciiString, TDF_Label> m_ELCache;


Notes
(0097998)
git   
2020-12-31 12:51   
Branch CR31920 has been created by vro.

SHA-1: a0cd478719e7d29da73614a0b4cb11cd7f389cfd


Detailed log of new commits:

Author: vro
Date: Thu Dec 31 12:52:03 2020 +0300

    0031920: Application Framework - speed up methods of getting label by entry and vice versa
    
    A table for fast access to the labels by entry is implemented in OCAF document. A method TDF_Data::SetAccessByEntries(true) fills-in a table for fast access to the labels. New labels, created later will be added to the table automatically. The method TDF_Tool::Label() will search the entry in the table and then, if not found, will call the old code. Disabling of usage of the table (by calling of TDF_Data::SetAccessByEntries(false)) cleans the internal table of entries - labels. By default, the table is not used.
    This improvement is useful for large documents with a lot of labels, and if the application uses entries to get labels. The application should call TDF_Data::SetAccessByEntries(true) for a document and then, the method TDF_Tool::Label() called inside OCAF and XCAF will use the fast access to the labels and speed-up the application.
    Also, the method TDF_Tool::Entry() is improved (by MPV).
    
    Modified files:
    - TDF_Data.hxx and cxx: the new methods SetAccessByEntries(bool), IsAccessByEntries() and GetLabel(entry) are implemented. No need to use the method GetLabel() directly. It is called in TDF_Tool::Label().
    - TDF_Label.cxx: adding of a newly created label to the table of entries - labels.
    - TDF_Tool.cxx: the method Entry() is accelerated (by MPV) and Label() is improved to call TDF_Data::GetLabel().
    - DDF_DataCommands.cxx: a new draw-command is added SetAccessByEntry, which sets or unsets usage of the table for fast access to the labels. Usage of the draw-command is illustrated in a new test "bugs caf bug31920".
    
    Tests:
    - bugs caf bug31920: a new simple test to check TDF_Tool::Label() when fast access to the labels is on.
    
    For test purpose I set usage of the table by default to true (temporary) and re-ran all test grids - it works!
(0097999)
git   
2020-12-31 15:34   
Branch CR31920_1 has been created by vro.

SHA-1: 8f2e87bddeffea13156ca6b0d7a1ae7619403844


Detailed log of new commits:

Author: vro
Date: Thu Dec 31 15:34:42 2020 +0300

    0031920: Application Framework - speed up methods of getting label by entry and vice versa
    
    // A method TDF_Data::AddLabel() is set Standard_EXPORT.
(0098004)
kgv   
2021-01-01 21:45   
vro wrote:

Dear MPV, couldyou review, please: http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31920_1-master-VRO/view/COMPARE/. [^] [^]

A test "perf NCollection A1" fails, I don't know a reason... but it seems my little changes can't introduce such a regression...

The branch:
OCCT - CR31920_1
Products - none.

A test:
bugs caf bug31920 - it tests a new draw-command SetAccessByEntry.
(0098005)
kgv   
2021-01-01 21:49   
(edited on: 2021-01-01 21:50)
Vlad, speeding up Application Framework is great.

But could you please share here some measured numbers comparing performance of old/new implementations and some use case(s) where this difference is noticeable (probably, the latter could be shared by Natalia)?

(0098006)
vro   
2021-01-02 09:23   
Hello Kirill!

Certainly, I have some data on performance. But the end user is Natasha and only she could say whether it speeds-up the application or not...

So, the test:
- for TDF_Tool::Entry(), it was improved by Mikhail. For a big document (taranis.xbf, about 100Mb) I call TDF_Tool::Entry() for each label of the document 20 times. It was 1.5 seconds, now 0.08 seconds - about 20 times faster.
- for TDF_Tool::Label(), a similar test: I collected entries for all labels of the document and call TDF_Tool::Label() for each label 20 times. It was 0.5 seconds, now 0.04 seconds - about 10 times faster. Mikhail has an idea to use an array instead of a map. If this improvement is not enough, we could use an array... but it is more complicated and I would like to use a simple solution before implementation of a complicated.

May be it worth waiting for the tests from Natasha? I didn't ask her for testing yet...
(0098007)
mpv   
2021-01-02 11:06   
  Dear Natalia,

Could you check the improvements implemented are good for your demands and may be share with us some numbers of speedup on real use-cases.
(0098010)
vro   
2021-01-02 12:19   
Dear Natasha, by default the acceleration of the method TDF_Tool::Entry() is inactive. In order to activate it call a method anylabel.Data()->SetAccessByEntries(true). Nothing more is needed, since then it should work faster, hope so...





View Issue Details
31481 [Open CASCADE] OCCT:Data Exchange integration request have not tried 2020-04-02 01:16 2020-12-31 16:25
abv  
abv  
normal  
resolved  
open  
none    
none  
  7.6.0*  
Data Exchange - provide parser of STEP EXPRESS schema for generation of new STEP entities
ExpToCas tool has been developed in 1999-2002 for generation of new classes in OCCT DE module, representing entities from STEP standard. It includes parser of EXPRESS schema and generator of CDL and CXX files that can be easily added to the OCCT STEP reader.

As new classes need to be added from time to time, it makes sense to integrate this tool to OCCT.
Not possible
Notes
(0091399)
git   
2020-04-02 01:20   
Branch CR31481 has been created by abv.

SHA-1: 3ac2d4ca774dada5905dd8f6ed62aa8c95c285be


Detailed log of new commits:

Author: abv
Date: Thu Apr 2 01:21:08 2020 +0300

    0031481: Data Exchange - provide parser of STEP EXPRESS schema for generation of new STEP entities
    
    Integration of ExpToCas tool ported to modern state of OCCT:
    - new package Express and toolkit TKExpress for EXPRESS data structures and OCCT class generator
    - executable ExpToCasExe including lax/yacc parsers, for parsing a Part 21 file and generating classes
    
    Off-topic: genproj.tcl is improved to deal correctly with FILES files containing CRLF end-of-lines
(0091400)
abv   
2020-04-02 01:22   
I have updated old ExpToCas tool to build with current OCCT, and put it as a branch in OCCT code. What remains is to update code generator to produce modern code (at minimum, generate HXX instead of CDL).
(0091402)
git   
2020-04-02 09:44   
Branch CR31481 has been updated forcibly by abv.

SHA-1: 88b6bbb93dcb927aae800b87a6a8219964c2f23e
(0091412)
git   
2020-04-02 13:55   
Branch CR31481 has been updated by abv.

SHA-1: 48609845416c2b4b8429a498121185b7d5bed2d3


Detailed log of new commits:

Author: abv
Date: Thu Apr 2 13:56:31 2020 +0300

    // add missing files

(0091601)
git   
2020-04-16 19:01   
Branch CR31481 has been updated forcibly by ika.

SHA-1: f089155a022993f29b4fdbd3a8b25b89d9f41055
(0091688)
git   
2020-04-20 18:07   
Branch CR31481 has been updated forcibly by ika.

SHA-1: 447a80ecb5edc2fd108b9070d57aa88c01f216a8
(0091747)
git   
2020-04-23 19:05   
Branch CR31481 has been updated forcibly by ika.

SHA-1: 8a3d9d3eba4006680342a06d42924e28a4024ae4
(0091877)
git   
2020-04-29 19:27   
Branch CR31481 has been updated forcibly by ika.

SHA-1: ea4ec0eda802a9a3b0489877f44c273d32fdcbed
(0091921)
git   
2020-04-30 21:29   
Branch CR31481 has been updated by abv.

SHA-1: fe21a380c78295bba59c7a92c533d89f014de5f1


Detailed log of new commits:

Author: abv
Date: Thu Apr 30 21:29:57 2020 +0300

    Fix parser to avoid loosing fields after redefinition of inherited field (SELF\field = type;)

(0092067)
git   
2020-05-11 21:35   
Branch CR31481 has been updated by Igor.

SHA-1: 0580c8b11a5e15778971ac4e915212e8eabdfb7d


Detailed log of new commits:

Author: Igor Khozhanov
Date: Mon May 11 21:27:50 2020 +0300

    Fixed casting pointer to int error.
    Fixed /**/ comment inside comment warnings.
    Fixed converting string constant to 'char*' warning.

(0093564)
git   
2020-08-20 15:54   
Branch CR31481 has been updated forcibly by ika.

SHA-1: 9d659909bb074a370da3229f848cb5d779a7a325
(0093648)
git   
2020-08-26 18:27   
Branch CR31481 has been updated forcibly by ika.

SHA-1: 260f1b2e2e7fb8b6a572b64b950fd0f48dcf81dd
(0093669)
git   
2020-08-27 14:46   
Branch CR31481 has been updated forcibly by ika.

SHA-1: b307021a3da5f55b8fe52bb8d99e74d0adeba84e
(0093672)
git   
2020-08-27 19:06   
Branch CR31481 has been updated forcibly by ika.

SHA-1: eb0dbd1c84f25b961ab3ad0985cac22ed61e51fe
(0093698)
git   
2020-08-28 15:38   
Branch CR31481 has been updated forcibly by ika.

SHA-1: 1f02cd5f2139446df96b07cae5cdd9018e638278
(0093699)
git   
2020-08-28 15:58   
Branch CR31481_1 has been created by ika.

SHA-1: 98831117a4bf4dd66dc2efbaed0734f8fb4567fc


Detailed log of new commits:

Author: abv
Date: Thu Apr 2 01:21:08 2020 +0300

    0031481: Data Exchange - provide parser of STEP EXPRESS schema for generation of new STEP entities
    
    Integration of ExpToCas tool ported to modern state of OCCT:
    - new package Express and toolkit TKExpress for EXPRESS data structures and OCCT class generator
    - executable ExpToCasExe including lax/yacc parsers, for parsing a Part 21 file and generating classes
    
    Off-topic: genproj.tcl is improved to
    - deal correctly with FILES files containing CRLF end-of-lines
    - generate one project per executable unit (instead of one project per cxx file); note that this matches behaviour of CMake generator
(0093700)
ika   
2020-08-28 16:00   
Dear ABV,

could you please review the CR31481_1 branch?
(0094166)
kgv   
2020-09-06 11:59   
It would be nice formatting added files following OCCT Coding Rules / cleaning up code from redundant empty lines.

+  std::ofstream os ( pack.Cat ( ".hxx" ).ToCString() );

Shouldn't it be OSD_OpenStream()?

+++ b/src/TKExpress/EXTERNLIB
@@ -0,0 +1,2 @@
+TKernel
+CSF_TBB

CSF_TBB is really necessary for this toolkit?
(0097016)
abv   
2020-11-23 21:58   
This patch shall be updated before integration:
- rebase on master
- regenerate flex scanner and bison parser using relevant CMake option (see 0031740 and 0027342), version to be used is win_flex_bison 2.5.23 (flex 2.6.4, bison 3.7.1), available in \\master\projects\occt-3rdparty\occt700products\win_flex_bison-2.5.23
- revise executables in ExpToCasExe: ones which are useful shall be preserved and documented, others better be removed
- revise scripts and resource files in ExpToCasExe to keep only ones that are useful. Note that we definitely need to have resource file describing distribution of STEP entities by packages in OCCT.
- It should be checked where we can keep files with STEP Express schemas (they are probably copyrighted and may not be distributed).
(0097108)
git   
2020-11-27 13:50   
Branch CR31481_1 has been updated forcibly by skl.

SHA-1: 4854f142ab0d3a2daedf1ade762ceda02bd5a1b1
(0097153)
git   
2020-11-30 11:35   
Branch CR31481_1 has been updated by skl.

SHA-1: 9b1dc148be73cae6982dadc829581bc71f93e18b


Detailed log of new commits:

Author: skl
Date: Mon Nov 30 11:35:00 2020 +0300

    0031481: Data Exchange - provide parser of STEP EXPRESS schema for generation of new STEP entities
    
    Changes for correspondence generated files to OCCT Code Rules.

(0097154)
git   
2020-11-30 11:36   
Branch CR31481_1 has been updated forcibly by skl.

SHA-1: 47d03fa5ebe82706506ecc76926e9443aa43f6e5
(0097172)
git   
2020-11-30 15:33   
Branch CR31481_1 has been updated by skl.

SHA-1: 7bc54d2e4eb535ada5b91eddf26380aadecbb1e2


Detailed log of new commits:

Author: skl
Date: Mon Nov 30 15:32:29 2020 +0300

    0031481: Data Exchange - provide parser of STEP EXPRESS schema for generation of new STEP entities
    
    Next part of formatting added files following OCCT Coding Rules.

(0097192)
git   
2020-12-01 11:41   
Branch CR31481_1 has been updated by skl.

SHA-1: 423a0239983e67b20743753326d8787f73fd5aa1


Detailed log of new commits:

Author: skl
Date: Tue Dec 1 11:40:51 2020 +0300

    0031481: Data Exchange - provide parser of STEP EXPRESS schema for generation of new STEP entities
    
    Next changes for correspondence generated files to OCCT Code Rules.

(0097232)
git   
2020-12-02 10:36   
Branch CR31481_1 has been updated by skl.

SHA-1: 44bb1c31502142599ecd1b88d37660671bbf2181


Detailed log of new commits:

Author: skl
Date: Wed Dec 2 10:36:38 2020 +0300

    0031481: Data Exchange - provide parser of STEP EXPRESS schema for generation of new STEP entities
    
    Add generation hxx files with declaration of arrays.
    If field is a HArray1 method for get length of array and method for get element of array by its index are generated.

(0097407)
git   
2020-12-07 12:15   
Branch CR31481_1 has been updated forcibly by skl.

SHA-1: cdb5b7e24e24d5f7f2d98ab28b01603fdb7508f4
(0097467)
git   
2020-12-10 15:18   
Branch CR31481_1 has been updated by skl.

SHA-1: 0654738fd9c700da1309b21171547503b1aadeb4


Detailed log of new commits:

Author: skl
Date: Mon Dec 7 12:54:59 2020 +0300

    0031481: Data Exchange - provide parser of STEP EXPRESS schema for generation of new STEP entities
    
    Changes for Lex and YACC.

(0097890)
git   
2020-12-24 16:24   
Branch CR31481_2 has been created by skl.

SHA-1: 16accbc55984196c5a141854132776d2c0dbc6ca


Detailed log of new commits:

Author: abv
Date: Thu Apr 2 01:21:08 2020 +0300

    0031481: Data Exchange - provide parser of STEP EXPRESS schema for generation of new STEP entities
    
    Integration of ExpToCas tool ported to modern state of OCCT:
    - new package Express and toolkit TKExpress for EXPRESS data structures and OCCT class generator
    - executable ExpToCasExe including lax/yacc parsers, for parsing a Part 21 file and generating classes
    
    Off-topic: genproj.tcl is improved to
    - deal correctly with FILES files containing CRLF end-of-lines
    - generate one project per executable unit (instead of one project per cxx file); note that this matches behaviour of CMake generator
    
    Formatting added files from package Express following OCCT Coding Rules
    
    Changes for correspondence generated files to OCCT Code Rules.
    
    Add generation hxx files with declaration of arrays.
    If field is a HArray1 method for get length of array and method for get element of array by its index are generated.
    
    Changes for generation parser from Lex and YACC files.
    
    Update description file readme.txt
(0097957)
git   
2020-12-28 10:24   
Branch CR31481_2 has been updated forcibly by skl.

SHA-1: d7397c85995845d12a4aae5817b295377475e8e8
(0097966)
git   
2020-12-29 06:28   
Branch CR31481_2 has been updated forcibly by skl.

SHA-1: 64427e8767282aa349860a4dda62204010eeb98b
(0097968)
git   
2020-12-29 08:34   
Branch CR31481_2 has been updated forcibly by skl.

SHA-1: 4421e59911a47f6bb1c5f8af9b8c45fafda19efa
(0097970)
git   
2020-12-29 09:38   
Branch CR31481_2 has been updated forcibly by skl.

SHA-1: e738f18c5fa7a3cbe5629f96214a4ea080afe806
(0097971)
git   
2020-12-29 10:53   
Branch CR31481_2 has been updated forcibly by skl.

SHA-1: efa4abef164854998bb51e033e1db33287c71c31
(0097972)
git   
2020-12-29 11:28   
Branch CR31481_2 has been updated forcibly by skl.

SHA-1: f90dec7ff382db9f78d4202fe76bc08959fcff5b
(0097996)
git   
2020-12-31 11:16   
Branch CR31481_2 has been updated forcibly by skl.

SHA-1: 2ae91a436f657c3f32c7d4f0e901cd34e3ab17d2
(0098001)
skl   
2020-12-31 16:25   
lex and yacc files are updated.






View Issue Details
31653 [Open CASCADE] OCCT:Visualization feature have not tried 2020-07-05 02:05 2020-12-29 18:16
kgv  
kgv  
normal  
new  
open  
none    
none  
  7.6.0*  
Visualization, V3d_View - get rid of Computed Mode
Historically V3d_View implements a special Computed Mode for displaying HLR presentation of shapes. This mode has several inconsistencies:
- computeHLR() and Compute() of interactive object live independently.
- HLR presentation overrides active display mode;
  at the same time, normal presentation is still managed and computed,
  and HLR presentation is linked to the presentation of the active display mode
  leading to inconsistencies and bugs.
  For instance, defining different Display Mode and Highlight Mode with active Compute Mode
  which is dynamically enabled/disabled on rotation causes misbehavior.
- HLR is defines as a special case, however real applications might have other scenarios in which they would like to continuously update presentation on camera movement or on each frame redraw.

Therefore, it is proposed revising architecture to avoid inconsistencies and provide more straightforward approach:
- HLR presentation should be computed in exactly the same way as normal presentation.
  E.g., it should be defined as dedicated Display Mode of Presentable Object,
  and presentation manager should call the same Compute() method when View is changed.
- New computePresentation() method will be defined aggregating parameters of computeHLR (camera orientation) and normal Compute() methods (passing display mode). The method will set a special flag to computed presentation indicating its invalidation state with 3 possible values - immutable (only manual updates), viewDependent (only on view orientation change), transient (on each redraw). New method by default will call old Compute() to preserve compatibility with old API.
- Presentation manager will handle per-view and transient presentations specifically, but current implementation have to be changed. Also, it is necessary to check if frustum culling is applied in advance before computing expensive HLR within computeHLR(), however this will require recomputation on panning.
- Computed Mode withing View will be removed. Application will have to switch display mode of specific shapes or default display mode in interactive context to manage HLR and non-HLR modes.
There are no notes attached to this issue.





View Issue Details
32030 [Open CASCADE] OCCT:Configuration feature have not tried 2020-12-29 13:06 2020-12-29 13:08
kgv  
bugmaster  
normal  
new  
open  
none    
none  
  7.6.0*  
Configuration, CMake - build samples/webgl within BUILD_SAMPLES_WEBGL option
Currently samples/webgl is supposed to be built independently from OCCT, which is good for providing a self-sustained environment.

However, it is desired also providing an option to build sample within OCCT for automated builds in Jenkins / consistency to BUILD_SAMPLES_QT/BUILD_SAMPLES_MFC options.
There are no notes attached to this issue.





View Issue Details
31756 [Open CASCADE] OCCT:Data Exchange minor have not tried 2020-09-07 13:20 2020-12-29 12:55
abv  
bugmaster  
normal  
verified  
fixed  
none    
none  
  7.6.0*  
Not required
Data Exchange - broken parsing of STEP entity in case of missing last parameter
The problem has been discovered during analysis of regression manifested on test case bugs step bug26451 with a fix made for #31489.

The STEP entity #71919 (and many others) in the file attached to issue 0026451 has last parameter missing, like this:

#71919=EDGE_CURVE('',#84041,#84041,#0, );
#71920=FILL_AREA_STYLE('',(#84042));

When this STEP file is read, such entities are parsed incorrectly: instead of incomplete list of parameters, they get extra parameters by including ones from the next entity, and that next entity gets ignored:

~~~~~
Draw[1]> test bugs step bug26451
...
Draw[2]> entity #71919
  -- DUMP Entity n0 71355 level 1
 --- (STEP) Entity 71355:#71919 Type cdl : StepShape_EdgeCurve
 *** NOT WELL LOADED : CONTENT FROM FILE ***
In dump, iii:#jjj means : entity rank iii has step ident #jjj
71355:#71919 = EDGE_CURVE('',83437:#84041,83437:#84041,#0,#0,/* (SUB) */
  (83438:#84042));
  /* On Entity above, Fail Messages recorded at Read time :
Count of Parameters is not 5 for edge_curve
A reference to another entity is unresolved */
 ** Data Check (One Entity) **
Check:1 -- Entity (n0:id) 71355:#71919 Type:EDGE_CURVE
Count of Parameters is not 5 for edge_curve
A reference to another entity is unresolved

Draw[3]> entity #71920
Error in Command : entity #71920
~~~~~

I have prepared synthetic test file for this case, attached as bug31756.stp.
Desired behavior is that the file should be read successfully (it is just a sphere) but error shall be generated on entity 0000015.

Current behavior is:
- on master branch: translation fails, with error on entity 0000015 (wrong nb. of parameters)
- on CR31489_1: translation succeeds without any messages

Note that while work-around implemented in CR31489_1 effectively works in this particular case, this issue shows that our STEP parser can be broken easily by incorrect data, and its behavior becomes unpredictable. We need to understand how original problem occurs and prevent this in more generic way.
pload ALL
stepread [locate_data_file bug31756.stp] a *
bug31756.stp (2,175) 2020-09-07 14:39
https://tracker.dev.opencascade.org/
Notes
(0097155)
git   
2020-11-30 11:42   
Branch CR31756_testParser has been created by dpasukhi.

SHA-1: 225b5fa264dcbc01d8edfe2e4c56775917347288


Detailed log of new commits:

Author: dpasukhi
Date: Fri Nov 27 22:32:18 2020 +0300

    0031756: Data Exchange - broken parsing of STEP entity in case of missing last parameter
    
    Recorder made thread safe (converted from c to c ++)
    Delete useless files ( stepread.cxx, stepread.ph )
(0097255)
git   
2020-12-03 02:00   
Branch CR31756_1 has been created by dpasukhi.

SHA-1: 8c27092e8209ceeeb6a97a5e33a19db099619de0


Detailed log of new commits:

Author: dpasukhi
Date: Fri Nov 27 22:32:18 2020 +0300

    0031756: Data Exchange - broken parsing of STEP entity in case of missing last parameter
    
    - Recorder may safely be used in a multi-threaded environment.
     - Transform "C" recfile to "C++" RecordFile
    - Fix problem with missing last parameters
    - Rename files and methods of recfile ( RecordFile )
    - Delete useless files ( stepread.cxx, stepread.ph )
(0097323)
git   
2020-12-04 15:07   
Branch CR31756_2 has been created by dpasukhi.

SHA-1: 67ab474f6b69bf2882d1e30b9984d13307ddd9f6


Detailed log of new commits:

Author: dpasukhi
Date: Fri Nov 27 22:32:18 2020 +0300

    0031756: Data Exchange - broken parsing of STEP entity in case of missing last parameter
    
    - Recorder may safely be used in a multi-threaded environment.
     - Transform "C" recfile to "C++" RecordFile
    - Fix problem with missing last parameters
    - Rename files and methods of recfile ( RecordFile )
    - Delete useless files ( stepread.cxx, stepread.ph )
    - Add control of arguments count ( special for error argument )

Author: dpasukhi
Date: Tue Nov 24 15:52:39 2020 +0300

    0031000: Data Exchange - STEP file cannot be opened due to lower-case special token End-ISO-10303-21
    
    Update flex lexical scanner (step.lex lex.step.cxx) to parse special tokens in a case insensitive manner
(0097328)
dpasukhi   
2020-12-04 17:18   
Dear ABV,
Please review CR31756_2.
This branch contains two resolved issue: current and 0031000 ( touch same files )

Current branch fix undefined behavior of parser ( skip or rewrite entity )

RecordFile.cxx:71 contains non-ASCI symbol ('C'), I'll fix it with rebase to new master or with remarks

Rebase "recfile" from "C" to "C++" don't have regressions for time or memory.

All tests are OK, no regressions, see:
http://occt-tests/CR31756-master-dpasukhi-OCCT/Debian80-64/diff_summary.html [^]
http://occt-tests/CR31756-master-dpasukhi-OCCT/Windows-64-VC14/diff_summary.html [^]
http://occt-tests/CR31756-master-dpasukhi-Products/Debian80-64/diff_summary.html [^]
http://occt-tests/CR31756-master-dpasukhi-Products/Windows-64-VC14/diff_summary.html [^]
(0097398)
abv   
2020-12-06 18:25   
Please consider some remarks:

- New class "RecordFile" should be named according to OCCT coding conventions, with package prefix "StepFile_". I would suggest name "StepFile_Model" or "StepFile_DataModel" or similar, reflecting the fact that this class defines data structures representing the contents of the STEP file (if my understanding is correct indeed).
- It would be nice to add some description of this class (logical: purpose, way of using, including any relevant notes on use in multithreaded contexts) as the class documentation.
- In StepFile_Read, instance of RecordFile object can be made a local variable to avoid need of error-prone new/delete actions
- Method RecordDebList() can be better named RecordListStart() to exclude use of legacy French terms (deb = debut I guess)
(0097428)
git   
2020-12-08 18:08   
Branch CR31756_3 has been created by dpasukhi.

SHA-1: 1c902294bab7f96b9c7b4096e0f64baee19c0818


Detailed log of new commits:

Author: dpasukhi
Date: Fri Nov 27 22:32:18 2020 +0300

    0031756: Data Exchange - broken parsing of STEP entity in case of missing last parameter
    
    - Recorder may safely be used in a multi-threaded environment.
     - Transform "C" recfile to "C++" StepFile_DataModel
    - Fix problem with missing last parameters
    - Rename files and methods of recfile ( StepFile_DataModel )
    - Delete useless files ( stepread.cxx, stepread.ph )
    - Add control of arguments count ( special for error argument )
    - Add description of StepFile_DataModel class

Author: dpasukhi
Date: Tue Nov 24 15:52:39 2020 +0300

    0031000: Data Exchange - STEP file cannot be opened due to lower-case special token End-ISO-10303-21
    
    Update flex lexical scanner (step.lex lex.step.cxx) to parse special tokens in a case insensitive manner
(0097434)
git   
2020-12-09 00:01   
Branch CR31756_3 has been updated forcibly by dpasukhi.

SHA-1: 734a0192983bda65a3e304397b753a24ba43cbf5
(0097435)
git   
2020-12-09 11:20   
Branch CR31756_3 has been updated forcibly by dpasukhi.

SHA-1: 9d531d0fb491e8b5f8e8806bf2f11e7b501e9729
(0097436)
dpasukhi   
2020-12-09 11:34   
Dear ABV,
All remarks have been done.
Please review CR31756_3.

All test are OK, see,
- restart:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31756-master-dpasukhi/view/TESTING/job/CR31756-master-dpasukhi-OCCT-Windows-64-VC14-opt-test-restart/HTML_20Report/ [^]
- tests:
http://occt-tests/CR31756-master-dpasukhi-OCCT/Debian80-64/diff_summary.html [^]
http://occt-tests/CR31756-master-dpasukhi-OCCT/Windows-64-VC14/diff_summary.html [^]
http://occt-tests/CR31756-master-dpasukhi-Products/Debian80-64/diff_summary.html [^]
http://occt-tests/CR31756-master-dpasukhi-Products/Windows-64-VC14/diff_summary.html [^]
(0097507)
git   
2020-12-11 18:57   
Branch CR31756_3 has been updated by abv.

SHA-1: b0ad5789e7988a63f65fc66684d36e1c26d43dfa


Detailed log of new commits:

Author: abv
Date: Fri Dec 11 18:50:43 2020 +0300

    // StepFile_DataModel renamed to StepFile_ReadData

(0097510)
git   
2020-12-11 19:20   
Branch CR31756_3 has been updated forcibly by abv.

SHA-1: a022b5e458ece2597d213fee763e3ad1d3c88ed3
(0097512)
git   
2020-12-11 22:21   
Branch CR31756_4 has been created by abv.

SHA-1: a524d2359be3ede0b4807b09739cffa3c7548e0b


Detailed log of new commits:

Author: dpasukhi
Date: Fri Nov 27 22:32:18 2020 +0300

    0031756: Data Exchange - broken parsing of STEP entity in case of missing last parameter
    
    - Parser is corrected to handle case of missing arguments properly (report error without corruption of the next entity)
    - Added counter of entity arguments for appropriate error messages
    - Plain C tools and data structures (recfile.*, stepfile.*) are converted to C++ class (StepFile_ReadData) to avoid use of static variables, so that reader can be safely used in a multi-threaded environment
(0097515)
abv   
2020-12-12 07:44   
Reviewed with minor amendments (new class renamed) and tested, see Jenkins job CR31756-master-dpasukhi.
Please integrate:
OCCT branch CR31756_4
Products: none
(0097628)
git   
2020-12-16 11:53   
Branch CR31756_5 has been created by dpasukhi.

SHA-1: 726f0fe206884aeb0950cd278f86babdbda6b1fc


Detailed log of new commits:

Author: dpasukhi
Date: Fri Nov 27 22:32:18 2020 +0300

    0031756: Data Exchange - broken parsing of STEP entity in case of missing last parameter
    
    - Parser is corrected to handle case of missing arguments properly (report error without corruption of the next entity)
    - Added counter of entity arguments for appropriate error messages
    - Plain C tools and data structures (recfile.*, stepfile.*) are converted to C++ class (StepFile_ReadData) to avoid use of static variables, so that reader can be safely used in a multi-threaded environment
(0097631)
git   
2020-12-16 12:05   
Branch CR31756_4_1 has been created by dpasukhi.

SHA-1: 271f53ddd82e3e2b6a5c0c0ee9fcae865a3d8c0e


Detailed log of new commits:

Author: dpasukhi
Date: Wed Dec 16 12:05:36 2020 +0300

    // Fix "-Wmisleading-indentation" warning
(0097656)
git   
2020-12-17 11:00   
Branch CR31756_4_2 has been created by dpasukhi.

SHA-1: 128182ac39bf781c4822f4621fa02964e105e163


Detailed log of new commits:

Author: dpasukhi
Date: Wed Dec 16 12:05:36 2020 +0300

    // Fix "-Wmisleading-indentation" and "-Wunknown-pragmas" warnings
(0097672)
git   
2020-12-17 12:47   
Branch CR31756_4_2 has been updated forcibly by dpasukhi.

SHA-1: 1bb778940b1d8a521c964b18518716898f0890ef
(0097702)
git   
2020-12-18 12:32   
Branch CR31756_4_3 has been created by dpasukhi.

SHA-1: b1019f95e9f602a6764b0ccb869871c8dac9a821


Detailed log of new commits:

Author: dpasukhi
Date: Wed Dec 16 12:05:36 2020 +0300

    // Fix "-Wmisleading-indentation" and "-Wunknown-pragmas" warnings
(0097711)
git   
2020-12-18 14:32   
Branch CR31756_4_4 has been created by dpasukhi.

SHA-1: b5769181b2000bc1058e681918840a519cf22c51


Detailed log of new commits:

Author: dpasukhi
Date: Wed Dec 16 12:05:36 2020 +0300

    // Fix "-Wmisleading-indentation" warning
(0097829)
git   
2020-12-21 14:10   
Branch CR31756_4_4 has been updated forcibly by dpasukhi.

SHA-1: 1fa1ebcfa3b2b1e530eb1fd843e2377cb0f36b50
(0097916)
bugmaster   
2020-12-26 12:15   
Combination -
OCCT branch : WEEK-52
master SHA - 41046145c4a15f5cedf5f3c5877952ee00d568b4
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : WEEK-52 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
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: 17722.770000000193 / 17710.950000000055 [+0.07%]
Products
Total CPU difference: 12416.490000000109 / 12412.520000000126 [+0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.5625 / 19274.6875 [+0.24%]
Products
Total CPU difference: 13844.421875 / 13853.046875 [-0.06%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0097936)
git   
2020-12-26 14:52   
Branch CR31756_1 has been deleted by inv.

SHA-1: 8c27092e8209ceeeb6a97a5e33a19db099619de0
(0097937)
git   
2020-12-26 14:53   
Branch CR31756_2 has been deleted by inv.

SHA-1: 67ab474f6b69bf2882d1e30b9984d13307ddd9f6
(0097938)
git   
2020-12-26 14:53   
Branch CR31756_3 has been deleted by inv.

SHA-1: a022b5e458ece2597d213fee763e3ad1d3c88ed3
(0097939)
git   
2020-12-26 14:53   
Branch CR31756_4 has been deleted by inv.

SHA-1: a524d2359be3ede0b4807b09739cffa3c7548e0b
(0097940)
git   
2020-12-26 14:53   
Branch CR31756_4_1 has been deleted by inv.

SHA-1: 271f53ddd82e3e2b6a5c0c0ee9fcae865a3d8c0e
(0097941)
git   
2020-12-26 14:53   
Branch CR31756_4_2 has been deleted by inv.

SHA-1: 1bb778940b1d8a521c964b18518716898f0890ef
(0097942)
git   
2020-12-26 14:53   
Branch CR31756_4_3 has been deleted by inv.

SHA-1: b1019f95e9f602a6764b0ccb869871c8dac9a821
(0097943)
git   
2020-12-26 14:53   
Branch CR31756_4_4 has been deleted by inv.

SHA-1: 1fa1ebcfa3b2b1e530eb1fd843e2377cb0f36b50
(0097944)
git   
2020-12-26 14:53   
Branch CR31756_5 has been deleted by inv.

SHA-1: 726f0fe206884aeb0950cd278f86babdbda6b1fc
(0097945)
git   
2020-12-26 14:53   
Branch CR31756_testParser has been deleted by inv.

SHA-1: 225b5fa264dcbc01d8edfe2e4c56775917347288





View Issue Details
30598 [Open CASCADE] OCCT:Visualization integration request have not tried 2019-03-21 19:40 2020-12-29 12:47
kgv  
 
normal  
assigned  
open  
none    
none  
  7.6.0*  
Visualization - redesign Prs3d_Drawer as aspects map
Current Prs3d_Drawer design provides a list of fixed properties of different types:
- Boolean flags
- Real parameters
- Prs3d_ShadingAspect
- Prs3d_TextAspect
- Prs3d_IsoAspect
- Prs3d_LineAspect
- Prs3d_PlaneAspect
- Prs3d_ArrowAspect
- Prs3d_DatumAspect
- Prs3d_DimensionAspect

All these properties can be either defined within Prs3d_Drawer instance ("own" aspects), or retrieved from Link aspect.

In addition, most properties are dynamically initialized and stored as Prs3d_Drawer instance fields when fetched and actually undefined (property is not "own" nor defined within Link).
This is an obsolete approach which should be avoided - instead it is proposed creating a global Prs3d_Drawer instance to preserve current behavior or to throw exception in this case.

The new Prs3d_Drawer design should define a map of properties so that it is preferable to define common base class for all properties. The key type of this map is to be determined - it might be string or integer number with enumeration defining UPPER value for values reserved by OCCT, so that applications can define own properties.

The rationale for map of aspects instead of a fixed list is that even existing Prs3d_Drawer definition includes too many properties, while most of properties have effect only within sub-set of AIS classes. It is also impossible defining more presentation properties through common mechanism of Prs3d_Drawer without its extension, so that custom presentations have to define such properties as class fields.

To avoid massive API changes, existing getter/setters have to be preserved.

MeshVS_Drawer is one of candidates for possible usage of new Prs3d_Drawer API.
Notes
(0092540)
nds   
2020-06-11 08:11   
Some metric: 62781 Prs3d_Drawers took:
39,33 Mb of 'MemWorkingSet' memory,
40,5 Mb of 'MemSwapUsage',
40,5 Mb of 'MemSwapUsagePeak'.





View Issue Details
31970 [Open CASCADE] OCCT:Data Exchange minor have not tried 2020-12-02 12:24 2020-12-29 11:52
kgv  
dpasukhi  
normal  
assigned 6.8.0  
open  
none    
none  
  7.6.0*  
Data Exchange, STEP reader - parser syntax error messages are inaccessible
Reading STEP file with syntax errors produced the following output on OCCT 6.7.1:
      ...    Step File Reading : c:/workssd/test2.stp
    ****    StepFile Error : At line 20, syntax error    ****
      ...    STEP File   Read    ...
      ... Step File loaded  ...
   569 records (entities,sub-lists,scopes), 1386 parameters

*** ERR StepReaderData *** Pour Entite #5
    Type:PRODUCT_DEFINITION  Param.n0 4: 0000009 Non trouve
      ... Parameters prepared ... Report : 1 unknown entities.
      ...   Objets analysed  ...
  STEP Loading done : 349 Entities
Status from reading STEP file c:/workssd/test2.stp : file read
Count of shapes produced : 1

so that user see at which line syntax error occurred.
Since OCCT 6.8.0 (0025418) the output is like that:
*** ERR StepReaderData *** Pour Entite #5
    Type:PRODUCT_DEFINITION  Param.n0 4: 0000009 Non trouve
Report : 1 unknown entities.
Status from reading STEP file c:/workssd/test2.stp : file read
Count of shapes produced : 1

so user sees only that something was wrong without enough details.

Lost message is passed to StepFile_Interrupt() which is no more logged in by default (without OCCT_DEBUG macros) and called to a local dummy variable "checkread" of type Interface_Check which is inaccessible outside:
void StepFile_Interrupt (char* mess)
{
#ifdef OCCT_DEBUG
  Message_Messenger::StreamBuffer sout = Message::SendInfo();
  sout << "    ****    StepFile Error : " << mess << "    ****" 
<< std::endl;
#endif
  checkread->AddFail(mess);
}


It is proposed reconsidering OCCT_DEBUG usage in this context and instead print such valuable message with Trace level instead. The usage of global non thread-safe variable and inaccessible anywhere "checkread" should be also checked.
pload XDE
testreadstep test2.stp s
test2.stp (15,732) 2020-12-02 12:24
https://tracker.dev.opencascade.org/
Notes
(0097973)
git   
2020-12-29 11:52   
Branch CR31970 has been created by dpasukhi.

SHA-1: 9751bc3826e30097b0aab4383f17ec997345af94


Detailed log of new commits:

Author: dpasukhi
Date: Sat Dec 26 23:20:50 2020 +0300

    0031970: Data Exchange, STEP reader - parser syntax error messages are inaccessible
    
    - Removed global variables within StepFile_Read.cxx
    - Upgraded error message during bison analyzing ( added a expected expression information )
    - Used 'Interface_ParamType' as argument type for the StepFile_ReadData::Argument
      for a compatibility with the StepData/StepData_StepReaderData
    - Added handling parse errors and transferring it to the StepData_StepReaderData
    - Now parsing and referencing errors save in the check and non output by default,
      but parsing with OCCT_DEBUG flag output this error messages
    - Removed useless location.hxx
    - Removed TraceLevel for the StepFile_Reader ( now it useless,
      it is 0 by default and newer and nowhere change )
    - Translate error message into English within StepData_StepReaderData





View Issue Details
31623 [Open CASCADE] OCCT:Modeling Algorithms minor have not tried 2020-06-22 09:41 2020-12-28 14:40
snn  
aavtamon  
normal  
new  
open  
none    
none  
  7.6.0*  
Modeling Algorithms - BRepExtrema_DistShapeShape crashes at distance computing
The crash takes place in Extrema_ExtCC::PrepareResults.
In the code below is expected that ExtPCir has at least one extrema, but it is really 0.
        Extrema_ExtPElC ExtPCir(aPCirc2,
                                Extrema_CurveTool::Circle(((Adaptor3d_Curve) myC[0])),
                                Precision::Confusion(), theUt11, theUt12);
        Standard_Real aMinSqD = ExtPCir.SquareDistance(1);

I failed to reproduce the issue on a smaller model with extracted parts of interest only.
1. Open model \\master\projects\DMU_Reviewer\test_files\Engine V Twin Revision 02.xbf
2. Select parts as it is shown in the attached picture
3. Call BRepExtrema_DistShapeShape for the selected shapes
Parts_to_select_1.PNG (322,280) 2020-09-15 12:21
https://tracker.dev.opencascade.org/
There are no notes attached to this issue.





View Issue Details
32015 [Open CASCADE] OCCT:Visualization trivial have not tried 2020-12-22 16:10 2020-12-26 14:53
kgv  
bugmaster  
normal  
verified 7.5.0  
fixed  
none    
none  
  7.6.0*  
Not required
Visualization - Select3D_SensitiveTriangulation::myDetectedIdx is inaccessible
Last detected element property of Select3D_SensitiveTriangulation is inaccessible - there are no public getters no a way to expose it via sub-classing (property is private).
Notes
(0097863)
git   
2020-12-22 16:12   
Branch CR32015 has been created by kgv.

SHA-1: a34c867fd00d932fc66d238b49515e4b89269ac2


Detailed log of new commits:

Author: kgv
Date: Tue Dec 22 16:12:57 2020 +0300

    0032015: Visualization - Select3D_SensitiveTriangulation::myDetectedIdx is inaccessible
    
    Added Select3D_SensitiveTriangulation::LastDetectedTriangle() property.
(0097864)
git   
2020-12-22 16:16   
Branch CR32015 has been updated forcibly by kgv.

SHA-1: 22e09e5dd0205906c21872a20f310d57df497c53
(0097874)
kgv   
2020-12-23 11:16   
Please raise the patch
- OCCT branch: CR32015.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR32015-master-KGV/ [^]
(0097912)
bugmaster   
2020-12-26 12:15   
Combination -
OCCT branch : WEEK-52
master SHA - 41046145c4a15f5cedf5f3c5877952ee00d568b4
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : WEEK-52 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
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: 17722.770000000193 / 17710.950000000055 [+0.07%]
Products
Total CPU difference: 12416.490000000109 / 12412.520000000126 [+0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.5625 / 19274.6875 [+0.24%]
Products
Total CPU difference: 13844.421875 / 13853.046875 [-0.06%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0097952)
git   
2020-12-26 14:53   
Branch CR32015 has been deleted by inv.

SHA-1: 22e09e5dd0205906c21872a20f310d57df497c53





View Issue Details
32013 [Open CASCADE] OCCT:Samples minor have not tried 2020-12-21 17:05 2020-12-26 14:53
kgv  
bugmaster  
normal  
verified 7.2.0  
fixed  
none    
none  
  7.6.0*  
Not required
Samples - iOS sample compilation errors
iOS samples should be updated for compilation on up-to-date OCCT.
Notes
(0097835)
git   
2020-12-21 17:14   
Branch CR32013 has been created by kgv.

SHA-1: f113b7abbb58c8c932da6eb2b8d62ea6f81d940d


Detailed log of new commits:

Author: kgv
Date: Mon Dec 21 17:14:49 2020 +0300

    0032013: Samples - iOS sample compilation errors
    
    Added missing includes.
    Fixed usage of obsolete Standard_Failure interface.
(0097836)
git   
2020-12-21 17:27   
Branch CR32013 has been updated forcibly by kgv.

SHA-1: 50902da542bdeb069b02050554ba0953ab79e5b6
(0097844)
git   
2020-12-21 18:56   
Branch CR32013 has been updated forcibly by kgv.

SHA-1: 5388affc72323d7e436ae8ea7ab61c1e1cdecf68
(0097875)
kgv   
2020-12-23 11:17   
Please raise the patch
- OCCT branch: CR32013.
(0097913)
bugmaster   
2020-12-26 12:15   
Combination -
OCCT branch : WEEK-52
master SHA - 41046145c4a15f5cedf5f3c5877952ee00d568b4
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : WEEK-52 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
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: 17722.770000000193 / 17710.950000000055 [+0.07%]
Products
Total CPU difference: 12416.490000000109 / 12412.520000000126 [+0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.5625 / 19274.6875 [+0.24%]
Products
Total CPU difference: 13844.421875 / 13853.046875 [-0.06%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0097951)
git   
2020-12-26 14:53   
Branch CR32013 has been deleted by inv.

SHA-1: 5388affc72323d7e436ae8ea7ab61c1e1cdecf68





View Issue Details
32011 [Open CASCADE] OCCT:Configuration feature have not tried 2020-12-20 19:50 2020-12-26 14:53
kgv  
bugmaster  
normal  
verified  
fixed  
none    
none  
  7.6.0*  
Not required
Configuration - add batch files to build OCCT for macOS and iOS targets
The proposal is to add batch files for macOS target in order to facilitate build with CMake.
Notes
(0097815)
git   
2020-12-20 19:52   
Branch CR32011 has been created by kgv.

SHA-1: 7fbd9a865aa0b93cae79581a990c189af32c486c


Detailed log of new commits:

Author: kgv
Date: Sun Dec 20 19:52:40 2020 +0300

    0032011: Configuration - add batch files to build OCCT for macOS target
    
    Added script adm/scripts/macos_build.sh and template macos_custom.bat.template
    intended for automating building routines targeting macOS platform.
(0097816)
git   
2020-12-20 19:57   
Branch CR32011 has been updated forcibly by kgv.

SHA-1: 82bf147588a912197c13b395db17673d1f3d1e95
(0097817)
git   
2020-12-20 20:45   
Branch CR32011 has been updated forcibly by kgv.

SHA-1: 0e9959f607e9e43ade02349fa516fb0294af32c7
(0097818)
git   
2020-12-20 21:13   
Branch CR32011 has been updated forcibly by kgv.

SHA-1: 7de0ab7f31aa1059776a05d2315499e3050704e5
(0097819)
git   
2020-12-20 21:57   
Branch CR32011 has been updated forcibly by kgv.

SHA-1: a6e5f756460724176833683f80335786f5a2e3cc
(0097876)
kgv   
2020-12-23 11:18   
Please raise the patch
- OCCT branch: CR32011.
(0097914)
bugmaster   
2020-12-26 12:15   
Combination -
OCCT branch : WEEK-52
master SHA - 41046145c4a15f5cedf5f3c5877952ee00d568b4
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : WEEK-52 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
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: 17722.770000000193 / 17710.950000000055 [+0.07%]
Products
Total CPU difference: 12416.490000000109 / 12412.520000000126 [+0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.5625 / 19274.6875 [+0.24%]
Products
Total CPU difference: 13844.421875 / 13853.046875 [-0.06%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0097950)
git   
2020-12-26 14:53   
Branch CR32011 has been deleted by inv.

SHA-1: a6e5f756460724176833683f80335786f5a2e3cc





View Issue Details
32009 [Open CASCADE] OCCT:Coding minor have not tried 2020-12-19 14:12 2020-12-26 14:53
bugmaster  
bugmaster  
normal  
verified 7.6.0*  
fixed  
none    
none  
  7.6.0*  
bugs/fclasses/bug6143
Coding Rules, TKQADraw - suppress msvc10 compilation warning C4748
VS 2008-2010
Type : MSBuild
Category : C4748
File Name : e:/builds/week-51_week-51/occt_src/src/qabugs/qabugs_11.cxx
Line : 2411
Message : /GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in function
Notes
(0097806)
git   
2020-12-19 15:59   
Branch CR32009 has been created by kgv.

SHA-1: 1e1d99f09f767829e96081b9144621ac00470a75


Detailed log of new commits:

Author: kgv
Date: Sat Dec 19 16:00:24 2020 +0300

    0032009: Coding Rules, TKQADraw - suppress msvc10 compilation warning C4748
    
    Added a workaround for msvc10 misbehavior.
(0097809)
kgv   
2020-12-19 16:43   
Please check patch in OCCT branch CR32009.
(0097900)
git   
2020-12-25 11:26   
Branch CR32009 has been updated forcibly by kgv.

SHA-1: 543cdd6cf2709731a7ee811a62d74b29cebb3169
(0097918)
bugmaster   
2020-12-26 12:15   
Combination -
OCCT branch : WEEK-52
master SHA - 41046145c4a15f5cedf5f3c5877952ee00d568b4
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : WEEK-52 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
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: 17722.770000000193 / 17710.950000000055 [+0.07%]
Products
Total CPU difference: 12416.490000000109 / 12412.520000000126 [+0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.5625 / 19274.6875 [+0.24%]
Products
Total CPU difference: 13844.421875 / 13853.046875 [-0.06%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0097949)
git   
2020-12-26 14:53   
Branch CR32009 has been deleted by inv.

SHA-1: 543cdd6cf2709731a7ee811a62d74b29cebb3169





View Issue Details
32004 [Community] OCCT:Foundation Classes minor have not tried 2020-12-17 11:12 2020-12-26 14:53
kgv  
bugmaster  
normal  
verified 5.2.2  
fixed  
none    
none  
  7.6.0*  
Not required
Foundation Classes, UnitsAPI - misprint in "ACCOUSTIC INTENSITY" unit name
UnitsAPI has a misprint in "ACCOUSTIC INTENSITY" unit name.
Notes
(0097660)
git   
2020-12-17 11:14   
Branch CR32004 has been created by kgv.

SHA-1: d0a6ded43b87bd6c6b0db27cc3deefcfa5d78bf8


Detailed log of new commits:

Author: luz paz
Date: Thu Dec 10 11:40:53 2020 +0300

    0032004: Foundation Classes, UnitsAPI - misprint in "ACCOUSTIC INTENSITY" unit name
    
    Found using `codespell 2.1.dev0`
(0097731)
abv   
2020-12-18 21:59   
No remarks, please integrate
(0097908)
bugmaster   
2020-12-26 12:14   
Combination -
OCCT branch : WEEK-52
master SHA - 41046145c4a15f5cedf5f3c5877952ee00d568b4
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : WEEK-52 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
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: 17722.770000000193 / 17710.950000000055 [+0.07%]
Products
Total CPU difference: 12416.490000000109 / 12412.520000000126 [+0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.5625 / 19274.6875 [+0.24%]
Products
Total CPU difference: 13844.421875 / 13853.046875 [-0.06%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0097948)
git   
2020-12-26 14:53   
Branch CR32004 has been deleted by inv.

SHA-1: d0a6ded43b87bd6c6b0db27cc3deefcfa5d78bf8





View Issue Details
31999 [Open CASCADE] OCCT:Tests minor have not tried 2020-12-15 22:14 2020-12-26 14:53
kgv  
bugmaster  
normal  
verified 7.5.0  
fixed  
none    
none  
  7.6.0*  
Not required
Tests - request Core Profile on macOS for Ray-Tracing tests
Ray-Tracing requires OpenGL 3+ which is implemented only in Core Profile on macOS, hence related tests fail on this platform.
Notes
(0097620)
git   
2020-12-15 22:15   
Branch CR31999 has been created by kgv.

SHA-1: 5cb6aa21d5c9a886189c992c3e78223a15c33008


Detailed log of new commits:

Author: kgv
Date: Tue Dec 15 22:15:33 2020 +0300

    0031999: Tests - request Core Profile on macOS for Ray-Tracing tests
(0097814)
git   
2020-12-20 18:23   
Branch CR31999 has been updated forcibly by kgv.

SHA-1: b3b27a53008fb50df68c36d9a15a9f6045e512af
(0097877)
kgv   
2020-12-23 11:19   
Please raise the patch
- OCCT branch: CR31999.
(0097915)
bugmaster   
2020-12-26 12:15   
Combination -
OCCT branch : WEEK-52
master SHA - 41046145c4a15f5cedf5f3c5877952ee00d568b4
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : WEEK-52 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
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: 17722.770000000193 / 17710.950000000055 [+0.07%]
Products
Total CPU difference: 12416.490000000109 / 12412.520000000126 [+0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.5625 / 19274.6875 [+0.24%]
Products
Total CPU difference: 13844.421875 / 13853.046875 [-0.06%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0097947)
git   
2020-12-26 14:53   
Branch CR31999 has been deleted by inv.

SHA-1: b3b27a53008fb50df68c36d9a15a9f6045e512af





View Issue Details
31226 [Open CASCADE] OCCT:Foundation Classes minor have not tried 2019-12-06 12:15 2020-12-26 14:52
tizmaylo  
bugmaster  
normal  
verified 6.3.1  
fixed  
none    
none  
  7.6.0*  
Not required
Foundation Classes - TCollection_AsciiString::IsRealValue() returns true if a string contains a non-real value
The method TCollection_AsciiString::IsRealValue() of the TCollection_AsciiString class returns true if a string contains a non-real value (e.g. "9999a9").
Not required
Notes
(0089486)
abv   
2019-12-13 07:10   
This is historic implementation of method TCollection_AsciiString::IsRealValue() - it always returned true if the string was started with some characters that can be interpreted as integer or real value. I propose we can document this in the comment to the method, but it is better not to change behavior as it can break some existig code. Perhaps additional Boolean argument can be added indicating the need for a strict check.
(0097574)
git   
2020-12-14 15:18   
Branch CR31226 has been created by mkrylova.

SHA-1: ae6b512bc2eb4cd7ec7b6fcd5273976e9a2572d9


Detailed log of new commits:

Author: mkrylova
Date: Mon Dec 14 15:18:43 2020 +0300

    0031226: Foundation Classes - TCollection_AsciiString::IsRealValue() returns true if a string contains a non-real value
    
    - Added comment to the method
    - Added Boolean argument indicating the need for a strict check
(0097647)
kgv   
2020-12-16 17:51   
+  //! theToCheckFull - argument indicating the need for a strict check is the AsciiString a real value.


Please use @param syntax for documenting arguments.
> argument indicating the need for a strict check is the AsciiString a real value.
when TRUE, checks if entire string defines a real value;
otherwise checks if string starts with a real value
(0097674)
git   
2020-12-17 13:19   
Branch CR31226 has been updated by mkrylova.

SHA-1: 9fc09618f4b9f5debf4bc85e8775449a4ddfe8d7


Detailed log of new commits:

Author: mkrylova
Date: Thu Dec 17 13:21:18 2020 +0300

    kgv remarks:
    - changed description of TCollection_AsciiString::IsRealValue

(0097677)
git   
2020-12-17 13:21   
Branch CR31226_1 has been created by mkrylova.

SHA-1: f604e77134f18414cdc58a20233ddf19c63bc35f


Detailed log of new commits:

Author: mkrylova
Date: Mon Dec 14 15:18:43 2020 +0300

    0031226: Foundation Classes - TCollection_AsciiString::IsRealValue() returns true if a string contains a non-real value
    
    - Added comment to the method
    - Added Boolean argument indicating the need for a strict check
(0097679)
git   
2020-12-17 14:12   
Branch CR31226_1 has been updated by mkrylova.

SHA-1: 2307a213a06b461b8a1b95742e4e606977282cfe


Detailed log of new commits:

Author: mkrylova
Date: Thu Dec 17 14:14:18 2020 +0300

    # fixed code style

(0097680)
git   
2020-12-17 14:13   
Branch CR31226_2 has been created by mkrylova.

SHA-1: 9af5fa9d337d43863964a57abc55b0804f3bd5fd


Detailed log of new commits:

Author: mkrylova
Date: Mon Dec 14 15:18:43 2020 +0300

    0031226: Foundation Classes - TCollection_AsciiString::IsRealValue() returns true if a string contains a non-real value
    
    - Added comment to the method
    - Added Boolean argument indicating the need for a strict check
(0097692)
kgv   
2020-12-17 16:07   
(edited on: 2020-12-17 16:14)
Please update existing places of IsRealValue() usage in ViewerTest to use new flag and add a test case.

(0097693)
kgv   
2020-12-17 16:14   
There is OCC11758 command in QABugs_19.cxx which can be extended to verify IsRealValue() in unit-test alike style.
(0097708)
git   
2020-12-18 14:24   
Branch CR31226_2 has been updated by mkrylova.

SHA-1: e7095d340a4207acf79de9eafb6ad98a0b2ba4f2


Detailed log of new commits:

Author: mkrylova
Date: Fri Dec 18 14:26:35 2020 +0300

    # kgv remarks
     - Extended OCC11758 command in QABugs_19.cxx to verify IsRealValue()
     - Updated existing places of IsRealValue() usage in ViewerTest to use new flag

(0097709)
git   
2020-12-18 14:25   
Branch CR31226_3 has been created by mkrylova.

SHA-1: b7305d518aed2100967240c67549d935e705749d


Detailed log of new commits:

Author: mkrylova
Date: Mon Dec 14 15:18:43 2020 +0300

    0031226: Foundation Classes - TCollection_AsciiString::IsRealValue() returns true if a string contains a non-real value
    
    - Added comment to the method
    - Added Boolean argument indicating the need for a strict
    - Extended OCC11758 command in QABugs_19.cxx to verify IsRealValue()
    - Updated existing places of IsRealValue() usage in ViewerTest to use new flag
(0097715)
kgv   
2020-12-18 15:35   
Please fix compiler warnings:

/dn62/builds/CR31226_3-master-KGV/OCCT_SRC/src/TCollection/TCollection_AsciiString.cxx: In member function 
'Standard_Boolean TCollection_AsciiString::IsRealValue(Standard_Boolean) const':
/dn62/builds/CR31226_3-master-KGV/OCCT_SRC/src/TCollection/TCollection_AsciiString.cxx:772:23: warning: 
NULL used in arithmetic [-Wpointer-arith]
[  2%] Building CXX object src/TKernel/CMakeFiles/TKernel.dir/__/Message/Message_Messenger.cxx.o
(0097723)
git   
2020-12-18 16:52   
Branch CR31226_3 has been updated by mkrylova.

SHA-1: a639c52f2d5bd3017b97db7622c53b85a3abe113


Detailed log of new commits:

Author: mkrylova
Date: Fri Dec 18 16:53:58 2020 +0300

    # replaced NULL by '\0'

(0097724)
git   
2020-12-18 16:53   
Branch CR31226_4 has been created by mkrylova.

SHA-1: 5f2599af2d18b1191c2d08bc8675f3ae8ddf3b73


Detailed log of new commits:

Author: mkrylova
Date: Mon Dec 14 15:18:43 2020 +0300

    0031226: Foundation Classes - TCollection_AsciiString::IsRealValue() returns true if a string contains a non-real value
    
    - Added comment to the method
    - Added Boolean argument indicating the need for a strict
    - Extended OCC11758 command in QABugs_19.cxx to verify IsRealValue()
    - Updated existing places of IsRealValue() usage in ViewerTest to use new flag
(0097733)
git   
2020-12-18 22:13   
Branch CR31226_4 has been updated by kgv.

SHA-1: e8d9d28a97295977d5d0f8ffe8683b48b18c68de


Detailed log of new commits:

Author: kgv
Date: Fri Dec 18 22:14:28 2020 +0300

    # fix misprint in test case

(0097734)
kgv   
2020-12-19 03:05   
Please raise the patch
- OCCT branch: CR31226_4.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR31226_4-master-KGV/ [^]
(0097909)
bugmaster   
2020-12-26 12:14   
Combination -
OCCT branch : WEEK-52
master SHA - 41046145c4a15f5cedf5f3c5877952ee00d568b4
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : WEEK-52 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
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: 17722.770000000193 / 17710.950000000055 [+0.07%]
Products
Total CPU difference: 12416.490000000109 / 12412.520000000126 [+0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.5625 / 19274.6875 [+0.24%]
Products
Total CPU difference: 13844.421875 / 13853.046875 [-0.06%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0097931)
git   
2020-12-26 14:52   
Branch CR31226 has been deleted by inv.

SHA-1: 9fc09618f4b9f5debf4bc85e8775449a4ddfe8d7
(0097932)
git   
2020-12-26 14:52   
Branch CR31226_1 has been deleted by inv.

SHA-1: 2307a213a06b461b8a1b95742e4e606977282cfe
(0097933)
git   
2020-12-26 14:52   
Branch CR31226_2 has been deleted by inv.

SHA-1: e7095d340a4207acf79de9eafb6ad98a0b2ba4f2
(0097934)
git   
2020-12-26 14:52   
Branch CR31226_3 has been deleted by inv.

SHA-1: a639c52f2d5bd3017b97db7622c53b85a3abe113
(0097935)
git   
2020-12-26 14:52   
Branch CR31226_4 has been deleted by inv.

SHA-1: e8d9d28a97295977d5d0f8ffe8683b48b18c68de





View Issue Details
29822 [Community] OCCT:Application Framework feature have not tried 2018-05-29 03:49 2020-12-26 14:52
Vico Liang  
bugmaster  
normal  
verified  
fixed  
none    
none  
  7.6.0*  
Not required
Application Framework - Make TDocStd_Document extensible
Document creation mechanism is sealed inside the OCAF framework. There is no way or convenient way to subclass TDocStd_Document to cooperate with OCAF. When design application, it's unavoidable to extend class TDocStd_Document.

There are several places create document:
void TDocStd_Application::NewDocument(const TCollection_ExtendedString& format,Handle(TDocStd_Document)& aDoc)
Handle(CDM_Document) BinLDrivers_DocumentRetrievalDriver::CreateDocument()
Handle(CDM_Document) XmlLDrivers_DocumentRetrievalDriver::CreateDocument()

It would be more convenient if the NewDocument method is center controlled inside TDocStd_Application, so we can override the document creation method in one place.
Dear MPV, could you review the changes, please: http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR29822_2-master-VRO/view/COMPARE/ [^]

A new method NewDocument() is added (by your advice). It solves all warnings of old compilers.

OCCT: CR29822_2
Products: nothing
29822.txt (4,231) 2020-12-21 14:30
https://tracker.dev.opencascade.org/
Notes
(0076409)
mpv   
2018-05-29 16:28   
We don't expect or advise the developer extends TDocStd_Document. It is a data container that provides standard (and generic) methods for working with data, suitable for any application.

If you want to implement application-specific interfaces to the document, you simply may create a new interface-class that whould keep the TDocStd_Document as a field. One of the advantages here is that this higher-level interface does not provide an access low-level methods of Document to the user of this object.
(0076423)
Vico Liang   
2018-05-30 04:41   
>We don't expect or advise the developer extends TDocStd_Document.
I don't think we should limit the user to do so. It's no any problem for user to extend TDocStd_Document as long as there is single entrance to create user defined Document. Another problem is that there are several entrance to create document, it's hard to maintain the consistence.

I suggest to remove the these two document creation methods:
Handle(CDM_Document) BinLDrivers_DocumentRetrievalDriver::CreateDocument();
Handle(CDM_Document) XmlLDrivers_DocumentRetrievalDriver::CreateDocument();

And add a virtual method as below:
Handle(CDM_Document) TDocStd_Application::NewDocument();

With this minor changes, will make the interface simpler and maintainable and also user can extend document class by just override this method in application.
(0076437)
mpv   
2018-05-30 14:32   
CreateDocument are virtual methods. If they are removed, we lose possibility for custom schema (thar inherits retriveal drivers) to create document in a specific way.

Actually, this is not as simple as you wrote because of dependencies and current usage of this mechanism. I would ask you to prepare an OCCT patch that is good for your application and then we will decide is this approach usefull in OCCT as a standard behavior.
(0076441)
Vico Liang   
2018-05-30 16:28   
> CreateDocument are virtual methods. If they are removed,
> we lose possibility for >custom schema (thar inherits retriveal drivers)
> to create document in a specific way.
It will cause mismatching if the document type created in retrieval drivers is different from the document type in TDocStd_Application::NewDocument() method. For an application, it should make sure that all document created are the same type including the retrieval driver. That's to say, the storage driver and the retrieval driver should use the same document type.
(0076442)
Vico Liang   
2018-05-30 16:40   
I searched the whole source code tree there is not a case redefined method CreateDocument() in retrieval drivers, all use class TDocStd_Document. It should not be a problem to upgrade user's program with such changes.
(0076444)
mpv   
2018-05-30 16:57   
(edited on: 2018-05-30 16:57)
"to create document in a specific way" is not the same as creation of new type of the document. There could be new attributes added, some labels structure prepared, etc.

The custom way of document creation is out of the OCCT scope this is an application-specific functionality.

(0076445)
Vico Liang   
2018-05-30 17:07   
but you can't imagine that user won't define a new document type.
(0076446)
Vico Liang   
2018-05-30 17:11   
A good mechanism will prevent user making mistake and guide them in the right direction.
(0076448)
mpv   
2018-05-30 17:36   
What is the added value from a new document type? There are different ways to change content of the document (like creation of new kinds of attributes). Normally application-specific data is stored inside using standard atomic types. Here the specific part is the specific combination of these attributes. Attributes are standard, but the meaning for different applications is different.

It is like you are asking for inheriting "int" type in C++. You may create a specific-meaning interfaces only by keeing "int" in the field of this interface.
(0076455)
Vico Liang   
2018-05-30 19:10   
I consider more about the document creation mechanism. It's easy to confuse user with several document creation entrances. It would be more simpler and better understanding for developer with single document creation entrance. We can provide a method Init(Handle(TDocStd_Document& theDoc) in retrieval drivers to replace the CreateDocument() method. So with these changes, the document creation should be always the same type.

It sometimes make sense to inheriting document type with several other temp field instead of standard attribute. Anyway, Document is a rather big class, user have his own decision to inheriting it by adding more application specific logic inside it base on base class implementation.
(0097573)
git   
2020-12-14 15:08   
Branch CR29822 has been created by vro.

SHA-1: febc630bcebe2fbab28961fea4a93a1d57bf107b


Detailed log of new commits:

Author: Vlad Romashko
Date: Mon Dec 14 15:08:35 2020 +0300

    0029822: Make TDocStd_Document extensible
    
    Two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application to its parent class CDF_Application. In TDocStd_Application these methods remain redefined. These little changes allow creation of a new document only in one virtual method NewDocument(). The methods CreateDocument() in all retrieval drivers are deleted.
    
    Modified files:
    - CDF_Application.hxx and cxx: two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application. The input parameter TDocStd_Document is changed to parent class CDM_Document.
    - TDocStd_Application.hxx and cxx: redefines new virtual methods NewDocument() and InitDocument() of the parent class CDF_Application.
    - BinLDrivers_DocumentRetrievalDriver.hxx and cxx, StdLDrivers_DocumentRetrievalDriver.hxx and cxx, XmlLDrivers_DocumentRetrievalDriver.hxx and cxx, PCDM_Reader.hxx : a virtual method CreateDocument() is deleted.
    - TObj_Application.cxx, XCAFApp_Application.hxx and cxx: down-casting to a descendant class TDocStd_Document is applied.
    
    OCCT: CR29822
    Products: nothing
(0097599)
mpv   
2020-12-15 09:34   
Please, update the upgrade.md documentation, since you removed a public method that could be used somewhere outside.
(0097600)
git   
2020-12-15 10:12   
Branch CR29822_1 has been created by vro.

SHA-1: 548c21faeb820b8252a277ecb69acb69c261b32b


Detailed log of new commits:

Author: Vlad Romashko
Date: Tue Dec 15 10:12:26 2020 +0300

    0029822: Make TDocStd_Document extensible
    
    Two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application to its parent class CDF_Application. In TDocStd_Application these methods remain redefined. These little changes allow creation of a new document only in one virtual method NewDocument(). The methods CreateDocument() in all retrieval drivers are deleted.
    
    Modified files:
    - CDF_Application.hxx and cxx: two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application. The input parameter TDocStd_Document is changed to parent class CDM_Document.
    - TDocStd_Application.hxx and cxx: redefines new virtual methods NewDocument() and InitDocument() of the parent class CDF_Application.
    - BinLDrivers_DocumentRetrievalDriver.hxx and cxx, StdLDrivers_DocumentRetrievalDriver.hxx and cxx, XmlLDrivers_DocumentRetrievalDriver.hxx and cxx, PCDM_Reader.hxx: a virtual method CreateDocument() is deleted.
    - TObj_Application.cxx, XCAFApp_Application.hxx and cxx: down-casting to a descendant class TDocStd_Document is applied.
    
    Documentation:
    - upgrade.md is modified.
    
    OCCT: CR29822_1
    Products: nothing
(0097610)
mpv   
2020-12-15 13:49   
Reviewed.
OCCT: CR29822_1
Products: nothing
(0097653)
git   
2020-12-17 10:18   
Branch CR29822_2 has been created by vro.

SHA-1: 80618b3d57a94570d44c82ad71acb5ddd423644b


Detailed log of new commits:

Author: Vlad Romashko
Date: Thu Dec 17 10:18:50 2020 +0300

    0029822: Make TDocStd_Document extensible
    
    Two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application to its parent class CDF_Application. In TDocStd_Application these methods remain redefined. These little changes allow creation of a new document only in one virtual method NewDocument(). The methods CreateDocument() in all retrieval drivers are deleted.
    
    Modified files:
    - CDF_Application.hxx and cxx: two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application. The input parameter TDocStd_Document is changed to parent class CDM_Document.
    - TDocStd_Application.hxx and cxx: redefines new virtual methods NewDocument() and InitDocument() of the parent class CDF_Application.
    - BinLDrivers_DocumentRetrievalDriver.hxx and cxx, StdLDrivers_DocumentRetrievalDriver.hxx and cxx, XmlLDrivers_DocumentRetrievalDriver.hxx and cxx, PCDM_Reader.hxx: a virtual method CreateDocument() is deleted.
    - TObj_Application.cxx, XCAFApp_Application.hxx and cxx: down-casting to a descendant class TDocStd_Document is applied.
    
    Documentation:
    - upgrade.md is modified.
    
    OCCT: CR29822_2
    Products: nothing
(0097654)
kgv   
2020-12-17 10:32   
> ...
> Documentation:
> - upgrade.md is modified.
>
> OCCT: CR29822_2
> Products: nothing
Vlad, branches information is necessary only for Mantis, not for git message - please remove it.
(0097655)
vro   
2020-12-17 10:36   
Ok.
(0097681)
git   
2020-12-17 14:34   
Branch CR29822_3 has been created by vro.

SHA-1: 50d58d184e9a8677c5df5130916f8b47da9f32a6


Detailed log of new commits:

Author: vro
Date: Thu Dec 17 14:34:47 2020 +0300

    0029822: Make TDocStd_Document extensible
    
    Two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application to its parent class CDF_Application. In TDocStd_Application these methods remain redefined. These little changes allow creation of a new document only in one virtual method NewDocument(). The methods CreateDocument() in all retrieval drivers are deleted.
    
    Modified files:
    - CDF_Application.hxx and cxx: two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application. The input parameter TDocStd_Document is changed to parent class CDM_Document.
    - TDocStd_Application.hxx and cxx: redefines new virtual methods NewDocument() and InitDocument() of the parent class CDF_Application.
    - BinLDrivers_DocumentRetrievalDriver.hxx and cxx, StdLDrivers_DocumentRetrievalDriver.hxx and cxx, XmlLDrivers_DocumentRetrievalDriver.hxx and cxx, PCDM_Reader.hxx: a virtual method CreateDocument() is deleted.
    - TObj_Application.cxx, XCAFApp_Application.hxx and cxx: down-casting to a descendant class TDocStd_Document is applied.
    
    Documentation:
    - upgrade.md is modified.
(0097690)
git   
2020-12-17 15:50   
Branch CR29822_3 has been updated by vro.

SHA-1: d5118669275998b2a5db1e6d614a9c522e31d38e


Detailed log of new commits:

Author: vro
Date: Thu Dec 17 15:51:23 2020 +0300

    // upgrade.md is added

(0097691)
mpv   
2020-12-17 15:52   
Reviewed.
OCCT: CR29822_3
Products: nothing
(0097832)
bugmaster   
2020-12-21 14:30   
I attached file with warnings - 28922.txt
(0097917)
bugmaster   
2020-12-26 12:15   
Combination -
OCCT branch : WEEK-52
master SHA - 41046145c4a15f5cedf5f3c5877952ee00d568b4
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : WEEK-52 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
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: 17722.770000000193 / 17710.950000000055 [+0.07%]
Products
Total CPU difference: 12416.490000000109 / 12412.520000000126 [+0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.5625 / 19274.6875 [+0.24%]
Products
Total CPU difference: 13844.421875 / 13853.046875 [-0.06%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0097927)
git   
2020-12-26 14:52   
Branch CR29822 has been deleted by inv.

SHA-1: febc630bcebe2fbab28961fea4a93a1d57bf107b
(0097928)
git   
2020-12-26 14:52   
Branch CR29822_1 has been deleted by inv.

SHA-1: 548c21faeb820b8252a277ecb69acb69c261b32b
(0097929)
git   
2020-12-26 14:52   
Branch CR29822_2 has been deleted by inv.

SHA-1: 80618b3d57a94570d44c82ad71acb5ddd423644b
(0097930)
git   
2020-12-26 14:52   
Branch CR29822_3 has been deleted by inv.

SHA-1: d5118669275998b2a5db1e6d614a9c522e31d38e





View Issue Details
29750 [Open CASCADE] OCCT:Samples minor have not tried 2018-05-10 10:19 2020-12-26 14:52
nds  
bugmaster  
normal  
verified 7.5.0  
fixed  
none    
none  
  7.6.0*  
Not required
Samples - function arrows are not updated by moving a node in FuncDemo qt sample
FuncDemo compiled with Qt 5.10.1 has not updated links as shown on attached picture.
Natasha, could you review please?

The tests passed well: http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR29750_1-master-vro/view/COMPARE/ [^]

For bugmaster:
a sample Qt/FuncDemo in the branch CR29750_1.
FuncDemo_Sh_node_moved.png (84,691) 2018-05-10 10:19
https://tracker.dev.opencascade.org/
Notes
(0097005)
git   
2020-11-23 11:41   
Branch CR29750 has been created by vro.

SHA-1: 973ef894cd390f2c75262b67bcbb1ab287475ca0


Detailed log of new commits:

Author: Vlad Romashko
Date: Mon Nov 23 11:41:59 2020 +0300

    0029750: Samples - function arrows are not updated by moving a node in FuncDemo qt sample
    
    The visual links between functions are recovers.
    The demo is synchronized with a corresponding demo from Qt (qt486-vc10-32\examples\graphicsview\elasticnodes). It may be successfully compiled by any further versions of Qt including 5.10.1
(0097055)
git   
2020-11-25 10:42   
Branch CR29750_1 has been created by vro.

SHA-1: 943d7f611c785a04979079908fb781620b14e178


Detailed log of new commits:

Author: Vlad Romashko
Date: Wed Nov 25 10:42:20 2020 +0300

    0029750: Samples - function arrows are not updated by moving a node in FuncDemo qt sample
    
    The visual links between functions are recovers.
    The demo is synchronized with a corresponding demo from Qt (qt486-vc10-32\examples\graphicsview\elasticnodes). It may be successfully compiled by any further versions of Qt including 5.10.1
    Also, because Open CASCADE (and OCAF in particular) is improved for usage in multi-threading mode, usage of mutexes is added in this sample (for access to the sharing TNaming_UsedShapes attribute, for example).
(0097092)
kgv   
2020-11-26 12:15   
Vlad,

+//! [0]

what is the purpose for these new confusing comment blocks?
Could them be replaced by simple description?
(0097624)
nds   
2020-12-16 10:37   
Dear Vlad,
could you please correct Kirill's remark.
(0097652)
vro   
2020-12-17 08:45   
Hello Kirill, hello Natasha! These comments come from Qt's sample. All headers in the sample are kept as in Qt sample and all the code, except several lines dedicated to Function Demo.
I suppose the questionable comment comes from a tutorial in Qt. Should we remove these lines? Indeed, we don't need them, but if we remove them, we will introduce more difference to the Qt's sample.
I have no own opinion... If you think it worth removing the lines, I will do it. Just let me know please.
(0097662)
nds   
2020-12-17 11:24   
Kirill, please check.

It looks reasonable.
(0097664)
kgv   
2020-12-17 11:29   
OK.
(0097665)
nds   
2020-12-17 11:38   
Dear Vlad,

It's Ok, please cherry pick it on the current master and relaunch tests.
Please give details for Igor which branch is.

Best regards, Natalia
(0097666)
kgv   
2020-12-17 11:43   
Vlad, could you please also correct git commit author to match common style using acronyms?
(0097673)
git   
2020-12-17 13:17   
Branch CR29750_2 has been created by vro.

SHA-1: 953c28fb10494dd095b997258bc5199bf6ec42ef


Detailed log of new commits:

Author: vro
Date: Thu Dec 17 13:17:46 2020 +0300

    0029750: Samples - function arrows are not updated by moving a node in FuncDemo qt sample
    
    The visual links between functions are recovered.
    The demo is synchronized with a corresponding demo from Qt (qt486-vc10-32\examples\graphicsview\elasticnodes). It may be successfully compiled by any further versions of Qt including 5.10.1
    Also, because Open CASCADE (and OCAF in particular) is improved for usage in multi-threading mode, usage of mutexes is added in this sample (for access to the sharing TNaming_UsedShapes attribute, for example).
(0097695)
vro   
2020-12-17 20:06   
Updated to current master.
(0097919)
bugmaster   
2020-12-26 12:16   
Combination -
OCCT branch : WEEK-52
master SHA - 41046145c4a15f5cedf5f3c5877952ee00d568b4
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : WEEK-52 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
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: 17722.770000000193 / 17710.950000000055 [+0.07%]
Products
Total CPU difference: 12416.490000000109 / 12412.520000000126 [+0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.5625 / 19274.6875 [+0.24%]
Products
Total CPU difference: 13844.421875 / 13853.046875 [-0.06%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0097924)
git   
2020-12-26 14:52   
Branch CR29750 has been deleted by inv.

SHA-1: 973ef894cd390f2c75262b67bcbb1ab287475ca0
(0097925)
git   
2020-12-26 14:52   
Branch CR29750_1 has been deleted by inv.

SHA-1: 943d7f611c785a04979079908fb781620b14e178
(0097926)
git   
2020-12-26 14:52   
Branch CR29750_2 has been deleted by inv.

SHA-1: 953c28fb10494dd095b997258bc5199bf6ec42ef





View Issue Details
29723 [Open CASCADE] OCCT:Modeling Data minor have not tried 2018-04-24 16:14 2020-12-26 14:52
emv  
bugmaster  
normal  
verified 7.2.0  
fixed  
none    
none  
  7.6.0*  
bugs/moddata_3/bug29723
Modeling Data - Get rid of second writing format (additional save of UV points)
It is proposed to get rid of second writing format which allows saving UV points of parametric curves of edges on faces.
Reasons:
1. As I understand, the main goal of saving UV points while writing is to avoid their recalculation while reading. Although, the UV points are recalculated anyway.
2. The UV points written into a file are overwritten in the shape with newly calculated values of bounding points of parametric curve while reading.
3. There is no possibility on the high level (BRepTools::Write, BinTools::Write) to force writing in second format. The same goes for draw commands (save, binsave). You must use the classes *BrepTools_ShapeSet* or *BinTools_ShapeSet* directly for that.
4. OCCT tests data base does not contain a single shape written in this format. Only two OCAF documents are present.
correctness confirmed by existing tests
Notes
(0097612)
git   
2020-12-15 15:14   
Branch CR29723 has been created by asuraven.

SHA-1: 82d475c00b62eca52f91c0af11279d9883164cd5


Detailed log of new commits:

Author: asuraven
Date: Tue Dec 15 12:31:52 2020 +0300

    0029723: Modeling Data - Get rid of second writing format (additional save of UV points)
(0097644)
git   
2020-12-16 15:49   
Branch CR29723 has been deleted by asuraven.

SHA-1: 82d475c00b62eca52f91c0af11279d9883164cd5
(0097645)
git   
2020-12-16 15:49   
Branch CR29723 has been created by asuraven.

SHA-1: 02146ac80096f1ca477259dc2624460cbf13cfd9


Detailed log of new commits:

Author: asuraven
Date: Tue Dec 15 12:31:52 2020 +0300

    0029723: Modeling Data - Get rid of second writing format (additional save of UV points)
    
    Set TopTools current format version to 1
    Set BinTools current format version to 1
    Use the current version when writing Bin OCAF and XML OCAF
    Reading of TopTools V1 and BinTools V2, V3 is still supported.

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031946: Modeling Data - replace version numbers with enumerations in TopTools and BinTools
    
    Added enumerations BinTools_FormatVersion & TopTools_FormatVersion for more clear version tracking in the code.
    Added new BinTools::Write() & BRepTools::Write() overloaded functions with version & isWithTriangles parameters.
    
    Added new "readbrep"/"writebrep" DRAW commands handling reading and writing of both Binary and ASCII .brep formats
    and providing arguments to setup writing of triangulation data and of format version.
    "binrestore" is made an alias to new command "readbrep".
    "binsave" now is an alias to new "writebrep" saving into binary format by default ("writebrep" writes into ASCII format by default).

Author: vro
Date: Tue Dec 15 10:12:26 2020 +0300

    0029822: Make TDocStd_Document extensible
    
    Two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application to its parent class CDF_Application. In TDocStd_Application these methods remain redefined. These little changes allow creation of a new document only in one virtual method NewDocument(). The methods CreateDocument() in all retrieval drivers are deleted.
    
    Modified files:
    - CDF_Application.hxx and cxx: two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application. The input parameter TDocStd_Document is changed to parent class CDM_Document.
    - TDocStd_Application.hxx and cxx: redefines new virtual methods NewDocument() and InitDocument() of the parent class CDF_Application.
    - BinLDrivers_DocumentRetrievalDriver.hxx and cxx, StdLDrivers_DocumentRetrievalDriver.hxx and cxx, XmlLDrivers_DocumentRetrievalDriver.hxx and cxx, PCDM_Reader.hxx: a virtual method CreateDocument() is deleted.
    - TObj_Application.cxx, XCAFApp_Application.hxx and cxx: down-casting to a descendant class TDocStd_Document is applied.
    
    Documentation:
    - upgrade.md is modified.
    
    OCCT: CR29822_1
    Products: nothing

Author: kgv
Date: Sun Dec 13 22:56:45 2020 +0300

    0031994: Draw Harness - dversion prints "Architecture: unrecognized" on ARM host
    
    Added handling of __aarch64__ macros.

Author: kgv
Date: Tue Dec 15 00:37:49 2020 +0300

    0031997: Visualization, TKOpenGl - phong shader compilation error with normal texture map enabled
    
    OpenGl_ShaderManager::defaultGlslVersion() now defines GLSL 120 for normal map texture.

Author: kgv
Date: Mon Dec 14 22:07:24 2020 +0300

    0031996: Visualization - PhongShading.fs compilation error on OpenGL drivers for AMD Radeon
    
    Fixed occLight_IsHeadlight() misuse in sample GLSL program.

Author: mkrylova
Date: Fri Nov 6 11:33:58 2020 +0300

    0031703: Data Exchange, RWGltf_CafWriter - add option putting textures inside GLB file as alternative to external references
    
    RWGltf_CafWriter::ToEmbedTexturesInGlb() - added option embedding textures
    into GLB file enabled by default.
    Fixed uninitialized class field RWGltf_CafWriter::myIsForcedUVExport.
    
    Image_Texture::MimeType() - added method returning MIME type based on image file format.
    Image_Texture::WriteImage() - added method writing image into stream.

Author: ifv
Date: Tue Nov 24 14:17:03 2020 +0300

    0029441: Modeling Algorithms - Incorrect intersection curves between faces
    
    ApproxInt/ApproxInt_SvSurfaces.hxx : adding field myUseSolver in order to manage calculations of characteristics of intersection points.
    ApproxInt/ApproxInt_MultiLine.gxx : implementation of using myUseSolver for treatment points of MultiLine.
    ApproxInt/ApproxInt_ImpPrmSvSurfaces.gxx : implementation of using myUseSolver for case intersection of implicit and parametric surfaces.
    
    Test cases added

Author: vro
Date: Fri Dec 11 18:13:25 2020 +0300

    0029901: Support save to and restore from Stream interface in TObj package
    
    Storage and retrieval of a document by means of a stream is distributed to TObj model.
    Modified files:
    -TObj_Model.hxx, cxx - the virtual methods Load() and SaveAs() obtained a stream as an argument instead of a file name.
    -TObj_Application.hxx, cxx - same extension: the virtual methods LoadDocument() and SaveDocument() use a stream to open and save a document.
    -TObjDRAW.cxx - draw-commands TObjSave and TObjLoad are extended for -stream parameter, which allows usage of a file input or output stream instead of a file name.
    
    A new test:
    - bugs caf bug29901 - it creates a simple TObj-model, saves it on disk using a file stream, loads it by means of a file stream and checks the content.
    
    Modified test:
    - bugs caf bug28425 - just improved to proper manipulate a test-file on disk.

Author: mkrylova
Date: Fri Nov 20 15:10:23 2020 +0300

    0031705: Visualization - move out construction of predefined markers from OpenGl_AspectsSprite to Graphic3d_MarkerImage
    
    Built-in markers definition has been moved from OpenGl_AspectsSprite to Graphic3d_MarkerImage and generalized.
    RGBA8 pixel format is now preferred over BGRA8.
    Fallback OpenGL 1.1 rendering code now supports drawing of colored markers using glDrawPixels().
    
    Added function Image_PixMap::FlipY() flipping image rows.

Author: kgv
Date: Mon Jun 3 08:06:24 2019 +0300

    0030762: Foundation Classes - include backtrace within OSD_SIGSEGV
    
    Standard_Failure now holds an optional stack trace dump.
    Added function Standard::StackTrace() dumping backtrace to the string.
    SegvHandler within OSD_signal now appends backtrace to the message
    if OSD::SignalStackTraceLength() is set to non-zero value
    or environment variable "CSF_DEBUG_MODE" is set for debugging.
    
    Command "dsetsignal" has been extended by -strackTraceLength argument
    for defining stack trace length within signals redirected to C++ exceptions.
    Added "ddebugtraces" command for debugging purposes (adding stack traces to all exceptions).

Author: vro
Date: Mon Dec 14 13:18:27 2020 +0300

    0027426: FSD_BinaryFile: Assignment to a temporary handle variable
    
    A reference is added to the returning object of the method Storage_InternalData::ReadArray().
    Modified files:
    - Storage_InternalData.hxx
    
    OCCT: CR27426
    Products: nothing

Author: kgv
Date: Sat Dec 12 12:24:50 2020 +0300

    0031597: Visualization, TKOpenGl - allow disabling Alpha component writes within OpenGl_Context::ColorMask()
    
    Added OpenGl_Caps::buffersOpaqueAlpha option allowing to disable writes
    into alpha component of color buffer and keep it opaque.
    Added OpenGl_Context::SetColorMaskRGBA() method overriding each color component deliberately.
    
    New option is set within WebGL sample.
(0097649)
git   
2020-12-16 19:18   
Branch CR29723 has been deleted by asuraven.

SHA-1: 02146ac80096f1ca477259dc2624460cbf13cfd9
(0097650)
git   
2020-12-16 19:18   
Branch CR29723 has been created by asuraven.

SHA-1: 02146ac80096f1ca477259dc2624460cbf13cfd9


Detailed log of new commits:

Author: asuraven
Date: Tue Dec 15 12:31:52 2020 +0300

    0029723: Modeling Data - Get rid of second writing format (additional save of UV points)
    
    Set TopTools current format version to 1
    Set BinTools current format version to 1
    Use the current version when writing Bin OCAF and XML OCAF
    Reading of TopTools V1 and BinTools V2, V3 is still supported.

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031946: Modeling Data - replace version numbers with enumerations in TopTools and BinTools
    
    Added enumerations BinTools_FormatVersion & TopTools_FormatVersion for more clear version tracking in the code.
    Added new BinTools::Write() & BRepTools::Write() overloaded functions with version & isWithTriangles parameters.
    
    Added new "readbrep"/"writebrep" DRAW commands handling reading and writing of both Binary and ASCII .brep formats
    and providing arguments to setup writing of triangulation data and of format version.
    "binrestore" is made an alias to new command "readbrep".
    "binsave" now is an alias to new "writebrep" saving into binary format by default ("writebrep" writes into ASCII format by default).

Author: vro
Date: Tue Dec 15 10:12:26 2020 +0300

    0029822: Make TDocStd_Document extensible
    
    Two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application to its parent class CDF_Application. In TDocStd_Application these methods remain redefined. These little changes allow creation of a new document only in one virtual method NewDocument(). The methods CreateDocument() in all retrieval drivers are deleted.
    
    Modified files:
    - CDF_Application.hxx and cxx: two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application. The input parameter TDocStd_Document is changed to parent class CDM_Document.
    - TDocStd_Application.hxx and cxx: redefines new virtual methods NewDocument() and InitDocument() of the parent class CDF_Application.
    - BinLDrivers_DocumentRetrievalDriver.hxx and cxx, StdLDrivers_DocumentRetrievalDriver.hxx and cxx, XmlLDrivers_DocumentRetrievalDriver.hxx and cxx, PCDM_Reader.hxx: a virtual method CreateDocument() is deleted.
    - TObj_Application.cxx, XCAFApp_Application.hxx and cxx: down-casting to a descendant class TDocStd_Document is applied.
    
    Documentation:
    - upgrade.md is modified.
    
    OCCT: CR29822_1
    Products: nothing

Author: kgv
Date: Sun Dec 13 22:56:45 2020 +0300

    0031994: Draw Harness - dversion prints "Architecture: unrecognized" on ARM host
    
    Added handling of __aarch64__ macros.

Author: kgv
Date: Tue Dec 15 00:37:49 2020 +0300

    0031997: Visualization, TKOpenGl - phong shader compilation error with normal texture map enabled
    
    OpenGl_ShaderManager::defaultGlslVersion() now defines GLSL 120 for normal map texture.

Author: kgv
Date: Mon Dec 14 22:07:24 2020 +0300

    0031996: Visualization - PhongShading.fs compilation error on OpenGL drivers for AMD Radeon
    
    Fixed occLight_IsHeadlight() misuse in sample GLSL program.

Author: mkrylova
Date: Fri Nov 6 11:33:58 2020 +0300

    0031703: Data Exchange, RWGltf_CafWriter - add option putting textures inside GLB file as alternative to external references
    
    RWGltf_CafWriter::ToEmbedTexturesInGlb() - added option embedding textures
    into GLB file enabled by default.
    Fixed uninitialized class field RWGltf_CafWriter::myIsForcedUVExport.
    
    Image_Texture::MimeType() - added method returning MIME type based on image file format.
    Image_Texture::WriteImage() - added method writing image into stream.

Author: ifv
Date: Tue Nov 24 14:17:03 2020 +0300

    0029441: Modeling Algorithms - Incorrect intersection curves between faces
    
    ApproxInt/ApproxInt_SvSurfaces.hxx : adding field myUseSolver in order to manage calculations of characteristics of intersection points.
    ApproxInt/ApproxInt_MultiLine.gxx : implementation of using myUseSolver for treatment points of MultiLine.
    ApproxInt/ApproxInt_ImpPrmSvSurfaces.gxx : implementation of using myUseSolver for case intersection of implicit and parametric surfaces.
    
    Test cases added

Author: vro
Date: Fri Dec 11 18:13:25 2020 +0300

    0029901: Support save to and restore from Stream interface in TObj package
    
    Storage and retrieval of a document by means of a stream is distributed to TObj model.
    Modified files:
    -TObj_Model.hxx, cxx - the virtual methods Load() and SaveAs() obtained a stream as an argument instead of a file name.
    -TObj_Application.hxx, cxx - same extension: the virtual methods LoadDocument() and SaveDocument() use a stream to open and save a document.
    -TObjDRAW.cxx - draw-commands TObjSave and TObjLoad are extended for -stream parameter, which allows usage of a file input or output stream instead of a file name.
    
    A new test:
    - bugs caf bug29901 - it creates a simple TObj-model, saves it on disk using a file stream, loads it by means of a file stream and checks the content.
    
    Modified test:
    - bugs caf bug28425 - just improved to proper manipulate a test-file on disk.

Author: mkrylova
Date: Fri Nov 20 15:10:23 2020 +0300

    0031705: Visualization - move out construction of predefined markers from OpenGl_AspectsSprite to Graphic3d_MarkerImage
    
    Built-in markers definition has been moved from OpenGl_AspectsSprite to Graphic3d_MarkerImage and generalized.
    RGBA8 pixel format is now preferred over BGRA8.
    Fallback OpenGL 1.1 rendering code now supports drawing of colored markers using glDrawPixels().
    
    Added function Image_PixMap::FlipY() flipping image rows.

Author: kgv
Date: Mon Jun 3 08:06:24 2019 +0300

    0030762: Foundation Classes - include backtrace within OSD_SIGSEGV
    
    Standard_Failure now holds an optional stack trace dump.
    Added function Standard::StackTrace() dumping backtrace to the string.
    SegvHandler within OSD_signal now appends backtrace to the message
    if OSD::SignalStackTraceLength() is set to non-zero value
    or environment variable "CSF_DEBUG_MODE" is set for debugging.
    
    Command "dsetsignal" has been extended by -strackTraceLength argument
    for defining stack trace length within signals redirected to C++ exceptions.
    Added "ddebugtraces" command for debugging purposes (adding stack traces to all exceptions).

Author: vro
Date: Mon Dec 14 13:18:27 2020 +0300

    0027426: FSD_BinaryFile: Assignment to a temporary handle variable
    
    A reference is added to the returning object of the method Storage_InternalData::ReadArray().
    Modified files:
    - Storage_InternalData.hxx
    
    OCCT: CR27426
    Products: nothing

Author: kgv
Date: Sat Dec 12 12:24:50 2020 +0300

    0031597: Visualization, TKOpenGl - allow disabling Alpha component writes within OpenGl_Context::ColorMask()
    
    Added OpenGl_Caps::buffersOpaqueAlpha option allowing to disable writes
    into alpha component of color buffer and keep it opaque.
    Added OpenGl_Context::SetColorMaskRGBA() method overriding each color component deliberately.
    
    New option is set within WebGL sample.
(0097658)
git   
2020-12-17 11:07   
Branch CR29723 has been deleted by asuraven.

SHA-1: 02146ac80096f1ca477259dc2624460cbf13cfd9
(0097659)
git   
2020-12-17 11:07   
Branch CR29723 has been created by asuraven.

SHA-1: 4f1dbf76d1b46a597dff75e6f9ed9a52e2c52b60


Detailed log of new commits:

Author: asuraven
Date: Tue Dec 15 12:31:52 2020 +0300

    0029723: Modeling Data - Get rid of second writing format (additional save of UV points)
    
    Set TopTools current format version to 1
    Set BinTools current format version to 1
    Use the current version when writing Bin OCAF and XML OCAF
    Reading of TopTools V1 and BinTools V2, V3 is still supported.

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031946: Modeling Data - replace version numbers with enumerations in TopTools and BinTools
    
    Added enumerations BinTools_FormatVersion & TopTools_FormatVersion for more clear version tracking in the code.
    Added new BinTools::Write() & BRepTools::Write() overloaded functions with version & isWithTriangles parameters.
    
    Added new "readbrep"/"writebrep" DRAW commands handling reading and writing of both Binary and ASCII .brep formats
    and providing arguments to setup writing of triangulation data and of format version.
    "binrestore" is made an alias to new command "readbrep".
    "binsave" now is an alias to new "writebrep" saving into binary format by default ("writebrep" writes into ASCII format by default).

Author: vro
Date: Tue Dec 15 10:12:26 2020 +0300

    0029822: Make TDocStd_Document extensible
    
    Two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application to its parent class CDF_Application. In TDocStd_Application these methods remain redefined. These little changes allow creation of a new document only in one virtual method NewDocument(). The methods CreateDocument() in all retrieval drivers are deleted.
    
    Modified files:
    - CDF_Application.hxx and cxx: two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application. The input parameter TDocStd_Document is changed to parent class CDM_Document.
    - TDocStd_Application.hxx and cxx: redefines new virtual methods NewDocument() and InitDocument() of the parent class CDF_Application.
    - BinLDrivers_DocumentRetrievalDriver.hxx and cxx, StdLDrivers_DocumentRetrievalDriver.hxx and cxx, XmlLDrivers_DocumentRetrievalDriver.hxx and cxx, PCDM_Reader.hxx: a virtual method CreateDocument() is deleted.
    - TObj_Application.cxx, XCAFApp_Application.hxx and cxx: down-casting to a descendant class TDocStd_Document is applied.
    
    Documentation:
    - upgrade.md is modified.
    
    OCCT: CR29822_1
    Products: nothing

Author: kgv
Date: Sun Dec 13 22:56:45 2020 +0300

    0031994: Draw Harness - dversion prints "Architecture: unrecognized" on ARM host
    
    Added handling of __aarch64__ macros.

Author: kgv
Date: Tue Dec 15 00:37:49 2020 +0300

    0031997: Visualization, TKOpenGl - phong shader compilation error with normal texture map enabled
    
    OpenGl_ShaderManager::defaultGlslVersion() now defines GLSL 120 for normal map texture.

Author: kgv
Date: Mon Dec 14 22:07:24 2020 +0300

    0031996: Visualization - PhongShading.fs compilation error on OpenGL drivers for AMD Radeon
    
    Fixed occLight_IsHeadlight() misuse in sample GLSL program.

Author: mkrylova
Date: Fri Nov 6 11:33:58 2020 +0300

    0031703: Data Exchange, RWGltf_CafWriter - add option putting textures inside GLB file as alternative to external references
    
    RWGltf_CafWriter::ToEmbedTexturesInGlb() - added option embedding textures
    into GLB file enabled by default.
    Fixed uninitialized class field RWGltf_CafWriter::myIsForcedUVExport.
    
    Image_Texture::MimeType() - added method returning MIME type based on image file format.
    Image_Texture::WriteImage() - added method writing image into stream.

Author: ifv
Date: Tue Nov 24 14:17:03 2020 +0300

    0029441: Modeling Algorithms - Incorrect intersection curves between faces
    
    ApproxInt/ApproxInt_SvSurfaces.hxx : adding field myUseSolver in order to manage calculations of characteristics of intersection points.
    ApproxInt/ApproxInt_MultiLine.gxx : implementation of using myUseSolver for treatment points of MultiLine.
    ApproxInt/ApproxInt_ImpPrmSvSurfaces.gxx : implementation of using myUseSolver for case intersection of implicit and parametric surfaces.
    
    Test cases added

Author: vro
Date: Fri Dec 11 18:13:25 2020 +0300

    0029901: Support save to and restore from Stream interface in TObj package
    
    Storage and retrieval of a document by means of a stream is distributed to TObj model.
    Modified files:
    -TObj_Model.hxx, cxx - the virtual methods Load() and SaveAs() obtained a stream as an argument instead of a file name.
    -TObj_Application.hxx, cxx - same extension: the virtual methods LoadDocument() and SaveDocument() use a stream to open and save a document.
    -TObjDRAW.cxx - draw-commands TObjSave and TObjLoad are extended for -stream parameter, which allows usage of a file input or output stream instead of a file name.
    
    A new test:
    - bugs caf bug29901 - it creates a simple TObj-model, saves it on disk using a file stream, loads it by means of a file stream and checks the content.
    
    Modified test:
    - bugs caf bug28425 - just improved to proper manipulate a test-file on disk.

Author: mkrylova
Date: Fri Nov 20 15:10:23 2020 +0300

    0031705: Visualization - move out construction of predefined markers from OpenGl_AspectsSprite to Graphic3d_MarkerImage
    
    Built-in markers definition has been moved from OpenGl_AspectsSprite to Graphic3d_MarkerImage and generalized.
    RGBA8 pixel format is now preferred over BGRA8.
    Fallback OpenGL 1.1 rendering code now supports drawing of colored markers using glDrawPixels().
    
    Added function Image_PixMap::FlipY() flipping image rows.

Author: kgv
Date: Mon Jun 3 08:06:24 2019 +0300

    0030762: Foundation Classes - include backtrace within OSD_SIGSEGV
    
    Standard_Failure now holds an optional stack trace dump.
    Added function Standard::StackTrace() dumping backtrace to the string.
    SegvHandler within OSD_signal now appends backtrace to the message
    if OSD::SignalStackTraceLength() is set to non-zero value
    or environment variable "CSF_DEBUG_MODE" is set for debugging.
    
    Command "dsetsignal" has been extended by -strackTraceLength argument
    for defining stack trace length within signals redirected to C++ exceptions.
    Added "ddebugtraces" command for debugging purposes (adding stack traces to all exceptions).

Author: vro
Date: Mon Dec 14 13:18:27 2020 +0300

    0027426: FSD_BinaryFile: Assignment to a temporary handle variable
    
    A reference is added to the returning object of the method Storage_InternalData::ReadArray().
    Modified files:
    - Storage_InternalData.hxx
    
    OCCT: CR27426
    Products: nothing

Author: kgv
Date: Sat Dec 12 12:24:50 2020 +0300

    0031597: Visualization, TKOpenGl - allow disabling Alpha component writes within OpenGl_Context::ColorMask()
    
    Added OpenGl_Caps::buffersOpaqueAlpha option allowing to disable writes
    into alpha component of color buffer and keep it opaque.
    Added OpenGl_Context::SetColorMaskRGBA() method overriding each color component deliberately.
    
    New option is set within WebGL sample.
(0097683)
git   
2020-12-17 14:53   
Branch CR29723_1 has been created by asuraven.

SHA-1: 21b133af7eba9ecabe98d4439577a0dbb4710c9d


Detailed log of new commits:

Author: asuraven
Date: Tue Dec 15 12:31:52 2020 +0300

    0029723: Modeling Data - Get rid of second writing format (additional save of UV points)
    
    Set TopTools current format version to 1
    Set BinTools current format version to 1
    Use the current version when writing Bin OCAF and XML OCAF
    Reading of TopTools V1 and BinTools V2, V3 is still supported.

Author: asuraven
Date: Tue Nov 3 17:22:14 2020 +0300

    0031946: Modeling Data - replace version numbers with enumerations in TopTools and BinTools
    
    Added enumerations BinTools_FormatVersion & TopTools_FormatVersion for more clear version tracking in the code.
    Added new BinTools::Write() & BRepTools::Write() overloaded functions with version & isWithTriangles parameters.
    
    Added new "readbrep"/"writebrep" DRAW commands handling reading and writing of both Binary and ASCII .brep formats
    and providing arguments to setup writing of triangulation data and of format version.
    "binrestore" is made an alias to new command "readbrep".
    "binsave" now is an alias to new "writebrep" saving into binary format by default ("writebrep" writes into ASCII format by default).
(0097707)
asuraven   
2020-12-18 14:14   
Tests results:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR29723_1-master-ASURAVEN/view/COMPARE/ [^]
Test parasolid read bug27349 is now OK:
http://occt-tests/CR29723_1-master-ASURAVEN-Products/Debian80-64/parasolid/read/bug27349.html [^]
(0097714)
kgv   
2020-12-18 15:15   
--- a/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx
+++ b/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx
@@ -370,7 +370,7 @@ void XmlMNaming_NamedShapeDriver::WriteShapeSection (XmlObjMgt_Element& theEleme
 
   
//  Add text to the "shapes" element
   if (myShapeSet.NbShapes() > 0) {
-    myShapeSet.SetFormatNb(TopTools_FormatVersion_VERSION_2);
+    myShapeSet.SetFormatNb(TopTools_FormatVersion_CURRENT);
...
@@ -143,7 +143,7 @@ BinMNaming_NamedShapeDriver::BinMNaming_NamedShapeDriver
                         (const Handle(Message_Messenger)& theMsgDriver)
 : BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TNaming_NamedShape)->Name()),
   myShapeSet (Standard_False),
-  myFormatNb (BinTools_FormatVersion_VERSION_3)
+  myFormatNb (BinTools_FormatVersion_CURRENT)

Using TopTools_FormatVersion_CURRENT is an error-prone approach here as it would allow newer (not yet defined) versions of TopTools_FormatVersion/BinTools_FormatVersion persistence to be written into XMLCaf and XBF formats stating older version.
Please change to TopTools_FormatVersion_VERSION_1 and BinTools_FormatVersion_VERSION_1 for now.

-         if (myFormatNb >= BinTools_FormatVersion_VERSION_2)
+         if (myFormatNb == BinTools_FormatVersion_VERSION_2 ||
+        myFormatNb == BinTools_FormatVersion_VERSION_3)

Please correct indentation.
(0097716)
git   
2020-12-18 15:45   
Branch CR29723_1 has been deleted by asuraven.

SHA-1: 21b133af7eba9ecabe98d4439577a0dbb4710c9d
(0097717)
git   
2020-12-18 15:45   
Branch CR29723_1 has been created by asuraven.

SHA-1: fbda2b4621e531d99b08956b5a4875dd8ba1d0ac


Detailed log of new commits:

Author: asuraven
Date: Tue Dec 15 12:31:52 2020 +0300

    0029723: Modeling Data - Get rid of second writing format (additional save of UV points)
    
    Set TopTools current format version to 1
    Set BinTools current format version to 1
    Use the current version when writing Bin OCAF and XML OCAF
    Reading of TopTools V1 and BinTools V2, V3 is still supported.
(0097718)
asuraven   
2020-12-18 15:53   
Remarks fixed in same (CR29723_1) branch.
Tests are rerunning now
(0097721)
kgv   
2020-12-18 16:40   
    if (aVersion > BinTools_FormatVersion_CURRENT)
    {
      theDI << "Syntax error: unknown format version";
      return 1;
    }

shouldn't new test case writing .brep file with specified version not equal to 1 fail now due to this check?
Please update range checks within "writebrep" command, update command help to specify that version 1 is written by default and check test case added by previous patch that it does checks writing of version 3 of binary format.
(0097727)
git   
2020-12-18 19:21   
Branch CR29723_1 has been deleted by asuraven.

SHA-1: fbda2b4621e531d99b08956b5a4875dd8ba1d0ac
(0097728)
git   
2020-12-18 19:21   
Branch CR29723_1 has been created by asuraven.

SHA-1: fbda2b4621e531d99b08956b5a4875dd8ba1d0ac


Detailed log of new commits:

Author: asuraven
Date: Tue Dec 15 12:31:52 2020 +0300

    0029723: Modeling Data - Get rid of second writing format (additional save of UV points)
    
    Set TopTools current format version to 1
    Set BinTools current format version to 1
    Use the current version when writing Bin OCAF and XML OCAF
    Reading of TopTools V1 and BinTools V2, V3 is still supported.
(0097729)
asuraven   
2020-12-18 19:28   
1. Version's upper limit changed to 3 for binary format
2. Default binary version changed to 1 in writebrep help
3. Test with writebrep/readbrep for all supported format versions added to this issue
(0097808)
git   
2020-12-19 16:39   
Branch CR29723_1 has been updated forcibly by kgv.

SHA-1: f5725f45d48114ee50afded275ed1497f217dbb6
(0097811)
kgv   
2020-12-20 03:06   
Please raise the patch
- OCCT branch: CR29723_1.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR29723_1-master-KGV/ [^]
(0097830)
git   
2020-12-21 14:27   
Branch CR29723_1 has been deleted by asuraven.

SHA-1: f5725f45d48114ee50afded275ed1497f217dbb6
(0097831)
git   
2020-12-21 14:27   
Branch CR29723_1 has been created by asuraven.

SHA-1: e5c7059c02c51432dbc6734186666c1410bd8be5


Detailed log of new commits:

Author: asuraven
Date: Tue Dec 15 12:31:52 2020 +0300

    0029723: Modeling Data - Get rid of second writing format (additional save of UV points)
    
    Set TopTools current format version to 1
    Set BinTools current format version to 1
    Use the current version when writing Bin OCAF and XML OCAF
    Reading of TopTools V1 and BinTools V2, V3 is still supported.
(0097837)
asuraven   
2020-12-21 17:28   
Tests rtesults: http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR29723_1-master-ASURAVEN/view/COMPARE/ [^]
(0097838)
git   
2020-12-21 17:33   
Branch CR29723_1_kgv has been created by kgv.

SHA-1: f5725f45d48114ee50afded275ed1497f217dbb6


Detailed log of new commits:

Author: asuraven
Date: Tue Dec 15 12:31:52 2020 +0300

    0029723: Modeling Data - Get rid of second writing format (additional save of UV points)
    
    Default BinTools_ShapeSet format version has been changed from 3 to 1.
    BinMNaming_NamedShapeDriver (Bin OCAF) now writes shapes in 1st version of Binary format instead of 3rd.
    XmlMNaming_NamedShapeDriver (Xml OCAF) now writes shapes in 1st version of ASCII format instead of 2nd.
    
    writebrep now by default writes into 1st binary format version instead of 3rd.
(0097839)
git   
2020-12-21 17:36   
Branch CR29723_1_kgv has been updated by kgv.

SHA-1: 374fbc3021c740f59cc809bf99c931a127791a55


Detailed log of new commits:

Author: kgv
Date: Mon Dec 21 17:37:01 2020 +0300

    # add test case

(0097840)
git   
2020-12-21 17:36   
Branch CR29723_2 has been created by kgv.

SHA-1: dc7f739c9c801965651afe102388d69fd4d86fd7


Detailed log of new commits:

Author: asuraven
Date: Tue Dec 15 12:31:52 2020 +0300

    0029723: Modeling Data - Get rid of second writing format (additional save of UV points)
    
    Default BinTools_ShapeSet format version has been changed from 3 to 1.
    BinMNaming_NamedShapeDriver (Bin OCAF) now writes shapes in 1st version of Binary format instead of 3rd.
    XmlMNaming_NamedShapeDriver (Xml OCAF) now writes shapes in 1st version of ASCII format instead of 2nd.
    
    writebrep now by default writes into 1st binary format version instead of 3rd.
(0097841)
kgv   
2020-12-21 17:39   
Please raise the patch
- OCCT branch: CR29723_2.

(with added new test case)
(0097911)
bugmaster   
2020-12-26 12:14   
Combination -
OCCT branch : WEEK-52
master SHA - 41046145c4a15f5cedf5f3c5877952ee00d568b4
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : WEEK-52 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
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: 17722.770000000193 / 17710.950000000055 [+0.07%]
Products
Total CPU difference: 12416.490000000109 / 12412.520000000126 [+0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.5625 / 19274.6875 [+0.24%]
Products
Total CPU difference: 13844.421875 / 13853.046875 [-0.06%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0097920)
git   
2020-12-26 14:52   
Branch CR29723 has been deleted by inv.

SHA-1: 4f1dbf76d1b46a597dff75e6f9ed9a52e2c52b60
(0097921)
git   
2020-12-26 14:52   
Branch CR29723_1 has been deleted by inv.

SHA-1: e5c7059c02c51432dbc6734186666c1410bd8be5
(0097922)
git   
2020-12-26 14:52   
Branch CR29723_1_kgv has been deleted by inv.

SHA-1: 374fbc3021c740f59cc809bf99c931a127791a55
(0097923)
git   
2020-12-26 14:52   
Branch CR29723_2 has been deleted by inv.

SHA-1: dc7f739c9c801965651afe102388d69fd4d86fd7





View Issue Details
31703 [Open CASCADE] OCCT:Data Exchange feature have not tried 2020-08-10 16:17 2020-12-25 13:49
kgv  
bugmaster  
normal  
verified  
fixed  
none    
none  
  7.6.0*  
de_mesh/gltf_write/helmetglb,lanternglb
Data Exchange, RWGltf_CafWriter - add option putting textures inside GLB file as alternative to external references
Currently, binary glTF (glb) export preserves texture images as external file references. It is desired providing an option which would put textures inside glb file.
pload XDE OCAF VISUALIZATION
ReadGltf D Lantern.glb
vinit View
XDisplay -dispMode 1 D
vfit
WriteGltf D LanternWithTextures.glb -texturesInside
Lantern.glb (9,872,848) 2020-11-17 17:45
https://tracker.dev.opencascade.org/
Notes
(0096837)
git   
2020-11-17 17:39   
Branch CR31703 has been created by mkrylova.

SHA-1: c8a2bc3048c317b25a5dae4f5b572d648f9ee13a


Detailed log of new commits:

Author: mkrylova
Date: Fri Nov 6 11:33:58 2020 +0300

    0031703: Data Exchange, RWGltf_CafWriter - add option putting textures inside GLB file as alternative to external references
    
    - Added opportunity ti put textures inside GLB file
    - Added new flag to WriteGltf
(0096841)
kgv   
2020-11-17 18:06   
(edited on: 2020-11-24 10:32)
+      theWriter->Key ("mimeType");
+      theWriter->String ("image/png");

Why all images are expected to be in PNG format?
Image_Texture::ProbeImageFileFormat() could be useful here.

@@ -301,8 +338,10 @@ bool RWGltf_CafWriter::Perform (const Handle(TDocStd_Document)& theDocument,
                                 
const TDF_LabelSequence& theRootLabels,
                                 const TColStd_MapOfAsciiString* theLabelFilter,
                                 const TColStd_IndexedDataMapOfStringString& theFileInfo,
-                                const Message_ProgressRange& theProgress)
+                                const Message_ProgressRange& theProgress,
+                                Standard_Boolean theIsTexturesInside)

The new flag should not be passed through Perform() parameter - it should be set via dedicated method.

+  Standard_Boolean                              myToPutTexturesInside;

New class field is undefined within constructor.

(0097023)
kgv   
2020-11-24 10:29   
+      std::ofstream aFileOut;
+      aBinFile.write ((const char*)aBuffer->Data(), aBuffer->Size());
+      aFileOut.close();
What is the purpose for unused aFileOut?

+        OSD_OpenStream (aFileIn, aCurrImageTexture->FilePath().ToCString(), std::ios::in | std::ios::binary);

+        aBuffer = new NCollection_Buffer(NCollection_BaseAllocator::CommonBaseAllocator(), aLen);
+      aBinFile.write ((const char*)aBuffer->Data(), aBuffer->Size());

This is counter-efficient always reading entire image file into temporary buffer. The usual way is reading file by chunks of reasonable size into temporary buffer / writing into output file.
(0097037)
git   
2020-11-24 16:54   
Branch CR31703 has been updated forcibly by mkrylova.

SHA-1: 5fef75bc1fbf8cd1cef1b6e0c10932fd63eb9b7f
(0097040)
git   
2020-11-24 17:04   
Branch CR31703_1 has been created by mkrylova.

SHA-1: 57f252e34f124726827923f7e061e2c4ef5b8675


Detailed log of new commits:

Author: mkrylova
Date: Fri Nov 6 11:33:58 2020 +0300

    0031703: Data Exchange, RWGltf_CafWriter - add option putting textures inside GLB file as alternative to external references
    
    - Added opportunity ti put textures inside GLB file
    - Added new flag to WriteGltf
(0097111)
kgv   
2020-11-27 16:28   
(edited on: 2020-11-27 16:35)
+  Standard_Boolean myToPutTexturesInside;//!< flag to write image textures into binary gltf format 
(.glb)

myToEmbedTexturesInGlb;

+  void SetTexturesInside (Standard_Boolean theToPutTexturesInside) { myToPutTexturesInside = theToPutTexturesInside; 
}

Getter is also expected.

+  myToPutTexturesInside (Standard_False)
...
+  Standard_Boolean isTexturesInside = Standard_False;

TRUE will be more natural default for GLB format (intended to pack all model data into single file).

+  if (myToPutTexturesInside)

The writer should handle this option only in combination with GLB output (embedding textures into text glTF format requires different approach with base64 encoding, which is another feature).

+  Standard_Integer aGltfImgBufferKey = myNbImages + 4;

What does +4 means?

   Standard_EXPORT void addImage (RWGltf_GltfOStreamWriter* theWriter,
                                  const Handle(Image_Texture)& theTexture,
-                                 Standard_Boolean& theIsStarted);
+                                 Standard_Boolean& theIsStarted,
+                                 Standard_Boolean theIsTexturesInside = Standard_False);

It looks more like a separate function rather an extension to existing function.

+      Handle(NCollection_Buffer) aBuffer = aCurrImageTexture->DataBuffer();
+      if (aBuffer.IsNull())
+      {

if (Handle(NCollection_Buffer) aBuffer = aCurrImageTexture->DataBuffer())
{}
else{}

+        for (Standard_Size anIdx = 0; anIdx < aLen; anIdx += 16)
+          aBuffer = new NCollection_Buffer(NCollection_BaseAllocator::CommonBaseAllocator(), aCurrSize);


Why re-creating a buffer in a loop?
It should be enough allocating a buffer of meaningful size like 4 KiB once.

+          aBinFile.write ((const char*)aBuffer->Data(), aBuffer->Size());
+          if (!aBinFile.good())

It is desired checking writing status after closing the file stream, as write() might fill in an internal buffer and flush data to real file later.

   RWGltf_GltfBufferView                         myBuffViewNorm;      //!< current buffer view with 
nodes normals
   RWGltf_GltfBufferView                         myBuffViewTextCoord; //!< current buffer view with 
nodes UV coordinates
   RWGltf_GltfBufferView                         myBuffViewInd;       //!< current buffer view with 
triangulation indexes
+  NCollection_Vector<RWGltf_GltfBufferView>     myBuffViewImages;    //!< current buffer views 
with images

Could logic writing images follow the same approach as writing vertex data?

+    if (std::find (myImageVector.begin(), myImageVector.end(), aMetallicRoughnessTexture) == myImageVector.end())


Please use structures like NCollection_IndexedDataMap for filtering duplicates.

+      std::string anImageFormat = "image/";

std::string looks unexpected here - please use TCollection_AsciiString if possible.
In fact, it is RWGltf_GltfMaterialMap that is currently supposed to track image duplicates and to write image files;
it might be reasonable reconsidering approach and moving logic writing a file with aggregated image buffer there as alternative to or extension of RWMesh_MaterialMap::CopyTexture().

+      anImageFormat += theTexture->ProbeImageFileFormat().ToCString();

Image_Texture::ProbeImageFileFormat() returns short names of image format, not mime-types.
Please consider adding a method converting short image format name into a registered or well-known mime-type when possible
(for instance, "image/vnd-ms.dds" is specified for DDS format in MSDN documentation, not "image/dds").
https://docs.microsoft.com/en-us/windows/win32/wic/dds-format-overview [^]
https://www.iana.org/assignments/media-types/media-types.xhtml#image [^]

According to glTF 2.0 specification, only "image/jpeg" and "image/png" are valid image formats without glTF extensions enabled:
https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#file-extensions-and-mime-types [^]

Real models might use images in other formats.
In future it would be desired properly implementing extensions like MSFT_texture_dds/EXT_texture_webp
and to convert textures into compatible formats using Image_AlienPixMap otherwise:
https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Vendor/MSFT_texture_dds/README.md [^]
https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Vendor/EXT_texture_webp/README.md [^]

But for the moment - please log a warning about potentially incompatible glTF file and keep writing images unmodified
(the issue is the same for existing glTF writer copying image files - hence, could be handled as a separate bug).

(0097234)
git   
2020-12-02 14:16   
Branch CR31703_1 has been updated forcibly by mkrylova.

SHA-1: 386a23beca82c97337b28e3a4cb2f6b2f0e30dad
(0097235)
git   
2020-12-02 14:22   
Branch CR31703_2 has been created by mkrylova.

SHA-1: 8432d0c34cd2e6b4a0e344b8aa276e599d50d4b8


Detailed log of new commits:

Author: mkrylova
Date: Fri Nov 6 11:33:58 2020 +0300

    0031703: Data Exchange, RWGltf_CafWriter - add option putting textures inside GLB file as alternative to external references
    
    - Added opportunity ti put textures inside GLB file
    - Added new flag to WriteGltf
(0097246)
git   
2020-12-02 15:41   
Branch CR31703_2 has been updated by mkrylova.

SHA-1: f73580183d2a0e579454acbc0c45bbea396240ee


Detailed log of new commits:

Author: mkrylova
Date: Wed Dec 2 15:43:44 2020 +0300

    kgv remarks:
     - fixed code style

(0097249)
git   
2020-12-02 16:04   
Branch CR31703_2 has been updated by mkrylova.

SHA-1: deb6d5dde952c8b80c7e37f9703615ee64b0de84


Detailed log of new commits:

Author: mkrylova
Date: Wed Dec 2 16:06:18 2020 +0300

    kgv remarks:
     - fixed code style

(0097408)
git   
2020-12-07 12:43   
Branch CR31703_3 has been created by mkrylova.

SHA-1: 48e29bfd178642608f77fc62eccaa5914399b68a


Detailed log of new commits:

Author: mkrylova
Date: Fri Nov 6 11:33:58 2020 +0300

    0031703: Data Exchange, RWGltf_CafWriter - add option putting textures inside GLB file as alternative to external references
    
    - Added opportunity to put textures inside GLB file
    - Added new flag to WriteGltf
(0097568)
git   
2020-12-14 11:26   
Branch CR31703_3 has been updated forcibly by kgv.

SHA-1: 2db9706c425e355f94939e79ea08601f453cdeef
(0097577)
git   
2020-12-14 16:27   
Branch CR31703_4 has been created by kgv.

SHA-1: fb27f1c7aa721e78115f744dc090e125cb2f3f0f


Detailed log of new commits:

Author: mkrylova
Date: Fri Nov 6 11:33:58 2020 +0300

    0031703: Data Exchange, RWGltf_CafWriter - add option putting textures inside GLB file as alternative to external references
    
    RWGltf_CafWriter::ToEmbedTexturesInGlb() - added option embedding textures
    into GLB file enabled by default.
    
    Image_Texture::MimeType() - added method returning MIME type based on image file format.
    Image_Texture::WriteImage() - added method writing image into stream.
    
    
    
    - Added opportunity to put textures inside GLB file
    - Added new flag to WriteGltf
(0097578)
git   
2020-12-14 16:35   
Branch CR31703_4 has been updated forcibly by kgv.

SHA-1: f2efdc68040fd0741dcc9131c0f58887ef4c3c85
(0097583)
git   
2020-12-14 17:14   
Branch CR31703_4 has been updated forcibly by kgv.

SHA-1: a2769e79e3ab2f0cfc7fcdb24494c8036d40a5b7
(0097589)
git   
2020-12-14 19:02   
Branch CR31703_4 has been updated forcibly by kgv.

SHA-1: 9f6a511c086f91e2c55e3c22b916f09536a682cc
(0097592)
kgv   
2020-12-14 21:00   
Please raise the patch
- OCCT branch: CR31703_4.

http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31703_4-master-KGV/ [^]
(0097593)
git   
2020-12-14 21:01   
Branch CR31703_4 has been updated forcibly by kgv.

SHA-1: 41e55dc636bc4ec56f0b4764c87c0ff558347a25
(0097741)
bugmaster   
2020-12-19 14:48   
Combination -
OCCT branch : IR-2020-12-18
master SHA - 04114fd201c20efe9fbe85f00bec9a99ae3747ad
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-12-18 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
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: 17709.570000000054 / 17744.450000000124 [-0.20%]
Products
Total CPU difference: 12258.480000000121 / 12330.210000000125 [-0.58%]
Windows-64-VC14:
OCCT
Total CPU difference: 19272.796875 / 19429.1875 [-0.80%]
Products
Total CPU difference: 13712.859375 / 13755.5 [-0.31%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0097779)
git   
2020-12-19 15:22   
Branch CR31703_4 has been deleted by inv.

SHA-1: 41e55dc636bc4ec56f0b4764c87c0ff558347a25
(0097783)
git   
2020-12-19 15:22   
Branch CR31703_3 has been deleted by inv.

SHA-1: 2db9706c425e355f94939e79ea08601f453cdeef
(0097796)
git   
2020-12-19 15:23   
Branch CR31703_2 has been deleted by inv.

SHA-1: deb6d5dde952c8b80c7e37f9703615ee64b0de84
(0097797)
git   
2020-12-19 15:23   
Branch CR31703_1 has been deleted by inv.

SHA-1: 386a23beca82c97337b28e3a4cb2f6b2f0e30dad
(0097800)
git   
2020-12-19 15:23   
Branch CR31703 has been deleted by inv.

SHA-1: 5fef75bc1fbf8cd1cef1b6e0c10932fd63eb9b7f





View Issue Details
31988 [Community] OCCT:Visualization minor have not tried 2020-12-09 11:02 2020-12-23 08:30
Vico Liang  
kgv  
normal  
feedback  
duplicate  
none    
none  
  7.6.0*  
Visualization - use Quantity_ColorRGBA as background rather than Quantity_Color to support alpha channel
The current implement uses Quantity_Color as input in class V3d_View
void V3d_View::SetBackgroundColor (const Quantity_Color& theColor)

But the storage field is in class Graphic3d_CView:
  Quantity_ColorRGBA myBgColor;

OpenGL actually uses the alpha value, occt set the alpha value to 0 as below:
glClearColor (aBgColor.r(), aBgColor.g(), aBgColor.b(), 0.0f);

It means the color is full transparent, it will cause blending. The blending result is very hard to predictable especially using with external GUI such as QT.

It would be nice to have an option to set the alpha channel by user.

Method SetBgGradientColors have the same issue.
void V3d_View::SetBgGradientColors (const Quantity_Color& theColor1,
                                    const Quantity_Color& theColor2,
                                    const Aspect_GradientFillMethod theFillStyle,
                                    const Standard_Boolean theToUpdate)
Notes
(0097529)
kgv   
2020-12-12 13:17   
(edited on: 2020-12-12 13:18)
The idea of providing an alpha component option within viewer background color has appeared in the past.
However, in practice such API would produce only confusion, as apart from background, alpha values are also written by rendering semi-transparent objects.

The option proposed by a patch for 0031597 is expected to handle both issues and ensure 3D Viewer content is rendered opaque even if color buffer contains alpha component.

(0097833)
kgv   
2020-12-21 15:19   
Dear bugmaster,

please close the issue as duplicate of 0031597.

Dear Vico,

consider reopening the issue in case if 0031597 doesn't fulfill your needs.
(0097842)
Vico Liang   
2020-12-21 18:10   
(edited on: 2020-12-21 18:12)
Dear Kirill,

Issue 0031597 provides option to enable or diable alpha component, it can't change the alpha value even if the alpha channel is enabled. So these two issues are different. I insist to open this issue. This will allow user to control the alpha value not only enable or disalbe the option.

(0097847)
kgv   
2020-12-21 19:47   
> it can't change the alpha value even if the alpha channel is enabled
I see no meaning of setting a non-opaque alpha to the background color - what is expected result for it?
(0097855)
Vico Liang   
2020-12-22 10:28   
>>I see no meaning of setting a non-opaque alpha to the background color
The blending algorithm will use the alpha value if setting so. OpenGL will generate different result.
(0097858)
kgv   
2020-12-22 10:49   
Dear Vico,

> The blending algorithm will use the alpha value if setting so.
> OpenGL will generate different result.
There are the following use cases:
1. Alpha color writes are disabled.
   Background is filled in as fully opaque in case of RGBA buffer.
   Opaque and Translucent objects fill in pixels with opaque color - alpha values are used for blending but not written into result frame buffer.

RESULT: image is opaque, transparent of semitransparent objects is pre-multiplied with background.

2. Alpha color writes are enabled.
   Background is filled in as fully transparent.
   Opaque object fills corresponding pixels with opaque color.
   Translucent object fills pixels with semitransparent color (last drawn object overrides alpha values).

RESULT: image will contain two semitransparent regions: original background and translucent objects. Note that the alpha component for latter ones will be incorrect - as color is already blended with background, applying transparency second time will make result more transparent.

Allowing to set arbitrary transparency to background color will reveal two more scenarios:
3. Alpha color writes are disabled.
   Background is filled in as semitransparent color.
   Opaque and translucent objects will not write alpha values into frame buffer.

RESULT: the whole image will have a uniform semitransparent alpha that was defined for background.

4. Alpha color writes are enabled.
   Background is filled in as semitransparent color.
   Opaque object fills corresponding pixels with opaque color (override background).
   Translucent object fills pixels with semitransparent color (last drawn object overrides alpha values).

RESULT: image will contain two semitransparent regions: original background (now semitransparent, not fully transparent) and translucent objects.
(0097859)
kgv   
2020-12-22 10:54   
The 3rd case looks dubious to me, as if application wants to blend 3D Viewer content with some other background uniformly - there should be more straightforward ways to do it in specific engine, where 3D Viewer is integrated into.

The 4th case looks not very practical as 2nd case - it would just allow to avoid fully transparent background color.

Which use case do you actually see in your scenario?

Note that there might be a 5th use case with expected behavior: background is (semi)transparent, opaque and transparent objects fill in alpha as opaque (e.g. overrides background alpha, but transparent objects write color as opaque). But this is technically not implementable in current design.
(0097868)
Vico Liang   
2020-12-22 18:43   
Dear Kirill,

Wow, you really surprised me. I just think that there are different blending functions in OpenGL intenral. I don't consider the details as your described. From your described senarios, it's worthwhile to have this alpha channel controlable from user input, right? I'd like to see the surprised rendering result when this feature is available.





View Issue Details
31964 [Community] OCCT:Visualization feature have not tried 2020-11-28 09:44 2020-12-22 18:46
Vico Liang  
kgv  
normal  
new  
open  
none    
none  
  7.6.0*  
Visualization, TKOpenGl - add option to disable background color filling for external render buffer
There is a user case to render directly to external buffer as an overlay. This feature requires not clear color buffer, depth buffer, stencil buffer, etc. Is it possible to add options?
FBO-changes status.png (81,726) 2020-12-02 05:25
https://tracker.dev.opencascade.org/
Notes
(0097113)
kgv   
2020-11-28 11:07   
(edited on: 2020-11-28 11:12)
Vico,

current rendering pipeline including rendering into additional off-screen buffers and blitting result image into window buffer or into another off-screen buffer. In such pipeline, not clearing a temporary off-screen buffer would produce just undefined results on a screen while blitting image from a temporary to another buffer as currently there are no options to copy only portions of the image or define copy criteria.

OCCT renderer is commonly used as first render layer (e.g. it fills in image as background, which can be augmented by external renderer) when combined with another renderer. Combination in opposite order should be also technically possible, but it would require thoughtful alterings to OCCT renderer, which couldn't be easily verified without real use case of two combined renderers. Hence, I would rather avoid trying to make any blind patches to OCCT just adding options like not clearing color or depth buffer without being able to confirm that these flags actually help in real-world use case.

The most straight-forward approach I can imagine is assigning an off-screen FBO to OpenGl_View::SetFBO() - which could be either a wrapper to an off-screen buffer used by another renderer (like
QOpenGLFramebufferObject/
QOpenGLWidget), or something different and disabling OpenGl_View::SetImmediateModeDrawToFront() in a similar way as V3d_View::ToPixMap() does for making an off-screen image dump (this disables usage of additional FBOs by OCCT renderer).

The experiments with non-clearing buffer could be done without patching OCCT.
First clearing is done within OpenGl_View::redraw() method before calling OpenGl_View::render(), which are virtual methods, so that application may override OpenGl_View::redraw() to skip clearing the buffer.

(0097145)
Vico Liang   
2020-11-28 18:01   
Dear KGV, Thanks for the details. I'll try it as your options and let you know the result.
(0097146)
Vico Liang   
2020-11-30 03:25   
Dear KGV,

I'd like to ask a question about the two redraw fucntios : RedrawImmediate() and Redraw() which one should be used when filling the externl render buffer? The app has immediate layers, to gain better performance, shall i use RedrawImmediate rather than Redraw()?

Thanks.
(0097158)
kgv   
2020-11-30 12:35   
Both Redraw() and RedrawImmediate() are called by normal OCCT application (Redraw() is called first, then RedrawImmediate() is called while moving mouse for dynamic highlighting, then Redraw() again when camera position changes or when changing scene content).

AIS_ViewController::handleViewRedraw() decides which to call basing on V3d_View::IsInvalidated() state, so that other AIS_ViewController methods modifying the scene call V3d_View::Invalidate().
(0097177)
Vico Liang   
2020-11-30 17:47   
OK, your explaination is really helpful for me to understand the background of redraw logic. Thank you so much for your time.
(0097228)
Vico Liang   
2020-12-02 05:17   
(edited on: 2020-12-02 05:36)
Dear Kirill,

I found an issue when using the QOpenGLFramebufferObject item as OCCT FBO. OCCT will changes the opengl context inside QT and it can't be recovered with function call QQuickWindow::resetOpenGLState(). After returning from OCCT FBO rendering, the whole QT screen will become a little darker.

I have tried that on windows 10 with vs2017. I'm trying to use the underlay mode without chaning anything of OCCT. I uploaded the pictures. Coule you please help to look at this? Is there a way to restore to the original status after FBO rendering?

Thanks.

(0097295)
Vico Liang   
2020-12-04 08:50   
Dear Kirill,

I found an issue when using QOpenGLFramebufferObject as external FBO. The color attachment type is not GL_RENDERBUFFER, the type is GL_TEXTURE. The below function will generate an error: "OpenGl_FrameBuffer::InitWrapper(), color attachment of unsupported type has been skipped!"

OpenGl_FrameBuffer::InitWrapper (const Handle(OpenGl_Context)& theGlCtx)
{
    
  // VICO NOTE: (aColorType == GL_TEXTURE)
  if (aColorType == GL_RENDERBUFFER)
  {
    theGlCtx->arbFBO->glGetFramebufferAttachmentParameteriv (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &aColorId);
    myGlColorRBufferId = aColorId;
  }
  else if (aColorType != GL_NONE)
  {
    TCollection_ExtendedString aMsg = "OpenGl_FrameBuffer::InitWrapper(), color attachment of unsupported type has been skipped!";
    theGlCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
                           GL_DEBUG_TYPE_ERROR,
                           0,
                           GL_DEBUG_SEVERITY_HIGH,
                           aMsg);
  }
(0097843)
Vico Liang   
2020-12-21 18:18   
The root cause is that OCCT changed the flag: GL_FRAMEBUFFER_SRGB
(0097848)
kgv   
2020-12-21 19:50   
If you mean "glEnable (GL_FRAMEBUFFER_SRGB);" then how it could affect "OpenGl_FrameBuffer::InitWrapper()"?
(0097854)
Vico Liang   
2020-12-22 03:03   
>>If you mean "glEnable (GL_FRAMEBUFFER_SRGB);" then how it could affect "OpenGl_FrameBuffer::InitWrapper()"?
No, "glEnable (GL_FRAMEBUFFER_SRGB)" will not affect "OpenGl_FrameBuffer::InitWrapper()". "aColorType == GL_TEXTURE" in function "OpenGl_FrameBuffer::InitWrapper()" is not handled properly which will post an error message.

I mean flag GL_FRAMEBUFFER_SRGB is changed to enabled after rendering to QOpenGLFramebufferObject. It's better to restore this flag after rendering.
(0097860)
kgv   
2020-12-22 10:59   
(edited on: 2020-12-22 11:00)
Dear Vico,

> I mean flag GL_FRAMEBUFFER_SRGB is changed to enabled after rendering to QOpenGLFramebufferObject.
> It's better to restore this flag after rendering.
OCCT 3D Viewer is unaware of any expectations of OpenGL state of external engine.
The other engine might rely on GL_FRAMEBUFFER_SRGB for proper rendering or do not handle it well - both cases are possible, and the first one is more natural when combined with OCCT 3D Viewer.

Therefore, disabling GL_FRAMEBUFFER_SRGB should be done at application level at the place returning control over OpenGL context rendering from OCCT 3D Viewer to other engine.

void viewerRestoreGlState (const Handle(OpenGl_GraphicDriver)& theDriver)
{
  const Handle(OpenGl_Context)& aGlCtx = theDriver->GetSharedContext();
  if (aGlCtx->core15fwd != nullptr)
  {
    aGlCtx->core15fwd->glActiveTexture (GL_TEXTURE0);
  }
  if (aGlCtx->hasSRGBControl)
  {
    aGlCtx->core11fwd->glDisable (GL_FRAMEBUFFER_SRGB);
  }
  ::glPixelStorei (GL_PACK_ALIGNMENT,   4);
  ::glPixelStorei (GL_UNPACK_ALIGNMENT, 4);
}


(0097869)
Vico Liang   
2020-12-22 18:46   
Dear Kirill,

Thanks so much for your hint. I will use the function as your provided to restore the openGL state after rendering. It's a great help for me.





View Issue Details
29745 [Community] OCCT:Modeling Data crash have not tried 2018-05-08 17:55 2020-12-22 11:55
ventu  
akaftasev  
normal  
feedback 7.2.0  
open  
none    
none  
   
GeomAdaptor_Surface::VIntervals fails on periodic surfaces
Suppose:
_ we have a V periodic NURBS Surface;
_ we have a GeomAdaptor_Surface with V limits outside of the period;
_ the surface has discontinuities;
_ we call GeomAdaptor_Surface::VIntervals to get a list of continuous subintervals.

That method will build an U iso-curve and get such intervals on that; at the end, however, that intervals are bounded with:
  T(T.Lower()) = myVFirst;
  T(T.Lower() + myNbVIntervals) = myVLast;

The problem arises since the value returned by the curve Intervals(...) method will be within the period, so those values will be invalid.


Example:
_ surface with periodic V knot vector ranging [0 ; 4];
_ surface adaptor with limits [5 ; 6].
_ Intervals(...) on the ISO curve returns [1,2,3];
_ the statements reported above will transform the result in [5,2,6].

This will lead to a crash in subsequent processing.



A solution along the line of the following might work:
  if (mySurface->IsVPeriodic())
    for (Standard_Integer i=T.Lower()+1;i<T.Lower()+myNbVIntervals;++i)
      T(i)+=myVFirst-T(T.Lower());
  T(T.Lower()) = myVFirst;
  T(T.Lower() + myNbVIntervals) = myVLast;


Notice the problem should also occur in U direction.
Notes
(0096583)
akaftasev   
2020-11-06 11:58   
Dear ventu, can you attach more detailed steps to reproduce current bug, because according to this description it is hard to reproduce it
(0097726)
ventu   
2020-12-18 18:35   
TL;DR
Changes made in 7.4.0 prevent this bug from happening again.
However, I'm not sure the new result is correct either.



The problem arose while importint a STeP model and I'm having an hard time reproducing it programmatically (even with 7.3.0).

In any case, please take a look at the following code:
  TColgp_Array2OfPnt Poles(1,2,1,3);
  Poles(1,1)=gp_Pnt(0,0,0); Poles(2,1)=gp_Pnt(0,0,1);
  Poles(1,2)=gp_Pnt(1,0,0); Poles(2,2)=gp_Pnt(1,0,1);
  Poles(1,3)=gp_Pnt(1,1,0); Poles(2,3)=gp_Pnt(1,1,1);
  //Poles(1,4)=gp_Pnt(0,0,0); Poles(2,4)=gp_Pnt(0,0,1);
  TColStd_Array1OfReal UKnots(1,2),VKnots(1,4),ResultsA(1,4),ResultsB(1,4);
  UKnots(1)=0; UKnots(2)=1;
  VKnots(1)=0; VKnots(2)=1; VKnots(3)=2; VKnots(4)=3;
  TColStd_Array1OfInteger UMult(1,2),VMult(1,4);
  UMult(1)=2; UMult(2)=2;
  VMult(1)=1; VMult(2)=1; VMult(3)=1; VMult(4)=1;
  Handle(Geom_BSplineSurface) S=new Geom_BSplineSurface(Poles,UKnots,VKnots,UMult,VMult,1,1,false,true);
  GeomAdaptor_Surface A(S,0,1,0,3);
  A.VIntervals(ResultsA,GeomAbs_C1);
  for (TColStd_Array1OfReal::const_iterator i(ResultsA.begin());i!=ResultsA.end();++i) std::cout<<*i<<" ";
  std::cout<<std::endl;
  GeomAdaptor_Surface B(S,0,1,3,6);
  B.VIntervals(ResultsB,GeomAbs_C1);
  for (TColStd_Array1OfReal::const_iterator i(ResultsB.begin());i!=ResultsB.end();++i) std::cout<<*i<<" ";
  std::cout<<std::endl;

Output I'd expect (but possibly I'm wrong):
0 1