View Issue Details

IDProjectCategoryView StatusLast Update
0032932CommunityOCCT:Modeling Algorithmspublic2022-04-13 16:01
ReporterCharlemagneLasse Assigned Toazv 
Status newResolutionopen 
PlatformLinuxOSDebian bullseye amd64 
Product Version7.5.3 
Summary0032932: Fillet fails in PerformIntersectionAtEnd because no face was found
Description(This problem was seen with the version bundled with FreeCAD 0.20.28445 but can be reproduced easily with the master version directly from OCCT)

The PerformIntersectionAtEnd code is currently not handling all the faces correctly. If it retrieves Face[0] as F, it can happen that the previously ran code didn't actually retrieve any faces in this array at all.
For example when:
* "if (nface==3)" is true
  - "if (!findonf1)" is true (doesn't assign any faces to this array)
  - "if (!findonf2)" is true (doesn't assign any faces to this array)
  - "if (state == ChFiDS_OnSame)" is not true (because it is ChFiDS_AllSame)
  - "if (findonf1 && !isOnSame1)" cannot be true (see above, but would handle faces)
  - "if (findonf2 && !isOnSame2)" cannot be true (see above, but would handle faces)
  - "if (isOnSame2)" is false (but would also handle faces)

Since no faces were assigned here, F would be a NULL face. Without the change from 0032930, the process will simply segfault. But even with the changes from 0032930, the fillet will not be created.

More information (including how it was debugged) can be found at:

Steps To Reproduce# get most recent OCCT
$ cd /tmp/
$ git clone OCCT

# get build dependencies based on opencascade package in the Debian package source (deb-src) repository. will most likely work differently on whatever Distro you are using
$ sudo apt build-dep opencascade

# build everything (I only have 4 cores - you might change it if you are not working on a system with a 10 year old CPU)
$ cd OCCT
$ mkdir build
$ cd build

$ cd /tmp/
# figure out how the brp of the last Pad (name "Pad") is called:
$ unzip -p tutorial_excercise_1.FCStd Document.xml|xmllint --xpath 'string(//Document/ObjectData/Object/Properties/Property[@name="Label"]/String[@value="Pad"]/../../Property[@name="Shape"]/Part/@file)' /dev/stdin

# extract the PartShape3.brp for later usage - WARNING, the step with adding the extra header is only necessary in case it wasn't saved by FreeCAD. Versions before 4aa09e317f7be81a906439ff4bc08a4b4e8043ba will not be able to load this file if this header is not present
$ rm -f PartShape3.brp
$ echo DBRep_DrawableShape > PartShape3.brp
$ unzip -p tutorial_excercise_1.FCStd PartShape3.brp >> PartShape3.brp

# prepare reproducer script
$ cd /tmp/OCCT/
$ cat > test.script << "EOF"
# load the brp, get edges and then try to add fillet on the problematic edge Edge10
pload ALL
restore /tmp/PartShape3.brp b
explode b E
blend b b 1 b_10

# start DRAWEXE shell
# usually I would have done it like that. But it is then not 100% reproducible due to various system effects.
# So I just use gdb in the actual command to improve my live and make it 100% reproducible
#$ LD_LIBRARY_PATH=/tmp/OCCT/build/lin64/gcc/libd/ CASROOT=/tmp/OCCT ./build/lin64/gcc/bind/DRAWEXE -f test.script

$ LD_LIBRARY_PATH=/tmp/OCCT/build/lin64/gcc/libd/ CASROOT=/tmp/OCCT gdb -q --ex run --args ./build/lin64/gcc/bind/DRAWEXE -f test.script
TagsNo tags attached.
Test case number

Attached Files

  • PartShape3.brp (25,149 bytes)



2022-04-13 15:32


PartShape3.brp (25,149 bytes)

Issue History

Date Modified Username Field Change
2022-04-13 15:32 CharlemagneLasse New Issue
2022-04-13 15:32 CharlemagneLasse Assigned To => msv
2022-04-13 15:32 CharlemagneLasse File Added: PartShape3.brp
2022-04-13 16:01 msv Assigned To msv => azv