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".
44 lines
989 B
Plaintext
44 lines
989 B
Plaintext
// Global parameters for the walkie talkie
|
|
|
|
// Set units
|
|
@settings(defaultLengthUnit = in, kclVersion = 1.0)
|
|
|
|
// body
|
|
export height = 4
|
|
export width = 2.5
|
|
export thickness = 1
|
|
export chamferLength = .325
|
|
export offset = .125
|
|
export screenWidth = 1.75
|
|
export screenHeight = 1
|
|
export screenYPosition = height / 2 - 0.75
|
|
export screenDepth = -.0625
|
|
export speakerBoxWidth = 1.25
|
|
export speakerBoxHeight = 1.25
|
|
|
|
// antenna
|
|
export antennaBaseWidth = .5
|
|
export antennaBaseHeight = .25
|
|
export antennaTopWidth = antennaBaseWidth * .5
|
|
export antennaTopHeight = antennaBaseHeight * .5
|
|
export antennaLength = 2
|
|
|
|
// button
|
|
export buttonWidth = .15
|
|
export tolerance = 0.020
|
|
export buttonHeight = screenHeight / 2 - tolerance
|
|
export buttonThickness = .040
|
|
|
|
// case
|
|
export squareHoleSideLength = 0.0625
|
|
export caseTolerance = 0.010
|
|
|
|
// knob
|
|
export knobDiameter = .5
|
|
export knobHeight = .25
|
|
export knobFilletRadius = 0.050
|
|
|
|
// talk-button
|
|
export talkButtonSideLength = 0.5
|
|
export talkButtonHeight = 0.050
|