Sketch and Workplane improvements #1633
Merged
Merged
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:
|
Member
Author
|
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 |
jmwright
reviewed
Jul 30, 2024
jmwright
approved these changes
Jul 30, 2024
Member
jmwright
left a comment
There was a problem hiding this comment.
Thanks for all the work on this @adam-urbanczyk !
lorenzncode
requested changes
Aug 3, 2024
Member
lorenzncode
left a comment
There was a problem hiding this comment.
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.
This was
linked to
issues
Aug 11, 2024
Closed
Member
Author
|
@lorenzncode I think I solved all the issues, could you take another look? |
lorenzncode
approved these changes
Aug 21, 2024
Member
|
Thanks @adam-urbanczyk ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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__toWorkplaneexportto:WorkplaneShapeAssemblySketchSketch.movedSketch._selectionoptional, i.e. no selection and nothing selected are two different states nowSome notes:
cq.Sketche.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.