Snap cad model for the 228-3448-1381 Octagonal Truss

Is there a SnapCad model for the 228-3448-1381 Octagonal Truss? (to build the risers)
Thanks

this guy…: image

This question was a bit of a nerd-snipe for me, but after a bit of tinkering around I was able to generate a part file for the octagonal truss.

Here it is: 228-2500-1381.dat.zip (623.1 KB)

To get this into your LDraw Parts library:

  1. Unzip the file to get “228-2500-1381.dat”.
  2. Find the SnapCAD folder, mine was at C:\Program Files (x86)\VEX Robotics\SnapCAD
  3. Copy “228-2500-1381.dat” into the parts folder.
  4. Add the following line to the bottom of Parts.lst
228-2500-1381.dat VEX IQ Octagonal Truss
  1. If SnapCAD was running while you did the above, quit and relaunch it.

Note that you’ll probably need administrator privileges on your machine for items 3 & 4.

After doing the above, the new part should appear in your library, at “Other Parts > V > VEX IQ Octagonal Truss”

In case anyone’s interested, here’s an overview of how I generated the part file:

Details

To generate the part file, I did roughly the following:

  1. Read up on the file format for LDraw parts, and concluded that converting from STL to LDraw .dat would probably be pretty easy. (LDraw is an open-source standard originally developed for LEGO CAD; SnapCAD is an LDraw editor with a library of VEX IQ parts included)

  2. Verified that a STEP file for that part was not available in the “Specialty Structure” .zip on this page.

  3. Downloaded the VIQC Rise Above field CAD from this page and opened it in Fusion 360 (but pretty much any CAD package would work fine for this).

  4. Found one of the octagonal trusses in the parts tree, right-clicked it, and exported as plaintext STL. (for anyone following along at home, be sure to save as “Plaintext” or “ASCII” STL rather than “binary” STL which is usually the default)

  5. Wrote a short python script to convert the plaintext STL to the LDraw part format, and ran it with cat part.stl | python3 stl_to_ldraw.py > 228-2500-1381.dat

  6. Manually added some metadata to the top of the resulting .dat file (part name, author, keywords, etc.)

  7. Verified that the file worked in my own LDraw install using the procedure above.

13 Likes

Thanks! it worked nicely!

1 Like

This is so cool! I’m glad that someone figured out how to do this! Is there an easy way to do this for LDCad? Since there are multiple parts folder, I would figure that the easiest way to do it is just to reinstall the snapcadunoff folder, but I feel like there is an easier way.

I just confirmed that the file in my post above works in LDCad as well - I copied 228-2500-1381.dat to the parts folder and added the line to Parts.lst, reloaded the parts library (Prefs > LDraw > Search (library) paths, then click “Accept”), and restarted LDCad, after which I was able to get the file by performing a search (from the top level of parts categories, click the magnifying glass, then click on [no filter] and search for something relevant like “truss”.

However, automatic pin snapping did not work with this part in LDCad, since the part file doesn’t have the necessary metadata.

I’ll also add that the approach I used to generate this file is super inefficient - LDraw parts are intended to be constructed from a few simple primitives (e.g., a single hole, etc.) which can be referenced across many different parts. What I did was take all the mesh data from an STL and dump it straight into an LDraw part file, which resulted in a very large file - a typical part file is 500 bytes - 10KB, my file is ~8MB. However the file size doesn’t seem to have a big impact on performance.

4 Likes

I tried this, but the part wouldn’t show up.

I have this file in my parts folder:
image

I also have the name at the bottom of Parts.lst, and I tried accepting the LDraw prefs and reloading LDCad, and I still couldn’t find the part. I also tried changing it to an “Unofficial Library” instead of an official one, but I just cant find the part!

Hmm, I’m not sure - the steps I described above worked on my system.

Note that I could only find the part by clicking on the magnifying glass and performing a search. The new part didn’t seem to appear in any of the categories, and it didn’t show up in the results of a search performed from anywhere other than the magnifying glass category.

2 Likes

Ah! That was it! I wasn’t searching in the Magnifying Glass section. Thanks for your help!!!

I hope that LDCad can be used in future seasons using the method you described above. (or maybe a more space efficient method will be invented, who knows.)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.