Jump to content
Ultimaker Community of 3D Printing Experts
searaider2

How does Cura detect holes and render them in the X-Ray view ?

Recommended Posts

I am digging through the code in an attempt to try and figure out how Cura detects holes in meshes and how it is able to render holes in the X-Ray view.

For example: Given a cube with a missing side, Cura is able to detect that one of the sides is missing and render that missing side red. Same with internal walls. How does it do this? Does it simply create red "error triangles" and add them to the mesh? If it can do this, why is there no setting that allows for the added triangles to be added permanently to the model being sliced.

---

Note: ignore the random side jutting out.

1.thumb.PNG.0b299a4589aaaef24195f1934a3df2c4.PNG

---

2.thumb.PNG.2b8bc34e2c99f80ee30cf79bee84937f.PNG

---

Without any mesh fixes turned on...

Layers view:

3.thumb.PNG.c9375f115e46ba1925ffa869da040ed9.PNG

---

With all of mesh fix settings turned on.. Keep disconnected faces triggers layers being added:

4.thumb.PNG.3a9d9f89fa305eda92bafc81caa9f730.PNG

---

The "Keep disconnected faces" sort of seems to be doing this.. However.. If I add an arbitrary side that juts out on an angle, it will attempt to close off the volume by connecting the side jutting out as well.

Without the side jutting out, keep disconnected faces does a good job of closing off the volume, I am just curious as to how/where this is happening in the code to allow for the X-Ray view to render holes as red faces (triangles must be getting added somewhere).

1.thumb.PNG.0b299a4589aaaef24195f1934a3df2c4.PNG

2.thumb.PNG.2b8bc34e2c99f80ee30cf79bee84937f.PNG

3.thumb.PNG.c9375f115e46ba1925ffa869da040ed9.PNG

4.thumb.PNG.3a9d9f89fa305eda92bafc81caa9f730.PNG

Edited by Guest

Share this post


Link to post
Share on other sites

Okay that sort of makes sense.. I guess I am trying to figure out how it goes from there being an issue detected, to the X-Ray view seemingly adding red polygons where there previously were none. The red has to be added somehow right? What sort of tricking is happening?

This is what it looks without the extra bit:

5.thumb.PNG.a2a2361dacb2c010b38187576107f575.PNG

Share this post


Link to post
Share on other sites

Okay I have a clearer understanding as to what is happening now. Thanks guys. I am now wondering how complicated it would be for Cura to have some sort of built-in tool that allows you to choose which polygons to add/remove? Obviously this would become very complex, but it would give users the ability to "fix" their models inside of Cura.

For example: In the first model I used above, the user could remove the polygon jutting out and add a polygon where there is a "hole" in the model.

Share this post


Link to post
Share on other sites
......wondering how complicated it would be for Cura to have some sort of built-in tool that allows you to choose which polygons to add/remove? Obviously this would become very complex, but it would give users the ability to "fix" their models inside of Cura.

For example: In the first model I used above, the user could remove the polygon jutting out and add a polygon where there is a "hole" in the model.

 

I am kinda on the side of not turning Cura into a full 3D Package. It reminds me of the days, way back when, at a time when every program was trying to shoehorn functionality into everything. Illustrator sorta became a page layout program and word processor and shifted away from pure design. While they did need word processing capabilities, it did not need to replace word perfect (showing the age here) or Msoft word or Quark.

Dedicated 3D programs is where things like that should be addressed while programs like Cura should focus on the slicing functionality and making the printers behave.

You can get free 3D programs to do what you are talking about and not all of them have huge learning curves to overcome. Requires a bit of diligence on the user, but, would that same diligence be required to learn in Cura?

And Cura does already do some amazing things such as 'fix' holes and a bit of unioning of disparate parts that can be combined as well as not see everything as a unique object should you click a box.

  • Like 1

Share this post


Link to post
Share on other sites

For example: In the first model I used above, the user could remove the polygon jutting out and add a polygon where there is a "hole" in the model.

Even if we wanted to do this (See kmanstudios point about not becoming a modeling tool), it's also quite a challenge. It's not about getting it to work with 95% of the cases, it's the 5% that's really weird that makes it difficult. Adding a feature that only works 95% of the time will get us a lot of support calls ;)

We are looking into automatically fixing models.

  • Like 1

Share this post


Link to post
Share on other sites

This Thread shows just how a simple fix in a 3D Package or, just basic fundamentals can get the job done and offload that responsibility from Cura and, where it belongs, on the modeler, no matter what package to be used. They all work pretty much the same in basic philosophy, just interface differences.

Houdini would be the exception to that rule, but it is mostly for super-duper high level stuff.

  • Like 1

Share this post


Link to post
Share on other sites

...

I am kinda on the side of not turning Cura into a full 3D Package. It reminds me of the days, way back when, at a time when every program was trying to shoehorn functionality into everything.

...

 

 

I am kinda on the side of not turning Cura into a full 3D Package. It reminds me of the days, way back when, at a time when every program was trying to shoehorn functionality into everything.

...

 

Yes, I also prefer compact, separate, dedicated programs for each function. It is better that a program can do one thing excellent, than 100 things half-way. Because in the latter case, you have a bunch of bloatware, but you can't use it for anything.

For example, Microsoft Word got such a nightmare, compared to the old versions '97 and 2000, that it takes me five times more clicking and searching through the mess of ribbons than before. It really decreases my productivity. And to prevent it from destroying my layout, I have to disable every automatic function (which I also did in Office '97 and 2000 of course). Microsoft calls this "autocorrect", but their idea of correct seems to be different from mine. :) So, for writing bodies of text, I switched to Notepad++, and I add the layout as the last step only in Word. And I do all corrections manually, in the way that I want it. Thus MS Word now takes gigabytes of disk space and RAM, but is less functional for me than a 20 years old Word 97, and even less than Notepad++.

I hope Cura will not fall into this bloatware trap. At least that's my viewpoint, but of course, anyone has the right to see things differenctly. :)

Share this post


Link to post
Share on other sites
For example, Microsoft Word got such a nightmare, compared to the old versions '97 and 2000, that it takes me five times more clicking and searching through the mess of ribbons than before. It really decreases my productivity.....

 

Just to add to that nightmare on the creative side, we used to have to jump through hoops at a place I worked at doing Digital Output. I was the tech and mech guy. But MSoft really was a bear to work with as it just did not want to follow basic compatibility protocols. I was one of the few who could get it out consistently. That was a while ago, but it underpins what geert_2said.

So, as long as the focus in on getting the machines to behave and materials to work, then I think Cura remains a winner for me. For instance, I just fixed a file in another thread that seemed to be a Cura issue and it was a modeling issue. Tiny thing, but it does make a difference. And, it could have been fixed in any 3D program as I worked n the STL file.

I know S3D has a great rep and I actually own it, and have it installed, but have never needed to use it. So, not dissing it, just letting it be known why I cannot compare the properties.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Terms of Use Privacy Policy