solidpython2


Namesolidpython2 JSON
Version 2.1.0 PyPI version JSON
download
home_pagehttps://github.com/jeff-dh/SolidPython
SummaryPython interface to the OpenSCAD declarative geometry language
upload_time2023-11-12 13:12:32
maintainer
docs_urlNone
authorjeff
requires_python>=3.7
licenseLGPL-2.1
keywords 3d cad csg constructive solid geometry geometry modeling openscad
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            SolidPython
===========
   
OpenSCAD for Python
-------------------

SolidPython is a generalization of Phillip Tiefenbacher's openscad
module, found on `Thingiverse <http://www.thingiverse.com/thing:1481>`__. It
generates valid OpenSCAD code from Python code with minimal overhead. Here's a
simple example:

This Python code:

.. code:: python

    from solid2 import *
    d = cube(5) + sphere(5).right(5) - cylinder(r=2, h=6)

Generates this OpenSCAD code:

.. code::

    difference(){
        union(){
            cube(5);
            translate( [5, 0,0]){
                sphere(5);
            }
        }
        cylinder(r=2, h=6);
    }

As can be clearly seen, the SolidPython code is a lot shorter (and I think a lot better readable and maintainable) than the OpenSCAD code it compiles to.

Advantages
----------

In contrast to OpenSCAD -- which is a constrained domain specific language --
Python is a full blown modern programming language and as such supports
pretty much all modern programming features. Furthermore a huge number of
libraries is available.

SolidPython lets you use all these fancy python features to generate your
constructive solid geometry models.

On the one hand it makes the generation of your models a lot easier, because
you don't need to learn another domain specific language and you can use all
the programming technique you're already familiar with. On the other hand it
gives you a lot more power, because you can use all the comprehensive python
libraries to generate your models.


Getting Started
---------------

The `wiki <https://github.com/jeff-dh/SolidPython/wiki>`__ is the place to look for docs and tutorials. Furthermore the `examples <https://github.com/jeff-dh/SolidPython/tree/master-2.0.0-beta-dev/solid2/examples>`__ might be interesting to you too.

Contact
=======

Enjoy!

If you have any questions or bug reports please report them to the SolidPython
`GitHub page <https://github.com/jeff-dh/SolidPython>`__!

Cheers!

License
=======

This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at
your option) any later version.

This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
General Public License for more details.

`Full text of the
license <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt>`__.

