Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
GeorgK
800 Views, 8 Replies

Points on 3D spline

Hello together,

 

how could I get the points on a 3D spline? The points should be calculated for example 2mm along the spline.

 

Path_3D-Spline.png

 

I could export the points:

 

http://modthemachine.typepad.com/my_weblog/2011/06/writing-work-points-to-an-excel-file.html

 

Thank you Georg

GeorgK
in reply to: GeorgK

I think it's possible with 3d spline interpolation. Is there any function in Inventor to do this?

JaneFan
in reply to: GeorgK

Hey Georg, 

 

Was the 3d spline created with the points? If so, it is convenient to get the sketch points by SketchSpline3d.FitPoint(Index) in Inventor.




Jane Fan
Inventor QA Engineer
GeorgK
in reply to: JaneFan

Hello @JaneFan,

 

the 3d spline was created with the points. Do you have a sample code for this?

 

Thank you Georg

JaneFan
in reply to: GeorgK

Hey Georg,

 

Please find the following code to get some hint, which adds all fit points of a spline 3d to an object collection

Sub splintPts()
    Dim oDoc As PartDocument
    Set oDoc = ThisApplication.ActiveDocument
    Dim oSk3d As Sketch3D
    Set oSk3d = oDoc.ComponentDefinition.Sketches3D(1)
    Dim oSkSpline As SketchSpline3D
    Set oSkSpline = oSk3d.SketchSplines3D.Item(1)
    Dim objCol As ObjectCollection
    Set objCol = ThisApplication.TransientObjects.CreateObjectCollection

    For i = 1 To oSkSpline.FitPointCount
        Call objCol.Add(oSkSpline.FitPoint(i))
    Next
    Debug.Print objCol.Count
End Sub




Jane Fan
Inventor QA Engineer
GeorgK
in reply to: JaneFan

Hi Jane,

 

maybe I explained the problem wrong. I need the points along the spline with a given distance.

 

Points_with_Distance.png

 

Thank you

Georg

chandra.shekar.g
in reply to: GeorgK

Hi @GeorgK,

 

Hope the following screencast link would help.

 

https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/screencast/Main/Details/...

 

In this screencast video, workpoint is created at one of the end point. Then, workpoint is patterned along curve length.

 

Similarly, a rectangle patterned part is attached with this post. Here, pattern count is calculated by measuring length of curve divided by offset length.

 

Can you please provide sample part to test? please make sure that part is non confidential one.

 

Please feel free to contact if there is any queries.

 

If problem is solved, click on "Accept as solution" / give a "Kudo".

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



GeorgK
in reply to: chandra.shekar.g

Hello @chandra.shekar.g,

 

I thought that there could be a possibility to calculate the points directly. I have a robot which should drive along the spline. There are a lot of calculations to this.

 

Thanks Georg

chandra.shekar.g
in reply to: GeorgK

Hi @GeorgK,

 

Unfortunately, there is no direct approach to calculate the points along spline.

 

Please post this wish list at idea station using following link.

 

https://forums.autodesk.com/t5/inventor-ideas/idb-p/v1232/tab/most-recent

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network