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.
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).
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.
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.
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.
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.
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.
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*.
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*;
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().
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
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
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.
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"
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.
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.