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.
Files changed (21) hide show
  1. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/PKG-INFO +25 -23
  2. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/README.md +23 -21
  3. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/pyproject.toml +1 -1
  4. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/requirements.txt +1 -1
  5. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/__init__.py +1 -1
  6. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/cli.py +4 -0
  7. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/cli_render.py +15 -3
  8. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli.egg-info/PKG-INFO +25 -23
  9. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli.egg-info/requires.txt +1 -1
  10. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/setup.cfg +0 -0
  11. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/cli_add.py +0 -0
  12. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/cli_init.py +0 -0
  13. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/cli_install.py +0 -0
  14. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/cli_list.py +0 -0
  15. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/cli_show.py +0 -0
  16. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/template/init-private.yaml +0 -0
  17. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli/template/init-public.yaml +0 -0
  18. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli.egg-info/SOURCES.txt +0 -0
  19. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli.egg-info/dependency_links.txt +0 -0
  20. {partcad-cli-0.3.69 → partcad-cli-0.3.70}/src/partcad_cli.egg-info/entry_points.txt +0 -0
  21. {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.69
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.69
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
- <code># partcad.yaml
192
- parts:
193
- src/cube:
194
- type: cadquery
195
- # type: build123d</code>
191
+ Place the following in "partcad.yaml":<br/>
192
+ <code>parts:<br/>
193
+ &nbsp;&nbsp;&nbsp;&nbsp;src/cylinder:<br/>
194
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: cadquery<br/>
195
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# type: build123d</code>
196
196
  <br/>
197
197
  <br/>
198
- Place the script in "src/cube.py"
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/cube.png?raw=true"></td>
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
- <code># partcad.yaml
208
- parts:
209
- screw:
210
- type: step
211
- # type: stl
212
- # type: 3mf</code>
207
+ Place the following in "partcad.yaml":<br/>
208
+ <code>parts:<br/>
209
+ &nbsp;&nbsp;&nbsp;&nbsp;screw:<br/>
210
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: step<br/>
211
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# type: stl<br/>
212
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# 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.png?raw=true"></td>
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
- <code># partcad.yaml
223
- parts:
224
- cube:
225
- type: scad</code>
222
+ Place the following in "partcad.yaml":<br/>
223
+ <code>parts:<br/>
224
+ &nbsp;&nbsp;&nbsp;&nbsp;cube:<br/>
225
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.png?raw=true"></td>
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.png?raw=true"></td>
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
- <code># partcad.yaml
170
- parts:
171
- src/cube:
172
- type: cadquery
173
- # type: build123d</code>
169
+ Place the following in "partcad.yaml":<br/>
170
+ <code>parts:<br/>
171
+ &nbsp;&nbsp;&nbsp;&nbsp;src/cylinder:<br/>
172
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: cadquery<br/>
173
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# type: build123d</code>
174
174
  <br/>
175
175
  <br/>
176
- Place the script in "src/cube.py"
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/cube.png?raw=true"></td>
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
- <code># partcad.yaml
186
- parts:
187
- screw:
188
- type: step
189
- # type: stl
190
- # type: 3mf</code>
185
+ Place the following in "partcad.yaml":<br/>
186
+ <code>parts:<br/>
187
+ &nbsp;&nbsp;&nbsp;&nbsp;screw:<br/>
188
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: step<br/>
189
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# type: stl<br/>
190
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# 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.png?raw=true"></td>
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
- <code># partcad.yaml
201
- parts:
202
- cube:
203
- type: scad</code>
200
+ Place the following in "partcad.yaml":<br/>
201
+ <code>parts:<br/>
202
+ &nbsp;&nbsp;&nbsp;&nbsp;cube:<br/>
203
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.png?raw=true"></td>
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.png?raw=true"></td>
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:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "partcad-cli"
3
- version = "0.3.69"
3
+ version = "0.3.70"
4
4
  description = "Command-line interface to PartCAD"
5
5
  readme = "README.md"
6
6
  keywords = ["cadquery", "build123d", "cad", "design", "openscad", "step", "stl"]
@@ -1,4 +1,4 @@
1
- partcad==0.3.69
1
+ partcad==0.3.70
2
2
  pycairo
3
3
  renderlab
4
4
  rlPyCairo
@@ -4,4 +4,4 @@ __all__ = [
4
4
  "main_cli",
5
5
  ]
6
6
 
7
- __version__: str = "0.3.69"
7
+ __version__: str = "0.3.70"
@@ -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(parts=parts, assemblies=assemblies, format=args.format)
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.69
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.69
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
- <code># partcad.yaml
192
- parts:
193
- src/cube:
194
- type: cadquery
195
- # type: build123d</code>
191
+ Place the following in "partcad.yaml":<br/>
192
+ <code>parts:<br/>
193
+ &nbsp;&nbsp;&nbsp;&nbsp;src/cylinder:<br/>
194
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: cadquery<br/>
195
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# type: build123d</code>
196
196
  <br/>
197
197
  <br/>
198
- Place the script in "src/cube.py"
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/cube.png?raw=true"></td>
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
- <code># partcad.yaml
208
- parts:
209
- screw:
210
- type: step
211
- # type: stl
212
- # type: 3mf</code>
207
+ Place the following in "partcad.yaml":<br/>
208
+ <code>parts:<br/>
209
+ &nbsp;&nbsp;&nbsp;&nbsp;screw:<br/>
210
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: step<br/>
211
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# type: stl<br/>
212
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# 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.png?raw=true"></td>
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
- <code># partcad.yaml
223
- parts:
224
- cube:
225
- type: scad</code>
222
+ Place the following in "partcad.yaml":<br/>
223
+ <code>parts:<br/>
224
+ &nbsp;&nbsp;&nbsp;&nbsp;cube:<br/>
225
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.png?raw=true"></td>
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.png?raw=true"></td>
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:
@@ -1,4 +1,4 @@
1
- partcad==0.3.69
1
+ partcad==0.3.70
2
2
  pycairo
3
3
  renderlab
4
4
  rlPyCairo
File without changes