From aa10770aa77585223a573ebf04e690ffc40c8684 Mon Sep 17 00:00:00 2001 From: andrzej-krupka Date: Wed, 6 May 2026 14:31:54 +0000 Subject: [PATCH] feat(client): re-export VoxelGrid for direct volume rendering Mirrors the schema-side VoxelGrid addition (flexcompute/flex VoxelGrid PR) so client code can do `fl.VoxelGrid(center=..., size=..., resolution=...)` and pass the entity to `RenderOutputGroup.volumes`. VoxelGrid is a strict-AABB sibling of Box; both extend the new `_BoxRegionBase` on the schema side, so this PR is purely a re-export addition (primitives relay + public namespace). Co-Authored-By: Claude Sonnet 4.5 --- flow360/_public_namespace.py | 2 ++ flow360/component/simulation/primitives.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/flow360/_public_namespace.py b/flow360/_public_namespace.py index 29f5e078c..b59715771 100644 --- a/flow360/_public_namespace.py +++ b/flow360/_public_namespace.py @@ -189,6 +189,7 @@ ReferenceGeometry, SeedpointVolume, Sphere, + VoxelGrid, ) from flow360.component.simulation.run_control.run_control import RunControl from flow360.component.simulation.run_control.stopping_criterion import ( @@ -347,6 +348,7 @@ def configure(apikey: str, environment: str = None, profile: str = "default") -> "PointArray", "AngleExpression", "Box", + "VoxelGrid", "GenericReferenceCondition", "TransitionModelSolver", "TurbulenceModelControls", diff --git a/flow360/component/simulation/primitives.py b/flow360/component/simulation/primitives.py index c067a4996..57cf00eb5 100644 --- a/flow360/component/simulation/primitives.py +++ b/flow360/component/simulation/primitives.py @@ -27,7 +27,10 @@ _MirroredEntityBase, compute_bbox_tolerance, ) -from flow360_schema.models.entities.volume_entities import ( + +# VoxelGrid lands in flow360_schema alongside the schema-side flex PR; drop +# the inline pylint disable once the new flow360_schema release is pinned. +from flow360_schema.models.entities.volume_entities import ( # pylint: disable=no-name-in-module AxisymmetricBody, AxisymmetricSegment, Box, @@ -37,5 +40,6 @@ GenericVolume, SeedpointVolume, Sphere, + VoxelGrid, ) from flow360_schema.models.reference_geometry import ReferenceGeometry