CNC Milling simulation in C4D

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  05 May 2013
CNC Milling simulation in C4D

Hi all,
I am looking for a way to make a simulation of CNC milling operation
I tried to make it with booleans but it was too complicated, the problem is that I need to make the milling tool hide the area that it is working on, I had an idea to use voxels or something similar to give the mold real volume and make the tool "kill" the voxels that are hit by the tool, but I have no idea how to make it happen (maybe realflow or Dpit EFFEX).
I saw a few simulations that were made inside CATIA but the client want something more attractive then CATIA simulation.

If you are not familiar with this area you can see some examples in this youtube link:

CNC Milling Simulation

Any help would be appreciate
  05 May 2013
The only way I can think of that you could try, is possibly with a boole object. I know you say you've already tried it but maybe you tried something different. I rarely use booles so I hope this works for you (not sure about being able to use loft nurbs with booles). If this works, though, it would be a perfect CNC simulation, seeing that every part of the block that the cutter goes through, would be cut away.

1. Firstly, add a primative sphere for a ball nose tip and a cylinder for a slotdrill/endmill tip and use that as "B" objects in your boole with an "A subtract B" setup. Lock them to the cutter using Xpresso.
2. Add a null at the following positions in your cutters: For a ball nose, add a null at the center of the cutters ball (not the tip) and for a slotdrill/endmill, add the null halve the cutter diameter up from the tip.
3. Use these 'cutter nulls' with tracer objects to make them draw splines.
4. Use the tracers' splines with primative circles and rectangles that match the cutter diameters to create loft nurb objects.
5. Use the loft nurb objects to boole your material.

Take caution with this method and save regularly bacause, if it works, you will get to a huge poly count very quickly.

Hope this works for you. Let me know please.
Software Used:
3D: Cinema 4D, MotionBuilder
Finished Work:
  05 May 2013
Thank you very much for your reply,
I am already familiar with this method of work
My main problem is when object B intersect with himself and then I get a "negative" value of the boolean operation so instead of hiding the boolean areas it reveals the intersecting areas.

I added a few youtube links so you can see what kind of simulation I need to make

Thanks in advance
  05 May 2013
Is the simulation for full 5 axis machining or straight forward 2.5D maching like in the example videos? If it's just 2.5D, could you not try to really pump up the poly count on your block and add a morph that will bring the top down to where it's basically a plane and then use the tracer and loft nurbs as a shape object for the morph deformer? (Once again, I'm not sure if loft nurbs will work as an object shape for the morph deformer.)
Software Used:
3D: Cinema 4D, MotionBuilder
Finished Work:
  05 May 2013
The simulations are 2.5D and in most cases the table is stationery, the only moving part is the milling tool.
I did not understand what you wrote about morph deformer can you please explain it a bit more or maybe attach an example?
  05 May 2013
I'm a little swamped with work at the moment (CNC milling co-incidently ) but I will see if I can get an example file put together for you during the day or tonight.
Software Used:
3D: Cinema 4D, MotionBuilder
Finished Work:
  05 May 2013
Can't you make your object in onion rings and just make the rings dip into the ground or morph "flat" ? With a little help from the collision and morph deformer maybe?
  05 May 2013
I would use a spline mask inside an extrude, masking the shape in with a second spline.
Same kind of idea as the boole, but it only has to calculate the spline.
  05 May 2013
My main problem is when the tool path overlaps itself so I cant use spline mask or any kind of boolean operation because I will see the intersections of the overlapping splines.

As you can see in the attachment I have an intersection (Caps off)
  05 May 2013
This is my approach:

1- make a boole of the cutout shape from the cube. Make sure the intersection
has no geometry. I did a quick outline path in Ai for this and extruded.

2- use the non outline path/spline as a sweep nurb and animate the growth.
Make sure you put a jog in at the intersection ... image attached.

3- duplicate the sweep spline for animating the tool along the spline.

Still need to tweak the elements to hide seams and adjust tool keyframes to sync
along path. Attached is a quick animation.


iMac 3.06 ghz Intel Core 2 Duo / 16 GB / OS 10.9.5 / C4D StudioR12 / CS6

R.I.P. 11.02.11 ... my dear friend .

Last edited by vid2k2 : 05 May 2013 at 10:56 PM.
  05 May 2013
Originally Posted by okfir: My main problem is when the tool path overlaps itself so I cant use spline mask or any kind of boolean operation because I will see the intersections of the overlapping splines.

As you can see in the attachment I have an intersection (Caps off)

You can get some very clean edges with Sub-poly displacement if you have a nice high-res, high bit-depth displacement map - and give it sufficient polys to play with.

What I'd do is animate the path of the tool as a simple mono animation (a solid black sweep nurbs viewed from above should do it), then use that as a displacement map for your block. Changing the opacity will give you the depth variations.

If you try this, make sure to change the sampling of the images to something sharper than MIP - try 'Alias3' for a smooth finish. Up the Subdivision levels to 6 or so, and if there's rough edges showing put the result in a HyperNurbs object to give it an extra layer of finish.

The map can double as an alpha if you need to see through the block, or a simple world-space gradient to control opacity will also clip through your object.

Hope that helps - C

ProSite | Behance | Twitter
- - - - - -
Freelancer using Cinema4D? Sign up to the freelance directory:
  05 May 2013
Sounds like a job for Proximal shader.
Crazy people make better CG
  05 May 2013
Originally Posted by Hilt: Sounds like a job for Proximal shader.

The Proximal shader is a good idea but I have two questions:
1. Is it possible for the shader to remember the previous state of the object?

2. Is it possible to use sweep nurbs with the shader?

My only idea on how to use the proximal shader is with mograph clones and spline effector but that requires a lot of clones to make it a smooth cut.
  05 May 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 10:47 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.