A way to do stepdown?

Discussions around the CAM Add-On of QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Indicate the post processor used.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
w4kpm
Newbie Member
Posts: 5
Joined: Sun Aug 21, 2016 12:29 pm

A way to do stepdown?

Post by w4kpm » Sun Aug 21, 2016 12:40 pm

Hello, I am looking for a way to do stepdown - For example if I set a layer to -3mm, I want it to cut the
pattern at -1.5 mm, then -3 mm instead of taking one deep pass.

I have tried to do multiple layers with the exact same content, say a grid of circles, then setting one
layer to one depth and another layer to another depth, but what happened was that
on alternating passes it would cut the -3mm first, then the -1.5mm pass (I'm assuming that
this is part of the optimization process . . .)

I was hoping to add another config option and then loop down to the final Z height by the stepdown
height - Adding the configuration option seems like it would be pretty straightforward, but I am having
trouble finding the relevant section of code.

I have looked at the code, and it appears that the relevant section I would want is in
include("scripts/Cam/CamExport/CamExporter.js");,

But I can't find this in file search. Am I missing something??
Is there a easy way of doing this that I haven't discovered?

Thanks,
Kelly

User avatar
srl
Full Member
Posts: 65
Joined: Tue Aug 09, 2011 4:40 am

Re: A way to do stepdown?

Post by srl » Tue Aug 23, 2016 2:19 am

Hi Kelly

Do you need something like this?
https://www.youtube.com/watch?v=Qh3mElZ2y9s

I make my own config for my own needs. As you can see there is very little interest for it(no comments or likes). The same really for this QCadCAM thread lately.
I'm not keen to release my config as camexporter.js has been modified which I can do as a past licence owner. I also don't have the time to provide support as at the hobby DIY CNC level everyone has different needs.

QCADCAM is powerful as it can be programed to do exactly what you want from the 2D CAD.

To see camexporter.js just set the debugger option then break or debugger; your gcode.js. Camexporter.js will show in the list of loaded files. Copy and paste to get a copy.

srl

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: A way to do stepdown?

Post by andrew » Tue Aug 23, 2016 9:48 am

This is not (easily) achievable with the current version. You could split up the task into multiple exports though.

Having said that, there is a lot happening with QCAD/CAM at the moment and there is a major update planned with built in tool management, cutter radius compensation, lead in / lead out, etc. Pocket milling is also planned, though a bit longer term. The new offset capabilities of QCAD Professional were designed with these future uses for QCAD/CAM in mind.

w4kpm
Newbie Member
Posts: 5
Joined: Sun Aug 21, 2016 12:29 pm

Re: A way to do stepdown?

Post by w4kpm » Wed Aug 24, 2016 10:48 am

Thanks for the replies -

@sri - I found your tabs video somewhere, and I was hoping I could do the same thing with stepdown, but as @andrew pointed out, this is difficult to do with the setup of the code

@andrew - I'll check out the update that you posted - I may be able to do some combination of exporting gcode and programming - so for example export for one depth and then use macros in emacs to get my extra depths - but then I wonder if I should just hand-code it then. - I look forward to the updates you mentioned

De groeten van de VS - mijn vrouw is Nederlander . .

Kelly

w4kpm
Newbie Member
Posts: 5
Joined: Sun Aug 21, 2016 12:29 pm

Re: A way to do stepdown?

Post by w4kpm » Wed Aug 24, 2016 11:10 am

@sri - yes this is exactly what I am looking for - the way I understand it, you had access to camexporter.js because of a license to a previous product, but that file is not available in the more recent editions?

w4kpm
Newbie Member
Posts: 5
Joined: Sun Aug 21, 2016 12:29 pm

Re: A way to do stepdown?

Post by w4kpm » Tue Sep 06, 2016 4:39 pm

Here is my first attempt to do the stepdown - It's not perfect, but it does what I need.

For each contour, it steps down the Z and repeats that contour - it works well for circular paths, but if for some reason you have a box with 4 different contours, I've had it end up being rather inefficient.

I also think there are some issues with getting the correct layer depths if you use independent layer depths

In any event I offer this as a semi-useful workaround to my problem, and perhaps an example of using an addition to the UI

FWIW,
Kelly
Attachments
GCodeZ.ui
UI changes for GCodeZ
(2.93 KiB) Downloaded 692 times
GCodeZ.js
Stepdown Workaround - Z Stepdown
(1.94 KiB) Downloaded 673 times

qharley
Junior Member
Posts: 22
Joined: Sun Nov 16, 2014 11:53 am

Re: A way to do stepdown?

Post by qharley » Fri Sep 16, 2016 12:50 pm

Thanks w4kpm for dropping your GCodeZ code. I have a question regarding that.

It somehow only works for the default cutting settings, ignoring the layer cut heights completely.
Looks like maxdepth in exportContour always reports the default rather than the layer value.

Andrew, is there a way to get around it?

If you set a default cut depth of -5mm and
If you have a -3mm layer cut depth set, and a step of 0,5mm, it will cut as follows:
-0.5 -1.0 -1.5 -2.0 -2.5 -3.0, -3.5, -4.0, -4.5, -3.0

The cut is correct in the end, after it messed it up just before ;-)

qharley
Junior Member
Posts: 22
Joined: Sun Nov 16, 2014 11:53 am

Re: A way to do stepdown?

Post by qharley » Fri Sep 16, 2016 1:52 pm

Please find attached my current attempt to a generic cam config to the smoothieware based CNC

It is based on GCodeZ with a couple of tweaks for smoothie compatibilty.
SmoothieCNC.ui
SmoothieCNC ui
(3.38 KiB) Downloaded 829 times
SmoothieCNC.js
Smoothieware CNC js
(2.62 KiB) Downloaded 823 times

w4kpm
Newbie Member
Posts: 5
Joined: Sun Aug 21, 2016 12:29 pm

Re: A way to do stepdown?

Post by w4kpm » Sat Sep 17, 2016 2:46 pm

@qharley -

Were you able to get it to find the layer height? I keep getting null when it gets the entity in getLayerOptions - so it returns the default.

I've had my eye on the SmoothieBoard - how do you like it?

Kelly

qharley
Junior Member
Posts: 22
Joined: Sun Nov 16, 2014 11:53 am

Re: A way to do stepdown?

Post by qharley » Mon Sep 19, 2016 7:59 am

I have the same problems currently, hence my previous message. I am sure there is a way to make it work, but have not found it just yet. Waiting on Andrew to respond to my request.

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: A way to do stepdown?

Post by andrew » Wed Sep 21, 2016 9:35 am

qharley: There is no current entity or current layer at the point when the layer options are queried.

As a workaround, you could query the layer options of the first entity of the contour that is about being cut:
var layerId = contour.queryFirstEntity().getLayerId()
var layer = this.document.queryLayer(layerId);
var zCutting = layer.getCustomProperty("QCAD", "Cam/" + this.getConfigName() + "/ZCutting", 100);
Please note that we're working on a major update for QCAD/CAM which will feature tool management, cutter radius compensations (through G41/G42 or computed path) as well as Z stepping. If you're interested in snap shot releases, please let me know. It might already be interesting in its current state.

qharley
Junior Member
Posts: 22
Joined: Sun Nov 16, 2014 11:53 am

Re: A way to do stepdown?

Post by qharley » Wed Sep 21, 2016 4:59 pm

Thanks! That works.

Please find my new files attached.
SmoothieLCNC.js
CAM config Smoothie CNC
(10.34 KiB) Downloaded 818 times
SmoothieLCNC.ui
Cam Config UI
(3.38 KiB) Downloaded 828 times

Post Reply

Return to “QCAD/CAM”