针对@thomthom 关于在 Sketchup 中重现此内容的问题进行编辑:
作为“答案”,因为我没有代表添加两个以上原始帖子的链接。 -对不起
感谢@thomthom 的提示,我在这里为您重现了这个问题。我的 Sketchup 文件看起来像 this:
我正在运行 Sketchup 版本 17.2.2554。
然后我去文件->导出->3D模型
选择格式“COLLADA 文件 (*.dae)”
单击“选项”并选中“导出两侧面”和“三角化所有面”
选择保存文件的位置
这会写入一个 collada .dae 文件。它只有 8 个面孔,所以我将在此处发布 .dae,以便您自己查看:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
<contributor>
<authoring_tool>SketchUp 17.2.2554</authoring_tool>
</contributor>
<created>2017-05-31T19:42:02Z</created>
<modified>2017-05-31T19:42:02Z</modified>
<unit meter="0.0254000" name="inch" />
<up_axis>Z_UP</up_axis>
</asset>
<library_cameras>
<camera id="ID1" name="skp_camera_Last_Saved_SketchUp_View">
<optics>
<technique_common>
<perspective>
<yfov>35.0000000</yfov>
<aspect_ratio>0.0000000</aspect_ratio>
<znear>1.0000000</znear>
<zfar>1000.0000000</zfar>
</perspective>
</technique_common>
</optics>
</camera>
</library_cameras>
<library_visual_scenes>
<visual_scene id="ID2">
<node name="SketchUp">
<instance_geometry url="#ID3">
<bind_material>
<technique_common>
<instance_material symbol="Material2" target="#ID5">
<bind_vertex_input semantic="UVSET0" input_semantic="TEXCOORD" input_set="0" />
</instance_material>
<instance_material symbol="Material3" target="#ID10">
<bind_vertex_input semantic="UVSET0" input_semantic="TEXCOORD" input_set="0" />
</instance_material>
</technique_common>
</bind_material>
</instance_geometry>
<node name="skp_camera_Last_Saved_SketchUp_View">
<matrix>0.9857500 0.0094434 0.1679518 330.2823181 0.1682171 -0.0553379 -0.9841955 -862.0587769 0.0000000 0.9984230 -0.0561379 109.0382767 0.0000000 0.0000000 0.0000000 1.0000000</matrix>
<instance_camera url="#ID1" />
</node>
</node>
</visual_scene>
</library_visual_scenes>
<library_geometries>
<geometry id="ID3">
<mesh>
<source id="ID6">
<float_array id="ID11" count="60">318.7783345 0.0000000 0.0000000 240.0381770 -0.0000000 118.1102362 0.0000000 0.0000000 0.0000000 318.7783345 0.0000000 196.8503937 240.0381770 0.0000000 196.8503937 159.3891673 0.0000000 196.8503937 80.6490098 0.0000000 118.1102362 159.3891673 0.0000000 118.1102362 80.6490098 0.0000000 196.8503937 0.0000000 0.0000000 118.1102362 80.6490098 0.0000000 118.1102362 159.3891673 0.0000000 118.1102362 0.0000000 0.0000000 118.1102362 240.0381770 -0.0000000 118.1102362 0.0000000 0.0000000 0.0000000 80.6490098 0.0000000 196.8503937 159.3891673 0.0000000 196.8503937 240.0381770 0.0000000 196.8503937 318.7783345 0.0000000 196.8503937 318.7783345 0.0000000 0.0000000</float_array>
<technique_common>
<accessor count="20" source="#ID11" stride="3">
<param name="X" type="float" />
<param name="Y" type="float" />
<param name="Z" type="float" />
</accessor>
</technique_common>
</source>
<source id="ID7">
<float_array id="ID12" count="60">0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 -0.0000000 1.0000000 -0.0000000 -0.0000000 1.0000000 -0.0000000 -0.0000000 1.0000000 -0.0000000 -0.0000000 1.0000000 -0.0000000 -0.0000000 1.0000000 -0.0000000 -0.0000000 1.0000000 -0.0000000 -0.0000000 1.0000000 -0.0000000 -0.0000000 1.0000000 -0.0000000 -0.0000000 1.0000000 -0.0000000 -0.0000000 1.0000000 -0.0000000</float_array>
<technique_common>
<accessor count="20" source="#ID12" stride="3">
<param name="X" type="float" />
<param name="Y" type="float" />
<param name="Z" type="float" />
</accessor>
</technique_common>
</source>
<vertices id="ID8">
<input semantic="POSITION" source="#ID6" />
<input semantic="NORMAL" source="#ID7" />
</vertices>
<triangles count="8" material="Material2">
<input offset="0" semantic="VERTEX" source="#ID8" />
<p>0 1 2 1 0 3 1 3 4 5 6 7 6 5 8 2 7 9 7 2 1 9 7 6</p>
</triangles>
<triangles count="8" material="Material3">
<input offset="0" semantic="VERTEX" source="#ID8" />
<p>10 11 12 13 14 11 12 11 14 15 16 10 11 10 16 17 18 13 18 19 13 14 13 19</p>
</triangles>
</mesh>
</geometry>
</library_geometries>
<library_materials>
<material id="ID5" name="material">
<instance_effect url="#ID4" />
</material>
<material id="ID10" name="material_0">
<instance_effect url="#ID9" />
</material>
</library_materials>
<library_effects>
<effect id="ID4">
<profile_COMMON>
<technique sid="COMMON">
<lambert>
<diffuse>
<color>1.0000000 1.0000000 1.0000000 1.0000000</color>
</diffuse>
</lambert>
</technique>
</profile_COMMON>
</effect>
<effect id="ID9">
<profile_COMMON>
<technique sid="COMMON">
<lambert>
<diffuse>
<color>0.6431373 0.6980392 0.7333333 1.0000000</color>
</diffuse>
</lambert>
</technique>
</profile_COMMON>
</effect>
</library_effects>
<scene>
<instance_visual_scene url="#ID2" />
</scene>
</COLLADA>
您可以看到 collada 输出有 8 个三角形,而有问题的三角形位于该行中描述的索引 5 处:
<triangles count="8" material="Material2">
<input offset="0" semantic="VERTEX" source="#ID8" />
<p>0 1 2 1 0 3 1 3 4 5 6 7 6 5 8 2 7 9 7 2 1 9 7 6</p>
^^^^^
Tri 5
</triangles>
这是指顶点 2、7、9,它们是:
2: 0.0000000 0.0000000 0.0000000
7: 159.3891673 0.0000000 118.1102362
9: 0.0000000 0.0000000 118.1102362
乘以英寸到米的比例因子 0.0254000 得出:
0, 0, 0
4, 0, 3
0, 0, 3
我们看到三角形索引 3 具有顶点 5,6 和 7,当与顶点信息交叉引用时会给出:
5: 159.44 0.00 196.85
6: 80.70 0.00 118.11
7: 159.44 0.00 118.11
乘以英寸到米的比例因子 0.0254000 得出:
4, 0, 5
2, 0, 3
4, 0, 3
当你把它们画出来时,它们看起来像this:
如您所见,这两个三角形与我的第一个图表中的相似,而不是第二个。三角形 5 有一个与三角形 3 和相邻的面和一个空面。
所以这可能是 Sketchup 中的一个错误,但它仍然不能帮助我解决寻找边界的问题。
感谢您的宝贵时间。