Initial commit

This commit is contained in:
Chris Proctor
2025-07-28 13:29:18 -04:00
commit f7fd3e8a7e
18 changed files with 1313 additions and 0 deletions

19
geometry/base.py Normal file
View File

@@ -0,0 +1,19 @@
from caseconverter import snakecase
class GeometryObject:
"""A base class for geometry objects.
This base class provides some consistent behavior for all geometry objects.
Note: This class uses some advanced techniques which you aren't expected to
understand. If you're interested, by all means keep reading, and ask a teacher
if you have questions.
"""
def __new__(cls, value):
"""Overrides default constructor to support construction from other objects.
When value is an instance of CustomClass, checks cls for a `from_custom_class`
method which will be called to produce a new instance.
"""
method_name = value.__class__.__name__