py-cylinder-fitting


Namepy-cylinder-fitting JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryThis package allows to compute the best fit cylinder given points in three-dimensional space.
upload_time2022-12-28 16:20:14
maintainer
docs_urlNone
author
requires_python>=3.7
license BSD 2-Clause License Copyright (c) 2022, Cristiano Pizzamiglio Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords cylinder best-fit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Introduction
------------

This package allows to compute the best fit cylinder given points in three-dimensional space.

Object-oriented implementation of the `cylinder_fitting` repo by xingjiepan_ with input validation and type hints.

Algorithm by `David Eberly <https://www.geometrictools.com/Documentation/LeastSquaresFitting.pdf>`_.

As stated by David Eberly, the main assumption is that the underlying data is
modelled by a cylinder and that errors have caused the points not to be exactly on
the cylinder.

Installation
------------

The package can be installed with pip.

.. code-block:: bash

   $ pip install py-cylinder-fitting
   
Example Usage
-------------
>>> from py_cylinder_fitting import BestFitCylinder
>>> from skspatial.objects import Points

>>> points = [[2, 0, 0], [0, 2, 0], [0, -2, 0], [2, 0, 4], [0, 2, 4], [0, -2, 4]]

>>> best_fit_cylinder = BestFitCylinder(Points(points))

>>> best_fit_cylinder.point
[0., 0., 0.]

>>> best_fit_cylinder.vector
[0.  0.  4.]

>>> best_fit_cylinder.radius
2.0

Acknowledgment
--------------
This package is based on the cylinder_fitting repo by xingjiepan_ and the scikit-spatial_ library by Andrew Hynes.

.. _xingjiepan: https://github.com/xingjiepan/cylinder_fitting
.. _scikit-spatial: https://github.com/ajhynes7/scikit-spatial

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "py-cylinder-fitting",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "cylinder,best-fit",
    "author": "",
    "author_email": "Cristiano Pizzamiglio <cristianopizzamiglio@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/95/73/e24b5d5a15682edae6b22a6bda64fa46dbca0915aea222b1e57be653e563/py-cylinder-fitting-1.0.0.tar.gz",
    "platform": null,
    "description": "Introduction\r\n------------\r\n\r\nThis package allows to compute the best fit cylinder given points in three-dimensional space.\r\n\r\nObject-oriented implementation of the `cylinder_fitting` repo by xingjiepan_ with input validation and type hints.\r\n\r\nAlgorithm by `David Eberly <https://www.geometrictools.com/Documentation/LeastSquaresFitting.pdf>`_.\r\n\r\nAs stated by David Eberly, the main assumption is that the underlying data is\r\nmodelled by a cylinder and that errors have caused the points not to be exactly on\r\nthe cylinder.\r\n\r\nInstallation\r\n------------\r\n\r\nThe package can be installed with pip.\r\n\r\n.. code-block:: bash\r\n\r\n   $ pip install py-cylinder-fitting\r\n   \r\nExample Usage\r\n-------------\r\n>>> from py_cylinder_fitting import BestFitCylinder\r\n>>> from skspatial.objects import Points\r\n\r\n>>> points = [[2, 0, 0], [0, 2, 0], [0, -2, 0], [2, 0, 4], [0, 2, 4], [0, -2, 4]]\r\n\r\n>>> best_fit_cylinder = BestFitCylinder(Points(points))\r\n\r\n>>> best_fit_cylinder.point\r\n[0., 0., 0.]\r\n\r\n>>> best_fit_cylinder.vector\r\n[0.  0.  4.]\r\n\r\n>>> best_fit_cylinder.radius\r\n2.0\r\n\r\nAcknowledgment\r\n--------------\r\nThis package is based on the cylinder_fitting repo by xingjiepan_ and the scikit-spatial_ library by Andrew Hynes.\r\n\r\n.. _xingjiepan: https://github.com/xingjiepan/cylinder_fitting\r\n.. _scikit-spatial: https://github.com/ajhynes7/scikit-spatial\r\n",
    "bugtrack_url": null,
    "license": "  BSD 2-Clause License  Copyright (c) 2022, Cristiano Pizzamiglio  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
    "summary": "This package allows to compute the best fit cylinder given points in three-dimensional space.",
    "version": "1.0.0",
    "split_keywords": [
        "cylinder",
        "best-fit"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "76c1dfe90d76161bc4b2438af9eca213",
                "sha256": "32ac53e8b19406c37bb61018ba015c91a76b0df92fbe5a7a7339b8c2a0af1e94"
            },
            "downloads": -1,
            "filename": "py_cylinder_fitting-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "76c1dfe90d76161bc4b2438af9eca213",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7124,
            "upload_time": "2022-12-28T16:20:12",
            "upload_time_iso_8601": "2022-12-28T16:20:12.711685Z",
            "url": "https://files.pythonhosted.org/packages/71/09/484ed56c7110efc5506351d5d97f3ec04d09399f24ac71f36fd99170d3d5/py_cylinder_fitting-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "1a57b374cbb0e16f3ec972edede3fbcb",
                "sha256": "788fb1f17f439159e4c9c4f552294fbffa0b6ada655592a7cc5f3f3e6fc2d6b0"
            },
            "downloads": -1,
            "filename": "py-cylinder-fitting-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1a57b374cbb0e16f3ec972edede3fbcb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 6233,
            "upload_time": "2022-12-28T16:20:14",
            "upload_time_iso_8601": "2022-12-28T16:20:14.333768Z",
            "url": "https://files.pythonhosted.org/packages/95/73/e24b5d5a15682edae6b22a6bda64fa46dbca0915aea222b1e57be653e563/py-cylinder-fitting-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-28 16:20:14",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "py-cylinder-fitting"
}
        
Elapsed time: 0.25804s