Simulate a G-code Bookmark

Create and analyze a three-layer G-code bookmark with Claude Code and a browser.

Introduction

30 Second Summary

A design can look complete on screen while its movement instructions tell a tool to trace empty space. A simulator reveals that gap before any machine becomes involved.

In this project, you will create a readable raw G-code file for an Asanoha-inspired bookmark using Claude Code. You will load it directly into G-Code Modifier for a three-layer simulation that stays on your Mac.

What You'll Build

You will press play to watch a virtual toolhead trace a 40 x 140 mm border surrounding five connected six-sided motifs across three aligned layers.

By the end of this project, you'll have:

  • See travel versus extrusion at a glance as gray moves sit beside colored paths in one viewer.
  • Replay three layers move by move while the virtual toolhead traces five aligned motifs.
  • Run visual analysis with PLA in an open chamber to inspect overlays plus finding cards.
  • Secret Mission: Add a fourth layer that raises only the center motif.

Are there any prerequisites?

You need a Mac with Claude Code already installed under your existing paid Claude plan. Safari 15+ needs WebGL2 support. No 3D printer, slicer, filament, or additional purchase is required.

Before We Start

Before any hands-on work, commit to creating a virtual Asanoha bookmark on your Mac for simulation only. Its G-code is never transferred to, uploaded to, or run on a physical printer.

Set Up a Safe Simulation Workspace

Raw G-code can carry machine instructions. A reviewable workspace keeps every proposed change under your control before any file exists.

You will verify Claude Code in macOS Terminal. You will also prove that Safari 15+ can render G-Code Modifier through WebGL2.

In this step, get ready to:
  • Confirm your installed Claude Code version in macOS Terminal.
  • Run Claude Code in Manual permission mode.
  • Verify G-Code Modifier in Safari 15+ with its three-panel interface visible.
Confirm Claude Code is available

A version check confirms that this Terminal session can reach your existing Claude Code installation. The output gives you a concrete success signal before you start an interactive session.

  • Press Command-Space bar to open Spotlight.
  • Type Terminal into Spotlight.
  • Select Terminal from the search results.
  • Confirm your Claude Code version by running this command:
claude --version

What does this command do?

The --version flag asks Claude Code to report its installed version. This confirms that the command is available in your current Terminal environment.

You should see a version number followed by (Claude Code). Good, your Terminal session can reach Claude Code.

No version output?

  • Close macOS Terminal if the command produces no version output.
  • Reopen macOS Terminal through Spotlight.
  • Run the version check again.

Help me troubleshoot why my existing Claude Code installation is unavailable in macOS Terminal.

Switch Claude Code to Manual mode

Manual permission mode pauses proposed file changes for your review. This keeps Claude Code from turning generated machine instructions into local files without your approval.

  • Start an interactive Claude Code session by running this command:
claude

What does this command do?

This command starts an interactive Claude Code session inside macOS Terminal. The running session is where you control how proposed changes are handled.

  • Press Shift+Tab until the session shows Manual.
  • Keep the Claude Code session running in macOS Terminal.

The session should now show Manual. You now control the point where AI output becomes a local file.

Permission mode not changing?

  • Click inside the macOS Terminal window to restore keyboard focus.
  • Press Shift+Tab again.
  • Confirm that the interactive Claude Code session is still active.

Help me switch my active Claude Code session to Manual permission mode.

Verify G-Code Modifier in Safari

Client-side processing keeps later G-code files on your Mac. The simulator's 3D view needs WebGL2. Safari must meet the 15+ minimum.

Why G-Code Modifier?

G-Code Modifier can load plain G-code directly for layer inspection and playback. This keeps your attention on movement commands.

The Preview workflow in Bambu Studio begins after slicing a model. That adds slicer setup that this raw-command lesson does not need.

  • Press Command-Space bar to open Spotlight.
  • Type Safari into Spotlight.
  • Select Safari from the search results.
  • Click Safari in the macOS menu bar.
  • Click About Safari.
  • Read the version shown in the window.

✔️ Safari meets the requirement

A Safari version of 15 or higher meets the browser requirement for this project.

  • Keep Safari open for the simulator setup.

ⓧ Safari is too old

Safari updates arrive through macOS updates. Update time depends on the release available for your Mac.

  • Save any unrelated work before installing a macOS update.
  • Open Apple's official macOS update guide.
  • Install the compatible update offered for your Mac.
  • Reopen Safari after your Mac restarts.
  • Check About Safari again.

ⓧ Safari is unavailable

Safari is included with macOS. Software Update provides compatible updates for built-in apps.

  • Open Apple's official macOS update guide.
  • Install the compatible update offered for your Mac.
  • Open Safari through Spotlight after the update finishes.
  • Check About Safari before continuing.
  • Close the About Safari window.
  • Click the Safari address bar.
  • Enter https://little-did-i-know.github.io/Gcode/.
  • Press Return.
  • Open the firmware profile dropdown.
  • Select Bambu Lab.

Before the final check, predict whether your two tools now provide both review control and a rendered three-panel workspace.

  • Switch back to macOS Terminal.
  • Confirm that the Claude Code session still shows Manual.
  • Return to Safari.
  • Inspect the left side for the layer navigator.
  • Inspect the center for the code or visual view.
  • Inspect the right side for the modification panel.

