Very slow performance of magnetic field lines based script

I’m experimenting with magnetic field lines based geometry. The processing time is very high. Rhino+Gh freezes for 10-15 minutes. When the time exceeds this limit I force close it using the task manager. What should I do to speed up the process?

Magnetic_field (11.9 KB)

My system specs are

Intel core i7-8th gen processor-8750H, 2.20 GHz
230 GB SSD, Samsung EVO 970, nvme. Rhino is installed on this drive.
1 TB Hard drive
4GB Nvidia GeForce GTX 1050Ti graphics card

The accuracy setting here is set very small relative to the spacing of your points, which is why you are needing so many steps.
For this scale it looks like you can set it to 10 instead of 0.1 without any noticeable change in the result, meaning you only need to take 100th as many steps to get the same length of curves.

1 Like

What do you do with this magnetic field?

1 Like

Thanks. I’ll try this out and re-post here. I am not in front of my laptop right now.

I would like to explore design possibilities like these.

1 Like

Thanks @DanielPiker , the method significantly boosts up speed. What is the meaning of accuracy in the field lines component?

I’m just guessing. Let’s say accuracy is set to 0.1 and number of steps is 100, so this means that 100 steps will be taken to achieve a length of 0.1 units?

I haven’t actually used these field line components much myself, but I believe the ‘accuracy’ is essentially the step size. It won’t be the length of each segment directly, since that also depends on the strength of the field at that point, but higher values will give bigger steps.

1 Like