1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

86 Commits

Author SHA1 Message Date
ifv
5c48956f8e 0032849: Modeling Algorithms - Intersection algorithm returns incomplete result.
GeomInt/GeomInt_IntSS.cxx, IntTools/IntTools_FaceFace.cxx - setting deflection 0.01
for case of two bspline surfaces
IntPolyh/IntPolyh_Intersection.cxx, IntPolyh/IntPolyh_Intersection.hxx - status IsParallel is added

BndLib/BndLib_Add3dCurve.cxx, IntTools/IntTools_TopolTool.cxx - fix small bugs

Correction of test scripts according to current behavior of algorithms

lowalgos/intss/bug32849 - test case added
2022-03-01 18:57:09 +03:00
ifv
9eee5ab7e4 0032701: Modeling Algorithms - 2d curve has bending near the degenerated edge of the face
ApproxInt_Approx, ApproxInt_KnotTools, BRepApprox_Approx,
GeomInt_IntSS, IntTools_FaceFace:
  Analysis of curvature is added for adjusting ParametrizationType

IntPatch_Intersection.cxx - adding methods for estimation of UV max step depending on used surfaces

GeomInt_IntSS.cxx, IntTools_FaceFace.cxx - using methods for max step estimation

Approx_SameParameter.cxx - adding control against big values.

