occt.git
3 years ago0032264: Data Exchange - STEP exporter generates bad geometry [REGRESSION since 7... IR-2021-04-02
gka [Wed, 31 Mar 2021 08:43:16 +0000 (11:43 +0300)]
0032264: Data Exchange - STEP exporter generates bad geometry [REGRESSION since 7.4.0]

Location of edge is applied to geom curve before analysis of vertices projections

3 years ago0032276: Coding Rules - replace IntTools_CArray1OfReal by NCollection_Array1
kgv [Fri, 2 Apr 2021 09:35:23 +0000 (12:35 +0300)]
0032276: Coding Rules - replace IntTools_CArray1OfReal by NCollection_Array1

IntTools_CArray1OfReal has been replaced by TColStd_Array1OfReal.
IntTools_CArray1OfInteger has been removed (unused).

3 years ago0031939: Coding - correction of spelling errors in comments [part 9]
luz paz [Thu, 1 Apr 2021 17:18:10 +0000 (20:18 +0300)]
0031939: Coding - correction of spelling errors in comments [part 9]

Fix various typos via codespell.

3 years ago0031190: Modeling Algorithms - progress indication in GeomPlate is inconsistent
akaftasev [Mon, 29 Mar 2021 16:15:54 +0000 (19:15 +0300)]
0031190: Modeling Algorithms - progress indication in GeomPlate is inconsistent

Added ability to display progress indicator in plate commands
Added tests

3 years ago0032174: Data Exchange - read.step.root.transformation parameter has reversed definition
kgv [Thu, 25 Feb 2021 19:44:31 +0000 (22:44 +0300)]
0032174: Data Exchange - read.step.root.transformation parameter has reversed definition

Parameter definition has been corrected to match other Boolean parameters to map 0=OFF and 1=ON.

3 years ago0025845: VIS - Surface normals to be associated with polygonal source
kgv [Tue, 30 Mar 2021 18:26:45 +0000 (21:26 +0300)]
0025845: VIS - Surface normals to be associated with polygonal source

IVtk_IShapeData::InsertCoordinate() has been replaced by IVtk_IShapeData::InsertPoint()
defining vertex position with surface normal.
IVtkVTK_ShapeData now allocates normals array within vtkPolyData.
IVtkOCC_ShapeMesher now fills in vertex positions with surfcae normals.
IVtkTools_SubPolyDataFilter has been corrected to optionally copy normals.

ivtksetboundingdraw command has been merged into "ivtksetdispmode -faceBoundaryDraw".

3 years ago0032269: Visualization - update trinfo command with -lods option
osa [Tue, 30 Mar 2021 12:49:57 +0000 (15:49 +0300)]
0032269: Visualization - update trinfo command with -lods option

3 years ago0032262: Samples - JNIViewer sample compilation failure due to usage of removed alias...
kgv [Mon, 29 Mar 2021 14:56:06 +0000 (17:56 +0300)]
0032262: Samples - JNIViewer sample compilation failure due to usage of removed aliases to Image_Format

3 years ago0032251: Documentation, gendoc.tcl - reference manual excludes TKIVtk and other optio...
kgv [Sat, 27 Mar 2021 12:48:37 +0000 (15:48 +0300)]
0032251: Documentation, gendoc.tcl - reference manual excludes TKIVtk and other optional modules

gendoc.tcl -refman now temporarily sets HAVE_ environment variables for including optional modules.

3 years ago0032250: Documentation - pseudographics within gp_Trsf description is not properly...
kgv [Sat, 27 Mar 2021 11:45:06 +0000 (14:45 +0300)]
0032250: Documentation - pseudographics within gp_Trsf description is not properly escaped

Added @code tags to documentation of several classes in the package gp.

3 years ago0032248: Visualization - load "false" deferred glTF data immediately
osa [Fri, 26 Mar 2021 12:02:41 +0000 (15:02 +0300)]
0032248: Visualization - load "false" deferred glTF data immediately

3 years ago0032247: VIS, IVtkOCC_ShapeMesher - allow disabling auto-triangulation behavior
kgv [Fri, 26 Mar 2021 09:37:10 +0000 (12:37 +0300)]
0032247: VIS, IVtkOCC_ShapeMesher - allow disabling auto-triangulation behavior

IVtkOCC_Shape now stores Prs3d_Drawer object used by IVtkOCC_ShapeMesher and IVtkOCC_SelectableObject.
IVtkOCC_ShapeMesher::internalBuild() made more consistent to AIS_Shape::Compute() in cleaning/triangulating shape.

Added command ivtkdefaults similar to vdefaults managing triangulation default parameters.

3 years ago0032242: Configuration, CMake - USE_GLES2 option does not appear in interactive confi... IR-2021-03-26
kgv [Tue, 23 Mar 2021 21:26:16 +0000 (00:26 +0300)]
0032242: Configuration, CMake - USE_GLES2 option does not appear in interactive configurator

USE_D3D, USE_OPENGL and USE_GLES2 options declarations have been reordered.

3 years ago0032225: Modeling Data - Wrong result of extrema curve-surface
ifv [Thu, 18 Mar 2021 14:07:37 +0000 (17:07 +0300)]
0032225: Modeling Data - Wrong result of extrema curve-surface

Extrema_GenExtCS.cxx: subdivision on intervals for periodic c curves is added

Extrema_FuncExtCS.hxx: access to fields mySqDist, myPoint1, myPoint2 is added

bug32225: new test case is added

3 years ago0028196: Modeling Data - Algorithm 'Extrema_GenLocateExtPS' failed to find the extrem...
ifv [Thu, 17 Dec 2020 14:41:59 +0000 (17:41 +0300)]
0028196: Modeling Data - Algorithm 'Extrema_GenLocateExtPS' failed to find the extremum in a case

Extrema_GenLocateExtPS.cxx, Extrema_GenLocateExtPS.hxx:

Adjusting tolerances according to surface sizes is added.
Additional methods for searching solution are added for cases if basic method fails.

Extrema_FuncPSDist.cxx - small bug fixing.

BRepFill_TrimShellCorner.cxx - fixing regression

ChFi3d_Builder_CnCrn.cxx setting parameters for Plate algorithm to improve stability of solution

ProjLib_ComputeApproxOnPolarSurface.cxx - code optimization

Some test cases are modified according to current state of Extrema algorithm

3 years ago0032234: Configuration, OSD_Process::UserName() - avoid using getpwuid() unimplemente...
kgv [Sun, 21 Mar 2021 20:26:56 +0000 (23:26 +0300)]
0032234: Configuration, OSD_Process::UserName() - avoid using getpwuid() unimplemented by Emscripten SDK

3 years ago0032246: Tests, Visualization - unstable test case bugs/vis/bug79 reporting memory...
kgv [Thu, 25 Mar 2021 12:26:37 +0000 (15:26 +0300)]
0032246: Tests, Visualization - unstable test case bugs/vis/bug79 reporting memory leak

Test case has been adjusted to check memory trend after the loop.

3 years ago0032086: Visualization - support deferred data loading
osa [Fri, 26 Feb 2021 15:01:11 +0000 (18:01 +0300)]
0032086: Visualization - support deferred data loading

1) Extend Poly_Triangulation by mesh purpose, possibility to be cleared and late-load deferred data interfaces.
2) Update BRep_TFace to store list of triangulations istead of single one. And also active one. Update getter and setter of single triangulation and add new methods to interaction with whole triangulations list.
3) Update BRep_Tool to get single triangulation of face according to the input mesh purpose or whole triangulations list.
4) Update BRep_Builder to make face by not only single triangulation but whole triangulations list with specified active one.
5) Add new methods to BRepTools to interact with shape triangulations (Load/Unload/Activate/LoadAll/UnloadAllTriangulation(s))
6) Add new 'tlateload'command for shape to load/unload/activate triangulations.
7) Update 'trinfo' command by '-lods' options to print detailaed information about LODs of this shape
8) Support empty triangulations by selection. Use bounding box selection in this case.
9) Add new 'outdisplist' option to XDispaly command to print list of displayed objects to output variable but not to theDI
10) Add new '-noecho' option to vdisplay command to skip printing of displayed objects to theDI
11) Create new RWMesh_TriangulationSource as mesh data wrapper for delayed triangulation loading.
12) Create new RWMesh_TriangulationReader as base interface for reading primitive array from the buffer.
13) Cache nodes/triangles number defined in glTF file
14) Use RWMesh_TriangulationSource class as base of RWGltf_GltfLatePrimitiveArray one and RWMesh_TriangulationReader class as base of RWGltf_TriangulationReader one
15) Add possibilty to support of LODs by glTF reader. It is possible to skip data loading and load them later
16) Add new '-skiplateloading' (to skip triangulation loading), '-keeplate' (to keep information about deferred storage to load/unload triangulation later),
'-toprintdebuginfo' (to print additional debug information) options to ReadGltf command
17) Add new test of glTF late loading

