Introducing the pirouette FPV frame for GFPV
Signed-off-by: Arnaud Morin <arnaud.gfpv@mailops.fr>
This commit is contained in:
37
standoff.py
Normal file
37
standoff.py
Normal file
@@ -0,0 +1,37 @@
|
||||
# @author Arnaud Morin <arnaud.gfpv@mailops.fr>
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
import cadquery as cq
|
||||
|
||||
from frame_params import PLATE_GAP
|
||||
|
||||
OD = 3.5 # round M2 standoff
|
||||
ALU_DENSITY = 2.70e-3 # g/mm3, for mass reporting
|
||||
|
||||
|
||||
def standoff():
|
||||
p = (cq.Workplane("XY")
|
||||
.circle(OD / 2.0)
|
||||
.extrude(PLATE_GAP))
|
||||
|
||||
return p
|
||||
|
||||
|
||||
result = standoff()
|
||||
|
||||
assert result.solids().size() == 1, "standoff is not one solid"
|
||||
|
||||
if "show_object" not in globals(): # running outside CQ-editor
|
||||
def show_object(*args, **kwargs):
|
||||
pass
|
||||
|
||||
show_object(result)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
solid = result.val()
|
||||
|
||||
print("standoff %.3f g each, %.3f g for four"
|
||||
% (solid.Volume() * ALU_DENSITY,
|
||||
4 * solid.Volume() * ALU_DENSITY))
|
||||
Reference in New Issue
Block a user