aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2022-11-19 16:34:16 +0000
committerThierry Thomas <thierry@FreeBSD.org>2022-11-19 16:35:41 +0000
commit68756d9a564b08fcffb2da9b2a056ed6df6d97a0 (patch)
treeefaa783c938dd050407dd71edbba3ac47293804b
parent57b0181fead02ee968fee08c9df50ee3a4f6f0ec (diff)
downloadports-68756d9a564b08fcffb2da9b2a056ed6df6d97a0.tar.gz
ports-68756d9a564b08fcffb2da9b2a056ed6df6d97a0.zip
science/py-sdf: add a simple SDF mesh generator
-rw-r--r--science/Makefile1
-rw-r--r--science/py-sdf/Makefile36
-rw-r--r--science/py-sdf/distinfo3
-rw-r--r--science/py-sdf/pkg-descr12
-rw-r--r--science/py-sdf/pkg-plist30
5 files changed, 82 insertions, 0 deletions
diff --git a/science/Makefile b/science/Makefile
index 8101c80249e6..4b5cb25529d7 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -400,6 +400,7 @@
SUBDIR += py-scimath
SUBDIR += py-scipy
SUBDIR += py-scoria
+ SUBDIR += py-sdf
SUBDIR += py-segregation
SUBDIR += py-segyio
SUBDIR += py-sklearn-pandas
diff --git a/science/py-sdf/Makefile b/science/py-sdf/Makefile
new file mode 100644
index 000000000000..b9b13cbe5d7a
--- /dev/null
+++ b/science/py-sdf/Makefile
@@ -0,0 +1,36 @@
+PORTNAME= sdf
+PORTVERSION= 0.1
+CATEGORIES= science cad python
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= thierry@FreeBSD.org
+COMMENT= Simple SDF mesh generation in Python
+WWW= https://github.com/nschloe/meshio
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE.md
+
+RUN_DEPENDS= ${PYNUMPY} \
+ ${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}meshio>0:science/py-meshio@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}matplotlib>0:math/py-matplotlib@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}scikit-image>0:graphics/py-scikit-image@${PY_FLAVOR}
+
+USE_GITHUB= yes
+GH_ACCOUNT= fogleman
+GH_TAGNAME= cee1dac # No release yet
+
+USES= python:3.7+
+USE_PYTHON= distutils
+
+OPTIONS_DEFINE= EXAMPLES
+PORTEXAMPLES= *
+
+NO_ARCH= yes
+
+post-install-EXAMPLES-on:
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ (cd ${WRKSRC}/examples && ${INSTALL_DATA} * ${STAGEDIR}${EXAMPLESDIR})
+
+.include <bsd.port.mk>
diff --git a/science/py-sdf/distinfo b/science/py-sdf/distinfo
new file mode 100644
index 000000000000..783bed9819db
--- /dev/null
+++ b/science/py-sdf/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1668871567
+SHA256 (fogleman-sdf-0.1-cee1dac_GH0.tar.gz) = 1a78bd4cc73aa126cad938eddabcd459768c2d71c853fc30c20af3f810695143
+SIZE (fogleman-sdf-0.1-cee1dac_GH0.tar.gz) = 8269639
diff --git a/science/py-sdf/pkg-descr b/science/py-sdf/pkg-descr
new file mode 100644
index 000000000000..e2f05eff66e7
--- /dev/null
+++ b/science/py-sdf/pkg-descr
@@ -0,0 +1,12 @@
+Generate 3D meshes based on SDFs (signed distance functions) with a dirt simple
+Python API.
+
+sdf natively writes binary STL files. For other formats, meshio is used (based
+on your output file extension). This adds support for over 20 different 3D file
+formats, including OBJ, PLY, VTK, and many more.
+
+You could use cad/meshlab or cad/gmsh to view the mesh.
+
+Remark: there exists also another Python program named SDF (in uppercase),
+Scientific Data Format, but this is a different one: see
+<https://pypi.org/project/SDF/>.
diff --git a/science/py-sdf/pkg-plist b/science/py-sdf/pkg-plist
new file mode 100644
index 000000000000..d84066eb9632
--- /dev/null
+++ b/science/py-sdf/pkg-plist
@@ -0,0 +1,30 @@
+%%PYTHON_SITELIBDIR%%/sdf/__init__.py
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/d2.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/d2.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/d3.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/d3.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/dn.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/dn.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/ease.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/ease.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/mesh.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/mesh.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/progress.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/progress.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/stl.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/stl.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/text.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/text.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/util.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/sdf/__pycache__/util.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/sdf/d2.py
+%%PYTHON_SITELIBDIR%%/sdf/d3.py
+%%PYTHON_SITELIBDIR%%/sdf/dn.py
+%%PYTHON_SITELIBDIR%%/sdf/ease.py
+%%PYTHON_SITELIBDIR%%/sdf/mesh.py
+%%PYTHON_SITELIBDIR%%/sdf/progress.py
+%%PYTHON_SITELIBDIR%%/sdf/stl.py
+%%PYTHON_SITELIBDIR%%/sdf/text.py
+%%PYTHON_SITELIBDIR%%/sdf/util.py