-
Notifications
You must be signed in to change notification settings - Fork 36
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
Lap bugfix #431
Changes from 13 commits
2287780
c51c008
e674f87
e204627
ba92f40
30e810a
049b475
68fcb2e
9090b4e
5335dcc
03f0e67
9dd732b
21c5002
1b62317
ac25c2d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| from compas.tolerance import TOL | ||
|
|
||
| from compas_timber.errors import BeamJoiningError | ||
| from compas_timber.fabrication import JackRafterCut | ||
| from compas_timber.fabrication import Lap | ||
|
|
@@ -64,8 +66,9 @@ | |
| raise BeamJoiningError(self.elements, self, debug_info=str(ae), debug_geometries=geometries) | ||
| except Exception as ex: | ||
| raise BeamJoiningError(self.elements, self, debug_info=str(ex)) | ||
| self.main_beam.add_blank_extension(start_main, end_main, self.main_beam_guid) | ||
| self.cross_beam.add_blank_extension(start_cross, end_cross, self.cross_beam_guid) | ||
| tol = TOL.absolute | ||
|
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. sure that's enough? |
||
| self.main_beam.add_blank_extension(start_main + tol, end_main + tol, self.main_beam_guid) | ||
| self.cross_beam.add_blank_extension(start_cross + tol, end_cross + tol, self.cross_beam_guid) | ||
|
|
||
| def add_features(self): | ||
| """Adds the required joint features to both beams. | ||
|
|
||
| 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", | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.