You should see the layer navigator on the left. You should also see the code or visual view in the center.

The modification panel on the right completes the three-panel interface. Your browser workspace is ready for a local G-code file.

Page missing one of the three areas?

  • Confirm that Safari meets the 15+ minimum.
  • Reload the G-Code Modifier page.
  • Select the Bambu Lab firmware profile again.

Help me troubleshoot why G-Code Modifier is not showing its three-panel interface in Safari.

Your review controls and browser renderer are ready. Next, you will create the first simulation-only bookmark frame and load it into the viewer.

Draw a Travel-Only Bookmark Frame

Your safe simulation workspace is ready. Every proposed file change remains reviewable in Claude Code's Manual mode.

A raw coordinate outline gives you the fastest way to test the bookmark's size before adding detail. G-Code Modifier will reveal how it classifies movement without extrusion values.

In this step, get ready to:
  • Create the local bookmark.gcode file with simulation-only safeguards.
  • Review every proposed file change before approving it.
  • Load the file to observe how the viewer classifies the rectangle.
Define the travel-only coordinates

G-code describes movement through short commands with coordinates. This first file contains a single rectangular layer inside the planned 40 x 140 mm envelope.

  • Switch back to your Claude Code session in macOS Terminal.
  • Ask Claude Code to create the asanoha-gcode-sim folder inside your Documents folder.
  • Ask Claude Code to create ~/Documents/asanoha-gcode-sim/bookmark.gcode using this exact content:
; SIMULATION ONLY - DO NOT SEND TO A PRINTER
; No homing, heating, calibration, networking, upload, or machine start/end routines are included
; Visualization envelope: X70..110, Y20..160, Z0.2
; Travel-only coordinates for visual simulation

G21
G90
M83

; CHANGE_LAYER
; Z_HEIGHT: 0.2
; LAYER_HEIGHT: 0.2
G0 Z0.200 F600
; FEATURE: Outer wall travel-only frame
G0 X70.000 Y20.000 F6000
G1 X110.000 Y20.000 F1200
G1 X110.000 Y160.000 F1200
G1 X70.000 Y160.000 F1200
G1 X70.000 Y20.000 F1200

; END SIMULATION-ONLY TOOLPATH

What Does This G-code Do?

  • The opening comments lock the file to simulation use.
  • The G21 command sets coordinate measurements to millimeters.
  • The G90 command selects absolute positioning for the X, Y, and Z coordinates.
  • The M83 command selects relative extrusion for any future E values.
  • The layer comments give the viewer a Z height of 0.2 mm.
  • The coordinate moves trace a rectangle from X70 to X110 within Y20 to Y160.
Keep the file inside the safety boundary

Reviewing machine instructions can feel high stakes. This approval only creates a local text file on your Mac.

  • Confirm the requested path is exactly ~/Documents/asanoha-gcode-sim/bookmark.gcode.
  • Compare Claude Code's proposed file content with the code above.
  • Reject any proposal that adds homing, heating, calibration, networking, upload, printer start, or printer end commands.
  • Approve the proposed folder creation after the safety checks pass.
  • Approve the proposed file creation after the content matches.
  • Keep Claude Code in Manual mode.

You have kept the machine boundary intact. Claude Code has created only the local simulation artifact you reviewed.

  • Choose the second tab if you want to compare every line in the completed file.

✔️ Awesome, I've got everything!

Your reviewed file is in place. The next check happens entirely inside the browser.

ⓧ I'd like to double check the full code

; SIMULATION ONLY - DO NOT SEND TO A PRINTER
; No homing, heating, calibration, networking, upload, or machine start/end routines are included
; Visualization envelope: X70..110, Y20..160, Z0.2
; Travel-only coordinates for visual simulation

G21
G90
M83

; CHANGE_LAYER
; Z_HEIGHT: 0.2
; LAYER_HEIGHT: 0.2
G0 Z0.200 F600
; FEATURE: Outer wall travel-only frame
G0 X70.000 Y20.000 F6000
G1 X110.000 Y20.000 F1200
G1 X110.000 Y160.000 F1200
G1 X70.000 Y160.000 F1200
G1 X70.000 Y20.000 F1200

; END SIMULATION-ONLY TOOLPATH

What Should Match?

  • The four opening comments define the simulation boundary.
  • The setup commands appear in the order G21, G90, and M83.
  • The layer starts at Z 0.2.
  • The rectangle closes at its starting coordinate of X70 and Y20.
Reveal how the viewer classifies the frame

G-Code Modifier parses the coordinate sequence before drawing it. Visual view turns that sequence into a path you can inspect.

  • Switch back to the G-Code Modifier tab in Safari.
  • Use the file input in the left panel to select bookmark.gcode from ~/Documents/asanoha-gcode-sim.
  • Confirm the center view shows the G-code text from your file.

Before you switch views, do you think the rectangle will render as a colored extrusion path or as a gray travel path?

  • Press Space to switch from Code view to Visual view.
  • Fit the full rectangle inside the center view using the camera controls.

You should see a 40 x 140 mm rectangle. Every perimeter segment is gray.

That result is exactly the intended checkpoint. Your coordinates parsed successfully while the viewer exposed the missing extrusion signal.

Frame Missing or Colored?

  • Reload the exact bookmark.gcode file if the rectangle does not appear.
  • Confirm the Bambu Lab firmware profile remains selected.
  • Compare your file with the full-code reference if any segment appears colored.

