天天看點

使用JavaScript和OpenJSCAD建立用于3D列印的精确3D模型

I have this 3D Printed Spool Holder on the top of my Printrbot Simple Metal 3D Printerl that looks like this:

我在Printrbot Simple Metal 3D Printerl的頂部有一個3D列印的線軸支架,如下所示:

It works great and fits my RioRand generic PLA Filament spool exactly. However, I went down to Fry's Electronics to get some filament today and all they had was small Makerbot spools. They were cheap, so I got two. When I got home I noticed that the hole in the spool is HUGE. It totally won't fit my spool holder.

它的工作原理非常好,非常适合我的RioRand通用PLA細絲閥芯。 但是,我今天去弗萊電子公司(Fry's Electronics)買了一些燈絲,它們隻有小的Makerbot線軸。 它們很便宜,是以我有兩個。 當我回到家時,我注意到線軸上的Kong很大。 完全不适合我的線軸支架。

This brings us to..

這把我們帶到了..

3D列印的三個規則 (The Three Rules of 3D Printing)

  1. All problems in 3D Printing can be solved by 3D Printing something

    3D列印中的所有問題都可以通過3D列印解決

  2. The only things that 3D Printing people print is stuff to make their 3D printers work better.

    3D列印人員列印的唯一内容是使3D列印機更好地工作的東西。

  3. See rules 1 and 2.

    參見規則1和2。

So, I needed an adapter for my 3D Printer (which I have nearly a week of experience with, so fear me) and opened up Tinkercad.com to create it. Someone recommended Tinkercad as a great HTML5 website for doing quick designs.

是以,我需要為我的3D列印機安裝擴充卡(我有将近一周的經驗,是以請擔心),并打開Tinkercad.com進行建立。 有人推薦Tinkercad作為進行快速設計的出色HTML5網站。

使用JavaScript和OpenJSCAD建立用于3D列印的精确3D模型

I got lost in this app. I couldn't find a way to make two cylinders and simply center them within each other. You can nudge them around but can't center them against their own centers. I actually found forum posts going back to 2012 with members of the team saying "yes, we need that feature" but couldn't figure it out. It's a lovely app and my kids enjoy it but I feel like if you want absolute precision this may not be the place. Then I realized that perhaps this 3D Model was more of a math problem than a modeling problem.

我迷上了這個應用程式。 我無法找到一種方法來制造兩個圓柱體,并将它們簡單地居中放置。 您可以将它們微移,但不能将它們相對于自己的中心居中。 我實際上發現論壇文章可以追溯到2012年,團隊成員說:“是的,我們需要該功能”,但無法弄清楚。 這是一個可愛的應用程式,我的孩子們喜歡它,但是我覺得如果您想要絕對的精度,那麼可能不适合。 然後我意識到,也許這個3D模型更多是數學問題,而不是模組化問題。

Now I realize I'm biased, and I am a programmer, but with a small set of digital calipers and the excellent OpenJSCAD documentation I was able to create my adapter in just 10 minutes of hacking and just 7 to 12 lines of JavaScript (depending on how you count).

現在,我意識到自己有偏見,并且我是一名程式員,但是通過一小組數字卡尺和出色的OpenJSCAD文檔,我能夠在僅10分鐘的黑客攻擊和僅7到12行JavaScript中建立我的擴充卡(取決于關于如何計算)。

From here I downloaded my STL (the 3D description of the object)...

從這裡我下載下傳了STL(對象的3D描述)...

使用JavaScript和OpenJSCAD建立用于3D列印的精确3D模型

I then ran it through the Microsoft 3D Model Repair Service (a good idea to make sure all your designs are manifold and watertight).

然後,我通過Microsoft 3D模型修複服務來運作它(一個很好的主意,以確定您的所有設計都是流線型和防水的)。

使用JavaScript和OpenJSCAD建立用于3D列印的精确3D模型

Then into Repetier and sliced into G-Code (instructions to the printer on how to move) and printed it with OctoPrint on my OctoPi.

然後進入Repetier并切成G代碼(有關如何移動列印機的說明),并在OctoPi上使用OctoPrint将其列印出來。

使用JavaScript和OpenJSCAD建立用于3D列印的精确3D模型

I'm clearly not a 3D designer or modeler and I apparently don't have the patience for CAD tools that won't let me type in a direct number. I KNOW this should be 31mm in diameter, don't force me to use a mouse to "eyeball it." I was thoroughly impressed with the concept and execution of OpenJSCAD. Of course, OpenJSCAD is a JavaScript implementation of OpenSCAD, the "Programmers Solid 3D CAD Modeler" so I'll be exploring their software and amazing gallery as well! If you're creating anything with regularity that's more mechanical and less organic, OpenJSCAD or OpenSCAD is the way to go, clearly.

我顯然不是3D設計師或模組化者,而且我顯然對CAD工具沒有耐心,因為我不允許我輸入直接數字。 我知道這應該是31毫米的直徑,請不要強迫我用滑鼠“盯着它”。 我對OpenJSCAD的概念和執行印象深刻。 當然,OpenJSCAD是OpenSCADJavaScript實作, OpenSCAD是“程式員Solid 3D CAD模組化器”,是以我還将探索其軟體和令人驚歎的圖庫! 如果您要建立規則性更高,機械性更差的東西,那麼顯然可以使用OpenJSCAD或OpenSCAD。

Sponsor: Big thanks to Amyuni for sponsoring the feed this week! Amyuni PDF Converter and Creator for .NET enables you to integrate powerful PDF functionality with just a few lines of code. Generate and process optimized PDFs with industry proven technology.

Switch Now!

贊助商:非常感謝Amyuni本周贊助了feed! 用于.NET的Amyuni PDF Converter and Creator使您僅需幾行代碼即可內建強大的PDF功能。 使用行業公認的技術生成和處理優化的PDF。

立即切換!
翻譯自: https://www.hanselman.com/blog/creating-exact-3d-models-for-3d-printing-with-javascript-and-openjscad