occt.git
4 years ago0030850: Visualization, OpenGl_Text - text within trihedron persistence jitters when... IR-2019-07-19
kgv [Wed, 17 Jul 2019 21:08:02 +0000 (00:08 +0300)]
0030850: Visualization, OpenGl_Text - text within trihedron persistence jitters when camera is far from origin

OpenGl_Text now discards (redundant) translation part from camera orientation matrix.
Text anchor point alignment to integer coordinates is now not performed for 3D-oriented text.

4 years ago0028954: Visualization - implement interactive object for camera manipulations
aba [Wed, 3 Jul 2019 09:37:36 +0000 (12:37 +0300)]
0028954: Visualization - implement interactive object for camera manipulations

Added new class AIS_ViewCube implementing interactive cube
displaying orientation of the main axes of the model space in the viewer.
Each side, edge, or corner of the cube corresponds to particular orientation of the camera,
and the class provides methods to move the camera to corresponding position (with animation if needed).

AIS_InteractiveContext::LastActiveView(), added new property returning the last View processed by MoveTo() event.
AIS_InteractiveContext::BoundingBoxOfSelection(), added method returning bounding box of selected objects.
SelectMgr_EntityOwner::HandleMouseClick(), added new callback for handling
mouse clicks by owner itself without automatic highlighting and clearing previous selection.
Called by AIS_InteractiveContext::Select() method.

AIS_ViewController::ViewAnimation() has been extened with camera animation propery,
which can be bound to AIS_ViewCube for smooth embedding into event loop.

Prs3d_ToolDisk has been extended with parameters specifying angle range.
Graphic3d_MaterialAspect now initializes all coefficients to 1.0
when Graphic3d_NOM_UserDefined is passed to class constructor.
AIS_AnimationCamera::update() now sets the end camera position if animation duration is 0.
Prs3d_DatumAspect, added missing setters.

New command vviewcube has been added.

4 years ago0030790: [REGRESSION] Modeling Algorithms - Crash when loading specific step file
msv [Mon, 15 Jul 2019 16:47:14 +0000 (19:47 +0300)]
0030790: [REGRESSION] Modeling Algorithms - Crash when loading specific step file

The problem occurred when the algorithm IntCurvesFace_Intersector was called for a face occupying zero extension along V direction. This is obviously a bad face, but we need to have the algorithm not crashing the application. So, the algorithm has been protected against such input data. At attempt to make calculations it establishes NotDone status.

Bad test case tests/de/step_3/D9 has been updated.
False memory leak detection has been suppressed in tests/bugs/fclasses/bug7287_2.

4 years ago0030799: Draw Harness, ViewerTest - setup uniforms via vshader command
mzernova [Wed, 17 Jul 2019 16:05:53 +0000 (19:05 +0300)]
0030799: Draw Harness, ViewerTest - setup uniforms via vshader command

vshaderprog command now supports setup custom uniforms

4 years ago0030668: Visualization - revise adding ZLayer API
kgv [Mon, 15 Jul 2019 18:06:05 +0000 (21:06 +0300)]
0030668: Visualization - revise adding ZLayer API

V3d_Viewer::AddZLayer() has been replaced by
V3d_Viewer::InsertLayerBefore() and V3d_Viewer::InsertLayerAfter() methods
allowing to specify Layer settings and index of existing layer to insert new one before/after.
The behavior of V3d_Viewer::AddZLayer() has been adjusted to append
new Layer before Graphic3d_ZLayerId_Top
(between Graphic3d_ZLayerId_Default and Graphic3d_ZLayerId_Top).

Graphic3d_Layer now provides LayerId() property.
Graphic3d_ZLayerSettings has been extended with IsRaytracable() property;
Ray-Tracing now processes multiple layers instead of Graphic3d_ZLayerId_Default.

Moved some methods from OpenGl_View to the base class Graphic3d_CView.

4 years ago0030630: Visualization - wrong visualization of shape with mirrored transformation
ika [Thu, 4 Apr 2019 13:07:05 +0000 (16:07 +0300)]
0030630: Visualization - wrong visualization of shape with mirrored transformation

Solids with mirror location are displayed, according to their normals.

vaspects -setBackFaceColor, added command to set backface color.

4 years ago0030829: BRepExtrema_ShapeProximity crashes with shape from STL/WRL
msv [Wed, 17 Jul 2019 13:50:43 +0000 (16:50 +0300)]
0030829: BRepExtrema_ShapeProximity crashes with shape from STL/WRL

The fix makes algorithm independent on geometrical data. Only triangulation is needed for its work.

4 years ago0030403: Application Framework - Overwriting Big BinOcaf Files Does Not Reduce Their...
Benjamin Bihler [Thu, 11 Jul 2019 09:16:12 +0000 (11:16 +0200)]
0030403: Application Framework - Overwriting Big BinOcaf Files Does Not Reduce Their Size

OSD_OpenFileDescriptor(), added truncating flag to fopen() flags for std::ios_base::out,
since truncating is implied by C++ output flag.
This fixes misbehavior of OSD_OpenStream() on MinGW-w64 platform.

4 years ago0029736: Some Warnings During Compound Transfer to IGES Look Dubious
abv [Wed, 10 Jul 2019 18:45:45 +0000 (21:45 +0300)]
0029736: Some Warnings During Compound Transfer to IGES Look Dubious

Incorrect (legacy) warnings during IGES export are removed

4 years ago0030628: [REGRESSION] Data Exchange - Crash on importing STEP file
kgv [Thu, 11 Jul 2019 06:38:54 +0000 (09:38 +0300)]
0030628: [REGRESSION] Data Exchange - Crash on importing STEP file

RWHeaderSection_RWFileDescription::ReadStep(), added check for an empty list.

4 years ago0029987: Request for translation of French comments in the code IR-2019-07-12
ysn [Wed, 25 Jul 2018 15:13:26 +0000 (18:13 +0300)]
0029987: Request for translation of French comments in the code

French comments in two files have been translated in English.

4 years ago0030837: Data Exchange, XCAFPrs_DocumentExplorer - fix misprint in XCAFPrs_DocumentEx...
kgv [Wed, 10 Jul 2019 20:24:05 +0000 (23:24 +0300)]
0030837: Data Exchange, XCAFPrs_DocumentExplorer - fix misprint in XCAFPrs_DocumentExplorerFlags_NoStyle check