Help me diagnose my travel-only G-code frame.

Why Is the Frame Gray?

G0 positions the virtual toolhead at the starting corner. G1 traces the remaining perimeter coordinates.

M83 prepares the file for relative extrusion. No movement line in this version contains a positive E value.

G-Code Modifier therefore classifies every segment as a travel move. It renders travel moves gray.

Colored lines are reserved for extrusion moves. That contrast turns a missing extrusion signal into visible evidence.

Your coordinate plan has passed its first visual check. Next, you will turn the gray frame into a colored extrusion path before adding the first motif.

Turn Travels into Extrusion Paths

Your gray frame proved that G-Code Modifier can parse the bookmark coordinates. The all-gray result exposed the missing extrusion signal.

In this step, Claude Code will add positive per-move E values through relative extrusion. You will also add the first six-sided motif.

In this step, get ready to:
  • Add positive relative E values to the G-code frame.
  • Draw the first Asanoha-inspired motif with extrusion paths.
  • Reload the file to compare colored extrusion paths with gray travel moves.
Add relative extrusion to the frame

With M83 active, each positive E value applies only to its current move. An XY move with positive extrusion renders as a colored path.

  • Switch back to the Claude Code session in Terminal.
  • Ask Claude Code to revise only the simulation metadata comments plus the frame block in bookmark.gcode.
  • Tell Claude Code to preserve the setup command order shown below.
  • Tell Claude Code to use the exact positive E values from the reference below.
  • Tell Claude Code to keep every G0 move free of an E value.
  • Use this target snippet as the exact reference for the change:
; SIMULATION ONLY - DO NOT SEND TO A PRINTER
; No homing, heating, calibration, or machine start/end routines are included
; Visualization envelope: X70..110, Y20..160, Z0.2..0.6
; Feedrates and E values are visualization values, not calibrated print settings

G21
G90
M83

; CHANGE_LAYER
; Z_HEIGHT: 0.2
; LAYER_HEIGHT: 0.2
G0 Z0.200 F600
; FEATURE: Outer wall
G0 X70.000 Y20.000 F6000
G1 X110.000 Y20.000 E1.400 F1200
G1 X110.000 Y160.000 E4.900 F1200
G1 X70.000 Y160.000 E1.400 F1200
G1 X70.000 Y20.000 E4.900 F1200

What Does This G-Code Do?

  • The opening comments keep the simulation-only boundary visible inside the file.
  • G21 keeps the coordinate units in millimeters.
  • G90 keeps every XYZ position absolute.
  • M83 treats each E value as a per-move extrusion distance.
  • G0 moves reposition the virtual toolhead without extrusion.
  • G1 lines use positive E values to make the four frame edges visible as extrusion.
  • Compare Claude Code's proposed diff with the reference above.
  • Reject any proposal that adds commands outside the reference.
  • Approve the local file edit once every proposed line matches.
  • In Finder, navigate to ~/Documents/asanoha-gcode-sim.
  • Drag bookmark.gcode into the G-Code Modifier tab in Safari.

The rectangle should now render in color. Gray should remain on the moves that position the virtual toolhead.

That is the first conversion done: your frame now carries a visible extrusion signal.

Frame Still Completely Gray?

  • Confirm that you reloaded the edited copy of bookmark.gcode from the asanoha-gcode-sim folder.
  • Check that each frame G1 line has the positive E value shown above.
  • Check that M83 remains immediately after G90.

Help me diagnose why my updated G-code frame still appears gray.

Add the first Asanoha motif

The first motif combines a six-sided perimeter with three crossing diameters. Repositioning between separate lines uses G0.

  • Return to the Claude Code session from earlier.
  • Ask Claude Code to insert the first motif immediately after the existing frame block.
  • Specify the motif center as X90 Y34.
  • Require a six-sided perimeter plus three crossing diameters.
  • Require G0 for every repositioning move.
  • Require G1 with the exact positive E values below for every visible motif line.
  • Use this motif block as the exact reference for the change:
; MOTIF 1 - CENTER Y34
G0 X90.000 Y22.000 F6000
G1 X104.000 Y28.000 E0.533 F1200
G1 X104.000 Y40.000 E0.420 F1200
G1 X90.000 Y46.000 E0.533 F1200
G1 X76.000 Y40.000 E0.533 F1200
G1 X76.000 Y28.000 E0.420 F1200
G1 X90.000 Y22.000 E0.533 F1200
G1 X90.000 Y46.000 E0.840 F1200
G0 X104.000 Y28.000 F6000
G1 X76.000 Y40.000 E1.066 F1200
G0 X104.000 Y40.000 F6000
G1 X76.000 Y28.000 E1.066 F1200

How Is the Motif Constructed?

  • The first six G1 moves trace the complete six-sided perimeter.
  • The next G1 move draws the vertical diameter through the center.
  • The following G0 moves reposition the virtual toolhead at the ends of the diagonal paths.
  • The final two G1 moves draw the crossing diagonals.
  • Compare the proposed motif with the reference block above.
  • Confirm that Claude Code leaves the frame block unchanged.
  • Approve the local file edit once the motif matches exactly.

✔️ Awesome, I've got everything!

Your file now contains the colored frame plus the complete first motif.

