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".
16 lines
551 B
Plaintext
16 lines
551 B
Plaintext
// Walkie Talkie Frequency Knob
|
|
// The frequency knob for the walkie talkie assembly
|
|
|
|
// Set units
|
|
@settings(defaultLengthUnit = in, kclVersion = 1.0)
|
|
|
|
// Import parameters
|
|
import width, thickness, height, knobDiameter, knobHeight, knobFilletRadius from "parameters.kcl"
|
|
|
|
// Create the knob sketch and revolve
|
|
startSketchOn(XY)
|
|
|> circle(center = [0, 0], radius = knobDiameter / 2, tag = $knobBend)
|
|
|> extrude(%, length = knobHeight)
|
|
|> fillet(radius = knobFilletRadius, tags = [getOppositeEdge(knobBend)])
|
|
|> appearance(%, color = "#afbf36")
|