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

112 Commits

Author SHA1 Message Date
aml
a1f027b66e 0033018: Coding - get rid of unused headers [Plugin to ShapeAnalysis] 2022-06-15 20:41:12 +03:00
aml
034d1403b1 0032953: Coding - add missing references where applicable 2022-05-04 21:08:16 +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
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
aml
a81bd74a38 0032667: Coding - get rid of unused forward declarations [LibCtl to StepRepr] 2021-11-22 18:58:00 +03:00
dipts
9eab1511b0 0032661: Coding - Forward class declaration in ProjLib collides with typeref
Removed redundant forward declarations from ProjLib.hxx.
2021-11-21 12:42:09 +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
abulyche
eb78d737d4 0030747: Modeling Algorithms - 2d Curves concatenator doesn't properly process closed contours.
Corrected Geom2dConvert_CompCurveToBSplineCurve::Add in Geom2dConvert_CompCurveToBSplineCurve.cxx;
Added the test for this problem;
Corrected "gluing" curves in ProjLib_ProjectedCurve.cxx.
2021-10-14 20:19:22 +03:00
asuraven
872a7e3a7e 0032485: Modeling Algorithms - Add Clone() function for adapters
Provide ShallowCopy() functions for adapters & evaluators of curves, 2d curves and surfaces. This will allow using copies of the same adapter in multi-thread calculations.
2021-09-03 20:19:56 +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
kgv
73dee81133 0032460: Coding Rules - eliminate CLang warning -Wunused-but-set-variable
Code has been adjusted to suppress -Wunused-but-set-variable warnings.

DRAWEXE.wasm, compiler flags have been moved to linker flags
to eliminiate -Wunused-command-line-argument warnings.
2021-06-24 23:47:45 +03:00
kgv
4d67a36952 0032353: Modeling Data - Missing definition of ProjLib_ProjectOnSurface::Load() 2021-05-22 10:36:38 +03:00
luz paz
316ea29318 0031939: Coding - correction of spelling errors in comments [part 10]
Fix various typos via codespell.
2021-04-22 14:50:47 +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
kgv
d6e050ac44 0032008: Modeling Algorithms - disallow implicit copy of Extrema algorithms
Extrema_GenExtPS now prefers resizing of Array2 tables instead of managing tables by extra handles.
Removed unsafe casts to Adaptor3d_SurfacePtr/Adaptor3d_CurvePtr in Extrema classes.
Removed unsafe casts to curve adaptors in Extrema_ExtCC, Extrema_ExtCC2d classes.

Extrema_GenExtPS, Extrema_GenExtSS, Extrema_ExtCS -
copies by value are now disallowed;
several unexpected places copying the object have been fixed.

IntTools_Context - maps of void* have been replaced by typed maps.
2021-03-05 17:31:07 +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
mkrylova
d533dafb56 0031035: Coding - uninitialized class fields reported by Visual Studio Code Analysis
Added initialization of fields that had not initialization
Added default constructors to classes without constructors
2020-07-23 16:08:20 +03:00
azv
b939a13923 0031016: Projection of an ellipse is a B-spline in some cases
Improve projection of ellipse and circle on a plane in case of the same parametrization of the original curve and the projected one is not necessary. Now the projection is a canonical curve instead of B-spline.
2020-07-20 16:57:29 +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
jgv
13dd311c9b 0031470: Modeling Algorithms - Regression: BOP common produces empty result (box and holed sphere)
Approx_ComputeCLine.gxx : new class field is added to manage hang checking.
ProjLib/ProjLib_ComputeApprox.cxx : unset hang checking for analytical surfaces and curves
2020-04-16 09:58:15 +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
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
ifv
ba7f665dce 0030435: Improving performance of Approx_ComputeCLine
1. Approx_ComputeCLine.gxx, Approx_FitAndDivide.hxx, Approx_FitAndDivide2d.hxx, BRepFill_ComputeCLine.hxx
It is base modification, which allows improve performance of approximation with help of Approx_ComputeCLine. The main idea of improvement is using degree selection by inverse order - from maxdegree to mindegree. If tolerance for maxdegree is not reached, there is no sense to make approximation for current number of knots with lower degree, it is necessary to cut parametric interval.