ⓧ I'd like to double check the full code

; SIMULATION ONLY - DO NOT SEND TO A PRINTER
; No homing, heating, calibration, or machine start/end routines are included
; Visualization envelope: X70..110, Y20..160, Z0.2..0.6
; Feedrates and E values are visualization values, not calibrated print settings

G21
G90
M83

; CHANGE_LAYER
; Z_HEIGHT: 0.2
; LAYER_HEIGHT: 0.2
G0 Z0.200 F600
; FEATURE: Outer wall
G0 X70.000 Y20.000 F6000
G1 X110.000 Y20.000 E1.400 F1200
G1 X110.000 Y160.000 E4.900 F1200
G1 X70.000 Y160.000 E1.400 F1200
G1 X70.000 Y20.000 E4.900 F1200

; MOTIF 1 - CENTER Y34
G0 X90.000 Y22.000 F6000
G1 X104.000 Y28.000 E0.533 F1200
G1 X104.000 Y40.000 E0.420 F1200
G1 X90.000 Y46.000 E0.533 F1200
G1 X76.000 Y40.000 E0.533 F1200
G1 X76.000 Y28.000 E0.420 F1200
G1 X90.000 Y22.000 E0.533 F1200
G1 X90.000 Y46.000 E0.840 F1200
G0 X104.000 Y28.000 F6000
G1 X76.000 Y40.000 E1.066 F1200
G0 X104.000 Y40.000 F6000
G1 X76.000 Y28.000 E1.066 F1200

; END SIMULATION-ONLY TOOLPATH
Reload and compare the moves

G-Code Modifier assigns color to extrusion moves. Gray lines identify travel moves that carry no positive E value.

Before you reload the file, which segments do you expect to stay gray?

  • Switch back to G-Code Modifier in Safari.
  • Reload bookmark.gcode by dragging it from ~/Documents/asanoha-gcode-sim into the viewer.
  • Press Space to switch to Visual view.

The rectangular frame plus the complete motif should be colored. The repositioning moves should remain gray.

You have now turned coordinate geometry into a visible extrusion path while preserving travel moves for repositioning.

Motif Missing or Partly Gray?

  • Reload the copy of bookmark.gcode stored inside ~/Documents/asanoha-gcode-sim.
  • Compare the motif lines with the full-file reference above.
  • Confirm that the Bambu Lab firmware profile remains selected.
  • Confirm that only G0 repositioning moves omit E values.

Help me diagnose a missing or partly gray motif.

Your first motif now behaves like an extrusion path in the simulator. Next, you will repeat the coordinate pattern across five positions plus three aligned layers.

Build the Three-Layer Asanoha Pattern

Your colored frame now proves that positive relative extrusion produces visible paths in G-Code Modifier. Your first six-sided motif also proves that the coordinate pattern works.

One motif demonstrates the motion semantics. The finished bookmark needs repeated geometry across three aligned layers to demonstrate a reusable G-code pattern.

In this step, get ready to:
  • Complete Layer 0 with five aligned motifs.
  • Repeat the complete geometry at Z heights 0.4 plus 0.6.
  • Verify that all three layers remain aligned inside the bookmark frame.
Complete the first layer

The first motif provides the coordinate template for the remaining four motifs. Claude Code can repeat that template at new Y positions while preserving its X coordinates.

  • Switch back to the Claude Code session in macOS Terminal.
  • Ask Claude to complete only Layer 0 in ~/Documents/asanoha-gcode-sim/bookmark.gcode by matching Layer 0 in the project’s Complete Code section exactly.
  • Tell Claude to keep motif 1 centered at X90 with Y center 34.
  • Tell Claude to add motif centers at Y positions 62, 90, 118, plus 146.
  • Tell Claude to keep every X coordinate between 70 plus 110.
  • Review the proposed diff in Manual mode.
  • Confirm that motifs 2 through 5 appear before ; END SIMULATION-ONLY TOOLPATH.
  • Approve the local edit to bookmark.gcode.

How does the coordinate pattern repeat?

Every motif keeps the same X coordinates. Each repeated block shifts its Y coordinates upward by 28 millimeters.

The outer motifs stay inside the frame because their lowest and highest points remain between Y20 and Y160. This creates consistent spacing without changing the six-sided shape.

  • Return to G-Code Modifier in Safari.
  • Drop the revised bookmark.gcode onto the page.
  • Press Space if the center panel shows Code view.

You should see five colored motifs arranged from the bottom to the top of the frame. The gray repositioning lines should remain visible between extrusion paths.

Missing or distorted motifs?

  • Check that each motif block begins with a gray G0 repositioning move.
  • Check that every drawn line uses a positive E value on its G1 move.
  • Compare the Y coordinates with the Complete Code section to find any shifted point.

Ask for help comparing my five Layer 0 motifs with the Complete Code.

Repeat the geometry across three layers

A layer marker tells the viewer where a new Z height begins. Each new layer needs its own complete frame plus all five motifs.

  • Switch back to the Claude Code session in macOS Terminal.
  • Ask Claude to duplicate the complete Layer 0 geometry under exact layer markers for Z 0.4 plus Z 0.6.
  • Ask Claude to match the project’s Complete Code section exactly.
  • Tell Claude to place both new layer blocks before ; END SIMULATION-ONLY TOOLPATH.
  • Review the proposed diff in Manual mode.
  • Confirm that the first new block contains ; Z_HEIGHT: 0.4.
  • Confirm that the second new block contains ; Z_HEIGHT: 0.6.
  • Approve the local edit to bookmark.gcode.

