Skip to content

feat(client): re-export VoxelGrid for direct volume rendering#2038

Closed
andrzej-krupka wants to merge 1 commit intomainfrom
andrzej/voxel-grid-schema
Closed

feat(client): re-export VoxelGrid for direct volume rendering#2038
andrzej-krupka wants to merge 1 commit intomainfrom
andrzej/voxel-grid-schema

Conversation

@andrzej-krupka
Copy link
Copy Markdown
Contributor

@andrzej-krupka andrzej-krupka commented May 6, 2026

Summary

Replacement for closed #2026. Pairs with the new flex VoxelGrid PR (flexcompute/flex#12290).

  • Adds VoxelGrid to the primitives relay (flow360/component/simulation/primitives.py).
  • Adds VoxelGrid to flow360._public_namespace import + __all__ so fl.VoxelGrid is reachable from the top level.

VoxelGrid is a strict-AABB sibling of Box; both extend the new _BoxRegionBase on the schema side, so this PR is purely re-export plumbing.

CI status

code-style/{black,isort,lint,json-key-order} and Analyze (python) pass.

The test matrix will fail with ImportError: cannot import name 'VoxelGrid' from 'flow360_schema.models.entities.volume_entities' until flex#12290 lands and a new flow360_schema package is published — VoxelGrid doesn't exist in the published schema dep yet. CI will turn green automatically once the schema dep ships. The pylint disable on the new import is gated on the same publication.

Paired PRs

  • flex (schema): flexcompute/flex#12290
  • compute (consumer): flexcompute/compute#4988 — uses from flow360.component.simulation.primitives import VoxelGrid in its translator test; submodule pointer already bumped to this branch's head.

Test plan

  • (after flex#12290 lands) from flow360 import VoxelGrid works
  • (after flex#12290 lands) Round-trip a fl.VoxelGrid(...) through a fl.RenderOutputGroup(volumes=[...])

🤖 Generated with Claude Code

@andrzej-krupka andrzej-krupka force-pushed the andrzej/voxel-grid-schema branch 2 times, most recently from 5d2c59e to 3f436bf Compare May 6, 2026 15:01
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 <noreply@anthropic.com>
@andrzej-krupka andrzej-krupka force-pushed the andrzej/voxel-grid-schema branch from 3f436bf to aa10770 Compare May 6, 2026 15:13
@andrzej-krupka
Copy link
Copy Markdown
Contributor Author

Closing — superseded by flexcompute/compute#5052.

The Flow360 client was inlined into the compute repo by flexcompute/compute#4990 / flexcompute/compute#4956. compute is now the canonical home; this repo is a downstream copybara mirror. The 2-file re-export change in this PR is now part of the consolidated compute PR alongside the schema additions.

Closing rather than re-targeting because the work moves to a different repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant