Metadata-Version: 2.4
Name: primlib
Version: 0.3.0
Summary: Primlib: a Python framework for handling 3D geometric primitives
Author-email: Philipp Roebrock <philipp.roebrock@fhgr.ch>
License: MIT License
        
        Lighthouse: https://gitlab.com/proebrock/lighthouse/
        Copyright (c) 2021 Philipp Roebrock
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://gitlab.com/proebrock/primlib
Project-URL: Issues, https://gitlab.com/proebrock/primlib/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: plyfile
Requires-Dist: polyscope
Requires-Dist: pyembree2
Requires-Dist: scipy
Requires-Dist: trafolib
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Dynamic: license-file

# Primlib
![Pipeline Status](https://gitlab.com/proebrock/primlib/badges/devel/pipeline.svg)
![Coverage](https://gitlab.com/proebrock/primlib/badges/devel/coverage.svg)

Library for processing geometrical primitives like point clouds or triangle meshes.

## Features
- Class representation of a point cloud
- Class representation of a triangle mesh
- Class representation of a line set
- Main library has just NumPy and SciPy as external dependencies
- Fast 3d visualization using Polyscope library
- **Permissive License (MIT)**, code can be used in commercial software

## Requirements
- [Python](https://www.python.org/) >=3.10
- [NumPy](https://numpy.org/)
- [SciPy](https://scipy.org/)
- [Matplotlib](https://matplotlib.org/)
- [trafolib](https://gitlab.com/proebrock/trafolib) for represenation of rigid body transformations
- [plyfile](https://pypi.org/project/plyfile/) for loading PLY files
- [Polyscope](https://polyscope.run/py/) for visualization
- [pyembree2](https://pypi.org/project/pyembree2/) as wrapper for Intel Embree for mesh-point distance computations
- [pytest](https://docs.pytest.org/en/stable/) and [pytest-cov](https://pypi.org/project/pytest-cov/) for testing
- [Ruff](https://github.com/astral-sh/ruff) for linting

All dependencies are declared in [`pyproject.toml`](pyproject.toml).

## Installation
It is strongly recommended to use a **virtual environment**.

### For Users (Runtime Only)
This will install the core libraries needed to run Primlib, without any development tools or tests.

```bash
pip install primlib
```

### 2. For Developers
This installation is for **contributors** who want to run tests or modify the code.

1. Clone the repository:
    ```bash
    git clone https://gitlab.com/proebrock/primlib.git
    cd primlib
    ```
2. Create a virtual environment (recommended):
    ```bash
    python -m venv .venv
    source .venv/bin/activate  # Linux / macOS
    .venv\Scripts\activate     # Windows
    ```
   
3. Install the project with development extras:
    ```bash
    pip install -e ".[dev]"
    ```
4. Run ruff:
   - As a linter:
     ```bash
     ruff check
     ```
   - As a formatter:
     ```bash
     ruff format
     ```
5. Run all tests:
    ```bash
    pytest
    ```

## About me and the project
My name is Philipp Roebrock and I work as a lecturer at the Institute for Photonics and Robotics at the University of Applied Sciences of the Grisons [FHGR](https://www.fhgr.ch/) in Chur in Switzerland.

If you have any questions or suggestions please drop and issue or a personal message to `philipp DOT roebrock AT fhgr DOT ch`.
