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

96 Commits

Author SHA1 Message Date
abv
07bbde451a 0029399: Optimize reading of floating point values from text strings
Function Strtod() is reimplemented using open source (MIT-style license) code by David M. Gay instead of strtod() provided by standard run-time library. This improves its performance by 3-10 times.

Functions Atof(), Strtod(), Printf(), Sprintf(), Fprintf() are declared as extern "C" to be usable from C programs.

Strtod() is used in Interface_FileReaderData::Fastof() and in RWStl_Reader to accelerate their work.

DRAW command QATestAtof and test perf fclasses strtod are added to check correctness and performance of Strtod().
Test perf draw restore is added to monitor performance of reading BREP files.

Minor off-topic corrections:
- method Standard_GUID::Assign (const Standard_UUID&) is implemented (was empty);
- Precision.hxx is included in BRepMesh_Vertex.hxx that uses it.
2018-01-26 20:11:03 +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
emv
944768d277 0029312: Using OBB to speed up Boolean Operations
1. Implementation of the user-defined option for usage of Oriented Bounding Boxes (OBB) in Boolean Operations for additional filtering (rejection) of selected for intersection pairs of sub-shapes.

By default the usage of OBB is turned off.
To enable/disable its usage the method SetUseOBB(flag) should be used. This method is available for all operations in Boolean Component.
To enable/disable it in draw the command "buseobb 0/1" should be used. Note, that this will affect all subsequent operations.

The OBB for the shapes are built by first necessity and stored into operation context (IntTools_Context).

2. Usage of the OBB in some test cases.
2017-12-08 16:39:15 +03:00
nbv
1a0339b464 0029311: Implementation of the Oriented Bounding Boxes (OBB) functionality
1. The class Bnd_OBB has been created to describe the Oriented Bounding Box.

2. Several key methods have been implemented: Bnd_OBB::IsOut(...), Bnd_OBB::Add(...) and Bnd_OBB::Enlarge(...).

3. Interface of Bnd_Box class has changed. New methods have been created. See Bnd_Box.hxx for detailed information.

4. BRepBndLib and Draw_Box classes have been amended in order to provide correct work with Bnd_OBB class.

5. Interface of "bounding" DRAW-command has been changed. Please see help for detailed information.

6. New DRAW-command "isbbinterf" has been created. Please see help for detailed information.

7. "boundingstr" and "optbounding" DRAW-commands have been eliminated because their function can be made by "bounding" DRAW-command (e.g. see tests/bugs/vis/buc60857 or samples/tcl/snowflake.tcl test cases).

8. Documentation has been updated.
2017-12-08 16:39:11 +03:00
emv
81a55a6996 0029333: Boolean Operations - Prevent modification of the input shapes in case their sub-shapes have not been modified
Prevent modification of the input shapes in destructive mode in case their sub-shapes have not been modified:
1. Prevent edge splitting for the pave blocks with old vertices if it is possible to use the existing edge (*BOPAlgo_PaveFiller::MakeSplitEdges*);
2. Prevent creation of the new containers (WIRES/SHELLS/COMPSOLIDS) if non of its parts have been modified (*BOPAlgo_Builder::FillImagesContainer*);
3. Prevent creation of the new face if non of its wires have been modified (*BOPAlgo_Builder::FillImagesFaces*);
4. If possible, use the original face to be the representative for the group of SD faces (*BOPAlgo_Builder::FillSameDomainFaces*).

Cosmetic changes:
1. Documentation of the *BOPAlgo_Builder* class.
2. Making simple methods of the *BOPAlgo_Builder* class inline.
3. Getting rid of the *BOPAlgo_Builder::mySplits* field as it is excessive. *BOPAlgo_Builder::myImages* can be used instead.
3. Moving the Check Inverted option from *BOPAlgo_Options* to *BOPAlgo_Builder*.

Test cases for the issue.
Adjustment of the test case to their current behavior.
Test case *blend/complex/H2* has been deleted as duplicate of the test case *blend/simple/Z1*.
2017-11-30 12:11:20 +03:00
msv
f16a6cc5aa 0028467: Improve UnifySameDomain performance
This patch turns off some not needed modes of fix in the called ShapeFix_Face algorithm.

