-
Notifications
You must be signed in to change notification settings - Fork 33
Lap bugfix #431
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
Merged
Merged
Lap bugfix #431
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2287780
add tol in extensions
papachap c51c008
return none if projection fails
papachap e674f87
fix minor bugs
papachap e204627
changelog
papachap ba92f40
Update src/compas_timber/fabrication/lap.py
papachap 30e810a
Merge https://github.com/gramaziokohler/compas_timber into lap-bugfix
papachap 049b475
replace angle_vectors_projected with core function
papachap 68fcb2e
remove function from utils module
papachap 9090b4e
Merge branch 'main' of https://github.com/gramaziokohler/compas_timbe…
papachap 5335dcc
temporary fix for angle_vectors_projected()
papachap 03f0e67
Update src/compas_timber/fabrication/lap.py
papachap 9dd732b
changelog
papachap 21c5002
Merge branch 'lap-bugfix' of https://github.com/gramaziokohler/compas…
papachap 1b62317
Update CHANGELOG.md
papachap ac25c2d
Update src/compas_timber/fabrication/lap.py
papachap File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,6 @@ | |
| from compas.geometry import subtract_vectors | ||
| from compas.geometry import Frame | ||
| from compas.geometry import Transformation | ||
| from compas.geometry import Projection | ||
| from compas.geometry import intersection_line_plane | ||
| from compas.geometry import closest_point_on_segment | ||
| from compas.geometry import intersection_line_line | ||
|
|
@@ -296,32 +295,6 @@ def distance_segment_segment(segment_a, segment_b): | |
| return distance_point_point(pt_seg_a, pt_seg_b) | ||
|
|
||
|
|
||
| def angle_vectors_projected(vector_a, vector_b, normal): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add to changelog in the EDIT: you already did.. sorry!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I already did. It should appear to you |
||
| """Computes the angle between two vectors projected onto a plane defined by a normal vector. | ||
|
|
||
| Parameters | ||
| ---------- | ||
| vector_a : :class:`compas.geometry.Vector` | ||
| The first vector. | ||
| vector_b : :class:`compas.geometry.Vector` | ||
| The second vector. | ||
| normal : :class:`compas.geometry.Vector` or :class:`compas.geometry.Plane` or :class:`compas.geometry.Frame` | ||
| The normal vector of the plane to project the vectors onto. | ||
|
|
||
| Returns | ||
| ------- | ||
| float | ||
| The angle between the two projected vectors | ||
| """ | ||
| if isinstance(normal, (Plane, Frame)): | ||
| normal = normal.normal | ||
|
|
||
| projection = Projection.from_plane(Plane(Point(0, 0, 0), normal)) | ||
| proj_vect_a = vector_a.transformed(projection) | ||
| proj_vect_b = vector_b.transformed(projection) | ||
| return angle_vectors_signed(proj_vect_a, proj_vect_b, normal, deg=True) | ||
|
|
||
|
|
||
| def is_polyline_clockwise(polyline, normal_vector): | ||
| """Check if a polyline is clockwise. If the polyline is open, it is closed before the check. | ||
|
|
||
|
|
@@ -432,7 +405,6 @@ def is_point_in_polyline(point, polyline, in_plane=True, tol=TOL): | |
| "intersection_line_beam_param", | ||
| "classify_polyline_segments", | ||
| "distance_segment_segment", | ||
| "angle_vectors_projected", | ||
| "is_polyline_clockwise", | ||
| "correct_polyline_direction", | ||
| "get_polyline_segment_perpendicular_vector", | ||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure that's enough?
TOL.absoluteis like1e-9iirc..