I'm using Python 3.8, CadQuery 2.1, and CQ-editor 0.2 on Ubuntu 20.04.
I'm developing models that will be used to produce bucks (molds) for thermoforming. In order to ease mold release, I need to avoid vertical or negative angles. To make a mold, I'll create a buck model, which has a positive draft angle, select the edges that aren't on the top or bottom, and fillet those edges. Then I'll create a well that has a negative draft angle and cut it out of the buck.
The problem I'm having is that for parts with a negative draft angle, I can't get the edge selector to select the critical edges.
Here's some test code to demonstrate the problem:
import logging
import cadquery as cq
LOG = logging.getLogger(__name__)
def extruded_fillet_test( x, y, z, r, d ):
part = cq.Workplane().rect( x, y )
part = part.extrude( z, taper=d )
part = part.edges( 'not(|X or |Y)' )
LOG.warning( '%d edges selected', len( part.objects ) )
part = part.fillet( r )
return part
f1 = extruded_fillet_test( 100, 100, 20, 5, 0 )
f2 = extruded_fillet_test( 100, 100, 20, 5, 15 )
f3 = extruded_fillet_test( 100, 100, 20, 5, -15 )
When I run this code, I see this in the log:
[2021-03-20 17:47:16.967398] WARNING: temp: 4 edges selected
[2021-03-20 17:47:17.001737] WARNING: temp: 4 edges selected
[2021-03-20 17:47:17.042074] WARNING: temp: 12 edges selected
And here's what you'll see in the preview:
F1: No taper, just fillet, as expected
F2: Positive taper, fillet good
F3: Negative taper, fillet on top as well as sides -- BAD
Can anyone suggest an edge selector expression that will select just the 4 edges that need a fillet, for all 3 scenarios I've shown?
Thanks!
- Craig -