BOPAlgo_PaveFiller_6.cxx - adjusting position of faces before intersection
2022-01-25 21:54:13 +03:00
kgv
3738565abb 0026365: Optimization of work of OSD_Parallel class members for GeomLib_CheckCurveOnSurface
Removed workaround within GeomLib_CheckCurveOnSurface.
2021-05-26 20:20:38 +03:00
kgv
c22b52d60e 0028966: Coding Rules - remove Adaptor2d_HCurve2d, Adaptor3d_HCurve and Adaptor3d_HSurface classes
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.
2020-12-11 19:12:48 +03:00
tiv
0423218095 0030895: Coding Rules - specify std namespace explicitly for std::cout and streams
"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.
2019-08-16 12:16:38 +03:00
nbv
5fe14d0fac 0030354: BOP Cut doesn't modify the attached face
The reason of this problem is in wrong work of classifier algorithm (see the message ~0080992 to the issue #30354). Therefore, the algorithm of IntTools_FClass2d class has been improved. Namely, now orientation of the polygon is computed from area-criterion instead of angle. As result, some simplification of the method IntTools_FClass2d::Init(...) has been made.

<!break>

1. New constructor has been added to the class CSLib_Class2d. It allows applying TColgp_SequenceOfPnt2d.

2. DRAW-commands "addpolygonnode" and "polygonprops" have been created. They are covered by the test case "tests/geometry/2dpolygon/A1".

3. New method Poly::PolygonProperties(...) has been created. See help for detailed information.

4. New testgrid "lowalgos classifier" has been created.
2018-11-15 17:34:42 +03:00
nbv
e28b8c6218 0029673: Exception while Face-Face intersection
If 2D-curves are requested in intersection result but they cannot be created (by some reason) then the full set of curves (3D and two 2D) is rejected from the intersection result.
2018-10-30 16:04:25 +03:00
emv
d3578357e3 0029711: General Fuse operation produces invalid result
The following improvements have been introduced in Boolean Operations algorithm s:
1. UBTree is replaced with EBTree in Boolean operations to be able to add/remove elements into the tree of bounding boxes.
2. Repeated (nested) intersection of sub-shapes is performed with argument vertices whose tolerances increased during the operation.
3. The algorithms of Edge/Edge and Edge/Face intersection have been improved for the cases when the intersection point is located close to the edge boundaries .
4. New procedure has been implemented to ensure forced creation of Edge/Face common blocks in cases when the edge is really close to the face.
5. Post-processing of Face/Face intersection results has been improved.
6. Extension of the planar faces for Plane/Plane intersection is avoided.
7. Builder Face now better classifies potentially internal edges relatively to new faces with filtering by bounding boxes.

Side effect changes:
1. IntTools_ShrunkRange now keeps the length of the valid range of the edge.
2. The method BOPDS_DS::UpdateEdgeTolerance() has been removed as unused (replaced by the BOPAlgo_PaveFiller::UpdateEdgeTolerance()).

Test case for the issue 0029900.
Test case for the issue 0029711.
Adjustments of the existing test cases.

Avoid using uninitialized variables.
2018-07-27 16:19:15 +03:00
jgv
e67e482d99 0029511: Section fails for these two faces
Modified method: Approx_ComputeLine::Compute
Check of multicurve is now always unconditional, the procedure of check is modified to avoid infinite loops.

Modified classes: GeomLib_CheckBSplineCurve and GeomLib_Check2dBSplineCurve
Correction of poles at the ends of curve is modified to fit the direction of tangent defined by two first points or two last points of walking line.

Also modified:

BOPAlgo_PaveFiller: modified methods PostTreatFF, RemoveUsedVertices - now unused vertices are included in the list of vertices to be absorbed by other ones.
2018-06-14 14:03:08 +03:00
nbv
7797eb389a 0029496: No intersection curve between faces if starting points are given
Now, bounded IntPatch_Points are found in case when starting points are used in intersection algorithm. Before the fix, these points were not looked for (even).
2018-02-16 15:07:01 +03:00
jgv
bdae3beb87 0028802: The tolerance reached by approximator is used in creation of an edge, it is incorrect
Method IntTools_FaceFace::MakeCurve is modified: reached tolerances 2d and 3d of approximator are not used for edges.
2017-06-15 15:27:34 +03:00
emv
5652dc6272 0028591: BOP Cut creates wrong result
The Face/Face intersection procedure has been changed in Boolean Operations algorithm.
Previously, the intersection tolerance for all section curves between pair of faces has been calculated
as the maximal tolerance among all curves. Now, each curve has its own valid tolerance calculated
as the maximal deviation of the 3D curve from its 2D curves on faces or surfaces in case there are no 2D curves.

Thus, such methods of IntTools_FaceFace algorithm as TolReached3d(), TolReal() and TolReached2d() have been removed.
Now the tolerances of the curve can be obtained from the curve itself (IntTools_Curve - result of intersection):
- IntTools_Curve::Tolerance() - returns the valid tolerance for the curve;
- IntTools_Curve::TangentialTolerance() - returns the tangential tolerance, which depends on the size of the common
  between faces. Currently, this tolerance is computed for Plane/Plane cases only. For other case, the value
  of the tangential tolerance is the maximal tolerance of faces.

2D intersection tolerance (IntTools_FaceFace::TolReached2d()) has been completely removed from the algorithm as unused.
2017-04-12 17:53:03 +03:00
jgv
f48cb55d33 0027998: Self-intersection is not detected
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
2017-03-02 12:31:55 +03:00
ski
9775fa6110 0026937: Eliminate NO_CXX_EXCEPTION macro support
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.
2017-02-02 16:35:54 +03:00
nbv
f542b7bbf1 0027252: Implicit-implicit intersection (Cylinder-Plane) loses intersection curve
1. Earlier we could not put any IntPatch_Point to the intersection curve. The fix makes the algorithm of IntPatch_Points searching more precise. It is achieved by redetermination of earlier found vertices with help of minimization the distance between boundary of one intersection argument and another intersection argument (surface).
2. Additional check has been added, if IntPatch_Point adjusted to the domain boundary is true intersection point.
3. Method Contap_ArcFunction::Surface() has been added.
4. Method LastComputedPoint() has been added for IntPatch_ArcFunction and Contap_ArcFunction classes.
5. Correction in FindMaxDistance() method (see IntTools_FaceFace.cxx file) according to pure Golden-ratio minimization algorithm. Earlier this function worked wrong with small searching intervals.
6. Insignificant correction in math_BrentMinimum.cxx file (elimination of "defines").
Creation of test case for issues #27221 an #27252.
Adjusting some test cases according to their new behavior.
Correction according to the last remarks.
Small correction of shape names for issue CR27252
Test case for issue 28210
Small correction of test case for issue 28210
2017-01-26 13:34:16 +03:00
emv
51db017972 0028165: Improve performance of Boolean Operations
1. Unification of the usage of the BRepAdaptor_Surface in Boolean Operations algorithm.
For each face when it is necessary the Adaptor is initialized only once and stored in Context.

For that purpose the new IntTools_Context::SurfaceAdaptor(const TopoDS_Face&) method has been implemented.

To provide possibility to take the Adaptor from the context, the context has been added as
a parameter in following methods:
BOPTools_AlgoTools::MakePCurve()
BOPTools_AlgoTools::Sence()
BOPTools_AlgoTools2D::BuildPCurveForEdgeOnFace()
BOPTools_AlgoTools2D::PointOnSurface
BOPTools_AlgoTools2D::CurveOnSurface
BOPTools_AlgoTools2D::AdjustPCurveOnFace
BOPTools_AlgoTools2D::Make2D
BOPTools_AlgoTools2D::MakePCurveOnFace
BOPTools_AlgoTools3D::GetNormalToFaceOnEdge

It is also possible now to pass the context into BOPAlgo_WireSplitter algorithm.

Also, the new IntTools_Context::UVBounds(const TopoDS_Face&) method
has been implemented to get the UV bounds of a face.

2. Additional improvement is a calculation of reduced intersection range only for the intersection
type VERTEX during computation of Edge/Face interference.

3. The methods IntTools_EdgeFace::Prepare() and IntTools_EdgeFace::FindProjectableRoot()
and the fields IntTools_EdgeFace::myProjectableRanges and IntTools_EdgeFace::myFClass2d
have been removed as obsolete.

4. Test cases for the issue.
2016-12-08 16:53:22 +03:00
msv
0d0481c787 0026738: Make Boolean operations safely treating arguments when running with fuzzy option
When fuzzy option is in force prevent increasing tolerance of input shapes. Instead pass increased by fuzzy value the tolerances of sub-shapes everywhere where it is needed by intersection algorithms.

The following changes in API have been made:

- The methods SetFuzzyValue and FuzzyValue have been moved from the classes BOPAlgo_ArgumentAnalyzer, BOPAlgo_Builder, and BOPAlgo_PaveFiller to the base class BOPAlgo_Algo.
- The public method BOPDS_DS::VerticesOnIn has been renamed to SubShapesOnIn, and the new output parameter theCommonPB has been added.
- In BOPTools_AlgoTools, a new argument "theFuzzyValue" has been added in the methods ComputeVV and AreFacesSameDomain.
- In IntTools_Context, a new argument "theFuzzyValue" has been added in the methods ComputeVE and ComputeVF.
- The methods SetFuzzyValue and FuzzyValue have been added in the classes IntTools_EdgeEdge, IntTools_FaceFace.
- In the class IntTools_EdgeFace, the methods SetTolE, SetTolF, TolE, TolF have been removed, and the methods SetFuzzyValue, FuzzyValue have been added.
- The new argument "theTol" has been added in the method IntTools_WLineTool::DecompositionOfWLine.

Some improvements in algorithms have been made during fighting with regressions:

- Correct initialization of pave blocks for degenerated edges.
- In BOPAlgo_PaveFiller::MakeBlocks(), filter out paves on intersection curve that were put on the curve accidentally due to wide range of E-F intersection vertex.
- In the method IntTools_Tools::ComputeTolerance the margin added to the computed tolerance has been increased up to 0.001%.
- The method BOPAlgo_PaveFiller::PutPaveOnCurve has been corrected in order to use the original vertex tolerance instead of the value increased during putting it on other curves.
- The new method BOPDS_PaveBlock::RemoveExtPave has been added.
- The vertex tolerance computation in BOPTools_AlgoTools::CorrectCurveOnSurface has been improved, taking into account intersection segments between p-curves (to avoid regression on "bugs modalg_6 bug22794").
- Improve IsExistingPaveBlock to make more stable catching of coincidence of common block with section curve (against regression "bugs modalg_4 bug697_2" on Linux).

Test case for the bug has been added.

The following test cases have been updated as improvements:
boolean gdml_private ZH2 ZI7 ZJ7
boolean volumemaker C4

The test case bugs/modalg_4/pro19653 has been corrected to make it stable. See comment inside the script for details.

The test case bugs/modalg_6/bug25880 has been corrected to suppress wrong bfuse commands.

The test bugs/modalg_6/bug26954_3 has been corrected to compare the result with more precise reference value.

The "faulty" TODO in boolean/volumemaker/A8 has been made actual for Linux as well.

//Eliminate compilation error on Linux.
2016-11-08 16:42:44 +03:00
nbv
e2e0498b17 0027431: [Regression to 6.9.1] Huge tolerance obtained during intersection of cylinder and sphere
The root of the problem is incorrect processing of cases when intersection line goes through the apex(es) of sphere. The fix improves this situation. The algorithm is taken from DecomposeResult(...) function (see IntPatch_ImpPrmIntersection.cxx file). Before the fix, faltering steps were done to solve this problem. As result, it worked in some particular cases. Now, its possibilities have been extended significantly.

Following changes have been made in the fix:

1. Class IntPatch_ALineToWLine has been rewritten cardinally. It touches as interfaces of existing methods as adding/removing some methods/fields. Correction touches both cases: going through seam of Cone/Sphere and through pole(s) of sphere. Old interface did not allow making some actions with analytical line (ALine), e.g. splitting it on several Walking-lines (WLine).

2. Restriction-line support has been removed from Implicit-Implicit intersection result (see IntPatch_Intersection::GeomGeomPerfom(...) method). It connects with the fact that the intersection algorithm itself returns precise intersection line in analytical cases (in compare with parametric intersector). Therefore, we do not need in additional (restriction) line.

3. New class IntPatch_SpecialPoints has been added. This class contains methods to add some special points (such as apex of cone, pole of sphere, point on surface boundary etc.) in intersection line (IntPatch_PointLine). It is based on the static functions, which already exist in IntPatch_ImpPrmIntersection.cxx file (these functions have been moved to the new class).

4. Method IntPatch_WLineTool::ExtendTwoWlinesToEachOther(...) has been renamed to IntPatch_WLineTool::ExtendTwoWLines(...). It is connected with changing main idea of the method. Now it allows extending WLine to the surface boundary or to the singular point (if it is possible): cone apex, sphere pole etc. Interface of this method has been corrected, too. At that, old functionality (extending to each other) has been kept. For implementation of this algorithm, new enumeration "IntPatchWT_WLsConnectionType" has been created.

5. Method IntPatch_PointLine::CurvatureRadiusOfIntersLine(...) has been added. See IntPatch_PointLine.hxx for detail information. It allows correct step computing depended on the local curvature of the intersection line. This method uses geometrical properties of intersected surfaces to compute local curvature. Therefore, it can be applied in wide range of cases even if the intersection curve is not represented in explicit form (e.g. in case of param-param-intersection).

6. Method IntSurf::SetPeriod(...) has been created.

7. Additional check has been added in Draft_Modification::Perform() method for better choice of correct fragment of intersection line for processing DRAFT operation.

8. New overload method IntPatch_Point::SetValue() has been added.

9. Some refactoring of the code has been made.

Creation of test case for issue #27431.

---------------------------------------------------------------------------------------------
Some test cases have been adjusted according to their new behavior.

   tests\bugs\modalg_4\bug62
It is really IMPROVEMENT (but fortuitous).

   tests\bugs\modalg_5\bug25838
The behavior of this test has been reverted to the state before fixing the issue #27341. Main problem has not been fixed in #27341. It was fortuitous improvement.

    tests\bugs\moddata_2\bug565
Quality of intersection curve was not checked. And the curve is bad on both MASTER and FIX. Input data are really wrong: plane-like-cone. However, on the MASTER, four intersection curves (the quality is insignificant) are expected. On the fix, not empty intersection result is expected simply.

   tests\boolean\volumemaker\A8
Differences in images and CPU is expected. Difference in images is expected to be fixed in the issue #26020. Now, we should apply this behavior.
Much CPU time is spent by IntTools_FaceFace::ComputeTolReached3d(...) and GeomInt_IntSS::BuildPCurves(...) methods calling. These methods are not touched by the algorithm. It is the result of change of intersection curve(s) form. However, the new Curve(s) seems to be valid and can be applied. As result, new behavior can be applied, too.

   tests\boolean\volumemaker\F8
   tests\boolean\volumemaker\F9
   tests\boolean\volumemaker\G5
   tests\boolean\volumemaker\G6
CPU difference is expected. Much CPU time is spent by IntPatch_PointLine::CurvatureRadiusOfIntersLine(...) method calling. This method is really new (it does not exist on the MASTER) and is really useful. Therefore, we should apply new behavior.

   tests\boolean\volumemaker\G1
CPU difference is expected. Much CPU time is spent by IntTools_WLineTool::DecompositionOfWLine(...) and IntTools_FaceFace::ComputeTolReached3d(...) methods calling. These methods are not touched by the algorithm. It is the result of change of intersection curve(s) form. However, the new Curve(s) seems to be valid and can be applied. As result, new behavior can be applied, too.

   tests\bugs\modalg_6\bug26619
Differences in images is expected. The test keeps its BAD status on the FIX. But the result on the fix is nearer to expected than on the MASTER. Issue #27014 is still actual. As before, it is not clear, why the number of entities is different. The number of section curves has not been changed. Interfered entities are the same as on the MASTER.

   tests\bugs\modalg_5\bug25319_1(2)
The reason is described in the issue #27896.

Small correction in the test case
2016-11-03 14:15:41 +03:00
emv
7cb2f40993 0027761: Intersection loops infinitely
The static method CorrectSurfaceBoundaries() in the class IntTools_FaceFace,
which is used for correction of the boundaries of the faces before their intersection,
contains two inconsistent adjustments of the boundaries of the faces based on periodic surfaces.
One of these adjustments has been removed. The remaining adjustment, the one that is based on the
2D bounding boxes of the closed curves, should be sufficient.

Test case for the issue.
2016-08-11 17:47:36 +03:00
msv
0d42485334 0027283: Regression vs 6.9.1: smesh/bugs_11/L9: invalid result of General Fuse
Get rid of hard-coded tolerance 0.0001 for intersection with a conical surface.

Small correction of test case for issue CR27283

Adjusting test cases
2016-03-29 15:52:07 +03:00
nbv
a09c8f3aa5 0027190: IntPatch_ImpPrmIntersection algorithm does not split intersection curve by the seam-edge of the quadric
1. Processing when IntPatch_WLine/IntPatch_RLine goes through the seam edge has been improved in DecomposeResult(...) function (see IntPatch_ImpPrmIntersection.cxx).
2. Incorrect initialization of last point of IntPatch_WLine/IntPatch_RLine has been eliminated. Earlier it was the reason of exception.

Creation of test case for this issue.

Adjusting some test cases according to their new behavior. Namely:

1) tests\bugs\modalg_4\bug825 (bug825_2)
Details are described in issue #25915. In short, new intersection algorithm works better than old (WLine without "jumping"). However, Boolean operation loses degenerated edges of the sphere. Consequently, we get the result with Not-closed face.

