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

261 Commits

Author SHA1 Message Date
Pasukhin Dmitry
1f386af59f
Coding - Update method guards for consistency #333
Apply new regex replacement with method's guards in .cxx
Update GH workflow with style checking
2025-02-03 11:16:00 +00:00
dpasukhi
a5a7b3185b Coding - Apply .clang-format formatting #286
Update empty method guards to new style with regex (see PR).
Used clang-format 18.1.8.
New actions to validate code formatting is added.
Update .clang-format with disabling of include sorting.
  It is temporary changes, then include will be sorted.
Apply formatting for /src and /tools folder.
The files with .hxx,.cxx,.lxx,.h,.pxx,.hpp,*.cpp extensions.
2025-01-26 00:43:57 +00:00
dpasukhi
f91655b0c5 Coding - Isolate long attached comments for clang-format #259
Automatically update code with clang-format disabling for avoiding formatting.
You can check the python script in GitHub PR
2025-01-16 20:15:29 +00:00
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
astromko
b332761e13 0033648: Modeling Algorithms - Bad partition result
Removed unnecessary tolerance increase for Line\Line intersection.
Tolerance increasing logic for some specific curve types
  was added with #26619.
Original fix had no test for Line/Line case and
  theoretically was added as a possible issue.
After research Line/Line case doesn't need a special tolerance case.
2024-08-25 08:37:51 +00:00
luzpaz
245febe036
0033778: Documentation - Fix various typos found in codebase 2024-07-26 08:51:12 +01: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
dpasukhi
92e0a76a50 0033379: Coding - Processing Clang-15 warnings
Fixed warning generated by Clang++-15
2023-05-19 19:34:37 +01:00
dpasukhi
b2fedee6a1 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-05-19 19:33:59 +01:00
akaftasev
c28dd7f1cf 0033361: Modeling Algorithm - Fuse operation generates incomplete result
Added additional check of Face-Face intersection to avoid missing section edges because of sequence of Face-Face interference processing
2023-05-18 22:48:45 +01:00
akaftasev
2ef94c994e 0033340: Modeling Algorithm - Improve memory management performance in the PaveFiller
Changed NCollection_BaseAllocator to NCollection_IncAllocator in BOPAlgo_PaveFiller::MakeBlocks()
2023-03-19 20:53:53 +00:00
akaftasev
a011359b8a 0033227: Modeling Algorithm - BOPAlgo_BuilderSolid generates incomplete result
Deleted outer loop for shells.
Added additional check of edges orientation for RefineShell().
2023-01-03 18:01:05 +00:00
aml
034d1403b1 0032953: Coding - add missing references where applicable 2022-05-04 21:08:16 +03:00
ifv
9eee5ab7e4 0032701: Modeling Algorithms - 2d curve has bending near the degenerated edge of the face
ApproxInt_Approx, ApproxInt_KnotTools, BRepApprox_Approx,
GeomInt_IntSS, IntTools_FaceFace:
  Analysis of curvature is added for adjusting ParametrizationType

IntPatch_Intersection.cxx - adding methods for estimation of UV max step depending on used surfaces

GeomInt_IntSS.cxx, IntTools_FaceFace.cxx - using methods for max step estimation

Approx_SameParameter.cxx - adding control against big values.

BOPAlgo_PaveFiller_6.cxx - adjusting position of faces before intersection
2022-01-25 21:54:13 +03:00
aml
33a4d46b28 0032781: Coding - get rid of unused headers [BRepCheck to ChFiKPart] 2022-01-19 20:05:46 +03:00
aml
9ff36dac47 0032768: Coding - get rid of unused headers [BopAlgo to BRepBuilderAPI] 2022-01-12 23:10:09 +03:00
aml
c2064b60e7 0032603: Coding - get rid of unsused forward declarations
Packages from Adaptor2d to BRepMesh are processed.
2021-10-04 20:03:10 +03:00
emv
f72c595119 0032578: Modeling Algorithms - Splitting face by set of edges fails
Update information about ON/IN sub-shapes for all touched faces when intersection with shapes of lower types (edges and vertices) complete.
Previously only the faces participating in the Face/Face intersection were updated.
2021-09-27 20:12:00 +03:00
akaftasev
8ab0b859df 0030788: Modeling Algorithms - BRepAlgoAPI_Defeaturing does not propagate progress indicator to underlying algorithms
Added progress indicator to BRepAlgoAPI_Defeaturing
2021-09-08 19:14:11 +03:00
akaftasev
d03c08988c 0021264: Modeling Algorithms - Progress indicator for Boolean operations
Update BOP commands to use progress indicator
Deleted wrong usage of progress indicator from bop operations
Added UserBreak() method to break execution boolean operation if progress indicator is used
Added method AnalyzeProgress() to calculate steps of progress indicator
Introduce BOPAlgo_ParallelAlgo which has myRange as a field to be used in parallel vector.
Provide suitable way of keeping the progress steps of operations.
Give meaningful names to progress scopes.
Propagate progress indicator into deeper methods of BOA.
Add progress indicator to BOPAlgo_BuilderFace and BOPAlgo_WireSplitter, BOPAlgo_BuilderSolid and BOPAlgo_ShellSplitter
2021-09-03 20:19:55 +03:00
kgv
690757a382 0032453: Documentation - nested multiline comments within BOPAlgo_CellsBuilder.hxx destroy Java wrapping 2021-06-18 18:35:43 +03:00
kgv
3738565abb 0026365: Optimization of work of OSD_Parallel class members for GeomLib_CheckCurveOnSurface
Removed workaround within GeomLib_CheckCurveOnSurface.
2021-05-26 20:20:38 +03:00
emv
e22a91ccc9 0032199: Modeling Algorithms - BOP Cut produces invalid shape
Use section tolerance for checking the valid range.
2021-03-17 19:59:48 +03:00
emv
58210e5983 0032136: Modeling Algorithms - Boolean fuse fails and corrupts the argument-shape
Avoid increasing tolerance of the vertex before the check on valid range is passed.
2021-03-05 18:00:28 +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
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
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
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
emv
815f039bd2 0031836: Modeling Algorithms - Boolean cut failed between a Cone and a Torus
BOPAlgo_PaveFiller::UpdateExistingPaveBlocks: Add check for closed edge when updating pave block.
2020-10-13 19:18:02 +03:00
kgv
d922149528 0031842: Coding Rules, BOPAlgo - eliminate CLang warning -fsanitize=undefined reference binding to null pointer
Added NULL checks before Progress Scope pointer dereference.
2020-10-13 19:07:42 +03:00
ifv
bf46352772 0031700: Modeling Algorithms - Regression in 0029580 after integration 0029839
BOPAlgo_PaveFiller_6.cxx: protection against creation of thin faces is added
bug29580_1: reverting in original state

dimensions.tcl: correction according to current state of BO algorithm
2020-10-06 20:40:24 +03:00
emv
d476fc37f8 0030559: BOP Fuse: result is inconsistent
Implement alternative approach for making the edge seam (closed) on the face. This approach is useful for non-periodic surfaces (e.g. tore-like surface of revolution is periodic in U direction only).
Avoid internal faces in the affected solids of the result of BOP Fuse.
2020-09-27 12:00:04 +03:00
emv
cd0705f660 0024789: BOPAlgo_Builder produces invalid result on planar, conical and spherical surfaces
BOPAlgo_PaveFiller::MakeBlocks() - Improve Face/Face post treatment procedure by:
* Adding more existing edge for intersection with section edges to resolve all possible intersections.
* Using tree for edges selection.
* Avoiding intersection of the existing edges among themselves.

IntPatch_ImpImpIntersection::CyCyNoGeometric - add more points to wline to make it more smooth.
2020-09-18 17:46:50 +03:00
emv
7f7d121f90 0030786: BOP Cut: artifacts with enabled nondestructive flag
Avoid PaveBlocks initialization on vertex update.
Test case for the issue.
2020-09-18 17:46:49 +03:00
msv
7e785937b3 0025748: Parallel version of progress indicator
Progress indication mechanism is refactored to support incrementing progress within multithreaded algorithms.

The class Message_ProgressIndicator is only an interface to the user application.
It accumulates the progress provided by progress scopes.
The counter is protected by mutex for thread-safety.

The new class Message_ProgressScope replacing Message_ProgressSentry should be used to advance the progress.
The scopes are nested to each other to reflect the nested nature of operations.
The new class Message_ProgressRange should be used to pass the progress to sub-scopes.

All OCCT algorithms involving progress indication have been updated to new API.

Improvements in Draw_ProgressIndicator:
- Separate console mode has been added in order to make possible to put the progress into std::cout instead
  or in addition to the draw interpreter, instead of trigger option "-tclOutput".
- Treatment of Ctrl-Break signal has been added.
  Now any operation can be aborted by Ctrl-C or Ctrl-Break keystroke.

Added new test case 'perf fclasses progr_par' for testing of parallel work of the progress.
2020-09-12 20:42:22 +03:00
kgv
7d47ebdbcd 0030617: Coding - using reinterpret_cast instead of static_cast for downcast
Several reinterpret_cast have been replaced by static_cast when applicable.
2020-09-02 18:48:56 +03:00
ifv
e8e8b273bb 0029839: Modeling Algorithms - Unexpected Circle to BSpline surface extrema behavior
Extrema_ExtCS.cxx: treatment of small line segments is added;
Extrema_GenExtCS.cxx: treatment of particular cases curve-quadric and conic-surface are added
Extrema_GlobOptFuncCQuadric, Extrema_GlobOptFuncConicS: new distance functions for particular cases are added

