occt.git
6 years ago0029474: Visualization, TKOpenGl - GLSL compilation errors on buggy OpenGL ES driver...
kgv [Fri, 2 Feb 2018 13:21:47 +0000 (16:21 +0300)]
0029474: Visualization, TKOpenGl - GLSL compilation errors on buggy OpenGL ES driver for PowerVR SGX 544MP

OpenGl_ShaderProgram::Initialize() now defines THE_MAX_LIGHTS/THE_MAX_CLIP_PLANES
to zeros to workaround issues with some buggy OpenGL drivers.

6 years ago0028599: Replacement of old Boolean operations with new ones in BRepProj_Projection...
emv [Tue, 26 Dec 2017 11:28:27 +0000 (14:28 +0300)]
0028599: Replacement of old Boolean operations with new ones in BRepProj_Projection algorithm

The usage of *BRepAlgo_Section* has been replaced with the usage of *BRepAlgoAPI_Section* in *BRepProj_Projection* algorithm.

The TODO statements have been removed from the failing test case in the "prj" grid as they are working correctly now.

The following changes have been made to improve the performance *BRepAlgoAPI_Section*:
1. Revision of the *IntPolyh_Intersection* class to avoid repeated calculation of the deflection of the same triangulation.
2. Small revision of the Edge/Face intersection algorithm to perform Extrema computation on the whole intersection range of the edge instead of discrete ranges.
3. Implementation of the extrema computation for the Circle and Sphere.
4. Correct computation of the parameter of the point on the Circle.

6 years ago0029069: Samples - handle UNICODE filenames within C++/CLI CSharp sample
kgv [Mon, 29 Jan 2018 08:05:20 +0000 (11:05 +0300)]
0029069: Samples - handle UNICODE filenames within C++/CLI CSharp sample

6 years ago0029463: Regression relation to 691 version: Method BndBox::IsOut() returns true...
msv [Tue, 30 Jan 2018 13:03:06 +0000 (16:03 +0300)]
0029463: Regression relation to 691 version: Method BndBox::IsOut() returns true for point lying on the planar face

Correct the method BRepBndLib::Add so that to enlarge the bounding box on the tolerance of edges which curves participate in calculation of the box.

6 years ago0028176: Draw Harness - "reshape" command usage is not properly documented
aml [Sat, 27 Jan 2018 08:20:27 +0000 (11:20 +0300)]
0028176: Draw Harness - "reshape" command usage is not properly documented

Help message is corrected for "reshape" command. Command implementation is corrected according OCCT coding rules.

6 years ago0029447: The constructor of Message_PrinterOStream mixes up cout and cerr
abv [Sun, 28 Jan 2018 16:49:43 +0000 (19:49 +0300)]
0029447: The constructor of Message_PrinterOStream mixes up cout and cerr

Use of cerr or cout is corrected in Message_PrinterOStream constructor

6 years ago0029453: Draw Harness - unclear syntax of "add" command
aml [Fri, 26 Jan 2018 06:35:19 +0000 (09:35 +0300)]
0029453: Draw Harness - unclear syntax of "add" command

Help message is corrected for "add" command.

6 years ago0029399: Optimize reading of floating point values from text strings
abv [Sun, 24 Dec 2017 06:44:04 +0000 (09:44 +0300)]
0029399: Optimize reading of floating point values from text strings

Function Strtod() is reimplemented using open source (MIT-style license) code by David M. Gay instead of strtod() provided by standard run-time library. This improves its performance by 3-10 times.

Functions Atof(), Strtod(), Printf(), Sprintf(), Fprintf() are declared as extern "C" to be usable from C programs.

Strtod() is used in Interface_FileReaderData::Fastof() and in RWStl_Reader to accelerate their work.

DRAW command QATestAtof and test perf fclasses strtod are added to check correctness and performance of Strtod().
Test perf draw restore is added to monitor performance of reading BREP files.

Minor off-topic corrections:
- method Standard_GUID::Assign (const Standard_UUID&) is implemented (was empty);
- Precision.hxx is included in BRepMesh_Vertex.hxx that uses it.

6 years ago0029399: Optimize reading of floating point values from text strings -- base dtoa.c
abv [Wed, 10 Jan 2018 18:17:35 +0000 (21:17 +0300)]
0029399: Optimize reading of floating point values from text strings -- base dtoa.c

Fast implementation of strtod downloaded from www.netlib.org/fp/dtoa.c (base version) is integrated as Standard_Strtod.cxx.

6 years ago0029448: The method Extrema_FuncExtCS::GetStateNumber mixes up parameter on curve...
msv [Thu, 25 Jan 2018 09:00:46 +0000 (12:00 +0300)]
0029448: The method Extrema_FuncExtCS::GetStateNumber mixes up parameter on curve with parameter U on surface

The code has been corrected to eliminate the mess.

6 years ago0028102: Problem cutting a plate with several holes (670)
nbv [Fri, 19 Jan 2018 15:07:06 +0000 (18:07 +0300)]
0028102: Problem cutting a plate with several holes (670)

Algorithm of processing cases when point of splitting Walking-line is near to the boundary of the intersection domain but does not match this boundary has been improved.

6 years ago0029443: It is not possible to store an ExtStringArray Ocaf attribute to any previous...
vro [Tue, 23 Jan 2018 11:06:18 +0000 (14:06 +0300)]
0029443: It is not possible to store an ExtStringArray Ocaf attribute to any previous version in XML file format

6 years ago0029436: Data Exchange - Extend Expand compounds functionality.
ika [Fri, 19 Jan 2018 10:36:30 +0000 (13:36 +0300)]
0029436: Data Exchange - Extend Expand compounds functionality.

Extend permissions for expand in ShapeTool
Fix processing of subshapes
Fix misprints
Add test cases

6 years ago0028385: Improve drawing isolines (DBRep_IsoBuilder algorithm)
emv [Mon, 27 Nov 2017 12:52:55 +0000 (15:52 +0300)]
0028385: Improve drawing isolines (DBRep_IsoBuilder algorithm)

1. When computing the iso-lines for the face (*DBRep_IsoBuilder*) prepare the Hatching algorithm with the following elements:
a. Trimmed p-curves of edges. The trimming parameters are computed by intersection with p-curves of the neighboring edges. The trimming will be performed only if the intersection point is covered by the tolerance of common vertex.
b. 2D segments connecting the p-curves of the neighboring edges. These segments will close the 2D gaps, which are closed in 3D by the tolerance of vertices shared between edges. This will allow trimming correctly the iso-lines passing through such gaps.

2. Implementation of the additional Init() method for WireExplorer algorithm taking UV bounds of the face to avoid their repeated computation when work working with a face having multiple wires.

3. Test cases for the issue.

6 years ago0029430: [Regression] Curve evaluation at boundary point.
nbv [Tue, 16 Jan 2018 13:03:01 +0000 (16:03 +0300)]
0029430: [Regression] Curve evaluation at boundary point.

Before the fix, BRepAdaptor_CompCurve considered the input wire to be periodic with period LastParameter()-FirstParameter().
Now, method IsPeriodic will always return FALSE because it is impossible to obtain correspondence between the members of BRepAdaptor_CompCurve class and its periodicity status.
New behavior has been documented in upgrade-guide.

