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

200 Commits

Author SHA1 Message Date
dpasukhi
ea86bfe2fa Testing - Removing direct DCAF loading #147
DCAF require VISUALIZATION for correct work.
  In some scenario DRAWEXE can generate a dublicates of the
  internal static singletons. This means each dynamic library
  will have their own instance of the static singleton.
Update all direct library loading to use the DCAF plugin
  mechanism. This will ensure that the DCAF plugin is loaded
  only once and that the correct instance is used.
Originally issue is reproduced only Linux with dlopen with "RTLD_LAZY".
Can be resolved additionally adding "RTLD_LAZY | RTLD_GLOBAL" for dlopen
2024-11-05 17:00:06 +00:00
jfa
b0922ff9a1 0033828: Modeling Algorithms - GCPnts_QuasiUniformDeflection returns very different results under small change in deflection 2024-09-26 13:47:31 +00:00
luzpaz
099e0d2524
0033807: Documentation - Fix various typos found in codebase 2024-08-31 14:26:15 +01:00
oan
631a34a05f 0033567: Modeling Data - GeomLib_IsPlanarSurface raises exception SIGFPE Arithmetic Exception in Release mode
Add protection against zero-division
2024-01-12 17:23:55 +00:00
ichesnok
e3841f9ffe 0033318: Data Exchange - Modifying the BRep flag after exporting the shape
Fixed condition for setting 'checked' flag
2023-05-17 21:46:06 +01:00
msv
42e4ae96ae 0033304: Modeling Data - Floating point signal when converting a B-spline curve to analytical form
Protect the static function ConicDefinition from calling sqrt with negative argument.
2023-01-03 18:00:55 +00:00
smoskvin
057dcfddf7 0033225: Changing the status of tests on Ubuntu 20.04 and Windows 64 VC142 2022-11-28 00:04:06 +03:00
azv
d74b1e9dd3 0033049: Command 'tclean -geom' does not remove all geometric objects from the shape
Remove unused P-curves when cleaning the geometry
2022-07-08 19:30:12 +03:00
akondrat
fb30026cf1 0033009: Foundation Classes - Bnd_OBB::ReBuild() expects point array starting from 0
Add test. Update OBBTool constructor for any bounds of array of points.
2022-06-14 21:50:31 +03:00
ifv
a0b4fff17a 0028866: Modeling Data - Problem with GeomAPI_ProjectPointOnSurf
Extrema/Extrema_GenExtPS.cxx - adaptive setting of sample points is implemented
bugs/moddata_3/bug28866 - test case added
2022-04-22 18:51:27 +03:00
azv
d8bfee7b03 0031437: Modeling Data - Offset surface throws exception when trying to evaluate at singularity point
Add test case to prove the exception is avoided.
2022-04-16 22:29:47 +03:00
ifv
fc41d3b1c0 0032842: Modeling Data - a regression in conversion of a face to bspline
GeomConvert/GeomConvert_1.cxx - forbid using CheckAndSegment if trim is out of base period when converting
                                trimmed torus

tests/bugs/moddata_3/bug32842 - test case added
2022-04-12 20:50:29 +03:00
ifv
1f37f1d50a 0031661: Modeling Data - Exception when projecting parabola or hyperbola to plane
ProjLib/ProjLib_ProjectOnPlane.cxx - formatting

0031661: Modeling Data - Algorithm crashes when projecting parabola or hyperbola to plane

