sramauge

Lego models with fusion 360. LDR to fusion 360 script

Recommended Posts


Hello 


Recently to learn fusion 360, I used lego models to train with this models
My fusion 360 models https://grabcad.com/stephane.ramauge-1

I'm using the tutorials of DK https://grabcad.com/dk/tutorials to build my first parts and models.
DK made lot of pieces in .IPT format (inventor) format. IPT Part numbers follow Bricklink convention.

Maybe someone with python or java skill could make a script to translate .ldr instructions into instructions to build
models using a fusion360 shared library ?
A fusion or inventor assembly is series of components with coordinate, rotation, colors like in a LDR models.
A series of script can import nut, screw in .STL format from a online tools dealer for example. 
I think it's possible to parse a .ldr file and translate *.dat from it to .ipt files or fusion360 library component.

It's just an idea

Thanks for your advice :D

Exemple script for fusion :

https://www.autodesk.com/products/fusion-360/blog/writing-scripts-using-the-new-fusion-360-api-preview/
http://codefoster.com/f360api/

 

 

6872 -1_resultat.jpg

Share this post


Link to post
Share on other sites

If you go to 3D content central there are a ton of parts done in solid works that translate cleaner into inventor or fusion 360. Not the whole catalog but a good start. Converting most from ldr to .ipt need a few more programs, good luck. :classic:

Share this post


Link to post
Share on other sites

I visited this site, but the pieces are redundant ,don't respect ldr bricklink  convention name and not indexed.

It's easier to build new pieces than use the pieces of this site

With an organized shared library (convention name, scale,...) like ldraw library but for CAD programs (*.IPT files for example) a script could replace

the <piece1025.dat> of a ldr file by a <piece1025.ipt>

For example 

Ldr file :

1 <colour> x y z a b c d e f g h i <piece1025.dat>

Fictive fusion script

{ Insert <piece1025.ipt>

coordinate   x y z

Transform a b c d e f g h I   }

{ Insert <piece9990.ipt)

coordinate .......

}

 

So with the help of a develloper it could be possible in fusion360 to load and  ldr file, translate the instruction for fusion, insert the good piece at the right place and

finally   construct the model.

 

An example of draw files article  http://www.ldraw.org/article/218.html

...........

Line Type 1

Line type 1 is a sub-file reference. The generic format is:

1 <colour> x y z a b c d e f g h i <file>

Where:

  • <colour> is a number representing the colour of the part. See the Colours section for allowable colour numbers.
  • x y z is the x y z coordinate of the part
  • a b c d e f g h iis a top left 3x3 matrix of a standard 4x4 homogeneous transformation matrix. This represents the rotation and scaling of the part. The entire 4x4 3D transformation matrix would then take either of the following forms:
    / a d g 0 \   / a b c x \
    | b e h 0 |   | d e f y |
    | c f i 0 |   | g h i z |
    \ x y z 1 /   \ 0 0 0 1 /
    
    The above two forms are essentially equivalent, but note the location of the transformation portion (x, y, z) relative to the other terms.
  • Formally, the transformed point (u', v', w') can be calculated from point (u, v, w) as follows:
    u' = a*u + b*v + c*w + x
    v' = d*u + e*v + f*w + y
    w' = g*u + h*v + i*w + z
    
  • <file> is the filename of the sub-file referenced and must be a valid LDraw filename. Any leading and/or trailing whitespace must be ignored. Normal token separation is otherwise disabled for the filename value.

..........

 

 

Share this post


Link to post
Share on other sites

What is the purpose of this? The Ldraw builders like Brick Smith and LDCad are great to use. Way better than the Fusion 360 interface especially without the part snapping. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.