Skip to content

Load and show tool geometry / info in the 3D viewer#685

Draft
Lyrkan wants to merge 10 commits into
Carvera-Community:developfrom
Lyrkan:add-tool-geometry-visualization
Draft

Load and show tool geometry / info in the 3D viewer#685
Lyrkan wants to merge 10 commits into
Carvera-Community:developfrom
Lyrkan:add-tool-geometry-visualization

Conversation

@Lyrkan

@Lyrkan Lyrkan commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Related to #419

I'll add some more details here when I get the time to do so but this PR adds a way to extract tools information from the comments added by CAMs post-processors in order to display them and have more accurate representations in the 3D viewer.

The idea is that for each supported post-processor we would just have to need to add a specific parser in carveracontroller/addons/tool_visualization/parsers/ that detects tool descriptions comments and convert them to a common ToolDefinition object.

For now I only created one for Fusion as a proof-of-concept (edit: also added something for Makera Studio) using the current post-processor format (which will probably need to be improved to replace localized string by constants, and maybe add a few extra parameters if we can such as thread pitch/diameter). @faecorrigan Since you worked a lot on post-processors does it sounds like a good way to handle that? Do all of them allow to expose at least some basic info?

The tools icons are only displayed if a parser detected at least one tool description and if there is enough space for them. The images could probably be improved since I didn't spend a lot of time on them.

I also added some tooltips on those buttons to display more details about each tool.

Some screenshots:

Tooltip on hover (screenshot doesn't show the cursor but it's on the first button):
image

Manual tool change modal (screenshot is not up to date):
tools-viz-popin

Ball endmill:
tools-viz-ball-nose-v3

Chamfer (or any kind of pointy) endmill:
tools-viz-chamfer-v3

Flat-end endmill:
tools-viz-flat-v3

Radius endmill:
tools-viz-radius-v3

Thread endmill:
tools-viz-thread-v3

Lollipop endmill:
tools-viz-lollipop-v3

Tapered endmill:
tools-viz-tapered-v3

Using Makera Studio format:
tools-viz-makera-v3

@SergeBakharev

Copy link
Copy Markdown
Contributor

I like the approach.

It would be good to have the tool description in the popup for manual tool loading on the non-atc machines

@Lyrkan

Lyrkan commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

It would be good to have the tool description in the popup for manual tool loading on the non-atc machines

Yep, that's a good idea, I implemented a first version of it.

I also added a parser for Makera Studio based on the few samples of gcode files I've seen posted on Discord (so it's probably wrong on some things but hard to verify without access to it).

They seem to contain more info than what we currently have for Fusion (shank diameter and flute length for instance), which makes it a bit easier since we don't have to guess or make up values.

@Lyrkan

Lyrkan commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

Added support for the flute/shoulder/shank length transitions in the generated mesh.

I also made it so the flute part of the mesh is now colored differently (gold) than the rest of the tool (which is now gray instead of blue).

Of course for Fusion most of those dimensions come from heuristics since we only know a few values (diameter, corner radius and taper angle). With the Makera Studio format it's working quite well though:

tools-viz-makera-v3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants