How to split a spline into an arbitrary number of equal segments?

How to split a spline into an arbitrary number of equal segments?

joh13399
Enthusiast Enthusiast
2,032 Views
10 Replies
Message 1 of 11

How to split a spline into an arbitrary number of equal segments?

joh13399
Enthusiast
Enthusiast

Hello, 
Let's say I have an arbitrary spline, like so: 

joh13399_0-1676781844318.png

I need to split this spline such that I have up to 1024 equally-sized segments, specifically, I only need the first 1024th of the segment, the rest of it is idempotent.  To be clear, I need this to be *exactly* up to a 1024th of the spline, Measuring the total length and creating a line segment won't do for the precision required for this task, as the error multiplies with subsequent operations.

How do I produce this output? thanks!

 

0 Likes
Accepted solutions (1)
2,033 Views
10 Replies
Replies (10)
Message 2 of 11

j.palmeL29YX
Mentor
Mentor
Accepted solution

I would export the spline into AutoCAD and there divide in the needed number of segments (with exactly the same length, not approximated by straight lines). and reimport the points into Inventor. For better visibility the image shows an example with only 100 segments. 

(I don't know if that can be done in Inventor using a VBA macro [iLogic] too) 

 

Divided_Spline.png

 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 3 of 11

j.palmeL29YX
Mentor
Mentor

Additional question: 

What do you need it for, what do you want to do? I can't believe that the given value of the length overall should not be precise enough. 

 

Divide_Spline.png

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 4 of 11

joh13399
Enthusiast
Enthusiast

I'm making an arbitrary-path encoder, which means that I need slots in a part to a very-fine degree. 1024 slots is about the finest I need, so I used that number as a base for this question.

0 Likes
Message 5 of 11

j.palmeL29YX
Mentor
Mentor

And what about my suggestions to solve your problem? 

And I still do not know (not understand) what you need: the points (coordinates) where the spline to divide, or the spline segments after splitting, or straight line segments between the points or ...? 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 6 of 11

joh13399
Enthusiast
Enthusiast

As far as your comments, I'm not sure that this precision will be enough. If i'm not mistaken, Autodesk Inventor uses 64-bit doubles for measurements, which gives 16 digits of precision, max. 16 digits, is pretty good, but it seems that any number of digits that I enter after 7 or 8 are truncated/rounded. Due to how error works in the system I'm designing, the effect is multiplicative (ie, the error = err1*err2*err3, etc). So even if I'm 0.00001 off, that will translate to a 1% error in the overall product. I'm not too familiar with autocad, so I'd need to see if such a solution will work. I will try it... the point output that you have is perfect for my application.

0 Likes
Message 7 of 11

j.palmeL29YX
Mentor
Mentor

If you use 1/1024th in an incremental manner, its calculation (base) error will be added 1024 times. 

Perhaps you can use a Baseline dimensioning. Then also the latest point will be placed only with the base error.  

(I hope you understand. My English skills are not good enough to explain it better 😞  )

 

Example for 1/10th: 

incremental vs. base dimension.png

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 8 of 11

JDMather
Consultant
Consultant

@joh13399 

What version of Inventor are you using?

While I can certainly pattern a point along any arbitrary path into equal number of divisions, your Design Intent is still not clear to me.


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


Message 9 of 11

j.palmeL29YX
Mentor
Mentor

@JDMather wrote:

 

While I can certainly pattern a point along any arbitrary path 


 

>>Here<< an example (for @joh13399 ) how that can be done (thanks to @JDMather  for remembering me). 

For demonstrating I set only 50 points. 

But as @JDMather too, I don't know what you will do with this result.  

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 10 of 11

JDMather
Consultant
Consultant

@j.palmeL29YX 

I don’t know where the OP is going with this, but I suspect they will also want to set Direction 1 for the pattern.


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


0 Likes
Message 11 of 11

kacper.suchomski
Mentor
Mentor

Hi

This is a sample solution that came to my mind.
But the tool and the method match the target, and as @JDMather mentioned - we don't know your target.
If you like this method, remember that if n - number of distances, then the number of points must be n+1.

 

 


Kacper Suchomski

EESignature


YouTube - Inventor tutorials | LinkedIn | Instagram

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.