fabex.joinery.interlock_twist#

Functions#

interlock_groove(length, thickness, finger_play[, cx, ...])

Generates an interlocking groove.

interlock_twist(length, thickness, finger_play[, cx, ...])

Generates an interlocking twist.

twist_line(length, thickness, finger_play, percentage, ...)

Generates a multiple interlocking twist.

twist_separator_slot(length, thickness[, finger_play, ...])

Generates a slot for interlocking twist separator.

interlock_twist_separator(length, thickness, amount, ...)

Generates a interlocking twist separator.

single_interlock(finger_depth, finger_thick, ...[, ...])

Generates a single interlock at coodinate x,y.

distributed_interlock(loop, loop_length, finger_depth, ...)

Distributes interlocking joints of a fixed amount.

twist_female(name, length, diameter, tolerance, twist, ...)

Add a twist lock to a receptacle.

twist_male(name, length, diameter, tolerance, twist, ...)

Add a twist lock to a male connector.

Module Contents#

interlock_groove(length, thickness, finger_play, cx=0, cy=0, rotation=0)[source]#

Generates an interlocking groove.

Parameters:
  • length (float) – Length of groove

  • thickness (float) – thickness of groove

  • finger_play (float) – tolerance for proper fit

  • cx (float) – center offset x

  • cy (float) – center offset y

  • rotation (float) – angle of rotation

interlock_twist(length, thickness, finger_play, cx=0, cy=0, rotation=0, percentage=0.5)[source]#

Generates an interlocking twist.

Parameters:
  • length (float) – Length of groove

  • thickness (float) – thickness of groove

  • finger_play (float) – tolerance for proper fit

  • cx (float) – center offset x

  • cy (float) – center offset y

  • rotation (float) – angle of rotation

  • percentage (float) – percentage amount the twist will take (between 0 and 1)

twist_line(length, thickness, finger_play, percentage, amount, distance, center=True)[source]#

Generates a multiple interlocking twist.

Parameters:
  • length (float) – Length of groove

  • thickness (float) – thickness of groove

  • finger_play (float) – tolerance for proper fit

  • percentage (float) – percentage amount the twist will take (between 0 and 1)

  • amount (int) – amount of twists generated

  • distance (float) – distance between twists

  • center (bool) – center or not from origin

twist_separator_slot(length, thickness, finger_play=5e-05, percentage=0.5)[source]#

Generates a slot for interlocking twist separator.

Parameters:
  • length (float) – Length of slot

  • thickness (float) – thickness of slot

  • finger_play (float) – tolerance for proper fit

  • percentage (float) – percentage amount the twist will take (between 0 and 1)

interlock_twist_separator(length, thickness, amount, spacing, edge_distance, finger_play=5e-05, percentage=0.5, start='rounded', end='rounded')[source]#

Generates a interlocking twist separator.

Parameters:
  • length (float) – Length of separator

  • thickness (float) – thickness of separator

  • amount (int) – quantity of separation grooves

  • spacing (float) – distance between slots

  • edge_distance (float) – distance of the first slots close to the edge

  • finger_play (float) – tolerance for proper fit

  • percentage (float) – percentage amount the twist will take (between 0 and 1)

  • start (string) – type of start wanted (rounded, flat or other) not implemented

  • start – type of end wanted (rounded, flat or other) not implemented

single_interlock(finger_depth, finger_thick, finger_tolerance, x, y, groove_angle, type, amount=1, twist_percentage=0.5)[source]#

Generates a single interlock at coodinate x,y.

Parameters:
  • finger_depth (float) – depth of finger

  • finger_thick (float) – thickness of finger

  • finger_tolerance (float) – tolerance for proper fit

  • x (float) – offset x

  • y (float) – offset y

  • groove_angle (float) – angle of rotation

  • type (str) – GROOVE, TWIST, PUZZLE are the valid choices

  • twist_percentage – percentage of thickness for twist (not used in puzzle or groove)

distributed_interlock(loop, loop_length, finger_depth, finger_thick, finger_tolerance, finger_amount, tangent=0, fixed_angle=0, start=0.01, end=0.01, closed=True, type='GROOVE', twist_percentage=0.5)[source]#
Distributes interlocking joints of a fixed amount.

Dynamically changes the finger tolerance with the angle differences

Parameters:
  • loop (list of tuples) – coordinates curve

  • loop_length (float) – length of the curve

  • finger_depth (float) – depth of the mortise

  • finger_thick (float)

  • finger_tolerance (float) – minimum finger tolerance

  • finger_amount (int) – quantity of fingers

  • tangent (int)

  • fixed_angle (float) – 0 will be variable, desired angle for the finger

  • closed (bool) – False:open curve - True:closed curved

  • stem (twist_percentage = portion of twist finger which is the)

  • type (str) – GROOVE, TWIST, PUZZLE are the valid choices

  • start (float) – start distance from first point

  • end (float) – end distance from last point

twist_female(name, length, diameter, tolerance, twist, tneck, tthick, twist_keep=False)[source]#

Add a twist lock to a receptacle.

This function modifies the receptacle by adding a twist lock feature if the twist parameter is set to True. It performs several operations including interlocking the twist, rotating the object, and moving it to the correct position. If twist_keep is True, it duplicates the twist lock for further modifications. The function utilizes parameters such as length, diameter, tolerance, and thickness to accurately create the twist lock.

Parameters:
  • name (str) – The name of the receptacle to be modified.

  • length (float) – The length of the receptacle.

  • diameter (float) – The diameter of the receptacle.

  • tolerance (float) – The tolerance value for the twist lock.

  • twist (bool) – A flag indicating whether to add a twist lock.

  • tneck (float) – The neck thickness for the twist lock.

  • tthick (float) – The thickness of the twist lock.

  • twist_keep (bool?) – A flag indicating whether to keep the twist lock after duplication. Defaults to False.

twist_male(name, length, diameter, tolerance, twist, tneck, tthick, angle, twist_keep=False, x=0, y=0)[source]#

Add a twist lock to a male connector.

This function modifies the geometry of a male connector by adding a twist lock feature. It utilizes various parameters to determine the dimensions and positioning of the twist lock. If the twist_keep parameter is set to True, it duplicates the twist lock for further modifications. The function also allows for adjustments in position through the x and y parameters.

Parameters:
  • name (str) – The name of the connector to be modified.

  • length (float) – The length of the connector.

  • diameter (float) – The diameter of the connector.

  • tolerance (float) – The tolerance level for the twist lock.

  • twist (bool) – A flag indicating whether to add a twist lock.

  • tneck (float) – The neck thickness for the twist lock.

  • tthick (float) – The thickness of the twist lock.

  • angle (float) – The angle at which to rotate the twist lock.

  • twist_keep (bool?) – A flag indicating whether to keep the twist lock duplicate. Defaults to False.

  • x (float?) – The x-coordinate for positioning. Defaults to 0.

  • y (float?) – The y-coordinate for positioning. Defaults to 0.

Returns:

This function modifies the state of the connector but does not return a

value.

Return type:

None