Few shape/free func related fixes#2033
Open
adam-urbanczyk wants to merge 87 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2033 +/- ##
==========================================
+ Coverage 95.62% 95.64% +0.01%
==========================================
Files 30 30
Lines 8893 8956 +63
Branches 1311 1326 +15
==========================================
+ Hits 8504 8566 +62
Misses 240 240
- Partials 149 150 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… into adam-shape-fixes
jmwright
reviewed
May 15, 2026
jmwright
reviewed
May 15, 2026
| it.Next() | ||
|
|
||
| def ancestors(self, shape: "Shape", kind: Shapes) -> "Compound": | ||
| def ancestors(self, ctx: "Shape", kind: Shapes) -> "Compound": |
Member
There was a problem hiding this comment.
Will this parameter name change break existing scripts?
Member
Author
There was a problem hiding this comment.
It could, but every time I used this method I was confused. And AFAIR I implemented it...
jmwright
reviewed
May 15, 2026
jmwright
approved these changes
May 15, 2026
lorenzncode
reviewed
May 16, 2026
| assert siblings_1.size() == 4 | ||
|
|
||
| siblings_12 = f.siblings(simple_box, "Edge", (1, 2)) | ||
| assert siblings_12.size() == 5 |
Member
There was a problem hiding this comment.
Is this intended to be order dependent?
print(f.siblings(simple_box, "Edge", (1, 2)).size()) # 5
print(f.siblings(simple_box, "Edge", (2, 1)).size()) # 1 Siblings bug: Visualize with fig. The level 3 faces are missing (blue).:
from cadquery.func import box, fuse
from cadquery.fig import Figure
fig = Figure()
fig.clear()
solid1 = fuse(
box(1, 1, 1),
box(1, 1, 1).moved(x=1),
box(1, 1, 1).moved(x=2),
box(1, 1, 1).moved(x=3),
)
seed = solid1.face("<X")
level_1 = seed.siblings(solid1, "Vertex", 1)
level_2 = seed.siblings(solid1, "Vertex", 2)
level_3 = seed.siblings(solid1, "Vertex", 3)
actual_123 = seed.siblings(solid1, "Vertex", (1, 2, 3))
fig.show(
seed,
name="seed",
color="Black",
alpha=1.0,
)
fig.show(
solid1,
name="solid1",
color="LightGray",
alpha=0.2,
)
fig.show(
level_1,
name="level_1",
color="Red",
alpha=0.8,
)
fig.show(
level_2,
name="level_2",
color="Green",
alpha=0.8,
)
fig.show(
level_3,
name="level_3",
color="Blue",
alpha=0.8,
)
fig.show(
actual_123.moved(z=1),
name="actual_123",
color="Orange",
alpha=0.8,
)
fig.iso()
fig.fit()
Member
Author
There was a problem hiding this comment.
Thanks, will investigate.
Co-authored-by: Jeremy Wright <wrightjmf@gmail.com>
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.
uIsoMatrixandvIsoMatrixsingle float param handlingconstrainedApproximate2Dcheckto produce output (warnings) by defaultShape.reversesiblingsto support multiple levels at oncesolidfree function handling of multiple inner cavitiesoffset2D