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

BTLx_Flip_Beam #2

Open
wants to merge 99 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
fe4e6c7
Sketch for Stirnversatz-Joint
jonashaldemann Apr 8, 2024
ffc6703
stirnversatz joint created
jonashaldemann Apr 8, 2024
ff7c55b
correction gh component
jonashaldemann Apr 8, 2024
67d06fa
adjustments
jonashaldemann Apr 8, 2024
0bdc58c
changes
jonashaldemann Apr 10, 2024
6a151b6
corrections
jonashaldemann Apr 11, 2024
c71afa7
errors removed, CutDepth option implemented
jonashaldemann Apr 11, 2024
279ffab
removed code-leftovers
jonashaldemann Apr 11, 2024
7830624
added extend cut option
jonashaldemann Apr 17, 2024
c162442
commit_for Panos
obucklin Apr 23, 2024
16e0226
ready for testing
obucklin Apr 23, 2024
69effe8
almost_there_for_panos
obucklin Apr 23, 2024
5705af2
temp
obucklin Apr 23, 2024
84cffcf
dovetail (mortise & tenon) btlx_process file
papachap Apr 23, 2024
c1380ea
Merge branch 'feature/t_stirnversatz' of https://github.com/gramaziok…
papachap Apr 30, 2024
41e3e32
french ridge
May 1, 2024
6d4b878
Merge remote-tracking branch 'origin/OB_Bird_Mouth_Pocket' into t2_de…
May 1, 2024
06e44c1
Merge branch 't2' into t2_development
May 1, 2024
2411bd5
inclination adjustment
papachap May 2, 2024
54de3df
add missing JointOptions gh_components
papachap May 2, 2024
bff03de
inclination adjustment
papachap May 2, 2024
fb58c3b
Merge branch 't2_development' of https://github.com/MAS-dfab/compas_t…
papachap May 2, 2024
d468150
clean_up
papachap May 2, 2024
ed455f8
pause
obucklin May 2, 2024
f427d49
fixed face index
obucklin May 2, 2024
75bc236
StepJoint WIP and Drilling WIP
paulocinco May 3, 2024
10de9f3
WIP - birdsmouth inclined pocket adjustment
papachap May 3, 2024
d51f894
Merge branch 'main' of https://github.com/MAS-dfab/compas_timber
papachap May 3, 2024
3672e8e
fix name attributes
papachap May 3, 2024
92d5852
text processing initiation
papachap May 3, 2024
de4b6e6
changed naming according to process
paulocinco May 3, 2024
b63a668
WIP drilling
paulocinco May 3, 2024
6547e42
Merge branch 'main' of https://github.com/MAS-dfab/compas_timber
paulocinco May 3, 2024
4c654b5
fixed bugs
obucklin May 3, 2024
b0555f5
updated Assembly GH component with add_features()
obucklin May 3, 2024
f2d527b
added GEOMETRY
obucklin May 3, 2024
271e253
fixed beam extension on birdsmouth
obucklin May 3, 2024
840c75d
cleaned up old debug prints and tests
obucklin May 3, 2024
ff6f54a
drilling btlx WIP
paulocinco May 3, 2024
e8a338b
implement engraving processing on btlx.part
papachap May 3, 2024
0d49fa7
store intersections to each beam when calling the pairing solver
papachap May 3, 2024
f0a5bca
Merge branch 'main' of https://github.com/MAS-dfab/compas_timber
papachap May 3, 2024
0b3eda9
ID attributes for beam and btlx.part
papachap May 3, 2024
6f6f860
added cutoff so birdsmouth doesnt form when beam is perpendicular to …
obucklin May 3, 2024
d9cf6dd
removed debug print funciton
obucklin May 3, 2024
15e96ed
Merge remote-tracking branch 'origin/Birdsmouth_bug_fixes'
May 3, 2024
0274a6f
update __init__ module with new implemented processes
papachap May 3, 2024
48766b7
correct names
papachap May 3, 2024
a6362e3
Merge branch 'main' of https://github.com/MAS-dfab/compas_timber
papachap May 3, 2024
e256506
hash out changes
papachap May 3, 2024
ee9e4b2
avoid import loop of modules (BTLx)
papachap May 6, 2024
690d231
avoid import loop of modules (BTLx)
papachap May 6, 2024
d0f45b9
hash_out
papachap May 6, 2024
6919cbb
Merge branch 'main' of https://github.com/MAS-dfab/compas_timber
papachap May 6, 2024
302c08b
calc_params_drilling
paulocinco May 6, 2024
3cedbe9
added drilling feature&code
paulocinco May 6, 2024
e2feb8b
Merge branch 'main' of https://github.com/MAS-dfab/compas_timber
paulocinco May 6, 2024
e2e92b5
Btlx drilling for t-butt completed
paulocinco May 6, 2024
7aca1d6
cleanup
paulocinco May 6, 2024
2af9df0
added drilling to french ridge btlx paramters
paulocinco May 6, 2024
67081e4
cleanup
paulocinco May 7, 2024
f7732fa
import TextFactory in init
papachap May 7, 2024
4157385
implement new method for intersct params in solver
papachap May 7, 2024
bb396b1
implement new logic w/ registering features from factory
papachap May 7, 2024
5a78051
remove unnecessary params
papachap May 7, 2024
415d333
Merge branch 'main' of https://github.com/MAS-dfab/compas_timber
papachap May 7, 2024
5ca47e7
debug intersection solver
papachap May 7, 2024
1402c6b
debug drilling feature - float everywhere
papachap May 7, 2024
7db9144
correction drilling params and stepjoint (doublecut) WIP
paulocinco May 8, 2024
4a5d6d0
Merge branch 'main' of https://github.com/MAS-dfab/compas_timber
paulocinco May 8, 2024
59ffe21
small corrections
paulocinco May 8, 2024
b5ea233
id attribute
papachap May 9, 2024
5daa9de
call intersection_parameters solver in gh component
papachap May 9, 2024
11bb6a6
remove print statements (silent error when compiling)
papachap May 9, 2024
8ae13eb
delete duplicate doublecut (old)
papachap May 9, 2024
3826975
use default params for positioning
papachap May 10, 2024
a59639b
register features only if ID is fed
papachap May 10, 2024
dd3136b
adjust pocket to 61.5mm
papachap May 12, 2024
e9baf74
61->61.5
papachap May 12, 2024
00236b0
init branch
obucklin May 13, 2024
2259dad
implement l_half_lap *extension not working **cannot serialize int (ET)
papachap May 13, 2024
419b630
fix birdsmouth condition
papachap May 13, 2024
f14de0e
added component
obucklin May 13, 2024
af231cc
fix extensions
May 14, 2024
dfbb1be
fix btlx l lap
May 14, 2024
b88392d
stepjoint working for BTLx
paulocinco May 14, 2024
4ed8ee8
Merge branch 'main' of https://github.com/MAS-dfab/compas_timber
paulocinco May 14, 2024
40e05a3
try to debud drilling params serialization issue
papachap May 14, 2024
e47ef27
Merge branch 'main' of https://github.com/MAS-dfab/compas_timber
papachap May 14, 2024
b3529b2
fix width and height
papachap May 15, 2024
201b558
debug l_half_lap
papachap May 15, 2024
0bc62b6
stepjoint + rhino geom operational for non-perp
paulocinco May 15, 2024
be2b645
Merge branch 'main' of https://github.com/MAS-dfab/compas_timber
paulocinco May 15, 2024
73331a9
stepjoint operational in btlx and rhino, angled and perp
paulocinco May 15, 2024
ab24c04
remove print statement
papachap May 16, 2024
0c5db64
put text to 15mm
papachap May 16, 2024
29a529e
Merge branch 'main' into BTLx_Flip_Beam
obucklin May 17, 2024
7786fd7
oops
obucklin May 17, 2024
65f7bd6
updated old BTLx component
obucklin May 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/compas_timber/connections/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from .x_halflap import XHalfLapJoint
from .t_halflap import THalfLapJoint
from .l_halflap import LHalfLapJoint
from .t_stirnversatz import TStirnversatzJoint
from .solver import ConnectionSolver
from .solver import JointTopology
from .solver import find_neighboring_beams
Expand All @@ -25,6 +26,7 @@
"LMiterJoint",
"XHalfLapJoint",
"THalfLapJoint",
"TStirnversatzJoint",
"LHalfLapJoint",
"NullJoint",
"FrenchRidgeLapJoint",
Expand Down
469 changes: 381 additions & 88 deletions src/compas_timber/connections/butt_joint.py

Large diffs are not rendered by default.

32 changes: 26 additions & 6 deletions src/compas_timber/connections/french_ridge_lap.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ class FrenchRidgeLapJoint(Joint):

SUPPORTED_TOPOLOGY = JointTopology.TOPO_L

def __init__(self, beam_a=None, beam_b=None, **kwargs):
def __init__(self, beam_a=None, beam_b=None, drill_diameter=0.0, **kwargs):
super(FrenchRidgeLapJoint, self).__init__(beams=(beam_a, beam_b), **kwargs)
self.beam_a = beam_a
self.beam_b = beam_b
self.drill_diameter = float(drill_diameter)
self.beam_a_key = beam_a.key if beam_a else None
self.beam_b_key = beam_b.key if beam_b else None
self.reference_face_indices = {}
Expand Down Expand Up @@ -71,7 +72,7 @@ def cutting_plane_top(self):

@property
def cutting_plane_bottom(self):
_, cfr = self.get_face_most_towards_beam(self.beam_b, self.beam_b, ignore_ends=True)
_, cfr = self.get_face_most_towards_beam(self.beam_b, self.beam_a, ignore_ends=True)
return cfr

def restore_beams_from_keys(self, assemly):
Expand All @@ -80,15 +81,22 @@ def restore_beams_from_keys(self, assemly):
self.beam_b = assemly.find_by_key(self.beam_b_key)
self._beams = (self.beam_a, self.beam_b)

