Copying STL Files

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
marcin_ose
Posts: 31
Joined: Wed Apr 29, 2015 9:20 pm

Copying STL Files

Post by marcin_ose »

Hello,

I have imported an STL file into FreeCAD, and am using the Draft Workbench. I am trying to copy and rotate the STL object.

This thread - viewtopic.php?f=3&t=15185&p=120865&hili ... ep#p120865 - shows that the STL must be converted to a solid first. I did Part ShapeFromMesh ->Refine shape -> Convert to solid.

This gave half decent results - but it appeared FreeCAD slowed down as the file had too many polygons even after refining the shape. Is there a good solution for smoothing out the entire shape to remove the polygons? Or is there any other STL to Solid converter that may work better?

Marcin



OS: Ubuntu 15.10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6668 (Git)
Build type: None
Branch: master
Hash: 7dbcbc0f762b1d21abc50e79112a0cf9be97bd47
Python version: 2.7.10
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Founder, Open Source Ecology
http://opensourceecology.org/
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Copying STL Files

Post by ickby »

Hello Marcin,
This thread - viewtopic.php?f=3&t=15185&p=120865&hilit=convert+stl+to+step#p120865 - shows that the STL must be converted to a solid first. I did Part ShapeFromMesh ->Refine shape -> Convert to solid.
Actually the draft tools work with meshes too, so for rotating/moving etc. you do not need to convert it to a shape. Just handle it like any other object in Draft workbench. The only thing I noticed during testing is that selecting "copy" in the move tool does not copy the mesh, seems like a bug. But you could easily Copy the mesh by hand (ctrl-c ctrl-v or menu->Edit->duplicate) and then move and rotate it
This gave half decent results - but it appeared FreeCAD slowed down as the file had too many polygons even after refining the shape. Is there a good solution for smoothing out the entire shape to remove the polygons? Or is there any other STL to Solid converter that may work better?
There is no good solution yet. The refine shape only handles polygons that are in the same plane, hence can be merged without the losing any detail. For curved areas this does not work.

Lately the Reverse Engineering workbench got some tools for approximating surfaces from point clouds, but I think this is still very rough and involves lot of manual python codeing. Maybe this evolves someday to some automatic feature matching tool.
marcin_ose
Posts: 31
Joined: Wed Apr 29, 2015 9:20 pm

Re: Copying STL Files

Post by marcin_ose »

Hello ickby,

Thank you. Yesterday the move and rotate tools were not working for me with an STL for some reason. I tried again today with the same STL - it works. I have noticed that starting a new document helps with a clean slate.

Converting STLs to solids works well in FreeCAD when the derivative solid is used in Boolean subtract. The subtraction results shows all the mesh lines, which disappear in shaded view. This means that STLs can be integrated well into a normal workflow.

A little searching on STL to Solid Conversion led back to FreeCAD - so FreeCAD is becoming the open standard for such conversion:)

Marcin
Founder, Open Source Ecology
http://opensourceecology.org/
Post Reply