Some class docstrings are derived from the `OpenSCAD User Manual
<https://en.wikibooks.org/wiki/OpenSCAD_User_Manual>`__, so 
are available under the `Creative Commons Attribution-ShareAlike License
<https://creativecommons.org/licenses/by-sa/3.0/>`__. 


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jeff-dh/SolidPython",
    "name": "solidpython2",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "3D,CAD,CSG,constructive solid geometry,geometry,modeling,OpenSCAD",
    "author": "jeff",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/08/41/de9d9656ef00e38f0df4a5e7f733cb0987e3bf6c82facafac913aaf7b0e9/solidpython2-2.1.0.tar.gz",
    "platform": null,
    "description": "SolidPython\n===========\n   \nOpenSCAD for Python\n-------------------\n\nSolidPython is a generalization of Phillip Tiefenbacher's openscad\nmodule, found on `Thingiverse <http://www.thingiverse.com/thing:1481>`__. It\ngenerates valid OpenSCAD code from Python code with minimal overhead. Here's a\nsimple example:\n\nThis Python code:\n\n.. code:: python\n\n    from solid2 import *\n    d = cube(5) + sphere(5).right(5) - cylinder(r=2, h=6)\n\nGenerates this OpenSCAD code:\n\n.. code::\n\n    difference(){\n        union(){\n            cube(5);\n            translate( [5, 0,0]){\n                sphere(5);\n            }\n        }\n        cylinder(r=2, h=6);\n    }\n\nAs can be clearly seen, the SolidPython code is a lot shorter (and I think a lot better readable and maintainable) than the OpenSCAD code it compiles to.\n\nAdvantages\n----------\n\nIn contrast to OpenSCAD -- which is a constrained domain specific language --\nPython is a full blown modern programming language and as such supports\npretty much all modern programming features. Furthermore a huge number of\nlibraries is available.\n\nSolidPython lets you use all these fancy python features to generate your\nconstructive solid geometry models.\n\nOn the one hand it makes the generation of your models a lot easier, because\nyou don't need to learn another domain specific language and you can use all\nthe programming technique you're already familiar with. On the other hand it\ngives you a lot more power, because you can use all the comprehensive python\nlibraries to generate your models.\n\n\nGetting Started\n---------------\n\nThe `wiki <https://github.com/jeff-dh/SolidPython/wiki>`__ is the place to look for docs and tutorials. Furthermore the `examples <https://github.com/jeff-dh/SolidPython/tree/master-2.0.0-beta-dev/solid2/examples>`__ might be interesting to you too.\n\nContact\n=======\n\nEnjoy!\n\nIf you have any questions or bug reports please report them to the SolidPython\n`GitHub page <https://github.com/jeff-dh/SolidPython>`__!\n\nCheers!\n\nLicense\n=======\n\nThis library is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation; either version 2.1 of the License, or (at\nyour option) any later version.\n\nThis library is distributed in the hope that it will be useful, but\nWITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser\nGeneral Public License for more details.\n\n`Full text of the\nlicense <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt>`__.\n\nSome class docstrings are derived from the `OpenSCAD User Manual\n<https://en.wikibooks.org/wiki/OpenSCAD_User_Manual>`__, so \nare available under the `Creative Commons Attribution-ShareAlike License\n<https://creativecommons.org/licenses/by-sa/3.0/>`__. \n\n",
    "bugtrack_url": null,
    "license": "LGPL-2.1",
    "summary": "Python interface to the OpenSCAD declarative geometry language",
    "version": "2.1.0",
    "project_urls": {
        "Homepage": "https://github.com/jeff-dh/SolidPython",
        "Repository": "https://github.com/jeff-dh/SolidPython"
    },
    "split_keywords": [
        "3d",
        "cad",
        "csg",
        "constructive solid geometry",
        "geometry",
        "modeling",
        "openscad"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed7d746f1fb400886090e95a7d60625bc5fcd427f1c214e1e446ef6adf0dc0d9",
                "md5": "5d3515531d9135dddcdce95c7c7964b5",
                "sha256": "2e3fd835554cf578aa1518168dad91c5d454b1d714599daad3514c91ad929a95"
            },
            "downloads": -1,
            "filename": "solidpython2-2.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5d3515531d9135dddcdce95c7c7964b5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 1123003,
            "upload_time": "2023-11-12T13:12:29",
            "upload_time_iso_8601": "2023-11-12T13:12:29.518550Z",
            "url": "https://files.pythonhosted.org/packages/ed/7d/746f1fb400886090e95a7d60625bc5fcd427f1c214e1e446ef6adf0dc0d9/solidpython2-2.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0841de9d9656ef00e38f0df4a5e7f733cb0987e3bf6c82facafac913aaf7b0e9",
                "md5": "845c9cfaedee83b3fd7256ba13bb35d8",
                "sha256": "6658d8fb3416b3356dc701606143dcfd9ed14c63f3c2a8c48400c330c57424bf"
            },
            "downloads": -1,
            "filename": "solidpython2-2.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "845c9cfaedee83b3fd7256ba13bb35d8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 1233458,
            "upload_time": "2023-11-12T13:12:32",
            "upload_time_iso_8601": "2023-11-12T13:12:32.753403Z",
            "url": "https://files.pythonhosted.org/packages/08/41/de9d9656ef00e38f0df4a5e7f733cb0987e3bf6c82facafac913aaf7b0e9/solidpython2-2.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-12 13:12:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jeff-dh",
    "github_project": "SolidPython",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "solidpython2"
}
        
Elapsed time: 0.14597s