It stores pcurves on planes in the edges to avoid repeated computation of the same pcurves many times (it is done only when SafeInputMode is false).

It avoids unnecessary replace/apply actions in the modification context.

It removes the code that makes decomposition of surface of the face on several faces.

The new command buildpcurvesonplane has been added, which builds and stores pcurves of edges on planar faces. This is useful for investigations how presence of pcurves on planes influence performance of algorithms.

Make drawing of dimension line in snowflake test independent on the order of vertices in the result.
2017-11-14 15:56:53 +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
98b3765966 0029237: Improve performance of Boolean Operations
In order to improve performance of Boolean Operations on the relatively fast cases the following improvements have been made:
1. Initialization of the FaceInfo information for the faces participating in Face/Face interference, even when the gluing is ON, to take into account intersection of their sub-shapes.
2. Code simplification & duplication removal - the methods BOPAlgo_ShellSplitter::MakeConnexityBlocks and BOPAlgo_WireSplitter::MakeConnexityBlocks have been unified into BOPTools_AlgoTools::MakeConnexityBlocks.
3. Avoid unnecessary bounding box computation for solids during DS initialization. The bounding boxes for solids will be computed during the building stage to find faces located inside solids.
   For the shape self-interference check (performed by the BOPAlgo_CheckerSI), the bounding box is still computed, as it is necessary to resolve Shape/Solid intersections.
4. Use only three sample points to check coincidence of line and plane.
5. Perform necessity of planes intersection only when the gluing is off.
6. Avoid repeated initialization of 2D classifier while building splits of the faces.
7. Post treat stage:
7.1. Method CorrectWires: Save edge's data (PCurve, parameter of the vertex, range) to avoid its recalculation.
7.2. Method CheckEdge: While checking vertices on edges avoid unnecessary calculation of their location.
8. Provide possibility to disable the classification of the input solids on the inverted status (to be the holes in the space).
9. Avoid building of bounding boxes for faces/solids during splitting of the input arguments for their classification relatively hole faces/shells if there are no holes created.
10. Avoid rebuilding of the faces/solids from arguments which does not acquire any inside parts from other arguments during the operation by using their draft versions as their splits.

Test cases for the issue.
Correction of the test cases boolean gdml_public A9 and bugs modalg_7 bug28485 as they are improvements.
Additional test case for the issue #28485 as it is fixed by the current changes.
2017-11-01 17:27:08 +03:00
abv
6b55f8e398 0028478: Scope Names Are Swallowed in Message_ProgressSentry Constructors
Tests are added to control output and performance of progress indicator (bugs fclasses bug28478 and perf fclasses progress, respectively).

Implementation of class Draw_ProgressIndicator is improved to update indicator basing on achieved total progress (1% by default) instead of elapsed time since last update.

Method OSD_Chronometer::Restart() is fixed to actually reset the counter.

DRAW command readstl is improved to show progress indicator if configured (by command XProgress).

Description of class Message_ProgressIndicator is updated; code example is added in description of Message_ProgressSentry.
2017-08-30 13:52:33 +03:00
kgv
6a2ed6e82b 0028938: Tests - remove useless file artifacts of test cases perf/de/bug26338 2017-07-27 13:59:34 +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
b7c18ef8b0 0028725: Degradation in performance of BRepExtrema_DistShapeShape
Test case has been created.
2017-05-18 11:57:39 +03:00
aml
83f32108f6 0028600: Bad performance of the checkshape command
Shell check has been improved to use well-known width-first search. It significantly reduces computation time on the big shells.

Test case has been added.

Minor correction in test case
2017-03-30 14:04:26 +03:00
abv
6662fe6313 0028404: DRAW - avoid useless preparation of display data when shape is not shown
Class DBRep_DrawableShape is changed to postpone generation of display data until the shape is actually displayed (for the first time).

Test perf draw bug28404 is added.
2017-02-02 16:51:36 +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
kgv
f767cea690 0027608: Tests - drop useless performance comparison from perf/fclasses/handle
Correction of test case perf/fclasses/handle according to the current behavior
2016-06-23 18:14:31 +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
abv
b508cbc59f 0026338: STL export (especially binary) needs a lot of time if selected export path is not local
Method StlAPI_Writer::Write() is reimplemented to write triangulation directly, without conversion to StlMesh_Mesh.

