Scaling of STL-File

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
reparator
Posts: 1
Joined: Wed Oct 23, 2013 1:51 pm

Scaling of STL-File

Post by reparator »

Good afternoon together!

I´m faced with a problem of scaling a STL imported file in freecad:
I imported an STL drawing and can use it in freecad, but it is 1000 times to small in comparison to the basic primitives I have created myself. So the question is if there is a way to scale the STL to the same size as my primitives have?
Example: If i import a STL of a complicated shape which has the size of 130 mm it has only a size of 0.13 mm in freecad (thats why i didn´t find it originally. It was really too small).

Any help would be appreciated

Regards

stefan
User avatar
shoogen
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Scaling of STL-File

Post by shoogen »

It is currently not possible from the GUI but it is from python console

Code: Select all

>>> import Mesh,BuildRegularGeoms
>>> App.ActiveDocument.addObject("Mesh::Cube","Cube") # alternativly import the stl file
>>> mat=FreeCAD.Matrix()
>>> mat.scale(1000.0,1000.0,1000.0)
>>> mesh=App.ActiveDocument.Cube.Mesh.copy() #Cube is the name of the Object in the Document
>>> mesh.transform(mat) #add the result to the docuemnt
>>> Mesh.show(mesh)
Post Reply