Can't select components (.stl)

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
diagaxis
Posts: 4
Joined: Fri Apr 28, 2017 9:58 am

Can't select components (.stl)

Post by diagaxis »

Hello.

I have a model in stl format, I managed to open it with freecad but I can't select individual parts of it. For example, my model consists of a 100mx100m base plate with 1m height. On top are several houses which I need to edit. My problem is I can't select anything on the model but I know they are all individual parts since they are color coded.

Another problem is, it shows everything in mm instead of meters. Is there a way to transform .stl into a different format for freecad ? I want to click on parts and see the coordinates of said parts. Is that possible ?

Thanks in advance.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Can't select components (.stl)

Post by DeepSOIC »

Hi!
In Part workbench, use Part-> create shape from mesh (in menu).
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Can't select components (.stl)

Post by NormandC »

Hello diagaxis,

Welcome to the forum.
diagaxis wrote:I have a model in stl format, I managed to open it with freecad but I can't select individual parts of it.
An STL mesh is always imported as a single object in FreeCAD. To separate the mesh into its components, you can switch to the Arch workbench, and go to the menu Architecture --> Arch Utilities --> Split Mesh.
diagaxis wrote:On top are several houses which I need to edit.
FreeCAD is not really suited to mesh editing. A polygon mesh modeller like Blender would be more suited.
diagaxis wrote:Another problem is, it shows everything in mm instead of meters.
A mesh model contains no unit information. FreeCAD works in millimetres. Therefore, one unit equals one mm. The scale of a mesh model always has to be set when exporting it, by the software used to create it. It cannot be changed afterwards.

I think it's possible to scale a mesh from the python console, but I don't know the commands. You could do a forum search.
diagaxis wrote: Is there a way to transform .stl into a different format for freecad ?
In addition to what DeepSOIC replied, please see Import from STL or OBJ.
diagaxis wrote:I want to click on parts and see the coordinates of said parts. Is that possible ?
I'm pretty sure even after your mesh will be split, each components will have the same coordinates of (0,0,0). After conversion to solid, all the parts will definitely have (0,0,0) coordinates. What you can do is to switch to the Part workbench and use its measurement toolbar, if necessary first creating a Part cube at the origin so you have a reference point.
diagaxis
Posts: 4
Joined: Fri Apr 28, 2017 9:58 am

Re: Can't select components (.stl)

Post by diagaxis »

Hello and thanks for the help. I can select individual objects now but the other problem persists. I dont want to edit the model really, just want to add some things to it. I have a Freecad macro that creates an antenna and i want to put said antenna into different parts of my model, the coordinates have to be pin-point exact. Problem is,

1. I can't change the antenna sizes(they have to be really small).
2. I cant move the antennas to the desired locations on my model.

It slowly dawns on me that creating the model completely from scratch would be an easier task than the one im hopelessly trying to accomplish.

Is there an easy way to dimension the whole model to 100m x 100m ?
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Can't select components (.stl)

Post by bejant »

diagaxis wrote:1. I can't change the antenna sizes(they have to be really small).
Hi diagaxis, and welcome. Do you mean that you can't change the antenna sizes because of the design requirements, or that you are don't know how to change the antenna sizes in FreeCAD?
You could try changing the antenna sizes by using the Properties in the Data Tab (lower left corner of the FreeCAD window by default), or use the Draft WB > Scale tool (your icons might look a slightly different because they were recently updated):
Image
or make a Draft WB > Clone:
Image
of an antenna and scale the Clone.
diagaxis wrote:2. I cant move the antennas to the desired locations on my model.
After you split the mesh, you can't move things by using the Data tab > Property > Placement?
diagaxis wrote:Is there an easy way to dimension the whole model to 100m x 100m ?
Use the Part WB > Measurement tools, then changing the Properties > Length, Width, and Height,
or by Draft WB > Scale,
or by Draft WB > Clone.

