frontProfile = sketch(on = XZ) {
line1 = line(start = [var 0mm, var 0mm], end = [var 0mm, var 60mm])
coincident([line1.start, ORIGIN])
vertical([line1.end, ORIGIN])
line2 = line(start = [var 0mm, var 60mm], end = [var -29.04mm, var 57.46mm])
coincident([line2.start, line1.end])
line3 = line(start = [var -29.04mm, var 57.46mm], end = [var -36mm, var 18mm])
coincident([line2.end, line3.start])
line4 = line(start = [var -36mm, var 18mm], end = [var -30.71mm, var -12mm])
coincident([line3.end, line4.start])
line5 = line(start = [var -30.71mm, var -12mm], end = [var -25mm, var -12mm])
coincident([line4.end, line5.start])
line6 = line(start = [var -25mm, var -12mm], end = [var -25mm, var 0mm])
coincident([line5.end, line6.start])
horizontal([line6.end, ORIGIN])
line7 = line(start = [var 0mm, var 0mm], end = [var -25mm, var 0mm])
coincident([line7.start, line1.start])
coincident([line7.end, line6.end])
vertical(line6)
angle([line1, line2]) == 95
distance([line1.start, line1.end]) == 60
line8 = line(start = [var -36mm, var 18mm], end = [var 0mm, var 18mm], construction = true)
coincident([line8.start, line4.start])
vertical([line8.end, ORIGIN])
horizontal(line8)
coincident([line8.end, line1])
distance([line8.start, line8.end]) == 36
distance([line7.start, line7.end]) == 25
angle([line3, line8]) == 100
distance([line6.start, line6.end]) == 12
horizontal(line5)
angle([line4, line8]) == 80
distance([line8.end, line7.start]) == 18
}
sideProfile = sketch(on = -YZ) {
line1 = line(start = [var 0mm, var -12.42mm], end = [var 135mm, var -12.42mm])
vertical([line1.start, ORIGIN])
line2 = line(start = [var 135mm, var -12.42mm], end = [var 135mm, var 52.95mm])
coincident([line1.end, line2.start])
line3 = line(start = [var 135mm, var 52.95mm], end = [var 100mm, var 60.27mm])
coincident([line2.end, line3.start])
line4 = line(start = [var 100mm, var 60.27mm], end = [var 0mm, var 60.27mm])
coincident([line3.end, line4.start])
vertical([line4.end, ORIGIN])
line5 = line(start = [var 0mm, var -12.42mm], end = [var 0mm, var 60.27mm])
coincident([line5.start, line1.start])
coincident([line5.end, line4.end])
distance([line5.start, line5.end]) == 72.69mm
vertical(line5)
horizontal(line4)
horizontal(line1)
vertical(line2)
distance([line4.start, line4.end]) == 100
distance([line1.start, line1.end]) == 135
distance([line2.start, line2.end]) == 65.37mm
}
hidden001 = hide(frontProfile)
region001 = region(point = [-0.0025mm, 30mm], sketch = frontProfile)
extrude001 = extrude(region001, length = 135, tagStart = $capStart001)
hidden002 = hide(sideProfile)
region002 = region(point = [59.38mm, -12.4195mm], sketch = sideProfile)
extrude002 = extrude(region002, length = 100)
solid001 = intersect([extrude002, extrude001])
edge001 = edgeId(solid001, index = 17)
chamfer001 = chamfer(
solid001,
tags = edge001,
length = 5,
angle = 75deg,
)
surface001 = deleteFace(solid001, faces = region001.tags.line1)
surface002 = deleteFace(solid001, faces = capStart001)
doorProfile = sketch(on = -YZ) {
line1 = line(start = [var 45mm, var 52mm], end = [var 80mm, var 52mm])
line2 = line(start = [var 80mm, var 52mm], end = [var 80mm, var 2mm])
line3 = line(start = [var 80mm, var 2mm], end = [var 45mm, var 2mm])
line4 = line(start = [var 45mm, var 2mm], end = [var 45mm, var 52mm])
coincident([line1.end, line2.start])
coincident([line2.end, line3.start])
coincident([line3.end, line4.start])
coincident([line4.end, line1.start])
parallel([line2, line4])
parallel([line3, line1])
perpendicular([line1, line2])
horizontal(line3)
distance([line4.start, line4.end]) == 50
distance([line1.start, line1.end]) == 35
line5 = line(start = [var 0mm, var 0mm], end = [var 45mm, var 0mm], construction = true)
coincident([line5.start, ORIGIN])
horizontal(line5)
distance([line5.start, line5.end]) == 45
line6 = line(start = [var 45mm, var 2mm], end = [var 45mm, var 0mm], construction = true)
coincident([line6.start, line4.start])
coincident([line6.end, line5.end])
vertical(line6)
distance([line6.start, line6.end]) == 2
line7 = line(start = [var 36.94mm, var 51.93mm], end = [var 0mm, var 51.93mm])
line8 = line(start = [var 9.91mm, var 52mm], end = [var 9.91mm, var 25.48mm])
line9 = line(start = [var 0mm, var 25.48mm], end = [var 36.94mm, var 25.48mm])
coincident([line7.end, line8.start])
coincident([line8.end, line9.start])
parallel([line9, line7])
perpendicular([line7, line8])
horizontal(line9)
line10 = line(start = [var 36.94mm, var 51.93mm], end = [var 36.94mm, var 25.48mm])
coincident([line10.start, line7.start])
coincident([line10.end, line9.end])
line11 = line(start = [var 37mm, var 52mm], end = [var 45mm, var 52mm], construction = true)
coincident([line11.start, line10.start])
coincident([line11.end, line4.end])
horizontal(line11)
vertical(line10)
distance([line8.start, line8.end]) == 25
distance([line11.start, line11.end]) == 8
line12 = line(start = [var -0mm, var -0mm], end = [var 0mm, var 51.9mm], construction = true)
coincident([line12.start, line5.start])
vertical([line12.end, ORIGIN])
line13 = line(start = [var 0mm, var 52mm], end = [var 4.95mm, var 52mm], construction = true)
coincident([line13.start, line12.end])
coincident([line13.end, line7.end])
horizontal(line13)
equalLength([line13, line11])
line14 = line(start = [var 80mm, var 52mm], end = [var 88mm, var 52mm], construction = true)
coincident([line14.start, line2.start])
horizontal(line14)
equalLength([line14, line11])
line15 = line(start = [var 88mm, var 52mm], end = [var 118.24mm, var 52mm])
line16 = line(start = [var 118.24mm, var 52mm], end = [var 118.24mm, var 23.53mm])
line17 = line(start = [var 118.24mm, var 23.53mm], end = [var 88mm, var 23.53mm])
line18 = line(start = [var 88mm, var 23.53mm], end = [var 88mm, var 52mm])
coincident([line15.end, line16.start])
coincident([line16.end, line17.start])
coincident([line17.end, line18.start])
coincident([line18.end, line15.start])
parallel([line16, line18])
parallel([line17, line15])
perpendicular([line15, line16])
horizontal(line17)
coincident([line15.start, line14.end])
equalLength([line18, line10])
distance([line17.start, line17.end]) == 30.24mm
}
region003 = region(point = [62.5mm, 51.9975mm], sketch = doorProfile)
windowRegion = region(point = [20mm, 51.9975mm], sketch = doorProfile)
endWindowRegion = region(point = [100mm, 51.9975mm], sketch = doorProfile)
extrude003 = extrude(
[
region003,
windowRegion,
endWindowRegion
],
length = 100,
tagEnd = $capEnd001,
tagStart = $capStart002,
)
split001 = split(solid001, tools = extrude003)
face001 = faceId(split001[1], index = 0)
surface003 = deleteFace(split001[1], faces = face001)
All four faces should be deleted.
Actual: See video. "undefined_value: the array doesn't have an item at index 2" (or other number).
Paste minimal KCL source that produces a cryptic error
Expected Behavior
All four faces should be deleted.
Actual: See video. "undefined_value: the array doesn't have an item at index 2" (or other number).
Additional Context
This is the same KCL as #11415 & #11416 but without the problematic edgeId & chamfer in #11415. It describes what happens to the code in #11416 but if you try to select multiple faces at once (or just other faces) for the delete face at the end. I really wanted to use a clean slate model for this bug report that wasn't already the subject of two others but I couldn't get it to happen quickly outside this model, sorry.
You may need to follow the reproduction steps in #11416 to get the model to a healthy state to start reproduction here.
compressed_25MB_Screen.Recording.2026-05-02.at.10.32.51.PM.mp4