1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-09-15 00:53:15 +02:00

505 Commits
v1.0.1 ... v2.0

Author SHA1 Message Date
Justin Lin
86f94d2499 update readme 2019-07-17 08:45:07 +08:00
Justin Lin
6737b4a43e fix conflicts 2019-07-17 08:37:33 +08:00
Justin Lin
3dde9f2745 add dotSCAD 2019-07-15 08:24:54 +08:00
Justin Lin
3ac4136043 fix include 2019-07-15 08:23:38 +08:00
Justin Lin
70879d4c73 update release 2019-07-15 08:18:50 +08:00
Justin Lin
840f8df3ae add voronoi_vase 2019-07-14 11:10:05 +08:00
Justin Lin
49e13d920a add superformula_vase 2019-07-14 10:58:31 +08:00
Justin Lin
948410ec56 rename 2019-07-14 10:15:27 +08:00
Justin Lin
8576d93dd8 update tree 2019-07-14 10:14:10 +08:00
Justin Lin
47a3f9c155 add tree 2019-07-14 10:10:29 +08:00
Justin Lin
93c7ea5c9d add dancing_taiwan 2019-07-13 18:21:04 +08:00
Justin Lin
cfda38c8bd add text_sphere.scad 2019-07-13 16:44:24 +08:00
Justin Lin
d3640830c4 add klein bottle 2019-07-12 16:38:49 +08:00
Justin Lin
dac87e49c5 update README 2019-07-09 07:33:36 +08:00
Justin Lin
843063db31 add knot 2019-07-08 08:10:31 +08:00
Justin Lin
30c1e0fb13 add stereographic_projection 2019-07-06 18:26:21 +08:00
Justin Lin
8727bfbf8b refactor 2019-07-06 07:51:14 +08:00
Justin Lin
c12e160e03 add blackbear 2019-07-05 21:09:48 +08:00
Justin Lin
110bc5c400 update image 2019-07-05 21:01:59 +08:00
Justin Lin
8fdd195949 update featured image 2019-07-05 20:57:35 +08:00
Justin Lin
4c65e12a88 add voronoi_bracelet 2019-07-05 20:06:51 +08:00
Justin Lin
1816aad98e add text_tower 2019-07-05 13:50:34 +08:00
Justin Lin
28e8a5c4b2 update README 2019-07-04 14:54:08 +08:00
Justin Lin
d849034bc7 add comment 2019-07-04 14:53:34 +08:00
Justin Lin
2c1f8faa56 format 2019-07-04 14:53:14 +08:00
Justin Lin
b998cc8f32 add doc 2019-07-04 14:52:57 +08:00
Justin Lin
e126b1af1d add comment 2019-07-04 14:47:09 +08:00
Justin Lin
b256bf7c90 add doc 2019-07-04 14:46:40 +08:00
Justin Lin
3c830cc90d add example 2019-07-02 16:17:48 +08:00
Justin Lin
76b973d824 update README 2019-07-02 15:43:57 +08:00
Justin Lin
90c05523ce add comments 2019-07-02 15:43:23 +08:00
Justin Lin
0cfa510874 add doc 2019-07-02 15:42:35 +08:00
Justin Lin
9b6c17ace4 add doc 2019-07-02 15:35:57 +08:00
Justin Lin
43f84ba478 update doc 2019-07-02 15:29:11 +08:00
Justin Lin
8ee52bd672 update RELEASE 2019-07-02 14:31:20 +08:00
Justin Lin
dc5e063b25 update RELEASE 2019-07-02 14:29:25 +08:00
Justin Lin
aae8f688c0 update functions 2019-07-02 14:28:36 +08:00
Justin Lin
60931ec8b9 refactor 2019-07-01 10:02:12 +08:00
Justin Lin
5a15dd9fdb refactor 2019-07-01 10:01:12 +08:00
Justin Lin
6bb3b445b4 refactor 2019-07-01 07:46:25 +08:00
Justin Lin
66bb8ef643 update comments 2019-07-01 07:44:41 +08:00
Justin Lin
4d02e6bb65 add comments 2019-07-01 07:43:54 +08:00
Justin Lin
681d697840 update doc 2019-06-30 20:30:12 +08:00
Justin Lin
8a8e28c61d update README 2019-06-30 20:28:22 +08:00
Justin Lin
55c2cd6fda add comment 2019-06-30 20:27:21 +08:00
Justin Lin
273d32dc69 add doc 2019-06-30 20:25:53 +08:00
Justin Lin
472d5c7ba7 update doc 2019-06-30 20:22:03 +08:00
Justin Lin
eba7f63576 update README 2019-06-30 18:29:45 +08:00
Justin Lin
ec18d2eeeb add comment 2019-06-30 18:28:58 +08:00
Justin Lin
51e5356f21 add doc 2019-06-30 18:28:01 +08:00
Justin Lin
582050d096 rename 2019-06-30 18:27:57 +08:00
Justin Lin
b7d8d3e87c update doc 2019-06-29 18:18:51 +08:00
Justin Lin
ed6ddec02c update doc 2019-06-29 18:18:11 +08:00
Justin Lin
ab0504607d update test case 2019-06-29 18:16:06 +08:00
Justin Lin
b3ae216b72 change default value 2019-06-29 18:15:12 +08:00
Justin Lin
a6caaac787 rename 2019-06-29 17:53:55 +08:00
Justin Lin
f915b07289 rename 2019-06-29 17:53:38 +08:00
Justin Lin
1ff5d848d2 add width param 2019-06-29 17:52:19 +08:00
Justin Lin
8de9c7f138 update test case 2019-06-29 17:52:06 +08:00
Justin Lin
92c1667194 update test case 2019-06-29 17:47:54 +08:00
Justin Lin
e26e6d7472 add width param 2019-06-29 17:46:14 +08:00
Justin Lin
47b5b91b0a use internal px_circle 2019-06-29 17:14:10 +08:00
Justin Lin
cda26241dd change order 2019-06-29 17:01:36 +08:00
Justin Lin
cfa0d211ed update doc 2019-06-29 10:40:03 +08:00
Justin Lin
0a73460884 update README 2019-06-29 10:31:21 +08:00
Justin Lin
774229e3f9 add doc 2019-06-29 10:29:43 +08:00
Justin Lin
b1c3e371a3 change default value 2019-06-29 10:29:37 +08:00
Justin Lin
e45c16fe3f refactor 2019-06-29 10:15:28 +08:00
Justin Lin
2b36c42c99 update doc 2019-06-29 10:02:47 +08:00
Justin Lin
bec487baba add doc 2019-06-29 10:01:46 +08:00
Justin Lin
ce0daaf6bc update doc 2019-06-29 10:01:43 +08:00
Justin Lin
46c25aa51e add doc 2019-06-29 09:53:02 +08:00
Justin Lin
f542661e2a rename 2019-06-29 09:52:06 +08:00
Justin Lin
172e1f8ceb change order 2019-06-28 07:54:08 +08:00
Justin Lin
31c6ee8599 order by y, order by x 2019-06-28 06:41:18 +08:00
Justin Lin
d9199bf9ed use range 2019-06-28 06:38:15 +08:00
Justin Lin
3b57412108 update README 2019-06-27 08:54:18 +08:00
Justin Lin
fd684a10cb add sort 2019-06-27 08:53:15 +08:00
Justin Lin
aa5fc938d0 change order 2019-06-27 07:32:05 +08:00
Justin Lin
ac1167eacc fix wrong variable 2019-06-26 09:43:40 +08:00
Justin Lin
691a8f3ff9 add modules 2019-06-26 09:42:40 +08:00
Justin Lin
e6280ad9f4 update README 2019-06-25 18:12:27 +08:00
Justin Lin
0c6744c62d fix variable name 2019-06-25 18:09:36 +08:00
Justin Lin
6d858125c2 modify dep 2019-06-25 18:09:15 +08:00
Justin Lin
cad5623248 add px_polygon 2019-06-25 18:08:14 +08:00
Justin Lin
07fd4e47e3 fix variable name 2019-06-25 18:05:26 +08:00
Justin Lin
108a232981 update README 2019-06-24 20:06:16 +08:00
Justin Lin
912adba419 add slice 2019-06-24 20:05:58 +08:00
Justin Lin
53a69477d6 refactor 2019-06-24 18:02:24 +08:00
Justin Lin
5f3bfb391d update doc 2019-06-24 07:29:42 +08:00
Justin Lin
16509eec6c update README 2019-06-23 10:09:55 +08:00
Justin Lin
15a03b7fb2 update doc 2019-06-23 10:07:44 +08:00
Justin Lin
deec59b408 change dir 2019-06-23 10:07:06 +08:00
Justin Lin
8fa2de0a60 update doc 2019-06-23 10:05:02 +08:00
Justin Lin
5d012ece48 change dir 2019-06-23 10:04:18 +08:00
Justin Lin
b1687bece2 update doc 2019-06-23 10:02:08 +08:00
Justin Lin
2d9562c8b6 change dir 2019-06-23 10:00:40 +08:00
Justin Lin
c8e1244651 update README 2019-06-23 09:51:18 +08:00
Justin Lin
862fabcd3a add reverse 2019-06-23 09:50:25 +08:00
Justin Lin
1a28d90853 change dir 2019-06-23 09:49:16 +08:00
Justin Lin
9d1804a4d1 rename __private__ to __comm__ 2019-06-23 09:37:02 +08:00
Justin Lin
502ef06db2 refactor 2019-06-23 09:34:38 +08:00
Justin Lin
810f298c70 refactor 2019-06-23 09:33:03 +08:00
Justin Lin
0408ec9cbe refactor 2019-06-23 09:30:32 +08:00
Justin Lin
be05e3b68e fix end i 2019-06-23 09:10:37 +08:00
Justin Lin
65119984fd fix include 2019-06-23 09:02:53 +08:00
Justin Lin
bdb4dace7f fix include 2019-06-23 08:57:23 +08:00
Justin Lin
4aff538837 change end cond 2019-06-23 08:53:32 +08:00
Justin Lin
c0fb254c43 update README 2019-06-22 14:38:53 +08:00
Justin Lin
dd03a9f3db fix wrong funcall 2019-06-22 14:35:39 +08:00
Justin Lin
eca1d20c70 update README 2019-06-22 14:28:21 +08:00
Justin Lin
d9f065a734 fix wrong funcall 2019-06-22 14:25:31 +08:00
Justin Lin
a5d2c24ea1 refactor 2019-06-22 14:24:22 +08:00
Justin Lin
aa12110504 refactor 2019-06-22 14:23:02 +08:00
Justin Lin
8f0b40322e rename 2019-06-22 14:21:50 +08:00
Justin Lin
d4aaee1db9 update doc 2019-06-22 14:16:04 +08:00
Justin Lin
ee89119f2f add dir 2019-06-22 14:15:18 +08:00
Justin Lin
d1bd586bee not necessary 2019-06-22 14:14:00 +08:00
Justin Lin
f88b7bf8f3 rename 2019-06-22 14:13:35 +08:00
Justin Lin
fbd10cd25d update doc 2019-06-22 14:10:37 +08:00
Justin Lin
dfe76bff78 update doc 2019-06-22 14:06:50 +08:00
Justin Lin
d743f36086 update doc 2019-06-22 13:52:07 +08:00
Justin Lin
f1eda43ac0 add test case 2019-06-22 13:48:47 +08:00
Justin Lin
569171971b use dir to simulate namespace 2019-06-22 13:41:59 +08:00
Justin Lin
cb4b3e6685 update test case 2019-06-22 13:40:34 +08:00
Justin Lin
eaed7ff34f refactor 2019-06-22 13:38:57 +08:00
Justin Lin
2c00ef8525 refactor 2019-06-22 13:38:17 +08:00
Justin Lin
17c62ba293 refactor 2019-06-22 13:37:27 +08:00
Justin Lin
ae78c61491 refactor 2019-06-22 09:19:59 +08:00
Justin Lin
e9b1e7f61f don't cal repeatly 2019-06-22 09:17:45 +08:00
Justin Lin
9ed4e1c42b update README 2019-06-21 20:23:15 +08:00
Justin Lin
72197670cb add test case 2019-06-21 20:22:56 +08:00
Justin Lin
b9d88334c5 add px_sphere 2019-06-21 20:17:31 +08:00
Justin Lin
937b6a35bd update README 2019-06-21 17:47:00 +08:00
Justin Lin
5aec44eba8 modify test case 2019-06-21 07:33:52 +08:00
Justin Lin
2f6a170d2c delete center 2019-06-21 07:33:44 +08:00
Justin Lin
5fff65c0d1 modify test case 2019-06-21 07:29:37 +08:00
Justin Lin
3aa5d552c0 delete center 2019-06-21 07:29:29 +08:00
Justin Lin
631d0c8506 change default value 2019-06-21 06:38:01 +08:00
Justin Lin
5d8abc1028 search from OPENSCADPATH 2019-06-20 20:49:29 +08:00
Justin Lin
59ae810383 OpenSCAD search from OPENSCADPATH 2019-06-20 20:48:58 +08:00
Justin Lin
ccce2706f0 update README 2019-06-20 20:31:59 +08:00
Justin Lin
c680780d11 update README 2019-06-20 20:29:58 +08:00
Justin Lin
0d829b7185 add px_cylinder 2019-06-20 20:23:53 +08:00
Justin Lin
e3706e1f87 add px_cylinder 2019-06-20 20:23:36 +08:00
Justin Lin
9f1aa6a653 add test case 2019-06-20 20:22:49 +08:00
Justin Lin
67a7d20880 add px_cylinder 2019-06-20 20:15:21 +08:00
Justin Lin
7cc01a05c6 modify test case 2019-06-20 20:02:02 +08:00
Justin Lin
f9dd9deb53 set center default [0, 0] 2019-06-20 20:01:51 +08:00
Justin Lin
a747bcff3a update README 2019-06-20 18:33:22 +08:00
Justin Lin
d94381dee2 update README 2019-06-20 14:35:53 +08:00
Justin Lin
8ef20b16e3 add px_circle 2019-06-20 10:11:38 +08:00
Justin Lin
de1d0166e6 update README 2019-06-20 09:27:55 +08:00
Justin Lin
eb8305966d update doc 2019-06-20 09:27:30 +08:00
Justin Lin
2d74627e45 use dir to simulate namespace 2019-06-20 09:27:24 +08:00
Justin Lin
945aeacdc4 update README 2019-06-20 09:21:10 +08:00
Justin Lin
17b731ad8f use dir to simulate namespace 2019-06-20 09:19:42 +08:00
Justin Lin
3830a2e523 update README 2019-06-20 08:37:03 +08:00
Justin Lin
62840eb510 add test_px_circle 2019-06-20 08:36:51 +08:00
Justin Lin
d6021374ba add px_circle 2019-06-20 08:34:29 +08:00
Justin Lin
43e5e66529 update README 2019-06-19 09:07:37 +08:00
Justin Lin
dde0156642 add px_polyline 2019-06-19 09:03:00 +08:00
Justin Lin
edabcb8f79 add test case 2019-06-19 09:02:17 +08:00
Justin Lin
f7398f0d84 add px_polyline 2019-06-19 08:59:05 +08:00
Justin Lin
0f37651bc3 fix end cond 2019-06-19 08:48:23 +08:00
Justin Lin
2df7a64ad7 add px_line 2019-06-18 20:28:47 +08:00
Justin Lin
0b4097fd09 add test case 2019-06-18 20:28:16 +08:00
Justin Lin
0bad260d46 add px_line.scad 2019-06-18 20:27:14 +08:00
Justin Lin
e414d2859b update README 2019-06-17 20:25:03 +08:00
Justin Lin
c9d0122779 update RELEASE 2019-06-17 20:24:29 +08:00
Justin Lin
daed828c9a add dotSCAD.scad 2019-06-17 20:23:33 +08:00
Justin Lin
8ceae06645 update RELEASE 2019-06-17 20:18:45 +08:00
Justin Lin
299b3869fd update README 2019-06-17 20:18:28 +08:00
Justin Lin
80fb650df4 update RELEASE 2019-06-17 20:15:38 +08:00
Justin Lin
919ae2f158 update RLEASE 2019-06-17 20:14:59 +08:00
Justin Lin
a851ee6bb7 add dotSCAD 2019-06-17 20:12:34 +08:00
Justin Lin
340847cd19 add missing doc 2019-06-17 10:02:25 +08:00
Justin Lin
5b21cc10d7 add missing doc 2019-06-17 10:01:45 +08:00
Justin Lin
ab99a24352 update docs 2019-06-17 08:33:00 +08:00
Justin Lin
f4696f231e fix wrong scope 2019-06-17 08:26:21 +08:00
Justin Lin
218db7f7a8 update test case 2019-06-17 08:18:54 +08:00
Justin Lin
bb8604e42b fix wrong angs 2019-06-17 08:18:40 +08:00
Justin Lin
9182575ff2 add test case 2019-06-17 07:36:17 +08:00
Justin Lin
ed9477ece5 refactor 2019-06-16 21:09:41 +08:00
Justin Lin
56d2fb648f refactor 2019-06-16 21:07:23 +08:00
Justin Lin
057ad863af refactor 2019-06-16 18:25:45 +08:00
Justin Lin
002711ae3e add test case 2019-06-16 18:23:10 +08:00
Justin Lin
8a5956e852 sub_str can handle undef 2019-06-16 17:42:17 +08:00
Justin Lin
0eb1387f27 refactor 2019-06-16 17:31:51 +08:00
Justin Lin
46dfe4ff25 update test case 2019-06-16 17:30:17 +08:00
Justin Lin
323e81a82c refactor 2019-06-16 16:47:44 +08:00
Justin Lin
61c6e9f70d refactor 2019-06-16 16:44:01 +08:00
Justin Lin
2af270a8da refactor 2019-06-16 11:05:43 +08:00
Justin Lin
c4c9831798 add test_case 2019-06-16 10:33:55 +08:00
Justin Lin
03ac58acaa refactor 2019-06-15 21:14:16 +08:00
Justin Lin
2110b9cb31 refactor 2019-06-15 20:53:54 +08:00
Justin Lin
93d7c0239d not necessary 2019-06-15 11:20:00 +08:00
Justin Lin
5a37620a5b use for each 2019-06-15 11:19:31 +08:00
Justin Lin
8bc6a0b4c9 refactor 2019-06-15 11:04:16 +08:00
Justin Lin
06831ffe15 c-style for loop 2019-06-15 10:56:33 +08:00
Justin Lin
df5775bd05 avoid warning 2019-06-15 10:49:58 +08:00
Justin Lin
6f83a6192a update RELEASE 2019-06-15 10:45:42 +08:00
Justin Lin
85f8acdbee update doc 2019-06-15 10:42:28 +08:00
Justin Lin
c75bf8bfee to3d to avoid warning 2019-06-15 10:42:08 +08:00
Justin Lin
2d755a6cbf update doc 2019-06-15 10:20:40 +08:00
Justin Lin
01fc0298f6 remove dependency 2019-06-15 10:18:43 +08:00
Justin Lin
a07244fd47 update doc 2019-06-15 10:18:19 +08:00
Justin Lin
e3443bf0e8 remove dependency 2019-06-15 10:15:21 +08:00
Justin Lin
e2771ca01c update RELEASE 2019-06-15 10:11:54 +08:00
Justin Lin
643266f4a3 c-style for loop 2019-06-14 21:26:28 +08:00
Justin Lin
5a0a4a8fa4 add test case 2019-06-14 21:24:15 +08:00
Justin Lin
78127faba6 c-style for loop 2019-06-14 21:21:08 +08:00
Justin Lin
d203fe4030 add test case 2019-06-14 21:18:22 +08:00
Justin Lin
3be3a271e6 c-style for loop 2019-06-14 13:44:47 +08:00
Justin Lin
f5d813839b add test case 2019-06-14 13:44:38 +08:00
Justin Lin
0a604c5793 c-style for loop 2019-06-14 13:38:32 +08:00
Justin Lin
f1a8d6f0dc c-style for loop 2019-06-14 13:35:10 +08:00
Justin Lin
af084fb043 c-style for loop 2019-06-14 09:01:43 +08:00
Justin Lin
0510b18516 c-style for and each 2019-06-14 08:50:35 +08:00
Justin Lin
78bfb2f31d add test case 2019-06-14 08:44:02 +08:00
Justin Lin
e185e9b7e9 c-style for loop 2019-06-14 08:38:24 +08:00
Justin Lin
3fb08570c6 add test case 2019-06-14 08:37:51 +08:00
Justin Lin
41db148815 c-style for loop 2019-06-14 08:32:28 +08:00
Justin Lin
beaebfcc37 c-style for loop 2019-06-14 08:31:04 +08:00
Justin Lin
6493eea0ac refactor 2019-06-13 20:46:53 +08:00
Justin Lin
6299da9d23 c-style for loop 2019-06-13 20:37:16 +08:00
Justin Lin
e5850f871d c-style for loop 2019-06-13 20:35:55 +08:00
Justin Lin
85c75018f1 add test case 2019-06-13 20:27:01 +08:00
Justin Lin
e84c7bc7a0 refactor 2019-06-13 20:26:21 +08:00
Justin Lin
26db1cf25b fixed name error 2019-06-13 20:19:35 +08:00
Justin Lin
f9d609087d add test case 2019-06-13 20:19:09 +08:00
Justin Lin
14bbb3f205 fixed name error 2019-06-13 20:19:01 +08:00
Justin Lin
3376b870a7 c-style for loop 2019-06-13 20:07:20 +08:00
Justin Lin
90d2f1ac9c c-style for loop 2019-06-13 09:11:04 +08:00
Justin Lin
fe8256ef0d c-style for loop 2019-06-13 09:08:44 +08:00
Justin Lin
7351e401c9 c-style for loop 2019-06-13 09:06:55 +08:00
Justin Lin
e26d1d3233 refactor 2019-06-13 08:45:13 +08:00
Justin Lin
ad7819f1eb fix missing dependency 2019-06-13 08:41:48 +08:00
Justin Lin
957e5ab5d5 missing dependency 2019-06-13 08:31:54 +08:00
Justin Lin
0218724b48 refactor 2019-06-12 20:40:55 +08:00
Justin Lin
8983b01b30 c-style for loop 2019-06-12 20:31:20 +08:00
Justin Lin
7c59a3e11b c-style for loop 2019-06-12 20:29:51 +08:00
Justin Lin
f433a79c31 c-style for loop 2019-06-12 20:28:18 +08:00
Justin Lin
700f46bfef c-style for loop 2019-06-12 13:36:48 +08:00
Justin Lin
e34bc73def c-style for loop 2019-06-12 13:35:21 +08:00
Justin Lin
cec42209f2 c-style for loop 2019-06-12 13:33:43 +08:00
Justin Lin
758b14715f c-style for loop 2019-06-12 13:30:34 +08:00
Justin Lin
f89794e3cc modify use case 2019-06-12 13:18:26 +08:00
Justin Lin
edd022bca2 modify use case 2019-06-12 13:08:07 +08:00
Justin Lin
c5c9ca40c9 update README 2019-06-12 09:16:54 +08:00
Justin Lin
423fc36f1c c-style for loop 2019-06-12 09:06:36 +08:00
Justin Lin
283b091c7c use built-in is_undef 2019-06-12 08:59:54 +08:00
Justin Lin
bf0601eaef never used 2019-06-12 08:58:32 +08:00
Justin Lin
8c4d2b5333 c-style for loop 2019-06-12 08:42:10 +08:00
Justin Lin
88b0868358 c-style for loop 2019-06-12 08:39:54 +08:00
Justin Lin
68ad185712 add test_shape_arc 2019-06-12 08:37:00 +08:00
Justin Lin
2e1def3556 use c-style for loop 2019-06-12 08:32:52 +08:00
Justin Lin
9a2e66f999 refactor 2019-06-12 08:23:40 +08:00
Justin Lin
e1985e85b0 multify directly 2019-06-12 08:20:16 +08:00
Justin Lin
c31145be3b modify message 2019-06-12 08:18:54 +08:00
Justin Lin
fee00580be modify use case 2019-06-12 08:17:50 +08:00
Justin Lin
5a836b02d6 modify use case 2019-06-12 07:36:15 +08:00
Justin Lin
bec05fb5b4 modify use_case 2019-06-12 07:32:26 +08:00
Justin Lin
15c1a98b8d update README 2019-06-11 15:36:42 +08:00
Justin Lin
e170918a5d update README 2019-06-11 15:35:31 +08:00
Justin Lin
5a7c13a548 change expected 2019-06-11 15:31:56 +08:00
Justin Lin
f34f2e0bbf not necessary 2019-06-11 15:30:45 +08:00
Justin Lin
f47267c656 annoying float errors XD 2019-06-11 15:28:16 +08:00
Justin Lin
2e2079a323 use built-in assert 2019-06-11 15:15:52 +08:00
Justin Lin
627909fc9e use new assertEqualPoints 2019-06-11 14:52:44 +08:00
Justin Lin
fcddf7b187 refactor 2019-06-11 14:49:12 +08:00
Justin Lin
eaeb0d1e28 refactor 2019-06-11 14:38:51 +08:00
Justin Lin
6b64ca01ab refactor to use assertEqualNum 2019-06-11 14:32:21 +08:00
Justin Lin
df0f293825 use built-in assert 2019-06-11 13:49:31 +08:00
Justin Lin
37e272e333 use 0 directly 2019-06-11 09:30:07 +08:00
Justin Lin
799790932e use built-in angle 2019-06-11 09:26:26 +08:00
Justin Lin
a56d443686 use built-in PI 2019-06-11 09:02:41 +08:00
Justin Lin
d581e60678 use built-in PI 2019-06-11 08:58:50 +08:00
Justin Lin
d1ae9174a9 use built-in is_num 2019-06-11 08:39:57 +08:00
Justin Lin
9d63c4ffeb not necessary 2019-06-11 08:27:11 +08:00
Justin Lin
db6c77a523 use is_num 2019-06-11 08:26:47 +08:00
Justin Lin
658fe213d6 update RELEASE 2019-06-09 11:35:20 +08:00
Justin Lin
184b0be7e8 update to 1.3 2019-06-09 11:33:42 +08:00
Justin Lin
e0874c5ca3 update RELEASE 2019-06-09 11:33:28 +08:00
Justin Lin
84f27c1ce3 update README 2019-06-09 11:28:30 +08:00
Justin Lin
2f8f51ad30 update doc 2019-06-09 11:22:00 +08:00
Justin Lin
76bbb93724 rename 2019-06-09 11:08:26 +08:00
Justin Lin
f2f25fcc44 add missed images 2019-06-09 10:59:23 +08:00
Justin Lin
576470477a add comments 2019-06-09 10:48:45 +08:00
Justin Lin
8f8e1f717a refactor 2019-06-08 08:37:03 +08:00
Justin Lin
91d39de4a6 update doc 2019-06-08 08:34:38 +08:00
Justin Lin
5e3d1ced28 refactor 2019-06-08 08:34:13 +08:00
Justin Lin
1d812f8750 rename 2019-06-08 08:34:05 +08:00
Justin Lin
6854c86f90 refactor 2019-06-08 08:10:04 +08:00
Justin Lin
ff63835009 update doc 2019-06-08 08:06:24 +08:00
Justin Lin
f6a1050a01 support 3d point 2019-06-08 08:02:41 +08:00
Justin Lin
aabc373798 rename 2019-06-08 07:57:25 +08:00
Justin Lin
e9e346cb51 use norm to support 3D 2019-06-08 07:54:58 +08:00
Justin Lin
810a1d3ece rename 2019-06-07 17:46:17 +08:00
Justin Lin
43a52bbaa0 format 2019-06-07 10:54:00 +08:00
Justin Lin
fdefc03774 all are documented 2019-06-07 10:51:56 +08:00
Justin Lin
56d755ec06 update doc 2019-06-07 10:51:12 +08:00
Justin Lin
b2abc0dde0 update doc 2019-06-07 10:48:46 +08:00
Justin Lin
49398206de update doc 2019-06-07 10:42:56 +08:00
Justin Lin
d2287ff119 format 2019-06-07 10:42:04 +08:00
Justin Lin
731b4ff1ab fix param name 2019-06-07 09:50:02 +08:00
Justin Lin
bb45854f33 rename 2019-06-07 09:49:30 +08:00
Justin Lin
7648373e01 update note 2019-06-06 13:41:16 +08:00
Justin Lin
0e9710b8d4 update doc 2019-06-06 13:29:29 +08:00
Justin Lin
69e6d24b08 update doc 2019-06-06 13:27:26 +08:00
Justin Lin
47523ea95c rename 2019-06-06 13:19:09 +08:00
Justin Lin
99e91aafaa update space_size 2019-06-05 09:34:24 +08:00
Justin Lin
106be46e64 update doc 2019-06-05 09:21:10 +08:00
Justin Lin
cc0e7499f9 update space_size 2019-06-05 09:20:01 +08:00
Justin Lin
840799f6cc fix format 2019-06-05 07:58:51 +08:00
Justin Lin
10aed43d98 update example 2019-06-05 07:58:02 +08:00
Justin Lin
217878454a update doc 2019-06-05 07:49:16 +08:00
Justin Lin
0b4d1e3840 add doc 2019-06-04 17:54:14 +08:00
Justin Lin
dd90b4c106 add doc 2019-06-04 12:10:36 +08:00
Justin Lin
ea39db6ca2 add doc 2019-06-03 15:38:01 +08:00
Justin Lin
d904a0b629 rename extension 2019-06-03 09:30:17 +08:00
Justin Lin
eed652ee17 add doc 2019-06-03 09:29:58 +08:00
Justin Lin
208fd1cb0f accept polyline pts 2019-06-03 09:08:32 +08:00
Justin Lin
40280f6927 update README 2019-06-03 09:00:22 +08:00
Justin Lin
53cd4f3d4a update README 2019-06-03 08:59:36 +08:00
Justin Lin
31ce310080 update README 2019-06-03 08:22:23 +08:00
Justin Lin
46633f444a update doc 2019-06-02 21:07:58 +08:00
Justin Lin
42d90d68ff it's documented 2019-06-02 21:04:29 +08:00
Justin Lin
8b70b3e2b4 add doc 2019-06-02 21:04:05 +08:00
Justin Lin
59e9f97fa7 use __lines_from 2019-06-02 21:02:20 +08:00
Justin Lin
571ddccf5c update doc 2019-06-02 09:54:29 +08:00
Justin Lin
68f2539726 typo 2019-06-02 09:54:09 +08:00
Justin Lin
b9518ad8ed add doc 2019-06-02 09:23:52 +08:00
Justin Lin
944d63dc68 sphere 2019-06-02 09:17:43 +08:00
Justin Lin
309a2086a3 add space_type parameter 2019-06-02 09:16:28 +08:00
Justin Lin
b66c36fc55 update image 2019-06-01 19:58:47 +08:00
Justin Lin
31a2e1c54e add doc 2019-06-01 19:58:08 +08:00
Justin Lin
80e296d9dc update doc 2019-06-01 19:35:12 +08:00
Justin Lin
12b5df8a0f update doc 2019-06-01 16:00:14 +08:00
Justin Lin
53f9583cf3 degree now start from x-axis 2019-06-01 15:52:10 +08:00
Justin Lin
1401a00876 add bend_extrude doc 2019-06-01 15:50:43 +08:00
Justin Lin
5dfb293702 fix reversed result 2019-06-01 15:47:36 +08:00
Justin Lin
2aca57c779 rename 2019-05-31 11:56:47 +08:00
Justin Lin
60dee6f872 note 2019-05-31 11:14:42 +08:00
Justin Lin
c5ca8528d5 note 2019-05-31 10:20:25 +08:00
Justin Lin
0cec181a0b do things when method is EULER_ANGLE 2019-05-31 10:19:33 +08:00
Justin Lin
b9a3d5c496 add an option 2019-05-31 10:12:59 +08:00
Justin Lin
699de29c53 rename 2019-05-31 10:09:49 +08:00
Justin Lin
1f3022a3cc refactor 2019-05-31 09:55:02 +08:00
Justin Lin
e081d03193 note 2019-05-31 09:40:05 +08:00
Justin Lin
8f40ae8b30 provide an option to switch the metohd of extrude 2019-05-31 09:39:41 +08:00
Justin Lin
afd460579e note 2019-05-31 08:15:02 +08:00
Justin Lin
c0902b00cc add triangulate 2019-05-31 08:14:33 +08:00
Justin Lin
a71b9fe174 add undocumented_features 2019-05-30 08:11:34 +08:00
Justin Lin
90b2d542ef should be less than 2019-05-29 13:49:43 +08:00
Justin Lin
6a83c26e9b add epsilon 2019-05-29 13:41:31 +08:00
Justin Lin
652f763c90 add trim_shape 2019-05-29 10:46:23 +08:00
Justin Lin
6babff457e rename 2019-05-29 09:20:13 +08:00
Justin Lin
429abba8ae add closed param 2019-05-29 09:15:48 +08:00
Justin Lin
561e2b69b1 add closed param 2019-05-29 09:11:01 +08:00
Justin Lin
7dbfbc3741 add epsilon 2019-05-29 09:08:34 +08:00
Justin Lin
e0256a0925 refactor 2019-05-28 14:28:53 +08:00
Justin Lin
599ffdb4ab use cross to implement 2019-05-28 14:24:10 +08:00
Justin Lin
00dfbd2366 no mapping when dt == 0 2019-05-28 09:31:03 +08:00
Justin Lin
d8027d45e2 add distance tolerance 2019-05-28 09:02:58 +08:00
Justin Lin
a0f16c9cd6 reduce pts 2019-05-28 08:52:45 +08:00
Justin Lin
04fd1590a7 add midpt_smooth 2019-05-28 07:29:40 +08:00
Justin Lin
4e1eca2df2 public in_line 2019-05-27 17:29:29 +08:00
Justin Lin
8457bd403c refactor 2019-05-27 17:28:34 +08:00
Justin Lin
9f0693c3ae cross and dot algorithm 2019-05-27 15:29:22 +08:00
Justin Lin
769894d1a3 refactor 2019-05-26 21:32:05 +08:00
Justin Lin
3ec8d13a14 update RELEASE - it's included in 1.2 2019-05-26 21:15:41 +08:00
Justin Lin
295ff73223 refactor 2019-05-26 21:09:28 +08:00
Justin Lin
e20d104cc7 refactor 2019-05-26 21:06:55 +08:00
Justin Lin
1fcf8b113f add in_shape 2019-05-26 21:05:34 +08:00
Justin Lin
d771a88642 align to y-axis 2019-05-25 20:16:59 +08:00
Justin Lin
de31131741 add voronoi3d 2019-05-25 16:10:48 +08:00
Justin Lin
944152d326 rename 2019-05-25 14:56:22 +08:00
Justin Lin
6d62ac0a11 we don't have to rotate half_frag_angle 2019-05-25 14:52:56 +08:00
Justin Lin
9f2cb46427 we don't have to roate 90 degrees 2019-05-25 14:51:13 +08:00
Justin Lin
5615800a56 add region_type 2019-05-25 14:39:43 +08:00
Justin Lin
90f860cbc7 rename 2019-05-24 14:58:06 +08:00
Justin Lin
6754d231fc add bend_extrude 2019-05-24 10:59:01 +08:00
Justin Lin
e099ebd012 add voronoi 2019-05-24 10:58:54 +08:00
Justin Lin
81e4f45f89 update doc 2019-05-21 21:42:53 +08:00
Justin Lin
46ffc7601d update doc 2019-05-21 21:09:13 +08:00
Justin Lin
31dba8711d reverse calculated sections 2019-05-21 20:50:57 +08:00
Justin Lin
ad983b8670 reverse shape_pts directly 2019-05-21 20:25:58 +08:00
Justin Lin
0d35fc2023 update RELEASE 2019-05-21 20:01:58 +08:00
Justin Lin
6851464068 fix CCW bug 2019-05-21 19:47:34 +08:00
Justin Lin
b9d93bac84 fix wrong funcall 2019-05-21 19:12:31 +08:00
Justin Lin
645d0946c1 remove re-asigned 2019-05-21 18:54:02 +08:00
Justin Lin
844c6e7d9b add comments 2019-05-20 17:40:02 +08:00
Justin Lin
5597fa0ce1 update README 2019-05-20 17:37:50 +08:00
Justin Lin
64eaa6d7e1 update README 2019-05-20 17:37:42 +08:00
Justin Lin
840fc0eac5 update RELEASE 2019-05-20 17:36:29 +08:00
Justin Lin
98bac0bdff update RELEASE 2019-05-20 17:36:04 +08:00
Justin Lin
8f747f2e75 update featured pic 2019-05-20 17:28:12 +08:00
Justin Lin
4e3016859c update doc 2019-05-20 17:20:08 +08:00
Justin Lin
7c38ea2009 add doc 2019-05-20 15:46:21 +08:00
Justin Lin
ce4d11cf52 update doc 2019-05-20 15:12:03 +08:00
Justin Lin
b4e4f60902 update doc 2019-05-20 15:04:23 +08:00
Justin Lin
feb0e351b6 add doc 2019-05-20 15:04:13 +08:00
Justin Lin
e670ad6b9d update docs 2019-05-20 15:04:05 +08:00
Justin Lin
bf1cc23f0f update docs 2019-05-20 14:21:59 +08:00
Justin Lin
fa966bdde8 update doc 2019-05-20 12:00:45 +08:00
Justin Lin
db8792fc4e update doc 2019-05-20 11:47:27 +08:00
Justin Lin
7d5e18ff8c add doc 2019-05-20 11:10:39 +08:00
Justin Lin
8722f971ba add doc 2019-05-20 11:01:57 +08:00
Justin Lin
6c0a0bdfb0 update doc 2019-05-20 10:55:53 +08:00
Justin Lin
156e15bc99 rename 2019-05-20 10:48:57 +08:00
Justin Lin
b2a521a11f update RELEASE 2019-05-19 20:43:34 +08:00
Justin Lin
597551e24a remove comment 2019-05-19 11:26:21 +08:00
Justin Lin
bf9a23d5c5 added bijection_offset 2019-05-19 09:50:36 +08:00
Justin Lin
cbf59ce0b4 remove repeating points 2019-05-19 09:28:01 +08:00
Justin Lin
fafa551959 added torus_knot 2019-05-17 17:59:08 +08:00
Justin Lin
63dcbe259d added starburst 2019-05-17 17:54:28 +08:00
Justin Lin
4ea52e328e rename 2019-05-17 13:01:57 +08:00
Justin Lin
1a92c27b28 added edge_aligned_sections 2019-05-17 10:00:04 +08:00
Justin Lin
a3e2077b46 update README 2019-05-15 20:09:36 +08:00
Justin Lin
afa0e99fe5 use __is_float 2019-05-15 19:51:52 +08:00
Justin Lin
09016a31cd missed _edge_r.scad 2019-05-15 19:41:43 +08:00
Justin Lin
ec102fbdee use __is_float 2019-05-15 19:38:09 +08:00
Justin Lin
106695b988 use __is__float 2019-05-15 19:35:42 +08:00
Justin Lin
ee31927015 use __is_float 2019-05-15 19:31:29 +08:00
Justin Lin
e60c451033 use __is_float 2019-05-15 19:26:47 +08:00
Justin Lin
53b7d7a628 refactor 2019-05-15 19:23:26 +08:00
Justin Lin
77b3c4c9db refactor 2019-05-15 19:20:50 +08:00
Justin Lin
bc7f57813b rename 2019-05-15 19:18:00 +08:00
Justin Lin
ad4a992c9d refactor 2019-05-15 19:16:00 +08:00
Justin Lin
f8f7adbb45 refactor 2019-05-15 19:14:21 +08:00
Justin Lin
f690952f1f refactor 2019-05-15 19:12:18 +08:00
Justin Lin
ac209d6125 use __is_float 2019-05-15 19:09:27 +08:00
Justin Lin
5d394d8738 check vector 2019-05-15 09:29:21 +08:00
Justin Lin
b3ffb9ab72 check vector 2019-05-15 09:26:58 +08:00
Justin Lin
665fb09864 update RELEASE 2019-05-13 09:55:25 +08:00
Justin Lin
f33d6c5671 consider two or three points 2019-05-13 09:50:53 +08:00
Justin Lin
f985e13231 remove echo 2019-05-13 09:47:35 +08:00
Justin Lin
7b1a683c74 consider two or three pts 2019-05-13 09:44:31 +08:00
Justin Lin
ff8d36336e add more check 2019-05-13 09:13:31 +08:00
Justin Lin
49be3b9b9f typo 2019-05-13 08:44:54 +08:00
Justin Lin
e13abc57ce update RELEASE 2019-05-13 08:41:50 +08:00
Justin Lin
6fbe42ba8f if a== 0 do_noting 2019-05-13 08:27:02 +08:00
Justin Lin
48e52fa48b update doc 2019-05-10 14:09:39 +08:00
Justin Lin
0dbe93d16b update doc 2019-05-08 13:57:46 +08:00
Justin Lin
bdaa05823c update doc 2019-05-07 17:38:38 +08:00
Justin Lin
035e1fa1b4 use built-in matrix multi 2019-05-07 17:35:32 +08:00
Justin Lin
33b3d6de67 UPDATE RELEASE 2019-05-04 21:23:00 +08:00
Justin Lin
305c2f9ee4 update RELEASE 2019-05-04 20:59:36 +08:00
Justin Lin
0958207e53 Merge branch 'v1.1.0'
# Conflicts:
#	src/along_with.scad
#	src/path_extrude.scad
#	src/rotate_p.scad
2019-05-04 20:47:34 +08:00
Justin Lin
ed16cc3289 fix missed param 2019-05-04 10:48:38 +08:00
Justin Lin
9c57a539b2 improved performance 2019-05-04 10:04:50 +08:00
Justin Lin
d09926285a update comment 2019-05-04 09:13:05 +08:00
Justin Lin
a767e2240c add comment 2019-05-04 09:11:51 +08:00
Justin Lin
f42a51d896 use built-in norm 2019-05-04 08:39:41 +08:00
Justin Lin
af7e39a97e not necessary 2019-05-04 08:09:11 +08:00
Justin Lin
0c45a94038 Improved Performance 2019-05-04 08:07:37 +08:00
Justin Lin
46777fa403 refactor 2019-05-03 20:07:38 +08:00
Justin Lin
118ee961ee update readme 2019-05-03 09:18:39 +08:00
Justin Lin
57ed5a8901 add doc 2019-05-03 09:18:03 +08:00
Justin Lin
4fe79dc568 add m_cumulate 2019-05-03 09:14:14 +08:00
Justin Lin
3603b92258 avoid func name conflicting 2019-05-03 09:13:53 +08:00
Justin Lin
502dcdde9b update readme 2019-05-02 11:19:16 +08:00
Justin Lin
daa281bb70 update README 2019-05-02 11:10:57 +08:00
Justin Lin
35132b603f see doc directly 2019-05-02 11:00:22 +08:00
Justin Lin
ce14b4fec7 add doc link, etc 2019-05-02 10:55:09 +08:00
Justin Lin
9e26bd35ec add since: 2019-05-02 10:44:19 +08:00
Justin Lin
70db05592b add m_multiply doc 2019-05-02 10:33:43 +08:00
Justin Lin
b9bf11ebe9 add m_scaling doc 2019-05-02 10:27:52 +08:00
Justin Lin
32e582554c always to a vect 2019-05-02 10:27:45 +08:00
Justin Lin
5972c4f551 update doc 2019-05-02 10:26:45 +08:00
Justin Lin
f215f27f9f always to a vect 2019-05-02 10:22:31 +08:00
Justin Lin
69f43afe46 update doc 2019-05-02 10:14:39 +08:00
Justin Lin
8ada3785be add m_translation doc 2019-05-02 10:11:50 +08:00
Justin Lin
42cc92e9b4 add m_rotation doc 2019-05-02 10:07:52 +08:00
Justin Lin
2354f9aeaa use _to_avect 2019-05-02 09:57:03 +08:00
Justin Lin
8385bbb145 rename 2019-05-02 09:56:05 +08:00
Justin Lin
f6c03d239f add m_mirror doc 2019-05-02 09:47:04 +08:00
Justin Lin
3e285fc1e8 update rotate_p doc 2019-05-02 09:39:07 +08:00
Justin Lin
66e1001ba4 add m_shearing doc 2019-05-02 09:19:37 +08:00
Justin Lin
4579614ddb add lib-shear doc 2019-05-02 09:13:23 +08:00
Justin Lin
e1bf720acb a matrix is enough 2019-05-01 21:21:42 +08:00
Justin Lin
db004887d5 fix wrong func 2019-05-01 21:16:35 +08:00
Justin Lin
d746ff3078 add shear 2019-05-01 08:17:21 +08:00
Justin Lin
fece5c2bde in the following order: sx, sy, sz 2019-05-01 07:30:08 +08:00
Justin Lin
fad69acb2a add m_shearing 2019-04-30 15:15:07 +08:00
Justin Lin
f60d1558ce add m_mirror 2019-04-30 14:51:38 +08:00
Justin Lin
8e96639d5a support number 2019-04-30 08:29:56 +08:00
Justin Lin
7ec08a7603 support number 2019-04-30 08:20:41 +08:00
Justin Lin
47997a5cbd fix crossing bug when touching z axis 2019-04-29 15:21:41 +08:00
Justin Lin
aee4e7b68a fix wrong variable 2019-04-29 14:09:52 +08:00
Justin Lin
ce6ef4c039 update doc 2019-04-29 13:49:42 +08:00
Justin Lin
07074ee47c not necessary 2019-04-29 10:52:58 +08:00
Justin Lin
a3535ee529 fix crossing bugs when touches Z axis 2019-04-29 10:49:27 +08:00
Justin Lin
691274cb07 refactor 2019-04-28 17:50:38 +08:00
Justin Lin
022269a13b refactor 2019-04-28 17:48:41 +08:00
Justin Lin
92f4e12a9a rename 2019-04-28 17:10:43 +08:00
Justin Lin
79f49b9262 refactor 2019-04-28 17:08:36 +08:00
Justin Lin
7d45b16691 rotation around a given axis 2019-04-28 16:41:04 +08:00
Justin Lin
cca77c3c65 rotate around an arbitrary axis 2019-04-28 16:30:01 +08:00
Justin Lin
a8063a2be2 add m_rotation 2019-04-28 15:40:42 +08:00
Justin Lin
d6aae5fdf6 refactor for sharing 2019-04-28 15:35:47 +08:00
Justin Lin
07ed786ea1 add m_multiply 2019-04-28 15:32:37 +08:00
Justin Lin
87f5a89cbb add m_scaling 2019-04-28 14:58:39 +08:00
Justin Lin
29e387cdcf add m_translation 2019-04-28 14:54:54 +08:00
298 changed files with 9755 additions and 2792 deletions

