1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

410 Commits

Author SHA1 Message Date
emv
efac173377 0030151: Modeling Algorithms - Removal of the API level of old Boolean operations algorithm (BRepAlgo_BooleanOperation)
The following classes have been removed as obsolete:
- BRepAlgo_BooleanOperation
- BRepAlgo_Fuse
- BRepAlgo_Cut
- BRepAlgo_Common
- BRepAlgo_Section

The corresponding classes from BRepAlgoAPI package have to be used instead.

Draw commands:
- fuse
- cut
- common
- section/psection
have also been removed as obsolete.

The corresponding commands for modern Boolean operations algorithm (bfuse/bcut/bcommon/bsection) have to be used instead.

Adjustment of the test cases to use the commands for modern algorithm.
2021-09-10 20:24:50 +03:00
akaftasev
7e187d6b22 0028687: Offset for open wire is built with incorrect direction
Added new condition to exclude offsetting non closed part of circle as complete circle
2021-08-30 09:47:33 +03:00
akaftasev
55b5d19bd8 0028684: BRepOffsetAPI_MakeOffset produces wire with another orientation in compare with source wire
Added flag to reverse resulting shape, if it was reverse in BuildDomains() to bringing to the same direction as the original shape
2021-08-30 09:47:33 +03:00
bugmaster
50174691dc 0032404: Draw - problems with definition of cpulimit in tests
- The maximum value of cpulimit in test cases was limited to 1000 seconds (~ 17 minutes)
- cpulimit 1000 has been added to hlr/begin
2021-06-16 17:10:53 +03:00
luz paz
7b5e532f83 0031939: Coding - correction of spelling errors in comments [part 7]
Fix various typos

Fixed via codespell v2.1.dev
2021-01-20 21:27:44 +03:00
jgv
99c9a82021 0031735: Modeling Algorithms - BRepOffset_MakeOffset works slowly and produces wrong result
Modify method IsPlanar of BRepOffset_MakeOffset: try to make planar all possible faces to simplify the input shape.
2020-10-06 20:40:25 +03:00
msv
7e785937b3 0025748: Parallel version of progress indicator
Progress indication mechanism is refactored to support incrementing progress within multithreaded algorithms.

The class Message_ProgressIndicator is only an interface to the user application.
It accumulates the progress provided by progress scopes.
The counter is protected by mutex for thread-safety.

The new class Message_ProgressScope replacing Message_ProgressSentry should be used to advance the progress.
The scopes are nested to each other to reflect the nested nature of operations.
The new class Message_ProgressRange should be used to pass the progress to sub-scopes.

All OCCT algorithms involving progress indication have been updated to new API.

Improvements in Draw_ProgressIndicator:
- Separate console mode has been added in order to make possible to put the progress into std::cout instead
  or in addition to the draw interpreter, instead of trigger option "-tclOutput".
- Treatment of Ctrl-Break signal has been added.
  Now any operation can be aborted by Ctrl-C or Ctrl-Break keystroke.

Added new test case 'perf fclasses progr_par' for testing of parallel work of the progress.
2020-09-12 20:42:22 +03:00
kgv
d99f0355e3 0031731: Draw Harness - colorize errors and exception messages
Draw_Interpretor, CommandCmd() - catched exceptions and messages put into Tcl string result
before throwing a Tcl exception (return 1) are now print in intense red (using Message::SendFail()).
Duplication of exception message in std::cout and Tcl output has been removed.

Draw Harness plugins have been updated to use either Message::SendFail() or theDI instead of std::cout/std::cerr
for printing colored error message before throwing a Tcl exception.
2020-08-25 09:44:15 +03:00
ifv
e8e8b273bb 0029839: Modeling Algorithms - Unexpected Circle to BSpline surface extrema behavior
Extrema_ExtCS.cxx: treatment of small line segments is added;
Extrema_GenExtCS.cxx: treatment of particular cases curve-quadric and conic-surface are added
Extrema_GlobOptFuncCQuadric, Extrema_GlobOptFuncConicS: new distance functions for particular cases are added

