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

46 Commits

Author SHA1 Message Date
dpasukhi
604c3b890c Documentation - Update parameter annotations for consistency #161
Reorganized style for param to the next templates:
 - "@param theParameter description ..."
 - "@param[in] theParameter description ..."
 - "@param[out] theParameter description ..."
 - "@param[in][out] theParameter description ..."
 The replacement was with keeping spacing, no removing of extra spaces.
In some files '/' was used instead of '@', that was not updated yet.
2024-11-17 20:22:51 +00:00
dpasukhi
8082b955bd Coding - Reorganize code with constexpr #68
After rework Precision.hxx some local
  variables can be marked as constexpr
2024-09-22 12:46:46 +00:00
dpasukhi
1103eb60af 0033370: Foundation Classes - Moving into STL and Boost functionality
NCollection containers update:
  - NCollection_Array1 - updated functionality
  - NCollection_Array2 - NCollection_Array1 as a wrapper for 2array
  - NCollection_Vector -> NCollection_DynamicArray was renamed and reworked.
TCollection:
  - Use static empty string to avoid allocations on empty string
 NCollection allocators update:
  - NCollection_Allocator - allocator that used Standard::Allocate
  - NCollection_OccAllocator - allocator-wrapper that used OCC BaseAllocator objects
  - NCollection_IncAllocator - rework to increase performance
Standard:
  - Rework functionality to use different allocation libs
  - Implement basic of new way to wrap allocations tools
  - Define 4 ways to allocation (defines in configure stage)
 Additional changes:
  - Hash function uses std::hash functionality
   - size_t as a hash value
  - New HashUtils with Murmur and FVN hash algo for x32 and x64
  - Deprecated _0.cxx and .gxx DE classes reorganized
  - Create own utility for std memory
  - Update Standard_Transient to be more platform-independent
 Math TK changes:
  - math_Vector -> match_BaseVector<>
    - Buffer decreased to cash 32 elements instead of 512
2023-12-04 13:37:09 +00:00
aml
33a4d46b28 0032781: Coding - get rid of unused headers [BRepCheck to ChFiKPart] 2022-01-19 20:05:46 +03:00
kgv
ce7fe22d97 0032743: Coding Rules - remove unused class friends of Package classes 2021-12-20 18:10:56 +03:00
aml
0c9c466e9d CR32614 Coding - get rid of unsused forward declarations [Adaptor2d to GccAna]
Packages from Adaptor2d to GccAna are processed.
2021-10-12 20:11:16 +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
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
vro
a8b605eb5e 0032133: Modeling Data - Restriction of access to internal arrays for Poly_Triangulation, revision of API
Removed methods from Poly_Triangulation/Poly_PolygonOnTriangulation giving access to internal arrays of 2d and 3d nodes, triangles and normals.
2021-02-18 18:55:21 +03:00
luz paz
4551e1be75 0031939: Coding - correction of spelling errors in comments [part 8]
Fix various typos

Fixed via codespell v2.1.dev
2021-02-03 18:31:42 +03:00
osa
538ab5dd8a 0032078: Visualization, Poly_Triangulation - add cached bounding box.
1) Add empty constructor for Poly_Triangulation(),
2) Add Poly_Triangulation::HasGeometry() method to check that triangulation has any geometry.
3) Add possibility to cache bounding box in Poly_Triangulation and use it later in case of empty triangulation.
4) Add Poly_Triangulation::MinMax() to extends input box with bounding box of triangulation.
5) Add Poly_Triangulation::UpdateCachedMinMax() to cache min - max range of this triangulation with bounding box of nodal data.
6) Add virtual Poly_Triangulation::computeBoundingBox() to calculate bounding box of nodal data.
7) Update BRepBndLib::Add/AddOptimal/AddOBB algorithms to check empty triangulation and use cached box in this case.
8) Update BRepGProp::roughBary/surfaceProperties/volumeProperties to skip empty triangulation.
9) Remove additional myBox from RWGltf_GltfLatePrimitiveArray and some hack to save this box as nodes of base Poly_Triangulation.
10) Cache min-max range from JT file during its parsing
2021-01-27 21:21:32 +03:00
luz paz
b81b237fa4 0031939: Coding - correction of spelling errors in comments [part 5]
Fix various typos

