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

70 Commits

Author SHA1 Message Date
dpasukhi
8a74ae3a6c 0033391: Coding - Clearing old definition way for strcasecmp
Removed artifacts for strcasecmp definitions
2023-07-21 16:33:49 +01:00
dpasukhi
52cbf180cd 0033375: Coding - Static Analyzing processing. Performance
Performance update applied:
  - moving to const reference as much as possible
Result of CLANG_TIDY (static analyzing filter: perform*)
2023-07-21 16:33:47 +01:00
aml
82598ec0f2 0032951: Coding - get rid of unused headers [GeomConvert to IGESBasic] 2022-04-29 18:09:58 +03:00
mgerus
b2ec2f5d42 0031361: Modeling algorithms - An exception arise when building tube
* Add status flag to GeomFill_Pipe
* Add myIsPerform flag to GeomFill_Pipe
* Add checking vectors in GeomFill_CorrectedFrenet
* Add boolean return to SetCurve virtual methods
* Add test case
2022-04-06 03:17:55 +03:00
kgv
d0cf7e8f3c 0032684: Draw Harness - fix Draw_Interpretor::Add() misuse due to overloaded syntax 2021-11-25 19:56:06 +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
296dbe8cc8 0031631: Modeling Algorithms - Invalid result of Pipe builder
Added the ability to operate the algorithm with different types of curves.
2021-09-18 17:07:06 +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
luz paz
54adc5e979 0031939: Coding - correction of spelling errors in comments [part 6]
Fix various typos