def add_extensions(self):
self.beam_a.add_blank_extension(*self.beam_a.extension_to_plane(self.cutting_plane_top), joint_key=self.key)
self.beam_b.add_blank_extension(*self.beam_b.extension_to_plane(self.cutting_plane_bottom), joint_key=self.key)

def add_features(self):
self.features = []

def check_geometry(self):
"""
This method checks whether the parts are aligned as necessary to create French Ridge Lap and determines which face is used as reference face for machining.
"""
if not (self.beam_a and self.beam_b):
raise (BeamJoinningError("French Ridge Lap requires 2 beams"))
raise (BeamJoinningError(beams=self.beams, joint=self, debug_info="beams not set"))

if not (self.beam_a.width == self.beam_b.width and self.beam_a.height == self.beam_b.height):
raise (BeamJoinningError("widths and heights for both beams must match for the French Ridge Lap"))
raise (BeamJoinningError(beams=self.beams, joint=self, debug_info="beams are not of same size"))

normal = cross_vectors(self.beam_a.frame.xaxis, self.beam_b.frame.xaxis)

Expand All @@ -103,7 +111,13 @@ def check_geometry(self):
elif angle_vectors(normal, -self.beam_a.frame.zaxis) < 0.001:
indices.append(2)
else:
raise (BeamJoinningError("part not aligned with corner normal, no French Ridge Lap possible"))
raise (
BeamJoinningError(
beams=self.beams,
joint=self,
debug_info="part not aligned with corner normal, no French Ridge Lap possible",
)
)

if abs(angle_vectors(normal, self.beam_b.frame.yaxis) - math.pi) < 0.001:
indices.append(3)
Expand All @@ -114,5 +128,11 @@ def check_geometry(self):
elif abs(angle_vectors(normal, -self.beam_b.frame.zaxis) - math.pi) < 0.001:
indices.append(2)
else:
raise (BeamJoinningError("part not aligned with corner normal, no French Ridge Lap possible"))
raise (
BeamJoinningError(
beams=self.beams,
joint=self,
debug_info="part not aligned with corner normal, no French Ridge Lap possible",
)
)
self.reference_face_indices = {str(self.beam_a.key): indices[0], str(self.beam_b.key): indices[1]}
14 changes: 12 additions & 2 deletions src/compas_timber/connections/joint.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@ def __data__(self):
def beams(self):
return self._beams

def add_extensions(self):
"""Adds the features defined by this joint to affected beam(s).

Raises
------
:class:`~compas_timber.connections.BeamJoinningError`
Should be raised whenever the joint was not able to calculate the features to be applied to the beams.

"""
raise NotImplementedError

