Minimum bounding polygon around closed curve - stock rough cutting prep for CNC carving

I am trying to create an algorithm to generate cut patterns to roughly shape stock to speed up the CNC carving process. Doing these rough cuts will drop milling time by multiple hours.

Heat map in the picture above shows how close each point on the part is from its generated bounding volume. These parts are getting cut out of fixed size stock so flat faces that are yellow or orange are unavoidable. The problem is curved segments that will be milled should be closer to blue, so that there is breathing room between the rough cut and the final geometry.

I am working with the shadows cast by a mesh. This gives me the overall silhouette of the shape

Breaking it down, the challenge is creating a simplified minimum circumscribed polygon around a closed curve that does not intersect the original closed curve.

I need to be able to define a minimum segment length in the simplification.

I am sure i am not the first person to try and do this.

Anybody have some advice?

Does your CAM software not create roughing operations?

It’s not clear what you need,

Can you upload a sample part geometry and desired output?

I am using Fusion 360 for CAM, and of course it can do roughing operations.
The whole point is to start with stock that approximates the final geometry so that the CNC roughing and carving all go much faster.

The straight cuts would be done with a big band saw or a chain saw.

This all makes it so that the CNC machine is spending less time “just making sawdust”, removing massive amounts of material all which can be done faster by hand with band saw and/or a chain saw.

In the image above, you can see the final piece in purple, and the starting stock in that ghostly beige.
Starting with minimal stock speeds up the process by multiple hours.

If I were cutting these shapes out of full blocks of wood as full size chunks of stock it would add hours to the initial roughing pass in the CNC. And being that I will be doing over 380 parts, saving 1 or 2 hours of CNC time per part will save me weeks of machining time.

I guess another way of thinking of the problem is to create low poly geometry of each part, but the low poly approximation only happens in the Z and Y axis.

Thanks for your reply!

And do you hold the parts with a vacuum bed? They look like awkward shapes to locate on so perhaps you need to include 2 straight edges or 2 holes to datum off?

Do you want to batch process all these parts or are you prepared to process each part one by one?

And just to clarify… you are not just trying to do a 2d cut in some stock with a bandsaw to get a blank to then finish on the CNC… you are trying to get a 3d, low polygon representation of the part that you will somehow cut from a block on a bandsaw / chainsaw, locate on a CNC and then finish machine?

I thought you might be able to do this in 2d with Kangaroo by creating an offset curve of the mesh silhouette and dividing it. Then create a polyline using the curve division points. This could be shrunk around the mesh silhouette offset but you might need to drag some of the polyline points manually to best fit the geometry. I tried but can’t get the curve collider to work properly… maybe someone like @DanielPiker would be able to help?

This is maybe too slow to do for hundreds of parts.

The logic you have tried to show in your diagrams might be able to be translated into GH but maybe it needs some human intervention which using Kangaroo and the Grab component to drag points where necessary might give you.

Here’s a quick go at @martynjhogg 's idea


RoughCuts.gh (15.2 KB)

1 Like

I think there would also be another approach possible where you first use Convert>Curve To Lines
then offset to the extreme of the corresponding curve segment in the perpendicular direction and intersect to get new vertices.

This might take some special treatment for the inflection points of concave curves though.

I am working with a 5 axis router and I’m doing my work holing with an elevated fixture table screwing the wood down from under the fixture table.

Already prototyped this whole process in foam:

Yes I tried offsetting segments of the simplified curves a couple of days ago… The problem I ended up running into is extending the offset curves enough to intersect the adjacent lines, but not enough to intersect with non-adjacent lines. Or figuring out a way to filter desirable intersections from undesirable intersection points.

I’ll try to incorporate the definition above.

Thanks!

1 Like

Following @DanielPiker suggestion, this Bounding Polygon takes advantage of the Curve To Polyline parameters, then you could offset with Clipper.


210305_BPolygon_ev.gh (15.7 KB)

2 Likes

And I was thinking you could just mesh the 3D object(s), offset the mesh the stock saving distance to the outside, then do a MeshOutline plus maybe a CurveBoolean cleanup if necessary…

With foam, if you you have a bit that’s longer than your maximum depth of cut, and you use stepovers that are appropriate for finish passes, you might not need to do any roughing at all. You can just dive into it with a huge ballnose bit and make your finish pass your only pass.

Cut the perimeter first, with two passes, to leave space slightly larger than the bit diameter between the waste and the work. Then use a toolpath that keeps the tool down all the time, so other than your entry point, every pass is just taking, the stepover’s amount of material off. You may benefit from roughing just at the entry point, it might not be necessary.

I’ve carved four inch deep foam in a single pass, easily. Just need a huge bit. Couple hundred bucks.

Works in foam but I think the goal is to machine it in wood.

Looks like an interesting sculpture and sounds like a nice machine!

It could be a nice plugin for CNC… If you could engrave bandsaw cutting lines on 2 faces of the stock blocks or print out a cutting template to stick on the blocks.

Another approach for this kind of thing is to make the roughed blocks from layers of thinner wood. It’s a lot of gluing up and the aesthetic might not be the same but it avoids that tedious roughing operation. It is relatively easy to slice the mesh into layers to profile and then stack up. I did this with a door but left it faceted because I liked the look…

1 Like

This definition freezes my Rhino… I think because you have a value set to 200 in the cluster that is specific to the size of curve used.

As you hadn’t internalised your curves (come on, basics! :smiley: ) I drew a curve that was presumably larger than the ones you had used and then tried changing the value to 2000 to make the scaled bounding rectangle larger. Then Rhino froze.

Can you explain how it is using the Collider, OnCurve and Length goals please? I never have much luck with Collider but I want to learn.

RoughCutsMH.gh (32.6 KB)

Jayden,
I probably don’t understand the question completely but I think that you are trying to get an outline of your part, offset. when viewed from say the front view or the top view. Does this help?Project and scale.gh (6.6 KB) If you are dealing with a curve , not a Brep, you could project it to a plane, give it a surface and then scale it?
Bill

Well … not sure at all if this is usefull for the occasion but anyway: I did something “similar” long time ago but yields a convex min envelope polyline because the machine in question was able to work only that way. Is recursive: given a resolution value (defined with 4 ways against a curve List) divides a given Curve in the List and then offsets the points (outwards) and validates the tangents (as LineCurves) as candidates for the recursion (i.e. a tangent is valid if yields null ccx events against the curve).

The start boundary Polyline is the base of the Box (or BoundingBox) per Curve.

For each recursive loop each tangent splits the previous Polyline boundary in 2: the inner (the one that contains the curve: this is a candidate boundary) and the outer (his area is always measured). The boundary picked for the next loop is the one assosiated with the max outer area (kinda a sync Array Sort using areas and boundaries). The core Method for all that:

Each success (where the previous boundary becomes the boundary picked) yields a removal of the tangent used. Each tangent that yields an invalid (for any reason: tol, small area, Method failure, Karma etc) inner/outer pair is also removed.

If you run out of tangents or no valid pair is found or you reached the max loops the recursion stops.

1 Like


Thanks for all your input everybody. Wanted to give you guys my latest approach that is working quite well. I opted to simplify curve segments by creating an aligned bounding box, then replacing the curve segment with the long outside edge of the bounding box.ShadwRoughCuts.gh (150.2 KB)

1 Like