Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify on some requirements for adaptive meshing #6476

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 34 additions & 12 deletions docs/Bed_Mesh.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,14 +372,19 @@ are identified in green.

### Adaptive Meshes

Adaptive bed meshing is a way to speed up the bed mesh generation by only probing
the area of the bed used by the objects being printed. When used, the method will
automatically adjust the mesh parameters based on the area occupied by the defined
print objects.
#### Concept:

Adaptive bed meshing is a way to speed up the bed meshing process as well as waste less mesh information by only probing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "waste less mesh information" mean? What information is being wasted if adaptive is not being used?

Also, a nit: can you please conform to the document's line length?

Copy link
Author

@kyleisah kyleisah Feb 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "waste less mesh information" mean? What information is being wasted if adaptive is not being used?

Well, if you're doing a regular full mesh for a small cube on a big bed, you're really only using 1 probed point and some interpolation rather than all of the probed points fitting to the object being printed.

Also, a nit: can you please conform to the document's line length?

I don't know what I'm doing here, I'm just trying to help out.

the area of the bed that will be used for printing. When used, this method will
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When used, this method will [...]

What I find a bit unclear today: What is the criteria, when adaptive meshing is used? Is it just the presence of [exclude_object] along with named objects in the gcode? What if I wanted to not use adaptive meshing? Would I need to turn off naming objects in the slicer or take out [exclude_object]?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you wanted to not use adaptive meshing, you would just call BED_MESH_CALIBRATE without the ADAPTIVE=1 flag on the command

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I wanted to point out:

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sineos I've just made some updates to the bed_mesh.md for clarification on setup requirements. If this looks okay, I can move forward with making changes to the exclude_object.md about setting up object processing with moonraker.

automatically adjust the mesh parameters based on the area occupied by objects defined by the `EXCLUDE_OBJECT` command. See the [exclude objects guide](Exclude_Object.md) and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually think that the old version ("area occupied by the defined print objects") was a bit better. Talking about how those objects get defined (the EXCLUDE_OBJECTS command) seem more appropriate for the "How it works" section.

[command reference](G-Codes.md#excludeobject)
for additional information.

#### How it works:

The adapted mesh area will be computed from the area defined by the boundaries of all
the defined print objects so it covers every object, including any margins defined in
the configuration. After the area is computed, the number of probe points will be
the [configuration](Config_Reference.md#bed_mesh). After the area is computed, the number of probe points will be
scaled down based on the ratio of the default mesh area and the adapted mesh area. To
illustrate this consider the following example:

Expand Down Expand Up @@ -410,17 +415,34 @@ adaptive_margin: 5

![adaptive_bedmesh_margin](img/adaptive_bed_mesh_margin.svg)

By nature, adaptive bed meshes use the objects defined by the Gcode file being printed.
Therefore, it is expected that each Gcode file will generate a mesh that probes a different
area of the print bed. Therefore, adapted bed meshes should not be re-used. The expectation
#### Caveats:

By nature, adaptive bed meshes use the objects defined by the [exclude_object](Exclude_Object.md) module
in the Gcode file being printed, and it is expected that each Gcode file will generate a mesh that probes a different
area of the print bed. Therefore, adapted bed meshes should **not** be re-used. The expectation
is that a new mesh will be generated for each print if adaptive meshing is used.

It is also important to consider that adaptive bed meshing is best used on machines that can
It is important to consider that adaptive bed meshing is best used on machines that can
normally probe the entire bed and achieve a maximum variance less than or equal to 1 layer
height. Machines with mechanical issues that a full bed mesh normally compensates for may
have undesirable results when attempting print moves **outside** of the probed area. If a
full bed mesh has a variance greater than 1 layer height, caution must be taken when using
adaptive bed meshes and attempting print moves outside of the meshed area.
have undesirable results when attempting print moves **outside** of the probed area. If you
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generally prefer documentation be written in a "neutral" way, without using pronouns. Not sure how to explain it so I'll give an example:

Instead of "If you normally have ...", say "If a printer normally has ...".

normally have a variance greater than 1 layer height when generating a full bed mesh, greater caution
must be taken when attempting print moves outside of the adapted mesh area.

If there are no objects defined by the [exclude_object](Exclude_Object.md) module before the adaptive
bed mesh is requested, the default method will be used instead. If you are requesting an adaptive bed mesh and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"default method" or "default size"?

the default method is still being used, check that you have [exclude_object](Exclude_Object.md) set up correctly, and
that the objects are being defined before the adaptive bed mesh command is executed in your Gcode file.

#### How to use Adaptive Meshes:

- You must have the [exclude_object](Exclude_Object.md) module enabled by adding `[exclude_object]` to your `printer.cfg` file.
- You must enable object labeling in your slicer.
- Certain slicers may do this by default, or do not provide an option because it is an "always-on" feature.
- More modern slicers provide a "Firmware-Specific" option for labeling objects. If you enable this, you'll need to verify that your slicer supports the `klipper` gcode flavor, and is generating `EXCLUDE_OBJECT_DEFINE` commands at the beginning of the sliced gcode file.
- If your slicer does not support firmware-specific object labeling, or does not support the `klipper` gcode flavor, you will need to [configure Moonraker's file manager module](https://moonraker.readthedocs.io/en/latest/configuration/#file_manager) to enable object processing.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...to activate enable_object_processing

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that could use some more clarity. I’ll add that when I get a moment

- Finally, to generate an adaptive bed mesh, you must append the `ADAPTIVE=1` flag to `BED_MESH_CALIBRATE` wherever you normally call for a bed mesh to be generated.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a simple wording like

Call BED_MESH_CALIBRATE ADAPTIVE=1 either from your [START_PRINT](Slicers.md#klipper-gcode_macro) macro or from your slicer's starting Gcode. It is recommended to place this command pretty much at the end of the start-up routine, this means at least after heating up the bed.

would be clearer as these should be the two typical places for a regular user.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that makes sense. I’ll find a spot to work something like this in as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a simple wording like

Call BED_MESH_CALIBRATE ADAPTIVE=1 either from your [START_PRINT](Slicers.md#klipper-gcode_macro) macro or from your slicer's starting Gcode. It is recommended to place this command pretty much at the end of the start-up routine, this means at least after heating up the bed.

would be clearer as these should be the two typical places for a regular user.

There is no guarantee that I user will be using a START_PRINT/PRINT_START macro. They could just be putting all of that in the slicer custom gcode.
It's better to leave it as "... add BED_MESH_CALIBRATE ADAPTIVE=1 to your start GCode".

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, but I do not understand this comment:
grafik

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, but I do not understand this comment: grafik

Oops, sorry! I didn't read the text carefully enough.

- The command should be `BED_MESH_CALIBRATE ADAPTIVE=1` wherever you normally request it.

## Bed Mesh Gcodes

Expand Down
Loading