Jump to content

マニュアル:3D印刷のためのモデルの準備

From FreeCAD Documentation
This is the approved revision of this page, as well as being the most recent.

FreeCADの主な目的の1つは、実際の製品に変換できるオブジェクトの設計です。これらの設計データーは工場に共有して製造することもできますし、最近ではhttps://ja.wikipedia.org/wiki/3D%E3%83%97%E3%83%AA%E3%83%B3%E3%82%BF%E3%83%BCコンピューター数値制御フライス盤などに直接送って自動的に製品を製造することもできます。FreeCADを使えば、さまざまな製造方法に対応した正確で詳細なモデルをすぐい作成できるのです。この章では、あなたが他の人と共同作業しているのか一人で全ての作業をしているのかによらず、これらの製造方法にに適した仕様を満たすモデルを作成するために必要な手順について説明します。

注意深くモデリングすれば、3D印刷時の課題の多くは事前に回避できます。特に注意すべき点は下記の通りです。

  • 設計したオブジェクトがソリッドであること:実際の部品と同じように、3Dモデルもソリッド(物理的に閉じた形状)である必要があります。FreeCAD、特にパートデザインワークベンチを使うと、設計工程を通じてモデルがソリッドであることを確認できます。もしソリッド性を損なう操作をした場合、そのことを通知してくれます。さらに、パートワークベンチの 幾何形状のチェックツールを使うと、3D印刷で問題になり得る欠陥や問題を特定することができます。
  • 寸法の正確性を確認する:FreeCAD上のデーターがそのまま実際の製品に反映されるため、長さの精度は非常に重要です。FreeCAD上の1ミリメートルは、製品上でも1ミリメートルです。したがって、全ての寸法を慎重に設定し、検証して精度を保つ必要があります。
  • 製造誤差の管理:どんな3DプリンターやCNCフライス盤でもFreeCADのデーターを直接扱えるわけではないことに留意することが重要です。これらの機械は、Gコードと呼ばれる機械言語を使っています。Gコードには、機種やメーカーによってさまざまの方言があります。多くの場合、モデルをGコードに変換する工程ではスライサーと呼ばれるソフトウェアを使いますが、さらに詳細をコントロールするために、手動で行うことも可能です。いずれにしても、この変換の過程、特にモデルを印刷のためのメッシュ形式に変換する際に詳細や品質が一定程度失われてしまうことは避けられません。この誤差が最終的な製品の機能や外観に影響しない許容範囲内に収まるようにする必要があります。
  • エクスポート形式の互換性:3D印刷ではSTLファイルがよく使われますが、この形式ではモデルを三角形のメッシュで表現するため、一定の詳細が失われてしまいます。したがって、どこまで詳細を保存するのかとファイルサイズのバランスをとって、エクスポート時に適切な解像度を設定することが重要です。また、CNC加工では、STLよりも元のデザインの幾何学的整合性を維持できるSTEPまたはIGSの方が望ましい形式です。Gコードに変換する際に精度が維持される適切なファイル形式を選択することが重要です。
  • メッシュ解析と調整:スライサーやCNCツールパス生成プログラムにデーターをエクスポートする前に、FreeCADのメッシュワークベンチのメッシュ解析を実施し、不規則な形状や非マニフォールドエッジ、その他製造を難しくする可能性のある問題を検出することを推奨します。モデルが完璧であったとしても、さらに3DプリンターやCNC加工機が正しく調整されているか(例えば、ベッドレベリング、ステッパーモーター設定、エクストルーダー設定など)を確認し、最終製品の品質問題を回避する必要があります。

以下では、既にモデルのソリッド性や寸法に注意してモデルを作成したものとして、3D印刷やCNC加工で必要なモデルの品質を維持できるよう、どのようにGコードへの変換を行ったらいいのかについて考察します。これらについて注意することで、FreeCADモデルから直接物理的なオブジェクトを正しく製造する準備が整います。

スライサーへのエクスポート

3Dモデルから印刷の準備をする最も一般的な方法は、3Dオブジェクトをスライサーと呼ばれる専用ソフトウェアにエクスポートすることです。スライサーは、モデルを薄い層に切り分け(スライスし)Gコードを生成します。プリンターは、それを1層1層積み上げることでオブジェクトを製造します。多くの3Dプリンター、特に自作されたものやホビー向けのものには独自の校正があるため、スライサーソフトウェアは幅広い高度な設定機能を持っています。これらの設定を通じて、層の高さ、印刷スピード、インフィルの密度、サポートの構造などの重要なパラメタを調整し、特定のプリンターの機能や性能に合わせて確実に調整されたGコードが生成されます。

