Oops...

This website is made for modern browsers. You are seeing this, because your browser is missing a feature or two. Please install the latest update or switch to a modern browser. See you soon.

Create a sliceform

#fabrication #intersection #prototyping

This tutorial builds upon the result from Generate slices from a 3d model in which we created a sliced solid and arranged those slices in one flat layer. To generate a sliceform, we have to create slots for the opposed slices to interlock. It’s assumed that the slices meet at right angles. The result could be fabricated with a CNC machine.

Grasshopper

1

Define initial geometric object

To start, we open the result from the tutorial Generate slices from a 3d model and look for the section curves, which are located at the end of step 3 in the Geometrycontainer. Let’s copy and paste this container and start from here.

Our fabricated model should stand without wobbling and therefore we will trim everything underneath a ground plane. This creates a proper bearing area. We create the ground surface with the component Plane Surfaceand use a domain -100 To 100 as dimensions for each direction. These dimensions just need to be bigger than the dimensions of our model.

2

Trim slices with ground surface

The component Split Brepcan be used to cut the section curves at ground surface (the curves at input B will automatically be converted to Breps). At output R we find the resulting pieces, which are positioned either above or below the ground surface. We need the curves above ground. To find them, we need a criterion that separates the surfaces. Here, we check whether the center point of each surface is above the ground plane.

To compute the center points, we use Areaand find them at output C. Next, we use Deconstructto extract the z-coordinates of each point and check if they are Larger Than0 (assuming that the ground plane is has no altitude). Dispatchwill do the filtering and we find all True cases at output A.

3

Find position of slots in the section surfaces

To create a sliceform, we must calculate where the slices meet. For this, we need two lists; each direction of slices in one. After step 2, each section surface has its own branch and we use Trim Treeto remove the last level. Then we can use Explode Treeto separate both directions.

To solve the intersection for the slices, we use Brep | Brepand we graft one of the inputs to ensure that all surfaces are compared. Of course, not all slices meet and we have to use Clean Treeto remove empty branches that had no intersection event. The component does not do this by default and we need to manually assign True to input E.

To to find a point on the line that was generated by the intersection, we use Point On Curve. This defines the depth of the slots and can be the midpoint, but it does not have to.

4

Create trimming objects for the slots

After finding the position of the slots, we need to set their dimensions. For this, we use a Domain Box. The center of the box will be on the intersection line between the slices and therefore the box needs to expand half of the material thickness into each direction. In this example, we assume that everything was drawn in centimeter and that the material thickness will be 2 mm. This means the boxes will expand 0.1 in each direction. To create a domain from -0.1 to 0.1, we also need to get the Negativevalue. Both values are connected to a Construct Domaincomponent, which will create the domain that we use for the X and Y input of our Domain Box.

When setting the height of the Domain Box, we have to make sure that it reaches from the contact point of the opposed slots to the edge of the material. Also, we need one box oriented in positive z-direction and one in negative. For this, we use Consecutive Domainsand assign False to input A, which will deactivate the values being added to a sum-total. To define the heights, we use a Paneland active Multiline Data. We enter the values -10, 0 and 10 and connect it to input A. The resulting Domains are then connected to the Domain Box as input Z.

5

Cut slots for interlocking

When cutting the slots for the slices to interlock, we need one slot to face upward and the other to face downward. To select the boxes in once direction, we append a List Itemto Domain Box. Then, we add another input +1 via ZUI to select the second direction.

To cut the slots into the slices, we use Trim Solid. Here, we attach one of the branches that holds the section surfaces (from Explode Tree in step 3) to input S and graft this input. At Input T we attach one set of boxes and flatten it. We repeat the same with another Trim Solidcomponent for the other direction.

6

Create a seamless edge for each slice

After creating the slots in the slices, we will inject them into the algorithm from Generate slices from a 3d model to arrange the slices on a single plane for fabrication. Unlike in that tutorial, we now have independent lists and surfaces instead of outline curves. To fix the first, we use Entwineand connect the slices from both directions. After zooming in, we can remove the redundant input.

To convert the surfaces into curves, we attach a Brep Edgescomponent and use Join Curvesto combine the edges at output En into a single curve. To create matching data structures, we need to use Trim Treeto remove 2 levels.

We can then connect the resulting data tree to the Geometrycontainer that we made a copy of in step 1. Also, we could directly connect it to input G of the Orientcomponent at the end of that tutorial. Now we are ready to hand the data to a CNC machineor to add labels with dimensions and slice numbers, which could be engraved.

Get the results

Version Info

  • Rhino 6.31
  • Grasshopper 1.0.0007

Test your skills

In the instructions above, the ground plane was at z = 0. Now it’s your turn to alter the algorithm in a way that we can set the altitude of the trimming plane as a variable parameter.

Hint 1

Set a parameter for the horizontal plane

The modifications that need to be made to cut the object require little effort: First we use Construct Pointand assign any number to input Z. The same number also needs to be connected to the Larger Thancomponent in the middle of step 2.

After this modification the Split Brepcomponent might be orange and warns “Split did not succeed”. This is caused by slices that are beneath the trimming plane and have no intersection. They are eliminated with the validation in step 2 and so there is nothing to worry about.

In this example, the variation of the cutting plane results in fewer slices. The old algorithm that we want to plug into does not account for that yet. Therefore, we have to remove the now redundant planes from the Plane Through Shapecomponent. This is a more complicated task.

Hint 2

Remove redundant planes

When we compare the output from step 2 of this tutorial with the initial algorithm, we can see that trimming the cone sections with the elevated plane results in fewer slices. Now, we need to reduce redundant planes and the best place to start is at the output of the Entwinecomponent. It contains two branches with the planes in each direction. We use Graft Treeto put each plane into a branch and Tree Statisticsto get the names of the branches.

The Dispatchcomponent from step 2 includes all new slices, separated into branches. We can see that some branches are empty and we want to remove the corresponding planes. To identify the empty branches, we use Null Item. It returns True if the branch is empty. We then use a Dispatchcomponent and connect the Boolean values to input P, which we also flatten. At input L we connect the names of branches from before.

At output A of Dispatch we find the names of the branches that are empty and we connect this to an input M of a Split Treecomponent; together with the grafted section planes at input D. We can find the branches that were not included in the selection at output N. These are the planes for the non-empty sections. A Trim Treecomponent will put all planes in one direction into a branch.

The last part is to take a Plane Through Shapecomponent and connect it to the rest of the algorithm, as shown in the figure.

Get the results

Get the results

Get the results

Version Info

  • Rhino 6.31
  • Grasshopper 1.0.0007
This page is open source. Edit it on GitHub or see how you can contribute.

Up next