3 years ago0032243: Tests - unexpected file artifact s.stl at the root of repository
kgv [Wed, 24 Mar 2021 07:52:51 +0000 (10:52 +0300)]
0032243: Tests - unexpected file artifact s.stl at the root of repository

Several test cases have been corrected to avoid creation
of temporary files s.stl, comp_nonmanifold.step, bug31301_1.stp at unexpected location.

3 years ago0032208: Tests - refactor visualization tests to cover several graphic drivers
kgv [Mon, 22 Mar 2021 09:29:04 +0000 (12:29 +0300)]
0032208: Tests - refactor visualization tests to cover several graphic drivers

Removed testgrids 'bugs/vis' and '3rdparty'; tests have been redistributed across other grids.
Moved testgrid 'v3d/ivtk' into dedicated 'vtk/ivtk'.

Added testgrid 'vselect' dedicated to 3D viewer picking/selection functionality
and filled with tests from 'v3d/vertex', 'v3d/face' and similar groups.

Added testgrid 'opengl' dedicated to OpenGL driver low-level functionality (GLSL programs and similar)
and filled with tests from 'v3d/glsl', 'v3d/raytrace', '3rdparty/fonts', 'bugs/vis' (portion) and similar.

Added testgrid 'opengles3' dedicated to OpenGL ES 3.0 driver low-level functionality
and reusing tests from 'opengl' testgrid.
Subgroup 'opengles3/raytrace' is disabled on Windows, as Ray-Tracing currently requires OpenGL ES 3.2.
while ANGLE library implements only OpenGL ES 3.0.

Added testgrid 'opengles2' dedicated to OpenGL ES 2.0 driver low-level functionality
and reusing a limited subset of passing tests from 'opengl' testgrid.
Currently testgrid is activated only on Windows platform when using ANGLE library
(properietary OpenGL ES drivers do not allow creation of restricted 2.0 context).

Test cases have been cleaned out to put bug description into log,
to properly load necessary plugins and to explicitly dump viewer.

3 years ago0032237: Visualization, TKOpenGl - fix Gouraud shading within perspective camera...
kgv [Mon, 22 Mar 2021 14:57:30 +0000 (17:57 +0300)]
0032237: Visualization, TKOpenGl - fix Gouraud shading within perspective camera projection

3 years ago0032222: Visualization, V3d_Viewer - use Graphic3d_TOSM_FRAGMENT by default instead...
kgv [Mon, 22 Mar 2021 17:32:02 +0000 (20:32 +0300)]
0032222: Visualization, V3d_Viewer - use Graphic3d_TOSM_FRAGMENT by default instead of Graphic3d_TOSM_VERTEX

3 years ago0032230: Coding Rules - remove class headers Graphic3d_HighlightStyle.hxx deprecated...
kgv [Fri, 19 Mar 2021 09:37:30 +0000 (12:37 +0300)]
0032230: Coding Rules - remove class headers Graphic3d_HighlightStyle.hxx deprecated since OCCT 7.2.0

Removed unused Graphic3d_HighlightStyle, Graphic3d_CTexture, Graphic3d_MapOfZLayerSettings,
Graphic3d_TypeOfComposition, Graphic3d_TypeOfComposition, V3d_Parameter, V3d_ViewPointer, SelectMgr_SequenceOfFilter.

