How To: Automate 1" slicing with registration plugs / dowels?

How To: Automate 1" slicing with registration plugs / dowels?

thoreaubakker
Advocate Advocate
7,781 Views
23 Replies
Message 1 of 24

How To: Automate 1" slicing with registration plugs / dowels?

thoreaubakker
Advocate
Advocate

Hey Mesh Mixers,

 

I have access to a small CNC (X-Carve), which is running 3D tool paths exported from Fusion 360.

The mill can only comfortably cut 1" deep, so I am spliting the mesh into dozens of slices in Mesh Mixer.

Because I have to copy and past an alignment rod (dowel) model in the mesh for every slice, and boolean one by one, the process is incredibly slow.

Does anyone know of a method to auto-split a model into slices and auto boolean alignment dowel holes?

Or does someone have any suggestion on some kind of script or alternate solution/approach? 

Much Thanks



0 Likes
Accepted solutions (1)
7,782 Views
23 Replies
Replies (23)
Message 2 of 24

Anonymous
Not applicable

Do you dare to step into Python scripting and use mmApi to remote control the process? That's the only way to automate things in MM.

 

For getting registration dowels in case of CNC milling you do not need Boolean welding:

Simply set a cylinder (or another shape) inside the not yet cut object. Make a copy of the dowel.

SelectAll of the copy, run Edit/FlipNormals and Combine it with the source object. Now there's a dowel cavity in the source.

Now do the (keep both) cut on the source object first. Then (keep both) cut the remaining dowel cylinder a bit over the first cut. Separate the shells of the source and the dowel. Combine the lower source and dowel. Combine the upper source and dowel.

 

As a CAM app checks whether the used router bit can reach a surface it will ignore the zero gap between dowel and source parts. So you might save time not using booleans.

0 Likes
Message 3 of 24

Anonymous
Not applicable

Just some illustrating images:

The flipped result of the dowel cylinder:

Ohne Titel.jpeg

Combine flipped dowels + source and cut the result:

Ohne Titel 2.jpeg

Cut the the remaining dowel object and combine the lower parts:

Ohne Titel 4.jpeg

Do the same with the upper source part and the upper parts of the dowel objects:

Ohne Titel 5.jpeg

Basically you have 3 shells on each part now (cut for visualisation only):

Ohne Titel 6.jpeg

CAM should handle this.

Message 4 of 24

Anonymous
Not applicable

Another thing you can do:

 

1. Create a "female" MESHMIX part:

Let's say a cylinder at a bounding box of 5x13x3 mm.

SelectAll and run ConvertTo/ConvertToSolidPart. In the MakeSolidPart set its compose mode dropdown to BooleanDifference.

2. Create a "male" MESHMIX part:

Let's say a beveled cylinder at a bounding box of 5x12x3 mm.

SelectAll and run ConvertTo/ConvertToSolidPart. In the MakeSolidPart set its compose mode dropdown to BooleanUnion.

>> You'll find both parts in MESHMIX/MyParts.

3. Slice your object, SeparateShells, and hide all slices but Slice1.

4. From MESHMIX drag the male part to the desired location of Slice1

5. Run EDIT/CreatePivot and set its PlacementMode = FromLastTool. DropPivot.

(repeat 4. + 5. for each dowel)

6. Hide Slice1 and show Slice2. 

7. From MESHMIX drag the female part near to a pivot on Slice2

(repeat 7. for each dowel)

Do the same on a next cut....

 

Such a result (2 slices only, the upper one cut for visualisation):

Ohne Titel.jpeg

 

 

Message 5 of 24

thoreaubakker
Advocate
Advocate

Hey @Anonymous 

thank you SO SO SO much for taking the time to explain all of this to me.
I really appreciate it and meant to answer sooner.

I am interested in the Python scripting and mmApi you're talking about, and although not good at code,  would love to start working towards that goal if you can point me in the right direction for long term development/contribution.

 

Regarding the more immediate task at hand, I have read your instructions twice but am still a little confused because of my own lack of experience. 

