-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from it-ony/fix/code_style
code style
- Loading branch information
Showing
22 changed files
with
2,408 additions
and
1,672 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,52 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from math import pi | ||
from typing import Optional | ||
from dataclasses import dataclass | ||
|
||
from dataclasses_json import dataclass_json | ||
import adsk.core, adsk.fusion | ||
|
||
|
||
# from .py_packages.pydantic.dataclasses import dataclass | ||
|
||
|
||
@dataclass_json | ||
@dataclass | ||
class DbParams: | ||
|
||
'''Dataclass - Holds add-in instance setup values''' | ||
toolDiaStr: str = "0.25 in" | ||
dbType: str = "Normal Dogbone" | ||
fromTop: bool = True | ||
toolDiaOffsetStr: str = "0 cm" | ||
|
||
mortiseType: bool = False | ||
longSide: bool = True | ||
|
||
minimalPercent: float = 10.0 | ||
|
||
minAngleLimit: float = 89 | ||
maxAngleLimit: float = 91 | ||
|
||
angleDetectionGroup: bool = False | ||
acuteAngle: bool = False | ||
obtuseAngle: bool = False | ||
minAngleLimit: float = 89.0 | ||
maxAngleLimit: float = 91.0 | ||
|
||
|
||
parametric: bool = False | ||
expandModeGroup: bool = True | ||
expandSettingsGroup: bool = True | ||
logging: int = 0 | ||
benchmark: bool = False | ||
|
||
@property | ||
def toolDia(self): | ||
from .Dogbone import _design | ||
return _design.unitsManager.evaluateExpression(self.toolDiaStr) | ||
|
||
@property | ||
def toolDiaOffset(self): | ||
from .Dogbone import _design | ||
return _design.unitsManager.evaluateExpression(self.toolDiaOffsetStr) | ||
|
||
"""Dataclass - Holds add-in instance setup values""" | ||
|
||
toolDiaStr: str = "0.25 in" | ||
dbType: str = "Normal Dogbone" | ||
fromTop: bool = True | ||
toolDiaOffsetStr: str = "0 cm" | ||
|
||
mortiseType: bool = False | ||
longSide: bool = True | ||
|
||
minimalPercent: float = 10.0 | ||
|
||
minAngleLimit: float = 89 | ||
maxAngleLimit: float = 91 | ||
|
||
angleDetectionGroup: bool = False | ||
acuteAngle: bool = False | ||
obtuseAngle: bool = False | ||
minAngleLimit: float = 89.0 | ||
maxAngleLimit: float = 91.0 | ||
|
||
parametric: bool = False | ||
expandModeGroup: bool = True | ||
expandSettingsGroup: bool = True | ||
logging: int = 0 | ||
benchmark: bool = False | ||
|
||
@property | ||
def toolDia(self): | ||
from .Dogbone import _design | ||
|
||
return _design.unitsManager.evaluateExpression(self.toolDiaStr) | ||
|
||
@property | ||
def toolDiaOffset(self): | ||
from .Dogbone import _design | ||
|
||
return _design.unitsManager.evaluateExpression(self.toolDiaOffsetStr) |
Oops, something went wrong.