ProjLib/ProjLib_ProjectOnPlane.cxx - building of analytical parabola and hyperbola is added
bugs/moddata_3/bug31661_* - new test cases are added
2022-04-06 03:15:07 +03:00
abulyche
ab279b126b 0029745: Modeling Data - GeomAdaptor_Surface::VIntervals fails on periodic surfaces
Fixed GeomAdaptor_Curve::LocalContinuity() for periodic curves.
Fixed GeomAdaptor_Curve::NbIntervals() for periodic curves.
Fixed GeomAdaptor_Curve::Intervals() for periodic curves.
Improved definition of length in tests.
Update Geom2dAdaptor_Curve to the same behavior.
2022-03-31 21:47:58 +03:00
knosulko
4ec4e4e8a8 0030272: Modeling Algorithms - Incorrect work of gproject
-fix TolU/V for approximation;
-fix cutting tool for approximation;
-add method Adaptor3d_HSurfaceTool::IsSurfG1.
-add test bugs/moddata_3/bug30272
2021-12-07 22:32:14 +03:00
knosulko
81f57d1135 0030046: Modeling Algorithms - Cannot find necessary projection of the curve
move algorithm of obtaining results from function gproject to method ProjLib_CompProjectedCurve::Perform;
fix tolerances in ProjLib_PrjResolve::ProjLib_PrjResolve;
new treatment of myMaxDist;
use extend bounds in approximation;
add test;
test case "bugs modalg_5 bug25980", "bugs modalg_7 bug24185" have been changed according to new behavior.
2021-10-26 23:10:34 +03:00
ifv
9923f08703 0032557: Modeling Data - Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with gaps
GeomConvert/GeomConvert_1.cxx - method CheckAndSegment is added to adjust surface periodic boundaries
bug32557 - test is updated by new cases
2021-10-25 11:18:27 +03:00
ifv
f277dcbbc0 0032557: Modeling Data - Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with errors
BRepTools/BRepTools_NurbsConvertModification.cxx -
 Checking domain of 2dCurves if surfaces are periodic is improved

tests/bugs/moddata_3/bug32557 - test case added
2021-09-28 20:10:04 +03:00
ifv
e2421df543 0030422: Random behaviour of BRepAdaptor_CompCurve
BRepTools/BRepTools_WireExplorer.cxx - replace MapOfShape vmap by IndexedMapOfShape
to avoid random behavior of algorithm

bugs/moddata_3/bug30422 - new test case added
2021-09-15 20:07:06 +03:00
ifv
9592ae247b 0027457: Modeling - Raise exception if scaled transformation is used for shape location
Implementation of raising exception while using scale and mirror transformation in shape location
TopLoc/TopLoc_Location.hxx
TopoDS/TopoDS_Shape.hxx

Implementation of new tools for removing forbidden locations from shapes:
BRepTools/BRepTools_PurgeLocations.cxx
BRepTools/BRepTools_PurgeLocations.hxx
BRepTools/BRepTools.cxx
BRepTools/BRepTools.hxx

Draw commands for transforming shapes are corrected, new draw commands: purgeloc, checkloc added
BRepTest/BRepTest_BasicCommands.cxx

Fixing unstable test bug xde bug24759
StepToGeom/StepToGeom.cxx

All other C++ commits are modification of algorithms used mainly in import/export operations in order to allows these operations if shape locations contains scale and mirror transformations.

New test for command purgeloc added
tests/bugs/moddata_3/bug27457
tests/bugs/moddata_3/bug27457_1
tests/bugs/moddata_3/bug27457_2

Some test corrected according to modifications.
2021-08-20 20:18:06 +03:00
jgv
1a75fcddae 0032470: Modeling Algorithms - BOP wrong result on sphere and box
Correct adjusting pcurves on periodic surfaces: take the middle point as a reference point.
2021-08-04 20:08:52 +03:00
oan
f1c034f905 0032471: Mesh - Deflection of the triangulation is not recomputed for planar face
Method EstimateDeflection has been added to BRepLib in order to check and update value of deflection provided by Poly_Triangulation;
Introduction of Poly_TriangulationParameters intended to keep info about initial parameters of mesh stored by Poly_Triangulation;
BRepMesh stores user-specified parameters to Poly_Triangulation via Poly_TriangulationParameters;
Prefer initial parameters of mesh generator stored in Poly_Triangulation during check of mesh consistency.
2021-07-23 18:15:55 +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
ifv
c69e0e408f 0028196: Modeling Data - Algorithm 'Extrema_GenLocateExtPS' failed to find the extremum in a case
Extrema_GenLocateExtPS.cxx, Extrema_GenLocateExtPS.hxx:

