Skip to content

Commit

Permalink
Add --ignore-validation flag
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Jun 26, 2023
1 parent 179af82 commit 3e10906
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions crates/fj/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ pub struct Args {
/// How much the export can deviate from the original model
#[arg(short, long, value_parser = parse_tolerance)]
pub tolerance: Option<Tolerance>,

/// Ignore validation errors
#[arg(short, long)]
pub ignore_validation: bool,
}

impl Args {
Expand Down
8 changes: 6 additions & 2 deletions crates/fj/src/handle_model.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::ops::Deref;
use std::{mem, ops::Deref};

use fj_core::{
algorithms::{
Expand Down Expand Up @@ -32,7 +32,11 @@ where
{
let args = Args::parse();

services.drop_and_validate()?;
if args.ignore_validation {
mem::forget(services);
} else {
services.drop_and_validate()?;
}

let aabb = model.aabb().unwrap_or(Aabb {
min: Point::origin(),
Expand Down

0 comments on commit 3e10906

Please sign in to comment.