24/7 Customer Service (800) 927-7671

Learn ShapeJS: Toothbrush Holder

by • March 27, 2016 • No Comments

For this weeks project we are going to learn a new designing technique, have a few fun with volumetric patterns and and so apply these to manufacture a toothbrush holder.

Last week we talked of via 2D imagery as way to turn it into 3D data. We’re going to reuse that
technique here but in a various way. In traditional 3D designing one of the initially designing technique you learn is called a surface of revolution. If you’ve at any time played on a pottery wheel or lathe and so you’ve seen this technique. Basically you take a profile and turn it around a circle to manufacture a solid. Here we can reuse the Image3D datasource to read in a user provided profile. We’ll and so use the RingWrap transformation to revolve that
profile around a circle.

Let’s take a appear at an example. This is the profile we can use for the toothbrush holder. For my create I wanted a solid bottom with curved in sides. The profile you see here is all but one half of the object we want. In your mind just reflect the image to the left to imagine what the finished design can appear like.

Here is the solid turn it intod of that
profile:

One significant concept in 3D printing is wall thickness. Depending on the durablity
of the material you may need
thicker walls. The thickness of your lines(StrokeWidth in a few software) determines how much material your walls can contain. For now we won’t go too deeply into wall thickness but I wanted you to realize that
you may alter this based on how thick you manufacture your lines.

The ShapeJS code to turn it into this profile appears like this:



function manufactureShell(profilePath, width, height, voxelSize, blend){

var radius = width/2;

var boxDepth = 2*Math.PI*radius + blend / 2 + 2 * voxelSize;

var boxWidth = radius;

var boxHeight = height;

var image = loadImage(profilePath);

var grid = image.getGrid();

var expandOp = new ExpandOp(0,3,3,3);

grid = expandOp.execute(grid);

var image = new Image3D(grid, boxWidth, boxHeight, boxDepth, voxelSize);

image.setBaseThickness(0.0);

image.setBaseThreshold(0.5);

image.setUseGrayscale(false);

image.setBlurWidth(2*voxelSize);

var ct = new CompositeTransform();

ct.add(new Rotation(0,1,0, -Math.PI/2));

// align side of the image box with xy plane

ct.add(new Translation(0, 0, -radius/2));

ct.add(new RingWrap(radius));

image.setTransform(ct);

return image;

}

This technique is great for producing a bunch of various objects such as vases, candlesticks, and wine glasses. If you pair this with a effortless sketching interface that
exports an image, you may manufacture a swift authoring tool for producing a few quite
great objects. We’ll return to this thought in a few later postings.

The following concept to cover is a volume filling pattern. These are regular patterns that
fill space infinitely in all directions. They have most
uses, not the very least of that is the skill to

turn a fewthing somehow plain into a fewthing quite
informative
. Let’s appear at what these patterns appear like:

Volume Patterns

The top two patterns are called a Gyroid. The specific showcases
of a Gyroid are informative
but too much additional detail for here. Wikipedia’s entry has additional additional details if your interested: Gyroid. The two specific examples you see here are the same pattern but with the Period alterd. The period parameter determines in what distance the pattern can repeat. So for a gyroid you roughly ponder
of it as how sizeable the holes are. The other parameter is the thickness. Most of these patterns are in theory thin sheets. By adding a thickness parameter we manufacture it possible to donate them volume and donate you control over how much material is utilized
. The 2nd row of pictures contains the SchwarzP and SchwarzD patterns. Over time we can most likely add a few additional informative
patterns.

It is now time to combine both of these techniques to turn it into a 3D printed object. We initially take a user profile to manufacture the basic shape of our object and and so we intersect it with a Gyroid to manufacture

the surface additional informative
. I introduced parameters to assist you control the volume pattern and move the object through the volume space. One other useful control is the Blend parameter. This affects

how round or flat things appear like and quite
alters the feel of the object.

Here are a few examples via various volume patterns and parameters:

Examples

Now that
we have a few great designs being turn it intod of our script its time to begin
printing them. A common practice if you have a 3D printing device is to prototype the print in the cheapest material you have on the market. I have a tiny FDM printing device at home so I select to print it out via that
. Since i just have one printing device extruder I had to use the same material for assists and the main item. After a long session of removing assists I got to hold my initially design. Success! Sadly, the assists left a few tool marks but all in all, I was pleased with my initially design.

FDM Print

In an thoughtl world, I may of createed my object to not need assist material. But that
can be a tough problem. Instead of doing that
I decided to switch materials to the SLS Nylon material offered at Shapeways. The created object sits on a bed of powder while printing so it does not need any assist material. The 2nd design of my print appears like this:

SLS Print

A few create notes of this project. After attempting it out a bit as a real toothbrush holder I’ve decided that
having a top lip may be a quite
great showcase. Depending on how the pattern intersects at the top you can get a few somehow big crevices that the brushes like to fall into. For the final script I introduced a top and bottom rim version that you can use to line the shapes. I decided not to use the bottom rim as I wanted the water of the brushes to flow out.

Top Rim

The last note is I may recommend sealing these prints with a fewthing to store them clean. If the material you use is a fewwhat porous(most are) and so some day you will get toothpaste stuck too it. I applied a coating of Krylon Crystal Clear that is an acrylic coating to seal the material. I’m hoping this manufactures my holder last a long time and manufactures it simpler to clean when need
ed.

That wraps this week’s Learn ShapeJS posting. We covered a lot of ground at present, you learned a new designing technique and delved into the fun world of volume patterns. If you manufacture a fewthing rad with this script please share your experiences in the ShapeJS forums. I approximately forgot! Here is the example script for you play with: ToothBrush Holder


Latest posts
test

by admin • March 5, 2017