Revolve/Sweep multiple sketches at once (#5779)

* revolve multiple sketches at once

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* do the same for swweep

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* do the same for swweep

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2025-03-13 09:38:22 -07:00
committed by GitHub
parent c441a3ab1c
commit 80f78e1c61
28 changed files with 1153 additions and 899 deletions

View File

@ -178,13 +178,8 @@ impl KclErrorWithOutputs {
path: self
.filenames
.get(&first_source_range.module_id())
.ok_or_else(|| {
anyhow::anyhow!(
"Could not find filename for module id: {:?}",
first_source_range.module_id()
)
})?
.clone(),
.cloned()
.unwrap_or(ModulePath::Main),
});
let filename = source.path.to_string();
let kcl_source = source.source.to_string();
@ -192,11 +187,10 @@ impl KclErrorWithOutputs {
let mut related = Vec::new();
for source_range in source_ranges {
let module_id = source_range.module_id();
let source = self
.source_files
.get(&module_id)
.cloned()
.ok_or_else(|| anyhow::anyhow!("Could not find source file for module id: {:?}", module_id))?;
let source = self.source_files.get(&module_id).cloned().unwrap_or(ModuleSource {
source: code.to_string(),
path: self.filenames.get(&module_id).cloned().unwrap_or(ModulePath::Main),
});
let error = self.error.override_source_ranges(vec![source_range]);
let report = Report {
error,