Fusion operation creates broken object

Post here for help on using FreeCAD's graphical user interface (GUI).
Jin
Posts: 23
Joined: Mon Nov 03, 2014 7:37 pm

Fusion operation creates broken object

Postby Jin » Sat Mar 18, 2017 11:36 pm

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 106 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 106 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 4 times
chrisb
Posts: 1668
Joined: Tue Mar 17, 2015 9:14 am

Re: Fusion operation creates broken object

Postby chrisb » Sun Mar 19, 2017 12:43 am

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

Re: Fusion operation creates broken object

Postby Jin » Sun Mar 19, 2017 12:07 pm

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
Posts: 1668
Joined: Tue Mar 17, 2015 9:14 am

Re: Fusion operation creates broken object

Postby chrisb » Sun Mar 19, 2017 5:20 pm

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) Not downloaded yet
chrisb
Posts: 1668
Joined: Tue Mar 17, 2015 9:14 am

Re: Fusion operation creates broken object

Postby chrisb » Sun Mar 19, 2017 6:24 pm

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

Re: Fusion operation creates broken object

Postby Jin » Sun Mar 19, 2017 8:07 pm

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
Posts: 1668
Joined: Tue Mar 17, 2015 9:14 am

Re: Fusion operation creates broken object

Postby chrisb » Sun Mar 19, 2017 9:55 pm

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.
jmaustpc
Posts: 8075
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Fusion operation creates broken object

Postby jmaustpc » Sun Mar 19, 2017 11:10 pm

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
Posts: 3005
Joined: Wed Oct 22, 2014 5:02 pm

Re: Fusion operation creates broken object

Postby sgrogan » Sun Mar 19, 2017 11:21 pm

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-maintainers/+archive/ubuntu/oce-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-maintainers/+archive/ubuntu/freecad-daily
Jin
Posts: 23
Joined: Mon Nov 03, 2014 7:37 pm

Re: Fusion operation creates broken object

Postby Jin » Sun Mar 19, 2017 11:28 pm

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