Ruudjhuu / gridfinity_build123d

Create gridfinity items with build123d
MIT License
31 stars 1 forks source link

More control over feature locations #25

Closed Ruudjhuu closed 7 months ago

Ruudjhuu commented 9 months ago

Problem

Currently feature locations can be controlled by using the 'FeatureLocation' enum. The user is fully dependent on the implementations in the 'FeatureLocation' class. There is no room for custom implementation which limits creativity.

Solution

Implement a proper strategy pattern (pass through behaviour by classes instead of a enum type) so the user is able to implement its own "location strategy" as a child class and use it. Also try to abstract the placement of features and locations from each other. (Location strategy should return locations, not also apply them in the same function.)

Ruudjhuu commented 9 months ago

Maybe even implement the location strategies as context manager to comply with the build123d builder api locations philosophy. (Wrapper around build123d locations with some additional logic)