FreeCAD scoffs at my cuts...

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!
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: FreeCAD scoffs at my cuts...

Post by bejant »

billfromnet wrote: Thu Jun 21, 2018 11:00 am I am frankly offended at the implication that I am averse to learning and exploring simply because I am not enthralled by a particular user's preferences.
From where did you get that implication? In FreeCAD there is usually more than one way to create a model, so I don't care much if you chose to use Sketches and Part WB instead of Sketches and Part Design. I do care that I can't figure out why the Cut doesn't seem to work.

billfromnet wrote: Thu Jun 21, 2018 11:00 am Meanwhile, it seems advisable to file a report on Mantis. Does everyone concur?
Probably, but first let's see what a developer says...

=====
abdullah wrote: Ping.
Hi Abdullah, do you have any idea why subtracting the Cylinder appears to fail, although Check Geometry (BOPCheck = True) reports the resulting Cut as valid? I was guessing that somehow the Bezier curves in the Sketch used to create the Extrude (the minuend) were causing some kind of problem. Here is the test file:

20180620-017-sinker-tc.fcstd
(26.83 KiB) Downloaded 28 times

We have a similar problem trying to subtract a Cylinder from a Loft made from similar Sketches, but the above file is s simpler test case.

Ulrich was able to make a successful Cut in two steps, using two partial Cylinders instead of trying to subtract a single Cylinder in one go. See the bottom of this post (or scroll up a few posts):
https://forum.freecadweb.org/viewtopic. ... 30#p240465
=====

billfromnet wrote: Thu Jun 21, 2018 3:11 pm I don't suppose there is some reference source where I might find a compendium of similar "well-known" potential pitfalls (?). I ask in order that I don't waste anyone's time (including my own) with these forum questions.
I don't know of one all-in-one reference, but here are a few:
  • Sometimes seams can cause problems in Part WB > Booleans (and in the Part Design WB, where the Booleans are built into the tools), especially when different seams cross or align.
  • Fillets and the Thickness tool can be troublesome.
I'll add more if some come to mind...
billfromnet
Posts: 35
Joined: Fri May 11, 2018 3:43 pm

Re: FreeCAD scoffs at my cuts...

Post by billfromnet »

From where did you get that implication? In FreeCAD there is usually more than one way to create a model, so I don't care much if you chose to use Sketches and Part WB instead of Sketches and Part Design. I do care that I can't figure out why the Cut doesn't seem to work.
I did not infer this from anything you wrote, bejant. You have been nothing but helpful and courteous and I appreciate that greatly.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: FreeCAD scoffs at my cuts...

Post by abdullah »

bejant wrote: Thu Jun 21, 2018 4:16 pm Hi Abdullah, do you have any idea why subtracting the Cylinder appears to fail, although Check Geometry (BOPCheck = True) reports the resulting Cut as valid? I was guessing that somehow the Bezier curves in the Sketch used to create the Extrude (the minuend) were causing some kind of problem. Here is the test file:
I have substituted the cylinder primitive with an extruded draft circle face and miserably fails too:

OS: Ubuntu 16.04.4 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13965 (Git)
Build type: Debug
Branch: _sketcher_diagnose_autoconstraint_improvements
Hash: c0014cbd3e080bc3e6239441de2d443b9766d7e2
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0

I have no idea why it does fail. Ulrich is one of the most experienced guys in cutting parts and getting away with it as I learned from his ScrewMaker code.

Maybe DeepSOIC has something to say...
DeepSOIC wrote: ... ping ...
In any case I do not think we will be able to actually improve this without sending things upstream to opencascade...
billfromnet
Posts: 35
Joined: Fri May 11, 2018 3:43 pm

Re: FreeCAD scoffs at my cuts...

Post by billfromnet »

@abdullah, I had tried that too with a similar result. Sorry, I should have posted it but I didn't even save it, instead assuming it is essentially the same case as a cylinder produced via any means once processed by lower SW layers where (we presume) the failure occurs.
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: FreeCAD scoffs at my cuts...

Post by TheMarkster »

Not sure if this will help or not, but...
troublesome-cut.gif
troublesome-cut.gif (562.18 KiB) Viewed 1196 times
billfromnet
Posts: 35
Joined: Fri May 11, 2018 3:43 pm

Re: FreeCAD scoffs at my cuts...

Post by billfromnet »

That's really interesting. An excellent work-around because it barely alters my work flow. It probably also implies something about the nature of the underlying bug, although I don't know what. I'll have to study those tools. Thank you.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: FreeCAD scoffs at my cuts...

Post by DeepSOIC »

abdullah wrote: Thu Jun 21, 2018 5:43 pm Maybe DeepSOIC has something to say...
Not really. Looks like OCC bug to me.

I tried:
* rotated the cylinder. Result changes, but no instant success. Maybe there is an angle where it works, but I was too lazy to do more rotation, - cylinder placement is quite weird, rotation is a bit tricky.
* dumped all tolerances of the spliny shape. All are 1e-7, looks ok.
* tried increasing tolerance of spliny shape. Result gets worse, more intersections missing. Same with increasing tolerance of BOP itself.
* converted spliny shape to all-nurbs. No effect.
* converted cylinder to all-nurbs. The cut is fixed, at the expense of losing analytic parts (straight lines and cylindrical surface all become splines).
* based on @TheMarkster trick, tried cutting the cylinder off of the Cut (i.e., cut twice). It works too.

Geometry checker doesn't report any errors for failed cut, because the failed cut produced a valid solid (i.e. the resulting solid is incorrect, but not broken).
User avatar
tanderson69
Veteran
Posts: 1626
Joined: Thu Feb 18, 2010 1:07 am

Re: FreeCAD scoffs at my cuts...

Post by tanderson69 »

DeepSOIC wrote: Fri Jun 22, 2018 2:23 pm * converted cylinder to all-nurbs. The cut is fixed, at the expense of losing analytic parts (straight lines and cylindrical surface all become splines).
that is interesting! I took one edge spline and the cylindrical surface and ran them through bopalgo_builder. only 2 edges came out instead of the expected 3. looks like intersection routine between cylinders and splines is broken. definitely an occt bug.


intersectionEdge01.png
intersectionEdge01.png (49.82 KiB) Viewed 1156 times
intersectionEdge02.png
intersectionEdge02.png (49.79 KiB) Viewed 1156 times
billfromnet
Posts: 35
Joined: Fri May 11, 2018 3:43 pm

Re: FreeCAD scoffs at my cuts...

Post by billfromnet »

What steps are required to create a presentation suitable for submission to the OCC team? How can I help?

What/where is bopalgo_builder?
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: FreeCAD scoffs at my cuts...

Post by bejant »

Thanks guys for checking this out.

billfromnet, I don't have an answer to any of your last 3 questions but I'm sure you'll get answers.
Post Reply