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.
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.
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.
- 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.
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.
Introduce always-populated weight arrays in BSpline/Bezier curve and surface
classes using non-owning views over a static unit-weights buffer. Migrate
~100 callers across the codebase from deprecated copy-out APIs to direct
const-reference array access. Fix a long-standing typo bug in Hermit.cxx.
Infrastructure (BSplCLib, BSplSLib):
- Add BSplCLib::UnitWeights(n) returning a non-owning NCollection_Array1
view over a compile-time-initialized static array of 2049 ones; falls
back to heap allocation for larger sizes.
- Add BSplCLib::MaxUnitWeightsSize() (constexpr 2049) and
BSplCLib::UnitWeightsData() exposing the raw pointer for BSplSLib.
- Add BSplSLib::UnitWeights(nU, nV) returning a non-owning
NCollection_Array2 view when nU*nV <= 2049, heap-allocated otherwise.
Always-populated myWeights (Geom/Geom2d curve and surface classes):
- myWeights is now always sized to match poles count.
Non-rational: non-owning view via UnitWeights (zero allocation).
Rational: owning array with actual weight values.
- Add WeightsArray() returning const NCollection_Array1<double>& (curves)
or const NCollection_Array2<double>& (surfaces) that is always valid.
- Update all constructors, copy constructors, and restructuring operations
(IncreaseDegree, InsertKnots, RemoveKnot, Segment, SetPeriodic,
SetOrigin, SetNotPeriodic, ExchangeUV, etc.) to maintain the invariant.
- SetWeight: copies non-owning view to owned array before mutation when
transitioning to rational; assigns UnitWeights when becoming non-rational.
- Remove myRational derivation from myWeights.Size() in updateKnots();
rationality is now tracked explicitly via the myRational flag only.
- Fix Geom2d_BSplineCurve::InsertPoleAfter missing myRational update
after inserting a weighted pole.
- Fix Geom_BSplineCurve::DumpJson stale myWeights.Size() > 0 guard
(changed to myRational, matching all other classes).
Caller migration to direct array access (~100 files):
- Replace deprecated copy-out pattern (allocate temp + call Foo(temp))
with const-reference access for Poles(), Knots(), Multiplicities(),
UKnots(), VKnots(), UMultiplicities(), VMultiplicities(),
KnotSequence(), UKnotSequence(), VKnotSequence().
- Replace Weights() null-pointer patterns with WeightsArray() const-ref
or *Weights() dereference where null check is still appropriate.
- Affected modules: GeomConvert, Geom2dConvert, GeomLib, GeomFill,
ProjLib, ShapeUpgrade, ShapeCustom, ShapeConstruct, ShapeAnalysis,
ShapeAlgo, BRepLib, BRepGProp, HLRBRep, ChFi3d, ChFiKPart, BlendFunc,
FairCurve, IntTools, TopOpeBRepTool, TopOpeBRepBuild, LocOpe,
BRepOffset, Adaptor3d, GeomAdaptor, Geom2dAdaptor, BndLib, Extrema,
DrawTrSurf, GeometryTest, GeomliteTest, SWDRAW, QABugs,
GeomToIGES, IGESToBRep, GeomToStep, StdPrs.
Bug fix in Hermit.cxx (PolyTest, both 3D and 2D overloads):
- Fix typo: "Pole0 < 3" changed to "Pole0 < Pole3" — was comparing
a double variable against the integer literal 3 instead of the
variable Pole3 holding the endpoint weight value.
- Fix logic: "if (boucle == 1)" changed to "else if (boucle == 1)"
to make the boucle==1 and boucle==2 branches mutually exclusive.
- Add explanatory comments on BSplCLib::D1 calls that intentionally
pass weight values as scalar "poles" to evaluate the weight function.
NCollection_PackedMapAlgo migration (TDataStd, QABugs):
- Replace deprecated member functions (IsSubset, Subtraction, Subtract,
Unite, Intersect, IsEqual) with NCollection_PackedMapAlgo free functions.
GTests:
- New BSplCLib_Test.cxx: 5 tests for UnitWeights API.
- New BSplSLib_Test.cxx: 5 tests for surface UnitWeights API.
- New Hermit_Test.cxx: 11 tests for Hermit::Solution (3D/2D) and
Hermit::Solutionbis covering uniform, distinct, high-ratio, reversed,
symmetric weights and positive-poles invariant.
- Add WeightsArray tests to Geom_BSplineCurve_Test, Geom_BezierCurve_Test,
Geom_BSplineSurface_Test, Geom_BezierSurface_Test (2 tests each)
verifying const-ref return, non-owning for non-rational, owning for
rational.
- Made ShapeType() non-virtual by embedding the shape type in a compact uint16_t state field alongside flags
- Replaced int myFlags with uint16_t myState using a BitLayout enum for compact storage
- Moved Compose/Reverse/Complement operations from TopAbs.cxx to inline implementations in TopAbs.hxx
- Updated all TShape derived class constructors to pass their type to the base class
- Refactored TopoDS_Iterator to use index-based iteration with updateCurrentShape() helper
Fix the replacement issue when Standard_CString was replaced to const char* even when it was const.
Now "const Standard_CString" is replaced with "const char* const".
Only places which were before const Standard_CString is replaced.
- Removed legacy metadata entries (EXTERNLIB, PACKAGES, DEFINES, FILES) that are no longer used by the build system
- Removed references to obsolete build artifacts (.lex, .yacc files) that appear to be superseded by generated .c/.h files
- Removed references to non-source files (README.md, .tcl scripts, GUID.txt) that shouldn't be listed in source file manifests
First patch in iterative renovation of exceptions.
- Simplify exception classes to be container of data only.
- Removed redundant inclusion of <Standard_Type.hxx> in various header files across the project.
- Removed Set methods for failure and its define template.
- Removed Raise and Rerise static methods.
- Remove Instance and Throw methods
- Deprecated getting message with old approach, and moving to what()
- Update ErrorHandler to handle only specific list of exceptions.
- Deleted TopoDS_ListOfShape.hxx and removed its references in various files.
- Replaced instances of TopoDS_ListOfShape with NCollection_List in TopoDS_Builder, TopoDS_Iterator, and TopoDS_TShape.
- Updated CMake files to exclude TopoDS_ListOfShape from the build.
- Removed Geom2dConvert_SequenceOfPPoint and its usages, replacing them with NCollection_Sequence.
- Cleaned up Select3D and SelectMgr modules by removing Select3D_EntitySequence, Select3D_IndexedMapOfEntity, and SelectMgr_IndexedMapOfOwner.
- Adjusted includes in various files to use NCollection types instead of removed classes.
- Overall, this commit streamlines the codebase by eliminating unused types and reducing dependencies.
- Added automated migration scripts for handle syntax, standard types, and macros
- Deprecated legacy `Standard_*` types and macros in favor of native C++ equivalents
- Introduced modern `occ` namespace with template-based type checking helpers
- Enhanced NCollection macros to support variadic arguments for complex template types- Added automated migration scripts for handle syntax, standard types, and macros
- Deprecated legacy `Standard_*` types and macros in favor of native C++ equivalents
- Introduced modern `occ` namespace with template-based type checking helpers
- Enhanced NCollection macros to support variadic arguments for complex template types
- Replaced custom DEFINE_HARRAY1 and DEFINE_HSEQUENCE macros with typedefs to NCollection_HArray1 and NCollection_HSequence for various data types across multiple files.
- Updated header files in the following modules:
- HLRAlgo
- TKShHealing
- TKBRep
- TKG2d
- TKG3d
- TKGeomBase
- TKMeshVS
- TKV3d
- This change improves consistency and reduces the complexity of the codebase by utilizing the standard NCollection templates.
- Introduced `GeomGridEval` package with specialized evaluators for analytical surfaces (plane, cylinder, sphere, cone, torus) and parametric surfaces (Bezier, BSpline, offset)
- Refactored extrema computation in `Extrema_GenExtSS`, `Extrema_GenExtPS`, and `Extrema_GenExtCS` to use batch grid evaluation
- Added comprehensive derivative computation support (D0-D3, DN) for all surface types
This commit completes the refactoring of geometry evaluator classes, replacing polymorphic Handle-based evaluators with inline template utilities and std::variant-based data storage in adaptor classes.
Key changes:
1. Removed GeomEvaluator and Geom2dEvaluator packages:
- Deleted GeomEvaluator_Curve, GeomEvaluator_Surface base classes
- Deleted GeomEvaluator_OffsetCurve, GeomEvaluator_OffsetSurface
- Deleted GeomEvaluator_SurfaceOfExtrusion, GeomEvaluator_SurfaceOfRevolution
- Deleted Geom2dEvaluator_Curve, Geom2dEvaluator_OffsetCurve
2. Added private utility headers (.pxx files) with inline template functions:
- Geom_OffsetCurveUtils.pxx - offset curve evaluation
- Geom_OffsetSurfaceUtils.pxx - offset surface evaluation
- Geom_ExtrusionUtils.pxx - surface of extrusion evaluation
- Geom_RevolutionUtils.pxx - surface of revolution evaluation
- Geom2d_OffsetCurveUtils.pxx - 2D offset curve evaluation
3. Refactored GeomAdaptor_Curve:
- Moved BezierData and BSplineData structs inside the class
- Added std::variant<monostate, OffsetData, BezierData, BSplineData> for type-specific evaluation data
- Removed separate myBSplineCurve and myCurveCache members
- Updated all evaluation methods to use variant-based access
4. Refactored GeomAdaptor_Surface:
- Changed ExtrusionData and RevolutionData to use Handle(Adaptor3d_Curve) instead of Handle(GeomAdaptor_Curve) for flexibility
- Changed RevolutionData to store gp_Ax1 instead of separate AxisLoc/AxisDir
- Updated OffsetData to store Handle(Geom_OffsetSurface) for osculating surface queries instead of creating new Geom_OsculatingSurface
5. Updated Geom_OsculatingSurface:
- Renamed UOscSurf/VOscSurf methods to UOsculatingSurface/VOsculatingSurface for consistency with Geom_OffsetSurface public API
6. Fixed specialized adaptor classes:
- GeomAdaptor_SurfaceOfLinearExtrusion - removed evaluator, uses variant
- GeomAdaptor_SurfaceOfRevolution - removed evaluator, uses variant
- Geom2dAdaptor_Curve - updated to use variant-based data
- Adaptor2d_OffsetCurve - updated to use Geom2d_OffsetCurveUtils
7. Fixed Geom_SurfaceOfRevolution:
- Updated utility calls to use gp_Ax1 parameter instead of separate XYZ
8. Added missing includes in dependent files:
- Adaptor3d_HSurfaceTool.cxx - added GeomAdaptor_Curve.hxx
- GeomAdaptor.cxx - added Adaptor3d_Surface.hxx, GeomAbs_SurfaceType.hxx
- Extrema_GenExtPS.cxx - added Adaptor3d_Curve/Surface.hxx, GeomAbs_IsoType.hxx
- TopOpeBRepTool_GEOMETRY.cxx - added Geom2dAdaptor_Curve.hxx
- BRepAdaptor_Curve2d.cxx - updated ShallowCopy for variant
Benefits:
- Reduced virtual function call overhead in hot evaluation paths
- Better code locality with inline template functions
- Simplified class hierarchy without abstract evaluator base classes
- More efficient memory layout with variant instead of polymorphic handles
- Consistent method naming across related classes
Majority of functions now simply call same functions from std namespace.
Functions that duplicate std namespace functionality are declared
deprecated.
Calls of deprecated functions are replaced with std functions calls.
- Removed 37 DRAW test scripts from `tests/bugs/` directories
- Added 31 new GTest C++ test files in appropriate `GTests/` directories
- Removed corresponding QAcommands implementations from QABugs source files
- Updated CMake FILES.cmake files to include new test files
- Addition of `gp_Dir::D` and `gp_Dir2d::D` enums for standard directions (X, Y, Z, NX, NY, NZ)
- Constexpr/noexcept constructors for geometric primitives (circles, cones, cylinders, etc.)
- Enhanced axis placement classes with enum-based constructors
- Replacement of hardcoded direction values throughout the codebase
- Replace legacy Standard_Mutex usage across many modules with std::mutex.
- Include <mutex> where needed and remove <Standard_Mutex.hxx> includes.
- Replace Standard_Mutex::Sentry / explicit Lock/Unlock with std::lock_guard or std::unique_lock.
- Convert optional/heap mutex holders to std::unique_ptr<std::mutex> and adapt locking accordingly.
- Simplify several singleton initializations (remove manual double-checked locking where safe).
- Use thread_local for per-thread flags instead of ad-hoc mutex protection.
- Fix BVH_BuildQueue Fetch logic to preserve thread counters and wasBusy handling.
- Remove obsolete TopTools_MutexForShapeProvider sources and update FILES.cmake.
This modernizes mutex usage, reduces dependency on custom mutex types and improves clarity of locking patterns.
Introduce TCollection_AsciiString::EmptyString() and TCollection_ExtendedString::EmptyString()
and update headers.
Replace many local/static empty string instances and default-constructed
temporaries with the shared EmptyString() reference across ApplicationFramework, DataExchange,
Visualization and other modules.
Remove several unused local empty-key/static variables and
adjust default parameters and return paths to use the centralized empty-string accessors.
Add missing #include <TCollection_AsciiString.hxx> to several headers that use/forward TCollection_AsciiString.
- Standardized spacing in documentation comments by removing extra spaces between words
- Fixed inconsistent line breaks in multi-line comment blocks
- Corrected minor spelling/grammar issues (e.g., "follow" → "follows", "form" → "from")
Used regex in src folder:
^//[\s\n\r\t]*[-=]{2,}[=]*[\n\r]*//[\s\n\r\t]*[a-z]+[\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,22}//[\s\n\r\t]*[-=]{3,}[=]*
- Standardizes comment formatting by replacing detailed comment blocks with a uniform "//=================================================================================================" separator
- Removes redundant "function:" and "purpose:" fields that often contained minimal or no useful information
- Maintains code functionality while improving visual consistency across the codebase
Adding a null check for the triangulation in BRep_Tool::IsClosed.
Simplifying index lookup logic in BOPDS_DS.
Introducing helper functions (IsPlaneFF and IsClosedFF) and updating iteration loops in BOPAlgo_PaveFiller_6 for improved clarity and robustness.
Update target_link_libraries to use PUBLIC and PRIVATE visibility for dependencies.
Now all 3rd-party is hidden for the external linking, no more issues to invalid path to 3rd-party
Enhance Google Test integration and add support for test projects.
Each Toolkit have GTests folder with place for new tests.
For adding new tests needs to extend FILES.cmake files in each GTests folder.
The single executable is created for each toolkit with all tests.
The tests grouped by module and toolkit with :: as separator.
Added option to download GTest by Cmake if not found.
Add GTest for PLib_JacobiPolynomial with comprehensive test cases
Add GTest for TCollection_AsciiString and TCollection_ExtendedString
Set C++ standard to C++14 for GTest compatibility if required
Reorganizing structure to have Module/TK/Package/FILES structure.
New structure reflect the structure inside IDE.
Migrate FILES, PACKAGES, EXTRLIB to CMake version to handle changes on updates.
No changes were done to installation layout, all installation result keep as before.
The migration was done using python script, see PR, which refactor automatically the structure.
Updated doc generation to have valid path to modules, toolkits and packages.
In case of PR into new version, IR-790 can be used as a target for the previous version.