What defines each layer?

  • The exact ; CHANGE_LAYER marker starts a new layer boundary.
  • The ; Z_HEIGHT marker records the new layer’s height.
  • The G0 Z move places the virtual toolhead at that height.
  • The repeated outer wall plus motif blocks keep the visible geometry aligned.
  • Return to G-Code Modifier in Safari.
  • Drop the revised bookmark.gcode onto the page.
  • Press Space if you need to switch to Visual view.

The layer navigator should now list three layers. The combined toolpath should appear taller because the same geometry exists at three Z heights.

Only seeing one layer?

  • Check that both new blocks begin with the exact ; CHANGE_LAYER marker.
  • Check that the Z height lines use 0.4 plus 0.6.
  • Reload the revised local file because the browser does not automatically read later file edits.

Ask for help finding why G-Code Modifier detects fewer than three layers.

Verify the aligned pattern

Before you inspect the finished simulation, predict what should stay fixed as you move between Z 0.2, 0.4, plus 0.6.

  • Use the layer arrows or slider to select the layer at Z 0.2.
  • Use the same control to select the layer at Z 0.4.
  • Use the same control to select the layer at Z 0.6.
  • Inspect the frame boundaries at each selected height.
  • Inspect the five motif centers at each selected height.

You should see the same 40 x 140 mm frame plus five aligned motifs on all three layers. Gray G0 travels should remain distinct from colored positive-E extrusion paths.

Layers not lining up?

  • Compare each layer’s outer wall with the X70 to X110 plus Y20 to Y160 frame coordinates.
  • Compare each motif center with Y positions 34, 62, 90, 118, plus 146.
  • Restore any mismatched block from the full reference below.

Ask for help locating the coordinate mismatch between my three layers.

✔️ Awesome, I've got everything!

Great work. Save the final local file after confirming that all three layers stay aligned.

ⓧ I'd like to double check the full code

Compare your local bookmark.gcode with this complete three-layer reference.

; SIMULATION ONLY - DO NOT SEND TO A PRINTER
; No homing, heating, calibration, or machine start/end routines are included
; Visualization envelope: X70..110, Y20..160, Z0.2..0.6
; Feedrates and E values are visualization values, not calibrated print settings

G21
G90
M83

; CHANGE_LAYER
; Z_HEIGHT: 0.2
; LAYER_HEIGHT: 0.2
G0 Z0.200 F600
; FEATURE: Outer wall
G0 X70.000 Y20.000 F6000
G1 X110.000 Y20.000 E1.400 F1200
G1 X110.000 Y160.000 E4.900 F1200
G1 X70.000 Y160.000 E1.400 F1200
G1 X70.000 Y20.000 E4.900 F1200

; MOTIF 1 - CENTER Y34
G0 X90.000 Y22.000 F6000
G1 X104.000 Y28.000 E0.533 F1200
G1 X104.000 Y40.000 E0.420 F1200
G1 X90.000 Y46.000 E0.533 F1200
G1 X76.000 Y40.000 E0.533 F1200
G1 X76.000 Y28.000 E0.420 F1200
G1 X90.000 Y22.000 E0.533 F1200
G1 X90.000 Y46.000 E0.840 F1200
G0 X104.000 Y28.000 F6000
G1 X76.000 Y40.000 E1.066 F1200
G0 X104.000 Y40.000 F6000
G1 X76.000 Y28.000 E1.066 F1200

; MOTIF 2 - CENTER Y62
G0 X90.000 Y50.000 F6000
G1 X104.000 Y56.000 E0.533 F1200
G1 X104.000 Y68.000 E0.420 F1200
G1 X90.000 Y74.000 E0.533 F1200
G1 X76.000 Y68.000 E0.533 F1200
G1 X76.000 Y56.000 E0.420 F1200
G1 X90.000 Y50.000 E0.533 F1200
G1 X90.000 Y74.000 E0.840 F1200
G0 X104.000 Y56.000 F6000
G1 X76.000 Y68.000 E1.066 F1200
G0 X104.000 Y68.000 F6000
G1 X76.000 Y56.000 E1.066 F1200

; MOTIF 3 - CENTER Y90
G0 X90.000 Y78.000 F6000
G1 X104.000 Y84.000 E0.533 F1200
G1 X104.000 Y96.000 E0.420 F1200
G1 X90.000 Y102.000 E0.533 F1200
G1 X76.000 Y96.000 E0.533 F1200
G1 X76.000 Y84.000 E0.420 F1200
G1 X90.000 Y78.000 E0.533 F1200
G1 X90.000 Y102.000 E0.840 F1200
G0 X104.000 Y84.000 F6000
G1 X76.000 Y96.000 E1.066 F1200
G0 X104.000 Y96.000 F6000
G1 X76.000 Y84.000 E1.066 F1200

