You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The topology.py module is approaching 10,000 lines as it contains all of the code defining the entire topological layer of build123d objects. The dependencies between topological objects makes separating this module very difficult due to circular imports. The content of topology.py is expected to grow as new functionality is added so this problem highlights significant technical debt. Unfortunately, this refactor may break backwards compatibility so it's critical that this is addressed prior to release 1.0.0.
The following refactor options have been proposed:
Split based on class with all of the existing methods remaining.
Split based on class while converting problematic methods to functions.
Split based on dimension (e.g. 0: Vertex, 1: Edge & Wire, 2: Face & Shell, etc.) while maintaining existing methods.
Imports would occur: Shape->Vertex->Edge->Wire->Face->Shell->Solid->Compound for the class based options or Shape->Vertex->Edge&Wire->Face&Shell->Solid->Compound for the dimension based option(s).
Given the tight coupling of objects with the same dimensions and the use of common Mixin classes, option 3 seems the most feasible based on prototyping and results in this sized split:
681 topology/compound.py
2416 topology/edge_wire.py
1456 topology/face_shell.py
493 topology/shape_list.py
2134 topology/shape.py
1229 topology/solid.py
393 topology/utils.py
197 topology/vertex.py
8999 of the 9246 lines in topology.py (a few classes weren't converted in the prototype)
Many issues need to be resolved for this refactor to be successful.
The text was updated successfully, but these errors were encountered:
The
topology.py
module is approaching 10,000 lines as it contains all of the code defining the entire topological layer of build123d objects. The dependencies between topological objects makes separating this module very difficult due to circular imports. The content oftopology.py
is expected to grow as new functionality is added so this problem highlights significant technical debt. Unfortunately, this refactor may break backwards compatibility so it's critical that this is addressed prior to release 1.0.0.The following refactor options have been proposed:
Imports would occur: Shape->Vertex->Edge->Wire->Face->Shell->Solid->Compound for the class based options or Shape->Vertex->Edge&Wire->Face&Shell->Solid->Compound for the dimension based option(s).
Given the tight coupling of objects with the same dimensions and the use of common Mixin classes, option 3 seems the most feasible based on prototyping and results in this sized split:
Many issues need to be resolved for this refactor to be successful.
The text was updated successfully, but these errors were encountered: