Skip to content

Local and non-manifold sewing #1808

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

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open

Local and non-manifold sewing #1808

wants to merge 32 commits into from

Conversation

adam-urbanczyk
Copy link
Member

@adam-urbanczyk adam-urbanczyk commented Apr 13, 2025

Supports advanced use cases of building shapes from individual faces.

  • local and non-manifold sewing
  • history for shell and solid
  • addHole for Face
  • tests
  • project (normal projection)
  • docs
from cadquery.func import *
from cadquery.vis import show

# box
b = box(1,1,1)
# bottom face
bb = b.faces('<Z')
# top faces
bt = b.faces('>Z')

# make inner tube 
c = circle(0.45)
cf = extrude(c, (0,0,1))

# add holes to the bottom and top face
bb_hole = bb.addHole(c)
bt_hole = bt.addHole(cf.edges('>Z'))

hist = {}

# construct the final solid
rs = solid(
    (b.remove(bt, bb).faces(), #side faces
     bb_hole, # bottom with a hole
     cf, # inner cylinder face
     bt_hole, # top with a hole
    ),
    history=hist,
)

show(rs)

image

@adam-urbanczyk adam-urbanczyk linked an issue Apr 13, 2025 that may be closed by this pull request
3 tasks
@adam-urbanczyk adam-urbanczyk marked this pull request as draft April 13, 2025 10:03
Copy link

codecov bot commented Apr 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.56%. Comparing base (8c68faa) to head (7d0a3aa).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1808      +/-   ##
==========================================
+ Coverage   95.54%   95.56%   +0.01%     
==========================================
  Files          28       28              
  Lines        7319     7346      +27     
  Branches     1102     1110       +8     
==========================================
+ Hits         6993     7020      +27     
  Misses        195      195              
  Partials      131      131              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adam-urbanczyk adam-urbanczyk marked this pull request as ready for review April 24, 2025 17:29
Copy link
Member

@jmwright jmwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @adam-urbanczyk everything seems to work.

Co-authored-by: Jeremy Wright <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add nonmanifold, local sewing, and history
2 participants