nat-a-cyborg / octahedroflake Goto Github PK
View Code? Open in Web Editor NEWA 3D Fractal Sculpture Inspired by the Sierpinski Triangle
Home Page: https://www.printables.com/model/432767
License: Other
A 3D Fractal Sculpture Inspired by the Sierpinski Triangle
Home Page: https://www.printables.com/model/432767
License: Other
I seem to be having issues getting this script to generate a model, even when using the default values. I've tried using both Windows and Ubuntu (through WSL), however I receive the same result either way.
I believe I've installed CadQuery correctly as the following successfully generates raw SVG output:
$ python
$ import cadquery
$ cadquery.Workplane('XY').box(1,2,3).toSvg()
Here's the output I receive when I try running run.sh
:
(cq) <USER>@PC:~/octohedroflake$ ./run.sh
Enter the number of iterations (default: 4): 4
Enter the layer height in mm (default: 0.2): 0.2
Enter the nozzle diameter in mm (default: 0.4): 0.4
Enter the model height in mm (default: 200.0): 200.0
***********
Parameters
***********
Iterations: 4
Layer height: 0.2 mm
Nozzle diameter: 0.4 mm
Model height: 200.0 mm
Gap size: 0.01 mm
Edge size: 8.8168208 mm
Rib width: .8 mm
Height factor: 0.7071
Full size: 141.0691328 mm
Size multiplier: 5.510513
python3 ./octahedroflake.py --iterations 4 --layer-height 0.2 --nozzle-diameter 0.4 --size-multiplier 5.510513
Do you want to continue? [Y/n] y
Running the Python script...
2024-04-06 07:49:02.755732: 4 *START*
2024-04-06 07:49:02.755773: full_size: 141.0691328
2024-04-06 07:49:02.755781: full height: 200
2024-04-06 07:49:02.755786: edge size: 8.8168208
2024-04-06 07:49:02.755849: 4 โ make_octahedron_fractal- not found in cache
2024-04-06 07:49:02.755874: 4 ๐ make it!
2024-04-06 07:49:02.755884: 4 ๐ท๐ปโโ๏ธ About to make a branded pyramid
2024-04-06 07:49:02.755909: 4 โ make_branded_pyramid not found in cache
2024-04-06 07:49:02.755952: 4 โ make_fractal_pyramid not found in cache
2024-04-06 07:49:02.756032: 3 โ make_fractal_pyramid not found in cache
2024-04-06 07:49:02.756073: 2 โ make_fractal_pyramid not found in cache
2024-04-06 07:49:02.756096: 1 โ make_fractal_pyramid not found in cache
2024-04-06 07:49:02.756173: 0 โ make_fractal_pyramid not found in cache
2024-04-06 07:49:02.756239: 0 โ make_single_pyramid not found in cache
2024-04-06 07:49:02.756263: 0 ๐บ make a single pyramid
2024-04-06 07:49:02.777673: 0 ๐ฅ make_single_pyramid
2024-04-06 07:49:02.777726: 0 ๐ฅ make_fractal_pyramid
2024-04-06 07:49:02.777868: ๐พ part_cache/8.82-0.2-0.01-0.7071-0.4-make_single_pyramid[0].STEP
2024-04-06 07:49:02.782579: ๐พ part_cache/8.82-0.2-0.01-0.7071-0.4-make_fractal_pyramid[0].STEP
2024-04-06 07:49:02.784569: 1 ๐ฏ make clones
2024-04-06 07:49:02.788465: 1 โ make_ribs not found in cache
2024-04-06 07:49:02.788495: 1 ๐ฉป make some ribs
2024-04-06 07:49:02.804676: 1 โ make_single_pyramid not found in cache
2024-04-06 07:49:02.804712: 1 ๐บ make a single pyramid
2024-04-06 07:49:02.822124: 1 ๐ฅ make_single_pyramid
2024-04-06 07:49:02.867883: 1 ๐ฅ make_ribs
2024-04-06 07:49:02.868464: 1 โ make_gaps not found in cache
2024-04-06 07:49:02.868492: 1 โ๏ธ make the gaps
2024-04-06 07:49:02.883578: 1 ๐ฅ make_gaps
2024-04-06 07:49:02.883618: 1 ๐ combine clones and parts
2024-04-06 07:49:03.003852: 1 ๐ฅ make_fractal_pyramid
2024-04-06 07:49:03.003916: ๐พ part_cache/8.82-0.2-0.01-0.7071-0.4-make_single_pyramid[1].STEP
2024-04-06 07:49:03.006239: ๐พ part_cache/8.82-0.2-0.01-0.7071-0.4-make_ribs[1].STEP
2024-04-06 07:49:03.013423: ๐พ part_cache/8.82-0.2-0.01-0.7071-0.4-make_gaps[1].STEP
2024-04-06 07:49:03.017460: ๐พ part_cache/8.82-0.2-0.01-0.7071-0.4-make_fractal_pyramid[1].STEP
2024-04-06 07:49:03.031788: 2 ๐ฏ make clones
2024-04-06 07:49:03.039711: 2 โ make_ribs not found in cache
2024-04-06 07:49:03.039748: 2 ๐ฉป make some ribs
2024-04-06 07:49:03.055696: 2 โ make_single_pyramid not found in cache
2024-04-06 07:49:03.055733: 2 ๐บ make a single pyramid
2024-04-06 07:49:03.072540: 2 ๐ฅ make_single_pyramid
2024-04-06 07:49:03.117310: 2 ๐ฅ make_ribs
2024-04-06 07:49:03.117963: 2 โ make_gaps not found in cache
2024-04-06 07:49:03.117995: 2 โ๏ธ make the gaps
2024-04-06 07:49:03.132968: 2 ๐ฅ make_gaps
2024-04-06 07:49:03.133012: 2 ๐ combine clones and parts
2024-04-06 07:49:03.527021: 2 ๐ฅ make_fractal_pyramid
2024-04-06 07:49:03.527086: ๐พ part_cache/8.82-0.2-0.01-0.7071-0.4-make_single_pyramid[2].STEP
2024-04-06 07:49:03.529523: ๐พ part_cache/8.82-0.2-0.01-0.7071-0.4-make_ribs[2].STEP
2024-04-06 07:49:03.536841: ๐พ part_cache/8.82-0.2-0.01-0.7071-0.4-make_gaps[2].STEP
2024-04-06 07:49:03.541237: ๐พ part_cache/8.82-0.2-0.01-0.7071-0.4-make_fractal_pyramid[2].STEP
2024-04-06 07:49:03.635534: 3 ๐ฏ make clones
2024-04-06 07:49:03.662875: 3 โ make_ribs not found in cache
2024-04-06 07:49:03.662914: 3 ๐ฉป make some ribs
2024-04-06 07:49:03.680032: 3 โ make_single_pyramid not found in cache
2024-04-06 07:49:03.680070: 3 ๐บ make a single pyramid
2024-04-06 07:49:03.698871: 3 ๐ฅ make_single_pyramid
2024-04-06 07:49:03.750179: 3 ๐ฅ make_ribs
2024-04-06 07:49:03.750852: 3 โ make_gaps not found in cache
2024-04-06 07:49:03.750881: 3 โ๏ธ make the gaps
2024-04-06 07:49:03.767845: 3 ๐ฅ make_gaps
2024-04-06 07:49:03.767896: 3 ๐ combine clones and parts
2024-04-06 07:49:05.748185: 3 ๐ฅ make_fractal_pyramid
2024-04-06 07:49:05.748254: ๐พ part_cache/8.82-0.2-0.01-0.7071-0.4-make_single_pyramid[3].STEP
2024-04-06 07:49:05.751010: ๐พ part_cache/8.82-0.2-0.01-0.7071-0.4-make_ribs[3].STEP
2024-04-06 07:49:05.759472: ๐พ part_cache/8.82-0.2-0.01-0.7071-0.4-make_gaps[3].STEP
2024-04-06 07:49:05.764672: ๐พ part_cache/8.82-0.2-0.01-0.7071-0.4-make_fractal_pyramid[3].STEP
2024-04-06 07:49:06.558473: 4 ๐ฏ make clones
2024-04-06 07:49:06.738410: 4 โ make_ribs not found in cache
2024-04-06 07:49:06.738452: 4 ๐ฉป make some ribs
2024-04-06 07:49:06.757369: 4 โ make_single_pyramid not found in cache
2024-04-06 07:49:06.757408: 4 ๐บ make a single pyramid
2024-04-06 07:49:06.780025: 4 ๐ฅ make_single_pyramid
2024-04-06 07:49:06.831983: 4 ๐ฅ make_ribs
2024-04-06 07:49:06.832870: 4 โ make_gaps not found in cache
2024-04-06 07:49:06.832899: 4 โ๏ธ make the gaps
2024-04-06 07:49:06.850762: 4 ๐ฅ make_gaps
2024-04-06 07:49:06.850802: 4 ๐ combine clones and parts
2024-04-06 07:49:19.682576: 4 ๐ฅ make_fractal_pyramid
2024-04-06 07:49:19.687034: 4 โ make_logo[2] not found in cache
2024-04-06 07:49:19.687076: 4 ๐ง make the logo
Traceback (most recent call last):
File "/home/<USER>/octohedroflake/./octahedroflake.py", line 494, in <module>
run()
File "/home/<USER>/octohedroflake/./octahedroflake.py", line 474, in run
flake = make_octahedron_fractal() # .rotateAboutCenter((0, 0, 1), 45)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/<USER>/octohedroflake/./octahedroflake.py", line 453, in make_octahedron_fractal
pyramid = make_branded_pyramid() if branded else make_unbranded_pyramid()
^^^^^^^^^^^^^^^^^^^^^^
File "/home/<USER>/octohedroflake/./octahedroflake.py", line 418, in make_branded_pyramid
branded_pyramid = make_fractal_pyramid(order=FINAL_ORDER).union(make_logo())
^^^^^^^^^^^
File "/home/<USER>/octohedroflake/./octahedroflake.py", line 279, in make_logo
logo = cq.importers.importStep("logo_stamp.step").val().scale(scale_multiplier * 0.35)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/<USER>/mambaforge/envs/cq/lib/python3.12/site-packages/cadquery/occ_impl/importers/__init__.py", line 55, in importStep
raise ValueError("STEP File could not be loaded")
ValueError: STEP File could not be loaded
Done.
Press 'r' to run again, or any other key to exit...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.