BOPAlgo_PaveFiller_5.cxx : treatment of large common parts edge-face is improved
ElSLib.cxx : method TorusParameters(...) is modified to avoid divide by zero
math_PSOParticlesPool.cxx : initialization of array is added
2020-07-08 16:03:10 +03:00
ifv
79aa9b5cf6 0027087: [Regression to OCCT 6.7.1] BRepExtrema_DistShapeShape gives wrong result
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
2020-05-14 20:24:45 +03:00
ifv
fffc249f21 0027531: Modeling Algorithms - Make the algorithm Approx_SameParameter more clear and robust
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
2020-03-06 15:54:46 +03:00
mzernova
caee80f39f 0030697: Draw Harness - Draw_Printer should not be set to Message::DefaultMessenger() by default
Fixed bugs that occurred when using the default std::cout from Message::DefaultMessenger() instead of Draw_Printer

A dedicated option was added to Draw_ProgressIndicator, for outputting data to the tcl when performing tests

Added -tclOutput parameter to XProgress command
2019-11-23 16:09:07 +03:00
kgv
aaf8d6a98d 0030969: Coding Rules - refactor Quantity_Color.cxx color table definition
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.
2019-10-22 15:15:51 +03:00
jgv
bf327822d6 0026071: BRepOffsetAPI_MakePipeShell produces rough result
1. Correct building history: the case of closed spine.
2. Rollback method GeomFill_CorrectedFrenet::InitInterval - correct processing singularities on spine.
3. Correct test cases.
2019-10-22 15:15:48 +03:00
ifv
6f2411378b 0030433: Checkshape: bad solid, created by revolution, is reported as valid.
BRepPrimAPI_MakeRevol.cxx, hxx
Insert checking of self-intersecting of generated surfaces in MakeRevol

BRepTest_SweepCommands.cxx
Adjusting command revol to current behavior of MakeRevol algorithm.
2019-05-06 15:57:56 +03:00
ifv
afb3647b34 0030489: Modeling Algorithms - BRepBuilderAPI_GTransform hangs
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
2019-03-22 17:21:00 +03:00
nbv
4fe725a46a 0027976: Unstable work of 2d intersection algorithm for two lines
1. Test case for the issue has been created.
The problem is still reproduced on MASTER.

2. Some test cases have been moved to lowalgos/2dinter grid.
2018-12-21 15:38:03 +03:00
abv
e05c25c123 0027620: Test perf bop boxholes crashes DRAW
Implementation of capturing of output to standard streams in DRAW (see command dlog) is revised to avoid problems with command "test" executing long test scripts:

1. Method OSD_File::Capture() is removed: on Windows it was allocating a C file descriptor for a file opened using WinAPI, and never released that descriptor (once allocated, it cannot be released separately from WinAPI file handle). Direct calls to dup/dup2 are used instead.

2. In Draw_Window.cxx the standard Tcl channels are initialized manually using corrected version of Tcl internal function. This works around a problem with Tcl channels on Windows being bound to OS device handle owned by the system which can get invalidated as result of calls to dup2() (used to capture output to standard streams).

3. Temporary file for capturing is opened once and used to store whole log, thus the need to collect log in the string stream in memory is avoided

4. Possible errors of dup() and dup2() are checked and reported

Test demo draw dlog is added

Off-topic changes:

- Test demo draw getsource is corrected for VS2017 which generates file name in lowercase
- Field myFaceBounds is initialized in constructor of the class BRepAlgo_NormalProjection to avoid undefined behavior
- Test bugs modalg_5 bug24012 is corrected to use command nproject instead of custom one, and to check propertes of the resulting shape
2018-11-23 12:18:42 +03:00
jgv
1d54b80764 0028828: Modeling Algorithms - New functionalities of BRepFilletAPI_MakeChamfer algorithm
Two new functionalities have been added in BRepFilletAPI_MakeChamfer:
- constant throat (the section of chamfer is isosceles triangle, its height is constant in all sections - this is the "throat" of the weld);
- constant throat with penetration(the section of chamfer is right-angled triangle, the first of two surfaces (where is the top of the chamfer) is virtually moved inside the solid by offset operation, the apex of the section is on the intersection curve between moved surface and second surface, right angle is at the top of the chamfer, the length of the leg from apex to top is constant - this is the "throat" of the weld).