New DRAW command "tessellate" is added to generate rapidly triangulation of prescribed size (on surface).

Command "tricheck" is protected to deal correctly with triangulation without UV data.

New tests added: perf de bug26338_1 and _2; bugs stlvrml bug26338

Correction of testing environment
2016-03-03 14:16:57 +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
ski
5747059b21 0026833: Create command checkview containing all viewer types
Created command checkview for displaying shapes.
2016-02-05 11:14:37 +03:00
ski
58cf74e0c0 0025945: Make stable checking of shape global properties in tests
- Added function checkprops, set default tolerance parameter to 1.0e-4
- Using "area" instead of "square".
- Options "-equal\notequal" isn't used together with "-s" in blend and offset test cases.
- Correct regressions/differences/improvements and CPU problem (set props tolerance to 0.1)
- Corrected test cases to use checkprops proc.
- Correct image difference
- Updated TODOs in test cases.
- Updated test cases to get correct images of result shape
2015-12-10 16:56:03 +03:00
ski
a4eba92071 0026742: Update test cases for using checknbshapes procedure instead of global variables
Test cases were updated.
2015-10-08 10:54:30 +03:00
apv
97d87ffa94 Adjusting test cases at current state of OCCT master 2015-09-18 13:27:58 +03:00
abv
d1a67b9d1b 0024816: Tool for upgrading OCCT and dependent code
A new script adm/upgrade.tcl defines a Tcl procedure occt_upgrade, to be used for upgrading code of OCCT and applications for changes introduced by OCCT 7.0.
Batch script upgrade.bat is provided for convenience.
File upgrade.dat contains data (lists of classes) required for some upgrade steps.
Details on upgrade procedure are put in dox/dev_guides/upgrade/upgrade.md.

OCCT code corrected to improve compatibility with code based on previous versions of OCCT:
- Added conversion operator of handle to bool, for use in conditional expressions.
- Forward declaration of argument class restored in macro DEFINE_STANDARD_HANDLE.
- Includes of used classes added in some headers to avoid problem of missing includes in dependent code
- Type cast operators to base curve and surface added in GC and GCE2d classes to reduce porting issues.

Added test for local reference to handle initialized by temporary handle to derived class.

WOK and CDL User Guides removed.
2015-08-19 19:03:16 +03:00
mkv
16a24b6781 Adjusting testing case 2015-08-07 11:06:21 +03:00
apv
380eaf77b9 Adjusting test cases at new structure of OCCT 2015-07-23 11:46:13 +03:00
abv
1c29294ea0 0026457: Failed build with OCCT_DEBUG enabled
Debug code enabled with OCCT_DEBUG macro corrected for compiling with new handles.

QANCollection_Handle.cxx simplified so as to avoid need of using /bigobj option when building by Visual Studio; templates of project files, CMake projects, and test perf fclasses handle corrected accordingly.

Script genproj corrected to recognize VTK and to build DRAWEXE as executable (rather than DLL).
2015-07-17 19:20:06 +03:00
abv
e8862cf41a 0024870: Provide OCCT RTTI test cases
Test commands for checking performance and functionality of OCCT handles and RTTI added.
New test case added for that: test perf fclasses handle.

Implementation of opencascade::handle improved to enable compile-time error if two handles of incompatible types are compared.
Comparison of handle to NULL is not possible any more; method IsNull() should be used instead.

Method LDOM_MemManager::Doc() is removed to avoid cyclic dependency of headers; constructor of LDOM_Document(LDOM_MemManager&) is used directly instead.

Inclusion of headers corrected for compilation after previous patch.
2015-07-12 12:30:27 +03:00
abv
69ff08ff28 0024947: Redesign OCCT legacy type system
Global static functions instantiating RTTI descriptors for class types (used though STANDARD_TYPE macro) are replaced by template static method Instance() of the class Standard_Type.
Implementation of RTTI is revised accordingly (global registry of type descriptors added to ensure single instance of each type descriptor shared by all dynamic libraries).
Obsolete methods of Standard_Type class (IsInstance(), Ancestors()) are removed; new method Parent() is added returning type descriptor of the parent class.
Class Standard_AncestorIterator is removed; this iteration can be easily done by recursive calls to Standard_Type::Parent().