2. ProjLib_ComputeApprox, ProjLib_ComputeApproxOnPolarSurface, ProjLib_ComputeApproxOnPolarSurface, ProjLib_ProjectOnPlane
It is additional modification of methods using Approx_ComputeCLine.
Mainly, modifications concern to more optimal choosing parameters for approximation algorithm.

3. BRepCheck_Face
Small improvement of method Intersect(...), which intersects two wires on face.

4. BRepTopAdaptor_FClass2d
Impovement of treatment infinitely narrow faces.

5. ChFi3d/ChFi3d_Builder_6.cxx
Small improvement, which forbids extension of singular boundary of surface.
It was TODO problem in tests/bugs/modalg_7/bug27711_3

6. IntTools_EdgeEdge.cxx
Improvement of performance for cases of searching common parts between line  and analytical curve

7. GeomliteTest_CurveCommands.cxx
Adding Draw command fitcurve. This command is analog of approxcurve, but uses Approx_FitAndDivide algorithm.
Mainly to have direct draw command for testing Approx_ComputeCLine.

8. Extrema_ExtElC.cxx

Treatment of case "infinite solutions" for extrema line-ellipse

9. Modification of some tests according to new behavior of algorithm.

10. tests/perf/moddata/bug30435
Test for new improved algorithm.

