Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Boolean operation failed to return a valid part.

FigFig Member Posts: 13

Hello, I'm sorry but it's 3 questions.

I tried to make this model to print it. It's a simple svg, converted to dxf, and extruded: link

Import: After importing, there were errors on certain parts which prevented me from extruding them, I corrected but "Sketch 1" remains red with the error "did not regenerate properly: Some of the geometry intersects itself or is degenerate." I fixed all the self intersections but the error is still there.

Performance: Atrocious. Fixing the sketch is a purge because a simple click to Trim take more than 30s to be executed. Opening Sketch, closing, opening Extrude, closing, all is extremely long and painful to do. It's not just clicking on all these 250+ parts, but one click is 5-10s for the object to be added in the Extrude list. Is this a sketch problem or a server problem? I have a 3080 and a good internet connection speed :s

Boolean: And last but not least, I unioned all these parts together on a background but 2 parts refuse to give up with this error: "Boolean operation failed to return a valid part." I'm a little lost because the extrusion is ok and these faces are nothing special.

Bonus: Do you know an another way to do this that might be more efficient?

Thank you very much for your help.

Best Answers

  • jnewth_onshapejnewth_onshape Member, Onshape Employees Posts: 89
    edited September 5 Answer ✓

    Hi there!
    First: I just returned from PAX West so I am completely hyped on videogame stuff right now. I love the design.
    Now down to business.
    Fixing the Sketch: A colleague at Onshape, @jon_sorrells, has written a terrific custom feature for finding open profiles on just these sorts of dense, complicated sketches. He discusses it on this forum post:

    And find the script here:

    https://cad.onshape.com/documents/4fa113c6594cd037bfa214da/v/e5f9020158b188b1ec33530d/e/30010656480b133cd4dcad6d

    Then add it to your custom features tool. It's a little different than other custom features in that you run it on the problem sketch, rather than geometry inside the sketch. But doing that (and letting it chug for a while - this is a big sketch) you get:

    Then we zoom in on the blue circles and find the busted edge (koopa's nostril).



    I replace the edge with a straight line and voila! No more sketch problems.

    Fixing the boolean:
    You have some "bad" edges on the stars. These in turn create bodies that parasolid can't work with. I can now see the first such failure, at Part 3, during the boolean:

    Removing Part 3 from the boolean then shows me the failure at Part 2:


    I replace the edges that create those faces with straight lines (though anything will do) and then the bodies are better. Now the boolean can succeed.


    Performance:
    Not much to fix here, tbh. That's a big sketch. There a few tricks to make it easier to work with downstream by, for example, exporting as parasolid and reimporting as a "dumb solid" in to a new part studio for further editing. This removes the work required to process a sketch, generate walls, construct solids, etc. All that work we do behind the scenes to make things driven from sketches and editable is the expensive part, not the geometry itself. I just did that and here's the performance tab from the part studio that creates it:

    And the perf tab for the part studio that reimports the exported parasolid:


    Here's the copy I worked on so you can see what I did:

    https://cad.onshape.com/documents/0450a116fa2e7f0bf05af6de/w/3bc6fe3776612dd8c51b039b/e/67e354a68be42f9dabed061f

  • jnewth_onshapejnewth_onshape Member, Onshape Employees Posts: 89
    Answer ✓

    Hi @mario_hugon - No, unfortunately. But consider the lifecycle of these edges: The application that created the design → export as SVG → convert to DXF → import → convert to sketch → convert to parasolid entity. Quite a long chain!

    What I would try is exporting as a DWG if possible, or perhaps try a 3D filetype if possible, like parasolid or step. DXFs aren't perfect and the tools like Illustrator or Inkscape that produce them aren't concerned with how the parasolid kernel consumes them. Unfortunately, even in 2024 with cloud-based CAD we are still stuck with importing and processing ancient data formats. For example: The DXF format is 42 years old!

    Good luck! That design is great. Please post a picture of what you make with it! I'd love to see it.

Answers

  • jnewth_onshapejnewth_onshape Member, Onshape Employees Posts: 89
    edited September 5 Answer ✓

    Hi there!
    First: I just returned from PAX West so I am completely hyped on videogame stuff right now. I love the design.
    Now down to business.
    Fixing the Sketch: A colleague at Onshape, @jon_sorrells, has written a terrific custom feature for finding open profiles on just these sorts of dense, complicated sketches. He discusses it on this forum post:

    And find the script here:

    https://cad.onshape.com/documents/4fa113c6594cd037bfa214da/v/e5f9020158b188b1ec33530d/e/30010656480b133cd4dcad6d

    Then add it to your custom features tool. It's a little different than other custom features in that you run it on the problem sketch, rather than geometry inside the sketch. But doing that (and letting it chug for a while - this is a big sketch) you get:

    Then we zoom in on the blue circles and find the busted edge (koopa's nostril).



    I replace the edge with a straight line and voila! No more sketch problems.

    Fixing the boolean:
    You have some "bad" edges on the stars. These in turn create bodies that parasolid can't work with. I can now see the first such failure, at Part 3, during the boolean:

    Removing Part 3 from the boolean then shows me the failure at Part 2:


    I replace the edges that create those faces with straight lines (though anything will do) and then the bodies are better. Now the boolean can succeed.


    Performance:
    Not much to fix here, tbh. That's a big sketch. There a few tricks to make it easier to work with downstream by, for example, exporting as parasolid and reimporting as a "dumb solid" in to a new part studio for further editing. This removes the work required to process a sketch, generate walls, construct solids, etc. All that work we do behind the scenes to make things driven from sketches and editable is the expensive part, not the geometry itself. I just did that and here's the performance tab from the part studio that creates it:

    And the perf tab for the part studio that reimports the exported parasolid:


    Here's the copy I worked on so you can see what I did:

    https://cad.onshape.com/documents/0450a116fa2e7f0bf05af6de/w/3bc6fe3776612dd8c51b039b/e/67e354a68be42f9dabed061f

  • FigFig Member Posts: 13
    edited September 5

    Thank you very much for your help, this fixed the model it's perfect :D. Do you have any idea why these edges are "bad"?

  • jnewth_onshapejnewth_onshape Member, Onshape Employees Posts: 89
    Answer ✓

    Hi @mario_hugon - No, unfortunately. But consider the lifecycle of these edges: The application that created the design → export as SVG → convert to DXF → import → convert to sketch → convert to parasolid entity. Quite a long chain!

    What I would try is exporting as a DWG if possible, or perhaps try a 3D filetype if possible, like parasolid or step. DXFs aren't perfect and the tools like Illustrator or Inkscape that produce them aren't concerned with how the parasolid kernel consumes them. Unfortunately, even in 2024 with cloud-based CAD we are still stuck with importing and processing ancient data formats. For example: The DXF format is 42 years old!

    Good luck! That design is great. Please post a picture of what you make with it! I'd love to see it.

  • FigFig Member Posts: 13

    Erf ok, yes I understand, so I will try the DWG format. Thank you very much :D.

Sign In or Register to comment.