STL to SOLID -> Scale and Subtract

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!
cox
Posts: 971
Joined: Wed Nov 26, 2014 11:37 pm

Re: STL to SOLID -> Scale and Subtract

Post by cox »

I can not use the file, it opens strange.

Please redo your experiment with 0.16, so that we make sure it is not some new bugs.
Need help? Feel free to ask, but please read the guidelines first
cox
Posts: 971
Joined: Wed Nov 26, 2014 11:37 pm

Re: STL to SOLID -> Scale and Subtract

Post by cox »

I have found a less round about way of doing this in 0.16 without going round about way of centreing the solid, what strikes me as being the trickiest part is to understand exactly how the Draft workbench functions, its operation demands that you have good control over grid, workplane and snaps.

I have cleaned up the first file you sent and the only thing that is left is the mesh
nytest.fcstd
(23.85 KiB) Downloaded 42 times
(this way we have a known start point)

Making a solid
1 -Select mesh and Part:Create shape from mesh
2 -hide mesh
3 -select shape and Part:Convert to solid
4 -hide shape

Make Workfeature Object Center
5 -Select Solid and Workfeature:Point:Object Center

Setting up Draft workspace
6 -Switch to Draft workbench
7 -Make sure only nearest snap is active
8 -Make sure Draft grid is turned off()
Screenshot_20160427_181317.png
Screenshot_20160427_181317.png (7.76 KiB) Viewed 803 times
Only Togle on/off and Nearest is active on the snap toolbar, and no grid is visible in 3d view.

Scale solid
9 -Select solid
10 -Draft:Scale
11 -Hide solid
12 -Select Centre Point for scale reference, make sure curser snaps(nearest)
13 -Go back to Tasks pane and enter scale factor in x,y,z. Make sure relative(Some times relative is not available) and copy is checked, I used 0,9 enter 0,9 enter 0,9 enter

Cut small from large
14 - Select original large solid
15 -Ctrl click new Scale solid
16 -Part:Cut

Now you should have the desired result :D

EDIT: Works perfectly in 0.17 Unstable as well
Need help? Feel free to ask, but please read the guidelines first
BLCKPSTV
Posts: 6
Joined: Fri Apr 22, 2016 2:38 pm

Re: STL to SOLID -> Scale and Subtract

Post by BLCKPSTV »

cox wrote:I have found a less round about way of doing this in 0.16 without going round about way of centreing the solid, what strikes me as being the trickiest part is to understand exactly how the Draft workbench functions, its operation demands that you have good control over grid, workplane and snaps.

I have cleaned up the first file you sent and the only thing that is left is the mesh
The attachment nytest.fcstd is no longer available
(this way we have a known start point)

Making a solid
1 -Select mesh and Part:Create shape from mesh
2 -hide mesh
3 -select shape and Part:Convert to solid
4 -hide shape

Make Workfeature Object Center
5 -Select Solid and Workfeature:Point:Object Center

Setting up Draft workspace
6 -Switch to Draft workbench
7 -Make sure only nearest snap is active
8 -Make sure Draft grid is turned off()
cryingxtimestry.FCStd
x time try
(42.98 KiB) Downloaded 22 times
Only Togle on/off and Nearest is active on the snap toolbar, and no grid is visible in 3d view.

Scale solid
9 -Select solid
10 -Draft:Scale
11 -Hide solid
12 -Select Centre Point for scale reference, make sure curser snaps(nearest) =>from here on I get stuck and it doesn't show a larger solid shape
13 -Go back to Tasks pane and enter scale factor in x,y,z. Make sure relative(Some times relative is not available) and copy is checked, I used 0,9 enter 0,9 enter 0,9 enter

Cut small from large
14 - Select original large solid
15 -Ctrl click new Scale solid
16 -Part:Cut

Now you should have the desired result :D

EDIT: Works perfectly in 0.17 Unstable as well

Crying in my sleep, it doesn't work when I do it. How can this be so hard for me. I literally following every step and it doesn't work...[attachment=0]cryingxtimestry.FCStd[/attachment]
cox
Posts: 971
Joined: Wed Nov 26, 2014 11:37 pm

Re: STL to SOLID -> Scale and Subtract

Post by cox »

Ok, I am starting to believe that something is sometimes interfering with the Draft:Scale GUI, snaps workplane?

Let's go the python route:

If you are using the nytest.FCStd file the names and positions should be ok, if not change as necessary.

This position comes from WorkFeature Object center command. FreeCAD.Vector(-2.44465270249e-09,-4.0,0.494028627872)

In the Python console paste in these lines one by one

Code: Select all

obj = App.getDocument("nytest").getObject("_0160422a_V001Dodecahedron001_solid001")

Code: Select all

Draft.scale(obj,delta=FreeCAD.Vector(0.9,0.9,0.9),center=FreeCAD.Vector(-2.44465270249e-09,-4.0,0.494028627872),copy=True) 
Please report back how it went.
Need help? Feel free to ask, but please read the guidelines first
Post Reply