Open smooker opened 5 years ago
@MARIOBASZ any ideas?
Additional info: vim: build/lib/bCNC/plugins/scaling.py 209,24-59
bid_block.append("(---- Scale (x "+str(xscale)+" : 1.0),(y "+str(yscale)+" : 1.0),(z "+str(zscale)+" : 1.0) ---- )")
bid_block.append("(center "+str(center[0])+" ,"+str(center[1])+" )")
bid_block.append("M03")
bid_block.append("S "+str(rpm))
bid_block.append(CNC.zsafe())
bid_block.append("F "+str(zfeed))
bid_block.append("g0 x "+str(info[0])+" y "+str(info[1]))
CNC.zsafe() is not needed here for laser engraving. (milling of scaled model too :) slows down the process or breaks the instruments with coefficients bigger than 1.000) A lot of lower cases and spaces.
Regards, smooker.
@Harvie, Laser option is saved as variable in bcnc? If it is correct, you tell me how to summon it thus saving time, and it is not necessary to place the option in the plugin?
M03 or M04 in front of every path (block) M05 to turn off the laser in the end of the path (to not make scratches between bridges :) )
I think that Zsafe should be scaled too (in milling mode) and ingnored in laser. Opinions ?
M03 or M04 in front of every path (block) M05 to turn off the laser in the end of the path (to not make scratches between bridges :) ) Ok
@smooker, I did not understand what are you saying:
I think that Zsafe should be scaled too (in milling mode) and ingnored in laser. Opinions ?
place the laser / milling option if there is a "laser variable" stored in bcnc, I will try to call it (@Harvie, delete an earlier comment by mistake, can you tell me if it is stored in bcnc as a variable, and how do I call a laser variable to save time?) If it does not exist, in the plugin I will place the Laser / engraving option
Scaling plugin should only change the scale of g-code coordinates. I don't understand why it should change how motors/lasers are engaged... You should keep the M commands as written in original g-code.
I'm not in my machine. but at the end of the block must go to zsafe for safety in milling, and for laser they say "change between m03 / m05)
@smooker, if you send me a simple code to burn a square with laser, or two squares, one in each block, I will understand faster
@Harvie, when you do laser pocket operation, in more than one figure, write m03m05 instead of zsafe ztarget?
@smooker, I'm glad you can use scaling. here a use to scaling and modified (even in test) for 3d, oval from circle. Disadvantage: My wife told me "Mario, go and take a shower"
Two 10mm squares. One in absolute space, the other in G91.
smooker@sh21 /mnt/vg3.2/home/smooker/src/bCNC/examples $ cat MARIOBASZ.ngc
G21 (All units in mm)
S1000 (speed of the motor is pwm to laser)
G00 X0.0 Y0.0 Z0.0 (laser stays on Z=0 always)
M03 (turn on grbl laser)
G01 X0.0 Y10.0 Z0.000000 F400.000000
G01 X10.0 Y10.0 Z0.000000
G01 X10.0 Y0.0 Z0.000000
G01 X0.0 Y0.0 Z0.000000
M05
G00 X20.0 Y0.0
G91
M04 (turn on grbl laser in "auto" mode)
G01 X0.0 Y10.0 Z0.000000 F400.000000
G01 X10.0 Y0.0 Z0.000000
G01 X0.0 Y-10.0 Z0.000000
G01 X-10.0 Y0.0 Z0.000000
M05
@MARIOBASZ : Nice :) Mine is blaming me crazy.
Thank you! Have you corrected the plugin? Do you want to make your modification? Do you want me to do it?
I've tried, but w/o success. Have no idea of python :) It's enough just to bypass the M commands as they are and as Harvie said :)
following just puts M05 at the end of the file. Not what I need.
bid_block.append(CNC.zsafe()) #<<< Move rapid Z axis to the safe height in Stock Material
bid_block.append("M05 (smooker)")
all_blocks.append(bid_block)
# print "bid", bid_block.name(), bid_block,"*****************"
P.S. What I have to do to insert images here ? ;)
it is that it selects the route, and on it realizes scale, I think that it ignores the line that says m04 m05, it should fix me. At least I will put "select for laser" if it is simpler, until final solution. One question, for when installing a laser: ignore height z, or if you write z-1 low z?
Do not ignore Z, because some people may use it for focus/defocus (increase/decrease the area of the "tool"). Just scale Z too. It'll be up to the user to put the correct scale factor.
with laser you use pocket operation? automatically type m04 m05?
Yes. it's not needed to turn off the laser with M05 for deeper engraving (pocket), but it's ok.
.... My mistake... M05 is mandatory in this case too. :) Principle is: During bridges moving (no matter that Z stays the same) you have to turn off the laser.
I see that you are trying to modify the plugin, Animo! Believe me I barely got some python! experience modifying what I wrote, surely you will be able to do it, but between today and tomorrow I modify it so that it serves you and you do not have to correct the gcode by hand
Place boolean laser field (look at trochoid 3d plugin or helical, I think there is a Boolean field) At the end you must say Zsafe, for no laser and m05 for laser
How BCNC behaves profile, pocket or cut, to know if it is with laser or with milling? (write M03 M05 or write Z safe or Z objective?) Is there any laser / cutter option?
I have added an option for Laser scaling (as long as you do not know how bcnc knows that you should write for laser, it is a solution) @smooker, can you check that everything works correctly?
sorry for the delay. will check later and post the result
I can not see any difference :) Which one is the commit ?
Just a suggestion...
Replaces M04 GRBL laser command with M03 during scale.