BOPAlgo_PaveFiller_5.cxx : treatment of large common parts edge-face is improved
ElSLib.cxx : method TorusParameters(...) is modified to avoid divide by zero
math_PSOParticlesPool.cxx : initialization of array is added
2020-07-08 16:03:10 +03:00
emv
2a6b7c2306 0031604: Wrong result of Boolean Operation Cut
BOPAlgo_WireSplitter::Path - continue building the next loop with the last edge not included into found loop.
2020-07-08 16:03:10 +03:00
emv
62fbfa9856 0031207: Regression in Boolean Operations: fuse gives wrong result
ForceInterfEE, ForceInterfEF - Use normalized vectors for angle computation. Increase the criteria angle.
2020-04-16 10:00:54 +03:00
emv
3f7e5e99d5 0031462: Modeling Algorithms - BOP result depends on the arguments order
Eliminate numerical instability by ensuring that the tolerance of intersection entities is slightly grater than the actual distance to the shapes creating the entity.
2020-04-01 20:44:23 +03:00
emv
739c7e5968 0030386: Modeling Algorithms - Unable to perform Cut operation
Get rid of requirement for the arguments of Boolean operations of type CUT and COMMON to be one-dimensional shape. For FUSE operation this requirement is kept.
2020-03-04 19:17:16 +03:00
emv
c08fd12706 0029843: Modeling Algorithms - Boolean FUSE produces incorrect result
When splitting the shell/face with internal faces/edges use the 'internal' criteria of the face to choose the way to create loops.

Side effect changes:
- When performing Boolean operation - move the objects located far from Origin to the Origin to increase the accuracy of intersections.
2019-10-22 15:15:45 +03:00
emv
9324aa2d0d 0030656: Modeling Algorithms - Change Boolean Operations algorithm to use BVH tree instead of UBTree
Switching the Boolean Operations algorithm to use the BVH tree instead of UB tree as selection of the elements from BVH tree is usually faster.
2019-06-04 17:36:43 +03:00
jgv
9369e98a62 0030590: Wrong result of Boolean Cut algorithm
Modification in static method BoundedArc of IntStart_SearchOnBoundaries:
    add exact intersection of canonical curve-surface (when Func is IntPatch_ArcFunction).
2019-05-24 12:11:52 +03:00
emv
47cd8af2d2 0030670: Modeling Algorithms - Performance improvement of Boolean Operations algorithm
The following improvements have been made in Boolean operations algorithm:
1. Added possibility to update FaceInfo structure for many faces at once which helps to avoid nested loops.
2. Improve Point-Face classification procedure by caching the FaceExplorer for a face.
2019-05-24 10:33:23 +03:00
nbv
858435884d 0029523: Problem with BRepOffsetAPI_MakeEvolved
The capabilities of the class BRepOffsetAPI_MakeEvolved have been extended with involving alternate algorithm of resolving the loops in the piped shape. The new option theIsVolume is added for that in the constructor.

New class BRepFill_AdvancedEvolved has been created in order to provide new OCCT-algorithm combining BRepFill_PipeShell and BOPAlgo_MakerVolume.

A change in BOPAlgo_PaveFiller.cxx has been made in order to solve a specific problem of Boolean operation.

The interface of DRAW-command "evolved" has been updated to add the new option. DRAW-command "evolvedsolid" has been deleted. Now it is replaced with DRAW-command "evolved" with the option "-solid".

Testgrid "evolved" has been created.
2019-05-07 14:20:58 +03:00
kgv
fc867b96a5 0030618: Modeling Algorithms, BOPTools_Parallel - avoid using map for thread-local contexts without TBB
OSD_Parallel::ToUseOcctThreads() - new flag allowing to use OCCT threads implementation even when compiled with TBB (for testing).
Added new command dparallel for managing default Thread Pool.
OSD_Parallel::For() now avoid creation of universal iterator in simplest case.

BOPTools_Parallel - eliminated redundant typedefs/explicit instantiations of templates.
Added functor using array of per-thread context instead of a map.
2019-04-08 15:59:23 +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
emv
0c09fd3c6f 0029692: Add functionality to make the group of touching same-dimensional shapes connected
Implementation of the new class *BOPAlgo_MakeConnected* for making the group of touching same-dimensional shapes connected.
Provide the material association for the first sub-elements of the input shapes.
Provide possibility to make the connected shape periodic.

Draw commands for new algorithm:
* makeconnected - make the input shapes connected or glued, performs material associations;
* cmaterialson - returns the materials located on the requested side of a shape;
* cmakeperiodic - makes the connected shape periodic in requested directions;
* crepeatshape - repeats the periodic connected shape in requested directions requested number of times;
* cperiodictwins - returns all periodic twins for the shape;
* cclearrepetitions - clears all previous repetitions of the periodic shape, keeping the shape periodic.

Documentation & test cases for the new algorithm.
2018-12-07 18:49:58 +03:00