Added missing deprecation statements to SelectBasics_SensitiveEntity, SelectMgr_EntityOwner and PrsMgr_Presentation3d.

3 years ago0032235: Foundation Classes, Message_MsgFile - force initialization of global mutex
kgv [Fri, 19 Mar 2021 21:08:50 +0000 (00:08 +0300)]
0032235: Foundation Classes, Message_MsgFile - force initialization of global mutex

Initialization of several global variables has been refactored to a function.

3 years ago0025262: Foundation Classes - Poly package improvements
pdn [Tue, 23 Sep 2014 08:04:57 +0000 (12:04 +0400)]
0025262: Foundation Classes - Poly package improvements

Improvements of functionality of Poly package:
* Add function to intersect a triangulation by an axis.
* Add function to intersect a triangle by an axis.
* Correct the bugs in the methods RemoveDegenerated, RemoveTriangle and ReplaceNodes of the class Poly_CoherentTriangulation.

3 years ago0032140: Modeling Algorithms - unify same domain calls crossed for opposite vectors
jgv [Mon, 5 Oct 2020 20:39:08 +0000 (23:39 +0300)]
0032140: Modeling Algorithms - unify same domain calls crossed for opposite vectors

1. Correct unification of circular edges: avoid trying to make an axis with null magnitude.
2. New method UnionPCurves: unify existing pcurves of chain instead of projecting the curve of unified edge onto surfaces

3 years ago0032206: Visualization, TKOpenGl - move out OpenGL ES support to dedicated library...
kgv [Wed, 17 Mar 2021 18:03:04 +0000 (21:03 +0300)]
0032206: Visualization, TKOpenGl - move out OpenGL ES support to dedicated library TKOpenGles

Added TKOpenGles and TKOpenGlesTest toolkits built with HAVE_GLES2 macros.
Added CSF_OpenGlesLibs as alternative to CSF_OpenGlLibs.

3 years ago0032199: Modeling Algorithms - BOP Cut produces invalid shape
emv [Tue, 9 Mar 2021 04:32:30 +0000 (07:32 +0300)]
0032199: Modeling Algorithms - BOP Cut produces invalid shape

Use section tolerance for checking the valid range.

3 years ago0032203: Draw Harness, ViewerTest - drop dependency from OpenGL
kgv [Mon, 8 Mar 2021 17:34:41 +0000 (20:34 +0300)]
0032203: Draw Harness, ViewerTest - drop dependency from OpenGL

Added TKOpenGlTest and TKD3DHostTest Draw Harness plugins.
TKOpenGlTest is automatically loaded by ViewerTest::ViewerInit().

Commands vgldebug, vvbo, vcaps and vuserdraw have been moved to TKOpenGlTest.
New command vglshaders lists GLSL programs defined by OpenGl_GraphicDriver,
previously implemented by "vshaderprog -list".

Added new command vdriver for graphic driver selection.
Removed erroneous code from command vstereo.

3 years ago0032221: Visualization, TKD3DHost - fix memory leak within D3DHost_FrameBuffer::Release()
kgv [Wed, 17 Mar 2021 06:54:27 +0000 (09:54 +0300)]
0032221: Visualization, TKD3DHost - fix memory leak within D3DHost_FrameBuffer::Release()

D3DHost_FrameBuffer - added missing color texture release within FBO destruction.
OpenGl_View::RedrawImmediate() - fixed unexpected window buffer swap while rendering into offscreen myFBO.

3 years ago0032202: Visualization - XCAFDoc_VisMaterial::FillMaterialAspect() should copy emissi...
kgv [Sat, 6 Mar 2021 07:48:18 +0000 (10:48 +0300)]
0032202: Visualization - XCAFDoc_VisMaterial::FillMaterialAspect() should copy emissive color from PBR definition

3 years ago0032217: Visualization, TKOpenGl - drop propagation of unused FFP functions
kgv [Wed, 10 Mar 2021 18:59:45 +0000 (21:59 +0300)]
0032217: Visualization, TKOpenGl - drop propagation of unused FFP functions

OpenGl_GlFunctions no more loads unused FFP functions.
OpenGl_GlCoreXX function tables no more defined two hierarchies with and without FFP functions,
and OpenGl_Context::coreXXback fields have been removed.
Introduced OpenGl_Context::core11ffp as more straightforward naming for obsolete FFP function set.

3 years ago0032200: Visualization, TKOpenGl - unify Phong/PBR light space calculations
kgv [Fri, 5 Mar 2021 20:06:50 +0000 (23:06 +0300)]
0032200: Visualization, TKOpenGl - unify Phong/PBR light space calculations

Graphic3d_ShaderManager - Phong shading now uses World space calculations.
OpenGl_ShaderManager::pushLightSourceState() - fixed unnormalized direction of headlight source.

3 years ago0032198: Visualization, TKOpenGl - per-vertex lighting ignores back/front material...
kgv [Sat, 6 Mar 2021 00:22:05 +0000 (03:22 +0300)]
0032198: Visualization, TKOpenGl - per-vertex lighting ignores back/front material colors

Graphic3d_ShaderManager::stdComputeLighting() now multiplies vertex color by material color.

3 years ago0032201: Visualization, TKOpenGl - unify Phong/PBR material properties getters
kgv [Fri, 5 Mar 2021 14:26:47 +0000 (17:26 +0300)]
0032201: Visualization, TKOpenGl - unify Phong/PBR material properties getters

Graphic3d_ShaderManager::stdComputeLighting() - implementation has been adjusted
for better consistency between PBR / non-PBR.

OpenGl_Material definition has been modified to join Front/Back pair into a single uniform variable.
Common material definition now occupies 4x2 vec4 instead of 5x2 vec4.

Getters of Common material properties within Declarations.glsl
have been renamed to match PBR material syntax (e.g. take IsFront flag as function argument).
Auxliary macros (like occTextureColor()) has been renamed (like occMaterialBaseColor())
and adjusted to return material property directly instead of taking it as argument.

3 years ago0032207: Draw Harness, ViewerTest - explicitly close 3D Viewer windows at Tcl interpr...
kgv [Wed, 10 Mar 2021 11:17:41 +0000 (14:17 +0300)]
0032207: Draw Harness, ViewerTest - explicitly close 3D Viewer windows at Tcl interpreter closure

