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

25 Commits

Author SHA1 Message Date
kgv
dfa2a6719c 0032763: Coding Rules - eliminate CLang warning -Wbitwise-instead-of-logical in math_FunctionSetRoot.cxx 2022-01-13 20:51:37 +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
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
f4dee9bb20 0026329: Restore floating point signals handling in DRAW
Added DRAW command dsetsignal, resetting OSD signal handler with either armed or disabled FPE handler, according to an option.
If called without arguments, it sets FPE handler only if environment variable OSD_FPE is defined (with value different from 0).
On start, DRAW calls dsetsignal to set FPE signal if CSF_FPE is defined.
Test bugs fclasses bug6143 uses dsetsignal to set FPE handler unconditionally before the test command, and resets it to default at the end.

A number of changes in the code have been done in order to fix floating point exceptions that became generated after enabling signals:

- Global functions Sinh() and Cosh() defined in Standard_Real.hxx are improved to raise Standard_NumericError exception if argument is too big (greater than 710.47586), instead of relying on system treatment of floating point overflow. These functions are used instead of sinh and cosh in ElCLib.cxx.

- Maximal value of parameter on hyperbola is restricted by 23 (corresponding to ~1e10 in 3d) in order to avoid FP overflow in Extrema_GenExtCS.cxx, ShapeFix_EdgeProjAux.cxx.

- Interface of the root curve adaptor class Adaptor3d_Curve has been updated to add new virtual methods BasisCurve and OffsetValue. They complement the adaptor for the case of offset curves. These methods are used in Extrema_GenExtCS.cxx to restrict domain search in the case of offset of hyperbola, in order to get rid of floating point overflow. All classes inheriting Adaptor3d_Curve have been changed to implement the new virtual methods.

- Protection against division by zero has been implemented in ApproxInt_KnotTools.cxx, BRepClass3d_SClassifier.cxx, BRepGProp_Face.cxx, BRepMesh_FastDiscretFace.cxx, Geom2dGcc_Circ2d2TanOnIter.cxx, Geom2dInt_Geom2dCurveTool.cxx, IntPolyh_MaillageAffinage.cxx.

- Protection against calling of math functions of infinite arguments has been added in BRepCheck_Edge.cxx, BRepLib.cxx, CSLib_NormalPolyDef.cxx, Extrema_FuncExtPC.gxx, Extrema_GExtPC.gxx, Extrema_GLocateExtPC.gxx, Intf_InterferencePolygonPolyhedron.gxx, ShapeAnalysis_Surface.cxx, ShapeAnalysis_TransferParametersProj.cxx, ShapeAnalysis_Wire.cxx, math_FunctionSetRoot.cxx.

- Proper initialization of local variables is done in BOPAlgo_PaveFiller_6.cxx, XSDRAWSTLVRML.cxx.

