Prevented some errors in the floating coefficient computation

This commit is contained in:
Jose Luis Cercós Pita 2013-05-20 12:16:18 -04:00
parent 23554515d8
commit 2e82745242

View File

@ -253,6 +253,10 @@ def FloatingArea(ship, draft, trim):
p = Vector(-1.5*L, -1.5*B, bbox.ZMin - 1.0)
box = Part.makeBox(3.0*L, 3.0*B, - bbox.ZMin + 1.0, p)
# Compute common part with ship
maxX = bbox.XMin
minX = bbox.XMax
maxY = bbox.YMin
minY = bbox.YMax
for s in shape.Solids:
# Get solids intersection
try: