Papers
Topics
Authors
Recent
Search
2000 character limit reached

PolycubeNet: A Dual-latent Diffusion Model for Polycube-Based Hexahedral Mesh Generation

Published 19 May 2026 in cs.GR and cs.AI | (2605.20274v1)

Abstract: Hexahedral meshes are widely used in simulation pipelines, yet automatic generation remains challenging for complex CAD geometries. Polycube-based hexahedral meshing is a representative approach due to its regular, parameterization-friendly structure, but existing polycube construction methods often rely on intricate surface segmentation and local heuristics, which can produce artifacts or fail on difficult shapes. In this paper, we propose an end-to-end framework for polycube generation based on conditional diffusion models. Given an input geometry represented as a point cloud, our method directly produces a corresponding polycube point cloud, eliminating the need for explicit surface segmentation or predefined polycube templates. At the core of our approach is a dual-latent conditional diffusion architecture that confines computationally expensive self-attention operations to a fixed-capacity, low-dimensional latent space. This design effectively decouples computational complexity from the resolution of both the input geometry and the output polycube, thereby avoiding the quadratic cost typical of point cloud self-attention mechanisms while supporting flexible input and output resolutions. To obtain a hexahedral mesh, the generated polycube is aligned to the input shape via rigid and non-rigid point cloud registration to establish surface correspondence, followed by a polycube-to-hex pipeline. We additionally create and release a paired dataset of CAD meshes and their corresponding polycube meshes, together with the core implementation of our model. Experiments show that PolycubeNet generalizes to complex CAD models with arbitrary genus and produces high-quality polycube structures within seconds, improving robustness and efficiency over prior learning-based approaches.

Summary

  • The paper introduces a dual-latent conditional diffusion model that generates structurally consistent polycube point clouds from raw CAD geometry without templates or surface-segmentation heuristics.
  • PolycubeNet supports test-time resolution scaling from 4,096 to 1,048,576 output points with approximately linear inference-time growth, while downstream processing converts predictions into conforming hexahedral meshes.
  • The method improves topology, feature preservation, and reported scaled-Jacobian quality over classical and prior learning-based baselines, but remains limited by thin-feature ambiguity and validation mainly on CAD-shaped data.

Motivation and problem setting

Hexahedral mesh generation remains a recognized bottleneck in CAD/CAE workflows, a point emphasized by the NASA CFD Vision 2030 study cited by the authors. Polycube-based meshing reduces the problem to structured grid partitioning in an axis-aligned domain followed by pullback, but classical pipelines depend on surface segmentation and heuristic discrete optimization. These stages introduce local optima and sequential dependencies that limit robustness on complex, high-genus geometries, and commonly imposed validity constraints favor 3-connected configurations without covering the full polycube space.

Prior learning-based work partially addresses this but with significant restrictions. DL-Polycube classifies shapes into a limited set of polycube-structure categories, which cannot span the effectively infinite space of polycube configurations. DDPM-Polycube formulates the mapping as a denoising diffusion process but trains on templates perturbed from only two voxel types (genus-0 cube and genus-1 perforated cube), yielding nine candidate configurations; it also initializes the reverse chain with the input point cloud rather than Gaussian noise, requiring a mean-compensation term as an engineering correction, and is restricted to fixed 1024-point inputs and outputs.

PolycubeNet reformulates polycube construction as conditional diffusion: sampling always starts from Gaussian noise at arbitrary resolution, while the input geometry enters solely through conditioning. The output is a polycube point cloud (coordinates plus surface normals), from which an explicit structure is recovered and converted to a hexahedral mesh via a post-processing pipeline.

Dual-latent architecture

The central architectural contribution is a dual-latent Transformer design inspired by PointInfinity's resolution-invariant latent diffusion. Both the denoiser ϵθ\epsilon_\theta and the condition encoder ee are built from two-stream blocks. Each block performs three operations: a read cross-attention that encodes data-stream information into a fixed-size latent stream (z^l=CrossAtten(zl,xl,xl)\hat{z}^l = \text{CrossAtten}(z^l, x^l, x^l)), HH layers of Transformer self-attention confined to the latent stream, and a write cross-attention that propagates results back to the data stream. The condition encoder compresses the input geometry into 64 latent tokens; the denoiser receives these tokens concatenated with its own initialized latents and a time-step embedding.

This design has three consequences claimed by the authors:

  • Linear scalability: self-attention cost is decoupled from point count; total attention complexity becomes linear in resolution rather than quadratic.
  • Template-free conditioning: raw geometric point clouds replace categorical labels or templates.
  • Redundancy filtering: mapping conditioning into a low-dimensional latent space suppresses local redundancy inherent in piecewise-planar polycube surfaces, prioritizing global topological consistency.

