View Issue Details

IDProjectCategoryView StatusLast Update
0003142PartDesignBugpublic2019-02-27 21:37
ReporterSam Assigned To 
PriorityhighSeveritycrashReproducibilityalways
Status confirmedResolutionopen 
Platformintel i7 laptopOSubuntuOS Version16.04.2
Product Version0.17 
Summary0003142: Crash creating fillets on sweep (OCC bug)
DescriptionFooling around with sweeps investigating an issue with another design. The attached file is very very fragile when creating fillets.

I have caused less crashes with a .1mm fillet.

I also occasionally see some unexpected propagation along multiple unselected edges with a tiny fillet. But I don't know what the behaviour is actually supposed to be.
Steps To ReproduceSelect the underside corners of the sweep. Fillet003.Edge42 & Fillet003.Edge22

Click make fillet in the toolbar.

Crash.
Additional InformationOS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11670 (Git)
Build type: None
Branch: master
Hash: 7b066fe33488ddc389c4545e93647a8e59e69a2b
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedKingdom (en_GB)
Tags0.18, OCC Bug, OCC NotOnRoadmap, upstream
FreeCAD Information

Relationships

related to 0002683 closedDeepSOIC Add Refine shape feature to PartDesign 

Activities

Sam

2017-07-27 09:11

reporter  

sweep test 2.fcstd (57,436 bytes)

Kunda1

2017-07-27 17:04

administrator   ~0009838

@Sam please link forum thread to ticket. thanks

Sam

2017-07-27 19:20

reporter   ~0009841

Are you saying this works for you?
I am trying to give the project useful feedback in exchange for the help I've had on the forum. I understand that nobody wants their bug tracker littered with crummy junk from n00bs that never show up again.
This is a clear and concise issue with a simple example file and step by step guide to recreate it.
There is no forum thread. I do not need a discussion to confirm that a crash is a bugissue. Are you sure you do?

Sam

2017-07-27 19:40

reporter   ~0009844

@Kunda1 I just re-read your comment, and it is very polite. It is first thing in the morning here, and apparently it takes me a while to become fully rational.

I know I did not follow the very clear reporting guidelines.

If this is a problem, you are welcome to close the issue.

Kunda1

2017-07-27 20:15

administrator   ~0009845

@Sam I thought i saw you post something in the Forum and someone said for you to opne a ticket about it. I was assuming that was the thread you needed to link. Is this a separate issue ?

Sam

2017-07-27 20:31

reporter   ~0009846

This issue stands by itself. I did discover it while I was working through simplifying another issue I have, but it is unrelated.

I do have other, less well defined, issues that I am working through on the forum.

Sam

2017-07-27 20:58

reporter   ~0009847

Another file attached.

I was experimenting with this some more, and I see some other unusual behaviour:

You should be able to re-create this from scratch:
  • New document
  • Insert PD additive box, accept defaults
  • Select top face
  • Draw sketch (sketch rotates to bottom for some reason?)
  • Sketch an oblong with one side constrained to the Y axis
  • Sweep sketch along the left and rear top edges as in the attached file
  • Corner transition: right
  • Fillet the top inside edges

This doesn't cause a crash, but might be a clue for someone:
  • Where the fillets should meet there is a hole in one of them.
  • Top view (2) shows the sweep along the top (it should be on the side and bottom)
  • Changing the view slightly shows the sweep correctly on the side and bottom.
sweep test 4.fcstd (42,250 bytes)

Kunda1

2017-07-28 01:19

administrator   ~0009848

@normandc care to take a look ? (thanks in advance)

normandc

2017-07-28 01:49

manager   ~0009850

Last edited: 2017-07-28 01:49

View 2 revisions

Wow! Instant crash when trying to fillet Fillet003.Edge22 & Fillet003.Edge62 (I assume Face42 was a typo) from the original "sweep test 2.fctsd" file. Obviously this should not happen.