- New abstract classes BlendFunc_GenChamfer and BlendFunc_GenChamfInv have been added;
- Class BlendFunc_Chamfer is now descended from BlendFunc_GenChamfer, class BlendFunc_ChamfInv is now descended from BlendFunc_GenChamfInv.
- New class BlendFunc_ConstThroat is descended from BlendFunc_GenChamfer, new class BlendFund_ConstThroatInv is descended from BlendFunc_GenChamfInv.
- New class BlendFunc_ConstThroatWithPenetration is descended from BlendFunc_GenChamfer, new class BlendFund_ConstThroatWithPenetrationInv is descended from BlendFunc_GenChamfInv.
- Class ChFi3d_ChBuilder has now mode of chamfer that can be ClassicChamfer, ConstThroatChamfer and ConstThroatWithPenetrationChamfer.
- Two new DRAW Test Harness commands "chamf_throat" ant "chamf_throat_with_penetration" have been added for the second mode of ChBuilder.
- The interface of DRAW Test Harness command "chamf" changed for symmetric case.
2018-11-16 19:16:05 +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
a6ebe9fc7c 0028493: [Regression vs 7.0.0] Intersection algorithm produces curve with loop
1. New testgrid "lowalgos/intss" has been created. It will contain all test cases on geometrical intersection of two surfaces ("intersect" DRAW-command) and two faces ("bopcurves" DRAW-command).

2. New test case for the issue #28493 has been created because the problem is not reproduced on MASTER.

3. Test case (lowalgos/intss/bug24472) for the issue #29501 has been modified in order to check loops of the resulting intersection curves.
2018-10-30 16:04:24 +03:00
nbv
98974dccef 0029972: Intersection curve has a weird gap in the middle of it
1. The condition of WLine breaking (in IntWalk_IWalking algorithm) has become more independent of the input tolerance.

2. Currently the algorithm of IntPatch_Points of WLine processing depends on the algorithm of obtaining the WLine.

3. The methods IntSurf_LineOn2S::Add(...) and IntSurf_LineOn2S::SetUV(...) have become not inline (see the message ~0077431 in the issue #29866).
2018-09-03 17:05:14 +03:00
ifv
1dbdf099cd 0029857: Incorrect behavior of Point-Curve Extrema
Check for double solutions has been  added in algorithms Extrema_ELPCOfLocateExtPC and  Extrema_ELPCOfLocateExtPC2d
that find extrema between point and curve.
2018-06-29 12:11:45 +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
apn
0e443e130c 0028097: Test system does not recognize 'fail...' messages as errors
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).
2018-03-26 15:40:11 +03:00
nbv
8dc56d0f88 0029494: Intersection line between two parametric surfaces is restricted incorrectly if it matches the surface boundary
Creation of IntPatch_Points is forbidden in tangent-zones exceptionally domain boundaries of intersected surface.
2018-02-16 15:09:10 +03:00
emv
f9ffd4f9f3 0029465: Regression relation to 691 version: Extrema_ExtCC returns IsParallel equal to true for not parallel curves
Strengthening of the criteria of the parallel status of the curves by additional checking if the ends of the curves do not diverge.
Test cases for the issue.
2018-02-02 17:17:47 +03:00
msv
4bc805bfc6 0029368: Incorrect intersection state of the intersection point of two 2d curves
In the algorithm math_FunctionRoots, improve the case when it is needed to find the extremum of the function. Earlier, to solve this task the method of gold section was used. With the patch, firstly the algorithm tries to find zero value of the derivative function. In most cases it gives precise result. Secondly, the algorithm tries to find zero value of the function using the old approach. The algorithm chooses the best solution among two computed by different methods.

In the method PutStickPavesOnCurve of BOPAlgo_PaveFiller, forbid putting a vertex to the end of the curve if this end already has a vertex assigned to it. This allows getting rid of unwanted colliding of vertices.

In the method UpdatePaveBlocks of BOPAlgo_PaveFiller, make the check for micro edges more precise.

New category of tests "lowalgos" has been added. Tests for low level algorithms are to be put there. "2dinter" is a new group of tests in this category.

Introduction of the new key for "2dintersect" command, allowing printing the intersection state for each point.
It has the following syntax now:
"2dintersect curve1 [curve2] [-tol tol] [-state]"
Options:
-tol - allows changing the intersection tolerance (default value is 1.e-3);
-state - allows printing the intersection state for each point.

Correct the test case bugs/modalg_7/bug28274 to make proper checks of the result.
2018-01-17 16:43:31 +03:00
nbv
624c599cd3 0029359: Approximation algorithm computes multidimensional distance in Euclidean space incorrectly
Wrong distance computation has been corrected.

Some test-cases have been corrected according to their new behavior. Namely, built (by approximation algorithm) curve(s) has changed its geometrical position.

1. tests/blend/simple/X4