3 years ago0032218: Visualization - move V3d_View::ShadingModel() property to Graphic3d_Renderin...
kgv [Tue, 16 Mar 2021 17:58:39 +0000 (20:58 +0300)]
0032218: Visualization - move V3d_View::ShadingModel() property to Graphic3d_RenderingParams

3 years ago0032219: Visualization, TKService - drop dependency from OpenGL
kgv [Wed, 10 Mar 2021 10:50:45 +0000 (13:50 +0300)]
0032219: Visualization, TKService - drop dependency from OpenGL

Visual selection has been moved out from Xw_Window constructor to OpenGl_GraphicDriver::InitContext().
Default Visual is now stored within Aspect_DisplayConnection.

3 years ago0032220: Configuration, Aspect_VKeySet - eliminate name collision with X11 macros
kgv [Wed, 17 Mar 2021 06:51:39 +0000 (09:51 +0300)]
0032220: Configuration, Aspect_VKeySet - eliminate name collision with X11 macros

Aspect_VKeySet::KeyState::Status field has been renamed to KStatus.

3 years ago0032136: Modeling Algorithms - Boolean fuse fails and corrupts the argument-shape IR-2021-03-05
emv [Thu, 4 Mar 2021 18:25:48 +0000 (21:25 +0300)]
0032136: Modeling Algorithms - Boolean fuse fails and corrupts the argument-shape

Avoid increasing tolerance of the vertex before the check on valid range is passed.

3 years ago0031794: Visualization - Highlighting of AIS_Shape works incorrectly when AddChild...
kgv [Wed, 24 Feb 2021 16:07:07 +0000 (19:07 +0300)]
0031794: Visualization - Highlighting of AIS_Shape works incorrectly when AddChild() used

PrsMgr_PresentationManager::Display(), PrsMgr_PresentationManager::Color(),
and SelectMgr_SelectionManager::Activate() now skip children in Erased state.