Adjusting tolerances according to surface sizes is added.
Additional methods for searching solution are added for cases if basic method fails.

Extrema_FuncPSDist.cxx - small bug fixing.

BRepFill_TrimShellCorner.cxx - fixing regression

ChFi3d_Builder_CnCrn.cxx setting parameters for Plate algorithm to improve stability of solution

ProjLib_ComputeApproxOnPolarSurface.cxx - code optimization

Some test cases are modified according to current state of Extrema algorithm
2021-03-27 13:46:03 +03:00
ifv
b007889efd 0032058: Modeling Data - Extrema curve-surface gives wrong result for planar surface of revolunion and circle
Extrema_GenExtCS.cxx : added solution refinement, if solution seems to be "bad" according to special criteria.
Extrema_FuncExtCS.cxx : "cosmetic" modifications
BOPAlgo_PaveFiller_3.cxx : adding control of shape index to prevent exception in ShapeInfo
bugs/moddata_3/bug32058 : new test
2021-01-21 20:36:28 +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
akaftasev
5bae0bebe4 0028026: Modeling Data - BRepTools::Clean() does not clean all triangulation from shape
Added flag for force clean triangulation and treatment for it
Command "trinfo" now show number of polygons on triangulation
2021-01-20 21:25:44 +03:00
asuraven
9f45d35b6b 0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces).
Versions of formats have been changed (11 for TDocStd, 4 for BRep Shape and 3 for Binary BRep Shape)
theWithNormals parameter added to BRepTools::Write()
IsWithNormals()/SetWithNormals() function added to BRepTools_ShapeSet
-normals/-noNormals option added to StoreTriangulation DRAW command
-normals/-noNormals option added to writebrep DRAW command
Tests for writing to brep/binary brep/BinXCaf/XmlXCaf added
Test for StoreTriangulation options -normals/-noNormals added
2021-01-20 21:20:43 +03:00
kgv
83746de803 0032041: Modeling Data - Access violation ExchangeUV in Geom_BezierSurface
Added missing NULL-checks to Geom_BezierSurface::ExchangeUV() and Geom_BSplineSurface::ExchangeUV().
2021-01-12 13:30:35 +03:00
asuraven
3b1129a546 0029723: Modeling Data - Get rid of second writing format (additional save of UV points)
Default BinTools_ShapeSet format version has been changed from 3 to 1.
BinMNaming_NamedShapeDriver (Bin OCAF) now writes shapes in 1st version of Binary format instead of 3rd.
XmlMNaming_NamedShapeDriver (Xml OCAF) now writes shapes in 1st version of ASCII  format instead of 2nd.

writebrep now by default writes into 1st binary format version instead of 3rd.
2020-12-23 19:30:48 +03:00
ifv
2fda738623 0031995: Modeling Data - Bounding box wrong for face
BndLib/BndLib_AddSurface.cxx : algorithm of building bounding box for BSpline surfaces is improved

Test cases are modified according to current state of algorithm
Test case bug31995 added
2020-12-17 21:17:44 +03:00
asuraven
14eea8293d 0031946: Modeling Data - replace version numbers with enumerations in TopTools and BinTools
Added enumerations BinTools_FormatVersion & TopTools_FormatVersion for more clear version tracking in the code.
Added new BinTools::Write() & BRepTools::Write() overloaded functions with version & isWithTriangles parameters.

