Conversation
- added small 'mind map' to gain better understanding of current codebase
…more clear,'pure' functions as much as possible: - extracting state - removing explicit referenced to UI elements - passing explicit parameters when possible - reducing mutations when possible -etc
- seperated segmeents and arcs - moved to sub dir - major cleanup / upgrade of the code : more es6, less three.js (still wip)
- more data moved to 'state' variable - removed redundant code when neeeded - updated arc/segement handling to match their new apis - other various minor cleanups
|
@tbfleming fyi, Mark starting work on porting the gcode viewer to reGL |
|
I can't wait :) |
|
It'd be nice to remove the A axis transform from the parser; that type of transform is better off in a vertex shader. I'm thinking of bringing in jscut's heightmap preview for mill ops. I'll need XYZA values to extend it to 4 axis. |
|
I ported a temporary gcode parser from jscut to help me debug cam. It can only handle what the mill cam currently produces. |
- started adding basics within main index - restructuring of parseLine - lots of stripping out of parseAsChunks (prev pars.js) - etc
- modified parameters of many function to take in the current 'state' - removed/replaced some three.js specific code - adjustement to the api & internals of segments & arc - minor variable renamings for more clarity - some more 'es6' ification - lots of various fixes & tweaks
- cleanup - restructure
|
@tbfleming by XYZA values do you mean essentiall encoding things as vec4 ? Also for the temp parser, I am guessing its this one ? : https://github.com/LaserWeb/LaserWeb4/blob/c7ddfa66330bd7d1d0db0471d05ef94cb46c6681/src/lib/tmpParseGcode.js I finished a first , very rough pass of the "port" of this parser, but I still need to refine the needed output format (amongst other things) . |
|
That's the right file. It returns a 1-d array which looks like this: This type of packing aids the CPU's memory cache. |
|
|
|
Ok , cool, that makes sense, thanks for the infos, that is a nice way to pack things indeed! |
|
a few extra questions @tbfleming if you do not mind :
Somehow I feel like these are questions that should have been asked at the start, in order to avoid me spending time on dead ends, but at the very least it was a bit of GCODE refresher. |
|
This code, which is not part of the parser, reformats the data for the GPU: https://github.com/LaserWeb/LaserWeb4/blob/ee9db9f0adc3b43aebb931cacfd4738bf0163a00/src/components/workspace.js#L100 There will eventually be two versions of this; one for the existing display and one for a display which looks like this: http://jscut.org/RenderPath.html Right now the It already colors it based on the I don't know what the special cases are; I haven't looked closely at that code. |
|
|
This was the Håkan Båstedt commits On Nov 17, 2016 5:22 PM, "Peter van der Walt (Gmail)" <
|
|
I didn't realize RepRap switched to T from the old hack (different letters for different extruder motors). In that case, it would be easy to keep E and T and add them to the visualizer. |
|
Ok, in that case if that is ok with you guys, the new order would indeed be : |
|
yes |
- removed more clutter - modified some of the outputs to match the needed 'fields'
|
The visualizer and temp parser now use [g,x,y,z,e,f,a,s,t]. |
|
Cool thanks @tbfleming ! I think I'll be done with a first pass of this , this week, I have found a few good candidates for replacing all the THREE.js arcs => G1/G0 codes. |
|
I don't. jscut, LW4, and 3d print slicers only produce lines. |
|
I just moved the gcode previewer to Do you have any multi-material 3d printer gcode samples? I'll add multi-material to the previewer and temp parser. |
|
@tbfleming I have one sample generated for the Ultimaker3 (dual extrusion). |
|
I like the idea of sample files repo On Nov 20, 2016 6:38 PM, "Mark Moissette" notifications@github.com wrote:
|
Me too |
|
Neat ! that was fast ! :) |
|
On your topic of G2/G3 breaking up into sections, I came across https://github.com/chamnit/preGrbl/ |

This PR will add all the basic features, unit tested, nothing fancy:
DO NOT MERGE YET !