The source of the problem is that the residual edges left by the sweep create a corner face on top and bottom of the sweep. The Fillet algorithm cannot deal with this condition and doesn't know how to extend each filleted edge to meet on this quarter round face. To confirm this, try the following which goes against my own usual advice :-P: go to Edit --> Preferences/Part Design/General and enable "Automatically refine model after sketch-based operation"; then mark the model to recompute (Right-click on the "sweep test 2" label in the Model tree) and refresh (CTRL + R). This removes the residual edges and leaves a single face. Then, when filleting the two underside edges of the sweep, the fillet succeeds.

Another way to make the fillet succeed is to first fillet the vertical corner edge Fillet003.Edge37. Then the fillet propagates all around the underside.

So, this bug report should be about preventing a hard crash and instead allowing the fillet feature to fail with an error.

Sam, could you provide a backtrace as explained in the following wiki page?
https://www.freecadweb.org/wiki/Debugging

Even if you use the daily PPA package rather than compile a debug build, I think it could provide useful info. One other thing to try is to install the debug symbols package which in theory should produce the same output as a debug build. https://forum.freecadweb.org/viewtopic.php?f=4&t=20347

Tested on
OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11670 (Git)
Build type: None
Branch: master
Hash: 7b066fe33488ddc389c4545e93647a8e59e69a2b
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: French/Canada (fr_CA)

normandc

2017-07-28 01:55

manager   ~0009851

BTW this is a clear case where a refine shape, either manual or automatic is necessary before applying fillets/chamfers. Which validates my 0002683 feature request.

normandc

2017-07-28 02:11

manager   ~0009852

Draw sketch (sketch rotates to bottom for some reason?)

Sam
I can't reproduce. BTW you should attach your box to the origin. In the Primitive parameters (task panel), the first button is automatically active and shows "Selecting...", awaiting a selection. Select the XY_Plane for example.

Sketch an oblong with one side constrained to the Y axis

Sam
Your sketch contains a square, not an oblong...?

Where the fillets should meet there is a hole in one of them.

