Open LPBF Buildstylefor Autodesk Fusion
Start here

Create your own toolpaths with your favourite AI tools

The buildstyle is plain, open JavaScript, written to be read. That makes it a good match for AI assistants such as Cursor or Claude Code: they can explain how a feature works, change a default, add a parameter or a whole new hatch pattern. You stay in charge of the result: review the change, compile it in Advanced Toolpath Utility (ATU), build a few layers and look at them.

An AI session with the buildstyle

A narrated session of about two minutes: a prompt in the AI tool, the change in the code, and the new toolpaths in ATU.

Set up

1Get the buildstyle

Clone the repository and create a branch for your changes, so you can always go back:

Terminal
git clone https://github.com/Autodesk/Open-LPBF-Buildstyle.git
cd Open-LPBF-Buildstyle
git checkout -b my-change

2Open it in your AI tool

Cursor. File › Open Folder… and choose the Open-LPBF-Buildstyle folder. Ask in the chat (Agent mode), and the assistant reads and edits the files of the folder.

Claude Code. Start it in the folder:

Terminal
cd Open-LPBF-Buildstyle
claude

A good first prompt lets the assistant find its way around:

Read AGENTS.md and main/main.js and give me a short overview of how this buildstyle creates the vectors of a layer.

The header of main/main.js has a glossary of the LPBF terms and a map of all folders, so the answer is usually good right away.

3Check every change in ATU

The assistant changes the code; ATU runs it. After each change:

  1. Compile
  2. new profile, if a default changed
  3. Execute a few layers
  4. look at the Exposure Preview

Give the assistant what ATU tells you: copy the compile errors or the lines of the Build Style Log into the chat, or paste a screenshot of the Exposure Preview. The getting started page shows each of these steps in ATU.

Review every change before you use the toolpaths: the assistant can be wrong, and a toolpath that compiles can still be wrong. Work on a branch, and keep the default profile as it is.

What the AI can do

Everything that is code. Where it happens, and something to ask:

TaskWhere in the codeAsk for example
Explain a featuremain/exposure_layer.js, lib/exposure/ "How are downskin areas found, and which parameters change them?"
Change a defaultmain/param_groups.js, main/vector_types.js "Make Chessboard the default volume hatch pattern."
Add a parametermain/param_groups.js, main/settings.js, localization/lang_en.json"Add a hatch start offset to the volume hatch."
New hatch patternmain/param_groups.js, lib/params/, lib/exposure/hatch_patterns.js"Add a pattern with concentric rings."
New export formatmain/export_main.js, lib/export/ "Add a filter that writes one CSV file per layer."
Fix an errorthe message in the Build Style Log "ATU says: Invalid parameters: … What is wrong?"

Group, parameter and vector type ids are stored in every profile. Ask the assistant to add new ids rather than rename existing ones, otherwise existing profiles lose their values.

Prompt recipes

Prompts that work well with the buildstyle: what to ask, what you do in ATU afterwards, and what you get.

Understand a feature

Before you change something, find out how it works today.

Explain how the downskin is calculated: which layers are compared, which parameters are used, and in which files. Point me to the lines.

An explanation with file and line references. The downskin page has the same walk through the code for comparison.

Change a default

New profiles should start with a chessboard hatch instead of meander.

Make Chessboard the default volume hatch pattern. Change only the default, nothing else, and show me the diff.
  1. Compile
  2. duplicate default
  3. Execute
  4. check the hatch

A one-line change in main/param_groups.js. Existing profiles keep their pattern; the new copy shows Chessboard.

Add a parameter

A setting that does not exist yet, from the dialog to the laser.

Add a parameter "hatch start offset" (mm, default 0) to the volume hatch group that shifts the hatch lines. Add the English and German texts and a check of the value range.
  1. Compile
  2. new profile
  3. Execute with 0 and 0.05 mm
  4. compare the layers

Edits in param_groups.js, settings.js, exposure_layer.js and the language files, and a new row in the profile dialog.

Fix an error

ATU stops the build with a message you do not understand.

ATU stops with this message in the Build Style Log: [paste the lines]. Find the cause in the code and tell me whether the settings or the code are wrong.
  1. copy the log lines
  2. apply the fix
  3. Compile and Execute again

The reason, for example two settings that do not fit together, and the change that fixes it.

Find out why something is missing

The overhang of a part shows no downskin, and you do not know which setting is to blame.

My overhang has no downskin hatch (blue) in layer 120: [paste a screenshot of the Exposure Preview and the downskin settings]. Which condition in the code is not met?
  1. screenshot of the layer
  2. change the setting
  3. Execute again

The condition and the setting behind it, for example the group switched off or the surface angle too small.

A new export format

Your machine or analysis tool needs its own file format.

Add an export filter that writes one CSV file per layer into a ZIP, with x1, y1, x2, y2, BSID and power of every vector. Reuse the toolpath reader of the existing exporters.
  1. Compile
  2. Execute with Export Data
  3. open the ZIP

A new filter in the Execute dialog. Export formats shows how the existing packages are built.

Give your AI the context

An assistant works better when it knows the rules of the project. The buildstyle repository has an AGENTS.md file that AI tools such as Cursor, Claude Code, Codex and Copilot read automatically (CLAUDE.md points Claude Code to it).