Skip to content

Version 0.10.0

Compare
Choose a tag to compare
@okmatija okmatija released this 13 May 19:47
· 116 commits to main since this release
  • Added a Python API for OBJ authoring with Prizm extensions

    • Usage: Navigate to the "Prism > Tools > API > Python", configure the API by pressing checkboxes and press the button to copy the relevant import text to your clipboard, then paste that string into the file you want to debug
    • The API has functions to write geometry in plain OBJ format (based on http://paulbourke.net/dataformats/obj/) as well as functions to write Prism-specific extensions e.g., annotations and command annotations. See the documentation() function for more info
    • The API attempts to minimize dependencies and only imports modules as needed e.g., the Color can be constructed from matplotlib color types, but matplotlib is only imported if you actually call this function. Doing this seems to be a bit unidiomatic in Python so we might change it.
    • Having this debug code live outside your project is a feature since it ensures you can't accidentally commit code which writes out OBJs to production: your CI/CD pipeline should fail to compile because it won't be able to find the Prism API
    • Maintenance: mypy.exe prizm.py should return no issues; pylint.exe should be "reasonable" i.e., fix errors but too-many-statements, using-constant-test, line-too-long etc. This also applies to the test.py file
  • Improvements to the C++ API

    • Fixed polyline functions which did not correctly write the indices of closed polylines
    • Fixed polyline function writing a spurious space after // (the separator between a vertex index and a normal index) in some cases
    • Changed polygon functions to do nothing rather than writing broken data when called with fewer than 3 indices/vertices
    • Added aqua and magenta colors and made minor imporovements to the documentation