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
|
B = bbox.YMax - bbox.YMin
|
||||||
p = Vector(-1.5*L, -1.5*B, bbox.ZMin - 1.0)
|
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)
|
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
|
# Compute common part with ship
|
||||||
for s in shape.Solids:
|
for s in shape.Solids:
|
||||||
# Get solids intersection
|
# Get solids intersection
|
||||||
|
@ -367,7 +369,7 @@ def mainFrameCoeff(ship, draft):
|
||||||
# Valid face, compute area
|
# Valid face, compute area
|
||||||
area = area + f.Area
|
area = area + f.Area
|
||||||
maxY = max(maxY, faceBounds.YMax)
|
maxY = max(maxY, faceBounds.YMax)
|
||||||
minY = max(minY, faceBounds.YMin)
|
minY = min(minY, faceBounds.YMin)
|
||||||
# Destroy last object generated
|
# Destroy last object generated
|
||||||
App.ActiveDocument.removeObject(App.ActiveDocument.Objects[-1].Name)
|
App.ActiveDocument.removeObject(App.ActiveDocument.Objects[-1].Name)
|
||||||
dy = maxY - minY
|
dy = maxY - minY
|
||||||
|
|
Loading…
Reference in New Issue
Block a user