Fixed via `codespell v2.1.dev
2021-01-12 13:32:43 +03:00
luz paz
a25d5aaa30 0031939: Coding - correction of spelling errors in comments [part 3]
Fix various typos

Fixed via `codespell v2.1.dev0`
2020-12-11 19:19:10 +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
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
oan
da6b95a075 0031043: GCPnts_TangentialDeflection generates points which number is inconsistent with MinimumOfPoints Parameter
Updated crvtpoints command API to reproduce reported problem
Generate number of points according to the specified minimum value
2019-10-29 11:04:53 +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
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
d1775ee992 0030621: Implementation of building U-periodical surfaces.
draw_test_harness.md - description of new options in Draw commands

AppDef_BSplineCompute.hxx, BRepApprox_TheComputeLineOfApprox.hxx, GeomInt_TheComputeLineOfWLApprox.hxx, Approx_BSplComputeLine.gxx - implementation of method SetPeriodic(...) and implementation periodic boundary conditions for multiline in order to get periodic multicurve.

GeomAPI_PointsToBSplineSurface.hxx, GeomAPI_PointsToBSplineSurface.cxx - adding new parameter for methods Init(...) and Interpolate(...), implementation of building periodic tangents for first and last AppDef_MultiPointConstraint of multiline for U direction of surface.

GeometryTest_APICommands.cxx - implementation of new functionality in Draw command surfapp and surfint

GeomFill_NSections.cxx
Fixing problem with bugs modalg_3 bug606_2
2019-04-23 18:12:16 +03:00
kgv
a738b534ca 0030611: Coding Rules - eliminate GCC compiler warnings -Wcatch-value
Add missing const& to catch statements.
2019-03-31 23:39:50 +03:00
kgv
98ae54f728 0030366: Coding Rules - GeometryTest_API2dCommands.cxx seems to be excess 2019-02-04 15:06:57 +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
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
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
abv
0f57ab750d 0029590: Coding - avoid usage of Standard_EXPORT attribute for inline methods
All occurrences of Standard_EXPORT attached to inline methods in OCCT code are eliminated.
Some unused classes and C++ files producing no code are deleted.
2018-03-22 19:51:25 +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
03cca6f742 0028599: Replacement of old Boolean operations with new ones in BRepProj_Projection algorithm
The usage of *BRepAlgo_Section* has been replaced with the usage of *BRepAlgoAPI_Section* in *BRepProj_Projection* algorithm.

The TODO statements have been removed from the failing test case in the "prj" grid as they are working correctly now.

The following changes have been made to improve the performance *BRepAlgoAPI_Section*:
1. Revision of the *IntPolyh_Intersection* class to avoid repeated calculation of the deflection of the same triangulation.
2. Small revision of the Edge/Face intersection algorithm to perform Extrema computation on the whole intersection range of the edge instead of discrete ranges.
3. Implementation of the extrema computation for the Circle and Sphere.
4. Correct computation of the parameter of the point on the Circle.
2018-02-01 18:46:36 +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
msv
bfd69b5f7b 0029102: Missing points using GCPnts_QuasiUniformDeflection
Correct the method PerformCurve of GCPnts_QuasiUniformDeflection to get the proper derivative at the end of the current curve.

Improve the Draw commands "crvpoints" and "crvtpoints" so that to work with wires as composite curves.
2017-09-22 11:51:51 +03:00
nds
9294c8f774 0028631: Modeling Algorithms - Crash while building a 2D circle tangent to another circle and passing through its center
Code correction includes also:
- extending GccEnt to have GccEnt_Position conversion to string value and backward;
- new GeometryTest_DrawableQualifiedCurve2d DRAW object to wrap GccEnt_QualifiedCirc/GccEnt_QualifiedLin.
  It is a DrawTrSurf_Curve2d with GccEnt_Position visualized in orange color.
- qcircle/qline DRAW command to create instance of GeometryTest_DrawableQualifiedCurve2d
- circ2d3Tan DRAW command to wrap GccAna_Circ2d3Tan taking qcircle/qline/point arguments.
2017-08-17 22:21:32 +03:00
abk
5200cc4aa3 Test for 0028196: Algorithm 'Extrema_GenLocateExtPS' failed to find the extremum in a case
Draw command 'proj' has been improved:
- Add possibility to pass the starting point. If it is passed than the algorithm Extrema_GenLocateExtPS is used instead of standard projection.
- Make the output of the command more clear.

Test case bugs/moddata_3/bug28196 has been added.
2016-12-16 11:58:12 +03:00
anv
a8b5267725 0026026: XtControl_Reader hangs when processing specific data
Small fix for a specific case (was missing).
2016-12-08 16:24:56 +03:00
aml
27ba9c6006 0027696: Return max distance in xdistcs Draw command
Message about maximal distance is added for xdistcs command.
2016-09-30 09:15:32 +03:00
kgv
dde6883382 0027772: Foundation Classes - define Standard_Boolean using C++ type "bool" instead of "unsigned int"
Code has been updated to remove no-op casts and implicit casts to Standard_Boolean.

Places of inproper use of Standard_Boolean instead of Standard_Integer
have been corrected:
- Bnd_Box, Bnd_Box2d
  Bit flags are now defined as private enum
- HLRAlgo_BiPoint, HLRAlgo_EdgesBlock, HLRBRep_EdgeData, HLRBRep_FaceData
  Bit flags are now defined as enum
- HLRAlgo_EdgeStatus, HLRBRep_BiPnt2D, HLRBRep_BiPoint
  Bit flags are now defined as bool fields
- HLRAlgo_PolyData
  Bit flags are now defined as Standard_Integer
- OSD_DirectoryIterator, OSD_FileIterator
  Boolean flag is now defined as Standard_Boolean
- ShapeAnalysis_Surface::SurfaceNewton()
  now returns Standard_Integer (values 0, 1 or 3)
- ChFi2d_FilletAlgo
  now uses TColStd_SequenceOfBoolean instead of TColStd_SequenceOfInteger
  for storing boolean flags

Method IFSelect_Dispatch::PacketsCount() has been dropped from interface.

ShapeFix_Solid::Status() has been fixed to decode requested status
instead of returning integer value.

TopOpeBRepBuild_Builder1 now defines map storing Standard_Boolean values
instead of Standard_Integer.

Persistence for Standard_Boolean type has been corrected
to keep backward compatibility:
- BinMDataStd, BinTools, FSD_BinaryFile

Broken Draw Harness commands vdisplaymode and verasemode have been removed.

BRepMesh_FastDiscretFace::initDataStructure() - workaround old gcc limitations

BRepMesh_IncrementalMesh::clear() - avoid ambiguity
2016-08-26 10:16:17 +03:00
ifv
9c1519c4c5 0027108: GCPnt_TangentialDeflection does not respect linear deflection
Modification of algorithm in order to prevent violation of angular and curvature deflection condition for smooth intervals of curve.
Modification of algorithm for calculation of maximal deflection in command crvtpoints, crvpoints (CR25649)
Elementary bug fixing in algorithm GCPnts_UniformDeflection.gxx
Modification of test cases in order to set new reference parameters of shape triangulations
Some tests:
  bugs modalg_2 bug397
  mesh standard_incmesh C7, V3
  mesh standard_incmesh_parallel C7, V3
  mesh standard_mesh C7, V3
  mesh standard_shading V3
were modified by TODO with reference bug 27226, because some problems in meshing algorithm (package BRepMesh) were discovered when tessellation of edges was changed. These problems cannot be solved by modification of GCPnts_TangentialDeflection algorithm. New issue #27226 was created, see bugtracker for details.

Correction of test data

Test case for issue #27108

Modification of algorithm for improving performance

Correction of test cases
2016-06-16 14:58:40 +03:00
aml
92a206a3dd 0027162: Draw command "(2d)extrema" incorrectly represent underlying algorithm results
Correct handling of infinity solutions added for Curve / Curve case.
Unused code deleted.
Test cases updated to the new behavior.
2016-02-20 10:10:03 +03:00
mgn
586db386eb 0026922: Huge performance issue writing data to the output stream
Test case for issue CR26922

Correction of literal (char to string)
2015-12-04 13:03:41 +03:00
abv
6d3685029f 0026622: Tests - Avoid using dlog and decho commands in test scripts
Added possibility to define patterns that must be present in the test log, so that test is considered OK only if all these patterns are found.
New REQUIRED statement is introduced for that, documented in dox/dev_guides/tests/tests.md.

Removed all uses of decho and dlog commands, added REQUIRED where necessary.
Command xdistcs is modified to output to Tcl instead of cout, and extended to report errors and warnings if distances are greater than tolerance (directly, instead of complex post-processing on Tcl level).

DEBUG mode for TODOs was removed (we should have no deviations in Debug mode).

Corrected indentation in DrawResources/TestCommands.tcl

HTML log will now highlight TODO statement causing IMPROVEMENT status, or REQUIRED statement causing FAIL, by corresponding color.
2015-10-15 11:43:54 +03:00
akz
57c28b6122 0022972: Eliminate macro definitions that has compiler-provided analogs (WNT and so on)
1) Macro definition WNT replaced by _WIN32 and _MSC_VER for platform and compiler detection accordingly.
2) Macro definition LIN replaced by __linux__ macro.
3) Macro definition DEB replaced by OCCT_DEBUG macro.
2015-09-24 14:13:06 +03:00
ski
5174095875 0026586: Eliminate compile warnings obtained by building occt with vc14: declaration of local variable hides previous local declaration
Eliminated warnings about "declaration of some local variable hides previous local declaration"
2015-09-17 12:53:55 +03:00
abv
5b111128de 0024023: Revamp the OCCT Handle - gcc and clang
Adaptations for compiling with GCC 4.7 and 4.8:
- Construction semantics is used for Handle objects being initialized by const Handle objects of derived type, to avoid overload resolution error in GCC 4.7.
- Missing includes added.
- Fixed bugs related to misuse of direct casts of handle.
- Eliminate CLang warnings on uninitialized and unused variables, functions, and expressions
2015-07-12 13:57:20 +03:00
abv
42cf5bc1ca 0024002: Overall code and build procedure refactoring -- automatic
Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
2015-07-12 07:42:38 +03:00
abv
543a996496 0024023: Revamp the OCCT Handle -- ambiguity
Code corrected to avoid ambiguous situations due to changed implementation of Handle (overloaded methods accepting handles of different types).
In Adaptor3d_CurveOnSurface added method Load() with two parameters, allowing to avoid ambiguity of cast of handles when calling separate methods Load() for curve and surface, replacing by single call.
In DrawTrSurf and IGESData_IGESWriter, template variants of methods Set() and Send(), respectively, are added to avoid ambiguity when these methods are called with handles to derived types (using SFINAE).
In NCollection_DefineHSequence, method Append() accepting handle to another HSequence is made template, to be available only if argument has compatible type.
2015-07-11 12:08:07 +03:00
abv
c5f3a42524 0024023: Revamp the OCCT Handle -- downcast (automatic)
Automatic update by command "occt_upgrade . -downcast"

C-style cast of Handle to that of derived type (now illegal) is replaced by call to DownCast()
Const reference local variables of Handle type initialized by result of DownCast are replaced by normal variables.
2015-07-11 12:08:05 +03:00
aml
0a243bb4c4 0025928: Tool for comparing curves
I
New commands:
xdistcc - check distance between two 3d curves.
xdistcc2ds - check distance between 3d curve and curve on surface (projected curve).
xdistc2dc2dss - check distance between two curve on surface (projected curves).

This commands are print 3d distance between input objects built on even grid.
It is supposed that curves have same parametrization.

usage:
xdistcc curve1 curve2 startParam finishParam [NumberOfSamplePoints]
xdistcc2ds c c2d surf startParam finishParam [NumberOfSamplePoints]
xdistc2dc2dss c2d_1 c2d_2 surf1 surf2 startParam finishParam [NumberOfSamplePoints]

II
Doxygen documentation about "xdist" family added.
2015-03-19 17:08:20 +03:00
aml
edbf88ba99 0025649: crvtpoints command return wrong deflection in output.
Deflection computation algorithm changed to PSO+NewtonMinimum.

Correction of test case
2015-01-15 15:38:49 +03:00
nbv
9e20ed5793 0023547: Tests failures in debug mode
1. DRAW-commands for curve/surface continuity returning were changed.
2. Output of "distmini" DRAW-command is amended.
3. Function MinMax() was moved from Standard_Real to IntPatch_ImpImpIntersection_4.gxx.
4. Incorrect computing of nbcurveC1 in Geom2dConvert::C0BSplineToC1BSplineCurve(...) function was liquidated.

Test cases were changed.
2014-10-16 16:45:13 +04:00
nbv
ecc4f1489d 0024915: Wrong intersection curves between two cylinders
Existing method of Cylinder-Cylinder intersection computing is based on finding the analytic line (as a function of one argument) and converting one into the walking-line with set of equidistant (along the line parameter) points.

The main advantage of applied method is using adaptively computed step. Necessary step is computed into every point of the obtained walking-line. At that we receive final walking-line directly (without preliminary analytic line) and we determine moments more precisely, when it should be split (see IntPatch_ImpImpIntersection_4.gxx).

The main disadvantages is bad working this method for non-trimmed cylinders (with infinite bounds), because step value is depend on the boundaries values.

More over, new method always returns walking-line, while intersection result can be an analytic curve (lines, circle, ellipse). That is NO good. Therefore, analytic curve is computed by existing method.

In conclusion, in spite of covering almost all more often meeting cases, new method has limited application. Then we should use the existing old method.

Additionally, method MinMax() is added (see Standard_Real.hxx file). It uses into new algorithm.

Some test cases is changed according to their new behavior.

Test case for issue CR24915 is added.

Into GeometryTest_APICommands.cxx only tabulations were chaged.

"Extending" of isolines (see Geom2dHatch_Hatcher.cxx).

Small correction of test case for issue CR24915.
2014-08-21 15:54:02 +04:00
abv
857ffd5e57 0024814: Avoid using explicit names of Handle classes
Sources corrected replacing Handle_XXX by Handle(XXX)
2014-04-22 18:36:12 +04:00
dln
f62de37212 0024708: Convertation of the generic classes to the non-generic. Part 2
Generic classes from "AppParCurves" package:
    "AppDef_SmoothCriterion", "AppDef_LinearCriteria" and "AppDef_Variational" moved to the corresponding non-generic classes "AppDef_SmoothCriterion", "AppDef_LinearCriteria" and "AppDef_Variational" to "AppDef" package. Also several "*.cxx" files of "AppDef_Variational" class merged to one ".cxx".
Generic class from "IntImp" package:
    "IntImp_ZerCOnSSParFunc" moved to the corresponding non-generic class "IntPatch_CSFunction" to "IntPatch" package.
Next unused generic classes were removed:

- IntCurveSurface_SurfaceTool
- Intf_InterferencePolygon3d
And some other minor changes.
2014-04-10 19:49:38 +04:00
abk
c858bb1084 0024712: Extend DRAW commands "vertex" and "extrema". Create test to check all points for bug 23830.
DRAW command "vertex" was extended to create vertex from point.
DRAW command "extrema" was extended and unified: both extrema points are outputted to DRAW in case of too close points;
parameters of extremal points are outputted.
35 shapes were added for anti-regression tests.
Second DRAW test was created for bug CR23830.

Move shapes to shape-repository
2014-04-04 12:57:32 +04:00
abv
cb389a77e4 0024710: Avoid including Handle_Class.hxx headers except where necessary
Includes of Handle*.hxx headers replaced by include of corresponding class (where possible without redesign of the classes).

Minor correction against compiler warning (vc10 64-bit) in BOPAlgo

Remove double header inclusions

Correction of minor mistake
2014-03-13 14:22:25 +04:00