Author Topic: Streamlines plugin V 0.01  (Read 9819 times)

Offline rymaeda

  • Ewok
  • *
  • Posts: 18
    • View Profile
Streamlines plugin V 0.01
« on: May 29, 2020, 02:06:11 am »
Hi!

This is my first plugin and all the time first C# program, it was made to some learn and for fun (somewhat masochist  ::)) while in quarantine period.

The plugin draws streamlines around shapes (closed polylines). The process can be CPU intensive so it's highly recommended to do the first try with few polylines and few streamlines to be aware of how long the process can be.

Apologize my humble english

Ricardo

some bug fixes e complementations 06/june.
« Last Edit: June 07, 2020, 22:22:49 pm by rymaeda »

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5296
  • Made in England
    • View Profile
Re: Streamlines plugin V 0.01
« Reply #1 on: May 29, 2020, 14:43:54 pm »
Works fine with CamBam 1.0 64bit, is this the final product or is it first stage in something bigger ?

Did the John Sharp book help ?
Filmed in Supermarionation

Offline rymaeda

  • Ewok
  • *
  • Posts: 18
    • View Profile
Re: Streamlines plugin V 0.01
« Reply #2 on: May 29, 2020, 16:06:38 pm »
Hello, Eddy C!

Yes the John# helps a lot it's my base text, but I used one Udemy course too.

Everithing else, Cambam API, comes from this forum, thanks very much to you (and David, Carlo, etc).

and yes, it's already the final product, indeed needing some minor improvements.


Ricardo

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5296
  • Made in England
    • View Profile
Re: Streamlines plugin V 0.01
« Reply #3 on: May 29, 2020, 16:57:15 pm »
Even though I read the pdf I failed to see that the number entered into the Polyline 'Tag' field  was the number of streamlines to draw, but now I know.
Filmed in Supermarionation

Offline rymaeda

  • Ewok
  • *
  • Posts: 18
    • View Profile
Re: Streamlines plugin V 0.01
« Reply #4 on: June 07, 2020, 22:25:42 pm »
Even though I read the pdf I failed to see that the number entered into the Polyline 'Tag' field  was the number of streamlines to draw, but now I know.

Apologize the inconvenience, in truth this information was just barely sugested. Manual fixed. Thanks!!!

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7482
    • View Profile
    • Cambam V1.0 French Doc
Re: Streamlines plugin V 0.01
« Reply #5 on: July 22, 2020, 03:56:11 am »
Hello

I like it  ;D

++
David

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7482
    • View Profile
    • Cambam V1.0 French Doc
Re: Streamlines plugin V 0.01
« Reply #6 on: July 31, 2020, 00:07:27 am »
Hello

I'm playing with the plugin (and translating the doc to French)

I fall on a bug that appears randomly  with a drawing (see attachment) depending of the number of streamlines to draw.

Also, if, for a "brand new" polyrectangle no value is given in the Tag property, we get the "Select at least one Stream Polyline Box." alert message, but if the polyrectangle have had a value but the value as been deleted for any reason, we get another message as in attachment.

I'll add the plugin to the plugin Website when translation was finished.

----
just for info for the "Group" plugin users:

don't do like me, I didn't understand why I couldn't copy my shape sets to do another test in another location ... and it's just that you have to erase the numeric value first in the "Tag" property of the polyrectangle before making the copy, otherwise the 2 polyrectangles are "grouped" and we cannot move them separately ... oops !!  ;D

++
David

 

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 5296
  • Made in England
    • View Profile
Re: Streamlines plugin V 0.01
« Reply #7 on: July 31, 2020, 17:39:50 pm »
Hello

just for info for the "Group" plugin users:

don't do like me, I didn't understand why I couldn't copy my shape sets to do another test in another location ... and it's just that you have to erase the numeric value first in the "Tag" property of the polyrectangle before making the copy, otherwise the 2 polyrectangles are "grouped" and we cannot move them separately ... oops !!  ;D

++
David

In the Group plugin there are options (icons) for, Group, Ungroup,  Add to group, Remove from group, Copy group.

It's better to use those rather than hand editing the object Tag.
« Last Edit: July 31, 2020, 17:42:04 pm by EddyCurrent »
Filmed in Supermarionation

Offline rymaeda

  • Ewok
  • *
  • Posts: 18
    • View Profile
Re: Streamlines plugin V 0.01
« Reply #8 on: August 02, 2020, 01:35:25 am »
Hello, David


I'm playing with the plugin (and translating the doc to French)


What a great honor!!!!!!


I fall on a bug that appears randomly  with a drawing (see attachment) depending of the number of streamlines to draw.


This is due the misuse of the method originally designed to calculate pressures around aerodynamics profiles. I have dreamed up some possible fix to this issue.


