Inscread plate strap size
Also fix mass printing on all objects Signed-off-by: Arnaud Morin <arnaud.gfpv@mailops.fr>
This commit is contained in:
9
spar.py
9
spar.py
@@ -111,12 +111,6 @@ result = spar()
|
||||
|
||||
assert result.solids().size() == 1, "spar is not one solid"
|
||||
|
||||
# Mass report
|
||||
def report():
|
||||
vol = result.val().Volume()
|
||||
print(f" Mass = {vol * CF_DENSITY:5.2f} g")
|
||||
print(f" Mass x4 = {4 * vol * CF_DENSITY:5.2f} g")
|
||||
|
||||
# Running outside CQ-editor
|
||||
if "show_object" not in globals():
|
||||
def show_object(*args, **kwargs):
|
||||
@@ -125,4 +119,5 @@ if "show_object" not in globals():
|
||||
show_object(result)
|
||||
|
||||
if __name__ == "__main__":
|
||||
report()
|
||||
v = result.val().Volume()
|
||||
print("%-12s %.2f g" % ("spar", v * CF_DENSITY))
|
||||
|
||||
Reference in New Issue
Block a user