It is not a regression because the result is not correct on both MASTER and FIX (see explanation in the issue #26740). This problem is expected to be solved after porting Fillet-algorithm to new Boolean operation. Old Boolean operations do not cover Edge-Edge tangent-zone by vertex.

2. tests/bugs/modalg_6/bug27341_318

"checknbshapes" has been deleted in order to avoid non-stable behavior (see issue #29360) of this test case. New result is OK on both Linux and Windows platform.
2017-12-11 11:19:22 +03:00
mkv
c2e47bdd8d Update of tests database
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
2017-11-24 15:39:23 +03:00
mnt
53a1447a00 0029133: Unstable test cases
Adding new and early removed for some reasons test cases

Removing TODO ?

Adding necessary TODO ? on corresponding platforms for OK and BAD cases
2017-11-02 17:02:45 +03:00
emv
edfa30deef 0028259: Method MakeBlocksCnx is duplicated in two different places in BOPAlgo
The methods BOPAlgo_Tools::MakeBlocksCnx(), BOPAlgo_Tools::MakeBlocks() and static method MakeBlocksCnx in BOPAlgo_Builder_2.cxx have been replaced with the new template method BOPAlgo_Tools::MakeBlocks(). The blocks of connected elements are now stored into the list of list instead of data map.
All methods BOPAlgo_Tools::FillMap() have been replaced with the new template method BOPAlgo_Tools::FillMap().

Making the Pave Block with the smallest index of original edge to be the first in the Common Block (i.e. the representing Pave Block).

The following improvements have been made in Boolean Operations algorithm to avoid regressions:
- When updating the existing common block update its pave blocks in a way that the parameters of the paves should be valid for the original edge (bugs/modalg_5/bug24809);
- When trying to reduce the tolerance of the section edge check the tolerance of all Face/Face interferences that created this edge (boolean/volumemaker/C4,D2);
- Avoid producing the different Pave Blocks for the same section edge (boolean/volumemaker/D6);

Adjustment of the test cases.
2017-06-01 10:20:25 +03:00
nbv
261b7d9e8a 0028222: Intersection of two cylinders fails
1. The reason of exception has been eliminated.

2. Algorithm in IntPatch_WLineTool::JoinWLines(...) method has been modified in order to forbid join curves in the point where more than two intersection lines meet. More over, joining is forbidden if local curvature in the connection point is too big (see function CheckArgumentsToJoin(...) in the file IntPatch_WLineTool.cxx).

3. Interface of IntPatch_WLineTool::JoinWLines(...) method has been modified in order to reduce number of arguments.

4. Small corrections in IsSeamOrBound(...) static function has been made. Namely, check has been added if two boundaries are in the same period region but are too far each to other (see IntPatch_WLineTool.cxx, IsSeamOrBound(...) function, line # 532).

5. "Reversed" flag has been made local. Now, it is pure local characteristic: the algorithm decides itself, shall we reverse the argument order. This correction makes the algorithm more commutative (see issue #25404). However, IntPatch_WLineTool::JoinWLines(...) method can return non-commutative result.

6. Algorithm of searching small intersection curves has been improved.

7. New methods have been added in Bnd_Range class.

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

1. tests\bugs\modalg_6\bug26310_3
   tests\bugs\modalg_6\bug26310_4
   tests\bugs\moddata_2\bug235
   tests\perf\modalg\bug26310_1
   tests\bugs\modalg_5\bug24915

Logic of these cases has been changed. Mover over, additional check has been added in "bug26310_1" test case. Therefore, its performance will be slower than on the current MASTER.

2. tests\bugs\modalg_5\bug25292*

Scripts have been rewritten in order to make it more readable. Logic of these cases has not been changed.
2017-05-26 14:48:59 +03:00
nbv
b608f6a564 0028677: Avoid change of wire orientation in BRepLib_MakeFace if the wire is open
Method BRepLib_MakeFace::CheckInside() is not called for open wire. So, if the input wire is open its orientation is not changed in the result face.
2017-05-05 11:27:53 +03:00
nbv
3b6ffeaca7 0028492: Boolean common does not produce expected result
Generation of 3D-steps shorter than 3D tolerance has been allowed in the fix to build Walking-line.

Now, 3D-step is limited by Precision::Confusion value.
2017-03-16 13:31:01 +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
ski
44fae8b193 0027691: Remove dchrono from all test cases and move its to perf group
Remove performance comparing with hardcoded value.
Test cases for performance of some commands were moved to perf group.

Updated documentation.
2017-01-19 17:24:46 +03:00
aml
f79b19a17e 0028175: Bad result of curve-curve extrema
Extrema between curves has been made producing correct result for the cases of solution located near bounds.

- Class math_GlobOptMin has been improved to use lower order methods of local optimization when high-order methods are failed.
- Add support of conditional optimization (in bounds) in the classes math_BFGS and math_BracketMinimum.
- Turn on conditional optimization in the case of usage of math_BFGS in the class math_GlobOptMin.
- Correct mistake in distmini command, which caused incorrect reading of deflection parameter.
- To avoid possible FPE signals, ensure initialization of fields in the class math/math_BracketMinimum.
- In the algorithms math_BFGS, math_Powell and math_FRPR, take into account that the function math_MultipleVarFunction can return failure status (e.g. when computing D0 out of bounds).

New test cases have been added.
Tests cases are updated.

// correct test case
2016-12-15 16:33:12 +03:00
nbv
f73c584ceb 0027896: Prm-Prm intersection algo returns wrong result if it is called with start intersection point, which lies in the domain boundary
Purger has been disabled (in IntPatch_PrmPrmIntersection algorithm) if some points have been added in the Walking line (it is stupidly, first, to insert some points in the line and, after that, to delete points from this line).

Some improvements in IntWalk_PWalking::SeekPointOnBoundary(...) method have been made (see comments in the code for detail information).

Some test cases have been adjusted according to their new behavior.
2016-11-08 15:15:11 +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
nbv
4e283d3379 0027895: Correction in the constructor Extrema_ExtElC::Extrema_ExtElC (const gp_Lin&,const gp_Lin&,const Standard_Real)
Computation algorithm is made more simple.
Adjusting some test cases according to their new behavior.
2016-10-07 13:37:35 +03:00
nbv
d30895f5da 0023178: Intersection of cylinders fails to produce results
1. Unification of trimmed and not-trimmed cylinders processing (IntPatch_Intersection::GeomGeomPerfomTrimSurf() method has been removed).
2. Interface of IntPatch_ImpImpIntersection::Perform(...) method has been changed.
3. Now, WLine purging is forbidden for Geom-Geom-Intersection.
4. Bnd_Range class has been created. See Bnd_Range.hxx for detail information.
5. Algorithm of AddBoundaryPoint function has been improved in order to obtain intersection points in both boundaries (VFirst and VLast of every surface).
6. Earlier, method Geom2dConvert::ConcatG1(...) increased resulted B-spline degree (in case of not succession of previous iteration). Now increased value has been limited by Geom2d_BSplineCurve::MaxDegree() value (max degree = 25).
7. Algorithm of B-spline closure definition has been changed in the methods Geom2dConvert::C0BSplineToC1BSplineCurve(...) and Geom2dConvert::C0BSplineToArrayOfC1BSplineCurve(...).

Creation of test case for this issue.
Adjusting test cases according to their new behavior.

Small correction in the code according to KGV's remark.
2016-10-07 13:37:31 +03:00
isn
b47bcd7ea7 0025957: nurbsconvert modifies original shape
- Ensure that the subshapes from the original shape will not be changed after nurbsconvert operation.
For that create the new vertexes (NewPoint(..)) as well as new curves (NewCurve(..)) and new surfaces (NewSurface(..)) before calling of Rebuild() method. Make copies of all vertexes impacted by curve or surface modifications. This eliminates necessity of creation of new vertices during recursive rebuilding of the entire shape.

- Compatibility with the old behavior of BRepTools_Modifier has been retained as an option. For that the new flag MutableInput has been added in the interface of the class.

- This patch also impacts other operations based on BRepTools_Modifier, in the sense that they also become safe regarding input shapes.

- Create new test cases. Some test cases with nurbsconvert command are changed to lock input shapes from modifications.

fix regressions
2016-08-18 14:46:13 +03:00
emv
01b5b3df55 0027448: BOPTools_AlgoTools::IsMicroEdge does not correspond to shape validity criteria
1. IntTools_ShrunkRange::Perform
The algorithm of building shrunk range on the edge has been redesigned to make this range as big as possible.
By new definition it has to have the length not less than Precision::Confusion().
Although, the possibility of splitting of the edge has been taken into account. If it is impossible to put
vertex on edge in such a way that the tolerance spheres of the edge's vertices do not intersect the tolerance
sphere of the putting vertex the edge cannot be split. This possibility is saved in the new field
IntTools_ShrunkRange::myIsSplittable. It can be checked by the corresponding method IntTools_ShrunkRange::IsSplittable().
It returns TRUE if the shrunk range is computed successfully and it has the length more than the value of sum of two tolerance
values of the edge (for putting vertex, as its tolerance should not be less than the tolerance value of edge) and
two Precision::Confusion() values (to make two new edges valid by Shape validity criteria).

IntTools_ShrunkRange::myErrorStatus and IntTools_ShrunkRange::ErrorStatus() have been replaced by
the IntTools_ShrunkRange::myIsDone and IntTools_ShrunkRange::IsDone(). IntTools_ShrunkRange::IsDone() returns TRUE
if the shrunk range has been computed and it has length more than Precision::Confusion().

All computations of the parameters are performed using the GCPnts_AbscissaPoint, but if AbscissaPoint is unable to
compute the parameters the Resolution of the curve is used.

2. Boolean Operations algorithm now partially works with the edges that cannot be split or does not have the ShrunkData
at all (previously such edges have been considered as micro and just ignored). If by the result of some intersection such
edges should be split, i.e. the intersection vertex should be created, the algorithm just ignores them and no vertex is created.
But if such edges coincide with other shapes (other edges or faces) the algorithm uses them for creation of common blocks.
The information of the possibility for the edges to be split is saved in its PaveBlocks, in the new BOPDS_PaveBlock::myIsSplittable field.
It can be retrieved by the BOPDS_PaveBlock::IsSplittable() or BOPDS_PaveBlock::ShrunkData(), but these methods
make sense only after filling of the shrunk data for the pave block.

BOPTools_AlgoTools::IsMicroEdge() has an additional parameter that defines whether it is necessary to take into account
the possibility for the edge to be split or not. By default it is set to TRUE, i.e. by default the edge will be considered as micro
even if the shrunk range is computed, but it is too short for the edge to be split.

3. BOPAlgo_PaveFiller::PerformEF
To avoid creation of too close intersection vertices the intersection ranges of the edges participating in Edge/Face
intersections are reduced taking into account the common ranges computed during Edge/Edge intersections.
Thus, the Edge/Face intersection vertex is not created if it gets into a common range of the Edge/Edge intersection
between that edge and one of the face's edges. The tolerance value of Edge/Edge intersection vertex is increased
to reach the Edge/Face intersection.

4. Unification of the vertices of the section edges considered as micro edges.
If by the result of some Face/Face intersection the section edge is considered as micro edge,
the vertices of this edge will be united and the edge itself will be removed.

5. Test cases for the issues.

6. Adjusting test cases for issue CR27448.
2016-07-28 15:00:26 +03:00
aml
52db475165 0027015: Sewing returns invalid shape if some faces are nearly plane cones
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
2016-06-03 10:47:08 +03:00
aml
5ae6e53dec 0027341: Incorrect exact HLR results
- 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.
2016-05-27 11:57:50 +03:00
jgv
c59fcd1186 0027468: Incorrect processing of some cases by HLR algorithm
Incorrect work of HLR algorithm caused by usage of wrong tolerances, wrong sampling of 2d curve and some other bugs are fixed.

Test cases for issue CR27341
2016-05-12 10:33:35 +03:00
ski
863f782a42 0027146: Create command checkplatform
Command checkplatform was created.
All test cases were updated.

Global variable os_type was eliminated.
New option -osx (MacOS) for procedure checkplatform was added.
2016-04-08 11:42:00 +03:00
emv
5be33fb667 0027274: Regression vs 6.9.1: Wrong result of General Fuse operation on two cylinders
When reducing the tolerance values of the vertices put on section curves take into
account all section curves, not only those for which the tolerance have been reduced
(method void BOPAlgo_PaveFiller::CorrectToleranceOfSE()).
The new protection has been added to avoid reducing of tolerance values of vertices
to the values less than the tolerance values of edges containing these vertices.

Adjusting of test case bugs/modalg_5/bug25232_9
2016-03-24 12:49:28 +03:00
myn
ff205346c9 0026961: Recover possibility to read files in old persistence format
Possibility to read shapes and OCAF documents from old persistence format (Std and StdL schema) is restored.

Test cases used old persistent files on input are restored with suffix "_std"

Removing toolkit from OS package
2016-03-04 07:31:08 +03:00