24/7 Customer Service (800) 927-7671

Learn ShapeJS: Volume Pattern Ring

by • April 10, 2016 • No Comments

For this week’s post we can turn it into a ring based on volumetric patterns. In the system
we can learn of blending in boolean operations and how to manufacture wearable 3D jewelry. So initially up, a photo to get you inspired!

The basic thought of this script is to cut a ring out of a volume containing an informative
3D pattern. We learned of VolumePatterns in our ToothBrush Holder posting. These patterns fill the create space with a controllable pattern generator. We can and so use a few effortless boolean operations to manufacture a ring. We’ll cut the space with two cylinders. The initially cylinder is the outer edge of the ring. The 2nd can be the inner edge of the ring. Choosing a Gyroid pattern we get the next starting pattern:

Here is the code, the cylinder ocutter cuts the space for the outer ring, the icutter cuts it for the inner ring. The sides are and so cut via 2 cutting planes.

 var ocutter = new Cylinder(new Vector3d(0,-10*CM,0), new Vector3d(0,10*CM,0),dimensions+pattern_thick); var icutter = new Cylinder(new Vector3d(0,-10*CM,0), new Vector3d(0,10*CM,0),dimensions); var cutter = new Subtraction(ocutter,icutter); var body = Intersection(gyroid, cutter); outcome = body; var fplane = new Plane(new Vector3d(0,-1,0),new Vector3d(0,width/2,0)); var bplane = new Plane(new Vector3d(0,1,0),new Vector3d(0,-width/2,0)); outcome = new Subtraction(outcome,fplane); outcome = new Subtraction(outcome,bplane); s = ringSizeToRadius(16) + 6*MM; var scene = Scene(outcome, new Bounds(-s,s,-s,s,-s,s)); return scene; 

One thing you can notice is the pattern has a few sharp edges. An issue with jewelry and rings in particular is they require
to wear well. No-one is going to like wearing a metal ring with sharp edges. In this example we use two techniques to manufacture the rings additional effortless. The initially is to provide a liner in the ring that
separates the potentially sharp pattern edges of your finger. By via a cylinder as a liner we a get a known pleasing shape that
is effortless to match with the requested ring dimensions. This code shows the addition of the liner by adding another cylinder within. The thickness of the band is specified in the band_thick variable.

 var ocutter = new Cylinder(new Vector3d(0,-10*CM,0), new Vector3d(0,10*CM,0),dimensions+pattern_thick+band_thick); var icutter = new Cylinder(new Vector3d(0,-10*CM,0), new Vector3d(0,10*CM,0),dimensions+band_thick); var cutter = new Subtraction(ocutter,icutter); var body = Intersection(gyroid, cutter); outcome = body; if (band_thick > 0) { var oliner = new Cylinder(new Vector3d(0,-10*CM,0), new Vector3d(0,10*CM,0),dimensions+band_thick); var iliner = new Cylinder(new Vector3d(0,-10*CM,0), new Vector3d(0,10*CM,0),dimensions); var liner = new Subtraction(oliner,iliner); outcome = new Union(outcome,liner); } var fplane = new Plane(new Vector3d(0,-1,0),new Vector3d(0,width/2,0)); var bplane = new Plane(new Vector3d(0,1,0),new Vector3d(0,-width/2,0)); outcome = new Subtraction(outcome,fplane); outcome = new Subtraction(outcome,bplane); s = ringSizeToRadius(16) + 6*MM; // Hardcode to show dimensionss alters advantageous var scene = Scene(outcome, new Bounds(-s,s,-s,s,-s,s)); scene.setVoxelSize(0.05*MM); return scene; 

The outcome appears like this:

This is advantageous, but it yet contains a few sharp edges around the pattern. The 2nd technique is to use a blend on the boolean combination operations. The default operation of booleans such as a Union, Intersection or Subtraction to combine datasources typically turn it into complex edges. Notice how the liner and pattern seem quite distinct. A blend allows for you to smooth out these transitions. All booleans have a setBlend method you can use to blend the outcomes together. The parameter is in physical units that represents the distance to smooth over. The larger the distance the additional smoothing. Here is our ring now with a few blending applied.

High Search Space Scripts

I classify these scripts as high search space scripts. There are a lot of non printable and non informative
rings,but buried within are a few real gems. This can be fun but it does manufacture it challenging if you want to expose this type of creator to novice users. ShapeJS can have additional tools soon that
can assist with the printability aspects. For the aesthetics, maybe we can use a few of the new deep learning algorithms to assist us know what appears great. I’m considering
of a user interface that
shows you a bunch of random rings, you swipe Tinder fashion to rate them. It and so uses these to train a recognizer of your fashion. So it presents you news rings that
are additional most likely to your tastes. Likely a pipe dream already but may be a fewthing in the next. For now we can have to expect the user is interested adequate
to play with the script and find informative
patterns on their own.

Take a appear at the Pattern tab on the final creator here:

This tab has several parameters on the market to travel through the create space. The Period,Thickness and Height parameters control the overall pattern. The Location and Rotation params move the ring geometry to various areas in the pattern. Consider this like driving the pattern around to find the right parking space. The last parameter, Blend let’s you alter the amount of blending that
’s utilized
. This alters the overall appear a fair bit and can in addition
be utilized
to get around a few wallthickness issues to remove or thicken tiny pieces.

A few additional pictures to wet your appetite. This is a close up of a printed piece:

And this is a montage of a few various parameter settings. I quite
like the range of various patterns you can get of this script.

I introduced this creator to the ShapeJS Examples page, you can find the accomplished script here: VolumePattern Example.


Latest posts
test

by admin • March 5, 2017