2) tests\bugs\modalg_6\bug26684_2
TolReached of intersection curve has become smaller. Consequently, intersection algorithm works better than earlier.
2016-03-18 07:11:00 +03:00
abv
aa00364da7 0026377: Passing Handle objects as arguments to functions as non-const reference to base type is dangerous
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.
2016-02-20 10:10:11 +03:00
nbv
6dc83e21b2 0026132: Invalid result of boolean operation
1. The procedures for check of coincidence between Edge-Edge and Edge-Face have been added. These methods are used instead of searching interferences between corresponding sub-shapes. In most cases (including case for this issue), new methods are more reliable and faster than intersections. However, its use should be avoided in case when the edge is not coincide with edge/face of another argument evidently (e.g. if edge vertices are not in another edge/face).

2. Interface of both IntTools_EdgeFace and IntTools_EdgeEdge has been changed (adding/deleted some field and methods).

Some test cases have been corrected in accordance with their new behavior.
Test case for issue CR26132.
2016-01-21 15:50:29 +03:00
msv
3510db6201 0026619: Tolerances of operands are modified using bop
0026796: The result of General Fuse operation is self-intersecting shape

The fix forces creation of new sub-shapes (vertex, edge) when the tolerance of some sub-shape of an argument is to be increased.

This new behavior is turned off by default. It can be turned on using two ways:
1) Setting 'locking' flag of the arguments.
2) Calling the method SetNonDestructive(Standard_True) of the API classes.

