Editing Imported 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
timesenemy
Posts: 3
Joined: Fri Mar 11, 2016 5:33 pm

Editing Imported STL

Post by timesenemy »

I imported an STL that was sent to me. I want to remove a box shape protruding out. The STL opens fine. I go into the Part Design view, then try using the Subtractive Primitive (Box) feature, but FreeCAD 0.18 responds with:

Image

"In order to use PartDesign you need an active Body object in the document. Please make one active (double click) or create one." The second paragraph in the "No active Body" error states, "If you have a legacy document with PartDesign objects without Body, use the migrate function in PartDesign to put them into a Body."

I saw this https://forum.freecadweb.org/viewtopic.php?t=21741, but the provided answer is too vague.

Creating a new Body, then dragging the imported STL object into the Body shows an arrow icon (looks like a shortcut icon), but does not appear to do anything once the object is dropped, or the mouse button is released. The same No active Body error appears after trying this.

How do I add an imported STL object into the/a Body, so I can then use tools like Subtractive Primitive?
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Editing Imported STL

Post by bejant »

Hi timesenemy, and welcome! The Part Design WB only works with solids, and your .stl is a mesh. Instead, after doing File > New and Importing your .stl, change to the Part WB (not Part Design) and from the pull-down menu choose Part > Create shape from mesh. From here you can change your mesh to a solid.

Going only by your description, I'd avoid the Part Design Wb altogether if all you want to do is remove a simple box shape from the model. You can change to the Shetcher WB and create a Sketch of the cross-section of the shape you'd like to use to remove the box shape. Then go back to the Part WB and Extrude your Sketch. From there you can do a Boolean Difference to subtract you Extrude from the solid.

Or instead of Sketching a shape and Extruding it, you can stay in the Part WB, create a Cube, change the size to suit your needs, move it into place, and subtract itt from your solid.

If you need more help, post back - and it might help to include your model.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Editing Imported STL

Post by bejant »

timesenemy wrote: Mon Jun 17, 2019 11:47 pm How do I add an imported STL object into the/a Body,
If you want to use Part Design:
First create a Solid from your .stl.
Go to Part Design and create a Body.
From the history tree, drag and drop your Solid into Body.
A new copy of your Solid, named BaseFeature, will be created inside the Body.
You can work with the new BaseFeature in Part Design.
User avatar
HarryGeier
Veteran
Posts: 1231
Joined: Mon Jul 10, 2017 12:36 pm
Location: Hof Germany

Re: Editing Imported STL

Post by HarryGeier »

You can also watch some of my videos based on that workflow for 0.17 or 0.18
Kaum macht man´s richtig , gehts´s
My Video Tutorials on Youtube: https://www.youtube.com/channel/UCoe3B ... p8Q/videos
My FreeCAD Stuff on Hidrive: https://my.hidrive.com/share/qr3l1yddy6#$/
chrisb
Veteran
Posts: 54222
Joined: Tue Mar 17, 2015 9:14 am

Re: Editing Imported STL

Post by chrisb »

Part->Defeaturing may be worth a try as well.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wmayer
Founder
Posts: 20310
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Editing Imported STL

Post by wmayer »

Instead, after doing File > New and Importing your .stl, change to the Part WB (not Part Design) and from the pull-down menu choose Part > Create shape from mesh.
Depending on the kind of mesh data you have it's not always the best to convert it into a shape because this usually creates a very heavy B-REP model often causing difficulties for further processing.

So, the alternative is to create a sketch, extrude it and then go back to Mesh design and convert the solid into a mesh. Then you can use the boolean cut operation of the Mesh design workbench.
timesenemy
Posts: 3
Joined: Fri Mar 11, 2016 5:33 pm

Re: Editing Imported STL

Post by timesenemy »

bejant wrote: Tue Jun 18, 2019 2:24 am Hi timesenemy, and welcome! The Part Design WB only works with solids, and your .stl is a mesh. Instead, after doing File > New and Importing your .stl, change to the Part WB (not Part Design) and from the pull-down menu choose Part > Create shape from mesh. From here you can change your mesh to a solid.

Going only by your description, I'd avoid the Part Design Wb altogether if all you want to do is remove a simple box shape from the model. You can change to the Shetcher WB and create a Sketch of the cross-section of the shape you'd like to use to remove the box shape. Then go back to the Part WB and Extrude your Sketch. From there you can do a Boolean Difference to subtract you Extrude from the solid.

Or instead of Sketching a shape and Extruding it, you can stay in the Part WB, create a Cube, change the size to suit your needs, move it into place, and subtract itt from your solid.

If you need more help, post back - and it might help to include your model.
bejant, and all who replied, thank you for your responses!

bejant, as I was reading your response, I realized it was a mesh, not a solid! Rookie mistake ... but i am a newbie at this so it is fitting. Also, I used your advice, using the Part WB and extruding a sketch to remove the box shape, and it worked perfectly! Again, thank you!
timesenemy
Posts: 3
Joined: Fri Mar 11, 2016 5:33 pm

Re: Editing Imported STL

Post by timesenemy »

bejant wrote: Tue Jun 18, 2019 2:31 am
timesenemy wrote: Mon Jun 17, 2019 11:47 pm How do I add an imported STL object into the/a Body,
If you want to use Part Design:
First create a Solid from your .stl.
Go to Part Design and create a Body.
From the history tree, drag and drop your Solid into Body.
A new copy of your Solid, named BaseFeature, will be created inside the Body.
You can work with the new BaseFeature in Part Design.
bejant, I may try this later, just to get more familiar with FreeCad. Thank you!
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Editing Imported STL

Post by bejant »

wmayer wrote: Tue Jun 18, 2019 8:09 am Depending on the kind of mesh data you have it's not always the best to convert it into a shape
Thanks Werner, I'll have to remember that!


timesenemy wrote: Wed Jun 19, 2019 6:13 pm bejant, and all who replied, thank you for your responses!

bejant, as I was reading your response, I realized it was a mesh, not a solid! Rookie mistake
You're welcome, and as you can see, I'm still learning too!
Post Reply