Fusion operation creates broken object

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!
Jin
Posts: 23
Joined: Mon Nov 03, 2014 7:37 pm

Fusion operation creates broken object

Post by Jin »

Hi,

I am stuck with a strange problem, I hope someone has an idea on what is going on.

I modelled a part and used the fusion operation to put it all together (the goal is to make a mesh out of it later on and prepare it for 3D printing). However, fusion seems to mess up one part of the object, the surface looks completely black and is not shaded and you can see that the outlines are missing in some areas. In the screenshot, these are the two pieces that stand out of the bigger cylinder-like thingie. I selected one of them (green) and there you can actually see that the outline stops.
hammer.png
hammer.png (17.84 KiB) Viewed 2110 times
The mess becomes more visible when trying to map the object to a drawing, there one can actually see that the outlines are weird...

Creating a mesh out of it also does not produce expected results, the parts that stand out do not get converted correctly - I guess because of the above breakage:
mesh.png
mesh.png (33.13 KiB) Viewed 2110 times
I did try "analyze geometry for errors" before fusing and it did not report any errors. So right now I am pretty clueless on what is going on...


I am using FreeCAD from the Fedora repo (freecad-0.16-2.fc25.x86_64):

OS: "Fedora release 25 (Twenty Five)"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.Unknown
Build type: Unknown
Python version: 2.7.11
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.8.0.oce-0.17

I hope someone can help me to identify the problem, thank you!

Kind regards,
Jin
Attachments
aluhammer_10x4cm.fcstd
(55.77 KiB) Downloaded 46 times
chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: Fusion operation creates broken object

Post by chrisb »

You have redundant constraints in "Sketch" and "hammer part" which you have to delete. That will result in a problem which I couldn't track down with "not holes". Perhaps it is a topological naming issue, you might detach and reattach it from its support, if it doesn't help you might have to reconstruct it.
If I repair the sketches in FreeCAD 0.17 it is enough to make the fusion work.

By the way: both halves seem to be almost mirrors. So you better model one half, mirror it and attach then the sketches for "holes" and "not holes".
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Jin
Posts: 23
Joined: Mon Nov 03, 2014 7:37 pm

Re: Fusion operation creates broken object

Post by Jin »

Doh... I did post a reply, but it seems it did not get saved :( In the meantime I tried more things, so here we go again:
chrisb wrote:You have redundant constraints in "Sketch" and "hammer part" which you have to delete.
This is weird, because those constraints were not there when I modelled the sketch and I did not edit the sketch afterwards. Does the mean the solver may produce different results when re-opening the sketch?
chrisb wrote: That will result in a problem which I couldn't track down with "not holes". Perhaps it is a topological naming issue, you might detach and reattach it from its support, if it doesn't help you might have to reconstruct it.
If I repair the sketches in FreeCAD 0.17 it is enough to make the fusion work.
I guess I could try to compile from git and see if it helps... after I repaired the sketches the part with the holes worked, but the part with the pins did not.
chrisb wrote: By the way: both halves seem to be almost mirrors. So you better model one half, mirror it and attach then the sketches for "holes" and "not holes".
Actually not almost - they are mirrors, it's just that one part has holes and the other part has pins. I tried the mirror function, but it did not really help me in regard to mesh conversion... I rearranged and reconstructed the objects several times and did not get anywhere so far :( So I guess I'll try to compile 0.17 and see if it helps, otherwise I really do not know what else to try...

Thank you for the hints!
chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: Fusion operation creates broken object

Post by chrisb »

Jin wrote: So I guess I'll try to compile 0.17 and see if it helps, otherwise I really do not know what else to try...
It seems to me like an OCC bug in the 0.16. To show my idea of the mirror I changed the loft to have vertical walls and the fusion works immediately.
For the mirror I took the part with the holes and placed a sketch at the hole's bottom. I made the length of the pad twice the depth of the bottom using expressions you might lower this if it is a real life project.
The final objects are visible so you can identify them in the tree, because it is not immediately clear what is the last element to show, since the mirrored object becomes a sub element of it's own mirror.
Attachments
aluhammer_10x4cm_cb.FCStd
(66.09 KiB) Downloaded 38 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: Fusion operation creates broken object

Post by chrisb »

I have redesigned the hammer. I didn't use loft, I used Part Design features instead with a trapezoid + attached revolutions.
Fusion is no problem.
(This time I took the half with the pins, it is slightly easier to handle. Depth of the holes is depth of the pin +1.
Attachments
aluhammer_10x4cm_cb2.FCStd
(82.35 KiB) Downloaded 57 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Jin
Posts: 23
Joined: Mon Nov 03, 2014 7:37 pm

Re: Fusion operation creates broken object

Post by Jin »

chrisb wrote:I have redesigned the hammer. I didn't use loft, I used Part Design features instead with a trapezoid + attached revolutions.
Fusion is no problem.
(This time I took the half with the pins, it is slightly easier to handle. Depth of the holes is depth of the pin +1.
Your version works and it can be converted to a mesh, thank you!

However I would still like to clarify one thing: was my initial version "illegal" and did you work around some bugs in FreeCAD by designing the part the way you did it?
chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: Fusion operation creates broken object

Post by chrisb »

Jin wrote:However I would still like to clarify one thing: was my initial version "illegal" and did you work around some bugs in FreeCAD by designing the part the way you did it?
No, I don't think your version was illegal. I think it is a kernel bug, which has been removed in the upcoming 0.17 version.
Operations with curvy surfaces are sometimes tricky, and I try to avoid loft anyway because the sides - even if based on straight lines - are not recognized as plain surfaces. So it is not possible to attach further sketches.
But I have to confess that your version with the loft has far less construction steps.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Fusion operation creates broken object

Post by jmaustpc »

chrisb wrote:
Jin wrote:However I would still like to clarify one thing: was my initial version "illegal" and did you work around some bugs in FreeCAD by designing the part the way you did it?
No, I don't think your version was illegal. I think it is a kernel bug, which has been removed in the upcoming 0.17 version.
Operations with curvy surfaces are sometimes tricky, and I try to avoid loft anyway because the sides - even if based on straight lines - are not recognized as plain surfaces. So it is not possible to attach further sketches.
But I have to confess that your version with the loft has far less construction steps.
A quick clarification, OCC or oce versions and FreeCAD versions are not linked. FreeCAD can be compiled with many different versions of OCC or oce, and is often different on different platforms. Until a few days ago, for example, FreeCAD 0.17 on Ubuntu still used the very old oce from Ubuntu.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Fusion operation creates broken object

Post by sgrogan »

jmaustpc wrote:for example, FreeCAD 0.17 on Ubuntu still used the very old oce from Ubuntu.
Small correction, until recently FreeCAD used an older version from https://launchpad.net/~freecad-maintain ... ce-release, newer than what may be available form the default repos, depending on your version. Now the PPA uses a very recent opencascade package hosted here https://launchpad.net/~freecad-maintain ... ecad-daily
"fight the good fight"
Jin
Posts: 23
Joined: Mon Nov 03, 2014 7:37 pm

Re: Fusion operation creates broken object

Post by Jin »

So.. is the fix in FreeCAD 0.17 or in occ? I am a bit confused now :)
Post Reply