Slice up an object
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Slice up an object
Hi all
is there a way to get the slices(few µm thicknes) from an object?
Something like a screenshots from one axis, in TIFF for example?
Nikola
OS: Windows 7
Word size: 32-bit
Version: 0.14.3692 (Git)
Branch: releases/FreeCAD-0-14
Hash: 5fe6e0c48f621f1136595e47cc8d7346090e7456
Python version: 2.6.2
Qt version: 4.5.2
Coin version: 3.1.0
SoQt version: 1.4.1
OCC version: 6.5.1
is there a way to get the slices(few µm thicknes) from an object?
Something like a screenshots from one axis, in TIFF for example?
Nikola
OS: Windows 7
Word size: 32-bit
Version: 0.14.3692 (Git)
Branch: releases/FreeCAD-0-14
Hash: 5fe6e0c48f621f1136595e47cc8d7346090e7456
Python version: 2.6.2
Qt version: 4.5.2
Coin version: 3.1.0
SoQt version: 1.4.1
OCC version: 6.5.1
Re: Slice up an object
Hi Nicola,
in the Part workbench you'll find the command "Cross-sections". in the top part of the panel you can choose the section plane either parallel to XY, XZ or YZ plane and the start position. For multiple sections (what you want to do) activate the second part. There you can define the numbers of sections and the distance between them.
in the Part workbench you'll find the command "Cross-sections". in the top part of the panel you can choose the section plane either parallel to XY, XZ or YZ plane and the start position. For multiple sections (what you want to do) activate the second part. There you can define the numbers of sections and the distance between them.
Re: Slice up an object
Hi Nicola
I was going to say what Werner did which gives you a line drawing style cross-section, like you would see in a 2d printed drawing, or 2D CAD program. I was wondering if that was what you meant, or did you mean that you actually want a 3d solid created from a slice of another solid? For example, did you want to produce a 3d model of something like a gasket?
If so you can do this
1) create a standard Part Box (a solid cube) in the part work bench
2) adjust its height to the thickness of the cross-section you require (assuming the slice is parallel to the xy plane)
3) adjust the width and length such that they are much larger than the overall dimensions of your solid.
4) depending on your exact example, you may need to adjust the position values in all 3 axes.
5) assuming your slice is parallel to the xy plane, adjust the z position value until you Part Box is at the correct height.
6) select the solid to be sliced and the Part Box, then click on the Boolean "common" in the Part Work bench.
The result will be a 3d solid slice.
Jim
I was going to say what Werner did which gives you a line drawing style cross-section, like you would see in a 2d printed drawing, or 2D CAD program. I was wondering if that was what you meant, or did you mean that you actually want a 3d solid created from a slice of another solid? For example, did you want to produce a 3d model of something like a gasket?
If so you can do this
1) create a standard Part Box (a solid cube) in the part work bench
2) adjust its height to the thickness of the cross-section you require (assuming the slice is parallel to the xy plane)
3) adjust the width and length such that they are much larger than the overall dimensions of your solid.
4) depending on your exact example, you may need to adjust the position values in all 3 axes.
5) assuming your slice is parallel to the xy plane, adjust the z position value until you Part Box is at the correct height.
6) select the solid to be sliced and the Part Box, then click on the Boolean "common" in the Part Work bench.
The result will be a 3d solid slice.
Jim
Re: Slice up an object
Hi,
sorry for VEEERY late replay!
I didnt deal with this issues for a while and I just revisited it again and saw your replays, many thanks.
This is what I need, from 3d model -> set of images (2bit would be perfect)
sorry for VEEERY late replay!
I didnt deal with this issues for a while and I just revisited it again and saw your replays, many thanks.
Its something in Werner´s direction but a bit different.jmaustpc wrote:Hi Nicola
I was going to say what Werner did which gives you a line drawing style cross-section, like you would see in a 2d printed drawing, or 2D CAD program. I was wondering if that was what you meant, or did you mean that you actually want a 3d solid created from a slice of another solid? For example, did you want to produce a 3d model of something like a gasket?
Jim
This is what I need, from 3d model -> set of images (2bit would be perfect)
- Attachments
-
- freecad-forum2.jpg (42.63 KiB) Viewed 4429 times
Re: Slice up an object
Ah, your looking for a slicer tool like the sketchup plugin. I had mentioned this some time ago and have always thought the tool to be incomplete. It would be a great addition/enhancement to the cross sections tool. You can do it manually, but it takes a bit of time. Having a tool or macro that would do that automatically would be nice. I'm thinking that if we see anything like it at all, it will probably be in the form of a macro.
Done manually -
Mark
Done manually -
Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
Re: Slice up an object
Hello, here is a python script doing the job.
http://freecadbuch.de/doku.php?id=blog: ... -schneider
and a youtube Video
https://www.youtube.com/watch?v=o0gonvsrMhs
Using the example, it works for me. But using my own model I got an error: I have no experience with python. Can someone give me a hint how to change the script to run it without an error? Attached you find my model I used for the test.
Thanks,
Michael
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
http://freecadbuch.de/doku.php?id=blog: ... -schneider
and a youtube Video
https://www.youtube.com/watch?v=o0gonvsrMhs
Using the example, it works for me. But using my own model I got an error: I have no experience with python. Can someone give me a hint how to change the script to run it without an error? Attached you find my model I used for the test.
Thanks,
Michael
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
- Attachments
-
- Test_slice_model.FCStd
- Personal test model for the python script.
- (6.56 KiB) Downloaded 49 times
Re: Slice up an object
"Pocket" is hard codedMichaGue wrote: Using the example, it works for me. But using my own model I got an error:
2017-04-24_08h53_34.png
edit line 45
from
Code: Select all
slicePart(App.ActiveDocument.Pocket)
Code: Select all
slicePart(App.ActiveDocument.Fusion)
Code: Select all
slicePart(Gui.Selection.getSelection()[0])
Note the macro has a problem for non-planar surfaces at the limits. In your file the first slice "Extrude" is invalid because the macro tries to extrude an empty compound. At the tangent point of the sphere there are no wires, it's only a point.
Last edited by sgrogan on Mon Apr 24, 2017 8:16 pm, edited 1 time in total.
"fight the good fight"
Re: Slice up an object
Thanks a lot. Your solution works fine for me.
Best regards,
Michael
Best regards,
Michael
Re: Slice up an object
Another method is to make a block the thickness of the slice which extends beyond the extents of the model, create an array of the block at 2 x thickness intervals, then boolean|section between the model and array. Downgrade the resulting section to separate the edges.
- Attachments
-
- sliced.png (56.75 KiB) Viewed 3483 times
Re: Slice up an object
Hi everyone.
Michel From France.
MichaGue, I can't find how to adjust the distance between the slices? I have to tell that I begin with macro, so maybe there is something to do with the script?
Thnaks a lot.
Michel From France.
MichaGue, I can't find how to adjust the distance between the slices? I have to tell that I begin with macro, so maybe there is something to do with the script?
Thnaks a lot.