SSブログ

Blender extrusion gotcha [技術]

I have been using Blender as a 3D CAD tool to design objects for a few weeks now. My goal is to output them using a 3D printer. Since I am a programmer, I do everything with Python so far. Blender has Python interpreter embedded.

Here is a tip about extrusion.

If I extrude a face with many vertices along Z axis to upwards/positive side, all the faces may have normals directed toward inside the object. Because of this inverted faces, if I export the result as STL, the object does not appear like a solid from outside. It looks as if faces appear transparent from certain angles.

BadExtrusion.png
(Click the image to see the video.)

In order to confirm the direction of normals,
  1. Select the target object.
  2. Change to "Edit Mode".
  3. Click the "v" button to the right of the "Show Overlays" button at the upper right corner.
  4. Click "Display Normals" at the bottom of the menu.
Colored sticks will indicate the direction of normals at the center of all faces of the object.

Normals directed toward outside (good)
BlenderNormalDirections1.png

Normals directed toward inside (bad)
BlenderNormalDirections2.png

To fix the direction of normals, I initially tried to flip all faces after creating the object, but it did not work well. So instead I changed the direction of extrusion to downwards/negative side along Z axis. The normals are toward outside now, and it fixed the issue in the STL output. STL preview appears exactly like the object I created in Blender.

That said, I still do not understand how Blender determines the direction of normals. So, if it fails, extrude the object to the other direction.

It did not happen in FreeCAD though. The normals are directed toward outside in FreeCAD regardless of the direction of extrusion. Therefore, I did not notice that faces had directions in FreeCAD. STL output was just fine from the beginning! Also, Flashprint app can handle STL generated by FreeCAD much better than STL generated by Blender.
nice!(0)  コメント(0) 
共通テーマ:日記・雑感

nice! 0

コメント 0

コメントを書く

お名前:
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。

※ブログオーナーが承認したコメントのみ表示されます。

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。