Closed tpaviot closed 3 weeks ago
This PR implements hash, equality, and inequality operators for Standard_Transient and its derivatives, along with code formatting improvements. The changes primarily focus on adding Python special methods (eq, ne, hash) to enable proper comparison and hashing of objects, while also cleaning up code indentation across multiple files.
classDiagram
class Standard_Transient {
+__eq__(right)
+__ne__(right)
+__hash__()
+__eq_wrapper__(other)
+__ne_wrapper__(other)
}
class Standard_GUID {
+friend struct std::hash
}
class TDF_Label {
+friend struct std::hash
}
class XCAFPrs_Style {
+friend struct std::hash
}
note for Standard_Transient "Added Python special methods for comparison and hashing"
Change | Details | Files |
---|---|---|
Added hash, equality, and inequality operators for Standard_Transient |
|
src/SWIG_files/wrapper/Standard.i test/test_core_wrapper_features.py |
Improved code formatting and indentation across multiple wrapper files |
|
src/SWIG_files/wrapper/Graphic3d.i src/SWIG_files/wrapper/TCollection.i src/SWIG_files/wrapper/Quantity.i src/SWIG_files/wrapper/BRepMesh.i src/SWIG_files/wrapper/TopoDS.i src/SWIG_files/wrapper/TDF.i src/SWIG_files/wrapper/XCAFPrs.i src/SWIG_files/wrapper/TopLoc.i |
Removed Open method from RWPly_PlyWriterContext |
|
src/SWIG_files/wrapper/RWPly.i |
see the related commit at pythonocc-generator https://github.com/tpaviot/pythonocc-generator/commit/e8e3cbf048917f6bd55f69170519d8c5fa2de8ad
and a couple other minor fixes
based on #1375
Summary by Sourcery
Add hash, equality, and inequality operators for Standard_Transient and its derivatives, enhancing object comparison capabilities. Refactor existing operator implementations for improved readability. Include new tests to verify the functionality of these operators.
New Features:
Enhancements:
Tests: