3d 三维建模:将冗余面减少为单个三面/四面体
以下是场景: 我在Blender中有一个视频游戏级设计,需要定义物理边界。现在,我正在做这件事,通过采取尽可能多的相邻面,总的来说,使一个三/四的形状,并提取到一个单独的网格。这个单独的网格将成为它的物理墙 我想为它写一个Python脚本。基本上,脚本将为每个三/四元形状的曲面创建物理边界 条件是:3d 三维建模:将冗余面减少为单个三面/四面体,3d,blender,discrete-mathematics,3d,Blender,Discrete Mathematics,以下是场景: 我在Blender中有一个视频游戏级设计,需要定义物理边界。现在,我正在做这件事,通过采取尽可能多的相邻面,总的来说,使一个三/四的形状,并提取到一个单独的网格。这个单独的网格将成为它的物理墙 我想为它写一个Python脚本。基本上,脚本将为每个三/四元形状的曲面创建物理边界 条件是: 网格中的每个面都必须是三角形 如果物理墙有多个面,则每个面必须具有相同的法线 如果物理墙有多个面,则每个面都必须具有整体的三/四字形 因此,如果要在Blender中获取立方体并多次细分面,但实际上不
for each unprocessed face starting from -axii to +axii (distance from origin):
select face
while selected faces have adjacent faces with the same normal:
select adjacent faces with the same normal
traverse outermost edges on all faces starting from -axii
while more than 4 edges with different directions are found
deselect outermost-face with the greatest +axii (distance from origin)
traverse outermost edges on all faces starting from -axii
create a physics wall with the 3 or 4 outermost verticies
mark all selected faces as processed
deselect all faces
在我开始写这个脚本之前,现有的脚本或者我想做的部分已经存在了吗?有人认为这样写脚本有问题吗?复制和使用脚本怎么样?