CAST: Cast-Admissible Generative Design and Shape Optimization with Paired Depth Images
Authors: Jihoon Kim, Yongmin Kwon, Namwoo Kang
Organizations: Department of Mechanical Engineering, Korea Advanced Institute of Science and Technology, Daejeon 34141, Republic of Korea · Narnia Labs, Daejeon 34051, Republic of Korea · Cho Chun Shik Graduate School of Mobility, Korea Advanced Institute of Science and Technology, Daejeon 34051, Republic of Korea
Deep generative design can produce complex geometries, but unconstrained representations may create undercuts that prevent release from a two-part mold. We present CAST, which reformulates three-dimensional shape generation under a selected mold-opening constraint as a two-dimensional image generation problem using paired top and bottom depth images. Each valid depth pair defines one material interval along a selected mold-opening direction, so reconstructions exclude undercuts in that direction by construction. Diffusion models generate candidate shapes in this representation, and a finite element analysis (FEA) guided optimizer refines the same two boundaries. We evaluate diffusion-based generation with limited training data comprising 211 SimJEB bracket designs. On SimJEB brackets, FEA-guided refinement with a volume penalty reduced compliance in 193 of 200 generated candidates. The median reduction across all candidates was 36.8 percent in the optimization FEA model. Reconstruction of existing brackets revealed a mass--stiffness trade-off: filling occluded regions increased material volume and reduced displacement under the evaluated loads. Paired depth images thus connect generative exploration and structural refinement in a shared design space that preserves the selected pull-direction restriction.
Figures & tables
Figure 1: Undercuts and mold separation along the selected pull direction. (a) Mold material occupies a side recess in the part. (b) Attempted upward motion of the upper mold produces interference with the part, highlighted in red. (c) Filling the interval between the opposing boundaries removes the recess and the pull-direction interference. Sage-green hatching marks the added material.
Figure 2: Depth calculation and reconstruction for paired top and bottom fields. Orthographic rays record first-surface distances from opposite camera planes, and the interval between the paired surfaces is filled to reconstruct a solid with at most one material interval along the selected pull direction.
Figure 3: The CAST framework. (a) Valid paired depth fields reconstruct a solid without undercuts along the selected pull direction. (b) A diffusion model generates new paired depth fields. (c) FEA-guided optimization refines the same upper and lower boundaries along that direction while keeping the in-plane footprint fixed.
Figure 4: Paired top and bottom depth fields for six SimJEB brackets. Depth is measured in the normalized coordinate system.
Figure 5: Restoration of transverse mounting holes after depth reconstruction. Boolean subtraction reopens the filled holes (circled).
Figure 6: Original brackets and their two-depth reconstructions in front, back, side, and isometric views.
Load case
Maximum displacement (%)
Vertical
−16.8[−25.5,−11.5]
Horizontal
−18.3[−26.9,−12.4]
Diagonal
−13.6[−22.7,−7.9]
Torsion
−24.4[−28.6,−19.8]
Table 1: Maximum displacement changes after reconstruction for 230 shape-matched pairs. Values are median [interquartile range] in percent.
Figure 7: Examples generated by pixel-space diffusion. (a) Paired top and bottom depth fields. (b) Corresponding three-dimensional reconstructions in multiple views. Matching numbers identify the same sample in all views.
Figure 8: Compliance reduction across 200 generated candidates. Bars show the interquartile range, vertical ticks the median, and diamonds the mean. The thin line for all candidates shows the full observed range.
Figure 9: Shape refinement for Cases 1–3. Before shows reconstructions of generated depth fields clipped to the design envelope. After shows the saved optimized designs. Overlays show material added or removed during input preparation and refinement. All surfaces are smoothed for visualization.
Figure 10: Optimization behavior of three additional candidates (Cases 4–6). (a) Compliance histories (thin) and running minima (thick) at the default volume target. (b) Volume–compliance outcomes for four volume targets. Two targets retain the same initial design for Case 4.
Figure 11: Effects of optimizer settings, FEA guidance, and load direction on compliance reduction for Cases 1–3, the same candidates as in Fig. 9 . (a) Effects of control lattice resolution nc , volume penalty weight wV , and removing the FEA gradient (FEA-off). (b) Effects of load direction. Bars show means, and symbols identify individual candidates. Green bars and the dashed line mark the default configuration.
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Case
Interface load
Vertical
F=(0,0,35586)
Horizontal
F=(−37810,0,0)
Diagonal
F=(−28276,0,31404)
Torsion
M=(0,0,564924)
Appendix
Supp. Table 1: SimJEB load cases used for original–reconstruction comparison. Forces are in N and the torsional moment is in N mm.
Item
Setting
Implementation
diffusers 0.36.0 AutoencoderKL , trained from scratch
Input/output
2×256×256 paired depths; normalization 2x/0.8−1
Encoder/decoder widths
(64,128,256) ; two residual layers per block
Activation/normalization
SiLU; GroupNorm with 32 groups; mid-block attention
Latent
4×64×64 posterior mean; KL weight 0
Optimization
AdamW, lr 10−4 , betas (0.9,0.999) , weight decay 0
Appendix
Supp. Table 2: Configuration of the deterministic spatial autoencoder used by all three latent diffusion runs.
Component
Tensor
Precision
Batch/update
Params [M]
TFLOP/update
Peak [GiB]
Pixel diffusion
2×256×256
FP32
32×2=64
35.716
44.976
58.466
Latent diffusion
4×64×64
FP32
32×2=64
35.723
2.800
4.769
Autoencoder
2×256×256
BF16
8×4=32
13.858
26.597
8.128
Appendix
Supp. Table 3: Single-A100 training resource measurements. Batch/update lists physical batch size multiplied by gradient accumulation.
Group
n
Improved
Mean [%]
Median [%]
IQR [%]
Single-connected
All candidates
200
193
36.1
36.8
23.7–50.8
195
moderate topology
116
112
37.1
39.1
23.7–53.5
116
porous / lattice
84
81
34.7
34.5
23.9–43.3
79
Appendix
Supp. Table 4: Reported optimization results for 200 generated candidates under one fixed configuration. Reduction refers to compliance of the selected projected depth state. “Single-connected” counts projected depth footprints with one component.
Supp. Fig. 1: Pixel-space and latent-space diffusion across three seeds, with 256 samples per run. Balanced depth distance to (a) the nearest training design and (b) the nearest other generated sample. Boxes show medians and interquartile ranges, whiskers extend to 1.5 times the interquartile range, and points show samples. (c) Major-volume fragmentation, with flagged counts. Metrics are defined in Sec. S5.1 .
Method
Seed
Major-volume flags
Median components
Out of range [%]
Crossing [%]
Nearest-train distance
Pixel space
17
10/256
5
0.00
0.146
0.02248
Pixel space
29
8/256
9
0.00
0.117
0.02498
Pixel space
43
34/256
4
0.00
0.171
0.03046
Latent space
17
0/256
15
2.93
0.450
0.00216
Latent space
29
0/256
11
3.17
0.326
0.00197
Latent space
43
0/256
10
3.74
0.313
0.00187
Appendix
Supp. Table 5: Pixel-space and latent-space diffusion results, with 256 samples per run. Out-of-range fractions, crossing fractions, and nearest-training distances are run means. Metrics are defined in Sec. S5.1 .
Cho Chun Shik Graduate School of Mobility, Korea Advanced Institute of Science and Technology, 193 Munji-ro, Yuseong-gu, Daejeon, 34051, Republic of Korea · AI Research Team, Narnia Labs, 193 Munji-ro, Yuseong-gu, Daejeon, 34051, Republic of Korea