lithop 0.3.0 → 0.4.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Cargo.lock +1 -1
- data/README.md +14 -11
- data/RELEASING.md +3 -3
- data/docs/README.md +4 -3
- data/docs/artifacts.md +27 -15
- data/docs/bambu-studio.md +12 -10
- data/docs/calibration.md +4 -4
- data/docs/color-model.md +20 -18
- data/docs/command.md +28 -12
- data/docs/config.md +42 -30
- data/docs/getting-started.md +12 -6
- data/docs/local-ui.md +12 -9
- data/docs/tiling.md +18 -19
- data/docs/troubleshooting.md +3 -3
- data/ext/lithop_native/Cargo.toml +1 -1
- data/lib/lithop/calibration/target.rb +5 -5
- data/lib/lithop/cli/image_adjustment_options.rb +33 -0
- data/lib/lithop/cli/image_options.rb +5 -18
- data/lib/lithop/cli/options.rb +4 -4
- data/lib/lithop/export/color_metadata.rb +46 -23
- data/lib/lithop/export/generation.rb +8 -10
- data/lib/lithop/export/planning.rb +82 -45
- data/lib/lithop/export/print_readme.rb +20 -4
- data/lib/lithop/formats/three_mf/bambu_metadata.rb +11 -8
- data/lib/lithop/formats/three_mf/model_writer.rb +2 -5
- data/lib/lithop/image/pipeline.rb +40 -26
- data/lib/lithop/image/svg_loader.rb +11 -2
- data/lib/lithop/layer_structure.rb +0 -9
- data/lib/lithop/model/filament_profile.rb +3 -3
- data/lib/lithop/model/material_display_map.rb +2 -1
- data/lib/lithop/model/z_region_model.rb +44 -0
- data/lib/lithop/settings.rb +147 -15
- data/lib/lithop/settings_file.rb +1 -0
- data/lib/lithop/version.rb +1 -1
- data/lib/lithop/web/app.rb +9 -5
- data/lib/lithop/web/public/app.css +48 -37
- data/lib/lithop/web/public/app.js +149 -47
- data/lib/lithop/web/settings_form.rb +8 -5
- data/lib/lithop/web/views/index.erb +129 -75
- data/lib/lithop.rb +2 -1
- data/sig/lithop.rbs +16 -0
- metadata +3 -2
- data/lib/lithop/model/layer_region_model.rb +0 -24
|
@@ -10,34 +10,34 @@
|
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<header class="site-header">
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
<div class="site-header-main">
|
|
14
|
+
<div class="brand-block">
|
|
15
|
+
<p class="eyebrow">LOCAL CMYW WORKSPACE</p>
|
|
16
|
+
<a class="brand" href="/?view=create" data-view-target="create">Lithop</a>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="header-context">
|
|
19
|
+
<span class="project-name"><%= h @project_name %></span>
|
|
20
|
+
<span aria-hidden="true">/</span>
|
|
21
|
+
<strong id="current-view-label"><%= { "create" => "作成", "jobs" => "ジョブ", "presets" => "プリセット" }.fetch(@initial_view) %></strong>
|
|
22
|
+
</div>
|
|
23
|
+
<div id="global-job-control" class="global-job-control" <%= "hidden" unless @selected_job_id %>>
|
|
24
|
+
<button id="global-job-link" class="header-action" type="button"><span id="global-job-label">ジョブを取得中</span><small id="global-job-percent">0%</small></button>
|
|
25
|
+
<button id="global-cancel-button" class="header-action danger-text" type="button">停止</button>
|
|
26
|
+
</div>
|
|
27
|
+
<button id="help-button" class="header-action" type="button">使い方</button>
|
|
28
|
+
<span class="local-badge">127.0.0.1</span>
|
|
26
29
|
</div>
|
|
27
|
-
<
|
|
28
|
-
|
|
30
|
+
<nav id="primary-navigation" class="primary-navigation" aria-label="主メニュー">
|
|
31
|
+
<button type="button" data-view-target="create" <%= 'aria-current="page"' if @initial_view == "create" %>><span>01</span><strong>作成</strong><small>画像と設定</small></button>
|
|
32
|
+
<button type="button" data-view-target="jobs" <%= 'aria-current="page"' if @initial_view == "jobs" %>><span>02</span><strong>ジョブ</strong><small>履歴と成果物</small></button>
|
|
33
|
+
<button type="button" data-view-target="presets" <%= 'aria-current="page"' if @initial_view == "presets" %>><span>03</span><strong>プリセット</strong><small>設定の再利用</small></button>
|
|
34
|
+
</nav>
|
|
29
35
|
</header>
|
|
30
36
|
|
|
31
37
|
<main class="workspace" data-selected-job="<%= h @selected_job_id %>" data-view="<%= h @initial_view %>">
|
|
32
38
|
<div id="page-notice" class="notice error" role="alert" <%= "hidden" unless @error %>><%= h @error %></div>
|
|
33
39
|
|
|
34
40
|
<div class="app-shell">
|
|
35
|
-
<nav id="primary-navigation" class="primary-navigation" aria-label="主メニュー">
|
|
36
|
-
<button type="button" data-view-target="create" <%= 'aria-current="page"' if @initial_view == "create" %>><span>01</span>作成<small>画像と設定</small></button>
|
|
37
|
-
<button type="button" data-view-target="jobs" <%= 'aria-current="page"' if @initial_view == "jobs" %>><span>02</span>ジョブ<small>履歴と成果物</small></button>
|
|
38
|
-
<button type="button" data-view-target="presets" <%= 'aria-current="page"' if @initial_view == "presets" %>><span>03</span>プリセット<small>設定の再利用</small></button>
|
|
39
|
-
</nav>
|
|
40
|
-
<div id="navigation-scrim" class="navigation-scrim" hidden></div>
|
|
41
41
|
<div class="app-content">
|
|
42
42
|
|
|
43
43
|
<section id="view-create" class="app-view" data-app-view="create" aria-labelledby="create-view-title" <%= "hidden" unless @initial_view == "create" %>>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<div class="workspace-primary">
|
|
46
46
|
<section class="panel editor-panel">
|
|
47
47
|
<div class="section-heading">
|
|
48
|
-
<div><p class="step">
|
|
48
|
+
<div><p class="step">CREATE</p><h2>画像と設定</h2></div>
|
|
49
49
|
<span class="context-badge">編集中</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
@@ -59,8 +59,29 @@
|
|
|
59
59
|
<input id="image-input" name="image" type="file" accept=".jpeg,.jpg,.png,.svg,image/jpeg,image/png,image/svg+xml" required>
|
|
60
60
|
</label>
|
|
61
61
|
|
|
62
|
-
<
|
|
63
|
-
<
|
|
62
|
+
<section class="conversion-actions" aria-label="変換の開始">
|
|
63
|
+
<div class="conversion-action-row">
|
|
64
|
+
<span id="draft-state" tabindex="-1" aria-live="polite">画像を選択してください</span>
|
|
65
|
+
<button id="submit-button" class="primary-button" type="submit">変換を開始</button>
|
|
66
|
+
</div>
|
|
67
|
+
<details id="draft-summary" class="draft-summary">
|
|
68
|
+
<summary class="summary-heading"><strong id="draft-summary-title">変換する内容</strong><span id="draft-summary-change">未実行</span></summary>
|
|
69
|
+
<dl id="draft-summary-values"></dl>
|
|
70
|
+
</details>
|
|
71
|
+
<p id="form-error" class="notice error" role="alert" hidden></p>
|
|
72
|
+
</section>
|
|
73
|
+
|
|
74
|
+
<nav class="settings-navigation" aria-label="設定区分">
|
|
75
|
+
<button type="button" data-settings-target="settings-basic" aria-current="true">基本設定</button>
|
|
76
|
+
<button type="button" data-settings-target="settings-placement">画像配置</button>
|
|
77
|
+
<button type="button" data-settings-target="settings-adjustment">画像調整</button>
|
|
78
|
+
<button type="button" data-settings-target="settings-yellow">Yellow補正</button>
|
|
79
|
+
<button type="button" data-settings-target="settings-split">分割</button>
|
|
80
|
+
<button type="button" data-settings-target="settings-advanced">詳細設定</button>
|
|
81
|
+
</nav>
|
|
82
|
+
|
|
83
|
+
<details id="settings-basic" class="settings-section" open>
|
|
84
|
+
<summary><span>基本設定</span><small>寸法・セル・積層順</small></summary>
|
|
64
85
|
<div class="settings-body">
|
|
65
86
|
<div class="inline-actions">
|
|
66
87
|
<label class="check-label"><input id="aspect-lock" type="checkbox" checked>縦横比を固定</label>
|
|
@@ -72,11 +93,22 @@
|
|
|
72
93
|
<label>高さ <span>mm</span><input id="height" name="height" type="number" min="0.01" step="0.01" value="<%= h @values['height'] %>" data-default="<%= h @values['height'] %>" required></label>
|
|
73
94
|
<label>XYセル <span>mm</span><input name="pixel_size" type="number" min="0.01" step="0.01" value="<%= h @values['pixel_size'] %>" data-default="<%= h @values['pixel_size'] %>" required></label>
|
|
74
95
|
<label>色セル <span>mm</span><input name="color_pixel_size" type="number" min="0.01" step="0.01" value="<%= h @values['color_pixel_size'] %>" data-default="<%= h @values['color_pixel_size'] %>" placeholder="XYセルと同じ"></label>
|
|
96
|
+
<label>色の積層順
|
|
97
|
+
<select id="pigment-order" name="pigment_order" data-default="<%= h @values['pigment_order'] %>">
|
|
98
|
+
<% Lithop::Settings::PIGMENT_ORDERS.each do |order| %>
|
|
99
|
+
<% value = order.join(",") %>
|
|
100
|
+
<% abbreviation = order.map { |pigment| pigment.to_s[0].upcase }.join %>
|
|
101
|
+
<% names = order.map { |pigment| pigment.to_s.capitalize }.join(" → ") %>
|
|
102
|
+
<option value="<%= h value %>" <%= "selected" if selected?(:pigment_order, value) %>><%= h abbreviation %>(<%= h names %>)</option>
|
|
103
|
+
<% end %>
|
|
104
|
+
</select>
|
|
105
|
+
</label>
|
|
75
106
|
</div>
|
|
107
|
+
<p class="fine-print">バックライト側から観察側へ積み重ねるCyan・Magenta・Yellowの順序です。Whiteは常に最後です。</p>
|
|
76
108
|
</div>
|
|
77
109
|
</details>
|
|
78
110
|
|
|
79
|
-
<details class="settings-section" open>
|
|
111
|
+
<details id="settings-placement" class="settings-section" open>
|
|
80
112
|
<summary><span>画像配置</span><small>収め方とクロップ</small></summary>
|
|
81
113
|
<div class="settings-body">
|
|
82
114
|
<div class="section-actions"><button class="text-button section-reset" type="button">初期値へ戻す</button></div>
|
|
@@ -103,8 +135,8 @@
|
|
|
103
135
|
</div>
|
|
104
136
|
</details>
|
|
105
137
|
|
|
106
|
-
<details class="settings-section" open>
|
|
107
|
-
<summary><span>画像調整</span><small
|
|
138
|
+
<details id="settings-adjustment" class="settings-section" open>
|
|
139
|
+
<summary><span>画像調整</span><small>明るさ・コントラスト・彩度・淡色</small></summary>
|
|
108
140
|
<div class="settings-body">
|
|
109
141
|
<div class="section-actions"><button class="text-button section-reset" type="button">初期値へ戻す</button></div>
|
|
110
142
|
<div class="adjustment-grid">
|
|
@@ -115,10 +147,31 @@
|
|
|
115
147
|
</label>
|
|
116
148
|
<% end %>
|
|
117
149
|
</div>
|
|
150
|
+
<label class="check-label"><input id="suppress-pale-colors" name="suppress_pale_colors" type="checkbox" value="1" data-default="<%= checked?(:suppress_pale_colors) ? '1' : '0' %>" <%= "checked" if checked?(:suppress_pale_colors) %>>ごく薄い色差をWhiteにする</label>
|
|
151
|
+
</div>
|
|
152
|
+
</details>
|
|
153
|
+
|
|
154
|
+
<details id="settings-yellow" class="settings-section">
|
|
155
|
+
<summary><span>Yellow補正</span><small>混ぜる色と割合</small></summary>
|
|
156
|
+
<div class="settings-body">
|
|
157
|
+
<div class="section-actions"><button class="text-button section-reset" type="button">初期値へ戻す</button></div>
|
|
158
|
+
<div class="form-grid">
|
|
159
|
+
<label>Yellowへ混ぜる色
|
|
160
|
+
<select id="yellow-mix-color" name="yellow_mix_color" data-default="<%= h @values['yellow_mix_color'] %>">
|
|
161
|
+
<option value="cyan" <%= "selected" if selected?(:yellow_mix_color, "cyan") %>>Cyan</option>
|
|
162
|
+
<option value="magenta" <%= "selected" if selected?(:yellow_mix_color, "magenta") %>>Magenta</option>
|
|
163
|
+
</select>
|
|
164
|
+
</label>
|
|
165
|
+
<label class="range-field">Yellow混色率 <span>%</span>
|
|
166
|
+
<input class="range-control" type="range" min="0" max="100" step="1" data-sync="yellow-mix-percent" aria-label="Yellow混色率スライダー">
|
|
167
|
+
<input id="yellow-mix-percent" name="yellow_mix_percent" type="number" min="0" max="100" step="1" value="<%= h @values['yellow_mix_percent'] %>" data-default="<%= h @values['yellow_mix_percent'] %>" required>
|
|
168
|
+
</label>
|
|
169
|
+
</div>
|
|
170
|
+
<p class="fine-print">Yellow被覆量の指定割合を選択色へ置き換えます。0%では変更しません。</p>
|
|
118
171
|
</div>
|
|
119
172
|
</details>
|
|
120
173
|
|
|
121
|
-
<details class="settings-section">
|
|
174
|
+
<details id="settings-split" class="settings-section">
|
|
122
175
|
<summary><span>分割</span><small>XYタイルとZプレート</small></summary>
|
|
123
176
|
<div class="settings-body">
|
|
124
177
|
<div class="section-actions"><button class="text-button section-reset" type="button">初期値へ戻す</button></div>
|
|
@@ -134,20 +187,20 @@
|
|
|
134
187
|
<label class="grid-only">行数<input name="tile_rows" type="number" min="1" step="1" value="<%= h @values['tile_rows'] %>" data-default="<%= h @values['tile_rows'] %>"></label>
|
|
135
188
|
<label class="grid-only">列数<input name="tile_columns" type="number" min="1" step="1" value="<%= h @values['tile_columns'] %>" data-default="<%= h @values['tile_columns'] %>"></label>
|
|
136
189
|
<label class="check-label z-parts-toggle"><input id="separate-z-parts" name="separate_z_parts" type="checkbox" value="1" data-default="<%= checked?(:separate_z_parts) ? '1' : '0' %>" <%= "checked" if checked?(:separate_z_parts) %>>Z方向を別プレートに分割</label>
|
|
137
|
-
<label id="color-region-field"
|
|
190
|
+
<label id="color-region-field">最大Zプレート数<input id="color-region-parts" name="color_region_parts" type="number" min="1" max="3" step="1" value="<%= h @values['color_region_parts'] %>" data-default="<%= h @values['color_region_parts'] %>" required></label>
|
|
138
191
|
</div>
|
|
139
192
|
<p id="z-parts-summary" class="fine-print"></p>
|
|
140
193
|
<div id="z-parts-diagram" class="z-parts-diagram" aria-label="Z方向のプレート構成"></div>
|
|
141
194
|
</div>
|
|
142
195
|
</details>
|
|
143
196
|
|
|
144
|
-
<details class="settings-section">
|
|
197
|
+
<details id="settings-advanced" class="settings-section">
|
|
145
198
|
<summary><span>詳細設定</span><small>厚み・余白・ノズル</small></summary>
|
|
146
199
|
<div class="settings-body">
|
|
147
200
|
<div class="section-actions"><button class="text-button section-reset" type="button">初期値へ戻す</button></div>
|
|
148
201
|
<div class="form-grid">
|
|
149
202
|
<label>最小厚み <span>mm</span><input name="minimum_thickness" type="number" min="0.01" step="0.01" value="<%= h @values['minimum_thickness'] %>" data-default="<%= h @values['minimum_thickness'] %>" required></label>
|
|
150
|
-
<label>最大厚み <span>mm</span><input name="maximum_thickness" type="number" min="0.01" step="0.
|
|
203
|
+
<label>最大厚み <span>mm</span><input name="maximum_thickness" type="number" min="0.01" step="0.01" value="<%= h @values['maximum_thickness'] %>" data-default="<%= h @values['maximum_thickness'] %>" required></label>
|
|
151
204
|
<label>ノズル <span>mm</span>
|
|
152
205
|
<select name="nozzle_diameter" data-default="<%= h @values['nozzle_diameter'] %>">
|
|
153
206
|
<option value="0.2" <%= "selected" if selected?(:nozzle_diameter, 0.2) %>>0.2</option>
|
|
@@ -163,26 +216,12 @@
|
|
|
163
216
|
</div>
|
|
164
217
|
</details>
|
|
165
218
|
|
|
166
|
-
<div class="settings-shortcut">
|
|
167
|
-
<div><strong>設定の再利用</strong><small>プリセットと下書きは専用画面で管理します。</small></div>
|
|
168
|
-
<button class="secondary-button" type="button" data-view-target="presets">プリセットを開く</button>
|
|
169
|
-
</div>
|
|
170
|
-
|
|
171
|
-
<p id="form-error" class="notice error" role="alert" hidden></p>
|
|
172
|
-
<section id="draft-summary" class="draft-summary" aria-labelledby="draft-summary-title">
|
|
173
|
-
<div class="summary-heading"><strong id="draft-summary-title">変換する内容</strong><span id="draft-summary-change">未実行</span></div>
|
|
174
|
-
<dl id="draft-summary-values"></dl>
|
|
175
|
-
</section>
|
|
176
|
-
<div class="submit-bar">
|
|
177
|
-
<span id="draft-state" aria-live="polite">画像を選択してください</span>
|
|
178
|
-
<button id="submit-button" class="primary-button" type="submit">変換を開始</button>
|
|
179
|
-
</div>
|
|
180
219
|
</form>
|
|
181
220
|
</section>
|
|
182
221
|
|
|
183
222
|
<section class="panel preview-panel">
|
|
184
223
|
<div class="section-heading compact-heading">
|
|
185
|
-
<div><p class="step">
|
|
224
|
+
<div><p class="step">PREVIEW</p><h2>入力プレビュー</h2></div>
|
|
186
225
|
<span id="preview-dimensions" class="dimension-badge"><%= h @values['width'] %> × <%= h @values['height'] %> mm</span>
|
|
187
226
|
</div>
|
|
188
227
|
<div class="preview-toolbar" data-viewer="source-preview">
|
|
@@ -208,12 +247,12 @@
|
|
|
208
247
|
<div class="jobs-workspace">
|
|
209
248
|
<section id="job-panel" class="panel job-panel" <%= "hidden" unless @selected_job_id %>>
|
|
210
249
|
<button id="back-to-job-list" class="text-button back-to-job-list" type="button">← 一覧へ戻る</button>
|
|
211
|
-
<div class="section-heading"><div><p class="step">
|
|
250
|
+
<div class="section-heading"><div><p class="step">JOB DETAIL</p><h2>表示中の変換ジョブ</h2></div><span id="job-state" class="state-pill" aria-live="polite">待機中</span></div>
|
|
212
251
|
<div class="job-meta"><div><p id="job-view-name" class="job-view-name">ジョブを読み込んでいます</p><p id="job-id" class="job-id"><%= h @selected_job_id %></p></div><p id="job-settings-snapshot" class="fine-print"></p></div>
|
|
213
252
|
<div class="progress-track" role="progressbar" aria-label="変換進捗" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span id="progress-bar"></span></div>
|
|
214
253
|
<div class="job-copy"><strong id="job-percent">0%</strong><span id="job-message">変換を開始しています</span></div>
|
|
215
254
|
<div class="job-freshness"><span id="job-connection" role="status" aria-live="polite">状態を取得しています</span><span id="job-updated-at"></span><button id="retry-status-button" class="text-button" type="button" hidden>状態を再取得</button></div>
|
|
216
|
-
<div class="job-actions"><button id="cancel-button" class="secondary-button" type="button">停止</button><button id="load-job-settings" class="secondary-button" type="button" hidden
|
|
255
|
+
<div class="job-actions"><button id="cancel-button" class="secondary-button" type="button">停止</button><button id="load-job-settings" class="secondary-button" type="button" hidden>作成に適用</button><button id="delete-button" class="danger-button" type="button" hidden>ジョブを削除</button></div>
|
|
217
256
|
<p id="delete-summary" class="fine-print" hidden></p>
|
|
218
257
|
<div id="job-detail-tabs" class="job-detail-tabs" role="tablist" aria-label="ジョブ詳細" hidden>
|
|
219
258
|
<button type="button" role="tab" aria-selected="true" aria-controls="job-preview-panel" data-job-tab="preview">プレビュー</button>
|
|
@@ -247,7 +286,7 @@
|
|
|
247
286
|
<section id="job-settings-panel" data-job-panel="settings" role="tabpanel" hidden>
|
|
248
287
|
<h3>生成時の設定</h3>
|
|
249
288
|
<dl id="job-setting-details" class="job-setting-details"></dl>
|
|
250
|
-
<p class="fine-print"
|
|
289
|
+
<p class="fine-print">この設定を作成に適用しても、現在選択中の画像は維持されます。</p>
|
|
251
290
|
<a id="job-detail-log-link" class="text-button" href="#" target="_blank" rel="noopener" hidden>ローカルログを開く</a>
|
|
252
291
|
</section>
|
|
253
292
|
</div>
|
|
@@ -265,10 +304,15 @@
|
|
|
265
304
|
<label>終了日<input id="history-date-to" type="date"></label>
|
|
266
305
|
<label>並び順<select id="history-sort"><option value="created_desc">新しい順</option><option value="created_asc">古い順</option><option value="name_asc">入力名 A–Z</option><option value="name_desc">入力名 Z–A</option></select></label>
|
|
267
306
|
</div>
|
|
268
|
-
<div class="history-selection-
|
|
269
|
-
<
|
|
270
|
-
|
|
271
|
-
|
|
307
|
+
<div class="history-selection-toolbar">
|
|
308
|
+
<div class="history-selection-summary">
|
|
309
|
+
<span id="history-selection-status" aria-live="polite">未選択</span>
|
|
310
|
+
<button id="select-all-jobs" class="text-button" type="button" aria-pressed="false" disabled>全てを選択する</button>
|
|
311
|
+
</div>
|
|
312
|
+
<div class="history-selection-actions">
|
|
313
|
+
<button id="compare-jobs" class="secondary-button" type="button" disabled>2件を比較</button>
|
|
314
|
+
<button id="delete-selected-jobs" class="danger-button" type="button" disabled>選択したジョブを削除</button>
|
|
315
|
+
</div>
|
|
272
316
|
</div>
|
|
273
317
|
<p id="history-empty" class="empty-copy" <%= "hidden" unless @jobs.empty? %>>まだジョブはありません。</p>
|
|
274
318
|
<ol id="job-list" class="job-list">
|
|
@@ -288,31 +332,41 @@
|
|
|
288
332
|
|
|
289
333
|
<section id="view-presets" class="app-view" data-app-view="presets" aria-labelledby="presets-view-title" <%= "hidden" unless @initial_view == "presets" %>>
|
|
290
334
|
<h1 id="presets-view-title" class="view-title" tabindex="-1">プリセット</h1>
|
|
291
|
-
<
|
|
292
|
-
<
|
|
293
|
-
<div
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
<div class="settings-library">
|
|
298
|
-
<label>名前付きプリセット
|
|
335
|
+
<div class="presets-workspace">
|
|
336
|
+
<aside class="panel preset-list-panel" aria-labelledby="preset-list-title">
|
|
337
|
+
<div class="section-heading compact-heading">
|
|
338
|
+
<div><p class="step">SAVED SETTINGS</p><h2 id="preset-list-title">保存設定</h2></div>
|
|
339
|
+
</div>
|
|
340
|
+
<label class="preset-select-label">名前付きプリセット
|
|
299
341
|
<select id="preset-select"><option value="">プリセットを選択</option></select>
|
|
300
342
|
</label>
|
|
301
|
-
<
|
|
302
|
-
<div class="
|
|
303
|
-
<
|
|
304
|
-
<
|
|
305
|
-
<button id="
|
|
306
|
-
<button id="preset-delete" class="text-button danger-text" type="button">削除</button>
|
|
343
|
+
<button id="preset-load" class="secondary-button preset-apply-button" type="button">作成に適用</button>
|
|
344
|
+
<div class="draft-apply">
|
|
345
|
+
<strong>下書き</strong>
|
|
346
|
+
<small>最後に保存した1件の編集設定</small>
|
|
347
|
+
<button id="draft-restore" class="secondary-button" type="button">作成に適用</button>
|
|
307
348
|
</div>
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
<
|
|
349
|
+
</aside>
|
|
350
|
+
<section id="settings-library-section" class="panel preset-panel">
|
|
351
|
+
<div class="section-heading">
|
|
352
|
+
<div><p class="step">MANAGE SETTINGS</p><h2>保存と管理</h2></div>
|
|
312
353
|
</div>
|
|
313
|
-
<p
|
|
314
|
-
|
|
315
|
-
|
|
354
|
+
<p class="preset-intro">現在の編集設定を保存・再利用します。入力画像、ジョブID、成果物パスは保存しません。</p>
|
|
355
|
+
<div class="settings-library">
|
|
356
|
+
<label>プリセット名<input id="preset-name" type="text" maxlength="80" autocomplete="off" placeholder="例: 細線 0.2 mm"></label>
|
|
357
|
+
<div class="library-actions">
|
|
358
|
+
<button id="preset-save" class="secondary-button" type="button">現在設定を保存</button>
|
|
359
|
+
<button id="preset-rename" class="text-button" type="button">名前変更</button>
|
|
360
|
+
<button id="preset-delete" class="text-button danger-text" type="button">削除</button>
|
|
361
|
+
</div>
|
|
362
|
+
<div class="library-actions draft-actions">
|
|
363
|
+
<button id="draft-save" class="secondary-button" type="button">下書き保存</button>
|
|
364
|
+
<button id="draft-delete" class="text-button danger-text" type="button">下書きを削除</button>
|
|
365
|
+
</div>
|
|
366
|
+
<p id="settings-library-status" class="fine-print" role="status" aria-live="polite">画像は保存しません。復元後に画像を選択してください。</p>
|
|
367
|
+
</div>
|
|
368
|
+
</section>
|
|
369
|
+
</div>
|
|
316
370
|
</section>
|
|
317
371
|
</div>
|
|
318
372
|
</div>
|
|
@@ -344,7 +398,7 @@
|
|
|
344
398
|
<p id="job-compare-status" class="notice info" role="status" hidden></p>
|
|
345
399
|
<div class="job-compare-grid">
|
|
346
400
|
<% %w[a b].each do |side| %>
|
|
347
|
-
<figure><figcaption><strong id="compare-<%= side %>-name"></strong><span id="compare-<%= side %>-meta"></span></figcaption><div id="compare-<%= side %>-preview" class="result-preview preview-viewport" data-viewer-group="job-compare-preview" data-background="checker"><img id="compare-<%= side %>-image" alt="比較する生成結果 <%= side.upcase %>" draggable="false"><p id="compare-<%= side %>-missing" hidden>この画像はありません</p></div><button id="compare-<%= side %>-use" class="text-button" type="button"
|
|
401
|
+
<figure><figcaption><strong id="compare-<%= side %>-name"></strong><span id="compare-<%= side %>-meta"></span></figcaption><div id="compare-<%= side %>-preview" class="result-preview preview-viewport" data-viewer-group="job-compare-preview" data-background="checker"><img id="compare-<%= side %>-image" alt="比較する生成結果 <%= side.upcase %>" draggable="false"><p id="compare-<%= side %>-missing" hidden>この画像はありません</p></div><button id="compare-<%= side %>-use" class="text-button" type="button">作成に適用</button></figure>
|
|
348
402
|
<% end %>
|
|
349
403
|
</div>
|
|
350
404
|
<section class="compare-settings"><h3>仕上がりに関係する設定差</h3><div class="table-scroll"><table><thead><tr><th>項目</th><th>A</th><th>B</th></tr></thead><tbody id="job-compare-differences"></tbody></table></div></section>
|
data/lib/lithop.rb
CHANGED
|
@@ -21,7 +21,7 @@ require_relative "lithop/model/palette"
|
|
|
21
21
|
require_relative "lithop/model/material_display_map"
|
|
22
22
|
require_relative "lithop/model/filament_profile"
|
|
23
23
|
require_relative "lithop/model/material_model"
|
|
24
|
-
require_relative "lithop/model/
|
|
24
|
+
require_relative "lithop/model/z_region_model"
|
|
25
25
|
require_relative "lithop/tiling"
|
|
26
26
|
require_relative "lithop/image/placement"
|
|
27
27
|
require_relative "lithop/image/svg_loader"
|
|
@@ -53,6 +53,7 @@ require_relative "lithop/export/print_readme"
|
|
|
53
53
|
require_relative "lithop/export/previews"
|
|
54
54
|
require_relative "lithop/export/generation"
|
|
55
55
|
require_relative "lithop/export/job"
|
|
56
|
+
require_relative "lithop/cli/image_adjustment_options"
|
|
56
57
|
require_relative "lithop/cli/image_options"
|
|
57
58
|
require_relative "lithop/cli/options"
|
|
58
59
|
require_relative "lithop/cli/settings"
|
data/sig/lithop.rbs
CHANGED
|
@@ -49,6 +49,9 @@ module Lithop
|
|
|
49
49
|
attr_reader brightness: Numeric
|
|
50
50
|
attr_reader contrast: Numeric
|
|
51
51
|
attr_reader saturation: Numeric
|
|
52
|
+
attr_reader suppress_pale_colors: bool
|
|
53
|
+
attr_reader yellow_mix_color: String
|
|
54
|
+
attr_reader yellow_mix_percent: Numeric
|
|
52
55
|
attr_reader minimum_thickness: Numeric
|
|
53
56
|
attr_reader maximum_thickness: Numeric
|
|
54
57
|
attr_reader pixel_size: Numeric
|
|
@@ -88,6 +91,19 @@ module Lithop
|
|
|
88
91
|
def resolved_tile_shape: () -> [Integer, Integer]
|
|
89
92
|
def resolved_tile_rows: () -> Integer
|
|
90
93
|
def resolved_tile_columns: () -> Integer
|
|
94
|
+
def resolved_z_part_boundaries: () -> Array[Float]
|
|
95
|
+
def resolved_z_part_ranges: () -> Array[Range[Float]]
|
|
96
|
+
def resolved_z_color_ranges: () -> Array[Range[Float]]
|
|
97
|
+
def resolved_z_part_count: () -> Integer
|
|
98
|
+
def z_separated_minimum_thickness: () -> Float
|
|
99
|
+
def z_separated_source_end: () -> Float
|
|
100
|
+
def z_part_base_white_layers: (?Integer index) -> Integer
|
|
101
|
+
def z_part_base_white_thickness: (?Integer index) -> Float
|
|
102
|
+
def z_part_base_white_layers_by_plate: () -> Array[Integer]
|
|
103
|
+
def z_part_base_white_thicknesses: () -> Array[Float]
|
|
104
|
+
def z_part_minimum_build_thickness: () -> Float
|
|
105
|
+
def z_separated_output_minimum_thickness: () -> Float
|
|
106
|
+
def z_separated_output_maximum_thickness: () -> Float
|
|
91
107
|
def estimated_triangles: () -> Integer
|
|
92
108
|
def triangle_limit_message: (String label, Integer triangle_count) -> String
|
|
93
109
|
def x_boundaries: () -> Array[Numeric]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lithop
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ogom
|
|
@@ -154,6 +154,7 @@ files:
|
|
|
154
154
|
- lib/lithop/calibration/thickness_selector.rb
|
|
155
155
|
- lib/lithop/cli.rb
|
|
156
156
|
- lib/lithop/cli/calibration.rb
|
|
157
|
+
- lib/lithop/cli/image_adjustment_options.rb
|
|
157
158
|
- lib/lithop/cli/image_options.rb
|
|
158
159
|
- lib/lithop/cli/options.rb
|
|
159
160
|
- lib/lithop/cli/settings.rb
|
|
@@ -188,11 +189,11 @@ files:
|
|
|
188
189
|
- lib/lithop/mesh/voxel_geometry.rb
|
|
189
190
|
- lib/lithop/mesh/voxel_topology.rb
|
|
190
191
|
- lib/lithop/model/filament_profile.rb
|
|
191
|
-
- lib/lithop/model/layer_region_model.rb
|
|
192
192
|
- lib/lithop/model/material_display_map.rb
|
|
193
193
|
- lib/lithop/model/material_model.rb
|
|
194
194
|
- lib/lithop/model/palette.rb
|
|
195
195
|
- lib/lithop/model/thickness.rb
|
|
196
|
+
- lib/lithop/model/z_region_model.rb
|
|
196
197
|
- lib/lithop/native.rb
|
|
197
198
|
- lib/lithop/reference_three_mf.rb
|
|
198
199
|
- lib/lithop/sampling_grid.rb
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Lithop
|
|
4
|
-
# Restricts a material model to one contiguous Z-layer range while preserving global Z coordinates.
|
|
5
|
-
class LayerRegionModel
|
|
6
|
-
Cell = Data.define(:materials)
|
|
7
|
-
|
|
8
|
-
attr_reader :columns, :rows, :x_boundaries, :y_boundaries, :z_boundaries, :cells, :layer_range
|
|
9
|
-
|
|
10
|
-
def initialize(model:, layer_range:)
|
|
11
|
-
@columns = model.columns
|
|
12
|
-
@rows = model.rows
|
|
13
|
-
@x_boundaries = model.x_boundaries
|
|
14
|
-
@y_boundaries = model.y_boundaries
|
|
15
|
-
@layer_range = layer_range
|
|
16
|
-
@z_boundaries = model.z_boundaries[layer_range.begin..layer_range.end].freeze
|
|
17
|
-
@cells = model.cells.map do |cell|
|
|
18
|
-
Cell.new(materials: cell.materials.slice(layer_range).to_a.freeze)
|
|
19
|
-
end.freeze
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def materials = @materials ||= cells.flat_map(&:materials).uniq.freeze
|
|
23
|
-
end
|
|
24
|
-
end
|