Unknown OCC exception

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!
PunyTune
Posts: 73
Joined: Sun Jan 06, 2019 1:59 am

Unknown OCC exception

Postby PunyTune » Thu Jan 24, 2019 12:21 am

I'm trying to understand how to build compound shapes in FreeCAD. I know I can create multiple solid objects and manipulate them with boolean operators. I'm trying to draw a compound shape in one sketch and then pad it. In the attached file I have such a sketch, but the pad command gives an error. How come?

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.14
Qt version: 5.10.1
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
Attachments
Clip 3-b.FCStd
(6.37 KiB) Downloaded 12 times
chrisb
Posts: 16957
Joined: Tue Mar 17, 2015 9:14 am

Re: Unknown OCC exception

Postby chrisb » Thu Jan 24, 2019 12:42 am

In the center you have a coincident constraint which implies the additional point-on-line constraint. Remove it.
Arc11 in the left top corner has a radius of 0mm. Remove it and reconnect the adjacent lines.

Forthermore, where the outer circle meets the straight lines you should use tangent constraints instead of point-on-line.
PunyTune
Posts: 73
Joined: Sun Jan 06, 2019 1:59 am

Re: Unknown OCC exception

Postby PunyTune » Thu Jan 24, 2019 1:53 am

Thanks. Now it pads. I had already noticed conflicting restraints and had removed them, but it still wouldn't pad.

But, I didn't know anything about a radius of zero on Arc11. How could I have found that flaw? How did you?
chrisb
Posts: 16957
Joined: Tue Mar 17, 2015 9:14 am

Re: Unknown OCC exception

Postby chrisb » Thu Jan 24, 2019 6:40 am

If I had suspected something like this I would have hovered the mouse over the elements list in the panel and would have watched if they highlight in 3D view as expected. In fact I didn't. So I used the sketch validation tool and it showed one open vertex at the left upper end. In Sketcher I suspected the wrong tangency, so I selected the tangencies with rectangle selection and pressed DEL. And I saw that the degrees of freedom raised by more than 3, I think it was from 5 to 11, which is more than a tangency can create. A closer look revealed the problem.

I have written in my Sketcher tutorial about the importance of always watching the DOFs. It can help to avoid such issues.
PunyTune
Posts: 73
Joined: Sun Jan 06, 2019 1:59 am

Re: Unknown OCC exception

Postby PunyTune » Thu Jan 24, 2019 6:11 pm

I printed out your Sketcher tutorial and am studying it. It is a big help, but I have not absorbed it fully yet. It seems very complicated to me still. Especially the implied constraints and the inherent DOF to be expected from different ones.

Moving forward, what is the preferred workflow for a compound shape? Is it better to try to build an complex outline in Sketcher and pad it, or build simple cubes and join them with boolean operators? Or, is it just preference?

Also, the last update seems to have removed the option of defining circles by diameter rather than radius, which I prefer.
chrisb
Posts: 16957
Joined: Tue Mar 17, 2015 9:14 am

Re: Unknown OCC exception

Postby chrisb » Thu Jan 24, 2019 7:15 pm

3D modeling is in fact difficult, much more than 2D. So give it some time to settle.

There are in fact the two mainstreams you mentioned: The feature based way uses the PartDesign workbench, the other using the more basic functions from Part workbench. And it seems that it is in fact a matter of preference. I prefer PartDesign, because I have less operations and I prefer the linear tree over the deep nesting of Part workbench. But here are several members with much and professional 3D experience who prefer the Path workbench approach.

I still have the diameter in the tiny drop down menu besides the radius constraint. Which version do you use? It's not available before 0.18.

OS: Ubuntu 16.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15694 (Git)
Build type: Release
Branch: master
Hash: 96dee91d5e7d7fd37f43a4dcf406a120ae1f1b8a
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
PunyTune
Posts: 73
Joined: Sun Jan 06, 2019 1:59 am

Re: Unknown OCC exception

Postby PunyTune » Thu Jan 24, 2019 8:39 pm

My version is out of date. Where should I get the most recent? I downloaded from https://www.freecadweb.org/downloads.php. That evidently sent me backwards.

I've had a few days free and have spent them full time trying to learn FreeCAD. It's driving me nuts. The benefit I see in FreeCAD is the history tree. But the multitude of constraints have prevented me from making progress. Friends have told me to stop struggling with FreeCAD and draw shapes in Adobe Illustrator. And, I can get my outline in Illustrator quickly. But then, when I import the SVG to FreeCAD and try to build off from it with other Bodies, I get new errors and am stuck again.

My current FreeCAD drawing finally came together and I 3D printed one of them, but the arms are too long. I went into the tree to try and shorten them from 2 inches to 1.2 inches, and I can't move the bottom arcs up to the shorter arm successfully. I've looked at all the constraints and tried every new one I can think of, but FreeCAD always claims my Sketch has a broken face. I can't for the life of me see why the successful file is now broken.
Attachments
Clip 3-bcx.FCStd
(16.99 KiB) Downloaded 4 times
GeneFC
Posts: 1025
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Unknown OCC exception

Postby GeneFC » Thu Jan 24, 2019 8:56 pm

I believe your version is the latest MAC version for FC 0.17.

If you want to use FC version 0.18 then the location is https://github.com/FreeCAD/FreeCAD/releases

The link you used only offers the official stable version, still at 0.17.xxxx

Unfortunately the MAC version build process is broken at the moment, so the latest available development version (0.18.xxxx) is not up to date with the linux and Windows versions.

Gene
PunyTune
Posts: 73
Joined: Sun Jan 06, 2019 1:59 am

Re: Unknown OCC exception

Postby PunyTune » Thu Jan 24, 2019 9:37 pm

I was able to shorten both arms of the part successfully, but it's still not clear to me why it finally worked and the broken face went away. It must have to do with the tangent and coincident constraints.

Any advice on what to watch out for will be greatly appreciated.

Onward and upward.
chrisb
Posts: 16957
Joined: Tue Mar 17, 2015 9:14 am

Re: Unknown OCC exception

Postby chrisb » Thu Jan 24, 2019 11:52 pm

PunyTune wrote:
Thu Jan 24, 2019 9:37 pm
It must have to do with the tangent and coincident constraints.
No, you had created an additional unconnected element, probably unattended. So the advice is: be careful what you create and always watch the degrees of freedom. If you know about how many DOF are added when adding an element and how many are consumed when applying a coincident you become vary immune to such errors.