Skip to content
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

Implement locationAt #404

Merged
merged 2 commits into from
Jul 15, 2020
Merged

Implement locationAt #404

merged 2 commits into from
Jul 15, 2020

Conversation

adam-urbanczyk
Copy link
Member

@adam-urbanczyk adam-urbanczyk commented Jul 13, 2020

This will resolve #389 . This is exposed only at shapes level, I don't think there is a elegant way to use expose this at the fluen api level.

Here is an example of what can be done with this functions. It can be very useful for modeling thread ends.
obraz

from cadquery import *

r = cq.Workplane().rect(3,1).extrude(0.1).faces('<Z').val()

s2 = Wire.makeHelix(7,20,5,angle=360).Edges()[0]
show_object(s2)
N = 20
locs = s2.Edges()[0].locations([0] + [i/N for i in range(1,N+1)])

show_object(Compound.makeCompound(r.located(l) for l in locs))

@codecov
Copy link

codecov bot commented Jul 14, 2020

Codecov Report

Merging #404 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #404      +/-   ##
==========================================
+ Coverage   93.52%   93.56%   +0.04%     
==========================================
  Files          19       19              
  Lines        5048     5083      +35     
  Branches      520      523       +3     
==========================================
+ Hits         4721     4756      +35     
  Misses        205      205              
  Partials      122      122              
Impacted Files Coverage Δ
cadquery/occ_impl/shapes.py 90.67% <100.00%> (+0.23%) ⬆️
tests/test_cadquery.py 98.97% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 747631f...bb63b48. Read the comment docs.

@adam-urbanczyk adam-urbanczyk changed the title Implement locationAt [WIP] Implement locationAt Jul 14, 2020
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.

Looks good, thanks!

@adam-urbanczyk
Copy link
Member Author

OK, merging.

@adam-urbanczyk adam-urbanczyk merged commit a8707ce into master Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support generating locations along a curve
2 participants