Spline problems

Spline problems

dinocoglitore
Advocate Advocate
589 Views
3 Replies
Message 1 of 4

Spline problems

dinocoglitore
Advocate
Advocate

Hi all, I write for clarification and help regarding a behavior of the sketchFittedSplines.

Several years ago (2016) I wrote an add-in (made available to the community) for the creation of a helix.

The attached images show the result of a simple example of the application:helix 2016helix 2016loft_2016.JPGpipe_2016.JPGsweep.JPG

 

Its course, realized with a spline, results homogeneous and without discontinuity in the whole path.

zoom_2016.JPG

 

 

 

 

 

 

 

 

 

This smooth course allowed me to create models of various types on it, using sweeps, lofts and pipes. As you can see from the attached figures.

 

Now I have re-tried that old project to take up some ideas of models that had remained in the drawer. I have not modified the script in any way. But ……..

 

Unfortunately I see that the behavior has changed strangely. The spline is no longer sweet and harmonious but presents at each cycle a cusp that prevents me from exploiting the path as a path to realize any 3D model.

 

helix_2019.JPGzoom_2019.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

At each cycle there is now a cusp with a double tangent in the point.

When I try to create a simple pipe, there is an error as shown below:

pipe_2_2019.JPG

error_pipe.JPG

 

 

 

 

 

 

 

 

 

 

 

This does not allow me to create the pipe. 

The pipe can be created only up to that point of discontinuity.

pipe_3_2019.JPG

 

 

 

 

 

The same problems exist trying to create a loft.

 

The question is: has anything changed in the implementation of splines of something else? Do I need to change something in the script to adapt it to new features I don't know?

 

Thanks . Dino

0 Likes
Accepted solutions (1)
590 Views
3 Replies
Replies (3)
Message 2 of 4

MichaelT_123
Advisor
Advisor
Accepted solution

Hi Mr.DinoCoglitore,

 

Without knowing the code you produced, and also not being a fly on the monitor of the developer in F360 office I can only use telepathy, which not always work.

It tells me somehow? that you are adding unnecessary fit point every turn ( in effect having two of them overlapping).

This is big NO-NO from spline math machinery innerworkings. Various spline algorithms can deal with the issue in different ways e.g. throwing exception, ignoring one point, creating discontinuities by ignoring calculating higher derivatives...

Consider looking into this part of your code,... it might be the case.

 

Regards

MichaelT

MichaelT
Message 3 of 4

dinocoglitore
Advocate
Advocate

Hi Mr MichaelT,

 

I would like to thank you very much for your immediate reply. Surely you are not a "fly on the monitor" but in this case your telepathy worked very well! Although I have not attached the script code you have hit the mark.

 

Your answer is correct. I reviewed the behavior of the script and I verified that in the discontinuity points the script causes an overlap of points of which I had not previously realized. By deleting one of the two points, the spline behaves correctly

 

Previous versions of Fusion 360 did not highlight this malfunction, which mainly depends on my limited experience as a programmer, and which therefore went unnoticed. Now that I understand the problem, thanks to your help, I will review the code in an attempt to eliminate duplication of points.

 

Thanks again

 

Best regards

Dino

0 Likes
Message 4 of 4

MichaelT_123
Advisor
Advisor

Hi Mr. DinoCoglitore,

I am delighted to hear it... two birds with one stone ... your code is fixed, and you seem to be happy ... and I checked my telepathy ... it has worked like a charm ... so I am glad too.


With Regards
MichaelT

MichaelT
0 Likes