sw2robot 0.4.1__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 (173) hide show
  1. sw2robot-0.4.1/.gitignore +37 -0
  2. sw2robot-0.4.1/CONTRIBUTING.md +134 -0
  3. sw2robot-0.4.1/LICENSE +202 -0
  4. sw2robot-0.4.1/PKG-INFO +452 -0
  5. sw2robot-0.4.1/README.md +396 -0
  6. sw2robot-0.4.1/examples/fingertip/fingertip.joints.yaml +25 -0
  7. sw2robot-0.4.1/examples/fingertip/graph.json +586 -0
  8. sw2robot-0.4.1/examples/fingertip/meshes/fingertip_back_1.3dxml +0 -0
  9. sw2robot-0.4.1/examples/fingertip/meshes/fingertip_front_2.3dxml +0 -0
  10. sw2robot-0.4.1/examples/fingertip/meshes/screwlock_male_hard_jointbase_v4_1.3dxml +0 -0
  11. sw2robot-0.4.1/pyproject.toml +144 -0
  12. sw2robot-0.4.1/sw2robot/__init__.py +37 -0
  13. sw2robot-0.4.1/sw2robot/editor/__init__.py +21 -0
  14. sw2robot-0.4.1/sw2robot/editor/__main__.py +4 -0
  15. sw2robot-0.4.1/sw2robot/editor/_autolimits_cli.py +106 -0
  16. sw2robot-0.4.1/sw2robot/editor/_vendor/__init__.py +1 -0
  17. sw2robot-0.4.1/sw2robot/editor/_vendor/rc_config/__init__.py +26 -0
  18. sw2robot-0.4.1/sw2robot/editor/_vendor/rc_config/export.py +188 -0
  19. sw2robot-0.4.1/sw2robot/editor/_vendor/rc_config/gazebo_generator.py +121 -0
  20. sw2robot-0.4.1/sw2robot/editor/_vendor/rc_config/imitation_generator.py +123 -0
  21. sw2robot-0.4.1/sw2robot/editor/_vendor/rc_config/moveit_generator.py +124 -0
  22. sw2robot-0.4.1/sw2robot/editor/_vendor/rc_config/servo_mapping.py +100 -0
  23. sw2robot-0.4.1/sw2robot/editor/_vendor/rc_config/urdf_parser.py +160 -0
  24. sw2robot-0.4.1/sw2robot/editor/autoinit.py +82 -0
  25. sw2robot-0.4.1/sw2robot/editor/cli.py +53 -0
  26. sw2robot-0.4.1/sw2robot/editor/core.py +894 -0
  27. sw2robot-0.4.1/sw2robot/editor/package_uri.py +82 -0
  28. sw2robot-0.4.1/sw2robot/editor/state.py +107 -0
  29. sw2robot-0.4.1/sw2robot/editor/update.py +415 -0
  30. sw2robot-0.4.1/sw2robot/editor/web/axis-markers.js +309 -0
  31. sw2robot-0.4.1/sw2robot/editor/web/batch-look.js +311 -0
  32. sw2robot-0.4.1/sw2robot/editor/web/boot.js +168 -0
  33. sw2robot-0.4.1/sw2robot/editor/web/bootstrap.js +72 -0
  34. sw2robot-0.4.1/sw2robot/editor/web/box-select.js +142 -0
  35. sw2robot-0.4.1/sw2robot/editor/web/bulk-edit.js +234 -0
  36. sw2robot-0.4.1/sw2robot/editor/web/camera-reroot.js +234 -0
  37. sw2robot-0.4.1/sw2robot/editor/web/capture-progress.js +362 -0
  38. sw2robot-0.4.1/sw2robot/editor/web/coacd-preview.js +315 -0
  39. sw2robot-0.4.1/sw2robot/editor/web/diagnostics.js +154 -0
  40. sw2robot-0.4.1/sw2robot/editor/web/dom.js +29 -0
  41. sw2robot-0.4.1/sw2robot/editor/web/endcoords-gizmo.js +408 -0
  42. sw2robot-0.4.1/sw2robot/editor/web/export-box.js +149 -0
  43. sw2robot-0.4.1/sw2robot/editor/web/export-names.js +95 -0
  44. sw2robot-0.4.1/sw2robot/editor/web/face-pick.js +524 -0
  45. sw2robot-0.4.1/sw2robot/editor/web/file-browser.js +265 -0
  46. sw2robot-0.4.1/sw2robot/editor/web/frames.js +306 -0
  47. sw2robot-0.4.1/sw2robot/editor/web/i18n.js +1027 -0
  48. sw2robot-0.4.1/sw2robot/editor/web/index.html +610 -0
  49. sw2robot-0.4.1/sw2robot/editor/web/joint-rows.js +127 -0
  50. sw2robot-0.4.1/sw2robot/editor/web/joint-type.js +300 -0
  51. sw2robot-0.4.1/sw2robot/editor/web/keycast.js +92 -0
  52. sw2robot-0.4.1/sw2robot/editor/web/link-info.js +377 -0
  53. sw2robot-0.4.1/sw2robot/editor/web/link-look.js +248 -0
  54. sw2robot-0.4.1/sw2robot/editor/web/lists.js +164 -0
  55. sw2robot-0.4.1/sw2robot/editor/web/load.js +309 -0
  56. sw2robot-0.4.1/sw2robot/editor/web/main.js +76 -0
  57. sw2robot-0.4.1/sw2robot/editor/web/mass-editor.js +280 -0
  58. sw2robot-0.4.1/sw2robot/editor/web/mass-heatmap.js +213 -0
  59. sw2robot-0.4.1/sw2robot/editor/web/mimic.js +159 -0
  60. sw2robot-0.4.1/sw2robot/editor/web/play-mode.js +180 -0
  61. sw2robot-0.4.1/sw2robot/editor/web/root-frame.js +161 -0
  62. sw2robot-0.4.1/sw2robot/editor/web/selection.js +391 -0
  63. sw2robot-0.4.1/sw2robot/editor/web/session-log.js +277 -0
  64. sw2robot-0.4.1/sw2robot/editor/web/state.js +128 -0
  65. sw2robot-0.4.1/sw2robot/editor/web/style.css +433 -0
  66. sw2robot-0.4.1/sw2robot/editor/web/subassembly-choices.js +613 -0
  67. sw2robot-0.4.1/sw2robot/editor/web/subassembly-preview.js +381 -0
  68. sw2robot-0.4.1/sw2robot/editor/web/three-setup.js +27 -0
  69. sw2robot-0.4.1/sw2robot/editor/web/tree.js +586 -0
  70. sw2robot-0.4.1/sw2robot/editor/webserver.py +7750 -0
  71. sw2robot-0.4.1/sw2robot/exporter/__init__.py +1 -0
  72. sw2robot-0.4.1/sw2robot/exporter/build.py +43 -0
  73. sw2robot-0.4.1/sw2robot/exporter/export.py +871 -0
  74. sw2robot-0.4.1/sw2robot/exporter/extract.py +62 -0
  75. sw2robot-0.4.1/sw2robot/exporter/geometry.py +135 -0
  76. sw2robot-0.4.1/sw2robot/exporter/inertia.py +56 -0
  77. sw2robot-0.4.1/sw2robot/exporter/jointcfg.py +170 -0
  78. sw2robot-0.4.1/sw2robot/exporter/mesh.py +936 -0
  79. sw2robot-0.4.1/sw2robot/exporter/model.py +4639 -0
  80. sw2robot-0.4.1/sw2robot/exporter/ros_export.py +1571 -0
  81. sw2robot-0.4.1/sw2robot/exporter/state.py +210 -0
  82. sw2robot-0.4.1/sw2robot/exporter/sw2urdf_import/__init__.py +38 -0
  83. sw2robot-0.4.1/sw2robot/exporter/sw2urdf_import/_common.py +162 -0
  84. sw2robot-0.4.1/sw2robot/exporter/sw2urdf_import/bridge.py +598 -0
  85. sw2robot-0.4.1/sw2robot/exporter/sw2urdf_import/geometric.py +318 -0
  86. sw2robot-0.4.1/sw2robot/exporter/sw2urdf_import/naming.py +255 -0
  87. sw2robot-0.4.1/sw2robot/exporter/sw2urdf_import/payload.py +484 -0
  88. sw2robot-0.4.1/sw2robot/exporter/swcom.py +907 -0
  89. sw2robot-0.4.1/sw2robot/exporter/urdf_writer.py +845 -0
  90. sw2robot-0.4.1/sw2robot/exporter/validate.py +236 -0
  91. sw2robot-0.4.1/tests/e2e/fixtures/boxbot/urdf/boxbot.urdf +20 -0
  92. sw2robot-0.4.1/tests/e2e/package.json +12 -0
  93. sw2robot-0.4.1/tests/e2e/run.mjs +653 -0
  94. sw2robot-0.4.1/tests/e2e/verify_bulk_types.mjs +93 -0
  95. sw2robot-0.4.1/tests/e2e/verify_frameonly.mjs +128 -0
  96. sw2robot-0.4.1/tests/e2e/verify_inertial.mjs +113 -0
  97. sw2robot-0.4.1/tests/e2e/verify_jointrec.mjs +86 -0
  98. sw2robot-0.4.1/tests/e2e/verify_logexport.mjs +75 -0
  99. sw2robot-0.4.1/tests/e2e/verify_record.mjs +113 -0
  100. sw2robot-0.4.1/tests/e2e/verify_replay.mjs +178 -0
  101. sw2robot-0.4.1/tests/e2e/verify_shiftclick.mjs +102 -0
  102. sw2robot-0.4.1/tests/e2e/verify_shortcuts.mjs +189 -0
  103. sw2robot-0.4.1/tests/e2e/verify_type_optimistic.mjs +113 -0
  104. sw2robot-0.4.1/tests/fixtures/servo_hone_38mm_1.T.npy +0 -0
  105. sw2robot-0.4.1/tests/fixtures/servo_hone_38mm_1.hull.ply +0 -0
  106. sw2robot-0.4.1/tests/fixtures/single_yaw_link_1.T.npy +0 -0
  107. sw2robot-0.4.1/tests/fixtures/single_yaw_link_1.hull.ply +0 -0
  108. sw2robot-0.4.1/tests/golden/fingertip_base.urdf +68 -0
  109. sw2robot-0.4.1/tests/golden/fingertip_edit.joints.yaml +26 -0
  110. sw2robot-0.4.1/tests/golden/fingertip_edited.urdf +70 -0
  111. sw2robot-0.4.1/tests/golden/fingertip_flip.urdf +68 -0
  112. sw2robot-0.4.1/tests/golden/fingertip_rename_direct.urdf +68 -0
  113. sw2robot-0.4.1/tests/test_3dxml_unique_names.py +128 -0
  114. sw2robot-0.4.1/tests/test_autoinit.py +169 -0
  115. sw2robot-0.4.1/tests/test_cad2rc_e2e.py +114 -0
  116. sw2robot-0.4.1/tests/test_cad_mode_webserver.py +317 -0
  117. sw2robot-0.4.1/tests/test_choose_base_hub.py +44 -0
  118. sw2robot-0.4.1/tests/test_classify_geo.py +146 -0
  119. sw2robot-0.4.1/tests/test_clear_mesh_cache.py +161 -0
  120. sw2robot-0.4.1/tests/test_coacd_collision.py +81 -0
  121. sw2robot-0.4.1/tests/test_coacd_smoke.py +39 -0
  122. sw2robot-0.4.1/tests/test_collision_baseline_sync.py +70 -0
  123. sw2robot-0.4.1/tests/test_com_int.py +36 -0
  124. sw2robot-0.4.1/tests/test_concentric_slide_promotion.py +100 -0
  125. sw2robot-0.4.1/tests/test_config_default_axis.py +50 -0
  126. sw2robot-0.4.1/tests/test_configuration_field.py +57 -0
  127. sw2robot-0.4.1/tests/test_coordinate_system_links.py +296 -0
  128. sw2robot-0.4.1/tests/test_coordinate_systems.py +258 -0
  129. sw2robot-0.4.1/tests/test_dof_folder.py +186 -0
  130. sw2robot-0.4.1/tests/test_expand.py +2462 -0
  131. sw2robot-0.4.1/tests/test_extract_configuration.py +143 -0
  132. sw2robot-0.4.1/tests/test_fastener_detect.py +95 -0
  133. sw2robot-0.4.1/tests/test_frame_only.py +211 -0
  134. sw2robot-0.4.1/tests/test_golden_cad_pipeline.py +167 -0
  135. sw2robot-0.4.1/tests/test_grounded_lock_parent.py +56 -0
  136. sw2robot-0.4.1/tests/test_inertia_mesh_units.py +60 -0
  137. sw2robot-0.4.1/tests/test_joint_attention.py +220 -0
  138. sw2robot-0.4.1/tests/test_joint_physics.py +224 -0
  139. sw2robot-0.4.1/tests/test_limit_joints.py +157 -0
  140. sw2robot-0.4.1/tests/test_link_edits.py +344 -0
  141. sw2robot-0.4.1/tests/test_loop_mimic.py +424 -0
  142. sw2robot-0.4.1/tests/test_mass_editor_webserver.py +242 -0
  143. sw2robot-0.4.1/tests/test_mass_only.py +216 -0
  144. sw2robot-0.4.1/tests/test_mass_override.py +253 -0
  145. sw2robot-0.4.1/tests/test_merge_fixed.py +352 -0
  146. sw2robot-0.4.1/tests/test_mesh_cache_config.py +95 -0
  147. sw2robot-0.4.1/tests/test_mesh_cache_freshness.py +57 -0
  148. sw2robot-0.4.1/tests/test_mesh_config_key.py +30 -0
  149. sw2robot-0.4.1/tests/test_mesh_fidelity.py +141 -0
  150. sw2robot-0.4.1/tests/test_mirror_angle_axis.py +81 -0
  151. sw2robot-0.4.1/tests/test_mirror_axis_fallback.py +125 -0
  152. sw2robot-0.4.1/tests/test_mirror_copy_parent.py +154 -0
  153. sw2robot-0.4.1/tests/test_port_selection.py +105 -0
  154. sw2robot-0.4.1/tests/test_ports.py +81 -0
  155. sw2robot-0.4.1/tests/test_primitive_collision.py +123 -0
  156. sw2robot-0.4.1/tests/test_reference_axis_override.py +136 -0
  157. sw2robot-0.4.1/tests/test_refresh_frames.py +136 -0
  158. sw2robot-0.4.1/tests/test_rename.py +88 -0
  159. sw2robot-0.4.1/tests/test_resolve_suppressed.py +81 -0
  160. sw2robot-0.4.1/tests/test_ros_export.py +1191 -0
  161. sw2robot-0.4.1/tests/test_sanitize_names.py +148 -0
  162. sw2robot-0.4.1/tests/test_save_3dxml_paths.py +60 -0
  163. sw2robot-0.4.1/tests/test_single_part.py +67 -0
  164. sw2robot-0.4.1/tests/test_snap_unsolved_mates.py +75 -0
  165. sw2robot-0.4.1/tests/test_sw2urdf_config.py +609 -0
  166. sw2robot-0.4.1/tests/test_sw_inertia.py +160 -0
  167. sw2robot-0.4.1/tests/test_sw_mass_props.py +86 -0
  168. sw2robot-0.4.1/tests/test_sw_unavailable.py +50 -0
  169. sw2robot-0.4.1/tests/test_trimesh_runtime_deps.py +87 -0
  170. sw2robot-0.4.1/tests/test_urdf_mode_webserver.py +1168 -0
  171. sw2robot-0.4.1/tests/test_urdf_parser_contract.py +201 -0
  172. sw2robot-0.4.1/tests/test_validate_dropped.py +35 -0
  173. sw2robot-0.4.1/tests/test_webserver_port.py +55 -0