Definition of macro STANDARD_TYPE() moved from Standard_Macro.hxx to Standard_DefineHandle.hxx.
Inclusion of Standard_Type.hxx and the class header is now necessary for use of method DownCast() and function STANDARD_TYPE() for the class.
In general, Standard_Type.hxx should be included now instead of Standard_DefineHandle.hxx in places where these macros are used.

Macro DEFINE_STANDARD_EXCEPTION changed to define all methods inline; macro IMPLEMENT_STANDARD_EXCEPTION becomes obsolete.
Macros IMPLEMENT_DOWNCAST, IMPLEMENT_STANDARD_* become deprecated, they are still defined (as empty) for compatibility.

Implementation of Handle classes became fully inline.
Method get() is added in Handle classes returning pointer to the contained object.

RTTI removed from NCollection_Handle class.

Standard_Persistent is made empty descendant of Standard_Transient, instead of implementing its own hierarchy with reference counting.

Unused enumerations Standard_InternalType, Standard_WayOfLife, Standard_KindOfType are removed.
Global function HashCode() accepting Handle(Standard_Transient) is removed; HashCode() for Standard_CString with length should be used instead.

DRAW command dtryload is added for testing dynamic load / unload of the specified library.
New test perf fclasses bug24947 uses this command to measure performance of multiple (1000 times) loading / unloading OCCT libs on example of TKSTEP.
2015-07-11 11:05:31 +03:00
nbv
d0820f2e56 0026151: Wrong result obtained by intersection algorithm.
1. Methods IntPolyh_MaillageAffinage::GetMinDeflection() and IntPolyh_MaillageAffinage::GetMaxDeflection() have been created (see cdl-file for more detail information).
2. Extended check, if starting point of WLine is a tangent point, has been implemented in IntWalk_PWalking::Perform(...) method.

Test cases for issue CR26151
2015-06-10 10:39:34 +03:00
dbp
9e50612044 0026203: Foundation Classes - provide method ::Swap() for NCollection_IndexedMap and NCollection_IndexedDataMap to transpose map elements
Add new tests in group "perf ncollection".
2015-05-21 13:31:46 +03:00
apn
aad4bc1f7b 0026192: Porting testing database on Debian70 64bit
Modified test cases for platform Debian70 64bit

Changed todo mapping for Debian70-64
2015-05-14 17:35:28 +03:00
azv
d721c8eb3d 0024285: Updates of PLib::EvalPolynomial for code acceleration
Functions PLib::EvalPolynomial and PLib::NoDerivativeEvalPolynomial are refactored to allow generation of faster code:
1. Iteration by degree is made in outer loop
2. Avoided pointer arithmetic
3. Recursive templates are used to expand loop by dimension in specific cases (1-15)
2015-04-23 17:03:41 +03:00
apn
dfa0d64a91 0025934: Review PERF test group
Remove perf subgroups which don't contain meaningful check
2015-03-19 15:48:37 +03:00
mkv
f1b0b4f9c6 Update for difference of behavior between 32 and 64 bit 2015-02-27 16:51:46 +03:00
bugmaster
50b994e73f Adjusting testing cases
1. bugs modalg_4 bug697_2 bug697_4 bug697_7 bug697_8 - unstable test cases after fix 25735
Its will be checked and modified during work with performance (issue 24232).

2. bugs mesh bug25364 was tuned for 64-bit Windows.

3. de step_1 ZQ2 fails (64-bit only). Issue 25848 was registered.

4. de step_3 D8 shows improvement (no checkape error) in 64-bit only, this is after 22598 and  issue 25797 was registered for that.

5. draft angle G8 improvement (algorithm produces some shape, but fails on checkshape).

6. perf ncollection A1 was tuned for 64-bit Windows.

7. de step_1 R9 - update reference data (according to 25176)
2015-02-20 17:17:34 +03:00
abv
618617fe06 0023880: Integration of grid "ncl" into the new testing system
Function perf_sprint_all_meters added in OSD_PerfMeter.h to allow printing to string buffer rather than stdout. Macro PERF_PRINT_ALL converted to functional form.

