Data sharing guidelines

blobfish

CAD community veteran
Are there any published guidelines or best practices on when algorithms should break sharing of data?

I got into a pretty deep dive investigating a bug in ShapeUpgrade_UnifySameDomain where sharing was left intact and corrupting input shapes. I attached a PDF if anybody is curious.
 

Attachments

  • explanation.pdf
    409.6 KB · Views: 11

Quaoar

Administrator
Staff member
It looks like you did a good job debugging the USD code. Are you aiming at redirecting those questions to OCC team?

I have made several lazy attempts to understand the code of USD, and in most cases the worst thing about it was it did not do anything with the input shape. In your case, it looks like it's corrupting a pretty simple shape, which is a bit of my concern as well as I'm using USD heavily. Would you mind attaching your input BREP file? I'd like to go a little in-depth with a debugger as well ;)
 

blobfish

CAD community veteran
It looks like you did a good job debugging the USD code. Are you aiming at redirecting those questions to OCC team?
Thanks. I wrote those questions down as I was doing it and had no intentions on communicating with the OCC team.

It looks like you did a good job debugging the USD code. Are you aiming at redirecting those questions to OCC team?

I have made several lazy attempts to understand the code of USD, and in most cases the worst thing about it was it did not do anything with the input shape. In your case, it looks like it's corrupting a pretty simple shape, which is a bit of my concern as well as I'm using USD heavily. Would you mind attaching your input BREP file? I'd like to go a little in-depth with a debugger as well ;)
I understand more of the USD code than I did before, but still pretty ignorant. I do know that writing 900 line functions is a "no-no".:rolleyes: Sure I will share my input brep. I also filed a bug report on occt mantis ... 2 years ago ... when I originally found the condition from inside the boolean simplify result (or whatever it is).
 

Attachments

  • justFace3.brep
    1.9 KB · Views: 0

Quaoar

Administrator
Staff member
Indeed, I missed that you created a ticket 2 years ago and nobody updated its status since then. Thanks for sharing the B-rep file. I have a feeling that USD has the usual "big ball of mud" architecture as most of other modeling algorithms in OpenCascade. But up until now I was pretty satisfied with its robustness and Ok-ish performance.
 

blobfish

CAD community veteran
Indeed, I missed that you created a ticket 2 years ago and nobody updated its status since then. Thanks for sharing the B-rep file. I have a feeling that USD has the usual "big ball of mud" architecture as most of other modeling algorithms in OpenCascade. But up until now I was pretty satisfied with its robustness and Ok-ish performance.
I have always thought USD was pretty good, especially compared to the version I wrote for FreeCAD years ago. :) I have seen these input shape corruptions quite a few times over the years and they are really annoying. They can be obscure and modify many shapes up my feature dependency graph. When something like this happened in freecad years ago, it was addressed by running the entire input shape through BRepBuilderAPI_Copy. Always seemed heavy handed to me, but committing to debugging OpenCasCade is not something you can do without a big time investment.

Looking forward to hearing any insights, opinions, ideas you have.
 
Top