Fillet all outline chains, closes #34
This commit is contained in:
parent
8490f14960
commit
16f6b81f66
3 changed files with 283 additions and 1 deletions
|
@ -319,7 +319,9 @@ exports.parse = (config = {}, points = {}, units = {}) => {
|
||||||
const fillet = a.sane(part.fillet || 0, `${name}.fillet`, 'number')(units)
|
const fillet = a.sane(part.fillet || 0, `${name}.fillet`, 'number')(units)
|
||||||
arg = u.deepcopy(outlines[part.name])
|
arg = u.deepcopy(outlines[part.name])
|
||||||
if (fillet) {
|
if (fillet) {
|
||||||
arg.models.fillets = m.chain.fillet(m.model.findSingleChain(arg), fillet)
|
for (const [index, chain] of m.model.findChains(arg).entries()) {
|
||||||
|
arg.models[`fillet_${index}`] = m.chain.fillet(chain, fillet)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
|
22
test/outlines/fillet.yaml
Normal file
22
test/outlines/fillet.yaml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
points:
|
||||||
|
key:
|
||||||
|
padding: cy
|
||||||
|
bind: 0.1
|
||||||
|
zones:
|
||||||
|
matrix:
|
||||||
|
columns:
|
||||||
|
one:
|
||||||
|
two:
|
||||||
|
rows:
|
||||||
|
bottom:
|
||||||
|
top:
|
||||||
|
outlines:
|
||||||
|
exports:
|
||||||
|
base:
|
||||||
|
- type: keys
|
||||||
|
side: left
|
||||||
|
size: cy
|
||||||
|
fillet:
|
||||||
|
- type: outline
|
||||||
|
name: base
|
||||||
|
fillet: 2
|
258
test/outlines/fillet___outlines_fillet_dxf.dxf
Normal file
258
test/outlines/fillet___outlines_fillet_dxf.dxf
Normal file
|
@ -0,0 +1,258 @@
|
||||||
|
0
|
||||||
|
SECTION
|
||||||
|
2
|
||||||
|
HEADER
|
||||||
|
9
|
||||||
|
$INSUNITS
|
||||||
|
70
|
||||||
|
4
|
||||||
|
0
|
||||||
|
ENDSEC
|
||||||
|
0
|
||||||
|
SECTION
|
||||||
|
2
|
||||||
|
TABLES
|
||||||
|
0
|
||||||
|
TABLE
|
||||||
|
2
|
||||||
|
LTYPE
|
||||||
|
0
|
||||||
|
LTYPE
|
||||||
|
72
|
||||||
|
65
|
||||||
|
70
|
||||||
|
64
|
||||||
|
2
|
||||||
|
CONTINUOUS
|
||||||
|
3
|
||||||
|
______
|
||||||
|
73
|
||||||
|
0
|
||||||
|
40
|
||||||
|
0
|
||||||
|
0
|
||||||
|
ENDTAB
|
||||||
|
0
|
||||||
|
TABLE
|
||||||
|
2
|
||||||
|
LAYER
|
||||||
|
0
|
||||||
|
ENDTAB
|
||||||
|
0
|
||||||
|
ENDSEC
|
||||||
|
0
|
||||||
|
SECTION
|
||||||
|
2
|
||||||
|
ENTITIES
|
||||||
|
0
|
||||||
|
LINE
|
||||||
|
8
|
||||||
|
0
|
||||||
|
10
|
||||||
|
8.6
|
||||||
|
20
|
||||||
|
-6.6
|
||||||
|
11
|
||||||
|
8.6
|
||||||
|
21
|
||||||
|
23.6
|
||||||
|
0
|
||||||
|
LINE
|
||||||
|
8
|
||||||
|
0
|
||||||
|
10
|
||||||
|
-6.6
|
||||||
|
20
|
||||||
|
-8.6
|
||||||
|
11
|
||||||
|
6.6
|
||||||
|
21
|
||||||
|
-8.6
|
||||||
|
0
|
||||||
|
LINE
|
||||||
|
8
|
||||||
|
0
|
||||||
|
10
|
||||||
|
-8.6
|
||||||
|
20
|
||||||
|
-6.6
|
||||||
|
11
|
||||||
|
-8.6
|
||||||
|
21
|
||||||
|
23.6
|
||||||
|
0
|
||||||
|
LINE
|
||||||
|
8
|
||||||
|
0
|
||||||
|
10
|
||||||
|
-6.6
|
||||||
|
20
|
||||||
|
25.6
|
||||||
|
11
|
||||||
|
6.6
|
||||||
|
21
|
||||||
|
25.6
|
||||||
|
0
|
||||||
|
LINE
|
||||||
|
8
|
||||||
|
0
|
||||||
|
10
|
||||||
|
27.6
|
||||||
|
20
|
||||||
|
-6.6
|
||||||
|
11
|
||||||
|
27.6
|
||||||
|
21
|
||||||
|
23.6
|
||||||
|
0
|
||||||
|
LINE
|
||||||
|
8
|
||||||
|
0
|
||||||
|
10
|
||||||
|
12.4
|
||||||
|
20
|
||||||
|
-8.6
|
||||||
|
11
|
||||||
|
25.6
|
||||||
|
21
|
||||||
|
-8.6
|
||||||
|
0
|
||||||
|
LINE
|
||||||
|
8
|
||||||
|
0
|
||||||
|
10
|
||||||
|
10.4
|
||||||
|
20
|
||||||
|
-6.6
|
||||||
|
11
|
||||||
|
10.4
|
||||||
|
21
|
||||||
|
23.6
|
||||||
|
0
|
||||||
|
LINE
|
||||||
|
8
|
||||||
|
0
|
||||||
|
10
|
||||||
|
12.4
|
||||||
|
20
|
||||||
|
25.6
|
||||||
|
11
|
||||||
|
25.6
|
||||||
|
21
|
||||||
|
25.6
|
||||||
|
0
|
||||||
|
ARC
|
||||||
|
8
|
||||||
|
0
|
||||||
|
10
|
||||||
|
6.6
|
||||||
|
20
|
||||||
|
23.6
|
||||||
|
40
|
||||||
|
2
|
||||||
|
50
|
||||||
|
0
|
||||||
|
51
|
||||||
|
90
|
||||||
|
0
|
||||||
|
ARC
|
||||||
|
8
|
||||||
|
0
|
||||||
|
10
|
||||||
|
-6.6
|
||||||
|
20
|
||||||
|
23.6
|
||||||
|
40
|
||||||
|
2
|
||||||
|
50
|
||||||
|
90
|
||||||
|
51
|
||||||
|
180
|
||||||
|
0
|
||||||
|
ARC
|
||||||
|
8
|
||||||
|
0
|
||||||
|
10
|
||||||
|
-6.6
|
||||||
|
20
|
||||||
|
-6.6
|
||||||
|
40
|
||||||
|
2
|
||||||
|
50
|
||||||
|
180
|
||||||
|
51
|
||||||
|
270
|
||||||
|
0
|
||||||
|
ARC
|
||||||
|
8
|
||||||
|
0
|
||||||
|
10
|
||||||
|
6.6
|
||||||
|
20
|
||||||
|
-6.6
|
||||||
|
40
|
||||||
|
2
|
||||||
|
50
|
||||||
|
270
|
||||||
|
51
|
||||||
|
0
|
||||||
|
0
|
||||||
|
ARC
|
||||||
|
8
|
||||||
|
0
|
||||||
|
10
|
||||||
|
25.6
|
||||||
|
20
|
||||||
|
23.6
|
||||||
|
40
|
||||||
|
2
|
||||||
|
50
|
||||||
|
0
|
||||||
|
51
|
||||||
|
90
|
||||||
|
0
|
||||||
|
ARC
|
||||||
|
8
|
||||||
|
0
|
||||||
|
10
|
||||||
|
12.4
|
||||||
|
20
|
||||||
|
23.6
|
||||||
|
40
|
||||||
|
2
|
||||||
|
50
|
||||||
|
90
|
||||||
|
51
|
||||||
|
180
|
||||||
|
0
|
||||||
|
ARC
|
||||||
|
8
|
||||||
|
0
|
||||||
|
10
|
||||||
|
12.4
|
||||||
|
20
|
||||||
|
-6.6
|
||||||
|
40
|
||||||
|
2
|
||||||
|
50
|
||||||
|
180
|
||||||
|
51
|
||||||
|
270
|
||||||
|
0
|
||||||
|
ARC
|
||||||
|
8
|
||||||
|
0
|
||||||
|
10
|
||||||
|
25.6
|
||||||
|
20
|
||||||
|
-6.6
|
||||||
|
40
|
||||||
|
2
|
||||||
|
50
|
||||||
|
270
|
||||||
|
51
|
||||||
|
0
|
||||||
|
0
|
||||||
|
ENDSEC
|
||||||
|
0
|
||||||
|
EOF
|
Loading…
Add table
Add a link
Reference in a new issue