Fixed main frame area coefficient
This commit is contained in:
parent
2b38876e40
commit
970c6a7fad
|
@ -339,6 +339,8 @@ def mainFrameCoeff(ship, draft):
|
|||
B = bbox.YMax - bbox.YMin
|
||||
p = Vector(-1.5*L, -1.5*B, bbox.ZMin - 1.0)
|
||||
box = Part.makeBox(1.5*L + x, 3.0*B, - bbox.ZMin + 1.0, p)
|
||||
maxY = bbox.YMin
|
||||
minY = bbox.YMax
|
||||
# Compute common part with ship
|
||||
for s in shape.Solids:
|
||||
# Get solids intersection
|
||||
|
@ -367,7 +369,7 @@ def mainFrameCoeff(ship, draft):
|
|||
# Valid face, compute area
|
||||
area = area + f.Area
|
||||
maxY = max(maxY, faceBounds.YMax)
|
||||
minY = max(minY, faceBounds.YMin)
|
||||
minY = min(minY, faceBounds.YMin)
|
||||
# Destroy last object generated
|
||||
App.ActiveDocument.removeObject(App.ActiveDocument.Objects[-1].Name)
|
||||
dy = maxY - minY
|
||||
|
|
Loading…
Reference in New Issue
Block a user