Sam
Same issue as original description, same culprit: the residual edge at the corner. (Same solution too)

  • Top view (2) shows the sweep along the top (it should be on the side and bottom)
  • Changing the view slightly shows the sweep correctly on the side and bottom.

    Sam
  • Not having this issue. This may be graphics related, and not relevant to the current report.

    normandc

    2017-07-28 02:14

    manager   ~0009853

    I also occasionally see some unexpected propagation along multiple unselected edges with a tiny fillet.

    Sam
    A fillet will always propagate along a chain of edges that are contiguous and tangent.

    Kunda1

    2017-07-28 10:46

    administrator   ~0009854

    @kkremitzki since this is PDN, care to have a look ?

    Sam

    2017-07-30 03:27

    reporter   ~0009858

    Sam, could you provide a backtrace as explained in the following wiki page?

    normandc

    http://paste.ubuntu.com/25202716/

    Kunda1

    2017-08-14 14:52

    administrator   ~0009932

    Since this is a hard crash I'm targetting it for 0.17

    Kunda1

    2017-08-21 11:16

    administrator   ~0009978

    Opened forum thread: https://forum.freecadweb.org/viewtopic.php?f=8&t=23998 for further discussion.

    wmayer

    2017-10-18 19:58

    administrator   ~0010325

    Here the stack trace starting from the PD fillet feature:
    opencascade::handle<TopLoc_SListNodeOfItemLocation>::handle<TopLoc_SListNodeOfItemLocation> Standard_Handle.hxx 68
    TopLoc_SListOfItemLocation::TopLoc_SListOfItemLocation TopLoc_SListOfItemLocation.lxx 32
    TopLoc_Location::TopLoc_Location TKMathd
    TopLoc_Location::Multiplied TopLoc_Location.cxx 108
    TopLoc_Location::operator * TopLoc_Location.hxx 101
    BRep_Tool::Surface BRep_Tool.cxx 88
    BRep_Tool::Parameters BRep_Tool.cxx 1454
    ChFi3d_IsInFront ChFi3d_Builder_0.cxx 891
    ChFi3d_FilBuilder::PerformTwoCorner ChFi3d_FilBuilder_C2.cxx 244
    ChFi3d_Builder::PerformFilletOnVertex ChFi3d_Builder.cxx 769
    ChFi3d_Builder::Compute ChFi3d_Builder.cxx 303
    BRepFilletAPI_MakeFillet::Build BRepFilletAPI_MakeFillet.cxx 534
    PartDesign::Fillet::execute FeatureFillet.cpp 101

    The actual bug is inside the function ChFi3d_IsInFront where it is tried to get the (u,v) parameter of a vertex on a face. However the face is a null shape which isn't checked beforehand.

    This is clearly an OCC bug.

    Kunda1

    2017-10-18 20:08

    administrator   ~0010326

    @wmayer what version of OCC did you test with ?

    wmayer

    2017-10-22 18:05

    administrator   ~0010337

    OCC 7.0.0

    Kunda1

    2017-10-22 19:32

    administrator   ~0010338

    @wmayer what about OCC 7.1 or 7.2 ?

    normandc

    2018-09-16 15:50

    manager   ~0011761

    sweep test 2.fcstd still crashes with FC 0.18 and OCCT 7.3.0.

    OS: Ubuntu 18.04.1 LTS
    Word size of OS: 64-bit
    Word size of FreeCAD: 64-bit
    Version: 0.18.14727 (Git)
    Build type: Release
    Branch: master
    Hash: c6df59969bfb3ae2027e2b47ddd559852f6e9a4e
    Python version: 2.7.15rc1
    Qt version: 4.8.7
    Coin version: 4.0.0a
    OCC version: 7.3.0
    Locale: French/Canada (fr_CA)

    Issue History

    Date Modified Username Field Change
    2017-07-27 09:11 Sam New Issue
    2017-07-27 09:11 Sam File Added: sweep test 2.fcstd
    2017-07-27 17:04 Kunda1 Note Added: 0009838
    2017-07-27 19:20 Sam Note Added: 0009841
    2017-07-27 19:40 Sam Note Added: 0009844
    2017-07-27 20:15 Kunda1 Note Added: 0009845
    2017-07-27 20:31 Sam Note Added: 0009846
    2017-07-27 20:58 Sam File Added: sweep test 4.fcstd
    2017-07-27 20:58 Sam Note Added: 0009847
    2017-07-28 01:19 Kunda1 Note Added: 0009848
    2017-07-28 01:49 normandc Note Added: 0009850
    2017-07-28 01:49 normandc Note Edited: 0009850 View Revisions
    2017-07-28 01:55 normandc Note Added: 0009851
    2017-07-28 02:11 normandc Note Added: 0009852
    2017-07-28 02:14 normandc Note Added: 0009853
    2017-07-28 10:46 Kunda1 Note Added: 0009854
    2017-07-28 10:46 Kunda1 Status new => confirmed
    2017-07-30 03:27 Sam Note Added: 0009858
    2017-08-14 14:52 Kunda1 Target Version => 0.17
    2017-08-14 14:52 Kunda1 Note Added: 0009932
    2017-08-14 14:53 Kunda1 Priority normal => high
    2017-08-21 11:11 Kunda1 Relationship added related to 0002683
    2017-08-21 11:16 Kunda1 Note Added: 0009978
    2017-10-18 19:58 wmayer Note Added: 0010325
    2017-10-18 19:58 wmayer Target Version 0.17 =>
    2017-10-18 20:06 Kunda1 Tag Attached: OCC Bug
    2017-10-18 20:06 Kunda1 Tag Attached: OCC NotOnRoadmap
    2017-10-18 20:06 Kunda1 Tag Attached: upstream
    2017-10-18 20:08 Kunda1 Note Added: 0010326
    2017-10-22 18:05 wmayer Note Added: 0010337
    2017-10-22 19:32 Kunda1 Note Added: 0010338
    2017-11-03 17:13 Kunda1 Tag Attached: 0.18
    2018-09-16 15:50 normandc Note Added: 0011761
    2019-02-27 21:37 Kunda1 Summary Crash creating fillets on sweep => Crash creating fillets on sweep (OCC bug)