Various bug fixes in the algorithm:
- Compute correct tolerance values for intersections of type Line/Line, Line/Plane, Plane/Plane.
- In case of Line/Plane intersection check if line's vertices lie on the plane.
- Do not allow decreasing of the tolerance value of the Line/Line intersection vertex.
- In IntTools_EdgeEdge, call the method FindParameters with proper 3D tolerance of the curve.
- Force making copy of a degenerated edge if its vertex is touched but no 2D intersection with other curves is found.
- Remove pave blocks both ends of which became referring to the same vertex after vertices substitution.
- Avoid exception in IntTools_Context::IsVertexOnLine if Extrema is not done.
- Reduce tolerance of vertex/edge using actual distances to interfered shapes if it was increased due to line/line, line/plane, or plane/plane small intersection angle.
- Update tolerance of edges to reach all representations in a common block.
- In V-E intersections, check if a vertex hits beyond shrunk range, in such case create V-V interference.
- Do not put a section edge to the result if it becomes to be a micro edge after updating its vertex.
- Correctly make vertices same-domain during the work of MakeBlocks.
- Decrease shrunk range at least on a Precision::Confusion() in addition to vertex tolerance.
- Add Confusion to bounding boxes of new shapes in DS
- Add tolerance Precision::Confusion() to compare distances of touching cases to fix regressions.

