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.
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.
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.
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.
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.
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,
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.
OpenGl_LayerList::Render() now handles new option Graphic3d_RenderingParams::ToEnableDepthPrepass
which prepends additional pass to rendering pipeline filling Depth Buffer in advance.
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.
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.
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.
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.
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.
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.
AIS_InteractiveContext::Load() now loads the object regardless specified selection mode and decomposition flag.
AIS_InteractiveContext::Load() and ::KeepTemporary() now register object in the Viewer
in the same way as ::Display() does.
Draw Harness command vdisplay has been extended with new flag -erased to load object into context in erased state.
Standard_CLocaleSentry does not include xlocale.h when using glibc anymore.
HAVE_XLOCALE_H has been renamed to OCCT_CLOCALE_POSIX2008 to avoid confusion.
Renamed macros OCC_CHECK_BASE_CLASS -> OCCT_CHECK_BASE_CLASS.
NCollection_UtfString and NCollection_UtfIterator classes are refactored to use methods overloading instead of switches to dispatch implementation depending on character (Unicode code unit) size.
ICC-specific preprocessor directives are added to avoid warnings.
Unused local functions and variables, class methods, unreachable statements, and extra throw() declarations reported by ICC are removed.
Usage of "expl" for name of local variable is avoided as it conflicts with standard C function "expl" defined in math.h as preprocessor macro.
Non-standard (MS-specific) argument envp is removed in definition of main() function on Windows.
Functions _main_ and _WinMain_ are renamed to Draw_Main and Draw_WinMain, respectively, to avoid using names reserved in C++.
Doxygen warning is fixed in XDE User's Guide.
Test cases on macOS (using native tcl from /usr/lib) fail when $lst starts with numeral, because upvar guesses that its first parameter is level rather than otherVar.
The fix is to explicitly supply level to 1 (default value if uplevel is omitted) to avoid tcl exception "expected integer but got 3dviewer".
Data races have been prevented in the code of BOPAlgo_PaveFiller that makes pcurves of edges on faces. For that:
- Put into treatment only unique edge-face pairs.
- If the same edge is treated with different faces in different threads simultaneously this also causes data races. To avoid this make the edge's copy in each thread and update the copy. The original edge is updated only after finishing parallel processing.
The new method BOPTools_AlgoTools::CopyEdge has been added to make a copy of an edge with vertices.
Big screenshot in the test script tests/bugs/modalg_7/bug28200 has been replaced with a small one.
Methods AddTool(), SetTools(), Tools() have been moved to BOPAlgo_ToolsProvider class;
BOPAlgo_BOP and BOPAlgo_Splitter are now successors of BOPAlgo_ToolsProvider
Fixed FT_Get_Kerning misuse within Font_FTFont::AdvanceX()/Font_FTFont::AdvanceY().
Font_FTFont::loadGlyph() has been corrected to not return TRUE
in case if method called with 0 argument second+ time.
The following improvements have been made in the 3D offset algorithm for mode "Complete" and Join type "Intersection":
- RemoveInsideFaces() - Removal of the invalid parts outside of the solids built from the splits of offset faces is now performed. It helps to avoid their rebuilding and speed-up the computation.
- FindVerticesToAvoid() - Strengthening the criteria for the vertices to be avoided in the new splits.
Test cases for the issue.
Adjustment of the test cases to current behavior.
Test for 0021134: checkshape command does not return faulty shapes.
Test for 0021494: Intersection between cone and sphere fails
Test for 0022642: Refactoring of ShapeFix_Wire::FixIntersectingEdges
Test for 0022732: Reading a STEP file produces invalid shape
Test bugs vis bug26357 is revised to check colors in more robust way.
In tests bugs vis bug29091_*, size of produced file is checked to be within range of known valid sizes, rather than hard-coded (per-platform) exact sizes.
FPE signals are disabled for test bugs vis bug29127 to prevent exceptions cause by software OpenGl driver.
File data/occ/Box.brep is removed to avoid confusion with file box.brep in public data files used in tests.
Two additional non-alphabetic-order combinations of complex types are handled in RWStepAP214_ReadWriteModule.cxx
Setting signal handler is enabled in OSD::SetSignal() for MinGW (works only for SEH builds of MinGW, not for SJLJ builds).
Due to absence of function _set_se_translator(), handler is set using C signal() function and thus is called asynchronously.
Macro OCC_CONVERT_SIGNALS is enabled for MinGW build to support converting signals to C++ exceptions using long jumps (the same as on Linux).
Code raising exceptions in OSD::SetSignal() is corrected to use method Jump() instead of C++ throw.
OSD_OpenStream() now uses __gnu_cxx::stdio_filebuf extension for opening UNICODE files on MinGW when using C++ file streams.
Variant accepting filebuf returns bool (true if succeeded and false otherwise).
Checks of ofstream to be opened made via calls to low-level ofstream::rdbuf() are replaced by calls to ofstream::is_open(); state of the stream is also checked (to be good).
Unicode name used for test file in test bugs fclasses bug22125 is described (for possibility to check it).