partcad-cli 0.3.69__tar.gz → 0.3.70__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/PKG-INFO +25 -23
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/README.md +23 -21
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/pyproject.toml +1 -1
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/requirements.txt +1 -1
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/__init__.py +1 -1
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/cli.py +4 -0
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/cli_render.py +15 -3
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli.egg-info/PKG-INFO +25 -23
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli.egg-info/requires.txt +1 -1
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/setup.cfg +0 -0
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/cli_add.py +0 -0
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/cli_init.py +0 -0
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/cli_install.py +0 -0
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/cli_list.py +0 -0
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/cli_show.py +0 -0
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/template/init-private.yaml +0 -0
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/template/init-public.yaml +0 -0
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli.egg-info/SOURCES.txt +0 -0
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli.egg-info/dependency_links.txt +0 -0
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli.egg-info/entry_points.txt +0 -0
- {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: partcad-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.70
|
|
4
4
|
Summary: Command-line interface to PartCAD
|
|
5
5
|
Author-email: Roman Kuzmenko <openvmp@proton.me>
|
|
6
6
|
Maintainer-email: Roman Kuzmenko <openvmp@proton.me>
|
|
@@ -12,7 +12,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Requires-Python: >=3.9
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
|
-
Requires-Dist: partcad==0.3.
|
|
15
|
+
Requires-Dist: partcad==0.3.70
|
|
16
16
|
Requires-Dist: pycairo
|
|
17
17
|
Requires-Dist: renderlab
|
|
18
18
|
Requires-Dist: rlPyCairo
|
|
@@ -188,46 +188,46 @@ PartCAD allows to define parts using any of the following methods:
|
|
|
188
188
|
<tr>
|
|
189
189
|
<td>Python scripts:<br/><a href="https://github.com/CadQuery/cadquery">CadQuery</a>,<br/><a href="https://github.com/gumyr/build123d">build123d</a></td>
|
|
190
190
|
<td>
|
|
191
|
-
|
|
192
|
-
parts
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
191
|
+
Place the following in "partcad.yaml":<br/>
|
|
192
|
+
<code>parts:<br/>
|
|
193
|
+
src/cylinder:<br/>
|
|
194
|
+
type: cadquery<br/>
|
|
195
|
+
# type: build123d</code>
|
|
196
196
|
<br/>
|
|
197
197
|
<br/>
|
|
198
|
-
Place the script in "src/
|
|
198
|
+
Place the script in "src/cylinder.py".
|
|
199
199
|
</td>
|
|
200
|
-
<td><img src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_cadquery_primitive/
|
|
200
|
+
<td><img width=128 src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_cadquery_primitive/cylinder.svg?raw=true" /></td>
|
|
201
201
|
</tr>
|
|
202
202
|
<tr>
|
|
203
203
|
<td>CAD files:<br/><a href="https://en.wikipedia.org/wiki/ISO_10303">STEP</a>,<br/>
|
|
204
204
|
<a href="https://en.wikipedia.org/wiki/STL_(file_format)">STL</a>,<br/>
|
|
205
205
|
<a href="https://en.wikipedia.org/wiki/3D_Manufacturing_Format">3MF</a></td>
|
|
206
206
|
<td>
|
|
207
|
-
|
|
208
|
-
parts
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
207
|
+
Place the following in "partcad.yaml":<br/>
|
|
208
|
+
<code>parts:<br/>
|
|
209
|
+
screw:<br/>
|
|
210
|
+
type: step<br/>
|
|
211
|
+
# type: stl<br/>
|
|
212
|
+
# type: 3mf</code>
|
|
213
213
|
|
|
214
214
|
<br/>
|
|
215
215
|
Store the model in "screw.step", "screw.stl" or "screw.3mf" respectively.
|
|
216
216
|
</td>
|
|
217
|
-
<td><img src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_step/bolt.
|
|
217
|
+
<td><img width=128 src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_step/bolt.svg?raw=true"/></td>
|
|
218
218
|
</tr>
|
|
219
219
|
<tr>
|
|
220
220
|
<td>CAD scripts:<br/><a href="https://en.wikipedia.org/wiki/OpenSCAD">OpenSCAD</a></td>
|
|
221
221
|
<td>
|
|
222
|
-
|
|
223
|
-
parts
|
|
224
|
-
|
|
225
|
-
|
|
222
|
+
Place the following in "partcad.yaml":<br/>
|
|
223
|
+
<code>parts:<br/>
|
|
224
|
+
cube:<br/>
|
|
225
|
+
type: scad</code>
|
|
226
226
|
|
|
227
227
|
<br/>
|
|
228
|
-
Store the model in "cube.scad"
|
|
228
|
+
Store the model in "cube.scad".
|
|
229
229
|
</td>
|
|
230
|
-
<td><img src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_scad/cube.
|
|
230
|
+
<td><img width=128 src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_scad/cube.svg?raw=true" /></td>
|
|
231
231
|
</tr>
|
|
232
232
|
</table>
|
|
233
233
|
|
|
@@ -273,7 +273,7 @@ links:
|
|
|
273
273
|
package: example_part_step
|
|
274
274
|
location: [[0,0,7.5], [0,0,1], 0]</code>
|
|
275
275
|
</td>
|
|
276
|
-
<td><img src="https://github.com/openvmp/partcad/blob/main/examples/produce_assembly_assy/logo.
|
|
276
|
+
<td><img width=256 src="https://github.com/openvmp/partcad/blob/main/examples/produce_assembly_assy/logo.svg?raw=true" /></td>
|
|
277
277
|
<tr>
|
|
278
278
|
</table>
|
|
279
279
|
|
|
@@ -347,11 +347,13 @@ Then create a pull request in [the public PartCAD repo](https://github.com/openv
|
|
|
347
347
|
Individual parts, assemblies and scenes can be rendered and exported into the
|
|
348
348
|
following formats:
|
|
349
349
|
|
|
350
|
+
- SVG
|
|
350
351
|
- PNG
|
|
351
352
|
- [STEP]
|
|
352
353
|
- [STL](https://en.wikipedia.org/wiki/STL_(file_format))
|
|
353
354
|
- [3MF](https://en.wikipedia.org/wiki/3D_Manufacturing_Format)
|
|
354
355
|
- [ThreeJS](https://en.wikipedia.org/wiki/Three.js)
|
|
356
|
+
- [OBJ](https://en.wikipedia.org/wiki/Wavefront_.obj_file)
|
|
355
357
|
|
|
356
358
|
```shell
|
|
357
359
|
# Some "export to a file" examples:
|
|
@@ -166,46 +166,46 @@ PartCAD allows to define parts using any of the following methods:
|
|
|
166
166
|
<tr>
|
|
167
167
|
<td>Python scripts:<br/><a href="https://github.com/CadQuery/cadquery">CadQuery</a>,<br/><a href="https://github.com/gumyr/build123d">build123d</a></td>
|
|
168
168
|
<td>
|
|
169
|
-
|
|
170
|
-
parts
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
169
|
+
Place the following in "partcad.yaml":<br/>
|
|
170
|
+
<code>parts:<br/>
|
|
171
|
+
src/cylinder:<br/>
|
|
172
|
+
type: cadquery<br/>
|
|
173
|
+
# type: build123d</code>
|
|
174
174
|
<br/>
|
|
175
175
|
<br/>
|
|
176
|
-
Place the script in "src/
|
|
176
|
+
Place the script in "src/cylinder.py".
|
|
177
177
|
</td>
|
|
178
|
-
<td><img src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_cadquery_primitive/
|
|
178
|
+
<td><img width=128 src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_cadquery_primitive/cylinder.svg?raw=true" /></td>
|
|
179
179
|
</tr>
|
|
180
180
|
<tr>
|
|
181
181
|
<td>CAD files:<br/><a href="https://en.wikipedia.org/wiki/ISO_10303">STEP</a>,<br/>
|
|
182
182
|
<a href="https://en.wikipedia.org/wiki/STL_(file_format)">STL</a>,<br/>
|
|
183
183
|
<a href="https://en.wikipedia.org/wiki/3D_Manufacturing_Format">3MF</a></td>
|
|
184
184
|
<td>
|
|
185
|
-
|
|
186
|
-
parts
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
185
|
+
Place the following in "partcad.yaml":<br/>
|
|
186
|
+
<code>parts:<br/>
|
|
187
|
+
screw:<br/>
|
|
188
|
+
type: step<br/>
|
|
189
|
+
# type: stl<br/>
|
|
190
|
+
# type: 3mf</code>
|
|
191
191
|
|
|
192
192
|
<br/>
|
|
193
193
|
Store the model in "screw.step", "screw.stl" or "screw.3mf" respectively.
|
|
194
194
|
</td>
|
|
195
|
-
<td><img src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_step/bolt.
|
|
195
|
+
<td><img width=128 src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_step/bolt.svg?raw=true"/></td>
|
|
196
196
|
</tr>
|
|
197
197
|
<tr>
|
|
198
198
|
<td>CAD scripts:<br/><a href="https://en.wikipedia.org/wiki/OpenSCAD">OpenSCAD</a></td>
|
|
199
199
|
<td>
|
|
200
|
-
|
|
201
|
-
parts
|
|
202
|
-
|
|
203
|
-
|
|
200
|
+
Place the following in "partcad.yaml":<br/>
|
|
201
|
+
<code>parts:<br/>
|
|
202
|
+
cube:<br/>
|
|
203
|
+
type: scad</code>
|
|
204
204
|
|
|
205
205
|
<br/>
|
|
206
|
-
Store the model in "cube.scad"
|
|
206
|
+
Store the model in "cube.scad".
|
|
207
207
|
</td>
|
|
208
|
-
<td><img src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_scad/cube.
|
|
208
|
+
<td><img width=128 src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_scad/cube.svg?raw=true" /></td>
|
|
209
209
|
</tr>
|
|
210
210
|
</table>
|
|
211
211
|
|
|
@@ -251,7 +251,7 @@ links:
|
|
|
251
251
|
package: example_part_step
|
|
252
252
|
location: [[0,0,7.5], [0,0,1], 0]</code>
|
|
253
253
|
</td>
|
|
254
|
-
<td><img src="https://github.com/openvmp/partcad/blob/main/examples/produce_assembly_assy/logo.
|
|
254
|
+
<td><img width=256 src="https://github.com/openvmp/partcad/blob/main/examples/produce_assembly_assy/logo.svg?raw=true" /></td>
|
|
255
255
|
<tr>
|
|
256
256
|
</table>
|
|
257
257
|
|
|
@@ -325,11 +325,13 @@ Then create a pull request in [the public PartCAD repo](https://github.com/openv
|
|
|
325
325
|
Individual parts, assemblies and scenes can be rendered and exported into the
|
|
326
326
|
following formats:
|
|
327
327
|
|
|
328
|
+
- SVG
|
|
328
329
|
- PNG
|
|
329
330
|
- [STEP]
|
|
330
331
|
- [STL](https://en.wikipedia.org/wiki/STL_(file_format))
|
|
331
332
|
- [3MF](https://en.wikipedia.org/wiki/3D_Manufacturing_Format)
|
|
332
333
|
- [ThreeJS](https://en.wikipedia.org/wiki/Three.js)
|
|
334
|
+
- [OBJ](https://en.wikipedia.org/wiki/Wavefront_.obj_file)
|
|
333
335
|
|
|
334
336
|
```shell
|
|
335
337
|
# Some "export to a file" examples:
|
|
@@ -21,6 +21,10 @@ from .cli_render import *
|
|
|
21
21
|
from .cli_show import *
|
|
22
22
|
|
|
23
23
|
|
|
24
|
+
# Initialize plugins that are not enabled by default
|
|
25
|
+
pc.plugins.export_png = pc.PluginExportPngReportlab()
|
|
26
|
+
|
|
27
|
+
|
|
24
28
|
def main():
|
|
25
29
|
parser = argparse.ArgumentParser(
|
|
26
30
|
description="PartCAD command line tool",
|
|
@@ -23,13 +23,20 @@ def cli_help_render(subparsers: argparse.ArgumentParser):
|
|
|
23
23
|
dest="create_dirs",
|
|
24
24
|
action="store_true",
|
|
25
25
|
)
|
|
26
|
+
parser_render.add_argument(
|
|
27
|
+
"-O",
|
|
28
|
+
help="Create artifacts in the given output directory",
|
|
29
|
+
dest="output_dir",
|
|
30
|
+
type=str,
|
|
31
|
+
nargs="?",
|
|
32
|
+
)
|
|
26
33
|
parser_render.add_argument(
|
|
27
34
|
"-t",
|
|
28
35
|
help="The object is an assembly",
|
|
29
36
|
dest="format",
|
|
30
37
|
type=str,
|
|
31
38
|
nargs="?",
|
|
32
|
-
choices=["png", "step", "stl", "3mf", "threejs"],
|
|
39
|
+
choices=["svg", "png", "step", "stl", "3mf", "threejs", "obj"],
|
|
33
40
|
)
|
|
34
41
|
|
|
35
42
|
group_type = parser_render.add_mutually_exclusive_group(required=False)
|
|
@@ -75,7 +82,7 @@ def cli_render(args):
|
|
|
75
82
|
|
|
76
83
|
if args.object is None:
|
|
77
84
|
# Render all parts and assemblies configured to be auto-rendered in this project
|
|
78
|
-
ctx.render(format=args.format)
|
|
85
|
+
ctx.render(format=args.format, output_dir=args.output_dir)
|
|
79
86
|
else:
|
|
80
87
|
# Render the requested part or assembly
|
|
81
88
|
parts = []
|
|
@@ -86,4 +93,9 @@ def cli_render(args):
|
|
|
86
93
|
parts.append(args.object)
|
|
87
94
|
|
|
88
95
|
prj = ctx.get_project(package)
|
|
89
|
-
prj.render(
|
|
96
|
+
prj.render(
|
|
97
|
+
parts=parts,
|
|
98
|
+
assemblies=assemblies,
|
|
99
|
+
format=args.format,
|
|
100
|
+
output_dir=args.output_dir,
|
|
101
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: partcad-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.70
|
|
4
4
|
Summary: Command-line interface to PartCAD
|
|
5
5
|
Author-email: Roman Kuzmenko <openvmp@proton.me>
|
|
6
6
|
Maintainer-email: Roman Kuzmenko <openvmp@proton.me>
|
|
@@ -12,7 +12,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Requires-Python: >=3.9
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
|
-
Requires-Dist: partcad==0.3.
|
|
15
|
+
Requires-Dist: partcad==0.3.70
|
|
16
16
|
Requires-Dist: pycairo
|
|
17
17
|
Requires-Dist: renderlab
|
|
18
18
|
Requires-Dist: rlPyCairo
|
|
@@ -188,46 +188,46 @@ PartCAD allows to define parts using any of the following methods:
|
|
|
188
188
|
<tr>
|
|
189
189
|
<td>Python scripts:<br/><a href="https://github.com/CadQuery/cadquery">CadQuery</a>,<br/><a href="https://github.com/gumyr/build123d">build123d</a></td>
|
|
190
190
|
<td>
|
|
191
|
-
|
|
192
|
-
parts
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
191
|
+
Place the following in "partcad.yaml":<br/>
|
|
192
|
+
<code>parts:<br/>
|
|
193
|
+
src/cylinder:<br/>
|
|
194
|
+
type: cadquery<br/>
|
|
195
|
+
# type: build123d</code>
|
|
196
196
|
<br/>
|
|
197
197
|
<br/>
|
|
198
|
-
Place the script in "src/
|
|
198
|
+
Place the script in "src/cylinder.py".
|
|
199
199
|
</td>
|
|
200
|
-
<td><img src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_cadquery_primitive/
|
|
200
|
+
<td><img width=128 src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_cadquery_primitive/cylinder.svg?raw=true" /></td>
|
|
201
201
|
</tr>
|
|
202
202
|
<tr>
|
|
203
203
|
<td>CAD files:<br/><a href="https://en.wikipedia.org/wiki/ISO_10303">STEP</a>,<br/>
|
|
204
204
|
<a href="https://en.wikipedia.org/wiki/STL_(file_format)">STL</a>,<br/>
|
|
205
205
|
<a href="https://en.wikipedia.org/wiki/3D_Manufacturing_Format">3MF</a></td>
|
|
206
206
|
<td>
|
|
207
|
-
|
|
208
|
-
parts
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
207
|
+
Place the following in "partcad.yaml":<br/>
|
|
208
|
+
<code>parts:<br/>
|
|
209
|
+
screw:<br/>
|
|
210
|
+
type: step<br/>
|
|
211
|
+
# type: stl<br/>
|
|
212
|
+
# type: 3mf</code>
|
|
213
213
|
|
|
214
214
|
<br/>
|
|
215
215
|
Store the model in "screw.step", "screw.stl" or "screw.3mf" respectively.
|
|
216
216
|
</td>
|
|
217
|
-
<td><img src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_step/bolt.
|
|
217
|
+
<td><img width=128 src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_step/bolt.svg?raw=true"/></td>
|
|
218
218
|
</tr>
|
|
219
219
|
<tr>
|
|
220
220
|
<td>CAD scripts:<br/><a href="https://en.wikipedia.org/wiki/OpenSCAD">OpenSCAD</a></td>
|
|
221
221
|
<td>
|
|
222
|
-
|
|
223
|
-
parts
|
|
224
|
-
|
|
225
|
-
|
|
222
|
+
Place the following in "partcad.yaml":<br/>
|
|
223
|
+
<code>parts:<br/>
|
|
224
|
+
cube:<br/>
|
|
225
|
+
type: scad</code>
|
|
226
226
|
|
|
227
227
|
<br/>
|
|
228
|
-
Store the model in "cube.scad"
|
|
228
|
+
Store the model in "cube.scad".
|
|
229
229
|
</td>
|
|
230
|
-
<td><img src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_scad/cube.
|
|
230
|
+
<td><img width=128 src="https://github.com/openvmp/partcad/blob/main/examples/produce_part_scad/cube.svg?raw=true" /></td>
|
|
231
231
|
</tr>
|
|
232
232
|
</table>
|
|
233
233
|
|
|
@@ -273,7 +273,7 @@ links:
|
|
|
273
273
|
package: example_part_step
|
|
274
274
|
location: [[0,0,7.5], [0,0,1], 0]</code>
|
|
275
275
|
</td>
|
|
276
|
-
<td><img src="https://github.com/openvmp/partcad/blob/main/examples/produce_assembly_assy/logo.
|
|
276
|
+
<td><img width=256 src="https://github.com/openvmp/partcad/blob/main/examples/produce_assembly_assy/logo.svg?raw=true" /></td>
|
|
277
277
|
<tr>
|
|
278
278
|
</table>
|
|
279
279
|
|
|
@@ -347,11 +347,13 @@ Then create a pull request in [the public PartCAD repo](https://github.com/openv
|
|
|
347
347
|
Individual parts, assemblies and scenes can be rendered and exported into the
|
|
348
348
|
following formats:
|
|
349
349
|
|
|
350
|
+
- SVG
|
|
350
351
|
- PNG
|
|
351
352
|
- [STEP]
|
|
352
353
|
- [STL](https://en.wikipedia.org/wiki/STL_(file_format))
|
|
353
354
|
- [3MF](https://en.wikipedia.org/wiki/3D_Manufacturing_Format)
|
|
354
355
|
- [ThreeJS](https://en.wikipedia.org/wiki/Three.js)
|
|
356
|
+
- [OBJ](https://en.wikipedia.org/wiki/Wavefront_.obj_file)
|
|
355
357
|
|
|
356
358
|
```shell
|
|
357
359
|
# Some "export to a file" examples:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|