; MOTIF 4 - CENTER Y118
G0 X90.000 Y106.000 F6000
G1 X104.000 Y112.000 E0.533 F1200
G1 X104.000 Y124.000 E0.420 F1200
G1 X90.000 Y130.000 E0.533 F1200
G1 X76.000 Y124.000 E0.533 F1200
G1 X76.000 Y112.000 E0.420 F1200
G1 X90.000 Y106.000 E0.533 F1200
G1 X90.000 Y130.000 E0.840 F1200
G0 X104.000 Y112.000 F6000
G1 X76.000 Y124.000 E1.066 F1200
G0 X104.000 Y124.000 F6000
G1 X76.000 Y112.000 E1.066 F1200

; MOTIF 5 - CENTER Y146
G0 X90.000 Y134.000 F6000
G1 X104.000 Y140.000 E0.533 F1200
G1 X104.000 Y152.000 E0.420 F1200
G1 X90.000 Y158.000 E0.533 F1200
G1 X76.000 Y152.000 E0.533 F1200
G1 X76.000 Y140.000 E0.420 F1200
G1 X90.000 Y134.000 E0.533 F1200
G1 X90.000 Y158.000 E0.840 F1200
G0 X104.000 Y140.000 F6000
G1 X76.000 Y152.000 E1.066 F1200
G0 X104.000 Y152.000 F6000
G1 X76.000 Y140.000 E1.066 F1200

; CHANGE_LAYER
; Z_HEIGHT: 0.4
; LAYER_HEIGHT: 0.2
G0 Z0.400 F600
; FEATURE: Outer wall
G0 X70.000 Y20.000 F6000
G1 X110.000 Y20.000 E1.400 F1200
G1 X110.000 Y160.000 E4.900 F1200
G1 X70.000 Y160.000 E1.400 F1200
G1 X70.000 Y20.000 E4.900 F1200

; MOTIF 1 - CENTER Y34
G0 X90.000 Y22.000 F6000
G1 X104.000 Y28.000 E0.533 F1200
G1 X104.000 Y40.000 E0.420 F1200
G1 X90.000 Y46.000 E0.533 F1200
G1 X76.000 Y40.000 E0.533 F1200
G1 X76.000 Y28.000 E0.420 F1200
G1 X90.000 Y22.000 E0.533 F1200
G1 X90.000 Y46.000 E0.840 F1200
G0 X104.000 Y28.000 F6000
G1 X76.000 Y40.000 E1.066 F1200
G0 X104.000 Y40.000 F6000
G1 X76.000 Y28.000 E1.066 F1200

; MOTIF 2 - CENTER Y62
G0 X90.000 Y50.000 F6000
G1 X104.000 Y56.000 E0.533 F1200
G1 X104.000 Y68.000 E0.420 F1200
G1 X90.000 Y74.000 E0.533 F1200
G1 X76.000 Y68.000 E0.533 F1200
G1 X76.000 Y56.000 E0.420 F1200
G1 X90.000 Y50.000 E0.533 F1200
G1 X90.000 Y74.000 E0.840 F1200
G0 X104.000 Y56.000 F6000
G1 X76.000 Y68.000 E1.066 F1200
G0 X104.000 Y68.000 F6000
G1 X76.000 Y56.000 E1.066 F1200

; MOTIF 3 - CENTER Y90
G0 X90.000 Y78.000 F6000
G1 X104.000 Y84.000 E0.533 F1200
G1 X104.000 Y96.000 E0.420 F1200
G1 X90.000 Y102.000 E0.533 F1200
G1 X76.000 Y96.000 E0.533 F1200
G1 X76.000 Y84.000 E0.420 F1200
G1 X90.000 Y78.000 E0.533 F1200
G1 X90.000 Y102.000 E0.840 F1200
G0 X104.000 Y84.000 F6000
G1 X76.000 Y96.000 E1.066 F1200
G0 X104.000 Y96.000 F6000
G1 X76.000 Y84.000 E1.066 F1200

; MOTIF 4 - CENTER Y118
G0 X90.000 Y106.000 F6000
G1 X104.000 Y112.000 E0.533 F1200
G1 X104.000 Y124.000 E0.420 F1200
G1 X90.000 Y130.000 E0.533 F1200
G1 X76.000 Y124.000 E0.533 F1200
G1 X76.000 Y112.000 E0.420 F1200
G1 X90.000 Y106.000 E0.533 F1200
G1 X90.000 Y130.000 E0.840 F1200
G0 X104.000 Y112.000 F6000
G1 X76.000 Y124.000 E1.066 F1200
G0 X104.000 Y124.000 F6000
G1 X76.000 Y112.000 E1.066 F1200

; MOTIF 5 - CENTER Y146
G0 X90.000 Y134.000 F6000
G1 X104.000 Y140.000 E0.533 F1200
G1 X104.000 Y152.000 E0.420 F1200
G1 X90.000 Y158.000 E0.533 F1200
G1 X76.000 Y152.000 E0.533 F1200
G1 X76.000 Y140.000 E0.420 F1200
G1 X90.000 Y134.000 E0.533 F1200
G1 X90.000 Y158.000 E0.840 F1200
G0 X104.000 Y140.000 F6000
G1 X76.000 Y152.000 E1.066 F1200
G0 X104.000 Y152.000 F6000
G1 X76.000 Y140.000 E1.066 F1200