Also, if, for a "brand new" polyrectangle no value is given in the Tag property, we get the "Select at least one Stream Polyline Box." alert message, but if the polyrectangle have had a value but the value as been deleted for any reason, we get another message as in attachment.


This looks "just" poor implementation  :-\ (I'll address this bug soon)


I'll add the plugin to the plugin Website when translation was finished.


Wow!! Fine!!

Your efforts are in this humble piece of software too.

Thanks a lot.

Ricardo

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7482
    • View Profile
    • Cambam V1.0 French Doc
Re: Streamlines plugin V 0.01
« Reply #9 on: August 02, 2020, 03:25:59 am »
Hello,

Quote from: EddyCurrent
It's better to use those rather than hand editing the object Tag.

Yep, it's what I did ;)
It would be fine if we can have, as on AutoCAD, a toolbar button that allow to disable/enable the groups, so we can just disable temporarily the Group recognition to move a shape of the group without the others, then enable the Group again ...  ;D

Plugin added to the Web site ;)
https://cambamcnc.com/forum/index.php?topic=4886.msg68992#msg68992

I also seen that we can get interesting effects with open polylines ;)

I would be fine if you can add something to cancel calculation if too long  ;)

++
David

Offline rymaeda

  • Ewok
  • *
  • Posts: 18
    • View Profile
Re: Streamlines plugin V 0.01
« Reply #10 on: August 06, 2020, 00:24:40 am »
Olá!


Plugin added to the Web site ;)
https://cambamcnc.com/forum/index.php?topic=4886.msg68992#msg68992

Fine, thanks!

I also seen that we can get interesting effects with open polylines ;)

Glad to know you are playing with.

Dumbest bug Cool feature: open polylines  ;)

I would be fine if you can add something to cancel calculation if too long  ;)

I think that one snippet shared by Mr.Current can solve this.

My quarantine period ceased so as soon as possible I will work on plugin again.

Be secure!

Ricardo

Offline rymaeda

  • Ewok
  • *
  • Posts: 18
    • View Profile
Re: Streamlines plugin V 0.02
« Reply #11 on: July 06, 2025, 03:08:48 am »
Hi!

Caught up in conversations with Copilot, I decided to revisit some improvements in my plugin’s code. Actually, the story started a bit earlier, when Copilot helped me properly configure the project in Visual Studio — which took some effort, considering it had been five years since I last worked on it.

I still haven’t managed to compile it with .NET Framework 4.0, so I suspect the plugin doesn’t run on CamBam 0.98. But with Copilot's help, I did manage to implement some important enhancements: streamline simplification using the Douglas-Peucker method and multithreaded processing. All of that in just a few hours.

As a result, the plugin's performance improved significantly. I’m still planning to tweak the code a bit more — and who knows, maybe even venture into 3D next.

And now Copilot translates my messages too.

Best regards!

PS: Just adding to what I previously shared: beyond the plugin itself, what struck me most was realizing how AI can bridge the gap between an idea and actual code — even for someone who isn’t fluent in the language.

I'm not an experienced C# programmer, but with Copilot’s assistance I was able to implement real improvements, understand algorithms, and solve long-standing issues with far more clarity. Achieving solid technical results in just a few hours, after five years away from the project, showed me the potential of this kind of tool.

The plugin may not be widely used, but the experience was truly meaningful — proving that AI can expand the autonomy of anyone who wants to learn, experiment, or simply bring an idea to life.
« Last Edit: July 06, 2025, 03:27:17 am by rymaeda »

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7482
    • View Profile
    • Cambam V1.0 French Doc
Re: Streamlines plugin V 0.01
« Reply #12 on: July 06, 2025, 21:00:07 pm »
Hello

Thanks for this update  ;D

++
David

Offline rymaeda

  • Ewok
  • *
  • Posts: 18
    • View Profile
Re: Streamlines plugin V 0.01
« Reply #13 on: July 09, 2025, 01:10:00 am »
Hello

Thanks for this update  ;D

++
David

Je t’en prie, c’était un plaisir !
Avec l'IA, je peux écrire en anglais, en français, et même en C#. ;D


Some additional improvements:
- A cancel button
- A progress bar
- The option to choose the linear system solver method (sometimes the ultra-fast Jacobi method appears to produce inconsistent results that compromise the entire process; in such cases, Gauss elimination is the alternative).

Edit removed the attached file. 10/jul/25
« Last Edit: July 10, 2025, 23:09:08 pm by rymaeda »

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7482
    • View Profile
    • Cambam V1.0 French Doc
Re: Streamlines plugin V 0.01
« Reply #14 on: July 09, 2025, 21:22:41 pm »
Hello

Plugin Website updated ;)

It will be fine if you can set the version number into the dll, It is always labeled 1.0.0.0

On the Website, I labeled this last version 2.1 by default.

++
David