Post back and let us know if that helps (or doesn't help).
diagaxis
Posts: 4
Joined: Fri Apr 28, 2017 9:58 am

Re: Can't select components (.stl)

Post by diagaxis »

bejant wrote:
diagaxis wrote:1. I can't change the antenna sizes(they have to be really small).
Hi diagaxis, and welcome. Do you mean that you can't change the antenna sizes because of the design requirements, or that you are don't know how to change the antenna sizes in FreeCAD?
You could try changing the antenna sizes by using the Properties in the Data Tab (lower left corner of the FreeCAD window by default), or use the Draft WB > Scale tool (your icons might look a slightly different because they were recently updated):
Image
or make a Draft WB > Clone:
Image
of an antenna and scale the Clone.
diagaxis wrote:2. I cant move the antennas to the desired locations on my model.
After you split the mesh, you can't move things by using the Data tab > Property > Placement?
diagaxis wrote:Is there an easy way to dimension the whole model to 100m x 100m ?
Use the Part WB > Measurement tools, then changing the Properties > Length, Width, and Height,
or by Draft WB > Scale,
or by Draft WB > Clone.

Post back and let us know if that helps (or doesn't help).
Hi,

thanks so much, that definitely helped. I used the measuring tool to see if the model size is correct and everything does seem right except for the fact that it shows everything in mm instead of meters. I couldnt find a way to properly resize it (I tried to change the values of x,y,z to 10^6 with the scale tool but that just made my model disappear).

Cloning and resizing the antennas worked fine but I can't put them on the desired locations in my model. For example, my transmitter should be located at position x = 25m, y = 15m, z = 8m with the top looking at z plane (models of the antennas are cones) but the individual components of my model are all located at x,y,z = 0m. I can change those individual values just fine and move them around as I please but I can't seem to find a way to put the antenna on the exact position. The coordinates have to be pin-point exact because I have to run simulations later otherwise I would make an estimate and leave it at that.

I'm not a native english speaker so please excuse any mistakes on my part.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Can't select components (.stl)

Post by bejant »

diagaxis wrote:thanks so much, that definitely helped. I used the measuring tool to see if the model size is correct and everything does seem right except for the fact that it shows everything in mm instead of meters
You're welcome, try going to Edit > Preferences > General (icon in left pane) > Units (tab at top of right pane) and change the User system units from Standard to MKS.
diagaxis wrote:(I tried to change the values of x,y,z to 10^6 with the scale tool but that just made my model disappear).
I'll guess that the model is still there, but now it is so huge that the 3D view only sees a void. Try clicking the Fit All tool:
Image
and see if it helps.
diagaxis wrote:Cloning and resizing the antennas worked fine but I can't put them on the desired locations in my model. For example, my transmitter should be located at position x = 25m, y = 15m, z = 8m with the top looking at z plane (models of the antennas are cones) but the individual components of my model are all located at x,y,z = 0m. I can change those individual values just fine and move them around as I please but I can't seem to find a way to put the antenna on the exact position.
Are you selecting a Clone in the history tree, then changing the Property > Placement of the Clone?
diagaxis wrote:I'm not a native english speaker so please excuse any mistakes on my part.
I wouldn't have guessed, you're very proficient!
diagaxis
Posts: 4
Joined: Fri Apr 28, 2017 9:58 am

Re: Can't select components (.stl)

Post by diagaxis »

bejant wrote:
diagaxis wrote:thanks so much, that definitely helped. I used the measuring tool to see if the model size is correct and everything does seem right except for the fact that it shows everything in mm instead of meters
You're welcome, try going to Edit > Preferences > General (icon in left pane) > Units (tab at top of right pane) and change the User system units from Standard to MKS.
diagaxis wrote:(I tried to change the values of x,y,z to 10^6 with the scale tool but that just made my model disappear).
I'll guess that the model is still there, but now it is so huge that the 3D view only sees a void. Try clicking the Fit All tool:
Image
and see if it helps.
diagaxis wrote:Cloning and resizing the antennas worked fine but I can't put them on the desired locations in my model. For example, my transmitter should be located at position x = 25m, y = 15m, z = 8m with the top looking at z plane (models of the antennas are cones) but the individual components of my model are all located at x,y,z = 0m. I can change those individual values just fine and move them around as I please but I can't seem to find a way to put the antenna on the exact position.
Are you selecting a Clone in the history tree, then changing the Property > Placement of the Clone?
diagaxis wrote:I'm not a native english speaker so please excuse any mistakes on my part.
I wouldn't have guessed, you're very proficient!
Thanks,

it's moving along well but is there really no way to get the real coordinates (xyz) from the individual components ? Extracting them from the .stl would give me the points of the triangles and I don't know how that would help me.

My model consists of a 100x100 square with 7 small houses on top. If i split the mesh I get exactly 8 parts but they all have 0 0 0 placements. I guess that makes sense but I really need the exact coordinates for the simulations since I have to assign (electromagnetic) properties to the individual buildings.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Can't select components (.stl)

Post by bejant »

diagaxis wrote:Cloning and resizing the antennas worked fine but I can't put them on the desired locations in my model. For example, my transmitter should be located at position x = 25m, y = 15m, z = 8m with the top looking at z plane (models of the antennas are cones) but the individual components of my model are all located at x,y,z = 0m. I can change those individual values just fine and move them around as I please but I can't seem to find a way to put the antenna on the exact position.
You could use the Darft WB and add a Point anywhere in the 3D view, then change its Property > Placement to put it at the exact location of an antenna. Now use Draft WB > Snaps to move an antenna Clone to that Point. You could also use endpoints of line segments and snap to those endpoints instead of using only points.
diagaxis wrote:Thanks,

it's moving along well but is there really no way to get the real coordinates (xyz) from the individual components ?

You're welcome, you could try doing as NormandC wrote by creating the default Part WB > cube, then using the Part WB > Measurement tool to measure the distances from a lower corner of the Cube (one of the corners will be at the origin) to the component. That should result in Delta X, Y, and Z distances and also direct point-to-point distances. If not, click the Toggle 3D and Toggle Delta icons (they look like tape measures).
diagaxis wrote:My model consists of a 100x100 square with 7 small houses on top. If i split the mesh I get exactly 8 parts but they all have 0 0 0 placements. I guess that makes sense but I really need the exact coordinates for the simulations since I have to assign (electromagnetic) properties to the individual buildings.
Could you move each of the eight separate (now independent) parts using the Draft WB > Snap method I described?

Or maybe there is a way to extract the coordinates from each of the eight separate .stl meshes? The coordinates are stored in the .stl file:
https://en.wikipedia.org/wiki/STL_%28file_format%29
Would the coordinate you need for each of the eight meshes have the highest Z value?
Post Reply