Open philosophical1337 opened 1 week ago
The HashCode method was actually removed from OpenCascade itself. You can use the builtin hash
function:
identifier=hash(face)
I should have generated a deprecation warning when using the HashCode method
this is just a guess but although the faces are geometrically identical, i think the actual face objects have small differences, so just hashing the object with the built in hash doesn't work at all.
I think the HashCode method was hashing only the geometric properties of the face and thus worked to find the identical faces, ignoring the differences in the object
okay, i didn't realize that my code was effectively always returning only the first face and then discarding the rest, the HashCode(-1) just resulted in a hash of 1 every time.
i just ended up discarding everything but the first face and it works out the same, oops!
I am working with step files and when imported using read_step_file_with_names_colors you can always tell they contain many duplicate faces (obvious z-fighting).
I'm not sure if its just not noticeable when importing without colors due to the surfaces all being grey but anyway, I was using the following function to compare all the faces and discard duplicates which was working wonderfully until I updated to 7.8.1.
now I get the error message that HashCode attribute doesn't exist.
here is my function: