Skip to content

Commit

Permalink
updated readme to represent intelligent cam changes
Browse files Browse the repository at this point in the history
Updated segment grouping logic to group non planar & planar more effectively
  • Loading branch information
AndyEveritt committed May 29, 2020
1 parent d983b88 commit f1c6e2f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 deletions.
29 changes: 9 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ See [Operation Setup](#operation-setup) for more details.

#### **Key Understanding Point**

This program separates each of the CAM operations into segments separated by local maximas in tool height (ie retracts).
This program separates each of the CAM operations into segments separated by motion type (cutting, lead-in, plunge, etc.).

> **This is key to understanding how to CAM a model effectively. Below are guidelines but they may not work for every situation.
> Use this overview to understand what to look for when setting up the CAM operations.**
Each of these segments is then classified as either planar or non-planar.
Each of the `cutting` segments are then classified as either planar or non-planar.

* Planar segments are where the cutting happens on the XY plane.
* Non-planar segments also cut in the Z axis.
Expand All @@ -239,26 +239,15 @@ The height of each segment is determined:
* For planar segments, it is the minimum height the cutter is active.
* For non-planar segments, it is the maximum height the cutter is active.

All the non-planar segments of an operation are then grouped to maintain their order. The layer height at which the
segment or group of segments needs to occur is calculated.
Consequetive cutting segments are then grouped if they have the same height as the previous segment. Consequetive segments are also groupsd if they are non planar.

> The height of a group of non-planar segments is the maximum cutting height of all of the segments in the group.
For each group, any prior `lead-in` segments and post `lead-out` segments are found and added to the group respectively. A `CamGcodeLayer` is created containing every segment between the first and last segment in the group for all motion types.

The segments and groups of segments merged with the additive layers by sorting all additive and subtractive segments by layer height.
Retracts are automatically added between each `CamGcodeLayer` to ensure the tool does not collide with the part.

> **Because CAM operations are separated into segments by local maximas in tool height, it is vital that the tool retracts between every layer, otherwise the operation will be considered non-planar and it could result in the cutter or tool body colliding with your part.**
Below are examples of a good operation and a bad operation. The only difference is the `linking` settings.

In this operation the tool retracts after every layer. It will be properly segmented and inserted at the correct location.

<img src="docs/usage/images/fusion_cam_good_retract.png" width=480>

The same operation with different `linking` settings can result in the following. 2 of the layers do not retract between them, this will cause those layers to be treated as a single segment and it will cut before the part has been printed.

<img src="docs/usage/images/fusion_cam_bad_retract.png" width=480>

> **Always inspect the gcode with travel moves turned on after it has been generated. This program reorders a sgnificant proportion of the gcode, it can happen that a single missing/wrong line causes the tool to pass through the model, this is unlikely if sticking with planar operations but a possibility when using non-planar**
> **Always inspect the gcode with travel moves turned on after it has been generated. This program reorders a significant proportion of the gcode, and replaces Fusion360's default retracts & travel moves.**
>
> It can happen that a single missing/wrong line in the toolpath causes the tool to pass through the model, this is unlikely if sticking with planar operations but a possibility when using non-planar
<br>
<br>
Expand Down Expand Up @@ -356,7 +345,7 @@ Arg (long) | Arg (short) | Default | Usage

To run the program, ensure the `config.json` is configured correctly, then run the `ASMBL.exe`

The program will output the file with a name according the the config settings in the `output` folder. (An output folder will be created in the same directory if one does not exist)
The program will output the file with a name according the the config settings in the `output` folder. (An output folder will be created in the same directory as the `.exe` if one does not exist)

>**Always preview the generated gcode in Simplify3D before attempting to print it**
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/cam_operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Angled overhangs can be CAM'd using offset faces. See the example [here](../../e

## 2D Contour

> **Uses**: Can be used for vertical walls if you can't get the retracts to cooperate using 3D contour
> **Uses**: Can be used for vertical walls where you may want more control that with a 3D contour
* `Tool`
* Select/create a cutting tool with appropriate dimensions for what is installed on you ASMBL machine
Expand Down
1 change: 1 addition & 0 deletions src/ASMBL_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def group_cam_segments(self, segments, name, strategy, tool):
# TODO logic needs fixing to deal with non planar and planar segments in same operation
if cutting_segment.height == cutting_height or cutting_segment.planar is False:
cutting_group.append(cutting_segment)
cutting_height = cutting_segment.height
else:
cutting_height = cutting_segment.height

Expand Down

0 comments on commit f1c6e2f

Please sign in to comment.