Skip to content

Fastener Locations

Compare
Choose a tag to compare
@gumyr gumyr released this 17 Dec 20:06
· 243 commits to main since this release
f6be795

This minor release adds a couple methods that locating fasteners relative to other parts.

cq.Assembly.fastenerLocations() returns a list of cq.Location objects of the given fastener as follows:

for loc in square_tube_assembly.fastenerLocations(cap_screw):
    print(loc)

cq.Workplane.pushFastenerLocations() pushes the location(s) of the given fastener relative to the given assembly. This enables the following:

square_tube = (square_tube
    .pushFastenerLocations(cap_screw, square_tube_assembly)
    .tapHole(fastener=cap_screw, counterSunk=False, depth=10)
)

which will place tap holes into square_tube matching the location of all the cap_screws in the square_tube_assembly.