找到最大区域的面

Macwinlin@weixin53246799
8 个帖子
#1 · 2025年3月14日, 下午11:49
引用于 Macwinlin 在 2025年3月14日, 下午11:49找到最大区域的脸
挤出形状后,我们将其拆分。 comp(f){front:fa}
我想找到最大区域的FA的脸
谢谢您的这个有趣的问题!以下是一些CGA辅助功能,可以为您提供最大区域的脸部
索引:
version "2024.1" sizes = comp(f){ all : geometry.area() } indices = sortIndices(sizes) largestIndex = indices[size(indices)-1] @StartRule // Apply on a shape with multiple front faces Generate --> comp(f) { front = comp(f) { largestIndex : color(1,0,1) fa. } }
谢谢您的这个有趣的问题!以下是一些CGA辅助功能,可以为您提供最大区域的脸部
索引:
version "2024.1" sizes = comp(f){ all : geometry.area() } indices = sortIndices(sizes) largestIndex = indices[size(indices)-1] @StartRule // Apply on a shape with multiple front faces Generate --> comp(f) { front = comp(f) { largestIndex : color(1,0,1) fa. } }
您可以重写规则以获取这样的最大面孔的顺序:
Generate --> comp(f) { front = fa1 } fa1 --> comp(f) { largestIndex : color(1,0,1) fa1. | all = fa2 } fa2 --> comp(f) { largestIndex : color(1,1,0) fa2. | all = fa3 } fa3 --> comp(f) { largestIndex : color(0,1,1) fa3. | all : faRemaining. }
找到最大区域的脸
挤出形状后,我们将其拆分。 comp(f){front:fa}
我想找到最大区域的FA的脸
谢谢您的这个有趣的问题!以下是一些CGA辅助功能,可以为您提供最大区域的脸部
索引:
version "2024.1"
sizes = comp(f){ all : geometry.area() }
indices = sortIndices(sizes)
largestIndex = indices[size(indices)-1]
@StartRule // Apply on a shape with multiple front faces
Generate -->
comp(f) { front = comp(f) { largestIndex : color(1,0,1) fa. } }
谢谢您的这个有趣的问题!以下是一些CGA辅助功能,可以为您提供最大区域的脸部
索引:
version "2024.1"
sizes = comp(f){ all : geometry.area() }
indices = sortIndices(sizes)
largestIndex = indices[size(indices)-1]
@StartRule // Apply on a shape with multiple front faces
Generate -->
comp(f) { front = comp(f) { largestIndex : color(1,0,1) fa. } }
您可以重写规则以获取这样的最大面孔的顺序:
Generate --> comp(f) { front = fa1 }
fa1 --> comp(f) { largestIndex : color(1,0,1) fa1. | all = fa2 }
fa2 --> comp(f) { largestIndex : color(1,1,0) fa2. | all = fa3 }
fa3 --> comp(f) { largestIndex : color(0,1,1) fa3. | all : faRemaining. }
踩。0赞。0
Last edited on 2025年3月14日, 下午11:50 by Macwinlin