In the image below I have set up a number of planes, and would like to cut the part. I believe you are saying that I should first (1) place a dowel (cylinder) mesh in the middle, (2) invert the normals and combine (this where I get confused) and (3) then do plane cuts using the planes after the initial dowel geometry has been removed?

 

I kind of understand the idea that spliting / combining will save time by not 'boolean welding' computation, as the router will be OK with a mesh that is not welded, but am still a bit confused.


If you can explain the steps again like talking to a total rookie it would be super appreciated. Ps keep in mind I will be splitting 25+ layers per leg / arm (total of 100 cuts) which is why I'm trying to avoid the boolean computation time and clicks.

 

Screen Shot 2019-02-13 at 2.29.21 PM.png

 

 

 

 

 

 

0 Likes
Message 6 of 24

Anonymous
Not applicable

Might be my limited English too...sorry about that.

Ok. Let's start from scratch...

 

You might be aware of the difference of Pixel- and Vectorgrahics in 2D?:

- Pixelgraphics (Paint apps) create an image by colored squares (Pixels) as you may know it from photography. If you zoom in such an image you'll soon see these squares getting bigger and bigger.

- Vectorgraphics (Draw apps) instead draw an image by using math functions. A circle is drawn based on a centre, a radius and a certain line thickness. If you zoom into such an image representation you'll never find some pixel stairs. The line stays smooth and keeps the same thickness.

These two ways of graphics exist in 3D as well:

- There's a representation describing a 3D shape via a net of planar polygons (maybe the simplest polygons: triangles) analog to pixel graphics. Depending on the mesh density you'll find those elements zooming in sooner or later. A sphere is made of a certain number of flat polygons. This representation's quality depends on the number of used polygons and will never (for it is made from planar elements) be a perfect sphere.

- There's a way of representation describing a 3D shape via 3-dimensional math functions. This way is used by construction applications ("CAD" - basically mesh processing is CAD as well, but the math attempt occupies this term) where the construction parameters are known. Here the shapes are perfect - a sphere can be done just by a centre and a radius.

>>> First basic insights:

- Both ways need different ways to create or modify something.

- Both own different powers.

- While you easily can convert a math based body to a mesh representation (by dropping it onto a certain grid), its hard to find math rules from a mesh.

- You can't directly transfer needed operations from one representation to the other. 

>>>>> Note at machining: Generating a toolpath from a mesh ends in (more or less) linear travels. A waterline path around a mesh-sphere gives as much travels as triangles hit by the current slicing plane. Each needs acceleration and deceleration. So the travels might be that short that the machine will never reach its highest speed. Processing a math-based representation instead can do a path around a sphere in only four non linear travels. So: Expect a longer machining time on meshes.

 

Now there are things which are hard to describe via maths and there's no choice which way to go: Maybe the source is already a mesh (as got from a 3D scan), maybe the object is too complex to describe it via maths: You simply need mesh processing.

 

MM deals with meshes only. Let's look at the way of meshes more closely:

A mesh is just a surface ( a Shell) without any stuff within - like an air balloon. The balloon's outside is of a nice white,  while its inside owns an ugly pink-Barbie-like stripe pattern. You hate Barbies and you don't want to see that pattern.  So you fill the balloon with sand (just in case it bursts). You've got a watertight volume filled.

Now that balloon+sand is too heavy: You decide to put another balloon (Shell) into the first. But wait, you hate the pink stripes and you might see it through the air outlet: Better to flip it so it's inside out. Now the stripes point to the sand and are hidden. Congrats!

>>> Second basic insight: On a mesh there are front faces and back faces. Back faces point towards a (virtually not existing) material. If you want a watertight cavity within a shell you'll need to define a second watertight shell and flip it inside out (to flip an object: SelectAll of it and do Edit/FlipNormals; to combine two objects: Activate a second object by clicking on it while holding down Shift  and do EDIT/Combine)  .

>>>>> Note on a cavities in CAD: This flipping doesn't work. You need to actually do a boolean subtraction over there.

 

If you're using a flipped cylinder and  Combine it, you can create a cavity within an object  which will be visible as a hole if you cut the object later on.

