Download code/profile/setup.cad from kiokoio/kioko-propellers: direct link, hf CLI and curl.
- Browser
- Download file 2.59 kB
-
https://huggingface.co/datasets/kiokoio/kioko-propellers/resolve/main/code/profile/setup.cad
- Command line
-
hf download hf://datasets/kiokoio/kioko-propellers/code/profile/setup.cad
-
curl -L -o setup.cad https://huggingface.co/datasets/kiokoio/kioko-propellers/resolve/main/code/profile/setup.cad
2.59 kB
| use std::reference | |
| use profile::inputs::{angle_rotation, outer_hub_length, root_radius, inner_hub_radius, outer_hub_radius, propeller_span} | |
| use profile::inputs::{x0_front, x1_front, x2_front, x3_front, x4_front, y0a_front, y1a_front, y2a_front, y3a_front, y4a_front} | |
| use profile::inputs::{x0_rear, x1_rear, x2_rear, x3_rear, x4_rear, y0a_rear, y1a_rear, y2a_rear, y3a_rear, y4a_rear} | |
| lower_point = outer_hub_radius-40 | |
| z1 = propeller_span * 0.25 | |
| z2 = propeller_span * 0.5 | |
| z3 = propeller_span * 0.75 | |
| z4 = propeller_span | |
| trail_factor = 0.99 | |
| z1t = z1*trail_factor | |
| z2t = z2*trail_factor | |
| z3t = z3*trail_factor | |
| z4t = z4*trail_factor | |
| half = -angle_rotation * 0.5 | |
| // The blade's own frame: on the hub axis, so a rotation about its x is a rotation about the | |
| // axis. Each station is placed on a datum turned by its own fraction of the half sector, so a | |
| // control point sits at exactly radius lower_point + z, angle y_a * half, axial x. | |
| blade_datum = Datum<Offset>(outer_hub_length/3, 0, 0, 0, 0, 0)[reference] | |
| lead_datum0 = Datum<Offset>(0, 0, 0, y0a_front * half, 0, 0)[blade_datum] | |
| lead_datum1 = Datum<Offset>(0, 0, 0, y1a_front * half, 0, 0)[blade_datum] | |
| lead_datum2 = Datum<Offset>(0, 0, 0, y2a_front * half, 0, 0)[blade_datum] | |
| lead_datum3 = Datum<Offset>(0, 0, 0, y3a_front * half, 0, 0)[blade_datum] | |
| lead_datum4 = Datum<Offset>(0, 0, 0, y4a_front * half, 0, 0)[blade_datum] | |
| #lead0 = Point<Coordinates>(x0_front, 0, lower_point)[lead_datum0] | |
| #lead1 = Point<Coordinates>(x1_front, 0, lower_point+z1)[lead_datum1] | |
| #lead2 = Point<Coordinates>(x2_front, 0, lower_point+z2)[lead_datum2] | |
| #lead3 = Point<Coordinates>(x3_front, 0, lower_point+z3)[lead_datum3] | |
| #lead4 = Point<Coordinates>(x4_front, 0, lower_point+z4)[lead_datum4] | |
| lead_profile = Spline<Nurbs>(3)[lead0, lead1, lead2, lead3, lead4] | |
| trail_datum0 = Datum<Offset>(0, 0, 0, y0a_rear * half, 0, 0)[blade_datum] | |
| trail_datum1 = Datum<Offset>(0, 0, 0, y1a_rear * half, 0, 0)[blade_datum] | |
| trail_datum2 = Datum<Offset>(0, 0, 0, y2a_rear * half, 0, 0)[blade_datum] | |
| trail_datum3 = Datum<Offset>(0, 0, 0, y3a_rear * half, 0, 0)[blade_datum] | |
| trail_datum4 = Datum<Offset>(0, 0, 0, y4a_rear * half, 0, 0)[blade_datum] | |
| #trail0 = Point<Coordinates>(x0_rear, 0, lower_point)[trail_datum0] | |
| #trail1 = Point<Coordinates>(x1_rear, 0, lower_point+z1t)[trail_datum1] | |
| #trail2 = Point<Coordinates>(x2_rear, 0, lower_point+z2t)[trail_datum2] | |
| #trail3 = Point<Coordinates>(x3_rear, 0, lower_point+z3t)[trail_datum3] | |
| #trail4 = Point<Coordinates>(x4_rear, 0, lower_point+z4t)[trail_datum4] | |
| trail_profile = Spline<Nurbs>(3)[trail0, trail1, trail2, trail3, trail4] | |