TODO marks have been removed from (or modified in) the following test cases (Improvements):
boolean bsection M3 N2 R2
boolean gdml_private B6 C2 C6 G7 I6 F6 J1 J4 M7 N1 N8 N9 O3 O4 O6 O8 O9 P1 P2 P5 Q1 Q3 Q5 S9 T2 U4 U5 U9 ZB5 ZB6 ZC1 ZC5 ZD3 ZD6 ZD7 ZH2 ZH5 ZI2 ZI5 ZI7 ZI9 ZJ3 ZJ4 ZJ7 F8 I6 G1
boolean volumemaker A5 A6 B3 B4 B7 B9 D3 D4 D7 F1
boolean bopcut_2d D5
bugs modalg_5 bug25043
bugs modalg_2 bug472_1 bug472_2 bug472_3

Test cases updated because they are still bad but can be accepted as non-regression:
boolean volumemaker C4 A3 A7 E6
bugs modalg_1 bug10232
boolean bsection N2

Put new TODO in the scripts:
bugs modalg_5 bug25232_9
bugs modalg_6 bug26619
bugs modalg_1 buc60462_2
bugs modalg_4 bug772

For the following tests the result in fix became better, so take fix result as the reference:
bugs modalg_5 bug24628
bugs modalg_6 bug26954_3
boolean volumemaker A4 B5 B6 C3 C8 D2 D5 F2
bugs modalg_2 bug472_2
bugs modalg_1 buc60776_1