3 years ago0030640: Visualization, Graphic3d_Camera - add option creating Projection matrix...
kgv [Wed, 3 Mar 2021 11:58:46 +0000 (14:58 +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+.

3 years ago0032144: Draw Harness - add -silent option to command Close
mkrylova [Tue, 2 Mar 2021 14:22:07 +0000 (17:22 +0300)]
0032144: Draw Harness - add -silent option to command Close

- Extended command Close with an option -silent
- Extended command Close to handle */-ALL for closing ALL document
- Replaced catch {Close D} by Close D -silent in tests

3 years ago0032008: Modeling Algorithms - disallow implicit copy of Extrema algorithms
kgv [Fri, 18 Dec 2020 11:29:59 +0000 (14:29 +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.
Removed unsafe casts to curve adaptors in Extrema_ExtCC, Extrema_ExtCC2d 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.

3 years ago0032109: Application Framework: Test case bugs caf bug31546 works extremely unstable
mpv [Mon, 8 Feb 2021 12:16:57 +0000 (15:16 +0300)]
0032109: Application Framework: Test case bugs caf bug31546 works extremely unstable

In test it should be taken into account that
  lappend listmem [meminfo h]
  checktrend $listmem 0 0 "Memory leak"
also gets memory (also about 100 bytes per iteration).

3 years ago0032192: Visualization, TKOpenGl - load OpenGL 4.6 functions within OpenGl_Context
kgv [Tue, 2 Mar 2021 18:31:50 +0000 (21:31 +0300)]
0032192: Visualization, TKOpenGl - load OpenGL 4.6 functions within OpenGl_Context

glext.h has been updated to include latest fixes and new definitions.

3 years ago0031779: Visualization, AIS_ViewController - controller should handle selection schemes
mkrylova [Fri, 22 Jan 2021 07:44:42 +0000 (10:44 +0300)]
0031779: Visualization, AIS_ViewController - controller should handle selection schemes

Added AIS_ViewController::MouseSelectionSchemes() property defining map of selection schemes for mouse+modifier combinations.
IsXOR flag has been replaced by AIS_SelectionScheme in interfaces.

Rubber-band selection with Shift key pressed now applies XOR selection scheme in in Draw Harness.
Command vselect has been extended to specify selection scheme by name.

3 years ago0032181: Modeling Algorithms - ChFi3d missing error checking
Chris Hennes (chennes) [Sat, 27 Feb 2021 17:58:50 +0000 (11:58 -0600)]
0032181: Modeling Algorithms - ChFi3d missing error checking

Throughout the ChFi3d fillet creation functions there are two sets of unchecked
errors that can result in segmentation faults when geometry-creation problems
occur.

The first is that the functions ChFi3d_cherche_* may fail to find the requested
item: they silently return without setting the required reference, which is
then accessed by the algorithms. This can be caught with a conditional at the
end of the function that throws an exception if the required item was not
found.

The second class of unchecked error is the use of BRep_Tool::CurveOnSurface,
which may fail to create the required curve, returning a null handle. In many
cases in the existing fillet code this is not checked. This can be dealt with
by checking the returned handle using IsNull() and throwing an exception
if the call did not result in valid geometry.

3 years ago0032188: Visualization, Graphic3d_Aspects - define backface culling using Graphic3d_T...
kgv [Mon, 1 Mar 2021 20:25:21 +0000 (23:25 +0300)]
0032188: Visualization, Graphic3d_Aspects - define backface culling using Graphic3d_TypeOfBackfacingModel

Graphic3d_Aspects::ToSuppressBackFaces() bool flag has been replaced by
Graphic3d_Aspects::FaceCulling() property defined by Graphic3d_TypeOfBackfacingModel enumeration.

Graphic3d_TypeOfBackfacingModel_Auto corresponds to old ToSuppressBackFaces()==TRUE;
Graphic3d_TypeOfBackfacingModel_DoubleSided corresponds to old ToSuppressBackFaces()==FALSE;
Graphic3d_TypeOfBackfacingModel_BackCulled allows enabling back face culling regardless of Graphic3d_Group::IsClosed() flag.

XCAFDoc_VisMaterial::IsDoubleSided() bool flag has been replaced by
XCAFDoc_VisMaterial::FaceCulling() property defined by Graphic3d_TypeOfBackfacingModel enumeration.

glTF reader now maps "doubleSided" material flag into
Graphic3d_TypeOfBackfacingModel_BackCulled (forced back face culling) and
Graphic3d_TypeOfBackfacingModel_Auto (e.g. practically doubleSided as there is no closed/open info in glTF).

glTF writer by default writes materials as "doubleSided" save the Graphic3d_TypeOfBackfacingModel_BackCulled property set
(in future, extra logic might written for automatically defining singleSided materials for Solid B-Rep objects).

Removed obsolete unused types V3d_TypeOfPickCamera, V3d_TypeOfPickLight, V3d_TypeOfRepresentation, and V3d_Coordinate.
Deprecated types V3d_TypeOfBackfacingModel, V3d_TypeOfLight, and V3d_TypeOfShadingModel.

3 years ago0032184: Visualization - remove ambiguous AIS_GlobalStatus constructor
kgv [Mon, 1 Mar 2021 10:20:58 +0000 (13:20 +0300)]
0032184: Visualization - remove ambiguous AIS_GlobalStatus constructor

Auxiliary AIS_GlobalStatus constructor has been removed.
AIS_InteractiveContext::setObjectStatus() no more adds
an invalid -1 mode to AIS_GlobalStatus.

Never updated property AIS_GlobalStatus::GetLayerIndex() has been removed;
AIS_InteractiveContext::SetTransformPersistence() has been corrected to use
ZLayer defined within object itself.

3 years ago0032143: Visualization - add option excluding transparent object from sorting
kgv [Mon, 1 Mar 2021 12:16:52 +0000 (15:16 +0300)]
0032143: Visualization - add option excluding transparent object from sorting

Added option Graphic3d_AlphaMode_MaskBlend combining Mask (no sorting)
and Blend (enable blending with background) behavior.

3 years ago0032180: Visualization - StdSelect_BRepOwner::SetLocation() does not update selected...
kgv [Sat, 27 Feb 2021 07:48:32 +0000 (10:48 +0300)]
0032180: Visualization - StdSelect_BRepOwner::SetLocation() does not update selected sub-shape

StdSelect_BRepOwner::SetLocation() now propagates location to sub-shape presentation instead of invalidating it.

3 years ago0032171: Data Exchange - RWGltf_TriangulationReader doesn't copy cached bounding box IR-2021-02-26
osa [Thu, 25 Feb 2021 16:18:12 +0000 (19:18 +0300)]
0032171: Data Exchange - RWGltf_TriangulationReader doesn't copy cached bounding box

Save cached bounding box in loaded triangulation getting it from "proxy" late-loaded object.

3 years ago0032165: Visualization - remove obsolete method AIS_InteractiveContext::PurgeViewer()
kgv [Thu, 25 Feb 2021 09:41:51 +0000 (12:41 +0300)]
0032165: Visualization - remove obsolete method AIS_InteractiveContext::PurgeViewer()

3 years ago0032161: Coding Rules - deprecate obsolete alias PrsMgr_PresentationManager3d
kgv [Thu, 25 Feb 2021 07:58:17 +0000 (10:58 +0300)]
0032161: Coding Rules - deprecate obsolete alias PrsMgr_PresentationManager3d

3 years ago0032168: Visualization - Wrong computation of screen axis in V3d_View::SetTwist method
kgv [Thu, 25 Feb 2021 11:10:18 +0000 (14:10 +0300)]
0032168: Visualization - Wrong computation of screen axis in V3d_View::SetTwist method

Fixed wrong axis check.

3 years ago0032160: Coding Rules - merge AIS_InteractiveContext_*.cxx into single file
kgv [Wed, 24 Feb 2021 17:03:40 +0000 (20:03 +0300)]
0032160: Coding Rules - merge AIS_InteractiveContext_*.cxx into single file

Removed redundant .lxx files from API package.

AIS_InteractiveContext_1.cxx,AIS_InteractiveContext_2.cxx,AIS_InteractiveContext_3.cxx
have been merged into AIS_InteractiveContext.cxx.
V3d_View_2.cxx,V3d_View_3.cxx,V3d_View_4.cxx have been merged into V3d_View.cxx
V3d_View_4.cxx has been merged into V3d_View.cxx.

3 years ago0032162: Visualization - move AIS_DisplayStatus from AIS_GlobalStatus to PrsMgr_Prese...
kgv [Wed, 24 Feb 2021 12:37:57 +0000 (15:37 +0300)]
0032162: Visualization - move AIS_DisplayStatus from AIS_GlobalStatus to PrsMgr_PresentableObject

AIS_DisplayStatus has been renamed to PrsMgr_DisplayStatus
and moved from AIS_GlobalStatus class field to PrsMgr_PresentableObject.

0032167: Visualization, AIS_InteractiveContext - setObjectStatus sets wrong status when AIS_DS_Erased

AIS_InteractiveContext::setObjectStatus() Fixed setting unexpected Displayed status to Erased objects.

3 years ago0032155: Tests - remove broken command OCC280
kgv [Mon, 22 Feb 2021 15:40:02 +0000 (18:40 +0300)]
0032155: Tests - remove broken command OCC280

Command OCC280 and a couple of useless tests have been removed.
Test case bug349 has been updated to reproduce scenario using standard commands.

3 years ago0032154: Tests - include vglinfo into Tests Summary
kgv [Mon, 22 Feb 2021 06:58:50 +0000 (09:58 +0300)]
0032154: Tests - include vglinfo into Tests Summary

Command testgrid now includes vglinfo into summary.
Command vinit has been extended by -virtual option creating an offscreen window.
Command vglinfo now splits long values into multiple lines.
Added test case v3d/glsl/glinfo dumping OpenGL context creation info.

OpenGl_Window - fixed initialization of OpenGL 4.6 Core Profile (was limited to 4.5).

3 years ago0032153: Visualization, Graphic3d_ArrayOfPrimitives - share common allocator
kgv [Sun, 21 Feb 2021 17:55:35 +0000 (20:55 +0300)]
0032153: Visualization, Graphic3d_ArrayOfPrimitives - share common allocator

Added method Graphic3d_Buffer::DefaultAllocator(), which is now used across code.

3 years ago0032152: Visualization - move out GLSL program generator from OpenGl_ShaderManager...
kgv [Sat, 20 Feb 2021 20:03:30 +0000 (23:03 +0300)]
0032152: Visualization - move out GLSL program generator from OpenGl_ShaderManager to Graphic3d_ShaderManager

3 years ago0032149: Draw Harness, ViewerTest - remove obsolete command vfeedback
kgv [Sat, 20 Feb 2021 17:25:31 +0000 (20:25 +0300)]
0032149: Draw Harness, ViewerTest - remove obsolete command vfeedback

3 years ago0032150: Visualization, TKOpenGl - ignore OpenGl_Caps::ffpEnable when FFP is unavailable
kgv [Sat, 20 Feb 2021 17:58:33 +0000 (20:58 +0300)]
0032150: Visualization, TKOpenGl - ignore OpenGl_Caps::ffpEnable when FFP is unavailable

OpenGl_Workspace::Activate() now implicitly disables OpenGl_Caps::ffpEnable when it is unsupported.
OpenGl_AspectsSprite::build() now ignores OpenGl_Caps::pntSpritesDisable when Display Lists are unsupported.

3 years ago0031196: Visualization, TKOpenGl - enable Ray-Tracing using OpenGL ES 3.2
kgv [Sat, 20 Feb 2021 12:01:16 +0000 (15:01 +0300)]
0031196: Visualization, TKOpenGl - enable Ray-Tracing using OpenGL ES 3.2

OpenGl_Context now activates Ray-Tracing and arbTboRGB32 for GLES 3.2.
Removed initialization of some uniforms from GLSL code.
Fixed implicit casts within Ray-Tracing shaders.

3 years ago0032147: Documentation - drop mentioning of WOK from build_3rdparty IR-2021-02-20
kgv [Sat, 20 Feb 2021 10:33:19 +0000 (13:33 +0300)]
0032147: Documentation - drop mentioning of WOK from build_3rdparty

3 years ago0032139: Visualization - support single-precision floating point data within Poly_Tri...
kgv [Wed, 17 Feb 2021 11:36:03 +0000 (14:36 +0300)]
0032139: Visualization - support single-precision floating point data within Poly_Triangulation

Introduced NCollection_AliasedArray collection defining a general byte array
to be aliased as array of elements of mutable type.

Poly_ArrayOfNodes specializes this interface for collecting 2d/3d points with single/double precision.
Poly_Triangulation relies on this new class for definition of 3D nodes and UV coordinates
using gp_Pnt and gp_Pnt2d by default as before.

RWGltf_CafReader now fills in triangulation using single precision by default (as stored in the file).

3 years ago0032145: Coding Rules - move GL functions loading to OpenGl_GlFunctions.cxx
kgv [Fri, 19 Feb 2021 17:49:28 +0000 (20:49 +0300)]
0032145: Coding Rules - move GL functions loading to OpenGl_GlFunctions.cxx

3 years ago0031990: Coding, Draw Harness - Replace C-like pointers to function in Draw_SaveAndRe...
asuraven [Tue, 3 Nov 2020 14:22:14 +0000 (17:22 +0300)]
0031990: Coding, Draw Harness - Replace C-like pointers to function in Draw_SaveAndRestore class to virtual function

Save/Restore interface has been moved to Draw_Drawable3D base class.
Create a singleton Draw_Params class for DRAW parameters

3 years ago0032087: Data Exchange, STEPCAFControl_Reader - NULL representation of shape for DGT
dpasukhi [Wed, 27 Jan 2021 12:12:46 +0000 (15:12 +0300)]
0032087: Data Exchange, STEPCAFControl_Reader - NULL representation of shape for DGT

- Fixed problem with find a Path for the DimensionType_Location_WithPath
- Added check for the null object within FindShapeIndexForDGT

3 years ago0032133: Modeling Data - Restriction of access to internal arrays for Poly_Triangulat...
vro [Tue, 16 Feb 2021 11:24:15 +0000 (14:24 +0300)]
0032133: Modeling Data - Restriction of access to internal arrays for Poly_Triangulation, revision of API

Removed methods from Poly_Triangulation/Poly_PolygonOnTriangulation giving access to internal arrays of 2d and 3d nodes, triangles and normals.

3 years ago0032129: Visualization, TKOpenGl - shadowmap is broken for ZLayer having non-zero...
kgv [Sat, 13 Feb 2021 22:01:27 +0000 (01:01 +0300)]
0032129: Visualization, TKOpenGl - shadowmap is broken for ZLayer having non-zero origin

OpenGl_LayerList::renderLayer() - fixed usage of wrong camera while rendering shadowmap,
and apply Z-Layer origin shift to shadowmap matrix while applying shadow.

3 years ago0032099: Visualization - define OSD_FileSystem class managing opening of file streams CR31500 IR-2021-02-12
osa [Fri, 5 Feb 2021 14:51:17 +0000 (17:51 +0300)]
0032099: Visualization - define OSD_FileSystem class managing opening of file streams

1) Remove unnecessary includes of "Standard_OStream.hxx" file and add it only into files where it is really used.
2) Create the base interface for a file stream provider OSD_FileSystem and its inheritor OSD_CachedFileSystem that keeping last stream to be reused for opening a stream with the same URL.
3) Use OSD_CachedFileSystem object instead of RWGltf_GltfSharedIStream during Gltf reading.

3 years ago0032124: Visualization, AIS_Shape - setting color will cause Iso Lines to appear...
kgv [Wed, 10 Feb 2021 08:05:33 +0000 (11:05 +0300)]
0032124: Visualization, AIS_Shape - setting color will cause Iso Lines to appear due to misprint in Prs3d_Drawer::SetOwnLineAspects()

Fixed misprint myUIsoAspect -> myVIsoAspect.

3 years ago0031974: Modeling Algorithms - Strange behavior of boolean operations on this BREP
emv [Thu, 28 Jan 2021 09:34:19 +0000 (12:34 +0300)]
0031974: Modeling Algorithms - Strange behavior of boolean operations on this BREP

Problem is fixed by #0031995. Integrating test case only.

3 years ago0031704: Visualization - add an interactive object AIS_LightSource representing a...
mkrylova [Tue, 8 Sep 2020 14:50:28 +0000 (17:50 +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

3 years ago0032095: Tests - drop comparison in unstable perf/ncollection group
kgv [Fri, 29 Jan 2021 07:24:36 +0000 (10:24 +0300)]
0032095: Tests - drop comparison in unstable perf/ncollection group

Mark performance deviations compared to STL collections as warnings instead of errors.

3 years ago0032119: Coding Rules - eliminate msvc warning C4800 (implicit cast to bool) after...
dpasukhi [Sat, 6 Feb 2021 15:43:43 +0000 (18:43 +0300)]
0032119: Coding Rules - eliminate msvc warning C4800 (implicit cast to bool) after fix for 32115

Fixed incorrect comparison and forcing cast

3 years ago0032122: Samples - handle WASD keys in WebGL sample
kgv [Sun, 7 Feb 2021 08:03:33 +0000 (11:03 +0300)]
0032122: Samples - handle WASD keys in WebGL sample

3 years ago0032118: Visualization, Graphic3d_MarkerImage::StandardMarker() - return marker with...
kgv [Fri, 5 Feb 2021 17:40:26 +0000 (20:40 +0300)]
0032118: Visualization, Graphic3d_MarkerImage::StandardMarker() - return marker with pre-defined id

3 years ago0032117: Visualization, TKOpenGl - assert in OpenGl_AspectsSprite due to implicit...
kgv [Fri, 5 Feb 2021 17:38:15 +0000 (20:38 +0300)]
0032117: Visualization, TKOpenGl - assert in OpenGl_AspectsSprite due to implicit destruction of existing resource

RGBA and Alpha markers are now handled independently within OpenGl_AspectsSprite::build().

3 years ago0032115: Data Exchange, STEP reader - Incorrect full path to file is not caught IR-2021-02-05
dpasukhi [Fri, 5 Feb 2021 10:05:22 +0000 (13:05 +0300)]
0032115: Data Exchange, STEP reader - Incorrect full path to file is not caught

Fixed a checking for a non-existent step file

3 years ago0031970: Data Exchange, STEP reader - parser syntax error messages are inaccessible
dpasukhi [Mon, 11 Jan 2021 10:20:31 +0000 (13:20 +0300)]
0031970: Data Exchange, STEP reader - parser syntax error messages are inaccessible

 - Upgraded files using new version of WinFlexBison
 - 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
 - Step_file's and Step_Data's output info prints according by trace level of printer
 - 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
 - Replace "Error" word in the output messages

3 years ago0032114: Visualization, TKOpenGl - broken PBR LUT on OpenGL ES 2.0
kgv [Tue, 2 Feb 2021 23:50:55 +0000 (02:50 +0300)]
0032114: Visualization, TKOpenGl - broken PBR LUT on OpenGL ES 2.0

Added image formats Image_Format_RGF_half/Image_Format_RGBAF_half
with manual conversion between 32-bit float and 16-bit half-float values.

PBR LUT table is now converted into GL_HALF_FLOAT_OES data format in case of OpenGL ES 2.0.

3 years ago0032110: Visualization, TKOpenGl - allow incomplete PBR on OpenGL ES 2.0 without...
kgv [Tue, 2 Feb 2021 11:33:57 +0000 (14:33 +0300)]
0032110: Visualization, TKOpenGl - allow incomplete PBR on OpenGL ES 2.0 without GL_EXT_shader_texture_lod

textureCube() is now used as fallback when textureCubeLod() is unavailable.

3 years ago0032113: Visualization, TKOpenGl - broken PBR diffuse map within OpenGl_Caps::buffers...
kgv [Tue, 2 Feb 2021 20:02:51 +0000 (23:02 +0300)]
0032113: Visualization, TKOpenGl - broken PBR diffuse map within OpenGl_Caps::buffersOpaqueAlpha() on OpenGL ES 2.0

Fixed enabling of alpha channel writes while baking PBR environment.

3 years ago0032108: Modeling Algorithms - BRepAlgoAPI_Section is too slow
emv [Tue, 2 Feb 2021 08:37:28 +0000 (11:37 +0300)]
0032108: Modeling Algorithms - BRepAlgoAPI_Section is too slow

Fixed by 0029711. Integrating test case only.

3 years ago0031939: Coding - correction of spelling errors in comments [part 8]
luz paz [Mon, 1 Feb 2021 09:52:47 +0000 (12:52 +0300)]
0031939: Coding - correction of spelling errors in comments [part 8]

Fix various typos

Fixed via codespell v2.1.dev

3 years ago0032105: Visualization, TKOpenGl - PBR flat shading GLSL program compilation error...
kgv [Mon, 1 Feb 2021 21:41:01 +0000 (00:41 +0300)]
0032105: Visualization, TKOpenGl - PBR flat shading GLSL program compilation error on OpenGL ES 2.0

OpenGl_ShaderManager::defaultGlslVersion() - fixed combining two extensions in header.

3 years ago0032101: Visualization, TKOpenGl - use GL_UNPACK_ROW_LENGTH within OpenGL ES 3.0...
kgv [Mon, 1 Feb 2021 17:46:00 +0000 (20:46 +0300)]
0032101: Visualization, TKOpenGl - use GL_UNPACK_ROW_LENGTH within OpenGL ES 3.0 / WebGL 2.0

Added OpenGl_Context::hasUnpackRowLength property for using GL_UNPACK_ROW_LENGTH in runtime.
OpenGl_Texture now uses GL_UNPACK_ROW_LENGTH on OpenGL ES 3.0 when necessary.
OpenGl_Texture::InitCubeMap() now allows uploading vertically-stacked cubemaps
without GL_UNPACK_ROW_LENGTH requirement.

3 years ago0032079: Coding Rules - rename AIS_KindOfInteractive enumeration values with fully...
kgv [Fri, 22 Jan 2021 16:03:45 +0000 (19:03 +0300)]
0032079: Coding Rules - rename AIS_KindOfInteractive enumeration values with fully-qualified name

In addition, several ViewerTest command have been cleared out from duplicated checks.

3 years ago0032094: Visualization, TKOpenGl - OpenGl_VertexBuffer::bindAttribute() silently... IR-2021-01-29
kgv [Fri, 29 Jan 2021 02:29:50 +0000 (05:29 +0300)]
0032094: Visualization, TKOpenGl - OpenGl_VertexBuffer::bindAttribute() silently does nothing without active GLSL program

OpenGl_VertexBuffer::bindAttribute() now prints an error message indicating a possible VBO misuse.

3 years ago0032081: Visualization - WebGL sample errors when run in Safari browser with WebGL 1.0
kgv [Fri, 29 Jan 2021 01:59:41 +0000 (04:59 +0300)]
0032081: Visualization - WebGL sample errors when run in Safari browser with WebGL 1.0

"MAX_WEBGL_VERSION=2" Emscripten option is now used for building sample instead of deprecated "USE_WEBGL2=1".

3 years ago0032083: Visualization, TKOpenGl - PBR rendering is unavailable on Apple A12 Bionic...
kgv [Sun, 24 Jan 2021 15:31:54 +0000 (18:31 +0300)]
0032083: Visualization, TKOpenGl - PBR rendering is unavailable on Apple A12 Bionic (iPad)

Added "#define occLight_Index(theId) 0" workaround allowing to compile
a single light source PBR shading program on OpenGL ES 2.0,
as it disallows non-constant index expressions (even trivially deducable at compile-time).

PBR lookup table is now automatically resized to RGBA format
when RG texture format is unsupported (OpenGL ES 2.0).

OpenGl_ShaderManager now allows compiling PBR shaders
using WebGL 1.0 + GL_EXT_shader_texture_lod extension.

PBR IBL baking GLSL program has been redisigned to use
if/else to avoid non-constant index expressions.
Diffuse baking implements packing float values into a temporary RGBA8 texture
as a fallback solution on WebGL 1.0 implementations supporting float textures
but not as FBO render targets.

OpenGl_PBREnvironment now uses GL_FRAMEBUFFER instead of GL_DRAW_FRAMEBUFFER
for compatibility with OpenGL ES 2.0.

3 years ago0032093: Visualization, TKOpenGl - loading texture in BGR format fails in OpenGL ES
kgv [Fri, 29 Jan 2021 00:34:16 +0000 (03:34 +0300)]
0032093: Visualization, TKOpenGl - loading texture in BGR format fails in OpenGL ES

Graphic3d_TextureRoot::convertToCompatible() - fixed handling of
Image_Format_BGR and Image_Format_BGRA formats.

OpenGl_Texture - added error message for unsupported pixel format;
error messages have been extended by resource id.
OpenGl_Texture::InitCubeMap() now does not release cubemap
on mipmaps generation failure.

Image_PixMap::ImageFormatToString() - added method returning name of pixel format.

3 years ago0031912: Modeling Algorithms - Boolean Cut can't build resulting shape
emv [Thu, 28 Jan 2021 10:02:08 +0000 (13:02 +0300)]
0031912: Modeling Algorithms - Boolean Cut can't build resulting shape

Problem is fixed by #0032058. Integrating test case only.

3 years ago0032078: Visualization, Poly_Triangulation - add cached bounding box.
osa [Fri, 22 Jan 2021 14:56:45 +0000 (17:56 +0300)]
0032078: Visualization, Poly_Triangulation - add cached bounding box.

1) Add empty constructor for Poly_Triangulation(),
2) Add Poly_Triangulation::HasGeometry() method to check that triangulation has any geometry.
3) Add possibility to cache bounding box in Poly_Triangulation and use it later in case of empty triangulation.
4) Add Poly_Triangulation::MinMax() to extends input box with bounding box of triangulation.
5) Add Poly_Triangulation::UpdateCachedMinMax() to cache min - max range of this triangulation with bounding box of nodal data.
6) Add virtual Poly_Triangulation::computeBoundingBox() to calculate bounding box of nodal data.
7) Update BRepBndLib::Add/AddOptimal/AddOBB algorithms to check empty triangulation and use cached box in this case.
8) Update BRepGProp::roughBary/surfaceProperties/volumeProperties to skip empty triangulation.
9) Remove additional myBox from RWGltf_GltfLatePrimitiveArray and some hack to save this box as nodes of base Poly_Triangulation.
10) Cache min-max range from JT file during its parsing

