Skip to content

ScrewHole will not work inside for loop #16

@neusse

Description

@neusse

I needed a place with 15 ScrewHoles. Using the library I could not get any results. If I just coded one ScrewHole on a plate it worked.

I don't know if this is correct But I removed children() from the ScrewHole Module and it worked inside the for loop. So I added a new argument to ScrewHole to solve the issue for me. Not sure if this is the correct way, but it functions and is backward compatable.

`
// This creates a threaded hole in its children using metric standards by
// default.
// modified to optionaly include the children() call
module ScrewHole(outer_diam, height, position=[0,0,0], rotation=[0,0,0], pitch=0, tooth_angle=30, tolerance=0.4, tooth_height=0, children=true) {
extra_height = 0.001 * height;

difference() {
if(children) {
children();
}
translate(position)
rotate(rotation)
translate([0, 0, -extra_height/2])
ScrewThread(1.01outer_diam + 1.25tolerance, height + extra_height,
pitch, tooth_angle, tolerance, tooth_height=tooth_height);
}
}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions