openscad-cpp-evaluator 0.24.0__tar.gz → 0.26.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/PKG-INFO +1 -1
  2. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/bindings/module.cpp +21 -0
  3. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/evaluator.hpp +19 -1
  4. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/mesh_check.hpp +24 -1
  5. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/pyproject.toml +1 -1
  6. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/python/openscad_cpp_evaluator/__init__.py +15 -1
  7. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/debug_profile.cpp +13 -1
  8. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/mesh_check.cpp +202 -0
  9. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/user_calls.cpp +8 -4
  10. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_bytecode_compiler.cpp +6 -6
  11. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_debug_hooks.cpp +38 -5
  12. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_mesh_check.cpp +127 -0
  13. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_tail_calls.cpp +6 -3
  14. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/.github/workflows/ci.yml +0 -0
  15. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/.github/workflows/wheels.yml +0 -0
  16. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/.gitignore +0 -0
  17. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/.gitmodules +0 -0
  18. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/CLAUDE.md +0 -0
  19. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/CMakeLists.txt +0 -0
  20. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/LICENSE +0 -0
  21. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/README.md +0 -0
  22. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/bindings/CMakeLists.txt +0 -0
  23. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/bindings/ast_to_py.cpp +0 -0
  24. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/cmake/embed_font.cmake +0 -0
  25. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/examples/CMakeLists.txt +0 -0
  26. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/examples/eval_perf_benchmark.cpp +0 -0
  27. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/examples/manifold_cache_reuse.cpp +0 -0
  28. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/examples/minimal_debugger.cpp +0 -0
  29. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/.github/workflows/ci.yml +0 -0
  30. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/.gitignore +0 -0
  31. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/CLAUDE.md +0 -0
  32. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/CMakeLists.txt +0 -0
  33. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/README.md +0 -0
  34. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/include/openscad_cpp_parser/api.hpp +0 -0
  35. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/include/openscad_cpp_parser/ast/ast_node.hpp +0 -0
  36. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/include/openscad_cpp_parser/ast/comments.hpp +0 -0
  37. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/include/openscad_cpp_parser/ast/declarations.hpp +0 -0
  38. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/include/openscad_cpp_parser/ast/expression.hpp +0 -0
  39. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/include/openscad_cpp_parser/ast/module_instantiation.hpp +0 -0
  40. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/include/openscad_cpp_parser/ast/scope_builder.hpp +0 -0
  41. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/include/openscad_cpp_parser/ast/vector_element.hpp +0 -0
  42. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/include/openscad_cpp_parser/ast.hpp +0 -0
  43. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/include/openscad_cpp_parser/comments.hpp +0 -0
  44. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/include/openscad_cpp_parser/position.hpp +0 -0
  45. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/include/openscad_cpp_parser/pretty_print.hpp +0 -0
  46. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/include/openscad_cpp_parser/scope.hpp +0 -0
  47. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/include/openscad_cpp_parser/serialization.hpp +0 -0
  48. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/include/openscad_cpp_parser/source_map.hpp +0 -0
  49. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/CMakeLists.txt +0 -0
  50. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/api.cpp +0 -0
  51. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/ast/ast_node.cpp +0 -0
  52. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/ast/declarations.cpp +0 -0
  53. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/ast/expression.cpp +0 -0
  54. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/ast/format_utils.hpp +0 -0
  55. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/ast/module_instantiation.cpp +0 -0
  56. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/ast/scope_builder.cpp +0 -0
  57. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/ast/vector_element.cpp +0 -0
  58. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/comment_attach_internal.hpp +0 -0
  59. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/comments.cpp +0 -0
  60. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/grammar/driver.cpp +0 -0
  61. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/grammar/driver.hpp +0 -0
  62. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/grammar/lexer.l +0 -0
  63. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/grammar/lexer_api.hpp +0 -0
  64. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/grammar/oscad_location.hpp +0 -0
  65. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/grammar/parser.y +0 -0
  66. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/inline_comment_attach.cpp +0 -0
  67. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/position.cpp +0 -0
  68. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/pretty_print.cpp +0 -0
  69. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/scope.cpp +0 -0
  70. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/serialization/json_io.cpp +0 -0
  71. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/serialization/yaml_io.cpp +0 -0
  72. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/src/source_map.cpp +0 -0
  73. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/CMakeLists.txt +0 -0
  74. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_assignments.cpp +0 -0
  75. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_ast_generation.cpp +0 -0
  76. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_comments_and_files.cpp +0 -0
  77. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_const_borrow.cpp +0 -0
  78. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_control.cpp +0 -0
  79. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_expressions.cpp +0 -0
  80. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_functions.cpp +0 -0
  81. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_helpers.hpp +0 -0
  82. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_inline_comments.cpp +0 -0
  83. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_lexical.cpp +0 -0
  84. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_modules.cpp +0 -0
  85. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_node_str.cpp +0 -0
  86. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_pretty_print.cpp +0 -0
  87. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_scope.cpp +0 -0
  88. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_serialization.cpp +0 -0
  89. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_smoke.cpp +0 -0
  90. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_source_map.cpp +0 -0
  91. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_use_include.cpp +0 -0
  92. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tests/test_vectors.cpp +0 -0
  93. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tools/cli/CMakeLists.txt +0 -0
  94. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/external/openscad_cpp_parser/tools/cli/main.cpp +0 -0
  95. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/bound_args.hpp +0 -0
  96. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/bytecode.hpp +0 -0
  97. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/bytecode_compiler.hpp +0 -0
  98. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/bytecode_vm.hpp +0 -0
  99. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/call_args.hpp +0 -0
  100. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/colored_body.hpp +0 -0
  101. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/csg_node.hpp +0 -0
  102. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/css_colors.hpp +0 -0
  103. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/debug_hooks.hpp +0 -0
  104. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/debug_repl.hpp +0 -0
  105. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/dispatch.hpp +0 -0
  106. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/dxf_svg_import.hpp +0 -0
  107. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/eval_context.hpp +0 -0
  108. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/eval_error.hpp +0 -0
  109. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/eval_use.hpp +0 -0
  110. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/export.hpp +0 -0
  111. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/font_provider.hpp +0 -0
  112. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/function_builtins.hpp +0 -0
  113. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/import_builtin.hpp +0 -0
  114. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/manifold_cache.hpp +0 -0
  115. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/mesh_import.hpp +0 -0
  116. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/osc_range.hpp +0 -0
  117. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/profile.hpp +0 -0
  118. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/scope_trail.hpp +0 -0
  119. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/segments.hpp +0 -0
  120. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/stb_font_provider.hpp +0 -0
  121. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/surface_load.hpp +0 -0
  122. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/text_metrics.hpp +0 -0
  123. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/value.hpp +0 -0
  124. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/include/openscad_cpp_evaluator/zip_stored.hpp +0 -0
  125. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/resources/fonts/LICENSE +0 -0
  126. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/resources/fonts/LiberationSans-Regular.ttf +0 -0
  127. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/CMakeLists.txt +0 -0
  128. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/booleans.cpp +0 -0
  129. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/builtins.hpp +0 -0
  130. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/call_args.cpp +0 -0
  131. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/color.cpp +0 -0
  132. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/control.cpp +0 -0
  133. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/extrude.cpp +0 -0
  134. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/function_builtins.cpp +0 -0
  135. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/import.cpp +0 -0
  136. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/modifiers.cpp +0 -0
  137. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/primitives_2d.cpp +0 -0
  138. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/primitives_3d.cpp +0 -0
  139. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/registry.cpp +0 -0
  140. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/roof.cpp +0 -0
  141. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/segments.cpp +0 -0
  142. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/surface.cpp +0 -0
  143. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/text.cpp +0 -0
  144. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/topology.cpp +0 -0
  145. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/builtins/transforms.cpp +0 -0
  146. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/bytecode_compiler.cpp +0 -0
  147. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/bytecode_vm.cpp +0 -0
  148. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/colored_body.cpp +0 -0
  149. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/csg_generate.cpp +0 -0
  150. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/csg_resolve.cpp +0 -0
  151. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/css_colors.cpp +0 -0
  152. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/debug/debug_repl.cpp +0 -0
  153. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/eval_context.cpp +0 -0
  154. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/eval_error.cpp +0 -0
  155. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/eval_use.cpp +0 -0
  156. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/export.cpp +0 -0
  157. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/expr_eval.cpp +0 -0
  158. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/import/dxf_import.cpp +0 -0
  159. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/import/mesh_import.cpp +0 -0
  160. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/import/surface_load.cpp +0 -0
  161. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/import/svg_import.cpp +0 -0
  162. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/manifold_cache.cpp +0 -0
  163. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/stmt_eval.cpp +0 -0
  164. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/text/stb_font_provider.cpp +0 -0
  165. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/text/text_metrics.cpp +0 -0
  166. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/value.cpp +0 -0
  167. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/src/zip_stored.cpp +0 -0
  168. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/CMakeLists.txt +0 -0
  169. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_booleans.cpp +0 -0
  170. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_cli.cpp +0 -0
  171. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_control_flow.cpp +0 -0
  172. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_csg_tree.cpp +0 -0
  173. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_dxf_svg_import.cpp +0 -0
  174. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_eval_context.cpp +0 -0
  175. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_export.cpp +0 -0
  176. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_expr_eval.cpp +0 -0
  177. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_extrude_roof.cpp +0 -0
  178. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_function_builtins.cpp +0 -0
  179. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_helpers.hpp +0 -0
  180. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_import_export.cpp +0 -0
  181. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_manifold_cache.cpp +0 -0
  182. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_multi_color_merge.cpp +0 -0
  183. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_primitives.cpp +0 -0
  184. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_profiling.cpp +0 -0
  185. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_python_bindings.py +0 -0
  186. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_scope_trail.cpp +0 -0
  187. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_scoping.cpp +0 -0
  188. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_surface.cpp +0 -0
  189. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_text.cpp +0 -0
  190. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_transforms.cpp +0 -0
  191. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_use.cpp +0 -0
  192. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_value.cpp +0 -0
  193. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_viewport_params.cpp +0 -0
  194. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tests/test_zip_stored.cpp +0 -0
  195. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tools/cli/CMakeLists.txt +0 -0
  196. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tools/cli/cli_lib.cpp +0 -0
  197. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tools/cli/cli_lib.hpp +0 -0
  198. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/tools/cli/main.cpp +0 -0
  199. {openscad_cpp_evaluator-0.24.0 → openscad_cpp_evaluator-0.26.0}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openscad_cpp_evaluator
3
- Version: 0.24.0
3
+ Version: 0.26.0
4
4
  Summary: C++ OpenSCAD evaluator with Python bindings
5
5
  Author: NeuSCAD Contributors
6
6
  License-Expression: MIT
@@ -247,6 +247,24 @@ nb::list csgTreeToPy(const std::vector<std::unique_ptr<oscadeval::CSGNode>>& tre
247
247
  // Exposed so a front end that writes its own files -- BelfrySCAD's GUI has
248
248
  // its own exporters -- can run the same check the CLI does rather than a
249
249
  // second, drifting implementation.
250
+ // Exposed for the export path: strip zero-area faces and repair the
251
+ // T-joints their removal exposes. Returns (verts, tris, report).
252
+ nb::tuple stripSliversPy(const std::vector<float>& verts, const std::vector<uint32_t>& tris) {
253
+ manifold::MeshGL m;
254
+ m.numProp = 3;
255
+ m.vertProperties = verts;
256
+ m.triVerts = tris;
257
+ oscadeval::SliverStripReport r;
258
+ manifold::MeshGL out = oscadeval::stripSlivers(m, r);
259
+ nb::dict rep;
260
+ rep["removed"] = r.removed;
261
+ rep["restitched"] = r.restitched;
262
+ rep["needles"] = r.needles;
263
+ rep["left_behind"] = r.leftBehind;
264
+ rep["passes"] = r.passes;
265
+ return nb::make_tuple(out.vertProperties, out.triVerts, rep);
266
+ }
267
+
250
268
  nb::dict checkMeshPy(const std::vector<float>& verts, const std::vector<uint32_t>& tris) {
251
269
  manifold::MeshGL m;
252
270
  m.numProp = 3;
@@ -708,6 +726,9 @@ NB_MODULE(_openscad_cpp_evaluator, m) {
708
726
  "Evaluate a .scad file; return (bodies, echoes, id_to_node, csg_tree, profile_result, dyn, dyn_explicit).");
709
727
  m.def("parse_decls", &parseDecls, nb::arg("path"),
710
728
  "Parse a .scad file; return top-level declaration (namespace, name, start, end, line, column, origin) tuples.");
729
+ m.def("strip_slivers", &stripSliversPy, nb::arg("verts"), nb::arg("tris"),
730
+ "Remove zero-area faces and repair the T-joints their removal "
731
+ "exposes. Returns (verts, tris, report).");
711
732
  m.def("check_mesh", &checkMeshPy, nb::arg("verts"), nb::arg("tris"),
712
733
  "Diagnose a triangle mesh against the manifoldness conditions. "
713
734
  "verts is a flat [x,y,z,...] list, tris a flat index list. Returns "
@@ -425,6 +425,13 @@ public:
425
425
  fastContinueHookSkippable_ = hookSkippable;
426
426
  }
427
427
 
428
+ // The statement checkpoint currently in progress at each call depth,
429
+ // for the call-site collapse described on checkDebug. Per depth, not a
430
+ // single slot: `a = [f(1), f(2), f(3)];` runs each callee's own body
431
+ // checkpoints in between, and those must not be mistaken for the
432
+ // caller having moved on to a new statement.
433
+ std::vector<std::pair<int, std::string>> lastStmtByDepth_;
434
+
428
435
  // The other half of hook-skippable mode's safety net. checkDebug()'s
429
436
  // whole premise (see its own doc comment, debug_profile.cpp) is that it
430
437
  // can skip calling into Python for a line with no breakpoint -- but the
@@ -475,7 +482,18 @@ public:
475
482
  // (function body entry), and builtins/control.cpp's
476
483
  // resolveBreakpoint/resolveIntersectionFor (free functions). Mirrors
477
484
  // Evaluator._check_debug, including its parameter defaults.
478
- void checkDebug(const oscad::ASTNode& node, EvalContext& ctx, bool forced = false, bool exprLevel = false);
485
+ // `callSite` marks the stop fired just before descending into a user
486
+ // function or function literal. It is a real, steppable stop -- a
487
+ // debugger's Step Over should pause on the call line -- but it is NOT
488
+ // a second execution of the line it sits on. When it lands on the same
489
+ // line and depth as the statement checkpoint immediately before it (as
490
+ // in `x = f(y);`, where the assignment and the call are one line), it
491
+ // is dropped, so a breakpoint there fires once per execution instead
492
+ // of twice. A call on its own line, or on a different line from the
493
+ // enclosing statement, still stops -- which is what keeps stepping
494
+ // through a list comprehension alternating for-line/call-line.
495
+ void checkDebug(const oscad::ASTNode& node, EvalContext& ctx, bool forced = false, bool exprLevel = false,
496
+ bool callSite = false);
479
497
 
480
498
  // (origin, line) for each top-level, non-declaration child of the
481
499
  // node checkDebug() was just called with -- i.e., if that node is a
@@ -63,10 +63,11 @@ struct MeshRepairReport {
63
63
  size_t filledTriangles = 0;
64
64
  size_t splitVertices = 0;
65
65
  size_t unfilledHoles = 0; // boundary loops it could not close
66
+ size_t strippedSlivers = 0; // zero-area faces removed and restitched
66
67
 
67
68
  bool didAnything() const {
68
69
  return weldedVertices || droppedDegenerate || droppedDuplicate || reversedFaces
69
- || filledHoles || splitVertices;
70
+ || filledHoles || splitVertices || strippedSlivers;
70
71
  }
71
72
  // "welded 12 vertices, filled 1 hole (4 triangles)" -- empty if nothing.
72
73
  std::string summary() const;
@@ -82,4 +83,26 @@ struct MeshRepairReport {
82
83
  // improved as far as it got, with the remainder reported in `report`.
83
84
  manifold::MeshGL repairMesh(const manifold::MeshGL& mesh, MeshRepairReport& report);
84
85
 
86
+ struct SliverStripReport {
87
+ size_t removed = 0; // zero-area faces taken out
88
+ size_t restitched = 0; // neighbours split to close the gap they left
89
+ // Faces with two corners at one position. These need no restitching:
90
+ // their two long edges run between the same two points, so the faces on
91
+ // either side already meet once the needle is gone.
92
+ size_t needles = 0;
93
+ size_t leftBehind = 0; // slivers whose neighbour could not be found
94
+ size_t passes = 0; // removing one can expose another
95
+ };
96
+
97
+ // Remove zero-area faces and repair the T-joints their removal exposes.
98
+ //
99
+ // A sliver's three vertices are collinear, so one lies between the other
100
+ // two. Dropping the face leaves that middle vertex sitting on the interior
101
+ // of the neighbour's edge -- a T-joint -- and the two sides no longer share
102
+ // an edge, which reads as a hole. Splitting the neighbour at the middle
103
+ // vertex restores the match without moving any geometry.
104
+ //
105
+ // The mesh is returned unchanged if it has no slivers.
106
+ manifold::MeshGL stripSlivers(const manifold::MeshGL& mesh, SliverStripReport& report);
107
+
85
108
  } // namespace oscadeval
@@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"
4
4
 
5
5
  [project]
6
6
  name = "openscad_cpp_evaluator"
7
- version = "0.24.0"
7
+ version = "0.26.0"
8
8
  description = "C++ OpenSCAD evaluator with Python bindings"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -18,7 +18,7 @@ from ._openscad_cpp_evaluator import FastContinueSignal, ManifoldCache
18
18
  __all__ = [
19
19
  "Evaluator", "ColoredBody", "EvalError", "ParseError", "OscObject", "parse", "to_renderable_bodies",
20
20
  "ManifoldCache", "CallSiteProfile", "ProfileResult", "format_csg_tree", "bodies_from_dicts",
21
- "FastContinueSignal", "parse_ast", "parse_ast_string", "check_mesh",
21
+ "FastContinueSignal", "parse_ast", "parse_ast_string", "check_mesh", "strip_slivers",
22
22
  ]
23
23
 
24
24
 
@@ -274,6 +274,20 @@ def parse(path: str) -> RootScope:
274
274
  return RootScope(decls)
275
275
 
276
276
 
277
+ def strip_slivers(verts, tris):
278
+ """Remove zero-area faces and repair the T-joints removal exposes.
279
+
280
+ A sliver's three vertices are collinear, so one lies between the other
281
+ two. Dropping the face leaves that middle vertex on the interior of the
282
+ neighbour's edge, and the two sides no longer share an edge -- which
283
+ reads as a hole. Splitting the neighbour there restores the match
284
+ without moving any geometry.
285
+
286
+ Returns (verts, tris, report).
287
+ """
288
+ return _ext.strip_slivers([float(v) for v in verts], [int(t) for t in tris])
289
+
290
+
277
291
  def check_mesh(verts, tris) -> dict:
278
292
  """Diagnose a triangle mesh against the manifoldness conditions.
279
293
 
@@ -74,9 +74,21 @@ std::vector<DebugFrame> Evaluator::buildDebugFrames(const EvalContext* ctx) cons
74
74
  return frames;
75
75
  }
76
76
 
77
- void Evaluator::checkDebug(const oscad::ASTNode& node, EvalContext& ctx, bool forced, bool exprLevel) {
77
+ void Evaluator::checkDebug(const oscad::ASTNode& node, EvalContext& ctx, bool forced, bool exprLevel,
78
+ bool callSite) {
78
79
  if (!debugHooks_.debugHook) return;
79
80
  const oscad::Position& pos = node.position();
81
+ const size_t stmtDepth = callStack_.size();
82
+ if (lastStmtByDepth_.size() <= stmtDepth) lastStmtByDepth_.resize(stmtDepth + 1, {-1, std::string{}});
83
+ if (callSite && !forced && lastStmtByDepth_[stmtDepth] == std::make_pair(pos.line, pos.origin)) {
84
+ // The statement this call belongs to already stopped on this exact
85
+ // line, at this depth. See checkDebug's declaration for why this
86
+ // one is dropped.
87
+ return;
88
+ }
89
+ if (!exprLevel && !callSite) {
90
+ lastStmtByDepth_[stmtDepth] = {pos.line, pos.origin};
91
+ }
80
92
  // Fast-continue's hook-skippable mode (setFastContinueBreakpoints' own
81
93
  // doc comment): a plain "Continue" with no step pending needs the debug
82
94
  // hook called ONLY for a line that actually has a breakpoint -- every
@@ -204,6 +204,8 @@ std::string MeshRepairReport::summary() const {
204
204
  + (filledHoles == 1 ? " hole filled (" : " holes filled (")
205
205
  + std::to_string(filledTriangles) + " triangles)");
206
206
  }
207
+ add(strippedSlivers, strippedSlivers == 1 ? "zero-area face stripped"
208
+ : "zero-area faces stripped");
207
209
  add(unfilledHoles, unfilledHoles == 1 ? "hole left open" : "holes left open");
208
210
  std::string out;
209
211
  for (size_t i = 0; i < parts.size(); ++i) {
@@ -426,6 +428,206 @@ manifold::MeshGL repairMesh(const manifold::MeshGL& mesh, MeshRepairReport& repo
426
428
  out.runTransform.clear();
427
429
  out.mergeFromVert.clear();
428
430
  out.mergeToVert.clear();
431
+
432
+ // Zero-area faces last. Welding already disposes of needles -- it
433
+ // collapses the coincident pair, leaving a face that names a vertex
434
+ // twice, which step 2 drops -- but a sliver whose three corners are
435
+ // distinct and collinear survives all of the above untouched, and an
436
+ // imported STL is exactly where those turn up.
437
+ SliverStripReport strip;
438
+ out = stripSlivers(out, strip);
439
+ report.strippedSlivers = strip.removed;
440
+ return out;
441
+ }
442
+
443
+
444
+ namespace {
445
+
446
+ // Which two corners of a zero-area face sit at the same position, if any.
447
+ // Such a face is a needle rather than a T-joint: its two long edges run
448
+ // between the same two points, so once it is gone the faces on either side
449
+ // already meet along one edge and nothing needs splitting. The coincident
450
+ // pair is merged so that is true by index as well as by position.
451
+ bool coincidentPair(const manifold::MeshGL& m, const std::array<Vert, 3>& f,
452
+ Vert& keep, Vert& drop) {
453
+ for (int i = 0; i < 3; ++i) {
454
+ const Vert a = f[i], b = f[(i + 1) % 3];
455
+ if (a == b) { keep = a; drop = b; return true; }
456
+ double p[3], q[3];
457
+ pos(m, a, p); pos(m, b, q);
458
+ if (llround(p[0] * 1e6) == llround(q[0] * 1e6)
459
+ && llround(p[1] * 1e6) == llround(q[1] * 1e6)
460
+ && llround(p[2] * 1e6) == llround(q[2] * 1e6)) {
461
+ keep = std::min(a, b);
462
+ drop = std::max(a, b);
463
+ return keep != drop;
464
+ }
465
+ }
466
+ return false;
467
+ }
468
+
469
+ // Index of the vertex opposite the longest edge -- for three collinear
470
+ // points that is the one in the middle.
471
+ int middleOfCollinear(const manifold::MeshGL& m, const std::array<Vert, 3>& f) {
472
+ double p[3][3];
473
+ for (int i = 0; i < 3; ++i) pos(m, f[i], p[i]);
474
+ auto d2 = [&](int a, int b) {
475
+ double s = 0;
476
+ for (int k = 0; k < 3; ++k) { const double d = p[a][k] - p[b][k]; s += d * d; }
477
+ return s;
478
+ };
479
+ const double opp[3] = {d2(1, 2), d2(0, 2), d2(0, 1)};
480
+ int best = 0;
481
+ for (int i = 1; i < 3; ++i) if (opp[i] > opp[best]) best = i;
482
+ return best;
483
+ }
484
+
485
+ } // namespace
486
+
487
+ manifold::MeshGL stripSlivers(const manifold::MeshGL& mesh, SliverStripReport& report) {
488
+ report = SliverStripReport{};
489
+ std::vector<std::array<Vert, 3>> tris;
490
+ tris.reserve(triCount(mesh));
491
+ for (size_t t = 0; t < triCount(mesh); ++t) {
492
+ Vert v[3];
493
+ triVerts(mesh, t, v);
494
+ tris.push_back({v[0], v[1], v[2]});
495
+ }
496
+
497
+ // Removing a sliver can leave its neighbour split into pieces that are
498
+ // themselves slivers, so this repeats. Bounded because each pass must
499
+ // remove at least one face to continue.
500
+ const int kMaxPasses = 12;
501
+ for (int pass = 0; pass < kMaxPasses; ++pass) {
502
+ std::vector<size_t> slivers;
503
+ for (size_t i = 0; i < tris.size(); ++i) {
504
+ const auto& f = tris[i];
505
+ if (f[0] == f[1] || f[1] == f[2] || f[0] == f[2]) continue; // handled elsewhere
506
+ double a[3], b[3], c[3];
507
+ pos(mesh, f[0], a); pos(mesh, f[1], b); pos(mesh, f[2], c);
508
+ const double ux = b[0] - a[0], uy = b[1] - a[1], uz = b[2] - a[2];
509
+ const double wx = c[0] - a[0], wy = c[1] - a[1], wz = c[2] - a[2];
510
+ const double cx = uy * wz - uz * wy, cy = uz * wx - ux * wz, cz = ux * wy - uy * wx;
511
+ if ((cx * cx + cy * cy + cz * cz) < 1e-24) slivers.push_back(i);
512
+ }
513
+ if (slivers.empty()) break;
514
+ ++report.passes;
515
+
516
+ // Which face owns each edge, so a sliver's long-edge neighbour can
517
+ // be found. Rebuilt per pass: splitting changes it.
518
+ std::map<Edge, std::vector<size_t>> owners;
519
+ for (size_t i = 0; i < tris.size(); ++i) {
520
+ for (int e = 0; e < 3; ++e) {
521
+ owners[undirected(tris[i][e], tris[i][(e + 1) % 3])].push_back(i);
522
+ }
523
+ }
524
+
525
+ std::vector<char> isSliver(tris.size(), 0);
526
+ for (size_t i : slivers) isSliver[i] = 1;
527
+
528
+ std::vector<char> dead(tris.size(), 0);
529
+ std::vector<std::array<Vert, 3>> added;
530
+ std::map<Vert, Vert> merge; // needle corners to fold together
531
+ for (size_t si : slivers) {
532
+ if (dead[si]) continue;
533
+ const auto f = tris[si];
534
+
535
+ // A needle: two corners at one point. Nothing to restitch --
536
+ // the faces on either side already share an edge positionally,
537
+ // and merging the pair makes them share it by index too.
538
+ Vert keep = 0, drop = 0;
539
+ if (coincidentPair(mesh, f, keep, drop)) {
540
+ dead[si] = 1;
541
+ if (keep != drop) merge[drop] = keep;
542
+ ++report.removed;
543
+ ++report.needles;
544
+ continue;
545
+ }
546
+
547
+ const int mid = middleOfCollinear(mesh, f);
548
+ const Vert m = f[mid], a = f[(mid + 1) % 3], b = f[(mid + 2) % 3];
549
+
550
+ // The neighbour across the long edge a-b, which is the one the
551
+ // middle vertex now sits inside.
552
+ // Prefer a neighbour that is not itself a sliver. Two slivers
553
+ // sharing their long edge are each other's only candidate, and
554
+ // splitting one into the other just moves the problem around --
555
+ // a level-4 Menger sponge has exactly one such pair, and it was
556
+ // what stopped the last two from ever clearing.
557
+ size_t nb = SIZE_MAX, fallback = SIZE_MAX;
558
+ for (size_t cand : owners[undirected(a, b)]) {
559
+ if (cand == si || dead[cand]) continue;
560
+ if (isSliver[cand]) {
561
+ if (fallback == SIZE_MAX) fallback = cand;
562
+ continue;
563
+ }
564
+ nb = cand;
565
+ break;
566
+ }
567
+ // A non-sliver neighbour is preferred but not required. Two
568
+ // slivers sharing their long edge are each other's only
569
+ // candidate -- a level-4 Menger sponge has one such pair, and
570
+ // refusing to split into a sliver leaves them forever. Splitting
571
+ // into one still makes progress, because the halves are smaller
572
+ // and the next pass reconsiders them.
573
+ if (nb == SIZE_MAX) nb = fallback;
574
+ if (nb == SIZE_MAX) { ++report.leftBehind; continue; }
575
+
576
+ // Split the neighbour at m, keeping its winding: the edge a-b
577
+ // appears in it in some direction, and the two pieces must
578
+ // traverse it the same way round.
579
+ const auto& n = tris[nb];
580
+ int e = -1;
581
+ for (int i = 0; i < 3; ++i) {
582
+ const Vert x = n[i], y = n[(i + 1) % 3];
583
+ if ((x == a && y == b) || (x == b && y == a)) { e = i; break; }
584
+ }
585
+ if (e < 0) { ++report.leftBehind; continue; }
586
+ const Vert x = n[e], y = n[(e + 1) % 3], apex = n[(e + 2) % 3];
587
+
588
+ dead[si] = 1;
589
+ dead[nb] = 1;
590
+ added.push_back({x, m, apex});
591
+ added.push_back({m, y, apex});
592
+ ++report.removed;
593
+ ++report.restitched;
594
+ }
595
+
596
+ std::vector<std::array<Vert, 3>> next;
597
+ next.reserve(tris.size() + added.size());
598
+ auto resolve = [&](Vert v) {
599
+ for (int hop = 0; hop < 8; ++hop) { // chains are short
600
+ auto it = merge.find(v);
601
+ if (it == merge.end()) break;
602
+ v = it->second;
603
+ }
604
+ return v;
605
+ };
606
+ for (size_t i = 0; i < tris.size(); ++i) {
607
+ if (dead[i]) continue;
608
+ const auto& f = tris[i];
609
+ next.push_back({resolve(f[0]), resolve(f[1]), resolve(f[2])});
610
+ }
611
+ for (const auto& f : added) {
612
+ next.push_back({resolve(f[0]), resolve(f[1]), resolve(f[2])});
613
+ }
614
+ if (next.size() == tris.size() && added.empty()) break;
615
+ tris.swap(next);
616
+ }
617
+
618
+ manifold::MeshGL out = mesh;
619
+ out.triVerts.clear();
620
+ out.triVerts.reserve(tris.size() * 3);
621
+ for (const auto& f : tris) {
622
+ out.triVerts.push_back(f[0]);
623
+ out.triVerts.push_back(f[1]);
624
+ out.triVerts.push_back(f[2]);
625
+ }
626
+ // These describe the old triangle list; a stale one is worse than none.
627
+ out.runIndex.clear();
628
+ out.runOriginalID.clear();
629
+ out.faceID.clear();
630
+ out.runTransform.clear();
429
631
  return out;
430
632
  }
431
633
 
@@ -547,7 +547,11 @@ std::variant<Value, Evaluator::TailStep, Evaluator::NotTailStep> Evaluator::simp
547
547
  const oscad::ASTNode* declNode = ctx.scope->lookupFunction(leftId->name);
548
548
  if (declNode && declNode->kind() == oscad::NodeKind::FunctionDeclaration) {
549
549
  const auto& decl = static_cast<const oscad::FunctionDeclaration&>(*declNode);
550
- checkDebug(n, ctx); // call-site stop, per hop (see evalFunctionCall's)
550
+ // Expression-level: a call sitting inside a larger
551
+ // statement is not its own statement, and pausing here
552
+ // as well as at the statement makes a breakpoint on
553
+ // that line fire twice per execution.
554
+ checkDebug(n, ctx, /*forced=*/false, /*exprLevel=*/false, /*callSite=*/true); // call-site stop, per hop
551
555
  const bool hasChunk = useBytecodeVm() && lookupOrCompileChunk(decl) != nullptr;
552
556
  std::optional<TailStep> step = tryTailStepFor(leftId->name, decl, decl.parameters, *decl.expr,
553
557
  hasChunk, n.arguments, ctx, n.position());
@@ -570,7 +574,7 @@ std::variant<Value, Evaluator::TailStep, Evaluator::NotTailStep> Evaluator::simp
570
574
  if (const auto* closurePtr = std::get_if<ClosurePtr>(&funcVal); closurePtr && *closurePtr) {
571
575
  const Closure& closure = **closurePtr;
572
576
  const oscad::FunctionLiteral& funcNode = *closure.node;
573
- checkDebug(n, ctx); // call-site stop, function-literal callee
577
+ checkDebug(n, ctx, /*forced=*/false, /*exprLevel=*/false, /*callSite=*/true); // call-site stop, function-literal callee
574
578
  const bool hasChunk = useBytecodeVm() && lookupCompiledLiteralChunk(funcNode) != nullptr;
575
579
  std::optional<TailStep> step =
576
580
  tryTailStepFor("<function literal>", funcNode, funcNode.parameters, *funcNode.body, hasChunk,
@@ -886,7 +890,7 @@ Value Evaluator::evalFunctionCall(const oscad::PrimaryCall& node, EvalContext& c
886
890
  // evalUserFunctionCore). Builtins deliberately get none --
887
891
  // mirrors _eval_function_call, where only the user-function and
888
892
  // function-literal branches call _check_debug.
889
- checkDebug(node, ctx);
893
+ checkDebug(node, ctx, /*forced=*/false, /*exprLevel=*/false, /*callSite=*/true);
890
894
  return evalUserFunction(leftId->name, static_cast<const oscad::FunctionDeclaration&>(*decl), node.arguments,
891
895
  ctx, &node);
892
896
  }
@@ -899,7 +903,7 @@ Value Evaluator::evalFunctionCall(const oscad::PrimaryCall& node, EvalContext& c
899
903
  // unknown callee gets exactly one warning below, not two.
900
904
  Value funcVal = leftId ? evalIdentifier(leftId->name, &leftId->position(), ctx, false) : evalExpr(*node.left, ctx);
901
905
  if (const auto* closurePtr = std::get_if<ClosurePtr>(&funcVal); closurePtr && *closurePtr) {
902
- checkDebug(node, ctx); // same call-site stop, function-literal callee
906
+ checkDebug(node, ctx, /*forced=*/false, /*exprLevel=*/false, /*callSite=*/true); // same call-site stop, function-literal callee
903
907
  return evalFunctionLiteral(**closurePtr, node.arguments, ctx, &node);
904
908
  }
905
909
 
@@ -197,13 +197,13 @@ TEST(BytecodeCompiler, DollarPrefixedParameterCompiles) {
197
197
  EXPECT_EQ(runCapturingEcho("function withFn($fn) = $fn;\necho(let($fn = 99) withFn());"), "ECHO: undef");
198
198
  // The proof this is actually running compiled, not silently falling
199
199
  // back: same ternary-bodied shape and technique as
200
- // FastContinueWithNoBreakpointInFunctionUsesVm above (3 stops =
201
- // compiled, 5 = interpreted), with $fn substituted in for the plain
200
+ // FastContinueWithNoBreakpointInFunctionUsesVm above (2 stops =
201
+ // compiled, 4 = interpreted), with $fn substituted in for the plain
202
202
  // parameter both as the declared name and every body reference.
203
203
  const int stops = countDebugHookStops("function f($fn) = $fn > 0 ? $fn + 1 : $fn - 1;\n"
204
204
  "echo(f(5));",
205
205
  std::unordered_map<std::string, std::set<int>>{{"<string>", {2}}});
206
- EXPECT_EQ(stops, 3);
206
+ EXPECT_EQ(stops, 2);
207
207
  }
208
208
 
209
209
  TEST(BytecodeCompiler, UndeclaredDollarNamedArgumentReachesDynInsideCompiledFunction) {
@@ -828,7 +828,7 @@ TEST(BytecodeCompiler, ClosureWithDollarParameterNowCompilesToo) {
828
828
  // silent even for a closure capturing an enclosing binding with its
829
829
  // own $-parameter.
830
830
  const int stops = countDebugHookStops(script, std::unordered_map<std::string, std::set<int>>{{"<string>", {2}}});
831
- EXPECT_EQ(stops, 3);
831
+ EXPECT_EQ(stops, 2);
832
832
  }
833
833
 
834
834
  // -- Tail-call optimization, VM path (Phase B) -----------------------------
@@ -1156,7 +1156,7 @@ TEST(BytecodeCompiler, DebugAttachedWithoutFastContinueAlwaysInterprets) {
1156
1156
  const int stops = countDebugHookStops("function f(x) = x > 0 ? x + 1 : x - 1;\n"
1157
1157
  "echo(f(5));",
1158
1158
  std::nullopt);
1159
- EXPECT_EQ(stops, 5);
1159
+ EXPECT_EQ(stops, 4);
1160
1160
  }
1161
1161
 
1162
1162
  TEST(BytecodeCompiler, FastContinueWithNoBreakpointInFunctionUsesVm) {
@@ -1167,7 +1167,7 @@ TEST(BytecodeCompiler, FastContinueWithNoBreakpointInFunctionUsesVm) {
1167
1167
  const int stops = countDebugHookStops("function f(x) = x > 0 ? x + 1 : x - 1;\n"
1168
1168
  "echo(f(5));",
1169
1169
  std::unordered_map<std::string, std::set<int>>{{"<string>", {2}}});
1170
- EXPECT_EQ(stops, 3);
1170
+ EXPECT_EQ(stops, 2);
1171
1171
  }
1172
1172
 
1173
1173
  TEST(BytecodeCompiler, FastContinueWithBreakpointInsideFunctionStillInterprets) {
@@ -595,17 +595,50 @@ TEST(DebugHooksParity, ListCompCForFiresEveryInitAndIncrSeparately) {
595
595
  EXPECT_EQ(stops.size(), 14u); // + 3 condition checks + 2 body expressions
596
596
  }
597
597
 
598
- // (13) User function / function-literal call sites: a statement-level stop
599
- // in the CALLER's context, before the callee's own body-entry stop.
598
+ // (13) User function / function-literal call sites: a stop in the CALLER's
599
+ // context, before the callee's own body-entry stop.
600
+ //
601
+ // DELIBERATE DIVERGENCE from the reference, and only for the case that
602
+ // duplicates: when the call sits on the same line and depth as the
603
+ // statement that just stopped, its call-site stop is dropped. Otherwise
604
+ // every consumer treating a statement-level stop as a breakpoint hit
605
+ // pauses twice for one execution of `a = double(5);` -- BelfrySCAD's
606
+ // debugger stuttered on Continue and reported the same loop iteration
607
+ // twice. Consumers cannot collapse it themselves: fast-continue skips the
608
+ // checkpoints in between, so a duplicate is indistinguishable from a
609
+ // genuine second visit to the line.
610
+ //
611
+ // A call on a different line from its enclosing statement still stops --
612
+ // see CallSiteOnItsOwnLineStillStops, which is what keeps Step Over
613
+ // through a list comprehension alternating for-line/call-line.
600
614
  TEST(DebugHooksParity, UserFunctionCallSiteStopsBeforeDescendingIntoTheCallee) {
601
- // line 2 twice (assignment, then call site), then line 1 (body entry).
615
+ // line 2 (assignment; the call site on the same line is collapsed),
616
+ // then line 1 (body entry).
602
617
  EXPECT_EQ(recordStops("function double(x) = x * 2;\na = double(5);\n"),
603
- (std::vector<Stop>{{2, false, false}, {2, false, false}, {1, false, false}}));
618
+ (std::vector<Stop>{{2, false, false}, {1, false, false}}));
604
619
  }
605
620
 
606
621
  TEST(DebugHooksParity, FunctionLiteralCallSiteAlsoStops) {
607
622
  EXPECT_EQ(recordStops("f = function(x) x * 2;\na = f(5);\n"),
608
- (std::vector<Stop>{{1, false, false}, {2, false, false}, {2, false, false}, {1, false, false}}));
623
+ (std::vector<Stop>{{1, false, false}, {2, false, false}, {1, false, false}}));
624
+ }
625
+
626
+ // The other half of the rule above: a call that is NOT on its enclosing
627
+ // statement's line keeps its own stop, so stepping still pauses on the
628
+ // call before descending. This is the list-comprehension shape.
629
+ TEST(DebugHooksParity, CallSiteOnItsOwnLineStillStops) {
630
+ const std::vector<Stop> stops = recordStops("function fx(x) = x*2;\n"
631
+ "a = [\n"
632
+ " for (i = [0:1])\n"
633
+ " fx(i)\n"
634
+ "];\n");
635
+ // Line 4 holds only the call. Two iterations, so two call-site stops,
636
+ // both statement-level and none collapsed -- the statement that
637
+ // stopped before each was the `for` on line 3.
638
+ int line4 = 0;
639
+ for (const Stop& s : stmtStops(stops))
640
+ if (s.line == 4) ++line4;
641
+ EXPECT_EQ(line4, 2);
609
642
  }
610
643
 
611
644
  TEST(DebugHooksParity, BuiltinFunctionCallGetsNoCallSiteStop) {