; CHANGE_LAYER
; Z_HEIGHT: 0.6
; LAYER_HEIGHT: 0.2
G0 Z0.600 F600
; FEATURE: Outer wall
G0 X70.000 Y20.000 F6000
G1 X110.000 Y20.000 E1.400 F1200
G1 X110.000 Y160.000 E4.900 F1200
G1 X70.000 Y160.000 E1.400 F1200
G1 X70.000 Y20.000 E4.900 F1200

; MOTIF 1 - CENTER Y34
G0 X90.000 Y22.000 F6000
G1 X104.000 Y28.000 E0.533 F1200
G1 X104.000 Y40.000 E0.420 F1200
G1 X90.000 Y46.000 E0.533 F1200
G1 X76.000 Y40.000 E0.533 F1200
G1 X76.000 Y28.000 E0.420 F1200
G1 X90.000 Y22.000 E0.533 F1200
G1 X90.000 Y46.000 E0.840 F1200
G0 X104.000 Y28.000 F6000
G1 X76.000 Y40.000 E1.066 F1200
G0 X104.000 Y40.000 F6000
G1 X76.000 Y28.000 E1.066 F1200

; MOTIF 2 - CENTER Y62
G0 X90.000 Y50.000 F6000
G1 X104.000 Y56.000 E0.533 F1200
G1 X104.000 Y68.000 E0.420 F1200
G1 X90.000 Y74.000 E0.533 F1200
G1 X76.000 Y68.000 E0.533 F1200
G1 X76.000 Y56.000 E0.420 F1200
G1 X90.000 Y50.000 E0.533 F1200
G1 X90.000 Y74.000 E0.840 F1200
G0 X104.000 Y56.000 F6000
G1 X76.000 Y68.000 E1.066 F1200
G0 X104.000 Y68.000 F6000
G1 X76.000 Y56.000 E1.066 F1200

; MOTIF 3 - CENTER Y90
G0 X90.000 Y78.000 F6000
G1 X104.000 Y84.000 E0.533 F1200
G1 X104.000 Y96.000 E0.420 F1200
G1 X90.000 Y102.000 E0.533 F1200
G1 X76.000 Y96.000 E0.533 F1200
G1 X76.000 Y84.000 E0.420 F1200
G1 X90.000 Y78.000 E0.533 F1200
G1 X90.000 Y102.000 E0.840 F1200
G0 X104.000 Y84.000 F6000
G1 X76.000 Y96.000 E1.066 F1200
G0 X104.000 Y96.000 F6000
G1 X76.000 Y84.000 E1.066 F1200

; MOTIF 4 - CENTER Y118
G0 X90.000 Y106.000 F6000
G1 X104.000 Y112.000 E0.533 F1200
G1 X104.000 Y124.000 E0.420 F1200
G1 X90.000 Y130.000 E0.533 F1200
G1 X76.000 Y124.000 E0.533 F1200
G1 X76.000 Y112.000 E0.420 F1200
G1 X90.000 Y106.000 E0.533 F1200
G1 X90.000 Y130.000 E0.840 F1200
G0 X104.000 Y112.000 F6000
G1 X76.000 Y124.000 E1.066 F1200
G0 X104.000 Y124.000 F6000
G1 X76.000 Y112.000 E1.066 F1200

; MOTIF 5 - CENTER Y146
G0 X90.000 Y134.000 F6000
G1 X104.000 Y140.000 E0.533 F1200
G1 X104.000 Y152.000 E0.420 F1200
G1 X90.000 Y158.000 E0.533 F1200
G1 X76.000 Y152.000 E0.533 F1200
G1 X76.000 Y140.000 E0.420 F1200
G1 X90.000 Y134.000 E0.533 F1200
G1 X90.000 Y158.000 E0.840 F1200
G0 X104.000 Y140.000 F6000
G1 X76.000 Y152.000 E1.066 F1200
G0 X104.000 Y152.000 F6000
G1 X76.000 Y140.000 E1.066 F1200

; END SIMULATION-ONLY TOOLPATH

How to compare the file

Check the layer markers first. Then compare the outer wall plus five motif blocks within each layer.

The file should end immediately after the final simulation-only marker. Matching this reference gives the viewer one complete geometry block at each Z height.

You now have a complete three-layer Asanoha bookmark with five aligned motifs at every height. Next, you will replay the toolpath move by move before examining its analysis findings.

Simulate and Analyze the Toolpath

Your three aligned layers now form a complete Asanoha bookmark in G-Code Modifier. Gray travel moves remain distinct from colored extrusion paths.

A static view can hide the command sequence. It can also hide structural weaknesses.

In this step, you will use toolpath playback to expose every move. You will then use visual analysis to turn the geometry into inspectable findings.

In this step, get ready to:
  • Replay the complete three-layer toolpath move by move.
  • Run a medium-depth PLA analysis with the chamber set to open.
  • Capture two screenshots as evidence of the completed simulation.
Replay the complete toolpath

Playback reveals the order hidden by a static view. The speed control lets you slow the sequence around the motifs.

Before playback starts, make a mental prediction about whether the outer frame or a motif appears first.

  • Return to the Visual view in G-Code Modifier.
  • Press P to start the move-by-move simulation.
  • Move the speed slider to a pace that lets you follow each path.
  • Watch the progress bar until playback reaches the end of the third layer.

You'll see the outer frame trace before the five motifs on each layer. Gray G0 repositioning remains separate from colored positive-E G1 extrusion.

  • Press Shift-Command-4 to show the screenshot crosshair.
  • Drag the crosshair around the center visual view with the complete bookmark in frame.
  • Release the crosshair to save the toolpath screenshot locally.