6 years ago0029368: Incorrect intersection state of the intersection point of two 2d curves
msv [Mon, 11 Dec 2017 15:00:19 +0000 (18:00 +0300)]
0029368: Incorrect intersection state of the intersection point of two 2d curves

In the algorithm math_FunctionRoots, improve the case when it is needed to find the extremum of the function. Earlier, to solve this task the method of gold section was used. With the patch, firstly the algorithm tries to find zero value of the derivative function. In most cases it gives precise result. Secondly, the algorithm tries to find zero value of the function using the old approach. The algorithm chooses the best solution among two computed by different methods.

In the method PutStickPavesOnCurve of BOPAlgo_PaveFiller, forbid putting a vertex to the end of the curve if this end already has a vertex assigned to it. This allows getting rid of unwanted colliding of vertices.

In the method UpdatePaveBlocks of BOPAlgo_PaveFiller, make the check for micro edges more precise.

New category of tests "lowalgos" has been added. Tests for low level algorithms are to be put there. "2dinter" is a new group of tests in this category.

Introduction of the new key for "2dintersect" command, allowing printing the intersection state for each point.
It has the following syntax now:
"2dintersect curve1 [curve2] [-tol tol] [-state]"
Options:
-tol - allows changing the intersection tolerance (default value is 1.e-3);
-state - allows printing the intersection state for each point.

Correct the test case bugs/modalg_7/bug28274 to make proper checks of the result.

6 years ago0029385: OCAF - TDataStd_IntPackedMap lacks interface to set map as TColStd_PackedMap...
szy [Thu, 28 Dec 2017 13:53:41 +0000 (16:53 +0300)]
0029385: OCAF - TDataStd_IntPackedMap lacks interface to set map as TColStd_PackedMapOfInteger

Added method ChangeMap (const TColStd_PackedMapOfInteger& theMap).

6 years ago0029422: OCAF, old persistence - wrong implementation of writing a reference
abv [Thu, 11 Jan 2018 20:23:09 +0000 (23:23 +0300)]
0029422: OCAF, old persistence - wrong implementation of writing a reference

6 years ago0028211: Modeling Algorithms - Boolean fuse operation produces incorrect result
msv [Fri, 29 Dec 2017 14:44:42 +0000 (17:44 +0300)]
0028211: Modeling Algorithms - Boolean fuse operation produces incorrect result

Correct procedure of initialization of BRepTopAdaptor_FClass2d and IntTools_FClass2d classifiers so as to produce more tight polygon in the case of self-intersections on very thin faces.

The idea is concluded in checking the condition:
defl < 2 * S / P, where S - is the surface area computed on produced polygon, P - its perimeter, defl - deflection computed on it.
If the condition is not true the polygon is discretized again using QuasiUniformDeflection tool.

6 years ago0029419: Make V3d_Viewer::PrivilegedPlane() return const reference rather than a...
kgv [Fri, 12 Jan 2018 07:36:18 +0000 (10:36 +0300)]
0029419: Make V3d_Viewer::PrivilegedPlane() return const reference rather than a temp object

6 years ago0028681: UnifySameDomain distorts face boundary when merges a chain of small linear...
isn [Mon, 11 Sep 2017 13:53:31 +0000 (16:53 +0300)]
0028681: UnifySameDomain distorts face boundary when merges a chain of small linear edges

In case of sequence of edges based on lines (which are going to be unified into one line-segment), take into account a linear tolerance  value.
Get rid of regressions.
Updates of USD-tests.

6 years ago0029409: Configuration, macOS - "Appkit" is spelled in CMake scripts using wrong...
abv [Tue, 2 Jan 2018 11:03:16 +0000 (14:03 +0300)]
0029409: Configuration, macOS - "Appkit" is spelled in CMake scripts using wrong case for "K"

Spelling error is corrected in name of AppKit library in CMake and genproj scripts for macOS

6 years ago0028499: Checkshape incorrectly reports BRepCheck_NotClosed when gap is covered by...
ifv [Fri, 15 Dec 2017 07:23:29 +0000 (10:23 +0300)]
0028499: Checkshape incorrectly reports BRepCheck_NotClosed when gap is covered by vertex tolerance

Calculation of 2d tolerance is improved

6 years ago0029402: In OCCT7.2.1-dev the names written into a FSD_File are associated with the...
szy [Wed, 27 Dec 2017 14:28:54 +0000 (17:28 +0300)]
0029402: In OCCT7.2.1-dev the names written into a FSD_File are associated with the wrong shapes.

The issue of incorrect Roots indexing is fixed by changing DataMap to IndexedDataMap.
Draw command fsdread was improved to allow restoring of shapes with kept names.

6 years ago0029403: Data Exchange - subshapes names are not imported from step
ika [Tue, 26 Dec 2017 10:46:08 +0000 (13:46 +0300)]
0029403: Data Exchange - subshapes names are not imported from step

Fix processing of subshape names in STEP in reading and writing.
Replace creating subshapes in Document as tree (invalid) with plain subshapes structure.
Update test cases.

6 years ago0029358: Unifysamedomain is unable to merge faces with the same underlying surface
msv [Tue, 26 Dec 2017 09:14:32 +0000 (12:14 +0300)]
0029358: Unifysamedomain is unable to merge faces with the same underlying surface

The documentation has been updated to avoid misunderstanding of algorithm behavior.

6 years ago0029387: Incorrect result of cut a face with several shapes
emv [Thu, 21 Dec 2017 14:24:28 +0000 (17:24 +0300)]
0029387: Incorrect result of cut a face with several shapes

Remove section edges having no valid range.
Test case for the issue.

6 years ago0029371: The problem of the attributes constructor call
szy [Wed, 20 Dec 2017 09:20:29 +0000 (12:20 +0300)]
0029371: The problem of the attributes constructor call

Default Guid is assigned in constructor.
Add test case: tests\bugs\caf\bug29371.

6 years ago0029391: Invalid import of TrimmedSurface
skl [Thu, 21 Dec 2017 08:15:10 +0000 (11:15 +0300)]
0029391: Invalid import of TrimmedSurface

Fix and test for bug 29391.

6 years ago0029380: Delete "checknbshapes" from bugs/modalg_6/bug27341* test cases
msv [Mon, 25 Dec 2017 10:03:00 +0000 (13:03 +0300)]
0029380: Delete "checknbshapes" from bugs/modalg_6/bug27341* test cases

6 years ago0029400: Fuse of two edges creates self-interfered shape
emv [Mon, 25 Dec 2017 08:47:53 +0000 (11:47 +0300)]
0029400: Fuse of two edges creates self-interfered shape

Avoid creation of the edges with too small valid range (not allowing to split the edge) and interfering vertices.
Test case for the issue.

6 years ago0029396: Configuration, Cmake: restore 3rd-party libraries into INTERFACE_LINK_LIBRAR...
ski [Thu, 21 Dec 2017 12:37:53 +0000 (15:37 +0300)]
0029396: Configuration, Cmake: restore 3rd-party libraries into INTERFACE_LINK_LIBRARIES property of installed OCCT targets

Changes from branch CR29277 were reverted.

6 years ago0029398: Configuration - list lex and yacc files in the StepFile/FILES to avoid CMake...
bugmaster [Fri, 22 Dec 2017 07:31:15 +0000 (10:31 +0300)]
0029398: Configuration - list lex and yacc files in the StepFile/FILES to avoid CMake warnings

