Retrieve the bounding box of the currently loaded GCode
See original GitHub issueIssue Description
I’m working on #32 (more like a modern widget port of https://github.com/kreso-t/cncjs-kt-ext in React) and I’m facing a problem calculating the area that the probing should commence. I currently can’t see any easy way to get the bounding box of the currently loaded GCode (xmin
, xmax
, ymin
, ymax
). They are calculated in https://github.com/cncjs/cncjs/blob/master/src/app/widgets/Visualizer/Visualizer.jsx#L968 but I’ve got no way of extracting that data from my widget - pubsub used in https://github.com/cncjs/cncjs/blob/master/src/app/widgets/GCode/index.jsx#L218-L247 can’t be used by a widget, as the pubsub from what I understand is process-local and can’t be accessed by an external widget (so I’d have to integrate my widget in CNCjs, which might not be of your liking).
Is there something I’m missing? Can I interact with the pubsub API as a mounted widget (like the boilerplate one)? Maybe I should open a PR exposing this data about the gcode in the gcode:load
event?
EDIT: Repo: https://github.com/dzervas/cncjs-widget-autoleveler - the README is irrelevant for the time being
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Look at the commit history…
Yikes, the ol’ maintenance problem… Is the project “halted” in terms of maintenance?