Let’s design a sophisticated, functional, and aesthetically pleasing phone stand using Rhino Python. This design will prioritize stability, ergonomics, and 3D printability while ensuring it’s a valid closed surface. I’ll incorporate features like a cable management slot, an angled viewing position, and a modern, organic shape. The script will be parametric, allowing you to easily adjust dimensions for your specific phone (e.g., Oppo Reno 10 Pro+).
Design Concept
Key Features
Ergonomic Viewing Angle: The phone will rest at a comfortable angle (e.g., 60° from horizontal) for viewing while seated.
Stable Base: A wide, low-profile base ensures stability, even with larger phones.
Cradle Slot: A curved slot to securely hold the phone, with clearance for easy insertion/removal.
Cable Management: A cutout at the bottom of the cradle for charging cables.
Organic Shape: Smooth, flowing curves for a modern aesthetic and improved printability (fewer sharp edges).
Closed Surface: Ensures the model is watertight and suitable for 3D printing.
Parametric Design: All dimensions are adjustable via parameters at the top of the script.
Design Approach
Use curves and surfaces to create an organic, flowing shape.
Employ rs.AddLoftSrf to create smooth transitions between base and cradle.
Use boolean operations to create the cradle slot and cable cutout.
Ensure the final model is a closed polysurface using rs.BooleanUnion and validation checks.
Rhino Python Script
python
import rhinoscriptsyntax as rs
import math
# ---- PARAMETERS (Adjust these for your phone) ----
phone_width = 77 # Width of your phone (mm)
phone_thickness = 9 # Thickness including case (mm)
phone_height = 163 # Height of your phone (mm)
viewing_angle = 60 # Viewing angle in degrees (from horizontal)
base_thickness = 6 # Thickness of the base (mm)
wall_thickness = 4 # Thickness of supporting walls (mm)
cradle_depth = 20 # Depth of the cradle slot (mm)
cable_slot_width = 15 # Width of the cable management slot (mm)
# ---- DERIVED DIMENSIONS ----
# Base dimensions (ensure stability)
base_width = max(phone_width * 1.5, 100) # Wide base for stability
base_length = max(phone_height * 0.5, 80) # Long base for stability
# Cradle dimensions (with clearance)
cradle_width = phone_width + 6 # Add clearance for easy insertion
cradle_thickness = phone_thickness + 4 # Add clearance for phone thickness
# Support height (how high the backrest extends)
support_height = phone_height * 0.6 # Support about 60% of phone height
# ---- HELPER FUNCTIONS ----
def create_rounded_rectangle(center_x, center_y, width, length, radius, plane="xy"):
"""Creates a rounded rectangle curve with the given dimensions and fillet radius."""
half_width = width / 2
half_length = length / 2
if plane == "xy":
# Base corners (before rounding)
p1 = (center_x - half_width, center_y - half_length, 0)
p2 = (center_x + half_width, center_y - half_length, 0)
p3 = (center_x + half_width, center_y + half_length, 0)
p4 = (center_x - half_width, center_y + half_length, 0)
elif plane == "xz":
# Support corners (before rounding)
p1 = (center_x - half_width, 0, center_y - half_length)
p2 = (center_x + half_width, 0, center_y - half_length)
p3 = (center_x + half_width, 0, center_y + half_length)
p4 = (center_x - half_width, 0, center_y + half_length)
# Create rectangle
rect = rs.AddPolyline([p1, p2, p3, p4, p1])
# Fillet corners
if radius > 0:
rs.FilletCurve(rect, radius, [0, 1, 2, 3])
return rect
def create_elliptical_curve(center_x, center_y, width, height, plane="xy"):
"""Creates an elliptical curve for smooth transitions."""
if plane == "xy":
plane_obj = rs.WorldXYPlane()
ellipse = rs.AddEllipse(plane_obj, width / 2, height / 2)
rs.MoveObject(ellipse, (center_x, center_y, 0))
elif plane == "xz":
plane_obj = rs.WorldXZPlane()
ellipse = rs.AddEllipse(plane_obj, width / 2, height / 2)
rs.MoveObject(ellipse, (center_x, 0, center_y))
return ellipse
# ---- CREATE BASE ----
# Create base outline (rounded rectangle)
base_center_x = 0
base_center_y = base_length / 2
base_outline = create_rounded_rectangle(base_center_x, base_center_y, base_width, base_length, 10)
base_surface = rs.AddPlanarSrf(base_outline)
# Extrude base to create solid
base = rs.ExtrudeSurface(base_surface, rs.AddLine((0, 0, 0), (0, 0, base_thickness)))
rs.DeleteObject(base_surface) # Clean up
# ---- CREATE ANGLED SUPPORT ----
# Calculate support position and dimensions
support_center_x = 0
support_center_y = base_length / 2 # Center of the base in Y
support_center_z = base_thickness + support_height / 2
# Create support outline (elliptical for organic shape)
support_width = cradle_width + 2 * wall_thickness
support_outline = create_elliptical_curve(support_center_x, support_center_z, support_width, support_height, "xz")
# Extrude support to create solid
support_depth = wall_thickness + cradle_depth
support_vector = rs.AddLine((0, 0, 0), (0, support_depth, 0))
support = rs.ExtrudeCurve(support_outline, support_vector)
# Rotate support to desired viewing angle
support_pivot = (0, support_center_y, base_thickness)
rs.RotateObject(support, support_pivot, 90 - viewing_angle, (1, 0, 0))
# ---- CREATE PHONE CRADLE SLOT ----
# Create cradle outline (slightly smaller than support)
cradle_center_x = 0
cradle_center_z = base_thickness + support_height / 2
cradle_outline = create_elliptical_curve(cradle_center_x, cradle_center_z, cradle_width, support_height * 0.8, "xz")
# Extrude cradle to create cutout
cradle_vector = rs.AddLine((0, 0, 0), (0, cradle_thickness, 0))
cradle_cutout = rs.ExtrudeCurve(cradle_outline, cradle_vector)
# Rotate cradle to match support angle
rs.RotateObject(cradle_cutout, support_pivot, 90 - viewing_angle, (1, 0, 0))
# Position cradle cutout correctly within support
cradle_offset_y = wall_thickness / 2
rs.MoveObject(cradle_cutout, (0, cradle_offset_y, 0))
# ---- CREATE CABLE MANAGEMENT SLOT ----
# Add a rectangular cutout at the bottom of the cradle for cables
cable_slot_height = base_thickness + 10 # Extend slightly above base
cable_slot_depth = cradle_thickness + wall_thickness # Ensure it cuts through
cable_slot_center_x = 0
cable_slot_center_y = support_center_y
cable_slot_center_z = base_thickness / 2
cable_slot_outline = create_rounded_rectangle(cable_slot_center_x, cable_slot_center_z, cable_slot_width, cable_slot_height, 2, "xz")
cable_slot_vector = rs.AddLine((0, 0, 0), (0, cable_slot_depth, 0))
cable_slot_cutout = rs.ExtrudeCurve(cable_slot_outline, cable_slot_vector)
rs.RotateObject(cable_slot_cutout, support_pivot, 90 - viewing_angle, (1, 0, 0))
# ---- BOOLEAN OPERATIONS ----
# Subtract cradle from support
support_with_cradle = rs.BooleanDifference(support, cradle_cutout, delete_input=False)
if not support_with_cradle:
print("Error: Cradle subtraction failed. Check geometry and parameters.")
rs.DeleteObjects([base, support, cradle_cutout, cable_slot_cutout])
exit()
# Subtract cable slot from both base and support
combined_base_support = rs.BooleanUnion([base, support_with_cradle[0]], delete_input=False)
if not combined_base_support:
print("Error: Base and support union failed. Check geometry and parameters.")
rs.DeleteObjects([base, support, cradle_cutout, cable_slot_cutout])
exit()
final_stand = rs.BooleanDifference(combined_base_support, cable_slot_cutout, delete_input=True)
if not final_stand:
print("Error: Cable slot subtraction failed. Check geometry and parameters.")
rs.DeleteObjects([base, support, cradle_cutout, cable_slot_cutout])
exit()
# ---- VALIDATE AND FINALIZE ----
# Check if the final model is a closed polysurface
if rs.IsPolysurface(final_stand[0]) and rs.IsPolysurfaceClosed(final_stand[0]):
rs.SelectObject(final_stand[0])
print("Phone stand created successfully!")
print("Adjust parameters at the top of the script to customize for your phone.")
print("Export as STL for 3D printing.")
else:
print("Error: Final model is not a valid closed polysurface. Check geometry and parameters.")
rs.DeleteObjects(final_stand)
# ---- CLEANUP ----
# Delete temporary objects
rs.DeleteObjects([base_outline, support_outline, cradle_outline, cable_slot_outline])
Design Features & Rationale
1. Ergonomic Viewing Angle
The phone is held at a 60° angle from horizontal, optimized for desk viewing while seated.
The angle is adjustable via the viewing_angle parameter.
2. Stable Base Design
The base is wide and long enough to prevent tipping, even with larger phones.
Rounded corners improve safety, aesthetics, and printability.
Base dimensions are derived from phone dimensions to ensure proportionality.
3. Structural Integrity
Wall thickness (wall_thickness) ensures the stand is strong enough for 3D printing.
Smooth, elliptical transitions reduce stress concentrations and improve print quality.
The cradle slot is deep enough to securely hold the phone without excessive material use.
4. Practical Features
Cable Management: A rounded rectangular slot at the bottom allows charging cables to pass through, keeping the desk tidy.
Cradle Slot: The cradle is sized with clearance (cradle_width, cradle_thickness) for easy phone insertion/removal.
Universal Fit: The parametric design allows easy adjustment for different phone sizes.
5. Organic Shape
Elliptical curves and lofted surfaces create a modern, flowing aesthetic.
Rounded edges and smooth transitions improve both appearance and printability.
6. Closed Surface
The script uses boolean operations (rs.BooleanUnion, rs.BooleanDifference) to ensure the final model is a single, closed polysurface.
Validation checks (rs.IsPolysurfaceClosed) confirm the model is watertight and suitable for 3D printing.
7. Parametric Design
All key dimensions are defined as parameters at the top of the script.
Easily adjust phone_width, phone_thickness, phone_height, viewing_angle, etc., to fit your specific phone.
How to Use This Script
Open Rhino 5 and type EditPythonScript in the command line to open the Python editor.
Copy and Paste the entire script into the editor.
Adjust Parameters at the top of the script to match your phone’s dimensions (e.g., Oppo Reno 10 Pro+).
Measure your phone’s width, thickness, and height (including any case) and update phone_width, phone_thickness, and phone_height.
Adjust viewing_angle if you prefer a different viewing angle.
Run the Script by clicking the green "play" button in the Rhino Python editor.
Inspect the Model in Rhino. The stand will be created and selected automatically.
Export as STL for 3D printing using the Export Selected command in Rhino.
3D Printing Tips
Orientation: Print with the base flat on the build plate to minimize supports. The design is optimized to print without supports if oriented correctly.
Material: PLA, PETG, or ABS all work well. PETG or ABS may offer better durability.
Infill: Use at least 15% infill for adequate strength.
Layer Height: A layer height of 0.2mm provides a good balance of quality and print time.
Wall Thickness: Ensure your slicer settings maintain the wall_thickness (default 4mm) for structural integrity.
Potential Improvements
If you want to enhance this design further, consider the following:
Adjustable Angle: Add a hinge mechanism (though this would require multiple parts and assembly post-printing).
Sound Amplification: Incorporate a passive sound amplification channel (e.g., a horn-shaped cavity) to direct sound from the phone’s speaker.
Non-Slip Base: Add small recesses in the base for rubber feet or adhesive pads.
Aesthetic Details: Add decorative cutouts or engravings (e.g., a logo) using additional boolean operations.
Curved Cradle: Use a more complex curve (e.g., a spline) for the cradle slot to better match the phone’s shape.
Troubleshooting
Boolean Operations Fail: If boolean operations fail, check that the geometry is not self-intersecting. Adjust parameters (e.g., increase wall_thickness or reduce cradle_depth) to ensure clean intersections.
Model Not Closed: If the final model is not a closed polysurface, inspect the geometry in Rhino using ShowEdges to identify open edges. Adjust the script parameters or manually close the surface in Rhino.
Printability Issues: If the model doesn’t print well, consider increasing base_thickness or wall_thickness for better stability and strength.
This design balances aesthetics, functionality, and printability while ensuring it’s a valid closed surface for 3D printing. The parametric nature allows you to customize it perfectly for your specific phone. Let me know if you’d like to add any additional features or need help with further refinements!