Fusing two Solids

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!
mancunia89
Posts: 41
Joined: Mon Oct 13, 2014 6:33 am

Fusing two Solids

Post by mancunia89 »

Is there a way to fuse together two solids, such that the new solid does not show where the fusion has taken place. I don't mind if the new solid loses information about the component solids. I have attached an example project to show what i mean.(Need to create a single solid out of Shape001 and Shape006). The invisible shapes are the results of the below mentioned approaches.

Approaches I have tried:
1) Using Part.makeCompound function
2) Using Union of two shapes(via the fuse function)
3) Make a list of all the faces of both the solids, then make a new shell out of those. then make a solid out of the shell.


All the above approaches have the same flaw that the common edges are still visible, which should not be the case.
Attachments
Fusion.fcstd
(11.67 KiB) Downloaded 70 times
mancunia89
Posts: 41
Joined: Mon Oct 13, 2014 6:33 am

Re: Fusing two Solids

Post by mancunia89 »

Sorry, forgot to mention my version details:

OS: Ubuntu 14.04.1 LTS
Platform: 64-bit
Version: 0.14.3209 (Git)
Branch: assembly
Hash: d258649cb6201018ab577b2dcc2641725bb5a243
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.7.0
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Fusing two Solids

Post by ickby »

Hello,

the correct way of doing this is to use boolean fusion. A compound does not "fuse" the solids into one but only groups the two solids together with possible inersections. The common edges will always be there after the fusion, that is how OCC works. But there is a function in Freecad which removes unneeded edges, you find it in the Part menu under refine shape. The python equivalent is the function "removeSplitter" of a shape.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Fusing two Solids

Post by bejant »

Part WB Refine Shape creates a separate dumb object that is not parametrically linked to your model, so it will not update. This is Fusion001 in the image below.

OpenSCAD WB Refine Shape creates an object that is parametrically linked to the earlier Features. If you change one of these earlier Features, the OpenSCAD Refine Shape updates too. This is refine_Fusion in the image below.

You can use the Dependency Graph, or change parameters of your model to see the difference:
20141216a-mancunia89.png
20141216a-mancunia89.png (18.22 KiB) Viewed 4153 times
Either Part WB > Refine Shape or OpenSCAD WB > Refine Shape can be used, depending on what you would like as the outcome. In your model, Shape001 and Shape006 are just dumb solids, but I think the sides adjacent to one another don't exactly line up. The lines where the faces meet remain even after the Shapes are Boolean Unioned and Refine Shape is applied to the Fusion.
mancunia89
Posts: 41
Joined: Mon Oct 13, 2014 6:33 am

Re: Fusing two Solids

Post by mancunia89 »

Thanks for the help. Its weird though, the 4 vertices of the two faces which are being joined are perfectly same(within a tolerance level of around 10^-7). No idea why the edges are not disappearing even after using the removeSplitter function.
User avatar
tanderson69
Veteran
Posts: 1626
Joined: Thu Feb 18, 2010 1:07 am

Re: Fusing two Solids

Post by tanderson69 »

mancunia89 wrote:Thanks for the help. Its weird though, the 4 vertices of the two faces which are being joined are perfectly same(within a tolerance level of around 10^-7). No idea why the edges are not disappearing even after using the removeSplitter function.
Because Shape006 has bspline faces and Shape001 has planar faces. Refine shape/removeSplitter will not attempt to join faces of different types.
mancunia89
Posts: 41
Joined: Mon Oct 13, 2014 6:33 am

Re: Fusing two Solids

Post by mancunia89 »

Yeah, that seems to be the issue. Although I am still no closer to finding a way to make a solid out of these two shapes without the extra edges.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Fusing two Solids

Post by bejant »

mancunia89 wrote:I am still no closer to finding a way to make a solid out of these two shapes without the extra edges.
Why not just make a new 1 x 10 x 11 mm solid?
mancunia89
Posts: 41
Joined: Mon Oct 13, 2014 6:33 am

Re: Fusing two Solids

Post by mancunia89 »

I cant really make a new solid, as I am making these solids via a python script. The two solids which need to be fused will be generated based on various parameters and can also have non planar edges. So i was looking for a very generalized solution.
trezvy
Posts: 41
Joined: Sat Jan 24, 2015 10:34 am

Re: Fusing two Solids

Post by trezvy »

Can you please explain me the ideologic difference between 'Part WB -> Make Compound', 'Part WB -> Union' and 'OpenSCAD WB -> Union'?
Post Reply