Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated python doc strings #488

Merged
merged 2 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ node test/manifold_test.js

### Python

The CMake script will build the python binding `pymanifold` automatically. To
The CMake script will build the python binding `manifold3d` automatically. To
use the extension, please add `$BUILD_DIR/tools` to your `PYTHONPATH`, where
`$BUILD_DIR` is the build directory for CMake. Examples using the python binding
can be found in `bindings/python/examples`. To see exported samples, run:
Expand All @@ -112,8 +112,8 @@ Run the following code in the interpreter for
python binding documentation:

```
>>> import pymanifold
>>> help(pymanifold)
>>> import manifold3d
>>> help(manifold3d)
```

For more detailed documentation, please refer to the C++ API.
Expand Down
10 changes: 5 additions & 5 deletions bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
project(python)

add_subdirectory(third_party)
pybind11_add_module(pymanifold pymanifold.cpp)
target_link_libraries(pymanifold PRIVATE manifold)
target_compile_options(pymanifold PRIVATE ${MANIFOLD_FLAGS})
target_compile_features(pymanifold PUBLIC cxx_std_17)
target_include_directories(pymanifold
pybind11_add_module(manifold3d manifold3d.cpp)
target_link_libraries(manifold3d PRIVATE manifold)
target_compile_options(manifold3d PRIVATE ${MANIFOLD_FLAGS})
target_compile_features(manifold3d PUBLIC cxx_std_17)
target_include_directories(manifold3d
PRIVATE ${PYBIND11_DIR}/include
)
2 changes: 1 addition & 1 deletion bindings/python/examples/bricks.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
"""

from pymanifold import Manifold
from manifold3d import Manifold

# https://gist.github.com/deckar01/ef11def51de7e71d9f288c6e5819fdb7

Expand Down
2 changes: 1 addition & 1 deletion bindings/python/examples/cube_with_dents.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
"""

from pymanifold import Manifold
from manifold3d import Manifold
from functools import reduce

# https://gist.github.com/ochafik/2db96400e3c1f73558fcede990b8a355#file-cube-with-half-spheres-dents-scad
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/examples/extrude.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pymanifold import CrossSection, FillRule
from manifold3d import CrossSection, FillRule


def run():
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/examples/maze.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# One of the benchmarks in in https://gist.github.com/ochafik/2db96400e3c1f73558fcede990b8a355
# https://www.thingiverse.com/groups/openscad/forums/general/topic:34699

from pymanifold import Manifold
from manifold3d import Manifold
import numpy as np

n = 10
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/examples/union_failure.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pymanifold import Manifold
from manifold3d import Manifold

def run():
# for some reason this causes collider error
Expand Down
237 changes: 168 additions & 69 deletions bindings/python/pymanifold.cpp → bindings/python/manifold3d.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
mkdir -p $out
cp src/manifold/libmanifold.a $out/
cp extras/perfTest $out
cp bindings/python/pymanifold* $out
cp bindings/python/manifold3d* $out
'';
};
parallelBackends = [
Expand Down