4 years ago0027710: Make Data-exchange test cases more machine independent
apn [Thu, 8 Sep 2016 12:20:43 +0000 (15:20 +0300)]
0027710: Make Data-exchange test cases more machine independent

Added description of de test grid in user guide.

4 years ago0030833: Visualization - Graphic3d_Camera constructor's exceptions
iko [Tue, 9 Jul 2019 14:19:57 +0000 (17:19 +0300)]
0030833: Visualization - Graphic3d_Camera constructor's exceptions

Field's initialization part has been added to Graphic3d_Camera constructor receiving Handle(Graphic3d_Camera).

4 years ago0030827: Add common functionality allowing to switch triangulation algorithm in runtime
oan [Wed, 3 Jul 2019 08:45:18 +0000 (11:45 +0300)]
0030827: Add common functionality allowing to switch triangulation algorithm in runtime

New classes BRepMesh_ConstrainedBaseMeshAlgo, BRepMesh_CustomBaseMeshAlgo and BRepMesh_CustomDelaunayBaseMeshAlgo are added.
These classes allow to add any custom triangulation algorithm to BRepMesh and perform post-processing and optimization of base mesh generated by those algorithms.
BRepMesh_Delaun: added possibility to process constraints when base mesh is generated by different algorithm.
BRepMesh_DelaunayNodeInsertionMeshAlgo: added PreProcessSurfaceNodes flag controlling addition of surface nodes (either before creation of base mesh or after) to gain maximum performance from triangulation algorithms.

Minor changes:
Use simple algorithm for cylinders when internal vertices mode is switched off to speed up computations.
BRepMesh_IncrementalMesh: added Perform method allowing to execute algorithm using manually created Context.

4 years ago0030824: Visualization, PrsMgr_PresentableObject - A new flag to disable automatic... IR-2019-07-05
asl [Wed, 3 Jul 2019 08:29:47 +0000 (11:29 +0300)]
0030824: Visualization, PrsMgr_PresentableObject - A new flag to disable automatic selection of children

A new flag myToPropagateVisualState is introduced for PrsMgr_PresentableObject: by default it is true, it means that the visual state (display/erase/color) should be propagated to all children. If false, the visual state is not propagated.
The flag can be set via the method ToPropagateVisualState() or via Draw command: "vparent <parent> -ignoreVisu"

4 years ago0030820: Draw Harness, ViewerTest - vsetcolor has no effect on objects created by...
tiv [Tue, 2 Jul 2019 16:53:20 +0000 (19:53 +0300)]
0030820: Draw Harness, ViewerTest - vsetcolor has no effect on objects created by vsegment and vtriangle

MyPArrayObject class (an interactive object representing some array of primitives) is improved: a possibility of color changing is added to it.

4 years ago0030821: Data Exchange, RWGltf_CafReader - fallback to Mesh name in case of Node...
kgv [Mon, 1 Jul 2019 08:56:41 +0000 (11:56 +0300)]
0030821: Data Exchange, RWGltf_CafReader - fallback to Mesh name in case of Node name is empty

Added option to use Mesh name as fallback, enabled by default.

4 years ago0030817: Modeling Algorithms - BRepOffsetAPI_MakePipeShell produces invalid result IR-2019-06-27
emv [Mon, 24 Jun 2019 08:41:30 +0000 (11:41 +0300)]
0030817: Modeling Algorithms - BRepOffsetAPI_MakePipeShell produces invalid result

BRepFill_TrimShellCorner::CheckAndOrientEdges() - When orienting next edge in a sequence take into account the Orientation of the previous edge.
Test cases for the issue.

4 years ago0030811: Data Exchange, RWGltf_CafReader - fix inaccessibility of properties
kgv [Wed, 26 Jun 2019 08:26:31 +0000 (11:26 +0300)]
0030811: Data Exchange, RWGltf_CafReader - fix inaccessibility of properties

Added missing Standard_EXPORT and getters.
Fixed metadata loss.

4 years ago0030810: Data Exchange, RWObj_CafReader - fix material assignment
kgv [Tue, 25 Jun 2019 20:26:58 +0000 (23:26 +0300)]
0030810: Data Exchange, RWObj_CafReader - fix material assignment

RWObj_MtlReader fixed incorrect folder iteration within findRelativePath().
Fixed discarding texture-only material.
RWObj_TriangulationReader::addMesh() - fixed usage of wrong material for flushing previous group.

4 years ago0030787: BRepOffsetAPI_MakePipeShell: hangs on the attached model
emv [Wed, 19 Jun 2019 05:54:50 +0000 (08:54 +0300)]
0030787: BRepOffsetAPI_MakePipeShell: hangs on the attached model

Protect IntTools_EdgeEdge::FindSolutions method from cases where splitting edge on parts does not give bounding box decreasing.
Use at least Epsilon from edges parameters as a step in BRepLib::FindValidRange.
Test case for the issue.

4 years ago0030780: [Regression to 7.3.0] BRepMesh fails triangulating one face of the shape
oan [Mon, 24 Jun 2019 16:03:45 +0000 (19:03 +0300)]
0030780: [Regression to 7.3.0] BRepMesh fails triangulating one face of the shape

Added new parameter KeepSmallEdges to IMeshTools_Parameters allowing to compute min size for each edge locally, depending on the length of particular edge.
Parameter -smalledges now available for incmesh command.

4 years ago0030809: Data Exchange - fix misprint in RWMesh_CafReader::generateNames()
kgv [Tue, 25 Jun 2019 12:31:56 +0000 (15:31 +0300)]
0030809: Data Exchange - fix misprint in RWMesh_CafReader::generateNames()

4 years ago0030806: Visualization - AIS Manipulator highlighting is not affected by the view...
aba [Tue, 25 Jun 2019 09:30:24 +0000 (12:30 +0300)]
0030806: Visualization - AIS Manipulator highlighting is not affected by the view affinity

- AIS_Manipalator object view affinity is now applied to presentation for highlighting.

4 years ago0030805: Visualization, StdSelect_BRepSelectionTool - empty sensitivity from polygon...
kgv [Mon, 24 Jun 2019 12:03:49 +0000 (15:03 +0300)]
0030805: Visualization, StdSelect_BRepSelectionTool - empty sensitivity from polygon-only Edge

StdSelect_BRepSelectionTool::GetEdgeSensitive() now takes polygon points before creating curve Adaptor.

