CadQuery is a parametric modeling library written in python.
- Documentation - https://cadquery.readthedocs.io/en/latest/
- Github - https://github.com/CadQuery/cadquery
- OpenSCAD - https://openscad.org/
- Tinkercad - https://www.tinkercad.com/
CadQuery is a parametric modeling library written in python.
python --versionProbably an advanced topic
Show you how to make your own python package that can be called in your CadQuery scripts.
result = cq.Workplane("XY" ).box(3, 3, 3)Go through workplane documentation and explain it's concepts.
| # Copyright 2022 James Adams | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| import cadquery as cq | |
| from cqterrain import Building, stone, window | |
| def add_stones(wall, length, height, wall_width, rotate=0, seed="test4"): | |
| # static boxes to act as stone | |
| tile = cq.Workplane("XY").box(10,10,2) | |
| tile2 = cq.Workplane("XY").box(8,8,2) | |
| tile3 = cq.Workplane("XY").box(6,12,2) | |
| tile4 = cq.Workplane("XY").cylinder(6,4) |
| import cadquery as cq | |
| import math | |
| from cqterrain import Building, stone, window | |
| from cadqueryhelper import series, grid | |
| def grill_custom(length=20, width=4, height=40, columns=4, rows=2, grill_width=1, grill_height=1): | |
| # Make a flat plane | |
| pane = cq.Workplane("XY").box(length, grill_height, height) | |
| t_width = length / columns | |
| t_height = height / rows |