Added new "readbrep"/"writebrep" DRAW commands handling reading and writing of both Binary and ASCII .brep formats
and providing arguments to setup writing of triangulation data and of format version.
"binrestore" is made an alias to new command "readbrep".
"binsave" now is an alias to new "writebrep" saving into binary format by default ("writebrep" writes into ASCII format by default).
2020-12-17 21:17:42 +03:00
aavtamon
1e08a76f1e 0031402: Modeling Data - Geom_BSplineSurface::Segment() produces wrong result
In the method Segment() index1 needs to be checked as well as index2 in Geom_BSplineSurface and Geom2d_BSplineCurve
(Geom_BSplineCurve already has this check).
New test cases bug31402_1, bug31402_2 has been added.

The unnecessary code block in Geom2d_BSplineCurve has been deleted,
and checking index2 block has beed extended.
2020-12-04 19:00:48 +03:00
akaftasev
6e01c25ad1 0029827: Modeling Data - TopoDS_Shape::Nullify() does not reset location
TopoDS_Shape::Nullify() nullify not only myTShape but myLocation and myOrient.
Nullified shapes are equal and same now.
Added test.
2020-11-21 12:19:48 +03:00
akaftasev
c5b42a1afe 0030342: Modeling Data - Successively trimming surface in both directions lose the first trim
Added trim for U and V directions when trimming happens sequentially in these directions.
Added possibility to set sense to trim command.
2020-11-21 12:19:46 +03:00
emv
09543c2d99 0031587: Modeling Data - add BRepTools::RemoveInternals() removing internal sub-shapes from the shape 2020-06-09 20:01:06 +03:00
aml
f04de1335c 0030932: Modeling Algorithms - Invalid result on 2d curve on surface approximation
New method generating 3D curve is added when 2D curve is linear isoline.
2019-10-22 15:15:46 +03:00
abv
9e3045dae1 0030992: Foundation Classes - heap-buffer-overflow reported by Clang address sanitizer in BSplCLib::BuildKnots()
Inconsistent code for guessing bspline span index is removed in Geom_OsculatingSurface::BuildOsculatingSurface().
2019-10-19 12:31:38 +03:00
vro
f2c862db07 0030704: Modeling Data, Bnd_OBB - Oriented bounding box gives a wrong result if a box is added to a void box
Added protection on a void box to methods Bnd_OBB::Add() to escape taking into account "heap trash" coordinates of a void box.
2019-09-06 19:23:18 +03:00
aml
7a74087601 0027534: [Regression to 6.9.1]: Infinite loop in Curve on Surface projection algorithm
Add test case.
2019-09-06 18:26:42 +03:00
anv
e837b3a26c 0029662: Modeling Data - Allow replacement of Compounds via BRepTools_ReShape
- Fixed condition to allow proceeding of nested compounds;
- Added new key to "reshape" draw command to state a level of type until which requests are taken into account;
- Test case added.
2019-08-23 16:56:39 +03:00
emv
cca36b6b21 0030708: Modeling Data - Exception is raised while initializing TopoDS_Iterator with null shape
Added protection from null shapes to TopoDS_Iterator::Initialize method.
2019-05-15 20:05:31 +03:00
nds
967d2f4f30 0030497: [REGRESSION] Mesh - wrong Poly_Polygon3D within local selection of located shape
The previous code has a condition to avoid processing the same faces if the face has a location.
The similar condition should be applied during the edges processing.
If not doing this, in the previous implementation, IMeshData_Edge instances are created for all edges(even located), but edges of faces located are not filled with curves.
As a result we had wrong local selection of edges.

Limit addition of edges to data model by ones with unique TShape and location using edges map already available in BRepMesh_ShapeVisitor.
2019-02-28 20:24:43 +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
oan
7bd071edb1 0026106: BRepMesh - revision of data model
Removed tight connections between data structures, auxiliary tools and algorithms in order to create extensible solution, easy for maintenance and improvements;
Code is separated on several functional units responsible for specific operation for the sake of simplification of debugging and readability;
Introduced new data structures enabling possibility to manipulate discrete model of particular entity (edge, wire, face) in order to perform computations locally instead of processing an entire model.

