Summary
Muscle.rhomboids and Muscle.rotatorCuff are public cases of the Muscle enum, but neither has a path in any of the four body path sets. Highlighting either one compiles, is accepted by every public API, and silently paints nothing.
Version: 1.6.4.
Why it is easy to hit
Both are anatomically obvious targets. I was mapping an app-level "upper back" muscle group onto the package and .rhomboids was the natural first choice — it type-checks, Muscle.allCases contains it, BodyView.highlight(.rhomboids, color: .red) returns a view, and the body simply renders unhighlighted. There is nothing at the API surface that distinguishes a drawable region from one that is not.
Reproduction
import SwiftUI
import MuscleMap
struct ContentView: View {
var body: some View {
HStack {
// Renders highlighted, as expected.
BodyView(gender: .male, side: .back)
.highlight(.upperBack, color: .red)
// Renders completely unhighlighted. No warning, no runtime complaint.
BodyView(gender: .male, side: .back)
.highlight(.rhomboids, color: .red)
BodyView(gender: .male, side: .front)
.highlight(.rotatorCuff, color: .red)
}
}
}
The same happens through heatmap(_:colorScale:) and intensities(_:colorScale:).
Confirmation from the path data
Comparing the top-level (non-sub-group) Muscle cases against the slug: values in MaleFrontPaths / MaleBackPaths at 1.6.4:
- drawable:
abs, biceps, calves, chest, deltoids, feet, forearm, gluteal, hamstring, hands, head, knees, lowerBack, obliques, quadriceps, tibialis, trapezius, triceps, upperBack
- not drawn anywhere:
rhomboids, rotatorCuff
FemaleFrontPaths / FemaleBackPaths do not contain them either.
Suggestions
Any of these would have saved the debugging time:
- Add paths for the two regions.
- Expose something queryable — e.g.
Muscle.isDrawable, or BodyPathProvider-backed Muscle.regions(gender:side:) — so callers can assert their mapping at test time.
- Failing both, document the two cases as not-yet-drawn in the
Muscle doc comment.
Happy to send a PR for (2) or (3) if you have a preference.
Summary
Muscle.rhomboidsandMuscle.rotatorCuffare public cases of theMuscleenum, but neither has a path in any of the four body path sets. Highlighting either one compiles, is accepted by every public API, and silently paints nothing.Version: 1.6.4.
Why it is easy to hit
Both are anatomically obvious targets. I was mapping an app-level "upper back" muscle group onto the package and
.rhomboidswas the natural first choice — it type-checks,Muscle.allCasescontains it,BodyView.highlight(.rhomboids, color: .red)returns a view, and the body simply renders unhighlighted. There is nothing at the API surface that distinguishes a drawable region from one that is not.Reproduction
The same happens through
heatmap(_:colorScale:)andintensities(_:colorScale:).Confirmation from the path data
Comparing the top-level (non-sub-group)
Musclecases against theslug:values inMaleFrontPaths/MaleBackPathsat 1.6.4:abs, biceps, calves, chest, deltoids, feet, forearm, gluteal, hamstring, hands, head, knees, lowerBack, obliques, quadriceps, tibialis, trapezius, triceps, upperBackrhomboids, rotatorCuffFemaleFrontPaths/FemaleBackPathsdo not contain them either.Suggestions
Any of these would have saved the debugging time:
Muscle.isDrawable, orBodyPathProvider-backedMuscle.regions(gender:side:)— so callers can assert their mapping at test time.Muscledoc comment.Happy to send a PR for (2) or (3) if you have a preference.