-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sketch and Workplane improvements #1633
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1633 +/- ##
==========================================
+ Coverage 94.96% 95.21% +0.24%
==========================================
Files 28 27 -1
Lines 6322 6560 +238
Branches 1292 1402 +110
==========================================
+ Hits 6004 6246 +242
- Misses 192 193 +1
+ Partials 126 121 -5 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Quite some goodies, e.g. import cadquery as cq
s1 = cq.Sketch().rect(1,1).vertices().fillet(0.2).reset()
s2 = cq.Sketch().rect(0.5,0.5).vertices().fillet(0.1).reset()
s3 = s1 - s2 # sketch bool ops
w = (
cq.Workplane()
.placeSketch(s1, s2.moved(z=1)) # better Sketch moved
.loft()
.faces('>Z')
.extrude(1) # direct extruding of faces
.faces('>Z').workplane()
.eachpoint(s2.wires().offset(-0.1,mode='r').reset().val()) # val() for Sketch
.cutThruAll()
)
w.export('out.brep') # unified export method for Workplane, Sketch and Assembly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the work on this @adam-urbanczyk !
Co-authored-by: Jeremy Wright <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested the new features (at least most of them). It looks great with nice usability improvements too. I found a few doc issues/typos.
@lorenzncode I think I solved all the issues, could you take another look? |
Thanks @adam-urbanczyk ! |
This should resolve #1614, #1575, #1511, #1519, #1603, #1615 and add special methods to
Sketch
.face()
accepts Shapeadd()
,subtract()
andreplace()
methods for SketchWorkplane._getFaces()
to work with selected facesWorkplane.rarray
__iter__
toWorkplane
export
to:Workplane
Shape
Assembly
Sketch
Sketch.moved
Sketch._selection
optional, i.e. no selection and nothing selected are two different states nowSome notes:
cq.Sketch
e.g.selection: Optional[List[SketchVal]]
. This way it would be possible to differentiate between selection was not performed/reset and nothing was selected. -> After some experimentation I did go for this change.wires
, it seems that they were not needed.Quite some scope-creep but a lot of quality-of-life improvements.