Hey everybody,
I am wondering if Freecad offers some kind of wrapper around an STL, or other CAD file? For example: I do have a CAD geometry of some radiator and I want to have only the outer surface (so wrapping a box around the radiator). At the end, I have a wrapped geometry that represents the outer shell of the object (without any holes).
Tobi
Wrapper
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Wrapper
You can turn the stl into a solid and subtract it from e.g. a cube. Then the cut is a wrapper around the original stl.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Wrapper
I think the OP wants a convex hull (shrink wrapped) type solution.
Re: Wrapper
Hey everybody,
exactly as @Roy_043 mentioned. The geometry is, e.g., a raw TV housing with all the cooling channels and so on. I want to wrap around the geometry to get a closed volume that fits the TV housing well (e.g, closing the cooling channels etc.).
Is there any solution? Probably I could do it using Blender.
exactly as @Roy_043 mentioned. The geometry is, e.g., a raw TV housing with all the cooling channels and so on. I want to wrap around the geometry to get a closed volume that fits the TV housing well (e.g, closing the cooling channels etc.).
Is there any solution? Probably I could do it using Blender.
Re: Wrapper
Assuming you have loaded a mesh file then with the script below you can create a fitting box
Is this what you are looking for?
If you have a recent build that includes git commit 2808c4bc you can simplify the script:
Code: Select all
import Mesh
mesh=App.ActiveDocument.ActiveObject.Mesh.copy()
eigen = mesh.getEigenSystem()
mesh.transformGeometry(eigen[0])
bbox = mesh.BoundBox
triangles = []
triangles.append(bbox.getPoint(0))
triangles.append(bbox.getPoint(1))
triangles.append(bbox.getPoint(2))
triangles.append(bbox.getPoint(0))
triangles.append(bbox.getPoint(2))
triangles.append(bbox.getPoint(3))
triangles.append(bbox.getPoint(0))
triangles.append(bbox.getPoint(5))
triangles.append(bbox.getPoint(1))
triangles.append(bbox.getPoint(0))
triangles.append(bbox.getPoint(4))
triangles.append(bbox.getPoint(5))
triangles.append(bbox.getPoint(0))
triangles.append(bbox.getPoint(3))
triangles.append(bbox.getPoint(7))
triangles.append(bbox.getPoint(0))
triangles.append(bbox.getPoint(7))
triangles.append(bbox.getPoint(4))
triangles.append(bbox.getPoint(4))
triangles.append(bbox.getPoint(6))
triangles.append(bbox.getPoint(5))
triangles.append(bbox.getPoint(4))
triangles.append(bbox.getPoint(7))
triangles.append(bbox.getPoint(6))
triangles.append(bbox.getPoint(1))
triangles.append(bbox.getPoint(6))
triangles.append(bbox.getPoint(2))
triangles.append(bbox.getPoint(1))
triangles.append(bbox.getPoint(5))
triangles.append(bbox.getPoint(6))
triangles.append(bbox.getPoint(2))
triangles.append(bbox.getPoint(7))
triangles.append(bbox.getPoint(3))
triangles.append(bbox.getPoint(2))
triangles.append(bbox.getPoint(6))
triangles.append(bbox.getPoint(7))
box = Mesh.Mesh(triangles)
box.transformGeometry(eigen[0].inverse())
Mesh.show(box)
If you have a recent build that includes git commit 2808c4bc you can simplify the script:
Code: Select all
import Mesh
mesh=App.ActiveDocument.ActiveObject.Mesh.copy()
eigen = mesh.getEigenSystem()
mesh.transformGeometry(eigen[0])
box=Mesh.createBox(mesh.BoundBox)
box.transformGeometry(eigen[0].inverse())
Mesh.show(box)