I have a CAD file in SketchUp that I would like to edit using code (ie: its dimensions, properties, etc.) What is the best way to do this? If I export the file as an STL, is there a program where I can edit the STL using code? Thanks.

  • A quick google search for "programs to edit CAD STL file" gave this as the first result : all3dp.com/1/7-free-stl-editors-edit-repair-stl-files You will no doubt find other links to programs that may well be better, happy searching... – Solar Mike Oct 11 at 4:48
  • 1
    STL is not really CAD data, its basically just a dump of polygons. Bit like turning a vector model to a raster and then edit vectors. Can you edit the polygons? Sure, but the problem is rather how to find the points you want tocedit. Now its nowhere practical to do this since you nolonger have any idea what is what. But yeah you can do it its just counter productive. hell you can even write your own stl reader/writer in less than 100 lines of code – joojaa Oct 11 at 5:22
  • Making the model in OpenSCAD is your best bet for this. All other methods will be a ‘workaround’ using scripting or similar. – Jonathan R Swift Oct 11 at 8:23
  • 2
    I agree with joojaa, even if you dont find a dedicated library or software, STL format is fairly simple to read (en.wikipedia.org/wiki/STL_(file_format)) with a selfmade code. – user190081 Oct 11 at 13:12
  • I fear the 'best' answer will depend heavily on your level of experience with software in general. Some of us could (but wouldn't :-) ) write a macro in Notepad++ that could apply edits to the STL (ASCII format) file, for example. One of the big risks for the inexperienced is in changing one parameter but failing to update various dependent items, checksums, etc. and having the whole file fail. – Carl Witthoft Oct 11 at 17:16

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.