View Issue Details

IDProjectCategoryView StatusLast Update
0032857CommunityOCCT:Modeling Algorithmspublic2022-09-26 14:57
Reporterchennes Assigned Tonmanchen  
Status newResolutionopen 
Target Version7.7.0 
Summary0032857: Error when finding the intersection between a new face made after a draft and the inner face of body
DescriptionThis is a bug reported by a FreeCAD community member: the downstream ticket is here:

And a post describing an investigation in the issue is here:

Quoting from the discussion there:
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. 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 cylinder 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.

I've included a DRAW script below that reproduces the issue when the variable "inner rad" is less than the variable "pocket_center".
Steps To Reproduce# Script reproducing the problematic draft case in FreeCAD issue #2497
#Category: Modeling
#Title: OCCT Tutorial pocketed ring


# Set basic dimensions. Problems appear when inner_rad < pocket_center.
dset height 10
dset inner_rad 39
dset outer_rad 50
dset pocket_center 40
dset pocket_rad 20
dset pocket_depth 5

# Construct base profile (the "my_ring")
puts "Constructing my_ring..."

circle c_inner 0 0 0 0 0 1 inner_rad
circle c_outer 0 0 0 0 0 1 outer_rad
mkedge e_inner c_inner
mkedge e_outer c_outer
wire w_inner e_inner
wire w_outer e_outer

plane p0
mkface my_ring_inner_base p0 w_inner
mkface my_ring_outer_base p0 w_outer

prism my_ring_inner my_ring_inner_base 0 0 height
prism my_ring_outer my_ring_outer_base 0 0 height

bcut my_ring my_ring_outer my_ring_inner

# Make the pocket
puts "Constructing pocket..."

circle pocket_base pocket_center 0 0 0 0 1 pocket_rad
mkedge pocket_base pocket_base
wire pocket_base pocket_base

mkface pocket_base p0 pocket_base

prism my_pocket pocket_base 0 0 pocket_depth

# Make the cut
puts "Making the cut"

bcut slotted_ring my_ring my_pocket

explode slotted_ring F

# Make the draft
puts "Drafting the face"

# Found face by trial and error: slotted_ring_3
# Perform the draft
depouille slotted_ring_with_draft slotted_ring 0 0 -1 slotted_ring_3 44 0 1 0 0 0 1

puts "Showing result..."

# Display result
vdisplay slotted_ring_with_draft
TagsNo tags attached.
Test case number


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2022-02-25 21:33 chennes New Issue
2022-02-25 21:33 chennes Assigned To => msv
2022-09-26 14:57 nmanchen Assigned To msv => nmanchen