issue #2497: Changing dimension 40.001 to a value <= 40 (and > 30) gets the expected behavior. More than 40 gets the the buggy one
Model is attached to ticket.
Description
possible bug: FreeCAD>>Part Design>> Draft tool
Steps To Reproduce
Sketch001: Changing dimension 40.001 to a value less or equal to 40 (and greater than 30) gets the expected behavior. More than 40 gets the buggy one.
Additional Information
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6689 (Git)
Build type: Release
Branch: master
Hash: 3003f1638949a018596a16e9e8eea7f237e1d94d
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Last edited by Kunda1 on Fri Feb 25, 2022 11:15 pm, edited 1 time in total.
Reason:used github issue number
I believe this is kind of a "Heisenbug" again. I tried changing the values a few times, even rebuilding the model from scratch. The results seem different everytime.
[EDIT] I don't know how long we need to keep changing values before the "Heisenbug" reappears, but as I keep rerunning this thing to debug, it seems the bug only happens when the center of the circle in "Sketch001" is within the ring i.e. inner_diam < center to origin < outer_diam.
Last edited by jnxd on Thu Sep 23, 2021 4:43 am, edited 1 time in total.
I compiled a debug version of OCCT 7.5.0 and the bug seems to be in finding the intersection between the new face made after the draft and the inner face of body, which gives the curve for one of the new edges [EDIT: Added file for explanation]. The new draft face is conical, whose surface is a "double cone" formed by extending the cone beyond it's tip. The inner cylindrical surface intersects this double cone at multiple places (mostly forming two disconnected curves except where the cyclinder intersects the tip itself), and the portion that we want is often not found.
I put a break at .../occt/src/Draft/Draft_Modification_1.cxx:921, where the intersection happens. You may need to track down the exact iteration where the problem happens. Multiple "lines" (the intersection curves) are returned after i2s::Perform(...) and even when the draft works correctly (inner diameter >=40 right now), none of these "lines" are what we need. There is some "gluing" that happens after this which fixes the lines, but only in some cases. For now it is with inner diameter >= (distance between cone's axis and origin), but perhaps earlier the sign was inverted.
OK, reporting things upstream is easier if we can construct a sequence of DRAW Test Harness commands (perhaps starting from a precomposed BRep file that we include in the report) to cause the error. How simple can we make this?
chennes wrote: ↑Mon Oct 11, 2021 2:00 am
OK, reporting things upstream is easier if we can construct a sequence of DRAW Test Harness commands (perhaps starting from a precomposed BRep file that we include in the report) to cause the error. How simple can we make this?
Was something I was trying to do myself. Couldn't get to making the pad with a hole in the first place. Here's the WIP if anyone wants to try.
[UPDATE] Gave up on trying to make a face with a hole before making the prism and just used boolean on two cylinders. Attached file reproduces the bug.