View File

@@ -1,13 +1,15 @@
# dotSCAD
# dotSCAD 2.0
> Helpful modules and functions when playing OpenSCAD.
> **Reduce the burden of 3D modeling in mathematics.**
![dotSCAD](GoldenTaiwan.JPG)
![dotSCAD](TaiwaneseBlackBear.JPG)
[![license/LGPL](https://img.shields.io/badge/license-LGPL-blue.svg)](https://github.com/JustinSDK/lib-openscad/blob/master/LICENSE)
## Introduction
**dotSCAD 2.0 is based on OpenSCAD 2019.05.** For old versions, please use dotSCAD 1.3. You can download all versions from the [releases](https://github.com/JustinSDK/dotSCAD/releases).
OpenSCAD uses three library locations, the installation library, built-in library, and user defined libraries. It's convenient to set `OPENSCADPATH`. Check [Setting OPENSCADPATH](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries#Setting_OPENSCADPATH) in [OpenSCAD User Manual/Libraries](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries) for details.
Every module or function is located in the file which has the same name as the module or the function. For example, if you want to use the `line2d` module to draw a line, `include <line2d.scad>;` first.
@@ -16,6 +18,16 @@ Every module or function is located in the file which has the same name as the m
line2d(p1 = [0, 0], p2 = [5, 0], width = 1);
Some module files are organized in a directory. For example, px_circle.scad exists in `pixel` directory. You have to prefix the directory name when including `px_circle`.
include <pixel/px_circle.scad>;
points = px_circle(radius = 10);
for(pt = points) {
translate(pt) square(1);
}
## Dependencies
Some modules depend on other modules. For example, the `polyline2d` module depends on the `line2d` module, so you also have to `include <line2d.scad>;` besides `include <polyline3d.scad>;`.
include <line2d.scad>;
@@ -23,10 +35,12 @@ Some modules depend on other modules. For example, the `polyline2d` module depen
polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1);
If OpenSCAD generates "WARNING: Ignoring unknown xxx function" or "WARNING: Ignoring unknown xxx module" when using one module of dotSCAD. Just try to `include <xxx.scad>;`.
If OpenSCAD generates "WARNING: Ignoring unknown xxx function" or "WARNING: Ignoring unknown xxx module" when using one module of dotSCAD. Just try to `include <xxx.scad>;` or `include <dir/xxx.scad>` if xxx.scad exists in `dir` directory.
Too many dependencies? Because OpenSCAD doesn't provide namespace management, I personally think that exposing dependencies is better than hiding them. In this way, users can have their own way to manage dependencies. How to categorize dependencies is up to you. For example, you can include your commonly-used modules and functions in "commonly_used.scad" and then `include <commonly_used.scad>;` in the ".scad" file of your project.
**If you really don't want to care about dependencies, `include <dotSCAD.scad>;` or `use <dotSCAD.scad>;` come to save you.**
## Documentation
- 2D
@@ -39,6 +53,7 @@ Too many dependencies? Because OpenSCAD doesn't provide namespace management, I
- [hexagons](https://openhome.cc/eGossip/OpenSCAD/lib-hexagons.html)
- [polytransversals](https://openhome.cc/eGossip/OpenSCAD/lib-polytransversals.html)
- [multi_line_text](https://openhome.cc/eGossip/OpenSCAD/lib-multi_line_text.html)
- [voronoi2d](https://openhome.cc/eGossip/OpenSCAD/lib-voronoi2d.html)
- 3D
- [rounded_cube](https://openhome.cc/eGossip/OpenSCAD/lib-rounded_cube.html)
@@ -49,19 +64,26 @@ Too many dependencies? Because OpenSCAD doesn't provide namespace management, I
- [hull_polyline3d](https://openhome.cc/eGossip/OpenSCAD/lib-hull_polyline3d.html)
- [function_grapher](https://openhome.cc/eGossip/OpenSCAD/lib-function_grapher.html)
- [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html)
- [starburst](https://openhome.cc/eGossip/OpenSCAD/lib-starburst.html)
- [voronoi3d](https://openhome.cc/eGossip/OpenSCAD/lib-voronoi3d.html)
- Transformation
- [along_with](https://openhome.cc/eGossip/OpenSCAD/lib-along_with.html)
- [hollow_out](https://openhome.cc/eGossip/OpenSCAD/lib-hollow_out.html)
- [bend](https://openhome.cc/eGossip/OpenSCAD/lib-bend.html)
- [shear](https://openhome.cc/eGossip/OpenSCAD/lib-shear.html)
- Functon
- [rotate_p](https://openhome.cc/eGossip/OpenSCAD/lib-rotate_p.html)
- [sub_str](https://openhome.cc/eGossip/OpenSCAD/lib-sub_str.html)
- [split_str](https://openhome.cc/eGossip/OpenSCAD/lib-split_str.html)
- [parse_number](https://openhome.cc/eGossip/OpenSCAD/lib-parse_number.html)
- [cross_sections](https://openhome.cc/eGossip/OpenSCAD/lib-cross_sections.html)
- [paths2sections](https://openhome.cc/eGossip/OpenSCAD/lib-paths2sections.html)
- [path_scaling_sections](https://openhome.cc/eGossip/OpenSCAD/lib2-path_scaling_sections.html)
- [bijection_offset](https://openhome.cc/eGossip/OpenSCAD/lib-bijection_offset.html)
- [in_polyline](https://openhome.cc/eGossip/OpenSCAD/lib-in_polyline.html)
- [in_shape](https://openhome.cc/eGossip/OpenSCAD/lib-in_shape.html)
- [midpt_smooth](https://openhome.cc/eGossip/OpenSCAD/lib-midpt_smooth.html)
- [trim_shape](https://openhome.cc/eGossip/OpenSCAD/lib-trim_shape.html)
- [triangulate](https://openhome.cc/eGossip/OpenSCAD/lib-triangulate.html)
- Path
- [arc_path](https://openhome.cc/eGossip/OpenSCAD/lib-arc_path.html)
@@ -73,6 +95,7 @@ Too many dependencies? Because OpenSCAD doesn't provide namespace management, I
- [golden_spiral](https://openhome.cc/eGossip/OpenSCAD/lib-golden_spiral.html)
- [archimedean_spiral](https://openhome.cc/eGossip/OpenSCAD/lib-archimedean_spiral.html)
- [sphere_spiral](https://openhome.cc/eGossip/OpenSCAD/lib-sphere_spiral.html)
- [torus_knot](https://openhome.cc/eGossip/OpenSCAD/lib-torus_knot.html)
- Extrusion
- [box_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-box_extrude.html)
@@ -95,6 +118,7 @@ Too many dependencies? Because OpenSCAD doesn't provide namespace management, I
- [shape_path_extend](https://openhome.cc/eGossip/OpenSCAD/lib-shape_path_extend.html)
- 2D Shape Extrusion
- [bend_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-bend_extrude.html)
- [path_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-path_extrude.html)
- [ring_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-ring_extrude.html)
- [helix_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-helix_extrude.html)
@@ -102,11 +126,34 @@ Too many dependencies? Because OpenSCAD doesn't provide namespace management, I
- [archimedean_spiral_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-archimedean_spiral_extrude.html)
- [sphere_spiral_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-sphere_spiral_extrude.html)
- Other
- [turtle2d](https://openhome.cc/eGossip/OpenSCAD/lib-turtle2d.html)
- [turtle3d](https://openhome.cc/eGossip/OpenSCAD/lib-turtle3d.html)
- [log](https://openhome.cc/eGossip/OpenSCAD/lib-log.html)
- Utilities
- [util/sub_str](https://openhome.cc/eGossip/OpenSCAD/lib2-sub_str.html)
- [util/split_str](https://openhome.cc/eGossip/OpenSCAD/lib2-split_str.html)
- [util/parse_number](https://openhome.cc/eGossip/OpenSCAD/lib2-parse_number.html)
- [util/reverse](https://openhome.cc/eGossip/OpenSCAD/lib2-reverse.html)
- [util/slice](https://openhome.cc/eGossip/OpenSCAD/lib2-slice.html)
- [util/sort](https://openhome.cc/eGossip/OpenSCAD/lib2-sort.html)
- Matrix
- [matrix/m_cumulate](https://openhome.cc/eGossip/OpenSCAD/lib2-m_cumulate.html)
- [matrix/m_translation](https://openhome.cc/eGossip/OpenSCAD/lib2-m_translation.html)
- [matrix/m_rotation](https://openhome.cc/eGossip/OpenSCAD/lib2-m_rotation.html)
- [matrix/m_scaling](https://openhome.cc/eGossip/OpenSCAD/lib2-m_scaling.html)
- [matrix/m_mirror](https://openhome.cc/eGossip/OpenSCAD/lib2-m_mirror.html)
- [matrix/m_shearing](https://openhome.cc/eGossip/OpenSCAD/lib2-m_shearing.html)
- Turtle
- [turtle/turtle2d](https://openhome.cc/eGossip/OpenSCAD/lib2-turtle2d.html)
- [turtle/turtle3d](https://openhome.cc/eGossip/OpenSCAD/lib2-turtle3d.html)
- Pixel
- [pixel/px_line](https://openhome.cc/eGossip/OpenSCAD/lib2-px_line.html)
- [pixel/px_polyline](https://openhome.cc/eGossip/OpenSCAD/lib2-px_polyline.html)
- [pixel/px_circle](https://openhome.cc/eGossip/OpenSCAD/lib2-px_circle.html)
- [pixel/px_cylinder](https://openhome.cc/eGossip/OpenSCAD/lib2-px_cylinder.html)
- [pixel/px_sphere](https://openhome.cc/eGossip/OpenSCAD/lib2-px_sphere.html)
- [pixel/px_polygon](https://openhome.cc/eGossip/OpenSCAD/lib2-px_polygon.html)
## Bugs and Feedback
For bugs, questions and discussions please use the [Github Issues](https://github.com/JustinSDK/dotSCAD/issues).

View File

@@ -1,3 +1,98 @@
> Version numbers are based on [Semantic Versioning](https://semver.org/).
# v2.0
- Use new features of OpenSCAD-2019.05 to refactor internal implementation.
- Delete the `log` module which is never used.
- Directory changed.
- `m_cumulate`, `m_mirror`, `m_rotation`, `m_scaling`, `m_shearing` and `m_translation` are moved into the `matrix` directory.
- `turtle2d` and `turtle3d` are moved into the `turtle` directory.
- `parse_number`, `split_str` and `sub_str` are moved into the `util` directory.
- New modules and functions.
- [pixel/px_line](https://openhome.cc/eGossip/OpenSCAD/lib2-px_line.html)
- [pixel/px_polyline](https://openhome.cc/eGossip/OpenSCAD/lib2-px_polyline.html)
- [pixel/px_circle](https://openhome.cc/eGossip/OpenSCAD/lib2-px_circle.html)
- [pixel/px_cylinder](https://openhome.cc/eGossip/OpenSCAD/lib2-px_cylinder.html)
- [pixel/px_sphere](https://openhome.cc/eGossip/OpenSCAD/lib2-px_sphere.html)
- [pixel/px_polygon](https://openhome.cc/eGossip/OpenSCAD/lib2-px_polygon.html)
- [util/reverse](https://openhome.cc/eGossip/OpenSCAD/lib2-reverse.html)
- [util/slice](https://openhome.cc/eGossip/OpenSCAD/lib2-slice.html)
- [util/sort](https://openhome.cc/eGossip/OpenSCAD/lib2-sort.html)
# v1.3.3
- Bugfixes
- `in_shape`: Wrong variable name.
# v1.3.2
- All-in-one source file.
- You can use `include <dotSCAD.scad>;` or `use <dotSCAD.scad>;` if you really don't want to care about dependencies.
- Bugfixes
- `along_with`: Wrong variable scope.
# v1.3.1
- Bugfixes
- `in_polyline`: Wrong parameter name.
- `in_shape`: Missing dependency.
- `along_with`: Avoid warning when using 2D points.
# v1.3
- New modules:
- [bend_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-bend_extrude.html)
- [voronoi2d](https://openhome.cc/eGossip/OpenSCAD/lib-voronoi2d.html)
- [voronoi3d](https://openhome.cc/eGossip/OpenSCAD/lib-voronoi3d.html)
- New functions:
- [in_shape](https://openhome.cc/eGossip/OpenSCAD/lib-in_shape.html)
- [in_polyline](https://openhome.cc/eGossip/OpenSCAD/lib-in_polyline.html)
- [midpt_smooth](https://openhome.cc/eGossip/OpenSCAD/lib-midpt_smooth.html)
- [trim_shape](https://openhome.cc/eGossip/OpenSCAD/lib-trim_shape.html)
- [triangulate](https://openhome.cc/eGossip/OpenSCAD/lib-triangulate.html)
- New parameters:
- `distance` of [shape_taiwan](https://openhome.cc/eGossip/OpenSCAD/lib-shape_taiwan.html)
- `epsilon` of [bijection_offset](https://openhome.cc/eGossip/OpenSCAD/lib-bijection_offset.html)
- `method` of [path_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-path_extrude.html)
- `method` of [along_with](https://openhome.cc/eGossip/OpenSCAD/lib-along_with.html)
# v1.2
- New modules and functions:
- [starburst](https://openhome.cc/eGossip/OpenSCAD/lib-starburst.html)
- [torus_knot](https://openhome.cc/eGossip/OpenSCAD/lib-torus_knot.html)
- [bijection_offset](https://openhome.cc/eGossip/OpenSCAD/lib-bijection_offset.html)
- [path_scaling_sections](https://openhome.cc/eGossip/OpenSCAD/lib-path_scaling_sections.html)
- Others
- Avoid warnings when using newer versions of OpenSCAD after 2015.03.
# v1.1.1
- Bugfixes
- `m_rotation` returns an identity matrix if `a` is 0.
- The `path_pts` parameter of `path_extrude` accepts two or three points.
- The `points` parameter of `along_with` accepts two or three points.
- Others
- OpenSCAD has built-in matrix multiplication so `m_multiply` is not necessary.
# v1.1
- New matrix functions:
- [m_multiply](https://openhome.cc/eGossip/OpenSCAD/lib-m_multiply.html)
- [m_cumulate](https://openhome.cc/eGossip/OpenSCAD/lib-m_cumulate.html)
- [m_translation](https://openhome.cc/eGossip/OpenSCAD/lib-m_translation.html)
- [m_rotation](https://openhome.cc/eGossip/OpenSCAD/lib-m_rotation.html)
- [m_scaling](https://openhome.cc/eGossip/OpenSCAD/lib-m_scaling.html)
- [m_mirror](https://openhome.cc/eGossip/OpenSCAD/lib-m_mirror.html)
- [m_shearing](https://openhome.cc/eGossip/OpenSCAD/lib-m_shearing.html)
- New modules:
- [shear](https://openhome.cc/eGossip/OpenSCAD/lib-shear.html)
- New Parameters:
- added `v` parameter to [rotate_p](https://openhome.cc/eGossip/OpenSCAD/lib-rotate_p.html)
- Improved Performance:
- [path_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-path_extrude.html)
- [align_with](https://openhome.cc/eGossip/OpenSCAD/lib-along_with.html)
# v1.0.1
- Fixed `path_extrude` crossing problem. See [issue 3](https://github.com/JustinSDK/dotSCAD/issues/3).
- Fixed `along_with` crossing problems (similar to `path_extrude`.)

BIN
TaiwaneseBlackBear.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
WhirlingTaiwan.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

114
all/dotSCAD.scad Normal file
View File

@@ -0,0 +1,114 @@
include <along_with.scad>;
include <arc.scad>;
include <arc_path.scad>;
include <archimedean_spiral.scad>;
include <archimedean_spiral_extrude.scad>;
include <bend.scad>;
include <bend_extrude.scad>;
include <bezier_curve.scad>;
include <bezier_smooth.scad>;
include <bezier_surface.scad>;
include <bijection_offset.scad>;
include <box_extrude.scad>;
include <circle_path.scad>;
include <cross_sections.scad>;
include <crystal_ball.scad>;
include <ellipse_extrude.scad>;
include <function_grapher.scad>;
include <golden_spiral.scad>;
include <golden_spiral_extrude.scad>;
include <helix.scad>;
include <helix_extrude.scad>;
include <hexagons.scad>;
include <hollow_out.scad>;
include <hull_polyline2d.scad>;
include <hull_polyline3d.scad>;
include <in_polyline.scad>;
include <in_shape.scad>;
include <line2d.scad>;
include <line3d.scad>;
<<<<<<< HEAD
include <log.scad>;
include <m_cumulate.scad>;
include <m_mirror.scad>;
include <m_rotation.scad>;
include <m_scaling.scad>;
include <m_shearing.scad>;
include <m_translation.scad>;
include <midpt_smooth.scad>;
include <multi_line_text.scad>;
include <parse_number.scad>;
=======
include <midpt_smooth.scad>;
include <multi_line_text.scad>;
>>>>>>> v2
include <path_extrude.scad>;
include <path_scaling_sections.scad>;
include <paths2sections.scad>;
include <pie.scad>;
include <polyline2d.scad>;
include <polyline3d.scad>;
include <polysections.scad>;
include <polytransversals.scad>;
include <ring_extrude.scad>;
include <rotate_p.scad>;
include <rounded_cube.scad>;
include <rounded_cylinder.scad>;
include <rounded_extrude.scad>;
include <rounded_square.scad>;
include <shape_arc.scad>;
include <shape_cyclicpolygon.scad>;
include <shape_ellipse.scad>;
include <shape_glued2circles.scad>;
include <shape_path_extend.scad>;
include <shape_pentagram.scad>;
include <shape_pie.scad>;
include <shape_square.scad>;
include <shape_starburst.scad>;
include <shape_superformula.scad>;
include <shape_taiwan.scad>;
include <shape_trapezium.scad>;
include <shear.scad>;
include <sphere_spiral.scad>;
include <sphere_spiral_extrude.scad>;
<<<<<<< HEAD
include <split_str.scad>;
include <starburst.scad>;
include <stereographic_extrude.scad>;
include <sub_str.scad>;
include <torus_knot.scad>;
include <triangulate.scad>;
include <trim_shape.scad>;
include <turtle2d.scad>;
include <turtle3d.scad>;
include <voronoi2d.scad>;
include <voronoi3d.scad>;
=======
include <starburst.scad>;
include <stereographic_extrude.scad>;
include <torus_knot.scad>;
include <triangulate.scad>;
include <trim_shape.scad>;
include <voronoi2d.scad>;
include <voronoi3d.scad>;
include <util/parse_number.scad>;
include <util/split_str.scad>;
include <util/sub_str.scad>;
include <util/reverse.scad>;
include <util/slice.scad>;
include <util/sort.scad>;
include <matrix/m_cumulate.scad>;
include <matrix/m_mirror.scad>;
include <matrix/m_rotation.scad>;
include <matrix/m_scaling.scad>;
include <matrix/m_shearing.scad>;
include <matrix/m_translation.scad>;
include <turtle/turtle2d.scad>;
include <turtle/turtle3d.scad>;
include <pixel/px_line.scad>;
include <pixel/px_polyline.scad>;
include <pixel/px_circle.scad>;
include <pixel/px_cylinder.scad>;
include <pixel/px_sphere.scad>;
include <pixel/px_polygon.scad>;
>>>>>>> v2

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
docs/images/lib-shear-1.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -5,9 +5,10 @@ Puts children along the given path. If there's only one child, it will put the c
## Parameters
- `points` : The points along the path.
- `angles` : Rotate before translate each child. If not given, rotate children automatically according to `points`.
- `angles` : Rotate before translate each child. If not given, rotate children automatically according to `points` and `method`.
- `twist` : If given, each child will be twisted before applying each element of `points` and `angles`.
- `scale` : If given, each child will be scaled before applying each element of `points` and `angles`. It accepts a single value, `[sx, sy]` or `[sx, sy, sz]`.
- `method` : Which method does `along_with` take to **guess** how to rotate children if `angles` is not specified? It accepts two value, `"AXIS_ANGLE"` (default) and `"EULER_ANGLE"`. See `path_extrude` for more information. **Since:** 1.3.
## Examples
@@ -19,7 +20,7 @@ Puts children along the given path. If there's only one child, it will put the c
points = circle_path(radius = 50);
along_with(points)
sphere(5, center = true);
sphere(5);
![along_with](images/lib-along_with-1.JPG)

View File

@@ -6,6 +6,7 @@ Creates an arc. You can pass a 2 element vector to define the central angle. Its
- `radius` : The radius of the circle.
- `angle` : A single value or a 2 element vector which defines the central angle. The first element of the vector is the beginning angle in degrees, and the second element is the ending angle.
- `width` : The width of the arc.
- `width_mode` : The default value is `"LINE_CROSS"`. The arc line will move outward by `width / 2` and inward by `width / 2`. If it's `"LINE_OUTWARD"`, The arc line moves outward by `width`. The `"LINE_INWARD"` moves the arc line inward by `width`.
- `$fa`, `$fs`, `$fn` : Check [the circle module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#circle) for more details.

View File

@@ -15,8 +15,8 @@ Creates an arc path. You can pass a 2 element vector to define the central angle
include <hull_polyline2d.scad>;
$fn = 24;
points = arc_path(radius = 20, angle = [45, 290], width = 2);
hull_polyline2d(points);
points = arc_path(radius = 20, angle = [45, 290]);
hull_polyline2d(points, width = 2);
![arc_path](images/lib-arc_path-1.JPG)
@@ -24,8 +24,8 @@ Creates an arc path. You can pass a 2 element vector to define the central angle
include <hull_polyline2d.scad>;
$fn = 24;
points = arc_path(radius = 20, angle = 135, width = 2);
hull_polyline2d(points);
points = arc_path(radius = 20, angle = 135);
hull_polyline2d(points, width = 2);
![arc_path](images/lib-arc_path-2.JPG)

View File

@@ -4,8 +4,6 @@ Extrudes a 2D shape along the path of an archimedean spiral.
When using this module, you should use points to represent the 2D shape. If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details.
Dependencies: `rotate_p`, `archimedean_spiral`, `cross_sections`, `polysections`.
## Parameters
- `shape_pts` : A list of points represent a shape. See the example below.

View File

@@ -52,6 +52,4 @@ The arc shape is smoother if the `frags` value is larger.
![bend](images/lib-bend-3.JPG)
This module is especially useful when you want to create things such as [zentangle bracelet](https://www.thingiverse.com/thing:1569263).
[![zentangle bracelet](http://thingiverse-production-new.s3.amazonaws.com/renders/eb/93/4f/62/1f/3bd1f628e1e566dcb5313035e4f3345b_preview_featured.JPG)](https://www.thingiverse.com/thing:1569263)
This module is especially useful when you want to create things such as [PNG to pen holder](https://www.thingiverse.com/thing:1589493).

36
docs/lib-bend_extrude.md Normal file
View File

@@ -0,0 +1,36 @@
# bend_extrude
The purpose of `bend_extrude` is to replace `bend` when you have a 2D shape. `bend_extrude` is faster and doesn't produce jagged edges.
**Since:** 1.3.
## Parameters
- `size` : The size of a square which can contain the target shape.
- `thickness` : The thinkness used to extrude the shape.
- `angle` : The central angle of the arc shape. The radius of the arc is calculated automatically.
- `frags` : Number of fragments. The target shape will be cut into `frags` fragments and recombined into an arc object. The default value is 24.
## Examples
The containing square of the target shape should be laid down on the x-y plane. For example.
x = 9.25;
y = 9.55;
%square(size = [x, y]);
text("A");
![bend_extrude](images/lib-bend_extrude-1.JPG)
Once you have the size of the containing square, you can use it as the `size` argument of the `bend_extrude` module.
include <bend_extrude.scad>;
x = 9.25;
y = 9.55;
bend_extrude(size = [x, y], thickness = 1, angle = 270)
text("A");
![bend_extrude](images/lib-bend_extrude-2.JPG)

View File

@@ -2,8 +2,6 @@
Given a path, the `bezier_smooth` function uses bazier curves to smooth all corners. You can use it to create smooth lines or rounded shapes.
Dependencies: the `bezier_curve` function.
## Parameters
- `path_pts` : A list of points represent the path.

View File

@@ -2,8 +2,6 @@
Given a set of control points, the `bezier_surface` function returns points of the Bézier surface. Combined with the `function_grapher` module defined in my library, you can create a Bézier surface.
It depends on the `bezier_curve` function so remember to include bezier_curve.scad.
## Parameters
- `t_step` : The distance between two points of the Bézier path.

View File

@@ -0,0 +1,68 @@
# bijection_offset
Move 2D outlines outward or inward by a given amount. Each point of the offsetted shape is paired with exactly one point of the original shape.
**Since:** 1.2.
## Parameters
- `pts` : Points of a shape.
- `d` : Amount to offset the shape. When negative, the shape is offset inwards.
- `epsilon` : An upper bound on the relative error due to rounding in floating point arithmetic. Default to 0.0001. **Since:** 1.3.
## Examples
include <bijection_offset.scad>;
shape = [
[15, 0],
[15, 30],
[0, 20],
[-15, 40],
[-15, 0]
];
color("red") polygon(bijection_offset(shape, 3));
color("orange") polygon(bijection_offset(shape, 2));
color("yellow") polygon(bijection_offset(shape, 1));
color("green") polygon(shape);
color("blue") polygon(bijection_offset(shape, -1));
color("indigo") polygon(bijection_offset(shape, -2));
color("purple") polygon(bijection_offset(shape, -3));
![bijection_offset](images/lib-bijection_offset-1.JPG)
include <bijection_offset.scad>;
include <rotate_p.scad>;
include <polysections.scad>;
include <path_extrude.scad>;
include <bezier_curve.scad>;
shape = [
[5, 0],
[3, 9],
[0, 10],
[-5, 0]
];
offsetted = bijection_offset(shape, 1);
offsetted2 = bijection_offset(shape, 2);
offsetted3 = bijection_offset(shape, 3);
t_step = 0.05;
p0 = [0, 0, 0];
p1 = [40, 60, 35];
p2 = [-50, 70, 0];
p3 = [20, 150, -35];
p4 = [30, 50, -3];
path_pts = bezier_curve(t_step,
[p0, p1, p2, p3, p4]
);
path_extrude(concat(offsetted, shape), path_pts, "HOLLOW");
path_extrude(concat(offsetted3, offsetted2), path_pts, "HOLLOW");
![bijection_offset](images/lib-bijection_offset-2.JPG)

View File

@@ -2,8 +2,6 @@
Given a 2D shape, points and angles along the path, this function will return all cross-sections. Combined with the `polysections` module, you can create a specific path extrusion.
It depends on the `rotate_p` function. Remember to include "rotate_p.scad".
## Parameters
- `shape_pts`: A list of points represent a shape. See the example below.

View File

@@ -4,8 +4,6 @@ Uses spherical coordinate system to create a crystal ball.
![Spherical coordinates (r, θ, φ) often used in mathematics](https://upload.wikimedia.org/wikipedia/commons/d/dc/3D_Spherical_2.svg)
Dependencies: `rotate_p`, `cross_sections`, `polysections`, `ring_extrude`, `shape_pie`.
## Parameters
- `radius` : The radial distance r.

View File

@@ -2,8 +2,6 @@
Given a set of points `[x, y, f(x, y)]` where `f(x, y)` is a mathematics function, the `function_grapher` module can create the graph of `f(x, y)`.
It depends on the `line3d`, `polyline3d`, `hull_polyline3d` modules so you have to include "line3d.scad", "polyline3d.scad" and "hull_polyline3d.scad".
## Parameters
- `points` : A set of points `[x, y, f(x, y)]`. See examples below.

View File

@@ -4,8 +4,6 @@ Gets all points and angles on the path of a golden spiral based on Fibonacci num
It returns a vector of `[[x, y], angle]`.
Because of depending on `circle_path` and `rotate_p`, remember to include "circle_path.scad" and "rotate_p.scad".
## Parameters
- `from` : The nth Fibonacci number you wanna start from.

View File

@@ -4,8 +4,6 @@ Extrudes a 2D shape along the path of a golden spiral.
When using this module, you should use points to represent the 2D shape. If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details.
Dependencies: `circle_path`, `rotate_p`, `golden_spiral`, `cross_sections`, `polysections`.
## Parameters
- `shape_pts` : A list of points represent a shape. See the example below.

View File

@@ -6,8 +6,6 @@ When using this module, you should use points to represent the 2D shape. If your
Its `$fa`, `$fs` and `$fn` parameters are consistent with the `cylinder` module.
Dependencies: `helix`, `rotate_p`, `cross_sections`, `polysections`.
## Parameters
- `shape_pts` : A list of points represent a shape. See the example below.

41
docs/lib-in_polyline.md Normal file
View File

@@ -0,0 +1,41 @@
# in_polyline
Checks wether a point is on a line.
**Since:** 1.3
## Parameters
- `line_pts` : The line points.
- `pt` : The point to be checked.
- `epsilon` : An upper bound on the relative error due to rounding in floating point arithmetic. Default to 0.0001.
## Examples
include <in_polyline.scad>;
pts = [
[0, 0],
[10, 0],
[10, 10]
];
echo(in_polyline(pts, [-2, -3])); // false
echo(in_polyline(pts, [5, 0])); // true
echo(in_polyline(pts, [10, 5])); // true
echo(in_polyline(pts, [10, 15])); // false
----
include <in_polyline.scad>;
pts = [
[10, 0, 10],
[20, 0, 10],
[20, 10, 10]
];
echo(in_polyline(pts, [10, 0, 10])); // true
echo(in_polyline(pts, [15, 0, 10])); // true
echo(in_polyline(pts, [15, 1, 10])); // false
echo(in_polyline(pts, [20, 11, 10])); // false

39
docs/lib-in_shape.md Normal file
View File

@@ -0,0 +1,39 @@
# in_shape
Checks wether a point is inside a shape.
**Since:** 1.3
## Parameters
- `shapt_pts` : The shape points.
- `pt` : The point to be checked.
- `include_edge` : If a point is on the edge of the shape, the function is default to return `false`. If `include_edge` is `true`, the function returns `true`.
- `epsilon` : An upper bound on the relative error due to rounding in floating point arithmetic. Default to 0.0001.
## Examples
include <shape_taiwan.scad>;
include <in_shape.scad>;
points = shape_taiwan(30);
%polygon(points);
n = 200;
xs = rands(-9, 9, n);
ys = rands(-16, 16, n);
pts = [
for(i = [0:n - 1])
let(p = [xs[i], ys[i]])
if(in_shape(points, p, true))
p
];
for(p = pts) {
translate(p)
circle(.2);
}
![in_shape](images/lib-in_shape-1.JPG)

View File

@@ -1,46 +0,0 @@
# log
A log module which supports simple level configurations and color titles.
## Parameters
- `$log_level` : The accepted values are `"OFF"` (-1), `"INFO"` (20),
`"WARNING"` (30), `"ERROR"` (40) or positive integers. The default value is `"INFO"`.
- `level` : The accepted values are `"OFF"` (-1), `"INFO"` (20),
`"WARNING"` (30), `"ERROR"` (40) or positive integers. If the value is greater or equal to `$log_level`, the `echo` message will display in the console.
- `level_color` : Controls the color of level title. It accepts the same values as the CSS `color` property.
## Examples
include <log.scad>;
log()
echo(" INFO message");
log("WARNING")
echo(" WARNING message");
log("ERROR") {
echo(" ERROR message 1");
echo(" ERROR message 2");
}
![log](images/lib-log-1.JPG)
include <log.scad>;
$log_level = "WARNING";
log()
echo(" INFO message");
log("WARNING", "purple")
echo(" WARNING message");
log("ERROR", "rgb(255, 100, 100)") {
echo(" ERROR message 1");
echo(" ERROR message 2");
}
![log](images/lib-log-2.JPG)

23
docs/lib-m_mirror.md Normal file
View File

@@ -0,0 +1,23 @@
# m_mirror
Generate a 4x4 transformation matrix which can pass into `multmatrix` to mirror the child element on a plane through the origin.
**Since:** 1.1
## Parameters
- `v` : The normal vector of a plane intersecting the origin through which to mirror the object.
## Examples
include <m_mirror.scad>;
rotate([0, 0, 10])
cube([3, 2, 1]);
multmatrix(m_mirror([1, 1, 0]))
rotate([0, 0, 10])
cube([3, 2, 1]);
![m_mirror](images/lib-m_mirror-1.JPG)

26
docs/lib-midpt_smooth.md Normal file
View File

@@ -0,0 +1,26 @@
# midpt_smooth
Given a 2D path, this function constructs a mid-point smoothed version by joining the mid-points of the lines of the path.
**Since:** 1.3
## Parameters
- `points` : The path points.
- `n` : Perform mid-point smoothing n times.
- `closed` : Is the points a 2D shape? If it's `true`, the function takes the last point and the first one to calculate a middle point. Default to `false`.
## Examples
include <hull_polyline2d.scad>;
include <shape_taiwan.scad>;
include <bijection_offset.scad>;
include <midpt_smooth.scad>;
taiwan = shape_taiwan(50);
smoothed = midpt_smooth(taiwan, 20, true);
translate([0, 0, 0]) hull_polyline2d(taiwan, .25);
#translate([10, 0, 0]) hull_polyline2d(smoothed, .25);
![midpt_smooth](images/lib-midpt_smooth-1.JPG)

View File

@@ -1,16 +0,0 @@
# parse_number
Parses the string argument as an number. It depends on the `split_str` and the `sub_str` functions so remember to include split_str.scad and sub_str.scad.
## Parameters
- `t` : A string containing the number representation to be parsed.
## Examples
include <sub_str.scad>;
include <split_str.scad>;
include <parse_number.scad>;
echo(parse_number("10") + 1); // ECHO: 11
echo(parse_number("-1.1") + 1); // ECHO: -0.1

View File

@@ -2,8 +2,6 @@
It extrudes a 2D shape along a path. This module is suitable for a path created by a continuous function.
It depends on the `rotate_p` function and the `polysections` module. Remember to include "rotate_p.scad" and "polysections.scad".
When using this module, you should use points to represent the 2D shape. If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details.
## Parameters
@@ -13,7 +11,8 @@ When using this module, you should use points to represent the 2D shape. If your
- `triangles` : `"SOLID"` (default), `"HOLLOW"` or user-defined indexes. See example below.
- `twist` : The number of degrees of through which the shape is extruded.
- `scale` : Scales the 2D shape by this value over the length of the extrusion. Scale can be a scalar or a vector.
- `closed` : If the first point and the last point of `path_pts` has the same coordinate, setting `closed` to `true` will connect them automatically.
- `closed` : If the first point and the last point of `path_pts` has the same coordinate, setting `closed` to `true` will connect them automatically.
- `method` : Which method does `path_extrude` take to **guess** how to generate sections? It accepts two value, `"AXIS_ANGLE"` (default) and `"EULER_ANGLE"`. **Since:** 1.3.
## Examples
@@ -123,6 +122,186 @@ When using this module, you should use points to represent the 2D shape. If your
![path_extrude](images/lib-path_extrude-3.JPG)
## About `path_extrude` (Important!!)
**`path_extrude` is actually a workaround when you have/provide only path points.**
If you want to extrude a shape along a path precisely, providing enough information about how to rotate sections is necessary. If you want to extrude a shape along a helix, `helix_extrude` is more suitable because it knows how to dig out necessary data for rotating sections precisely.
include <helix.scad>;
include <rotate_p.scad>;
include <cross_sections.scad>;
include <polysections.scad>;
include <helix_extrude.scad>;
shape_pts = [
[0,0],
[3, 1],
[0, 2]
];
helix_extrude(shape_pts,
radius = 5,
levels = 5,
level_dist = 3,
vt_dir = "SPI_UP"
);
![path_extrude](images/lib-path_extrude-4.JPG)
If you have only points, what `path_extrude` can do is to **guess** data about rotations. The different algorithm will dig out different data. For example:
include <helix.scad>;
include <rotate_p.scad>;
include <polysections.scad>;
include <helix.scad>;
include <path_extrude.scad>;
shape_pts = [
[0,0],
[3, 1],
[0, 2]
];
points = helix(
radius = 5,
levels = 5,
level_dist = 3,
vt_dir = "SPI_UP"
);
path_extrude(shape_pts, points);
![path_extrude](images/lib-path_extrude-5.JPG)
You might think this is wrong. Actually, it's not. It's the correct/default behavior of `path_extrude`. Because **you don't provide other information**, what `path_extrude` can do is to **guess** how to generate sections from points. You think it's a bug in `path_extrude` because your brain has information that path points do not provide.
The `method` parameter is default to `"AXIS_ANGLE"`, a way to guess information from points. It accepts `"EULER_ANGLE"`, too.
include <rotate_p.scad>;
include <polysections.scad>;
include <helix.scad>;
include <path_extrude.scad>;
shape_pts = [
[0,0],
[3, 1],
[0, 2]
];
points = helix(
radius = 5,
levels = 5,
level_dist = 3,
vt_dir = "SPI_UP"
);
path_extrude(shape_pts, points, method = "EULER_ANGLE");
![path_extrude](images/lib-path_extrude-6.JPG)
`"EULER_ANGLE"` generates the same section at the same point. You might think the model is correct. But, that's because what it guesses from points just match your expectation.
`"EULER_ANGLE"` will generate an abrupt when the path is exactly vertical. [The problem happened in (older) Blender, too.](https://download.blender.org/documentation/htmlI/ch09s04.html)
include <rotate_p.scad>;
include <polysections.scad>;
include <path_extrude.scad>;
shape_pts = [[5, -5], [5, 5], [-5, 5], [-5, -5]];
path_pts = [
[20, 20, 0],
[18.2, 18.2, 2],
[16.8, 16.8, 4],
[15.8, 15.8, 6],
[15.2, 15.2, 8],
[15, 15, 10],
[15.2, 15.2, 12],
[15.8, 15.8, 14],
[16.8, 16.8, 16],
[18.2, 18.2, 18],
[20, 20, 20]
];
path_extrude(shape_pts, path_pts, method = "EULER_ANGLE");
![path_extrude](images/lib-path_extrude-7.JPG)
The problem doesn't happen when `method` is `"AXIS_ANGLE"`.
include <rotate_p.scad>;
include <polysections.scad>;
include <path_extrude.scad>;
shape_pts = [[5, -5], [5, 5], [-5, 5], [-5, -5]];
path_pts = [
[20, 20, 0],
[18.2, 18.2, 2],
[16.8, 16.8, 4],
[15.8, 15.8, 6],
[15.2, 15.2, 8],
[15, 15, 10],
[15.2, 15.2, 12],
[15.8, 15.8, 14],
[16.8, 16.8, 16],
[18.2, 18.2, 18],
[20, 20, 20]
];
path_extrude(shape_pts, path_pts, method = "AXIS_ANGLE");
![path_extrude](images/lib-path_extrude-8.JPG)
So, which is the correct method? Both methods are correct when you provide only points. `method` is just a way you tell `path_extrude` how to guess more information when extruding.
`"EULER_ANGLE"` will generate an abrupt when the path is exactly vertical. Some users might think it's a bug so `"AXIS_ANGLE"` is the default value.
`"EULER_ANGLE"`, however, generates the same section at the same point. This means that you don't have to adjust sections if you want to extrude along a closed path. It's an advantage when extruding. For example:
include <shape_pentagram.scad>;
include <rotate_p.scad>;
include <polysections.scad>;
include <path_extrude.scad>;
include <torus_knot.scad>;
p = 2;
q = 3;
phi_step = 0.05;
star_radius = 0.5;
pts = torus_knot(p, q, phi_step);
shape_pentagram_pts = shape_pentagram(star_radius);
// not closed perfectly
translate([-8, 0, 0]) path_extrude(
shape_pentagram_pts,
concat(pts, [pts[0]]),
closed = true,
method = "AXIS_ANGLE"
);
// adjust it
path_extrude(
shape_pentagram_pts,
concat(pts, [pts[0]]),
closed = true,
twist = 188,
method = "AXIS_ANGLE"
);
// "EULER_ANGLE" is easy in this situation
translate([0, 8, 0]) path_extrude(
shape_pentagram_pts,
concat(pts, [pts[0]]),
closed = true,
method = "EULER_ANGLE"
);
![path_extrude](images/lib-path_extrude-9.JPG)
Both methods are useful. If `"AXIS_ANGLE"` doesn't guess out what you want, choose `"EULER_ANGLE"`, and vice versa.
For more information, see [#issue 3](https://github.com/JustinSDK/dotSCAD/issues/3) and [#issue 5](https://github.com/JustinSDK/dotSCAD/issues/5).

View File

@@ -1,6 +1,6 @@
# polyline2d
Creates a polyline from a list of `x`, `y` coordinates. When the end points are `CAP_ROUND`, you can use `$fa`, `$fs` or `$fn` to controll the circle module used internally. It depends on the `line2d` module so you have to `include` line2d.scad.
Creates a polyline from a list of `x`, `y` coordinates. When the end points are `CAP_ROUND`, you can use `$fa`, `$fs` or `$fn` to controll the circle module used internally.
## Parameters

View File

@@ -1,6 +1,6 @@
# polyline3d
Creates a polyline from a list of `[x, y, z]` coordinates. It depends on the `line3d` module so you have to `include` line3d.scad.
Creates a polyline from a list of `[x, y, z]` coordinates.
## Parameters

View File

@@ -4,8 +4,6 @@ Rotational extrusion spins a 2D shape around the Z-axis. It's similar to the bui
Because we cannot retrieve the shape points of built-in 2D modules, it's necessary to provide `shapt_pts` and `triangles`.
This module depends on `rotate_p`, `cross_section` and `polysections`. Remember to include corresponding ".scad".
If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details.
## Parameters

View File

@@ -1,11 +1,12 @@
# rotate_p
Rotates a point `a` degrees around an arbitrary axis. It behaves as the built-in `rotate` module
Rotates a point `a` degrees about the axis of the coordinate system or around an arbitrary axis. It behaves as the built-in `rotate` module
## Parameters
- `point` : A 3D point `[x, y, z]` or a 2D point `[x, y]`.
- `a` : If it's `[deg_x, deg_y, deg_z]`, the rotation is applied in the order `x`, `y`, `z`. If it's `[deg_x, deg_y]`, the rotation is applied in the order `x`, `y`. If it's`[deg_x]`, the rotation is only applied to the `x` axis. If it's an number, the rotation is only applied to the `z` axis.
- `a` : If it's `[deg_x, deg_y, deg_z]`, the rotation is applied in the order `x`, `y`, `z`. If it's `[deg_x, deg_y]`, the rotation is applied in the order `x`, `y`. If it's`[deg_x]`, the rotation is only applied to the `x` axis. If it's an number, the rotation is only applied to the `z` axis or an arbitrary axis.
- `v`: A vector allows you to set an arbitrary axis about which the object will be rotated. When `a` is an array, the `v` argument is ignored. **Since:** 1.1.
## Examples
@@ -60,4 +61,22 @@ The `rotate_p` function is useful in some situations. For example, you probably
%sphere(radius);
![rotate_p](images/lib-rotate_p-2.JPG)
![rotate_p](images/lib-rotate_p-2.JPG)
include <rotate_p.scad>;
v = [10, 10, 10];
hull() {
sphere(1);
translate(v)
sphere(1);
}
p = [10, 10, 0];
for(i = [0:20:340]) {
translate(rotate_p(p, a = i, v = v))
sphere(1);
}
![rotate_p](images/lib-rotate_p-3.JPG)

View File

@@ -6,6 +6,7 @@ Returns shape points of a regular cyclic polygon. They can be used with xxx_extr
- `sides` : The radius of the circle.
- `circle_r` : The radius of the circumcircle.
- `corner_r` : The radius of the circle at a corner.
- `$fa`, `$fs`, `$fn` : Check [the circle module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#circle) for more details.
## Examples

View File

@@ -2,8 +2,6 @@
Returns shape points of two glued circles. They can be used with xxx_extrude modules of dotSCAD. The shape points can be also used with the built-in polygon module.
Dependencies: `rotate_p`, `bezier_curve`, `shape_pie`.
## Parameters
- `radius` : The radius of two circles.

View File

@@ -4,8 +4,6 @@ It extends a 2D stroke along a path to create a 2D shape. This module is suitabl
When using this function, you should use points to represent the 2D stroke.
It depends on the `rotate_p` function. Remember to include "rotate_p.scad".
## Parameters
- `stroke_pts` : A list of points represent a stroke. See the example below.

View File

@@ -6,7 +6,7 @@ Returns shape points of a star. They can be used with xxx_extrude modules of dot
- `r1` : The outer radius of the starburst.
- `r2` : The inner radius of the starburst.
- `n` : The number of vertices.
- `n` : The burst number.
## Examples

View File

@@ -5,6 +5,7 @@ Returns shape points of [Taiwan](https://www.google.com.tw/maps?q=taiwan&um=1&ie
## Parameters
- `h` : The height of Taiwan.
- `distance` : Used for simplifying the shape. If the distance between a point and its previous points is not greater than `distance`, the point will be kept. Default to 0. **Since:** 1.3.
## Examples

52
docs/lib-shear.md Normal file
View File

@@ -0,0 +1,52 @@
# shear
Shear all child elements along the X-axis, Y-axis, or Z-axis in 3D.
**Since:** 1.1
## Parameters
- `sx` : An array `[SHy, SHz]`. The new coordinates of child elements are `(x + SHy * y + SHz * z, y, z)`.
- `sy` : An array `[SHx, SHz]`. The new coordinates of child elements are `(x, y + SHx * x + SHz * z, z)`.
- `sz` : An array `[SHx, SHy]`. The new coordinates of child elements are `(x, y, z + SHx * x + SHy * y)`.
## Examples
include <shear.scad>;
color("red") {
shear(sx = [1, 0])
cube(1);
translate([2, 0, 0]) shear(sx = [0, 1])
cube(1);
translate([4, 0, 0]) shear(sx = [1, 1])
cube(1);
}
translate([0, -3, 0]) color("green") {
shear(sy = [1, 0])
cube(1);
translate([2, 0, 0]) shear(sy = [0, 1])
cube(1);
translate([4, 0, 0]) shear(sy = [1, 1])
cube(1);
}
translate([0, -5, 0]) color("blue") {
shear(sz = [1, 0])
cube(1);
translate([2, 0, 0]) shear(sz = [0, 1])
cube(1);
translate([4, 0, 0]) shear(sz = [1, 1])
cube(1);
}
![shear](images/lib-shear-1.JPG)

View File

@@ -1,6 +1,6 @@
# sphere_spiral
Creates all points and angles on the path of a spiral around a sphere. It returns a vector of `[[x, y, z], [ax, ay, az]]`. `[x, y, z]` is actually obtained from rotating `[radius, 0, 0]` by `[ax, ay, az]`. It depends on the `rotate_p` function. Remember to include rotate_p.scad first.
Creates all points and angles on the path of a spiral around a sphere. It returns a vector of `[[x, y, z], [ax, ay, az]]`. `[x, y, z]` is actually obtained from rotating `[radius, 0, 0]` by `[ax, ay, az]`.
## Parameters

View File

@@ -4,8 +4,6 @@ Extrudes a 2D shape along the path of a sphere spiral.
When using this module, you should use points to represent the 2D shape. If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details.
Dependencies: `rotate_p`, `sphere_spiral`, `cross_sections`, `polysections`.
## Parameters
- `shape_pts` : A list of points represent a shape. See the example below.

24
docs/lib-starburst.md Normal file
View File

@@ -0,0 +1,24 @@
# starburst
A 3D version of `shape_starburst`.
**Since:** 1.2.
## Parameters
- `r1` : The outer radius of the starburst.
- `r2` : The inner radius of the starburst.
- `n` : The number of vertices.
- `height` : The height of the starburst.
## Examples
include <starburst.scad>;
starburst(10, 5, 5, 5);
translate([20, 0, 0]) starburst(10, 5, 6, 5);
translate([40, 0, 0]) starburst(10, 5, 12, 10);
translate([60, 0, 0]) starburst(10, 5, 4, 3);
![starburst](images/lib-starburst-1.JPG)

40
docs/lib-torus_knot.md Normal file
View File

@@ -0,0 +1,40 @@
# torus_knot
Generate a path of [The (p,q)-torus knot](https://en.wikipedia.org/wiki/Torus_knot).
**Since:** 1.2.
![torus_knot](images/lib-torus_knot-1.JPG)
## Parameters
- `p` : The p parameter of The (p,q)-torus knot.
- `q` : The q parameter of The (p,q)-torus knot.
- `phi_step` : The amount when increasing phi.
## Examples
include <shape_pentagram.scad>;
include <rotate_p.scad>;
include <polysections.scad>;
include <path_extrude.scad>;
include <torus_knot.scad>;
p = 2;
q = 3;
phi_step = 0.05;
star_radius = 0.5;
pts = torus_knot(p, q, phi_step);
shape_pentagram_pts = shape_pentagram(star_radius);
path_extrude(
shape_pentagram_pts,
concat(pts, [pts[0]]),
closed = true,
method = "EULER_ANGLE"
);
![torus_knot](images/lib-torus_knot-2.JPG)

42
docs/lib-triangulate.md Normal file
View File

@@ -0,0 +1,42 @@
# triangulate
Given a 2D shape. This function performs a simple polygon triangulation algorithm and returns the indices of each triangle.
**Since:** 1.3.
## Parameters
- `shape_pts` : The shape points.
- `epsilon` : An upper bound on the relative error due to rounding in floating point arithmetic. Default to 0.0001.
## Examples
include <triangulate.scad>;
shape = [
[0, 0],
[10, 0],
[12, 5],
[5, 10],
[10, 15],
[0, 20],
[-5, 18],
[-18, 3],
[-4, 10]
];
tris = triangulate(shape);
difference() {
polygon(shape);
for(tri = tris) {
offset(-.2)
polygon([for(idx = tri) shape[idx]]);
}
}
![triangulate](images/lib-triangulate-1.JPG)

33
docs/lib-trim_shape.md Normal file
View File

@@ -0,0 +1,33 @@
# trim_shape
Given a tangled-edge shape. This function trims the shape to a non-tangled shape. It's intended to be a helper function after using `bijection_offset`.
**Since:** 1.3.
## Parameters
- `shape_pts` : The shape points.
- `from` : The index of the start point you want to trim.
- `to` : The index of the last point you want to trim.
- `epsilon` : An upper bound on the relative error due to rounding in floating point arithmetic. Default to 0.0001.
## Examples
include <hull_polyline2d.scad>;
include <trim_shape.scad>;
include <shape_taiwan.scad>;
include <bijection_offset.scad>;
include <midpt_smooth.scad>;
taiwan = shape_taiwan(50);
offseted = bijection_offset(taiwan, -2);
trimmed = trim_shape(offseted, 3, len(offseted) - 6);
smoothed = midpt_smooth(trimmed, 3);
#hull_polyline2d(taiwan, .1);
%translate([25, 0, 0])
hull_polyline2d(offseted, .2);
hull_polyline2d(smoothed, .1);
![trim_shape](images/lib-trim_shape-1.JPG)

47
docs/lib-voronoi2d.md Normal file
View File

@@ -0,0 +1,47 @@
# voronoi2d
Creats a [Voronoi diagram](https://en.wikipedia.org/wiki/Voronoi_diagram). The initial region for each cell is calculated automatically from the given points by the following code:
xs = [for(p = points) p[0]];
ys = [for(p = points) abs(p[1])];
region_size = max([(max(xs) - min(xs) / 2), (max(ys) - min(ys)) / 2]);
**Since:** 1.3.
## Parameters
- `points` : Points for each cell.
- `spacing` : Distance between cells. Default to 1.
- `r`, `delta`, `chamfer` : The outlines of each cell can be moved outward or inward. These parameters have the same effect as [`offset`](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#offset).
- `region_type` : The initial shape for each cell can be `"square"` or `"circle"`. Default to `"square"`.
## Examples
include <voronoi2d.scad>;
xs = rands(-20, 20, 50);
ys = rands(-20, 20, 50);
points = [for(i = [0:len(xs) - 1]) [xs[i], ys[i]]];
voronoi2d(points);
translate([60, 0, 0])
voronoi(points, region_type = "circle");
![voronoi2d](images/lib-voronoi2d-1.JPG)
include <voronoi2d.scad>;
include <hollow_out.scad>;
xs = rands(0, 40, 50);
ys = rands(0, 20, 50);
points = [for(i = [0:len(xs) - 1]) [xs[i], ys[i]]];
difference() {
square([40, 20]);
voronoi2d(points);
}
hollow_out(shell_thickness = 1) square([40, 20]);
![voronoi2d](images/lib-voronoi2d-2.JPG)

60
docs/lib-voronoi3d.md Normal file
View File

@@ -0,0 +1,60 @@
# voronoi3d
Creats a 3D version of [Voronoi diagram](https://en.wikipedia.org/wiki/Voronoi_diagram). The initial space for each cell is calculated automatically from the given points by the following code:
xs = [for(p = points) p[0]];
ys = [for(p = points) abs(p[1])];
zs = [for(p = points) abs(p[2])];
space_size = max([(max(xs) - min(xs) / 2), (max(ys) - min(ys)) / 2, (max(zs) - min(zs)) / 2]);
// cube([space_size, space_size * 2, space_size * 2]);
The preview or rendering of 3D Voronoi is slow. If you want to use this module, render and export the 3D Voronoi model first. Then, `import` the model to do what you want.
**Since:** 1.3.
## Parameters
- `points` : Points for each cell.
- `spacing` : Distance between cells. Default to 1.
## Examples
include <voronoi3d.scad>;
r = 30;
zas = rands(0, 359, 12);
yas = rands(0, 179, 12);
points = [
for(i = [0:len(zas) - 1])
[
r * cos(yas[i]) * cos(zas[i]),
r * cos(yas[i]) * sin(zas[i]),
r * sin(yas[i])
]
];
#for(pt = points) {
translate(pt) cube(1);
}
intersection() {
sphere(r);
voronoi3d(points);
}
![voronoi3d](images/lib-voronoi3d-1.JPG)
If you render, export and save the previous model as `voronoi3d.stl`, the following code will generate a Voronoi sphere.
r = 30;
thickness = 2;
difference() {
sphere(r);
scale(1.01) import("voronoi3d.stl");
sphere(r - thickness);
}
![voronoi3d](images/lib-voronoi3d-2.JPG)

32
docs/lib2-m_cumulate.md Normal file
View File

@@ -0,0 +1,32 @@
# m_cumulate
The power of using transformation matrice is that you can cumulate all transformations in a matrix. This function multipies all transformation matrice.
**Since:** 1.1
## Parameters
The dir changed since 2.0.
- `matrice` : A list of 4x4 transformation matrice.
## Examples
include <matrix/m_rotation.scad>;
include <matrix/m_scaling.scad>;
include <matrix/m_translation.scad>;
include <matrix/m_cumulate.scad>
m = m_cumulate([
m_translation([10, 20, 10]), m_scaling(2), m_rotation(60)]
);
multmatrix(m)
cube(1);
multmatrix(m)
sphere(1);
![m_cumulate](images/lib-m_cumulate-1.JPG)

25
docs/lib2-m_mirror.md Normal file
View File

@@ -0,0 +1,25 @@
# m_mirror
The dir changed since 2.0.
Generate a 4x4 transformation matrix which can pass into `multmatrix` to mirror the child element on a plane through the origin.
**Since:** 1.1
## Parameters
- `v` : The normal vector of a plane intersecting the origin through which to mirror the object.
## Examples
include <matrix/m_mirror.scad>;
rotate([0, 0, 10])
cube([3, 2, 1]);
multmatrix(m_mirror([1, 1, 0]))
rotate([0, 0, 10])
cube([3, 2, 1]);
![m_mirror](images/lib-m_mirror-1.JPG)

47
docs/lib2-m_rotation.md Normal file
View File

@@ -0,0 +1,47 @@
# m_rotation
The dir changed since 2.0.
Generate a 4x4 transformation matrix which can pass into `multmatrix` to rotate the child element about the axis of the coordinate system or around an arbitrary axis.
**Since:** 1.1
## Parameters
- `a` : If it's `[deg_x, deg_y, deg_z]`, the rotation is applied in the order `x`, `y`, `z`. If it's `[deg_x, deg_y]`, the rotation is applied in the order `x`, `y`. If it's`[deg_x]`, the rotation is only applied to the `x` axis. If it's an number, the rotation is only applied to the `z` axis or an arbitrary axis.
- `v`: A vector allows you to set an arbitrary axis about which the object will be rotated. When `a` is an array, the `v` argument is ignored.
## Examples
include <matrix/m_rotation.scad>;
point = [20, 0, 0];
a = [0, -45, 45];
hull() {
sphere(1);
multmatrix(m_rotation(a))
translate(point)
sphere(1);
}
![m_rotation](images/lib-m_rotation-1.JPG)
include <m_rotation.scad>;
v = [10, 10, 10];
hull() {
sphere(1);
translate(v)
sphere(1);
}
p = [10, 10, 0];
for(i = [0:20:340]) {
multmatrix(m_rotation(a = i, v = v))
translate(p)
sphere(1);
}
![m_rotation](images/lib-m_rotation-2.JPG)

23
docs/lib2-m_scaling.md Normal file
View File

@@ -0,0 +1,23 @@
# m_scaling
The dir changed since 2.0.
Generate a 4x4 transformation matrix which can pass into `multmatrix` to scale its child elements using the specified vector.
**Since:** 1.1
## Parameters
- `v` : Elements will be scaled using the vector.
## Examples
include <matrix/m_scaling.scad>;
cube(10);
translate([15, 0, 0])
multmatrix(m_scaling([0.5, 1, 2]))
cube(10);
![m_scaling](images/lib-m_scaling-1.JPG)

53
docs/lib2-m_shearing.md Normal file
View File

@@ -0,0 +1,53 @@
# m_shearing
The dir changed since 2.0.
Generate a 4x4 transformation matrix which can pass into `multmatrix` to shear all child elements along the X-axis, Y-axis, or Z-axis in 3D.
**Since:** 1.1
## Parameters
- `sx` : An array `[SHy, SHz]`. The new coordinates of child elements are `(x + SHy * y + SHz * z, y, z)`.
- `sy` : An array `[SHx, SHz]`. The new coordinates of child elements are `(x, y + SHx * x + SHz * z, z)`.
- `sz` : An array `[SHx, SHy]`. The new coordinates of child elements are `(x, y, z + SHx * x + SHy * y)`.
## Examples
include <matrix/m_shearing.scad>;
color("red") {
multmatrix(m_shearing(sx = [1, 0]))
cube(1);
translate([2, 0, 0]) multmatrix(m_shearing(sx = [0, 1]))
cube(1);
translate([4, 0, 0]) multmatrix(m_shearing(sx = [1, 1]))
cube(1);
}
translate([0, -3, 0]) color("green") {
multmatrix(m_shearing(sy = [1, 0]))
cube(1);
translate([2, 0, 0]) multmatrix(m_shearing(sy = [0, 1]))
cube(1);
translate([4, 0, 0]) multmatrix(m_shearing(sy = [1, 1]))
cube(1);
}
translate([0, -5, 0]) color("blue") {
multmatrix(m_shearing(sz = [1, 0]))
cube(1);
translate([2, 0, 0]) multmatrix(m_shearing(sz = [0, 1]))
cube(1);
translate([4, 0, 0]) multmatrix(m_shearing(sz = [1, 1]))
cube(1);
}
![m_shearing](images/lib-m_shearing-1.JPG)

View File

@@ -0,0 +1,22 @@
# m_translation
The dir changed since 2.0.
Generate a 4x4 transformation matrix which can pass into `multmatrix` to translates (moves) its child elements along the specified vector.
**Since:** 1.1
## Parameters
- `v` : Elements will be translated along the vector.
## Examples
include <matrix/m_translation.scad>;
cube(2, center = true);
multmatrix(m_translation([5, 0, 0]))
sphere(1);
![m_translation](images/lib-m_translation-1.JPG)

Some files were not shown because too many files have changed in this diff Show More