Skip to content

Commit

Permalink
Many refactorings, initial support for custom headstock/body shapes
Browse files Browse the repository at this point in the history
  • Loading branch information
mnesarco committed Apr 10, 2020
1 parent c1ca0d7 commit 6eca359
Show file tree
Hide file tree
Showing 24 changed files with 1,578 additions and 322 deletions.
684 changes: 684 additions & 0 deletions docs/wiki/NeckProfileSpecs.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/Init.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
__copyright__ = "Copyright 2020, Frank D. Martinez. M."
__license__ = "GPLv3"
__maintainer__ = "https://github.com/mnesarco"

2 changes: 2 additions & 0 deletions src/InitGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def Initialize(self):
"MarzCmdCreateNeck",
"MarzCmdCreateBody",
"MarzCmdCreateConstructionLines",
"MarzCmdImportBodyShape",
"MarzCmdImportHeadstockShape",
#"MarzCmdCreateNeckPlanes", TODO: Fix
]
if isVersion19():
Expand Down
116 changes: 116 additions & 0 deletions src/Resources/icons/import_body_shape.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
133 changes: 133 additions & 0 deletions src/Resources/icons/import_headstock_shape.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion src/marz_body_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class BodyData(object):
#! so two instances created with same data will hit the same
#! cache entry.
__slots__ = ['neckd', 'length', 'width', 'backThickness', 'topOffset',
'topThickness', 'neckPocketDepth', 'neckAngle', 'neckPocketLength', '_ihash']
'topThickness', 'neckPocketDepth', 'neckAngle', 'neckPocketLength', 'joint', '_ihash']

def __init__(self, inst, neckd):

Expand All @@ -34,6 +34,7 @@ def __init__(self, inst, neckd):
super().__setattr__('neckPocketLength', inst.body.neckPocketLength)
super().__setattr__('neckAngle', inst.neck.angle)
super().__setattr__('topOffset', inst.neck.topOffset)
super().__setattr__('joint', inst.neck.joint)
super().__setattr__('neckd', neckd)

# Calculate immutable hash
Expand All @@ -45,6 +46,7 @@ def __init__(self, inst, neckd):
inst.body.neckPocketDepth,
inst.body.neckPocketLength,
inst.neck.angle,
inst.neck.joint,
neckd
))
super().__setattr__('_ihash', ihash)
Expand All @@ -66,6 +68,7 @@ def __eq__(self, other):
and self.neckAngle == other.neckAngle
and self.topOffset == other.topOffset
and self.neckd == other.neckd
and self.joint == other.joint
)

def totalThickness(self):
Expand Down
Loading

0 comments on commit 6eca359

Please sign in to comment.