Skip to content
TheChatArchiveThe Chat Archive
Googlegemma-3-27b-it· GoogleHugging Face LMArena Human Preference 140K

design a phone stand using rhino python editor, it must be a valid closed surface, think…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Geminigemini-2.5-pro-preview-03-25’s answer.
  1. User

    design a phone stand using rhino python editor, it must be a valid closed surface, think hard

  2. Google Assistant

    Okay, let's design a more sophisticated, structurally sound, and aesthetically pleasing phone stand using Rhino Python. This design will focus on a curved, organic shape that provides both stability and a modern look. It will be a single, closed surface, suitable for 3D printing without requiring complex boolean operations. This is a more challenging approach, requiring careful curve and surface creation.

    Design Concept:

    • Monocoque Structure: A single, continuous surface forming the entire stand. This maximizes strength and minimizes print issues.
    • Curved Cradle: A smoothly curved cradle to securely hold the phone.
    • Wide Base: A broad base for stability.
    • Organic Flow: The design will flow organically from the base to the cradle, avoiding sharp corners.
    • Slight Angle: The phone will be held at a slight angle for comfortable viewing.

    Key Techniques:

    • Rail Curves: We'll define rail curves to guide the surface creation.
    • Network Surface: A network surface will be created from the rail curves and cross-sections.
    • Surface Trimming: The surface will be trimmed to create the desired shape.
    • Closing the Surface: Ensuring the surface is closed and valid for 3D printing.

    Rhino Python Script:

    import rhinoscriptsyntax as rs
    import math
    
    # --- Parameters ---
    base_width = 100  # mm
    base_depth = 80  # mm
    base_height = 20  # mm
    
    phone_width = 77  # mm (Oppo Reno 10 Pro+)
    phone_thickness = 9  # mm
    cradle_depth = 20  # mm
    cradle_angle = 20  # degrees
    
    # --- Helper Functions ---
    def create_rail_curve(points):
        """Creates a rail curve from a list of points."""
        curve = rs.AddCurve(points)
        return curve
    
    def create_cross_section_curve(points):
        """Creates a cross-section curve from a list of points."""
        curve = rs.AddCurve(points)
        return curve
    
    # --- Create Base Rail Curve ---
    base_points = [
        (0, 0, 0),
        (base_width, 0, 0),
        (base_width, base_depth, 0),
        (0, base_depth, 0)
    ]
    base_rail = create_rail_curve(base_points)
    
    # --- Create Cradle Rail Curve ---
    cradle_points = [
        (base_width / 2 - phone_width / 2, base_depth, base_height),
        (base_width / 2 + phone_width / 2, base_depth, base_height),
        (base_width / 2 + phone_width / 2, base_depth - cradle_depth, base_height + cradle_depth * math.tan(math.radians(cradle_angle))),
        (base_width / 2 - phone_width / 2, base_depth - cradle_depth, base_height + cradle_depth * math.tan(math.radians(cradle_angle)))
    ]
    cradle_rail = create_rail_curve(cradle_points)
    
    # --- Create Cross-Section Curves ---
    # These curves define the shape of the stand between the base and cradle rails.
    cross_section_points_front = [
        (0, base_depth / 2, 0),
        (base_width / 2, base_depth / 2, base_height),
        (base_width / 2, base_depth / 2, base_height + cradle_depth * math.tan(math.radians(cradle_angle)))
    ]
    cross_section_front = create_cross_section_curve(cross_section_points_front)
    
    cross_section_points_back = [
        (base_width, base_depth / 2, 0),
        (base_width / 2, base_depth / 2, base_height),
        (base_width / 2, base_depth / 2, base_height + cradle_depth * math.tan(math.radians(cradle_angle)))
    ]
    cross_section_back = create_cross_section_curve(cross_section_points_back)
    
    # --- Create Network Surface ---
    surface = rs.AddNetworkSurface([base_rail, cradle_rail], [cross_section_front, cross_section_back], 0, 0)
    
    # --- Trim Surface ---
    # Trim the surface to create the desired shape.  This is where you refine the design.
    # This is a simplified trimming example.  You'll likely need to adjust the trimming curves.
    trim_curve = rs.AddCurve([
        (0, 0, 0),
        (base_width, 0, 0),
        (base_width, base_depth, 0),
        (0, base_depth, 0)
    ])
    rs.TrimSurface(surface, [trim_curve])
    
    # --- Close Surface ---
    # Check if the surface is closed. If not, try to close it.
    if not rs.IsSurfaceClosed(surface):
        rs.CloseSurface(surface)
    
    # --- Validate Surface ---
    if rs.IsSurfaceValid(surface):
        rs.SelectObject(surface)
        print("Phone stand created! Export as STL for 3D printing.")
    else:
        print("Surface is not valid. Check the geometry and try again.")
    

    How to Use:

    1. Open Rhino 5.
    2. Open the Rhino Python Editor: Type EditPythonScript in the Rhino command line.
    3. Copy and Paste: Copy the entire script above and paste it into the Rhino Python Editor.
    4. Adjust Parameters: Modify the parameters at the top of the script to customize the stand's dimensions and angle. Pay close attention to phone_width and phone_thickness.
    5. Run the Script: Click the "Run" button in the Rhino Python Editor.
    6. Inspect and Refine: Rhino will generate the phone stand. Inspect it carefully. You'll likely need to refine the trimming curves to achieve the exact shape you want. Use Rhino's surface editing tools to further refine the surface.
    7. Save as STL: Select the generated surface in Rhino and export it as an STL file (File > Export Selected..., choose STL as the file type).
    8. Slice and Print: Open the STL file in your slicer software and prepare it for 3D printing.

    Important Considerations:

    • Surface Validity: The rs.IsSurfaceValid() check is crucial. If the surface is not valid, it won't print correctly.
    • Trimming: The trimming step is the most challenging part. You'll need to experiment with different trimming curves to achieve the desired shape.
    • Refinement: Use Rhino's surface editing tools (e.g., ShowEdges, MatchSurface) to refine the surface and ensure it's smooth and aesthetically pleasing.
    • Print Orientation: Consider the print orientation to minimize supports and maximize strength.
    • Wall Thickness: The script doesn't explicitly define wall thickness. The surface thickness is determined by the cross-section curves. Ensure the thickness is sufficient for printing.

    This script provides a solid foundation for a sophisticated phone stand design. It requires more effort to refine than the simple box-based approach, but the result will be a more elegant and structurally sound object. Remember to iterate on the design and adjust the parameters and trimming curves until you achieve the desired result.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.