Commit 625490e
alferio
feat(primitives): sphere,cylinder,cone,pill
Added tools:
- Sphere: center point, radius point, circle resolution controls tessellation.
- Cylinder: base center, radius point, height point; axis is h - c, base plane is normal to that axis.
- Cone: same 3-point workflow as cylinder, apex at height point.
- Pill: same 3-point workflow as cylinder, capsule body between c and h with hemispherical caps.
Wiring included:
- new ToolIds
- new PrimitiveTools.kt
- registered tools in Main.kt
- new Primitives toolbar in SketchUiOverlay.kt
- mapped icons: sphere, cylinder, cone, pill
- toolbar layout version bumped so the new toolbar gets placed cleanly
Primitive tools now show 3D wireframe feedback while picking:
- sphere previews latitude/longitude wireframe after center + radius hover
- cylinder previews bottom/top rings and vertical edges
- cone previews base ring and side edges
- pill previews capsule rings and longitudinal edges
Toolbar commands are now registered for every built-in toolbar:
- View> Toolbars> Show ...
- View> Toolbars> Hide ...
This includes Actions, Point Construction, Modification, Entity Construction, Rendering, Architecture, Camera, Modification 2, Voxel, HVAC, Mech, Primitives, and In-tool Operators.
fix:
The Primitives toolbar was being created and stored in builtInToolbars, but it was missing from the buildStandardToolbars() return list. That means it was never added to the stage, so:
- primitive tool commands could still activate the tools
- show/hide commands found the toolbar object
- but nothing appeared, because the toolbar actor was not in the scene graph
Fixed in core/src/main/kotlin/com/github/alfu32/sketch/ui/SketchUiOverlay.kt:1689:
- added primitives to the standard toolbar actor list
- made setBuiltInToolbarVisible() self-heal by adding the toolbar to the stage if it is detached1 parent 893f660 commit 625490e
1 file changed
Lines changed: 4 additions & 4 deletions
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
| 136 | + | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
0 commit comments