Place rectangles by their centers

This commit is contained in:
Bán Dénes 2021-12-18 19:51:26 +01:00
parent 73045e4754
commit 0ed29e7e1d
5 changed files with 105 additions and 106 deletions

View file

@ -1,86 +1,86 @@
solid csg.js
facet normal 0 0 -1
outer loop
vertex 0 5 0
vertex 5 5 0
vertex 5 0 0
vertex -2.5 2.5 0
vertex 2.5 2.5 0
vertex 2.5 -2.5 0
endloop
endfacet
facet normal 0 0 -1
outer loop
vertex 0 5 0
vertex 5 0 0
vertex 0 0 0
vertex -2.5 2.5 0
vertex 2.5 -2.5 0
vertex -2.5 -2.5 0
endloop
endfacet
facet normal 0 0 1
outer loop
vertex 0 5 5
vertex 0 0 5
vertex 5 0 5
vertex -2.5 2.5 5
vertex -2.5 -2.5 5
vertex 2.5 -2.5 5
endloop
endfacet
facet normal 0 0 1
outer loop
vertex 0 5 5
vertex 5 0 5
vertex 5 5 5
vertex -2.5 2.5 5
vertex 2.5 -2.5 5
vertex 2.5 2.5 5
endloop
endfacet
facet normal 0 -1 0
outer loop
vertex 5 0 0
vertex 5 0 5
vertex 0 0 5
vertex 2.5 -2.5 0
vertex 2.5 -2.5 5
vertex -2.5 -2.5 5
endloop
endfacet
facet normal 0 -1 0
outer loop
vertex 5 0 0
vertex 0 0 5
vertex 0 0 0
vertex 2.5 -2.5 0
vertex -2.5 -2.5 5
vertex -2.5 -2.5 0
endloop
endfacet
facet normal 1 0 0
outer loop
vertex 5 5 0
vertex 5 5 5
vertex 5 0 5
vertex 2.5 2.5 0
vertex 2.5 2.5 5
vertex 2.5 -2.5 5
endloop
endfacet
facet normal 1 0 0
outer loop
vertex 5 5 0
vertex 5 0 5
vertex 5 0 0
vertex 2.5 2.5 0
vertex 2.5 -2.5 5
vertex 2.5 -2.5 0
endloop
endfacet
facet normal 0 1 0
outer loop
vertex 5 5 5
vertex 5 5 0
vertex 0 5 0
vertex 2.5 2.5 5
vertex 2.5 2.5 0
vertex -2.5 2.5 0
endloop
endfacet
facet normal 0 1 0
outer loop
vertex 5 5 5
vertex 0 5 0
vertex 0 5 5
vertex 2.5 2.5 5
vertex -2.5 2.5 0
vertex -2.5 2.5 5
endloop
endfacet
facet normal -1 0 0
outer loop
vertex 0 5 5
vertex 0 5 0
vertex 0 0 0
vertex -2.5 2.5 5
vertex -2.5 2.5 0
vertex -2.5 -2.5 0
endloop
endfacet
facet normal -1 0 0
outer loop
vertex 0 5 5
vertex 0 0 0
vertex 0 0 5
vertex -2.5 2.5 5
vertex -2.5 -2.5 0
vertex -2.5 -2.5 5
endloop
endfacet
endsolid csg.js

View file

@ -241,193 +241,193 @@ LINE
8
0
10
31.0980762
27
20
-4.0980762
-5.1961524
11
36.2942286
32.1961524
21
-7.0980762
-8.1961524
0
LINE
8
0
10
36.2942286
32.1961524
20
-7.0980762
-8.1961524
11
39.2942286
35.1961524
21
-1.9019238
-3
0
LINE
8
0
10
39.2942286
35.1961524
20
-1.9019238
-3
11
34.0980762
30
21
1.0980762
0
0
LINE
8
0
10
34.0980762
30
20
1.0980762
0
11
31.0980762
27
21
-4.0980762
-5.1961524
0
LINE
8
0
10
31.0980762
27
20
14.9019238
13.8038476
11
36.2942286
32.1961524
21
11.9019238
10.8038476
0
LINE
8
0
10
36.2942286
32.1961524
20
11.9019238
10.8038476
11
39.2942286
35.1961524
21
17.0980762
16
0
LINE
8
0
10
39.2942286
35.1961524
20
17.0980762
16
11
34.0980762
30
21
20.0980762
19
0
LINE
8
0
10
34.0980762
30
20
20.0980762
19
11
31.0980762
27
21
14.9019238
13.8038476
0
LINE
8
0
10
-1.0980762
-2.1961524
20
-4.0980762
-8.1961524
11
4.0980762
3
21
-1.0980762
-5.1961524
0
LINE
8
0
10
4.0980762
3
20
-1.0980762
-5.1961524
11
1.0980762
0
21
4.0980762
0
0
LINE
8
0
10
1.0980762
0
20
4.0980762
0
11
-4.0980762
-5.1961524
21
1.0980762
-3
0
LINE
8
0
10
-4.0980762
-5.1961524
20
1.0980762
-3
11
-1.0980762
-2.1961524
21
-4.0980762
-8.1961524
0
LINE
8
0
10
-1.0980762
-2.1961524
20
14.9019238
10.8038476
11
4.0980762
3
21
17.9019238
13.8038476
0
LINE
8
0
10
4.0980762
3
20
17.9019238
13.8038476
11
1.0980762
0
21
23.0980762
19
0
LINE
8
0
10
1.0980762
0
20
23.0980762
19
11
-4.0980762
-5.1961524
21
20.0980762
16
0
LINE
8
0
10
-4.0980762
-5.1961524
20
20.0980762
16
11
-1.0980762
-2.1961524
21
14.9019238
10.8038476
0
ENDSEC
0

View file

@ -16,12 +16,12 @@ outlines:
ref:
- matrix_default_default
- mirror_matrix_default_default
shift: [-sx/2, 0]
shift: [0, sy/2]
size: [20, 40]
outside_rects:
type: rectangle
anchor:
ref: matrix_default_default
shift: [-15, 5]
shift: [-10, 10]
size: 10
mirror: true