G-Code Syntax #7605
Replies: 3 comments 2 replies
-
We never remove support for a language or extension so you will need to add it to G-Code, with a heuristic, and samples, assuming the extension meets our usage requirements.
Only if they meet our usage requirements. Any extension that doesn't will block the entire PR.
We expect the grammar file to be in directories specific to the editor they're aimed at. These are the locations we look at: linguist/tools/grammars/compiler/loader.go Lines 119 to 128 in 1d913bb
That's entirely up to you. |
Beta Was this translation helpful? Give feedback.
-
|
@lildude Awesome. Thanks man. Much appreciated. I will get to it. |
Beta Was this translation helpful? Give feedback.
-
|
Not sure if the rigth place but, could you please check the issues with Klipper g-code statements like: EXCLUDE_OBJECT_DEFINE NAME=Cube_id_0_copy_0 CENTER=128.5,128.5 POLYGON=[[117.5,117.5],[139.5,117.5],[139.5,139.5],[117.5,139.5],[117.5,117.5]]Afaik is somethink like Jinja Here a more complex example with slicer variables and math G90 ; use absolute coordinates
M83 ; extruder relative mode
M140 S[bed_temperature_initial_layer_single] ; set final bed temp
M104 S150 ; set temporary nozzle temp to prevent oozing during homing
G4 S10 ; allow partial nozzle warmup
G28 ; home all axis
G1 Z25 F240 ; lift nozzle
G1 X2 Y10 F3000 ; move to front left
M104 S[nozzle_temperature_initial_layer] ; set final nozzle temp
M190 S[bed_temperature_initial_layer_single] ; wait for bed temp to stabilize
M109 S[nozzle_temperature_initial_layer] ; wait for nozzle temp to stabilize
; Start Beep to indicate ready to print
M300 P136 S622
M300 P136 S0
M300 P136 S311
M300 P136 S466
M300 P273 S0
M300 P136 S415
M300 P409 S0
M300 P136 S622
M300 P136 S0
M300 P545 S466
; Purge Line
G1 Z0.28 F240 ; move to a custom layer height for purge
G1 X{first_layer_print_min[0]-15} Y{first_layer_print_min[1]} Z0.8 F6000.0 ; position 15mm left from the lower left of the first layer
G1 X{first_layer_print_min[0]-15} Y{first_layer_print_min[1]+30} E30 F360.0 ; extrude 30mm of filament in the y direction
G92 E0.0 ; reset extruder
G1 E-0.5 F2100 ; small retraction
G1 Y{first_layer_print_min[1]+40} F6000.0 ; move an additional 10mm without extruding
G92 E0.0 ; reset extruder |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @lildude I have been getting back into updating some of my projects on here, and I happened to notice that my vscode extension got listed in here for highlighting in GH. I was going to work on some of the things here in linguist specific to g-code, but wanted to get your feedback first.
.ncextension is linked to nesC right now. I did a little research and it seems to be a somewhat abandoned language and a quick search on here definitely pulls up more G-Code files. Do you recommend my PR to include removing that from the grammers or just adding the extension to the gcode section?Looks like I need to submit a PR over at ACE also to update their grammar for g-code.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions