Skip to content

Add Lua/Python bindings for programmatic sketch creation#170

Merged
trailcode merged 3 commits into
mainfrom
Trailcode/scripting
Jul 6, 2026
Merged

Add Lua/Python bindings for programmatic sketch creation#170
trailcode merged 3 commits into
mainfrom
Trailcode/scripting

Conversation

@trailcode

@trailcode trailcode commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add view.add_sketch, view.add_edge, and view.finish_sketch_edges bindings to both Lua and Python consoles, backed by new thin Occt_view / Sketch wrappers.
  • Add Lua sketch inspection bindings (curr_sketch_node*, curr_sketch_dim*) for parity with Python.
  • Update sierpinski.py and add sierpinski.lua with create_sierpinski_sketch() demo helpers.
  • Document the new APIs in docs/scripting.md and src/doc/script.md.
  • Remove unused ui_font.h (font size constant inlined in main.cpp).

Closes #169

Test plan

  • Build desktop with Python enabled; open View -> Python Console
  • Run ezy.help() and confirm sketch create/read APIs are listed
  • Run create_sierpinski_sketch(3, 20.0) in Python; verify a new sketch with edges appears
  • Open View -> Lua Console; run create_sierpinski_sketch(3, 20.0); verify same result
  • Confirm view.curr_sketch_node_count() / view.curr_sketch_node(i) return expected coordinates after sketch creation

Made with Cursor

@cursor

cursor Bot commented Jul 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@trailcode trailcode merged commit 86c1872 into main Jul 6, 2026
3 checks passed
@trailcode trailcode deleted the Trailcode/scripting branch July 6, 2026 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Lua/Python bindings for programmatic sketch creation

1 participant