Skip to content

About

Native Python port of the Topolys non-manifold topology library

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

py-topolys

Native Python port of the Topolys non-manifold topology library.

Status: Alpha. Geometry, transformations, topology entities, model factories, cascading edge splits, serialization, graph export, and the full Ruby scenario suite are implemented.

Installation

Install the tagged release directly from GitHub:

python -m pip install "py-topolys @ git+https://github.com/canmet-energy/py-topolys.git@v0.1.0"

For requirements.txt:

py-topolys @ git+https://github.com/canmet-energy/py-topolys.git@v0.1.0

For pyproject.toml:

dependencies = [
    "py-topolys @ git+https://github.com/canmet-energy/py-topolys.git@v0.1.0",
]

Usage

import py_topolys

model = py_topolys.Model()
points = [
    py_topolys.Point3D(0, 0, 0),
    py_topolys.Point3D(1, 0, 0),
    py_topolys.Point3D(1, 1, 0),
    py_topolys.Point3D(0, 1, 0),
]
wire = model.get_wire(model.get_vertices(points))
face = model.get_face(