To create a fitting dowel rod you simply need a copy of the cylinder. Create this copy (via the double-square button in the ObjectBrowser) before flipping and combining it. You may hide this "male" part (via eye icon in ObjectBrowser) for now.

 

Ok. So far for today. It's late at night over here right now... About a slicing workflow tomorrow..

 

 

 

 

 

Message 7 of 24

thoreaubakker
Advocate
Advocate

Thank you Dr. 3D @Anonymous  🙂

 

I appreciate the theory and enjoy it.

 

I will re-read your original post again, and perhaps I will have made progress even before you respond!

0 Likes
Message 8 of 24

Anonymous
Not applicable

Nice to hear that you enjoy it. Feel more like a professor... 😉 So further notes:

 

Saw the image you posted at Fusion360 (not being a Fusion360 user):  Isn't there an option to mill only the geometry+some contour around? 

See you use supports to keep the object in place: I don't use such stuff any more.

Let's say you have a stock of 50mm in Z and your bit allows to cut off 10mm per roughing slice in that foam (I do up to 50mm in such material). I limit the maximum depth to 40 mm > this leaves 10mm of foam keeping the piece and saves time. Now for the finishing path (assuming 10mm flute length here too, for this is needed to remove the stuff left by the limited roughing) I limit the max depth to something like 48mm. The remaining 2mm are enough to stand the forces. Now I do a final contour path at 50mm max depth to cut out the piece (using some wood I keep the piece in place manually for that - Attention!)

>>> This leaves a tiny stair at the bottom. In foam that's an advantage! It  strengthens thin areas at the bottom contour. Mounting your slices you'll be glad to have them there and sand them off after gluing the parts together

 

Back to your issue:

 

Against doing a 3D print, on my CNCs I only mill female holes for registration and use a separate dowel plugged in after milling (as you know it from furniture making). Two reasons:

