Releases: alfu32/k3d
Release list
5.6.8: fix(mac): window resize watchdog
fix(ci): android release number as explicit parameter
fix(android): mandatory google playstore upgrade
from api level 35 to 36
fix(osx): window resize bug
on macOS/LWJGL3, the framebuffer size can change without Octodraw receiving a normal libGDX resize(width,
height) callback. Our render loop already called glViewport(0, 0, Gdx.graphics.width, Gdx.graphics.height), but the cameras/UI viewport
only updated inside resize(). Result: the GL canvas changed size, but the 3D camera projection stayed stale.
Changed core/src/main/kotlin/com/github/alfu32/sketch/Main.kt:274:
- Tracks the last applied framebuffer size.
- At the start of every frame, compares it with Gdx.graphics.width/height.
- If changed, runs the same resize logic as resize().
This should fix missed resize callbacks and is low-risk on platforms where resize already works.
Verification:
- GRADLE_USER_HOME=.gradle-user ./gradlew :core:compileKotlin --stacktrace
- Result: passed.
For older jars before this fix, the practical workaround is to start with the desired size instead of resizing after launch, for example:
java -jar octodraw.jar --size 1600x1000
Or use the packaged launcher if available, since java -jar can expose more platform quirks around macOS/LWJGL startup.
5.6.6: feat(scatter-over-surface):
5.5.6
- Added first random modeling tool: Random Offset.
- Works on selected faces and/or segments.
- Moves connected selected vertices together using averaged face normals.
- Uses integer RNG [-1000, 1000] / 1000.
- Wired into tool IDs, toolbar, command palette, and icon mapping.
5.5.7
- Snap packaging improvement.
- Snap build can reuse an already built Linux tarball or jar when present, with Gradle fallback.
5.5.8
-
Added parameter dialogs for:
- Random Offset
- Random Surface Array
-
Random Surface Array options included copy count, scale fuzz, rotation fuzz, and align-to-normal.
-
Typed input remained available for keyboard/MCP/script workflows.
5.5.9 / 5.6.0
-
Improved random tool dialog behavior.
-
OK commits immediately.
-
Cancel aborts and returns to Select.
-
Fuzzy offset strength scaled down by 1/10.
-
Subunitary fuzzy offset values are accepted.
-
Mesh Regularize received a real dialog with:
- subdivision count
- planar tolerance
- OK / Cancel
-
Mesh Regularize now emits border segments around generated square cells.
-
Wireframe previews update when dialog values change.
5.6.1
- Mesh Regularize no longer flattens directly onto the average plane.
- The average plane is used as parameter space only.
- Generated grid nodes are ray-projected back onto selected source triangles.
- Result follows the selected 3D surface better.
- Still limited to patches that can be reasonably represented from one dominant frame.
5.6.2
- Mesh Regularize became an explicit open-patch surface remesher.
- Extracts and preserves a single ordered boundary loop.
- Boundary nodes snap back to original 3D boundary segments.
- Closed, branched, and multi-loop selections fail explicitly instead of producing misleading output.
5.6.3
-
Random Surface Array gained two captured sets:
- target surface faces
- payload selection
-
Payload can include:
- object instances
- selected segments
- selected faces
-
Preview uses captured sets so target and payload can be selected independently.
5.6.4
-
Replaced random tool modal workflow with panelized global settings.
-
Added shared RandomToolSettings.
-
Added docked Random Tools settings panel.
-
Settings include:
- fuzzy offset strength
- scatter count
- scatter scale fuzz
- scatter rotation fuzz
- align to normal
- regularize subdivisions
- planar tolerance
-
Added View command for Random Tool Settings.
5.6.5
-
Random Surface Array became a two-step viewport workflow:
- Select target surface faces.
- Activate Random Surface Array.
- Tool captures the surface and clears selection.
- Click payload object in the viewport.
-
Added screen-aware pointer dispatch.
-
Added payload object picking from viewport camera ray.
-
Removed unsafe fallback that could scatter the surface over itself.
5.6.6
-
Fixed Random Surface Array payload picking to use the active camera.
-
Payload picking now works from active-context object bounds, preferring face hits.
-
Random Surface Array now commits immediately after payload pick.
-
After completion it:
- restores the initially captured target mesh selection,
- clears internal tool state,
- returns to Select.
-
Random Offset and Mesh Regularize also return to Select after successful completion.
5.5.5: 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.
new tools, fixes
Fixed the in-tool operators toolbar drift in core/src/main/kotlin/com/github/alfu32/sketch/ui/SketchUiOverlay.kt.