Fixed via `codespell v2.1.dev
2020-12-23 19:30:48 +03:00
luz paz
21c7c45701 0031939: Coding - correction of spelling errors in comments
Fix various typos

Fixed via `codespell v2.0.dev`
2020-11-21 12:19:49 +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
kgv
87018b452a 0030924: Coding - incorrect header in file OSD_ThreadPool.hxx
Fixed license statements within files BRepGProp_MeshProps.cxx, BRepGProp_MeshProps.hxx,
OSD_ThreadPool.cxx and OSD_ThreadPool.hxx.

Removed non-ASCII char from BRepMesh_ModelHealer.hxx.
2019-08-29 19:02:45 +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
kgv
8ff2e494f5 0029939: Modeling Algorithms - add NULL check to BRepGProp_Face::Load()
BRepGProp_Face::Load() has been protected against crash in case of edges without p-curves.
2018-07-13 15:03:55 +03:00
ifv
4b114473ef 0029734: Modeling Algorithms - Compute global properties of tessellated shape
New algorithms calculating global properties on mesh data have been added:
- BRepGProp_MeshCinert computes the global properties of polylines represented by a set of points;
- BRepGProp_MeshProps computes the global properties of a surface mesh.

Existing tool BRepGProp now automatically uses new algorithm for triangulation-only faces.
By default, algorithm will use exact geometry objects (surfaces), when it is available (as before the patch);
this behavior can be switched by a new flag UseTriangulation, forcing usage of triangulation instead of exact geometry when both defined.
2018-06-23 13:12:36 +03:00
kgv
b2d1851c43 0029814: Modeling Data - add method TopoDS_Shape::NbChildren() for simple check of sub-shapes number
TopoDS_Shape::NbChildren() - new method has been introduced.
TopoDS_Shape.lxx, TopoDS_TShape.lxx - inline methods have been moved to hxx.
TopoDS_TShape_Flags has been redeclared as enumeration instead of preprocessor macros.

Cyclic dependency between headers TopoDS_Shape.hxx and TopoDS_TShape.hxx eliminated.

Places where TopoDS_Iterator is used only for calculation of number of sub-shapes are updated to use NbChildren() instead
2018-06-14 14:03:09 +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
kgv
c48e2889cd 0028643: Coding rules - eliminate GCC compiler warnings -Wmisleading-indentation 2017-04-14 13:04:04 +03:00
msv
89aebdea8d 0027033: Modeling -- ensure stable result of area calculation
The method BRepGProp_Face::LKnots has been corrected to make proper initialization of the output data for the case of a circle.
Added test case bugs/modalg_6/bug27033
2016-11-25 13:50:18 +03:00
msv
c894a5fdfc 0027992: Modeling Algorithms - Extrema_ExtPS crashes on face without geometric surface
The algorithm BRepExtrema_DistShapeShape has been protected against exceptions when non-geometric shape data is given on input, like a face containing triangulation only or an edge containing polygon only. Such faces/edges are ignored by the algorithm.

BRepGProps::VolumeProperties() now ignores faces without geometric surface to avoid access violation.
2016-11-17 18:49:36 +03:00
kgv
4d19a2c5e7 0027991: Modeling Algorithms - BRepGProp_Face crashes on face without geometric surface
BRepGProps now ignores faces without geometric surface to avoid access violation.
BRepExtrema_DistShapeShape::DistanceMapMap() now skips comparison between void bounding boxes.
BRepBndLib::Add() now ignores useTriangulation flag for faces without geometric surfaces, and uses triangulation if any for updating of the box.
2016-10-28 17:26:51 +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
ifv
fe3e01db81 0027273: The computation of linear properties on shared shapes is not correct
New flag is inserted in parameters of static methods LinearProperties(...), surfaceProperties(...), volumeProperties(...). This flag defines to skip or not to skip second and next appearance shared topology entities (edges, faces, shells) in properties calculation.
Corresponding Draw commands is modified to take in account new parameter.

Test case for issue CR27273

Add option -skip into checkprops command
2016-03-28 17:31:20 +03:00
ifv
a4ed7309ff 0027063: BRepGProps raises exception on edge with no curves
Method BRepGProp::LinearProperties() is corrected to treat not geometric edges (their length is zero). To avoid wrong working of command nexplode global properties are calculated as point properties of vertexes. Small value Epsilon(1.) is used as density of points. This prevents exception on shapes that contain such edges, e.g. copy of a wire containing degenerated edge.

Method BRep_Tool::IsGeometric() is optimized to avoid nested iteration for check of 3D curve for Null.
Small bug is fixed in GProp_PGProps.cxx
2016-02-05 11:14:40 +03:00
ifv
5b0f2540d7 0026607: Wrong value of area.
Test case for issue CR26607

Fix regressions

Correction of test cases for issue CR26607
2015-10-01 13:49:24 +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
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
abv
c04c30b3ee 0024023: Revamp the OCCT Handle -- general
Missing headers added; includes of headers "Handle_...hxx" removed.

Misuses of macro Handle() and its use in typedefs corrected.

Alias classes Profile and Option are removed from IFSelect; ones defined in MoniTool are used directly.

Removed header files defining only Handle classes (except Image_PixMap_Handle.hxx)

Classes SelectMgr_BaseFrustum and now inherit Standard_Transient and can be manipulated by Handle (not NCollection_Handle)

Fixed reference-type local variable pointing to temporary object

Use of handle in conditional expressions and comparisons to NULL are replaced by call to method IsNull()
2015-07-11 12:08:02 +03:00
abv
35c0599a42 0024023: Revamp the OCCT Handle -- automatic
Automatic upgrade by command "occt_upgrade . -handle"
2015-07-11 12:08:01 +03:00
azn
9bd59d1c5b 0025630: Possible memory leaks in BRepGProp_Vinert and BRepGProp_Sinert
Code refactoring of BRepGProp_Sinert and BRepGProp_Vinert classes.
- All static variables have been removed.
- Common functionality connected with Gauss integration has beem moved from BRepGProp_Sinert and BRepGProp_Vinert classes to the new BRepGProp_Gauss class.

Slight changes in the comments.

Fix compilation error.

Fix Sinert errors. Rebased on new master.

Elimination of constant conditional expression warnings.

Small fix in comment.
2015-03-19 17:08:13 +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
nbv
e97a6598fe 0024829: sprops with precision throws an exception
Reason of exception is reading nonexistent element of array.

Test case for issue CR24829
2014-05-08 11:55:10 +04:00
dln
424cd6bb64 0024774: Convertation of the generic classes to the non-generic. Part 8
Generic classes:

 "GProp_CGProps",
 "GProp_SGProps",
 "GProp_VGProps",
 "GProp_VGPropsGK",
 "GProp_TFunction" (internal),
 "GProp_UFunction" (internal)

from "GProp" package converted to the non-generic classes and moved to the "BRepGProp" package. Names of several classes were changed to:

 "BRepGProp_Cinert",
 "BRepGProp_Sinert",
 "BRepGProp_Vinert",
 "BRepGProp_VinertGK".

Also all instantiations of the "internal" classes of this classes were moved to the "Geom2dHatch.cdl". For new "BRepGProp_TFunction" and "BRepGProp_UFunction" internal classes two new "*.cdl" files were created.
2014-04-04 12:57:35 +04: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
Denis Barbier
96a95605cd 0024510: Remove unused local variables
When warnings are enabled, compilers report lots of occurrences
of unused local variables, which makes it harder to find other
meaningful warnings.
This commit does not fix all unused local variables.

Fix new type conversion warning

Code cleaned to avoid MSVC compiler warnings on unused function arguments.
Several useless pieces of code are removed.
Changes in IntTools_EdgeFace.cxx, Blend_Walking_1.gxx, Bnd_BoundSortBox.cxx, ProjLib_ProjectedCurve.cxx are reverted (separated to specific issue for more in-depth analysis).
2014-01-09 12:21:51 +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
c24d401753 0024275: Cppcheck warnings on uninitialized class members
Removed warning of cppcheck on uninitialized class members for non-array cases
New additional compilation warnings on Windows platform from file OSD_Path.cxx were fixed
Warnings about wrong initialization removed
2013-11-14 11:09:32 +04:00
omy
4e18e72a22 0024096: Eliminate compiler warning C4505 in MSVC++ with warning level 4
Removed obsolete functions from sources.
Some useful debug functions were 'defined' ( put into #ifdef ...#endif )
Removed some redundant code
2013-08-15 17:23:27 +04:00
omy
d3f26155b5 0024058: Eliminate compiler warning C4702 in MSVC++ with warning level 4
Got rid of most of warnings of C4702 type: unreachable code.
Returned some #ifdef DEB
Fixed tabs formatting
Fixed some mistakes in code
2013-07-12 12:54:01 +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@opencascade.com
6e6cd5d949 0022922: Clean up warnings on uninitialized / unused variables 2012-03-15 11:57:41 +04:00
DBV
c6541a0c86 0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler) 2012-03-05 19:31:33 +04:00
bugmaster
7fd59977df Integration of OCCT 6.5.0 from SVN 2012-03-05 19:23:40 +04:00