def setup_libs(self): mcad = self.create_lib_dir(self.MCAD_DIR) dotscad = self.create_lib_dir(self.DOTSCAD_DIR) with quiet_solid(): self._mcad = solid.import_scad(str(mcad)) self._dotSCAD = solid.import_scad(str(dotscad))
# published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # Copyright 2021 Rock Storm <rockstorm at gmx dot com> # Python imports import argparse import math import solid as sp import solid.utils as spu # Project imports import p2910 as screw # SCAD imports assembly = sp.import_scad('../lib/MCAD/assembly/attach.scad') threads = sp.import_scad('../lib/MCAD/fasteners/threads.scad') chamfers = sp.import_scad('../lib/MCAD/fillets/chamfers.scad') regular_shapes = sp.import_scad('../lib/MCAD/shapes/2Dshapes.scad') # Config T_d = screw.T_d # thread nominal diameter T_p = screw.T_p # thread pitch T_c = screw.T_c # thread clearance F_d = screw.F_d # flange diam F_t = 2 # flange thickness B_d = screw.B_d # bearing seat diameter B_h = screw.B_h # bearing seat depth N_af = 30 # nut across-flats dimension N_h = 10 # nut height PN_s = 3 # part number character height
# modify it under the terms of the GNU General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # Copyright 2021 Rock Storm <rockstorm at gmx dot com> # Python imports import argparse import solid as sp import solid.utils as spu # Project imports import p2912 as nut # SCAD imports assembly = sp.import_scad('../lib/MCAD/assembly/attach.scad') chamfers = sp.import_scad('../lib/MCAD/fillets/chamfers.scad') # Config N_af = nut.N_af # nut across-flats dimension N_h = nut.N_h # nut height _code_name = "2913" _version = '' # Connectors THREAD_CONN = [[0, 0, 0], [0, 0, -1], 0] @spu.bom_part(description="Nut", code_name=_code_name) def part(variant='', configuration='', debug=False): tmp = nut.hexagon()
# modify it under the terms of the GNU General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # Copyright 2021 Rock Storm <rockstorm at gmx dot com> # Python imports import argparse import math import solid as sp import solid.utils as spu import v2901 as bearing # SCAD imports assembly = sp.import_scad('../lib/MCAD/assembly/attach.scad') threads = sp.import_scad('../lib/MCAD/fasteners/threads.scad') chamfers = sp.import_scad('../lib/MCAD/fillets/chamfers.scad') curved_text = sp.import_scad('../lib/MCAD/text/curved_text.scad') # Config dim10 = 14 # first step height B_h = bearing.B + 1.4 # bearing seat height F_d = 29.5 # flange OD, which the bearing seats against B_d = bearing.ID - 0.2 # bearing seat diam dim14 = 120 # full length T_d = 20 # thread nom diam T_p = 2.5 # thread pitch T_c = 0.5 # thread clearance PN_s = 5 # P/N character height PN_d = 0.3 # P/N character depth
# This file is part of the Adjustable Spool Holder. # # This source file is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # Copyright 2021 Rock Storm <rockstorm at gmx dot com> # Python imports import argparse import solid as sp import solid.utils as spu # SCAD imports assembly = sp.import_scad('../lib/MCAD/assembly/attach.scad') # Config ID = 25 OD = 42 B = 9 # Connectors RACEI_CONN = [[0, 0, 0], [0, 0, 1], 0] RACEO_CONN = [[0, 0, B], [0, 0, -1], 0] @spu.bom_part(description = "Bearing", code_name = "6905-ZZ") def part(variant = '', configuration = '', debug = False): tmp = sp.cylinder(d=OD, h=B) tmp -= sp.translate([0,0,-0.1])(sp.cylinder(d=ID, h=B+0.2)) if debug: tmp += assembly.connector(RACEI_CONN)