compas-dev / compas-dev/compas_fea2

Use less dictionary object and create more classes

Open
#26 2 comments 0 reactions 2 assignees Claimed by @franaudo View on GitHub
enhancement
Dominant language
Python
Stars
14
Forks
10
PR merge metrics
No merged PRs in 30d

Description

I can see everywhere this object `components = {'x': x, 'y': y, 'z': z, 'xx': xx, 'yy': yy, 'zz': zz}`
I would rather create a component like this:

```
class Components:
def __init__(x=0. y=0, z=0, xx=0, yy=0, zz=0):
self.x = x
self.y = y
etc...
```
after it's much easier to access the individual components `self.components.x` is much lighter than `self.components['x']` also we can add plenty of helpers inside the components class

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.