- Add the method SetNonDestructive to API classes of user level
2015-12-23 10:33:43 +03:00
nbv
77dbd1f155 0026576: Wrong result obtained by intersection algorithm.
1. Algorithm of Restriction line decomposition has been created.
2. Algorithm of check of coincidences between Walking and Restriction line has been improved in new function IsCoincide(...) (which replaces IsIn2DBox(...)).
3. Some useful methods have been added in IntPatch_PointLine (and inherited) classes.

Test cases for this issue have been created.
2015-12-17 18:01:56 +03:00
nbv
47e3009da9 0026841: Boolean operation "bsection" produce invalid result on the attached cases
1. Intersection curve was not bounded by faces domain. It was the reason of big edge tolerance. This problem has been fixed.
2. Interface bopcurves DRAW-command has been changed in order to make possible to reproduce intersection problem.

Creation of test case for this issue.
2015-12-17 17:12:04 +03:00
nbv
4e14c88f77 0026431: Can't cut a sphere from a cylinder
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
2015-12-04 13:15:04 +03:00
nbv
71958f7db2 0026699: Wrong section curves
1. Algorithm of Restriction line processing has been improved in IntTools_FaceFace.cxx file.
2. Algorithm of checking, if Restriction line and Walking line are coincided has been improved in IntPatch_ImpPrmIntersection.cxx file.
3. Algorithm of extending check if starting point of Walking line is a tangent point has been added.

Small correction of some test cases.
Creation of test case for issue #0026699.

Small correction of test case for issue CR26699
2015-10-29 14:02:13 +03:00
aml
d33a8cde96 0026775: Bad result of section algorithm
Walking line method extraction into separate class IntTools_WLineTool.
New purging method of walking line had been added. Now point which are out of bounds are deleted.

Minor corrections.

Test case for issue CR26775
2015-10-22 11:09:56 +03:00
ski
5174095875 0026586: Eliminate compile warnings obtained by building occt with vc14: declaration of local variable hides previous local declaration
Eliminated warnings about "declaration of some local variable hides previous local declaration"
2015-09-17 12:53:55 +03:00
nbv
eb75e31c4c 0026621: Boolean Cut does not work on two solids
The main reason of the bug is incorrect extending line in SeveralWlinesProcessing(...) function.

Additionally, interface of IntPatch_WLine::Dump(...) method has been changed.

Change some test cases according to their new behavior.

Test-case for issue #26621
2015-09-10 17:40:33 +03:00
aml
0cbfb9f151 0021564: Intersection of two planar faces produces curve with too many poles
I ComputePurgedWLine() function:
Excess points in walking line are deleted when:
1) Distance between neighboring points too small.
2) Points lie in one pipe without big jump on chord length.

III
Fixed problem with extremaPC with too close knot distribution to [minParam, maxParam] borders.

IV ApproxInt_Approx.gxx
New division criteria in intersection approximator.

III Test case
Test cases update to the new behavior.
Test case for CR21564