Command dperf added in DRAW to print and conditionally reset all meters.
Description of these tools is added in Debug Hints.

Modified output of command QANTestNCollectionPerformance.
Added test case perf/ncollection/A1

Modified ratio of performance to check all platforms

Small correction of test-case for Windows platform
2015-01-29 13:10:14 +03:00
anv
709e97a0c1 0024961: MeshVS: revision of DRAW commands
meshfromstl - display MeshVS_Mesh object in a way consistent with vdisplay command
meshdel - deleted, vremove to be used instead
meshshowall - set empty maps of hidden IDs instead of null handles
meshhidesel - initialize the maps of hidden IDs to avoid exception
meshmat - add optional transparency argument and enable transparency in the viewer if not yet done
meshvectors - command for testing VectorPrsBuilder added

MeshVS: DRAW commands improving
Updating test cases due to previous changes
Small bug in MeshVS_ElementalColorPrsBuilder fixed
vselmode fix
Small correction of test cases for issue CR24961
2014-09-26 16:27:01 +04:00
aml
32b6a53fd8 0024398: Output of extrema draw-command has various format on optimise and debug modes
Fixed creation of extrema curve in debug mode.
Deleted space between ";" and "V" in debug output to make "llength" DRAW funcion work correctly in debug mode.
Deleted TODOs in tests/bugs/modalg_5/bug24327
Deleted TODOs in test cases with improvement in extrema output. Increased cpulimit in de, boolean and perf.
2013-11-28 11:26:32 +04:00
apn
408e0d5cf1 Adjusting testing cases
boolean bsection M9 N5
Adjusting test cases in DEBUG mode to current state of master (increase cpulimit and modified TODOs)

bugs modalg_5 bug24327
Added TODO in test case to avoid regression in DEBUG mode caused by integration of 24327

perf bop builface
Increase cpulimit of test case (problem in DEBUG mode)
2013-11-22 14:09:02 +04:00
ifv
6a7ca55848 0024292: Testing parallelization of BO
Small correction of test case for issue CR24292
2013-11-01 10:07:36 +04:00
mkv
429a6c4d2c Adjusting test unstable testing cases in Debug mode for current state of OCCT 2013-10-25 13:55:51 +04:00
abv
465d1a2c7e 0024264: OCCT 6.6.0: cutting 1600 cylinders from a box leads to out-of-memory on 32-bit system
Added test case (perf bop boxholes)
2013-10-24 16:03:28 +04:00
abv
11fca7c177 0024227: Enable SS2 instructions for OCCT building
Test for exceptions corrected to handle FPE when built with with SSE2 option on Windows (NumericError raised instead of specific exceptions)
New test for performance of bspline intersections added

sse2 added; build bitness hardlinked to compiler

"bitness" variable was hidden
2013-10-10 17:08:50 +04:00
abv
5d1833ef09 0023793: Tests failing when launched without data files
Call to locate_data_file moved from catch statement in test scripts to ensure that missing data file is correctly reported as SKIPPED status of the test.
TODO statements with single word 'Exception' made bit more specific ("**" added).
Test bugs/caf/buc60846 removed as it is aimed to test inexistent component (Sketcher).
TODO removed in test bugs/fclasses/bug22611 -- the missing command must be added or test removed.
Test bugs/step/bug133_4 removed as duplicate of bugs/step/bug133_2.
Command vinit added in test bugs/vis/bug23226 to ensure that viewer is properly initialized before command vvbo, and relevant TODO statements removed.
Redundant FAILED patterns removed in parse.rules in groups perf and v3d as they break appropriate handling of missing data files.
Added QA command OCC22611 to improve test case bugs/fclasses/bug22611.
Modified test case buc60898 (shape was renamed) and moved to folder moddata_3 to avoid checkshape in end file.
Test case vis/bug23226 was modified using function checkcolor.
2013-03-01 14:23:17 +04:00
ski
ee535a6c7c 0023752: Integration of test grid "vpr" into the new testing system 2013-02-15 17:06:19 +04:00