@@ -0,0 +1,37 @@
1
+ # Python
2
+ .venv/
3
+ __pycache__/
4
+ *.pyc
5
+ *.egg-info/
6
+ build/
7
+ dist/
8
+ # uv lockfile: CI / release resolve deps with pip, not uv, so the lock is only
9
+ # a local `uv run` convenience -- untracked to avoid version churn / drift
10
+ uv.lock
11
+
12
+ # regenerated mesh caches (3DXML -> GLB, done on first view) -- keep the .3dxml
13
+ *.3dxml.glb
14
+
15
+ # build artifacts sw2urdf.build regenerates from graph.json
16
+ output/
17
+ examples/*/urdf/
18
+ examples/*/package.xml
19
+ examples/*/CMakeLists.txt
20
+
21
+ # test / tooling
22
+ tests/e2e/node_modules/
23
+ tests/e2e/package-lock.json
24
+ # runtime artifacts the editor writes into a served URDF package (keep the
25
+ # e2e fixtures pristine -- the overlay sidecar + live copy are regenerated)
26
+ tests/e2e/fixtures/**/*.sw2robot.json
27
+ tests/e2e/fixtures/**/.*.live.urdf
28
+ tests/e2e/fixtures/**/.*.expanded-preview-source.urdf
29
+ tests/e2e/fixtures/**/.*.collapsed-preview.urdf
30
+ _server*.txt
31
+ _client_report.json
32
+ _sldasm_index.json
33
+ _sw_spawned_pids.txt
34
+
35
+ # A global core.excludesFile ignores dotpaths via ".*"; keep repo meta tracked.
36
+ !.github/
37
+ !.github/**
@@ -0,0 +1,134 @@
1
+ # Contributing to sw2robot
2
+
3
+ Thanks for your interest in improving sw2robot. This document explains how to
4
+ propose changes so that they are reviewable by a small maintainer team.
5
+
6
+ Please read the two short sections below before opening an issue or a pull
7
+ request. They exist to keep review load sustainable — not to gatekeep.
8
+
9
+ ## TL;DR
10
+
11
+ - **Discuss first, code second.** Open an issue and get a maintainer to agree on
12
+ the approach before sending an implementation PR.
13
+ - **One PR = one reviewable change.** Small and focused beats large and stacked.
14
+ - **Disclose AI usage.** Say which tool you used and for what. See below.
15
+ - **Verify before you send.** If you didn't run it, it isn't ready.
16
+
17
+ ## Issues
18
+
19
+ - **Keep it short and specific.** State the problem, what you expected, and (for
20
+ bugs) exact steps to reproduce. A few focused sentences are worth more than a
21
+ long essay.
22
+ - **One topic per issue.** Don't batch several unrelated discussions into one
23
+ thread, and don't open many broad "discussion" issues at once — maintainers
24
+ cannot review them in parallel. Land one before opening the next.
25
+ - **Human-in-the-loop for AI.** You may use AI to help draft an issue, but a
26
+ human must read, edit, and stand behind every word before you post it.
27
+ Unedited, machine-generated walls of text will be closed with a request to
28
+ condense.
29
+
30
+ ### Attach a reproducible sample
31
+
32
+ This is an open-source project, so anything a maintainer cannot reproduce is
33
+ very hard to act on. If your issue involves a specific SolidWorks assembly or
34
+ part — a bug during extract/build, a wrong result, a shape the tool mishandles —
35
+ please attach the relevant `.sldasm` / `.sldprt` files (and any references they
36
+ need) as a **`.zip`** so we can open and inspect them here.
37
+
38
+ Two rules keep this practical and safe:
39
+
40
+ - **Make it minimal.** Include only what is needed to reproduce the behavior —
41
+ the smallest assembly/parts that still show the problem, not your whole
42
+ production model.
43
+ - **Never upload confidential CAD.** If the real parts are proprietary, replace
44
+ them with **dummy stand-ins** — simple placeholder geometry that reproduces
45
+ the same behavior (the mate structure, subassembly nesting, coordinate frame,
46
+ or shape characteristic that matters). Share the reproduction, not your
47
+ secrets.
48
+
49
+ If you genuinely cannot share a reproducible sample, say so and describe the
50
+ structure precisely instead — but expect that undiagnosable reports may be
51
+ closed.
52
+
53
+ ## Pull requests
54
+
55
+ ### Issue-first
56
+
57
+ Implementation PRs must reference an **accepted** issue — an issue a maintainer
58
+ has labelled [`accepted`](https://github.com/jsk-ros-pkg/solidworks_urdf_exporter2/issues?q=is%3Aissue+label%3Aaccepted),
59
+ meaning the direction has been agreed. Open an issue, discuss it, and wait for
60
+ that label before writing the implementation. Drive-by PRs that do not reference
61
+ an `accepted` issue may be closed without a full review, regardless of how much
62
+ code they contain. This is the single most important rule here: it prevents
63
+ wasted work on both sides.
64
+
65
+ **Maintainers are exempt.** Maintainers may open PRs directly without a
66
+ pre-filed `accepted` issue — they own the roadmap and are trusted to apply good
67
+ judgment. The keep-it-small, verify-it, and demo-for-UI rules below still apply
68
+ to everyone, maintainers included. For a non-trivial or contentious change, a
69
+ maintainer is still encouraged to open an issue first so others can weigh in.
70
+
71
+ ### Keep PRs small and independent
72
+
73
+ - Aim for one logical change per PR. If you find yourself writing "Part 3 of 7"
74
+ or stacking many branches, that is a signal to stop and talk to a maintainer
75
+ about scope first.
76
+ - Large stacked PRs (thousands of lines across many dependent branches) will be
77
+ sent back for splitting. Reviewers review the **diff**, not the description —
78
+ a change that cannot be understood from its diff is not ready.
79
+ - Write the PR description for a human reviewer: a few lines on *what* changed
80
+ and *why*. Skip auto-generated multi-section essays.
81
+
82
+ ### Verify your change
83
+
84
+ Before requesting review, make sure:
85
+
86
+ - The code builds and the test suite passes locally.
87
+ - You have **actually run** the change and confirmed it does what the PR claims,
88
+ on the platforms it affects (note that `extract` is Windows + SolidWorks only).
89
+ - New behavior has a test where practical.
90
+
91
+ ### Show your work for UI changes
92
+
93
+ If your PR changes the browser editor UI or any user-visible behavior, include
94
+ **proof that you ran it**:
95
+
96
+ - A **short screen recording** (a few seconds is enough) of the new behavior in
97
+ action is required for interactive changes — a new control, a changed flow, a
98
+ fixed visual bug. GitHub lets you drag a video straight into the PR
99
+ description.
100
+ - A **before/after screenshot** is acceptable for a purely static visual change
101
+ (layout, color, label).
102
+
103
+ This is not busywork: a working demo is the clearest evidence that the change
104
+ does what the description says. PRs that alter the UI without a demo will be sent
105
+ back with a request for one before review.
106
+
107
+ ## AI usage policy
108
+
109
+ sw2robot is not anti-AI. Maintainers use AI tooling too. We care about the
110
+ **quality** of a contribution, not how it was produced. The rules exist because
111
+ low-effort, unverified AI output shifts the entire cost of a contribution onto
112
+ the people reviewing it.
113
+
114
+ 1. **Disclose all AI usage.** In the PR/issue, state the tool(s) used and the
115
+ extent of assistance (e.g. "drafted with an LLM, reviewed and edited by
116
+ hand", or "wrote the tests myself, used AI for the docstrings").
117
+ 2. **AI-assisted implementation PRs are for `accepted` issues only.** See
118
+ Issue-first above.
119
+ 3. **You are responsible for everything you submit.** "The AI wrote it" is not
120
+ an explanation for a bug or a design choice. You must understand and be able
121
+ to defend every line.
122
+ 4. **No AI-generated media** (images, video, audio) in issues, PRs, or the repo.
123
+ 5. **Repeatedly submitting unverified AI slop** — fabricated bug reports, code
124
+ the author clearly doesn't understand, or floods of stacked PRs/issues — may
125
+ result in being blocked from further contributions.
126
+
127
+ If you follow these rules, AI assistance is welcome. If you use it to generate
128
+ volume you haven't reviewed, expect it to be closed.
129
+
130
+ ## Questions
131
+
132
+ If you're unsure whether something is in scope or how big a change should be,
133
+ open an issue and ask before writing code. That conversation is always cheaper
134
+ than a rejected PR.
sw2robot-0.4.1/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 Iori Yanokura
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.