Adding step.lex and step.yacc to StepFile/FILES

6 years ago0029220: Application Framework - replace CDM_MessageDriver interface by Message_Messe...
szy [Wed, 13 Dec 2017 12:27:50 +0000 (15:27 +0300)]
0029220: Application Framework - replace CDM_MessageDriver interface by Message_Messenger.

6 years ago0029352: Adding support of GBK and Big5 code pages
anv [Tue, 28 Nov 2017 09:31:08 +0000 (12:31 +0300)]
0029352: Adding support of GBK and Big5 code pages

Added methods to convert GBK and Big5 encodings to Unicode

6 years ago0028248: [Regression] HLR Algo result is retrieved from the last added shape only
msv [Tue, 19 Dec 2017 13:01:06 +0000 (16:01 +0300)]
0028248: [Regression] HLR Algo result is retrieved from the last added shape only

Mistakes in retrieving of HLRBRep_EdgeData by value instead of reference have been corrected.

6 years ago0029393: Samples - AndroidQt sample build fail
kgv [Tue, 19 Dec 2017 11:00:10 +0000 (14:00 +0300)]
0029393: Samples - AndroidQt sample build fail

AndroidQt - dropped removed arguments within V3d_View::SetWindow() usage [0024776].
AndroidQt_Window - add missing NativeFBConfig() method declared in the interface [0026732].

6 years ago0028722: Conversion of a spherical face to a spline produces an invalid shape
ifv [Mon, 4 Dec 2017 13:20:19 +0000 (16:20 +0300)]
0028722: Conversion of a spherical face to a spline produces an invalid shape

Correction of 2d tolerance calculation for BSpline/Bezier surfaces
Test cases are corrected according to current behavior of algorithm

6 years ago0029362: Data Exchange - Crash during reading step file
ika [Mon, 4 Dec 2017 08:05:02 +0000 (11:05 +0300)]
0029362: Data Exchange - Crash during reading step file

Additional check for wires into searching of attached shapes,
Fix Dimension value processing,

6 years ago0029377: Configuration, CMake - linkage errors while using static OCCT libraries...
kgv [Fri, 8 Dec 2017 12:13:14 +0000 (15:13 +0300)]
0029377: Configuration, CMake - linkage errors while using static OCCT libraries on Windows platform

HAVE_NO_DLL is now defined when building Static libraries.

6 years ago0029376: Coding Rules, TColStd_PackedMapOfInteger - declare Iterator as nested class...
kgv [Thu, 7 Dec 2017 17:58:36 +0000 (20:58 +0300)]
0029376: Coding Rules, TColStd_PackedMapOfInteger - declare Iterator as nested class of map collection

6 years ago0029363: No history for shapes which were produced as a result of intersection
emv [Tue, 12 Dec 2017 12:10:37 +0000 (15:10 +0300)]
0029363: No history for shapes which were produced as a result of intersection

1. Implementation of the *Generated* method for the algorithms in Boolean Component.
In terms of these algorithms the shape from the arguments can have Generated shapes only if these new shapes have been obtained as a result of pure intersection (not overlapping) of this shape with any other shapes from arguments.
Thus, the Generated shapes are always:
* VERTICES created from the intersection points and may be Generated from edges and faces only;
* EDGES created from the intersection edges and may be Generated from faces only.

So, only EDGES and FACES could have information about Generated shapes. For all other types of shapes the list of Generated shapes will be empty.

2. Optimization and simplification of the Modified and IsDeleted methods based on the correct filling of the BOPAlgo_BuilderShape::myImagesResult map.

3. Provide history of unification of the solids in the CellsBuilder algorithm.

4. Update of the documentation of Boolean Operations User guide with new chapter "History Information" describing rules for filling history for operations in Boolean Component.

5. Test cases for the issue. New grid "history" has been added into "boolean" category.

6 years ago0029179: Result of Boolean common depends on an order of arguments
nbv [Thu, 7 Dec 2017 08:28:20 +0000 (11:28 +0300)]
0029179: Result of Boolean common depends on an order of arguments

Usage of Bnd_Box-filtering is eliminated while putting a (definitely) common vertex between two faces on the intersection curve.

Algorithm of putting not-common (ON/IN) vertices has not been changed.

6 years ago0029359: Approximation algorithm computes multidimensional distance in Euclidean...
nbv [Thu, 30 Nov 2017 10:44:48 +0000 (13:44 +0300)]
0029359: Approximation algorithm computes multidimensional distance in Euclidean space incorrectly

Wrong distance computation has been corrected.

Some test-cases have been corrected according to their new behavior. Namely, built (by approximation algorithm) curve(s) has changed its geometrical position.

1. tests/blend/simple/X4

