hoops_ai.insights.quick_view

hoops_ai.insights.quick_view(filepath, display_mode='sidecar', static_folder=None, **kwargs)

Quick one-liner to view a CAD file.

This convenience function creates a viewer, loads the file, and displays it in a single call. By default, automatically finds a free port.

Parameters:
  • filepath (str) – Path to the CAD file

  • display_mode (str) – Display mode (‘sidecar’, ‘inline’)

  • static_folder (Path | None) – Optional static folder path

  • **kwargs – Additional arguments for CADViewer (e.g., port=9000 for specific port)

Returns:

CADViewer instance

Return type:

CADViewer

Examples:

# Auto-find port (default)
viewer = quick_view("model.step")

# Inline display with auto port
viewer = quick_view("model.step", display_mode='inline')

# Specify exact port (strict mode)
viewer = quick_view("model.step", port=9000)