Commit Graph

7094 Commits

Author SHA1 Message Date
dpasukhi
4f95ecaa3b Tests - Update master build VS version 2026-06-16 15:45:17 +01:00
Pasukhin Dmitry
13d19b9a1f Tests, BRepGraph - Add GTests for reversed face shell orientation (#1314)
- Add helper to create shell with all faces reversed
- Test FaceRef stores REVERSED orientation for all faces
- Test ParentExplorer reports shell as parent for reversed faces
- Test Reconstruct produces valid face definitions
- Test shell reconstruction preserves REVERSED face orientations
- Unify test fixture names to BRepGraph_ReverseTest
2026-06-16 09:03:48 +01:00
Christoph Moench-Tegeder
8a3f204601 Data Exchange - on FreeBSD, check for standard-conforming timezone variable (#1277)
On FreeBSD, "timezone" from time.h only recently started following the
POSIX/XSI standard. Before that switch, timezone used to be the
historical BSD function "char *timezone(int, int)", which is
obviously not what the code here expects.

For older FreeBSDs, provide a workaround using time() and localtime().

The closest __FreeBSD_version increment I could find is 1500019,
compare
https://cgit.freebsd.org/src/commit/include/time.h?id=a34940a9756ac8edce36fec176949ee82e9235b4
and
https://docs.freebsd.org/en/books/porters-handbook/versions/#versions-15

See https://pubs.opengroup.org/onlinepubs/9799919799/ for official
POSIX documentation, especially
- https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/time.h.html
  for time.h
- https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap02.html#tag_02_01_04
  for X/Open System Interfaces (XSI)
and also FreeBSD man pages (especially the difference between versions)
- https://man.freebsd.org/cgi/man.cgi?query=tzset&apropos=0&sektion=0&manpath=FreeBSD+14.4-STABLE&format=html
- https://man.freebsd.org/cgi/man.cgi?query=tzset&apropos=0&sektion=0&manpath=FreeBSD+15.0-STABLE&format=html

CLA: 1143
2026-06-15 19:51:37 +01:00
Pasukhin Dmitry
2cf9450d6d Visualization - Add back-face vertex color policy (#1313)
- Add aspect API controlling vertex color use on back faces
- Generate front-only vertex color shader variants for face programs
- Expose the option through ViewerTest and add DRAW/GTest coverage
2026-06-15 19:49:13 +01:00
Dmitrii Kulikov
9f4899148c Modeling - Handle near-zero angles for coplanar faces in GetFaceOff function (#1312) 2026-06-15 18:35:03 +01:00
Pasukhin Dmitry
03856df0b9 Modeling Data - Fix BRepGraph topology placement population (#1311)
- Kept TopoDS definition data local while storing root
  and compound placements on graph references.
- Preserved located triangulation and polygon-on-triangulation
  data during population.
- Preserved degenerate natural boundary edges and cleared
  full-graph state consistently in Perform().
- Kept original TopoDS shape lookup bindings valid
  across population and compaction.
- Rebuilt compacted compounds in two passes so nested
  compound references keep their local placement.
- Added focused regression coverage for located meshes,
  nested compounds, shape lookup, compaction, degenerate boundaries, and reset behavior.
2026-06-15 15:46:00 +01:00
Dmitrii Kulikov
2c7d5fbdbd Modelling - Fix infinite loop in IntWalk_IWalking::ComputeOpenLine() (#1263)
Infinite loop occurred in IntWalk_IWalking::ComputeOpenLine() inside 'while (!Arrive)' loop.
Fixed by checking for degenerate case after very large amount of iterations have passed.
2026-06-15 14:46:57 +01:00
Pasukhin Dmitry
ea3fc1f8bd Modeling, BRepGraph - Identity copy path, lock-free cache reads, per-CoEdge queries (#1306)
Identity copy path:
- copyFullGraphIdentity with PrepareForLoad() + direct slot assignment
- CopyDerivedRelationsFrom for O(K) relation vector copy
- CopyRemovedFlagsFrom for bulk removed-flag copy
- CopyShapeBindingsFrom for TShape/Original shape binding copy
- PrepareForLoad skips Clear() when storage already empty (IsEmpty fast path)
- appendRelationIdDirect for O(1) append in rebuild loop (duplicates structurally impossible)
- ChangeCompoundRefsOfNodeInternal uses TryBound for single lookup
- Counts() and ActiveCounts() accessors for Counts struct construction

Lock-free cache reads:
- EdgeEntry: packed atomic<uint8_t> (GeomStatus+IsClosed+IsComputed)
- CoEdgeSameRangeEntry: packed atomic<uint8_t> (SameRange+SameParameter+Computed)
- WireEntry: packed atomic<uint8_t> (IsClosed+IsComputed)
- ShellEntry: atomic<ClosureStatus> with Invalid sentinel
- All entries use memory_order_acquire/release pairs
- ensureSize handles lazy array growth (no myPreSized)
- Enums (GeomStatus, ClosureStatus) moved inside entry structs

Per-CoEdge queries:
- SameRange/SameParameter are per-CoEdge properties, bound to CoEdge OwnGen
- Edge class no longer has SameParameter/SameRange/IsClosed coedge overloads
- CoEdge class owns SameParameter/SameRange queries
- Test files use local edgeSameParameter/edgeSameRange helpers

Lock-free storage and registry:
- BRepGraphInc_Storage: atomic dirty flags for UID reverse indexes
- BRepGraph_LayerRegistry: atomic subscription masks for lock-free dispatch
- Ensure/EnsureCache/EnsureLayer: double-checked locking with shared fast path

Other optimizations:
- Iterator Next() fast-path: check next element validity inline
- NbFaces O(K) inline dedup with NCollection_LocalArray
- GeomAdaptor_Curve/Surface/Geom2dAdaptor_Curve for cached geometry eval
- Value() calls replaced with EvalD0() for clearer naming
- TargetItem returns value instead of pointer (no null-pointer risk)
- copyTopologyDefinitionsIdentity clears Curve3DRepId on GeomPolicy::Drop
- ensureEdgeEntry concurrency: fast-path validation + selective field merge
2026-06-14 14:15:32 +01:00
Pasukhin Dmitry
2b379b9f08 Foundation Classes - Fix thread-safety of Strtod by making Bigint pool thread-local (#1309)
- The Strtod() function used a shared static Bigint memory pool
  (private_mem, pmem_next, TI0) without synchronization.
- When multiple threads called Strtod() concurrently (e.g. parallel
  BRep reading), the pool was corrupted causing random mis-parses
  of numeric values.
- Fix: declare private_mem, pmem_next and TI0 as thread_local so
  each thread gets its own independent memory pool and freelist.
- Added Standard_Strtod_Test.cxx with parallel correctness tests
  using OSD_Parallel::For.
- Added BRepTools_Test.cxx with integration tests for parallel
  BRep file reading.
2026-06-14 12:39:10 +01:00
Pasukhin Dmitry
79b6529991 Modeling Algorithms - Guard null curve in BRepExtrema_DistanceSS (#1307)
BRep_Tool::Curve() may return a null handle for edges without a 3D
curve (e.g. edges defined only by pcurves on a surface). The two call
sites in BRepExtrema_DistanceSS dereferenced the returned handle
without a null check, causing a crash when such edges were encountered
in edge-edge (PERFORM_C0) or edge-face distance computations.

Add null checks before dereferencing pCurv and return early if the
handle is null. Add GTests covering both code paths.
2026-06-14 10:45:03 +01:00
Pasukhin Dmitry
d15ffb983d DRAW - Continue pload after missing plugins (#1308)
- Catch Draw plugin load errors per resource so group loads can continue after an optional toolkit is absent.
- Report loaded and skipped plugin counts, and return an error only when no requested plugins were loaded.
- Add a regression test covering mixed missing/valid plugins and the all-missing error path.
2026-06-14 10:44:34 +01:00
gsdali
80311130dd Modeling - Guard polar-method iterator over-advance in BRepFill_CompatibleWires (#1298)
SameNumberByPolarMethod advanced the MapVLV correspondence-list iterators
(itF/itL) with no More() guard, then dereferenced itF.Value()/itL.Value().
When the polar correspondence chain is shorter than the section index
(mismatched / non-coaxial closed profiles) the iterators run off the end and
read a null list node, dereferencing address 0x8 -> SIGSEGV in release builds.

Guard the advance and fail gracefully (myStatus = Failed; return), consistent
with the other failure exits in the same function. Fixes the ThruSections crash
reported in #1297.

CLI: 1139
2026-06-13 09:47:50 +01:00
Pasukhin Dmitry
587da0ca3f Modeling Data - Rework BRepGraph storage and layers (#1305)
- Introduce item-level identifiers/remapping and move graph metadata to registered layers for history, locks, deferred state, parametric data, and supplemental topology.
- Replace the old reverse-index/cache/history helpers with storage-owned relations, version stamps, cache registry services, and copy/compact remapping paths.
- Preserve layer data, product occurrence refs, persistent mesh handles, deleted history, lock propagation, and topology supplement attachments across copy, compact, transform, reconstruct, and mutation flows.
- Update BRepGraph populate/reconstruct/editor traversal and add/refresh GTests for layers, cache services, copy, transform, compact, sparse models, IDs, and storage behavior.
2026-06-13 08:36:30 +01:00
Pasukhin Dmitry
a43c1d2ae3 Foundation Classes - Add contiguous array views and mesh hashers (#1303)
- Added Array1 views for contiguous NCollection containers, including const read-only views for LinearVector and LocalArray.
- Updated Poly mesh containers and copy paths to preserve contiguous data, deflection, cached bounds, and triangulation parameters.
- Added mesh hashers for polygons and triangulations with tests covering tolerant equality and hash consistency.
- Kept the common base allocator alive through process finalization to avoid static destruction order crashes.
2026-06-12 07:26:51 +01:00
Pasukhin Dmitry
239c41eeb0 Visualization - Fix V3d shader grid issues (#1295)
- Updated shader grid rendering to intersect the grid plane in view space and draw it with a single full-screen triangle.
- Added shader grid bounds to camera Z-fit, so the grid is visible in empty views and after object display without an extra vfit.
- Fixed shader grid echo to use the active shader grid plane, effective scale, bounds and clip-safe display point.
- Kept the viewer-managed CPU grid path separate from the per-view shader grid path and preserved CPU grid type/mode handling in vgrid.
- Added grid tests for empty/no-vfit visibility and perspective rendering without mirrored fragments.
2026-06-05 13:45:42 +01:00
Pasukhin Dmitry
02530f0217 Modeling Algorithms - rework Gordon surface construction (#1292)
- Removed `Approx_BSplineApproxInterp` (and its GTest)
- Removed `GeomFill_GordonBuilder`.
- Added `GeomFill_GordonUtilities.pxx` for curve conversion/reparametrization and intersection-table preparation
- Added `GeomFill_NetworkSurface` for direct compatible-network surface construction.
- Updated `GeomFill_Gordon` API with explicit `ResultStatus`, approximate-fallback mode, and status reporting.
2026-06-04 23:49:50 +01:00
dpasukhi
0cd8e7d601 Coding - Bump version to 8.0.0.p1 2026-06-04 22:25:30 +01:00
dpasukhi
d3056ef80c Coding - Bump version to 8.0.0 V8_0_0 2026-05-06 23:31:54 +01:00
dpasukhi
50d04fdc68 Coding - Bump version to 8.0.0.beta3 V8_0_0_beta3 2026-05-06 23:25:21 +01:00
Pasukhin Dmitry
1b9f9c6dab Documentation - Fix typos, naming, and snippet bugs in user guides (#1273)
- Align example variable names with OCCT conventions; modernize
  macros and types (Handle -> occ::handle, NULL -> nullptr,
  PI -> M_PI, Standard_EXPORT casing).
- Correct API and enum names across user guides (BOPTools_Tools ->
  BOPTools_AlgoTools, BOPAlgo_Glue -> BOPAlgo_GlueEnum,
  Geom_BSplineSurface, BRepPrimAPI_MakePrism, TransferOne,
  FindAttribute, BRepFeat_MakePrism int-Fuse signature).
- Fix long-standing snippet bugs: GetClosedWires/GetOpenWires
  mix-up, inverted IsNull in xde, vertex dimension, missing
  IsDone() guards in tutorial, missing loop around Rake.Add,
  JSON syntax in debug, BNF brackets in brep_format, sphere
  latitude range, plus assorted typos.
2026-05-06 23:24:17 +01:00
luzpaz
6dcc1f6629 Documentation - Fix typos (#1271) 2026-05-06 14:17:12 +01:00
Pasukhin Dmitry
d3adc95d96 Foundation Classes - Update Array1/2 Assign Operator (#1269)
- Updated `NCollection_Array1/2::Assign()` to copy bounds/size from the source; introduced `CopyValues()` to copy element values while preserving existing bounds.
- Replaced usages of `Assign()` / `operator=` with `CopyValues()` in several `Geom*` classes and math utilities to preserve prior behavior after the `Assign()` semantic change.
- Expanded GTests for `NCollection_Array1/2` to cover assignment behavior (owned/external buffers, size changes) and `CopyValues()` behavior.
2026-05-06 12:13:53 +01:00
Dmitrii Kulikov
654d0b07ca DRAW - Add size_t printing support. (#1270)
New overloads of Append() and operator<<() are added to Draw_Interpretor.
New overloads accept size_t type of argument.
2026-05-06 11:59:01 +01:00
Pasukhin Dmitry
9aa016011d Modeling - Restore old implementation of GProp (#1268)
- Reintroduced `GProp_PGProps` and `GProp_PEquation` implementations and registered them in `TKGeomBase`.
- Moved and split unit tests for point-set properties/equation analysis into `TKGeomBase` GTests.
- Updated callers and documentation, and removed the `PointSetLib` package from `TKMath`.
- Reverting #1140 357ae60dd9
2026-05-06 08:00:45 +01:00
Dmitrii Kulikov
6f6be66842 Shape Healing - Crash in ShapeConstruct_ProjectCurveOnSurface::insertAdditionalPointOrAdjust() (#1267)
To input parameters of ShapeConstruct_ProjectCurveOnSurface::insertAdditionalPointOrAdjust() new arrays were assigned. The size of new arrays are guaranteed to be 1 element larger that original array. NCollection_Array1::Assign() is guaranteed to throw exception when arrays size mismatch. So, given that assignment code is reached, function will always throw.
Fixed by calling move assignment instead - size mismatch is allowed in this case. Also it is more optimal.
2026-05-05 18:16:32 +01:00
Pasukhin Dmitry
9281002280 Documentation - Update various markdown files for clarity and consistency (#1265)
- Renames many example variables to align better with current OCCT naming/style conventions.
- Updates documentation around deprecated 2D construction APIs, build options, resource paths, and environment variables.
- Cleans up assorted wording, links, and outdated references across user guides, samples, and contributor docs.
2026-05-05 12:18:29 +01:00
Pasukhin Dmitry
6ba27a8c17 Modeling - Rework CoEdge definition to avoid misuse (#1261)
- Redesign seam detection/pairing to be connectivity-derived (`SeamPair()` walks sibling coedges on the same face with opposite orientations), with seam halves now present in wire `CoEdgeRefIds` to match TopoDS iteration.
- Move geometric continuity storage/round-trip to `BRepGraph_LayerRegularity` (including seam continuity), updating populate/reconstruct/editor APIs accordingly.
- Add/adjust GTests to cover seam ordering, seam symmetry, layer regularity behavior, and split/compact/reconstruct interactions under the new model.
2026-05-05 09:43:56 +01:00
Pasukhin Dmitry
058ec16010 Visualization - Grid shader update (#1264)
- Renamed grid terminology and command/API surface from `inf`/“infinite” to `gpu`/“GPU”, plus `viewAdaptive` for camera-relative sizing.
- Updated OpenGl grid rendering to compute adaptive bounds from the visible region and to fix axis coloring for rotated rectangular grids.
- Refreshed Draw tests, help text, and API comments to match the new behavior.
2026-05-05 09:43:14 +01:00
dpasukhi
a70427ff15 Coding - Bump version to 8.0.0.beta2 V8_0_0_beta2 2026-05-03 16:55:46 +01:00
Pasukhin Dmitry
42d9c36f10 Data Exchange - Make STEP write and STEP/IGES read pipelines thread-safe (#1259)
Concurrent STEPControl_Writer::Transfer calls crashed inside TCollection_AsciiString::Move with a libmalloc double-free, and concurrent STEP/IGES readers occasionally crashed inside Interface_FileReaderTool::RecognizeByLib. Both originated in process-shared mutable state that every per-thread reader/writer silently mutated.

STEP write actor (writer-side race):
- Pre-populate the shared STEPControl_ActorWrite parameter map and processing flags inside STEPControl_Controller::Init under the existing one-time mutex, so concurrent STEPControl_Writer::Transfer calls no longer mutate the shared actor in the default path.
- Drop the per-Transfer call to STEPControl_Writer::InitializeMissingParameters; defaults are now in place from controller construction time.
- Make XSAlgo_ShapeProcessor::SetParameter idempotent: skip the destructive Bind when the existing entry already matches the new value, eliminating the TCollection_AsciiString::Move/Free path that was the immediate double-free site under concurrent writers.
- Stop clearing the target ParameterMap in XSAlgo_ShapeProcessor::SetShapeFixParameters before refilling it; rely on the idempotent SetParameter for in-place replacement.

LibCtl_Library (reader-side race):
- Drop the file-scope "last protocol" optimization cache (theprotocol/thelast) that raced between concurrent STEP/IGES readers in Interface_FileReaderTool::RecognizeByLib.
- Treat the global registry as immutable after one-time controller initialization: writers (SetGlobal) serialize against each other, readers traverse without locking. Move internal helper logic into an anonymous namespace.
2026-05-03 16:29:51 +01:00
Pasukhin Dmitry
4674df1e24 Samples - Add samples directory (#1257)
- Added `samples/README.md` describing where OCCT sample applications/wrappers are maintained (external repository + browsable site).
- Updated root `.gitignore` whitelist to allow tracking the `/samples/` directory at repository root.
2026-05-03 12:03:28 +01:00
Pasukhin Dmitry
bec9558832 Documentation - Modernize for OCCT 8.0.0, GitHub workflow, and vcpkg build system (#1256)
- Migration from dev.opencascade.org/Mantis/Gitolite infrastructure to GitHub-native
  workflow (Pull Requests, Issues, GitHub Actions CI/CD).
- OCCT 8.0.0 upgrade guide with detailed notes on TCol* typedef deprecation, BSpline
  weight accessors, evaluation hierarchy refactoring (EvalD0/D1/D2/D3/DN), Handle
  out-parameter deprecation, Standard_Mutex → std::mutex, PLib value types, BRepGraph,
  TopoDS_TShape redesign, math wrapper deprecation, mesh factory registry, and more.
- Build system modernization: C++17 requirement, VS2022/GCC8+/Clang7+ compilers,
  vcpkg integration, CMake-driven documentation targets replacing legacy gendoc.
- Removed obsolete documentation: Mantis workflow, access levels, issue lifecycle,
  pre-7.1.0 upgrade history (archived at dev.opencascade.org/doc), in-tree Inspector
  and DFBrowser documentation, 3rd-party build guide (outsourced to vcpkg/upstream).
- INSTALL_DIR_RESOURCE directory now correctly described in the install tree layout.
- Obsolete BUILD_PATCH CMake option removed from documentation.
- Code examples modernized: occ::handle<> syntax, NCollection_*<T> templates, BRepAdaptor_Curve,
  IsDone() checks, null-handle guards, native C++ types over Standard_* typedefs,
  Append() over Appends(), correct variable names.
- Code block language tags: .php → .tcl for Tcl scripts, .glsl for shader listings.
- IGES translator: deprecated API calls updated (SetReadVisible + TransferRoots),
  IDT_ message API replaced with Message_Messenger, thread-safety warning added.
- DE_Wrapper: STEP thread-safety note (per-reader), IGES unsupported for concurrency.
- Removed Mantis tracker link from GitHub issue template config.
- Removed DFBROWSER and INSPECTOR entries from DrawPlugin resource file.
- Tcl reference URL updated (tcl.tk → tcl-lang.org).
2026-05-03 09:15:03 +01:00
Pasukhin Dmitry
076aad3fef Coding - Fix CI compilation warnings (#1253)
Refactor NULL to nullptr in OpenGL-related files
Fix some MacOS, Ubuntu warnings and disable too strict warning checks
2026-05-01 22:53:06 +01:00
Pasukhin Dmitry
3ad68cb6e7 Visualization - Restore CPU grid path alongside shader grid (#1252)
Commit a2e851b25 (#1223) replaced the classical Graphic3d_Structure-based grid rendering with a single shader path driven by Aspect_GridParams. This change brings the CPU rendering back as a coexisting backend so consumers can pick CPU or GPU per use case. Snap math on Aspect_Grid is unchanged; only the presentation layer is split.

V3d layer:
- V3d_RectangularGrid / V3d_CircularGrid restore the nested custom Graphic3d_Structure, myStructure / myGroup, DefineLines / DefinePoints and the myCur* change-detection cache. UpdateDisplay rebuilds the primitive arrays with the same SetTransformation + CalculateBoundBox flow as before #1223.
- DefineLines / DefinePoints use NCollection_LinearVector<gp_Pnt> pre-sized from XStep / YStep / Radius to avoid reallocations.
- V3d_CircularGrid emits a one-shot warning when an arc range is set (CPU cannot honor it; use the shader path for arcs).

V3d_View layer:
- V3d_View tracks myShaderGridActive. SetGrid erases the shader grid on this view before activating the CPU grid; GridDisplay erases the viewer-wide CPU rendering (snap geometry preserved) before enabling the shader grid. Remove tears both down.

Aspect / Viewer:
- Aspect_GridParams comment clarifies it is consumed only by the GPU path. V3d_Viewer.hxx grid block is annotated as the legacy CPU entry.
2026-05-01 21:57:59 +01:00
dpasukhi
344d6139b6 Coding - Bump version to 8.0.0.beta1 V8_0_0_beta1 2026-04-30 10:40:40 +01:00
Pasukhin Dmitry
04025d1cc3 Testing - Update reference data for migration to new station (#1248)
- Adjusted faulties and warnings in tests for IGES and STEP files to reflect updated results.
- Corrected tolerance values in multiple tests to ensure accuracy in shape validation.
- Updated expected label counts and properties in several test cases to align with new outputs.
- Modified error messages and expected results in HLR and offset tests for consistency.
- Refined metadata checks in GLTF and STEP tests to match revised reference sizes and values.
- Update Improvements cases with removing TODO
2026-04-30 10:38:25 +01:00
Pasukhin Dmitry
883cece8e3 Shape Healing - Refactor shape replacement logic to handle cycles (#1247)
Apply some fixes where aaa82fc4de introduce as a regressions
2026-04-30 00:01:00 +01:00
Pasukhin Dmitry
91be8c4c71 Coding - Fix MSVC warnings (#1246)
- Replace various `Size()` calls with `Extent()`/`Length()` (int-returning) when passing element counts into `Message_ProgressScope`.
- Make “unsupported id type” fallbacks explicit in `BRepGraphInc_Storage` visitors to avoid MSVC control-path warnings.
- Minor warning-focused cleanups (loop variable rename in a test, use of `BRepGraph_NodeId::Invalid()`, removal of duplicated `Standard_EXPORT`).
2026-04-29 16:31:37 +01:00
Pasukhin Dmitry
1db8025677 Coding - Apply Clang-Tidy automatic fixes (#1245)
Flags:
aChecks="modernize-deprecated-headers,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-nullptr,modernize-use-override,performance-avoid-endl,performance-move-constructor-init,readability-braces-around-statements,readability-delete-null-pointer,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-redundant-member-init,readability-redundant-string-init,readability-static-accessed-through-instance"

clang-tidy version: 22.1.3
2026-04-29 15:04:38 +01:00
Pasukhin Dmitry
2cafd4fa58 Coding - Utilize NCollection_LinearVector instead vector (#1244)
- Replaced many `std::vector` usages with `NCollection_LinearVector`, updating call sites to use `Size()`, `Append()`, `EmplaceAppend()`, `Resize()`, `Reserve()`, `Clear()`, and `Data()`.
- Updated BVH array type plumbing to consistently use `NCollection_LinearVector`, simplifying conditional STL-vs-OCCT handling.
- Extended `NCollection_LinearVector` API (constructor with size+value, `Resize(size, value)`) and added new GTests for this behavior.
2026-04-29 11:46:00 +01:00
JIJINBEI
9255ff687a CI/Build - Enable -Werror on GCC/Clang (#1209)
- Inject `-Werror` (plus select warning toggles) into the shared GitHub Action used for configuring Linux/macOS builds.
- Replace several `0` / `CopyFromParent`-style null constants with `nullptr` to satisfy `-Wzero-as-null-pointer-constant`.
- Add defensive bounds/clamps and initialization to avoid fixed-buffer overreads/memcpy/sort issues and uninitialized reads.
2026-04-28 21:42:31 +01:00
JIJINBEI
4d64ddc666 Coding - Apply modernize-* and readability-* clang-tidy checks (#1207)
- Replaces `push_back(T(...))` with `emplace_back(...)` where applicable.
- Replaces `size() == 0` / `size() != 0` checks with `empty()` / `!empty()`.
- Simplifies trivial constructors/destructors to `= default` and removes redundant `(void)` parameter lists.
2026-04-28 20:01:47 +01:00
Pasukhin Dmitry
200d1d0b2f Moding - Update BRep Graph permission usage (#1242)
- Replaced many direct field writes in tests with `EditorView` typed setters and `GenOps::RemoveRef`, and updated mutation-gen tests to use `MarkDirty()`.
- Added incremental reverse-index bind/unbind helpers in `BRepGraphInc_ReverseIndex` and updated editor operations to maintain the reverse index without full rebuilds in many cases.
- Extended `BRepGraph_Copy`/`BRepGraph_Transform` to `CopyNode`/`TransformNode`, adding optional mesh-copy/transform support and new coverage tests.
2026-04-28 19:54:52 +01:00
Pasukhin Dmitry
39bbf2ed59 Testing - Migration QADraw tests to GTests (#1243)
- Added new GTests covering multiple historical regressions (intersection, projection, pipe shell, boolean ops, fillet, distances, gp transforms, string hashing).
- Registered new test sources in the relevant `GTests/FILES.cmake` lists.
- Removed legacy Tcl tests and removed the associated QADraw commands from `QABugs_*.cxx`.
2026-04-28 18:25:29 +01:00
Pasukhin Dmitry
051b12466a Coding - Update deprecated macros for aliases (#1241)
- Added `Standard_DEPRECATED_STD(...)` to `Standard_Macro.hxx`, expanding to the standard `[[deprecated("...")]]` attribute (or empty when `OCCT_NO_DEPRECATED` is defined).
- Replaced `Standard_DEPRECATED(...)` with `Standard_DEPRECATED_STD(...)` in multiple `GCE2d_*` alias headers to keep deprecation warnings while restoring compiler compatibility.
2026-04-28 16:24:49 +01:00
Pasukhin Dmitry
aaa82fc4de Modeling - Fix stack overflow and edge multiplication in shape healing with shared sub-shapes (#1227)
- Add replacement-chain leaf resolution (`ValueLeaf()`), cycle rejection on `Replace()`, and DFS in-flight guards to prevent recursive descent loops.
- Update ShapeFix healing routines to avoid repeated sub-shape re-expansion, add progress cancellation checkpoints, and reduce quadratic wire-fixing cost.
- Add/adjust regression coverage (new GTests; updated existing Draw tests/baselines).
2026-04-28 15:05:42 +01:00
Pasukhin Dmitry
3cf18a1452 Modeling - Implement degenerate thin solid detection (#1231)
Refactor FillSameDomainFaces to use parent solid instead of shell for Same-Domain face mapping
2026-04-28 12:54:13 +01:00
Pasukhin Dmitry
bea50c2fd8 Modeling - Tangent case with 2 cylinders (#1228)
2 cylinders are tangent along a line.
The analytical intersection returns a point which is not valid and it is a restriction of the analytical intersection algorithm.
The patch is ensured to use the implicit-implicit intersection algorithm.
2026-04-28 12:50:12 +01:00
Pasukhin Dmitry
048a2927fb Modeling - BRep Graph Builder and Editor clean up (#1237)
- Replace `BRepGraph_Builder::Perform()` with `BRepGraph_Builder::Add()` and introduce `BRepGraph::Clear()` as the rebuild boundary.
- Refactor product/occurrence editing APIs (e.g., `AddAssembly` → `CreateEmptyProduct`, `AddOccurrence` → `LinkProducts`, occurrence mutation via `Editor().Occurrences()`).
- Update a large set of GTests and inline docs to use the new lifecycle and API names.
2026-04-26 15:02:00 +01:00
Pasukhin Dmitry
0804c2b3f9 Testing - Migration QADraw tests to GTests (#1235)
- Removed multiple legacy DRAW test scripts and several QABugs DRAW command implementations.
- Added new GTest suites covering the migrated regressions in ModelingData/ModelingAlgorithms/FoundationClasses/DataExchange/ApplicationFramework.
- Updated multiple `FILES.cmake` lists to compile/link the new tests; introduced an additional `STEPControl_Writer::SetShapeFixParameters()` overload.
2026-04-26 12:22:37 +01:00