def add_features(self):
"""Adds the features defined by this joint to affected beam(s).

Expand Down Expand Up @@ -134,7 +145,7 @@ def create(cls, assembly, *beams, **kwargs):
raise ValueError("Expected at least 2 beams. Got instead: {}".format(len(beams)))
joint = cls(*beams, **kwargs)
assembly.add_joint(joint, beams)
joint.add_features()
joint.add_extensions()
return joint

@property
Expand Down Expand Up @@ -238,7 +249,6 @@ def _beam_side_incidence(beam_a, beam_b, ignore_ends=True):
raise AssertionError("No intersection found")

end, _ = beam_a.endpoint_closest_to_point(Point(*p1x))

if end == "start":
centerline_vec = beam_a.centerline.vector
else:
Expand Down
52 changes: 39 additions & 13 deletions src/compas_timber/connections/l_butt.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from compas_timber.parts import CutFeature
from compas_timber.parts import MillVolume
from compas_timber.parts import BrepSubtraction

from .joint import BeamJoinningError
from .solver import JointTopology
Expand Down Expand Up @@ -49,6 +50,7 @@ def __init__(
main_beam=None,
cross_beam=None,
mill_depth=0,
birdsmouth=False,
small_beam_butts=False,
modify_cross=True,
reject_i=False,
Expand All @@ -58,7 +60,7 @@ def __init__(
if main_beam.width * main_beam.height > cross_beam.width * cross_beam.height:
main_beam, cross_beam = cross_beam, main_beam

super(LButtJoint, self).__init__(main_beam, cross_beam, mill_depth, **kwargs)
super(LButtJoint, self).__init__(main_beam, cross_beam, mill_depth, birdsmouth, **kwargs)
self.modify_cross = modify_cross
self.small_beam_butts = small_beam_butts
self.reject_i = reject_i
Expand Down Expand Up @@ -88,6 +90,25 @@ def get_main_cutting_plane(self):
)
return super(LButtJoint, self).get_main_cutting_plane()

def add_extensions(self):
"""Adds the required extensions to both beams.

This method is automatically called when joint is created by the call to `Joint.create()`.

"""
assert self.main_beam and self.cross_beam
extension_tolerance = 0.01 # TODO: this should be proportional to the unit used
if self.birdsmouth:
extension_plane_main = self.get_face_most_towards_beam(self.main_beam, self.cross_beam, ignore_ends=True)[1]
else:
extension_plane_main = self.get_face_most_ortho_to_beam(self.main_beam, self.cross_beam, ignore_ends=True)[1]
start_main, end_main = self.main_beam.extension_to_plane(extension_plane_main)
self.main_beam.add_blank_extension(start_main + extension_tolerance, end_main + extension_tolerance, self.key)

extension_plane_cross = self.get_face_most_towards_beam(self.cross_beam, self.main_beam, ignore_ends=True)[1]
start_cross, end_cross = self.cross_beam.extension_to_plane(extension_plane_cross)
self.cross_beam.add_blank_extension(start_cross + extension_tolerance, end_cross + extension_tolerance, self.key)

def add_features(self):
"""Adds the required extension and trimming features to both beams.

Expand All @@ -102,8 +123,7 @@ def add_features(self):
try:
main_cutting_plane = self.get_main_cutting_plane()[0]
cross_cutting_plane = self.get_cross_cutting_plane()
start_main, end_main = self.main_beam.extension_to_plane(main_cutting_plane)
start_cross, end_cross = self.cross_beam.extension_to_plane(cross_cutting_plane)

except BeamJoinningError as be:
raise be
except AttributeError as ae:
Expand All @@ -113,20 +133,26 @@ def add_features(self):
except Exception as ex:
raise BeamJoinningError(beams=self.beams, joint=self, debug_info=str(ex))

extension_tolerance = 0.01 # TODO: this should be proportional to the unit used

if self.modify_cross:
self.cross_beam.add_blank_extension(
start_cross + extension_tolerance, end_cross + extension_tolerance, self.key
)

f_cross = CutFeature(cross_cutting_plane)
self.cross_beam.add_features(f_cross)
self.features.append(f_cross)

self.main_beam.add_blank_extension(start_main + extension_tolerance, end_main + extension_tolerance, self.key)

f_main = CutFeature(main_cutting_plane)
if self.mill_depth:
self.cross_beam.add_features(MillVolume(self.subtraction_volume()))
self.main_beam.add_features(f_main)
self.features.append(f_main)
self.features.append(MillVolume(self.subtraction_volume()))

do_jack = False
if self.birdsmouth:
if self.calc_params_birdsmouth():
self.main_beam.add_features(BrepSubtraction(self.bm_sub_volume))
self.features.append(BrepSubtraction(self.bm_sub_volume))

else:
do_jack = True
if do_jack:
f_main = CutFeature(main_cutting_plane)
self.main_beam.add_features(f_main)
self.features.append(f_main)

Loading