The concrete configuration uses L=6L=6 two-stream blocks with H=4H=4 transformer layers each, hidden dimension 256, 8 attention heads, and 256 latent tokens for the denoiser. Training uses AdamW at learning rate 10410^{-4} with cosine decay, batch size 32, T=1024T=1024 diffusion steps, and both input and output resolutions fixed at 4096 during training. A notable training detail is a dynamically weighted hybrid loss Lhybrid=wL2+(1w)L1\mathcal{L}_{\text{hybrid}} = w\,\mathcal{L}_2 + (1-w)\,\mathcal{L}_1 with wU[0.4,0.8)w \sim \mathcal{U}[0.4, 0.8) sampled per iteration; the authors report faster convergence than pure ee0, with better topological capture early in training and finer detail later. This claim is supported qualitatively by inference comparisons across training epochs rather than by quantitative convergence curves.

Dataset

To address supervision scarcity, the authors construct and release a paired dataset of roughly 30K CAD models derived from the ABC dataset, together with corresponding polycube meshes. Construction combines deformation-based methods and label-based methods (with robust quantized polycube mapping), selecting per model the candidate with a foldover-free, low-distortion map. Meshes are filtered for manifoldness, closedness, and element quality; high-connectivity cases are handled via validity-augmented topological conditions or interactive cuboid decomposition, or discarded when automatic processing fails. The dataset is described as the first paired CAD–polycube corpus, though coverage is acknowledged to be CAD-centric.

Polycube-to-hex pipeline

Downstream of generation, the pipeline proceeds in five stages. Poisson-disk sampling produces a uniform input point cloud with stored face indices and barycentric coordinates for exact correspondence back to the surface. A lightweight density-based outlier filter cleans the generated polycube cloud—the authors note that the strong axis-aligned regularity of outputs makes simple filtering sufficient. Rigid alignment followed by Coherent Point Drift non-rigid registration establishes cross-domain correspondence, discretized via nearest-neighbor projection. Plane fitting and axis-aligned patch assembly recover the explicit polycube structure, from which a structured hex mesh is extracted by regular partitioning. Finally, boundary vertices are anchored through the established mapping and a constrained optimization jointly enforces surface conformity and interior quality, followed by pillowing and smoothing.

Experimental findings

Test-time resolution scaling. Although trained at a fixed 4096/4096 resolution, the model supports variable resolutions at inference. With output resolution swept from 4096 to 1,048,576 under fixed conditions, quality remains consistent; with output fixed at 131,072 and input swept from 128 to 16,384, quality saturates once input reaches 1024 points. Inference time grows linearly with output resolution up to 1M points (measured with DDIM sampling, stride 4), empirically confirming the linear-complexity claim.

Comparison with DDPM-Polycube. Qualitative comparisons indicate substantially better structural quality, topology, and detail preservation, attributable to template-free conditioning and the latent-space backbone.

Comparison with classical methods. Against Evocube as the primary baseline, the paper highlights three failure modes of classical pipelines that the learned approach avoids:

Failure mode Classical behavior PolycubeNet behavior
Structural artifacts on slanted features Ramp collapses to a single plane Preserves shape-consistent structure
Polycube-map conflicts No feasible solution found Globally consistent output
High-connectivity corners Violates 3-connectivity validity assumptions Handled by learned global prior

On hex-mesh quality, measured by average and minimum scaled Jacobian (ee1, ee2) and visualized in HexaLab, the method reports better statistics and avoids baseline failures such as a topological defect on model No.12404 and severe distortion on No.160324. Runtime is a further differentiator: representative classical methods take minutes to tens of minutes, whereas trained-model inference completes within seconds.

The authors are explicit about positioning: the goal is not to replace optimization-based pipelines, which retain advantages in interpretability, determinism, and constraint enforcement, but to provide a generative structural prior complementary to them.

Limitations

Two limitations are conceded. First, because the method operates on unstructured points without connectivity, extremely narrow slits and thin structures can be ambiguous—points from opposing sides may be spatially indistinguishable—degrading downstream construction; augmenting inputs with neighborhood graphs and normal-aware constraints is suggested as a remedy. Second, training data derive primarily from ABC-style CAD shapes, so generalization to artistic or non-CAD distributions remains unverified pending broader data coverage. Additionally, the evidence for several claims—including the hybrid-loss benefit and hex-quality improvements—is largely qualitative or based on small sets of example models rather than large-scale quantitative benchmarks, and the ~30K dataset is described as initial, with expansion planned.

Conclusion

PolycubeNet demonstrates that conditional diffusion over a dual-latent Transformer can directly synthesize structurally consistent polycube point clouds from raw geometry, replacing segmentation-and-heuristics front ends with a learned generator while retaining classical parameterization and extraction machinery downstream. The latent-space design yields linear-time inference and test-time resolution flexibility, and the released paired dataset addresses a genuine supervision gap. The open questions left by the paper are specific: whether connectivity-aware point representations can resolve thin-feature ambiguity, how well the learned prior transfers beyond CAD-like distributions, and how effectively diffusion-based structure prediction can be combined with classical optimization for application-constrained refinement.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.