FullControlXYZ / fullcontrol

Python version of FullControl for toolpath design (and more) - the readme below is best source of information
GNU General Public License v3.0
672 stars 78 forks source link

[FEATURE REQUEST] Add range slider(s) to gcode plotter #72

Open ES-Alexander opened 8 months ago

ES-Alexander commented 8 months ago

Is your feature request related to a problem? Please describe. Viewing design internals is currently difficult, especially for models that are printed solid / with some kind of filling.

Describe the solution you'd like Common slicing software typically provides a range selector of layers that makes it convenient to view the internal components of the tool path.

FullControl does not necessarily have layers, so we likely want something more general (e.g. arbitrary cutting planes parallel to each origin plane), but those still seem useful to control using range selectors. Ideally we would support range selectors for all three origin planes, and/or make some with a variable angle, but we'll need to look into what's readily possible. Z axis (vertical) does seem likely to be the most valuable default, if we can only support one / a limited number.

In an advanced form, we may also include indicators of filled proportion of the print area or something, with an interface similar to PrusaSlicer's variable layer height display.

Describe alternatives you've considered We could instead provide examples for how to add cutting planes to the code or something, but that would then be more complex to use, not dynamic, and less intuitive than just having a selector for the range of interest.

fullcontrol-xyz commented 8 months ago

Very keen to do this! I had a few ideas:

  1. very quick hacky way
    • set axis range in plotly
  2. FullControl design editing/sequencing
    • delete or change points in the design ('cut' lines would need to utilise a travel_to() command)
    • only transform a certain range of steps (steps[10:20])
  3. more 'proper'
    • cut the mesh generated by your part of the code
  4. PlotData editing
    • transform the whole design to plot_data but then animate through the points sequentially, or only include certain points. As with FullControl design editing, this will require some thought about splitting paths into multiple paths and interpolating points.

The first, third and fourth options above can be controlled without needing to regenerate the model, which may be advantageous for a nice responsive plot. But for more complex plots, which may take several seconds to generate it may be most effective to do the sectioning within the plot rather than updating the data that is sent to the plot

It would be really good if the solution could work in colab. But if that severely limits the solution, we could consider alternative plotting packages, or doing magic communication from python to JavaScript plotting libraries or similar.