Skip to content

How to solve NotSimpleWire? #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
vltown opened this issue Jul 12, 2024 · 1 comment
Open

How to solve NotSimpleWire? #74

vltown opened this issue Jul 12, 2024 · 1 comment

Comments

@vltown
Copy link

vltown commented Jul 12, 2024

let shells: Vec<truck_topology::Shell<Point3, Curve3D, Surface>> = table.shell.values().cloned().filter_map(|step_shell| {
        let mut cshell = match table.to_compressed_shell(&step_shell) {
            Ok(shell) => shell,
            Err(e) => {
                println!("Error during compression: {:?}", e);
                return None;
            }
        };
        cshell.robust_split_closed_edges_and_faces(0.1);
        match truck_topology::Shell::extract(cshell) {
            Ok(shell) => Some(shell),
            Err(e) => {
                println!("Failed to extract shell: {:?}", e);
                None 
            }
        }
    }).collect();

Failed to extract shell: NotSimpleWire
This code will cause this error, causing my model to render incompletely. Is there any way to solve this problem?

@ytanimura
Copy link
Contributor

Perhaps your STEP data does not meet the requirements. Boundary representation in truck does not accept boundary wires with self-intersections. This is a problem when editing the shape, and if you just want to display it, just leave the meshing as CompressedShell. If you want to edit the shape, try this method.

https://gitlab.ritc.jp/ricos/truck/truck/-/blob/master/truck-shapeops/src/healing/mod.rs?ref_type=heads#L80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants