ProjLib/ProjLib_ProjectOnPlane.cxx - formatting
0031661: Modeling Data - Algorithm crashes when projecting parabola or hyperbola to plane
ProjLib/ProjLib_ProjectOnPlane.cxx - building of analytical parabola and hyperbola is added
bugs/moddata_3/bug31661_* - new test cases are added
move algorithm of obtaining results from function gproject to method ProjLib_CompProjectedCurve::Perform;
fix tolerances in ProjLib_PrjResolve::ProjLib_PrjResolve;
new treatment of myMaxDist;
use extend bounds in approximation;
add test;
test case "bugs modalg_5 bug25980", "bugs modalg_7 bug24185" have been changed according to new behavior.
Corrected Geom2dConvert_CompCurveToBSplineCurve::Add in Geom2dConvert_CompCurveToBSplineCurve.cxx;
Added the test for this problem;
Corrected "gluing" curves in ProjLib_ProjectedCurve.cxx.
Provide ShallowCopy() functions for adapters & evaluators of curves, 2d curves and surfaces. This will allow using copies of the same adapter in multi-thread calculations.
Code has been adjusted to suppress -Wunused-but-set-variable warnings.
DRAWEXE.wasm, compiler flags have been moved to linker flags
to eliminiate -Wunused-command-line-argument warnings.
Extrema_GenLocateExtPS.cxx, Extrema_GenLocateExtPS.hxx:
Adjusting tolerances according to surface sizes is added.
Additional methods for searching solution are added for cases if basic method fails.
Extrema_FuncPSDist.cxx - small bug fixing.
BRepFill_TrimShellCorner.cxx - fixing regression
ChFi3d_Builder_CnCrn.cxx setting parameters for Plate algorithm to improve stability of solution
ProjLib_ComputeApproxOnPolarSurface.cxx - code optimization
Some test cases are modified according to current state of Extrema algorithm
Extrema_GenExtPS now prefers resizing of Array2 tables instead of managing tables by extra handles.
Removed unsafe casts to Adaptor3d_SurfacePtr/Adaptor3d_CurvePtr in Extrema classes.
Removed unsafe casts to curve adaptors in Extrema_ExtCC, Extrema_ExtCC2d classes.
Extrema_GenExtPS, Extrema_GenExtSS, Extrema_ExtCS -
copies by value are now disallowed;
several unexpected places copying the object have been fixed.
IntTools_Context - maps of void* have been replaced by typed maps.
Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface now inherit Standard_Transient.
Interfaces Adaptor2d_HCurve2d, Adaptor3d_HCurve, Adaptor3d_HSurface and their subclasses
are now aliases to Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface.
Removed numerous unsafe reinterpret casts.
Generic classes Adaptor3d_GenHCurve, Adaptor3d_GenHSurface, Adaptor2d_GenHCurve2d have been removed.
Several redundant .lxx files have been merged into .hxx.
Removed obsolete adaptor classes with H suffix.
Improve projection of ellipse and circle on a plane in case of the same parametrization of the original curve and the projected one is not necessary. Now the projection is a canonical curve instead of B-spline.
Extrema_ExtCs.cxx: number of subdivision is incresed for curve;
Modifications to fix regressions of some tests
IntTools_BeanFaceIntersector.cxx: restriction of curve, which is used in Extrema_ExtCS
ProjLib_CompProjectedCurve.cxx: tolerance is reduced for Extrema_ExtCS
BRepOffset_Tool.cxx: checking common vertex if it is Null
tests/bugs/modalg_7/bug27087 : test case added.
tests/bugs/modalg_5/bug25232_8 : test is modified according to new behavior of algorithms
Approx_ComputeCLine.gxx : new class field is added to manage hang checking.
ProjLib/ProjLib_ComputeApprox.cxx : unset hang checking for analytical surfaces and curves
"endl" manipulator for Message_Messenger is renamed to "Message_EndLine".
The following entities from std namespace are now used
with std:: explicitly specified (from Standard_Stream.hxx):
std::istream,std::ostream,std::ofstream,std::ifstream,std::fstream,
std::filebuf,std::streambuf,std::streampos,std::ios,std::cout,std::cerr,
std::cin,std::endl,std::ends,std::flush,std::setw,std::setprecision,
std::hex,std::dec.
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
Approx_ComputeCLine.gxx - criterium to stop interval cutting is increased.
ProjLib_ProjectedCurve.cxx - fix regression for bugs modalg_5 bug25886
Other tests are modified according to current state of algorithm
1. Extrema algorithm calls Curve-surface intersector. This intersector returns flag about infinite solution (in spite of extrema's returning not-parallel status correctly - axes of considered cylinder and circle are not parallel). In this case, attempt of obtaining number of intersection points leads to exception.
So, the fix adds check of infinite solution after the intersection algorithm.
2. The methods IsDone(), IsParallel(), NbExt(), SquareDistance() and Points() (of Extrema_* classes) have been corrected to make them consistent to the documentation.
3. Revision of some Extrema_* classes has been made in order to avoid places with uninitialized variables.
4. Currently Extrema does not store any points in case when the arguments are parallel. It stores the distance only.
5. Some cases on Extrema-algo have been moved from "fclasses"-group to "modalg"-group.
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
New macro Standard_FALLTHROUGH is defined for use in a switch statement immediately before a case label, if code associated with the previous case label may fall through to that
next label (i.e. does not end with "break" or "return" etc.).
This macro indicates that the fall through is intentional and should not be diagnosed by a compiler that warns on fallthrough.
The macro is inserted in places that currently generate such warning message and where fallthrough is intentional.
Doxygen comments are provided for this and other macros in Standard_Macro.hxx.
ProjLib_ComputeApproxOnPolarSurface::BuildInitialCurve2d - Using the correct number of points (computed in GCPnts_QuasiUniformAbscissa class) for creation of the initial curve.
1. Exception in intersection of two analytical faces has been fixed by adding a simple check on number of vertices
in the resulting analytical curve;
2. Projection of the Circle on the Cone now checks if the Circle's normal direction is parallel to the Cone direction.
If it is not, the different, more advanced, algorithm will be used for projection - ProjLib_ComputeApprox;
3. Intersection of the Edge with the Face (IntTools_EdgeFace algorithm) in QuickCoincidenceCheck mode has been fixed to
avoid the checking of the type of the intersection result if the coincidence check gives the positive result;
4. All common IN edges of the intersecting faces has been added for intersection with section edges to avoid self-intersection in the result;
5. Post treatment of the section edges in Boolean operations has been improved with the new stage which treats the possible
common zones, not detected by the intersection algorithm, between faces by intersecting each section edge with all faces,
not participated in its creation, and in case of coincidence putting it as IN edge into FaceInfo structure of the face.
The new function has been implemented for that - BOPAlgo_PaveFiller::PutSEInOtherFaces().
6. Checking for the SameDomain splits of faces in Boolean Operations has been modified to process the pairs of faces in
which both the section curves and common zones are present.
7. Adjustment of the test case boolean gdml_private ZH3 as improvement.
8. Test cases for the issue.
9. Test cases for the parent issue - 0026789.
New method CheckFaceSelfIntersection has been added to BOPAlgo_CheckerSI: now self-intersection of each face is found as well as pairs of intersecting faces;
-method IntPatch_Intersection::Perform(S1,D1,TolArc,TolTang) is modified for more effective search of self-interasections in case of Surface Of Extrusion;
-method IntCurve_IntPolyPolyGen::Perform(C1,D1,TolConf,Tol,NbIter) is modified to detect segments of intersections.
Small correction.
Test cases are corrected.
Correction of compiler error
Fix of regressions
Names of shapes correction
Macro NO_CXX_EXCEPTION was removed from code.
Method Raise() was replaced by explicit throw statement.
Method Standard_Failure::Caught() was replaced by normal C++mechanism of exception transfer.
Method Standard_Failure::Caught() is deprecated now.
Eliminated empty constructors.
Updated samples.
Eliminate empty method ChangeValue from NCollection_Map class.
Removed not operable methods from NCollection classes.
Problem of projection of line on the cone in the special case when starting point of the line coincides with the cone apex is fixed (by shifting this point along the source line).
In ProjLib_ComputeApprox algorithm, compute correct parametric tolerance from the input 3D tolerance using surface resolution, in order to pass it to low-level 2D algorithm Approx_FitAndDivide2d (instantiation of the generic class Approx_ComputeCLine). Earlier 3D tolerance was used as parametric tolerance directly, which was a problem for surfaces with too small radius of curvature.
Also, eliminate redundant creation of the object of type AppParCurves_MultiCurve on each iteration in the method Approx_ComputeCLine::Compute.
The post treatment of the Edge/Edge intersections has been improved. Namely:
a. Making the procedure of sharing Edge/Edge intersection vertices consistent with intersection algorithm by enlarging bounding box of each vertex on half of Precision::Confusion();
b. Algorithm of computation of vertex tolerance (in order to cover tangent zone between Edges) has been changed for Line/Circle cases.
Test cases for issue CR27804
Adjusting test cases according to their new behavior.
Mark the test boolean/volumemaker/A8 as unstable between different versions of MSVS (2010 and 2013).
The problem of incorrect CUT is wrong Pcurve after projection onto cylinder of a small edge orthogonal to cylinder's axis. The result of projection is a line along V direction, but it should be along U.
ProjLib_Cylinder has no specific functionality to build projection in most common case, so it should return "not done" flag to start projection based on curve approximation.
Following changes are done:
1. ProjLib_Cylinder returns isDone=false in the following cases:
* the projected line is not parallel to cylinder's axis
* the plane of projected circle is not orthogonal to cylinder's axis
2. Test case added
Minor correction of test case
Euclidean distance criteria is added for local point / surface extrema.
Classes representing objective criteria are renamed to be consistent.
Local extrema usage is updated according to new behavior.
Test case is added.
Misprint correction.
ProjLib_Cone.cxx - correction wrong calculation of projection line on cone
GeomInt_IntSS_1.cxx - modification of method BuildPCurves(...) - adjusting first or last knots of 2d Curve
ProjLib_ComputeApprox.cxx - modification of method Function_SetUVBounds(...) for case projecting line on cone.
Modification of tests - removing first TODO
Test case for issue #27322
Topological tolerances changed to geometric tolerances.
Protection from the usage of invalid result is added to restore good projection.
Test cases are updated.
Test case added.
Correction of test case for issue CR27133
Redundant methods Delete() and Desroy(), created in CDL as a hack to define destructor for the class, are removed; their definitions are converted to definition of destructors. In a couple of places methods Destroy() are preserved (bug made non-virtual) because they are called explicitly.
This branch contains fixes for 26675 and 26431 bugs.
1. Normalization has been eliminated.
2. Interfaces of AppDef_Compute::Parametrization(...) and BRepAlgo_BooleanOperations::SetApproxParameters() methods have been changed.
3. Overloaded methods for ApproxInt_Approx::SetParameters(...), TopOpeBRepTool_GeomTool::GetTolerances(...) and TopOpeBRepTool_GeomTool::SetTolerances(...) have been removed (because some fields of these classes are not used more).
4. Comments for some methods have been changed in BRepApprox_TheMultiLineOfApprox.hxx and GeomInt_TheMultiLineOfWLApprox.hxx files.
5. Some fields have been deleted from ApproxInt_MultiLine class. Kept members have become constant.
6. Interface of ksection DRAW-command has been changed.
7. Now, 2dintersect DRAW-command prints information about found segments.
8. Some code fragments have been rewritten to make them easier.
9. Algorithm of splitting WLine, which goes through pole of sphere has been improved.
10. Improve approximation algorithm in order to it will compute correct 2D- and 3D-tangent at the end of bezier constraints (including case when curve goes through or finishes on singular points).
11. Interface of IntPatch_WLine::Dump(...) method has been corrected.
12. Some methods for working with Walking-line are made more universal (available for both GeomInt and IntTools packages).
13. Problem in BRepLib::SameParameter(...) method has been fixed (see corresponding comment).
14. Small correction in Draft package.
15. Any outputs in IntPatch_Intersection::Dump(...) method have become disabled because they are useless. If anybody need in this outputs he/she will correct this method himself/herself.
Adjusting some test cases according to their new behavior.
Creation of new test cases.
----------------------------------------------------------------------------------------------------------------------------
Some explanation of new behavior of some test cases:
1. Regressions:
a) blend simple X4
The problem is described in the issue #0026740. According to this description, the result on the current MASTER seems to be wrong indeed.
b) boolean bcommon_complex C7 and boolean bcut_complex Q1
These test case use same shapes with different Boolean operation (COMMON and CUT). They are already BAD (on the MASTER). Now, some sub-shapes have become not-shared, simply. In my opinion, we shall apply new behavior of these tests.
c) boolean bsection M3
The problem described in the issue #0026777 exists even on the current MASTER.
d) boolean bsection M9
The problem is described in the message http://tracker.dev.opencascade.org/view.php?id=26815#c47546. Here, we have really regression in the picture.
e) boolean bsection N2
The problem is described in issue #0026814.
f) boolean volumemaker G1
The problem is described in issue #26020.
g) bugs modalg_1 bug1255 (and bug1255_1)
The problem is described in issue #26815.
h) bugs modalg_2 bug5805_18, bugs modalg_2 bug5805_42, bugs modalg_2 bug5805_46
The problem is described in issue #25925.
i) bugs modalg_3 bug602
The problem is describes in issue #602.
j) bugs modalg_5 bug24915
The problem is described in the message http://tracker.dev.opencascade.org/view.php?id=25929#c48565. It is not fixed by this issue.
k) bugs modalg_5 bug25838
The main reason is described in issue #0026816.
----------------------------------------------------------------------------
2. Improvements:
a) boolean volumemaker F9
b) bugs modalg_1 bug10160_3
c) bugs modalg_2 bug22557
d) bugs modalg_5 bug25319_1 (_2)
e) draft angle G2
f) offset shape A1
g) offset with_intersect_80 N7
Clean-up in code causing warnings when OCCT_DEBUG is enabled
Minor corrections:
- new compiler warnings on VC++ 14
- rename of "PPC" variables that are said to caused conflicts on PowerPC
- removal of unused header TopOpeBRep/TopOpeBRep_tools.hxx