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

Offline rymaeda

  • Ewok
  • *
  • Posts: 35
    • View Profile
Re: Streamlines plugin V 0.01
« Reply #30 on: July 15, 2025, 05:50:13 am »
Hi!

Sorry for the lack of responses. I ran some tests here and I believe the bug is related to the rotation transformations applied to the squares where the problem occurred. I overwrote those squares using polylines without rotation transformations, and it worked fine (attached). I need to better understand how Cambam’s geometric entities work. I recall having an issue with streamline-box transformations when writing the first version of the program, although I don't remember exactly what was happening. I’ll try to investigate further.

The plugin includes some numerical values that were empirically obtained using tests in the metric system. When used in the imperial system, it’s expected that certain things might not behave exactly as intended, although this doesn’t seem to be directly related to the bug pointed out by Bubba.

Thanks to Bubba and everyone who spent their time on the plugin.

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3376
    • View Profile
Re: Streamlines plugin V 0.01
« Reply #31 on: July 15, 2025, 13:43:37 pm »
Quote
- moving the 2 squares that are not working about 0.001" in Y- .. and OK !

++
David

Wow, moving 0.001" did the trick. Have to remember this.
Thanks David for researching this and post the results.
« Last Edit: July 15, 2025, 21:29:53 pm by dh42 »
My 2¢

Win11, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, 4th Axis, Endurance Laser.

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 9074
    • View Profile
Re: Streamlines plugin V 0.01
« Reply #32 on: July 15, 2025, 14:02:11 pm »
OOPS!  That sounds like a math-precision error.
Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7564
    • View Profile
    • Cambam V1.0 French Doc
Re: Streamlines plugin V 0.01
« Reply #33 on: July 15, 2025, 21:43:14 pm »
+1

We have already seen this kind of problem in the past with mops that did not give right toolpaths until the source drawing object have been moved a small amount in a direction ...

++
David

Offline rymaeda

  • Ewok
  • *
  • Posts: 35
    • View Profile
Re: Streamlines plugin V 0.01
« Reply #34 on: July 28, 2025, 03:17:06 am »
Just to give an update to those who’ve shown interest in the plugin.

I’ve been trying to fix the bug that Bubba pointed out, and based on the math involved and the way the error presents itself, I strongly suspect it’s related to transformations applied to poly-rectangles. Even before this bug was mentioned, I had been considering ways to avoid using CreatePointlistFromPolyline() from the CamBam API. I spent some spare hours chatting with Copilot, who does try to help but isn’t yet fully fluent in the nuances of the API. I searched the forum but couldn’t find any answers. For now, I’m going to organize my thoughts and start asking questions to you all. I just hope it doesn’t take me another five years to get around to it…

Warm regards!

Offline rymaeda

  • Ewok
  • *
  • Posts: 35
    • View Profile
Re: Streamlines plugin V 0.01
« Reply #35 on: August 25, 2025, 00:37:28 am »
I was researching the CamBam API and found the solution to the bug Bubba pointed out. I added the following conversion:
 
if (inpoly.CanConvertToPolylines == true)
     inpoly = inpoly.ConvertToPolylines(true)[0];
 
The argument in `ConvertToPolylines` applies the transformations—and that’s it!

PS: Unfortunately, I'm not able to compile with .NET 4.0, so there's no version available for CamBam 0.98 just for 1.0

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7564
    • View Profile
    • Cambam V1.0 French Doc
Re: Streamlines plugin V 0.01
« Reply #36 on: August 25, 2025, 05:30:26 am »
Hello

Thanks for this update ;)

seems it is not working on the 32 bits version of CamBam (assembly compiled for another CPU) .. not tested on 64 bits version.

Quote
so there's no version available for CamBam 0.98 just for 1.0

not really a problem ;)

++
David

Offline rymaeda

  • Ewok
  • *
  • Posts: 35
    • View Profile
Re: Streamlines plugin V 0.01
« Reply #37 on: August 26, 2025, 00:51:09 am »
Hello

Hi!


Thanks for this update ;)

It's a honor


seems it is not working on the 32 bits version of CamBam (assembly compiled for another CPU) .. not tested on 64 bits version.

Sorry about that, my x64 version install uninstalled the x86 version... so I forget it. And the plugin had problems with 'AnyCPU'.


Quote
so there's no version available for CamBam 0.98 just for 1.0
not really a problem ;)

That's great to know!

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7564
    • View Profile
    • Cambam V1.0 French Doc
Re: Streamlines plugin V 0.01
« Reply #38 on: August 26, 2025, 01:36:55 am »
Hello,

Thanks ;)  tested on V1.0 32 bits and works OK ... but is there a way to define the resolution of the streamlines ? they are very "angular" close to the objects.

plugin webpage updated.

++
David

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4560
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Streamlines plugin V 0.01
« Reply #39 on: August 26, 2025, 23:37:53 pm »
I've been following this thread and plug-in development, and I have a question.  What is the purpose? 

I'm not asking to be sarcastic or cheeky.  Is it a cosmetic thing?  Does it solve a problem? What is the use case? 

As in post one (1) "it was made to some learn and for fun" does it serve no other purpose than as a learning exercise? 

« Last Edit: August 26, 2025, 23:39:42 pm by Bob La Londe »
Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com

Offline rymaeda

  • Ewok
  • *
  • Posts: 35
    • View Profile
Re: Streamlines plugin V 0.01
« Reply #40 on: August 28, 2025, 00:53:53 am »
I've been following this thread and plug-in development, and I have a question.  What is the purpose? 

I'm not asking to be sarcastic or cheeky.  Is it a cosmetic thing?  Does it solve a problem? What is the use case? 

As in post one (1) "it was made to some learn and for fun" does it serve no other purpose than as a learning exercise?

To be honest, I was precise with that phrase. But of course, I believe it could be useful in some CamBam users' toolbox—for creating signs, for example, for a seafood restaurant or a fishing bait company. 😉

On a more serious note, I believe it could be applied in the design of fluid dynamic devices to reduce pressure losses. It might even be useful for academic research—not through CamBam, of course, but the method's source code is attached somewhere around here.

Looking back, on the personal front, I was locked inside during the height of the COVID-19 quarantine—just four months into marriage, with two feisty stepdaughters and a newborn baby girl, and no access to my shop toys... what a time to be alive!

Offline rymaeda

  • Ewok
  • *
  • Posts: 35
    • View Profile
Re: Streamlines plugin V 0.01
« Reply #41 on: August 28, 2025, 01:02:11 am »
Hello,

Thanks ;)  tested on V1.0 32 bits and works OK ...


Fine tks!


but is there a way to define the resolution of the streamlines ? they are very "angular" close to the objects.


Let's dig into it. There is one refinement process and on the other side one simplification process


plugin webpage updated.


Thanks!