.. CGAL PyCAD documentation master file.

Welcome to CGAL PyCAD's documentation!
======================================

**CGAL PyCAD** is a Python library for exact 3D geometric modeling using CGAL's ``Nef_polyhedron_3``.

It provides:
- **Exact Arithmetic**: Zero precision loss for boolean operations.
- **Robust Backend**: Guaranteed closed, valid manifolds.
- **Pythonic API**: OpenSCAD-like DSL.

Installation
------------

.. code-block:: bash

   pip install cgal_pycad

Quick Start
-----------

.. code-block:: python

   from cgal_pycad import cube, sphere, translate
   
   # Exact cube
   c = cube([10, 10, 10], center=True)
   
   # High-res sphere (tolerance 0.01)
   s = sphere(6, tolerance=0.01)
   
   # Boolean difference
   result = c - translate([2, 0, 0])(s)
   
   result.to_stl("result.stl")

API Reference
-------------

.. toctree::
   :maxdepth: 2
   :caption: Contents:

   api

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