The workflow of updated component can be divided on six parts:
* Creation of model data structure: source TopoDS_Shape passed to algorithm is analyzed and exploded on faces and edges. For each topological entity corresponding reflection is created in data model. Note that underlying algorithms use data model as input and access it via common interface which allows user to create custom data model with necessary dependencies between particular entities;
* Discretize edges 3D & 2D curves: 3D curve as well as associated set of 2D curves of each model edge is discretized in order to create coherent skeleton used as a base in faces meshing process. In case if some edge of source shape already contains polygonal data which suites specified parameters, it is extracted from shape and stored to the model as is. Each edge is processed separately, adjacency is not taken into account;
* Heal discrete model: source TopoDS_Shape can contain problems, such as open-wire or self-intersections, introduced during design, exchange or modification of model. In addition, some problems like self-intersections can be introduced by roughly discretized edges. This stage is responsible for analysis of discrete model in order to detect and repair faced problems or refuse model’s part for further processing in case if problem cannot be solved;
* Preprocess discrete model: defines actions specific for implemented approach to be performed before meshing of faces. By default, iterates over model faces and checks consistency of existing triangulations. Cleans topological faces and its adjacent edges from polygonal data in case of inconsistency or marks face of discrete model as not required for computation;
* Discretize faces: represents core part performing mesh generation for particular face based on 2D discrete data related to processing face. Caches polygonal data associated with face’s edges in data model for further processing and stores generated mesh to TopoDS_Face;
* Postprocess discrete model: defines actions specific for implemented approach to be performed after meshing of faces. By default, stores polygonal data obtained on previous stage to TopoDS_Edge objects of source model.

Component is now spread over IMeshData, IMeshTools, BRepMeshData and BRepMesh units.

<!break>

1. Extend "tricheck" DRAW-command in order to find degenerated triangles.

2. Class BRepMesh_FastDiscret::Parameters has been declared as deprecated.

3. NURBS range splitter: do not split intervals without necessity. Intervals are split only in case if it is impossible to compute normals directly on intervals.

4. Default value of IMeshTools_Parameters::MinSize has been changed. New value is equal to 0.1*Deflection.

5. Correction of test scripts:

1) perf mesh bug27119: requested deflection is increased from 1e-6 to 1e-5 to keep reasonable performance (but still reproducing original issue)
2) bugs mesh bug26692_1, 2: make snapshot of triangulation instead of wireframe (irrelevant)

Correction in upgrade guide.
2018-11-02 17:06:40 +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
ifv
dcf0889fc2 0030133: Modeling Data - Crash during visualization of invalid part
Control of number of recursive calls is implemented to avoid stack overflow.
2018-10-10 18:47:16 +03:00
kgv
1f26f80bb7 0029967: Draw Harness - command bounding has annoying syntax
Bnd_OBB constructor from Bnd_Box is fixed for VOID input.

DRAW command bounding command is adjusted:
- Support of old syntax 'bounding shape'is restored.
- Exception on VOID bounding box is avoided.
- Arguments are handled in case-insensitive way.
- Options -s, -perfmeter, and ability to set result as first argument are removed as redundant.
- Help is moved to command definition.

Separate command OCC29311 is added (in QADraw) to do the same as option -perfmeter did; tests are updated.
2018-07-27 16:19:26 +03:00
nbv
894dba72a3 0029694: Geom2dGcc_Circ2dTanCenGeo crash
The reason of this issue is in incorrectly interpreted the generic class "TheExtPC" (eliminated after the fix 0024773) as Extrema_ExtPC2d. Correct interpretation must be "Extrema_EPCOfExtPC2d" class.

Now this problem has been fixed in the class Geom2dGcc_Circ2dTanCenGeo.

New testgrid "lowalgos 2dgcc" has been created.
2018-06-14 14:03:06 +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