Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonPacewic committed Jun 20, 2024
1 parent 93baef6 commit 90bc976
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
6 changes: 4 additions & 2 deletions exporter/SynthesisFusionAddin/src/Parser/ExporterOptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Joint:
signalType: SignalType = field(default=None)
speed: float = field(default=None)
force: float = field(default=None)


@dataclass
class Gamepiece:
Expand Down Expand Up @@ -85,7 +85,9 @@ class ExporterOptions:
joints: list[Joint] = field(default=None)
gamepieces: list[Gamepiece] = field(default=None)
preferredUnits: PreferredUnits = field(default=PreferredUnits.IMPERIAL)
robotWeight: float = field(default=0.0) # Always stored in kg regardless of 'preferredUnits'
robotWeight: float = field(
default=0.0
) # Always stored in kg regardless of 'preferredUnits'
compressOutput: bool = field(default=True)
exportAsPart: bool = field(default=False)

Expand Down
16 changes: 11 additions & 5 deletions exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,9 @@ def notify(self, args):
)

for wheel in exporterOptions.wheels:
wheelEntity = gm.app.activeDocument.design.findEntityByToken(wheel.jointToken)[0]
wheelEntity = gm.app.activeDocument.design.findEntityByToken(
wheel.jointToken
)[0]
typeWheel = type(wheelEntity)
addWheelToTable(wheelEntity)

Expand Down Expand Up @@ -1182,8 +1184,10 @@ def notify(self, args):
_exportWheels.append(
Wheel(
WheelListGlobal[row - 1].entityToken,
wheelTypeIndex + 1, # TODO: More explicit conversion to 'enum' - Brandon
signalTypeIndex + 1, # TODO: More explicit conversion to 'enum' - Brandon
wheelTypeIndex
+ 1, # TODO: More explicit conversion to 'enum' - Brandon
signalTypeIndex
+ 1, # TODO: More explicit conversion to 'enum' - Brandon
# onSelect.wheelJointList[row-1][0] # GUID of wheel joint. if no joint found, default to None
)
)
Expand Down Expand Up @@ -1219,7 +1223,8 @@ def notify(self, args):
Joint(
JointListGlobal[row - 1].entityToken,
JointParentType.ROOT,
signalTypeIndex + 1, # TODO: More explicit conversion to 'Enum' - Brandon
signalTypeIndex
+ 1, # TODO: More explicit conversion to 'Enum' - Brandon
jointSpeed,
jointForce / 100.0,
) # parent joint GUID
Expand All @@ -1243,7 +1248,8 @@ def notify(self, args):
Joint(
JointListGlobal[row - 1].entityToken,
parentJointToken,
signalTypeIndex + 1, # TODO: More explicit conversion to 'Enum' - Brandon
signalTypeIndex
+ 1, # TODO: More explicit conversion to 'Enum' - Brandon
jointSpeed,
jointForce,
)
Expand Down

0 comments on commit 90bc976

Please sign in to comment.