- Inconsistent usage of Standard_Boolean* to access integer data in HLR (caused by #27772) is corrected

Some test cases have been updated to actual state.
2016-09-30 11:17:17 +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
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
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
aml
e93e42300a 0026356: Wrong result done by projection algorithm
Changed internal one dimension search algorithm in case of fast changing curve.

Test-case for issue #26356
2015-07-09 14:14:55 +03:00
azn
859a47c3d1 0025720: Incorrect code of math classes can lead to unpredicted behavior of algorithms
The calling of virtual methods has been removed from constructors & destructors:

math_BissecNewton
math_BrentMinimum
math_FRPR
math_FunctionSetRoot
math_NewtonFunctionSetRoot
math_NewtonMinimum
math_Powell
2015-02-19 14:49:11 +03:00
azn
6da30ff153 0025622: CAST analysis: Avoid invocation of virtual Methods of the declared Class in a Constructor or Destructor
The Delete() methods have been deleted from the following classes:
- Adaptor2d_Curve2d
- Adaptor3d_Curve
- Adaptor3d_Surface
- AppBlend_Approx
- AppCont_Function
- AppParCurves_MultiCurve
- AppParCurves_MultiPoint
- ApproxInt_SvSurfaces
- BRepPrim_OneAxis
- BRepSweep_NumLinearRegularSweep
- BRepSweep_Translation
- BRepSweep_Trsf
- DBC_BaseArray
- GeomFill_Profiler
- HatchGen_PointOnHatching
- math_BFGS
- math_FunctionSet
- math_FunctionSetRoot
- math_FunctionWithDerivative
- math_MultipleVarFunction
- math_MultipleVarFunctionWithHessian
- math_MultipleVarFunctionWithGradient
- math_Powell
- math_NewtonMinimum
- math_NewtonFunctionSetRoot
- math_BissecNewton (just add virtual destructor)
- math_FRPR
- math_BrentMinimum (just add virtual destructor)
- OSD_Chronometer
- ProjLib_Projector

Virtual methods Delete() or Destroy() of the transient inheritors is not changed (-> separate issue).
Classes Graphic3d_DataStructureManager and PrsMgr_Presentation without changes.
2015-01-29 13:43:36 +03:00
abv
0797d9d30a 0025418: Debug output to be limited to OCC development environment
Macros ending on "DEB" are replaced by OCCT_DEBUG across OCCT code; new macros described in documentation.
Macros starting with DEB are changed to start with "OCCT_DEBUG_".
Some code cleaned.
2014-11-05 16:55:24 +03:00
abv
d5f74e42d6 0024624: Lost word in license statement in source files
License statement text corrected; compiler warnings caused by Bison 2.41 disabled for MSVC; a few other compiler warnings on 54-bit Windows eliminated by appropriate type cast
Wrong license statements corrected in several files.
Copyright and license statements added in XSD and GLSL files.
Copyright year updated in some files.
Obsolete documentation files removed from DrawResources.
2014-02-20 16:15:17 +04:00
bugmster
973c2be1e1 0024428: Implementation of LGPL license
The copying permission statements at the beginning of source files updated to refer to LGPL.
Copyright dates extended till 2014 in advance.
2013-12-17 12:42:41 +04:00
ski
75259fc556 0024399: ICC warnings 3280 "declaration hides..."
Renamed local variables to avoid ICC compiler warnings about repeated names
2013-11-28 11:36:13 +04:00
ifv
89d8607f13 0024137: math_FunctionSetRoot returns too rough solution
Test case and new draw command for issue CR24137
Modified test case de/iges_1/G9 according to new data
Small correction of test cases for issue CR24137
2013-10-03 14:34:40 +04:00
omy
258ff83bb6 0024162: Eliminate CLang compiler warning
Got rid from most cases of appearance '-Wunused-private-field' warning
2013-09-18 09:43:17 +04:00
ifv
12f139fde8 0022766: Wrong results done by several algorithms for the case of intersection between a surface of revolution and a plane
Add test case for this fix
2013-05-16 11:38:13 +04:00
abk
b659a6dc19 0023830: BRepExtrema_DistShapeShape does not find intersection of face with edge
Data member myIsDivergent was added to class math_FunctionSetRoot.
The member is initialized in method Perform start by Standard_False. The member is changed in the method to Standard_True if an approximation point is located outside of search set.

Method IsDivergent was added to class math_FunctionSetRoot.
The method returns value of myIsDivergent.

Parameter theStopOnDivergent with default value Standard_False was added to
a constructor and method Perform of class math_FunctionSetRoot.
The parameter shows whether return from method Perform if myIsDivergent
became Standard_True.

Class Extrema_GenExtCS was optimized for dynamic memory consumption:
the class surface values are not stored now.

Method Perform of class Extrema_GenExtCS was improved for local extreme
search in case of iteration algorithm divergence. Size of the algorithm
grid cell for initial approximation is reduced by 2 in the case. The count
of the reduces is limited.
Build fix in *.cdl.
Case of extrusion was carried out of the repeat loop.

Division method of the 3-dimensional grid (curve param, surface first
param, surface second param) by two was replaced by method of moving the
grid.

The moving method is about two times faster than division method.
Now grid moving method is depending on some average linear sizes of the curve and the surface.
In case (theStopOnDivergent && myIsDivergent) method math_FunctionSetRoot::Perform sets Done to Standard_False and discard it's last solution.
Test case for the bug fix.
Test case correction
Initial approximation was corrected for search of maximum in Extrema_GenExtCS::Perform.
Test case bugs moddata_3 bug23830 was formatted.
2013-04-17 15:33:27 +04:00
ama
5368adff54 0022883: Extrema can not find projection of 3D point on surface.
Optimization of process of surface discretization: increase the number of parametric points in case of a complex surface geometry (BSpline and Bezier surfaces).
Small correction process of building subgrid in Extrema_GenExtPS::FindSolution().
Minor corrections (formatting, duplicate statements)
2012-05-05 17:04:19 +04:00
bugmaster
b311480ed5 0023024: Update headers of OCCT files
Added appropriate copyright and license information in source files
2012-03-21 19:43:04 +04:00
DBV
6601f504db 0022904: Clean up sccsid variables 2012-03-05 19:32:14 +04:00
JGV
3e42bd70cf 0022851: No intersection curve between two surfaces 2012-03-05 19:31:57 +04:00
RLN and KGV
fbadd2ccce Rollback integration OCC22567 Speed up of math_FunctionSetRoot (used in Extrema) 2012-03-05 19:29:29 +04:00
RLN and KGV
3d166d310c OCC22567 Speed up of math_FunctionSetRoot (used in Extrema) 2012-03-05 19:29:20 +04:00
bugmaster
7fd59977df Integration of OCCT 6.5.0 from SVN 2012-03-05 19:23:40 +04:00