Approx/Approx_SameParameter.cxx,hxx:
Class Approx_SameParameter refactoring. Logic is changed in many places to unify usage, simplify maintenance.
Method Curve2d() is changed to return Geom2d_Curve instead of Geom2d_BSplineCurve. Corresponding message is added to the upgrade guide.
.lxx file is merged into .hxx.
Tangent computation is extracted into special method.
Comparing number of sample points after CheckSameParameter(...) is added to define cases with projection fails.
Undesirable behavior when curves are not same parameterized is fixed.
Geom2dAdaptor/Geom2dAdaptor.cxx: treatment of offset curve is added
Adaptor3d/Adaptor3d_TopolTool.cxx: minor improvement of performance for BSpline surfaces with huge number of knots
Tests were modified according to new behavior of sameparameter algorithm
The table of named colors has been compressed and moved out
from Quantity_Color.cxx into Quantity_ColorTable.pxx.
Quantity_NameOfColor - grayscale enumeration values have been re-ordered to fix discontinuity.
Duplicating colors has been merged within enumeration:
CHARTREUSE=CHARTREUSE1, GOLD=GOLD1, GREEN=GREEN1, ORANGE=ORANGE1,
ORANGERED=ORANGERED1, RED=RED1, TOMATO=TOMATO1, YELLOW=YELLOW1.
Added aliases to several other common colors:
BLUE=BLUE1, CYAN=CYAN1, LIGHTCYAN=LIGHTCYAN1, MAGENTA=MAGENTA1.
Quantity_Color class definition has been cleaned to follow OCCT coding style.
Quantity_Color now stores NCollection_Vec3<float> as class field instead of separate components.
Removed unused class Quantity_ColorDefinitionError.
New methods Quantity_Color::Convert_LinearRGB_To_sRGB() and Quantity_Color::Convert_sRGB_To_LinearRGB()
converting RGB components from linear to non-linear sRGB colorspace and vice versa.
Image_PixMap::PixelColor() and Image_PixMap::SetPixelColor() methods have been extended
with an optional argument for performing linearization/delinearization of 8-bit sRGB pixel formats.
Draw Harness command AISColor has been corrected to take color name instead of enumeration index.
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.
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
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
Special treatment of bspline curve of first degree is implemented in Extrema_GExtPC.gxx
Test case is added
Some test cases are modified according to actual state of algorithm
Now roots-references in XCAF Document can be exported to STEP without losing structure of assembly/sharing/metadata of this root. New auxiliary root assembly with each root-reference is created to save all necessary data.
Detection of specific case of error in the definition of transformation matrix describing position of the component within assembly, when it has Axis Placements swapped, is corrected to handle the case when one of these Axis Placements is contained in both Shape Representations (of the assembly and its component).
This allows the problematic STEP file to be translated correctly.
Added test bugs step bug30087
Name of the PROPERTY_DEFINITION entity for validation properties is changed to "geometric validation property" according to the current version of the recommended practices.
For compatibility with older definitions (with underscores) the check is made using string with underscores replaced by spaces.
Output information about failure during reading of external file has been added (it can be checked by using Draw command "tpstat").
If the reader cannot find an external file at the first found location
(using entity APPLIED_EXTERNAL_IDENTIFICATION_ASSIGNMENT) it checks other information about file path
(using entity DOCUMENT_FILE related with the above-mentioned entity) and uses a new location for import of the external file.
The "end" file from folder "de" has been corrected to exclude comparing the number of edges in the shapes from current result with test data.
"TODO messages generated for differences were removed.
Data exchange tests were regenerated.
Check for double solutions has been added in algorithms Extrema_ELPCOfLocateExtPC and Extrema_ELPCOfLocateExtPC2d
that find extrema between point and curve.
Test parse rules are improved to recognize messages with word 'fail' or 'failure' as errors.
Test cases are corrected accordingly (TODO or REQUIRED statements added where fail messages were not noticed previously).
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.
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.
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.
Approximation parameters: degmin, degmax, max number of segments, boundary condition, maximal distance of projecting are added in interface of classes ProjLib_ProjectedCurve, ProjLib_ComputeApprox,
ProjLib_ComputeApproxOnPolarSurface
Algorithm of Approx/Approx_ComputeCLine is modified in order to treat maximal number of segments allowed for cutting.
Algorithm of method BOPTools_AlgoTools2D::MakePCurveOnFace(...) is modified in order to manage cases with big edge tolerances.
Test case added
Some test cases were modified according to new behavior of algorithms
Synchronization of the ShapeAnalysis_Edge behavior with the BRepCheck_Edge by adding check for 2d curves on planes.
Implementation of the BRep_Tool::CurveOnPlane method to avoid code duplication for making PCurve of the edge on planar face.
Subdivision of curve parametric interval based on deflection criteria is added for curve type OtherCurve in
Extrema_GExtPC.gxx. Algorithm of subdivision is implemented in Extrema_Curve(2d)Tool.cxx
New Draw command projpcurve for projection of point on CurveOnSurface is added in SWDRAW_ShapeAnalysis.cxx
projpcurve is modified to reflect "start parameter" in usage message and Draw help.
Exception is raised during translation BSpline curve having only one unique knot.
Protection for such case was added
Added protection against exception during reading BSpline curve with number of control points equal to 0
Added protection against exception due to using null binder during writing XDE document
Test case for issue #27575
The matter was that during checking wires of a shape for small area, non-outer wires were checked with constructing a new face with BRepBuilderAPI_MakeFace. If a face has location an edge from original face has no pcurve on the constructed face, which leads to exception in BRepGProp::SurfaceProperties. The fix constructs new face using EmptyCopy.
The method ShapeAnalysis_Wire::CheckSmallArea() has been changed so as to check area of the outer wire without hole-wires. API of this method has been changed, as the second argument theIsOuterWire is not needed any more.
The test cases have been updated, below are explanations of changes:
test de iges_2 G7
The fixed version leaves a wire in a face, but the master version considered it small and removed. The master version works wrong. It is because the face built with this wire has negative area, but the code in CheckSmallArea function does not get absolute value before comparing area with the tolerance. The left wire leads to splitting of the face on two, checkshape error in the face, and statshape faulty due to increased number of faces in the second pass.
test de iges_2 G2
The fixed version leaves a wire that is removed in the master version. The cause is the same as in G7 test case. However, here the problematic wire has very big tolerance. So, when the fixed version left it in the shape, the overall maximal tolerance became much greater than in reference data.
test de step_3 E6
In fixed version a really bad small wire is removed from the face, while in master version it is left and produces an error in checkshape report. So, it is an improvement.
The cause of errors is a non alphabetical order of complex entity, which do not affect export.
Move messages to debug mode.
Replace fail by warning.
Correction of test case bugs/vis/bug23153 according to the new behavior
Interpolation state check is fixed to mark as valid only ordered sequences of poles.
Refactoring of Approx_SameParameter.cxx.
Test case is added.
Test cases are updated to the new behavior.
Update of testing cases
- removal of excess interferences in case of simple hiding face
- correct processing of boundary edges coinciding with outlines
- change of API for testing Draw Command
- correction of Draw command "build3d"
- test cases are added.
Linux reference data is changed.
Partially fixed 0027340: Insufficient exact HLR speed
Number of samples in PolyPoly intersection algorithm tuned in each instance of generic class.
Default number of the samples in Geom2dAdaptor is changed according to the Adaptor2d_Curve2d class.
Minimal number of points in case of B-Spline is changed.
Minimal number of samples support is added in intersection algorithms.
Tolerance of line / line analytical intersection is fixed.
Test cases are updated to the new behavior.
Update of test case according to the current behavior
Upgrade check of closeness of 2dcurve to line during projection:
For C1 and more surfaces check distance to normal, not to surface, for C0 surfaces update tolerance formula.
Add check for possible period jump in some inner point.
Update some test cases.
Add cache saving for lines,
update fixPeriodicTroubles() function, using parameters from cashe.
Small correction of test cases for issue #26930
fix processing of points from cache.
Update of test cases according to the new behavior
Fix behavior of fixPeriodicityTroubles() on different isolines,
fix copy/paste mistake.
Update test cases:
iges_2 C4 - return to master values
step_3 E6 - improvement.
Operator of cast to non-const reference is declared deprecated to produce compiler warning if used (usually implicitly).
OCCT code is updated to avoid that cast, occurring when function accepting non-const reference to handle is called with handle to derived type.
For that, local variable of argument type is passed instead, and down-cast is used to get it to desired type after the call.
A few occurrences of use of uninitialized variable are corrected.
ShapeAnalysis_Surface is improved to use adaptor for evaluation of points on a surface.
Useless field myExtSur is removed.
DE tests are amended according to induced changes (number of edges varied).
Add checks to avoid exceptions.
Remove check for small 3D curve, now pcurve will be built for all small edges, which have not been removed by FixSmall.
Modification to create natural bounds for face based on the spherical and Bspline surface and having only one bound represented by Vertex loop was made.
According to the specification of ISO-10303 part 42:
"If the face has only one bound and this is of type vertex_loop, then the interior of the face is the domain of the face_surface.face_geometry. In such a case the underlying surface shall be closed (e.g. a spherical_surface.)"
- natural bounds are applied only in case if VertexLoop is only the one
defined face bound.
Update of test-cases according to the new behavior
Test-case for issue #24595
* Implement GeomEvaluator package
* Inject evaluators to GeomAdaptor_Surface to calculate values of complex surfaces
* Inject evaluators to Geom_Surface classes to calculate values for offset surfaces, surfaces of revolution and surfaces of extrusion
* Move Adaptor3d_SurfaceOfLinearExtrusion and Adaptor3d_SurfaceOfRevolution to GeomAdaptor and unify calculation of their values and derivatives
* Code optimizations
* Update test cases
Update of test-cases according to the new behavior
Context usage extended in method ShapeFix_Wire::FixSelfIntersection() to avoid modification of original shape by shape healing.
Added check for subshape modification in XSAlgo/XSAlgo_AlgoContainer::MergeTransferInfo().
Test cases are updated to the new behaviour.
Test case for issue CR24658
Poles bounding box for curve added for bezier and bspline curves.
Method Poles() for Bezier curve added.
Test case for issue CR26560
Function to compute subshape max tolerance has been added.
Fixed bounding box expanding at Face/Face step of boolean operation.
Test cases are updated to the new behavior.
Added set of methods CopyVertex in BRepTools_ReShape. Usage of this non-modifying methods added in ShapeFix_Wire, ShapeFix_Edge.
Test case for issue 26656.
Test cases updated to the new behavior.
Correction of test cases for issue CR26656
Changed access by value to access by reference in method CopyVertex.