多くのスライサーは、印刷プロセスを事前に確認するためのシミュレーションや印刷検証機能を提供しており、非常に役立ちます。各層で印刷がどのようなパスで行われるのかを見ることができるので、サポートが必要なオーバーハングや冷却が不十分な場所など、潜在的な問題を検出するのに役立ちます。この印刷前の検証により、印刷開始前にモデルが適切に準備されており、印刷失敗や材料の無駄遣いを避けられます。

推定印刷時間やフィラメントやレジン量、それに基づく印刷コストなどを表示する機能などを持っているスライサーは少なくありません。これら印刷プロセスに関する情報をもとに、効率や材料の節約のために設定を調整することができます。3D印刷の詳細な技術、例えば機械のキャリブレーション、材料選定、後処理などは本ガイドの範囲外ですが、ここではFreeCADモデルを適切にエクスポートし、スライサーソフトウェアを使って特定のプリンターに最適化された正しいGコードをどのように出力すればいいのかについて焦点を当てます。

オブジェクトのメッシュへの変換

現在利用可能なスライサーは、それもFreeCADのソリッド図形を直接には受け付けません。CuraやPrusaSlicerといったスライサーは、オブジェクトの表面を三角形を組み合わせて表現する、STL、OBJ、3MFといったmeshベースのファイル形式しか扱えません。したがって、まず最初にFreeCADで作成したモデルを、スライサーが解釈できるメッシュフォーマットに変換する必要があります。 (訳注:PrusaSlicerなどの多くのスライサーはSTEPファイルを読み込むことができるようになっており、この部分の記述は古くなっている。したがって、この節は翻訳しない)

The most commonly used format for 3D printing is STL. One reason STL is preferred is its simplicity—it represents the 3D geometry as a mesh of triangles without including complex details like colors, materials, or textures. This minimalistic approach ensures that STL files are lightweight and compatible with virtually all slicers and 3D printers, making it the industry standard. While OBJ and 3MF are also supported, they can carry additional information like textures and materials, which is unnecessary for most 3D printing tasks and can complicate the slicing process.

Fortunately, converting a solid object to a mesh in FreeCAD is straightforward, even though converting a mesh back into a solid is a more complicated operation. During the conversion process, it is crucial to keep in mind that some degradation of the model’s quality may occur, especially when reducing complex geometry to a simple triangular mesh. You must ensure that this degradation remains within acceptable limits to maintain the accuracy of your printed object.

In FreeCAD, the Mesh Workbench handles all mesh-related tasks. This workbench contains tools not only for converting between Part and Mesh objects but also for analyzing and repairing meshes. While mesh manipulation isn’t the primary focus of FreeCAD, it becomes essential when preparing models for 3D printing. Mesh objects are widely used in other applications, and the Mesh Workbench allows you to fully manage and adjust these objects, ensuring they are ready for the next step in the printing process.

  • Let's convert the Lego piece we created in the last chapter into an STL mesh. The geometry can be downloaded at the end of said chapter.
  • Open the FreeCAD file containing the Lego piece.
  • Switch to the Mesh Workbench
  • Select the Lego brick
  • Select menu Meshes → Create Mesh from Shape
  • A task panel will open with several options. Some additional meshing algorithms (Mefisto or Netgen) might not be available, depending on how your version of FreeCAD was compiled. The Standard meshing algorithm will always be present. It offers fewer possibilities than the two others, but is totally sufficient for small objects that fit into the maximum print size of a 3D printer.

  • Select the Standard mesher, and leave the deviation value to the default value of 0.10. Press Ok.
  • A mesh object will be created, exactly on top of our solid object. Either hide the solid or move one of the objects aside, so you can compare both.
  • Change the View → Display Mode property of the new mesh object to Flat Lines, in order to see how the triangulation occurred.
  • If you are not happy, and think that the result is too coarse, you can repeat the operation, lowering the deviation value. In the example below, the left mesh used the default value of 0.10, while the right one uses 0.01:

In most cases, though, the default values will give a satisfying result.

  • We can now export our mesh to a mesh format, such as STL, which is currently the most widely used format in 3D printing, by using menu File → Export and choosing the STL file format.

