artem-ogre / pythoncdt Goto Github PK
View Code? Open in Web Editor NEWConstrained Delaunay Triangulation (Python)
License: Mozilla Public License 2.0
Constrained Delaunay Triangulation (Python)
License: Mozilla Public License 2.0
Windows 10 21H2
Visual Studio 2022
Python 3.10.6
After checking out the git and executing 'pip3 install .
', I'm getting these warnings and error:
C:\PythonCDT>pip3 install .
Processing c:\pythoncdt
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: PythonCDT
Building wheel for PythonCDT (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for PythonCDT (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [207 lines of output]
running bdist_wheel
running build
running build_ext
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
-- CDT_USE_BOOST is OFF
-- CDT_USE_AS_COMPILED_LIBRARY is OFF
-- CDT_USE_64_BIT_INDEX_TYPE is OFF
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- pybind11 v2.10.0 dev1
-- Configuring done
-- Generating done
-- Build files have been written to: C:/PythonCDT/build/temp.win-amd64-cpython-310/Release
MSBuild version 17.3.1+2badb37d1 for .NET Framework
Checking Build System
Building Custom Rule C:/PythonCDT/CMakeLists.txt
cdt_bindings.cpp
C:\PythonCDT\CDT\CDT\include\CDT.hpp(1455,57): warning C4267: 'argument': conversion from 'size_t' to 'CDT::VertInd', possible loss of data [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
C:\PythonCDT\CDT\CDT\include\CDT.hpp(232,1): warning C4267: 'argument': conversion from 'size_t' to '_Ty', possible loss of data [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
_Ty=std::seed_seq::result_type
]
C:\PythonCDT\CDT\CDT\include\CDT.hpp(223): message : while compiling class template member function 'void CDT::Triangulation<coord_t,CDT::LocatorKDTree<T,32,32,32>>::eraseOuterTrianglesAndHoles(void)' [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
T=coord_t
]
C:\PythonCDT\cdt_bindings.cpp(369): message : see reference to function template instantiation 'void CDT::Triangulation<coord_t,CDT::LocatorKDTree<T,32,32,32>>::eraseOuterTrianglesAndHoles(void)' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
T=coord_t
]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\type_traits(521): message : see reference to class template instantiation 'CDT::Triangulation<coord_t,CDT::LocatorKDTree<T,32,32,32>>' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
T=coord_t
]
C:\PythonCDT\pybind11\include\pybind11\pybind11.h(1487): message : see reference to class template instantiation 'std::is_polymorphic<CDT::Triangulation<coord_t,CDT::LocatorKDTree<T,32,32,32>>>' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
T=coord_t
]
C:\PythonCDT\cdt_bindings.cpp(171): message : see reference to class template instantiation 'pybind11::class_<Triangulation>' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
C:\PythonCDT\CDT\CDT\include\CDT.h(742,1): warning C4267: 'initializing': conversion from 'size_t' to 'CDT::VertInd', possible loss of data [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
C:\PythonCDT\cdt_bindings.cpp(171): message : see reference to function template instantiation 'void CDT::Triangulation<coord_t,CDT::LocatorKDTree<T,32,32,32>>::insertVertices<const pybind11_init_PythonCDT::<lambda_daed6c85c55980a9a6bf4dfbe830eb2b>::()::XY*,pybind11_init_PythonCDT::<lambda_daed6c85c55980a9a6bf4dfbe830eb2b>::()::<lambda_6ad45f0f664944f44da928d31c47e79e>,pybind11_init_PythonCDT::<lambda_daed6c85c55980a9a6bf4dfbe830eb2b>::()::<lambda_b9f715ea712ccc6ec232ce2dcd6d9db2>>(const TVertexIter,const TVertexIter,TGetVertexCoordX,TGetVertexCoordY)' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
T=coord_t,
TVertexIter=const pybind11_init_PythonCDT::<lambda_daed6c85c55980a9a6bf4dfbe830eb2b>::()::XY *,
TGetVertexCoordX=pybind11_init_PythonCDT::<lambda_daed6c85c55980a9a6bf4dfbe830eb2b>::()::<lambda_6ad45f0f664944f44da928d31c47e79e>,
TGetVertexCoordY=pybind11_init_PythonCDT::<lambda_daed6c85c55980a9a6bf4dfbe830eb2b>::()::<lambda_b9f715ea712ccc6ec232ce2dcd6d9db2>
]
C:\PythonCDT\cdt_bindings.cpp(282): message : see reference to function template instantiation 'void CDT::Triangulation<coord_t,CDT::LocatorKDTree<T,32,32,32>>::insertVertices<const pybind11_init_PythonCDT::<lambda_daed6c85c55980a9a6bf4dfbe830eb2b>::()::XY*,pybind11_init_PythonCDT::<lambda_daed6c85c55980a9a6bf4dfbe830eb2b>::()::<lambda_6ad45f0f664944f44da928d31c47e79e>,pybind11_init_PythonCDT::<lambda_daed6c85c55980a9a6bf4dfbe830eb2b>::()::<lambda_b9f715ea712ccc6ec232ce2dcd6d9db2>>(const TVertexIter,const TVertexIter,TGetVertexCoordX,TGetVertexCoordY)' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
T=coord_t,
TVertexIter=const pybind11_init_PythonCDT::<lambda_daed6c85c55980a9a6bf4dfbe830eb2b>::()::XY *,
TGetVertexCoordX=pybind11_init_PythonCDT::<lambda_daed6c85c55980a9a6bf4dfbe830eb2b>::()::<lambda_6ad45f0f664944f44da928d31c47e79e>,
TGetVertexCoordY=pybind11_init_PythonCDT::<lambda_daed6c85c55980a9a6bf4dfbe830eb2b>::()::<lambda_b9f715ea712ccc6ec232ce2dcd6d9db2>
]
C:\PythonCDT\CDT\CDT\include\CDT.hpp(489,1): warning C4267: 'initializing': conversion from 'size_t' to 'CDT::VertInd', possible loss of data [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
C:\PythonCDT\CDT\CDT\include\CDT.hpp(440): message : while compiling class template member function 'void CDT::Triangulation<coord_t,CDT::LocatorKDTree<T,32,32,32>>::insertEdge(CDT::Edge,CDT::Edge)' [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
T=coord_t
]
C:\PythonCDT\CDT\CDT\include\CDT.h(769): message : see reference to function template instantiation 'void CDT::Triangulation<coord_t,CDT::LocatorKDTree<T,32,32,32>>::insertEdge(CDT::Edge,CDT::Edge)' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
T=coord_t
]
C:\PythonCDT\CDT\CDT\include\CDT.hpp(1436): message : while compiling class template member function 'void CDT::Triangulation<coord_t,CDT::LocatorKDTree<T,32,32,32>>::insertVertices(const std::vector<CDT::V2d<T>,std::allocator<CDT::V2d<T>>> &)' [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
T=coord_t
]
C:\PythonCDT\cdt_bindings.cpp(369): message : see reference to function template instantiation 'void CDT::Triangulation<coord_t,CDT::LocatorKDTree<T,32,32,32>>::insertVertices(const std::vector<CDT::V2d<T>,std::allocator<CDT::V2d<T>>> &)' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
T=coord_t
]
C:\PythonCDT\CDT\CDT\include\CDT.hpp(489,1): warning C4267: 'initializing': conversion from 'size_t' to 'const CDT::VertInd', possible loss of data [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
C:\PythonCDT\CDT\CDT\include\CDT.hpp(633,1): warning C4267: 'initializing': conversion from 'size_t' to 'CDT::VertInd', possible loss of data [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
C:\PythonCDT\CDT\CDT\include\CDT.hpp(581): message : while compiling class template member function 'void CDT::Triangulation<coord_t,CDT::LocatorKDTree<T,32,32,32>>::conformToEdge(CDT::Edge,CDT::EdgeVec,CDT::BoundaryOverlapCount)' [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
T=coord_t
]
C:\PythonCDT\CDT\CDT\include\CDT.h(791): message : see reference to function template instantiation 'void CDT::Triangulation<coord_t,CDT::LocatorKDTree<T,32,32,32>>::conformToEdge(CDT::Edge,CDT::EdgeVec,CDT::BoundaryOverlapCount)' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
T=coord_t
]
C:\PythonCDT\CDT\CDT\include\CDT.hpp(633,1): warning C4267: 'initializing': conversion from 'size_t' to 'const CDT::VertInd', possible loss of data [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
C:\PythonCDT\CDT\CDT\include\CDT.hpp(694,1): warning C4267: 'initializing': conversion from 'size_t' to 'CDT::VertInd', possible loss of data [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
C:\PythonCDT\CDT\CDT\include\CDT.hpp(694,1): warning C4267: 'initializing': conversion from 'size_t' to 'const CDT::VertInd', possible loss of data [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
C:\PythonCDT\CDT\CDT\include\KDTree.h(249,1): warning C4267: 'initializing': conversion from 'size_t' to 'KDTree::KDTree<TCoordType,32,32,32>::node_index', possible loss of data [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
TCoordType=coord_t
]
C:\PythonCDT\CDT\CDT\include\KDTree.h(248): message : while compiling class template member function 'KDTree::KDTree<TCoordType,32,32,32>::node_index KDTree::KDTree<TCoordType,32,32,32>::addNewNode(void)' [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
TCoordType=coord_t
]
C:\PythonCDT\CDT\CDT\include\KDTree.h(148): message : see reference to function template instantiation 'KDTree::KDTree<TCoordType,32,32,32>::node_index KDTree::KDTree<TCoordType,32,32,32>::addNewNode(void)' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
TCoordType=coord_t
]
C:\PythonCDT\CDT\CDT\include\LocatorKDTree.h(66): message : see reference to class template instantiation 'KDTree::KDTree<TCoordType,32,32,32>' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
TCoordType=coord_t
]
C:\PythonCDT\CDT\CDT\include\CDT.h(411): message : see reference to class template instantiation 'CDT::LocatorKDTree<T,32,32,32>' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
T=coord_t
]
C:\PythonCDT\CDT\CDT\include\KDTree.h(249,1): warning C4267: 'initializing': conversion from 'size_t' to 'const KDTree::KDTree<TCoordType,32,32,32>::node_index', possible loss of data [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
TCoordType=coord_t
]
C:\PythonCDT\pybind11\include\pybind11\detail/init.h(79,40): error C2397: conversion from '_Ty' to 'T' requires a narrowing conversion [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
_Ty=int
]
and
[
T=coord_t
]
C:\PythonCDT\pybind11\include\pybind11\detail/init.h(199): message : see reference to function template instantiation 'Class *pybind11::detail::initimpl::construct_or_initialize<CDT::V2d<coord_t>,_Ty,_Ty,0>(_Ty &&,_Ty &&)' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
Class=CDT::V2d<coord_t>,
_Ty=int
]
C:\PythonCDT\pybind11\include\pybind11\pybind11.h(1581): message : see reference to function template instantiation 'void pybind11::detail::initimpl::constructor<int,int>::execute<pybind11::class_<V2d>,pybind11::arg,pybind11::arg,0>(Class &,const pybind11::arg &,const pybind11::arg &)' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
Class=pybind11::class_<V2d>
]
C:\PythonCDT\pybind11\include\pybind11\pybind11.h(1583): message : see reference to function template instantiation 'void pybind11::detail::initimpl::constructor<int,int>::execute<pybind11::class_<V2d>,pybind11::arg,pybind11::arg,0>(Class &,const pybind11::arg &,const pybind11::arg &)' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
with
[
Class=pybind11::class_<V2d>
]
C:\PythonCDT\cdt_bindings.cpp(65): message : see reference to function template instantiation 'pybind11::class_<V2d> &pybind11::class_<V2d>::def<int,int,pybind11::arg,pybind11::arg>(const pybind11::detail::initimpl::constructor<int,int> &,const pybind11::arg &,const pybind11::arg &)' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
C:\PythonCDT\cdt_bindings.cpp(95): message : see reference to function template instantiation 'pybind11::class_<V2d> &pybind11::class_<V2d>::def<int,int,pybind11::arg,pybind11::arg>(const pybind11::detail::initimpl::constructor<int,int> &,const pybind11::arg &,const pybind11::arg &)' being compiled [C:\PythonCDT\build\temp.win-amd64-cpython-310\Release\PythonCDT.vcxproj]
Traceback (most recent call last):
File "C:\Users\cmessina\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Users\cmessina\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\cmessina\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 261, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\build_meta.py", line 412, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\build_meta.py", line 397, in _build_with_temp_dir
self.run_setup()
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 128, in <module>
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_commands
self.run_command(cmd)
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
super().run_command(command)
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
cmd_obj.run()
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 299, in run
self.run_command('build')
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
super().run_command(command)
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
cmd_obj.run()
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
self.run_command(cmd_name)
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
super().run_command(command)
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 992, in run_command
cmd_obj.run()
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\command\build_ext.py", line 84, in run
_build_ext.run(self)
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 346, in run
self.build_extensions()
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 466, in build_extensions
self._build_extensions_serial()
File "C:\Users\cmessina\AppData\Local\Temp\pip-build-env-by1_hn3a\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 492, in _build_extensions_serial
self.build_extension(ext)
File "<string>", line 121, in build_extension
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for PythonCDT
Failed to build PythonCDT
ERROR: Could not build wheels for PythonCDT, which is required to install pyproject.toml-based projects
Not sure where to go from here. Has the PythonCDT been tested under Windows, or just the main CDT code? Any suggestions for getting it to compile?
Ultimately, I'm interested in seeing if this can be utilized in Blender, and at this point I think I just need a Windows compiled version of the PythonCDT module.
Thanks!
Hi there @artem-ogre,
First, I'd like to say that this package essentially saved my a**. I have been working with some special kinds of triangulations for geophysical domains, but it was nearly impossible for me to find a triangulator that would both respect the constraints and be conforming at the same time. Literally, I almost gave up at some point. After one last ditch Google search I found this package and it literally saved my entire project. Needless to say, I'm extremely grateful for this contribution.
Which takes me to my question, is there any chance that you would upgrade the core CDT on PythonCDT?
This one works well, but it would be nice to have this package keep up with the core CDT if possible.
Would that be doable?
Also, I'm unclear on how to cite you for this, do you have a particular peer-reviewed publication you'd like me to use as reference when describing the parts of my workflow that use CDT?
Thanks again!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.