Closed johnbeard closed 6 years ago
:white_check_mark: Build cadquery 1.0.73 completed (commit https://github.com/dcowden/cadquery/commit/9b4ee30572 by @johnbeard)
Merging #292 into master will increase coverage by
0.02%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #292 +/- ##
==========================================
+ Coverage 92.79% 92.82% +0.02%
==========================================
Files 10 10
Lines 2207 2215 +8
==========================================
+ Hits 2048 2056 +8
Misses 159 159
Impacted Files | Coverage Δ | |
---|---|---|
cadquery/cq.py | 94.33% <100%> (+0.06%) |
:arrow_up: |
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 6251ec0...7a3a561. Read the comment docs.
Something else which occurred to me is would it be useful to have polarLineToX
and polarLineToY
functions, which extend a line at a given angle from the current point to the given ordinate/mantissa? For example, go from here at an angle of 30 degrees until you hit x=40. It would make things like set-backs quite straightforward.
The questions then would be:
@johnbeard thanks for the contribution!
This looks great to me. Would you like to merge it as is, or do you want to also add the other versions you are contemplating above first?
I don't really mind, it can a follow-up PR if you want.
I would like to know what you'd like to do on error (e.g. parallel line) or a "reverse" situation before I do the toX
and toY
variants (and only if you agree they are desirable).
Hmm, looking at it, the neatest way to do toX
and toY
probably would be using Vector.projectToLine
somehow. I'd rather not do too much vector maths when we have a full-scale geometry kernel to do it for us.
Perhaps just merge this and I'll have a think about the other methods.
@johnbeard i tend to agree that proceeding as-is is best. I think polarLineToX and polarLineToY would be rarely used. and then the error cases you'd be describing would be rare within those cases.
Unrelated, i think what would be really cool is ability to draw lines and have them trimmed when they intersect others. that's a baby version of constrtraint solving.
What I really want is a 2d sketch solver, so that instead of doing the math on a piece of paper, you can actually create the sketch the same way you would in Solidworks or FreeCAD -- in which you link the geometry to contraints and let it solve.
@johnbeard @dcowden It sounds like this is ready to merge. Is that correct?
I think so
Thanks for the contribution @johnbeard
Useful for defining lines when you know the length and angle, rather than the Cartesian co-ordinates.
Based on issue #291