In FreeCAD, the Mesh Workbench provides several algorithms for converting a solid model into a mesh, including Standard, Mefisto, Netgen, and Gmsh. The Standard algorithm is commonly used for small to medium-sized objects as it provides a balance between speed and mesh quality. When creating a mesh, two critical parameters are the surface deviation and angular deviation. Surface deviation controls how closely the mesh follows the original geometry, with smaller values providing a finer, more accurate mesh but potentially leading to larger file sizes. Angular deviation defines how much deviation is allowed based on changes in the model's angles, particularly for curves and sharp edges. Other options like relative surface deviation allow you to adjust the precision dynamically based on the model's scale, and features like applying face colors or defining mesh segments by color are useful for advanced rendering or grouping different regions of the model. Once the mesh is generated, it can be exported in formats like STL, OBJ, or 3MF, which are essential for preparing models for 3D printing. Mesh quality is crucial for ensuring that 3D printers interpret the model correctly, so selecting the right meshing algorithm and deviation settings can significantly affect the final print outcome.

PrusaSlicerを使う

PrusaSlicerは、STL、OBJ、3MFファイルを、3Dプリンターに直接送れるGコードに変換するためのアプリケーションです。FreeCADと同じく、自由でオープンソースのソフトウェアであり、Windows、macOS、Linux上で動作します。Prusa Research社によって開発されPrusa社のプリンター向けに最適化されていますが、PrusaSlicerはほとんど全ての3Dプリンターと互換性があり、さまざまな機種で利用することができます。PrusaSlicerはSlic3rというスライサーを基にしていますが、大幅な改善と頻繁なアップデートが行われていあす。Slic3rはもはや積極的には更新されていませんが、PrusaSlicerは進化し続けており、適応型レイヤー高さ調整、ツリー型サポート、印刷戦略の改善などの新しい機能が追加され続けています。

3D印刷のためにスライサーを正しく設定するのは、対象となる3Dプリンターの機能・性能をきちんと理解していることが前提となる複雑なプロセスです。あるプリンター向けに設定したスライサーを、この知識に基づいて適切に設定し直さないままGコードを生成すると、別のプリンターではうまく動かないファイルになってしまいます。PrusaSlicerは、STLファイルから正しくGコードに変換され印刷できるのかを事前に検証する素晴らしい機能を持っています。PrusaSlicerのシミュレーション機能を使うと、Gコードに基づくプリンターの動作をプレビューし、実際の印刷の前に深刻な問題がないことを確認できます。

これは、エクスポートしたSTLファイルをPrusaSlicerで開いたところです。単にスライスボタンを押すだけで、スライサーはモデルを複数の層に分解し、3Dプリンターのヘッドのパスを生成し、必要なスピードと温度を設定します。インフィル、サポート、外周を計算し、プリンターが必要とする詳細の命令を含むGコードを生成します。スライスされたモデルの各層をプレビューし、想定印刷時間と必要フィラメント量を確認できます。そのうえで、実際のプリントのためにGコードをセーブしたりプリンターに送信することができます。

PrusaSlicer以外にも、3D印刷で使えるスライサーソフトウェアの選択肢があります。Ultimaker社製のCuraは、幅広いプリンターと互換性があり、広範囲なカスタマイズの可能な、最も人気のあるオープンソースのスライサーの1つです。Simplify3Dは、先進的な機能と効率的なパスを生成することで知られる専有ソフトウェアです。MatterControlは、簡易CADツールを含むオープンソースのスライサーです。Raise3D社製のIdeaMakerは、適応型レイヤー高さ調整の機能とユーザーフレンドリーなインタフェースを持つスライサーです。最後に、PrusaSlicerとBambu Studioを基にした新しいオープンソースのスライサーであるOrcaSlicerは、さまざまの機種向けの追加機能を提供しています。それぞれのスライサーにはそれぞれ特徴があり、利用しているプリンターや印刷要件によって最適な選択は変わります。

Gコード生成

The CAM Workbench in FreeCAD provides advanced options for generating G-code directly for CNC machines, offering greater flexibility and control compared to automatic slicing tools like those used for 3D printing. While 3D printing slicers can automatically convert a model into G-code with minimal input, CNC milling requires much more user involvement to ensure precise control over the toolpaths, speeds, depths, and other machining parameters. This makes the CAM Workbench essential for tasks that demand fine-tuned G-code, particularly for CNC milling, where machine complexity and the variety of operations (like cutting, drilling, and contouring) require careful planning.