4 years ago0030804: Foundation Classes - Poly_Connect crashes due to out-of-range array modification
kgv [Tue, 25 Jun 2019 16:39:49 +0000 (19:39 +0300)]
0030804: Foundation Classes - Poly_Connect crashes due to out-of-range array modification

Fixed initialization of edges array based on the wrong statement.

4 years ago0030802: Draw Harness - add scrollbars to DFBrowse
kgv [Mon, 24 Jun 2019 08:38:54 +0000 (11:38 +0300)]
0030802: Draw Harness - add scrollbars to DFBrowse

4 years ago0029679: Draw Harness - Command 2dapprox works wrong when giving points in command...
msv [Fri, 21 Jun 2019 17:35:30 +0000 (20:35 +0300)]
0029679: Draw Harness - Command 2dapprox works wrong when giving points in command line

Correct the behavior of the command 2dapprox for the case of points input in the command line.
Restore the work of the command 2dinterpole (implemented in the same method as 2dapprox).
Add test cases.
Correct generation of snapshots for the tests lowalgos/2dinter/*.

4 years ago0030748: Visualization - Marker displayed in immediate layer ruins QT Quick view...
kgv [Sat, 22 Jun 2019 16:50:10 +0000 (19:50 +0300)]
0030748: Visualization - Marker displayed in immediate layer ruins QT Quick view controls

OpenGl_Workspace::ResetAppliedAspect() now resets active texture unit to GL_TEXTURE0.

4 years ago0029296: Data Exchange - implement import of mesh data from files in OBJ format IR-2019-06-21
kgv [Sun, 5 May 2019 17:31:35 +0000 (20:31 +0300)]
0029296: Data Exchange - implement import of mesh data from files in OBJ format

RWObj_Reader and RWObj_CafReader - added new classes reading triangulation from OBJ file.

4 years ago0030691: Data Exchange - implement import of mesh data from files in glTF format
kgv [Tue, 18 Jun 2019 16:41:15 +0000 (19:41 +0300)]
0030691: Data Exchange - implement import of mesh data from files in glTF format

Added RWGltf_CafReader class implementing glTF reader.
Added readgltf Draw Harness command for reading glTF files.

4 years ago0027685: Visualization of a shape imported from IGES hangs
oan [Sun, 16 Jun 2019 16:12:56 +0000 (19:12 +0300)]
0027685: Visualization of a shape imported from IGES hangs

Adding test case

4 years ago0030785: Mesh - protect BRepMesh_IncrementalMesh::Perform from raising exception
emv [Mon, 17 Jun 2019 13:26:45 +0000 (16:26 +0300)]
0030785: Mesh - protect BRepMesh_IncrementalMesh::Perform from raising exception

IMeshTools_ModelAlgo and IMeshTools_ModelBuilder have been changed to provide exception protected interfaces for performing the operations.
Protect single Edge/Face discretization methods from raising exceptions to skip broken Edges/Faces and allow mesh construction on the whole model.

4 years ago0030777: Visualization - Incorrect selection/highlighting of clipped objects
kgv [Sun, 16 Jun 2019 14:09:14 +0000 (17:09 +0300)]
0030777: Visualization - Incorrect selection/highlighting of clipped objects

SelectMgr_ViewerSelector::traverseObject() now handles Object clipping planes in the same way as View clipping planes.

4 years ago0030789: Data Exchange - Some names are lost during STEP import
ika [Tue, 18 Jun 2019 09:18:01 +0000 (12:18 +0300)]
0030789: Data Exchange - Some names are lost during STEP import

Add importing name from PRODUCT_DEFINITION_WITH_ASSOCIATED_DOCUMENTS STEP entity.
Update test cases with files contained this entity.

4 years ago0030706: Visualization - fetch font folder list from fontconfig library on Linux
kgv [Sat, 11 May 2019 07:07:19 +0000 (10:07 +0300)]
0030706: Visualization - fetch font folder list from fontconfig library on Linux

vfont command now prints fonts in alphabetical order.

4 years ago0030782: Visualization, Font_FTFont - use predefined fallback fonts for extended...
kgv [Sun, 16 Jun 2019 10:09:49 +0000 (13:09 +0300)]
0030782: Visualization, Font_FTFont - use predefined fallback fonts for extended Unicode subsets

Font_FTFont now uses fallback fonts for characters from unsupported Unicode subsets,
managed by Font_FTFont::ToUseUnicodeSubsetFallback()
and Font_FontMgr::ToUseUnicodeSubsetFallback() option, enabled by default.
The fallback list includes common font families for Chinese, Korean and Japanese languages.

Font_FTFont::RenderGlyph() now supports FT_PIXEL_MODE_MONO input format used by some CJK fonts.
OpenGl_Font::createTexture() now limits single texture size to circa 4096 glyphs.

test/testgrid now expects test scripts being in UTF-8 encoding in sync with "DRAWEXE -f script.tcl".

AIS::InitFaceLength() - fixed usage of uninitialized result.

4 years ago0030595: Oriented Bounding Box seems not optimal for some shapes
emv [Thu, 18 Apr 2019 08:17:18 +0000 (11:17 +0300)]
0030595: Oriented Bounding Box seems not optimal for some shapes

Add possibility of construction of the Optimal Oriented Bounding Box from set of points (the case of shape with triangulation).

The interface of the BRepBndLib::AddOBB method is not changed, but the option <theIsOptimal> now controls also the construction of the OBB from Set of points.
The slightly modified DiTo algorithm will be used, checking all possible axes created by the extreme points.
The performance of the construction of the Optimal OBB is lower but the quality is usually much higher (can't be worse by definition).

Test cases for the issue.

4 years ago0030754: Coding - the array of weights should begin with Lower, not the constant...
kgv [Wed, 5 Jun 2019 06:34:21 +0000 (09:34 +0300)]
0030754: Coding - the array of weights should begin with Lower, not the constant value 1 within Geom_BSplineCurve.cxx

4 years ago0030779: Data Exchange - Problems with located subshapes in expand compounds
ika [Thu, 13 Jun 2019 12:30:51 +0000 (15:30 +0300)]
0030779: Data Exchange - Problems with located subshapes in expand compounds

Protect Expand compounds against problems with located subshapes.
Add method XCAFDoc_ShapeTool::AddSubShape() with Boolean output parameter.
Speed up XCAFDoc_ShapeTool::Expand().
Speed up XCAFDoc_ShapeTool::FindSubShape().

4 years ago0030761: Application Framework - HOMEDRIVE and TEMP are undefined on UWP
mpv [Mon, 3 Jun 2019 13:05:25 +0000 (16:05 +0300)]
0030761: Application Framework - HOMEDRIVE and TEMP are undefined on UWP

Avoid CDF_Stroe to find default folder since there is no case where this folder does not reset to exact value given by the user.
Also, remove the exception raising for the case this method is called from outside.

4 years ago0030725: Visualization - remove Display calling from SetSelected methods of context
nds [Thu, 6 Jun 2019 13:40:52 +0000 (16:40 +0300)]
0030725: Visualization - remove Display calling from SetSelected methods of context

AIS_InteractiveContext::Load/ClearGlobal is modified for correct processing SetSelected for child objects.
As Display/Erase of object with children displays/erases these children, then the children status inside context should also be updated.

4 years ago0030507: Visualization - introduce AIS_ViewController
kgv [Mon, 10 Jun 2019 18:03:41 +0000 (21:03 +0300)]
0030507: Visualization - introduce AIS_ViewController

ViewerTest_EventManager now inherits AIS_ViewController.
Platform-dependent user input handling within ViewerTest has been revised
to process events in common way through AIS_ViewController.
The mouse navigation has been changed, so that left mouse clicked
without modifers now rotates View.
The rubber-band selection can be activated via Alt+LeftMouseButton.
Selection is now done on mouse unclick and keyboard short-cuts take effect on unclick.

Aspect_Window::SetTitle() - added new method configuring Window title.
Introduced new types Aspect_Touch, Aspect_VKey, Aspect_ScrollDelta
for processing window events in platform-independent way.

4 years ago0030772: Data Exchange - Invalid person's name constructed by STEPConstruct_AP203Cont...
szy [Mon, 10 Jun 2019 09:59:39 +0000 (12:59 +0300)]
0030772: Data Exchange - Invalid person's name constructed by STEPConstruct_AP203Context class.

// fixed remarks.

4 years ago0030765: Visualization - Incorrect intersection with Select3D_SensitiveBox when clipp... IR-2019-06-07
age [Wed, 5 Jun 2019 09:30:01 +0000 (12:30 +0300)]
0030765: Visualization - Incorrect intersection with Select3D_SensitiveBox when clipping is turned on

SelectMgr_RectangularFrustum::Overlaps method for computing intersection of box with frustum was reworked. Now the nearest non-clipped point is calculated.

4 years ago0030726: Visualization - change Selected state of owner in AIS_Selection
nds [Thu, 6 Jun 2019 08:50:21 +0000 (11:50 +0300)]
0030726: Visualization - change Selected state of owner in AIS_Selection

AIS_InteractiveContext::IsHilighted() behavior has been changed.
It should use the same logic for owner processing like when it is highlighted. IsSelected of owner is used for selection state, not highlight.

 Without this correction, object is never shown as selected by click (Select(bool)):
 if (!HighlightStyle (theOwner, aCustomStyle) ||
    (!aCustomStyle.IsNull() && aCustomStyle != anObjSelStyle))

 IsSelected is already true, so the highlight style is equal to selection style, nothing to do.

4 years ago0030692: Data Exchange - introduce base framework RWMesh for importing mesh data...
kgv [Fri, 3 May 2019 14:50:28 +0000 (17:50 +0300)]
0030692: Data Exchange - introduce base framework RWMesh for importing mesh data formats into XDE document

RWMesh_CafReader - added new interface class for common workflow for reading mesh data files into XDE document.

OSD_Path - added auxiliary methods splitting path into folder+file pair
and checking relative/absolute path semantically:
OSD_Path::FolderAndFileFromPath(), ::IsRelativePath(), ::IsAbsolutePath().

V3d_TypeOfOrientation enumeration has been extended with aliases
(like front/left) for Z-up and Y-up conventions.
V3d_View::SetProj() now accepts argument for asking Y-up instead of Z-up.

Added command vviewproj defining standard camera direction.
Commands vaxo, vleft, vright, vtop, vbottom, vfront, vbottom now redirect to vviewproj.

TCollection_AsciiString::SubString() now uses Standard_OutOfRange_Always_Raise_if() to suppress GCC warning.

Eliminated gcc 4.4 compilation errors within Standard_OutOfRange_Raise_if,Standard_RangeError_Raise_if.

4 years ago0030715: Configuration, CMake - error build with QTANGLE
apn [Tue, 4 Jun 2019 11:20:56 +0000 (14:20 +0300)]
0030715: Configuration, CMake - error build with QTANGLE

SEARCH_TEMPLATES was modified to find EGL and GLES2 libraries in different folders (angle-gles, egl-gles, egl, angle, etc).
Find 3rdparty products procedure allows to define 3RDPARTY_LIBRARY_DIR or 3RDPARTY_DLL_DIR manually to find necessary libraries and dlls.

4 years ago0030760: Modeling Algorithms - Intersection fails in Occt 7.3.0
emv [Mon, 3 Jun 2019 08:36:18 +0000 (11:36 +0300)]
0030760: Modeling Algorithms - Intersection fails in Occt 7.3.0

Use FORWARD orientation of edges and face when attaching pcurve from one edge to another.
Test case for the issue.

4 years ago0030656: Modeling Algorithms - Change Boolean Operations algorithm to use BVH tree...
emv [Thu, 18 Apr 2019 12:34:37 +0000 (15:34 +0300)]
0030656: Modeling Algorithms - Change Boolean Operations algorithm to use BVH tree instead of UBTree

Switching the Boolean Operations algorithm to use the BVH tree instead of UB tree as selection of the elements from BVH tree is usually faster.

4 years ago0030764: Coding - warnings in Image_AlienPixMap.cxx when built with MSVC10
abv [Tue, 4 Jun 2019 06:21:28 +0000 (09:21 +0300)]
0030764: Coding - warnings in Image_AlienPixMap.cxx when built with MSVC10

Disable warnings when including system headers (conflict between VS 2010 and Windows SDK definitions).

4 years ago0030729: Visualization - TKOpenGl reports OpenGL 4.5 loading functions error on Intel...
kgv [Sun, 26 May 2019 09:46:32 +0000 (12:46 +0300)]
0030729: Visualization - TKOpenGl reports OpenGL 4.5 loading functions error on Intel drivers

Make reported error more verbose.

4 years ago0028668: Point Cloud Rendering - standard selection API returns invalid values CR0-SCHARP-FH IR-2019-05-31
kgv [Thu, 30 May 2019 07:02:25 +0000 (10:02 +0300)]
0028668: Point Cloud Rendering - standard selection API returns invalid values

Added an argument to OpenGl_GraphicDriver::GetSharedContext() for returning only currently bound OpenGL context.
SelectMgr_SelectingVolumeManager::GetMousePosition() - added getter returning mouse coordinates.

4 years ago0030756: Visualization, TKOpenGl - capping plane does not work for ZLayer with non...
kgv [Wed, 29 May 2019 12:22:10 +0000 (15:22 +0300)]
0030756: Visualization, TKOpenGl - capping plane does not work for ZLayer with non-zero origin

OpenGl_CappingPlaneResource::updateTransform() now takes into account ZLayer origin.

Fixed VT_ProcessKeyPress() passing arbitrary input to Draw::Atoi() leading
to messages in console like "unclosed braces".

4 years ago0030745: Visualization, TKOpenGl - fix initialization of GLES3 context
kgv [Sat, 25 May 2019 15:59:17 +0000 (18:59 +0300)]
0030745: Visualization, TKOpenGl - fix initialization of GLES3 context

OpenGl_GraphicDriver::InitContext() now tries to initialize GLES3 context
(EGL_CONTEXT_CLIENT_VERSION) and then fallback to GLES2.

4 years ago0030698: Volume Rendering - Early clipping of volume object's bounding box
iko [Tue, 7 May 2019 12:44:39 +0000 (15:44 +0300)]
0030698: Volume Rendering - Early clipping of volume object's bounding box

Flag to control check of bounding box clipping before drawing has been added.

4 years ago0030655: Modeling Data - Provide interfaces for selection of the elements from BVH...
emv [Wed, 17 Apr 2019 14:29:02 +0000 (17:29 +0300)]
0030655: Modeling Data - Provide interfaces for selection of the elements from BVH tree

Provide the easy to use interfaces for selection of the elements from BVH tree.
The selection rules should be implemented in the selector class derived from *BVH_Traverse* or in *BVH_PairTraverse* in Reject/Accept methods.

The *BVH_Traverse* is used for selection of the elements from the tree.
The *BVH_PairTraverse* is used for selection of the pairs of elements from two BVH trees.

Auxiliary changes:
- Two methods BVH_Box::IsOut(OtherBox) and BVH_Box::IsOut(Point) have been added;
- Added methods for conversion of Bnd boxes to BVH boxes

Added new class *BVH_Tools* containing useful static methods operating on BVH points and boxes.

The classes BRepExtrema_OverlapTool and BVH_DistanceField have been rebased to use the new traverse methods.

4 years ago0030731: Modeling Data - B-Spline should have explicit data check error messages
Benjamin Bihler [Thu, 23 May 2019 12:49:50 +0000 (15:49 +0300)]
0030731: Modeling Data - B-Spline should have explicit data check error messages

Error messages have been added in throw statements.

4 years ago0030694: Data Exchange - support non-standard GB2312-encoded STEP files
kgv [Mon, 6 May 2019 13:00:16 +0000 (16:00 +0300)]
0030694: Data Exchange - support non-standard GB2312-encoded STEP files

STEPCAFControl_Reader::SourceCodePage() - added property defining text encoding
for converting names within STEPCAFControl_Reader::ReadNames() method.
Added associated "read.stepcaf.codepage" parameter,
which default value is Resource_UTF8, preserving current behavior.

Resource_FormatType enumeration has been extended by UTF8 and SystemLocale values.
Resource_Unicode - added conversion methods taking Resource_FormatType as argument.

GetName command has been corrected to NOT replace non-Latin symbols.

4 years ago0030702: Configuration, CMake - error for iOS build due to searching macos frameworks
kgv [Fri, 24 May 2019 08:00:35 +0000 (11:00 +0300)]
0030702: Configuration, CMake - error for iOS build due to searching macos frameworks

Look for UIKit+OpenGLES on iOS instead of AppKit+OpenGL.

4 years ago0030738: Data Exchange - XCAFDoc_ShapeTool::updateComponent() is too long
kgv [Thu, 23 May 2019 19:46:58 +0000 (22:46 +0300)]
0030738: Data Exchange - XCAFDoc_ShapeTool::updateComponent() is too long

Cache subshapes list into map instead of re-iterating it multiple times within the loop.
Avoid iteration at all if modified state has been already detected.

XCAFDoc now returns GUIDs by const reference instead of a copy.

4 years ago0030590: Wrong result of Boolean Cut algorithm
jgv [Thu, 25 Apr 2019 16:46:14 +0000 (19:46 +0300)]
0030590: Wrong result of Boolean Cut algorithm

    Modification in static method BoundedArc of IntStart_SearchOnBoundaries:
    add exact intersection of canonical curve-surface (when Func is IntPatch_ArcFunction).

4 years ago0030727: Data Exchange - Problems in Shape Tool
ika [Wed, 22 May 2019 12:22:54 +0000 (15:22 +0300)]
0030727: Data Exchange - Problems in Shape Tool

Add protection from return of not top-level shape by FindShape method.
Add protection against located roots into FindMainShape method.
Add new Draw command for FindMainShape.
Add flag findInstance to Draw command FindShape

4 years ago0030670: Modeling Algorithms - Performance improvement of Boolean Operations algorithm
emv [Tue, 23 Apr 2019 09:31:23 +0000 (12:31 +0300)]
0030670: Modeling Algorithms - Performance improvement of Boolean Operations algorithm

The following improvements have been made in Boolean operations algorithm:
1. Added possibility to update FaceInfo structure for many faces at once which helps to avoid nested loops.
2. Improve Point-Face classification procedure by caching the FaceExplorer for a face.

4 years ago0030440: Visualization - Graphic3d_Camera::Frustum() returns wrong planes in portrait...
kgv [Thu, 23 May 2019 09:02:29 +0000 (12:02 +0300)]
0030440: Visualization - Graphic3d_Camera::Frustum() returns wrong planes in portrait mode

Graphic3d_Camera::Frustum() now handles window Aspect Ratio < 1.0.

4 years ago0030687: Visualization - remove redundant interfaces SelectBasics_EntityOwner and...
kgv [Tue, 21 May 2019 16:42:15 +0000 (19:42 +0300)]
0030687: Visualization - remove redundant interfaces SelectBasics_EntityOwner and SelectBasics_SensitiveEntity

SelectBasics_EntityOwner has been merged into SelectMgr_EntityOwner.
Unused property SelectMgr_EntityOwner::ResetLocation() has been removed.
SelectBasics package has been moved from TKService to TKV3d.

SelectBasics_SensitiveEntity has been merged into Select3D_SensitiveEntity.

4 years ago0030718: Mesh - broken triangulation within 32-bit builds
tiv [Tue, 21 May 2019 13:18:48 +0000 (16:18 +0300)]
0030718: Mesh - broken triangulation within 32-bit builds

The problem caused by the changing of HashCode() method of TColStd_PackedMapOfInteger::TColStd_intMapNode class done as a part of 30550 changes is solved.

4 years ago0030680: VIS - IVtkOCC_ShapeMesher displays Isoline wrong
kgv [Sun, 19 May 2019 12:57:54 +0000 (15:57 +0300)]
0030680: VIS - IVtkOCC_ShapeMesher displays Isoline wrong

IVtkOCC_ShapeMesher now calls StdPrs_Isolines tool instead of code copy-paste.

4 years ago0030717: Visualization, AIS_InteractiveContext::Erase() - selection presentation...
kgv [Sun, 19 May 2019 06:46:59 +0000 (09:46 +0300)]
0030717: Visualization, AIS_InteractiveContext::Erase() - selection presentation in a mode other than the default after hiding an object

AIS_InteractiveContext::EraseGlobal() now erases all object owners
(in the same way as AIS_InteractiveContext::ClearGlobal()).

Removed redundant fields AIS_InteractiveContext::myLastinMain and myWasLastMain.

4 years ago0030713: Visualization, TKOpenGl - stipple line artifacts on Intel UHD Graphics 630
mnv [Thu, 16 May 2019 06:28:28 +0000 (09:28 +0300)]
0030713: Visualization, TKOpenGl - stipple line artifacts on Intel UHD Graphics 630

Added workaround for dashed line presentation on Intel UHD Graphics 630.

4 years ago 0030716: Visualization - Set polygon offset units property to 1.0
tiv [Fri, 17 May 2019 09:01:01 +0000 (12:01 +0300)]
 0030716: Visualization - Set polygon offset units property to 1.0

The default value of the Units property of the Graphic3d_PolygonOffset class is changed to 1.0f (instead of 0.0f used previously).

4 years ago0030679: Attached model hangs most of OCCT common functionality IR-2019-05-17
msv [Mon, 13 May 2019 13:19:35 +0000 (16:19 +0300)]
0030679: Attached model hangs most of OCCT common functionality

Evaluator of offset surface has been protected against evaluation at infinite parameters. Now it throws exception when evaluating such data.

The methods IsUClosed and IsVClosed of the class ShapeAnalysis_Surface have been corrected to avoid evaluation of the surface at infinite parameters (fighting with regressions "parasolid doc_3 E3" and "parasolid doc_2 A3" in products).

4 years ago0030561: Visualization, PrsMgr_PresentableObject - Keep the current transformation...
asl [Thu, 16 May 2019 08:23:21 +0000 (11:23 +0300)]
0030561: Visualization, PrsMgr_PresentableObject - Keep the current transformation for child in AddChild()

New methods AddChildWithCurrentTransformation(), RemoveChildWithRestoreTransformation() are implemented to keep the current global transformation of the object (child).
In DRAW a new command vchild is provided for testing low-level connections between presentations.

4 years ago0030712: Application Framework - Protect binary TriangulationDriver against empty...
msv [Wed, 15 May 2019 09:10:36 +0000 (12:10 +0300)]
0030712: Application Framework - Protect binary TriangulationDriver against empty triangulation in the file

The matter is that when the binary OCAF file contained a triangulation with 0 nodes and 0 triangles the method Paste would cause construction error of Poly_Triangulation.
This patch protects this method against exception.

4 years ago0030708: Modeling Data - Exception is raised while initializing TopoDS_Iterator with...
emv [Mon, 13 May 2019 09:32:09 +0000 (12:32 +0300)]
0030708: Modeling Data - Exception is raised while initializing TopoDS_Iterator with null shape

Added protection from null shapes to TopoDS_Iterator::Initialize method.

4 years ago0030705: Visualization, TKOpenGl - stipple line GLSL error on using OpenGL 2.1 +...
kgv [Mon, 13 May 2019 08:31:42 +0000 (11:31 +0300)]
0030705: Visualization, TKOpenGl - stipple line GLSL error on using OpenGL 2.1 + GL_EXT_gpu_shader4 extension on macOS

Fix compatibility with pure GL_EXT_gpu_shader4 specs by defining "uint" as "unsigned int".

4 years ago0030690: Draw Harness - provide XDisplay command for displaying XDE document
kgv [Fri, 3 May 2019 09:30:02 +0000 (12:30 +0300)]
0030690: Draw Harness - provide XDisplay command for displaying XDE document

XDisplay - added new command displaying XDE document in ViewerTest map of object:
> XDisplay Doc [label1 [label2 [...]]] [-explore {on|off}] [-docPrefix {on|off}] [-names {on|off}]
>              [-noupdate] [-dispMode Mode] [-highMode Mode]

vstate - added NULL checks.
vdisplay now prints error on attempt to specify unsupported display mode.
verase, vremove now raise Tcl exception on attempt to hide non-existing object.
verase, vremove, vdir now accept name masks like "verase b*".
vremove and vdir output is now consistent to verase command (space-separated list of removed objects).

4 years ago0030516: Visualization - Pointer to an OpenGl_Structure is deleted and accessed later...
kgv [Thu, 2 May 2019 13:58:06 +0000 (16:58 +0300)]
0030516: Visualization - Pointer to an OpenGl_Structure is deleted and accessed later after PrsMgr_Presentation::Highlight()

Do not set IsForHighlight flag for already displayed presentation.

4 years ago0030696: Draw Harness, testgrid - specify encoding in HTML header IR-2019-05-07
kgv [Mon, 6 May 2019 19:44:51 +0000 (22:44 +0300)]
0030696: Draw Harness, testgrid - specify encoding in HTML header

4 years ago0030683: Coding Rules - eliminate CLang compiler warnings -Wreturn-std-move
kgv [Mon, 29 Apr 2019 16:51:34 +0000 (19:51 +0300)]
0030683: Coding Rules - eliminate CLang compiler warnings -Wreturn-std-move

Added generalized move constructor and assignment operator to initialize TopoDS_Shape by object of this or derived type.
Added move constructor and assignment operator for TopLoc_SListOfItemLocation.
Macro OCCT_NO_RVALUE_REFERENCE is used in Standard_Handle.hxx instead of direct check of compiler version.

4 years ago0029523: Problem with BRepOffsetAPI_MakeEvolved
nbv [Wed, 11 Apr 2018 09:23:29 +0000 (12:23 +0300)]
0029523: Problem with BRepOffsetAPI_MakeEvolved

The capabilities of the class BRepOffsetAPI_MakeEvolved have been extended with involving alternate algorithm of resolving the loops in the piped shape. The new option theIsVolume is added for that in the constructor.

New class BRepFill_AdvancedEvolved has been created in order to provide new OCCT-algorithm combining BRepFill_PipeShell and BOPAlgo_MakerVolume.

A change in BOPAlgo_PaveFiller.cxx has been made in order to solve a specific problem of Boolean operation.

The interface of DRAW-command "evolved" has been updated to add the new option. DRAW-command "evolvedsolid" has been deleted. Now it is replaced with DRAW-command "evolved" with the option "-solid".

Testgrid "evolved" has been created.

4 years ago0030684: Coding Rules - eliminate GCC compiler warnings -Wformat-overflow and -Wcatch...
kgv [Mon, 29 Apr 2019 19:31:45 +0000 (22:31 +0300)]
0030684: Coding Rules - eliminate GCC compiler warnings -Wformat-overflow and -Wcatch-value

4 years ago0030686: Visualization, SelectMgr_ViewerSelector - sorting issues of transformation...
kgv [Wed, 1 May 2019 09:24:35 +0000 (12:24 +0300)]
0030686: Visualization, SelectMgr_ViewerSelector - sorting issues of transformation-persistent objects

SelectMgr_ViewerSelector::updatePoint3d() - added missing Abs() for computed tolerance
and added check to not attempt transforming undefined 3D point.

4 years ago0030433: Checkshape: bad solid, created by revolution, is reported as valid.
ifv [Fri, 15 Mar 2019 13:59:08 +0000 (16:59 +0300)]
0030433: Checkshape: bad solid, created by revolution, is reported as valid.

BRepPrimAPI_MakeRevol.cxx, hxx
Insert checking of self-intersecting of generated surfaces in MakeRevol

BRepTest_SweepCommands.cxx
Adjusting command revol to current behavior of MakeRevol algorithm.

4 years ago0030675: Visualization - remove redundant proxy classes in hierarchy of PrsMgr_Presen...
kgv [Wed, 24 Apr 2019 16:53:17 +0000 (19:53 +0300)]
0030675: Visualization - remove redundant proxy classes in hierarchy of PrsMgr_Presentation

Removed redundant proxy class Prs3d_Presentation - Graphic3d_Structure now should be used directly.
Removed auxiliary class PrsMgr_ModedPresentation holding Structure and Display Mode index (field has been moved to Structure itself),
so that PrsMgr_Presentations (AIS_InteractiveObject::Presentations()) now holds Structures directly.
PrsMgr_Prs proxy class has been removed, and PrsMgr_Presentation now inherits Graphic3d_Structure.

Graphic3d_Structure, maps declarations have been corrected to use class instead of void*, which allowed to avoid redundant casts.
Several methods have been also modified to avoid creating Handle from this pointer.
AIS package headers have been cleaned up from forward declaration of Prs3d_Presentation class.

Fixed dereference of destroyed presentations within connected and HLR computed objects:
- AIS_InteractiveContext::Disconnect() now erases connected presentation.
- Graphic3d_CView::Clear() now removes destructed structures from Computed list.

- fix inaccessibility of PrsMgr_Presentation methods

4 years ago0030682: Configuration, qmake - all warnings are suppressed on macOS target
kgv [Mon, 29 Apr 2019 15:24:36 +0000 (18:24 +0300)]
0030682: Configuration, qmake - all warnings are suppressed on macOS target

Fixed inconsistency of compiler flags with genproj.
warn_on+QMAKE_CXXFLAGS_WARN_ON is now used instead of warn_off+QMAKE_CXXFLAGS.
Added No_Exception to DEFINES.

4 years ago0030681: Configuration - suppress OpenGL deprecation warning on macOS 10.14
kgv [Mon, 29 Apr 2019 15:43:14 +0000 (18:43 +0300)]
0030681: Configuration - suppress OpenGL deprecation warning on macOS 10.14

Define GL_SILENCE_DEPRECATION to suppress warnings.

4 years ago0030672: Visualization - AIS_InteractiveContext::SetLocation() sets invalid selection... IR-2019-04-26
kgv [Wed, 24 Apr 2019 06:16:19 +0000 (09:16 +0300)]
0030672: Visualization - AIS_InteractiveContext::SetLocation() sets invalid selection BVH flag to removed object

SelectMgr_SelectionManager::Remove() now deactivates selection before removal.

4 years ago0030669: Visualization - AIS_Manipulator ignores parent transformation
kgv [Wed, 24 Apr 2019 15:50:29 +0000 (18:50 +0300)]
0030669: Visualization - AIS_Manipulator ignores parent transformation

AIS_Manipulator::Transform() now considers object parent transformation.

Added new command vchild for easier testing of low-level connections between presentations.

4 years ago0030674: Visualization, AIS_InteractiveObject - fix accessibility of several properties
kgv [Thu, 4 Apr 2019 06:44:16 +0000 (09:44 +0300)]
0030674: Visualization, AIS_InteractiveObject - fix accessibility of several properties

AIS_InteractiveObject/SelectMgr_SelectableObject/PrsMgr_PresentableObject
- added missing getters;
- removed redundant private sections;
- improved documentation;
- AIS_InteractiveObject::Compute() marked as pure interface;
- methods within this hierarchy have been moved to the base class, when reasonable.

Removed redundant typedefs to pointers (PrsMgr_PresentationPointer, PrsMgr_PresentableObjectPointer).

4 years ago0030652: Configuration, genproj - reuse PRODUCTS_PATH within generated custom.bat
kgv [Tue, 16 Apr 2019 19:46:43 +0000 (22:46 +0300)]
0030652: Configuration, genproj - reuse PRODUCTS_PATH within generated custom.bat

genconfdeps.tcl now puts %PRODUCTS_PATH%/$PRODUCTS_PATH into generated custom.bat/custom.sh scripts.
Added missing CSF_winmm definition to OccToolkit.pri

4 years ago0030645: Modeling Algorithms - B-spline segmentation produces wrong parametrization
azv [Sat, 13 Apr 2019 11:57:39 +0000 (14:57 +0300)]
0030645: Modeling Algorithms - B-spline segmentation produces wrong parametrization

Method Segment() of B-spline curve and surface has been extended by parameter theTolerance (theUTolerance and theVTolerance for surface), which defines the proximity between knots of a NURBS and boundaries of cutting segment. The default value of the tolerance is Precision::PConfusion().
Test cases have been added to check segmenting of B-spline surface and curves both 2D and 3D.

4 years ago0030621: Implementation of building U-periodical surfaces.
ifv [Fri, 29 Mar 2019 12:20:27 +0000 (15:20 +0300)]
0030621: Implementation of building U-periodical surfaces.

draw_test_harness.md - description of new options in Draw commands

AppDef_BSplineCompute.hxx, BRepApprox_TheComputeLineOfApprox.hxx, GeomInt_TheComputeLineOfWLApprox.hxx, Approx_BSplComputeLine.gxx - implementation of method SetPeriodic(...) and implementation periodic boundary conditions for multiline in order to get periodic multicurve.

GeomAPI_PointsToBSplineSurface.hxx, GeomAPI_PointsToBSplineSurface.cxx - adding new parameter for methods Init(...) and Interpolate(...), implementation of building periodic tangents for first and last AppDef_MultiPointConstraint of multiline for U direction of surface.

GeometryTest_APICommands.cxx - implementation of new functionality in Draw command surfapp and surfint

GeomFill_NSections.cxx
Fixing problem with bugs modalg_3 bug606_2

4 years ago0030592: Draw Harness, ViewerTest - provide vbackground command unifying vsetbg,...
tiv [Mon, 22 Apr 2019 07:51:22 +0000 (10:51 +0300)]
0030592: Draw Harness, ViewerTest - provide vbackground command unifying vsetbg, vsetbgmode, vsetgradientbg, vsetgrbgmode, vsetcolorbg

A new command vbackground is created. Old background commands are made aliases for the newly created command (including vsetdefaultbg).
Tests are modified using newly added command vbackground.

4 years ago0030663: Visualization - synthesize italic style for a font having no italic style
vro [Fri, 19 Apr 2019 06:17:57 +0000 (09:17 +0300)]
0030663: Visualization - synthesize italic style for a font having no italic style

Font_FTFont now defines shear transformation to synthesize italic style for fonts having no such style.
Font_FontMgr::FindFont() and command "vfont -find" have been extended with -strict option
to check whether the given font is actually registered or not.
Font_FTFont::Init() - added constructor from memory buffer.
Second Font_FTFont::Init() override has been renamed to Font_FTFont::FindAndInit()
to avoid ambiguity between two similar methods taking full font path and font name as string.

4 years ago0030435: Improving performance of Approx_ComputeCLine
ifv [Thu, 10 Jan 2019 10:07:01 +0000 (13:07 +0300)]
0030435: Improving performance of Approx_ComputeCLine

1. Approx_ComputeCLine.gxx, Approx_FitAndDivide.hxx, Approx_FitAndDivide2d.hxx, BRepFill_ComputeCLine.hxx
It is base modification, which allows improve performance of approximation with help of Approx_ComputeCLine. The main idea of improvement is using degree selection by inverse order - from maxdegree to mindegree. If tolerance for maxdegree is not reached, there is no sense to make approximation for current number of knots with lower degree, it is necessary to cut parametric interval.

2. ProjLib_ComputeApprox, ProjLib_ComputeApproxOnPolarSurface, ProjLib_ComputeApproxOnPolarSurface, ProjLib_ProjectOnPlane
It is additional modification of methods using Approx_ComputeCLine.
Mainly, modifications concern to more optimal choosing parameters for approximation algorithm.

3. BRepCheck_Face
Small improvement of method Intersect(...), which intersects two wires on face.

4. BRepTopAdaptor_FClass2d
Impovement of treatment infinitely narrow faces.

5. ChFi3d/ChFi3d_Builder_6.cxx
Small improvement, which forbids extension of singular boundary of surface.
It was TODO problem in tests/bugs/modalg_7/bug27711_3

6. IntTools_EdgeEdge.cxx
Improvement of performance for cases of searching common parts between line  and analytical curve

7. GeomliteTest_CurveCommands.cxx
Adding Draw command fitcurve. This command is analog of approxcurve, but uses Approx_FitAndDivide algorithm.
Mainly to have direct draw command for testing Approx_ComputeCLine.

8. Extrema_ExtElC.cxx

Treatment of case "infinite solutions" for extrema line-ellipse

9. Modification of some tests according to new behavior of algorithm.

10. tests/perf/moddata/bug30435
Test for new improved algorithm.

11. Implementation QAcommand OCC30435 in QABugs_20.cxx used in test bug30435

5 years ago0030657: Visualization - misprint in Graphic3d_ZLayerSettings::SetOrigin() IR-2019-04-19
kgv [Wed, 17 Apr 2019 19:23:51 +0000 (22:23 +0300)]
0030657: Visualization - misprint in Graphic3d_ZLayerSettings::SetOrigin()

Add missing initialization of Geom_Transformation object.

5 years ago0030644: Coding - inline trivial methods of V3d_View class
kgv [Wed, 17 Apr 2019 11:58:35 +0000 (14:58 +0300)]
0030644: Coding - inline trivial methods of V3d_View class

5 years ago0030550: Coding - Integer overflow in Standard_CString HashCodes
tiv [Thu, 28 Mar 2019 09:42:41 +0000 (12:42 +0300)]
0030550: Coding - Integer overflow in Standard_CString HashCodes
0030551: Foundation Classes - Integer overflow in NCollection_CellFilter HashCode

Signed integers are not used in hash code functions now to prevent undefined behavior on left shift operations with signed integers.
A possibility of negative values of hash codes is eliminated.
INT_MAX → IntegerLast() in hash code functions.
All found hash code functions behaves uniformly now: they return a value in the range [1, theUpperBound]. Relevant comments are added to such functions.