I’ve been interested in V-carving for a long time and recently started playing with it again, spurred by this recent thread. I’d like to be able to rapidly visualize the result after the cutter follows various paths through solid material. Following this thread I was able to generate this simple example:
When I modified @RIL 's example, shared in the Solid Difference thread, so the cut-path crosses itself, I see the same artifact. Is there a better way to do this? Or a way to identify the extra faces and remove them?
Using the Hilbert path, if I raise the material’s top surface into the cutter enough so the non-intersecting valleys touch each other, they disappear (?)
Thank you for your help, Martin! This looks right to me - the internal seams are correct. I need some more time to fully understand why you need to split the brep twice (it didn’t work when I removed one of the splits). And why you need the shift list - (it still works if I bypass that).
Nice. I was thinking along similar lines but had to run an errand. I was trying to think of a way to make the split(s) automatic so it could handle arbitrary paths. I definitely agree about orienting the section curve to a perp frame at the start of the path. And I too made the section curve shorter so the sweep doesn’t intersect itself around the tight bend in the path.
I don’t understand either why two splits are necessary? But using only one cutter results in “Invalid Brep” or “Open Brep”, depending on where the split is done. Your code works fine for me without the Shift List. Seems odd to me that the path curve isn’t planar since the cutter punched through the bottom at the very end of the path?
OK, just be aware that making the path planar (projecting it to the XY plane) introduces potential problems of its own. I tried Sweep 2 earlier, using an offset curve for the second rail, but offset curve failed when the path was planar, intersecting itself.
I’d never used sweeps before and wasn’t sure how my section would orient with respect to the Z-axis as it travelled along the rail. Though I see the logic of using perp frames, that doesn’t match what my CNC can do. Since it is only 3-axis (and not 5), my cutting bit is always plumb to the machine XY axis. So keeping the sections parallel to the Z-axis is correct in this situation.
Sorry, I don’t understand that? Oh, do you mean that perp frames on a sloping path will not be aligned with Z? That makes sense. Still, I believe the section (cutter) should always be perpendicular to the path curve in top view. Otherwise the width of the cut will vary as the path curves, eh?
I have not tested the defintion above without the shift list. My thought was that I have to solid union in a specific order and I guessed that the two intersecting parts should be the first two items in the list. But it seems that’s not necessary.
The splitting can be automated by projecting the curve to the XY plane, dividing the closed segment and finding the two closest points on the original curve.
Great thanks, Martin! I went through your solution, and every piece of it makes sense to me (a great educational example of components I haven’t used before). The only mystical bit is why the self intersection requires chopping into three pieces then recombining for it to work. But I glean from your and @Joseph_Oster’s comments that sometimes that’s just the way GH is.
Yes - I linked to it in my opening of this thread. I recall trying @Joseph_Oster’s definition (using anemone) but IIRC also read about the multiple solid-diffs slowing things down. So I played with @RIL’s (further down the thread). But found it suffers from the same self-intersection artifact:
I’m looking for fast. Ever since childhood, I’ve always preferred a window seat on planes. Looking at the Earth, with all its amazing fractal terrains never gets old! I’d love to be able produce carvings like them, but not by using the “standard” method of milling topologic data in successive rows. I use Aspire for toolpath generation, and its visualizer is decent:
But I don’t yet have much intuition when it comes to predicting the carved result from fractal paths I feed it (and in this example the tool depth remains constant). I’m hoping for a visualizer that can work fast enough for me to tweak the toolpath and watch, in as close to real time as possible, for carved results I like. I suspect it’s a pipe dream, but GH has provided tools that approach this with my other algorithmic artwork (and it’s incredibly helpful).