In the CAM Workbench, G-code path generation is highly customizable. It features tools to generate complete machine paths for various operations, or, alternatively, you can build partial G-code segments and assemble them into a full milling operation. This modular approach allows you to tailor each step of the machining process, optimizing the toolpaths for efficiency, material type, and specific machine capabilities.

The CAM process is indeed much more intricate than 3D printing because CNC machines use different tools and must account for material removal, tool geometry, and safety margins, all of which are configured manually. In FreeCAD, building a simple CAM project requires defining toolpaths, adjusting cutting depths, selecting appropriate tools, and configuring work offsets, feeds, and speeds. Unlike slicer software, which handles most of this automatically, the CAM Workbench places the control in your hands, making it highly customizable but also more complex.

Though generating CNC milling paths is a topic too broad to cover in detail here, we’ll demonstrate how to create a simple CAM project in FreeCAD. While we won’t focus on every detail of real-world CNC machining, this guide will introduce you to the essential steps, emphasizing the level of input required to ensure accurate and efficient results. This added complexity is essential for CNC projects, where precision and customizability are critical to achieving desired machining outcomes.

  • Load the file containing our Lego piece, and switch to the CAM Workbench.
  • Press on the Job button and select our lego piece.
  • Since this section doesn’t aim to provide an in-depth tutorial of the CAM Workbench, we will be using the default values. If you would like a more detailed tutorial, please refer to CAM walk-through. Keep in mind that in the CAM Workbench, a stock body is automatically created around your object, representing the raw material that will be machined. Right now, this stock body extends 1 mm in all directions from the object.

  • The first step is to remove the unnecessary material from around our object. At this stage, we’re starting with a solid block of raw material, and we need to carve out the Lego brick from this block. This process involves defining the toolpaths that will gradually cut away the excess material, leaving behind the desired shape of the Lego.
  • The following image shows the FreeCAD CAM Workbench setup for machining a Lego block. The model tree includes solid modeling operations like Pad, Pocket, and LinearPattern, which were used to shape the part. A Job is created, containing toolpaths under Operations that define how the material will be removed from the Stock. The Default Tool is selected for machining, and the Model-Body represents the 3D part being worked on. This setup prepares the object for generating G-code to control the CNC machine.

  • Before we begin cutting away the excess material, let's make some adjustments to the milling tool that will be used. Although the CAM Workbench allows you to define custom tools, for simplicity, we will modify the default tool. This will ensure the settings are optimized for our project without needing to create a new tool from scratch.
  • Click on the TC:Default Tool text. This will open up the Tool Controller Editor. Change the feed rates and spindle velocities as shown in the picture. The feed rates for horizontal and vertical cutting are set to 2000 mm/min, while the spindle speed is set to 2000 RPM with forward rotation. These settings control the movement and cutting speed of the tool during the machining process.

  • Double-click on the tool itself and change its diameter to 1mm.
  • Now we are ready to begin removing the excess material from the block, gradually carving out the Lego geometry. This process will involve the toolpaths we set, ensuring the final shape matches the intended design.
  • Click on the Profile. This option is used to carve out the unnecessary material around the perimeter of the part, effectively shaping the outer boundaries to achieve the general dimensions of the Lego piece.
  • Normally you will not have to change any of the default values, except the Extra Offset located in the Operation tab. Set this option to 1 mm to ensure that the remaining object corresponds correctly to the Lego's boundaries.
  • Once you press apply you should be able to see those green lines around the object. Those lines visualize the path our cutting object will follow when cutting the initial block.

  • Our next step is to create the 6 extruding cylinders on the top of the Lego block.
  • Choose the top face and click on the Pocket Shape button. On the Extensions tab, enable Extensions and click on the edge of the top face (it should normally be automatically added in the default length box.
  • Finally, on the Operation tab input -1.5 mm in the Pass Extension box and change the pattern option to a ZigZagOffset.
  • Press apply and then close the tab.
  • In a similar manner we can create the three cylinders on the bottom of the Lego piece.
  • We can easily visualize the steps followed during the milling of the object by using the SimulatorGL option.

ダウンロード

参考情報

解説動画