Rails

class bd_vslot.rails.VSlot2020Rail(length: float, num_x_rails: int = 1, num_y_rails: int = 1, c_beam: bool = False, *, rotation: ~build123d.geometry.Rotation | tuple[float, float, float] = (0, 0, 0), align: ~build123d.build_enums.Align | tuple[~build123d.build_enums.Align, ~build123d.build_enums.Align, ~build123d.build_enums.Align] | None = None, mode: ~build123d.build_enums.Mode = <Mode.ADD>)

Bases: BasePartObject

A 2020 V-Slot rail.

Parameters:
  • length – Length of the rail.

  • num_x_rails – Number of rails along the X-axis.

  • num_y_rails – Number of rails along the Y-axis.

  • c_beam – Whether to create a C-beam profile. If False, a box-like profile will be created. Default: False.

V-Slot 2020 rail
class bd_vslot.rails.VSlot2020RailProfile(array: ArrayLike, *, rotation: float = 0, align: ~build123d.build_enums.Align | tuple[~build123d.build_enums.Align, ~build123d.build_enums.Align] | None = None, mode: ~build123d.build_enums.Mode = <Mode.ADD>)

Bases: BaseSketchObject

Used to generate arbitrary shaped profiles for 2020 V-Slot rails.

The profile is generated based on a 2D array where a True-like value represents the presence of a rail at that grid position. For example, it is possible to create a C-beam profile using the following array:

[[ 1,  1 ],
 [ 1,  0 ],
 [ 1,  0 ],
 [ 1,  1 ]]

Any array position that is True-like and adjacent to a False-like position will have the appropriate slot and cavity features subtracted to create the correct V-Slot profile. True-like positions that are adjacent to other True-like positions will be joined without slots.

Parameters:

array – 2D boolean array representing the rail layout.

classmethod box(num_x_rails: int = 1, num_y_rails: int = 1) Self

Create a box-like V-Slot 2020 rail profile of the given dimensions.

classmethod c_beam(num_x_rails: int = 4, num_y_rails: int = 2) Self

Create a C-beam V-Slot 2020 rail profile of the given dimensions.

V-Slot 2020 rail profile