badcad-occt 0.2.0__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Kyle Finn
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,111 @@
1
+ Metadata-Version: 2.4
2
+ Name: badcad-occt
3
+ Version: 0.2.0
4
+ Summary: badcad (CSG for Python) with an exact OCCT engine: true STEP files, fillets, chamfers, sweeps, and lofts
5
+ Author: wrongbad
6
+ Maintainer: spikeon
7
+ License-Expression: MIT
8
+ Project-URL: Homepage, https://github.com/spikeon/badcad
9
+ Project-URL: Source, https://github.com/spikeon/badcad/tree/release/badcad-occt
10
+ Project-URL: Upstream, https://github.com/wrongbad/badcad
11
+ Keywords: cad,csg,3d-printing,step,manifold,occt
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
14
+ Classifier: Topic :: Scientific/Engineering
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: numpy
19
+ Requires-Dist: manifold3d<4,>=3.5
20
+ Requires-Dist: pythreejs
21
+ Requires-Dist: nbformat
22
+ Provides-Extra: occt
23
+ Requires-Dist: cadquery-ocp-novtk<8.1,>=8.0; extra == "occt"
24
+ Requires-Dist: build123d<0.14,>=0.13; extra == "occt"
25
+ Requires-Dist: scipy; extra == "occt"
26
+ Requires-Dist: shapely>=2.0; extra == "occt"
27
+ Provides-Extra: text
28
+ Requires-Dist: pycairo; extra == "text"
29
+ Provides-Extra: svg
30
+ Requires-Dist: svgelements; extra == "svg"
31
+ Provides-Extra: all
32
+ Requires-Dist: badcad-occt[occt,svg,text]; extra == "all"
33
+ Dynamic: license-file
34
+
35
+ # badcad
36
+
37
+ > **badcad-occt** is a fork of [wrongbad/badcad](https://github.com/wrongbad/badcad) on PyPI. It adds an exact
38
+ > OCCT engine (`set_engine("occt")`) for true STEP files, fillets, chamfers, sweeps, and lofts. The import name is
39
+ > still `badcad`.
40
+ >
41
+ > ```bash
42
+ > pip install "badcad-occt[occt]"
43
+ > ```
44
+ >
45
+ > The extras are `occt` (the exact engine), `text` (pycairo), `svg` (svgelements), and `all`.
46
+
47
+
48
+ a jupyter based cad workflow
49
+
50
+ most of the hard work is done by
51
+ - [manifold](https://github.com/elalish/manifold) - constructive solid geometry
52
+ - [pythreejs](https://github.com/jupyter-widgets/pythreejs) - jupyter 3d previews
53
+
54
+ this project aims to focus on usability in a jupyter environment
55
+
56
+ specifically for creating and exporting functional parts
57
+
58
+ # setup
59
+
60
+ ```bash
61
+ pip install git+https://github.com/wrongbad/badcad.git
62
+ # optional dependencies (text + svg support)
63
+ pip install "badcad[all] @ git+https://github.com/wrongbad/badcad.git"
64
+ ```
65
+
66
+ # example
67
+
68
+ ```py
69
+ from badcad import *
70
+ plus = square(3, 1, center=True) + square(1, 3, center=True)
71
+ p_lil = plus.offset(-0.4, 'round')
72
+ p_big = plus.offset(+0.4, 'round')
73
+ p_big.extrude_to(p_lil, 1)
74
+ ```
75
+
76
+ ![plus](img/plus.png)
77
+
78
+ ```py
79
+ from badcad import *
80
+ deathstar = sphere(r=1) - sphere(r=0.5).move(1.2,0,0)
81
+ deathstar.stl('deathstar.stl')
82
+ deathstar.rotate(y=-45, z=45)
83
+ ```
84
+
85
+ ![deathstar](img/deathstar.png)
86
+
87
+ ```py
88
+ from badcad import *
89
+ bolt = threads(d=8, h=16, pitch=1)
90
+ bolt += circle(r=5, fn=6).offset(1,'round').extrude(4).move(0,0,15)
91
+ bolt.align(x=0,y=0,z=0).rotate(x=-90)
92
+ ```
93
+
94
+ ![bolt](img/bolt.png)
95
+
96
+ ```py
97
+ from badcad import *
98
+ t = text('yo', font='monospace')
99
+ t = t.offset(1,'round').extrude(2) - t.extrude(2)
100
+ t.align(x=0)
101
+ ```
102
+
103
+ ![txt](img/txt.png)
104
+
105
+ # motivation
106
+
107
+ to escape openscad syntax - op wrapping and nesting is an editing nightmare compared to `A + B.move(...) - C` style
108
+
109
+ to escape openscad render times - manifold lib is 1000x faster for high-poly boolean ops
110
+
111
+ to enable easier prototyping of mesh algorithms in the CAD environment
@@ -0,0 +1,77 @@
1
+ # badcad
2
+
3
+ > **badcad-occt** is a fork of [wrongbad/badcad](https://github.com/wrongbad/badcad) on PyPI. It adds an exact
4
+ > OCCT engine (`set_engine("occt")`) for true STEP files, fillets, chamfers, sweeps, and lofts. The import name is
5
+ > still `badcad`.
6
+ >
7
+ > ```bash
8
+ > pip install "badcad-occt[occt]"
9
+ > ```
10
+ >
11
+ > The extras are `occt` (the exact engine), `text` (pycairo), `svg` (svgelements), and `all`.
12
+
13
+
14
+ a jupyter based cad workflow
15
+
16
+ most of the hard work is done by
17
+ - [manifold](https://github.com/elalish/manifold) - constructive solid geometry
18
+ - [pythreejs](https://github.com/jupyter-widgets/pythreejs) - jupyter 3d previews
19
+
20
+ this project aims to focus on usability in a jupyter environment
21
+
22
+ specifically for creating and exporting functional parts
23
+
24
+ # setup
25
+
26
+ ```bash
27
+ pip install git+https://github.com/wrongbad/badcad.git
28
+ # optional dependencies (text + svg support)
29
+ pip install "badcad[all] @ git+https://github.com/wrongbad/badcad.git"
30
+ ```
31
+
32
+ # example
33
+
34
+ ```py
35
+ from badcad import *
36
+ plus = square(3, 1, center=True) + square(1, 3, center=True)
37
+ p_lil = plus.offset(-0.4, 'round')
38
+ p_big = plus.offset(+0.4, 'round')
39
+ p_big.extrude_to(p_lil, 1)
40
+ ```
41
+
42
+ ![plus](img/plus.png)
43
+
44
+ ```py
45
+ from badcad import *
46
+ deathstar = sphere(r=1) - sphere(r=0.5).move(1.2,0,0)
47
+ deathstar.stl('deathstar.stl')
48
+ deathstar.rotate(y=-45, z=45)
49
+ ```
50
+
51
+ ![deathstar](img/deathstar.png)
52
+
53
+ ```py
54
+ from badcad import *
55
+ bolt = threads(d=8, h=16, pitch=1)
56
+ bolt += circle(r=5, fn=6).offset(1,'round').extrude(4).move(0,0,15)
57
+ bolt.align(x=0,y=0,z=0).rotate(x=-90)
58
+ ```
59
+
60
+ ![bolt](img/bolt.png)
61
+
62
+ ```py
63
+ from badcad import *
64
+ t = text('yo', font='monospace')
65
+ t = t.offset(1,'round').extrude(2) - t.extrude(2)
66
+ t.align(x=0)
67
+ ```
68
+
69
+ ![txt](img/txt.png)
70
+
71
+ # motivation
72
+
73
+ to escape openscad syntax - op wrapping and nesting is an editing nightmare compared to `A + B.move(...) - C` style
74
+
75
+ to escape openscad render times - manifold lib is 1000x faster for high-poly boolean ops
76
+
77
+ to enable easier prototyping of mesh algorithms in the CAD environment
@@ -0,0 +1 @@
1
+ from .badcad import *