11. Implementation QAcommand OCC30435 in QABugs_20.cxx used in test bug30435
2019-04-22 14:03:45 +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
ifv
e5826d916c 0030203: ProjLib_ComputeApproxOnPolarSurface::BuildInitialCurve2d array out of bound
Bug fixing: avoiding calculation if tPp == NbOfPnts
2018-10-23 20:09:55 +03:00
nbv
638ad7f3c5 0029712: Extrema algorithm raises exception
1. Extrema algorithm calls Curve-surface intersector. This intersector returns flag about infinite solution (in spite of extrema's returning not-parallel status correctly - axes of considered cylinder and circle are not parallel). In this case, attempt of obtaining number of intersection points leads to exception.

So, the fix adds check of infinite solution after the intersection algorithm.

2. The methods IsDone(), IsParallel(), NbExt(), SquareDistance() and Points() (of Extrema_* classes) have been corrected to make them consistent to the documentation.

3. Revision of some Extrema_* classes has been made in order to avoid places with uninitialized variables.

4. Currently Extrema does not store any points in case when the arguments are parallel. It stores the distance only.

5. Some cases on Extrema-algo have been moved from "fclasses"-group to "modalg"-group.
2018-06-14 14:03:05 +03:00
ifv
f998596a10 0028909: Algorithm of BO is stuck while fusing shell and edges
Approximation parameters: degmin, degmax, max number of segments, boundary condition, maximal distance of projecting are added in interface of classes ProjLib_ProjectedCurve, ProjLib_ComputeApprox,
ProjLib_ComputeApproxOnPolarSurface
Algorithm of Approx/Approx_ComputeCLine is modified in order to treat maximal number of segments allowed for cutting.
Algorithm of method BOPTools_AlgoTools2D::MakePCurveOnFace(...) is modified in order to manage cases with big edge tolerances.
Test case added
Some test cases were modified according to new behavior of algorithms
2017-10-06 10:28:17 +03:00
abv
b1811c1d2b 0029151: GCC 7.1 warnings "this statement may fall through" [-Wimplicit-fallthrough=]
New macro Standard_FALLTHROUGH is defined for use in a switch statement immediately before a case label, if code associated with the previous case label may fall through to that
next label (i.e. does not end with "break" or "return" etc.).
This macro indicates that the fall through is intentional and should not be diagnosed by a compiler that warns on fallthrough.

The macro is inserted in places that currently generate such warning message and where fallthrough is intentional.

Doxygen comments are provided for this and other macros in Standard_Macro.hxx.
2017-10-04 15:28:02 +03:00
nbv
8444aedb1d 0028150: Exception is raised during Boolean operation
ProjLib_ComputeApproxOnPolarSurface::BuildInitialCurve2d - Using the correct number of points (computed in GCPnts_QuasiUniformAbscissa class) for creation of the initial curve.
2017-09-22 11:52:05 +03:00
kgv
2d2b3d53b7 0028550: Foundation Classes - fix empty message passed to thrown exception 2017-04-20 12:36:36 +03:00
kgv
c48e2889cd 0028643: Coding rules - eliminate GCC compiler warnings -Wmisleading-indentation 2017-04-14 13:04:04 +03:00
emv
32e849ebc9 0028486: Fuse of several solids fails due to presence of common zones between faces
1. Exception in intersection of two analytical faces has been fixed by adding a simple check on number of vertices
in the resulting analytical curve;

2. Projection of the Circle on the Cone now checks if the Circle's normal direction is parallel to the Cone direction.
If it is not, the different, more advanced, algorithm will be used for projection - ProjLib_ComputeApprox;

3. Intersection of the Edge with the Face (IntTools_EdgeFace algorithm) in QuickCoincidenceCheck mode has been fixed to
avoid the checking of the type of the intersection result if the coincidence check gives the positive result;

4. All common IN edges of the intersecting faces has been added for intersection with section edges to avoid self-intersection in the result;

5. Post treatment of the section edges in Boolean operations has been improved with the new stage which treats the possible
common zones, not detected by the intersection algorithm, between faces by intersecting each section edge with all faces,
not participated in its creation, and in case of coincidence putting it as IN edge into FaceInfo structure of the face.
The new function has been implemented for that - BOPAlgo_PaveFiller::PutSEInOtherFaces().

6. Checking for the SameDomain splits of faces in Boolean Operations has been modified to process the pairs of faces in
which both the section curves and common zones are present.

7. Adjustment of the test case boolean gdml_private ZH3 as improvement.

8. Test cases for the issue.

9. Test cases for the parent issue - 0026789.
2017-03-16 10:47:51 +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
ifv
0a40a30da5 0028223: Projection of closed curve onto cylinder is wrong
Algorithm of calculation UV bounds of projected curve for periodic surfaces is modified.
2016-12-29 14:27:22 +03:00
nbv
b070046674 0028054: Regression: Class BRepProj_Projection gives invalid result after projection edge based on the line on the conical surface
Problem of projection of line on the cone in the special case when starting point of the line coincides with the cone apex is fixed (by shifting this point along the source line).
2016-11-08 19:29:55 +03:00
msv
3065019c99 0027804: Two breps cause intersections to loop for too long/infinitely
In ProjLib_ComputeApprox algorithm, compute correct parametric tolerance from the input 3D tolerance using surface resolution, in order to pass it to low-level 2D algorithm Approx_FitAndDivide2d (instantiation of the generic class Approx_ComputeCLine). Earlier 3D tolerance was used as parametric tolerance directly, which was a problem for surfaces with too small radius of curvature.

Also, eliminate redundant creation of the object of type AppParCurves_MultiCurve on each iteration in the method Approx_ComputeCLine::Compute.

The post treatment of the Edge/Edge intersections has been improved. Namely:
a. Making the procedure of sharing Edge/Edge intersection vertices consistent with intersection algorithm by enlarging bounding box of each vertex on half of Precision::Confusion();
b. Algorithm of computation of vertex tolerance (in order to cover tangent zone between Edges) has been changed for Line/Circle cases.

Test cases for issue CR27804
Adjusting test cases according to their new behavior.

Mark the test boolean/volumemaker/A8 as unstable between different versions of MSVS (2010 and 2013).
2016-09-08 11:22:40 +03:00
azv
758bacbb66 0027677: Incorrect CUT of a solid by semi-infinite solid
The problem of incorrect CUT is wrong Pcurve after projection onto cylinder of a small edge orthogonal to cylinder's axis. The result of projection is a line along V direction, but it should be along U.

ProjLib_Cylinder has no specific functionality to build projection in most common case, so it should return "not done" flag to start projection based on curve approximation.

Following changes are done:
1. ProjLib_Cylinder returns isDone=false in the following cases:
  * the projected line is not parallel to cylinder's axis
  * the plane of projected circle is not orthogonal to cylinder's axis
2. Test case added

Minor correction of test case
2016-07-21 11:14:57 +03:00
msv
e5260e1dfa 0027466: The algorithm Extrema_GenLocateExtPS gives incorrect result
Euclidean distance criteria is added for local point / surface extrema.
Classes representing objective criteria are renamed to be consistent.
Local extrema usage is updated according to new behavior.
Test case is added.

Misprint correction.
2016-05-19 13:17:18 +03:00
ifv
8f8398f6e4 0027322: geom/revolution_00/A1: Incorrect pcurve creation
ProjLib_Cone.cxx - correction wrong calculation of projection line on cone
GeomInt_IntSS_1.cxx - modification of method BuildPCurves(...) - adjusting first or last knots of 2d Curve
ProjLib_ComputeApprox.cxx - modification of method Function_SetUVBounds(...) for case projecting line on cone.
Modification of tests - removing first TODO

Test case for issue #27322
2016-04-14 11:50:33 +03:00
aml
5333268def 0027299: Incorrect result of the normal projection algorithm
Curve splitting is added to handle seam passing by initial curve.
test cases are added.

Minor corrections.
2016-04-08 11:50:43 +03:00
aml
0d1536ad4e 0027133: Incorrect result of the normal projection algorithm
Topological tolerances changed to geometric tolerances.
Protection from the usage of invalid result is added to restore good projection.
Test cases are updated.
Test case added.

Correction of test case for issue CR27133
2016-03-28 17:31:09 +03:00
aml
db2a696d96 0027135: Incorrect result of the normal projection algorithm
New check for possible local traps was added to build correct projection cache.
2016-02-20 19:13:11 +03:00
abv
e6f550da99 0027067: Avoid use of virtual methods for implementation of destructors in legacy classes
Redundant methods Delete() and Desroy(), created in CDL as a hack to define destructor for the class, are removed; their definitions are converted to definition of destructors. In a couple of places methods Destroy() are preserved (bug made non-virtual) because they are called explicitly.
2016-01-08 20:04:44 +03:00
abv
92efcf78a6 0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
Automatic restore of IMPLEMENT_STANDARD_RTTIEXT macro (upgrade -rtti)
2015-12-04 14:15:06 +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
abv
79104795a1 0026912: CLang 3.6.2 compiler warning [-Winconsistent-missing-override] 2015-11-23 14:58:23 +03:00
abv
7636352267 0026788: Compiler warnings when OCCT_DEBUG is enabled
Clean-up in code causing warnings when OCCT_DEBUG is enabled

Minor corrections:
- new compiler warnings on VC++ 14
- rename of "PPC" variables that are said to caused conflicts on PowerPC
- removal of unused header TopOpeBRep/TopOpeBRep_tools.hxx
2015-10-22 14:40:17 +03:00
azv
1aec33207e 0026254: Inject GeomAbs_OffsetCurve into GeomAbs_CurveType enumeration 2015-10-22 10:36:57 +03:00
rkv
36b9ff756a 0026595: Lost some comments in OCCT-code after cdl elimination
Recovered comments for instance classes from CDL generic classes.
2015-10-15 14:04:43 +03:00