- Migrated node/ref/rep ID types and many count-returning APIs from `int` to `uint32_t`/`size_t` (history indices), updating iterators and bounds checks accordingly.
- Reworked numerous loops from raw integer indexing to typed-id iteration (`Start()`, `IsValid()`, range-for) across core code and tests.
- Expanded compaction test coverage (incl. bounding-box preservation assertion), plus clearer assertions/messages.
- Migrate NCollection map/sequence/array size APIs from int to size_t; Size() returns size_t, Length() remains the int accessor; int overloads delegate through NbBucketsFromInt() with a negative-input guard.
- Add NCollection_LinearVector: contiguous flat-buffer dynamic array with Standard::Reallocate-based growth for trivial types and move-construction for non-trivial types.
- Rewrite NCollection_DynamicArray on top of LinearVector<T*>; switch to power-of-two block sizing with precomputed shift/mask.
- Rework NCollection_BaseMap iterator with a forward findFirst() helper (no negative-bucket arithmetic); unify ReSize/BeginResize/EndResize on size_t.
- Enable thread-safe fast path in NCollection_IncAllocator via std::shared_mutex + CAS bump allocation on atomic AvailableSize; exclusive lock is taken only for new-block allocation and list reordering.
- Remove NCollection_BasePointerVector (superseded by NCollection_LinearVector).
- Remove NCollection_BaseMap::Statistics (unused).
- Add <cstddef> include in NCollection_Primes.hxx so size_t resolves on clean builds.
- Document iterator invalidation contract on NCollection_LinearVector.
- Unify BRepGraph programmatic mutation behind EditorView: delete BuilderView (2648+552 lines); EditorView (3186+930 lines) and EditorView_Mut.cxx own both structural creation (Add*/Remove*) and field-level RAII-scoped mutation (Mut*()) with automatic OwnGen and SubtreeGen propagation.
- Add BRepGraph_MeshCache and BRepGraph_MeshView: two-tier mesh storage separating algorithm-derived caches from persistent (definition) triangulations; freshness is keyed on FaceDef.OwnGen; cache writes do not mutate the model.
- Document the MeshCache invalidation contract in BRepGraph_MeshCache.hxx (which mutations bump Face.OwnGen and how markRepModified closes the loop for Surface/Triangulation reps).
- Add BRepGraph_RefsIterator (generic flat ref scan with RefTraits dispatch) and BRepGraph_ReverseIterator (typed parent-traversal wrappers over reverse-index vectors).
- Rework RefId entity model: replace inline refs with typed RefId vectors; add OccurrenceRef and Kind::Occurrence=7; BRepGraphInc_WireExplorer now requires a VertexRefLookup.
- Rename layers for consistency: BRepGraph_ParamLayer to BRepGraph_LayerParam, BRepGraph_RegularityLayer to BRepGraph_LayerRegularity; rename BRepGraphInc_Usage to BRepGraphInc_Instance.
- Replace RootNodeIds() with RootProductIds() returning product roots only.
- Update BRepGraph and BRepGraphInc READMEs; fix stale RootNodeIds reference.
- Sweep Size() to Length() renames across ~200 callers in TKG2d, TKG3d, TKMath, TKMesh, TKBO, TKOffset, TKShHealing, TKTopAlgo, TKBRep, TKService, TKV3d, TKOpenGl, TKMeshVS, TKDE*, TKXCAF, TKXSBase, TKLCAF, TKStd, and Draw harness.
- Add GTest coverage for new containers and the BRepGraph overhaul: NCollection_DynamicArray_Test, NCollection_LinearVector_Test, BRepGraph_Fuzz_Test, BRepGraph_Iterator_Test, BRepGraph_LayerIterator_Test, BRepGraph_MeshCache_Test, BRepGraph_MutGuard_Test, BRepGraph_ReplaceVertex_Test, BRepGraph_ReverseIterator_Test, BRepGraph_ScenarioMatrix_Test, BRepGraph_TypedIdDispatch_Test, BRepGraph_WireExplorer_Test.
Refactor GeomBndLib classes for old version of bounding box calculations
Can be fixed later.
- Added new test case for BSplineCurve trimmed range comparison with BndLib.
- Enhanced GeomBndLib_BSplineCurve to handle parameter adjustments for periodic curves.
- Updated GeomBndLib_BSplineCurve2d to improve bounding box calculations.
- Refined GeomBndLib_BSplineSurface to use grid sampling for bounding box determination.
- Optimized GeomBndLib_BezierCurve and GeomBndLib_BezierCurve2d for bounding box calculations.
- Simplified GeomBndLib_SurfaceOfExtrusion and GeomBndLib_SurfaceOfRevolution by leveraging GeomBndLib_OtherSurface for bounding box computations.
- Improved GeomBndLib_Torus to utilize BndLib for bounding box calculations, including handling degenerate cases.
- Added multiple static methods for computing different types of constraints in TPrsStd_ConstraintTools.
- Updated DDocStd_ApplicationCommands to directly assign documents from the document manager.
- Simplified document retrieval in XDEDRAW by directly assigning the document.
- Refactored Bnd_Box and Bnd_Box2d constructors to use default member initializers.
- Improved the FindAllRootsWithDerivativeImpl function by correcting the use of the golden ratio constants.
- Enhanced PerformBounds in IntCurveSurface_Inter by directly assigning the result of SamplePars.
- Refactored ShapeAnalysis_FreeBounds to separate implementation details and improve readability.
- Streamlined GetUKnots and GetTKnots methods in BRepGProp_Face for better clarity and efficiency.
- Updated PreparePolygon in BRepGProp_MeshCinert to return the polygon directly.
- Improved Bnd_Box and Bnd_Box2d methods in GeomBndLib to handle monostate cases correctly.
- Enhanced OpenGl_FrameBuffer methods to safely check for texture availability before accessing size.
Introduce return-by-value APIs for handle-returning methods across touched toolkits, with nodiscard where appropriate, and keep legacy out-parameter signatures as deprecated wrappers for source compatibility.
- Add new return-by-value overloads for previously output-parameter methods in key classes across ApplicationFramework, DataExchange, ModelingAlgorithms, ModelingData, and Visualization
- Mark legacy output-parameter methods as deprecated and route them through the new overloads
- Update call sites to use the new APIs and simplify temporary-variable patterns
- Extend method documentation in OCCT Doxygen style with param/return sections and deprecation guidance
- Apply const-correctness updates for read-only handle arguments in STEP reader related interfaces
- Preserve compatibility for deprecated public wrappers by keeping exported out-of-line definitions where needed
- Perform minor cleanup of comments and parameter naming consistency
No functional behavior change is intended; this is an API modernization and migration-facilitation update.
Implement new representation of topology and BRep into OCCT.
New foundation represent 2 levels:
BRepGraph - public interfaces which making the topology graph representation
BRepGraphInc - internal structure which represent topology as an incident tables.
The foundation provides basic logic for conversion from TopoDS_Shape to BRepGraph and back.
The foundation provides the iteration and exploring interfaces to travel in both directions on any level of topology.
The internal id type of inc tables is 'int', which is not for long term and can be updated, better to use typed id aliases, even for the iterations, they provide all necessary operators.
The access to the BRepGraph is done using multiple View classes available by methods from main class.
The extensions on graphs is possible with 'Layer' and 'Cache', where first is persistent, second - temporary,
Some basic operations on graph also provided for compact, analyze and copy.
- Replaced `TopExp_Explorer`’s `NCollection_Vector`-based stack with `NCollection_LocalArray` + explicit stack-top index management.
- Extended `NCollection_LocalArray` to support non-trivial element types using placement-new, move semantics, and explicit destruction.
- Added GTests for `NCollection_LocalArray` covering non-trivial element lifetime and realloc/move scenarios.
- Adds an additional near-parallel criterion based on axis deviation over the cylinder face height `H` (`sinda * H`).
- Introduces a separate (potentially relaxed) linear tolerance used specifically for the `IntAna_IntConicQuad` parallel/endpoint-distance check.
- Routes the updated tolerances into the `IntAna_IntConicQuad` call to avoid false non-parallel classification for small-height faces.
- Added a non-periodic “fast path” in `countSpanSize()` using next-knot boundary comparisons.
- Reused the previously located span in curve/surface grid loops based on cached “span end” knot value.
- Applied the span-reuse optimization to both cached and direct surface evaluation paths.
- Migrated `TopClass_FaceClassifier` / `TopClass_Classifier2d` implementations to `.pxx` and updated BRepClass/Geom2dHatch wrappers to use them (removing `_0.cxx` generator glue).
- Updated BRep class helper headers to use header inlines instead of separate `.lxx` files, and added/rewired passive/face classifier implementations.
- Extended `NCollection_DynamicArray` / `NCollection_KDTree` APIs (insert helpers, callback-based range query) and added GTests for the new vector insert operations.
- Add `ExtremaPC` package to `TKGeomBase` and register its sources in `ExtremaPC/FILES.cmake`.
- Implement `ExtremaPC` core types + evaluators, including an `ExtremaPC_Curve` aggregator using `std::variant`.
- Add multiple `ExtremaPC_*` GTests and wire them into `TKGeomBase/GTests/FILES.cmake`.
- Added `CompTolerance` and `HashTolerance` fields + constructors to many specific hashers (3D + 2D).
- Updated composite/poly hashers (`GeomHash_CurveHasher`, `GeomHash_SurfaceHasher`, `Geom2dHash_CurveHasher`) to carry tolerances and pass them through to nested hashers.
- Replaced hardcoded tolerances (previously `1e-12`) with the new tolerance members throughout hashing and comparison logic.
- Updated `Geom_OffsetSurface_UIsoEvaluator` and `Geom_OffsetSurface_VIsoEvaluator` to store a `const Geom_Surface&` and call `Value()` / `D1()` directly.
- Updated `UIso()` / `VIso()` to construct evaluators with `*this` (and removed `occ::handle<Geom_OffsetSurface> me(this)`).
Consolidate duplicated local property computation classes
(GeomLProp_CLProps, Geom2dLProp_CLProps2d, LProp3d_CLProps,
BRepLProp_CLProps, HLRBRep_CLProps and their SLProps counterparts)
into unified C++ template classes GeomLProp_CLPropsBase and
GeomLProp_SLProps with policy-based access (DirectAccess/ToolAccess).
Move LProp, GeomLProp, and GProp packages from TKG2d/TKG3d to
TKGeomBase. Remove Geom2dLProp and LProp3d packages entirely.
Merge Geom2dLProp_CurAndInf2d into GeomLProp_CurAndInf2d.
Preserve backward-compatible type aliases (using declarations)
for all previously existing class names.
Shared algorithm logic extracted into LProp_CurveUtils and
LProp_SurfaceUtils namespaces. 2D curve analysis helpers
(FuncCurExt2d, FuncCurNul2d, NumericCurInf2d) converted to
header-only .pxx implementations under GeomLProp.
Update all dependent code (LocalAnalysis, BRepFill, ChFi3d,
Geom2dHatch, GeomPlate, ProjLib, HLRBRep, DrawTrSurf, etc.)
to use new template instantiations. Migrate GTests from
TKG2d to TKGeomBase with updated class names.
Replace legacy .gxx generic class templates (LProp_CLProps.gxx,
LProp_SLProps.gxx) with modern C++ .pxx template utilities
(LProp_CurveUtils.pxx, LProp_SurfaceUtils.pxx) using namespaced
template functions and access policies.
Remove obsolete CurveTool/SurfaceTool intermediary classes
(GeomLProp_CurveTool, GeomLProp_SurfaceTool, LProp3d_CurveTool,
LProp3d_SurfaceTool, BRepLProp_CurveTool) that are no longer needed
with the new direct/tool access policy design.
Replace per-instantiation _0.cxx files with standalone .cxx
implementations that delegate to the shared .pxx utilities.
Fix myCN field type from double to int in all CLProps headers
to match SLProps convention and actual usage (values 0 or 4).
Add default member initializers for uninitialized fields
(myCurvature, mySignificantFirstDerivativeOrder, myMinCurv,
myMaxCurv, myMeanCurv, myGausCurv) across all CLProps/SLProps classes.
Fix theSigOrder pass-by-value bug in Tangent/Curvature wrappers.
Fix typos: anUinfium/anVinfium -> anUinfimum/anVinfimum.
- Deleted GeomProp_Surface, GeomProp_SurfaceAnalysisTools, GeomProp_SurfaceOfExtrusion, GeomProp_SurfaceOfRevolution, and GeomProp_Torus classes along with their implementation files.
- Removed references to the GeomProp module from the CMake package configuration.
Refactor GeomProp, Geom2dProp, and GeomProp_Surface evaluator systems
to support direct construction from geometry handles without creating
intermediate adaptors, add per-parameter derivative caching, and
optimize type dispatch.
Key changes:
Handle-based construction path:
- All evaluators accept Handle(Geom_Curve)/Handle(Geom2d_Curve)/
Handle(Geom_Surface) directly, bypassing adaptor creation for
analytical types (Line, Circle, Plane, etc.)
- Wrapper initialization from handles uses DynamicType() comparison
(single extraction, == checks) instead of IsKind() virtual walks
- TrimmedCurve/RectangularTrimmedSurface automatically unwrapped to
basis geometry with optional CurveDomain/SurfaceDomain bounds
Adaptor-based construction path:
- Specialized evaluators accept only specific adaptor types
(GeomAdaptor_Curve*, Geom2dAdaptor_Curve*, GeomAdaptor_Surface*)
- OtherCurve/OtherSurface accept base adaptor types for unknown
geometry
- GeomAdaptor dispatch uses GetType() switch/case for direct
specialized evaluator construction
- GeomAdaptor_TransformedSurface handled by extracting transformed
adaptor via new public AdaptorSurfaceTransformed() method
Domain structs:
- Add CurveDomain (First, Last) and SurfaceDomain (FirstU, LastU,
FirstV, LastV) structs to GeomProp and Geom2dProp namespaces
- Stored as std::optional in evaluators, set only for trimmed
geometry or adaptor-sourced bounds
Derivative caching:
- Add CurveDerivOrder/SurfaceDerivOrder enums and CurveCache/
SurfaceCache structs using std::variant over ResD1/ResD2/ResD3
- Enum values match variant alternative indices for direct access
- Non-trivial evaluators (BSpline, Bezier, Offset, Other) store
mutable cache with requested derivative order
- Shared evaluation helpers in CurveAnalysisTools.pxx and
SurfaceAnalysisTools.pxx eliminate duplication across evaluators
- Degenerate tangent points upgrade cache to D3, reusing cached
point for neighbor evaluation
Other improvements:
- Simplify Adaptor() to direct myOwnedAdaptor return
- Add GeomAdaptor_TransformedSurface::AdaptorSurfaceTransformed()
public method
- Improve MathRoot_Multiple robustness: double minimum sampling
(2*NbSamples, min 20) for better root detection, add
EffectiveXTolerance() to prevent spurious duplicates, introduce
derivative-aware FindAllRootsWithDerivativeImpl() with golden
section extrema detection and Brent/Newton hybrid refinement
- Update Geom2dLProp CurAndInf2d to use GeomProp-based analysis
Used regex:
^//[\s\n\r\t]*[-=~]{3,}[\n\r]*//[\s\n\r\t]*[-~a-z0-9_ =\s\t./><']+[\s\n\r\t]*:[\s\n\r\t]*[-~a-z0-9_:\t\s./><=']*[\s\n\r\t]*//[\s\n\r\t]*[a-z]+[\s\n\r\t]*:[\s\n\r\t]*[-~a-z0-9_\s\t./><=']{0,30}//[\s\n\r\t]*[-=~]{3,}\n*
- Replace monolithic switch statements in BndLib_Add3dCurve, BndLib_AddSurface, and BndLib_Add2dCurve with thin wrappers delegating to GeomBndLib_Curve, GeomBndLib_Surface, and GeomBndLib_Curve2d respectively.
- Remove now-dead internal helpers AddGenCurv, AddGenSurf, and BndLib_Box2dCurve. Public BndLib API is preserved unchanged.
- Implement proper BoxOptimal() in GeomBndLib_OffsetSurface: try the analytic equivalent surface first (offset plane -> plane, offset sphere -> sphere), then fall back to OtherSurface PSO sampling for general cases.
- Refactor GeomBndLib_OffsetCurve2d to share exact fast paths for line and circle offsets between Box() and BoxOptimal(), matching the 3D OffsetCurve pattern; BoxOptimal falls back to OtherCurve2d PSO for general curves.
- Update tests to reflect tighter bounds from GeomBndLib delegation.
Refactor transformed-surface handling to avoid repeated transformations, remove mutable surface access patterns, and align dependent code paths.
- Add cached transformed data in GeomAdaptor_TransformedSurface and rebuild it on ctor/Load/SetTrsf.
- Add explicit original/transformed surface accessors and deprecate legacy GeomSurface() usage.
- Preserve transformed cache state in BRepAdaptor_Surface shallow copy/initialization.
- Expose GeomAdaptor_Surface::ToleranceU()/ToleranceV() and use them in bounded-surface reload.
- Rework ChFi3d bounded surface helper to support both GeomAdaptor_Surface and BRepAdaptor_Surface.
- Replace ChangeSurface()-based usages in fillet code with const surface access.
- Add and register GeomAdaptor_TransformedSurface GTests.
Add new PointSetLib package in TKMath providing standalone point cloud analysis without GProp_GProps inheritance:
- PointSetLib_Props: weighted point set properties (mass, barycentre, inertia matrix via Huygens theorem)
- PointSetLib_Equation: PCA-based dimensionality analysis (point, line, plane, space detection) with principal axes and extents accessors
Deprecate legacy GProp point cloud classes:
- GProp_PGProps replaced by using alias to PointSetLib_Props
- GProp_PEquation replaced by using alias to PointSetLib_Equation
- GProp_EquaType enum removed (zero consumers)
- GProp_CelGProps, GProp_SelGProps, GProp_VelGProps marked deprecated
Migrate ShapeAnalysis_Geom::NearestPlane to use PointSetLib_Equation instead of GProp_PGProps + GProp_PrincipalProps.
The condition == 2 only matched GeomAbs_C1 curves for D1 evaluation, while >= 2 (as used in GeomProp_Curve::Continuity())
correctly includes GeomAbs_G2 and higher, since G2 implies G1 which guarantees D1 exists.
Add GeomAdaptor_TransformedCurve as a new base class for BRepAdaptor_Curve that wraps a GeomAdaptor_Curve (or Adaptor3d_CurveOnSurface) with an applied gp_Trsf transformation. This mirrors the existing GeomAdaptor_TransformedSurface pattern for curves.
Refactor the adaptor evaluation API across Adaptor3d_Curve and Adaptor3d_Surface hierarchies so that EvalD0/D1/D2/D3/DN are the primary virtual evaluation methods:
- Adaptor3d_Curve: Value, D0-DN become non-virtual inline wrappers delegating to EvalD*. Base EvalD* implementations now throw Standard_NotImplemented instead of calling D*.
- Adaptor3d_Surface: same pattern applied symmetrically.
- Adaptor3d_CurveOnSurface: removes Value/D0-DN overrides (inherited from base); adds EvalD0/D1/D2/D3/DN marked final with the full dispatch logic.
- Adaptor3d_IsoCurve: removes Value/D0-DN overrides; adds EvalD* final with iso-curve projection logic (IsoU selects D1V/D2V/D3V, IsoV selects D1U/D2U/D3U).
- GeomAdaptor_Curve: removes Value/D0-DN overrides (now inherited inline); EvalD* remain final with BSpline cache and analytical dispatch logic.
- GeomAdaptor_Surface: removes Value/D0-DN overrides (now inherited inline); EvalD* remain final with BSpline cache and analytical dispatch logic.
- GeomAdaptor_TransformedCurve: overrides EvalD* with transform-and-dispatch logic; no need to override Value/D0-DN (inherited from Adaptor3d_Curve).
- GeomAdaptor_TransformedSurface: removes Value/D0-DN overrides (now inherited inline).
- BRepAdaptor_Curve: refactored to inherit GeomAdaptor_TransformedCurve, removing all duplicated evaluation and geometry-extraction method implementations.
- BRepAdaptor_CompCurve: removes Value/D0-DN overrides; adds EvalD* final with compound-curve parameter mapping and derivative scaling logic.
- ProjLib_ProjectOnPlane: removes Value/D0-DN overrides; adds EvalD* final delegating to the projected result adaptor or the OnPlane_* free functions.
- GeomFill_SnglrFunc: removes Value/D0-DN overrides; adds EvalD* final implementing the C'(t) x C''(t) singular function with ratio scaling.
- ChFiDS_ElSpine: removes Value/D0-D3 overrides; adds EvalD0-D3 final delegating to the internal GeomAdaptor_Curve member.
- BiTgte_CurveOnEdge: removes Value/D0-DN overrides; adds EvalD* final.
- BiTgte_CurveOnVertex: removes Value/D0-DN overrides; adds EvalD* final (D1-DN throw Standard_NotImplemented as the curve represents a degenerate point).
- HelixGeom_HelixCurve: removes Value/D0-D2/DN overrides; adds EvalD0/D1/D2/DN final with trigonometric helix evaluation.
Add GTest coverage for GeomAdaptor_TransformedCurve: point/derivative evaluation with transformation, curve-on-surface path, GeomGridEval_Curve batch evaluation.
Refactor TKGeomBase GC/gce maker classes to improve consistency,
header-level readability, and generated API docs.
- GC:
- Expanded and standardized class/method Doxygen descriptions.
- Added missing @param/@return tags and clarified @note sections.
- Inlined GC_Root status helpers in header and removed GC_Root.lxx.
- Updated GC/FILES.cmake accordingly.
- gce:
- Expanded and standardized class/method Doxygen descriptions.
- Added missing @param/@return tags and clarified error/status notes.
- Inlined trivial operator wrappers in headers and removed redundant
out-of-line operator implementations from *.cxx files.
- Kept Value() as checked API returning const reference.
- Updated Operator()/conversion operators to return copies, while
delegating through Value() to preserve StdFail_NotDone checks.
- Inlined gce_Root status helpers in header and removed gce_Root.lxx.
- Updated gce/FILES.cmake accordingly.
- Refined documentation text in gce_ErrorType and gce_Root.
No geometric construction algorithms were changed; this is API/documentation
and wrapper-structure cleanup with behavior-preserving status checks.
Add a new package GeomBndLib to TKGeomBase implementing fast and optimal
bounding box computation for all standard Geom curve and surface types.
GeomBndLib replaces the monolithic BndLib switch-based approach with a
per-type class hierarchy and std::variant-based dispatch, and fixes several
accuracy regressions present in BndLib.
Architecture:
- GeomBndLib_Curve / GeomBndLib_Curve2d / GeomBndLib_Surface:
Public dispatcher classes built on std::variant over all specialized
evaluators. Expose both Box/BoxOptimal (return Bnd_Box by value, RVO)
and Add/AddOptimal (mutate Bnd_Box& for drop-in BndLib compatibility).
Type detection and handler construction are performed once at construction
time; dispatch is a single std::visit call with no virtual overhead.
Specialized 3D curve evaluators:
- GeomBndLib_Line: analytic axis-aligned interval, inline header-only.
- GeomBndLib_Circle: analytic arc bounding box for arbitrary gp_Circ and
parameter range; static Box() used internally by surface evaluators.
- GeomBndLib_Ellipse / GeomBndLib_Hyperbola / GeomBndLib_Parabola:
analytic extremum computation for conic sections over arbitrary arcs.
- GeomBndLib_BezierCurve: single FillBox span with convex hull reduction.
- GeomBndLib_BSplineCurve: knot-span FillBox with weakness-scaled deflation
and convex hull reduction. Non-periodic partial ranges use BSplCLib::Hunt
to select the contributing pole index range directly, avoiding Copy() and
Segment() allocation. Periodic partial ranges use Segment() on a copy
with the correct segmented poles passed to ReduceSplineBox. BoxOptimal
uses grid sampling combined with per-coordinate Powell minimization.
- GeomBndLib_OffsetCurve: delegates to the basis curve evaluator and
enlarges by the offset magnitude.
- GeomBndLib_OtherCurve: grid sampling with per-coordinate Powell
minimization for general curve types.
Specialized 2D curve evaluators (GeomBndLib_*2d):
- Mirror of the 3D evaluators for Geom2d curves and Bnd_Box2d.
GeomBndLib_BSplineCurve2d applies the same Hunt-based partial-range
optimization as the 3D counterpart.
Specialized surface evaluators:
- GeomBndLib_Plane: analytic corner-based box for planar patches, inline.
- GeomBndLib_Sphere: analytic extremum on axis-aligned sphere, exact for
full sphere and arbitrary patches.
- GeomBndLib_Cylinder / GeomBndLib_Cone: circle-arc bounding box at
extremal V-parameter positions.
- GeomBndLib_Torus: circle-arc bounding boxes at PI/4 V-boundary positions
for fast Box(); PSO + Powell via GeomBndLib_OtherSurface for BoxOptimal().
Resolves a regression in BndLib where the Torus AddOptimal case was
missing from the switch and fell through to AddGenSurf, which converged
to an incorrect result for tilted tori.
- GeomBndLib_BezierSurface: pole convex hull for full-range queries; grid
sampling fallback for trimmed patches.
- GeomBndLib_BSplineSurface: pole convex hull with per-direction index
selection via BSplCLib::Hunt (no surface copy or segment); grid sampling
fallback for out-of-bounds parameters. BoxOptimal uses fine grid sampling
combined with per-coordinate PSO + Powell minimization.
- GeomBndLib_SurfaceOfRevolution: circle-arc bounding boxes at PI/4
V-boundary positions; degenerate (axis-on-surface) and infinite cases
handled analytically via GeomBndLib_InfiniteHelpers.
- GeomBndLib_SurfaceOfExtrusion: extruded arc box added with the extrusion
direction contribution; degenerate and infinite cases handled analytically.
- GeomBndLib_OffsetSurface: delegates to equivalent surface when available,
otherwise conservative basis-box enlarged by |offset|.
- GeomBndLib_OtherSurface: PSO + Powell numerical optimization for general
surface types; used directly by Torus and OffsetSurface BoxOptimal paths.
Internal helpers (private .pxx, not part of the public API):
- GeomBndLib_SplineHelpers: FillBox (knot-span sampler returning maximum
chord deflection), ReduceSplineBox (convex hull intersection), indexed
ReduceSplineBox overload for pole subset ranges, and
ComputePoleIndexRange (BSplCLib::Hunt-based pole index selection shared
by curve and surface evaluators).
- GeomBndLib_OptimizationHelpers: AdjustExtrCurve / AdjustExtrCurve2d /
AdjustExtrSurf implementing Powell minimization seeded from a PSO pass
for tight BoxOptimal results.
- GeomBndLib_SamplingHelpers: ComputeNbSamples / ComputeNbUSamples /
ComputeNbVSamples providing consistent sample counts across all evaluators.
- GeomBndLib_InfiniteHelpers: open/infinite interval handling for surfaces
of revolution and extrusion.
Tests:
- GeomBndLib_Curve_Test: 3D curve dispatching, all analytic types, BSpline
and Bezier full and partial ranges, periodic curves, offset curves.
- GeomBndLib_Curve2d_Test: 2D curve dispatching, all analytic types, BSpline
and Bezier full and partial ranges, offset curves.
- GeomBndLib_Surface_Test: surface dispatching, all analytic types including
tilted and degenerate cases, Torus BoxOptimal vs analytic reference.
- GeomBndLib_OffsetCurve_Test: offset curve bounding box correctness and
BoxOptimal precision for 3D cases.
- GeomBndLib_OffsetCurve2d_Test: same for 2D offset curves.
- GeomBndLib_OffsetSurface_Test: offset surface Box and conservative fallback.
- GeomBndLib_SurfaceOfRevolution_Test: full and partial revolution surfaces,
degenerate and infinite cases.
- GeomBndLib_SurfaceOfExtrusion_Test: straight and BSpline extrusions,
diagonal extrusion direction, infinite cases.
Add GeomFill_Gordon and GeomFill_GordonBuilder classes implementing Gordon surface (transfinite interpolation) construction via the Boolean sum formula: S = S_profiles + S_guides - S_tensor.
GeomFill_GordonBuilder is the low-level kernel accepting pre-compatible BSpline curves with known intersection parameters. GeomFill_Gordon is the high-level wrapper handling arbitrary Geom_Curve inputs, automatic intersection detection, network sorting/orientation, approximation-based reparametrization with kink preservation, scale-relative tolerances, closedness detection, and OSD_Parallel acceleration.
Add Approx_BSplineApproxInterp class implementing constrained least-squares B-spline approximation with exact interpolation constraints via a KKT saddle-point system, used internally by the reparametrization pipeline.
45 GTests covering both classes validate bilinear through 6x6 networks, reversed/shuffled inputs, scaled geometry, surface continuity, and the Boolean sum mathematical property.
- Replace public-style data header with private `AdvApp2Var_Data.pxx` aggregation and rename data fragments to dedicated `AdvApp2Var_Data_*.pxx` files.
- Remove obsolete `AdvApp2Var_Data_f2c.hxx` and migrate legacy Fortran typedef/macro usage to native C++ types and standard helpers.
- Merge static initialization logic into main compilation units (`AdvApp2Var_MathBase.cxx`, `AdvApp2Var_SysBase.cxx`) and drop separate init sources.
- Remove unused SysBase legacy entry points and apply readability cleanup in AdvApp2Var internals.
- Add per-file GTests (`AdvApp2Var_Context_Test`, `AdvApp2Var_Framework_Test`, `AdvApp2Var_Iso_Test`, `AdvApp2Var_Network_Test`, `AdvApp2Var_Node_Test`) and update package/GTests `FILES.cmake`.
Normalize method separator lines across the codebase to exactly
100 characters (// followed by 98 = signs) matching the project
coding standard.
Translate remaining French comments to English in ModelingData
packages (TKBRep, TKG2d, TKG3d, TKGeomBase) and FoundationClasses.
Add [[nodiscard]] attribute to Copy() methods on Geom_Geometry,
Geom2d_Geometry, Geom_Transformation, and Geom2d_Transformation
to prevent accidental discard of returned handles.
Fix typo in AppDef_Variational::Dump() debug output: "Nombre of
3d par multipoint" -> "Number of 3d per multipoint".
Update .github/copilot-instructions.md separator examples to match
the corrected convention.
- Removed `gce_InvertAxis` and `gce_InvertRadius` error checks from hyperbola constructors
- Added collinear point validation to the 3-point constructors
- Updated documentation to reflect the correct validation rules
Extract duplicated curve analysis logic (tangent, curvature, normal,
centre of curvature, inflection/extrema finding) from per-type evaluators
(BezierCurve, BSplineCurve, OffsetCurve, OtherCurve) into shared
CurveAnalysisTools.pxx for both GeomProp (3D) and Geom2dProp (2D).
Add GeomProp::ComputeTangent overload with sign correction using
finite-difference points, and use it in BRepProp_Curve::Tangent to
properly handle degenerate D1 cases instead of falling back to
unsigned higher-order derivatives.
Add GeomProp_Curve::Continuity static methods for computing junction
continuity (C0/G1/C1/C2) between two Geom_Curve handles, with BSpline
knot-multiplicity analysis and optional orientation reversal flags.
Add 29 per-geometry-type GTest files (9 3D curves, 9 2D curves,
11 3D surfaces) covering:
- Analytical property verification against known formulas
- VsCLProps/VsCLProps2d/VsSLProps comparison with legacy LProp APIs
at both uniform samples and critical points (vertices, poles, knots,
seams, endpoints, near-degenerate regions)
- FindCurvatureExtrema/FindInflections validation where applicable
Update existing VsCLProps, VsCLProps2d, VsSLProps, and VsBRepLProp
comparison tests with improved structure and broader coverage.
- Replaced old AppCont_ContMatrices.hxx/.cxx public interface with internal namespace-based .pxx header structure
- Split legacy matrix data into separate internal headers (BB, InvM, IBP, IBT, VB) for better organization
- Fixed out-of-bounds read in IBPMatrix for classe=26 by adding 3 missing data entries
- Added comprehensive GTest suite with 9 tests covering all matrix functions and their mathematical properties
Replace two-step initialization (default constructor + Initialize) with
direct construction for 8 non-copyable/non-movable property and grid
evaluator classes. Objects are now always in a valid state after construction.
Refactored classes:
- GeomProp_Curve, GeomProp_Surface (TKG3d)
- Geom2dProp_Curve (TKG2d)
- BRepProp_Curve, BRepProp_Surface (TKBRep)
- GeomGridEval_Curve, GeomGridEval_Surface (TKG3d)
- Geom2dGridEval_Curve (TKG2d)
Changes per class:
- Remove default constructor and IsInitialized() method.
- Add constructors matching each former Initialize overload.
- Rename Initialize to protected initialization method for internal
and derived class use.
All callers updated across production code (Extrema, BndLib,
IntCurveSurface, IntPatch, HLRBRep, GeomGridEval derived classes)
and test files to use constructor-based initialization.
Add new BRepProp package to TKBRep as a thin wrapper over GeomProp:: free
functions for computing local differential properties of BRep edges and faces
without exceptions. Replaces the legacy BRepLProp macro-based (.gxx) pattern.
New package BRepProp (TKBRep) provides:
- BRepProp_Curve: Local curve property evaluator for BRep edges.
Delegates derivative computation to BRepAdaptor_Curve and passes results
to GeomProp::ComputeTangent, ComputeCurvature, ComputeNormal,
ComputeCentreOfCurvature. Three Initialize overloads: from TopoDS_Edge
(owning), from BRepAdaptor_Curve reference (non-owning), and from
occ::handle<BRepAdaptor_Curve> (shared ownership). Includes static
Continuity() methods for regularity analysis at curve junctions
(replaces BRepLProp::Continuity).
- BRepProp_Surface: Local surface property evaluator for BRep faces.
Delegates derivative computation to BRepAdaptor_Surface and passes results
to GeomProp::ComputeSurfaceNormal, ComputeSurfaceCurvatures,
ComputeMeanGaussian. Same three Initialize overloads as BRepProp_Curve.
Key design decisions:
- No variant dispatch needed: BRepAdaptor_Curve/Surface handle geometry-type
dispatch internally via virtual methods, so BRepProp is a thin wrapper
calling adaptor D1/D2/D3 then GeomProp:: free functions.
- Ownership pattern: occ::handle for owning case + raw const pointer for
non-owning case, consistent with GeomProp_Curve/Surface.
- Returns result structs with IsDefined flags instead of throwing exceptions.
18 GTests: 11 unit tests (line, circle, box, cylinder, sphere) and
7 cross-validation tests against BRepLProp_CLProps/BRepLProp_SLProps.
Add new GeomProp package to TKG3d following the same C++17 std::variant-dispatched
pattern as Geom2dProp (TKG2d) for computing local differential properties
of 3D curves and surfaces without exceptions.
New package GeomProp (TKG3d) provides:
- GeomProp: Result structs (TangentResult, CurvatureResult, NormalResult,
CentreResult, CurveAnalysis for curves; SurfaceNormalResult,
SurfaceCurvatureResult, MeanGaussianResult for surfaces) and
geometry-agnostic free functions for property computation from derivatives.
- GeomProp_Curve: Unified variant dispatcher that auto-detects curve type
from Geom_Curve or Adaptor3d_Curve and delegates to specialized evaluators.
Owns the GeomAdaptor_Curve handle and passes non-owning raw pointers to
per-geometry classes.
- GeomProp_Surface: Unified variant dispatcher that auto-detects surface type
from Geom_Surface or Adaptor3d_Surface and delegates to specialized evaluators.
Owns the GeomAdaptor_Surface handle with non-owning raw pointers.
- Per-geometry curve evaluators (9 types matching GeomAbs_CurveType):
Line (header-only), Circle (header-only), Ellipse, Hyperbola, Parabola,
BezierCurve, BSplineCurve, OffsetCurve, OtherCurve.
- Per-geometry surface evaluators (11 types matching GeomAbs_SurfaceType):
Plane (header-only), Cylinder (header-only), Sphere (header-only),
Cone, Torus, BezierSurface, BSplineSurface, SurfaceOfRevolution,
SurfaceOfExtrusion, OffsetSurface, OtherSurface.
- Surface curvatures computed via first/second fundamental forms with
correct sign convention consistent with surface normal orientation.
Principal directions derived from the shape operator (Weingarten map).
48 GTests covering free functions, curve/surface dispatchers,
cross-validation against GeomLProp_CLProps (8 curve types) and
GeomLProp_SLProps (6 surface types).
Replace archaic LProp/Geom2dLProp macro-based (.gxx) pattern with a modern C++17 std::variant-dispatched package for computing local differential properties of 2D curves: tangent, curvature, normal, centre of curvature, curvature extrema, and inflection points.
New package Geom2dProp (TKG2d) provides:
- Geom2dProp: Result structs (TangentResult, CurvatureResult, NormalResult, CentreResult, CurveAnalysis) and geometry-agnostic free functions for property computation from derivatives.
- Geom2dProp_Curve: Unified variant dispatcher that auto-detects curve type from Geom2d_Curve or Adaptor2d_Curve2d and delegates to specialized evaluators. Owns the Geom2dAdaptor_Curve handle and passes non-owning raw pointers to per-geometry classes.
- Per-geometry evaluators with optimized evaluation:
- Line (header-only): zero curvature, constant tangent
- Circle (header-only): constant curvature 1/R
- Ellipse: analytical extrema at 0, PI/2, PI, 3PI/2
- Hyperbola: analytical extremum at vertex
- Parabola: analytical extremum at vertex
- BezierCurve: numeric curvature extrema/inflection finding
- BSplineCurve: numeric with C3 interval subdivision
- OffsetCurve: numeric approach
- OtherCurve: fallback via adaptor virtual D1/D2/D3
Key design decisions:
- Uses Geom2dAdaptor_Curve for optimized derivative evaluation (D0-DN) with BSpline span caching.
- Non-owning raw pointers in per-geometry classes; lifetime managed by the Geom2dProp_Curve dispatcher which holds the adaptor handle.
- Returns result structs with IsDefined flags instead of throwing exceptions for degenerate cases.
- 106 GTests covering all curve types, free functions, adaptor/geometry initialization, trimmed curves, cross-validation against LProp.
IsClosed() methods across curve and surface classes used gp::Resolution() (~1e-290) for point distance comparison, making the check practically unusable for floating-point evaluated points. Replaced with Precision::Computational() (~DBL_EPSILON) which correctly represents machine-precision arithmetic equality.
TrimmedCurve (2D/3D) and RectangularTrimmedSurface IsClosed() and IsPeriodic() now detect when the trim spans an integer multiple of the basis geometry period using std::remainder(), instead of unconditionally returning false for trimmed parametric ranges.
Added 17 new GTest files (271 tests) for TKG2d covering previously untested packages: Adaptor2d, Geom2dLProp, LProp, and fundamental Geom2d classes (Circle, Ellipse, Line, Hyperbola, Parabola, TrimmedCurve, Transformation, VectorWithMagnitude, Direction, CartesianPoint, AxisPlacement).
IsClosed() tolerance fix applied to:
- Geom2d_TrimmedCurve, Geom_TrimmedCurve
- Geom2d_BSplineCurve, Geom_BSplineCurve
- Geom2d_OffsetCurve, Geom_OffsetCurve
IsPeriodic() / IsUPeriodic() / IsVPeriodic() fix applied to:
- Geom2d_TrimmedCurve, Geom_TrimmedCurve
- Geom_RectangularTrimmedSurface (also IsUClosed/IsVClosed)
- Extract common subexpressions in `EvalD2` (6 intermediate products) and `EvalD3` (10 intermediate products) to avoid redundant multiplications
- Improve inline comments to include explicit formulas for derivative computations
- Introduced new tests for TopExp class to validate shape mapping and vertex retrieval.
- Added tests for Geom_Circle, Geom_Line, and Geom_Plane classes to ensure correct geometric behavior and transformations.
- Implemented tests for GCPnts_AbscissaPoint to verify length calculations and parameter retrieval for lines and circles.
- Created conversion tests in GeomConvert to check the accuracy of converting geometric entities to B-spline representations.
- Updated CMake files to include new test files for the added tests.
Replace std::optional return types with direct returns and exception-based
error handling in Geom/Geom2d/Surface EvalD0/D1/D2/D3/DN methods to avoid
performance overhead of std::optional wrapping on the hot evaluation path.
Changes:
- EvalD* methods now return result structs directly instead of
std::optional<T>, throwing Geom_UndefinedValue/Geom_UndefinedDerivative
on failure
- D0/D1/D2/D3/DN inline wrappers simplified to unpack direct returns
instead of checking optional validity
- TryEval* helper functions in EvalRepUtils converted from
std::optional<T> returns to bool + output parameter pattern
- Adaptor classes (Adaptor3d_Curve/Surface, Adaptor2d_Curve2d,
GeomAdaptor_Curve/Surface, Geom2dAdaptor_Curve) simplified by
removing try-catch wrappers around evaluation calls
- Removed dead #include <optional> from 5 header files
- Updated GTests to match new direct-return API
Introduce EvalRep descriptors for selected Geom and Geom2d curve/surface
classes and add inline EvalRep utilities for evaluation dispatch with
fallback to native paths.
- add per-class Set/Get/Clear EvalRepresentation API and storage
- support full, derivative-bounded and mapped descriptors
- validate mapped parameter transforms in SetEvalRepresentation()
- migrate Geom_OffsetSurface equivalent-surface path to EvalRep
- clone EvalRep descriptors in copy constructors and Copy() paths
- update adaptors to use EvalRep in supported branches
- keep EvalRep invalidation in geometry mutators and fix regressions
Optimized exact vprops path for OCC28402 by reducing TopLoc_Location
composition overhead in edge pcurve lookup.
Changes:
- added fast-path exits in TopLoc_Location::Predivided() for identity and
equal-location cases;
- cached face surface/location in BRepGProp_Face and reused this context in
Load(const TopoDS_Edge&);
- in BRep_Tool::CurveOnSurface(...), compute Predivided() only when edge
has curve representations to iterate.
This keeps algorithmic behavior unchanged and targets the performance
regression reported by tests/bugs/modalg_7/bug28402.