Correction of test cases for issue CR21564
2015-08-13 11:04:48 +03:00
nbv
631633a280 0026323: Tolerance computing unification
Computing is unified. ComputeFastTol3d() method was deleted.

If intersection result contains 3D- and corresponded two 2D-curves then tolerance will be computed with using BRepLib_CheckCurveOnSurface algorithm (check same-parameter).

If intersection result contains only 3D-curve (getting 2D-curve can be switched off by users) then tolerance will be computed with using GeomAPI_ProjectPointOnSurf algorithm (projects some point of 3D-curve on the surface and finds maximal distance).

Some workarounds have been deleted.

Some test case have been changed.
2015-07-28 17:59:22 +03:00
nbv
7365fad60b 0026310: Very slow boolean cut operations on cylinders
1. JoinWLines algorithm has been improved.
2. Reference to the V-boundaries is deleted when computing step.
3. Decreasing the tolerance when computing parameters of WLine.
4. Adding boundary point is forbidden if it lies in prolongation of found ones.
5. Possible reason of exception has been eliminated.
6. Processing of critical point has been improved.

Test cases for this issue have been created.
Correction of some test case(s).

Test case bugs/modalg_6/bug26310_4 is added

Update of test-cases for issue #26310
2015-07-22 16:11:31 +03:00
abv
5b111128de 0024023: Revamp the OCCT Handle - gcc and clang
Adaptations for compiling with GCC 4.7 and 4.8:
- Construction semantics is used for Handle objects being initialized by const Handle objects of derived type, to avoid overload resolution error in GCC 4.7.
- Missing includes added.
- Fixed bugs related to misuse of direct casts of handle.
- Eliminate CLang warnings on uninitialized and unused variables, functions, and expressions
2015-07-12 13:57:20 +03:00
abv
42cf5bc1ca 0024002: Overall code and build procedure refactoring -- automatic
Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
2015-07-12 07:42:38 +03:00
abv
c5f3a42524 0024023: Revamp the OCCT Handle -- downcast (automatic)
Automatic update by command "occt_upgrade . -downcast"

C-style cast of Handle to that of derived type (now illegal) is replaced by call to DownCast()
Const reference local variables of Handle type initialized by result of DownCast are replaced by normal variables.
2015-07-11 12:08:05 +03:00
aml
260f924fe3 0026383: Incorrect tolerance computing in IntTools_FaceFace::ComputeTolerance()
Projection of points 3d curve on faces deleted from ComputeTolerance().
2015-07-03 13:39:33 +03:00
emv
e9e644edf4 0026316: Infinite modification of the shapes in General Fuse operation
Check the validity of the intersection point between Faces.

Test case for issue CR26316

Correction of the test case for the issue.

Small correction of test case for issue CR26316
2015-06-25 12:51:30 +03:00
nbv
d4b867e617 0025416: Wrong section curve
1. Restriction line is processed in IntTools_FaceFace with using methods of GeomInt_IntSS class.
2. Check, if Restriction- and Walking-lines (or Restriction-Restriction lines) are coincided, has been added in IntPatch_ImpPrmIntersection.cxx (at that RLine is considered to be isoline only).
3. Check, if RLine and GLine are coincided, has been added in IntPatch_ImpImpIntersection.cxx.
4. Create new class IntPatch_PointLine, which is inherited from IntPatch_Line.
5. The reason of exception (in DEBUG MODE) has been eliminated.

New test cases for issue #25416 were added.

tests/bugs/modalg_5/bug24650 was modified.
2015-03-26 18:10:21 +03:00
pkv
9a5a19e98f 0025818: IntTools_FaceFace throws Standard_ConstructionError with two unbounded planes
Changes:
class IntTools_FaceFace
    - method:
 void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
                                const TopoDS_Face& aF2)
The treatment of infinite planes was corrected.

Test case for issue CR25818
2015-03-05 15:48:54 +03:00
ski
bcf50875e3 0025734: GCC warnings in Android build
Warnings were fixed.

Fixed wrong re-initialization.
2015-02-05 14:24:12 +03:00
nbv
b2af2f567d 0025715: Intersection between cylinders produces excess vertices
1. Curve boundaries were more precised.
2. Some test cases were changed in accordance of their new behavior.
3. Code fragment for WLines joining was moved to higher level (for more universal using in the future).

Code was changed in accordance with the last remark.