- If you want to get a male "nose" (let's say 5mm high at the upper side) this forces you to do a 2-sided milling job as you'll need the female hole on the other side of the job. Twisting the stock after milling the first side is always some source of error. And if you're not experienced doing such a 2-sided job...)

- To get the male nose you need to remove 5mm of material all around that nose. You'll loose material, create more waste and need more time. 

Milling only female holes (drilling through the stock from the upper side) saves material + time, allows to use a drilling tool path for the holes (which is much faster) and gives more precision as you do not need to flip the stock.

Along with that: you do not need to construct the male part in virtual space.

 

That said you might be fine with only doing the internal cylinder-cavity and cutting this result.

 

(I'll continue in a next post...)

 

 

 

 

 

Message 9 of 24

Anonymous
Not applicable

For 3-axis milling registration geometry needs to be perpendicular to the cuts to avoid overhangs which would result in  "milling shadows" so the most forward way to achieve this is to transform the object to a position where you can do simple horizontal cuts before inserting the internal dowel cavity (think you already did that).

 

Your object might still be somewhere in 3D space. As it is of some advantage to know its absolute position we want to align it to the ground grid at the origin. To do this run EDIT/Align and set its Source to BasePoint (this is in the middle of the bottom of a box around the object ) and we want to get that point aligned to the Destination = WorldOrigin/Yup.

Accepting this the object "stands on the ground" right at the origin.

 

Now it's time to add a cylinder from MESHMIX/Primitives. D&D it somewhere to empty space. By default it's axis is oriented in Y ( MM's Up direction is Y. Again some difference to CAD (and your machine) where Up is Z - ignore that for now) which is fine for now. Do not rotate it any more. In EDIT/Transform (which is called in this action automatically) disable UniformScaling and set SizeX and SizeZ to the needed diameter of the dowel by double clicking the displayed values. SizeY defines the length of the dowel. Might be better to adjust this length if you're fine with its position inside the object. To move it use the transform arrows in the widget. When it gets inside the object the cylinder is hidden. So temporally drop the transparent shader (the white sphere righthand of the world icon) from SHADERS onto the object.

Note this if you want to have more than one dowel: While being in Transform you can create a duplicate of the transformed object by hitting D. So in case you need 3 dowels: Move it to positionA, hit D, move it to positionB, hit D and move it to PositionC where you hit Accept.

After adjusting the lengths of the dowels (maybe they need different lengths at certain positions) using Transform on them again. Combine all dowels to one (if you want to mill the male noses create a duplicate) and do the flipping on one

 

Ready for slicing...

 

Message 10 of 24

Anonymous
Not applicable

You should have got a situation like this (Ignore that is is cut vertically. This is only for visualisation):

Ohne Titel.jpeg

Now you might simply do several EDIT/PlanCuts and use the widget's snapping functionality to get equal slices. But if you want to slice several objects I recommend to create some "cutting pattern" from Pivots.

Meshmixer Pivots are just points in 3D, useful to store certain positions and axes orientations, where you can snap certain tools (as EDIT/PlanCut) to.

So we need a Pivot first. The object being active go to EDIT/CreatePivot. Set PlacementMode to BoundingBox (creates a Pivot in the center of the object) and CoordinateFrame to WorldFrame (orients the axes on the world's main axes). Click on the object, click on DropPivot and leave the tool via Done. You'll see some red/green/blue axes right in the centre of the object. A pivot is actually a single vertex object. It may be linked to a surface = it moves along with an object as you move the object (orange if activated) or an independent point (yellow if activated). This doesn't matter in this case. You can use EDIT/Transform on it too. As it is inside another object you need to double click it for activation and call EDIT/Transform.

Ohne Titel.jpeg

This pivot was done at the centre of an object (height = 300mm). If you set Transform's CoordinateSpace to WorldFrame the TranslateX, TranslateY and TranslateZ  you see its current position in 3D space.

I want to slice each 50 mm:

So write the first cutting position (50) into the TranslateY value (double click to edit) and hit enter.

The pivot jumps to that position. Drop a copy of it there by hitting D on your keyboard.

Write the second position (100) into TranslateY, hit enter and drop a copy hitting D.

Do this at 150, 200, as well

At 250 do not drop a copy but hit Accept. These pivots are our cutting pattern further on:

Ohne Titel.jpeg

 

 

Message 11 of 24

Anonymous
Not applicable
Accepted solution

Now activate the object and run EDIT/PlaneCut.

(By default this tool cuts at half and discards a half. Unfortunately it doesn't remember the last used settings. So you need to set the CutType to Slice(KeepBoth) each time you call the tool. Here I need to do this 5 times. 😞 )

Now clicking on an pivot snaps the tool to that position. You simply need to Accept.

Run PlaneCut 5 times, each time snapping to another Pivot. 

You will not see any changes in the scene (until you do EDIT/SeparateShells - but for easier hiding leave it as one right now) Hide the object and show the dowel rods we copied before.

We want male noses at a height of 5mm. So let's transform our cutting pattern 5mm in Y. To do this click all the pivots (for the second, the third and the fifth you need to hold down Shift) and run EDIT/Transform again.

(Note: You can also show the pivot objects in the ObjectBrowser and do a multiple selection there > there's a small grey pivot icon next to a cube at the Browser's bottom (left): Click it to show/hide pivots in the list.)

Now disable the green A at 7 o'clock in the browser widget (the switches from absolute values to relative ones)> Click it and it should turn to grey.

In the field of TranslateY put in 5 and accept.

Now our pattern is 5 mm higher and we use it to cut the rods the same way as we did with the object before . So make the dowels the active object and run PlaneCut 5 times each on a different pivot (remember: We need to set Slice(KeepBoth) each time).

Show the object too. 

Run EDIT/SeparateShells on both:

Ohne Titel.jpeg

Activate a slice and its dowels and run Combine for each slice:

Ohne Titel.jpeg

6 slices with fitting dowels (Using different shaders):

Ohne Titel.jpeg

 

Hope that not everybody claims to be a total rookie 😉 ....

Message 12 of 24

thoreaubakker
Advocate
Advocate

@Anonymous 

Thank you SO much for taking the time to explain this so clearly, and for the picture examples and step by step work.

I think it is very clear now, and will help me very much.

 

Have you considered making a series of general tutorials? I think your style is good. It could help a lot of people.  I imagine you have your own projects to keep you busy though  🙂

 

After your message last night (before today's tutorial) I was doing some online exploration, and stumbled on something strange -- it appears MM used to have some automated slicing in it! I kept looking at the image/ video and looking back at MM, and couldn't find the function (Edit/Make slices). I can only image Autodesk removed it? Last night I ended up using Slicer for Fusion 360 to slice pieces. Unfortunately, in the 3D it does not give me the dowel option, but it did save a number of clicks in MM. Did you ever try the function in mesh mixer? I wonder which version they took it out of and why  🙂

 

p.s. thank you again!!

image found on: http://weareprintlab.com/blog/10-steps-to-getting-started-with-meshmixer-for-3d-printingimage found on: http://weareprintlab.com/blog/10-steps-to-getting-started-with-meshmixer-for-3d-printing

0 Likes
Message 13 of 24

Anonymous
Not applicable

Yep there was this module. If I remember right it was removed with MM 3.3. Reason was that it depended on stuff made by the 123D. When Autodesk canceled the 123D family Autodesk Research had to remove this module as well as the old PRINT module.

I didn't use it that often for the computation wasn't that fast and it was limited to parallel horizontal slices of the same height also...

This pivot based slicing instead is much more flexible and if you're familiar with it done in the same time I think.

 

I already did some basic tutorials in 2.9 times posted on the old MM forum but there was really little interest. These are still pretty up to date (see attached PDFs)

Message 14 of 24

Anonymous
Not applicable

And further two

0 Likes
Message 15 of 24

Anonymous
Not applicable

It's a petty that the old forum and its knowledge had to be removed due to new laws...

 

One could automate most of the stuff  above using mmApi. Some things e.g. the position and length of the dowels might still need user interaction (not sure yet). Maybe I find the time to hack something together. You're on MAC I think?

Message 16 of 24

Anonymous
Not applicable

Here's a scene of two bunnies. Inside there are three dowels each.

The script copies the dowels, copies them, flips the normals of the copies to merge them to the bunnies.

Now it combines bunnies to slice them in one go. Same happens with the dowels.

After separating the results it automatically finds fitting dowels and combines them to the slice of the bunny.

One can define the height of the slices and the dowels' nose heights.

One can use dowels to be merged or simply leave an inside hole.

If there are no inside dowel objects one can do simple slices.

 

Via "Save STL's" the app saves a single file for each slice in a common directory

 

21 sec for the whole process without saving. Just to give you an idea of what can be done with mmAPI.

Message 17 of 24

Anonymous
Not applicable

 

 

 

Message 18 of 24

thoreaubakker
Advocate
Advocate

Hey @Anonymous  sorry for slow response.
I had some access to the CNC at school and put in a few late nights cutting (with no dowel holes yet 😉

Then I was looking at a place to eventually do fiberglass once I have the foam cut, so I've been away from my computer.

 

Wow, nice tutorials! I especially appreciate the one on pivots. Thank you for sharing the links, I've downloaded all of them.

 

ALSO, that script you made is amazing! How did you learn that? Are you a developer?

The video is really impressive. I would like to learn  🙂

0 Likes
Message 19 of 24

Anonymous
Not applicable

No I'm no developer (am I?). Learned that on the hard road of try and error.

 

The key is to have a clean MM workflow first and to translate that workflow after that.

So you'll need to understand MM tools and their settings first.

Plus some simple GUI stuff taken from Python's Tkinter and you're ready to go...

 

0 Likes
Message 20 of 24

Anonymous
Not applicable

Remembered a script I posted on the old forum.

Maybe it's useful to find a straight forward workflow without any coding.

It allows to store current settings of most MM tools (some can't be stored as there are no settings. e.g. stuff like CloseCracks, SeparateShells..., so one needs to insert these commands to the cue... Some need mouse movements e.g. SCULPT). One can change the order of the recorded tools by d&d in the list, and perform the cue of command with a single click. The cue of actions can be saved as a .csv table to apply the workflow on any object.

Limitations so far: One can't switch the current object.

For slicing:

 

 

0 Likes