- 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.
- 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.
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.
- 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.
- 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.
- Removes the dead `IVtkTools_ShapePicker::SetTolerance(float)` / `GetTolerance()` API and the unused stored tolerance value.
- Adds `SetPixelTolerance(int)` / `PixelTolerance() const` to `IVtkTools_ShapePicker` and `IVtkOCC_ShapePickerAlgo`, forwarding to `SelectMgr_ViewerSelector`.
- Removes `IVtkOCC_ViewerSelector`’s local cached tolerance fields and updates all `Pick()` overloads to apply `myTolerances.Tolerance()` on every pick.
The classical V3d_RectangularGrid / V3d_CircularGrid path generated all grid
lines on the CPU into a Graphic3d_Structure and recomputed them whenever any
parameter, the camera, or the privileged plane moved. Dense grids paid an
O(NxM) vertex rebuild per interaction and were effectively capped in extent;
there was no way to draw an infinite grid, a background (sky-plane) grid, or
a grid with sub-pixel line antialiasing.
This change promotes a shader-based grid to the single rendering path for
both rectangular and circular grids. Classical API, snap math and the vgrid
Draw command are preserved; only the presentation pipeline moves under the
shader.
Aspect layer:
- Add Aspect_GridParams: POD carrying shader-only appearance knobs (color,
origin, Scale, ScaleY, LineThickness, RotationAngle, AngularDivisions,
IsBackground, IsDrawAxis, IsInfinity, DrawMode, SizeX/SizeY, Radius,
AngleStart/AngleEnd). EffectiveScaleY() returns ScaleY when non-zero and
Scale() otherwise; IsCircular() is shorthand for AngularDivisions() > 0;
IsBounded() / IsArc() report active clipping.
- Extend Aspect_RectangularGrid with SizeX/SizeY/ZOffset fields and
accessors; extend Aspect_CircularGrid with Radius/ZOffset/AngleStart/
AngleEnd and IsArc(). Snap math is unchanged.
- Add Graphic3d_CView::GridDisplay(Aspect_GridParams, gp_Ax3) and GridErase()
virtuals with no-op defaults; include Aspect_GridParams.hxx and gp_Ax3.hxx
from Graphic3d_CView.hxx.
Shader (Graphic3d_ShaderManager::getGridProgram):
- Full-screen triangle unprojected per-fragment to world-space Near/Far
points, ray-plane intersection against an arbitrary plane supplied through
uPlaneOrigin / uPlaneX / uPlaneY / uPlaneN uniforms. Per-fragment unproject
avoids perspective-divide nonlinearity that plagues varying-based rays.
- Helper intersectPlane() uses a normalized direction for the parallel test,
so GRID_PARALLEL_EPS = 1e-6 is a dimensionless |sin(angle)| threshold
(~5.7e-5 deg) that stays scale-invariant under any world-depth range.
- gridLines2d / gridLines1d: fwidth-based AA plus per-axis Nyquist fade
(smoothstep(1.0, 2.0, fwidth)). Once a grid period fits inside a single
pixel, that axis fades to zero instead of smearing into a bright haze at
grazing angles. Lines mode uses max() of per-axis alphas; points mode
uses the product so only intersections light up.
- Bounded work area (rectangular SizeX/SizeY, circular Radius, optional arc
range): hard discard and smoothstep endpoint are both extended by
fwidth(coord), giving a single-screen-pixel AA transition instead of a
binary staircase at the clipping edge.
- Stable-reference rebasing for the rectangular grid: CPU unprojects the
screen center to the plane every frame and uploads the plane-local hit as
uStableRefLocal + uHasStableRef. The shader subtracts
floor(ref * scale) / scale before fract(), keeping the fract() argument
bounded at far world offsets without changing the visible line pattern.
- Branch on uGridType (0 = rectangular, 1 = circular). Circular path uses
polar coords (length, atan2) scaled by uScaleX and uAngularScale;
plane-local X/Y axis colouring is applied uniformly in both modes so the
red/green/blue cardinal lines stay straight.
- uDrawMode switches lines vs points (Aspect_GDM_Points); uIsBackground
pins gl_FragDepth to 1.0 - 1e-5 for the sky-plane look. Explicit GL 3.2 /
GLES 3.0 version headers; requires gl_VertexID and gl_FragDepth.
OpenGL plumbing:
- Add OpenGl_ShaderManager::BindGridProgram(): lazy Create + cache, routed
through bindProgramWithState so the standard OCCT matrix uniforms
(occProjectionMatrix, occWorldViewMatrix, occModelWorldMatrix and their
inverses, occViewport) are pushed onto the grid program every bind.
myGridProgram is nullified in clear() so context resets release the
compiled program.
- Add OpenGl_View::GridDisplay / GridErase overrides and private
renderGrid(). The renderer binds a dedicated VAO (core-profile safe) and
saves/restores program, depth test / func / mask, blend enable,
blend-func-separate, and depth-clamp. ProjectionState / WorldViewState are
push/pop-guarded. Original ZNear/ZFar/ProjType are captured before any
mutation so a mid-function ZFitAll cannot clobber user-set vzrange on
restore.
- Background-mode pan/rotate compensation is derived from the view-matrix
delta (currentView * refView^-1) captured at GridDisplay(); no public
Graphic3d_Camera API change is needed.
- Compute the plane-local stable reference in renderGrid via
Graphic3d_TransformUtils::UnProject on the viewport center; upload
uStableRefLocal / uHasStableRef alongside the other uniforms.
- Insert renderGrid() between renderScene() and renderTrihedron() in the
non-immediate draw pass; release myGridVao in ReleaseGlResources.
V3d layer:
- Add V3d_View::GridDisplay(params) / GridDisplay(params, plane) / GridErase
as thin pass-throughs; the single-argument overload uses
V3d_Viewer::PrivilegedPlane().
- Rewrite V3d_RectangularGrid and V3d_CircularGrid: drop the nested
RectangularGridStructure / CircularGridStructure classes, myGroup,
DefineLines, DefinePoints, and all myCur* caching flags. Display() /
Erase() / UpdateDisplay() now call syncViews() which builds an
Aspect_GridParams from the Aspect_{Rectangular,Circular}Grid state
(XStep/YStep -> Scale/ScaleY, RadiusStep -> Scale, DivisionNumber ->
AngularDivisions, XOrigin/YOrigin/OffSet -> Origin, RotationAngle ->
RotationAngle, SizeX/SizeY/Radius/ArcRange -> bounds, DrawMode)
and broadcasts it over V3d_Viewer::DefinedViews(). Snap math in
Aspect_RectangularGrid / Aspect_CircularGrid is untouched.
- V3d_RectangularGrid is unbounded by default (SizeX = SizeY = 0). The grid
renderer honours an explicit SetSizeX / SetSizeY to activate in-shader
clipping with AA edges; applications that want the old bounded behaviour
set the size explicitly.
Draw / tests:
- vgrid Draw command gains -type {rect|circ|inf|infinite}, -color R G B,
-scale N, -lineThickness T, -background {0|1}, -drawAxis {0|1},
-inf {0|1}. Existing -origin, -step, -rotAngle, -zoffset, -size, -radius,
-mode flags are retained and now drive the shader path.
- tests/v3d/grid/ (new group) adds ortho, persp, inf_pan, inf_rotate,
inf_plane, rect_shader, circ_shader, rect_points, inf_options,
bounded_rect, bounded_circ Draw regressions covering background mode,
matrix-derived pan/rotate stability, non-XY privileged planes,
anisotropic rectangular cells, polar divisions, points draw mode, and
in-shader bounded clipping. Registered in tests/v3d/grids.list.
- Add src/Visualization/TKService/GTests/Aspect_GridParams_Test.cxx covering
defaults, round-trip, copy, EffectiveScaleY fallback, RotationAngle
round-trip, AngularDivisions / IsCircular toggle, and DrawMode round-trip.
- Add src/Visualization/TKService/GTests/Aspect_Grid_Bounds_Test.cxx
covering SizeX/SizeY/Radius/ArcRange on the base grid classes.
Behaviour notes:
- V3d_RectangularGrid and V3d_CircularGrid no longer rely on
Graphic3d_Structure view affinity, so new views added to the viewer after
V3d_Viewer::ActivateGrid() must trigger a re-broadcast (call
Grid()->Display() on the viewer or re-activate) to pick up the grid.
- Aspect_GDM_Points is now rendered as dots at grid intersections through
uDrawMode (not as the old CPU point markers). Applications that depended
on point markers as selectable entities should present them through a
dedicated AIS object.
- V3d_RectangularGrid is unbounded by default; the old behaviour of
capping to 0.5 * DefaultViewSize() is available via an explicit
SetSizeX / SetSizeY call.
- Aspect_GridParams::Origin is a plane-local offset; the plane itself is
supplied as a gp_Ax3 (defaults to V3d_Viewer::PrivilegedPlane()).
Complete the AIS_ColorScale rectangle winding fix by following the
upstream patch revision from Kirill Gavrilov <kirill@sview.ru>,
commit 9b8c6240d10ab709ac611503dcc40e45b83fb3d1.
Switch the rectangle helper from manual triangle edges to
Graphic3d_ArrayOfPrimitives::AddQuadTriangleEdges() while preserving
the top/bottom color layout. This keeps the quad in a consistent CCW
orientation and avoids visible seam edge or front-face loss when BACK
face culling is enabled.
Add DRAW regression test tests/v3d/colorscale/colorscale_faceculling
using the original reproduction scenario and a pixel check for the
front face.
Replaces two buggy pieces of SelectMgr_TriangularFrustumSet used during
polyline (polygon rubber-band) selection:
- OverlapsBox(min, max, bool* theInside): the corner-edge isIntersectBoundary
heuristic produced false "fully inside" answers whenever an AABB was large
enough that its 12 edges did not cross the polyline but its interior did
not lie inside either. Rewrite: first probe every frustum for any overlap;
if none, return false. Otherwise, project the 8 AABB corners onto the
frustum near plane and apply a ray-cast inside test against the original
polyline loop. If any corner projects outside, clear theInside; else leave
it untouched. The near-plane coplanarity assumption is guaranteed by
Build(), which derives every near vertex from
myBuilder->ProjectPntOnViewPlane(x, y, 0.0).
- OverlapsPoint(const gp_Pnt&): previously a stub returning false, which made
strict-inclusion polyline selection of Select3D_SensitiveTriangle,
SensitivePoly, SensitiveTriangulation, SensitivePrimitiveArray,
MeshVS_CommonSensitiveEntity and MeshVS_SensitiveQuad silently impossible
(those sensitive types call theMgr.OverlapsPoint(...) on each vertex in
strict-inclusion mode; a blanket false meant nothing was ever picked). Now
delegates to the same near-plane projection + ray-cast test, so strict
inclusion works for all these sensitive types in polyline mode.
Covered by a new Draw test tests/vselect/bugs/bug_polyline_inclusion that
exercises both strict-inclusion and overlap modes for spheres inside/outside
a polygonal rubber band. No GTest is added because constructing a working
TriangularFrustumSet requires a configured Graphic3d_Camera + viewport; the
Tcl test is the regression gate.
Returns the three vertex positions of the triangle at the given index as a
std::array<NCollection_Vec3<float>, 3>. Downstream selection consumers can
now query the triangulation geometry of a picked primitive array without
re-walking the underlying Graphic3d_Buffer/Graphic3d_IndexBuffer.
Uses the existing file-local getTriIndices helper and the private getPosVec3
member, so the implementation is a pure accessor. Returning std::array keeps
the contract explicit (always three vertices, no heap allocation)
Swap the last two vertex indices in the second triangle of each color-scale
rectangle so the two triangles share the same diagonal with consistent CCW
orientation. Earlier indexing (v+1, v+2, v+3) built two overlapping triangles
with opposite winding, producing visible seams and dropped vertices under
back-face culling.
Selection was broken for presentations that used Graphic3d_Group::SetFlippingOptions
(AIS_TextLabel, PrsDim_Dimension): OpenGl_Flipper mirrors the geometry at draw time
to keep labels upright relative to the camera, but the selection pipeline computed
BVH boxes and sensitive frustums in the unflipped local coordinates. When the camera
was rotated past the flipping threshold, clicks on the on-screen label missed.
- Add Graphic3d_Flipper: a CPU-side analogue of OpenGl_Flipper carrying the reference
plane and templated Compute()/Apply() that reproduces the render-time flip matrix.
Each flip branch is a 180 deg rotation (involution), so the matrix is self-inverse.
- Extend Graphic3d_CStructure with HasGroupFlipping()/SetGroupFlipping() alongside
the existing transform-persistence flag; reset it in Graphic3d_Structure::clear().
- Add Graphic3d_Group::Flipper() and a myFlipper member populated from
OpenGl_Group::SetFlippingOptions(true,...). The render-side OpenGl_Flipper element
is still emitted for the push/pop bracket; myFlipper persists across the matching
SetFlippingOptions(false,...) call so the selection side can see that the group
contains flipped geometry.
- Add Select3D_SensitiveEntity::Flipper() / SetFlippingOptions() so sensitive
entities can carry the same flipping metadata used by the selection traversal;
include the handle in DumpJson.
- SelectMgr_SensitiveEntitySet tracks myNbEntityWithFlipping in Append()/Remove();
HasEntityWithFlipping() exposes it to the viewer selector.
- SelectMgr_SelectableObjectSet::appropriateSubset() routes presentations with
HasGroupFlipping() to the 3d-persistent BVH subset (same as transform persistence).
- BVHBuilderAdaptorPersistent merges the flipping and transform-persistence loops
into a single pass: for each group with a Flipper or TransformPersistence, build
its local bbox, apply the flip (if any), then apply the TransformPersistence
(if any), then add the resulting box to the object bbox; object-level
TransformPersistence is applied once to the merged box. Note: for the rare case
of object-level + group-level TransformPersistence the application order differs
from the prior code (object-TP now runs after group-TP contributions are added).
Common cases (only one or the other) are behavior-preserving.
- SelectMgr_ViewerSelector::traverseObject() bypasses the root/per-node overlap
early-outs when the entity set contains flipped sensitives, and folds the flip
matrix into aInvFlippingAndPers = T_flip * aInvSensTrsf before computeFrustum()
and checkOverlap(). Using T_flip directly is valid because it is self-inverse.
Before Compute(), the object's Transformation() is folded into aMVForFlip via
Graphic3d_TransformUtils::Convert<double> so the isReversedX/Y/Z decision
agrees with OpenGl_Flipper::Render() which uses WorldView * ModelWorld.
- SelectMgr_SelectableObjectSet::BVHBuilderAdaptorPersistent computes the same
aMVForFlip once per object (hoisted outside the group loop) and passes it to
Graphic3d_Flipper::Apply, so BVH bounds and per-sensitive overlap testing use
the same flip matrix.
- SelectMgr::ComputeSensitivePrs() forwards the flipper to the debug presentation's
current group so selection-mode visualization reflects the flip.
Known limitation (narrowed): the selection pipeline now folds the object's
Transformation() into the MV passed to Graphic3d_Flipper::Compute, covering the
common case of a flipping label on a rotated assembly. Group-level
Graphic3d_Group::Transformation() is still not folded in on the selection side
because the sensitive entity does not carry a reference to its host group; this
only affects consumers that give the flipping group its own non-identity gp_Trsf
(uncommon in stock OCCT). A TODO in Graphic3d_Flipper::Compute and
SelectMgr_ViewerSelector marks the deferred follow-up.
- 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.
- 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.
- Apply `SelectMgr_SelectableObject` transformation when computing `BndBoxOfSelected()` for selected sub-owners.
- Add Draw Harness regression test for `MeshVS_Mesh` vertex selection with a transformation.
- Add Draw Harness regression test for transformed `TopoDS_Shape` face selection to ensure existing behavior remains correct.
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*
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.
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.
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.
Port of commit 1e1584357 adapted to the new source layout
and modern NCollection_Mat3/NCollection_Mat4 types.
- Graphic3d_ShaderVariable: register NCollection_Mat3<float> and
NCollection_Mat4<float> type IDs; add template instantiations
and Graphic3d_UniformMat3/Graphic3d_UniformMat4 typedefs.
- Graphic3d_ShaderProgram: add PushVariableMat3() and PushVariableMat4()
convenience methods.
- OpenGl_ShaderProgram: add single-value SetUniform() for mat3
(wrapping glUniformMatrix3fv); register mat3/mat4 in
OpenGl_VariableSetterSelector so custom uniforms are dispatched.
- ViewerTest (vshader command): add -vec2, -vec3, -vec4, -mat3, -mat4
argument parsing for setting custom uniform variables from Draw Harness.
- Add Draw Harness test exercising the new uniform types.
Refactor several hot paths in TKBO/TKOffset/TKOpenGl to reduce redundant
lookups/copies and align containers with OCCT collection types.
Changes:
- TKBO:
- Switch BOPTools_Set storage from NCollection_List to NCollection_Vector.
- Replace unsafe C-style edge cast with TopoDS::Edge().
- Apply small lookup/copy optimizations in BOPAlgo_Builder and
BOPAlgo_PaveFiller (Seek() usage, const refs, reduced temporaries).
- TKOffset:
- Reduce repeated vertex/tolerance extraction in BRepOffset_Inter2d.
- Cache MinLoc transformation in ExtentEdge().
- TKMesh:
- Simplify IMeshData_Face surface adaptor initialization.
- Add BRepMesh_FaceChecker_Test and register it in GTests/FILES.cmake.
- TKOpenGl:
- Replace std::map/std::set with NCollection_DataMap/NCollection_Map in
ray-tracing scene update state.
- Simplify texture transform and shader prefix string construction.
- Add OpenGl_View_Raytrace_TextureTransform_Test and register it in
GTests/FILES.cmake.
In C++, delete/delete[] on nullptr and free(NULL) are guaranteed no-ops.
This removes redundant null-check guards before these calls across 39
files, reducing code noise without behavioral change. Also simplifies
map value cleanup in BRepClass3d_SolidExplorer by using iterator
reference instead of redundant hash lookups.
Remove implicit optimization in OpenGl_Aspects that forced UNLIT shading
when material had no reflection properties. This broke PBR materials,
interior color handling, and texture modulation. All legacy code relying
on zero-material for UNLIT now explicitly sets SetShadingModel(Unlit).
Removed unused BUC60720 test command and QABugs_PresentableObject.
Added GTests for Graphic3d_Aspects shading model independence.
Defer EmptyCopied() and BRep_Builder::Add() in dispatchColors() to avoid
redundant shape construction when the copy is not actually needed.
Non-overridden sub-shapes are collected into pre-allocated
NCollection_DynamicArray and the compound is only built when
required (partial override case).
Added GTests covering dispatchColors() dispatch logic.
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.
- Replaced `TColStd_PackedMapOfInteger` implementation with a typedef to `NCollection_PackedMap<int>`
- Introduced new `NCollection_PackedMap` template class and `NCollection_PackedMapAlgo` namespace with standalone boolean operation functions
- Removed `TColStd_HPackedMapOfInteger` implementation files, keeping only the header as a deprecated wrapper
- Updated all iterator references from `TColStd_MapIteratorOfPackedMapOfInteger` to `TColStd_PackedMapOfInteger::Iterator`
- Replaced direct map method calls (Unite, Subtract, etc.) with standalone algorithm functions from `NCollection_PackedMapAlgo`
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.
- Added clang diagnostic pragmas to suppress three specific warning types around macOS/iOS framework imports
- Added version-specific warning suppression for clang 20+ in the general warnings disable header
- Extended function cast warning suppression to cover clang's `-Wcast-function-type-mismatch`
- 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.
- Replaced manual absolute value logic (conditional negation) with `std::abs` for clarity
- Added `const` qualifiers to variables that are not modified after initialization
- Moved variable declarations closer to their first use and removed unused variable assignments
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 unused variables in IVtkOCC_ViewerSelector to clean up the code.
- Eliminated the 'acceptvoid' variable from multiple methods to streamline the code.
- Improved code clarity and maintainability by reducing unnecessary complexity.