The issue was that rebuilding the toolbar repacked the window after tool changes while preserving the bottom-left position, so tiny height differences moved the top edge. The rebuild now captures the previous top edge and restores the window after pack().
- Built-in tool palette commands are now generated from the actual ToolController registered tools instead of a hand-maintained list.
- This catches tools that were missing from Ctrl-Shift-P, including newer/mechanical/boolean/object tools as long as they are registered in the controller.
- Excluded only ToolId.PLUGIN, since plugin tools already register their own palette commands.
- Increased the default blank-palette command cap from 20 to 200, so opening Ctrl-Shift-P without typing no longer hides most commands.
- Added better searchable tags from both displayName and ToolId words.
Implemented the two 3D sweep variants.
Added:
- Ribbon 3D
- Uses the existing double_line icon.
- Uses PolylineSettings.doubleLineSize and doubleLineOffset.
- Draws a constant-width planar ribbon along a 3D polyline.
- Builds one cross-section per path point and connects them as mesh faces.
- Uses miter-style section normals and parallel transport to reduce twist.
- Extrude Swipe 3D
- Uses the existing swipe_surface icon, same as Extrude Swipe.
- Uses selected line segments as the profile.
- Draws a 3D swipe path.
- Projects the profile into the first section, builds compatible sections at path vertices, and connects corresponding profile vertices so adjacent spans meet.
Added shared support:
- Sweep3dSupport.kt
- path section frames
- miter/bisector normals at internal path points
- parallel-transport frame propagation
- profile projection and section point generation
Wired into:
- ToolId
- Main
- toolbar layout
- command palette registration
- tool cycling for Extrude Swipe 3D
- docs reference
5.5.0: feat(mechanical): cog-wheel
Added a new Cog Wheel tool to the Mech toolbar using the mech_cog_wheel icon.
Release notes:
- Adds a four-point procedural workflow for creating planar cog-wheel outlines.
- Point 1 defines the tooth tangent start.
- Point 2 defines the tooth tangent end and therefore one tooth pitch length.
- Point 3 defines the tooth count by rounded model-unit distance from point 1.
- Point 4 defines tooth depth by distance from point 1.
- The cog center is computed automatically on the left-hand side of the tangent vector from point 1 to point 2.
- Once point 3 is selected, the tool previews the potential cog-wheel geometry before final commit.
- Generated geometry is horizontal and line-based.
- The tool adds a radial construction segment from the computed center to the tangent midpoint.
- Tooth geometry now follows a functional pitch-cell shape:
- inner/root at 0/4
- outer rise
- outer land
- inner/root at 3/4
- inner/root at 4/4
- The outer land arc length is adjusted to match the corresponding inner/root segment length, instead of using equal angular spans at different radii.
- Documentation for the Mech tools reference was updated to describe the workflow.
5.4.1: feat(tools): improvements, solid tools
requirements:
- selected segments should also display their arrow ( from first to second point, placed with the tip at the middle of the segment )
- selected segments will display a small green hotspot at their midpoint ( just as for the endpoints )
- flip tool will also flip the arrow on the selected segments.
new tools:
- aside from faces outline we should also have fill a polyline with faces, for that it is sufficient to reppurpose a part of the polyline tool, make sure that before that we put the segments in proper order ( search segments that are conected and put them in that order ). if the selection is not closed, fill it anyway.
new set of tools:
volumetric boolean operations on the current selection of faces: volume union, volume intersection, volume subtraction.
the way i see it, the volumes dont have to be neither well defined nor closed, take the 2 sets of faces A and B, slice the faces from the set A ny the faces in the set B and viceversa, with the modified sets (by slicing) use faces normals to determine which ones disappear and which ones are kept in function of the requested operation. you can probably reuse the mesh intersect and cutout functions for slicing.
we have the necessary icons in the mapping :
#|name
6|solid_union
16|solid_intersect
26|solid_subtract
79|polyline_mesh
implementation
Changed:
- core/src/main/kotlin/com/github/alfu32/sketch/Main.kt
- Selected segments now show a direction arrow with the tip at segment midpoint.
- Selected segments now show a small green midpoint hotspot.
- Flip action now flips selected faces and selected segment direction.
- core/src/main/kotlin/com/github/alfu32/sketch/model/DraftLineStore.kt
- Added flipSelected() for segment start/end reversal while preserving IDs and selection.
- core/src/main/kotlin/com/github/alfu32/sketch/tools/PolylineMeshTool.kt
- New Polyline Mesh tool.
- Orders connected selected segments into chains.
- Fills closed or open chains with faces using the existing face polygon triangulation.
- core/src/main/kotlin/com/github/alfu32/sketch/tools/VolumeBooleanTool.kt
- Added Solid Union, Solid Intersection, and Solid Subtraction.
- Works from two connected selected face sets.
- Uses detected triangle intersections to cut selected surfaces first, then classifies faces by inside/outside tests.
- core/src/main/kotlin/com/github/alfu32/sketch/ui/ToolId.kt and core/src/main/kotlin/com/github/alfu32/sketch/ui/SketchUiOverlay.kt
- Registered the new tools.
- Added toolbar buttons using polyline_mesh, solid_union, solid_intersect, and solid_subtract icons.
Known limitation: the boolean tools are usable first-pass volumetric operations, but open or badly self-intersecting selections are still approximate because inside/outside classification depends on ray tests against the selected face sets.
tools improvements
- the rectangle tool should show the distance information between first and second point while picking the second point ( after piacking the 1st point ) the same way we are showing it for line segments. the info will also inform on the area and perimeter of the rectangle ( not only the distance and relative coordinates to the frist point )
- the circle tool should show the same information that the sement constructor routine shows after picking the 1st point until picking the 2nd, aditionally it should show the diameter length, the circle perimeter and surface
- the surface rect should show the same informations as the rectangle tool
- the quad tool should show the same informations as the rectangle tool
- the multiply linear tool should aditionally show/count the prospective number of copies while picking the 2nd point
-
the planar translate multiple should show the prospective count/number of copies while picking the 2nd point
-
the volumetric linear multiplication tool should show the prospective count/number of copies while picking the 2nd point
-
the planar rotate multiple ( and variants from modify 2) should also show the prospective count/number of copies while picking the 2nd point
- the helicoidal rotate multiple (and variants ) should also show the prospective count/number of copies while picking the 2nd point
-
the rotate tool should show the rotational axis reference vector, the initial angle vector and the final angle vector ( segments actually ) and also show the information on how many degrees and radians from the first reference direction ( so while picking the 4th point )
-
the offset tool should show the same informations that are shown at the construction of a segment and also modify the offset distance and sign calculation to take the distance to the 1st point instead of the x distance, in this case the sign should be determined by the direction of the cross product between the closest segment vector to the 1st point in the selection and the input points ( (segment.a-segment.b) x (1st point -2nd(or current) point )
Implemented the tool feedback improvements.
What changed:
- ToolMeasurement now supports extra labels rendered beside the normal distance/relative-coordinate labels.
- Rectangle, Surface Rect, and Quad now show width, height, area, and perimeter while previewing.
- Circle now shows radius, diameter, perimeter, and area while previewing.
- Copy/translate/rotate multiple tools now show prospective copy counts where the count can be inferred from the already picked points.
- Rotate now exposes axis/reference/final guide segments and shows angle in degrees and radians while picking the final point.
- Offset now shows measurement feedback and uses true picked-point distance for offset magnitude. Its sign is derived from the nearest selected segment and the two picked points using the requested
cross-product rule.
docs site to have an extra playground page that uses a full available screen size for the octodraw component. resizing the page should also resize the component and its model should survive page reloads ( question is if local storage supports that much data ).
• Implemented the docs-site playground.
Added:
- docs-site/src/lib/components/PlaygroundEditor.svelte
- docs-site/src/routes/playground/+page.svelte
- Top-nav Playground link
- Full-width/full-height layout mode for /playground/
- ResizeObserver support in OctodrawEmbed.svelte so the webcomponent resizes with its container
Behavior:
- Uses the available viewport under the docs header.
- Resizes when the browser/page resizes.
- Autosaves the current model to localStorage every 5 seconds and on page hide.
- Restores the saved model on reload.
- Includes Save now, Restore, Download, and Clear saved controls.
- Shows browser storage estimate when available.
On storage size: localStorage is usually enough for moderate .octd JSON models, often around 5-10 MB per origin depending on browser. For larger models it can fail, so I added a visible autosave failure status and a Download button as the escape hatch.
5.3.7: fix(modification): cut with plane
-
Added core/src/main/kotlin/com/github/alfu32/sketch/tools/CutWithPlaneTool.kt
- Added ToolId.CUT_WITH_PLANE
- Registered it in Main.kt
- Added it to command/tool discovery list
- Added toolbar button beside MESH_INTERSECTION
- Added finish/cancel operators
- Reused the plane_section icon for now
Behavior:
- Select mesh faces.
- Activate Cut With Plane.
- Pick point 1: plane origin.
- Pick point 2: normal direction.
- Triangles intersecting the plane are replaced by clipped triangles.
- Cut edges are added as line segments.
- Newly generated faces remain selected.
Square sided washer and circular washer ( single plane )
- Circular Hole now creates a square-bounded round-hole patch.
- Added a new Round Washer tool using the mech_washer_round icon.
- Both washer tools now use three clicks:
- center c
- inner radius
- outer radius
- Removed the alternating green/white face colors; generated faces now use the model default face color.
- Round Washer preserves the previous circular outer-boundary behavior.
- Added MECH_SCREW and MECH_CIRCULAR_HOLE in core/src/main/kotlin/com/github/alfu32/sketch/ui/ToolId.kt
- Registered MECH_ROUND_WASHER in the tool enum, tool controller, command palette, Mech toolbar, and icon mapping.
Codex interoperability
added the Codex interoperability documentation at docs-site/src/routes/automation/codex-interoperability/+page.md, linked it in the docs navigation and automation index, and added a
agentGuidance.modelingDesignWorkflow section to /mcp/contract in core/src/main/kotlin/com/github/alfu32/sketch/Main.kt:2407. Future agent sessions that can reach MCP but not the repo can read
that contract and learn the modeling/capture procedure.
Generated/updated:
- docs-site/scripts/capture_motor_housing.mjs
- docs-site/static/images/generated/electromotor-housing-98mm-1u-5mm.png
- docs-site/static/images/generated/electromotor-housing-98mm-1u-5mm.capture.json
- docs-site/static/images/generated/manifest.json
Generated a electromotor housing as named component objects instead of one flat mesh. MCP confirmed these object prototypes now exist:

- Structural outer housing frame - 98 mm maximum diameter
- Front cover plate and raised outer retaining lip
- Rear cover plate and lower retaining lip
- Central shaft hub boss with 8 mm through bore
- Top stiffening ribs over 80 mm active disc opening
- Mounting foot 1/2/3 with 4.5 mm through hole on 84 mm PCD
- Side electrical terminal housing and cover lip
- Non-printing reference guides for 80 mm active disc and 84 mm mounting PCD
5.3.3: feat(objects): explode operation button
- core/src/main/kotlin/com/github/alfu32/sketch/ui/SketchUiOverlay.kt:80
- added a new constructor callback for object explosion / ungroup
- added an Explode Object action button in the Actions toolbar
- wired it to ungroupSelectionAction()
- exposed tutorial action id ui.action.explode_selected_object- core/src/main/kotlin/com/github/alfu32/sketch/Main.kt:981
- passed ::ungroupSelection into the UI overlay
- docs-site/src/routes/guide/objects/+page.md:1
- updated the object actions description to include Explode Object
- docs-site/src/routes/tutorials/objects-and-instances/+page.md:1
- added the new button to the lesson’s button sheet
- core/src/main/kotlin/com/github/alfu32/sketch/Main.kt:981