You now have your first piece of evidence. The complete three-layer path has played in command order.

Playback not moving?

  • Confirm bookmark.gcode is still loaded in the G-Code Modifier page from earlier.
  • Confirm the Visual view is active.
  • Raise the speed slider above its lowest position.

Ask for help with a playback that stays paused or skips the loaded toolpath.

Run a medium-depth analysis

The analysis pass examines the loaded geometry for patterns worth reviewing. Its findings give you another way to evaluate the simulation.

  • Press 9 to open the Analysis tab.
  • Select PLA for the material.
  • Choose open for the chamber type.
  • Move the analysis depth control into the 34-66% medium range.

This medium-depth pass usually takes roughly four seconds. A brief pause is expected while the browser processes the path.

Before you run the pass, make a mental prediction about whether the repeated motifs produce one finding or several.

  • Click Run Analysis.

You'll see finding cards appear below the overlay selector when the pass completes. The exact findings can vary with the current analysis.

No finding cards appearing?

  • Confirm PLA remains selected.
  • Confirm the chamber type remains open.
  • Keep the analysis depth within 34-66%.

Ask for help with an analysis pass that finishes without showing finding cards.

Inspect the overlay and capture the result

An overlay maps a selected analysis view onto the rendered path. Finding cards provide details about what the pass detected.

Before selecting an overlay, picture which part of the repeated geometry may attract the analysis.

  • Select one overlay from the overlay selector.
  • Inspect at least one finding card below the selector.

You'll see the selected overlay on the rendered bookmark. At least one finding card remains available for inspection below it.

Why can the findings differ?

Analysis reflects the current geometry. The live app can also affect the exact cards shown.

Your checkpoint is a completed pass with one inspected overlay plus one inspected card.

  • Press Shift-Command-4 to show the screenshot crosshair.
  • Drag the crosshair around the selected overlay or visible finding cards.
  • Release the crosshair to save the analysis screenshot locally.

That closes the evidence loop. You now have local proof of the three-layer playback plus its browser-based analysis.

Secret mission

Secret Mission: Raise the Center Motif

Your three complete layers create a uniform bookmark. This extension adds a fourth layer that traces only the center motif at Z 0.8, giving the simulation a selective raised detail.

Clean Up Your Resources

Clean Up Your Resources

This project leaves one local folder plus two screenshots on your Mac. G-Code Modifier processing creates no cloud resources or ongoing costs.

Resources you used:

  • The local project folder ~/Documents/asanoha-gcode-sim containing bookmark.gcode.
  • One clean local toolpath screenshot.
  • One clean local analysis screenshot.

Keep everything running

No action needed. Choose this if you want to keep reviewing the bookmark simulation.

  • Keep ~/Documents/asanoha-gcode-sim in place for future experiments.
  • Keep both screenshots as evidence of your toolpath analysis.

Your local files stay available without creating an ongoing cost.

Pause - I'll come back to this later

End the active sessions while preserving every local project artifact.

  • Close the G-Code Modifier tab in Safari.
  • End the active Claude Code session by pressing Ctrl+C in Terminal.
  • Keep ~/Documents/asanoha-gcode-sim unchanged.
  • Keep both screenshots in their saved locations.

The simulation can be resumed later from the same bookmark.gcode file.

Delete - I don't want to use this again

Remove every local project artifact to start fresh. Deleting the project folder with this command bypasses Trash.

  • Remove ~/Documents/asanoha-gcode-sim by running this command:
rm -rf ~/Documents/asanoha-gcode-sim

What does this command remove?

This command permanently removes the asanoha-gcode-sim folder plus everything stored inside it.

Your screenshots remain untouched because their saved locations are outside the known project folder.

  • Move the toolpath screenshot to Trash from its saved location.
  • Move the analysis screenshot to Trash from its saved location.
  • Empty Trash to remove both screenshots permanently.
  • Close the G-Code Modifier tab in Safari.
  • End the active Claude Code session by pressing Ctrl+C in Terminal.

The final check confirms that the project folder no longer exists on your Mac.

  • Press Cmd+Space to open macOS search.
  • Type Finder into the search field.
  • Press Enter to open Finder.
  • Select Documents in the Finder sidebar.

You should no longer see asanoha-gcode-sim inside Documents. That cleanup is complete: the project folder plus both evidence screenshots are gone.

Still see project files?

  • Check that the path in Terminal exactly matches ~/Documents/asanoha-gcode-sim.
  • Run the removal command again if the folder remains in Finder.
  • Help me troubleshoot local cleanup on macOS.

Nice Work!

Nice Work!

You did it! Your raw G-code Asanoha bookmark now renders four layers in G-Code Modifier. The center motif rises above the three complete base layers.

You've learned how to:

  • Create a reviewable simulation artifact in bookmark.gcode with Claude Code in Manual permission mode.
  • Control XYZ moves with G90 absolute positioning. Control positive per-move extrusion with M83 relative extrusion.
  • Replay the three-layer toolpath move by move. Inspect PLA analysis findings for an open chamber in the analysis overlay.
  • Secret Mission: Add a selective fourth layer at Z0.800 that traces only the raised center motif.

Ready to quiz yourself?