3 years ago0032082: Visualization, TKOpenGl - improve formatting of error messages
kgv [Sat, 23 Jan 2021 18:35:46 +0000 (21:35 +0300)]
0032082: Visualization, TKOpenGl - improve formatting of error messages

Error messages in TKOpenGl package have been improved to format
GLenum values as string constants or hex values.
OpenGl_VertexBuffer::init() now logs a message with error details
instead of just returning Boolean flag.

3 years ago0031845: Modeling Algorithms - BRepOffsetAPI_MakeThickSolid fails IR-2021-01-22
jgv [Tue, 12 Jan 2021 00:45:17 +0000 (03:45 +0300)]
0031845: Modeling Algorithms - BRepOffsetAPI_MakeThickSolid fails

Multiple changes in BRepOffset_MakeOffset algorithm:
- correct fusing vertices;
- correct building intersection edges;
- correct intersecting new edges in 2D;
- correct building wire on a new face;
- correct building history.

3 years ago0031547: Visualization - V3d_View creates V3d_Trihedron instance
mkrylova [Thu, 31 Dec 2020 06:37:51 +0000 (09:37 +0300)]
0031547: Visualization - V3d_View creates V3d_Trihedron instance

- moved creating of V3d_View::myTrihedron from constructor to first attempt of displaying or calling it;
- moved creating of V3d_Viewer::myRGrid and V3d_Viewer::myCGrid to to first attempt of displaying or calling them;
- renamed V3d_Viewer::IsActive() to V3d_Viewer::IsGridActive();
- redefined V3d_View::Trihedron() and V3d_Viewer::Grid() by adding new argument toCreate
for opportunity to check the existence of the objects without their recreating.