It is not a regression because the result is not correct on both MASTER and FIX (see explanation in the issue #26740). This problem is expected to be solved after porting Fillet-algorithm to new Boolean operation. Old Boolean operations do not cover Edge-Edge tangent-zone by vertex.

2. tests/bugs/modalg_6/bug27341_318

"checknbshapes" has been deleted in order to avoid non-stable behavior (see issue #29360) of this test case. New result is OK on both Linux and Windows platform.

6 years ago0029351: Boolean Operations create invalid pcurves
emv [Tue, 5 Dec 2017 11:22:22 +0000 (14:22 +0300)]
0029351: Boolean Operations create invalid pcurves

When making pcurve for edge on face make sure that the produced 2D curve will have the same range as 3D curve of the edge.

6 years ago0026570: Crash on attempt to rotate a shape.
vro [Wed, 19 Aug 2015 07:25:11 +0000 (10:25 +0300)]
0026570: Crash on attempt to rotate a shape.

An extended draw-command trotate (ttranslate, tmirror, ...) by an additional parameter "-copy".
New check of edge range is added in BRepCheck/BRepCheck_Edge.cxx
The same checking is added in ShapeAnalysis_Edge.cxx
Fixing this problem is added in ShapeFix_Wire.cxx
GeomLib::SameRange(...) and BRepTools_TrsfModification::NewCurve2d(...) are modified to avoid exception in TrimmedCurve

6 years ago0029355: OCCT 6.9.1 persistence restored in OCCT 7.2.0 not working
abv [Sat, 2 Dec 2017 08:24:58 +0000 (11:24 +0300)]
0029355: OCCT 6.9.1 persistence restored in OCCT 7.2.0 not working

Auxiliary classes StdObjMgt_ReadData::Object and StdObjMgt_WriteData::Object are renamed to "ObjectSentry" (to better reflect their nature); constructor is made explicit to ensure that such objects are always created intentionally.
These objects are instantiated explicitly in the body of relevant functions, instead of implicit creation as temporary objects when function requires such object as argument.
Variable used to get char from stream is nullified in several places in FSD_File and other classes, to avoid possible usage of uninitialized memory in case if stream is bad.

6 years ago0029372: Graphic3d_TransformPers - improve description of Local Coordinate system...
kgv [Thu, 7 Dec 2017 07:57:26 +0000 (10:57 +0300)]
0029372: Graphic3d_TransformPers - improve description of Local Coordinate system defined by Transformation Persistence

6 years ago0029365: Visualization, TKOpenGl - do not include hidden structures to Rendered withi...
kgv [Mon, 4 Dec 2017 12:16:34 +0000 (15:16 +0300)]
0029365: Visualization, TKOpenGl - do not include hidden structures to Rendered within frame statistics

OpenGl_Layer::UpdateCulling() now considers structure as culled in case if it has Hidden state.

6 years ago0029312: Using OBB to speed up Boolean Operations
emv [Wed, 1 Nov 2017 08:30:30 +0000 (11:30 +0300)]
0029312: Using OBB to speed up Boolean Operations

1. Implementation of the user-defined option for usage of Oriented Bounding Boxes (OBB) in Boolean Operations for additional filtering (rejection) of selected for intersection pairs of sub-shapes.

By default the usage of OBB is turned off.
To enable/disable its usage the method SetUseOBB(flag) should be used. This method is available for all operations in Boolean Component.
To enable/disable it in draw the command "buseobb 0/1" should be used. Note, that this will affect all subsequent operations.

The OBB for the shapes are built by first necessity and stored into operation context (IntTools_Context).

2. Usage of the OBB in some test cases.

6 years ago0029311: Implementation of the Oriented Bounding Boxes (OBB) functionality
nbv [Wed, 8 Nov 2017 12:47:09 +0000 (15:47 +0300)]
0029311: Implementation of the Oriented Bounding Boxes (OBB) functionality

1. The class Bnd_OBB has been created to describe the Oriented Bounding Box.

2. Several key methods have been implemented: Bnd_OBB::IsOut(...), Bnd_OBB::Add(...) and Bnd_OBB::Enlarge(...).

3. Interface of Bnd_Box class has changed. New methods have been created. See Bnd_Box.hxx for detailed information.

4. BRepBndLib and Draw_Box classes have been amended in order to provide correct work with Bnd_OBB class.

5. Interface of "bounding" DRAW-command has been changed. Please see help for detailed information.

6. New DRAW-command "isbbinterf" has been created. Please see help for detailed information.

7. "boundingstr" and "optbounding" DRAW-commands have been eliminated because their function can be made by "bounding" DRAW-command (e.g. see tests/bugs/vis/buc60857 or samples/tcl/snowflake.tcl test cases).

8. Documentation has been updated.

6 years ago0029366: Visualization, OpenGl_Text - artifacts when using Aspect_TODT_SHADOW/Aspect_...
kgv [Mon, 4 Dec 2017 13:29:43 +0000 (16:29 +0300)]
0029366: Visualization, OpenGl_Text - artifacts when using Aspect_TODT_SHADOW/Aspect_TODT_DEKALE at different zoom level

OpenGl_Text now applies Polygon Offset instead of Z-shift in world coordinates for drawing background.
OpenGl_Context::SetPolygonOffset() - polygon offset state has been moved from OpenGl_Workspace to OpenGl_Context.

6 years ago0029323: Intersection algorithm produces the curve with oscillation
nbv [Mon, 13 Nov 2017 10:55:48 +0000 (13:55 +0300)]
0029323: Intersection algorithm produces the curve with oscillation

Sometimes the algorithm of purging of extra points in the walking line makes enormous difference in distance between two neighbor segments of the line. This badly impacts the quality of approximation result. This patch balances the difference in distances by forbidding deletion of some points.

1. tests/bugs/modalg_6/bug27615

The reason of the correction is explained in the message ~0072580 (see issue #28557).

2. tests/bugs/modalg_7/bug28892*
   tests/bugs/modalg_7/bug28984

The reason of the correction is explained in the message ~0072583 (see issue #28984).

6 years ago0029344: Foundation Classes, TCollection_AsciiString - replace confusing strncpy...
kgv [Fri, 24 Nov 2017 15:37:01 +0000 (18:37 +0300)]
0029344: Foundation Classes, TCollection_AsciiString - replace confusing strncpy with memcpy

strncpy() usage within TCollection_AsciiString has been replaced by memcpy()
where string length has been already determined.

TCollection_AsciiString::SetValue() now throws exception
on attempt to set '\0' - TCollection_AsciiString::Trunc() should be used instead.
TCollection_AsciiString(const char* , int ) has been modified to properly set string length
in case of NULL-terminator appeared earlier then specified length.

Interface_LineBuffer has been revised for using NCollection_Array1 instead of TCollection_AsciiString
to avoid misusing TCollection_AsciiString interface.

6 years ago0029346: Visualization, TKOpenGl - collect frame statistics
kgv [Fri, 24 Nov 2017 15:43:01 +0000 (18:43 +0300)]
0029346: Visualization, TKOpenGl - collect frame statistics

Graphic3d_RenderingParams::ToShowStats - new option displaying rendering statistics.

OpenGl_FrameStats - new class for accumulating frame statistics.
OpenGl_Context::FrameStats() provides an access to the frame stats
used for currently rendered context.
OpenGl_View::Redraw() and OpenGl_View::RedrawImmediate()
resets counters within OpenGl_Context::FrameStats().

OpenGl_Layer::UpdateCulling() - simplified resetting of culling state for cullable structures.

6 years ago0029353: Optimization of TPrsStd_AISPresentation::SetSelectionMode()
vro [Wed, 29 Nov 2017 13:36:21 +0000 (16:36 +0300)]
0029353: Optimization of TPrsStd_AISPresentation::SetSelectionMode()

6 years ago0029290: Visualization, TKOpenGl - allow defining Light source per ZLayer
kgv [Thu, 2 Nov 2017 12:36:20 +0000 (15:36 +0300)]
0029290: Visualization, TKOpenGl - allow defining Light source per ZLayer

Graphic3d_CLight is now defined as a class inheriting Standard_Transient,
so that it's fields now should be accessed through methods.
Graphic3d_CLight::IsEnabled() - new property allowing to disable light source everywhere.
Confusing alias OpenGl_Light has been removed.

Graphic3d_CLight::SetAttenuation() - the upper limit 1.0 of attenuation factors has been removed
since it contradicts to OpenGL specs and does not make sense.

Graphic3d_ZLayerSettings::Lights() - light sources list is now property of ZLayer.
When defined, it overrides light sources defined for View/Viewer.
New class Graphic3d_LightSet has been defined to define a set of light sources.

V3d_Light - removed obsolete interface for debug drawing lights sources.
V3d_Light is now an alias to Graphic3d_CLight.
V3d_TypeOfLight is now defined as a typedef to Graphic3d_TypeOfLightSource.

6 years ago0029350: Visualization, OpenGl_Text - add Aspect_TODT_SHADOW text style
kgv [Tue, 28 Nov 2017 06:46:42 +0000 (09:46 +0300)]
0029350: Visualization, OpenGl_Text - add Aspect_TODT_SHADOW text style

Within new style Aspect_TODT_SHADOW, a tiny shadow is drawn at right-bottom corner
with one pixel shift, producing a slightly nicer visual look than Aspect_TODT_DEKALE.

6 years ago0029331: Visualization, TKOpenGl - make OpenGl_PrimitiveArray::IsFillDrawMode() as...
kgv [Thu, 16 Nov 2017 19:57:48 +0000 (22:57 +0300)]
0029331: Visualization, TKOpenGl - make OpenGl_PrimitiveArray::IsFillDrawMode() as virtual method of OpenGl_Element

6 years ago0028416: Visualization - SelectMgr_SelectionManager::Activate() should not implicitly...
kgv [Tue, 31 Jan 2017 08:26:48 +0000 (11:26 +0300)]
0028416: Visualization - SelectMgr_SelectionManager::Activate() should not implicitly deactivate Global Selection Mode

Implicit deactivation of global selection mode has been removed from SelectMgr_SelectionManager::Activate().

Added new method AIS_InteractiveContext::SetSelectionModeActive() as replacement
of AIS_InteractiveContext::Activate() / ::Deactivate().
New method takes an argument AIS_SelectionModesConcurrency which defines
what to do with already activated selection modes in 3 ways:
- AIS_SelectionModesConcurrency_Single, only one selection mode can be activated at
  the same moment - previously activated should be deactivated
- AIS_SelectionModesConcurrency_GlobalOrLocal, either Global (AIS_InteractiveObject::GlobalSelectionMode()
  or Local (multiple) selection modes can be active at the same moment
- AIS_SelectionModesConcurrency_Multiple, any combination of selection modes can be activated.

6 years ago0029333: Boolean Operations - Prevent modification of the input shapes in case their...
emv [Fri, 17 Nov 2017 13:27:36 +0000 (16:27 +0300)]
0029333: Boolean Operations - Prevent modification of the input shapes in case their sub-shapes have not been modified

Prevent modification of the input shapes in destructive mode in case their sub-shapes have not been modified:
1. Prevent edge splitting for the pave blocks with old vertices if it is possible to use the existing edge (*BOPAlgo_PaveFiller::MakeSplitEdges*);
2. Prevent creation of the new containers (WIRES/SHELLS/COMPSOLIDS) if non of its parts have been modified (*BOPAlgo_Builder::FillImagesContainer*);
3. Prevent creation of the new face if non of its wires have been modified (*BOPAlgo_Builder::FillImagesFaces*);
4. If possible, use the original face to be the representative for the group of SD faces (*BOPAlgo_Builder::FillSameDomainFaces*).

Cosmetic changes:
1. Documentation of the *BOPAlgo_Builder* class.
2. Making simple methods of the *BOPAlgo_Builder* class inline.
3. Getting rid of the *BOPAlgo_Builder::mySplits* field as it is excessive. *BOPAlgo_Builder::myImages* can be used instead.
3. Moving the Check Inverted option from *BOPAlgo_Options* to *BOPAlgo_Builder*.

Test cases for the issue.
Adjustment of the test case to their current behavior.
Test case *blend/complex/H2* has been deleted as duplicate of the test case *blend/simple/Z1*.

6 years ago0025609: Clean up the duplicate classes in TKBO project
emv [Thu, 23 Nov 2017 07:57:25 +0000 (10:57 +0300)]
0025609: Clean up the duplicate classes in TKBO project

1. The package BOPCol has been fully removed:
- *BOPCol_BaseAllocator* is replaced with *Handle(NCollection_BaseAllocator)*;
- *BOPCol_BoxBndTree* is replaced with *BOPTools_BoxBndTree*;
- *BOPCol_Box2DBndTree* is removed as unused;
- *BOPCol_DataMapOfIntegerInteger* is replaced with *TColStd_DataMapOfIntegerInteger*;
- *BOPCol_DataMapOfIntegerListOfInteger* is replaced with *TColStd_DataMapOfIntegerListOfInteger*;
- *BOPCol_DataMapOfIntegerListOfShape* is replaced with *TopTools_DataMapOfIntegerListOfShape*;
- *BOPCol_DataMapOfIntegerMapOfInteger.hxx* is removed as unused;
- *BOPCol_DataMapOfIntegerReal* is replaced with *TColStd_DataMapOfIntegerReal*;
- *BOPCol_DataMapOfIntegerShape* is replaced with *TopTools_DataMapOfIntegerShape*;
- *BOPCol_DataMapOfShapeBox* is replaced with *TopTools_DataMapOfShapeBox*;
- *BOPCol_DataMapOfShapeInteger* is replaced with *TopTools_DataMapOfShapeInteger*;
- *BOPCol_DataMapOfShapeListOfShape* is replaced with *TopTools_DataMapOfShapeListOfShape*;
- *BOPCol_DataMapOfShapeReal* is replaced with *TopTools_DataMapOfShapeReal*;
- *BOPCol_DataMapOfShapeShape* is replaced with *TopTools_DataMapOfShapeShape*;
- *BOPCol_DataMapOfTransientAddress* is removed as unused;
- *BOPCol_IndexedDataMapOfIntegerListOfInteger* is removed as unused;
- *BOPCol_IndexedDataMapOfShapeBox* is removed as unused;
- *BOPCol_IndexedDataMapOfShapeInteger* is removed as unused;
- *BOPCol_IndexedDataMapOfShapeListOfShape* is replaced with *TopTools_IndexedDataMapOfShapeListOfShape*;
- *BOPCol_IndexedDataMapOfShapeReal* is removed as unused;
- *BOPCol_IndexedDataMapOfShapeShape* is replaced with *TopTools_IndexedDataMapOfShapeShape*;
- *BOPCol_IndexedMapOfInteger* is replaced with *TColStd_IndexedMapOfInteger*;
- *BOPCol_IndexedMapOfOrientedShape* is replaced with *TopTools_IndexedMapOfOrientedShape*;
- *BOPCol_IndexedMapOfShape* is replaced with *TopTools_IndexedMapOfShape*;
- *BOPCol_ListOfInteger* is replaced with *TColStd_ListOfInteger*;
- *BOPCol_ListOfListOfShape* is replaced with *TopTools_ListOfListOfShape*;
- *BOPCol_ListOfShape* is replaced with *TopTools_ListOfShape*;
- *BOPCol_MapOfInteger* is replaced with *TColStd_MapOfInteger*;
- *BOPCol_MapOfOrientedShape* is replaced with *TopTools_MapOfOrientedShape*;
- *BOPCol_MapOfShape* is replaced with *TopTools_MapOfShape*;
- *BOPCol_PListOfInteger* is removed as unused;
- *BOPCol_PInteger* is removed as unused
- *BOPCol_SequenceOfPnt2d* is replaced with *TColgp_SequenceOfPnt2d*;
- *BOPCol_SequenceOfReal* is replaced with *TColStd_SequenceOfReal*;
- *BOPCol_SequenceOfShape* is replaced with *TopTools_SequenceOfShape*;
- *BOPCol_Parallel* is replaced with *BOPTools_Parallel*;
- *BOPCol_NCVector* is replaced with *NCollection_Vector*;

2. The class *BOPDS_PassKey* and containers for it have been removed as unused;

3. The unused containers from *IntTools* package have been removed:
- *IntTools_DataMapOfShapeAddress* is removed as unused;
- *IntTools_IndexedDataMapOfTransientAddress* is removed as unused;

4. The container *BiTgte_DataMapOfShapeBox* is replaced with *TopTools_DataMapOfShapeBox*;

5. The class *BOPTools* has been removed as duplicate of the class *TopExp*;

6 years ago0029349: Foundation Classes, OSD_Timer - add missing theThisThreadOnly constructor...
kgv [Tue, 28 Nov 2017 05:42:40 +0000 (08:42 +0300)]
0029349: Foundation Classes, OSD_Timer - add missing theThisThreadOnly constructor option available in OSD_Chronometer

OSD_Timer constructor now has theThisThreadOnly option passed to OSD_Chronometer,
which is FALSE by default.

OSD_Chronometer now provides methods ::UserTimeCPU(), ::SystemTimeCPU() allowing
to fetch CPU times without akward syntax through overloaded ::Show().

6 years ago0029289: Wrong derivatives in math_TrigonometricFunctionRoots.cxx file
ifv [Thu, 9 Nov 2017 14:20:10 +0000 (17:20 +0300)]
0029289: Wrong derivatives in math_TrigonometricFunctionRoots.cxx file

Class MyTrigoFunction is removed from file math_TrigonometricFunctionRoots.cxx.
New class math_TrigonometricEquationFunction with the same functionality is created to provide possibilities
for individual testing.
Expressions for derivatives are corrected.
New Draw command "intconcon" for intersection 2d conic curves is created.
Test command OCC29289 (file QABugs_20.cxx) is created for individual testing math_TrigonometricEquationFunction.
It is used in tests/bugs/modalg_7/bug29289

6 years ago0029338: Data Exchange - Add Planes for Tolerance zones in Geometric tolerances
ika [Thu, 23 Nov 2017 09:40:59 +0000 (12:40 +0300)]
0029338: Data Exchange - Add Planes for Tolerance zones in Geometric tolerances

Add new poles to Geometric Tolerance objects
Some code refactoring in GDT attributes
Add Draw functions for affected plane

6 years agoUpdate of tests database
mkv [Thu, 26 Oct 2017 08:59:25 +0000 (11:59 +0300)]
Update of tests database

Test for 0023171: Got wrong result after stitching
Test for 0023612: BRepPrimAPI_MakeTorus
Test for 0023610: checkshape command does not detect mismatch of the tolerance values among the sub-shapes of the shape
Test for 0023660: 'bsection' produces result with gap
Test for 0024397: BRepBuilderAPI_Copy works not correct
Test for 0023927: BRepProj_Projection produces Edge with one Vertex outside from curve
Test for 0023902: Cannot build fillet
Test for 0023669: Error in Boolean operations algorithm: section between cylindrical face and prism is incomplete
Test for 0023660: 'bsection' produces result with gap
Test for 0024100: Bad pcurve is built on a face while converting the shape from STEP format.
Test for 0024319: Sewing makes a solid transparent
Test for 0024302: Section operation modifies input argument
Test for 0024397: BRepBuilderAPI_Copy works not correct
Test for 0024418: Wrong section curves when intersecting analytical surfaces

6 years ago0029142: Exception on Redo.
szy [Mon, 20 Nov 2017 14:31:15 +0000 (17:31 +0300)]
0029142: Exception on Redo.

Order of attributes deltas is fixed.

6 years ago0029175: BRepOffsetAPI_MakeOffset problem
emv [Wed, 22 Nov 2017 13:29:40 +0000 (16:29 +0300)]
0029175: BRepOffsetAPI_MakeOffset problem

The problem is fixed by the fix for the issue #29162.
Creating test case for the issue.

6 years ago0029321: Improve performance of the 3D offset algorithm for the planar cases
emv [Mon, 13 Nov 2017 13:03:31 +0000 (16:03 +0300)]
0029321: Improve performance of the 3D offset algorithm for the planar cases

Disable additional intersection of the splits of offset faces implemented in method BRepOffset_MakeOffset::Intersection3D() for the mode "Complete" and join type "Intersection".
This method is insufficient, as it does not allow to detect the tangential faces, necessary for this mode.
Intersection is performed in the method BuildShellsCompleteInter() developed for this mode.

6 years ago0029322: Unify faces classification procedures in Boolean Operations
emv [Mon, 13 Nov 2017 08:11:27 +0000 (11:11 +0300)]
0029322: Unify faces classification procedures in Boolean Operations

1. Unify the faces classification procedure of the methods BOPAlgo_BuilderSolid::PerformInternalShapes() and BOPAlgo_Builder::FillIn3DParts() using the latter as a base.
The new method BOPAlgo_Tools::ClassifyFaces() has been created for that. Both methods mentioned above have been updated to use the new one.

2. Forced intersection of the edges after enlarge of the tolerance values of their vertices during the operation has been added into BOP's intersection algorithm (BOPAlgo_PaveFiller).
BOPAlgo_Tools::PerformCommonBlocks() method has been updated to avoid loosing faces of the already created Common blocks.

As a result the case "boolean gdml_private ZF6" became more stable, because the intermediate result is no longer invalid.
Additional test cases have been added to verify this improvement (bugs modalg_7 bug29322_*)

3. When building PCurves for edges on faces, check the existing PCurves on its validity for periodic surfaces and adjust PCurves if necessary.
The improvement helps to produce the valid result in the test case "bugs moddata_1 bug152".

4. Avoid creation of empty Edge-Edge interference if the intersection point is lying close to a shared vertex.
The improvement helps obtain the valid result of the "bopcheck" operation in the test case "bugs modalg_7 bug27683".

Adjustment of the test case to current behavior:
- Avoid usage of the self-intersecting torus in the test case "boolean gdml_public A9".
- Fix the input shape in the test case "boolean bopfuse_complex H1" to provide valid result.
- Test cases "bugs moddata_1 bug152_1 bug152_2" have been unified into single test case "bugs moddata_1 bug152". Now, the case rebuilds invalid input data and performs all types of Boolean operations.
- Change the test case "bugs modalg_7 bug22750" to produce valid intermediate results used in subsequent operations as arguments.
- The following test cases are improvements:
- "boolean volumemaker D8"
- "boolean volumemaker G1"
- "bugs modalg_7 bug27683"

6 years ago0025879: result of blend fails the bopcheck
aml [Fri, 10 Nov 2017 15:21:21 +0000 (18:21 +0300)]
0025879: result of blend fails the bopcheck

Protection from the zero-length gp_Dir construction is added.

6 years ago0029113: Coding Rules - fix convention to have one header per API type
abv [Fri, 15 Sep 2017 07:52:14 +0000 (10:52 +0300)]
0029113: Coding Rules - fix convention to have one header per API type

Paragraph on naming of classes is revised to describe correspondence of names of public types and files.

6 years ago0029234: BRepOffsetAPI_NormalProjection produces INTERNAL edges and vertices
msv [Fri, 20 Oct 2017 15:59:01 +0000 (18:59 +0300)]
0029234: BRepOffsetAPI_NormalProjection produces INTERNAL edges and vertices

Make the algorithm BRepOffsetAPI_NormalProjection use section operation instead of common to get the edge-result of projection to be in face restrictions.

Correct Boolean operation algorithm to produce correctly oriented result in the case of common between face and edge.

The algorithm ShapeUpgrade_UnifySameDomain has been patched to correctly gather same domain faces in a compound.

The TCL script snowflake.tcl has been corrected to get rid of dependence on the order of edges in the result of Boolean operation.

6 years ago0029317: Configuration, CMake - CSF_d3d9 should be processed for building TKD3DHost...
kgv [Tue, 14 Nov 2017 08:38:31 +0000 (11:38 +0300)]
0029317: Configuration, CMake - CSF_d3d9 should be processed for building TKD3DHost using MinGW

6 years ago0029287: Move package GProp from TKG2d to TKG3d
msv [Wed, 8 Nov 2017 15:13:47 +0000 (18:13 +0300)]
0029287: Move package GProp from TKG2d to TKG3d

6 years ago0029204: BRepOffsetAPI_MakePipeShell produces invalid result and raises exception...
jgv [Wed, 18 Oct 2017 14:35:58 +0000 (17:35 +0300)]
0029204: BRepOffsetAPI_MakePipeShell produces invalid result and raises exception in Draw

1.The algorithm searching the section in the corner (ChooseSection) is modified to be able to find simple cases with rather big tolerance.

2. The constructor of BRepFill_Section is modified: now it removes locations in the shape of section like it was done in BRepFill_Pipe.

3. Correction of U-edges by Same Parameter has been added to the method BRepFill_Sweep::Build.

6 years ago0025968: boolean returning an invalid shape
aml [Sat, 11 Nov 2017 07:33:45 +0000 (10:33 +0300)]
0025968: boolean returning an invalid shape

Problem is not reproduced on current master.
Testing case was created

6 years ago0029301: Improve performance of Boolean Operations
emv [Wed, 8 Nov 2017 06:16:35 +0000 (09:16 +0300)]
0029301: Improve performance of Boolean Operations

Improve performance of Boolean operations algorithm by:
- Improving the check of Same Domain faces (BOPAlgo_Builder::FillSameDomainFaces());
- Faster rejection of outer faces for solids using Bounding Box classification first (BOPAlgo_Builder::FillIn3DParts());
- Using IncAllocator for local containers.

Quality improvement has been made in BOPAlgo_PaveFiller class:
1. Method IsExistingPaveBlock() has been corrected to provide the correct edge tolerance and to obtain valid intermediate results in the test case "boolean gdml_private ZH3".
   New test case have been added to verify this improvement (bugs modalg_7 bug29301).
2. Method PutClosingPaveOnCurve() has been corrected to use the tolerance of the pave put on the bound for checking curve on closeness.
   Additional check for the curve to have valid range after addition of the pave on the other end has been added to prevent considering the small curves (covered by vertex tolerance) as closed ones.
   As a result of this modification the test case boolean gdml_public B2 has been fixed (TODO removed).

Adjustment of the test cases to current behavior:
- boolean bopcommon_complex J1 - the produced result was incorrect as it was self-interfered. There should be no common in this case.
- offset shape_type_i_c ZZ1 - the incorrect result is now produced instead of null shape.

6 years ago0025966: Booleans with tangent faces
aml [Sat, 11 Nov 2017 07:44:41 +0000 (10:44 +0300)]
0025966: Booleans with tangent faces

Problem is not reproduced on current master.
Testing case was created

6 years ago0025104: Prism from BSpline curve can not be chamfered
aml [Thu, 2 Nov 2017 09:08:18 +0000 (12:08 +0300)]
0025104: Prism from BSpline curve can not be chamfered

Protection from zero-length vectors has been added.

6 years ago0028467: Improve UnifySameDomain performance
msv [Fri, 17 Feb 2017 08:26:25 +0000 (11:26 +0300)]
0028467: Improve UnifySameDomain performance

This patch turns off some not needed modes of fix in the called ShapeFix_Face algorithm.

It stores pcurves on planes in the edges to avoid repeated computation of the same pcurves many times (it is done only when SafeInputMode is false).

It avoids unnecessary replace/apply actions in the modification context.

It removes the code that makes decomposition of surface of the face on several faces.

The new command buildpcurvesonplane has been added, which builds and stores pcurves of edges on planar faces. This is useful for investigations how presence of pcurves on planes influence performance of algorithms.

Make drawing of dimension line in snowflake test independent on the order of vertices in the result.

6 years ago0028760: Visualization, TKOpenGl - avoid excessive frustum culling traverse within...
kgv [Wed, 8 Nov 2017 06:44:27 +0000 (09:44 +0300)]
0028760: Visualization, TKOpenGl - avoid excessive frustum culling traverse within extra OIT rendering pass

Culling traverse is no more called implicitly within OpenGl_Layer::Render().
Instead, all layers are traversed at onces within OpenGl_View::render() beforehand.

OpenGl_BVHTreeSelector methods have been renamed to better reflect their meaning.
Non-persistent culling options has been moved to dedicated structure OpenGl_BVHTreeSelector::CullingContext
so that OpenGl_BVHTreeSelector instance can be used for different Layers without modifying its state.

6 years ago0029283: Visualization - allow defining more than 8 light sources
kgv [Tue, 31 Oct 2017 17:02:13 +0000 (20:02 +0300)]
0029283: Visualization - allow defining more than 8 light sources

OpenGl_ShaderManager now overrides THE_MAX_LIGHTS within built-in shading programs
so that maximum number of lights is now limited only by OpenGL hardware
(e.g. length of GLSL program, number of defined uniforms, result performance, etc.).
THE_MAX_CLIP_PLANES is now also defined by OpenGl_ShaderManager,
so that unused lights and clipping planes do not reserve extra uniforms in GLSL programs.

V3d_View::SetLightOn() does not throw exception anymore, when the number of lights exceeds 8.
Instead, OpenGl_ShaderManager::PushLightSourceState() emits warning
in case of usage of FFP providing consistent behavior with Clipping Planes number limit.

6 years ago0029304: Draw Harness, DBRep_DrawableShape - fix inappropriate use of unordered map
kgv [Thu, 9 Nov 2017 07:18:49 +0000 (10:18 +0300)]
0029304: Draw Harness, DBRep_DrawableShape - fix inappropriate use of unordered map

TColStd_DataMapOfIntegerInteger has been replaced by NCollection_Vector.

6 years ago0029299: Foundation Classes, NCollection - define explicit empty constructor for...
kgv [Tue, 7 Nov 2017 14:23:29 +0000 (17:23 +0300)]
0029299: Foundation Classes, NCollection - define explicit empty constructor for map classes

Ambiguous constructors have been marked with explicit keyword for classes
NCollection_DataMap, NCollection_DoubleMap, NCollection_IndexedDataMap, NCollection_IndexedMap,
NCollection_List, NCollection_LocalArray, NCollection_Map, NCollection_Sequence,
NCollection_SparseArray, NCollection_UBTree,

6 years ago0029302: Foundation Classes, NCollection - optimize iteration of indexed maps
kgv [Wed, 8 Nov 2017 12:25:51 +0000 (15:25 +0300)]
0029302: Foundation Classes, NCollection - optimize iteration of indexed maps

NCollection_IndexedMap and NCollection_IndexedDataMap
now access Key by Index number without computing Hash code.
IndexedMapNode::myNext2 and IndexedDataMapNode::myNext2 fields
have been removed, so that indexed map now may utilize less memory.

TCollection::NextPrimeForMap() has been extended upto 2038431745
(almost full signed 32-bit integer range),
and NCollection_BaseMap::mySaturated property has been removed.

NCollection_IndexedDataMap::RemoveFromIndex(), FindKey(), FindFromIndex(),
ChangeFromIndex() - removed duplicating checks for out of range input.

6 years ago0029300: Visualization, TKOpenGl - provide depth pre-pass option
kgv [Tue, 7 Nov 2017 21:11:57 +0000 (00:11 +0300)]
0029300: Visualization, TKOpenGl - provide depth pre-pass option

OpenGl_LayerList::Render() now handles new option Graphic3d_RenderingParams::ToEnableDepthPrepass
which prepends additional pass to rendering pipeline filling Depth Buffer in advance.

6 years ago0029292: Coding Rules - remove Graphic3d_Vector duplicating gp_XYZ
kgv [Thu, 2 Nov 2017 13:29:17 +0000 (16:29 +0300)]
0029292: Coding Rules - remove Graphic3d_Vector duplicating gp_XYZ

Graphic3d_Vector has been replaced by gp_Pnt/gp_XYZ/gp_Dir depending on context.
StdSelect_ViewerSelector3d::ToPixMap() - fixed unsafe float math causing out-of-range color results.

6 years ago0029162: Geom2dInt_GInter algorithm does not find intersection of ellipse and line
ifv [Thu, 12 Oct 2017 13:54:35 +0000 (16:54 +0300)]
0029162: Geom2dInt_GInter algorithm does not find intersection of ellipse and line

Analytical intersection algorithm is implemented for ellipse-line intersection

6 years ago0029297: [Regression] Configuration - Mingw-w64 build fails for TKOpenGl due to missi...
abv [Mon, 6 Nov 2017 13:43:34 +0000 (16:43 +0300)]
0029297: [Regression] Configuration - Mingw-w64 build fails for TKOpenGl due to missing link to OpenGl

The order of external libraries is corrected in TKOpenGl/EXTERNLIB so that more higher-level libs are mentioned earlier than low-level libs on which the former depend (e.g. Gl2Ps before OpenGl) to ensure that GCC linker is able to resolve dependencies.

6 years ago0029258: Foundation Classes - provide move constructors for string classes
kgv [Sun, 15 Oct 2017 13:08:01 +0000 (16:08 +0300)]
0029258: Foundation Classes - provide move constructors for string classes

New macro OCCT_NO_RVALUE_REFERENCE is introduced to disable methods using move semantics on obsolete compilers that do not support rvalue references.

TCollection_AsciiString, TCollection_ExtendedString, NCollection_UtfString - added method Swap(), move constructor, and move assignment operator.

Draw command QATestArrayMove is added to test for memory corruption if NCollection_Array1<> bound to local C buffer is returned from function by value.

6 years ago0029295: Visualization, TKOpenGl - provide distance culling option
kgv [Sun, 5 Nov 2017 15:07:25 +0000 (18:07 +0300)]
0029295: Visualization, TKOpenGl - provide distance culling option

Graphic3d_ZLayerSettings::CullingDistance() and ::CullingSize() - added
new properties configuring culling of small and distant objects, disabled by default.
OpenGl_BVHTreeSelector now handles size culling and distance culling in addition to frustom culling.

6 years ago0029285: Visualization, V3d_View::UpdateLights() - eliminate implicit redraw
kgv [Thu, 2 Nov 2017 07:04:39 +0000 (10:04 +0300)]
0029285: Visualization, V3d_View::UpdateLights() - eliminate implicit redraw

6 years ago0029286: Visualization, TKOpenGl - do not update FFP state when OpenGl_Caps::ffpEnabl...
kgv [Thu, 2 Nov 2017 07:28:01 +0000 (10:28 +0300)]
0029286: Visualization, TKOpenGl - do not update FFP state when OpenGl_Caps::ffpEnable is disabled

6 years ago0029293: Boolean Operations algorithm does not preserve the orientations of the faces
emv [Fri, 3 Nov 2017 09:12:34 +0000 (12:12 +0300)]
0029293: Boolean Operations algorithm does not preserve the orientations of the faces

While building splits of faces (BOPAlgo_Builder::FillImagesFaces()) make sure that the orientation of the input face will be passed to its splits.

Extend draw command "normals" with new key "[-print]" which allows printing values of the normal vector.

6 years ago0029133: Unstable test cases
mnt [Wed, 18 Oct 2017 11:13:35 +0000 (14:13 +0300)]
0029133: Unstable test cases

Adding new and early removed for some reasons test cases

Removing TODO ?

Adding necessary TODO ? on corresponding platforms for OK and BAD cases

6 years ago0029282: Data Exchange - UpdateAssemblies is not working for located root assemblies
ika [Mon, 30 Oct 2017 15:04:12 +0000 (18:04 +0300)]
0029282: Data Exchange - UpdateAssemblies is not working for located root assemblies

Add check for located root assemblies.

6 years ago0029237: Improve performance of Boolean Operations
emv [Wed, 18 Oct 2017 08:05:24 +0000 (11:05 +0300)]
0029237: Improve performance of Boolean Operations

In order to improve performance of Boolean Operations on the relatively fast cases the following improvements have been made:
1. Initialization of the FaceInfo information for the faces participating in Face/Face interference, even when the gluing is ON, to take into account intersection of their sub-shapes.
2. Code simplification & duplication removal - the methods BOPAlgo_ShellSplitter::MakeConnexityBlocks and BOPAlgo_WireSplitter::MakeConnexityBlocks have been unified into BOPTools_AlgoTools::MakeConnexityBlocks.
3. Avoid unnecessary bounding box computation for solids during DS initialization. The bounding boxes for solids will be computed during the building stage to find faces located inside solids.
   For the shape self-interference check (performed by the BOPAlgo_CheckerSI), the bounding box is still computed, as it is necessary to resolve Shape/Solid intersections.
4. Use only three sample points to check coincidence of line and plane.
5. Perform necessity of planes intersection only when the gluing is off.
6. Avoid repeated initialization of 2D classifier while building splits of the faces.
7. Post treat stage:
7.1. Method CorrectWires: Save edge's data (PCurve, parameter of the vertex, range) to avoid its recalculation.
7.2. Method CheckEdge: While checking vertices on edges avoid unnecessary calculation of their location.
8. Provide possibility to disable the classification of the input solids on the inverted status (to be the holes in the space).
9. Avoid building of bounding boxes for faces/solids during splitting of the input arguments for their classification relatively hole faces/shells if there are no holes created.
10. Avoid rebuilding of the faces/solids from arguments which does not acquire any inside parts from other arguments during the operation by using their draft versions as their splits.

Test cases for the issue.
Correction of the test cases boolean gdml_public A9 and bugs modalg_7 bug28485 as they are improvements.
Additional test case for the issue #28485 as it is fixed by the current changes.

6 years ago0027784: Thickness fails on cylinder with draft
aml [Tue, 31 Oct 2017 03:43:57 +0000 (06:43 +0300)]
0027784: Thickness fails on cylinder with draft

Incorrect calculation of intersection in 2D space is fixed.

6 years ago0029277: Configuration, Cmake - remove 3rd-party libraries from INTERFACE_LINK_LIBRAR...
ski [Tue, 31 Oct 2017 09:07:18 +0000 (12:07 +0300)]
0029277: Configuration, Cmake - remove 3rd-party libraries from INTERFACE_LINK_LIBRARIES property of installed OCCT targets

3rd-party libraries were removed from INTERFACE_LINK_LIBRARIES properties of OCCT targets.