Problem: From the point of view of the STEP format (and others), it is allowed
to describe a face on a surface with natural boundaries (torus, sphere) without
specifying these boundaries. Thus, a face on a closed surface and containing
an inner wire (or several) is correctly defined and describes a face with a
cutout defined by this wire. At the same time, there is a function
(ShapeFix_Face::FixOrientation) in the ShapeHealing procedure that corrects the
orientation of the wires, and it starts before the function of adding natural
boundaries (ShapeFix_Face::FixAddNaturalBound). There are many shapes that have
incorrectly oriented wires and this procedure successfully heals them, but on a
correctly specified face with single inner wire on closed surface, we do not get
the entire surface with a cutout, but a part of the surface defined by the wire.
This fix is intended to resolve this ambiguity.
Change:
1. Added function isNeedAddNaturalBound that returns TRUE if face needs to add
natural bounds.
2. Corrected condition in FixOrientation to ignoring faces that needs to add
natural bounds.
3. For tests in which one wire was incorrectly oriented on a closed surface,
flag AddNaturalBound was disabled.
5. Test with cutout from torus was created: bugs step bug28414.
Result: By default, it is correct to add natural boundaries, because this case
is correct from the point of view of the STEP format and others.
Colors wasn't read correctly because of incorrect curve transfers in IGESToBRep_TopoCurve.cxx
I added new calls to SetShapeResult() at the necessary places.
Also in the IGESCAFControl_Writer.cxx I added new condition because of the possible NULL exception.
Possibility for adding LengthUnit info to XCAF document using special class XCAFDoc_LenghtUnit and XCAFDoc_LenghtUnitTool is implemented.
Package UnitsMethods is split: geom methods were placed to new file GeomConvert_Units which is in the toolkit TKXSBase, internal step scale factors was placed to StepData.
Updated UnitMethods to convert scale factor to different unit types.
Now, XSAlgo::XSAlgo_AlgoContainer is used to update unit info from static interface values.
New Draw command "XSetLengthUnit" and "XGetLengthUnit" for set or get XDE attribute.
Upgraded tests for STEP, IGES, OBJ, glTF, VRML formats to check area regressing with used unit.
Upgraded tests\de test cases to use any units in the "loop back" algorithms.
- Fix problem with write shape with locations ( IGESCAFControl_Writer.cxx )
- Add support for adding sub-shapes (labels) together with sub-shapes without location ( XCAFDoc_ShapeTool.cxx )
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 "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.
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).
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.
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).
* 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
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.
Add some workaround to read IGES files with lines, which lengths are less than standard 80.
Test case for issue CR26573
Correction of test cases for issue CR26573
Correction of test case for issue CR26573
In method Approx_SameParameter::Build() for case when 2D and 3D curves is not same parameter calculation of maximal deviation is modified by following way :
Projection is considered as done only if parameter projected point falls within the current interval of parameters.
In the Approx_SameParameter considering tolerance after static method ProjectPointOnCurve was added.
In BRepAlgoAPI_Sewing catch of exception was added and computation of tolerance of edge if same parameter was changed in according to check in BRepCheck_Analyzer
In method Approx_SameParameter::Build() for case when 2D and 3D curves is not same parameter calculation of maximal deviation is modified by following way :
Modification in order to avoid warning
Test case for issue CR24357
1. B-spline cache was moved into separated classes: BSplCLib_Cache for 2D and 3D curves and BSplSLib_Cache for surfaces.
2. The cache is used now in corresponding adaptor classes (Geom2dAdaptor_Curve, GeomAdaptor_Curve and GeomAdaptor_Surface) when the curve or surface is a B-spline.
3. Algorithms were changed to use adaptors for B-spline calculations instead of curves or surfaces.
4. Precised calculation of derivatives of surface of revolution is implemented for the points of surface placed on the axis of revolution (Geom_SurfaceOfRevolution.cxx)
5. Small modifications are made to adjust algorithms to new behavior of B-spline calculation.
6. Test cases were modified according to the modern behavior.
7. Changes in BOPAlgo_WireSplitter, BOPTools_AlgoTools, BRepLib_CheckCurveOnSurface and ShapeAnalysis_Wire to use adaptors instead of geometric entities
8. Allow Geom2dAdaptor and GeomAdaptor in case of offset curve to use corresponding adaptor for basis curve
Modification of test-cases according to the new behavior.
The analysis of small area in the method ShapeAnalysis_Wire::CheckSmallArea is performed the following way:
- On the fisrt step algorithm produces a rough estimation of part of surface area.
- In a case if obtained estimation is less than tolerance then evaluate real area and comapre this value with tolerance.
- New flag has been added to XSTEPResource/IGES. In a case if flag is true the faces with small 3d area is removed from ShapeFix context.
Test-case for issue #25923 and update test-cases in de group according to the new behavior.
Remove making BSpline surfaces rational,
Add shifting of pcurves on periodic BSpline surfaces,
Add cutting of segment from such surfaces.
Add additional check for need of make segment
Update of test-cases according to the new behavior
1. Unification of the polygons creation (it is regardless of arguments order).
2. Output of 2dintersect DRAW-command was changed.
3. Geom2dGcc_Circ2d2TanRadGeo.cxx:
Precise intersection point found by Extrema Curve-Curve method (dot product between every tangent vector and vector between points on two curves must be equal to zero).
4. Some comments have been translated from French to English.
Some test case have been updated.
Changes in accordance with the last remark
Test case for issue CR25593
Recalculate of tolerance before edge cutting
Test case for issue CR25013
add try to increase tolerance before splitting in singularity during PCurve adding.
Correction of test cases for issue CR25013
Interface_CheckTool does not reset the Check added to CheckList now.
Added test case bugs/xde/bug25176
Update reference data in test cases.
Resolving conflicts:
tests/de/iges_3/A4
tests/de/step_1/R7
tests/de/step_2/H1
Check whether p-curve being projected can be approximated by straight line is made before full-scale projection, to improve performance.
If straight, pcurve is created as Line only if this will lead to the same range parameterization as 3d curve, otherwise BSpline of degree 1 is created.
Re-approximation of line pcurves by bsplines removed from ShapeFix_Edge.
Test case updating to new behavior.
Added "static" keyword to the fixPeriodictyTroubles() function.
Update of test-cases according new behavior
1. Method "SetValues()" for gp_Trsf2d class is added.
2. Method Orthogonalize for gp_Trsf2d and gp_Trsf classes was added.
3. Unused arguments from "SetValues()" method for gp_Trsf was deleted.
4. Output of AppParCurves_MultiPoint Dump was corrected.
5. Method of right projected point choosing was corrected in ProjLib package.
6. Some test cases were changed according to their new behavior.
fix the notched edges twice per face - before checking for missing seam and after
Test case correction for issue CR24983
Add check for invalid Surface of linear extrusion (with basis curve - line and extrusion direction parallel to this line) during converting STEP surface
Small corrections of test cases for issue CR24983
Range of changing of some analytic curves is computed by other methods. It allows computing face's boundaries with more precise.
Tolerance was increased to provide successful work of some algorithms.
Functions BRepOffsetAPI_MiddlePath::Build() and ApproxWithPCurves(...) (file IntTools_FaceFace.cxx) were changed according to new result of algorithm's work.
It is possibly for "outboundaried faces" (see bug#23675) to compute incorrect UV-Bounds, when first parameter is more than last. To avoid it, extended control of computed bounds was added.
Function for fail sameparameter fixing was added to HLRAppli_ReflectLines to avoid creation bad shapes after algorithm's work.
In file ShapeFix_ComposeShell.cxx only text formatting was changed.
Some test cases are changed according to their new behavior.
Added test case bugs/moddata_3/bug23511
MAIN CHANGES:
FixAddNaturalBound: the boundaries of "natural bound addition" are restricted: a face, that does not contains an outer wire, should not have any infinite UV boundaries due to new face building (with using a surface) requires specified UV boundaries.
FixAddNaturalBound: myResult is updated in FixAddNaturalBound when the method creates a new face with natural boundary. myResult is required to be updated for next "fix small-area wires" algorithm
IsPeriodicConicalLoop: incorrect working BRepTools_WireExplorer was replaced on TopoDS_Iterator.
a natural bound is added to all the faces are constructed with UV-periodical surfaces (not only sphere and torus; e.g., closed b-splines)
other:
ShapeAnalysis: ReverceSeq renamed to ReverseSeq
BRep_Tool Pnt and Tolerance has the check for null TShape
Test cases for issue CR24249
required null checks were added
test cases were corrected according to their new behavior
Correction test case for issue CR24249
Modification to avoid creation of redundant labels in XCAF for any shapes belonging compound even if colors are not defined for them.
Fix to avoid compiler warning.
Fix for regression for test case de iges_2 A6
Test case for issue CR23921
Refactoring on current master fix for bug 0024008: ShapeAnalysis_Surface causes exception in Geom_OffsetSurface.
And modified test scripts in order to avoid report regressions
Test cases for issue CR24008
Test case and new draw command for issue CR24137
Modified test case de/iges_1/G9 according to new data
Small correction of test cases for issue CR24137