Comments (12)
I changed the init.py script for Bettergrblsupport that I run in on_event so that I initialize minX and minY to 100000 and maxX and maxY to -100000. Then I calculate x from float(match.groups(1) [0]) rather than x+float(match.groups(1) [0]). (And similar for y.)
After doing this, the size calculations are correct, even with the origin is not the center. In my case, because of the way my machine is set up, it's more convenient for the origin to be the bottom left. So this change causes the size to be correct.
I could make a change and check it in somwhere here, if that's helpful to synman.
from octoprint-bettergrblsupport.
I always use the center of a project as my origin. I had a similar issue to your description when I forgot to set Lightburn to use the center as origin. It was set for left front origin, so the size was reported as many times the actual size of my project. I changed Lb, re-saved the gcode and all was well.
from octoprint-bettergrblsupport.
I always use the center of a project as my origin. I had a similar issue to your description when I forgot to set Lightburn to use the center as origin. It was set for left front origin, so the size was reported as many times the actual size of my project. I changed Lb, re-saved the gcode and all was well.
so all I have to do is use center start and i am good?. Dang. I am going to try that tomorrow
from octoprint-bettergrblsupport.
sorry for the delay guys... life has gotten in the way of my hobbies lately. attach your change here, submit a pull request ... however you want to get it to me and I'll make sure it gets integrated back into master.
from octoprint-bettergrblsupport.
I checked changes in here:
https://github.com/AlligatorFate/Octoprint-Bettergrblsupport
Please let me know if there's a better way. Only 1 file changed.
from octoprint-bettergrblsupport.
This is going to require some testing as I suspect what you've effectively done is change the calculation to respond to absolute positioning rather than relative positioning.
We may need to keep track of the Grbl Positioning mode for this cover all use cases. While this may work for your machine, I doubt it will work with mine.
Some additional thoughts. I never thought to test Lightburn positioning other than center. I'll have to play with that.
@AlligatorFate what "slicer" are you using? Am also curious why you needed to cast the regex extraction to float before the final cast to int.
from octoprint-bettergrblsupport.
G90 vs G91 -- should be a good place to start for further testing
https://gcodetutor.com/gcode-tutorial/g90-g91-gcode.html
from octoprint-bettergrblsupport.
ok, you guys have me going today.... Check out some of things I always do as part of "my workflow".
I think this is a big part of the problem.... this is my workflow.... not necessarily yours :)
First notice where I always place images Lightburn:
Second, notice how I configure my start position:
I'm thinking the Start From is more at play here than Job Origin. I could swear I tested various job origins... What I have not deviated from is I always use "Current Position" as my Start From.
I believe we can probably fix this by keeping track of the positioning mode. G90 will require absolutes (always taking the last value entered --- hence not accumulating the value). G91 will require accumulation as was originally developed.
from octoprint-bettergrblsupport.
It is GCODE like this that is throwing off the calculation:
from octoprint-bettergrblsupport.
@synman: Yes, I'm using absolute positioning, G90 with a local coordinate system. I'm using FreeCAD Path workbench to generate the gcode. I'm using CNC, not laser. Yeah, I see where you're going with keeping the positioning mode. Might be just a switch between methods based on the state.
I understand the risk that an arc could go outside the box since the code only considers G1 or G0. In practice (so far) that hasn't been much of a problem. But yeah. The G3 gives the endpoint as X, Y, Z. So a slight improvement would be to just consider G3 along with G0 and G1. But still a chance the arc curves out of the box. I'd still rather have an "approximate" bounding box rather than none. (Of course I may change my mind on that with experience....) I'd rather have the arcs than the box.
from octoprint-bettergrblsupport.
I'm working on a fix at this moment.
First up is tracking positioning mode ... simple enough to do so by keeping track of the last G90 / G91.
G3/G4 support was inadvertently already in place with the existing regex. I've always assumed it's okay to ignore IJR / etc because all we really care about are the min and max stops of X and Y.
It's rather silly fix truth be told.... basically:
if relative positioning:
x = x + float(match.groups(1)[0])
else
x = float(match.groups(1)[0])
from octoprint-bettergrblsupport.
this fix is working well with neje example provided
@lathemaster I'm assuming I've at least got your dimensions in the ball park now.
from octoprint-bettergrblsupport.
Related Issues (20)
- version needs to be updated in release 2.2.2 HOT 8
- Issue when upgrading HOT 3
- Easier jogging - joystick and keyboard? HOT 10
- Clean up Feed Hold and Cycle Start/Resume Handling
- Invalid Argument Error on install HOT 10
- Grbl Settings Mismatch between GrblHAL and Grbl_Esp32 HOT 1
- cant have 3D printer and laser cutter on same Raspberry Pi. HOT 2
- Managing offsets and baby stepping HOT 3
- Rest API? HOT 1
- ability to convert inches to mm HOT 3
- can only have one printer profile HOT 1
- Octoprint 1.9 - Bettergrbl wont work at all? HOT 21
- Add support for X/Y position before Z probe HOT 3
- OctoPrint 1.9.0 Broke Better GRBL Support HOT 2
- Octoprint GRBL help HOT 1
- Xtool D1 - Controls Grayed out HOT 4
- Missing Tabs after switching to 3d-printer HOT 4
- GRBL Settings -- No settings appear HOT 3
- Oddities when rebooting / reconnecting to ESP32 XPro V5 Controller
- Octoprint 1.8.6 Error when installing plugin HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octoprint-bettergrblsupport.