gcode-preview icon indicating copy to clipboard operation
gcode-preview copied to clipboard

Is it possible to add heatmaps

Open leotaozeng opened this issue 1 year ago • 6 comments

Hi @remcoder. I'm wondering if it's possible to have heatmaps since I'm not too familiar with three.js. I'd appreciate getting some advice from you. Thank you!

leotaozeng avatar Oct 10 '22 03:10 leotaozeng

Do you mean coloring the line segments according to nozzle temp?

I could create a method to let you colorize the line segments according to the current state, nozzle temp, z-height etc.

What's your usecase?

Op ma 10 okt. 2022 05:36 schreef Leo Zeng @.***>:

Hi @remcoder https://github.com/remcoder. I'm wondering if it's possible to have heatmaps since I'm not too familiar with three.js

— Reply to this email directly, view it on GitHub https://github.com/remcoder/gcode-preview/issues/46, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADQWUTGDYSDRDFGR6PJYX3WCOFKFANCNFSM6AAAAAARA7EZOI . You are receiving this because you were mentioned.Message ID: @.***>

remcoder avatar Oct 10 '22 07:10 remcoder

My use case would be to indicate where there is a weakness in a 3d object.

leotaozeng avatar Oct 10 '22 15:10 leotaozeng

image

leotaozeng avatar Oct 10 '22 15:10 leotaozeng

Maybe you can annotate the GCODE? G1 X2 Y3 E4 ; START HIGHLIGHTED AREA G1 X3 Y4 E5 ; END HIGHLIGHTED AREA G1 X4 Y5 E6

Then the lines between start / end can be rendered in a different color.

Would this work for you?

On Mon, Oct 10, 2022 at 5:15 PM Leo Zeng @.***> wrote:

[image: image] https://user-images.githubusercontent.com/12603244/194899519-df04186c-b856-4d7d-b7dd-a40812a9fae3.png

— Reply to this email directly, view it on GitHub https://github.com/remcoder/gcode-preview/issues/46#issuecomment-1273468976, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADQWUVHHHOPXA7I3AYFYXLWCQXK3ANCNFSM6AAAAAARA7EZOI . You are receiving this because you were mentioned.Message ID: @.***>

remcoder avatar Oct 10 '22 20:10 remcoder

Maybe you can annotate the GCODE? G1 X2 Y3 E4 ; START HIGHLIGHTED AREA G1 X3 Y4 E5 ; END HIGHLIGHTED AREA G1 X4 Y5 E6 Then the lines between start / end can be rendered in a different color. Would this work for you? On Mon, Oct 10, 2022 at 5:15 PM Leo Zeng @.> wrote: [image: image] https://user-images.githubusercontent.com/12603244/194899519-df04186c-b856-4d7d-b7dd-a40812a9fae3.png — Reply to this email directly, view it on GitHub <#46 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADQWUVHHHOPXA7I3AYFYXLWCQXK3ANCNFSM6AAAAAARA7EZOI . You are receiving this because you were mentioned.Message ID: @.>

I can't guarantee that would work for me, but if I can have the method you mentioned before would be more appreciated 🙏🙏

leotaozeng avatar Oct 11 '22 14:10 leotaozeng

Let's take this example:

G1 X2 Y3 E4
; START HIGHLIGHTED AREA
G1 X3 Y4 E5
; END HIGHLIGHTED AREA
G1 X4 Y5 E6

To recognize the highlighted area this is needed:

  • The parser would need to recognize the marker strings and store the line numbers

  • The renderer will need to check for gcode sequences that are interrupted (or intersected) by the markers.

  • Those gcode sequences need to be split and rendered separately (currently they are drawn as a single long continuous line). (this might impact performance somewhat)

  • The highlighted gcodes need to be drawn in a different color. This color is either :

    1. predefined.
    2. passed as a param to the constructor or
    3. part of the marker in gcode (START HIGHLIGHTED AREA RED)

What do you think?

I guess it all depends on where you get the data about the weakness in the 3d model. Is this coming from a CAD program? User input? Machine vision?

And in what form you do get this data? Is the weakness area itself a 3d object? An STL?

remcoder avatar Oct 11 '22 20:10 remcoder

Let's take this example:

G1 X2 Y3 E4
; START HIGHLIGHTED AREA
G1 X3 Y4 E5
; END HIGHLIGHTED AREA
G1 X4 Y5 E6

To recognize the highlighted area this is needed:

  • The parser would need to recognize the marker strings and store the line numbers

  • The renderer will need to check for gcode sequences that are interrupted (or intersected) by the markers.

  • Those gcode sequences need to be split and rendered separately (currently they are drawn as a single long continuous line). (this might impact performance somewhat)

  • The highlighted gcodes need to be drawn in a different color. This color is either :

    1. predefined.
    2. passed as a param to the constructor or
    3. part of the marker in gcode (START HIGHLIGHTED AREA RED)

What do you think?

I guess it all depends on where you get the data about the weakness in the 3d model. Is this coming from a CAD program? User input? Machine vision?

And in what form you do get this data? Is the weakness area itself a 3d object? An STL?

Thank you very much for the response. I think I'll close the issue for now

leotaozeng avatar Oct 25 '22 09:10 leotaozeng

👍🏻

remcoder avatar Oct 25 '22 16:10 remcoder