{"id":16245377,"url":"https://github.com/mmalecki/cq-queryabolt","last_synced_at":"2025-10-15T20:12:40.217Z","repository":{"id":168608893,"uuid":"644369352","full_name":"mmalecki/cq-queryabolt","owner":"mmalecki","description":"A quick way to create nutcatches, screw holes and countersinks in CadQuery, according to fastener standards.","archived":false,"fork":false,"pushed_at":"2025-01-31T15:06:36.000Z","size":137,"stargazers_count":7,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"latest","last_synced_at":"2025-09-27T14:44:00.825Z","etag":null,"topics":["cadquery","fasteners"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mmalecki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-23T11:27:35.000Z","updated_at":"2025-04-10T21:15:10.000Z","dependencies_parsed_at":"2024-10-20T19:22:40.182Z","dependency_job_id":null,"html_url":"https://github.com/mmalecki/cq-queryabolt","commit_stats":null,"previous_names":["mmalecki/queryabolt"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mmalecki/cq-queryabolt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmalecki%2Fcq-queryabolt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmalecki%2Fcq-queryabolt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmalecki%2Fcq-queryabolt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmalecki%2Fcq-queryabolt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmalecki","download_url":"https://codeload.github.com/mmalecki/cq-queryabolt/tar.gz/refs/heads/latest","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmalecki%2Fcq-queryabolt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279110724,"owners_count":26105907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cadquery","fasteners"],"created_at":"2024-10-10T14:25:53.347Z","updated_at":"2025-10-15T20:12:40.185Z","avatar_url":"https://github.com/mmalecki.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cq-queryabolt\nA quick way to create nutcatches, screw holes and countersinks in CadQuery, according to fastener standards.\n\n![Nutcatches, screw holes and countersinks](docs/img/simple.png).\n\n## Requirements and installation\n\n```py\npoetry add cq-queryabolt\n```\n\n## Usage\n\nTo create a simple box with a bolt hole and a nutcatch:\n```py\nimport cq_queryabolt\nimport cadquery as cq\n\nclass Workplane(queryabolt.WorkplaneMixin, cq.Workplane):\n    pass\n\nbox = Workplane().box(25, 10, 10)\n\n# A nutcatch on the bottom:\nresult = box.faces(\"\u003cZ\").workplane().tag(\"center\").nutcatchParallel(\"M3\")\n\n# And a bolt hole through:\nresult = result.faces(\"\u003eZ\").workplane().boltHole(\"M3\")\n\nshow_object(result, name=\"simple\")\n```\n\nOr check out the example [showcasing all the features](./examples/simple.py), or [using a `cadquery.Assembly`](./examples/assembly.py).\n\n## API\n\n### `queryabolt.WorkplaneMixin`\n\n#### `boltHole(bolt: string, depth: Optional[float] = None)`\nMake a bolt hole (`cadquery.Workplane.hole` for named fasteners)\n\nArgs:\n* `bolt` (`str`): name of the bolt (e.g. `\"M3\"`)\n* `depth` (`float \u003e= 0` or `None` to cut through the entire part): how deep to make the hole\n\n#### `cboreBoltHole(bolt: str, depth: Optional[float] = None, headDiameterClearance: Optional[float] = 0.1)`\nMake a counterbored hole (`cadquery.Workplane.cboreHole` for named fasteners)\n\nArgs:\n* `bolt` (`str`): name of the bolt (e.g. `\"M3\"`)\n* `depth` (`float \u003e= 0` or `None` to cut through the entire part): how deep to make the hole\n* `headClearance` (`float \u003e= 0`, optional): additional bolt head clearance. Defaults to 0.1.\n\n#### `cskBoltHole(bolt: string, depth: Optional[float] = None)`\nMake a countersunk hole (`cadquery.Workplane.cskHole` for named fasteners)\n\nArgs:\n* `bolt` (`str`): name of the bolt (e.g. `\"M3\"`)\n* `depth` (`float \u003e 0` or `None` to cut through the entire part): how deep to make the hole\n\n#### `nutcatchParallel(options: string, kind: Optional[string] = \"hexagon\", heightClearance: Optional[float] = 0)`\nMake a parallel (surface) nutcatch\n\nArgs:\n* `options` (`str`): name of the nut (e.g. `\"M3\"`)\n* `kind` (`str`, optional): kind of the nut (e.g. `\"hexagon\"`). Defaults to `\"hexagon\"`.\n* `heightClearance` (float, optional): height clearance for the nut. Defaults to 0.\n\n#### `nutcatchSidecut(options: string, kind: Optional[string] = \"hexagon\", heightClearance: Optional[float] = 0, depth: Optional[float] = None)`\nMake a side-cut nutcatch\n\nArgs:\n* `options` (`str`): name of the nut (e.g. `\"M3\"`)\n* `kind` (`str`, optional): kind of the nut (e.g. `\"hexagon\"`). Defaults to `\"hexagon\"`.\n* `heightClearance` (`float \u003e= 0`, optional): additional height clearance for the nut. Defaults to 0.\n* `depth` (`float \u003e 0` or `None` to cut through the entire part): how deep to make the sidecut. Defaults to `None`.\n\n## Acknowledgements\n* The [authors](https://github.com/boltsparts/boltsparts/graphs/contributors) of the [BOLTS](https://github.com/boltsparts/boltsparts) library\n\n## Prior work\nThe following turned out too verbose for the simpler end of the spectrum of my projects:\n* [`cqparts_fasteners`](https://cqparts.github.io/cqparts/doc/cqparts_fasteners/index.html)\n* [`cq_warehouse`'s `fastener` module](https://cq-warehouse.readthedocs.io/en/latest/fastener.html)\n\nSimilar library for OpenSCAD, by yours truly:\n* [`catchnhole`](https://github.com/mmalecki/catchnhole)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmalecki%2Fcq-queryabolt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmalecki%2Fcq-queryabolt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmalecki%2Fcq-queryabolt/lists"}