tbfleming / jscut

In-browser CAM package
http://jscut.org
GNU General Public License v3.0
295 stars 136 forks source link

Safari: Offsets not working #7

Closed cribskip closed 9 years ago

cribskip commented 9 years ago

It seems that offsets are having problems (see also http://www.shapeoko.com/forum/viewtopic.php?f=6&t=3572&start=40). I use grbl 0.9f with Universal G-Code sender 1.0.7 and setting offsets to 'Zero at lower left' does not seem to work correctly. 'Zero at center' neither.

I'm trying to do a pocket operation on a 100mm x 45mm rectangle created in inkscape exported as SVG. Loading the file and creating the pocket just works.

However, when milling it, the mill moves to coordinated too far away.

Would be great if you could take a look into this as jscut is otherwise really really great :)

tbfleming commented 9 years ago

I haven't been able to reproduce this. Could you save settings to Gist and post the link here for me to look at?

cribskip commented 9 years ago

Sure, i created a gist called 'jscut settings issue #7' for this.

I thought again about this. Maybe using G91 (relative movement) may be helpful to avoid miss-zeroing (Just IMHO)

tbfleming commented 9 years ago

What is the gist url? You get the url when you right-click on the "Launch jscut with Gist" link and choose "Copy link address".

cribskip commented 9 years ago

I'm sorry but yet I still don't get it. Where's that link to right-click on? I only found "Launch!" on jscut.org and an example of using stored settings in Gist (not how to create them) :(

tbfleming commented 9 years ago

After you load it and get it to misbehave, do this:

cribskip commented 9 years ago

It'll create an anonymous gist - at least it says so but does not output any link or something. I also can't select 'Open settings' => 'Gist' or something. Trying the Link from jscut.org with ?gist=xxxxx is also impossible as I have not gotten any ID.

However, I uploaded the file to my google drive: https://drive.google.com/file/d/0BxKbb99TdIE9MUhhcWxMR3dSRFE/edit?usp=sharing and this is it's contents: {"svg":{"pxPerInch":"90"},"material":{"units":"mm","thickness":25.4,"zOrigin":"Top","clearance":2.54},"curveToLineConversion":{"minNumSegments":"1","minSegmentLength":2.54},"tool":{"units":"mm","diameter":"2.3","passDepth":"0.3","overlap":0.6,"rapidRate":2540,"plungeRate":127,"cutRate":1016},"operations":{"operations":[{"rawPaths":[{"path":[["M",0,892.91333],["L",354.33072,892.91333],["L",354.33072,1052.36215],["L",0,1052.36215],["L",0,892.9133299999999]],"nonzero":true}],"name":"","units":"mm","enabled":true,"ramp":false,"selected":"on","combineOp":"Union","camOp":"Pocket","direction":"Conventional","cutDepth":"3","margin":"0.0"}]},"gcodeConversion":{"units":"mm","gcodeFilename":"gcode.gcode","offsetX":-1.150112,"offsetY":295.84980199999995}}

tbfleming commented 9 years ago

Here's the gcode it's producing: G21 ; Set units to mm G90 ; Absolute positioning G1 Z2.54 F2540 ; Move to clearance level ... G1 X76.5401 Y21.1597 F2540 G1 Z0.0000 ; plunge G1 Z-0.3000 F127 ; cut G1 X21.1597 Y21.1597 F1016 G1 X21.1597 Y21.5400 ...

The lowest values I see for X and Y are 0. The highest values I see are X97.6998 and Y42.6997, which seem correct. Does this match the gcode you're seeing?

I suspect you're somehow on an older version. Are you using jscut.org directly or the version bundled with grblweb? The one in grblweb is over a week old and is missing both the offset bug fix and the latest Gist support.

tbfleming commented 9 years ago

Scratch what I just wrote. Gist support is broken on Safari. I'm starting to wonder if Safari is messing up in other ways also.

tbfleming commented 9 years ago

Bad news: I can't debug Safari, my iPad doesn't support debugging without tethering to a Mac, which I don't have. Good news: I just tried Internet Explorer. Its Gist support is also broken. I can debug it. Bad news: I can't reproduce the offset problem in Internet Explorer, Chrome, Firefox, or my iPad (Safari).

tbfleming commented 9 years ago

The Gist issue is now fixed. That won't help here because you already posted your settings file.

tbfleming commented 9 years ago

I'm assuming it now works; please reopen if it's still causing you issues.