Added test cases bugs/modalg_5/bug25715_1 bug25715_2 bug25715_3
2015-01-29 14:01:10 +03:00
emv
1b7ae95146 0025597: Invalid curve on surface in the result of General Fuse operation
1. The tool of computing the max distance between 3D curve and its 2d representation on the face
has been moved from static methods in BOPTools_AlgoTools class to BRepLib_CheckCurveOnSurface class.
2. The tools has been applied to 2d curves built during Boolean Operation
and to some intersection curves.
3. The functions
  Standard_Boolean BOPTools_AlgoTools::ComputeTolerance
    (const TopoDS_Face& theFace,
     const TopoDS_Edge& theEdge,
     Standard_Real& theMaxDist,
     Standard_Real& theMaxPar)
and
  Standard_Boolean IntTools_Tools::ComputeTolerance
    (const Handle(Geom_Curve)& theCurve3D,
     const Handle(Geom2d_Curve)& theCurve2D,
     const Handle(Geom_Surface)& theSurf,
     const Standard_Real theFirst,
     const Standard_Real theLast,
     Standard_Real& theMaxDist,
     Standard_Real& theMaxPar)
have been developed for easy access to BRepLib_CheckCurveOnSurface functionality.

class IntTools_FaceFace
method void IntTools_FaceFace::ComputeTolReached3d()
Case for Plane/BSpline intersection added for treatment.

Test case for issue CR25597

Fix for regression boolean bsection N7.

class BOPAlgo_PaveFiller
method
  void BOPAlgo_PaveFiller::UpdateFaceInfo
    (BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDME,
     const BOPCol_DataMapOfIntegerInteger& theDMV)
Updating Face Info information with new vertices created in PostTreatFF.

Correction boolean/bsection/N2

Updated test cases.
2015-01-22 17:02:30 +03:00
pkv
0da4579283 0025456: BOPAlgo_CheckerSI reports an error on the given shape
Changes:
1. class IntTools_FaceFace
         method:
         void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
                                    const Handle(Adaptor3d_TopolTool)& dom1,
                                    const Handle(Adaptor3d_TopolTool)& dom2)

The value of testing parameter has been changed for the cases of infinite curves

Test case for issue CR25456
2014-11-21 13:58:36 +03:00
abv
0797d9d30a 0025418: Debug output to be limited to OCC development environment
Macros ending on "DEB" are replaced by OCCT_DEBUG across OCCT code; new macros described in documentation.
Macros starting with DEB are changed to start with "OCCT_DEBUG_".
Some code cleaned.
2014-11-05 16:55:24 +03:00
jgv
2a78ec6a07 0025192: Unification of LineConstructor algorithms used by GeomInt_IntSS and BOP
Small correction.

Correction of test case bug/modalg_5/bug24472
2014-09-04 13:50:37 +04:00
emv
b1574471ff 0025002: Wrong result done by Boolean Operation algorithm
class IntTools_FaceFace
method
  static Standard_Boolean DecompositionOfWLine(const Handle(IntPatch_WLine)& theWLine,
                                      const Handle(GeomAdaptor_HSurface)&            theSurface1,
                                      const Handle(GeomAdaptor_HSurface)&            theSurface2,
                                      const TopoDS_Face&                             theFace1,
                                      const TopoDS_Face&                             theFace2,
                                      const IntTools_LineConstructor&                theLConstructor,
                                      const Standard_Boolean                         theAvoidLConstructor,
                                      IntPatch_SequenceOfLine&                       theNewLines,
                                      Standard_Real&                                 theReachedTol3d,
                                      const Handle(IntTools_Context)& aContext)

Correct treatment of WLines with only one point before or after the boundary point.

Test case for issue CR25002
2014-06-26 13:04:04 +04:00
emv
2d2aa6f1a6 0025019: Command "bsection" in Test Harness with flag build pcurve on second shape works slowly.
class IntTools_FaceFace
method
  void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
                                  const TopoDS_Face& aF2)
Change the approximation flags according to the order of faces.

Test case for issue CR25019
2014-06-26 12:59:15 +04:00
emv
655fddc854 0024981: IntTools_FaceFace enters to infinite loop on the attached case
class IntTools_Tools
method
  Standard_Boolean IntTools_Tools::AdjustPeriodic
      (const Standard_Real thePar,
       const Standard_Real theParMin,
       const Standard_Real theParMax,
       const Standard_Real thePeriod,
       Standard_Real &theNewPar,
       Standard_Real &theOffset,
       const Standard_Real theEps)
The new function has been implemented for fast adjustment of pcurves to the range of surface.
Test case correction for issue CR24981
2014-06-11 10:41:58 +04:00