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.

  • $\begingroup$ 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... $\endgroup$ – Solar Mike Oct 11 '18 at 4:48
  • 1
    $\begingroup$ 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 $\endgroup$ – joojaa Oct 11 '18 at 5:22
  • $\begingroup$ Making the model in OpenSCAD is your best bet for this. All other methods will be a ‘workaround’ using scripting or similar. $\endgroup$ – Jonathan R Swift Oct 11 '18 at 8:23
  • 2
    $\begingroup$ 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. $\endgroup$ – user190081 Oct 11 '18 at 13:12
  • $\begingroup$ 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. $\endgroup$ – Carl Witthoft Oct 11 '18 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.