mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-27 01:25:52 +00:00
Simplify method return value
This commit is contained in:
parent
0f2631fece
commit
2ba91313ef
@ -95,7 +95,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
let shape = model.load(¶meters)?;
|
let shape = model.load(¶meters)?;
|
||||||
|
|
||||||
let shape_processor = ShapeProcessor::new(args.tolerance)?;
|
let shape_processor = ShapeProcessor::new(args.tolerance)?;
|
||||||
let mut processed_shape = shape_processor.process(&shape)?;
|
let mut processed_shape = shape_processor.process(&shape);
|
||||||
|
|
||||||
if let Some(path) = args.export {
|
if let Some(path) = args.export {
|
||||||
let mut mesh_maker = MeshMaker::new();
|
let mut mesh_maker = MeshMaker::new();
|
||||||
@ -362,7 +362,7 @@ impl ShapeProcessor {
|
|||||||
Ok(Self { tolerance })
|
Ok(Self { tolerance })
|
||||||
}
|
}
|
||||||
|
|
||||||
fn process(&self, shape: &fj::Shape) -> anyhow::Result<ProcessedShape> {
|
fn process(&self, shape: &fj::Shape) -> ProcessedShape {
|
||||||
let aabb = shape.bounding_volume();
|
let aabb = shape.bounding_volume();
|
||||||
|
|
||||||
let tolerance = match self.tolerance {
|
let tolerance = match self.tolerance {
|
||||||
@ -393,12 +393,12 @@ impl ShapeProcessor {
|
|||||||
.topology()
|
.topology()
|
||||||
.triangles(tolerance, &mut triangles, &mut debug_info);
|
.triangles(tolerance, &mut triangles, &mut debug_info);
|
||||||
|
|
||||||
Ok(ProcessedShape {
|
ProcessedShape {
|
||||||
tolerance,
|
tolerance,
|
||||||
aabb,
|
aabb,
|
||||||
triangles,
|
triangles,
|
||||||
debug_info,
|
debug_info,
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user