Avoid using full revolve for now (#6912)
Avoid using revolve for now When we moved to concurrent execution of KCL modules, we begun to see an error we never fully understood, and because it was pretty hard to trigger, we wound up never being able to fix it. Today we were able to track it down to the `revolve` call here. Specifically, the problem is triggered when we're doing a "Full Revolve" (e.g., `angle = 359.999999` passes, but *not* `angle = 360` or the default, as it is in `main`), and concurrently executing modules will see something weird happen with `getNextAdjacentEdge`. From all the smoke I believe this happens only when we are doing a *full revolve*, *AND* we're executing other modules which are calling `getNextAdjacentEdge`. When the `revolve` is present, we can lose the race in *either* `talk-button.kcl` OR `case.kcl`. If I move back to single-threaded execution OR I add imports to sequence things carefully, I can get the tests to pass. If the revolve is an `extrude` or not a full revolve, it works fine. My best guess is that it seems like the world got flipped upside down or something, such that "next edge" has a different orentation for two calls. My even further guess is that inside `revolve` we mutate something connection-global such that it alters the intepretation of calls made during the revolve implementation's "critical section".
This commit is contained in:
@ -9,7 +9,10 @@ import antennaLength, antennaBaseWidth, antennaBaseHeight, antennaTopWidth, ante
|
||||
|
||||
// Create the antenna base sketch
|
||||
antennaBaseSketch = startSketchOn(XY)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> startProfile(at = [
|
||||
-antennaBaseWidth / 2,
|
||||
antennaBaseHeight / 2
|
||||
])
|
||||
|> line(end = [antennaBaseWidth, 0])
|
||||
|> line(end = [0, -antennaBaseHeight])
|
||||
|> line(end = [-antennaBaseWidth, 0])
|
||||
@ -19,7 +22,7 @@ antennaBaseSketch = startSketchOn(XY)
|
||||
loftPlane = offsetPlane(XY, offset = antennaLength)
|
||||
antennaTopSketch = startSketchOn(loftPlane)
|
||||
|> startProfile(at = [
|
||||
(antennaBaseWidth - antennaTopWidth) / 2,
|
||||
-(antennaBaseWidth - antennaTopWidth) / 2,
|
||||
(antennaBaseHeight - antennaTopHeight) / 2
|
||||
])
|
||||
|> xLine(length = antennaTopWidth)
|
||||
|
||||
@ -5,15 +5,11 @@
|
||||
@settings(defaultLengthUnit = in, kclVersion = 1.0)
|
||||
|
||||
// Import parameters
|
||||
import width, thickness, height, knobDiameter, knobHeight, knobRadius from "parameters.kcl"
|
||||
import width, thickness, height, knobDiameter, knobHeight, knobFilletRadius from "parameters.kcl"
|
||||
|
||||
// Create the knob sketch and revolve
|
||||
startSketchOn(XZ)
|
||||
|> startProfile(at = [0.0001, 0])
|
||||
|> xLine(length = knobDiameter / 2)
|
||||
|> yLine(length = knobHeight - 0.05)
|
||||
|> arc(angleStart = 0, angleEnd = 90, radius = .05)
|
||||
|> xLine(endAbsolute = 0.0001)
|
||||
|> close()
|
||||
|> revolve(axis = Y)
|
||||
|> appearance(color = '#D0FF01', metalness = 90, roughness = 50)
|
||||
startSketchOn(XY)
|
||||
|> circle(center = [0, 0], radius = knobDiameter / 2, tag = $knobBend)
|
||||
|> extrude(%, length = knobHeight)
|
||||
|> fillet(radius = knobFilletRadius, tags = [getOppositeEdge(knobBend)])
|
||||
|> appearance(%, color = "#afbf36")
|
||||
|
||||
@ -20,7 +20,7 @@ body
|
||||
|
||||
// Import the antenna
|
||||
antenna
|
||||
|> translate(x = -width / 2 + .45, y = -0.10, z = height / 2)
|
||||
|> translate(x = -width / 2 + .60, y = -0.20, z = height / 2)
|
||||
|
||||
// Import the case
|
||||
case
|
||||
|
||||
@ -19,9 +19,9 @@ export speakerBoxHeight = 1.25
|
||||
// antenna
|
||||
export antennaBaseWidth = .5
|
||||
export antennaBaseHeight = .25
|
||||
export antennaTopWidth = .30
|
||||
export antennaTopHeight = .05
|
||||
export antennaLength = 3
|
||||
export antennaTopWidth = antennaBaseWidth * .5
|
||||
export antennaTopHeight = antennaBaseHeight * .5
|
||||
export antennaLength = 2
|
||||
|
||||
// button
|
||||
export buttonWidth = .15
|
||||
@ -36,7 +36,7 @@ export caseTolerance = 0.010
|
||||
// knob
|
||||
export knobDiameter = .5
|
||||
export knobHeight = .25
|
||||
export knobRadius = 0.050
|
||||
export knobFilletRadius = 0.050
|
||||
|
||||
// talk-button
|
||||
export talkButtonSideLength = 0.5
|
||||
|
||||
Reference in New Issue
Block a user