Repository: jeff-dh/SolidPython Branch: master-2.0.0-beta-dev Commit: 2e91f4757e85 Files: 142 Total size: 769.0 KB Directory structure: gitextract_1w_nfn0c/ ├── .gitignore ├── .gitmodules ├── Doc/ │ ├── Makefile │ ├── conf.py │ ├── index.rst │ └── make.bat ├── README.rst ├── pyproject.toml ├── solid2/ │ ├── __init__.py │ ├── config.py │ ├── core/ │ │ ├── __init__.py │ │ ├── builtins/ │ │ │ ├── __init__.py │ │ │ ├── convenience.py │ │ │ ├── implicit.primitives │ │ │ ├── openscad.mutators │ │ │ ├── openscad.primitives │ │ │ ├── openscad_functions.py │ │ │ ├── openscad_primitives.py │ │ │ └── primitives.py │ │ ├── extension_manager.py │ │ ├── object_base/ │ │ │ ├── __init__.py │ │ │ ├── access_syntax_mixin.py │ │ │ ├── object_base_impl.py │ │ │ └── operator_mixin.py │ │ ├── object_factory.py │ │ ├── parse_scad.py │ │ ├── scad_import.py │ │ ├── scad_render.py │ │ └── utils.py │ ├── examples/ │ │ ├── 01-basics.py │ │ ├── 02-vars-and-operators.py │ │ ├── 03-debug-background.py │ │ ├── 04-convenience.py │ │ ├── 05-access-style-syntax.py │ │ ├── 06-functions.py │ │ ├── 07-libs-bosl2-attachable.py │ │ ├── 07-libs-bosl2-logo.py │ │ ├── 07-libs-bosl2.py │ │ ├── 07-libs.x.py │ │ ├── 08-extensions.py │ │ ├── 09-code-attach-extension.py │ │ ├── 10-customizer.py │ │ ├── 11-font/ │ │ │ ├── LICENSE_README │ │ │ └── RichEatin.otf │ │ ├── 11-fonts.x.py │ │ ├── 12-animation.py │ │ ├── 13-animated-bouncing-ball.py │ │ ├── 14-implicitCAD.x.py │ │ ├── 15-implicitCAD2.x.py │ │ ├── 16-mazebox-bosl2.py │ │ ├── 17-greedy-scad-interface.py │ │ └── 18-scad-control-structures.py │ ├── extensions/ │ │ ├── __init__.py │ │ ├── bosl2/ │ │ │ ├── __init__.py │ │ │ ├── affine.py │ │ │ ├── attachments.py │ │ │ ├── ball_bearings.py │ │ │ ├── beziers.py │ │ │ ├── bosl2_access_syntax_mixin.py │ │ │ ├── bosl2_base.py │ │ │ ├── bosl2_patches.py │ │ │ ├── bottlecaps.py │ │ │ ├── color.py │ │ │ ├── comparisons.py │ │ │ ├── constants.py │ │ │ ├── coords.py │ │ │ ├── cubetruss.py │ │ │ ├── distributors.py │ │ │ ├── drawing.py │ │ │ ├── fnliterals.py │ │ │ ├── gears.py │ │ │ ├── geometry.py │ │ │ ├── hinges.py │ │ │ ├── isosurface.py │ │ │ ├── joiners.py │ │ │ ├── linalg.py │ │ │ ├── linear_bearings.py │ │ │ ├── lists.py │ │ │ ├── masks2d.py │ │ │ ├── masks3d.py │ │ │ ├── math.py │ │ │ ├── metric_screws.py │ │ │ ├── miscellaneous.py │ │ │ ├── modular_hose.py │ │ │ ├── mutators.py │ │ │ ├── nema_steppers.py │ │ │ ├── nurbs.py │ │ │ ├── openscad.py │ │ │ ├── partitions.py │ │ │ ├── paths.py │ │ │ ├── polyhedra.py │ │ │ ├── regions.py │ │ │ ├── rounding.py │ │ │ ├── screw_drive.py │ │ │ ├── screws.py │ │ │ ├── shapes2d.py │ │ │ ├── shapes3d.py │ │ │ ├── skin.py │ │ │ ├── sliders.py │ │ │ ├── std.py │ │ │ ├── strings.py │ │ │ ├── structs.py │ │ │ ├── threading.py │ │ │ ├── transforms.py │ │ │ ├── trigonometry.py │ │ │ ├── tripod_mounts.py │ │ │ ├── turtle3d.py │ │ │ ├── utility.py │ │ │ ├── vectors.py │ │ │ ├── version.py │ │ │ ├── vnf.py │ │ │ ├── walls.py │ │ │ └── wiring.py │ │ ├── bosl2_generator.py │ │ ├── greedy_scad_interface/ │ │ │ ├── __init__.py │ │ │ ├── customizer_widgets.py │ │ │ ├── scad_interface.py │ │ │ └── scad_variable.py │ │ ├── openscad_extension_generator.py │ │ └── scad_control_structures.py │ └── libs/ │ └── __init__.py └── tests/ ├── examples_scad/ │ ├── .gitignore │ ├── 01-basics.scad │ ├── 02-vars-and-operators.scad │ ├── 03-debug-background.scad │ ├── 04-convenience.scad │ ├── 05-access-style-syntax.scad │ ├── 06-functions.scad │ ├── 07-libs-bosl2-attachable.scad │ ├── 07-libs-bosl2-logo.scad │ ├── 07-libs-bosl2.scad │ ├── 07-libs.scad │ ├── 08-extensions.scad │ ├── 09-code-attach-extension.scad │ ├── 10-customizer.scad │ ├── 11-fonts.scad │ ├── 12-animation.scad │ ├── 13-animated-bouncing-ball.scad │ ├── 16-mazebox-bosl2.scad │ └── 17-greedy-scad-interface.scad ├── examples_test.py └── run_tests.py ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ .idea *.scad *.pyc *.pyo .installed.cfg dist bin develop-eggs *.egg-info dist downloads eggs parts *.egg-info lib lib64 Doc/_build scratch/ *.swp *.bak *.escad *.stl *.draft.* ================================================ FILE: .gitmodules ================================================ [submodule "solid2/libs/BOSL2"] path = solid2/extensions/bosl2/BOSL2 url = git@github.com:revarbat/BOSL2.git [submodule "solid2/libs/py_scadparser"] path = solid2/libs/py_scadparser url = https://github.com/jeff-dh/py_scadparser.git ================================================ FILE: Doc/Makefile ================================================ # Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/SolidPython.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/SolidPython.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/SolidPython" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/SolidPython" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." ================================================ FILE: Doc/conf.py ================================================ #!/usr/bin/env python2.7 # -*- coding: utf-8 -*- # # SolidPython documentation build configuration file, created by # sphinx-quickstart on Thu May 1 19:55:31 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('..')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = 'SolidPython2' copyright = '2014, Evan Jones' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '0.1.2' # The full version, including alpha/beta/rc tags. release = '0.1.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_build'] # The reST default role (used for this markup: `text`) to use for all # documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. #keep_warnings = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. #html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'SolidPythondoc' # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ('index', 'SolidPython.tex', 'SolidPython Documentation', 'Evan Jones', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False # If true, show URL addresses after external links. #latex_show_urls = False # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_domain_indices = True # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'solidpython', 'SolidPython Documentation', ['Evan Jones'], 1) ] # If true, show URL addresses after external links. #man_show_urls = False # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'SolidPython', 'SolidPython Documentation', 'Evan Jones', 'SolidPython', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False ================================================ FILE: Doc/index.rst ================================================ .. SolidPython documentation master file, created by sphinx-quickstart on Thu May 1 19:55:31 2014. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to SolidPython's documentation! ======================================= .. toctree:: :maxdepth: 2 .. include:: ../README.rst Library Reference ================= .. automodule:: solid2 :imported-members: :undoc-members: :exclude-members: Path, ObjectBase, ModifierBase, OpenSCADObject, singledispatch :members: Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` :members: ================================================ FILE: Doc/make.bat ================================================ @ECHO OFF REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set BUILDDIR=_build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . set I18NSPHINXOPTS=%SPHINXOPTS% . if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% ) if "%1" == "" goto help if "%1" == "help" ( :help echo.Please use `make ^` where ^ is one of echo. html to make standalone HTML files echo. dirhtml to make HTML files named index.html in directories echo. singlehtml to make a single large HTML file echo. pickle to make pickle files echo. json to make JSON files echo. htmlhelp to make HTML files and a HTML help project echo. qthelp to make HTML files and a qthelp project echo. devhelp to make HTML files and a Devhelp project echo. epub to make an epub echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter echo. text to make text files echo. man to make manual pages echo. texinfo to make Texinfo files echo. gettext to make PO message catalogs echo. changes to make an overview over all changed/added/deprecated items echo. xml to make Docutils-native XML files echo. pseudoxml to make pseudoxml-XML files for display purposes echo. linkcheck to check all external links for integrity echo. doctest to run all doctests embedded in the documentation if enabled goto end ) if "%1" == "clean" ( for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i del /q /s %BUILDDIR%\* goto end ) %SPHINXBUILD% 2> nul if errorlevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.installed, then set the SPHINXBUILD environment variable to point echo.to the full path of the 'sphinx-build' executable. Alternatively you echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) if "%1" == "html" ( %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/html. goto end ) if "%1" == "dirhtml" ( %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. goto end ) if "%1" == "singlehtml" ( %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. goto end ) if "%1" == "pickle" ( %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the pickle files. goto end ) if "%1" == "json" ( %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the JSON files. goto end ) if "%1" == "htmlhelp" ( %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run HTML Help Workshop with the ^ .hhp project file in %BUILDDIR%/htmlhelp. goto end ) if "%1" == "qthelp" ( %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: echo.^> qcollectiongenerator %BUILDDIR%\qthelp\SolidPython.qhcp echo.To view the help file: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\SolidPython.ghc goto end ) if "%1" == "devhelp" ( %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp if errorlevel 1 exit /b 1 echo. echo.Build finished. goto end ) if "%1" == "epub" ( %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub if errorlevel 1 exit /b 1 echo. echo.Build finished. The epub file is in %BUILDDIR%/epub. goto end ) if "%1" == "latex" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex if errorlevel 1 exit /b 1 echo. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. goto end ) if "%1" == "latexpdf" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex cd %BUILDDIR%/latex make all-pdf cd %BUILDDIR%/.. echo. echo.Build finished; the PDF files are in %BUILDDIR%/latex. goto end ) if "%1" == "latexpdfja" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex cd %BUILDDIR%/latex make all-pdf-ja cd %BUILDDIR%/.. echo. echo.Build finished; the PDF files are in %BUILDDIR%/latex. goto end ) if "%1" == "text" ( %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text if errorlevel 1 exit /b 1 echo. echo.Build finished. The text files are in %BUILDDIR%/text. goto end ) if "%1" == "man" ( %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man if errorlevel 1 exit /b 1 echo. echo.Build finished. The manual pages are in %BUILDDIR%/man. goto end ) if "%1" == "texinfo" ( %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo if errorlevel 1 exit /b 1 echo. echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. goto end ) if "%1" == "gettext" ( %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale if errorlevel 1 exit /b 1 echo. echo.Build finished. The message catalogs are in %BUILDDIR%/locale. goto end ) if "%1" == "changes" ( %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes if errorlevel 1 exit /b 1 echo. echo.The overview file is in %BUILDDIR%/changes. goto end ) if "%1" == "linkcheck" ( %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck if errorlevel 1 exit /b 1 echo. echo.Link check complete; look for any errors in the above output ^ or in %BUILDDIR%/linkcheck/output.txt. goto end ) if "%1" == "doctest" ( %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest if errorlevel 1 exit /b 1 echo. echo.Testing of doctests in the sources finished, look at the ^ results in %BUILDDIR%/doctest/output.txt. goto end ) if "%1" == "xml" ( %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml if errorlevel 1 exit /b 1 echo. echo.Build finished. The XML files are in %BUILDDIR%/xml. goto end ) if "%1" == "pseudoxml" ( %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml if errorlevel 1 exit /b 1 echo. echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. goto end ) :end ================================================ FILE: README.rst ================================================ SolidPython =========== OpenSCAD for Python ------------------- SolidPython is a generalization of Phillip Tiefenbacher's openscad module, found on `Thingiverse `__. 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 `__ is the place to look for docs and tutorials. Furthermore the `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 `__! 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 `__. Some class docstrings are derived from the `OpenSCAD User Manual `__, so are available under the `Creative Commons Attribution-ShareAlike License `__. ================================================ FILE: pyproject.toml ================================================ [tool.poetry] name = "solidpython2" version = "2.1.3" description = "Python interface to the OpenSCAD declarative geometry language" authors = ["jeff"] homepage = "https://github.com/jeff-dh/SolidPython" repository = "https://github.com/jeff-dh/SolidPython" license = "LGPL-2.1" readme = "README.rst" keywords = [ "3D", "CAD", "CSG", "constructive solid geometry", "geometry", "modeling", "OpenSCAD", ] classifiers=[ "Programming Language :: Python", "Programming Language :: Python :: 3.7", "Development Status :: 4 - Beta", "Environment :: Other Environment", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)", "Operating System :: OS Independent", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Scientific/Engineering :: Mathematics", ] packages=[ { include = "solid2"} ] [tool.poetry.dependencies] python = ">=3.7" ply = "^3.11" setuptools = ">=65.6.3" [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" ================================================ FILE: solid2/__init__.py ================================================ #only import the external interface! from .core import * from .extensions.greedy_scad_interface import * from .extensions.scad_control_structures import * ================================================ FILE: solid2/config.py ================================================ #this is global config file for exp_solid from pathlib import Path import os import platform import sys import re class Config: def __init__(self): self.use_implicit_builtins = "--implicit" in sys.argv self.pickle_cache_dir = self.get_pickle_cache_dir() self.enable_pickle_cache = True and self.pickle_cache_dir is not None self.openscad_library_paths = self.get_openscad_library_paths() self.openscad_stl_command = "openscad -o '{stlfile}' '{scadfile}'" def get_openscad_library_paths(self): """ Return system-dependent OpenSCAD library paths or paths defined in os.environ['OPENSCADPATH'] """ paths = [Path('.')] user_path = os.environ.get('OPENSCADPATH') if user_path: for s in re.split(r'\s*[;:]\s*', user_path): paths.append(Path(s)) #user wide path default_paths = { 'Linux': Path.home() / '.local/share/OpenSCAD/libraries', 'Darwin': Path.home() / 'Documents/OpenSCAD/libraries', 'Windows': Path.home() / 'Documents/OpenSCAD/libraries' } try: paths.append(default_paths[platform.system()]) except KeyError: pass #system wide paths if platform.system() == 'Linux': #sorry, but I've no clue what the paths are on other operating systems paths.append(Path("/usr/share/openscad/libraries")) return paths def get_pickle_cache_dir(self): default_paths = { 'Linux': Path.home() / '.local/share/SolidPython2/pickle_cache', 'Darwin': Path.home() / 'Documents/SolidPython2/pickle_cache', 'Windows': Path.home() / 'Documents/SolidPython2/pickle_cache' } try: return default_paths[platform.system()] except KeyError: return None config = Config() ================================================ FILE: solid2/core/__init__.py ================================================ #only import the external interface! from .builtins import * from .scad_render import scad_render,\ scad_render_to_file,\ render_to_stl_file from .scad_import import import_scad, use, include from .object_base import scad_inline, scad_inline_parameter_func from .extension_manager import register_access_syntax, register_pre_render,\ register_post_render, register_root_wrapper ================================================ FILE: solid2/core/builtins/__init__.py ================================================ from .primitives import * from .convenience import * from . import openscad_functions ================================================ FILE: solid2/core/builtins/convenience.py ================================================ import numbers from ...config import config as _config from ..object_base import ObjectBase as _ObjectBase,\ OperatorMixin as _OperatorMixin,\ AccessSyntaxMixin as _AccessSyntaxMixin from .primitives import * # ============= # = modifiers = # ============= class _ModifierBase(_ObjectBase, _OperatorMixin, _AccessSyntaxMixin): def __init__(self, child=None): super().__init__() if child: self._children += [child] class debug(_ModifierBase): def _render(self): return "#" + super()._render() class background(_ModifierBase): def _render(self): return "%" + super()._render() class root(_ModifierBase): def _render(self): return "!" + super()._render() class disable(_ModifierBase): def _render(self): return "*" + super()._render() # ============== # = Directions = # ============== def up(z): return translate((0, 0, z)) def down(z): return translate((0, 0, -z)) def right(x): return translate((x, 0, 0)) def left(x): return translate((-x, 0, 0)) def forward(y): return translate((0, y, 0)) def fwd(y): return forward(y) def back(y): return translate((0, -y, 0)) def translateX(x) : return translate((x, 0, 0)) def translateY(y) : return translate((0, y, 0)) def translateZ(z) : return translate((0, 0, z)) def rotateX(x): return rotate((x, 0, 0)) def rotateY(y): return rotate((0, y, 0)) def rotateZ(z): return rotate((0, 0, z)) def scaleX(x): return scale((x, 1, 1)) def scaleY(y): return scale((1, y, 1)) def scaleZ(z): return scale((1, 1, z)) if not _config.use_implicit_builtins: def resizeX(x): return resize((x, 0, 0)) def resizeY(y): return resize((0, y, 0)) def resizeZ(z): return resize((0, 0, z)) def mirrorX(): return mirror((1, 0, 0)) def mirrorY(): return mirror((0, 1, 0)) def mirrorZ(): return mirror((0, 0, 1)) # ============================================== # = overwrite translate, rotate, scale, mirror = # ============================================== """ This block overwrites translate, scale, mirror and rotate from builtins to allow "overloading" those functions. As result you don't need to pass vectors in as lists, you can provide them as single integers / floats. translate([1, 2, 3]) -> translate(1, 2, 3) rotate([1, 2, 3]) -> rotate(1, 2, 3) """ def _extract_size_list(size_count, *args): if len(args) <= 1: return args size_list = [] args_copy = list(args) while args_copy and len(size_list) < size_count: a = args_copy.pop(0) if isinstance(a, numbers.Real): size_list += [a] else: args_copy = [a] + args_copy break if len(size_list) == size_count: return [size_list] + args_copy else: return size_list + args_copy _orig_translate = translate def translate(*args, **kwargs): args = _extract_size_list(3, *args) return _orig_translate(*args, **kwargs) _orig_scale = scale def scale(*args, **kwargs): args = _extract_size_list(3, *args) return _orig_scale(*args, **kwargs) _orig_rotate = rotate def rotate(*args, **kwargs): args = _extract_size_list(3, *args) return _orig_rotate(*args, **kwargs) _orig_square = square def square(*args, **kwargs): args = _extract_size_list(2, *args) return _orig_square(*args, **kwargs) _orig_cube = cube def cube(*args, **kwargs): args = _extract_size_list(3, *args) return _orig_cube(*args, **kwargs) if not _config.use_implicit_builtins: _orig_resize = resize def resize(*args, **kwargs): args = _extract_size_list(3, *args) return _orig_resize(*args, **kwargs) _orig_mirror = mirror def mirror(*args, **kwargs): args = _extract_size_list(3, *args) return _orig_mirror(*args, **kwargs) ================================================ FILE: solid2/core/builtins/implicit.primitives ================================================ module sphere(r=default, d=default); module cube(size=default, center=default, r=default, x=default, y=default, z=default); module square(size=default, center=default, r=default, x=default, y=default); module cylinder(r=default, h=default, r1=default, r2=default, $fn=default, center=default); module circle(r=default, $fn=default); module polygon(points, paths=default, r=default); module union(r=default); module difference(r=default); module intersection(r=default); module translate(v=default, x=default, y=default, z=default); module scale(v); module rotate(a=default, v=default); module linear_extrude(height=default, center=default, twist=default, scale=default, translate=default, r=default); module pack(size, sep); module shell(w); module rotate_extrude(a=default, r=default, translate=default, rotate=default); module unit(unit); ================================================ FILE: solid2/core/builtins/openscad.mutators ================================================ module translate(v); module scale(v); module rotate(a=default, v=default); module mirror(v); module resize(newsize, auto=default); module color(c, alpha=1.0); module minkowski(); module offset(r=default, delta=default, chamfer=default, $fn=default); module hull(); module render(convexity=default); module linear_extrude(height=default, center=default, convexity=default, twist=default, slices=default, scale=default); module rotate_extrude(angle=default, convexity=default, $fn=default); module projection(cut=default); module surface(file, center=default, convexity=default, invert=default); ================================================ FILE: solid2/core/builtins/openscad.primitives ================================================ module union(); module difference(); module intersection(); module intersection_for(n); module translate(v); module scale(v); module rotate(a=default, v=default); module mirror(v); module resize(newsize, auto=default); module color(c, alpha=1.0); module minkowski(); module offset(r=default, delta=default, chamfer=default, $fn=default); module hull(); module render(convexity=default); module linear_extrude(height=default, center=default, convexity=default, twist=default, slices=default, scale=default); module rotate_extrude(angle=default, convexity=default, $fn=default); module projection(cut=default); module surface(file, center=default, convexity=default, invert=default); module child(index=default, vector=default, range=default); module children(index=default, vector=default, range=default); module import_stl(file, origin=default, convexity=default, layer=default); module import_dxf(file, origin=default, convexity=default, layer=default); module import(file, origin=default, convexity=default, layer=default); module assign(); module multmatrix(m=default); module polygon(points, paths=default, convexity=default); module circle(r=default, d=default, $fn=default); module square(size=default, center=default); module sphere(r=default, d=default, $fn=default); module cube(size=default, center=default); module cylinder(r=default, h=default, r1=default, r2=default, d=default, d1=default, d2=default, center=default, $fn=default); module polyhedron(points, faces, convexity=default, triangles=default); module text(text, size=default, font=default, halign=default, valign=default, spacing=default, direction=default, language=default, script=default, $fn=default); ================================================ FILE: solid2/core/builtins/openscad_functions.py ================================================ def _base_fn(name, *args): from solid2.core.object_base import scad_inline as scad_inline from solid2.core.utils import py2openscad as py2openscad params = py2openscad(args)[1:-1] return scad_inline(f'{name}({params})') def cos(n): return _base_fn("cos", n) def sin(n): return _base_fn("sin", n) def tan(n): return _base_fn("tan", n) def acos(n): return _base_fn('acos', n) def asin(n): return _base_fn('asin', n) def atan(n): return _base_fn('atan', n) def atan2(n, m): return _base_fn('atan2', n, m) def abs(n): return _base_fn('abs', n) def ceil(n): return _base_fn('ceil', n) def exp(n): return _base_fn('exp', n) def floor(n): return _base_fn('floor', n) def len(n): return _base_fn('len', n) def ln(n): return _base_fn('ln', n) def log(n): return _base_fn('log', n) def norm(v): return _base_fn('norm', v) def pow(n, m): return _base_fn('pow', n, m) def round(n): return _base_fn('round', n) def sign(n): return _base_fn('sign', n) def sqrt(n): return _base_fn('sqrt', n) def min(*args): return _base_fn('min', *args) def max(*args): return _base_fn('max', *args) def concat(*args): return _base_fn('concat', *args) def cross(*args): return _base_fn('cross', *args) def lookup(*args): return _base_fn('lookup', *args) def rands(*args): return _base_fn('rands', *args) def not_(*args): return _base_fn('!', *args) ================================================ FILE: solid2/core/builtins/openscad_primitives.py ================================================ from ..object_base import OpenSCADObject as _OpenSCADObject, \ BareOpenSCADObject as _BareOpenSCADObject from pathlib import Path as _Path from typing import Sequence as _Sequence,\ Tuple as _Tuple,\ Union as _Union PathStr = _Union[_Path, str] P2 = _Tuple[float, float] P3 = _Tuple[float, float, float] P4 = _Tuple[float, float, float, float] Vec3 = P3 Vec4 = P4 Vec34 = _Union[Vec3, Vec4] P3s = _Sequence[P3] P23 = _Union[P2, P3] Points = _Sequence[P23] Indexes = _Union[_Sequence[int], _Sequence[_Sequence[int]]] ScadSize = _Union[int, _Sequence[float]] OpenSCADObjectPlus = _Union[_OpenSCADObject, _Sequence[_OpenSCADObject]] class polygon(_OpenSCADObject): """ Create a polygon with the specified points and paths. :param points: the list of points of the polygon :type points: sequence of 2 element sequences :param paths: Either a single vector, enumerating the point list, ie. the order to traverse the points, or, a vector of vectors, ie a list of point lists for each separate curve of the polygon. The latter is required if the polygon has holes. The parameter is optional and if omitted the points are assumed in order. (The 'pN' components of the *paths* vector are 0-indexed references to the elements of the *points* vector.) :param convexity: OpenSCAD's convexity... yadda yadda NOTE: OpenSCAD accepts only 2D points for `polygon()`. Convert any 3D points to 2D before compiling """ def __init__(self, points: _Union[Points, _BareOpenSCADObject], paths: Indexes = None, convexity: int = None) -> None: # Force points to 2D if they're defined in Python, pass through if they're # included OpenSCAD code pts = points # type: ignore if not isinstance(points, _BareOpenSCADObject): pts = list([(p[0], p[1]) for p in points]) # type: ignore args = {'points':pts, 'convexity':convexity} # If not supplied, OpenSCAD assumes all points in order for paths if paths: args['paths'] = paths # type: ignore super().__init__('polygon', args) class circle(_OpenSCADObject): """ Creates a circle at the origin of the coordinate system. The argument name is optional. :param r: This is the radius of the circle. Default value is 1. :type r: number :param d: This is the diameter of the circle. Default value is 1. :type d: number :param _fn: Number of fragments in 360 degrees. :type _fn: int """ def __init__(self, r: float = None, d: float = None, _fn: int = None) -> None: super().__init__('circle', {'r': r, 'd': d, '_fn': _fn}) class square(_OpenSCADObject): """ Creates a square at the origin of the coordinate system. When center is True the square will be centered on the origin, otherwise it is created in the first quadrant. The argument names are optional if the arguments are given in the same order as specified in the parameters :param size: If a single number is given, the result will be a square with sides of that length. If a 2 value sequence is given, then the values will correspond to the lengths of the X and Y sides. Default value is 1. :type size: number or 2 value sequence :param center: This determines the positioning of the object. If True, object is centered at (0,0). Otherwise, the square is placed in the positive quadrant with one corner at (0,0). Defaults to False. :type center: boolean """ def __init__(self, size: ScadSize = None, center: bool = None) -> None: super().__init__('square', {'size': size, 'center': center}) class sphere(_OpenSCADObject): """ Creates a sphere at the origin of the coordinate system. The argument name is optional. :param r: Radius of the sphere. :type r: number :param d: Diameter of the sphere. :type d: number :param _fn: Resolution of the sphere :type _fn: int """ def __init__(self, r: float = None, d: float = None, _fn: int = None) -> None: super().__init__('sphere', {'r': r, 'd': d, '_fn': _fn}) class cube(_OpenSCADObject): """ Creates a cube at the origin of the coordinate system. When center is True the cube will be centered on the origin, otherwise it is created in the first octant. The argument names are optional if the arguments are given in the same order as specified in the parameters :param size: If a single number is given, the result will be a cube with sides of that length. If a 3 value sequence is given, then the values will correspond to the lengths of the X, Y, and Z sides. Default value is 1. :type size: number or 3 value sequence :param center: This determines the positioning of the object. If True, object is centered at (0,0,0). Otherwise, the cube is placed in the positive quadrant with one corner at (0,0,0). Defaults to False :type center: boolean """ def __init__(self, size: ScadSize = None, center: bool = None) -> None: super().__init__('cube', {'size': size, 'center': center}) class cylinder(_OpenSCADObject): """ Creates a cylinder or cone at the origin of the coordinate system. A single radius (r) makes a cylinder, two different radii (r1, r2) make a cone. :param h: This is the height of the cylinder. Default value is 1. :type h: number :param r: The radius of both top and bottom ends of the cylinder. Use this parameter if you want plain cylinder. Default value is 1. :type r: number :param r1: This is the radius of the cone on bottom end. Default value is 1. :type r1: number :param r2: This is the radius of the cone on top end. Default value is 1. :type r2: number :param d: The diameter of both top and bottom ends of the cylinder. Use t his parameter if you want plain cylinder. Default value is 1. :type d: number :param d1: This is the diameter of the cone on bottom end. Default value is 1. :type d1: number :param d2: This is the diameter of the cone on top end. Default value is 1. :type d2: number :param center: If True will center the height of the cone/cylinder around the origin. Default is False, placing the base of the cylinder or r1 radius of cone at the origin. :type center: boolean :param _fn: Number of fragments in 360 degrees. :type _fn: int """ def __init__(self, h: float = None, r1: float = None, r2: float = None, center: bool = None, r: float = None, d: float = None, d1: float = None, d2: float = None, _fn: int = None) -> None: super().__init__('cylinder', {'r': r, 'h': h, 'r1': r1, 'r2': r2, 'd': d, 'd1': d1, 'd2': d2, 'center': center, '_fn': _fn}) class polyhedron(_OpenSCADObject): """ Create a polyhedron with a list of points and a list of faces. The point list is all the vertices of the shape, the faces list is how the points relate to the surfaces of the polyhedron. *note: if your version of OpenSCAD is lower than 2014.03 replace "faces" with "triangles" in the below examples* :param points: sequence of points or vertices (each a 3 number sequence). :param triangles: (*deprecated in version 2014.03, use faces*) vector of point triplets (each a 3 number sequence). Each number is the 0-indexed point number from the point vector. :param faces: (*introduced in version 2014.03*) vector of point n-tuples with n >= 3. Each number is the 0-indexed point number from the point vector. That is, faces=[[0,1,4]] specifies a triangle made from the first, second, and fifth point listed in points. When referencing more than 3 points in a single tuple, the points must all be on the same plane. :param convexity: The convexity parameter specifies the maximum number of front sides (back sides) a ray intersecting the object might penetrate. This parameter is only needed for correctly displaying the object in OpenCSG preview mode and has no effect on the polyhedron rendering. :type convexity: int """ def __init__(self, points: P3s, faces: Indexes, convexity: int = None, triangles: Indexes = None) -> None: super().__init__('polyhedron', {'points': points, 'faces': faces, 'convexity': convexity, 'triangles': triangles}) class union(_OpenSCADObject): """ Creates a union of all its child nodes. This is the **sum** of all children. """ def __init__(self) -> None: super().__init__('union', {}) class intersection(_OpenSCADObject): """ Creates the intersection of all child nodes. This keeps the **overlapping** portion """ def __init__(self) -> None: super().__init__('intersection', {}) class difference(_OpenSCADObject): """ Subtracts the 2nd (and all further) child nodes from the first one. """ def __init__(self) -> None: super().__init__('difference', {}) class translate(_OpenSCADObject): """ Translates (moves) its child elements along the specified vector. :param v: X, Y and Z translation :type v: 3 value sequence """ def __init__(self, v: P3 = None) -> None: super().__init__('translate', {'v': v}) class scale(_OpenSCADObject): """ Scales its child elements using the specified vector. :param v: X, Y and Z scale factor :type v: 3 value sequence """ def __init__(self, v: P3 = None) -> None: super().__init__('scale', {'v': v}) class rotate(_OpenSCADObject): """ Rotates its child 'a' degrees about the origin of the coordinate system or around an arbitrary axis. :param a: degrees of rotation, or sequence for degrees of rotation in each of the X, Y and Z axis. :type a: number or 3 value sequence :param v: sequence specifying 0 or 1 to indicate which axis to rotate by 'a' degrees. Ignored if 'a' is a sequence. :type v: 3 value sequence """ def __init__(self, a: _Union[float, Vec3] = None, v: Vec3 = None) -> None: super().__init__('rotate', {'a': a, 'v': v}) class mirror(_OpenSCADObject): """ Mirrors the child element on a plane through the origin. :param v: the normal vector of a plane intersecting the origin through which to mirror the object. :type v: 3 number sequence """ def __init__(self, v: Vec3) -> None: super().__init__('mirror', {'v': v}) class resize(_OpenSCADObject): """ Modify the size of the child object to match the given new size. :param newsize: X, Y and Z values :type newsize: 3 value sequence :param auto: 3-tuple of booleans to specify which axes should be scaled :type auto: 3 boolean sequence """ def __init__(self, newsize: Vec3, auto: _Tuple[bool, bool, bool] = None) -> None: super().__init__('resize', {'newsize': newsize, 'auto': auto}) class multmatrix(_OpenSCADObject): """ Multiplies the geometry of all child elements with the given 4x4 transformation matrix. :param m: transformation matrix :type m: sequence of 4 sequences, each containing 4 numbers. """ def __init__(self, m: _Tuple[Vec4, Vec4, Vec4, Vec4]) -> None: super().__init__('multmatrix', {'m': m}) class color(_OpenSCADObject): """ Displays the child elements using the specified RGB color + alpha value. This is only used for the F5 preview as CGAL and STL (F6) do not currently support color. The alpha value will default to 1.0 (opaque) if not specified. :param c: RGB color + alpha value. :type c: sequence of 3 or 4 numbers between 0 and 1, OR 3-, 4-, 6-, or 8-digit RGB/A hex code, OR string color name as described at https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#color :param alpha: Alpha value from 0 to 1 :type alpha: float """ def __init__(self, c: _Union[Vec34, str], alpha: float = 1.0) -> None: super().__init__('color', {'c': c, 'alpha': alpha}) class minkowski(_OpenSCADObject): """ Renders the `minkowski sum `__ of child nodes. """ def __init__(self) -> None: super().__init__('minkowski', {}) class offset(_OpenSCADObject): """ :param r: Amount to offset the polygon (rounded corners). When negative, the polygon is offset inwards. The parameter r specifies the radius that is used to generate rounded corners, using delta gives straight edges. :type r: number :param delta: Amount to offset the polygon (sharp corners). When negative, the polygon is offset inwards. The parameter r specifies the radius that is used to generate rounded corners, using delta gives straight edges. :type delta: number :param chamfer: When using the delta parameter, this flag defines if edges should be chamfered (cut off with a straight line) or not (extended to their intersection). :type chamfer: bool :param _fn: Resolution of any radial curves :type _fn: int """ def __init__(self, r: float = None, delta: float = None, chamfer: bool = False, _fn: int=None) -> None: if r is not None: kwargs = {'r': r} elif delta is not None: kwargs = {'delta': delta, 'chamfer': chamfer} else: raise ValueError("offset(): Must supply r or delta") if _fn: kwargs['_fn'] = _fn super().__init__('offset', kwargs) class hull(_OpenSCADObject): """ Renders the `convex hull `__ of child nodes. """ def __init__(self) -> None: super().__init__('hull', {}) class render(_OpenSCADObject): """ Always calculate the CSG model for this tree (even in OpenCSG preview mode). :param convexity: The convexity parameter specifies the maximum number of front sides (back sides) a ray intersecting the object might penetrate. This parameter is only needed for correctly displaying the object in OpenCSG preview mode and has no effect on the polyhedron rendering. :type convexity: int """ def __init__(self, convexity: int = None) -> None: super().__init__('render', {'convexity': convexity}) class linear_extrude(_OpenSCADObject): """ Linear Extrusion is a modeling operation that takes a 2D polygon as input and extends it in the third dimension. This way a 3D shape is created. :param height: the extrusion height. :type height: number :param center: determines if the object is centered on the Z-axis after extrusion. :type center: boolean :param convexity: The convexity parameter specifies the maximum number of front sides (back sides) a ray intersecting the object might penetrate. This parameter is only needed for correctly displaying the object in OpenCSG preview mode and has no effect on the polyhedron rendering. :type convexity: int :param twist: Twist is the number of degrees of through which the shape is extruded. Setting to 360 will extrude through one revolution. The twist direction follows the left hand rule. :type twist: number :param slices: number of slices to extrude. Can be used to improve the output. :type slices: int :param scale: relative size of the top of the extrusion compared to the start :type scale: number """ def __init__(self, height: float = None, center: bool = None, convexity: int = None, twist: float = None, slices: int = None, scale: float = None) -> None: super().__init__('linear_extrude', {'height': height, 'center': center, 'convexity': convexity, 'twist': twist, 'slices': slices, 'scale': scale}) class rotate_extrude(_OpenSCADObject): """ A rotational extrusion is a Linear Extrusion with a twist, literally. Unfortunately, it can not be used to produce a helix for screw threads as the 2D outline must be normal to the axis of rotation, ie they need to be flat in 2D space. The 2D shape needs to be either completely on the positive, or negative side (not recommended), of the X axis. It can touch the axis, i.e. zero, however if the shape crosses the X axis a warning will be shown in the console windows and the rotate/_extrude() will be ignored. If the shape is in the negative axis the faces will be inside-out, you probably don't want to do that; it may be fixed in the future. :param angle: Defaults to 360. Specifies the number of degrees to sweep, starting at the positive X axis. The direction of the sweep follows the Right Hand Rule, hence a negative angle will sweep clockwise. :type angle: number :param _fn: Number of fragments in 360 degrees. :type _fn: int :param convexity: The convexity parameter specifies the maximum number of front sides (back sides) a ray intersecting the object might penetrate. This parameter is only needed for correctly displaying the object in OpenCSG preview mode and has no effect on the polyhedron rendering. :type convexity: int """ def __init__(self, angle: float = 360, convexity: int = None, _fn: int = None) -> None: super().__init__('rotate_extrude', {'angle': angle, '_fn': _fn, 'convexity': convexity}) class dxf_linear_extrude(_OpenSCADObject): def __init__(self, file: PathStr, layer: float = None, height: float = None, center: bool = None, convexity: int = None, twist: float = None, slices: int = None) -> None: super().__init__('dxf_linear_extrude', {'file': _Path(file).as_posix(), 'layer': layer, 'height': height, 'center': center, 'convexity': convexity, 'twist': twist, 'slices': slices}) class projection(_OpenSCADObject): """ Creates 2d shapes from 3d models, and export them to the dxf format. It works by projecting a 3D model to the (x,y) plane, with z at 0. :param cut: when True only points with z=0 will be considered (effectively cutting the object) When False points above and below the plane will be considered as well (creating a proper projection). :type cut: boolean """ def __init__(self, cut: bool = None) -> None: super().__init__('projection', {'cut': cut}) class surface(_OpenSCADObject): """ Surface reads information from text or image files. :param file: The path to the file containing the heightmap data. :type file: PathStr :param center: This determines the positioning of the generated object. If True, object is centered in X- and Y-axis. Otherwise, the object is placed in the positive quadrant. Defaults to False. :type center: boolean :param invert: Inverts how the color values of imported images are translated into height values. This has no effect when importing text data files. Defaults to False. :type invert: boolean :param convexity: The convexity parameter specifies the maximum number of front sides (back sides) a ray intersecting the object might penetrate. This parameter is only needed for correctly displaying the object in OpenCSG preview mode and has no effect on the polyhedron rendering. :type convexity: int """ def __init__(self, file, center: bool = None, convexity: int = None, invert=None) -> None: super().__init__('surface', {'file': file, 'center': center, 'convexity': convexity, 'invert': invert}) class text(_OpenSCADObject): """ Create text using fonts installed on the local system or provided as separate font file. :param text: The text to generate. :type text: string :param size: The generated text will have approximately an ascent of the given value (height above the baseline). Default is 10. Note that specific fonts will vary somewhat and may not fill the size specified exactly, usually slightly smaller. :type size: number :param font: The name of the font that should be used. This is not the name of the font file, but the logical font name (internally handled by the fontconfig library). A list of installed fonts can be obtained using the font list dialog (Help -> Font List). :type font: string :param halign: The horizontal alignment for the text. Possible values are "left", "center" and "right". Default is "left". :type halign: string :param valign: The vertical alignment for the text. Possible values are "top", "center", "baseline" and "bottom". Default is "baseline". :type valign: string :param spacing: Factor to increase/decrease the character spacing. The default value of 1 will result in the normal spacing for the font, giving a value greater than 1 will cause the letters to be spaced further apart. :type spacing: number :param direction: Direction of the text flow. Possible values are "ltr" (left-to-right), "rtl" (right-to-left), "ttb" (top-to-bottom) and "btt" (bottom-to-top). Default is "ltr". :type direction: string :param language: The language of the text. Default is "en". :type language: string :param script: The script of the text. Default is "latin". :type script: string :param _fn: used for subdividing the curved path _fn provided by freetype :type _fn: int """ def __init__(self, text: str, size: float = None, font: str = None, halign: str = None, valign: str = None, spacing: float = None, direction: str = None, language: str = None, script: str = None, _fn: int = None) -> None: super().__init__('text', {'text': text, 'size': size, 'font': font, 'halign': halign, 'valign': valign, 'spacing': spacing, 'direction': direction, 'language': language, 'script': script, '_fn': _fn}) class child(_OpenSCADObject): def __init__(self, index: int = None, vector: _Sequence[int] = None, range=None) -> None: super().__init__('child', {'index': index, 'vector': vector, 'range': range}) class children(_OpenSCADObject): """ The child nodes of the module instantiation can be accessed using the children() statement within the module. The number of module children can be accessed using the $children variable. :param index: select one child, at index value. Index start at 0 and should be less than or equal to $children-1. :type index: int :param vector: select children with index in vector. Index should be between 0 and $children-1. :type vector: sequence of int :param range: [:] or [::]. select children between to , incremented by (default 1). """ def __init__(self, index: int = None, vector: float = None, range: P23 = None) -> None: super().__init__('children', {'index': index, 'vector': vector, 'range': range}) class import_stl(_OpenSCADObject): def __init__(self, file: PathStr, origin: P2 = (0, 0), convexity: int = None, layer: int = None) -> None: super().__init__('import', {'file': _Path(file).as_posix(), 'origin': origin, 'convexity': convexity, 'layer': layer}) class import_dxf(_OpenSCADObject): def __init__(self, file, origin=(0, 0), convexity: int = None, layer: int = None) -> None: super().__init__('import', {'file': file, 'origin': origin, 'convexity': convexity, 'layer': layer}) class import_(_OpenSCADObject): """ Imports a file for use in the current OpenSCAD model. OpenSCAD currently supports import of DXF and STL (both ASCII and Binary) files. :param file: path to the STL or DXF file. :type file: PathStr :param convexity: The convexity parameter specifies the maximum number of front sides (back sides) a ray intersecting the object might penetrate. This parameter is only needed for correctly displaying the object in OpenCSG preview mode and has no effect on the polyhedron rendering. :type convexity: int """ def __init__(self, file: PathStr, origin: P2 = (0, 0), convexity: int = None, layer: int = None) -> None: super().__init__('import', {'file': _Path(file).as_posix(), 'origin': origin, 'convexity': convexity, 'layer': layer}) class _import(import_): pass class intersection_for(_OpenSCADObject): """ Iterate over the values in a vector or range and take an intersection of the contents. """ def __init__(self, n: int) -> None: super().__init__('intersection_for', {'n': n}) ================================================ FILE: solid2/core/builtins/primitives.py ================================================ from ..scad_import import use as _use from ...config import config as _config from pathlib import Path as _Path # This loads all the built in OpenSCAD functions # (like circle, square, color, translate.....) if not _config.use_implicit_builtins: from .openscad_primitives import * else: _use(_Path(__file__).parent / "implicit.primitives", skip_render=True) ================================================ FILE: solid2/core/extension_manager.py ================================================ class ExtensionManager(): def __init__(self): self.wrapper = [] self.pre_render = [] self.post_render = [] self.access_syntax = {} def register_root_wrapper(self, ext): self.wrapper.append(ext) def register_pre_render(self, func): self.pre_render.append(func) def register_post_render(self, func): self.post_render.append(func) def register_access_syntax(self, fn): import inspect if fn.__name__ in self.access_syntax: raise Exception(f'Unable to register "{fn.__name__}" plugin, it ' 'would overwrite an existing plugin or method.') if inspect.isclass(fn): self.access_syntax[fn.__name__] = \ lambda y, *args, **kwargs: fn(*args, **kwargs)(y) else: self.access_syntax[fn.__name__] = fn def wrap_root_node(self, root): new_root_node = root for w in self.wrapper: new_root_node = w(new_root_node) return new_root_node def call_pre_render(self, root): pre_render_str = '' for f in self.pre_render: pre_render_str += f(root) return pre_render_str.strip() def call_post_render(self, root): post_render_str = '' for f in self.post_render: post_render_str += f(root) return post_render_str.strip() def access_syntax_lookup(self, key): return self.access_syntax.get(key, None) default_extension_manager = ExtensionManager() # expose register functions as decorators / global functions def register_access_syntax(fn): default_extension_manager.register_access_syntax(fn) return fn def register_pre_render(fn): default_extension_manager.register_pre_render(fn) return fn def register_post_render(fn): default_extension_manager.register_post_render(fn) return fn def register_root_wrapper(fn): default_extension_manager.register_root_wrapper(fn) return fn ================================================ FILE: solid2/core/object_base/__init__.py ================================================ from .object_base_impl import * ================================================ FILE: solid2/core/object_base/access_syntax_mixin.py ================================================ from ...config import config def builtins(): from .. import builtins return builtins class AccessSyntaxMixin: if not config.use_implicit_builtins: def intersection_for(self, n): return builtins().intersection_for(n)(self) def color(self, color, alpha=1.0): return builtins().color(color, alpha)(self) def hull(self): return builtins().hull()(self) def render(self, convexity=None): return builtins().render(convexity)(self) def projection(self, cut=None): return builtins().projection(cut)(self) def surface(self, file, center=None, convexity=None, invert=None): return builtins().surface(file, center, convexity, invert)(self) def offset(self, r=None, delta=None, chamfer=None, _fn=None): return builtins().offset(r, delta, chamfer, _fn)(self) def mirror(self, *args, **kwargs): return builtins().mirror(*args, **kwargs)(self) def resize(self, *args, **kwargs): return builtins().resize(*args, **kwargs)(self) def mirrorX(self): return builtins().mirrorX()(self) def mirrorY(self): return builtins().mirrorY()(self) def mirrorZ(self): return builtins().mirrorZ()(self) def resizeX(self, x): return builtins().resizeX(x)(self) def resizeY(self, y): return builtins().resizeY(y)(self) def resizeZ(self, z): return builtins().resizeZ(z)(self) def union(self): return builtins().union()(self) def difference(self): return builtins().difference()(self) def intersection(self): return builtins().intersection()(self) def rotate_extrude(self, angle=None, convexity=None, _fn=None): return builtins().rotate_extrude(angle, convexity, _fn)(self) def linear_extrude(self, height=None, center=None, convexity=None, \ twist=None, slices=None, scale=None): return builtins().linear_extrude(height, center, convexity, twist, slices, scale)(self) def translate(self, *args, **kwargs): return builtins().translate(*args, **kwargs)(self) def scale(self, *args, **kwargs): return builtins().scale(*args, **kwargs)(self) def rotate(self, *args, **kwargs): return builtins().rotate(*args, **kwargs)(self) def down(self, z): return builtins().down(z)(self) def up(self, z): return builtins().up(z)(self) def left(self, x): return builtins().left(x)(self) def right(self, x): return builtins().right(x)(self) def back(self, y): return builtins().back(y)(self) def fwd(self, y): return builtins().fwd(y)(self) def forward(self, y): return builtins().fwd(y)(self) def translateX(self, x): return builtins().translateX(x)(self) def translateY(self, y): return builtins().translateY(y)(self) def translateZ(self, z): return builtins().translateZ(z)(self) def rotateX(self, x): return builtins().rotateX(x)(self) def rotateY(self, y): return builtins().rotateY(y)(self) def rotateZ(self, z): return builtins().rotateZ(z)(self) def scaleX(self, x): return builtins().scaleX(x)(self) def scaleY(self, y): return builtins().scaleY(y)(self) def scaleZ(self, z): return builtins().scaleZ(z)(self) def debug(self): return builtins().debug()(self) def background(self): return builtins().background()(self) def root(self): return builtins().root()(self) def disable(self): return builtins().disable()(self) def __getattr__(self, name): #ask the extension manager for dynamic access syntax extensions from ..extension_manager import default_extension_manager fn = default_extension_manager.access_syntax_lookup(name) if not fn: raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'") return lambda *args, **kwargs: fn(self, *args, **kwargs) ================================================ FILE: solid2/core/object_base/object_base_impl.py ================================================ from .access_syntax_mixin import AccessSyntaxMixin from .operator_mixin import OperatorMixin #don't do relative imports on the global scope to be able to import this file #from "everywhere" class RenderMixin: def __repr__(self): return self.as_scad() def as_scad(self): from ..scad_render import scad_render return scad_render(self)[:-1] def save_as_scad(self, filename='', outdir=''): from ..scad_render import scad_render_to_file return scad_render_to_file(self, filename, outdir) def save_as_stl(self, filename=None): from ..scad_render import render_to_stl_file return render_to_stl_file(self, filename) def _ipython_display_(self): from IPython import get_ipython, display def is_notebook(): return get_ipython().__class__.__name__ == 'ZMQInteractiveShell' if is_notebook(): try: from jupyterscad import render except ImportError: print(self.as_scad()) return display.display(render(self)) class ObjectBase(RenderMixin): def __init__(self): self._children = [] def add(self, c): def _add(c): assert(hasattr(c, "_render")) self._children += [c] if isinstance(c, list): for cc in c: _add(cc) else: _add(c) return self def _render(self): s = '' for c in self._children: s += c._render() return s def __call__(self, *args): #translate(...)(cube()) #this adds cube() to translate._children for a in args: self.add(a) return self class BareOpenSCADObject(ObjectBase): def __init__(self, name, params): super().__init__() self._name = name self._params = params def _render(self): """ returns the scad code for a given node tuple consiting of name, params and children list. -> translate(v = [1, 2, 3]) {children[0]; children[1]; ...};\n """ from ..utils import indent renderedChildsList = [indent(child._render()) for child in self._children] if renderedChildsList: renderedChilds = f" {{\n{''.join(renderedChildsList)}}}\n" else: renderedChilds = ";\n" return self._generate_scad_head() + renderedChilds def _generate_scad_head(self): """ for a given function name and dict of params it returns: {name}(p1=v1, p2=v2,...) -> translate(v = [1, 2, 3]) """ from ..utils import unescape_openscad_identifier, py2openscad from ...config import config param_strings = [] for p in sorted(self._params.keys()): if self._params[p] is None: continue if config.use_implicit_builtins and \ isinstance(self._params[p], OpenSCADParameterFunction): param_strings.append(self._params[p]._render()) else: scad_value = py2openscad(self._params[p]) scad_identifier = unescape_openscad_identifier(p) param_strings.append(f'{scad_identifier} = {scad_value}') scad_identifier = unescape_openscad_identifier(self._name) param_str = ", ".join(param_strings) return f'{scad_identifier}({param_str})' class OpenSCADObject(AccessSyntaxMixin, OperatorMixin, BareOpenSCADObject): pass class OpenSCADConstant: def __init__(self, value): self.value = value from ..utils import escape_openscad_identifier self.__doc__ = escape_openscad_identifier(value) def __repr__(self): return f'{self.value}' def __operator_base__(self, op, other): return OpenSCADConstant(f'({self} {op} {other})') def __roperator_base__(self, op, other): return OpenSCADConstant(f'({other} {op} {self})') def __unary_operator_base__(self, op): return OpenSCADConstant(f'({op}{self})') def __illegal_operator__(self): raise Exception("You can't compare a OpenSCADConstant with something else, " +\ "because we don't know the customized value at " +\ "SolidPythons runtime because it might get customized " +\ "at OpenSCAD runtime.") #basic operators +, -, *, /, %, ** def __add__(self, other): return self.__operator_base__("+", other) def __sub__(self, other): return self.__operator_base__("-", other) def __mul__(self, other): return self.__operator_base__("*", other) def __mod__(self, other): return self.__operator_base__("%", other) def __pow__(self, other): return self.__operator_base__("^", other) def __truediv__(self, other): return self.__operator_base__("/", other) def __radd__(self, other): return self.__roperator_base__("+", other) def __rsub__(self, other): return self.__roperator_base__("-", other) def __rmul__(self, other): return self.__roperator_base__("*", other) def __rmod__(self, other): return self.__roperator_base__("%", other) def __rpow__(self, other): return self.__roperator_base__("^", other) def __rtruediv__(self, other): return self.__roperator_base__("/", other) #unary operators def __neg__(self): return self.__unary_operator_base__("-") #other operators def __abs__(self): return OpenSCADConstant(f'abs({self})') #"illegal" operators def __eq__(self, other): return self.__operator_base__("==", other) #type: ignore def __ne__(self, other): return self.__operator_base__("!=", other) #type: ignore def __le__(self, other): return self.__operator_base__("<=", other) def __ge__(self, other): return self.__operator_base__(">=", other) def __lt__(self, other): return self.__operator_base__("<", other) def __gt__(self, other): return self.__operator_base__(">", other) #do not allow to evaluate to bool def __bool__(self): raise Exception("You can't evaluate scad variables because " +\ "we don't know the value of the variable at " +\ "SolidPython runtime.") def _render(self): from textwrap import dedent return dedent(self.value) def scad_inline(code): return OpenSCADConstant(code) class OpenSCADParameterFunction(OpenSCADConstant): pass def scad_inline_parameter_func(code): return OpenSCADParameterFunction(code) ================================================ FILE: solid2/core/object_base/operator_mixin.py ================================================ class OperatorMixin: def _union_op(self, x, unionType): """ This makes u = a+b identical to: u = union()(a, b ) """ res = unionType() #add self or all its children to res if isinstance(self, unionType): for c in self._children: res.add(c) else: res.add(self) #add x or all its children to res if isinstance(x, unionType): for c in x._children: res.add(c) else: res.add(x) return res def _difference_op(self, x, differenceType): """ This makes u = a - b identical to: u = difference()(a, b ) """ res = differenceType() if isinstance(self, differenceType) and len(self._children): for c in self._children: res.add(c) else: res.add(self) res.add(x) return res def _intersection_op(self, x, intersectionType): """ This makes u = a * b identical to: u = intersection()(a, b ) """ res = intersectionType() if isinstance(self, intersectionType) and len(self._children): for c in self._children: res.add(c) else: res.add(self) if isinstance(x, intersectionType): for c in x._children: res.add(c) else: res.add(x) return res def __add__(self, x): from ..builtins import union return self._union_op(x, union) def __or__(self, x): from ..builtins import union return self._union_op(x, union) def __radd__(self, x): from ..builtins import union return union()(x)._union_op(self, union) def __sub__(self, x): from ..builtins import difference return self._difference_op(x, difference) def __mul__(self, x): from ..builtins import intersection return self._intersection_op(x, intersection) def __and__(self, x): from ..builtins import intersection return self._intersection_op(x, intersection) def __invert__(self): from .. import builtins; return builtins.debug()(self) ================================================ FILE: solid2/core/object_factory.py ================================================ from .object_base import OpenSCADObject from .utils import escape_openscad_identifier # ========================= # = creating the wrappers = # ========================= def check_signature(name, args_def, kwargs_def, *args, **kwargs): #check whether the args and kwargs fit a function signature definition #defined with args_def and kwargs_def. args_def and kwargs_def are lists #of all parameter names the function {name} accepts filtered_kwargs = {k: kwargs[k] for k in kwargs if not k.startswith("_")} if len(args) + len(filtered_kwargs) > len(args_def) + len(kwargs_def): raise TypeError(f"too many arguments to {name}(...)") full_args_tuples = list(zip(args_def + kwargs_def, args)) full_args_tuples += list(zip(filtered_kwargs.keys(), filtered_kwargs.values())) full_args_names = [x[0] for x in full_args_tuples] args_def_copy = args_def[:] kwargs_def_copy = kwargs_def[:] while full_args_names and (args_def_copy or kwargs_def_copy): a = full_args_names.pop() if a in args_def_copy: args_def_copy.remove(a) elif a in kwargs_def_copy: kwargs_def_copy.remove(a) else: raise TypeError(f"{name}(...) has no parameter {a} or it is " +\ f"already occupied by a positional argument") #are there still unmatched parameters left? if full_args_names: if not args_def_copy and not kwargs_def_copy: raise TypeError(f"{name}(...) too many arguments") else: assert(False) #are there still unmet args in args_def? if args_def_copy and not full_args_names: raise TypeError(f"not enough parameters to {name}(...)") def create_openscad_wrapper_from_symbols(name, args, kwargs): #this is the function we'll bind to the init function of the new class #that we'll create to represent the openscad function def init_func(self, *args, **kwargs): def legacy_patch(kwargs): # this function patches the kwargs to be backward compatible import keyword if "segments" in kwargs.keys(): kwargs["_fn"] = kwargs.pop("segments") keys_to_replace = [] #replace keyword_ with _keyword for k in kwargs.keys(): if k.endswith("_") and keyword.iskeyword(k[:-1]): keys_to_replace.append(k) for k in keys_to_replace: kwargs["_" + k[:-1]] = kwargs.pop(k) #replace __[0-9]... with _[0-9] keys_to_replace = [] for k in kwargs.keys(): if k.startswith("__") and k[2].isdigit(): keys_to_replace.append(k) for k in keys_to_replace: kwargs["_" + k[2:]] = kwargs.pop(k) legacy_patch(kwargs) #check whether the *args and **kwargs meet our parameter definitions check_signature(name, args_def, kwargs_def, *args, **kwargs) #zip the args with the def dicts and update it with kwargs #to get a single complete kwargs list params = dict(zip(args_def + kwargs_def, args)) params.update(kwargs) #call OpenSCADObject ctor return super(self.__class__, self).__init__(name, params) #escape all identifiers name = escape_openscad_identifier(name) args_def = list(map(escape_openscad_identifier, args)) kwargs_def = list(map(escape_openscad_identifier, kwargs)) #create the class and bind an "instance of" _init_func it's __init__ function class_declaration = type(name, (OpenSCADObject,), {"__init__" : init_func}) #add the function signature as __doc__ string, so ExpSolidNamespace can #display it param_str = ",".join([str(x) for x in args]) param_str += "," if param_str else '' param_str += ",".join([str(x) + "=..." for x in kwargs]) class_declaration.__doc__ = f'{name}({param_str})' return class_declaration ================================================ FILE: solid2/core/parse_scad.py ================================================ import hashlib import pickle from functools import partial from pathlib import Path from collections import namedtuple from ..config import config from .object_base import OpenSCADConstant from .utils import escape_openscad_identifier from .object_factory import create_openscad_wrapper_from_symbols callables_entry = namedtuple("callables_entry", ["name", "args", "kwargs"]) def get_pickle_filename(filename): md5 = hashlib.md5() md5.update(filename.as_posix().encode('utf-8')) filename_hash = md5.hexdigest() with open(filename, mode='rb') as f: d = hashlib.md5() for buf in iter(partial(f.read, 128), b''): d.update(buf) file_content_hash = d.hexdigest() pickle_filename = Path(filename_hash).with_suffix("." + file_content_hash).name assert(config.pickle_cache_dir is not None) return config.pickle_cache_dir / pickle_filename, filename_hash def check_pickle_cache(filename): if not config.enable_pickle_cache: return None, None, False assert(config.pickle_cache_dir is not None) pickle_filename, _ = get_pickle_filename(filename) #create pickle_cache_dir if neccessary if not config.pickle_cache_dir.exists(): config.pickle_cache_dir.mkdir(parents=True) #if the file exists, load and return it if pickle_filename.exists(): with pickle_filename.open("rb") as f: pickler = pickle.Unpickler(f) callables = pickler.load() global_vars = pickler.load() return callables, global_vars, True return None, None, False def update_pickle_cache(filename, callables, global_vars): if not config.enable_pickle_cache: return pickle_filename, filename_hash = get_pickle_filename(filename) #delete old files which correspond to this (absolute) filename(_hash) for f in pickle_filename.parent.glob(filename_hash + "*"): Path.unlink(f) #write the callables and global_vars to disk with pickle_filename.open("wb") as f: pickler = pickle.Pickler(f) pickler.dump(callables) pickler.dump(global_vars) def get_scad_file_as_dict(filename): assert(filename.is_absolute()) #check whether we have a valid up to date pickled version of it callables, global_vars, cache_is_valid = check_pickle_cache(filename) if not cache_is_valid: #otherwise parse the file from ..libs.py_scadparser import scad_parser modules, functions, global_vars = scad_parser.parseFile(filename) callables = [] for c in modules + functions: #args = [p.name for p in c.parameters if not p.optional] #kwargs = [p.name for p in c.parameters if p.optional] kwargs = [p.name for p in c.parameters] callables.append(callables_entry(c.name, [], kwargs)) #write the read version to disk so we can probably use it the next time update_pickle_cache(filename, callables, global_vars) #create a wrapper for each callable and add it to the dict new_namespace_dict = {} if callables: for c in callables: wrapper = create_openscad_wrapper_from_symbols(c.name, [], c.kwargs) new_namespace_dict[escape_openscad_identifier(c.name)] = wrapper if global_vars: for c in global_vars: new_namespace_dict[escape_openscad_identifier(c.name)] = \ OpenSCADConstant(c.name) return new_namespace_dict ================================================ FILE: solid2/core/scad_import.py ================================================ from types import SimpleNamespace import inspect from .utils import resolve_scad_filename, escape_openscad_identifier from .parse_scad import get_scad_file_as_dict # =========================== # = IMPORTING OPENSCAD CODE = # =========================== module_cache_by_resolved_filename = {} extra_scad_includes = [] def check_module_cache(resolved_scad, use_not_include): global module_cache_by_resolved_filename #check the module cache for the requested module if resolved_scad in module_cache_by_resolved_filename.keys(): cache_entry = module_cache_by_resolved_filename[resolved_scad] #if this is a include call and the module was only used until now #set the "use/include" flag in the module cache if not use_not_include and cache_entry[1]: cache_entry[1] = False return cache_entry[0] return None def update_module_cache(resolved_scad, new_namespace_dict, use_not_include, skip_render): global module_cache_by_resolved_filename module_cache_by_resolved_filename[resolved_scad] = \ [new_namespace_dict, use_not_include, skip_render] def load_scad_file_into_dict(resolved_scad, dest_namespace_dict, use_not_include, skip_render): #check the cache cached_dict = check_module_cache(resolved_scad, use_not_include) if cached_dict: dest_namespace_dict.update(cached_dict) return #otherwise parse the file new_namespace_dict = get_scad_file_as_dict(resolved_scad) dest_namespace_dict.update(new_namespace_dict) #and update the cache update_module_cache(resolved_scad, new_namespace_dict, use_not_include, skip_render) def load_scad_dir_into_dict(resolved_scad, dest_namespace_dict, use_not_include, skip_render): assert(resolved_scad.is_dir()) #for each file in the dir for f in resolved_scad.iterdir(): #skip non .scad files if f.is_file() and f.suffix != ".scad": continue #load it subspace = ExpSolidNamespace(f) load_scad_file_or_dir_into_dict(f, subspace.__dict__, use_not_include, skip_render) #and add it to the dest_namespace_dict identifier = escape_openscad_identifier(f.stem) dest_namespace_dict[identifier] = subspace def load_scad_file_or_dir_into_dict(filename, dest_namespace_dict, use_not_include, skip_render): assert(dest_namespace_dict != None) resolved_scad = resolve_scad_filename(filename) if not resolved_scad or not resolved_scad.exists(): raise ValueError(f'Could not find .scad file {filename}.') if resolved_scad.is_file(): load_scad_file_into_dict(resolved_scad, dest_namespace_dict, use_not_include, skip_render) elif resolved_scad.is_dir(): load_scad_dir_into_dict(resolved_scad, dest_namespace_dict, use_not_include, skip_render) # use() & include() mimic OpenSCAD's use/include mechanics. # -- use() makes methods in scad_file_path.scad available to be called. # -- include() makes those methods available AND executes all code in # scad_file_path.scad, which may have side effects. # Unless you have a specific need, call use(). def get_callers_namespace_dict(depth=2): frame = inspect.currentframe() for _ in range(depth): assert(frame) frame = frame.f_back assert(frame) if frame.f_code.co_name == "": return frame.f_locals else: raise Exception("use & include can not be used inside a function!\n" +\ "they would polute the modules namespace and only if executed. This\n" +\ "has strange side effects! Use them on module level.\n") def use(filename, skip_render=False): load_scad_file_or_dir_into_dict(filename, get_callers_namespace_dict(), True, skip_render) def include(filename, skip_render=False): load_scad_file_or_dir_into_dict(filename, get_callers_namespace_dict(), False, skip_render) def import_scad(filename, dest_namespace=None, use_not_include=True, skip_render=False): if dest_namespace == None: dest_namespace = ExpSolidNamespace(filename) load_scad_file_or_dir_into_dict(filename, dest_namespace.__dict__, use_not_include, skip_render) return dest_namespace def extra_scad_include(filename, use_not_include=True): global extra_scad_includes extra_scad_includes.append((filename, use_not_include)) # ======================== # = our helper namespace = # ======================== class ExpSolidNamespace(SimpleNamespace): """ we create our own namespace class for imported openscad modules to be able to overwrite the __repr__ func. This enables in a python shell s = import_scad("...") print(s) to list the "contents" of this namespace """ def __init__(self, filename): super().__init__() self.__filename__ = filename def __repr__(self): node_strings = [] for k in sorted(self.__dict__): if not k.startswith("__"): i = self.__dict__[k] if isinstance(i, ExpSolidNamespace): node_strings += [f'\t{k}'] else: node_strings += [f'\t{i.__doc__}'] return '\n'.join([f'{self.__filename__}:'] + node_strings) ================================================ FILE: solid2/core/scad_render.py ================================================ from pathlib import Path from .scad_import import module_cache_by_resolved_filename, extra_scad_includes from ..config import config def get_default_filename(suffix): #try to get the filename of the calling module import __main__ if hasattr(__main__, "__file__"): #not called from a terminal calling_file = Path(__main__.__file__).absolute() outfile = calling_file.with_suffix(suffix) else: outfile = "solid_out" + suffix return outfile def render_to_stl_file(root, filename): if not filename: filename = get_default_filename(".stl") scad_file = \ scad_render_to_file(root, Path(filename).with_suffix(".stl.scad")) cmd = config.openscad_stl_command.format(scadfile=scad_file, stlfile=filename) import shlex import subprocess subprocess.check_call(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) return Path(filename).absolute().as_posix() def scad_render(root, file_header = ''): #get a list of all used and included files includes = get_include_string() #call extensions pre_render from .extension_manager import default_extension_manager extensions_header_str = default_extension_manager.call_pre_render(root) extensions_header_str += "\n\n" if extensions_header_str else '' #wrap the extensions around the root node root = default_extension_manager.wrap_root_node(root) scad_body = root._render() #call extensions post_render extensions_footer_str = default_extension_manager.call_post_render(root) extensions_footer_str += "\n" if extensions_footer_str else '' return file_header + includes + extensions_header_str + scad_body \ + extensions_footer_str def scad_render_to_file(scad_object, filename=None, out_dir='', file_header=''): if out_dir == None: out_dir = '' rendered_string = scad_render(scad_object, file_header=file_header) return _write_to_file(rendered_string, filename, out_dir) def _write_to_file(out_string, filename=None, outdir=''): outfile = filename if not outfile: suffix = ".scad" if not config.use_implicit_builtins else ".escad" outfile = get_default_filename(suffix) outpath = Path(outdir) if not outpath.exists(): outpath.mkdir() outfile_path = outpath / Path(outfile) outfile_path.write_text(out_string, encoding="utf-8") return outfile_path.absolute().as_posix() def get_include_string(): strings = [] for file, use_not_include in extra_scad_includes: if use_not_include: strings.append(f"use <{file}>;") else: strings.append(f"include <{file}>;") for k, v in module_cache_by_resolved_filename.items(): #skip builtins file if v[2]: #skip_render flag continue if v[1]: strings.append(f"use <{k}>;") else: strings.append(f"include <{k}>;") s = "\n".join(strings) s += "\n\n" if s else '' return s ================================================ FILE: solid2/core/utils.py ================================================ import keyword import re import textwrap from pathlib import Path from ..config import config #don't do relative imports on the global scope to be able to import this file #from "everywhere" def indent(s): return textwrap.indent(s, "\t") def escape_openscad_identifier(identifier): """ Append an underscore to any python reserved word. Prepend an underscore to any OpenSCAD identifier starting with a digit. No-op for all other strings, e.g. 'or' => 'or_', 'other' => 'other' """ if identifier in keyword.kwlist or identifier[0].isdigit(): return "_" + identifier if identifier[0] == "$": return "_" + identifier[1:] return identifier def unescape_openscad_identifier(identifier): """ Remove trailing underscore for already-subbed python reserved words. Remove prepending underscore if remaining identifier starts with a digit. No-op for all other strings: e.g. 'or_' => 'or', 'other_' => 'other_' """ if identifier.startswith("_") and identifier[1:] in keyword.kwlist: return identifier[1:] if identifier.startswith("_") and identifier[1].isdigit(): return identifier[1:] if identifier.startswith("_"): return "$" + identifier[1:] return identifier def resolve_scad_filename(scad_file): scad_path = Path(scad_file) if scad_path.is_absolute(): return scad_path for p in config.openscad_library_paths: if (p / scad_path).exists(): return (p / scad_path).absolute() return None def py2openscad(o): from .object_base import ObjectBase if type(o) == bool: return str(o).lower() if type(o) == str: escaped_str = re.sub(r'([\\"])', r'\\\1', o) return f'\"{escaped_str}\"' # type: ignore if isinstance(o, ObjectBase): return o._render().rstrip().removesuffix(";") #removing traling ;\n if hasattr(o, "__iter__"): scadVals = [py2openscad(i) for i in o] return f"[{', '.join(scadVals)}]" return str(o) ================================================ FILE: solid2/examples/01-basics.py ================================================ #! /usr/bin/env python from solid2 import cube, sphere, difference, set_global_fn set_global_fn(72) difference()( cube([10, 20, 30]), sphere(10) ).save_as_scad() # this is very very basic but you can make this as complex as in OpenSCAD. # You can really just use "python as OpenSCAD". You just need to call # .save_as_scad() at last to write it to a *.scad file. # # If you execute this file it will create examples/01-basics.scad with the this # content: # # $fn = 72; # # difference() { # cube(size = [10, 20, 30]); # sphere(r = 10); # } # ================================================ FILE: solid2/examples/02-vars-and-operators.py ================================================ #! /usr/bin/env python from solid2 import cube, sphere # you can store any "openscad object" in a regular variable. No matter whether # it's just a primitive or a complete assembly c = cube([10, 20, 30]) s = sphere(10) d = c - s # Operators: # The following operators are defined: # # operator | action # ------------|------------- # +, | | union # - | difference # *, & | intersection # ~ | debug (see 03-debug-background.py) d.save_as_scad() # this is the same as 01-basics just using a more pythonic way to express it. # # If you execute this file it will create examples/02-vars-and-operators.py with # this content: # # // Generated by ExpSolidPython # # difference() { # cube(size = [10, 20, 30]); # sphere(r = 10); # }; ================================================ FILE: solid2/examples/03-debug-background.py ================================================ #! /usr/bin/env python from solid2 import cube, sphere, cylinder, background, debug c = cube([10, 20, 30]) s = debug()(sphere(10)) d = c - s bg = background()( cylinder(r=4, h=30) ) (d + bg).save_as_scad() #disable (*) and root (!) are accessible corresponding to debug and background #NOTE: the __invert__ operator is mapped to debug: # # debug()(cube(1)) # # can be expressed as: # # ~cube(1) # #this file generates the following scad code: # # union() { # difference() { # cube(size = [10, 20, 30]); # #sphere(r = 10); # }; # %cylinder(h = 30, r = 4); # }; ================================================ FILE: solid2/examples/04-convenience.py ================================================ #! /usr/bin/env python from solid2 import cube, sphere, rotate, down, forward # the convenience module defines some convenience functions and "overloads" for # some transformations and primitives to get a more convenient access to it. # It provides for all OpenSCAD modules which need a "size" parameter to pass in # single integers / floats (not wrapped in a list or tuple). In other words: you # don't need to wrap sizes in [ and ]: # # translate(10, 0, 0)(cube(1, 2, 3)) # # The following transformations and modules are "overloaded": # # translate, scale, resize, mirror, rotate, cube and square # # Furthermore it defines the following directions: # # up, down, left, right, forward, fwd, back # # which all accept a single integer or float as parameter. c = rotate(45, 45, 45)( down(5)( cube(10, 20, 30) ) ) s = ~forward(5)( sphere(10) ) (c-s).save_as_scad() # generates this scad code: # # // Generated by ExpSolidPython # # difference() { # rotate(a = [45, 45, 45]) { # translate(v = [0, 0, -5]) { # cube(size = [10, 20, 30]); # }; # }; # #translate(v = [0, 5, 0]) { # sphere(r = 10); # }; # }; ================================================ FILE: solid2/examples/05-access-style-syntax.py ================================================ #! /usr/bin/env python from solid2 import cube, sphere # Since I don't like the OpenSCAD syntax I added "access-style" syntax. This # allows to call all OpenSCAD builtin transformations, the convenience # functions (up, down, left,...) and the modifiers (debug, background, ...) as # if you would call a member function. # # cube(10).up(5) # # is equivalent to # # up(5)(cube(10)) c = cube(10, 20, 30).\ down(5).\ rotate(45, 45, 45) s = ~sphere(10).forward(5) (c-s).save_as_scad() # generates exactly the same code as 04-convenience.py: # # // Generated by ExpSolidPython # # difference() { # rotate(a = [45, 45, 45]) { # translate(v = [0, 0, -5]) { # cube(size = [10, 20, 30]); # }; # }; # #translate(v = [0, 5, 0]) { # sphere(r = 10); # }; # }; ================================================ FILE: solid2/examples/06-functions.py ================================================ #! /usr/bin/env python from solid2 import cylinder, cube # as soon as the objects get more sophisticated it makes sense to use functions # to hierarchically assemble them. # You can use python functions pretty much the same way as OpenSCAD modules # except the children stuff. This is not possible with SolidPython but you # can pass other OpenSCAD objects as parameters to a function. # # This simple example assembles a car similar to the one from the OpenSCAD # tutorial: def wheel(): return cylinder(r=35, h=15, center=True).rotate(0, 90, 0) def axle(): a = cylinder(r=10, h=120, center=True).rotate(0, 90, 0) w1 = wheel().left(70) w2 = wheel().right(70) return w1 + w2 + a def torso(): bottom = cube(100, 250, 50, center=True) top = cube(80, 100, 60, center=True) window_cube = cube(200, 55 ,50, center=True).down(10) top -= (window_cube + window_cube.rotate(0, 0, 90)) return bottom + top.up(50) def car(): t = torso() front_axle = axle().down(20).back(80) rear_axle = axle().down(20).forward(80) return t + front_axle + rear_axle car().save_as_scad() ================================================ FILE: solid2/examples/07-libs-bosl2-attachable.py ================================================ from solid2.extensions.bosl2 import cube, sphere, xcyl, union, xcopies, \ attachable, show_anchors, \ CENTER, LEFT, TOP, UP def cubic_barbell(s=100, anchor=CENTER, spin=0, orient=UP): return attachable(anchor,spin,orient, size=[s*3,s,s]) ( union() ( xcopies(2*s)(cube(s, center=True)), xcyl(h=2*s, d=s/4) ) ) cc = cubic_barbell(100)( cube(50, center=True).attach(TOP), sphere(50).attach(LEFT), show_anchors(30) ) cc.save_as_scad() ================================================ FILE: solid2/examples/07-libs-bosl2-logo.py ================================================ # include # include # include # include # include from solid2.extensions.bosl2 import cuboid, regular_ngon, \ RIGHT, FRONT, BACK, BOT, CENTER, \ path_sweep, xdistribute from solid2.extensions.bosl2 import gears, beziers, screws, cubetruss # $fa=1; # $fs=1; from solid2 import set_global_fa, set_global_fs set_global_fa(1) set_global_fs(1) def B(): # recolor("#f77") # diff("hole") # cuboid([45,45,10], chamfer=10, edges=[RIGHT+BACK,RIGHT+FRONT], anchor=FRONT) { # cuboid([30,30,11], chamfer=5, edges=[RIGHT+BACK,RIGHT+FRONT], $tags="hole"); # attach(FRONT,BACK, overlap=5) { # diff("hole") # cuboid([45,45,10], rounding=15, edges=[RIGHT+BACK,RIGHT+FRONT]) { # cuboid([30,30,11], rounding=10, edges=[RIGHT+BACK,RIGHT+FRONT], $tags="hole"); # } # } # } upperHalf = cuboid([45,45,10], chamfer=10, edges=[RIGHT+BACK,RIGHT+FRONT], anchor=FRONT) lowerHalf = cuboid([45,45,10], rounding=15, edges=[RIGHT+BACK,RIGHT+FRONT]) upperHole = cuboid([30,30,11], chamfer=5, edges=[RIGHT+BACK,RIGHT+FRONT]) lowerHole = cuboid([30,30,11], rounding=10, edges=[RIGHT+BACK,RIGHT+FRONT]) upperHalf.add(upperHole.tag("hole")) lowerHalf.add(lowerHole.tag("hole")) upperHalf.add(lowerHalf.attach(FRONT, BACK, overlap=5)) return upperHalf.diff("hole").recolor("#f77") def O(): # recolor("#7f7") # bevel_gear(pitch=8, teeth=20, face_width=12, shaft_diam=25, pitch_angle=45, # slices=12, spiral_angle=30); gear = gears.bevel_gear(pitch=8, teeth=20, face_width=12, shaft_diam=25, pitch_angle=45, slices=12, spiral_angle=30) return gear.recolor("#7f7") def S(): # x = 18; # y = 20; # s1 = 25; # s2 = 20; # sbez = [ # [-x,-y], [-x,-y-s1], # [ x,-y-s1], [ x,-y], [ x,-y+s2], # [-x, y-s2], [-x, y], [-x, y+s1], # [ x, y+s1], [ x, y] # ]; # recolor("#99f") # path_sweep(regular_ngon(n=3,d=10,spin=90), bezpath_curve(sbez)); x, y, s1, s2 = 18, 20, 25, 20 sbez = [ [-x,-y], [-x,-y-s1], [ x,-y-s1], [ x,-y], [ x,-y+s2], [-x, y-s2], [-x, y], [-x, y+s1], [ x, y+s1], [ x, y] ] s = path_sweep(regular_ngon(n=3,d=10,spin=90), beziers.bezpath_curve(sbez)) return s.recolor("#99f") def L(): # recolor("#0bf") # translate([-15,-35,0]) # cubetruss_corner(size=10, strut=1, h=1, bracing=false, extents=[3,8,0,0,0], # clipthick=0); truss = cubetruss.cubetruss_corner(size=10, strut=1, h=1, bracing=False, extents=[3,8,0,0,0], clipthick=0) return truss.move([-15, -35, 0]).recolor("#0bf") def II(): # recolor("#777") # xdistribute(24) { # screw("M12,70", head="hex", anchor="origin", orient=BACK) # attach(BOT,CENTER) # nut("M12", thickness=10, diameter=20); # screw("M12,70", head="hex", anchor="origin", orient=BACK) # attach(BOT,CENTER) # nut("M12", thickness=10, diameter=20); # } screw = screws.screw("M12,70", head="hex", anchor="origin", orient=BACK) nut = screws.nut("M12", thickness=10) screw.add(nut.attach(BOT, CENTER)) return xdistribute(24)(screw, screw).recolor("#777") # xdistribute(50) { [...] } xdistribute(50)(B(), O(), S(), L(), II()).save_as_scad() ================================================ FILE: solid2/examples/07-libs-bosl2.py ================================================ #! /usr/bin/env python from solid2.extensions.bosl2 import circle, cuboid, sphere, cylinder, \ heightfield, diff, tag, attach, \ TOP, CTR, metric_screws #basic stuff def bolt(): return metric_screws.metric_bolt(size=20, headtype='hex', l=40) def extrude_along_path(): path = [ [0, 0, 0], [33, 33, 33], [66, 33, 40], [100, 0, 0], [150,0,0] ] return circle(r=10, _fn=6).path_extrude(path) def heightfield_test(): def get_data(): from math import sqrt,sin data = [] for y in range(50): yrow = [] data.append(yrow) for x in range(50): yrow.append(sin(sqrt((y-25)**2+(x-25)**2))) return data return heightfield(size=[100,100], bottom=-1, data=get_data()) #a little bit more complicated stuff def bosl_diff(): #openscad example from bosl2 wiki: #diff() # cuboid(50) { # tag("remove") attach(TOP) sphere(d=40); # tag("keep") attach(CTR) cylinder(h=40, d=10); # } return \ diff() ( cuboid(50) ( tag("remove") (attach(TOP) (sphere(d=40))), tag("keep") (attach(CTR) (cylinder(h=40, d=10))) ) ) def bosl_diff2(): #openscad example from bosl2 wiki: #diff() # cuboid(50) { # tag("remove") attach(TOP) sphere(d=40); # tag("keep") attach(CTR) cylinder(h=40, d=10); # } return \ cuboid(50) ( sphere(d=40).attach(TOP).tag("remove"), cylinder(h=40, d=10).attach(CTR).tag("keep") ).diff() assembly = ~extrude_along_path().bounding_box() +\ extrude_along_path().recolor("purple") +\ bosl_diff2().back(100) +\ bolt().left(100) +\ heightfield_test().fwd(100) assembly.save_as_scad() ================================================ FILE: solid2/examples/07-libs.x.py ================================================ #! /usr/bin/env python from solid2 import import_scad # you can use OpenSCAD libraries in SolidPython. This examples needs the bosl # library to be installed in the OpenSCAD library path # (~.local/share/OpenSCAD/libraries) # # NOTE: you can import any *.scad file not only "libraries" #import bosl.metric_screw metric_screws = import_scad("BOSL/metric_screws.scad") #use it to generate a metric screw screw = metric_screws.metric_bolt(size=6, headtype='hex', l=20) screw.save_as_scad() #NOTE: BOSL2 see 07-libs-bosl2.py ================================================ FILE: solid2/examples/08-extensions.py ================================================ #! /usr/bin/env python from solid2 import cube, register_access_syntax, register_pre_render from solid2.core.object_base import OpenSCADObject, ObjectBase,\ AccessSyntaxMixin, OperatorMixin # ============== # = Extensions = # ============== # expsolid is extendable through extensions. This (and the next) example show # some usage of it. # add a simple functions as access syntax extension @register_access_syntax def leftUp(obj, x=1): return obj.left(x).up(x) # create a custom OpenSCADObject that maps to color(c="red") # and register it as access syntax extension @register_access_syntax class red(OpenSCADObject): def __init__(self): super().__init__(name="color", params={"c" : "red"}) # a non sense object that's not an OpenSCADObject. You can use this to get # "low-level" access if you don't want the typical OpenSCAD # call(params)(children) syntax. For example the debug,background,.... modifiers # are implemented like this (see core/builtins.py) @register_access_syntax class non_sense_comment(ObjectBase, AccessSyntaxMixin, OperatorMixin): def _render(self): return "//non sense comment\n" + super()._render() # A pre render extension. This hooks it into the "_render" routine. It will be # called before the root node gets rendered. As a result you should(!) even be # able to manipulate the whole tree (this is untested!), but at least to extract # information from it, process it and use it to generate header contents @register_pre_render def non_sense_pre_render(root): def count_nense_recursive(node): count = 0 if isinstance(node, non_sense_comment): count += 1 for c in node._children: count += count_nense_recursive(c) return count count = count_nense_recursive(root) return f"//the root tree contains {count} non sense comment(s)\n" # ============== # old school syntax cube1 = non_sense_comment()( red()( leftUp( cube(10) ) ) ) # access style syntax cube2 = cube(5).leftUp(3).red().non_sense_comment() (cube1 + cube2).save_as_scad() # This generates the following output: # # # //the root tree contains 2 non sense comment(s) # # union() { # //non sense comment # color(c = "red") { # translate(v = [0, 0, 1]) { # translate(v = [-1, 0, 0]) { # cube(size = 10); # } # } # } # //non sense comment # color(c = "red") { # translate(v = [0, 0, 1]) { # translate(v = [-1, 0, 0]) { # cube(size = 5); # } # } # } # } ================================================ FILE: solid2/examples/09-code-attach-extension.py ================================================ #! /usr/bin/env python from pathlib import Path from solid2 import cube, register_post_render # ============= # = Extension = # ============= # This is more or less the same as -- regular -- SolidPython does when it # writes a scad file. It appends the python source to the end of the *.scad # file. # # If you like this, you can simply import this extension that should do it. # # register the post_render extension using the decorator. This hooks it into # the "_render" routine. It will be called after the root gets rendered. It's # return string will be appended to the rendered string. @register_post_render def attach_code_post_render(_): #find the "root" file calling_file = None import __main__ # not called from a terminal? if hasattr(__main__, "__file__"): # extract filename and replace suffix calling_file = Path(__main__.__file__).absolute() else: return '' # no code available. Called from withing a python shell assert(calling_file.exists()) # read source file with calling_file.open("r") as f: code_str = f.read() # escape /* and */ because otherwise it would end this comment block which # we use to inject the solid code code_str = code_str.replace("/*", "/_*") code_str = code_str.replace("*/", "*_/") # return the string to be appended to the *.scad file return f'/* Generated from the following ExpSolid code:\n\n' +\ f'{code_str}*/' # ============= if __name__ == "__main__": c = cube(10) c.save_as_scad() ================================================ FILE: solid2/examples/10-customizer.py ================================================ #! /usr/bin/env python from solid2 import cube, text, translate, union, scad_render_to_file, scad_inline, \ CustomizerDropdownVariable, CustomizerSliderVariable #register all the custom variables you want to use objects = CustomizerDropdownVariable("objects", 4, [2, 4, 6]) side = CustomizerSliderVariable("side", 4) cube_pos = CustomizerSliderVariable("cube_pos", [5, 5, 5]) cube_size = CustomizerSliderVariable("cube_size", 5) customizedText = CustomizerDropdownVariable("text", "customize me!", ["customize me!", "Thank you!"]) #use scad_inline to use them scene = union() scene += scad_inline(""" for (i = [1:objects]){ translate([2*i*side,0,0]){ cube(side); } } """) scene += translate(cube_pos) ( cube(cube_size * 2)) scene += translate([0, -20, 0]) ( text(str(customizedText))) scad_render_to_file(scene) ================================================ FILE: solid2/examples/11-font/LICENSE_README ================================================ RichEatin.otf is from: https://fontlibrary.org/en/font/rich-eatin Author: Cos Ryan License: CC BY https://creativecommons.org/licenses/by/3.0/ Thanks! ================================================ FILE: solid2/examples/11-fonts.x.py ================================================ #! /usr/bin/env python from solid2 import text, register_font, set_global_viewport_translation register_font("11-font/RichEatin.otf") set_global_viewport_translation([700, 900, 200]) text(font="Rich Eatin'", text="blablub").save_as_scad() ================================================ FILE: solid2/examples/12-animation.py ================================================ #! /usr/bin/env python from solid2 import cube, scad_render_to_file, \ set_global_viewport_translation, \ set_global_viewport_rotation, \ set_global_viewport_distance, \ CustomizerSliderVariable, \ get_animation_time rotation_speed = CustomizerSliderVariable("rotation_speed", 1.0) set_global_viewport_translation([4, 3, 15]) set_global_viewport_rotation([60, 0, rotation_speed * get_animation_time() * 360]) set_global_viewport_distance(100) c = cube(get_animation_time() * 10) scad_render_to_file(c) ================================================ FILE: solid2/examples/13-animated-bouncing-ball.py ================================================ #! /usr/bin/env python from solid2 import sphere, cube, translate, background, \ scad_inline, scad_render_to_file, \ set_global_viewport_translation, \ set_global_viewport_rotation, \ set_global_viewport_distance, \ set_global_variable #set steps in OpenSCAD to 1000 ball_radius = 100 class Vector3: def __init__(self, x=0.0, y=0.0, z=0.0): self.x = x self.y = y self.z = z def __add__(self, other): return Vector3(self.x + other.x, self.y + other.y, self.z + other.z) def __mul__(self, factor): return Vector3(self.x * factor, self.y * factor, self.z * factor) def tolist(self): return [self.x, self.y, self.z] #this is our little physics engine def get_bouncing_ball_data(pos=Vector3(), vel=Vector3(5.0, 5.0, 200.0)): data = [] gravity = Vector3(0.0, 0.0, -8.0) for _ in range(1000): vel = (vel + gravity) * 0.995 pos += vel if pos.z < ball_radius: vel.z = vel.z * -1 pos.z = ball_radius data.append(pos.tolist()) return data set_global_viewport_translation([700, 900, 200]) set_global_viewport_rotation([80, 0, 20]) set_global_viewport_distance(6000) #store pre computed data in global OpenSCAD variable set_global_variable("bouncing_ball_data", get_bouncing_ball_data()) #get "dynamic ball position over time" from the data set ball_pos_over_time = scad_inline("bouncing_ball_data[$t * 1000]") #do some regular solid stuff with it ball = translate(ball_pos_over_time)(sphere(ball_radius)) floor = background(cube([2000, 2000, 0.01])) #render it with the pre computed data stored in the header scad_render_to_file(ball + floor) # I think if you really want to do something like this you could put the data # into a seprate .scad file and include it into the main .scad file. You should # also be able inject OpenSCAD functions (or modules) and use them... # # No clue what this could be good for, but....... I guess it might be possible # to plug a -- more complex :-p -- physics engine into it and render animated # movies.... # # ....and print them with a 4d printer....?!? ================================================ FILE: solid2/examples/14-implicitCAD.x.py ================================================ #! /usr/bin/env python # run extopenscad with -r 2 to get proper results: # extopenscad -r 2 examples/14-implicitCAD.escad # this is the same example as 06-functions.py but with nice smooth implicitCAD # roundings.... # this is how you activate the "implicit mode" of ExpSolid # I couldn't figure out a nicer way to set a parameter which can be accessed # during the import routine of exp_solid # # alternatively you can call the whole script with the --implicit parameter: # python3 examples/14-implicitCAD.py --implicit import sys sys.argv.append("--implicit") from solid2 import cylinder, cube, difference, union def wheel(): return cylinder(r=35, h=15, center=True).rotate(0, 90, 0) def axle(): a = cylinder(r=10, h=130, center=True).\ rotate(0, 90, 0) w1 = wheel().left(67) w2 = wheel().right(67) return w1 + w2 + a def torso(): bottom = cube(100, 250, 50, center=True, r=10) top = cube(80, 100, 60, center=True, r=10) window_cube = cube(200, 55 ,50, center=True, r=10).down(10) top = difference(r=10) ( # type: ignore top, (union(r=10) (window_cube, window_cube.rotate(0, 0, 90))) # type: ignore ) return union(r=10)(bottom, top.up(50)) # type: ignore def car(): t = torso() front_axle = axle().down(20).back(80) rear_axle = front_axle.forward(160) return union(r=3)(t, front_axle, rear_axle) # type: ignore car().save_as_scad() ================================================ FILE: solid2/examples/15-implicitCAD2.x.py ================================================ #! /usr/bin/env python import sys sys.argv.append("--implicit") from solid2 import square, circle, cylinder, \ union, difference, \ translate, linear_extrude, rotate_extrude,\ scad_inline_parameter_func, shell # type: ignore #these are the Implicit examples from https://www.implicitcad.org/examples def ex1(): return linear_extrude (height = 30, twist = 180, r=2) ( # type: ignore union (r=2) ( # type: ignore square(x=[-2,2], y=[-10,10], r=2), square(x=[-10,10], y=[-2,2], r=2), ) ) def ex2(): #function parameter are a little tricky, but they do work like this: twist_func = scad_inline_parameter_func("twist(h) = 90*cos(h*2*pi/40)") return linear_extrude (height = 40, twist = twist_func) ( # type: ignore difference () ( shell(2) (circle (10)), square(x=[0,20], y=[-4,4]), ) ).rotate(0, 0, 90).left(50) def ex3(): return union() ( cylinder(r=19, h=10, _fn=6, center=True), cylinder(r=10, h=40), rotate_extrude(4*360, translate=[0,38]) ( # type: ignore translate ([10,0])( square([8,4], center=True)) ), ).right(50) def ex4(): height_func = scad_inline_parameter_func("height(x, y) = 10 + 5*cos(x) + 5*cos(y)") return linear_extrude(height = height_func) (circle(10)).left(100) # type: ignore def ex5(): twist_func = scad_inline_parameter_func("twist(h) = 35*cos(h*2*pi/60)") return linear_extrude (height = 40, twist = twist_func) ( # type: ignore union ( r = 8) ( # type: ignore circle (10), translate ([22,0]) (circle (10)), translate ([0,22]) (circle (10)), translate ([-22,0]) (circle (10)), translate ([0,-22]) (circle (10)), ) ).right(130) (ex1() + ex2() + ex3() + ex4() + ex5()).save_as_scad() ================================================ FILE: solid2/examples/16-mazebox-bosl2.py ================================================ #! /usr/bin/env python # this is a basic "a mazing box" (mazebox), just tried to reimplement it with # bosl2. It's based on https://www.thingiverse.com/thing:1481 from math import pi, cos from solid2.extensions.bosl2 import zcyl, zrot, tube, surface, projection, \ cylindrical_extrude def mazebox(): #the maze is 64x90 pixel maze_surface = surface(file="maze7.png", center=True, invert=True) maze_projection = projection(cut=True) (maze_surface.up(10)) #make the radius of the cylinder 3 times the maze width r = (64 * 3) / (2*pi) maze_mask = [] segs = 10 #number of segments to get a "rounded" maze path for i in range(segs): maze_offset = maze_projection.offset(-1+cos(i/segs * pi /2)) maze_mask += cylindrical_extrude(_or=r-(2*i/segs), ir=r-(2*(i+1)/segs)) (maze_offset) full_maze_mask = maze_mask + zrot(360/3)(maze_mask) + zrot(2*360/3)(maze_mask) maze_tube = tube(_or=r-0.2, ir=r-2.2, h=88, center=True) maze_tube_head = zcyl(r=r+5, h=10).down(40) return maze_tube + maze_tube_head - full_maze_mask mazebox().save_as_scad() ================================================ FILE: solid2/examples/17-greedy-scad-interface.py ================================================ #! /usr/bin/env python from solid2 import cube, sphere, color, ScadValue, translate, \ openscad_functions, \ set_global_fn, \ set_global_viewport_distance, \ set_global_viewport_translation, \ set_global_viewport_rotation, \ set_global_viewport_fov, \ get_animation_time, \ CustomizerSliderVariable, \ CustomizerDropdownVariable set_global_fn(32) set_global_viewport_distance(abs(openscad_functions.sin(get_animation_time() * 360)) * 10 + 5) set_global_viewport_translation([0, -1, 0]) set_global_viewport_rotation([63, 0, get_animation_time() * 360]) set_global_viewport_fov(25) def funny_cube(): customized_color = CustomizerDropdownVariable(name = "cube_color", default_value = "blue", options = ["red", "green", "blue"], label = "The color of the cube", tab="Colors") customized_animation_factor = CustomizerSliderVariable(name = "anim_factor", default_value = 1, min_ = 1, # type: ignore max_ = 10, # type: ignore step = 0.5, # type: ignore label = "Animation speed factor", tab = "Animation") return color(customized_color) ( # type: ignore cube(abs(openscad_functions.sin(get_animation_time() * 360 * customized_animation_factor)), center=True) ) def funny_sphere(): customized_color = ScadValue("cube_color") customized_animation_factor = ScadValue("anim_factor") return translate([0, -2, 0]) ( color(customized_color) ( # type: ignore sphere(r = abs(openscad_functions.sin(get_animation_time() * 360 * customized_animation_factor - 90))) # type: ignore ) ) def do_nots(): customized_color = ScadValue("cube_color") customized_animation_factor = ScadValue("anim_factor") #if customized_color == "blue": # print("This causes a python runtime error!") #for i in range(customized_animation_factor): # print("This causes a python runtime error!") #f = 1.0 #f *= customized_animation_factor #for i in range(f): # print("This causes a python runtime error! (and this is why it is called greedy)") (funny_cube() + funny_sphere()).save_as_scad() ================================================ FILE: solid2/examples/18-scad-control-structures.py ================================================ from solid2 import CustomizerDropdownVariable, \ CustomizerSliderVariable, \ cube, scad_range, scad_for, scad_if number_of_cubes = CustomizerSliderVariable("number_of_cubes", 7) alt_color = CustomizerDropdownVariable("alt_color", "red", ["red", "blue", "green"]) def f_loop(i): c = scad_if(i % 2 == 0, cube(), cube().color(alt_color)) return c.up(i*2) scad_for(scad_range(0, number_of_cubes), f_loop).save_as_scad() ================================================ FILE: solid2/extensions/__init__.py ================================================ ================================================ FILE: solid2/extensions/bosl2/__init__.py ================================================ from ...config import config as _config if _config.use_implicit_builtins: raise Exception("ExpSolid: unfortunately ImplicitCAD can't handle bosl2...") from .std import * from .bosl2_patches import __nothing__ ================================================ FILE: solid2/extensions/bosl2/affine.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/affine.scad'}", False) class affine2d_identity(_Bosl2Base): def __init__(self, **kwargs): super().__init__("affine2d_identity", {**kwargs}) class affine2d_translate(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("affine2d_translate", {"v" : v, **kwargs}) class affine2d_scale(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("affine2d_scale", {"v" : v, **kwargs}) class affine2d_zrot(_Bosl2Base): def __init__(self, ang=None, **kwargs): super().__init__("affine2d_zrot", {"ang" : ang, **kwargs}) class affine2d_mirror(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("affine2d_mirror", {"v" : v, **kwargs}) class affine2d_skew(_Bosl2Base): def __init__(self, xa=None, ya=None, **kwargs): super().__init__("affine2d_skew", {"xa" : xa, "ya" : ya, **kwargs}) class affine3d_identity(_Bosl2Base): def __init__(self, **kwargs): super().__init__("affine3d_identity", {**kwargs}) class affine3d_translate(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("affine3d_translate", {"v" : v, **kwargs}) class affine3d_scale(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("affine3d_scale", {"v" : v, **kwargs}) class affine3d_xrot(_Bosl2Base): def __init__(self, ang=None, **kwargs): super().__init__("affine3d_xrot", {"ang" : ang, **kwargs}) class affine3d_yrot(_Bosl2Base): def __init__(self, ang=None, **kwargs): super().__init__("affine3d_yrot", {"ang" : ang, **kwargs}) class affine3d_zrot(_Bosl2Base): def __init__(self, ang=None, **kwargs): super().__init__("affine3d_zrot", {"ang" : ang, **kwargs}) class affine3d_rot_by_axis(_Bosl2Base): def __init__(self, u=None, ang=None, **kwargs): super().__init__("affine3d_rot_by_axis", {"u" : u, "ang" : ang, **kwargs}) class affine3d_rot_from_to(_Bosl2Base): def __init__(self, _from=None, to=None, **kwargs): super().__init__("affine3d_rot_from_to", {"_from" : _from, "to" : to, **kwargs}) class affine3d_mirror(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("affine3d_mirror", {"v" : v, **kwargs}) class affine3d_skew(_Bosl2Base): def __init__(self, sxy=None, sxz=None, syx=None, syz=None, szx=None, szy=None, **kwargs): super().__init__("affine3d_skew", {"sxy" : sxy, "sxz" : sxz, "syx" : syx, "syz" : syz, "szx" : szx, "szy" : szy, **kwargs}) class affine3d_skew_xy(_Bosl2Base): def __init__(self, xa=None, ya=None, **kwargs): super().__init__("affine3d_skew_xy", {"xa" : xa, "ya" : ya, **kwargs}) class affine3d_skew_xz(_Bosl2Base): def __init__(self, xa=None, za=None, **kwargs): super().__init__("affine3d_skew_xz", {"xa" : xa, "za" : za, **kwargs}) class affine3d_skew_yz(_Bosl2Base): def __init__(self, ya=None, za=None, **kwargs): super().__init__("affine3d_skew_yz", {"ya" : ya, "za" : za, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/attachments.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/attachments.scad'}", False) _tags = _OpenSCADConstant('_tags') _tag = _OpenSCADConstant('_tag') _save_tag = _OpenSCADConstant('_save_tag') _tag_prefix = _OpenSCADConstant('_tag_prefix') _overlap = _OpenSCADConstant('_overlap') _color = _OpenSCADConstant('_color') _save_color = _OpenSCADConstant('_save_color') _anchor_override = _OpenSCADConstant('_anchor_override') _attach_to = _OpenSCADConstant('_attach_to') _attach_anchor = _OpenSCADConstant('_attach_anchor') _attach_alignment = _OpenSCADConstant('_attach_alignment') _parent_anchor = _OpenSCADConstant('_parent_anchor') _parent_spin = _OpenSCADConstant('_parent_spin') _parent_orient = _OpenSCADConstant('_parent_orient') _parent_size = _OpenSCADConstant('_parent_size') _parent_geom = _OpenSCADConstant('_parent_geom') _attach_inside = _OpenSCADConstant('_attach_inside') _edge_angle = _OpenSCADConstant('_edge_angle') _edge_length = _OpenSCADConstant('_edge_length') _tags_shown = _OpenSCADConstant('_tags_shown') _tags_hidden = _OpenSCADConstant('_tags_hidden') _ghost_this = _OpenSCADConstant('_ghost_this') _ghost = _OpenSCADConstant('_ghost') _ghosting = _OpenSCADConstant('_ghosting') _highlight_this = _OpenSCADConstant('_highlight_this') _highlight = _OpenSCADConstant('_highlight') _ANCHOR_TYPES = _OpenSCADConstant('_ANCHOR_TYPES') EDGES_NONE = _OpenSCADConstant('EDGES_NONE') EDGES_ALL = _OpenSCADConstant('EDGES_ALL') EDGE_OFFSETS = _OpenSCADConstant('EDGE_OFFSETS') CORNERS_NONE = _OpenSCADConstant('CORNERS_NONE') CORNERS_ALL = _OpenSCADConstant('CORNERS_ALL') CORNER_OFFSETS = _OpenSCADConstant('CORNER_OFFSETS') class _quant_anch(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("_quant_anch", {"x" : x, **kwargs}) class _make_anchor_legal(_Bosl2Base): def __init__(self, anchor=None, geom=None, **kwargs): super().__init__("_make_anchor_legal", {"anchor" : anchor, "geom" : geom, **kwargs}) class _is_geometry(_Bosl2Base): def __init__(self, entry=None, **kwargs): super().__init__("_is_geometry", {"entry" : entry, **kwargs}) class reorient(_Bosl2Base): def __init__(self, anchor=None, spin=None, orient=None, size=None, size2=None, shift=None, r=None, r1=None, r2=None, d=None, d1=None, d2=None, l=None, h=None, vnf=None, path=None, region=None, extent=None, offset=None, cp=None, anchors=None, two_d=None, axis=None, override=None, geom=None, p=None, **kwargs): super().__init__("reorient", {"anchor" : anchor, "spin" : spin, "orient" : orient, "size" : size, "size2" : size2, "shift" : shift, "r" : r, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "l" : l, "h" : h, "vnf" : vnf, "path" : path, "region" : region, "extent" : extent, "offset" : offset, "cp" : cp, "anchors" : anchors, "two_d" : two_d, "axis" : axis, "override" : override, "geom" : geom, "p" : p, **kwargs}) class named_anchor(_Bosl2Base): def __init__(self, name=None, pos=None, orient=None, spin=None, rot=None, flip=None, info=None, **kwargs): super().__init__("named_anchor", {"name" : name, "pos" : pos, "orient" : orient, "spin" : spin, "rot" : rot, "flip" : flip, "info" : info, **kwargs}) class attach_geom(_Bosl2Base): def __init__(self, size=None, size2=None, shift=None, scale=None, twist=None, r=None, r1=None, r2=None, d=None, d1=None, d2=None, l=None, h=None, vnf=None, region=None, extent=None, cp=None, offset=None, anchors=None, two_d=None, axis=None, override=None, **kwargs): super().__init__("attach_geom", {"size" : size, "size2" : size2, "shift" : shift, "scale" : scale, "twist" : twist, "r" : r, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "l" : l, "h" : h, "vnf" : vnf, "region" : region, "extent" : extent, "cp" : cp, "offset" : offset, "anchors" : anchors, "two_d" : two_d, "axis" : axis, "override" : override, **kwargs}) class define_part(_Bosl2Base): def __init__(self, name=None, geom=None, inside=None, T=None, **kwargs): super().__init__("define_part", {"name" : name, "geom" : geom, "inside" : inside, "T" : T, **kwargs}) class _attach_geom_2d(_Bosl2Base): def __init__(self, geom=None, **kwargs): super().__init__("_attach_geom_2d", {"geom" : geom, **kwargs}) class _attach_geom_size(_Bosl2Base): def __init__(self, geom=None, **kwargs): super().__init__("_attach_geom_size", {"geom" : geom, **kwargs}) class _attach_geom_edge_path(_Bosl2Base): def __init__(self, geom=None, edge=None, **kwargs): super().__init__("_attach_geom_edge_path", {"geom" : geom, "edge" : edge, **kwargs}) class _attach_transform(_Bosl2Base): def __init__(self, anchor=None, spin=None, orient=None, geom=None, p=None, **kwargs): super().__init__("_attach_transform", {"anchor" : anchor, "spin" : spin, "orient" : orient, "geom" : geom, "p" : p, **kwargs}) class _get_cp(_Bosl2Base): def __init__(self, geom=None, **kwargs): super().__init__("_get_cp", {"geom" : geom, **kwargs}) class _get_cp(_Bosl2Base): def __init__(self, geom=None, **kwargs): super().__init__("_get_cp", {"geom" : geom, **kwargs}) class _three_edge_corner_dir(_Bosl2Base): def __init__(self, facevecs=None, edges=None, **kwargs): super().__init__("_three_edge_corner_dir", {"facevecs" : facevecs, "edges" : edges, **kwargs}) class _find_anchor(_Bosl2Base): def __init__(self, anchor=None, geom=None, **kwargs): super().__init__("_find_anchor", {"anchor" : anchor, "geom" : geom, **kwargs}) class _is_shown(_Bosl2Base): def __init__(self, **kwargs): super().__init__("_is_shown", {**kwargs}) class _standard_anchors(_Bosl2Base): def __init__(self, two_d=None, **kwargs): super().__init__("_standard_anchors", {"two_d" : two_d, **kwargs}) class _edges_vec_txt(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("_edges_vec_txt", {"x" : x, **kwargs}) class _edges_text(_Bosl2Base): def __init__(self, edges=None, **kwargs): super().__init__("_edges_text", {"edges" : edges, **kwargs}) class _is_edge_array(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("_is_edge_array", {"x" : x, **kwargs}) class _edge_set(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("_edge_set", {"v" : v, **kwargs}) class _normalize_edges(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("_normalize_edges", {"v" : v, **kwargs}) class _edges(_Bosl2Base): def __init__(self, v=None, _except=None, **kwargs): super().__init__("_edges", {"v" : v, "_except" : _except, **kwargs}) class _is_corner_array(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("_is_corner_array", {"x" : x, **kwargs}) class _normalize_corners(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("_normalize_corners", {"v" : v, **kwargs}) class _corner_set(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("_corner_set", {"v" : v, **kwargs}) class _corners(_Bosl2Base): def __init__(self, v=None, _except=None, **kwargs): super().__init__("_corners", {"v" : v, "_except" : _except, **kwargs}) class _corner_edges(_Bosl2Base): def __init__(self, edges=None, v=None, **kwargs): super().__init__("_corner_edges", {"edges" : edges, "v" : v, **kwargs}) class _corner_edge_count(_Bosl2Base): def __init__(self, edges=None, v=None, **kwargs): super().__init__("_corner_edge_count", {"edges" : edges, "v" : v, **kwargs}) class _corners_text(_Bosl2Base): def __init__(self, corners=None, **kwargs): super().__init__("_corners_text", {"corners" : corners, **kwargs}) class _force_rot(_Bosl2Base): def __init__(self, T=None, **kwargs): super().__init__("_force_rot", {"T" : T, **kwargs}) class _local_struct_val(_Bosl2Base): def __init__(self, struct=None, key=None, **kwargs): super().__init__("_local_struct_val", {"struct" : struct, "key" : key, **kwargs}) class _force_anchor_2d(_Bosl2Base): def __init__(self, anchor=None, **kwargs): super().__init__("_force_anchor_2d", {"anchor" : anchor, **kwargs}) class _compute_spin(_Bosl2Base): def __init__(self, anchor_dir=None, spin_dir=None, **kwargs): super().__init__("_compute_spin", {"anchor_dir" : anchor_dir, "spin_dir" : spin_dir, **kwargs}) class _canonical_edge(_Bosl2Base): def __init__(self, edge=None, **kwargs): super().__init__("_canonical_edge", {"edge" : edge, **kwargs}) class parent(_Bosl2Base): def __init__(self, **kwargs): super().__init__("parent", {**kwargs}) class parent_part(_Bosl2Base): def __init__(self, name=None, **kwargs): super().__init__("parent_part", {"name" : name, **kwargs}) class desc_point(_Bosl2Base): def __init__(self, desc=None, p=None, anchor=None, **kwargs): super().__init__("desc_point", {"desc" : desc, "p" : p, "anchor" : anchor, **kwargs}) class desc_dir(_Bosl2Base): def __init__(self, desc=None, dir=None, anchor=None, **kwargs): super().__init__("desc_dir", {"desc" : desc, "dir" : dir, "anchor" : anchor, **kwargs}) class desc_attach(_Bosl2Base): def __init__(self, desc=None, anchor=None, p=None, reverse=None, **kwargs): super().__init__("desc_attach", {"desc" : desc, "anchor" : anchor, "p" : p, "reverse" : reverse, **kwargs}) class desc_dist(_Bosl2Base): def __init__(self, desc1=None, anchor1=None, desc2=None, anchor2=None, **kwargs): super().__init__("desc_dist", {"desc1" : desc1, "anchor1" : anchor1, "desc2" : desc2, "anchor2" : anchor2, **kwargs}) class transform_desc(_Bosl2Base): def __init__(self, T=None, desc=None, **kwargs): super().__init__("transform_desc", {"T" : T, "desc" : desc, **kwargs}) class is_description(_Bosl2Base): def __init__(self, desc=None, **kwargs): super().__init__("is_description", {"desc" : desc, **kwargs}) class position(_Bosl2Base): def __init__(self, at=None, _from=None, **kwargs): super().__init__("position", {"at" : at, "_from" : _from, **kwargs}) class orient(_Bosl2Base): def __init__(self, anchor=None, spin=None, **kwargs): super().__init__("orient", {"anchor" : anchor, "spin" : spin, **kwargs}) class align(_Bosl2Base): def __init__(self, anchor=None, align=None, inside=None, inset=None, shiftout=None, overlap=None, **kwargs): super().__init__("align", {"anchor" : anchor, "align" : align, "inside" : inside, "inset" : inset, "shiftout" : shiftout, "overlap" : overlap, **kwargs}) class attach(_Bosl2Base): def __init__(self, parent=None, child=None, overlap=None, align=None, spin=None, norot=None, inset=None, shiftout=None, inside=None, _from=None, to=None, **kwargs): super().__init__("attach", {"parent" : parent, "child" : child, "overlap" : overlap, "align" : align, "spin" : spin, "norot" : norot, "inset" : inset, "shiftout" : shiftout, "inside" : inside, "_from" : _from, "to" : to, **kwargs}) class attach_part(_Bosl2Base): def __init__(self, name=None, **kwargs): super().__init__("attach_part", {"name" : name, **kwargs}) class tag(_Bosl2Base): def __init__(self, tag=None, **kwargs): super().__init__("tag", {"tag" : tag, **kwargs}) class tag_this(_Bosl2Base): def __init__(self, tag=None, **kwargs): super().__init__("tag_this", {"tag" : tag, **kwargs}) class force_tag(_Bosl2Base): def __init__(self, tag=None, **kwargs): super().__init__("force_tag", {"tag" : tag, **kwargs}) class default_tag(_Bosl2Base): def __init__(self, tag=None, do_tag=None, **kwargs): super().__init__("default_tag", {"tag" : tag, "do_tag" : do_tag, **kwargs}) class tag_scope(_Bosl2Base): def __init__(self, scope=None, **kwargs): super().__init__("tag_scope", {"scope" : scope, **kwargs}) class diff(_Bosl2Base): def __init__(self, remove=None, keep=None, **kwargs): super().__init__("diff", {"remove" : remove, "keep" : keep, **kwargs}) class tag_diff(_Bosl2Base): def __init__(self, tag=None, remove=None, keep=None, **kwargs): super().__init__("tag_diff", {"tag" : tag, "remove" : remove, "keep" : keep, **kwargs}) class intersect(_Bosl2Base): def __init__(self, intersect=None, keep=None, **kwargs): super().__init__("intersect", {"intersect" : intersect, "keep" : keep, **kwargs}) class tag_intersect(_Bosl2Base): def __init__(self, tag=None, intersect=None, keep=None, **kwargs): super().__init__("tag_intersect", {"tag" : tag, "intersect" : intersect, "keep" : keep, **kwargs}) class conv_hull(_Bosl2Base): def __init__(self, keep=None, **kwargs): super().__init__("conv_hull", {"keep" : keep, **kwargs}) class tag_conv_hull(_Bosl2Base): def __init__(self, tag=None, keep=None, **kwargs): super().__init__("tag_conv_hull", {"tag" : tag, "keep" : keep, **kwargs}) class hide(_Bosl2Base): def __init__(self, tags=None, **kwargs): super().__init__("hide", {"tags" : tags, **kwargs}) class hide_this(_Bosl2Base): def __init__(self, **kwargs): super().__init__("hide_this", {**kwargs}) class show_only(_Bosl2Base): def __init__(self, tags=None, **kwargs): super().__init__("show_only", {"tags" : tags, **kwargs}) class show_all(_Bosl2Base): def __init__(self, **kwargs): super().__init__("show_all", {**kwargs}) class show_int(_Bosl2Base): def __init__(self, tags=None, **kwargs): super().__init__("show_int", {"tags" : tags, **kwargs}) class face_mask(_Bosl2Base): def __init__(self, faces=None, **kwargs): super().__init__("face_mask", {"faces" : faces, **kwargs}) class edge_mask(_Bosl2Base): def __init__(self, edges=None, _except=None, **kwargs): super().__init__("edge_mask", {"edges" : edges, "_except" : _except, **kwargs}) class corner_mask(_Bosl2Base): def __init__(self, corners=None, _except=None, **kwargs): super().__init__("corner_mask", {"corners" : corners, "_except" : _except, **kwargs}) class face_profile(_Bosl2Base): def __init__(self, faces=None, r=None, d=None, excess=None, convexity=None, **kwargs): super().__init__("face_profile", {"faces" : faces, "r" : r, "d" : d, "excess" : excess, "convexity" : convexity, **kwargs}) class edge_profile(_Bosl2Base): def __init__(self, edges=None, _except=None, excess=None, convexity=None, **kwargs): super().__init__("edge_profile", {"edges" : edges, "_except" : _except, "excess" : excess, "convexity" : convexity, **kwargs}) class edge_profile_asym(_Bosl2Base): def __init__(self, edges=None, _except=None, excess=None, convexity=None, flip=None, corner_type=None, size=None, **kwargs): super().__init__("edge_profile_asym", {"edges" : edges, "_except" : _except, "excess" : excess, "convexity" : convexity, "flip" : flip, "corner_type" : corner_type, "size" : size, **kwargs}) class corner_profile(_Bosl2Base): def __init__(self, corners=None, _except=None, r=None, d=None, convexity=None, **kwargs): super().__init__("corner_profile", {"corners" : corners, "_except" : _except, "r" : r, "d" : d, "convexity" : convexity, **kwargs}) class attachable(_Bosl2Base): def __init__(self, anchor=None, spin=None, orient=None, size=None, size2=None, shift=None, r=None, r1=None, r2=None, d=None, d1=None, d2=None, l=None, h=None, vnf=None, path=None, region=None, extent=None, cp=None, offset=None, anchors=None, two_d=None, axis=None, override=None, geom=None, parts=None, expose_tags=None, keep_color=None, **kwargs): super().__init__("attachable", {"anchor" : anchor, "spin" : spin, "orient" : orient, "size" : size, "size2" : size2, "shift" : shift, "r" : r, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "l" : l, "h" : h, "vnf" : vnf, "path" : path, "region" : region, "extent" : extent, "cp" : cp, "offset" : offset, "anchors" : anchors, "two_d" : two_d, "axis" : axis, "override" : override, "geom" : geom, "parts" : parts, "expose_tags" : expose_tags, "keep_color" : keep_color, **kwargs}) class _show_highlight(_Bosl2Base): def __init__(self, **kwargs): super().__init__("_show_highlight", {**kwargs}) class _show_ghost(_Bosl2Base): def __init__(self, **kwargs): super().__init__("_show_ghost", {**kwargs}) class show_anchors(_Bosl2Base): def __init__(self, s=None, std=None, custom=None, **kwargs): super().__init__("show_anchors", {"s" : s, "std" : std, "custom" : custom, **kwargs}) class anchor_arrow(_Bosl2Base): def __init__(self, s=None, color=None, flag=None, _tag=None, _fn=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("anchor_arrow", {"s" : s, "color" : color, "flag" : flag, "_tag" : _tag, "_fn" : _fn, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class anchor_arrow2d(_Bosl2Base): def __init__(self, s=None, color=None, _tag=None, **kwargs): super().__init__("anchor_arrow2d", {"s" : s, "color" : color, "_tag" : _tag, **kwargs}) class expose_anchors(_Bosl2Base): def __init__(self, opacity=None, **kwargs): super().__init__("expose_anchors", {"opacity" : opacity, **kwargs}) class show_transform_list(_Bosl2Base): def __init__(self, tlist=None, s=None, **kwargs): super().__init__("show_transform_list", {"tlist" : tlist, "s" : s, **kwargs}) class generic_airplane(_Bosl2Base): def __init__(self, s=None, **kwargs): super().__init__("generic_airplane", {"s" : s, **kwargs}) class frame_ref(_Bosl2Base): def __init__(self, s=None, opacity=None, **kwargs): super().__init__("frame_ref", {"s" : s, "opacity" : opacity, **kwargs}) class _edges_text3d(_Bosl2Base): def __init__(self, txt=None, size=None, **kwargs): super().__init__("_edges_text3d", {"txt" : txt, "size" : size, **kwargs}) class _show_edges(_Bosl2Base): def __init__(self, edges=None, size=None, text=None, txtsize=None, toplabel=None, **kwargs): super().__init__("_show_edges", {"edges" : edges, "size" : size, "text" : text, "txtsize" : txtsize, "toplabel" : toplabel, **kwargs}) class _show_corners(_Bosl2Base): def __init__(self, corners=None, size=None, text=None, txtsize=None, toplabel=None, **kwargs): super().__init__("_show_corners", {"corners" : corners, "size" : size, "text" : text, "txtsize" : txtsize, "toplabel" : toplabel, **kwargs}) class _show_cube_faces(_Bosl2Base): def __init__(self, faces=None, size=None, toplabel=None, botlabel=None, **kwargs): super().__init__("_show_cube_faces", {"faces" : faces, "size" : size, "toplabel" : toplabel, "botlabel" : botlabel, **kwargs}) class restore(_Bosl2Base): def __init__(self, desc=None, **kwargs): super().__init__("restore", {"desc" : desc, **kwargs}) class desc_copies(_Bosl2Base): def __init__(self, transforms=None, **kwargs): super().__init__("desc_copies", {"transforms" : transforms, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/ball_bearings.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/ball_bearings.scad'}", False) class ball_bearing_info(_Bosl2Base): def __init__(self, trade_size=None, **kwargs): super().__init__("ball_bearing_info", {"trade_size" : trade_size, **kwargs}) class ball_bearing(_Bosl2Base): def __init__(self, trade_size=None, id=None, od=None, width=None, shield=None, flange=None, fd=None, fw=None, rounding=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("ball_bearing", {"trade_size" : trade_size, "id" : id, "od" : od, "width" : width, "shield" : shield, "flange" : flange, "fd" : fd, "fw" : fw, "rounding" : rounding, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/beziers.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/beziers.scad'}", False) _bezier_matrix_table = _OpenSCADConstant('_bezier_matrix_table') class bezier_points(_Bosl2Base): def __init__(self, curve=None, u=None, **kwargs): super().__init__("bezier_points", {"curve" : curve, "u" : u, **kwargs}) class _signed_pascals_triangle(_Bosl2Base): def __init__(self, N=None, tri=None, **kwargs): super().__init__("_signed_pascals_triangle", {"N" : N, "tri" : tri, **kwargs}) class _compute_bezier_matrix(_Bosl2Base): def __init__(self, N=None, **kwargs): super().__init__("_compute_bezier_matrix", {"N" : N, **kwargs}) class _bezier_matrix(_Bosl2Base): def __init__(self, N=None, **kwargs): super().__init__("_bezier_matrix", {"N" : N, **kwargs}) class bezier_curve(_Bosl2Base): def __init__(self, bezier=None, splinesteps=None, endpoint=None, **kwargs): super().__init__("bezier_curve", {"bezier" : bezier, "splinesteps" : splinesteps, "endpoint" : endpoint, **kwargs}) class bezier_derivative(_Bosl2Base): def __init__(self, bezier=None, u=None, order=None, **kwargs): super().__init__("bezier_derivative", {"bezier" : bezier, "u" : u, "order" : order, **kwargs}) class bezier_tangent(_Bosl2Base): def __init__(self, bezier=None, u=None, **kwargs): super().__init__("bezier_tangent", {"bezier" : bezier, "u" : u, **kwargs}) class bezier_curvature(_Bosl2Base): def __init__(self, bezier=None, u=None, **kwargs): super().__init__("bezier_curvature", {"bezier" : bezier, "u" : u, **kwargs}) class bezier_closest_point(_Bosl2Base): def __init__(self, bezier=None, pt=None, max_err=None, u=None, end_u=None, **kwargs): super().__init__("bezier_closest_point", {"bezier" : bezier, "pt" : pt, "max_err" : max_err, "u" : u, "end_u" : end_u, **kwargs}) class bezier_length(_Bosl2Base): def __init__(self, bezier=None, start_u=None, end_u=None, max_deflect=None, **kwargs): super().__init__("bezier_length", {"bezier" : bezier, "start_u" : start_u, "end_u" : end_u, "max_deflect" : max_deflect, **kwargs}) class bezier_line_intersection(_Bosl2Base): def __init__(self, bezier=None, line=None, **kwargs): super().__init__("bezier_line_intersection", {"bezier" : bezier, "line" : line, **kwargs}) class bezpath_points(_Bosl2Base): def __init__(self, bezpath=None, curveind=None, u=None, N=None, **kwargs): super().__init__("bezpath_points", {"bezpath" : bezpath, "curveind" : curveind, "u" : u, "N" : N, **kwargs}) class bezpath_curve(_Bosl2Base): def __init__(self, bezpath=None, splinesteps=None, N=None, endpoint=None, **kwargs): super().__init__("bezpath_curve", {"bezpath" : bezpath, "splinesteps" : splinesteps, "N" : N, "endpoint" : endpoint, **kwargs}) class bezpath_closest_point(_Bosl2Base): def __init__(self, bezpath=None, pt=None, N=None, max_err=None, seg=None, min_seg=None, min_u=None, min_dist=None, **kwargs): super().__init__("bezpath_closest_point", {"bezpath" : bezpath, "pt" : pt, "N" : N, "max_err" : max_err, "seg" : seg, "min_seg" : min_seg, "min_u" : min_u, "min_dist" : min_dist, **kwargs}) class bezpath_length(_Bosl2Base): def __init__(self, bezpath=None, N=None, max_deflect=None, **kwargs): super().__init__("bezpath_length", {"bezpath" : bezpath, "N" : N, "max_deflect" : max_deflect, **kwargs}) class path_to_bezpath(_Bosl2Base): def __init__(self, path=None, closed=None, tangents=None, uniform=None, size=None, relsize=None, **kwargs): super().__init__("path_to_bezpath", {"path" : path, "closed" : closed, "tangents" : tangents, "uniform" : uniform, "size" : size, "relsize" : relsize, **kwargs}) class path_to_bezcornerpath(_Bosl2Base): def __init__(self, path=None, closed=None, size=None, relsize=None, **kwargs): super().__init__("path_to_bezcornerpath", {"path" : path, "closed" : closed, "size" : size, "relsize" : relsize, **kwargs}) class _bez_path_corner(_Bosl2Base): def __init__(self, p=None, curvesize=None, relative=None, mincurvesize=None, **kwargs): super().__init__("_bez_path_corner", {"p" : p, "curvesize" : curvesize, "relative" : relative, "mincurvesize" : mincurvesize, **kwargs}) class bezpath_close_to_axis(_Bosl2Base): def __init__(self, bezpath=None, axis=None, N=None, **kwargs): super().__init__("bezpath_close_to_axis", {"bezpath" : bezpath, "axis" : axis, "N" : N, **kwargs}) class bezpath_offset(_Bosl2Base): def __init__(self, offset=None, bezier=None, N=None, **kwargs): super().__init__("bezpath_offset", {"offset" : offset, "bezier" : bezier, "N" : N, **kwargs}) class bez_begin(_Bosl2Base): def __init__(self, pt=None, a=None, r=None, p=None, **kwargs): super().__init__("bez_begin", {"pt" : pt, "a" : a, "r" : r, "p" : p, **kwargs}) class bez_tang(_Bosl2Base): def __init__(self, pt=None, a=None, r1=None, r2=None, p=None, **kwargs): super().__init__("bez_tang", {"pt" : pt, "a" : a, "r1" : r1, "r2" : r2, "p" : p, **kwargs}) class bez_joint(_Bosl2Base): def __init__(self, pt=None, a1=None, a2=None, r1=None, r2=None, p1=None, p2=None, **kwargs): super().__init__("bez_joint", {"pt" : pt, "a1" : a1, "a2" : a2, "r1" : r1, "r2" : r2, "p1" : p1, "p2" : p2, **kwargs}) class bez_end(_Bosl2Base): def __init__(self, pt=None, a=None, r=None, p=None, **kwargs): super().__init__("bez_end", {"pt" : pt, "a" : a, "r" : r, "p" : p, **kwargs}) class is_bezier_patch(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("is_bezier_patch", {"x" : x, **kwargs}) class bezier_patch_flat(_Bosl2Base): def __init__(self, size=None, N=None, spin=None, orient=None, trans=None, **kwargs): super().__init__("bezier_patch_flat", {"size" : size, "N" : N, "spin" : spin, "orient" : orient, "trans" : trans, **kwargs}) class bezier_patch_reverse(_Bosl2Base): def __init__(self, patch=None, **kwargs): super().__init__("bezier_patch_reverse", {"patch" : patch, **kwargs}) class bezier_patch_points(_Bosl2Base): def __init__(self, patch=None, u=None, v=None, **kwargs): super().__init__("bezier_patch_points", {"patch" : patch, "u" : u, "v" : v, **kwargs}) class _bezier_rectangle(_Bosl2Base): def __init__(self, patch=None, splinesteps=None, style=None, **kwargs): super().__init__("_bezier_rectangle", {"patch" : patch, "splinesteps" : splinesteps, "style" : style, **kwargs}) class bezier_vnf(_Bosl2Base): def __init__(self, patches=None, splinesteps=None, style=None, **kwargs): super().__init__("bezier_vnf", {"patches" : patches, "splinesteps" : splinesteps, "style" : style, **kwargs}) class bezier_vnf_degenerate_patch(_Bosl2Base): def __init__(self, patch=None, splinesteps=None, reverse=None, return_edges=None, **kwargs): super().__init__("bezier_vnf_degenerate_patch", {"patch" : patch, "splinesteps" : splinesteps, "reverse" : reverse, "return_edges" : return_edges, **kwargs}) class bezier_patch_normals(_Bosl2Base): def __init__(self, patch=None, u=None, v=None, **kwargs): super().__init__("bezier_patch_normals", {"patch" : patch, "u" : u, "v" : v, **kwargs}) class bezier_sheet(_Bosl2Base): def __init__(self, patch=None, delta=None, splinesteps=None, style=None, thickness=None, **kwargs): super().__init__("bezier_sheet", {"patch" : patch, "delta" : delta, "splinesteps" : splinesteps, "style" : style, "thickness" : thickness, **kwargs}) class debug_bezier(_Bosl2Base): def __init__(self, bezpath=None, width=None, N=None, **kwargs): super().__init__("debug_bezier", {"bezpath" : bezpath, "width" : width, "N" : N, **kwargs}) class debug_bezier_patches(_Bosl2Base): def __init__(self, patches=None, size=None, splinesteps=None, showcps=None, showdots=None, showpatch=None, convexity=None, style=None, **kwargs): super().__init__("debug_bezier_patches", {"patches" : patches, "size" : size, "splinesteps" : splinesteps, "showcps" : showcps, "showdots" : showdots, "showpatch" : showpatch, "convexity" : convexity, "style" : style, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/bosl2_access_syntax_mixin.py ================================================ from solid2.core.object_base import AccessSyntaxMixin as _AccessSyntaxMixin class Bosl2AccessSyntaxMixin(_AccessSyntaxMixin): def _get_std(self): from . import std return std def move(self, v=None, p=None, **kwargs): return self._get_std().move(v, p, **kwargs)(self) def left(self, x=None, p=None, **kwargs): return self._get_std().left(x, p, **kwargs)(self) def right(self, x=None, p=None, **kwargs): return self._get_std().right(x, p, **kwargs)(self) def xmove(self, x=None, p=None, **kwargs): return self._get_std().xmove(x, p, **kwargs)(self) def fwd(self, y=None, p=None, **kwargs): return self._get_std().fwd(y, p, **kwargs)(self) def back(self, y=None, p=None, **kwargs): return self._get_std().back(y, p, **kwargs)(self) def ymove(self, y=None, p=None, **kwargs): return self._get_std().ymove(y, p, **kwargs)(self) def down(self, z=None, p=None, **kwargs): return self._get_std().down(z, p, **kwargs)(self) def up(self, z=None, p=None, **kwargs): return self._get_std().up(z, p, **kwargs)(self) def zmove(self, z=None, p=None, **kwargs): return self._get_std().zmove(z, p, **kwargs)(self) def rot(self, a=None, v=None, cp=None, _from=None, to=None, reverse=None, **kwargs): return self._get_std().rot(a, v, cp, _from, to, reverse, **kwargs)(self) def xrot(self, a=None, p=None, cp=None, **kwargs): return self._get_std().xrot(a, p, cp, **kwargs)(self) def yrot(self, a=None, p=None, cp=None, **kwargs): return self._get_std().yrot(a, p, cp, **kwargs)(self) def zrot(self, a=None, p=None, cp=None, **kwargs): return self._get_std().zrot(a, p, cp, **kwargs)(self) def tilt(self, to=None, cp=None, reverse=None, **kwargs): return self._get_std().tilt(to, cp, reverse, **kwargs)(self) def xscale(self, x=None, p=None, cp=None, **kwargs): return self._get_std().xscale(x, p, cp, **kwargs)(self) def yscale(self, y=None, p=None, cp=None, **kwargs): return self._get_std().yscale(y, p, cp, **kwargs)(self) def zscale(self, z=None, p=None, cp=None, **kwargs): return self._get_std().zscale(z, p, cp, **kwargs)(self) def xflip(self, p=None, x=None, **kwargs): return self._get_std().xflip(p, x, **kwargs)(self) def yflip(self, p=None, y=None, **kwargs): return self._get_std().yflip(p, y, **kwargs)(self) def zflip(self, p=None, z=None, **kwargs): return self._get_std().zflip(p, z, **kwargs)(self) def frame_map(self, x=None, y=None, z=None, p=None, reverse=None, **kwargs): return self._get_std().frame_map(x, y, z, p, reverse, **kwargs)(self) def skew(self, p=None, sxy=None, sxz=None, syx=None, syz=None, szx=None, szy=None, axy=None, axz=None, ayx=None, ayz=None, azx=None, azy=None, **kwargs): return self._get_std().skew(p, sxy, sxz, syx, syz, szx, szy, axy, axz, ayx, ayz, azx, azy, **kwargs)(self) def translate(self, v=None, **kwargs): return self._get_std().translate(v, **kwargs)(self) def rotate(self, a=None, v=None, **kwargs): return self._get_std().rotate(a, v, **kwargs)(self) def scale(self, v=None, **kwargs): return self._get_std().scale(v, **kwargs)(self) def multmatrix(self, m=None, **kwargs): return self._get_std().multmatrix(m, **kwargs)(self) def position(self, at=None, _from=None, **kwargs): return self._get_std().position(at, _from, **kwargs)(self) def orient(self, anchor=None, spin=None, **kwargs): return self._get_std().orient(anchor, spin, **kwargs)(self) def align(self, anchor=None, align=None, inside=None, inset=None, shiftout=None, overlap=None, **kwargs): return self._get_std().align(anchor, align, inside, inset, shiftout, overlap, **kwargs)(self) def attach(self, parent=None, child=None, overlap=None, align=None, spin=None, norot=None, inset=None, shiftout=None, inside=None, _from=None, to=None, **kwargs): return self._get_std().attach(parent, child, overlap, align, spin, norot, inset, shiftout, inside, _from, to, **kwargs)(self) def attach_part(self, name=None, **kwargs): return self._get_std().attach_part(name, **kwargs)(self) def tag(self, tag=None, **kwargs): return self._get_std().tag(tag, **kwargs)(self) def tag_this(self, tag=None, **kwargs): return self._get_std().tag_this(tag, **kwargs)(self) def force_tag(self, tag=None, **kwargs): return self._get_std().force_tag(tag, **kwargs)(self) def default_tag(self, tag=None, do_tag=None, **kwargs): return self._get_std().default_tag(tag, do_tag, **kwargs)(self) def tag_scope(self, scope=None, **kwargs): return self._get_std().tag_scope(scope, **kwargs)(self) def diff(self, remove=None, keep=None, **kwargs): return self._get_std().diff(remove, keep, **kwargs)(self) def tag_diff(self, tag=None, remove=None, keep=None, **kwargs): return self._get_std().tag_diff(tag, remove, keep, **kwargs)(self) def intersect(self, intersect=None, keep=None, **kwargs): return self._get_std().intersect(intersect, keep, **kwargs)(self) def tag_intersect(self, tag=None, intersect=None, keep=None, **kwargs): return self._get_std().tag_intersect(tag, intersect, keep, **kwargs)(self) def conv_hull(self, keep=None, **kwargs): return self._get_std().conv_hull(keep, **kwargs)(self) def tag_conv_hull(self, tag=None, keep=None, **kwargs): return self._get_std().tag_conv_hull(tag, keep, **kwargs)(self) def hide(self, tags=None, **kwargs): return self._get_std().hide(tags, **kwargs)(self) def hide_this(self, **kwargs): return self._get_std().hide_this(**kwargs)(self) def show_only(self, tags=None, **kwargs): return self._get_std().show_only(tags, **kwargs)(self) def show_all(self, **kwargs): return self._get_std().show_all(**kwargs)(self) def show_int(self, tags=None, **kwargs): return self._get_std().show_int(tags, **kwargs)(self) def face_mask(self, faces=None, **kwargs): return self._get_std().face_mask(faces, **kwargs)(self) def edge_mask(self, edges=None, _except=None, **kwargs): return self._get_std().edge_mask(edges, _except, **kwargs)(self) def corner_mask(self, corners=None, _except=None, **kwargs): return self._get_std().corner_mask(corners, _except, **kwargs)(self) def face_profile(self, faces=None, r=None, d=None, excess=None, convexity=None, **kwargs): return self._get_std().face_profile(faces, r, d, excess, convexity, **kwargs)(self) def edge_profile(self, edges=None, _except=None, excess=None, convexity=None, **kwargs): return self._get_std().edge_profile(edges, _except, excess, convexity, **kwargs)(self) def edge_profile_asym(self, edges=None, _except=None, excess=None, convexity=None, flip=None, corner_type=None, size=None, **kwargs): return self._get_std().edge_profile_asym(edges, _except, excess, convexity, flip, corner_type, size, **kwargs)(self) def corner_profile(self, corners=None, _except=None, r=None, d=None, convexity=None, **kwargs): return self._get_std().corner_profile(corners, _except, r, d, convexity, **kwargs)(self) def attachable(self, anchor=None, spin=None, orient=None, size=None, size2=None, shift=None, r=None, r1=None, r2=None, d=None, d1=None, d2=None, l=None, h=None, vnf=None, path=None, region=None, extent=None, cp=None, offset=None, anchors=None, two_d=None, axis=None, override=None, geom=None, parts=None, expose_tags=None, keep_color=None, **kwargs): return self._get_std().attachable(anchor, spin, orient, size, size2, shift, r, r1, r2, d, d1, d2, l, h, vnf, path, region, extent, cp, offset, anchors, two_d, axis, override, geom, parts, expose_tags, keep_color, **kwargs)(self) def show_anchors(self, s=None, std=None, custom=None, **kwargs): return self._get_std().show_anchors(s, std, custom, **kwargs)(self) def anchor_arrow(self, s=None, color=None, flag=None, _tag=None, _fn=None, anchor=None, spin=None, orient=None, **kwargs): return self._get_std().anchor_arrow(s, color, flag, _tag, _fn, anchor, spin, orient, **kwargs)(self) def anchor_arrow2d(self, s=None, color=None, _tag=None, **kwargs): return self._get_std().anchor_arrow2d(s, color, _tag, **kwargs)(self) def expose_anchors(self, opacity=None, **kwargs): return self._get_std().expose_anchors(opacity, **kwargs)(self) def show_transform_list(self, tlist=None, s=None, **kwargs): return self._get_std().show_transform_list(tlist, s, **kwargs)(self) def generic_airplane(self, s=None, **kwargs): return self._get_std().generic_airplane(s, **kwargs)(self) def frame_ref(self, s=None, opacity=None, **kwargs): return self._get_std().frame_ref(s, opacity, **kwargs)(self) def restore(self, desc=None, **kwargs): return self._get_std().restore(desc, **kwargs)(self) def desc_copies(self, transforms=None, **kwargs): return self._get_std().desc_copies(transforms, **kwargs)(self) def extrude_from_to(self, pt1=None, pt2=None, convexity=None, twist=None, scale=None, slices=None, **kwargs): return self._get_std().extrude_from_to(pt1, pt2, convexity, twist, scale, slices, **kwargs)(self) def path_extrude2d(self, path=None, caps=None, closed=None, s=None, convexity=None, **kwargs): return self._get_std().path_extrude2d(path, caps, closed, s, convexity, **kwargs)(self) def path_extrude(self, path=None, convexity=None, clipsize=None, **kwargs): return self._get_std().path_extrude(path, convexity, clipsize, **kwargs)(self) def cylindrical_extrude(self, ir=None, _or=None, od=None, id=None, size=None, convexity=None, spin=None, orient=None, **kwargs): return self._get_std().cylindrical_extrude(ir, _or, od, id, size, convexity, spin, orient, **kwargs)(self) def bounding_box(self, excess=None, planar=None, **kwargs): return self._get_std().bounding_box(excess, planar, **kwargs)(self) def chain_hull(self, **kwargs): return self._get_std().chain_hull(**kwargs)(self) def minkowski_difference(self, planar=None, **kwargs): return self._get_std().minkowski_difference(planar, **kwargs)(self) def offset3d(self, r=None, size=None, convexity=None, **kwargs): return self._get_std().offset3d(r, size, convexity, **kwargs)(self) def round3d(self, r=None, _or=None, ir=None, size=None, **kwargs): return self._get_std().round3d(r, _or, ir, size, **kwargs)(self) def move_copies(self, a=None, **kwargs): return self._get_std().move_copies(a, **kwargs)(self) def xcopies(self, spacing=None, n=None, l=None, sp=None, **kwargs): return self._get_std().xcopies(spacing, n, l, sp, **kwargs)(self) def ycopies(self, spacing=None, n=None, l=None, sp=None, **kwargs): return self._get_std().ycopies(spacing, n, l, sp, **kwargs)(self) def zcopies(self, spacing=None, n=None, l=None, sp=None, **kwargs): return self._get_std().zcopies(spacing, n, l, sp, **kwargs)(self) def line_of(self, spacing=None, n=None, l=None, p1=None, p2=None, **kwargs): return self._get_std().line_of(spacing, n, l, p1, p2, **kwargs)(self) def line_copies(self, spacing=None, n=None, l=None, p1=None, p2=None, **kwargs): return self._get_std().line_copies(spacing, n, l, p1, p2, **kwargs)(self) def grid2d(self, spacing=None, n=None, size=None, stagger=None, inside=None, nonzero=None, **kwargs): return self._get_std().grid2d(spacing, n, size, stagger, inside, nonzero, **kwargs)(self) def grid_copies(self, spacing=None, n=None, size=None, stagger=None, inside=None, nonzero=None, axes=None, **kwargs): return self._get_std().grid_copies(spacing, n, size, stagger, inside, nonzero, axes, **kwargs)(self) def rot_copies(self, rots=None, v=None, cp=None, n=None, sa=None, offset=None, delta=None, subrot=None, **kwargs): return self._get_std().rot_copies(rots, v, cp, n, sa, offset, delta, subrot, **kwargs)(self) def xrot_copies(self, rots=None, cp=None, n=None, sa=None, r=None, d=None, subrot=None, **kwargs): return self._get_std().xrot_copies(rots, cp, n, sa, r, d, subrot, **kwargs)(self) def yrot_copies(self, rots=None, cp=None, n=None, sa=None, r=None, d=None, subrot=None, **kwargs): return self._get_std().yrot_copies(rots, cp, n, sa, r, d, subrot, **kwargs)(self) def zrot_copies(self, rots=None, cp=None, n=None, sa=None, r=None, d=None, subrot=None, **kwargs): return self._get_std().zrot_copies(rots, cp, n, sa, r, d, subrot, **kwargs)(self) def arc_of(self, n=None, r=None, rx=None, ry=None, d=None, dx=None, dy=None, sa=None, ea=None, rot=None, **kwargs): return self._get_std().arc_of(n, r, rx, ry, d, dx, dy, sa, ea, rot, **kwargs)(self) def arc_copies(self, n=None, r=None, rx=None, ry=None, d=None, dx=None, dy=None, sa=None, ea=None, rot=None, **kwargs): return self._get_std().arc_copies(n, r, rx, ry, d, dx, dy, sa, ea, rot, **kwargs)(self) def ovoid_spread(self, n=None, r=None, d=None, cone_ang=None, scale=None, perp=None, **kwargs): return self._get_std().ovoid_spread(n, r, d, cone_ang, scale, perp, **kwargs)(self) def sphere_copies(self, n=None, r=None, d=None, cone_ang=None, scale=None, perp=None, **kwargs): return self._get_std().sphere_copies(n, r, d, cone_ang, scale, perp, **kwargs)(self) def path_spread(self, path=None, n=None, spacing=None, sp=None, rotate_children=None, dist=None, closed=None, **kwargs): return self._get_std().path_spread(path, n, spacing, sp, rotate_children, dist, closed, **kwargs)(self) def path_copies(self, path=None, n=None, spacing=None, sp=None, dist=None, rotate_children=None, closed=None, **kwargs): return self._get_std().path_copies(path, n, spacing, sp, dist, rotate_children, closed, **kwargs)(self) def xflip_copy(self, offset=None, x=None, **kwargs): return self._get_std().xflip_copy(offset, x, **kwargs)(self) def yflip_copy(self, offset=None, y=None, **kwargs): return self._get_std().yflip_copy(offset, y, **kwargs)(self) def zflip_copy(self, offset=None, z=None, **kwargs): return self._get_std().zflip_copy(offset, z, **kwargs)(self) def mirror_copy(self, v=None, offset=None, cp=None, **kwargs): return self._get_std().mirror_copy(v, offset, cp, **kwargs)(self) def xdistribute(self, spacing=None, sizes=None, l=None, **kwargs): return self._get_std().xdistribute(spacing, sizes, l, **kwargs)(self) def ydistribute(self, spacing=None, sizes=None, l=None, **kwargs): return self._get_std().ydistribute(spacing, sizes, l, **kwargs)(self) def zdistribute(self, spacing=None, sizes=None, l=None, **kwargs): return self._get_std().zdistribute(spacing, sizes, l, **kwargs)(self) def distribute(self, spacing=None, sizes=None, dir=None, l=None, **kwargs): return self._get_std().distribute(spacing, sizes, dir, l, **kwargs)(self) def half_of(self, v=None, cp=None, s=None, planar=None, **kwargs): return self._get_std().half_of(v, cp, s, planar, **kwargs)(self) def left_half(self, s=None, x=None, planar=None, **kwargs): return self._get_std().left_half(s, x, planar, **kwargs)(self) def right_half(self, s=None, x=None, planar=None, **kwargs): return self._get_std().right_half(s, x, planar, **kwargs)(self) def front_half(self, s=None, y=None, planar=None, **kwargs): return self._get_std().front_half(s, y, planar, **kwargs)(self) def back_half(self, s=None, y=None, planar=None, **kwargs): return self._get_std().back_half(s, y, planar, **kwargs)(self) def bottom_half(self, s=None, z=None, **kwargs): return self._get_std().bottom_half(s, z, **kwargs)(self) def top_half(self, s=None, z=None, **kwargs): return self._get_std().top_half(s, z, **kwargs)(self) def partition_mask(self, l=None, w=None, h=None, cutsize=None, cutpath=None, gap=None, cutpath_centered=None, inverse=None, anchor=None, spin=None, orient=None, **kwargs): return self._get_std().partition_mask(l, w, h, cutsize, cutpath, gap, cutpath_centered, inverse, anchor, spin, orient, **kwargs)(self) def partition_cut_mask(self, l=None, h=None, cutsize=None, cutpath=None, gap=None, cutpath_centered=None, anchor=None, spin=None, orient=None, **kwargs): return self._get_std().partition_cut_mask(l, h, cutsize, cutpath, gap, cutpath_centered, anchor, spin, orient, **kwargs)(self) def partition(self, size=None, spread=None, cutsize=None, cutpath=None, gap=None, cutpath_centered=None, spin=None, **kwargs): return self._get_std().partition(size, spread, cutsize, cutpath, gap, cutpath_centered, spin, **kwargs)(self) def recolor(self, c=None, **kwargs): return self._get_std().recolor(c, **kwargs)(self) def color_this(self, c=None, **kwargs): return self._get_std().color_this(c, **kwargs)(self) def rainbow(self, list=None, stride=None, maxhues=None, shuffle=None, seed=None, **kwargs): return self._get_std().rainbow(list, stride, maxhues, shuffle, seed, **kwargs)(self) def color_overlaps(self, color=None, **kwargs): return self._get_std().color_overlaps(color, **kwargs)(self) def highlight(self, highlight=None, **kwargs): return self._get_std().highlight(highlight, **kwargs)(self) def highlight_this(self, **kwargs): return self._get_std().highlight_this(**kwargs)(self) def ghost(self, ghost=None, **kwargs): return self._get_std().ghost(ghost, **kwargs)(self) def ghost_this(self, **kwargs): return self._get_std().ghost_this(**kwargs)(self) def hsl(self, h=None, s=None, l=None, a=None, **kwargs): return self._get_std().hsl(h, s, l, a, **kwargs)(self) def hsv(self, h=None, s=None, v=None, a=None, **kwargs): return self._get_std().hsv(h, s, v, a, **kwargs)(self) ================================================ FILE: solid2/extensions/bosl2/bosl2_base.py ================================================ from solid2.core.object_base.object_base_impl import BareOpenSCADObject from solid2.core.object_base.operator_mixin import OperatorMixin from solid2.extensions.bosl2.bosl2_access_syntax_mixin import Bosl2AccessSyntaxMixin class Bosl2OperatorMixin(OperatorMixin): def __add__(self, x): from .std import union return self._union_op(x, union) def __or__(self, x): from .std import union return self._union_op(x, union) def __radd__(self, x): from .std import union return self._union_op(x, union) def __sub__(self, x): from .std import difference return self._difference_op(x, difference) def __mul__(self, x): from .std import intersection return self._intersection_op(x, intersection) def __and__(self, x): from .std import intersection return self._intersection_op(x, intersection) class Bosl2Base(Bosl2AccessSyntaxMixin, Bosl2OperatorMixin, BareOpenSCADObject): pass ================================================ FILE: solid2/extensions/bosl2/bosl2_patches.py ================================================ __nothing__ = None from .bosl2_base import Bosl2Base from .std import union, attachable #============ attachable add ============= #enhance the add function of the attachable OpenSCADObject so it can be used #properly: cf. 07-libs-bosl2-attachable.py attachable_default_add = attachable.add def attachable_add(self, c): if len(self._children) == 0: attachable_default_add(self, c) elif len(self._children) == 1: attachable_default_add(self, union()(c)) else: assert(len(self._children) == 2) self._children[1].add(c) attachable.add = attachable_add #============ attachable add end ============= # flip back & fwd -> issue #54 # https://github.com/jeff-dh/SolidPython/issues/54 back = Bosl2Base.back Bosl2Base.back = Bosl2Base.fwd #type: ignore Bosl2Base.fwd = back #type: ignore ================================================ FILE: solid2/extensions/bosl2/bottlecaps.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/bottlecaps.scad'}", False) _sp_specs = _OpenSCADConstant('_sp_specs') _sp_twist = _OpenSCADConstant('_sp_twist') _sp_thread_width = _OpenSCADConstant('_sp_thread_width') class pco1810_neck(_Bosl2Base): def __init__(self, wall=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("pco1810_neck", {"wall" : wall, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class pco1810_cap(_Bosl2Base): def __init__(self, h=None, r=None, d=None, wall=None, texture=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("pco1810_cap", {"h" : h, "r" : r, "d" : d, "wall" : wall, "texture" : texture, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class pco1881_neck(_Bosl2Base): def __init__(self, wall=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("pco1881_neck", {"wall" : wall, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class pco1881_cap(_Bosl2Base): def __init__(self, wall=None, texture=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("pco1881_cap", {"wall" : wall, "texture" : texture, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class generic_bottle_neck(_Bosl2Base): def __init__(self, neck_d=None, id=None, thread_od=None, height=None, support_d=None, pitch=None, round_supp=None, wall=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("generic_bottle_neck", {"neck_d" : neck_d, "id" : id, "thread_od" : thread_od, "height" : height, "support_d" : support_d, "pitch" : pitch, "round_supp" : round_supp, "wall" : wall, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class generic_bottle_cap(_Bosl2Base): def __init__(self, wall=None, texture=None, height=None, thread_od=None, tolerance=None, neck_od=None, flank_angle=None, pitch=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("generic_bottle_cap", {"wall" : wall, "texture" : texture, "height" : height, "thread_od" : thread_od, "tolerance" : tolerance, "neck_od" : neck_od, "flank_angle" : flank_angle, "pitch" : pitch, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class bottle_adapter_neck_to_cap(_Bosl2Base): def __init__(self, wall=None, texture=None, cap_wall=None, cap_h=None, cap_thread_depth1=None, tolerance=None, cap_neck_od=None, cap_neck_id=None, cap_thread_taper=None, cap_thread_pitch=None, neck_d=None, neck_id=None, neck_thread_od=None, neck_h=None, neck_thread_pitch=None, neck_support_od=None, d=None, taper_lead_in=None, **kwargs): super().__init__("bottle_adapter_neck_to_cap", {"wall" : wall, "texture" : texture, "cap_wall" : cap_wall, "cap_h" : cap_h, "cap_thread_depth1" : cap_thread_depth1, "tolerance" : tolerance, "cap_neck_od" : cap_neck_od, "cap_neck_id" : cap_neck_id, "cap_thread_taper" : cap_thread_taper, "cap_thread_pitch" : cap_thread_pitch, "neck_d" : neck_d, "neck_id" : neck_id, "neck_thread_od" : neck_thread_od, "neck_h" : neck_h, "neck_thread_pitch" : neck_thread_pitch, "neck_support_od" : neck_support_od, "d" : d, "taper_lead_in" : taper_lead_in, **kwargs}) class bottle_adapter_cap_to_cap(_Bosl2Base): def __init__(self, wall=None, texture=None, cap_h1=None, cap_thread_od1=None, tolerance=None, cap_neck_od1=None, cap_thread_pitch1=None, cap_h2=None, cap_thread_od2=None, cap_neck_od2=None, cap_thread_pitch2=None, d=None, neck_id1=None, neck_id2=None, taper_lead_in=None, **kwargs): super().__init__("bottle_adapter_cap_to_cap", {"wall" : wall, "texture" : texture, "cap_h1" : cap_h1, "cap_thread_od1" : cap_thread_od1, "tolerance" : tolerance, "cap_neck_od1" : cap_neck_od1, "cap_thread_pitch1" : cap_thread_pitch1, "cap_h2" : cap_h2, "cap_thread_od2" : cap_thread_od2, "cap_neck_od2" : cap_neck_od2, "cap_thread_pitch2" : cap_thread_pitch2, "d" : d, "neck_id1" : neck_id1, "neck_id2" : neck_id2, "taper_lead_in" : taper_lead_in, **kwargs}) class bottle_adapter_neck_to_neck(_Bosl2Base): def __init__(self, d=None, neck_od1=None, neck_id1=None, thread_od1=None, height1=None, support_od1=None, thread_pitch1=None, neck_od2=None, neck_id2=None, thread_od2=None, height2=None, support_od2=None, pitch2=None, taper_lead_in=None, wall=None, **kwargs): super().__init__("bottle_adapter_neck_to_neck", {"d" : d, "neck_od1" : neck_od1, "neck_id1" : neck_id1, "thread_od1" : thread_od1, "height1" : height1, "support_od1" : support_od1, "thread_pitch1" : thread_pitch1, "neck_od2" : neck_od2, "neck_id2" : neck_id2, "thread_od2" : thread_od2, "height2" : height2, "support_od2" : support_od2, "pitch2" : pitch2, "taper_lead_in" : taper_lead_in, "wall" : wall, **kwargs}) class _sp_thread_profile(_Bosl2Base): def __init__(self, tpi=None, a=None, S=None, style=None, flip=None, **kwargs): super().__init__("_sp_thread_profile", {"tpi" : tpi, "a" : a, "S" : S, "style" : style, "flip" : flip, **kwargs}) class sp_neck(_Bosl2Base): def __init__(self, diam=None, type=None, wall=None, id=None, style=None, bead=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("sp_neck", {"diam" : diam, "type" : type, "wall" : wall, "id" : id, "style" : style, "bead" : bead, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class sp_diameter(_Bosl2Base): def __init__(self, diam=None, type=None, **kwargs): super().__init__("sp_diameter", {"diam" : diam, "type" : type, **kwargs}) class pco1810_neck(_Bosl2Base): def __init__(self, wall=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("pco1810_neck", {"wall" : wall, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class pco1810_cap(_Bosl2Base): def __init__(self, h=None, r=None, d=None, wall=None, texture=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("pco1810_cap", {"h" : h, "r" : r, "d" : d, "wall" : wall, "texture" : texture, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class pco1881_neck(_Bosl2Base): def __init__(self, wall=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("pco1881_neck", {"wall" : wall, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class pco1881_cap(_Bosl2Base): def __init__(self, wall=None, texture=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("pco1881_cap", {"wall" : wall, "texture" : texture, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class generic_bottle_neck(_Bosl2Base): def __init__(self, wall=None, neck_d=None, id=None, thread_od=None, height=None, support_d=None, pitch=None, round_supp=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("generic_bottle_neck", {"wall" : wall, "neck_d" : neck_d, "id" : id, "thread_od" : thread_od, "height" : height, "support_d" : support_d, "pitch" : pitch, "round_supp" : round_supp, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class generic_bottle_cap(_Bosl2Base): def __init__(self, wall=None, texture=None, height=None, thread_depth=None, thread_od=None, tolerance=None, neck_od=None, flank_angle=None, pitch=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("generic_bottle_cap", {"wall" : wall, "texture" : texture, "height" : height, "thread_depth" : thread_depth, "thread_od" : thread_od, "tolerance" : tolerance, "neck_od" : neck_od, "flank_angle" : flank_angle, "pitch" : pitch, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class bottle_adapter_neck_to_cap(_Bosl2Base): def __init__(self, wall=None, texture=None, cap_wall=None, cap_h=None, cap_thread_depth=None, tolerance=None, cap_neck_od=None, cap_neck_id=None, cap_thread_taper=None, cap_thread_pitch=None, neck_d=None, neck_id=None, neck_thread_od=None, neck_h=None, neck_thread_pitch=None, neck_support_od=None, d=None, taper_lead_in=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("bottle_adapter_neck_to_cap", {"wall" : wall, "texture" : texture, "cap_wall" : cap_wall, "cap_h" : cap_h, "cap_thread_depth" : cap_thread_depth, "tolerance" : tolerance, "cap_neck_od" : cap_neck_od, "cap_neck_id" : cap_neck_id, "cap_thread_taper" : cap_thread_taper, "cap_thread_pitch" : cap_thread_pitch, "neck_d" : neck_d, "neck_id" : neck_id, "neck_thread_od" : neck_thread_od, "neck_h" : neck_h, "neck_thread_pitch" : neck_thread_pitch, "neck_support_od" : neck_support_od, "d" : d, "taper_lead_in" : taper_lead_in, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class bottle_adapter_cap_to_cap(_Bosl2Base): def __init__(self, wall=None, texture=None, cap_h1=None, cap_thread_depth1=None, tolerance=None, cap_neck_od1=None, cap_thread_pitch1=None, cap_h2=None, cap_thread_depth2=None, cap_neck_od2=None, cap_thread_pitch2=None, d=None, neck_id=None, taper_lead_in=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("bottle_adapter_cap_to_cap", {"wall" : wall, "texture" : texture, "cap_h1" : cap_h1, "cap_thread_depth1" : cap_thread_depth1, "tolerance" : tolerance, "cap_neck_od1" : cap_neck_od1, "cap_thread_pitch1" : cap_thread_pitch1, "cap_h2" : cap_h2, "cap_thread_depth2" : cap_thread_depth2, "cap_neck_od2" : cap_neck_od2, "cap_thread_pitch2" : cap_thread_pitch2, "d" : d, "neck_id" : neck_id, "taper_lead_in" : taper_lead_in, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class bottle_adapter_neck_to_neck(_Bosl2Base): def __init__(self, d=None, neck_od1=None, neck_id1=None, thread_od1=None, height1=None, support_od1=None, thread_pitch1=None, neck_od2=None, neck_id2=None, thread_od2=None, height2=None, support_od2=None, pitch2=None, taper_lead_in=None, wall=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("bottle_adapter_neck_to_neck", {"d" : d, "neck_od1" : neck_od1, "neck_id1" : neck_id1, "thread_od1" : thread_od1, "height1" : height1, "support_od1" : support_od1, "thread_pitch1" : thread_pitch1, "neck_od2" : neck_od2, "neck_id2" : neck_id2, "thread_od2" : thread_od2, "height2" : height2, "support_od2" : support_od2, "pitch2" : pitch2, "taper_lead_in" : taper_lead_in, "wall" : wall, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class sp_neck(_Bosl2Base): def __init__(self, diam=None, type=None, wall=None, id=None, style=None, bead=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("sp_neck", {"diam" : diam, "type" : type, "wall" : wall, "id" : id, "style" : style, "bead" : bead, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class sp_cap(_Bosl2Base): def __init__(self, diam=None, type=None, wall=None, style=None, top_adj=None, bot_adj=None, texture=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("sp_cap", {"diam" : diam, "type" : type, "wall" : wall, "style" : style, "top_adj" : top_adj, "bot_adj" : bot_adj, "texture" : texture, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/color.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/color.scad'}", False) class highlight(_Bosl2Base): def __init__(self, highlight=None, **kwargs): super().__init__("highlight", {"highlight" : highlight, **kwargs}) class highlight_this(_Bosl2Base): def __init__(self, **kwargs): super().__init__("highlight_this", {**kwargs}) class ghost(_Bosl2Base): def __init__(self, ghost=None, **kwargs): super().__init__("ghost", {"ghost" : ghost, **kwargs}) class ghost_this(_Bosl2Base): def __init__(self, **kwargs): super().__init__("ghost_this", {**kwargs}) class hsl(_Bosl2Base): def __init__(self, h=None, s=None, l=None, a=None, **kwargs): super().__init__("hsl", {"h" : h, "s" : s, "l" : l, "a" : a, **kwargs}) class hsv(_Bosl2Base): def __init__(self, h=None, s=None, v=None, a=None, **kwargs): super().__init__("hsv", {"h" : h, "s" : s, "v" : v, "a" : a, **kwargs}) class recolor(_Bosl2Base): def __init__(self, c=None, **kwargs): super().__init__("recolor", {"c" : c, **kwargs}) class color_this(_Bosl2Base): def __init__(self, c=None, **kwargs): super().__init__("color_this", {"c" : c, **kwargs}) class rainbow(_Bosl2Base): def __init__(self, list=None, stride=None, maxhues=None, shuffle=None, seed=None, **kwargs): super().__init__("rainbow", {"list" : list, "stride" : stride, "maxhues" : maxhues, "shuffle" : shuffle, "seed" : seed, **kwargs}) class color_overlaps(_Bosl2Base): def __init__(self, color=None, **kwargs): super().__init__("color_overlaps", {"color" : color, **kwargs}) class highlight(_Bosl2Base): def __init__(self, highlight=None, **kwargs): super().__init__("highlight", {"highlight" : highlight, **kwargs}) class highlight_this(_Bosl2Base): def __init__(self, **kwargs): super().__init__("highlight_this", {**kwargs}) class ghost(_Bosl2Base): def __init__(self, ghost=None, **kwargs): super().__init__("ghost", {"ghost" : ghost, **kwargs}) class ghost_this(_Bosl2Base): def __init__(self, **kwargs): super().__init__("ghost_this", {**kwargs}) class hsl(_Bosl2Base): def __init__(self, h=None, s=None, l=None, a=None, **kwargs): super().__init__("hsl", {"h" : h, "s" : s, "l" : l, "a" : a, **kwargs}) class hsv(_Bosl2Base): def __init__(self, h=None, s=None, v=None, a=None, **kwargs): super().__init__("hsv", {"h" : h, "s" : s, "v" : v, "a" : a, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/comparisons.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/comparisons.scad'}", False) class approx(_Bosl2Base): def __init__(self, a=None, b=None, eps=None, **kwargs): super().__init__("approx", {"a" : a, "b" : b, "eps" : eps, **kwargs}) class all_zero(_Bosl2Base): def __init__(self, x=None, eps=None, **kwargs): super().__init__("all_zero", {"x" : x, "eps" : eps, **kwargs}) class all_nonzero(_Bosl2Base): def __init__(self, x=None, eps=None, **kwargs): super().__init__("all_nonzero", {"x" : x, "eps" : eps, **kwargs}) class all_positive(_Bosl2Base): def __init__(self, x=None, eps=None, **kwargs): super().__init__("all_positive", {"x" : x, "eps" : eps, **kwargs}) class all_negative(_Bosl2Base): def __init__(self, x=None, eps=None, **kwargs): super().__init__("all_negative", {"x" : x, "eps" : eps, **kwargs}) class all_nonpositive(_Bosl2Base): def __init__(self, x=None, eps=None, **kwargs): super().__init__("all_nonpositive", {"x" : x, "eps" : eps, **kwargs}) class all_nonnegative(_Bosl2Base): def __init__(self, x=None, eps=None, **kwargs): super().__init__("all_nonnegative", {"x" : x, "eps" : eps, **kwargs}) class all_equal(_Bosl2Base): def __init__(self, vec=None, eps=None, **kwargs): super().__init__("all_equal", {"vec" : vec, "eps" : eps, **kwargs}) class are_ends_equal(_Bosl2Base): def __init__(self, list=None, eps=None, **kwargs): super().__init__("are_ends_equal", {"list" : list, "eps" : eps, **kwargs}) class is_increasing(_Bosl2Base): def __init__(self, list=None, strict=None, **kwargs): super().__init__("is_increasing", {"list" : list, "strict" : strict, **kwargs}) class is_decreasing(_Bosl2Base): def __init__(self, list=None, strict=None, **kwargs): super().__init__("is_decreasing", {"list" : list, "strict" : strict, **kwargs}) class _type_num(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("_type_num", {"x" : x, **kwargs}) class compare_vals(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("compare_vals", {"a" : a, "b" : b, **kwargs}) class compare_lists(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("compare_lists", {"a" : a, "b" : b, **kwargs}) class min_index(_Bosl2Base): def __init__(self, vals=None, all=None, **kwargs): super().__init__("min_index", {"vals" : vals, "all" : all, **kwargs}) class max_index(_Bosl2Base): def __init__(self, vals=None, all=None, **kwargs): super().__init__("max_index", {"vals" : vals, "all" : all, **kwargs}) class find_approx(_Bosl2Base): def __init__(self, val=None, list=None, start=None, all=None, eps=None, **kwargs): super().__init__("find_approx", {"val" : val, "list" : list, "start" : start, "all" : all, "eps" : eps, **kwargs}) class __find_approx(_Bosl2Base): def __init__(self, val=None, list=None, eps=None, i=None, **kwargs): super().__init__("__find_approx", {"val" : val, "list" : list, "eps" : eps, "i" : i, **kwargs}) class deduplicate(_Bosl2Base): def __init__(self, list=None, closed=None, eps=None, **kwargs): super().__init__("deduplicate", {"list" : list, "closed" : closed, "eps" : eps, **kwargs}) class deduplicate_indexed(_Bosl2Base): def __init__(self, list=None, indices=None, closed=None, eps=None, **kwargs): super().__init__("deduplicate_indexed", {"list" : list, "indices" : indices, "closed" : closed, "eps" : eps, **kwargs}) class list_wrap(_Bosl2Base): def __init__(self, list=None, eps=None, **kwargs): super().__init__("list_wrap", {"list" : list, "eps" : eps, **kwargs}) class cleanup_path(_Bosl2Base): def __init__(self, list=None, eps=None, **kwargs): super().__init__("cleanup_path", {"list" : list, "eps" : eps, **kwargs}) class close_path(_Bosl2Base): def __init__(self, list=None, eps=None, **kwargs): super().__init__("close_path", {"list" : list, "eps" : eps, **kwargs}) class list_unwrap(_Bosl2Base): def __init__(self, list=None, eps=None, **kwargs): super().__init__("list_unwrap", {"list" : list, "eps" : eps, **kwargs}) class unique(_Bosl2Base): def __init__(self, list=None, **kwargs): super().__init__("unique", {"list" : list, **kwargs}) class _unique_sort(_Bosl2Base): def __init__(self, l=None, **kwargs): super().__init__("_unique_sort", {"l" : l, **kwargs}) class unique_count(_Bosl2Base): def __init__(self, list=None, **kwargs): super().__init__("unique_count", {"list" : list, **kwargs}) class unique_approx(_Bosl2Base): def __init__(self, data=None, eps=None, **kwargs): super().__init__("unique_approx", {"data" : data, "eps" : eps, **kwargs}) class unique_approx_indexed(_Bosl2Base): def __init__(self, data=None, eps=None, **kwargs): super().__init__("unique_approx_indexed", {"data" : data, "eps" : eps, **kwargs}) class _valid_idx(_Bosl2Base): def __init__(self, idx=None, imin=None, imax=None, **kwargs): super().__init__("_valid_idx", {"idx" : idx, "imin" : imin, "imax" : imax, **kwargs}) class _group_sort_by_index(_Bosl2Base): def __init__(self, l=None, idx=None, **kwargs): super().__init__("_group_sort_by_index", {"l" : l, "idx" : idx, **kwargs}) class _group_sort(_Bosl2Base): def __init__(self, l=None, **kwargs): super().__init__("_group_sort", {"l" : l, **kwargs}) class _sort_scalars(_Bosl2Base): def __init__(self, arr=None, **kwargs): super().__init__("_sort_scalars", {"arr" : arr, **kwargs}) class _sort_vectors(_Bosl2Base): def __init__(self, arr=None, _i=None, **kwargs): super().__init__("_sort_vectors", {"arr" : arr, "_i" : _i, **kwargs}) class _sort_vectors(_Bosl2Base): def __init__(self, arr=None, idxlist=None, _i=None, **kwargs): super().__init__("_sort_vectors", {"arr" : arr, "idxlist" : idxlist, "_i" : _i, **kwargs}) class _sort_general(_Bosl2Base): def __init__(self, arr=None, idx=None, indexed=None, **kwargs): super().__init__("_sort_general", {"arr" : arr, "idx" : idx, "indexed" : indexed, **kwargs}) class _lexical_sort(_Bosl2Base): def __init__(self, arr=None, **kwargs): super().__init__("_lexical_sort", {"arr" : arr, **kwargs}) class _indexed_sort(_Bosl2Base): def __init__(self, arrind=None, **kwargs): super().__init__("_indexed_sort", {"arrind" : arrind, **kwargs}) class sort(_Bosl2Base): def __init__(self, list=None, idx=None, **kwargs): super().__init__("sort", {"list" : list, "idx" : idx, **kwargs}) class sortidx(_Bosl2Base): def __init__(self, list=None, idx=None, **kwargs): super().__init__("sortidx", {"list" : list, "idx" : idx, **kwargs}) class group_sort(_Bosl2Base): def __init__(self, list=None, idx=None, **kwargs): super().__init__("group_sort", {"list" : list, "idx" : idx, **kwargs}) class group_data(_Bosl2Base): def __init__(self, groups=None, values=None, **kwargs): super().__init__("group_data", {"groups" : groups, "values" : values, **kwargs}) class list_smallest(_Bosl2Base): def __init__(self, list=None, k=None, **kwargs): super().__init__("list_smallest", {"list" : list, "k" : k, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/constants.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/constants.scad'}", False) _UNDEF = _OpenSCADConstant('_UNDEF') INCH = _OpenSCADConstant('INCH') IDENT = _OpenSCADConstant('IDENT') LEFT = _OpenSCADConstant('LEFT') RIGHT = _OpenSCADConstant('RIGHT') FRONT = _OpenSCADConstant('FRONT') FWD = _OpenSCADConstant('FWD') FORWARD = _OpenSCADConstant('FORWARD') BACK = _OpenSCADConstant('BACK') BOTTOM = _OpenSCADConstant('BOTTOM') BOT = _OpenSCADConstant('BOT') DOWN = _OpenSCADConstant('DOWN') TOP = _OpenSCADConstant('TOP') UP = _OpenSCADConstant('UP') CENTER = _OpenSCADConstant('CENTER') CTR = _OpenSCADConstant('CTR') CENTRE = _OpenSCADConstant('CENTRE') SEGMENT = _OpenSCADConstant('SEGMENT') RAY = _OpenSCADConstant('RAY') LINE = _OpenSCADConstant('LINE') class get_slop(_Bosl2Base): def __init__(self, **kwargs): super().__init__("get_slop", {**kwargs}) class EDGE(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("EDGE", {"a" : a, "b" : b, **kwargs}) class FACE(_Bosl2Base): def __init__(self, i=None, **kwargs): super().__init__("FACE", {"i" : i, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/coords.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/coords.scad'}", False) class point2d(_Bosl2Base): def __init__(self, p=None, fill=None, **kwargs): super().__init__("point2d", {"p" : p, "fill" : fill, **kwargs}) class path2d(_Bosl2Base): def __init__(self, points=None, **kwargs): super().__init__("path2d", {"points" : points, **kwargs}) class point3d(_Bosl2Base): def __init__(self, p=None, fill=None, **kwargs): super().__init__("point3d", {"p" : p, "fill" : fill, **kwargs}) class path3d(_Bosl2Base): def __init__(self, points=None, fill=None, **kwargs): super().__init__("path3d", {"points" : points, "fill" : fill, **kwargs}) class point4d(_Bosl2Base): def __init__(self, p=None, fill=None, **kwargs): super().__init__("point4d", {"p" : p, "fill" : fill, **kwargs}) class path4d(_Bosl2Base): def __init__(self, points=None, fill=None, **kwargs): super().__init__("path4d", {"points" : points, "fill" : fill, **kwargs}) class polar_to_xy(_Bosl2Base): def __init__(self, r=None, theta=None, **kwargs): super().__init__("polar_to_xy", {"r" : r, "theta" : theta, **kwargs}) class xy_to_polar(_Bosl2Base): def __init__(self, x=None, y=None, **kwargs): super().__init__("xy_to_polar", {"x" : x, "y" : y, **kwargs}) class project_plane(_Bosl2Base): def __init__(self, plane=None, p=None, **kwargs): super().__init__("project_plane", {"plane" : plane, "p" : p, **kwargs}) class lift_plane(_Bosl2Base): def __init__(self, plane=None, p=None, **kwargs): super().__init__("lift_plane", {"plane" : plane, "p" : p, **kwargs}) class cylindrical_to_xyz(_Bosl2Base): def __init__(self, r=None, theta=None, z=None, **kwargs): super().__init__("cylindrical_to_xyz", {"r" : r, "theta" : theta, "z" : z, **kwargs}) class xyz_to_cylindrical(_Bosl2Base): def __init__(self, x=None, y=None, z=None, **kwargs): super().__init__("xyz_to_cylindrical", {"x" : x, "y" : y, "z" : z, **kwargs}) class spherical_to_xyz(_Bosl2Base): def __init__(self, r=None, theta=None, phi=None, **kwargs): super().__init__("spherical_to_xyz", {"r" : r, "theta" : theta, "phi" : phi, **kwargs}) class xyz_to_spherical(_Bosl2Base): def __init__(self, x=None, y=None, z=None, **kwargs): super().__init__("xyz_to_spherical", {"x" : x, "y" : y, "z" : z, **kwargs}) class altaz_to_xyz(_Bosl2Base): def __init__(self, alt=None, az=None, r=None, **kwargs): super().__init__("altaz_to_xyz", {"alt" : alt, "az" : az, "r" : r, **kwargs}) class xyz_to_altaz(_Bosl2Base): def __init__(self, x=None, y=None, z=None, **kwargs): super().__init__("xyz_to_altaz", {"x" : x, "y" : y, "z" : z, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/cubetruss.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/cubetruss.scad'}", False) _cubetruss_size = _OpenSCADConstant('_cubetruss_size') _cubetruss_strut_size = _OpenSCADConstant('_cubetruss_strut_size') _cubetruss_bracing = _OpenSCADConstant('_cubetruss_bracing') _cubetruss_clip_thickness = _OpenSCADConstant('_cubetruss_clip_thickness') class cubetruss_dist(_Bosl2Base): def __init__(self, cubes=None, gaps=None, size=None, strut=None, **kwargs): super().__init__("cubetruss_dist", {"cubes" : cubes, "gaps" : gaps, "size" : size, "strut" : strut, **kwargs}) class cubetruss(_Bosl2Base): def __init__(self, extents=None, clips=None, bracing=None, size=None, strut=None, clipthick=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cubetruss", {"extents" : extents, "clips" : clips, "bracing" : bracing, "size" : size, "strut" : strut, "clipthick" : clipthick, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class cubetruss_corner(_Bosl2Base): def __init__(self, h=None, extents=None, bracing=None, size=None, strut=None, clipthick=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cubetruss_corner", {"h" : h, "extents" : extents, "bracing" : bracing, "size" : size, "strut" : strut, "clipthick" : clipthick, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class cubetruss_support(_Bosl2Base): def __init__(self, size=None, strut=None, extents=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cubetruss_support", {"size" : size, "strut" : strut, "extents" : extents, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class cubetruss_foot(_Bosl2Base): def __init__(self, w=None, size=None, strut=None, clipthick=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cubetruss_foot", {"w" : w, "size" : size, "strut" : strut, "clipthick" : clipthick, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class cubetruss_joiner(_Bosl2Base): def __init__(self, w=None, vert=None, size=None, strut=None, clipthick=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cubetruss_joiner", {"w" : w, "vert" : vert, "size" : size, "strut" : strut, "clipthick" : clipthick, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class cubetruss_uclip(_Bosl2Base): def __init__(self, dual=None, size=None, strut=None, clipthick=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cubetruss_uclip", {"dual" : dual, "size" : size, "strut" : strut, "clipthick" : clipthick, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class cubetruss_segment(_Bosl2Base): def __init__(self, size=None, strut=None, bracing=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cubetruss_segment", {"size" : size, "strut" : strut, "bracing" : bracing, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class cubetruss_clip(_Bosl2Base): def __init__(self, extents=None, size=None, strut=None, clipthick=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cubetruss_clip", {"extents" : extents, "size" : size, "strut" : strut, "clipthick" : clipthick, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/distributors.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/distributors.scad'}", False) class move_copies(_Bosl2Base): def __init__(self, a=None, p=None, **kwargs): super().__init__("move_copies", {"a" : a, "p" : p, **kwargs}) class xcopies(_Bosl2Base): def __init__(self, spacing=None, n=None, l=None, sp=None, p=None, **kwargs): super().__init__("xcopies", {"spacing" : spacing, "n" : n, "l" : l, "sp" : sp, "p" : p, **kwargs}) class ycopies(_Bosl2Base): def __init__(self, spacing=None, n=None, l=None, sp=None, p=None, **kwargs): super().__init__("ycopies", {"spacing" : spacing, "n" : n, "l" : l, "sp" : sp, "p" : p, **kwargs}) class zcopies(_Bosl2Base): def __init__(self, spacing=None, n=None, l=None, sp=None, p=None, **kwargs): super().__init__("zcopies", {"spacing" : spacing, "n" : n, "l" : l, "sp" : sp, "p" : p, **kwargs}) class line_copies(_Bosl2Base): def __init__(self, spacing=None, n=None, l=None, p1=None, p2=None, p=None, **kwargs): super().__init__("line_copies", {"spacing" : spacing, "n" : n, "l" : l, "p1" : p1, "p2" : p2, "p" : p, **kwargs}) class grid_copies(_Bosl2Base): def __init__(self, spacing=None, n=None, size=None, stagger=None, inside=None, nonzero=None, axes=None, p=None, **kwargs): super().__init__("grid_copies", {"spacing" : spacing, "n" : n, "size" : size, "stagger" : stagger, "inside" : inside, "nonzero" : nonzero, "axes" : axes, "p" : p, **kwargs}) class rot_copies(_Bosl2Base): def __init__(self, rots=None, v=None, cp=None, n=None, sa=None, offset=None, delta=None, subrot=None, p=None, **kwargs): super().__init__("rot_copies", {"rots" : rots, "v" : v, "cp" : cp, "n" : n, "sa" : sa, "offset" : offset, "delta" : delta, "subrot" : subrot, "p" : p, **kwargs}) class xrot_copies(_Bosl2Base): def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None, subrot=None, p=None, **kwargs): super().__init__("xrot_copies", {"rots" : rots, "cp" : cp, "n" : n, "sa" : sa, "r" : r, "d" : d, "subrot" : subrot, "p" : p, **kwargs}) class yrot_copies(_Bosl2Base): def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None, subrot=None, p=None, **kwargs): super().__init__("yrot_copies", {"rots" : rots, "cp" : cp, "n" : n, "sa" : sa, "r" : r, "d" : d, "subrot" : subrot, "p" : p, **kwargs}) class zrot_copies(_Bosl2Base): def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None, subrot=None, p=None, **kwargs): super().__init__("zrot_copies", {"rots" : rots, "cp" : cp, "n" : n, "sa" : sa, "r" : r, "d" : d, "subrot" : subrot, "p" : p, **kwargs}) class arc_copies(_Bosl2Base): def __init__(self, n=None, r=None, rx=None, ry=None, d=None, dx=None, dy=None, sa=None, ea=None, rot=None, p=None, **kwargs): super().__init__("arc_copies", {"n" : n, "r" : r, "rx" : rx, "ry" : ry, "d" : d, "dx" : dx, "dy" : dy, "sa" : sa, "ea" : ea, "rot" : rot, "p" : p, **kwargs}) class sphere_copies(_Bosl2Base): def __init__(self, n=None, r=None, d=None, cone_ang=None, scale=None, perp=None, p=None, **kwargs): super().__init__("sphere_copies", {"n" : n, "r" : r, "d" : d, "cone_ang" : cone_ang, "scale" : scale, "perp" : perp, "p" : p, **kwargs}) class path_copies(_Bosl2Base): def __init__(self, path=None, n=None, spacing=None, sp=None, dist=None, rotate_children=None, closed=None, p=None, **kwargs): super().__init__("path_copies", {"path" : path, "n" : n, "spacing" : spacing, "sp" : sp, "dist" : dist, "rotate_children" : rotate_children, "closed" : closed, "p" : p, **kwargs}) class xflip_copy(_Bosl2Base): def __init__(self, offset=None, x=None, p=None, **kwargs): super().__init__("xflip_copy", {"offset" : offset, "x" : x, "p" : p, **kwargs}) class yflip_copy(_Bosl2Base): def __init__(self, offset=None, y=None, p=None, **kwargs): super().__init__("yflip_copy", {"offset" : offset, "y" : y, "p" : p, **kwargs}) class zflip_copy(_Bosl2Base): def __init__(self, offset=None, z=None, p=None, **kwargs): super().__init__("zflip_copy", {"offset" : offset, "z" : z, "p" : p, **kwargs}) class mirror_copy(_Bosl2Base): def __init__(self, v=None, offset=None, cp=None, p=None, **kwargs): super().__init__("mirror_copy", {"v" : v, "offset" : offset, "cp" : cp, "p" : p, **kwargs}) class move_copies(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("move_copies", {"a" : a, **kwargs}) class xcopies(_Bosl2Base): def __init__(self, spacing=None, n=None, l=None, sp=None, **kwargs): super().__init__("xcopies", {"spacing" : spacing, "n" : n, "l" : l, "sp" : sp, **kwargs}) class ycopies(_Bosl2Base): def __init__(self, spacing=None, n=None, l=None, sp=None, **kwargs): super().__init__("ycopies", {"spacing" : spacing, "n" : n, "l" : l, "sp" : sp, **kwargs}) class zcopies(_Bosl2Base): def __init__(self, spacing=None, n=None, l=None, sp=None, **kwargs): super().__init__("zcopies", {"spacing" : spacing, "n" : n, "l" : l, "sp" : sp, **kwargs}) class line_of(_Bosl2Base): def __init__(self, spacing=None, n=None, l=None, p1=None, p2=None, **kwargs): super().__init__("line_of", {"spacing" : spacing, "n" : n, "l" : l, "p1" : p1, "p2" : p2, **kwargs}) class line_copies(_Bosl2Base): def __init__(self, spacing=None, n=None, l=None, p1=None, p2=None, **kwargs): super().__init__("line_copies", {"spacing" : spacing, "n" : n, "l" : l, "p1" : p1, "p2" : p2, **kwargs}) class grid2d(_Bosl2Base): def __init__(self, spacing=None, n=None, size=None, stagger=None, inside=None, nonzero=None, **kwargs): super().__init__("grid2d", {"spacing" : spacing, "n" : n, "size" : size, "stagger" : stagger, "inside" : inside, "nonzero" : nonzero, **kwargs}) class grid_copies(_Bosl2Base): def __init__(self, spacing=None, n=None, size=None, stagger=None, inside=None, nonzero=None, axes=None, **kwargs): super().__init__("grid_copies", {"spacing" : spacing, "n" : n, "size" : size, "stagger" : stagger, "inside" : inside, "nonzero" : nonzero, "axes" : axes, **kwargs}) class rot_copies(_Bosl2Base): def __init__(self, rots=None, v=None, cp=None, n=None, sa=None, offset=None, delta=None, subrot=None, **kwargs): super().__init__("rot_copies", {"rots" : rots, "v" : v, "cp" : cp, "n" : n, "sa" : sa, "offset" : offset, "delta" : delta, "subrot" : subrot, **kwargs}) class xrot_copies(_Bosl2Base): def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None, subrot=None, **kwargs): super().__init__("xrot_copies", {"rots" : rots, "cp" : cp, "n" : n, "sa" : sa, "r" : r, "d" : d, "subrot" : subrot, **kwargs}) class yrot_copies(_Bosl2Base): def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None, subrot=None, **kwargs): super().__init__("yrot_copies", {"rots" : rots, "cp" : cp, "n" : n, "sa" : sa, "r" : r, "d" : d, "subrot" : subrot, **kwargs}) class zrot_copies(_Bosl2Base): def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None, subrot=None, **kwargs): super().__init__("zrot_copies", {"rots" : rots, "cp" : cp, "n" : n, "sa" : sa, "r" : r, "d" : d, "subrot" : subrot, **kwargs}) class arc_of(_Bosl2Base): def __init__(self, n=None, r=None, rx=None, ry=None, d=None, dx=None, dy=None, sa=None, ea=None, rot=None, **kwargs): super().__init__("arc_of", {"n" : n, "r" : r, "rx" : rx, "ry" : ry, "d" : d, "dx" : dx, "dy" : dy, "sa" : sa, "ea" : ea, "rot" : rot, **kwargs}) class arc_copies(_Bosl2Base): def __init__(self, n=None, r=None, rx=None, ry=None, d=None, dx=None, dy=None, sa=None, ea=None, rot=None, **kwargs): super().__init__("arc_copies", {"n" : n, "r" : r, "rx" : rx, "ry" : ry, "d" : d, "dx" : dx, "dy" : dy, "sa" : sa, "ea" : ea, "rot" : rot, **kwargs}) class ovoid_spread(_Bosl2Base): def __init__(self, n=None, r=None, d=None, cone_ang=None, scale=None, perp=None, **kwargs): super().__init__("ovoid_spread", {"n" : n, "r" : r, "d" : d, "cone_ang" : cone_ang, "scale" : scale, "perp" : perp, **kwargs}) class sphere_copies(_Bosl2Base): def __init__(self, n=None, r=None, d=None, cone_ang=None, scale=None, perp=None, **kwargs): super().__init__("sphere_copies", {"n" : n, "r" : r, "d" : d, "cone_ang" : cone_ang, "scale" : scale, "perp" : perp, **kwargs}) class path_spread(_Bosl2Base): def __init__(self, path=None, n=None, spacing=None, sp=None, rotate_children=None, dist=None, closed=None, **kwargs): super().__init__("path_spread", {"path" : path, "n" : n, "spacing" : spacing, "sp" : sp, "rotate_children" : rotate_children, "dist" : dist, "closed" : closed, **kwargs}) class path_copies(_Bosl2Base): def __init__(self, path=None, n=None, spacing=None, sp=None, dist=None, rotate_children=None, closed=None, **kwargs): super().__init__("path_copies", {"path" : path, "n" : n, "spacing" : spacing, "sp" : sp, "dist" : dist, "rotate_children" : rotate_children, "closed" : closed, **kwargs}) class xflip_copy(_Bosl2Base): def __init__(self, offset=None, x=None, **kwargs): super().__init__("xflip_copy", {"offset" : offset, "x" : x, **kwargs}) class yflip_copy(_Bosl2Base): def __init__(self, offset=None, y=None, **kwargs): super().__init__("yflip_copy", {"offset" : offset, "y" : y, **kwargs}) class zflip_copy(_Bosl2Base): def __init__(self, offset=None, z=None, **kwargs): super().__init__("zflip_copy", {"offset" : offset, "z" : z, **kwargs}) class mirror_copy(_Bosl2Base): def __init__(self, v=None, offset=None, cp=None, **kwargs): super().__init__("mirror_copy", {"v" : v, "offset" : offset, "cp" : cp, **kwargs}) class xdistribute(_Bosl2Base): def __init__(self, spacing=None, sizes=None, l=None, **kwargs): super().__init__("xdistribute", {"spacing" : spacing, "sizes" : sizes, "l" : l, **kwargs}) class ydistribute(_Bosl2Base): def __init__(self, spacing=None, sizes=None, l=None, **kwargs): super().__init__("ydistribute", {"spacing" : spacing, "sizes" : sizes, "l" : l, **kwargs}) class zdistribute(_Bosl2Base): def __init__(self, spacing=None, sizes=None, l=None, **kwargs): super().__init__("zdistribute", {"spacing" : spacing, "sizes" : sizes, "l" : l, **kwargs}) class distribute(_Bosl2Base): def __init__(self, spacing=None, sizes=None, dir=None, l=None, **kwargs): super().__init__("distribute", {"spacing" : spacing, "sizes" : sizes, "dir" : dir, "l" : l, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/drawing.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/drawing.scad'}", False) class stroke(_Bosl2Base): def __init__(self, path=None, width=None, closed=None, endcaps=None, endcap1=None, endcap2=None, joints=None, dots=None, endcap_width=None, endcap_width1=None, endcap_width2=None, joint_width=None, dots_width=None, endcap_length=None, endcap_length1=None, endcap_length2=None, joint_length=None, dots_length=None, endcap_extent=None, endcap_extent1=None, endcap_extent2=None, joint_extent=None, dots_extent=None, endcap_angle=None, endcap_angle1=None, endcap_angle2=None, joint_angle=None, dots_angle=None, endcap_color=None, endcap_color1=None, endcap_color2=None, joint_color=None, dots_color=None, color=None, trim=None, trim1=None, trim2=None, singleton_scale=None, convexity=None, **kwargs): super().__init__("stroke", {"path" : path, "width" : width, "closed" : closed, "endcaps" : endcaps, "endcap1" : endcap1, "endcap2" : endcap2, "joints" : joints, "dots" : dots, "endcap_width" : endcap_width, "endcap_width1" : endcap_width1, "endcap_width2" : endcap_width2, "joint_width" : joint_width, "dots_width" : dots_width, "endcap_length" : endcap_length, "endcap_length1" : endcap_length1, "endcap_length2" : endcap_length2, "joint_length" : joint_length, "dots_length" : dots_length, "endcap_extent" : endcap_extent, "endcap_extent1" : endcap_extent1, "endcap_extent2" : endcap_extent2, "joint_extent" : joint_extent, "dots_extent" : dots_extent, "endcap_angle" : endcap_angle, "endcap_angle1" : endcap_angle1, "endcap_angle2" : endcap_angle2, "joint_angle" : joint_angle, "dots_angle" : dots_angle, "endcap_color" : endcap_color, "endcap_color1" : endcap_color1, "endcap_color2" : endcap_color2, "joint_color" : joint_color, "dots_color" : dots_color, "color" : color, "trim" : trim, "trim1" : trim1, "trim2" : trim2, "singleton_scale" : singleton_scale, "convexity" : convexity, **kwargs}) class dashed_stroke(_Bosl2Base): def __init__(self, path=None, dashpat=None, closed=None, fit=None, mindash=None, **kwargs): super().__init__("dashed_stroke", {"path" : path, "dashpat" : dashpat, "closed" : closed, "fit" : fit, "mindash" : mindash, **kwargs}) class arc(_Bosl2Base): def __init__(self, n=None, r=None, angle=None, d=None, cp=None, points=None, corner=None, width=None, thickness=None, start=None, wedge=None, long=None, cw=None, ccw=None, endpoint=None, rounding=None, **kwargs): super().__init__("arc", {"n" : n, "r" : r, "angle" : angle, "d" : d, "cp" : cp, "points" : points, "corner" : corner, "width" : width, "thickness" : thickness, "start" : start, "wedge" : wedge, "long" : long, "cw" : cw, "ccw" : ccw, "endpoint" : endpoint, "rounding" : rounding, **kwargs}) class _rounded_arc(_Bosl2Base): def __init__(self, radius=None, rounding=None, angle=None, n=None, **kwargs): super().__init__("_rounded_arc", {"radius" : radius, "rounding" : rounding, "angle" : angle, "n" : n, **kwargs}) class catenary(_Bosl2Base): def __init__(self, width=None, droop=None, n=None, angle=None, **kwargs): super().__init__("catenary", {"width" : width, "droop" : droop, "n" : n, "angle" : angle, **kwargs}) class helix(_Bosl2Base): def __init__(self, l=None, h=None, turns=None, angle=None, r=None, r1=None, r2=None, d=None, d1=None, d2=None, **kwargs): super().__init__("helix", {"l" : l, "h" : h, "turns" : turns, "angle" : angle, "r" : r, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, **kwargs}) class _normal_segment(_Bosl2Base): def __init__(self, p1=None, p2=None, **kwargs): super().__init__("_normal_segment", {"p1" : p1, "p2" : p2, **kwargs}) class turtle(_Bosl2Base): def __init__(self, commands=None, state=None, full_state=None, repeat=None, **kwargs): super().__init__("turtle", {"commands" : commands, "state" : state, "full_state" : full_state, "repeat" : repeat, **kwargs}) class _turtle_repeat(_Bosl2Base): def __init__(self, commands=None, state=None, full_state=None, repeat=None, **kwargs): super().__init__("_turtle_repeat", {"commands" : commands, "state" : state, "full_state" : full_state, "repeat" : repeat, **kwargs}) class _turtle_command_len(_Bosl2Base): def __init__(self, commands=None, index=None, **kwargs): super().__init__("_turtle_command_len", {"commands" : commands, "index" : index, **kwargs}) class _turtle(_Bosl2Base): def __init__(self, commands=None, state=None, full_state=None, index=None, **kwargs): super().__init__("_turtle", {"commands" : commands, "state" : state, "full_state" : full_state, "index" : index, **kwargs}) class _turtle_command(_Bosl2Base): def __init__(self, command=None, parm=None, parm2=None, state=None, index=None, **kwargs): super().__init__("_turtle_command", {"command" : command, "parm" : parm, "parm2" : parm2, "state" : state, "index" : index, **kwargs}) class stroke(_Bosl2Base): def __init__(self, path=None, width=None, closed=None, endcaps=None, endcap1=None, endcap2=None, joints=None, dots=None, endcap_width=None, endcap_width1=None, endcap_width2=None, joint_width=None, dots_width=None, endcap_length=None, endcap_length1=None, endcap_length2=None, joint_length=None, dots_length=None, endcap_extent=None, endcap_extent1=None, endcap_extent2=None, joint_extent=None, dots_extent=None, endcap_angle=None, endcap_angle1=None, endcap_angle2=None, joint_angle=None, dots_angle=None, endcap_color=None, endcap_color1=None, endcap_color2=None, joint_color=None, dots_color=None, color=None, trim=None, trim1=None, trim2=None, singleton_scale=None, convexity=None, **kwargs): super().__init__("stroke", {"path" : path, "width" : width, "closed" : closed, "endcaps" : endcaps, "endcap1" : endcap1, "endcap2" : endcap2, "joints" : joints, "dots" : dots, "endcap_width" : endcap_width, "endcap_width1" : endcap_width1, "endcap_width2" : endcap_width2, "joint_width" : joint_width, "dots_width" : dots_width, "endcap_length" : endcap_length, "endcap_length1" : endcap_length1, "endcap_length2" : endcap_length2, "joint_length" : joint_length, "dots_length" : dots_length, "endcap_extent" : endcap_extent, "endcap_extent1" : endcap_extent1, "endcap_extent2" : endcap_extent2, "joint_extent" : joint_extent, "dots_extent" : dots_extent, "endcap_angle" : endcap_angle, "endcap_angle1" : endcap_angle1, "endcap_angle2" : endcap_angle2, "joint_angle" : joint_angle, "dots_angle" : dots_angle, "endcap_color" : endcap_color, "endcap_color1" : endcap_color1, "endcap_color2" : endcap_color2, "joint_color" : joint_color, "dots_color" : dots_color, "color" : color, "trim" : trim, "trim1" : trim1, "trim2" : trim2, "singleton_scale" : singleton_scale, "convexity" : convexity, **kwargs}) class dashed_stroke(_Bosl2Base): def __init__(self, path=None, dashpat=None, width=None, closed=None, fit=None, roundcaps=None, **kwargs): super().__init__("dashed_stroke", {"path" : path, "dashpat" : dashpat, "width" : width, "closed" : closed, "fit" : fit, "roundcaps" : roundcaps, **kwargs}) class arc(_Bosl2Base): def __init__(self, n=None, r=None, angle=None, d=None, cp=None, points=None, corner=None, width=None, thickness=None, start=None, wedge=None, rounding=None, anchor=None, spin=None, **kwargs): super().__init__("arc", {"n" : n, "r" : r, "angle" : angle, "d" : d, "cp" : cp, "points" : points, "corner" : corner, "width" : width, "thickness" : thickness, "start" : start, "wedge" : wedge, "rounding" : rounding, "anchor" : anchor, "spin" : spin, **kwargs}) class catenary(_Bosl2Base): def __init__(self, width=None, droop=None, n=None, angle=None, anchor=None, spin=None, **kwargs): super().__init__("catenary", {"width" : width, "droop" : droop, "n" : n, "angle" : angle, "anchor" : anchor, "spin" : spin, **kwargs}) class helix(_Bosl2Base): def __init__(self, l=None, h=None, turns=None, angle=None, r=None, r1=None, r2=None, d=None, d1=None, d2=None, **kwargs): super().__init__("helix", {"l" : l, "h" : h, "turns" : turns, "angle" : angle, "r" : r, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, **kwargs}) class turtle(_Bosl2Base): def __init__(self, commands=None, state=None, full_state=None, repeat=None, **kwargs): super().__init__("turtle", {"commands" : commands, "state" : state, "full_state" : full_state, "repeat" : repeat, **kwargs}) class debug_polygon(_Bosl2Base): def __init__(self, points=None, paths=None, vertices=None, edges=None, convexity=None, size=None, **kwargs): super().__init__("debug_polygon", {"points" : points, "paths" : paths, "vertices" : vertices, "edges" : edges, "convexity" : convexity, "size" : size, **kwargs}) class _debug_poly_verts(_Bosl2Base): def __init__(self, points=None, size=None, **kwargs): super().__init__("_debug_poly_verts", {"points" : points, "size" : size, **kwargs}) class _debug_poly_edges(_Bosl2Base): def __init__(self, j=None, points=None, path=None, vertices=None, size=None, **kwargs): super().__init__("_debug_poly_edges", {"j" : j, "points" : points, "path" : path, "vertices" : vertices, "size" : size, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/fnliterals.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/fnliterals.scad'}", False) class map(_Bosl2Base): def __init__(self, func=None, list=None, **kwargs): super().__init__("map", {"func" : func, "list" : list, **kwargs}) class filter(_Bosl2Base): def __init__(self, func=None, list=None, **kwargs): super().__init__("filter", {"func" : func, "list" : list, **kwargs}) class reduce(_Bosl2Base): def __init__(self, func=None, list=None, init=None, **kwargs): super().__init__("reduce", {"func" : func, "list" : list, "init" : init, **kwargs}) class accumulate(_Bosl2Base): def __init__(self, func=None, list=None, init=None, **kwargs): super().__init__("accumulate", {"func" : func, "list" : list, "init" : init, **kwargs}) class _while(_Bosl2Base): def __init__(self, init=None, cond=None, func=None, **kwargs): super().__init__("_while", {"init" : init, "cond" : cond, "func" : func, **kwargs}) class for_n(_Bosl2Base): def __init__(self, n=None, init=None, func=None, **kwargs): super().__init__("for_n", {"n" : n, "init" : init, "func" : func, **kwargs}) class find_all(_Bosl2Base): def __init__(self, func=None, list=None, **kwargs): super().__init__("find_all", {"func" : func, "list" : list, **kwargs}) class find_first(_Bosl2Base): def __init__(self, func=None, list=None, start=None, **kwargs): super().__init__("find_first", {"func" : func, "list" : list, "start" : start, **kwargs}) class binsearch(_Bosl2Base): def __init__(self, key=None, list=None, idx=None, cmp=None, **kwargs): super().__init__("binsearch", {"key" : key, "list" : list, "idx" : idx, "cmp" : cmp, **kwargs}) class simple_hash(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("simple_hash", {"x" : x, **kwargs}) class hashmap(_Bosl2Base): def __init__(self, hashsize=None, items=None, table=None, **kwargs): super().__init__("hashmap", {"hashsize" : hashsize, "items" : items, "table" : table, **kwargs}) class f_1arg(_Bosl2Base): def __init__(self, target_func=None, **kwargs): super().__init__("f_1arg", {"target_func" : target_func, **kwargs}) class f_2arg(_Bosl2Base): def __init__(self, target_func=None, **kwargs): super().__init__("f_2arg", {"target_func" : target_func, **kwargs}) class f_2arg_simple(_Bosl2Base): def __init__(self, target_func=None, **kwargs): super().__init__("f_2arg_simple", {"target_func" : target_func, **kwargs}) class f_3arg(_Bosl2Base): def __init__(self, target_func=None, **kwargs): super().__init__("f_3arg", {"target_func" : target_func, **kwargs}) class ival(_Bosl2Base): def __init__(self, target_func=None, **kwargs): super().__init__("ival", {"target_func" : target_func, **kwargs}) class xval(_Bosl2Base): def __init__(self, target_func=None, **kwargs): super().__init__("xval", {"target_func" : target_func, **kwargs}) class f_cmp(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_cmp", {"a" : a, "b" : b, **kwargs}) class f_gt(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_gt", {"a" : a, "b" : b, **kwargs}) class f_lt(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_lt", {"a" : a, "b" : b, **kwargs}) class f_gte(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_gte", {"a" : a, "b" : b, **kwargs}) class f_lte(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_lte", {"a" : a, "b" : b, **kwargs}) class f_eq(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_eq", {"a" : a, "b" : b, **kwargs}) class f_neq(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_neq", {"a" : a, "b" : b, **kwargs}) class f_approx(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_approx", {"a" : a, "b" : b, **kwargs}) class f_napprox(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_napprox", {"a" : a, "b" : b, **kwargs}) class f_or(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_or", {"a" : a, "b" : b, **kwargs}) class f_and(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_and", {"a" : a, "b" : b, **kwargs}) class f_nor(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_nor", {"a" : a, "b" : b, **kwargs}) class f_nand(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_nand", {"a" : a, "b" : b, **kwargs}) class f_xor(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_xor", {"a" : a, "b" : b, **kwargs}) class f_not(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_not", {"a" : a, **kwargs}) class f_even(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_even", {"a" : a, **kwargs}) class f_odd(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_odd", {"a" : a, **kwargs}) class f_add(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_add", {"a" : a, "b" : b, **kwargs}) class f_sub(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_sub", {"a" : a, "b" : b, **kwargs}) class f_mul(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_mul", {"a" : a, "b" : b, **kwargs}) class f_div(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_div", {"a" : a, "b" : b, **kwargs}) class f_mod(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_mod", {"a" : a, "b" : b, **kwargs}) class f_pow(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_pow", {"a" : a, "b" : b, **kwargs}) class f_neg(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_neg", {"a" : a, **kwargs}) class f_min(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_min", {"a" : a, **kwargs}) class f_max(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_max", {"a" : a, **kwargs}) class f_min2(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_min2", {"a" : a, "b" : b, **kwargs}) class f_max2(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_max2", {"a" : a, "b" : b, **kwargs}) class f_min3(_Bosl2Base): def __init__(self, a=None, b=None, c=None, **kwargs): super().__init__("f_min3", {"a" : a, "b" : b, "c" : c, **kwargs}) class f_max3(_Bosl2Base): def __init__(self, a=None, b=None, c=None, **kwargs): super().__init__("f_max3", {"a" : a, "b" : b, "c" : c, **kwargs}) class f_sin(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_sin", {"a" : a, **kwargs}) class f_cos(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_cos", {"a" : a, **kwargs}) class f_tan(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_tan", {"a" : a, **kwargs}) class f_asin(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_asin", {"a" : a, **kwargs}) class f_acos(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_acos", {"a" : a, **kwargs}) class f_atan(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_atan", {"a" : a, **kwargs}) class f_atan2(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_atan2", {"a" : a, "b" : b, **kwargs}) class f_len(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_len", {"a" : a, **kwargs}) class f_chr(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_chr", {"a" : a, **kwargs}) class f_ord(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_ord", {"a" : a, **kwargs}) class f_str(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_str", {"a" : a, **kwargs}) class f_str2(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_str2", {"a" : a, "b" : b, **kwargs}) class f_str3(_Bosl2Base): def __init__(self, a=None, b=None, c=None, **kwargs): super().__init__("f_str3", {"a" : a, "b" : b, "c" : c, **kwargs}) class f_floor(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_floor", {"a" : a, **kwargs}) class f_round(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_round", {"a" : a, **kwargs}) class f_ceil(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_ceil", {"a" : a, **kwargs}) class f_abs(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_abs", {"a" : a, **kwargs}) class f_sign(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_sign", {"a" : a, **kwargs}) class f_ln(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_ln", {"a" : a, **kwargs}) class f_log(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_log", {"a" : a, **kwargs}) class f_exp(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_exp", {"a" : a, **kwargs}) class f_sqr(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_sqr", {"a" : a, **kwargs}) class f_sqrt(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_sqrt", {"a" : a, **kwargs}) class f_norm(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_norm", {"a" : a, **kwargs}) class f_cross(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_cross", {"a" : a, "b" : b, **kwargs}) class f_is_def(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_is_def", {"a" : a, **kwargs}) class f_is_undef(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_is_undef", {"a" : a, **kwargs}) class f_is_bool(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_is_bool", {"a" : a, **kwargs}) class f_is_num(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_is_num", {"a" : a, **kwargs}) class f_is_int(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_is_int", {"a" : a, **kwargs}) class f_is_nan(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_is_nan", {"a" : a, **kwargs}) class f_is_finite(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_is_finite", {"a" : a, **kwargs}) class f_is_string(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_is_string", {"a" : a, **kwargs}) class f_is_list(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_is_list", {"a" : a, **kwargs}) class f_is_range(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_is_range", {"a" : a, **kwargs}) class f_is_function(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_is_function", {"a" : a, **kwargs}) class f_is_vector(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_is_vector", {"a" : a, "b" : b, **kwargs}) class f_is_path(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("f_is_path", {"a" : a, "b" : b, **kwargs}) class f_is_region(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_is_region", {"a" : a, **kwargs}) class f_is_vnf(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_is_vnf", {"a" : a, **kwargs}) class f_is_patch(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("f_is_patch", {"a" : a, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/gears.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/gears.scad'}", False) _GEAR_PITCH = _OpenSCADConstant('_GEAR_PITCH') _GEAR_HELICAL = _OpenSCADConstant('_GEAR_HELICAL') _GEAR_THICKNESS = _OpenSCADConstant('_GEAR_THICKNESS') _GEAR_PA = _OpenSCADConstant('_GEAR_PA') _parent_gear_type = _OpenSCADConstant('_parent_gear_type') _parent_gear_pitch = _OpenSCADConstant('_parent_gear_pitch') _parent_gear_teeth = _OpenSCADConstant('_parent_gear_teeth') _parent_gear_pa = _OpenSCADConstant('_parent_gear_pa') _parent_gear_helical = _OpenSCADConstant('_parent_gear_helical') _parent_gear_thickness = _OpenSCADConstant('_parent_gear_thickness') _parent_gear_dir = _OpenSCADConstant('_parent_gear_dir') _parent_gear_travel = _OpenSCADConstant('_parent_gear_travel') class _inherit_gear_param(_Bosl2Base): def __init__(self, name=None, val=None, pval=None, dflt=None, invert=None, **kwargs): super().__init__("_inherit_gear_param", {"name" : name, "val" : val, "pval" : pval, "dflt" : dflt, "invert" : invert, **kwargs}) class _inherit_gear_pitch(_Bosl2Base): def __init__(self, fname=None, pitch=None, circ_pitch=None, diam_pitch=None, mod=None, warn=None, **kwargs): super().__init__("_inherit_gear_pitch", {"fname" : fname, "pitch" : pitch, "circ_pitch" : circ_pitch, "diam_pitch" : diam_pitch, "mod" : mod, "warn" : warn, **kwargs}) class _inherit_gear_pa(_Bosl2Base): def __init__(self, pressure_angle=None, **kwargs): super().__init__("_inherit_gear_pa", {"pressure_angle" : pressure_angle, **kwargs}) class _inherit_gear_helical(_Bosl2Base): def __init__(self, helical=None, invert=None, **kwargs): super().__init__("_inherit_gear_helical", {"helical" : helical, "invert" : invert, **kwargs}) class _inherit_gear_thickness(_Bosl2Base): def __init__(self, thickness=None, dflt=None, **kwargs): super().__init__("_inherit_gear_thickness", {"thickness" : thickness, "dflt" : dflt, **kwargs}) class spur_gear(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, thickness=None, shaft_diam=None, hide=None, pressure_angle=None, clearance=None, backlash=None, helical=None, interior=None, internal=None, profile_shift=None, slices=None, herringbone=None, shorten=None, diam_pitch=None, mod=None, pitch=None, gear_spin=None, atype=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("spur_gear", {"circ_pitch" : circ_pitch, "teeth" : teeth, "thickness" : thickness, "shaft_diam" : shaft_diam, "hide" : hide, "pressure_angle" : pressure_angle, "clearance" : clearance, "backlash" : backlash, "helical" : helical, "interior" : interior, "internal" : internal, "profile_shift" : profile_shift, "slices" : slices, "herringbone" : herringbone, "shorten" : shorten, "diam_pitch" : diam_pitch, "mod" : mod, "pitch" : pitch, "gear_spin" : gear_spin, "atype" : atype, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class spur_gear2d(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, hide=None, pressure_angle=None, clearance=None, backlash=None, internal=None, interior=None, profile_shift=None, helical=None, shaft_diam=None, shorten=None, pitch=None, diam_pitch=None, mod=None, gear_spin=None, atype=None, anchor=None, spin=None, **kwargs): super().__init__("spur_gear2d", {"circ_pitch" : circ_pitch, "teeth" : teeth, "hide" : hide, "pressure_angle" : pressure_angle, "clearance" : clearance, "backlash" : backlash, "internal" : internal, "interior" : interior, "profile_shift" : profile_shift, "helical" : helical, "shaft_diam" : shaft_diam, "shorten" : shorten, "pitch" : pitch, "diam_pitch" : diam_pitch, "mod" : mod, "gear_spin" : gear_spin, "atype" : atype, "anchor" : anchor, "spin" : spin, **kwargs}) class rack(_Bosl2Base): def __init__(self, pitch=None, teeth=None, thickness=None, backing=None, bottom=None, width=None, pressure_angle=None, backlash=None, clearance=None, helical=None, herringbone=None, profile_shift=None, circ_pitch=None, diam_pitch=None, mod=None, gear_travel=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("rack", {"pitch" : pitch, "teeth" : teeth, "thickness" : thickness, "backing" : backing, "bottom" : bottom, "width" : width, "pressure_angle" : pressure_angle, "backlash" : backlash, "clearance" : clearance, "helical" : helical, "herringbone" : herringbone, "profile_shift" : profile_shift, "circ_pitch" : circ_pitch, "diam_pitch" : diam_pitch, "mod" : mod, "gear_travel" : gear_travel, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class rack2d(_Bosl2Base): def __init__(self, pitch=None, teeth=None, backing=None, pressure_angle=None, backlash=None, clearance=None, helical=None, profile_shift=None, circ_pitch=None, diam_pitch=None, mod=None, width=None, bottom=None, gear_travel=None, rounding=None, anchor=None, spin=None, **kwargs): super().__init__("rack2d", {"pitch" : pitch, "teeth" : teeth, "backing" : backing, "pressure_angle" : pressure_angle, "backlash" : backlash, "clearance" : clearance, "helical" : helical, "profile_shift" : profile_shift, "circ_pitch" : circ_pitch, "diam_pitch" : diam_pitch, "mod" : mod, "width" : width, "bottom" : bottom, "gear_travel" : gear_travel, "rounding" : rounding, "anchor" : anchor, "spin" : spin, **kwargs}) class crown_gear(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, backing=None, face_width=None, pressure_angle=None, clearance=None, backlash=None, profile_shift=None, slices=None, bottom=None, thickness=None, diam_pitch=None, pitch=None, mod=None, gear_spin=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("crown_gear", {"circ_pitch" : circ_pitch, "teeth" : teeth, "backing" : backing, "face_width" : face_width, "pressure_angle" : pressure_angle, "clearance" : clearance, "backlash" : backlash, "profile_shift" : profile_shift, "slices" : slices, "bottom" : bottom, "thickness" : thickness, "diam_pitch" : diam_pitch, "pitch" : pitch, "mod" : mod, "gear_spin" : gear_spin, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class bevel_gear(_Bosl2Base): def __init__(self, teeth=None, mate_teeth=None, shaft_angle=None, backing=None, thickness=None, bottom=None, face_width=None, pressure_angle=None, clearance=None, backlash=None, cutter_radius=None, spiral=None, right_handed=None, slices=None, cone_backing=None, pitch=None, circ_pitch=None, diam_pitch=None, mod=None, anchor=None, spin=None, gear_spin=None, orient=None, _return_anchors=None, **kwargs): super().__init__("bevel_gear", {"teeth" : teeth, "mate_teeth" : mate_teeth, "shaft_angle" : shaft_angle, "backing" : backing, "thickness" : thickness, "bottom" : bottom, "face_width" : face_width, "pressure_angle" : pressure_angle, "clearance" : clearance, "backlash" : backlash, "cutter_radius" : cutter_radius, "spiral" : spiral, "right_handed" : right_handed, "slices" : slices, "cone_backing" : cone_backing, "pitch" : pitch, "circ_pitch" : circ_pitch, "diam_pitch" : diam_pitch, "mod" : mod, "anchor" : anchor, "spin" : spin, "gear_spin" : gear_spin, "orient" : orient, "_return_anchors" : _return_anchors, **kwargs}) class worm(_Bosl2Base): def __init__(self, circ_pitch=None, d=None, l=None, starts=None, left_handed=None, pressure_angle=None, backlash=None, clearance=None, diam_pitch=None, mod=None, pitch=None, gear_spin=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("worm", {"circ_pitch" : circ_pitch, "d" : d, "l" : l, "starts" : starts, "left_handed" : left_handed, "pressure_angle" : pressure_angle, "backlash" : backlash, "clearance" : clearance, "diam_pitch" : diam_pitch, "mod" : mod, "pitch" : pitch, "gear_spin" : gear_spin, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class enveloping_worm(_Bosl2Base): def __init__(self, circ_pitch=None, mate_teeth=None, d=None, left_handed=None, starts=None, arc=None, pressure_angle=None, gear_spin=None, rounding=None, taper=None, diam_pitch=None, mod=None, pitch=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("enveloping_worm", {"circ_pitch" : circ_pitch, "mate_teeth" : mate_teeth, "d" : d, "left_handed" : left_handed, "starts" : starts, "arc" : arc, "pressure_angle" : pressure_angle, "gear_spin" : gear_spin, "rounding" : rounding, "taper" : taper, "diam_pitch" : diam_pitch, "mod" : mod, "pitch" : pitch, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class worm_gear(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, worm_diam=None, worm_starts=None, worm_arc=None, crowning=None, left_handed=None, pressure_angle=None, backlash=None, clearance=None, profile_shift=None, slices=None, gear_spin=None, pitch=None, diam_pitch=None, mod=None, get_thickness=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("worm_gear", {"circ_pitch" : circ_pitch, "teeth" : teeth, "worm_diam" : worm_diam, "worm_starts" : worm_starts, "worm_arc" : worm_arc, "crowning" : crowning, "left_handed" : left_handed, "pressure_angle" : pressure_angle, "backlash" : backlash, "clearance" : clearance, "profile_shift" : profile_shift, "slices" : slices, "gear_spin" : gear_spin, "pitch" : pitch, "diam_pitch" : diam_pitch, "mod" : mod, "get_thickness" : get_thickness, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class _gear_tooth_profile(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, pressure_angle=None, clearance=None, backlash=None, helical=None, internal=None, profile_shift=None, shorten=None, mod=None, diam_pitch=None, pitch=None, center=None, **kwargs): super().__init__("_gear_tooth_profile", {"circ_pitch" : circ_pitch, "teeth" : teeth, "pressure_angle" : pressure_angle, "clearance" : clearance, "backlash" : backlash, "helical" : helical, "internal" : internal, "profile_shift" : profile_shift, "shorten" : shorten, "mod" : mod, "diam_pitch" : diam_pitch, "pitch" : pitch, "center" : center, **kwargs}) class planetary_gears(_Bosl2Base): def __init__(self, n=None, max_teeth=None, helical=None, circ_pitch=None, mod=None, diam_pitch=None, ring_carrier=None, carrier_ring=None, sun_carrier=None, carrier_sun=None, sun_ring=None, ring_sun=None, gear_spin=None, **kwargs): super().__init__("planetary_gears", {"n" : n, "max_teeth" : max_teeth, "helical" : helical, "circ_pitch" : circ_pitch, "mod" : mod, "diam_pitch" : diam_pitch, "ring_carrier" : ring_carrier, "carrier_ring" : carrier_ring, "sun_carrier" : sun_carrier, "carrier_sun" : carrier_sun, "sun_ring" : sun_ring, "ring_sun" : ring_sun, "gear_spin" : gear_spin, **kwargs}) class circular_pitch(_Bosl2Base): def __init__(self, circ_pitch=None, mod=None, pitch=None, diam_pitch=None, **kwargs): super().__init__("circular_pitch", {"circ_pitch" : circ_pitch, "mod" : mod, "pitch" : pitch, "diam_pitch" : diam_pitch, **kwargs}) class diametral_pitch(_Bosl2Base): def __init__(self, circ_pitch=None, mod=None, pitch=None, diam_pitch=None, **kwargs): super().__init__("diametral_pitch", {"circ_pitch" : circ_pitch, "mod" : mod, "pitch" : pitch, "diam_pitch" : diam_pitch, **kwargs}) class module_value(_Bosl2Base): def __init__(self, circ_pitch=None, mod=None, pitch=None, diam_pitch=None, **kwargs): super().__init__("module_value", {"circ_pitch" : circ_pitch, "mod" : mod, "pitch" : pitch, "diam_pitch" : diam_pitch, **kwargs}) class _adendum(_Bosl2Base): def __init__(self, circ_pitch=None, profile_shift=None, shorten=None, diam_pitch=None, mod=None, pitch=None, **kwargs): super().__init__("_adendum", {"circ_pitch" : circ_pitch, "profile_shift" : profile_shift, "shorten" : shorten, "diam_pitch" : diam_pitch, "mod" : mod, "pitch" : pitch, **kwargs}) class _dedendum(_Bosl2Base): def __init__(self, circ_pitch=None, clearance=None, profile_shift=None, diam_pitch=None, mod=None, pitch=None, **kwargs): super().__init__("_dedendum", {"circ_pitch" : circ_pitch, "clearance" : clearance, "profile_shift" : profile_shift, "diam_pitch" : diam_pitch, "mod" : mod, "pitch" : pitch, **kwargs}) class pitch_radius(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, helical=None, mod=None, diam_pitch=None, pitch=None, **kwargs): super().__init__("pitch_radius", {"circ_pitch" : circ_pitch, "teeth" : teeth, "helical" : helical, "mod" : mod, "diam_pitch" : diam_pitch, "pitch" : pitch, **kwargs}) class outer_radius(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, clearance=None, internal=None, helical=None, profile_shift=None, pressure_angle=None, shorten=None, mod=None, pitch=None, diam_pitch=None, **kwargs): super().__init__("outer_radius", {"circ_pitch" : circ_pitch, "teeth" : teeth, "clearance" : clearance, "internal" : internal, "helical" : helical, "profile_shift" : profile_shift, "pressure_angle" : pressure_angle, "shorten" : shorten, "mod" : mod, "pitch" : pitch, "diam_pitch" : diam_pitch, **kwargs}) class root_radius(_Bosl2Base): def __init__(self, teeth=None, helical=None, clearance=None, internal=None, profile_shift=None, pressure_angle=None, mod=None, pitch=None, diam_pitch=None, backlash=None, **kwargs): super().__init__("root_radius", {"teeth" : teeth, "helical" : helical, "clearance" : clearance, "internal" : internal, "profile_shift" : profile_shift, "pressure_angle" : pressure_angle, "mod" : mod, "pitch" : pitch, "diam_pitch" : diam_pitch, "backlash" : backlash, **kwargs}) class _root_radius_basic(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, clearance=None, internal=None, helical=None, profile_shift=None, diam_pitch=None, mod=None, pitch=None, **kwargs): super().__init__("_root_radius_basic", {"circ_pitch" : circ_pitch, "teeth" : teeth, "clearance" : clearance, "internal" : internal, "helical" : helical, "profile_shift" : profile_shift, "diam_pitch" : diam_pitch, "mod" : mod, "pitch" : pitch, **kwargs}) class _base_radius(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, pressure_angle=None, helical=None, diam_pitch=None, mod=None, pitch=None, **kwargs): super().__init__("_base_radius", {"circ_pitch" : circ_pitch, "teeth" : teeth, "pressure_angle" : pressure_angle, "helical" : helical, "diam_pitch" : diam_pitch, "mod" : mod, "pitch" : pitch, **kwargs}) class bevel_pitch_angle(_Bosl2Base): def __init__(self, teeth=None, mate_teeth=None, drive_angle=None, **kwargs): super().__init__("bevel_pitch_angle", {"teeth" : teeth, "mate_teeth" : mate_teeth, "drive_angle" : drive_angle, **kwargs}) class worm_gear_thickness(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, worm_diam=None, worm_arc=None, pressure_angle=None, crowning=None, clearance=None, diam_pitch=None, mod=None, pitch=None, **kwargs): super().__init__("worm_gear_thickness", {"circ_pitch" : circ_pitch, "teeth" : teeth, "worm_diam" : worm_diam, "worm_arc" : worm_arc, "pressure_angle" : pressure_angle, "crowning" : crowning, "clearance" : clearance, "diam_pitch" : diam_pitch, "mod" : mod, "pitch" : pitch, **kwargs}) class worm_dist(_Bosl2Base): def __init__(self, d=None, starts=None, teeth=None, mod=None, profile_shift=None, diam_pitch=None, circ_pitch=None, pressure_angle=None, backlash=None, **kwargs): super().__init__("worm_dist", {"d" : d, "starts" : starts, "teeth" : teeth, "mod" : mod, "profile_shift" : profile_shift, "diam_pitch" : diam_pitch, "circ_pitch" : circ_pitch, "pressure_angle" : pressure_angle, "backlash" : backlash, **kwargs}) class gear_dist(_Bosl2Base): def __init__(self, teeth1=None, teeth2=None, helical=None, profile_shift1=None, profile_shift2=None, internal1=None, internal2=None, backlash=None, pressure_angle=None, diam_pitch=None, circ_pitch=None, mod=None, **kwargs): super().__init__("gear_dist", {"teeth1" : teeth1, "teeth2" : teeth2, "helical" : helical, "profile_shift1" : profile_shift1, "profile_shift2" : profile_shift2, "internal1" : internal1, "internal2" : internal2, "backlash" : backlash, "pressure_angle" : pressure_angle, "diam_pitch" : diam_pitch, "circ_pitch" : circ_pitch, "mod" : mod, **kwargs}) class _invol(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("_invol", {"a" : a, **kwargs}) class _working_pressure_angle(_Bosl2Base): def __init__(self, teeth1=None, profile_shift1=None, teeth2=None, profile_shift2=None, pressure_angle=None, helical=None, **kwargs): super().__init__("_working_pressure_angle", {"teeth1" : teeth1, "profile_shift1" : profile_shift1, "teeth2" : teeth2, "profile_shift2" : profile_shift2, "pressure_angle" : pressure_angle, "helical" : helical, **kwargs}) class gear_dist_skew(_Bosl2Base): def __init__(self, teeth1=None, teeth2=None, helical1=None, helical2=None, profile_shift1=None, profile_shift2=None, pressure_angle=None, mod=None, circ_pitch=None, diam_pitch=None, backlash=None, **kwargs): super().__init__("gear_dist_skew", {"teeth1" : teeth1, "teeth2" : teeth2, "helical1" : helical1, "helical2" : helical2, "profile_shift1" : profile_shift1, "profile_shift2" : profile_shift2, "pressure_angle" : pressure_angle, "mod" : mod, "circ_pitch" : circ_pitch, "diam_pitch" : diam_pitch, "backlash" : backlash, **kwargs}) class _working_normal_pressure_angle_skew(_Bosl2Base): def __init__(self, teeth1=None, profile_shift1=None, helical1=None, teeth2=None, profile_shift2=None, helical2=None, pressure_angle=None, **kwargs): super().__init__("_working_normal_pressure_angle_skew", {"teeth1" : teeth1, "profile_shift1" : profile_shift1, "helical1" : helical1, "teeth2" : teeth2, "profile_shift2" : profile_shift2, "helical2" : helical2, "pressure_angle" : pressure_angle, **kwargs}) class gear_skew_angle(_Bosl2Base): def __init__(self, teeth1=None, teeth2=None, helical1=None, helical2=None, profile_shift1=None, profile_shift2=None, pressure_angle=None, **kwargs): super().__init__("gear_skew_angle", {"teeth1" : teeth1, "teeth2" : teeth2, "helical1" : helical1, "helical2" : helical2, "profile_shift1" : profile_shift1, "profile_shift2" : profile_shift2, "pressure_angle" : pressure_angle, **kwargs}) class get_profile_shift(_Bosl2Base): def __init__(self, desired=None, teeth1=None, teeth2=None, helical=None, pressure_angle=None, mod=None, diam_pitch=None, circ_pitch=None, **kwargs): super().__init__("get_profile_shift", {"desired" : desired, "teeth1" : teeth1, "teeth2" : teeth2, "helical" : helical, "pressure_angle" : pressure_angle, "mod" : mod, "diam_pitch" : diam_pitch, "circ_pitch" : circ_pitch, **kwargs}) class auto_profile_shift(_Bosl2Base): def __init__(self, teeth=None, pressure_angle=None, helical=None, min_teeth=None, profile_shift=None, get_min=None, **kwargs): super().__init__("auto_profile_shift", {"teeth" : teeth, "pressure_angle" : pressure_angle, "helical" : helical, "min_teeth" : min_teeth, "profile_shift" : profile_shift, "get_min" : get_min, **kwargs}) class gear_shorten(_Bosl2Base): def __init__(self, teeth1=None, teeth2=None, helical=None, profile_shift1=None, profile_shift2=None, pressure_angle=None, **kwargs): super().__init__("gear_shorten", {"teeth1" : teeth1, "teeth2" : teeth2, "helical" : helical, "profile_shift1" : profile_shift1, "profile_shift2" : profile_shift2, "pressure_angle" : pressure_angle, **kwargs}) class gear_shorten_skew(_Bosl2Base): def __init__(self, teeth1=None, teeth2=None, helical1=None, helical2=None, profile_shift1=None, profile_shift2=None, pressure_angle=None, **kwargs): super().__init__("gear_shorten_skew", {"teeth1" : teeth1, "teeth2" : teeth2, "helical1" : helical1, "helical2" : helical2, "profile_shift1" : profile_shift1, "profile_shift2" : profile_shift2, "pressure_angle" : pressure_angle, **kwargs}) class spur_gear(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, thickness=None, shaft_diam=None, hide=None, pressure_angle=None, clearance=None, backlash=None, helical=None, internal=None, interior=None, profile_shift=None, slices=None, herringbone=None, shorten=None, pitch=None, diam_pitch=None, mod=None, atype=None, gear_spin=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("spur_gear", {"circ_pitch" : circ_pitch, "teeth" : teeth, "thickness" : thickness, "shaft_diam" : shaft_diam, "hide" : hide, "pressure_angle" : pressure_angle, "clearance" : clearance, "backlash" : backlash, "helical" : helical, "internal" : internal, "interior" : interior, "profile_shift" : profile_shift, "slices" : slices, "herringbone" : herringbone, "shorten" : shorten, "pitch" : pitch, "diam_pitch" : diam_pitch, "mod" : mod, "atype" : atype, "gear_spin" : gear_spin, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class spur_gear2d(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, hide=None, pressure_angle=None, clearance=None, backlash=None, internal=None, interior=None, profile_shift=None, helical=None, shorten=None, shaft_diam=None, pitch=None, diam_pitch=None, mod=None, gear_spin=None, atype=None, anchor=None, spin=None, **kwargs): super().__init__("spur_gear2d", {"circ_pitch" : circ_pitch, "teeth" : teeth, "hide" : hide, "pressure_angle" : pressure_angle, "clearance" : clearance, "backlash" : backlash, "internal" : internal, "interior" : interior, "profile_shift" : profile_shift, "helical" : helical, "shorten" : shorten, "shaft_diam" : shaft_diam, "pitch" : pitch, "diam_pitch" : diam_pitch, "mod" : mod, "gear_spin" : gear_spin, "atype" : atype, "anchor" : anchor, "spin" : spin, **kwargs}) class ring_gear(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, thickness=None, backing=None, pressure_angle=None, helical=None, herringbone=None, profile_shift=None, clearance=None, backlash=None, _or=None, od=None, width=None, pitch=None, diam_pitch=None, mod=None, slices=None, gear_spin=None, anchor=None, atype=None, spin=None, orient=None, **kwargs): super().__init__("ring_gear", {"circ_pitch" : circ_pitch, "teeth" : teeth, "thickness" : thickness, "backing" : backing, "pressure_angle" : pressure_angle, "helical" : helical, "herringbone" : herringbone, "profile_shift" : profile_shift, "clearance" : clearance, "backlash" : backlash, "_or" : _or, "od" : od, "width" : width, "pitch" : pitch, "diam_pitch" : diam_pitch, "mod" : mod, "slices" : slices, "gear_spin" : gear_spin, "anchor" : anchor, "atype" : atype, "spin" : spin, "orient" : orient, **kwargs}) class ring_gear2d(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, backing=None, pressure_angle=None, helical=None, profile_shift=None, clearance=None, backlash=None, _or=None, od=None, width=None, pitch=None, diam_pitch=None, mod=None, atype=None, gear_spin=None, shorten=None, anchor=None, spin=None, **kwargs): super().__init__("ring_gear2d", {"circ_pitch" : circ_pitch, "teeth" : teeth, "backing" : backing, "pressure_angle" : pressure_angle, "helical" : helical, "profile_shift" : profile_shift, "clearance" : clearance, "backlash" : backlash, "_or" : _or, "od" : od, "width" : width, "pitch" : pitch, "diam_pitch" : diam_pitch, "mod" : mod, "atype" : atype, "gear_spin" : gear_spin, "shorten" : shorten, "anchor" : anchor, "spin" : spin, **kwargs}) class rack(_Bosl2Base): def __init__(self, pitch=None, teeth=None, thickness=None, backing=None, width=None, bottom=None, pressure_angle=None, backlash=None, clearance=None, helical=None, herringbone=None, profile_shift=None, gear_travel=None, circ_pitch=None, diam_pitch=None, mod=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("rack", {"pitch" : pitch, "teeth" : teeth, "thickness" : thickness, "backing" : backing, "width" : width, "bottom" : bottom, "pressure_angle" : pressure_angle, "backlash" : backlash, "clearance" : clearance, "helical" : helical, "herringbone" : herringbone, "profile_shift" : profile_shift, "gear_travel" : gear_travel, "circ_pitch" : circ_pitch, "diam_pitch" : diam_pitch, "mod" : mod, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class rack2d(_Bosl2Base): def __init__(self, pitch=None, teeth=None, backing=None, width=None, bottom=None, pressure_angle=None, backlash=None, clearance=None, helical=None, profile_shift=None, gear_travel=None, circ_pitch=None, diam_pitch=None, mod=None, rounding=None, anchor=None, spin=None, **kwargs): super().__init__("rack2d", {"pitch" : pitch, "teeth" : teeth, "backing" : backing, "width" : width, "bottom" : bottom, "pressure_angle" : pressure_angle, "backlash" : backlash, "clearance" : clearance, "helical" : helical, "profile_shift" : profile_shift, "gear_travel" : gear_travel, "circ_pitch" : circ_pitch, "diam_pitch" : diam_pitch, "mod" : mod, "rounding" : rounding, "anchor" : anchor, "spin" : spin, **kwargs}) class crown_gear(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, backing=None, face_width=None, pressure_angle=None, clearance=None, backlash=None, profile_shift=None, slices=None, bottom=None, thickness=None, diam_pitch=None, pitch=None, mod=None, gear_spin=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("crown_gear", {"circ_pitch" : circ_pitch, "teeth" : teeth, "backing" : backing, "face_width" : face_width, "pressure_angle" : pressure_angle, "clearance" : clearance, "backlash" : backlash, "profile_shift" : profile_shift, "slices" : slices, "bottom" : bottom, "thickness" : thickness, "diam_pitch" : diam_pitch, "pitch" : pitch, "mod" : mod, "gear_spin" : gear_spin, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class bevel_gear(_Bosl2Base): def __init__(self, teeth=None, mate_teeth=None, shaft_angle=None, bottom=None, backing=None, thickness=None, cone_backing=None, face_width=None, shaft_diam=None, pressure_angle=None, clearance=None, backlash=None, cutter_radius=None, spiral=None, right_handed=None, slices=None, pitch=None, diam_pitch=None, circ_pitch=None, mod=None, anchor=None, spin=None, gear_spin=None, orient=None, **kwargs): super().__init__("bevel_gear", {"teeth" : teeth, "mate_teeth" : mate_teeth, "shaft_angle" : shaft_angle, "bottom" : bottom, "backing" : backing, "thickness" : thickness, "cone_backing" : cone_backing, "face_width" : face_width, "shaft_diam" : shaft_diam, "pressure_angle" : pressure_angle, "clearance" : clearance, "backlash" : backlash, "cutter_radius" : cutter_radius, "spiral" : spiral, "right_handed" : right_handed, "slices" : slices, "pitch" : pitch, "diam_pitch" : diam_pitch, "circ_pitch" : circ_pitch, "mod" : mod, "anchor" : anchor, "spin" : spin, "gear_spin" : gear_spin, "orient" : orient, **kwargs}) class worm(_Bosl2Base): def __init__(self, circ_pitch=None, d=None, l=None, starts=None, left_handed=None, pressure_angle=None, backlash=None, clearance=None, pitch=None, diam_pitch=None, mod=None, gear_spin=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("worm", {"circ_pitch" : circ_pitch, "d" : d, "l" : l, "starts" : starts, "left_handed" : left_handed, "pressure_angle" : pressure_angle, "backlash" : backlash, "clearance" : clearance, "pitch" : pitch, "diam_pitch" : diam_pitch, "mod" : mod, "gear_spin" : gear_spin, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class enveloping_worm(_Bosl2Base): def __init__(self, circ_pitch=None, mate_teeth=None, d=None, left_handed=None, starts=None, arc=None, pressure_angle=None, gear_spin=None, rounding=None, taper=None, diam_pitch=None, mod=None, pitch=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("enveloping_worm", {"circ_pitch" : circ_pitch, "mate_teeth" : mate_teeth, "d" : d, "left_handed" : left_handed, "starts" : starts, "arc" : arc, "pressure_angle" : pressure_angle, "gear_spin" : gear_spin, "rounding" : rounding, "taper" : taper, "diam_pitch" : diam_pitch, "mod" : mod, "pitch" : pitch, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class worm_gear(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, worm_diam=None, worm_starts=None, worm_arc=None, crowning=None, left_handed=None, pressure_angle=None, backlash=None, clearance=None, profile_shift=None, slices=None, shaft_diam=None, gear_spin=None, pitch=None, diam_pitch=None, mod=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("worm_gear", {"circ_pitch" : circ_pitch, "teeth" : teeth, "worm_diam" : worm_diam, "worm_starts" : worm_starts, "worm_arc" : worm_arc, "crowning" : crowning, "left_handed" : left_handed, "pressure_angle" : pressure_angle, "backlash" : backlash, "clearance" : clearance, "profile_shift" : profile_shift, "slices" : slices, "shaft_diam" : shaft_diam, "gear_spin" : gear_spin, "pitch" : pitch, "diam_pitch" : diam_pitch, "mod" : mod, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class _show_gear_tooth_profile(_Bosl2Base): def __init__(self, circ_pitch=None, teeth=None, pressure_angle=None, profile_shift=None, helical=None, internal=None, clearance=None, backlash=None, show_verts=None, diam_pitch=None, mod=None, **kwargs): super().__init__("_show_gear_tooth_profile", {"circ_pitch" : circ_pitch, "teeth" : teeth, "pressure_angle" : pressure_angle, "profile_shift" : profile_shift, "helical" : helical, "internal" : internal, "clearance" : clearance, "backlash" : backlash, "show_verts" : show_verts, "diam_pitch" : diam_pitch, "mod" : mod, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/geometry.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/geometry.scad'}", False) class is_point_on_line(_Bosl2Base): def __init__(self, point=None, line=None, bounded=None, eps=None, **kwargs): super().__init__("is_point_on_line", {"point" : point, "line" : line, "bounded" : bounded, "eps" : eps, **kwargs}) class _is_point_on_line(_Bosl2Base): def __init__(self, point=None, line=None, bounded=None, eps=None, **kwargs): super().__init__("_is_point_on_line", {"point" : point, "line" : line, "bounded" : bounded, "eps" : eps, **kwargs}) class _dist2line(_Bosl2Base): def __init__(self, d=None, n=None, **kwargs): super().__init__("_dist2line", {"d" : d, "n" : n, **kwargs}) class _valid_line(_Bosl2Base): def __init__(self, line=None, dim=None, eps=None, **kwargs): super().__init__("_valid_line", {"line" : line, "dim" : dim, "eps" : eps, **kwargs}) class _valid_plane(_Bosl2Base): def __init__(self, p=None, eps=None, **kwargs): super().__init__("_valid_plane", {"p" : p, "eps" : eps, **kwargs}) class _is_at_left(_Bosl2Base): def __init__(self, pt=None, line=None, eps=None, **kwargs): super().__init__("_is_at_left", {"pt" : pt, "line" : line, "eps" : eps, **kwargs}) class _degenerate_tri(_Bosl2Base): def __init__(self, tri=None, eps=None, **kwargs): super().__init__("_degenerate_tri", {"tri" : tri, "eps" : eps, **kwargs}) class _tri_class(_Bosl2Base): def __init__(self, tri=None, eps=None, **kwargs): super().__init__("_tri_class", {"tri" : tri, "eps" : eps, **kwargs}) class _pt_in_tri(_Bosl2Base): def __init__(self, point=None, tri=None, eps=None, **kwargs): super().__init__("_pt_in_tri", {"point" : point, "tri" : tri, "eps" : eps, **kwargs}) class _point_left_of_line2d(_Bosl2Base): def __init__(self, point=None, line=None, eps=None, **kwargs): super().__init__("_point_left_of_line2d", {"point" : point, "line" : line, "eps" : eps, **kwargs}) class is_collinear(_Bosl2Base): def __init__(self, a=None, b=None, c=None, eps=None, **kwargs): super().__init__("is_collinear", {"a" : a, "b" : b, "c" : c, "eps" : eps, **kwargs}) class point_line_distance(_Bosl2Base): def __init__(self, pt=None, line=None, bounded=None, **kwargs): super().__init__("point_line_distance", {"pt" : pt, "line" : line, "bounded" : bounded, **kwargs}) class segment_distance(_Bosl2Base): def __init__(self, seg1=None, seg2=None, eps=None, **kwargs): super().__init__("segment_distance", {"seg1" : seg1, "seg2" : seg2, "eps" : eps, **kwargs}) class line_normal(_Bosl2Base): def __init__(self, p1=None, p2=None, **kwargs): super().__init__("line_normal", {"p1" : p1, "p2" : p2, **kwargs}) class _general_line_intersection(_Bosl2Base): def __init__(self, s1=None, s2=None, eps=None, **kwargs): super().__init__("_general_line_intersection", {"s1" : s1, "s2" : s2, "eps" : eps, **kwargs}) class line_intersection(_Bosl2Base): def __init__(self, line1=None, line2=None, bounded1=None, bounded2=None, bounded=None, eps=None, **kwargs): super().__init__("line_intersection", {"line1" : line1, "line2" : line2, "bounded1" : bounded1, "bounded2" : bounded2, "bounded" : bounded, "eps" : eps, **kwargs}) class line_closest_point(_Bosl2Base): def __init__(self, line=None, pt=None, bounded=None, **kwargs): super().__init__("line_closest_point", {"line" : line, "pt" : pt, "bounded" : bounded, **kwargs}) class _line_greatest_distance(_Bosl2Base): def __init__(self, points=None, line=None, **kwargs): super().__init__("_line_greatest_distance", {"points" : points, "line" : line, **kwargs}) class line_from_points(_Bosl2Base): def __init__(self, points=None, check_collinear=None, eps=None, fast=None, **kwargs): super().__init__("line_from_points", {"points" : points, "check_collinear" : check_collinear, "eps" : eps, "fast" : fast, **kwargs}) class is_coplanar(_Bosl2Base): def __init__(self, points=None, eps=None, **kwargs): super().__init__("is_coplanar", {"points" : points, "eps" : eps, **kwargs}) class plane3pt(_Bosl2Base): def __init__(self, p1=None, p2=None, p3=None, **kwargs): super().__init__("plane3pt", {"p1" : p1, "p2" : p2, "p3" : p3, **kwargs}) class plane3pt_indexed(_Bosl2Base): def __init__(self, points=None, i1=None, i2=None, i3=None, **kwargs): super().__init__("plane3pt_indexed", {"points" : points, "i1" : i1, "i2" : i2, "i3" : i3, **kwargs}) class plane_from_normal(_Bosl2Base): def __init__(self, normal=None, pt=None, **kwargs): super().__init__("plane_from_normal", {"normal" : normal, "pt" : pt, **kwargs}) class _eigenvals_symm_3(_Bosl2Base): def __init__(self, M=None, **kwargs): super().__init__("_eigenvals_symm_3", {"M" : M, **kwargs}) class _eigenvec_symm_3(_Bosl2Base): def __init__(self, M=None, evals=None, i=None, **kwargs): super().__init__("_eigenvec_symm_3", {"M" : M, "evals" : evals, "i" : i, **kwargs}) class _covariance_evec_eval(_Bosl2Base): def __init__(self, points=None, eigenvalue_id=None, **kwargs): super().__init__("_covariance_evec_eval", {"points" : points, "eigenvalue_id" : eigenvalue_id, **kwargs}) class plane_from_points(_Bosl2Base): def __init__(self, points=None, check_coplanar=None, eps=None, fast=None, **kwargs): super().__init__("plane_from_points", {"points" : points, "check_coplanar" : check_coplanar, "eps" : eps, "fast" : fast, **kwargs}) class plane_from_polygon(_Bosl2Base): def __init__(self, poly=None, check_coplanar=None, eps=None, fast=None, **kwargs): super().__init__("plane_from_polygon", {"poly" : poly, "check_coplanar" : check_coplanar, "eps" : eps, "fast" : fast, **kwargs}) class plane_normal(_Bosl2Base): def __init__(self, plane=None, **kwargs): super().__init__("plane_normal", {"plane" : plane, **kwargs}) class plane_offset(_Bosl2Base): def __init__(self, plane=None, **kwargs): super().__init__("plane_offset", {"plane" : plane, **kwargs}) class _general_plane_line_intersection(_Bosl2Base): def __init__(self, plane=None, line=None, eps=None, **kwargs): super().__init__("_general_plane_line_intersection", {"plane" : plane, "line" : line, "eps" : eps, **kwargs}) class _normalize_plane(_Bosl2Base): def __init__(self, plane=None, **kwargs): super().__init__("_normalize_plane", {"plane" : plane, **kwargs}) class plane_line_intersection(_Bosl2Base): def __init__(self, plane=None, line=None, bounded=None, eps=None, **kwargs): super().__init__("plane_line_intersection", {"plane" : plane, "line" : line, "bounded" : bounded, "eps" : eps, **kwargs}) class plane_intersection(_Bosl2Base): def __init__(self, plane1=None, plane2=None, plane3=None, **kwargs): super().__init__("plane_intersection", {"plane1" : plane1, "plane2" : plane2, "plane3" : plane3, **kwargs}) class plane_line_angle(_Bosl2Base): def __init__(self, plane=None, line=None, **kwargs): super().__init__("plane_line_angle", {"plane" : plane, "line" : line, **kwargs}) class plane_closest_point(_Bosl2Base): def __init__(self, plane=None, points=None, **kwargs): super().__init__("plane_closest_point", {"plane" : plane, "points" : points, **kwargs}) class point_plane_distance(_Bosl2Base): def __init__(self, plane=None, point=None, **kwargs): super().__init__("point_plane_distance", {"plane" : plane, "point" : point, **kwargs}) class _pointlist_greatest_distance(_Bosl2Base): def __init__(self, points=None, plane=None, **kwargs): super().__init__("_pointlist_greatest_distance", {"points" : points, "plane" : plane, **kwargs}) class are_points_on_plane(_Bosl2Base): def __init__(self, points=None, plane=None, eps=None, **kwargs): super().__init__("are_points_on_plane", {"points" : points, "plane" : plane, "eps" : eps, **kwargs}) class _is_point_above_plane(_Bosl2Base): def __init__(self, plane=None, point=None, **kwargs): super().__init__("_is_point_above_plane", {"plane" : plane, "point" : point, **kwargs}) class circle_line_intersection(_Bosl2Base): def __init__(self, r=None, cp=None, line=None, bounded=None, d=None, eps=None, **kwargs): super().__init__("circle_line_intersection", {"r" : r, "cp" : cp, "line" : line, "bounded" : bounded, "d" : d, "eps" : eps, **kwargs}) class _circle_or_sphere_line_intersection(_Bosl2Base): def __init__(self, r=None, cp=None, line=None, bounded=None, d=None, eps=None, **kwargs): super().__init__("_circle_or_sphere_line_intersection", {"r" : r, "cp" : cp, "line" : line, "bounded" : bounded, "d" : d, "eps" : eps, **kwargs}) class circle_circle_intersection(_Bosl2Base): def __init__(self, r1=None, cp1=None, r2=None, cp2=None, eps=None, d1=None, d2=None, **kwargs): super().__init__("circle_circle_intersection", {"r1" : r1, "cp1" : cp1, "r2" : r2, "cp2" : cp2, "eps" : eps, "d1" : d1, "d2" : d2, **kwargs}) class circle_2tangents(_Bosl2Base): def __init__(self, r=None, pt1=None, pt2=None, pt3=None, tangents=None, d=None, **kwargs): super().__init__("circle_2tangents", {"r" : r, "pt1" : pt1, "pt2" : pt2, "pt3" : pt3, "tangents" : tangents, "d" : d, **kwargs}) class circle_3points(_Bosl2Base): def __init__(self, pt1=None, pt2=None, pt3=None, **kwargs): super().__init__("circle_3points", {"pt1" : pt1, "pt2" : pt2, "pt3" : pt3, **kwargs}) class circle_point_tangents(_Bosl2Base): def __init__(self, r=None, cp=None, pt=None, d=None, **kwargs): super().__init__("circle_point_tangents", {"r" : r, "cp" : cp, "pt" : pt, "d" : d, **kwargs}) class circle_circle_tangents(_Bosl2Base): def __init__(self, r1=None, cp1=None, r2=None, cp2=None, d1=None, d2=None, **kwargs): super().__init__("circle_circle_tangents", {"r1" : r1, "cp1" : cp1, "r2" : r2, "cp2" : cp2, "d1" : d1, "d2" : d2, **kwargs}) class _noncollinear_triple(_Bosl2Base): def __init__(self, points=None, error=None, eps=None, **kwargs): super().__init__("_noncollinear_triple", {"points" : points, "error" : error, "eps" : eps, **kwargs}) class sphere_line_intersection(_Bosl2Base): def __init__(self, r=None, cp=None, line=None, bounded=None, d=None, eps=None, **kwargs): super().__init__("sphere_line_intersection", {"r" : r, "cp" : cp, "line" : line, "bounded" : bounded, "d" : d, "eps" : eps, **kwargs}) class polygon_area(_Bosl2Base): def __init__(self, poly=None, signed=None, **kwargs): super().__init__("polygon_area", {"poly" : poly, "signed" : signed, **kwargs}) class centroid(_Bosl2Base): def __init__(self, object=None, eps=None, **kwargs): super().__init__("centroid", {"object" : object, "eps" : eps, **kwargs}) class _region_centroid(_Bosl2Base): def __init__(self, region=None, eps=None, **kwargs): super().__init__("_region_centroid", {"region" : region, "eps" : eps, **kwargs}) class _polygon_centroid(_Bosl2Base): def __init__(self, poly=None, eps=None, **kwargs): super().__init__("_polygon_centroid", {"poly" : poly, "eps" : eps, **kwargs}) class polygon_normal(_Bosl2Base): def __init__(self, poly=None, **kwargs): super().__init__("polygon_normal", {"poly" : poly, **kwargs}) class _point_above_below_segment(_Bosl2Base): def __init__(self, point=None, edge=None, **kwargs): super().__init__("_point_above_below_segment", {"point" : point, "edge" : edge, **kwargs}) class point_in_polygon(_Bosl2Base): def __init__(self, point=None, poly=None, nonzero=None, eps=None, **kwargs): super().__init__("point_in_polygon", {"point" : point, "poly" : poly, "nonzero" : nonzero, "eps" : eps, **kwargs}) class polygon_line_intersection(_Bosl2Base): def __init__(self, poly=None, line=None, bounded=None, nonzero=None, eps=None, **kwargs): super().__init__("polygon_line_intersection", {"poly" : poly, "line" : line, "bounded" : bounded, "nonzero" : nonzero, "eps" : eps, **kwargs}) class _merge_segments(_Bosl2Base): def __init__(self, insegs=None, outsegs=None, eps=None, i=None, **kwargs): super().__init__("_merge_segments", {"insegs" : insegs, "outsegs" : outsegs, "eps" : eps, "i" : i, **kwargs}) class polygon_triangulate(_Bosl2Base): def __init__(self, poly=None, ind=None, error=None, eps=None, **kwargs): super().__init__("polygon_triangulate", {"poly" : poly, "ind" : ind, "error" : error, "eps" : eps, **kwargs}) class _triangulate(_Bosl2Base): def __init__(self, poly=None, ind=None, error=None, eps=None, tris=None, **kwargs): super().__init__("_triangulate", {"poly" : poly, "ind" : ind, "error" : error, "eps" : eps, "tris" : tris, **kwargs}) class _get_ear(_Bosl2Base): def __init__(self, poly=None, ind=None, eps=None, _i=None, **kwargs): super().__init__("_get_ear", {"poly" : poly, "ind" : ind, "eps" : eps, "_i" : _i, **kwargs}) class _none_inside(_Bosl2Base): def __init__(self, idxs=None, poly=None, p0=None, p1=None, p2=None, eps=None, i=None, **kwargs): super().__init__("_none_inside", {"idxs" : idxs, "poly" : poly, "p0" : p0, "p1" : p1, "p2" : p2, "eps" : eps, "i" : i, **kwargs}) class is_polygon_clockwise(_Bosl2Base): def __init__(self, poly=None, **kwargs): super().__init__("is_polygon_clockwise", {"poly" : poly, **kwargs}) class clockwise_polygon(_Bosl2Base): def __init__(self, poly=None, **kwargs): super().__init__("clockwise_polygon", {"poly" : poly, **kwargs}) class ccw_polygon(_Bosl2Base): def __init__(self, poly=None, **kwargs): super().__init__("ccw_polygon", {"poly" : poly, **kwargs}) class reverse_polygon(_Bosl2Base): def __init__(self, poly=None, **kwargs): super().__init__("reverse_polygon", {"poly" : poly, **kwargs}) class reindex_polygon(_Bosl2Base): def __init__(self, reference=None, poly=None, return_error=None, **kwargs): super().__init__("reindex_polygon", {"reference" : reference, "poly" : poly, "return_error" : return_error, **kwargs}) class align_polygon(_Bosl2Base): def __init__(self, reference=None, poly=None, angles=None, cp=None, trans=None, return_ind=None, **kwargs): super().__init__("align_polygon", {"reference" : reference, "poly" : poly, "angles" : angles, "cp" : cp, "trans" : trans, "return_ind" : return_ind, **kwargs}) class are_polygons_equal(_Bosl2Base): def __init__(self, poly1=None, poly2=None, eps=None, **kwargs): super().__init__("are_polygons_equal", {"poly1" : poly1, "poly2" : poly2, "eps" : eps, **kwargs}) class _are_polygons_equal(_Bosl2Base): def __init__(self, poly1=None, poly2=None, eps=None, st=None, **kwargs): super().__init__("_are_polygons_equal", {"poly1" : poly1, "poly2" : poly2, "eps" : eps, "st" : st, **kwargs}) class _is_polygon_in_list(_Bosl2Base): def __init__(self, poly=None, polys=None, **kwargs): super().__init__("_is_polygon_in_list", {"poly" : poly, "polys" : polys, **kwargs}) class ___is_polygon_in_list(_Bosl2Base): def __init__(self, poly=None, polys=None, i=None, **kwargs): super().__init__("___is_polygon_in_list", {"poly" : poly, "polys" : polys, "i" : i, **kwargs}) class hull(_Bosl2Base): def __init__(self, points=None, **kwargs): super().__init__("hull", {"points" : points, **kwargs}) class _backtracking(_Bosl2Base): def __init__(self, i=None, points=None, h=None, t=None, m=None, all=None, **kwargs): super().__init__("_backtracking", {"i" : i, "points" : points, "h" : h, "t" : t, "m" : m, "all" : all, **kwargs}) class _is_cw(_Bosl2Base): def __init__(self, a=None, b=None, c=None, all=None, **kwargs): super().__init__("_is_cw", {"a" : a, "b" : b, "c" : c, "all" : all, **kwargs}) class hull2d_path(_Bosl2Base): def __init__(self, points=None, all=None, **kwargs): super().__init__("hull2d_path", {"points" : points, "all" : all, **kwargs}) class _hull_collinear(_Bosl2Base): def __init__(self, points=None, **kwargs): super().__init__("_hull_collinear", {"points" : points, **kwargs}) class hull3d_faces(_Bosl2Base): def __init__(self, points=None, **kwargs): super().__init__("hull3d_faces", {"points" : points, **kwargs}) class _hull3d_iterative(_Bosl2Base): def __init__(self, points=None, triangles=None, planes=None, remaining=None, _i=None, **kwargs): super().__init__("_hull3d_iterative", {"points" : points, "triangles" : triangles, "planes" : planes, "remaining" : remaining, "_i" : _i, **kwargs}) class _remove_internal_edges(_Bosl2Base): def __init__(self, halfedges=None, **kwargs): super().__init__("_remove_internal_edges", {"halfedges" : halfedges, **kwargs}) class _find_first_noncoplanar(_Bosl2Base): def __init__(self, plane=None, points=None, i=None, **kwargs): super().__init__("_find_first_noncoplanar", {"plane" : plane, "points" : points, "i" : i, **kwargs}) class is_polygon_convex(_Bosl2Base): def __init__(self, poly=None, eps=None, **kwargs): super().__init__("is_polygon_convex", {"poly" : poly, "eps" : eps, **kwargs}) class convex_distance(_Bosl2Base): def __init__(self, points1=None, points2=None, eps=None, **kwargs): super().__init__("convex_distance", {"points1" : points1, "points2" : points2, "eps" : eps, **kwargs}) class _GJK_distance(_Bosl2Base): def __init__(self, points1=None, points2=None, eps=None, lbd=None, d=None, simplex=None, **kwargs): super().__init__("_GJK_distance", {"points1" : points1, "points2" : points2, "eps" : eps, "lbd" : lbd, "d" : d, "simplex" : simplex, **kwargs}) class convex_collision(_Bosl2Base): def __init__(self, points1=None, points2=None, eps=None, **kwargs): super().__init__("convex_collision", {"points1" : points1, "points2" : points2, "eps" : eps, **kwargs}) class _GJK_collide(_Bosl2Base): def __init__(self, points1=None, points2=None, d=None, simplex=None, eps=None, **kwargs): super().__init__("_GJK_collide", {"points1" : points1, "points2" : points2, "d" : d, "simplex" : simplex, "eps" : eps, **kwargs}) class _closest_simplex(_Bosl2Base): def __init__(self, s=None, eps=None, **kwargs): super().__init__("_closest_simplex", {"s" : s, "eps" : eps, **kwargs}) class _closest_s1(_Bosl2Base): def __init__(self, s=None, eps=None, **kwargs): super().__init__("_closest_s1", {"s" : s, "eps" : eps, **kwargs}) class _closest_s2(_Bosl2Base): def __init__(self, s=None, eps=None, **kwargs): super().__init__("_closest_s2", {"s" : s, "eps" : eps, **kwargs}) class _closest_s3(_Bosl2Base): def __init__(self, s=None, eps=None, **kwargs): super().__init__("_closest_s3", {"s" : s, "eps" : eps, **kwargs}) class _tri_normal(_Bosl2Base): def __init__(self, tri=None, **kwargs): super().__init__("_tri_normal", {"tri" : tri, **kwargs}) class _support_diff(_Bosl2Base): def __init__(self, p1=None, p2=None, d=None, **kwargs): super().__init__("_support_diff", {"p1" : p1, "p2" : p2, "d" : d, **kwargs}) class rot_decode(_Bosl2Base): def __init__(self, M=None, long=None, **kwargs): super().__init__("rot_decode", {"M" : M, "long" : long, **kwargs}) class show_plane(_Bosl2Base): def __init__(self, plane=None, size=None, offset=None, **kwargs): super().__init__("show_plane", {"plane" : plane, "size" : size, "offset" : offset, **kwargs}) class hull_points(_Bosl2Base): def __init__(self, points=None, fast=None, **kwargs): super().__init__("hull_points", {"points" : points, "fast" : fast, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/hinges.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/hinges.scad'}", False) class knuckle_hinge(_Bosl2Base): def __init__(self, length=None, segs=None, offset=None, inner=None, arm_height=None, arm_angle=None, gap=None, seg_ratio=None, knuckle_diam=None, pin_diam=None, fill=None, clear_top=None, round_bot=None, round_top=None, pin_fn=None, clearance=None, in_place=None, clip=None, tap_depth=None, screw_head=None, screw_tolerance=None, anchor=None, orient=None, spin=None, **kwargs): super().__init__("knuckle_hinge", {"length" : length, "segs" : segs, "offset" : offset, "inner" : inner, "arm_height" : arm_height, "arm_angle" : arm_angle, "gap" : gap, "seg_ratio" : seg_ratio, "knuckle_diam" : knuckle_diam, "pin_diam" : pin_diam, "fill" : fill, "clear_top" : clear_top, "round_bot" : round_bot, "round_top" : round_top, "pin_fn" : pin_fn, "clearance" : clearance, "in_place" : in_place, "clip" : clip, "tap_depth" : tap_depth, "screw_head" : screw_head, "screw_tolerance" : screw_tolerance, "anchor" : anchor, "orient" : orient, "spin" : spin, **kwargs}) class knuckle_hinge(_Bosl2Base): def __init__(self, length=None, segs=None, offset=None, inner=None, arm_height=None, arm_angle=None, gap=None, seg_ratio=None, knuckle_diam=None, pin_diam=None, fill=None, clear_top=None, round_bot=None, round_top=None, pin_fn=None, clearance=None, teardrop=None, in_place=None, clip=None, tap_depth=None, screw_head=None, screw_tolerance=None, knuckle_clearance=None, anchor=None, orient=None, spin=None, **kwargs): super().__init__("knuckle_hinge", {"length" : length, "segs" : segs, "offset" : offset, "inner" : inner, "arm_height" : arm_height, "arm_angle" : arm_angle, "gap" : gap, "seg_ratio" : seg_ratio, "knuckle_diam" : knuckle_diam, "pin_diam" : pin_diam, "fill" : fill, "clear_top" : clear_top, "round_bot" : round_bot, "round_top" : round_top, "pin_fn" : pin_fn, "clearance" : clearance, "teardrop" : teardrop, "in_place" : in_place, "clip" : clip, "tap_depth" : tap_depth, "screw_head" : screw_head, "screw_tolerance" : screw_tolerance, "knuckle_clearance" : knuckle_clearance, "anchor" : anchor, "orient" : orient, "spin" : spin, **kwargs}) class _knuckle_hinge_profile(_Bosl2Base): def __init__(self, offset=None, arm_height=None, arm_angle=None, knuckle_diam=None, pin_diam=None, fill=None, clear_top=None, round_bot=None, round_top=None, pin_fn=None, clearance=None, tearspin=None, clip=None, **kwargs): super().__init__("_knuckle_hinge_profile", {"offset" : offset, "arm_height" : arm_height, "arm_angle" : arm_angle, "knuckle_diam" : knuckle_diam, "pin_diam" : pin_diam, "fill" : fill, "clear_top" : clear_top, "round_bot" : round_bot, "round_top" : round_top, "pin_fn" : pin_fn, "clearance" : clearance, "tearspin" : tearspin, "clip" : clip, **kwargs}) class living_hinge_mask(_Bosl2Base): def __init__(self, l=None, thick=None, layerheight=None, foldangle=None, hingegap=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("living_hinge_mask", {"l" : l, "thick" : thick, "layerheight" : layerheight, "foldangle" : foldangle, "hingegap" : hingegap, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class folding_hinge_mask(_Bosl2Base): def __init__(self, l=None, thick=None, layerheight=None, foldangle=None, hingegap=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("folding_hinge_mask", {"l" : l, "thick" : thick, "layerheight" : layerheight, "foldangle" : foldangle, "hingegap" : hingegap, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class apply_folding_hinges_and_snaps(_Bosl2Base): def __init__(self, thick=None, foldangle=None, hinges=None, snaps=None, sockets=None, snaplen=None, snapdiam=None, hingegap=None, layerheight=None, **kwargs): super().__init__("apply_folding_hinges_and_snaps", {"thick" : thick, "foldangle" : foldangle, "hinges" : hinges, "snaps" : snaps, "sockets" : sockets, "snaplen" : snaplen, "snapdiam" : snapdiam, "hingegap" : hingegap, "layerheight" : layerheight, **kwargs}) class snap_lock(_Bosl2Base): def __init__(self, thick=None, snaplen=None, snapdiam=None, layerheight=None, foldangle=None, hingegap=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("snap_lock", {"thick" : thick, "snaplen" : snaplen, "snapdiam" : snapdiam, "layerheight" : layerheight, "foldangle" : foldangle, "hingegap" : hingegap, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class snap_socket(_Bosl2Base): def __init__(self, thick=None, snaplen=None, snapdiam=None, layerheight=None, foldangle=None, hingegap=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("snap_socket", {"thick" : thick, "snaplen" : snaplen, "snapdiam" : snapdiam, "layerheight" : layerheight, "foldangle" : foldangle, "hingegap" : hingegap, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/isosurface.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/isosurface.scad'}", False) _MCEdgeVertexIndices = _OpenSCADConstant('_MCEdgeVertexIndices') _MCTriangleTable = _OpenSCADConstant('_MCTriangleTable') _MCTriangleTable_reverse = _OpenSCADConstant('_MCTriangleTable_reverse') _MCFaceVertexIndices = _OpenSCADConstant('_MCFaceVertexIndices') _MCClipEdgeVertexIndices = _OpenSCADConstant('_MCClipEdgeVertexIndices') _MCClipTriangleTable = _OpenSCADConstant('_MCClipTriangleTable') _MTEdgeVertexIndices = _OpenSCADConstant('_MTEdgeVertexIndices') _MTriSegmentTable = _OpenSCADConstant('_MTriSegmentTable') _MTriSegmentTable_reverse = _OpenSCADConstant('_MTriSegmentTable_reverse') _MSquareSegmentTable = _OpenSCADConstant('_MSquareSegmentTable') _MSquareSegmentTable_reverse = _OpenSCADConstant('_MSquareSegmentTable_reverse') _metaball_vnf = _OpenSCADConstant('_metaball_vnf') class _cubeindex(_Bosl2Base): def __init__(self, f=None, isoval=None, **kwargs): super().__init__("_cubeindex", {"f" : f, "isoval" : isoval, **kwargs}) class _clipfacindex(_Bosl2Base): def __init__(self, f=None, isovalmin=None, isovalmax=None, **kwargs): super().__init__("_clipfacindex", {"f" : f, "isovalmin" : isovalmin, "isovalmax" : isovalmax, **kwargs}) class _bbox_faces(_Bosl2Base): def __init__(self, v0=None, voxsize=None, bbox=None, **kwargs): super().__init__("_bbox_faces", {"v0" : v0, "voxsize" : voxsize, "bbox" : bbox, **kwargs}) class _isosurface_cubes(_Bosl2Base): def __init__(self, voxsize=None, bbox=None, fieldarray=None, fieldfunc=None, isovalmin=None, isovalmax=None, closed=None, **kwargs): super().__init__("_isosurface_cubes", {"voxsize" : voxsize, "bbox" : bbox, "fieldarray" : fieldarray, "fieldfunc" : fieldfunc, "isovalmin" : isovalmin, "isovalmax" : isovalmax, "closed" : closed, **kwargs}) class _isosurface_triangles(_Bosl2Base): def __init__(self, cubelist=None, voxsize=None, isovalmin=None, isovalmax=None, tritablemin=None, tritablemax=None, **kwargs): super().__init__("_isosurface_triangles", {"cubelist" : cubelist, "voxsize" : voxsize, "isovalmin" : isovalmin, "isovalmax" : isovalmax, "tritablemin" : tritablemin, "tritablemax" : tritablemax, **kwargs}) class _clipfacevertices(_Bosl2Base): def __init__(self, vcube=None, fld=None, bbface=None, isovalmin=None, isovalmax=None, **kwargs): super().__init__("_clipfacevertices", {"vcube" : vcube, "fld" : fld, "bbface" : bbface, "isovalmin" : isovalmin, "isovalmax" : isovalmax, **kwargs}) class _mctrindex(_Bosl2Base): def __init__(self, f=None, isoval=None, **kwargs): super().__init__("_mctrindex", {"f" : f, "isoval" : isoval, **kwargs}) class _bbox_sides(_Bosl2Base): def __init__(self, pc=None, pixsize=None, bbox=None, **kwargs): super().__init__("_bbox_sides", {"pc" : pc, "pixsize" : pixsize, "bbox" : bbox, **kwargs}) class _contour_pixels(_Bosl2Base): def __init__(self, pixsize=None, bbox=None, fieldarray=None, fieldfunc=None, pixcenters=None, isovalmin=None, isovalmax=None, closed=None, **kwargs): super().__init__("_contour_pixels", {"pixsize" : pixsize, "bbox" : bbox, "fieldarray" : fieldarray, "fieldfunc" : fieldfunc, "pixcenters" : pixcenters, "isovalmin" : isovalmin, "isovalmax" : isovalmax, "closed" : closed, **kwargs}) class _contour_vertices(_Bosl2Base): def __init__(self, pxlist=None, pxsize=None, isovalmin=None, isovalmax=None, segtablemin=None, segtablemax=None, **kwargs): super().__init__("_contour_vertices", {"pxlist" : pxlist, "pxsize" : pxsize, "isovalmin" : isovalmin, "isovalmax" : isovalmax, "segtablemin" : segtablemin, "segtablemax" : segtablemax, **kwargs}) class mb_cutoff(_Bosl2Base): def __init__(self, dist=None, cutoff=None, **kwargs): super().__init__("mb_cutoff", {"dist" : dist, "cutoff" : cutoff, **kwargs}) class _mb_sphere_basic(_Bosl2Base): def __init__(self, point=None, r=None, neg=None, **kwargs): super().__init__("_mb_sphere_basic", {"point" : point, "r" : r, "neg" : neg, **kwargs}) class _mb_sphere_influence(_Bosl2Base): def __init__(self, point=None, r=None, ex=None, neg=None, **kwargs): super().__init__("_mb_sphere_influence", {"point" : point, "r" : r, "ex" : ex, "neg" : neg, **kwargs}) class _mb_sphere_cutoff(_Bosl2Base): def __init__(self, point=None, r=None, cutoff=None, neg=None, **kwargs): super().__init__("_mb_sphere_cutoff", {"point" : point, "r" : r, "cutoff" : cutoff, "neg" : neg, **kwargs}) class _mb_sphere_full(_Bosl2Base): def __init__(self, point=None, r=None, cutoff=None, ex=None, neg=None, **kwargs): super().__init__("_mb_sphere_full", {"point" : point, "r" : r, "cutoff" : cutoff, "ex" : ex, "neg" : neg, **kwargs}) class mb_sphere(_Bosl2Base): def __init__(self, r=None, cutoff=None, influence=None, negative=None, hide_debug=None, d=None, **kwargs): super().__init__("mb_sphere", {"r" : r, "cutoff" : cutoff, "influence" : influence, "negative" : negative, "hide_debug" : hide_debug, "d" : d, **kwargs}) class _mb_cuboid_basic(_Bosl2Base): def __init__(self, point=None, inv_size=None, xp=None, neg=None, **kwargs): super().__init__("_mb_cuboid_basic", {"point" : point, "inv_size" : inv_size, "xp" : xp, "neg" : neg, **kwargs}) class _mb_cuboid_influence(_Bosl2Base): def __init__(self, point=None, inv_size=None, xp=None, ex=None, neg=None, **kwargs): super().__init__("_mb_cuboid_influence", {"point" : point, "inv_size" : inv_size, "xp" : xp, "ex" : ex, "neg" : neg, **kwargs}) class _mb_cuboid_cutoff(_Bosl2Base): def __init__(self, point=None, inv_size=None, xp=None, cutoff=None, neg=None, **kwargs): super().__init__("_mb_cuboid_cutoff", {"point" : point, "inv_size" : inv_size, "xp" : xp, "cutoff" : cutoff, "neg" : neg, **kwargs}) class _mb_cuboid_full(_Bosl2Base): def __init__(self, point=None, inv_size=None, xp=None, ex=None, cutoff=None, neg=None, **kwargs): super().__init__("_mb_cuboid_full", {"point" : point, "inv_size" : inv_size, "xp" : xp, "ex" : ex, "cutoff" : cutoff, "neg" : neg, **kwargs}) class mb_cuboid(_Bosl2Base): def __init__(self, size=None, squareness=None, cutoff=None, influence=None, negative=None, hide_debug=None, **kwargs): super().__init__("mb_cuboid", {"size" : size, "squareness" : squareness, "cutoff" : cutoff, "influence" : influence, "negative" : negative, "hide_debug" : hide_debug, **kwargs}) class _revsurf_basic(_Bosl2Base): def __init__(self, point=None, path=None, coef=None, neg=None, maxdist=None, **kwargs): super().__init__("_revsurf_basic", {"point" : point, "path" : path, "coef" : coef, "neg" : neg, "maxdist" : maxdist, **kwargs}) class _revsurf_influence(_Bosl2Base): def __init__(self, point=None, path=None, coef=None, exp=None, neg=None, maxdist=None, **kwargs): super().__init__("_revsurf_influence", {"point" : point, "path" : path, "coef" : coef, "exp" : exp, "neg" : neg, "maxdist" : maxdist, **kwargs}) class _revsurf_cutoff(_Bosl2Base): def __init__(self, point=None, path=None, coef=None, cutoff=None, neg=None, maxdist=None, **kwargs): super().__init__("_revsurf_cutoff", {"point" : point, "path" : path, "coef" : coef, "cutoff" : cutoff, "neg" : neg, "maxdist" : maxdist, **kwargs}) class _revsurf_full(_Bosl2Base): def __init__(self, point=None, path=None, coef=None, cutoff=None, exp=None, neg=None, maxdist=None, **kwargs): super().__init__("_revsurf_full", {"point" : point, "path" : path, "coef" : coef, "cutoff" : cutoff, "exp" : exp, "neg" : neg, "maxdist" : maxdist, **kwargs}) class mb_cyl(_Bosl2Base): def __init__(self, h=None, r=None, rounding=None, r1=None, r2=None, l=None, height=None, length=None, d1=None, d2=None, d=None, cutoff=None, influence=None, negative=None, hide_debug=None, **kwargs): super().__init__("mb_cyl", {"h" : h, "r" : r, "rounding" : rounding, "r1" : r1, "r2" : r2, "l" : l, "height" : height, "length" : length, "d1" : d1, "d2" : d2, "d" : d, "cutoff" : cutoff, "influence" : influence, "negative" : negative, "hide_debug" : hide_debug, **kwargs}) class _mb_disk_basic(_Bosl2Base): def __init__(self, point=None, hl=None, r=None, neg=None, **kwargs): super().__init__("_mb_disk_basic", {"point" : point, "hl" : hl, "r" : r, "neg" : neg, **kwargs}) class _mb_disk_influence(_Bosl2Base): def __init__(self, point=None, hl=None, r=None, ex=None, neg=None, **kwargs): super().__init__("_mb_disk_influence", {"point" : point, "hl" : hl, "r" : r, "ex" : ex, "neg" : neg, **kwargs}) class _mb_disk_cutoff(_Bosl2Base): def __init__(self, point=None, hl=None, r=None, cutoff=None, neg=None, **kwargs): super().__init__("_mb_disk_cutoff", {"point" : point, "hl" : hl, "r" : r, "cutoff" : cutoff, "neg" : neg, **kwargs}) class _mb_disk_full(_Bosl2Base): def __init__(self, point=None, hl=None, r=None, cutoff=None, ex=None, neg=None, **kwargs): super().__init__("_mb_disk_full", {"point" : point, "hl" : hl, "r" : r, "cutoff" : cutoff, "ex" : ex, "neg" : neg, **kwargs}) class mb_disk(_Bosl2Base): def __init__(self, h=None, r=None, cutoff=None, influence=None, negative=None, hide_debug=None, d=None, l=None, height=None, length=None, **kwargs): super().__init__("mb_disk", {"h" : h, "r" : r, "cutoff" : cutoff, "influence" : influence, "negative" : negative, "hide_debug" : hide_debug, "d" : d, "l" : l, "height" : height, "length" : length, **kwargs}) class _mb_capsule_basic(_Bosl2Base): def __init__(self, dv=None, hl=None, r=None, neg=None, **kwargs): super().__init__("_mb_capsule_basic", {"dv" : dv, "hl" : hl, "r" : r, "neg" : neg, **kwargs}) class _mb_capsule_influence(_Bosl2Base): def __init__(self, dv=None, hl=None, r=None, ex=None, neg=None, **kwargs): super().__init__("_mb_capsule_influence", {"dv" : dv, "hl" : hl, "r" : r, "ex" : ex, "neg" : neg, **kwargs}) class _mb_capsule_cutoff(_Bosl2Base): def __init__(self, dv=None, hl=None, r=None, cutoff=None, neg=None, **kwargs): super().__init__("_mb_capsule_cutoff", {"dv" : dv, "hl" : hl, "r" : r, "cutoff" : cutoff, "neg" : neg, **kwargs}) class _mb_capsule_full(_Bosl2Base): def __init__(self, dv=None, hl=None, r=None, cutoff=None, ex=None, neg=None, **kwargs): super().__init__("_mb_capsule_full", {"dv" : dv, "hl" : hl, "r" : r, "cutoff" : cutoff, "ex" : ex, "neg" : neg, **kwargs}) class mb_capsule(_Bosl2Base): def __init__(self, h=None, r=None, cutoff=None, influence=None, negative=None, hide_debug=None, d=None, l=None, height=None, length=None, **kwargs): super().__init__("mb_capsule", {"h" : h, "r" : r, "cutoff" : cutoff, "influence" : influence, "negative" : negative, "hide_debug" : hide_debug, "d" : d, "l" : l, "height" : height, "length" : length, **kwargs}) class mb_connector(_Bosl2Base): def __init__(self, p1=None, p2=None, r=None, cutoff=None, influence=None, negative=None, hide_debug=None, d=None, **kwargs): super().__init__("mb_connector", {"p1" : p1, "p2" : p2, "r" : r, "cutoff" : cutoff, "influence" : influence, "negative" : negative, "hide_debug" : hide_debug, "d" : d, **kwargs}) class _mb_torus_basic(_Bosl2Base): def __init__(self, point=None, rmaj=None, rmin=None, neg=None, **kwargs): super().__init__("_mb_torus_basic", {"point" : point, "rmaj" : rmaj, "rmin" : rmin, "neg" : neg, **kwargs}) class _mb_torus_influence(_Bosl2Base): def __init__(self, point=None, rmaj=None, rmin=None, ex=None, neg=None, **kwargs): super().__init__("_mb_torus_influence", {"point" : point, "rmaj" : rmaj, "rmin" : rmin, "ex" : ex, "neg" : neg, **kwargs}) class _mb_torus_cutoff(_Bosl2Base): def __init__(self, point=None, rmaj=None, rmin=None, cutoff=None, neg=None, **kwargs): super().__init__("_mb_torus_cutoff", {"point" : point, "rmaj" : rmaj, "rmin" : rmin, "cutoff" : cutoff, "neg" : neg, **kwargs}) class _mb_torus_full(_Bosl2Base): def __init__(self, point=None, rmaj=None, rmin=None, cutoff=None, ex=None, neg=None, **kwargs): super().__init__("_mb_torus_full", {"point" : point, "rmaj" : rmaj, "rmin" : rmin, "cutoff" : cutoff, "ex" : ex, "neg" : neg, **kwargs}) class mb_torus(_Bosl2Base): def __init__(self, r_maj=None, r_min=None, cutoff=None, influence=None, negative=None, hide_debug=None, d_maj=None, d_min=None, _or=None, od=None, ir=None, id=None, **kwargs): super().__init__("mb_torus", {"r_maj" : r_maj, "r_min" : r_min, "cutoff" : cutoff, "influence" : influence, "negative" : negative, "hide_debug" : hide_debug, "d_maj" : d_maj, "d_min" : d_min, "_or" : _or, "od" : od, "ir" : ir, "id" : id, **kwargs}) class _mb_octahedron_basic(_Bosl2Base): def __init__(self, point=None, invr=None, xp=None, neg=None, **kwargs): super().__init__("_mb_octahedron_basic", {"point" : point, "invr" : invr, "xp" : xp, "neg" : neg, **kwargs}) class _mb_octahedron_influence(_Bosl2Base): def __init__(self, point=None, invr=None, xp=None, ex=None, neg=None, **kwargs): super().__init__("_mb_octahedron_influence", {"point" : point, "invr" : invr, "xp" : xp, "ex" : ex, "neg" : neg, **kwargs}) class _mb_octahedron_cutoff(_Bosl2Base): def __init__(self, point=None, invr=None, xp=None, cutoff=None, neg=None, **kwargs): super().__init__("_mb_octahedron_cutoff", {"point" : point, "invr" : invr, "xp" : xp, "cutoff" : cutoff, "neg" : neg, **kwargs}) class _mb_octahedron_full(_Bosl2Base): def __init__(self, point=None, invr=None, xp=None, cutoff=None, ex=None, neg=None, **kwargs): super().__init__("_mb_octahedron_full", {"point" : point, "invr" : invr, "xp" : xp, "cutoff" : cutoff, "ex" : ex, "neg" : neg, **kwargs}) class mb_octahedron(_Bosl2Base): def __init__(self, size=None, squareness=None, cutoff=None, influence=None, negative=None, hide_debug=None, **kwargs): super().__init__("mb_octahedron", {"size" : size, "squareness" : squareness, "cutoff" : cutoff, "influence" : influence, "negative" : negative, "hide_debug" : hide_debug, **kwargs}) class _debug_cube(_Bosl2Base): def __init__(self, size=None, squareness=None, **kwargs): super().__init__("_debug_cube", {"size" : size, "squareness" : squareness, **kwargs}) class _debug_octahedron(_Bosl2Base): def __init__(self, size=None, squareness=None, **kwargs): super().__init__("_debug_octahedron", {"size" : size, "squareness" : squareness, **kwargs}) class debug_tetra(_Bosl2Base): def __init__(self, r=None, **kwargs): super().__init__("debug_tetra", {"r" : r, **kwargs}) class metaballs(_Bosl2Base): def __init__(self, spec=None, bounding_box=None, voxel_size=None, voxel_count=None, isovalue=None, closed=None, exact_bounds=None, show_stats=None, _debug=None, **kwargs): super().__init__("metaballs", {"spec" : spec, "bounding_box" : bounding_box, "voxel_size" : voxel_size, "voxel_count" : voxel_count, "isovalue" : isovalue, "closed" : closed, "exact_bounds" : exact_bounds, "show_stats" : show_stats, "_debug" : _debug, **kwargs}) class _mb_unwind_list(_Bosl2Base): def __init__(self, list=None, parent_trans=None, depth=None, twoD=None, **kwargs): super().__init__("_mb_unwind_list", {"list" : list, "parent_trans" : parent_trans, "depth" : depth, "twoD" : twoD, **kwargs}) class _mb_circle_full(_Bosl2Base): def __init__(self, point=None, r=None, cutoff=None, ex=None, neg=None, **kwargs): super().__init__("_mb_circle_full", {"point" : point, "r" : r, "cutoff" : cutoff, "ex" : ex, "neg" : neg, **kwargs}) class mb_circle(_Bosl2Base): def __init__(self, r=None, cutoff=None, influence=None, negative=None, hide_debug=None, d=None, **kwargs): super().__init__("mb_circle", {"r" : r, "cutoff" : cutoff, "influence" : influence, "negative" : negative, "hide_debug" : hide_debug, "d" : d, **kwargs}) class _mb_squircle_full(_Bosl2Base): def __init__(self, point=None, inv_size=None, xp=None, ex=None, cutoff=None, neg=None, **kwargs): super().__init__("_mb_squircle_full", {"point" : point, "inv_size" : inv_size, "xp" : xp, "ex" : ex, "cutoff" : cutoff, "neg" : neg, **kwargs}) class mb_rect(_Bosl2Base): def __init__(self, size=None, squareness=None, cutoff=None, influence=None, negative=None, hide_debug=None, **kwargs): super().__init__("mb_rect", {"size" : size, "squareness" : squareness, "cutoff" : cutoff, "influence" : influence, "negative" : negative, "hide_debug" : hide_debug, **kwargs}) class _trapsurf_full(_Bosl2Base): def __init__(self, point=None, path=None, coef=None, cutoff=None, exp=None, neg=None, maxdist=None, **kwargs): super().__init__("_trapsurf_full", {"point" : point, "path" : path, "coef" : coef, "cutoff" : cutoff, "exp" : exp, "neg" : neg, "maxdist" : maxdist, **kwargs}) class mb_trapezoid(_Bosl2Base): def __init__(self, h=None, w1=None, w2=None, ang=None, rounding=None, w=None, cutoff=None, influence=None, negative=None, hide_debug=None, **kwargs): super().__init__("mb_trapezoid", {"h" : h, "w1" : w1, "w2" : w2, "ang" : ang, "rounding" : rounding, "w" : w, "cutoff" : cutoff, "influence" : influence, "negative" : negative, "hide_debug" : hide_debug, **kwargs}) class _mb_stadium_full(_Bosl2Base): def __init__(self, dv=None, hl=None, r=None, cutoff=None, ex=None, neg=None, **kwargs): super().__init__("_mb_stadium_full", {"dv" : dv, "hl" : hl, "r" : r, "cutoff" : cutoff, "ex" : ex, "neg" : neg, **kwargs}) class _mb_stadium_sideways_full(_Bosl2Base): def __init__(self, dv=None, hl=None, r=None, cutoff=None, ex=None, neg=None, **kwargs): super().__init__("_mb_stadium_sideways_full", {"dv" : dv, "hl" : hl, "r" : r, "cutoff" : cutoff, "ex" : ex, "neg" : neg, **kwargs}) class mb_stadium(_Bosl2Base): def __init__(self, size=None, cutoff=None, influence=None, negative=None, hide_debug=None, **kwargs): super().__init__("mb_stadium", {"size" : size, "cutoff" : cutoff, "influence" : influence, "negative" : negative, "hide_debug" : hide_debug, **kwargs}) class mb_connector2d(_Bosl2Base): def __init__(self, p1=None, p2=None, r=None, cutoff=None, influence=None, negative=None, hide_debug=None, d=None, **kwargs): super().__init__("mb_connector2d", {"p1" : p1, "p2" : p2, "r" : r, "cutoff" : cutoff, "influence" : influence, "negative" : negative, "hide_debug" : hide_debug, "d" : d, **kwargs}) class _mb_ring_full(_Bosl2Base): def __init__(self, point=None, rmaj=None, rmin=None, cutoff=None, ex=None, neg=None, **kwargs): super().__init__("_mb_ring_full", {"point" : point, "rmaj" : rmaj, "rmin" : rmin, "cutoff" : cutoff, "ex" : ex, "neg" : neg, **kwargs}) class mb_ring(_Bosl2Base): def __init__(self, r1=None, r2=None, cutoff=None, influence=None, negative=None, hide_debug=None, d1=None, d2=None, **kwargs): super().__init__("mb_ring", {"r1" : r1, "r2" : r2, "cutoff" : cutoff, "influence" : influence, "negative" : negative, "hide_debug" : hide_debug, "d1" : d1, "d2" : d2, **kwargs}) class metaballs2d(_Bosl2Base): def __init__(self, spec=None, bounding_box=None, pixel_size=None, pixel_count=None, isovalue=None, closed=None, use_centers=None, smoothing=None, exact_bounds=None, show_stats=None, _debug=None, **kwargs): super().__init__("metaballs2d", {"spec" : spec, "bounding_box" : bounding_box, "pixel_size" : pixel_size, "pixel_count" : pixel_count, "isovalue" : isovalue, "closed" : closed, "use_centers" : use_centers, "smoothing" : smoothing, "exact_bounds" : exact_bounds, "show_stats" : show_stats, "_debug" : _debug, **kwargs}) class _metaballs2dfield(_Bosl2Base): def __init__(self, funclist=None, transmatrix=None, bbox=None, pixsize=None, nballs=None, **kwargs): super().__init__("_metaballs2dfield", {"funclist" : funclist, "transmatrix" : transmatrix, "bbox" : bbox, "pixsize" : pixsize, "nballs" : nballs, **kwargs}) class isosurface(_Bosl2Base): def __init__(self, f=None, isovalue=None, bounding_box=None, voxel_size=None, voxel_count=None, reverse=None, closed=None, exact_bounds=None, show_stats=None, _mball=None, **kwargs): super().__init__("isosurface", {"f" : f, "isovalue" : isovalue, "bounding_box" : bounding_box, "voxel_size" : voxel_size, "voxel_count" : voxel_count, "reverse" : reverse, "closed" : closed, "exact_bounds" : exact_bounds, "show_stats" : show_stats, "_mball" : _mball, **kwargs}) class _getautovoxsize(_Bosl2Base): def __init__(self, bbox=None, numvoxels=None, **kwargs): super().__init__("_getautovoxsize", {"bbox" : bbox, "numvoxels" : numvoxels, **kwargs}) class _getvoxsize(_Bosl2Base): def __init__(self, voxel_size=None, bounding_box=None, exactbounds=None, **kwargs): super().__init__("_getvoxsize", {"voxel_size" : voxel_size, "bounding_box" : bounding_box, "exactbounds" : exactbounds, **kwargs}) class _getbbox(_Bosl2Base): def __init__(self, voxel_size=None, bounding_box=None, exactbounds=None, f=None, **kwargs): super().__init__("_getbbox", {"voxel_size" : voxel_size, "bounding_box" : bounding_box, "exactbounds" : exactbounds, "f" : f, **kwargs}) class _showstats_isosurface(_Bosl2Base): def __init__(self, voxsize=None, bbox=None, isoval=None, cubes=None, triangles=None, faces=None, **kwargs): super().__init__("_showstats_isosurface", {"voxsize" : voxsize, "bbox" : bbox, "isoval" : isoval, "cubes" : cubes, "triangles" : triangles, "faces" : faces, **kwargs}) class contour(_Bosl2Base): def __init__(self, f=None, isovalue=None, bounding_box=None, pixel_size=None, pixel_count=None, use_centers=None, smoothing=None, closed=None, exact_bounds=None, show_stats=None, _mball=None, **kwargs): super().__init__("contour", {"f" : f, "isovalue" : isovalue, "bounding_box" : bounding_box, "pixel_size" : pixel_size, "pixel_count" : pixel_count, "use_centers" : use_centers, "smoothing" : smoothing, "closed" : closed, "exact_bounds" : exact_bounds, "show_stats" : show_stats, "_mball" : _mball, **kwargs}) class _region_smooth(_Bosl2Base): def __init__(self, reg=None, passes=None, bbox=None, count=None, **kwargs): super().__init__("_region_smooth", {"reg" : reg, "passes" : passes, "bbox" : bbox, "count" : count, **kwargs}) class _is_pt_on_bbox(_Bosl2Base): def __init__(self, p=None, bbox=None, **kwargs): super().__init__("_is_pt_on_bbox", {"p" : p, "bbox" : bbox, **kwargs}) class _pathpts_on_bbox(_Bosl2Base): def __init__(self, path=None, bbox=None, i=None, count=None, **kwargs): super().__init__("_pathpts_on_bbox", {"path" : path, "bbox" : bbox, "i" : i, "count" : count, **kwargs}) class _getautopixsize(_Bosl2Base): def __init__(self, bbox=None, numpixels=None, **kwargs): super().__init__("_getautopixsize", {"bbox" : bbox, "numpixels" : numpixels, **kwargs}) class _getpixsize(_Bosl2Base): def __init__(self, pixel_size=None, bounding_box=None, exactbounds=None, **kwargs): super().__init__("_getpixsize", {"pixel_size" : pixel_size, "bounding_box" : bounding_box, "exactbounds" : exactbounds, **kwargs}) class _getbbox2d(_Bosl2Base): def __init__(self, pixel_size=None, bounding_box=None, exactbounds=None, f=None, **kwargs): super().__init__("_getbbox2d", {"pixel_size" : pixel_size, "bounding_box" : bounding_box, "exactbounds" : exactbounds, "f" : f, **kwargs}) class _showstats_contour(_Bosl2Base): def __init__(self, pixelsize=None, bbox=None, isovalmin=None, isovalmax=None, pixels=None, pathlist=None, **kwargs): super().__init__("_showstats_contour", {"pixelsize" : pixelsize, "bbox" : bbox, "isovalmin" : isovalmin, "isovalmax" : isovalmax, "pixels" : pixels, "pathlist" : pathlist, **kwargs}) class metaballs(_Bosl2Base): def __init__(self, spec=None, bounding_box=None, voxel_size=None, voxel_count=None, isovalue=None, closed=None, exact_bounds=None, convexity=None, cp=None, anchor=None, spin=None, orient=None, atype=None, show_stats=None, show_box=None, debug=None, **kwargs): super().__init__("metaballs", {"spec" : spec, "bounding_box" : bounding_box, "voxel_size" : voxel_size, "voxel_count" : voxel_count, "isovalue" : isovalue, "closed" : closed, "exact_bounds" : exact_bounds, "convexity" : convexity, "cp" : cp, "anchor" : anchor, "spin" : spin, "orient" : orient, "atype" : atype, "show_stats" : show_stats, "show_box" : show_box, "debug" : debug, **kwargs}) class metaballs2d(_Bosl2Base): def __init__(self, spec=None, bounding_box=None, pixel_size=None, pixel_count=None, isovalue=None, use_centers=None, smoothing=None, exact_bounds=None, convexity=None, cp=None, anchor=None, spin=None, atype=None, show_stats=None, show_box=None, debug=None, **kwargs): super().__init__("metaballs2d", {"spec" : spec, "bounding_box" : bounding_box, "pixel_size" : pixel_size, "pixel_count" : pixel_count, "isovalue" : isovalue, "use_centers" : use_centers, "smoothing" : smoothing, "exact_bounds" : exact_bounds, "convexity" : convexity, "cp" : cp, "anchor" : anchor, "spin" : spin, "atype" : atype, "show_stats" : show_stats, "show_box" : show_box, "debug" : debug, **kwargs}) class isosurface(_Bosl2Base): def __init__(self, f=None, isovalue=None, bounding_box=None, voxel_size=None, voxel_count=None, reverse=None, closed=None, exact_bounds=None, convexity=None, cp=None, anchor=None, spin=None, orient=None, atype=None, show_stats=None, show_box=None, _mball=None, **kwargs): super().__init__("isosurface", {"f" : f, "isovalue" : isovalue, "bounding_box" : bounding_box, "voxel_size" : voxel_size, "voxel_count" : voxel_count, "reverse" : reverse, "closed" : closed, "exact_bounds" : exact_bounds, "convexity" : convexity, "cp" : cp, "anchor" : anchor, "spin" : spin, "orient" : orient, "atype" : atype, "show_stats" : show_stats, "show_box" : show_box, "_mball" : _mball, **kwargs}) class contour(_Bosl2Base): def __init__(self, f=None, isovalue=None, bounding_box=None, pixel_size=None, pixel_count=None, use_centers=None, smoothing=None, exact_bounds=None, cp=None, anchor=None, spin=None, atype=None, show_stats=None, show_box=None, _mball=None, **kwargs): super().__init__("contour", {"f" : f, "isovalue" : isovalue, "bounding_box" : bounding_box, "pixel_size" : pixel_size, "pixel_count" : pixel_count, "use_centers" : use_centers, "smoothing" : smoothing, "exact_bounds" : exact_bounds, "cp" : cp, "anchor" : anchor, "spin" : spin, "atype" : atype, "show_stats" : show_stats, "show_box" : show_box, "_mball" : _mball, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/joiners.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/joiners.scad'}", False) class half_joiner_clear(_Bosl2Base): def __init__(self, l=None, w=None, ang=None, clearance=None, overlap=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("half_joiner_clear", {"l" : l, "w" : w, "ang" : ang, "clearance" : clearance, "overlap" : overlap, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class half_joiner(_Bosl2Base): def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("half_joiner", {"l" : l, "w" : w, "base" : base, "ang" : ang, "screwsize" : screwsize, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class half_joiner2(_Bosl2Base): def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("half_joiner2", {"l" : l, "w" : w, "base" : base, "ang" : ang, "screwsize" : screwsize, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class joiner_clear(_Bosl2Base): def __init__(self, l=None, w=None, ang=None, clearance=None, overlap=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("joiner_clear", {"l" : l, "w" : w, "ang" : ang, "clearance" : clearance, "overlap" : overlap, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class joiner(_Bosl2Base): def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("joiner", {"l" : l, "w" : w, "base" : base, "ang" : ang, "screwsize" : screwsize, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class dovetail(_Bosl2Base): def __init__(self, gender=None, width=None, height=None, slide=None, h=None, w=None, angle=None, slope=None, thickness=None, taper=None, back_width=None, chamfer=None, extra=None, r=None, radius=None, round=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("dovetail", {"gender" : gender, "width" : width, "height" : height, "slide" : slide, "h" : h, "w" : w, "angle" : angle, "slope" : slope, "thickness" : thickness, "taper" : taper, "back_width" : back_width, "chamfer" : chamfer, "extra" : extra, "r" : r, "radius" : radius, "round" : round, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class _pin_size(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("_pin_size", {"size" : size, **kwargs}) class snap_pin(_Bosl2Base): def __init__(self, size=None, r=None, radius=None, d=None, diameter=None, l=None, length=None, nub_depth=None, snap=None, thickness=None, clearance=None, preload=None, pointed=None, anchor=None, spin=None, orient=None, center=None, **kwargs): super().__init__("snap_pin", {"size" : size, "r" : r, "radius" : radius, "d" : d, "diameter" : diameter, "l" : l, "length" : length, "nub_depth" : nub_depth, "snap" : snap, "thickness" : thickness, "clearance" : clearance, "preload" : preload, "pointed" : pointed, "anchor" : anchor, "spin" : spin, "orient" : orient, "center" : center, **kwargs}) class snap_pin_socket(_Bosl2Base): def __init__(self, size=None, r=None, radius=None, l=None, length=None, d=None, diameter=None, nub_depth=None, snap=None, fixed=None, pointed=None, fins=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("snap_pin_socket", {"size" : size, "r" : r, "radius" : radius, "l" : l, "length" : length, "d" : d, "diameter" : diameter, "nub_depth" : nub_depth, "snap" : snap, "fixed" : fixed, "pointed" : pointed, "fins" : fins, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class rabbit_clip(_Bosl2Base): def __init__(self, type=None, length=None, width=None, snap=None, thickness=None, depth=None, compression=None, clearance=None, lock=None, lock_clearance=None, splinesteps=None, anchor=None, orient=None, spin=None, **kwargs): super().__init__("rabbit_clip", {"type" : type, "length" : length, "width" : width, "snap" : snap, "thickness" : thickness, "depth" : depth, "compression" : compression, "clearance" : clearance, "lock" : lock, "lock_clearance" : lock_clearance, "splinesteps" : splinesteps, "anchor" : anchor, "orient" : orient, "spin" : spin, **kwargs}) class half_joiner_clear(_Bosl2Base): def __init__(self, l=None, w=None, ang=None, clearance=None, overlap=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("half_joiner_clear", {"l" : l, "w" : w, "ang" : ang, "clearance" : clearance, "overlap" : overlap, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class half_joiner(_Bosl2Base): def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("half_joiner", {"l" : l, "w" : w, "base" : base, "ang" : ang, "screwsize" : screwsize, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class half_joiner2(_Bosl2Base): def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("half_joiner2", {"l" : l, "w" : w, "base" : base, "ang" : ang, "screwsize" : screwsize, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class joiner_clear(_Bosl2Base): def __init__(self, l=None, w=None, ang=None, clearance=None, overlap=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("joiner_clear", {"l" : l, "w" : w, "ang" : ang, "clearance" : clearance, "overlap" : overlap, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class joiner(_Bosl2Base): def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("joiner", {"l" : l, "w" : w, "base" : base, "ang" : ang, "screwsize" : screwsize, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class dovetail(_Bosl2Base): def __init__(self, gender=None, width=None, height=None, slide=None, h=None, w=None, angle=None, slope=None, thickness=None, taper=None, back_width=None, chamfer=None, extra=None, r=None, radius=None, round=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("dovetail", {"gender" : gender, "width" : width, "height" : height, "slide" : slide, "h" : h, "w" : w, "angle" : angle, "slope" : slope, "thickness" : thickness, "taper" : taper, "back_width" : back_width, "chamfer" : chamfer, "extra" : extra, "r" : r, "radius" : radius, "round" : round, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class _pin_nub(_Bosl2Base): def __init__(self, r=None, nub=None, h=None, **kwargs): super().__init__("_pin_nub", {"r" : r, "nub" : nub, "h" : h, **kwargs}) class _pin_slot(_Bosl2Base): def __init__(self, l=None, r=None, t=None, d=None, nub=None, depth=None, stretch=None, **kwargs): super().__init__("_pin_slot", {"l" : l, "r" : r, "t" : t, "d" : d, "nub" : nub, "depth" : depth, "stretch" : stretch, **kwargs}) class _pin_shaft(_Bosl2Base): def __init__(self, r=None, lStraight=None, nub=None, nubscale=None, stretch=None, d=None, pointed=None, **kwargs): super().__init__("_pin_shaft", {"r" : r, "lStraight" : lStraight, "nub" : nub, "nubscale" : nubscale, "stretch" : stretch, "d" : d, "pointed" : pointed, **kwargs}) class snap_pin(_Bosl2Base): def __init__(self, size=None, r=None, radius=None, d=None, diameter=None, l=None, length=None, nub_depth=None, snap=None, thickness=None, clearance=None, preload=None, pointed=None, anchor=None, spin=None, orient=None, center=None, **kwargs): super().__init__("snap_pin", {"size" : size, "r" : r, "radius" : radius, "d" : d, "diameter" : diameter, "l" : l, "length" : length, "nub_depth" : nub_depth, "snap" : snap, "thickness" : thickness, "clearance" : clearance, "preload" : preload, "pointed" : pointed, "anchor" : anchor, "spin" : spin, "orient" : orient, "center" : center, **kwargs}) class snap_pin_socket(_Bosl2Base): def __init__(self, size=None, r=None, radius=None, l=None, length=None, d=None, diameter=None, nub_depth=None, snap=None, fixed=None, pointed=None, fins=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("snap_pin_socket", {"size" : size, "r" : r, "radius" : radius, "l" : l, "length" : length, "d" : d, "diameter" : diameter, "nub_depth" : nub_depth, "snap" : snap, "fixed" : fixed, "pointed" : pointed, "fins" : fins, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class rabbit_clip(_Bosl2Base): def __init__(self, type=None, length=None, width=None, snap=None, thickness=None, depth=None, compression=None, clearance=None, lock=None, lock_clearance=None, splinesteps=None, anchor=None, orient=None, spin=None, **kwargs): super().__init__("rabbit_clip", {"type" : type, "length" : length, "width" : width, "snap" : snap, "thickness" : thickness, "depth" : depth, "compression" : compression, "clearance" : clearance, "lock" : lock, "lock_clearance" : lock_clearance, "splinesteps" : splinesteps, "anchor" : anchor, "orient" : orient, "spin" : spin, **kwargs}) class hirth(_Bosl2Base): def __init__(self, n=None, ir=None, _or=None, id=None, od=None, tooth_angle=None, cone_angle=None, chamfer=None, rounding=None, base=None, crop=None, skew=None, rot=None, orient=None, anchor=None, spin=None, **kwargs): super().__init__("hirth", {"n" : n, "ir" : ir, "_or" : _or, "id" : id, "od" : od, "tooth_angle" : tooth_angle, "cone_angle" : cone_angle, "chamfer" : chamfer, "rounding" : rounding, "base" : base, "crop" : crop, "skew" : skew, "rot" : rot, "orient" : orient, "anchor" : anchor, "spin" : spin, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/linalg.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/linalg.scad'}", False) class is_matrix(_Bosl2Base): def __init__(self, A=None, m=None, n=None, square=None, **kwargs): super().__init__("is_matrix", {"A" : A, "m" : m, "n" : n, "square" : square, **kwargs}) class is_matrix_symmetric(_Bosl2Base): def __init__(self, A=None, eps=None, **kwargs): super().__init__("is_matrix_symmetric", {"A" : A, "eps" : eps, **kwargs}) class is_rotation(_Bosl2Base): def __init__(self, A=None, dim=None, centered=None, **kwargs): super().__init__("is_rotation", {"A" : A, "dim" : dim, "centered" : centered, **kwargs}) class echo_matrix(_Bosl2Base): def __init__(self, M=None, description=None, sig=None, sep=None, eps=None, **kwargs): super().__init__("echo_matrix", {"M" : M, "description" : description, "sig" : sig, "sep" : sep, "eps" : eps, **kwargs}) class column(_Bosl2Base): def __init__(self, M=None, i=None, **kwargs): super().__init__("column", {"M" : M, "i" : i, **kwargs}) class submatrix(_Bosl2Base): def __init__(self, M=None, idx1=None, idx2=None, **kwargs): super().__init__("submatrix", {"M" : M, "idx1" : idx1, "idx2" : idx2, **kwargs}) class ident(_Bosl2Base): def __init__(self, n=None, **kwargs): super().__init__("ident", {"n" : n, **kwargs}) class diagonal_matrix(_Bosl2Base): def __init__(self, diag=None, offdiag=None, **kwargs): super().__init__("diagonal_matrix", {"diag" : diag, "offdiag" : offdiag, **kwargs}) class transpose(_Bosl2Base): def __init__(self, M=None, reverse=None, **kwargs): super().__init__("transpose", {"M" : M, "reverse" : reverse, **kwargs}) class outer_product(_Bosl2Base): def __init__(self, u=None, v=None, **kwargs): super().__init__("outer_product", {"u" : u, "v" : v, **kwargs}) class submatrix_set(_Bosl2Base): def __init__(self, M=None, A=None, m=None, n=None, **kwargs): super().__init__("submatrix_set", {"M" : M, "A" : A, "m" : m, "n" : n, **kwargs}) class hstack(_Bosl2Base): def __init__(self, M1=None, M2=None, M3=None, **kwargs): super().__init__("hstack", {"M1" : M1, "M2" : M2, "M3" : M3, **kwargs}) class block_matrix(_Bosl2Base): def __init__(self, M=None, **kwargs): super().__init__("block_matrix", {"M" : M, **kwargs}) class linear_solve(_Bosl2Base): def __init__(self, A=None, b=None, pivot=None, **kwargs): super().__init__("linear_solve", {"A" : A, "b" : b, "pivot" : pivot, **kwargs}) class linear_solve3(_Bosl2Base): def __init__(self, A=None, b=None, **kwargs): super().__init__("linear_solve3", {"A" : A, "b" : b, **kwargs}) class matrix_inverse(_Bosl2Base): def __init__(self, A=None, **kwargs): super().__init__("matrix_inverse", {"A" : A, **kwargs}) class rot_inverse(_Bosl2Base): def __init__(self, T=None, **kwargs): super().__init__("rot_inverse", {"T" : T, **kwargs}) class null_space(_Bosl2Base): def __init__(self, A=None, eps=None, **kwargs): super().__init__("null_space", {"A" : A, "eps" : eps, **kwargs}) class qr_factor(_Bosl2Base): def __init__(self, A=None, pivot=None, **kwargs): super().__init__("qr_factor", {"A" : A, "pivot" : pivot, **kwargs}) class _qr_factor(_Bosl2Base): def __init__(self, A=None, Q=None, P=None, pivot=None, col=None, m=None, n=None, **kwargs): super().__init__("_qr_factor", {"A" : A, "Q" : Q, "P" : P, "pivot" : pivot, "col" : col, "m" : m, "n" : n, **kwargs}) class _swap_matrix(_Bosl2Base): def __init__(self, n=None, i=None, j=None, **kwargs): super().__init__("_swap_matrix", {"n" : n, "i" : i, "j" : j, **kwargs}) class back_substitute(_Bosl2Base): def __init__(self, R=None, b=None, transpose=None, **kwargs): super().__init__("back_substitute", {"R" : R, "b" : b, "transpose" : transpose, **kwargs}) class _back_substitute(_Bosl2Base): def __init__(self, R=None, b=None, x=None, **kwargs): super().__init__("_back_substitute", {"R" : R, "b" : b, "x" : x, **kwargs}) class cholesky(_Bosl2Base): def __init__(self, A=None, **kwargs): super().__init__("cholesky", {"A" : A, **kwargs}) class _cholesky(_Bosl2Base): def __init__(self, A=None, L=None, n=None, **kwargs): super().__init__("_cholesky", {"A" : A, "L" : L, "n" : n, **kwargs}) class det2(_Bosl2Base): def __init__(self, M=None, **kwargs): super().__init__("det2", {"M" : M, **kwargs}) class det3(_Bosl2Base): def __init__(self, M=None, **kwargs): super().__init__("det3", {"M" : M, **kwargs}) class det4(_Bosl2Base): def __init__(self, M=None, **kwargs): super().__init__("det4", {"M" : M, **kwargs}) class determinant(_Bosl2Base): def __init__(self, M=None, **kwargs): super().__init__("determinant", {"M" : M, **kwargs}) class norm_fro(_Bosl2Base): def __init__(self, A=None, **kwargs): super().__init__("norm_fro", {"A" : A, **kwargs}) class matrix_trace(_Bosl2Base): def __init__(self, M=None, **kwargs): super().__init__("matrix_trace", {"M" : M, **kwargs}) class echo_matrix(_Bosl2Base): def __init__(self, M=None, description=None, sig=None, sep=None, eps=None, **kwargs): super().__init__("echo_matrix", {"M" : M, "description" : description, "sig" : sig, "sep" : sep, "eps" : eps, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/linear_bearings.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/linear_bearings.scad'}", False) class lmXuu_info(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("lmXuu_info", {"size" : size, **kwargs}) class linear_bearing_housing(_Bosl2Base): def __init__(self, d=None, l=None, tab=None, gap=None, wall=None, tabwall=None, screwsize=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("linear_bearing_housing", {"d" : d, "l" : l, "tab" : tab, "gap" : gap, "wall" : wall, "tabwall" : tabwall, "screwsize" : screwsize, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class linear_bearing(_Bosl2Base): def __init__(self, l=None, od=None, id=None, length=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("linear_bearing", {"l" : l, "od" : od, "id" : id, "length" : length, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class lmXuu_housing(_Bosl2Base): def __init__(self, size=None, tab=None, gap=None, wall=None, tabwall=None, screwsize=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("lmXuu_housing", {"size" : size, "tab" : tab, "gap" : gap, "wall" : wall, "tabwall" : tabwall, "screwsize" : screwsize, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class lmXuu_bearing(_Bosl2Base): def __init__(self, size=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("lmXuu_bearing", {"size" : size, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/lists.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/lists.scad'}", False) class is_homogeneous(_Bosl2Base): def __init__(self, l=None, depth=None, **kwargs): super().__init__("is_homogeneous", {"l" : l, "depth" : depth, **kwargs}) class is_homogenous(_Bosl2Base): def __init__(self, l=None, depth=None, **kwargs): super().__init__("is_homogenous", {"l" : l, "depth" : depth, **kwargs}) class _same_type(_Bosl2Base): def __init__(self, a=None, b=None, depth=None, **kwargs): super().__init__("_same_type", {"a" : a, "b" : b, "depth" : depth, **kwargs}) class min_length(_Bosl2Base): def __init__(self, list=None, **kwargs): super().__init__("min_length", {"list" : list, **kwargs}) class max_length(_Bosl2Base): def __init__(self, list=None, **kwargs): super().__init__("max_length", {"list" : list, **kwargs}) class _list_shape_recurse(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("_list_shape_recurse", {"v" : v, **kwargs}) class _list_shape_recurse(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("_list_shape_recurse", {"v" : v, **kwargs}) class list_shape(_Bosl2Base): def __init__(self, v=None, depth=None, **kwargs): super().__init__("list_shape", {"v" : v, "depth" : depth, **kwargs}) class in_list(_Bosl2Base): def __init__(self, val=None, list=None, idx=None, **kwargs): super().__init__("in_list", {"val" : val, "list" : list, "idx" : idx, **kwargs}) class select(_Bosl2Base): def __init__(self, list=None, start=None, end=None, **kwargs): super().__init__("select", {"list" : list, "start" : start, "end" : end, **kwargs}) class slice(_Bosl2Base): def __init__(self, list=None, start=None, end=None, **kwargs): super().__init__("slice", {"list" : list, "start" : start, "end" : end, **kwargs}) class last(_Bosl2Base): def __init__(self, list=None, **kwargs): super().__init__("last", {"list" : list, **kwargs}) class list_head(_Bosl2Base): def __init__(self, list=None, to=None, **kwargs): super().__init__("list_head", {"list" : list, "to" : to, **kwargs}) class list_tail(_Bosl2Base): def __init__(self, list=None, _from=None, **kwargs): super().__init__("list_tail", {"list" : list, "_from" : _from, **kwargs}) class bselect(_Bosl2Base): def __init__(self, list=None, index=None, **kwargs): super().__init__("bselect", {"list" : list, "index" : index, **kwargs}) class repeat(_Bosl2Base): def __init__(self, val=None, n=None, i=None, **kwargs): super().__init__("repeat", {"val" : val, "n" : n, "i" : i, **kwargs}) class list_bset(_Bosl2Base): def __init__(self, indexset=None, valuelist=None, dflt=None, **kwargs): super().__init__("list_bset", {"indexset" : indexset, "valuelist" : valuelist, "dflt" : dflt, **kwargs}) class list(_Bosl2Base): def __init__(self, l=None, **kwargs): super().__init__("list", {"l" : l, **kwargs}) class force_list(_Bosl2Base): def __init__(self, value=None, n=None, fill=None, **kwargs): super().__init__("force_list", {"value" : value, "n" : n, "fill" : fill, **kwargs}) class reverse(_Bosl2Base): def __init__(self, list=None, **kwargs): super().__init__("reverse", {"list" : list, **kwargs}) class list_rotate(_Bosl2Base): def __init__(self, list=None, n=None, **kwargs): super().__init__("list_rotate", {"list" : list, "n" : n, **kwargs}) class shuffle(_Bosl2Base): def __init__(self, list=None, seed=None, **kwargs): super().__init__("shuffle", {"list" : list, "seed" : seed, **kwargs}) class repeat_entries(_Bosl2Base): def __init__(self, list=None, N=None, exact=None, **kwargs): super().__init__("repeat_entries", {"list" : list, "N" : N, "exact" : exact, **kwargs}) class list_pad(_Bosl2Base): def __init__(self, list=None, minlen=None, fill=None, **kwargs): super().__init__("list_pad", {"list" : list, "minlen" : minlen, "fill" : fill, **kwargs}) class list_set(_Bosl2Base): def __init__(self, list=None, indices=None, values=None, dflt=None, minlen=None, **kwargs): super().__init__("list_set", {"list" : list, "indices" : indices, "values" : values, "dflt" : dflt, "minlen" : minlen, **kwargs}) class list_insert(_Bosl2Base): def __init__(self, list=None, indices=None, values=None, **kwargs): super().__init__("list_insert", {"list" : list, "indices" : indices, "values" : values, **kwargs}) class list_remove(_Bosl2Base): def __init__(self, list=None, ind=None, **kwargs): super().__init__("list_remove", {"list" : list, "ind" : ind, **kwargs}) class list_remove_values(_Bosl2Base): def __init__(self, list=None, values=None, all=None, **kwargs): super().__init__("list_remove_values", {"list" : list, "values" : values, "all" : all, **kwargs}) class idx(_Bosl2Base): def __init__(self, list=None, s=None, e=None, step=None, **kwargs): super().__init__("idx", {"list" : list, "s" : s, "e" : e, "step" : step, **kwargs}) class pair(_Bosl2Base): def __init__(self, list=None, wrap=None, **kwargs): super().__init__("pair", {"list" : list, "wrap" : wrap, **kwargs}) class triplet(_Bosl2Base): def __init__(self, list=None, wrap=None, **kwargs): super().__init__("triplet", {"list" : list, "wrap" : wrap, **kwargs}) class combinations(_Bosl2Base): def __init__(self, l=None, n=None, _s=None, **kwargs): super().__init__("combinations", {"l" : l, "n" : n, "_s" : _s, **kwargs}) class permutations(_Bosl2Base): def __init__(self, l=None, n=None, **kwargs): super().__init__("permutations", {"l" : l, "n" : n, **kwargs}) class list_to_matrix(_Bosl2Base): def __init__(self, v=None, cnt=None, dflt=None, **kwargs): super().__init__("list_to_matrix", {"v" : v, "cnt" : cnt, "dflt" : dflt, **kwargs}) class flatten(_Bosl2Base): def __init__(self, l=None, **kwargs): super().__init__("flatten", {"l" : l, **kwargs}) class full_flatten(_Bosl2Base): def __init__(self, l=None, **kwargs): super().__init__("full_flatten", {"l" : l, **kwargs}) class set_union(_Bosl2Base): def __init__(self, a=None, b=None, get_indices=None, **kwargs): super().__init__("set_union", {"a" : a, "b" : b, "get_indices" : get_indices, **kwargs}) class set_difference(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("set_difference", {"a" : a, "b" : b, **kwargs}) class set_intersection(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("set_intersection", {"a" : a, "b" : b, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/masks2d.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/masks2d.scad'}", False) class _inset_corner(_Bosl2Base): def __init__(self, corner=None, mask_angle=None, inset=None, excess=None, flat_top=None, **kwargs): super().__init__("_inset_corner", {"corner" : corner, "mask_angle" : mask_angle, "inset" : inset, "excess" : excess, "flat_top" : flat_top, **kwargs}) class mask2d_roundover(_Bosl2Base): def __init__(self, r=None, inset=None, mask_angle=None, excess=None, clip_angle=None, flat_top=None, quarter_round=None, d=None, h=None, height=None, cut=None, joint=None, anchor=None, spin=None, **kwargs): super().__init__("mask2d_roundover", {"r" : r, "inset" : inset, "mask_angle" : mask_angle, "excess" : excess, "clip_angle" : clip_angle, "flat_top" : flat_top, "quarter_round" : quarter_round, "d" : d, "h" : h, "height" : height, "cut" : cut, "joint" : joint, "anchor" : anchor, "spin" : spin, **kwargs}) class mask2d_teardrop(_Bosl2Base): def __init__(self, r=None, angle=None, inset=None, mask_angle=None, excess=None, flat_top=None, d=None, h=None, height=None, cut=None, joint=None, anchor=None, spin=None, **kwargs): super().__init__("mask2d_teardrop", {"r" : r, "angle" : angle, "inset" : inset, "mask_angle" : mask_angle, "excess" : excess, "flat_top" : flat_top, "d" : d, "h" : h, "height" : height, "cut" : cut, "joint" : joint, "anchor" : anchor, "spin" : spin, **kwargs}) class mask2d_cove(_Bosl2Base): def __init__(self, r=None, inset=None, mask_angle=None, excess=None, flat_top=None, d=None, h=None, height=None, bulge=None, quarter_round=None, anchor=None, spin=None, **kwargs): super().__init__("mask2d_cove", {"r" : r, "inset" : inset, "mask_angle" : mask_angle, "excess" : excess, "flat_top" : flat_top, "d" : d, "h" : h, "height" : height, "bulge" : bulge, "quarter_round" : quarter_round, "anchor" : anchor, "spin" : spin, **kwargs}) class mask2d_chamfer(_Bosl2Base): def __init__(self, edge=None, angle=None, inset=None, excess=None, mask_angle=None, flat_top=None, x=None, y=None, h=None, w=None, width=None, height=None, anchor=None, spin=None, **kwargs): super().__init__("mask2d_chamfer", {"edge" : edge, "angle" : angle, "inset" : inset, "excess" : excess, "mask_angle" : mask_angle, "flat_top" : flat_top, "x" : x, "y" : y, "h" : h, "w" : w, "width" : width, "height" : height, "anchor" : anchor, "spin" : spin, **kwargs}) class mask2d_rabbet(_Bosl2Base): def __init__(self, size=None, mask_angle=None, excess=None, anchor=None, spin=None, **kwargs): super().__init__("mask2d_rabbet", {"size" : size, "mask_angle" : mask_angle, "excess" : excess, "anchor" : anchor, "spin" : spin, **kwargs}) class mask2d_dovetail(_Bosl2Base): def __init__(self, edge=None, angle=None, slope=None, shelf=None, inset=None, mask_angle=None, excess=None, flat_top=None, w=None, width=None, h=None, height=None, anchor=None, spin=None, x=None, y=None, **kwargs): super().__init__("mask2d_dovetail", {"edge" : edge, "angle" : angle, "slope" : slope, "shelf" : shelf, "inset" : inset, "mask_angle" : mask_angle, "excess" : excess, "flat_top" : flat_top, "w" : w, "width" : width, "h" : h, "height" : height, "anchor" : anchor, "spin" : spin, "x" : x, "y" : y, **kwargs}) class mask2d_ogee(_Bosl2Base): def __init__(self, pattern=None, excess=None, anchor=None, spin=None, **kwargs): super().__init__("mask2d_ogee", {"pattern" : pattern, "excess" : excess, "anchor" : anchor, "spin" : spin, **kwargs}) class mask2d_roundover(_Bosl2Base): def __init__(self, r=None, inset=None, mask_angle=None, excess=None, flat_top=None, d=None, h=None, height=None, cut=None, quarter_round=None, joint=None, anchor=None, spin=None, clip_angle=None, **kwargs): super().__init__("mask2d_roundover", {"r" : r, "inset" : inset, "mask_angle" : mask_angle, "excess" : excess, "flat_top" : flat_top, "d" : d, "h" : h, "height" : height, "cut" : cut, "quarter_round" : quarter_round, "joint" : joint, "anchor" : anchor, "spin" : spin, "clip_angle" : clip_angle, **kwargs}) class mask2d_teardrop(_Bosl2Base): def __init__(self, r=None, angle=None, mask_angle=None, excess=None, inset=None, flat_top=None, height=None, d=None, h=None, cut=None, joint=None, anchor=None, spin=None, **kwargs): super().__init__("mask2d_teardrop", {"r" : r, "angle" : angle, "mask_angle" : mask_angle, "excess" : excess, "inset" : inset, "flat_top" : flat_top, "height" : height, "d" : d, "h" : h, "cut" : cut, "joint" : joint, "anchor" : anchor, "spin" : spin, **kwargs}) class mask2d_cove(_Bosl2Base): def __init__(self, r=None, inset=None, mask_angle=None, excess=None, flat_top=None, bulge=None, d=None, h=None, height=None, quarter_round=None, anchor=None, spin=None, **kwargs): super().__init__("mask2d_cove", {"r" : r, "inset" : inset, "mask_angle" : mask_angle, "excess" : excess, "flat_top" : flat_top, "bulge" : bulge, "d" : d, "h" : h, "height" : height, "quarter_round" : quarter_round, "anchor" : anchor, "spin" : spin, **kwargs}) class mask2d_chamfer(_Bosl2Base): def __init__(self, edge=None, angle=None, inset=None, excess=None, mask_angle=None, flat_top=None, x=None, y=None, h=None, w=None, height=None, width=None, anchor=None, spin=None, **kwargs): super().__init__("mask2d_chamfer", {"edge" : edge, "angle" : angle, "inset" : inset, "excess" : excess, "mask_angle" : mask_angle, "flat_top" : flat_top, "x" : x, "y" : y, "h" : h, "w" : w, "height" : height, "width" : width, "anchor" : anchor, "spin" : spin, **kwargs}) class mask2d_rabbet(_Bosl2Base): def __init__(self, size=None, mask_angle=None, excess=None, anchor=None, spin=None, **kwargs): super().__init__("mask2d_rabbet", {"size" : size, "mask_angle" : mask_angle, "excess" : excess, "anchor" : anchor, "spin" : spin, **kwargs}) class mask2d_dovetail(_Bosl2Base): def __init__(self, edge=None, angle=None, shelf=None, inset=None, mask_angle=None, excess=None, flat_top=None, w=None, h=None, width=None, height=None, slope=None, anchor=None, spin=None, x=None, y=None, **kwargs): super().__init__("mask2d_dovetail", {"edge" : edge, "angle" : angle, "shelf" : shelf, "inset" : inset, "mask_angle" : mask_angle, "excess" : excess, "flat_top" : flat_top, "w" : w, "h" : h, "width" : width, "height" : height, "slope" : slope, "anchor" : anchor, "spin" : spin, "x" : x, "y" : y, **kwargs}) class mask2d_ogee(_Bosl2Base): def __init__(self, pattern=None, excess=None, anchor=None, spin=None, **kwargs): super().__init__("mask2d_ogee", {"pattern" : pattern, "excess" : excess, "anchor" : anchor, "spin" : spin, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/masks3d.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/masks3d.scad'}", False) class chamfer_edge_mask(_Bosl2Base): def __init__(self, l=None, chamfer=None, excess=None, h=None, length=None, height=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("chamfer_edge_mask", {"l" : l, "chamfer" : chamfer, "excess" : excess, "h" : h, "length" : length, "height" : height, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class chamfer_corner_mask(_Bosl2Base): def __init__(self, chamfer=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("chamfer_corner_mask", {"chamfer" : chamfer, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class chamfer_cylinder_mask(_Bosl2Base): def __init__(self, r=None, chamfer=None, d=None, ang=None, from_end=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("chamfer_cylinder_mask", {"r" : r, "chamfer" : chamfer, "d" : d, "ang" : ang, "from_end" : from_end, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class rounding_edge_mask(_Bosl2Base): def __init__(self, l=None, r=None, ang=None, r1=None, r2=None, d=None, d1=None, d2=None, excess=None, anchor=None, spin=None, orient=None, h=None, height=None, length=None, **kwargs): super().__init__("rounding_edge_mask", {"l" : l, "r" : r, "ang" : ang, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "excess" : excess, "anchor" : anchor, "spin" : spin, "orient" : orient, "h" : h, "height" : height, "length" : length, **kwargs}) class rounding_corner_mask(_Bosl2Base): def __init__(self, r=None, ang=None, d=None, style=None, excess=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("rounding_corner_mask", {"r" : r, "ang" : ang, "d" : d, "style" : style, "excess" : excess, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class rounding_angled_edge_mask(_Bosl2Base): def __init__(self, h=None, r=None, r1=None, r2=None, d=None, d1=None, d2=None, ang=None, anchor=None, spin=None, orient=None, l=None, height=None, length=None, **kwargs): super().__init__("rounding_angled_edge_mask", {"h" : h, "r" : r, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "ang" : ang, "anchor" : anchor, "spin" : spin, "orient" : orient, "l" : l, "height" : height, "length" : length, **kwargs}) class rounding_angled_corner_mask(_Bosl2Base): def __init__(self, r=None, ang=None, d=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("rounding_angled_corner_mask", {"r" : r, "ang" : ang, "d" : d, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class rounding_cylinder_mask(_Bosl2Base): def __init__(self, r=None, rounding=None, d=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("rounding_cylinder_mask", {"r" : r, "rounding" : rounding, "d" : d, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class rounding_hole_mask(_Bosl2Base): def __init__(self, r=None, rounding=None, excess=None, d=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("rounding_hole_mask", {"r" : r, "rounding" : rounding, "excess" : excess, "d" : d, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class teardrop_edge_mask(_Bosl2Base): def __init__(self, l=None, r=None, angle=None, excess=None, d=None, anchor=None, spin=None, orient=None, h=None, height=None, length=None, **kwargs): super().__init__("teardrop_edge_mask", {"l" : l, "r" : r, "angle" : angle, "excess" : excess, "d" : d, "anchor" : anchor, "spin" : spin, "orient" : orient, "h" : h, "height" : height, "length" : length, **kwargs}) class teardrop_corner_mask(_Bosl2Base): def __init__(self, r=None, angle=None, excess=None, d=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("teardrop_corner_mask", {"r" : r, "angle" : angle, "excess" : excess, "d" : d, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class chamfer_edge_mask(_Bosl2Base): def __init__(self, l=None, chamfer=None, excess=None, h=None, length=None, height=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("chamfer_edge_mask", {"l" : l, "chamfer" : chamfer, "excess" : excess, "h" : h, "length" : length, "height" : height, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class chamfer_corner_mask(_Bosl2Base): def __init__(self, chamfer=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("chamfer_corner_mask", {"chamfer" : chamfer, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class chamfer_cylinder_mask(_Bosl2Base): def __init__(self, r=None, chamfer=None, d=None, ang=None, from_end=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("chamfer_cylinder_mask", {"r" : r, "chamfer" : chamfer, "d" : d, "ang" : ang, "from_end" : from_end, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class rounding_edge_mask(_Bosl2Base): def __init__(self, l=None, r=None, ang=None, r1=None, r2=None, excess=None, d1=None, d2=None, d=None, length=None, h=None, height=None, anchor=None, spin=None, orient=None, rounding=None, rounding1=None, rounding2=None, chamfer=None, chamfer1=None, chamfer2=None, _remove_tag=None, **kwargs): super().__init__("rounding_edge_mask", {"l" : l, "r" : r, "ang" : ang, "r1" : r1, "r2" : r2, "excess" : excess, "d1" : d1, "d2" : d2, "d" : d, "length" : length, "h" : h, "height" : height, "anchor" : anchor, "spin" : spin, "orient" : orient, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "_remove_tag" : _remove_tag, **kwargs}) class rounding_corner_mask(_Bosl2Base): def __init__(self, r=None, ang=None, d=None, style=None, excess=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("rounding_corner_mask", {"r" : r, "ang" : ang, "d" : d, "style" : style, "excess" : excess, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class rounding_angled_edge_mask(_Bosl2Base): def __init__(self, h=None, r=None, r1=None, r2=None, d=None, d1=None, d2=None, ang=None, anchor=None, spin=None, orient=None, l=None, height=None, length=None, **kwargs): super().__init__("rounding_angled_edge_mask", {"h" : h, "r" : r, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "ang" : ang, "anchor" : anchor, "spin" : spin, "orient" : orient, "l" : l, "height" : height, "length" : length, **kwargs}) class rounding_angled_corner_mask(_Bosl2Base): def __init__(self, r=None, ang=None, d=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("rounding_angled_corner_mask", {"r" : r, "ang" : ang, "d" : d, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class rounding_cylinder_mask(_Bosl2Base): def __init__(self, r=None, rounding=None, d=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("rounding_cylinder_mask", {"r" : r, "rounding" : rounding, "d" : d, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class rounding_hole_mask(_Bosl2Base): def __init__(self, r=None, rounding=None, excess=None, d=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("rounding_hole_mask", {"r" : r, "rounding" : rounding, "excess" : excess, "d" : d, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class teardrop_edge_mask(_Bosl2Base): def __init__(self, l=None, r=None, angle=None, excess=None, d=None, anchor=None, spin=None, orient=None, h=None, height=None, length=None, **kwargs): super().__init__("teardrop_edge_mask", {"l" : l, "r" : r, "angle" : angle, "excess" : excess, "d" : d, "anchor" : anchor, "spin" : spin, "orient" : orient, "h" : h, "height" : height, "length" : length, **kwargs}) class teardrop_corner_mask(_Bosl2Base): def __init__(self, r=None, angle=None, excess=None, d=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("teardrop_corner_mask", {"r" : r, "angle" : angle, "excess" : excess, "d" : d, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/math.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/math.scad'}", False) PHI = _OpenSCADConstant('PHI') EPSILON = _OpenSCADConstant('EPSILON') INF = _OpenSCADConstant('INF') NAN = _OpenSCADConstant('NAN') class count(_Bosl2Base): def __init__(self, n=None, s=None, step=None, reverse=None, **kwargs): super().__init__("count", {"n" : n, "s" : s, "step" : step, "reverse" : reverse, **kwargs}) class lerp(_Bosl2Base): def __init__(self, a=None, b=None, u=None, **kwargs): super().__init__("lerp", {"a" : a, "b" : b, "u" : u, **kwargs}) class lerpn(_Bosl2Base): def __init__(self, a=None, b=None, n=None, endpoint=None, **kwargs): super().__init__("lerpn", {"a" : a, "b" : b, "n" : n, "endpoint" : endpoint, **kwargs}) class bilerp(_Bosl2Base): def __init__(self, points=None, x=None, y=None, **kwargs): super().__init__("bilerp", {"points" : points, "x" : x, "y" : y, **kwargs}) class sqr(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("sqr", {"x" : x, **kwargs}) class log2(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("log2", {"x" : x, **kwargs}) class hypot(_Bosl2Base): def __init__(self, x=None, y=None, z=None, **kwargs): super().__init__("hypot", {"x" : x, "y" : y, "z" : z, **kwargs}) class factorial(_Bosl2Base): def __init__(self, n=None, d=None, **kwargs): super().__init__("factorial", {"n" : n, "d" : d, **kwargs}) class binomial(_Bosl2Base): def __init__(self, n=None, **kwargs): super().__init__("binomial", {"n" : n, **kwargs}) class binomial_coefficient(_Bosl2Base): def __init__(self, n=None, k=None, **kwargs): super().__init__("binomial_coefficient", {"n" : n, "k" : k, **kwargs}) class gcd(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("gcd", {"a" : a, "b" : b, **kwargs}) class _lcm(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("_lcm", {"a" : a, "b" : b, **kwargs}) class _lcmlist(_Bosl2Base): def __init__(self, a=None, **kwargs): super().__init__("_lcmlist", {"a" : a, **kwargs}) class lcm(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("lcm", {"a" : a, "b" : b, **kwargs}) class rational_approx(_Bosl2Base): def __init__(self, x=None, maxq=None, cfrac=None, p=None, q=None, **kwargs): super().__init__("rational_approx", {"x" : x, "maxq" : maxq, "cfrac" : cfrac, "p" : p, "q" : q, **kwargs}) class _cfrac_to_pq(_Bosl2Base): def __init__(self, cfrac=None, p=None, q=None, ind=None, **kwargs): super().__init__("_cfrac_to_pq", {"cfrac" : cfrac, "p" : p, "q" : q, "ind" : ind, **kwargs}) class sinh(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("sinh", {"x" : x, **kwargs}) class cosh(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("cosh", {"x" : x, **kwargs}) class tanh(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("tanh", {"x" : x, **kwargs}) class asinh(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("asinh", {"x" : x, **kwargs}) class acosh(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("acosh", {"x" : x, **kwargs}) class atanh(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("atanh", {"x" : x, **kwargs}) class quant(_Bosl2Base): def __init__(self, x=None, y=None, **kwargs): super().__init__("quant", {"x" : x, "y" : y, **kwargs}) class _roundall(_Bosl2Base): def __init__(self, data=None, **kwargs): super().__init__("_roundall", {"data" : data, **kwargs}) class quantdn(_Bosl2Base): def __init__(self, x=None, y=None, **kwargs): super().__init__("quantdn", {"x" : x, "y" : y, **kwargs}) class _floorall(_Bosl2Base): def __init__(self, data=None, **kwargs): super().__init__("_floorall", {"data" : data, **kwargs}) class quantup(_Bosl2Base): def __init__(self, x=None, y=None, **kwargs): super().__init__("quantup", {"x" : x, "y" : y, **kwargs}) class _ceilall(_Bosl2Base): def __init__(self, data=None, **kwargs): super().__init__("_ceilall", {"data" : data, **kwargs}) class constrain(_Bosl2Base): def __init__(self, v=None, minval=None, maxval=None, **kwargs): super().__init__("constrain", {"v" : v, "minval" : minval, "maxval" : maxval, **kwargs}) class posmod(_Bosl2Base): def __init__(self, x=None, m=None, **kwargs): super().__init__("posmod", {"x" : x, "m" : m, **kwargs}) class modang(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("modang", {"x" : x, **kwargs}) class mean_angle(_Bosl2Base): def __init__(self, angle1=None, angle2=None, **kwargs): super().__init__("mean_angle", {"angle1" : angle1, "angle2" : angle2, **kwargs}) class fit_to_range(_Bosl2Base): def __init__(self, M=None, minval=None, maxval=None, **kwargs): super().__init__("fit_to_range", {"M" : M, "minval" : minval, "maxval" : maxval, **kwargs}) class sum(_Bosl2Base): def __init__(self, v=None, dflt=None, **kwargs): super().__init__("sum", {"v" : v, "dflt" : dflt, **kwargs}) class _sum(_Bosl2Base): def __init__(self, v=None, _total=None, _i=None, **kwargs): super().__init__("_sum", {"v" : v, "_total" : _total, "_i" : _i, **kwargs}) class mean(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("mean", {"v" : v, **kwargs}) class median(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("median", {"v" : v, **kwargs}) class deltas(_Bosl2Base): def __init__(self, v=None, wrap=None, **kwargs): super().__init__("deltas", {"v" : v, "wrap" : wrap, **kwargs}) class cumsum(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("cumsum", {"v" : v, **kwargs}) class product(_Bosl2Base): def __init__(self, list=None, right=None, **kwargs): super().__init__("product", {"list" : list, "right" : right, **kwargs}) class cumprod(_Bosl2Base): def __init__(self, list=None, right=None, **kwargs): super().__init__("cumprod", {"list" : list, "right" : right, **kwargs}) class convolve(_Bosl2Base): def __init__(self, p=None, q=None, **kwargs): super().__init__("convolve", {"p" : p, "q" : q, **kwargs}) class sum_of_sines(_Bosl2Base): def __init__(self, a=None, sines=None, **kwargs): super().__init__("sum_of_sines", {"a" : a, "sines" : sines, **kwargs}) class rand_int(_Bosl2Base): def __init__(self, minval=None, maxval=None, n=None, seed=None, **kwargs): super().__init__("rand_int", {"minval" : minval, "maxval" : maxval, "n" : n, "seed" : seed, **kwargs}) class random_points(_Bosl2Base): def __init__(self, n=None, dim=None, scale=None, seed=None, **kwargs): super().__init__("random_points", {"n" : n, "dim" : dim, "scale" : scale, "seed" : seed, **kwargs}) class gaussian_rands(_Bosl2Base): def __init__(self, n=None, mean=None, cov=None, seed=None, **kwargs): super().__init__("gaussian_rands", {"n" : n, "mean" : mean, "cov" : cov, "seed" : seed, **kwargs}) class exponential_rands(_Bosl2Base): def __init__(self, n=None, _lambda=None, seed=None, **kwargs): super().__init__("exponential_rands", {"n" : n, "_lambda" : _lambda, "seed" : seed, **kwargs}) class spherical_random_points(_Bosl2Base): def __init__(self, n=None, radius=None, seed=None, **kwargs): super().__init__("spherical_random_points", {"n" : n, "radius" : radius, "seed" : seed, **kwargs}) class random_polygon(_Bosl2Base): def __init__(self, n=None, size=None, seed=None, **kwargs): super().__init__("random_polygon", {"n" : n, "size" : size, "seed" : seed, **kwargs}) class deriv(_Bosl2Base): def __init__(self, data=None, h=None, closed=None, **kwargs): super().__init__("deriv", {"data" : data, "h" : h, "closed" : closed, **kwargs}) class _dnu_calc(_Bosl2Base): def __init__(self, f1=None, fc=None, f2=None, h1=None, h2=None, **kwargs): super().__init__("_dnu_calc", {"f1" : f1, "fc" : fc, "f2" : f2, "h1" : h1, "h2" : h2, **kwargs}) class _deriv_nonuniform(_Bosl2Base): def __init__(self, data=None, h=None, closed=None, **kwargs): super().__init__("_deriv_nonuniform", {"data" : data, "h" : h, "closed" : closed, **kwargs}) class deriv2(_Bosl2Base): def __init__(self, data=None, h=None, closed=None, **kwargs): super().__init__("deriv2", {"data" : data, "h" : h, "closed" : closed, **kwargs}) class deriv3(_Bosl2Base): def __init__(self, data=None, h=None, closed=None, **kwargs): super().__init__("deriv3", {"data" : data, "h" : h, "closed" : closed, **kwargs}) class complex(_Bosl2Base): def __init__(self, list=None, **kwargs): super().__init__("complex", {"list" : list, **kwargs}) class c_mul(_Bosl2Base): def __init__(self, z1=None, z2=None, **kwargs): super().__init__("c_mul", {"z1" : z1, "z2" : z2, **kwargs}) class _split_complex(_Bosl2Base): def __init__(self, data=None, **kwargs): super().__init__("_split_complex", {"data" : data, **kwargs}) class _combine_complex(_Bosl2Base): def __init__(self, data=None, **kwargs): super().__init__("_combine_complex", {"data" : data, **kwargs}) class _c_mul(_Bosl2Base): def __init__(self, z1=None, z2=None, **kwargs): super().__init__("_c_mul", {"z1" : z1, "z2" : z2, **kwargs}) class c_div(_Bosl2Base): def __init__(self, z1=None, z2=None, **kwargs): super().__init__("c_div", {"z1" : z1, "z2" : z2, **kwargs}) class c_conj(_Bosl2Base): def __init__(self, z=None, **kwargs): super().__init__("c_conj", {"z" : z, **kwargs}) class c_real(_Bosl2Base): def __init__(self, z=None, **kwargs): super().__init__("c_real", {"z" : z, **kwargs}) class c_imag(_Bosl2Base): def __init__(self, z=None, **kwargs): super().__init__("c_imag", {"z" : z, **kwargs}) class c_ident(_Bosl2Base): def __init__(self, n=None, **kwargs): super().__init__("c_ident", {"n" : n, **kwargs}) class c_norm(_Bosl2Base): def __init__(self, z=None, **kwargs): super().__init__("c_norm", {"z" : z, **kwargs}) class quadratic_roots(_Bosl2Base): def __init__(self, a=None, b=None, c=None, real=None, **kwargs): super().__init__("quadratic_roots", {"a" : a, "b" : b, "c" : c, "real" : real, **kwargs}) class polynomial(_Bosl2Base): def __init__(self, p=None, z=None, k=None, total=None, **kwargs): super().__init__("polynomial", {"p" : p, "z" : z, "k" : k, "total" : total, **kwargs}) class poly_mult(_Bosl2Base): def __init__(self, p=None, q=None, **kwargs): super().__init__("poly_mult", {"p" : p, "q" : q, **kwargs}) class poly_div(_Bosl2Base): def __init__(self, n=None, d=None, **kwargs): super().__init__("poly_div", {"n" : n, "d" : d, **kwargs}) class _poly_div(_Bosl2Base): def __init__(self, n=None, d=None, q=None, **kwargs): super().__init__("_poly_div", {"n" : n, "d" : d, "q" : q, **kwargs}) class _poly_trim(_Bosl2Base): def __init__(self, p=None, eps=None, **kwargs): super().__init__("_poly_trim", {"p" : p, "eps" : eps, **kwargs}) class poly_add(_Bosl2Base): def __init__(self, p=None, q=None, **kwargs): super().__init__("poly_add", {"p" : p, "q" : q, **kwargs}) class poly_roots(_Bosl2Base): def __init__(self, p=None, tol=None, error_bound=None, **kwargs): super().__init__("poly_roots", {"p" : p, "tol" : tol, "error_bound" : error_bound, **kwargs}) class _poly_roots(_Bosl2Base): def __init__(self, p=None, pderiv=None, s=None, z=None, tol=None, i=None, **kwargs): super().__init__("_poly_roots", {"p" : p, "pderiv" : pderiv, "s" : s, "z" : z, "tol" : tol, "i" : i, **kwargs}) class real_roots(_Bosl2Base): def __init__(self, p=None, eps=None, tol=None, **kwargs): super().__init__("real_roots", {"p" : p, "eps" : eps, "tol" : tol, **kwargs}) class root_find(_Bosl2Base): def __init__(self, f=None, x0=None, x1=None, tol=None, **kwargs): super().__init__("root_find", {"f" : f, "x0" : x0, "x1" : x1, "tol" : tol, **kwargs}) class _rfcheck(_Bosl2Base): def __init__(self, x=None, y=None, range=None, tol=None, **kwargs): super().__init__("_rfcheck", {"x" : x, "y" : y, "range" : range, "tol" : tol, **kwargs}) class _rootfind(_Bosl2Base): def __init__(self, f=None, xpts=None, ypts=None, yrange=None, tol=None, i=None, **kwargs): super().__init__("_rootfind", {"f" : f, "xpts" : xpts, "ypts" : ypts, "yrange" : yrange, "tol" : tol, "i" : i, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/metric_screws.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/metric_screws.scad'}", False) warn = _OpenSCADConstant('warn') class get_metric_bolt_head_size(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("get_metric_bolt_head_size", {"size" : size, **kwargs}) class get_metric_bolt_head_height(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("get_metric_bolt_head_height", {"size" : size, **kwargs}) class get_metric_socket_cap_diam(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("get_metric_socket_cap_diam", {"size" : size, **kwargs}) class get_metric_socket_cap_height(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("get_metric_socket_cap_height", {"size" : size, **kwargs}) class get_metric_socket_cap_socket_size(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("get_metric_socket_cap_socket_size", {"size" : size, **kwargs}) class get_metric_socket_cap_socket_depth(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("get_metric_socket_cap_socket_depth", {"size" : size, **kwargs}) class get_metric_iso_coarse_thread_pitch(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("get_metric_iso_coarse_thread_pitch", {"size" : size, **kwargs}) class get_metric_iso_fine_thread_pitch(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("get_metric_iso_fine_thread_pitch", {"size" : size, **kwargs}) class get_metric_iso_superfine_thread_pitch(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("get_metric_iso_superfine_thread_pitch", {"size" : size, **kwargs}) class get_metric_jis_thread_pitch(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("get_metric_jis_thread_pitch", {"size" : size, **kwargs}) class get_metric_nut_size(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("get_metric_nut_size", {"size" : size, **kwargs}) class get_metric_nut_thickness(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("get_metric_nut_thickness", {"size" : size, **kwargs}) class generic_screw(_Bosl2Base): def __init__(self, screwsize=None, screwlen=None, headsize=None, headlen=None, pitch=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("generic_screw", {"screwsize" : screwsize, "screwlen" : screwlen, "headsize" : headsize, "headlen" : headlen, "pitch" : pitch, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class metric_bolt(_Bosl2Base): def __init__(self, headtype=None, size=None, l=None, shank=None, pitch=None, details=None, coarse=None, phillips=None, torx=None, flange=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("metric_bolt", {"headtype" : headtype, "size" : size, "l" : l, "shank" : shank, "pitch" : pitch, "details" : details, "coarse" : coarse, "phillips" : phillips, "torx" : torx, "flange" : flange, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class metric_nut(_Bosl2Base): def __init__(self, size=None, hole=None, pitch=None, details=None, flange=None, center=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("metric_nut", {"size" : size, "hole" : hole, "pitch" : pitch, "details" : details, "flange" : flange, "center" : center, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/miscellaneous.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/miscellaneous.scad'}", False) class extrude_from_to(_Bosl2Base): def __init__(self, pt1=None, pt2=None, convexity=None, twist=None, scale=None, slices=None, **kwargs): super().__init__("extrude_from_to", {"pt1" : pt1, "pt2" : pt2, "convexity" : convexity, "twist" : twist, "scale" : scale, "slices" : slices, **kwargs}) class path_extrude2d(_Bosl2Base): def __init__(self, path=None, caps=None, closed=None, s=None, convexity=None, **kwargs): super().__init__("path_extrude2d", {"path" : path, "caps" : caps, "closed" : closed, "s" : s, "convexity" : convexity, **kwargs}) class path_extrude(_Bosl2Base): def __init__(self, path=None, convexity=None, clipsize=None, **kwargs): super().__init__("path_extrude", {"path" : path, "convexity" : convexity, "clipsize" : clipsize, **kwargs}) class cylindrical_extrude(_Bosl2Base): def __init__(self, ir=None, _or=None, od=None, id=None, size=None, convexity=None, spin=None, orient=None, **kwargs): super().__init__("cylindrical_extrude", {"ir" : ir, "_or" : _or, "od" : od, "id" : id, "size" : size, "convexity" : convexity, "spin" : spin, "orient" : orient, **kwargs}) class bounding_box(_Bosl2Base): def __init__(self, excess=None, planar=None, **kwargs): super().__init__("bounding_box", {"excess" : excess, "planar" : planar, **kwargs}) class chain_hull(_Bosl2Base): def __init__(self, **kwargs): super().__init__("chain_hull", {**kwargs}) class minkowski_difference(_Bosl2Base): def __init__(self, planar=None, **kwargs): super().__init__("minkowski_difference", {"planar" : planar, **kwargs}) class offset3d(_Bosl2Base): def __init__(self, r=None, size=None, convexity=None, **kwargs): super().__init__("offset3d", {"r" : r, "size" : size, "convexity" : convexity, **kwargs}) class round3d(_Bosl2Base): def __init__(self, r=None, _or=None, ir=None, size=None, **kwargs): super().__init__("round3d", {"r" : r, "_or" : _or, "ir" : ir, "size" : size, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/modular_hose.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/modular_hose.scad'}", False) _modhose_small_end = _OpenSCADConstant('_modhose_small_end') _modhose_big_end = _OpenSCADConstant('_modhose_big_end') _modhose_waist = _OpenSCADConstant('_modhose_waist') class modular_hose(_Bosl2Base): def __init__(self, size=None, type=None, clearance=None, waist_len=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("modular_hose", {"size" : size, "type" : type, "clearance" : clearance, "waist_len" : waist_len, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class modular_hose_radius(_Bosl2Base): def __init__(self, size=None, outer=None, **kwargs): super().__init__("modular_hose_radius", {"size" : size, "outer" : outer, **kwargs}) class modular_hose(_Bosl2Base): def __init__(self, size=None, type=None, clearance=None, waist_len=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("modular_hose", {"size" : size, "type" : type, "clearance" : clearance, "waist_len" : waist_len, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/mutators.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/mutators.scad'}", False) class bounding_box(_Bosl2Base): def __init__(self, excess=None, planar=None, **kwargs): super().__init__("bounding_box", {"excess" : excess, "planar" : planar, **kwargs}) class chain_hull(_Bosl2Base): def __init__(self, **kwargs): super().__init__("chain_hull", {**kwargs}) class path_extrude2d(_Bosl2Base): def __init__(self, path=None, caps=None, closed=None, s=None, convexity=None, **kwargs): super().__init__("path_extrude2d", {"path" : path, "caps" : caps, "closed" : closed, "s" : s, "convexity" : convexity, **kwargs}) class cylindrical_extrude(_Bosl2Base): def __init__(self, ir=None, _or=None, od=None, id=None, size=None, convexity=None, spin=None, orient=None, **kwargs): super().__init__("cylindrical_extrude", {"ir" : ir, "_or" : _or, "od" : od, "id" : id, "size" : size, "convexity" : convexity, "spin" : spin, "orient" : orient, **kwargs}) class extrude_from_to(_Bosl2Base): def __init__(self, pt1=None, pt2=None, convexity=None, twist=None, scale=None, slices=None, **kwargs): super().__init__("extrude_from_to", {"pt1" : pt1, "pt2" : pt2, "convexity" : convexity, "twist" : twist, "scale" : scale, "slices" : slices, **kwargs}) class path_extrude(_Bosl2Base): def __init__(self, path=None, convexity=None, clipsize=None, **kwargs): super().__init__("path_extrude", {"path" : path, "convexity" : convexity, "clipsize" : clipsize, **kwargs}) class minkowski_difference(_Bosl2Base): def __init__(self, planar=None, **kwargs): super().__init__("minkowski_difference", {"planar" : planar, **kwargs}) class offset3d(_Bosl2Base): def __init__(self, r=None, size=None, convexity=None, **kwargs): super().__init__("offset3d", {"r" : r, "size" : size, "convexity" : convexity, **kwargs}) class round3d(_Bosl2Base): def __init__(self, r=None, _or=None, ir=None, size=None, **kwargs): super().__init__("round3d", {"r" : r, "_or" : _or, "ir" : ir, "size" : size, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/nema_steppers.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/nema_steppers.scad'}", False) class nema_motor_info(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("nema_motor_info", {"size" : size, **kwargs}) class nema_stepper_motor(_Bosl2Base): def __init__(self, size=None, h=None, shaft_len=None, details=None, atype=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("nema_stepper_motor", {"size" : size, "h" : h, "shaft_len" : shaft_len, "details" : details, "atype" : atype, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class nema_mount_mask(_Bosl2Base): def __init__(self, size=None, depth=None, l=None, atype=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("nema_mount_mask", {"size" : size, "depth" : depth, "l" : l, "atype" : atype, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/nurbs.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/nurbs.scad'}", False) class nurbs_curve(_Bosl2Base): def __init__(self, control=None, degree=None, splinesteps=None, u=None, mult=None, weights=None, type=None, knots=None, **kwargs): super().__init__("nurbs_curve", {"control" : control, "degree" : degree, "splinesteps" : splinesteps, "u" : u, "mult" : mult, "weights" : weights, "type" : type, "knots" : knots, **kwargs}) class _nurbs_pt(_Bosl2Base): def __init__(self, knot=None, control=None, u=None, r=None, p=None, k=None, **kwargs): super().__init__("_nurbs_pt", {"knot" : knot, "control" : control, "u" : u, "r" : r, "p" : p, "k" : k, **kwargs}) class _extend_knot_mult(_Bosl2Base): def __init__(self, mult=None, next=None, len=None, **kwargs): super().__init__("_extend_knot_mult", {"mult" : mult, "next" : next, "len" : len, **kwargs}) class _extend_knot_vector(_Bosl2Base): def __init__(self, knots=None, next=None, len=None, **kwargs): super().__init__("_extend_knot_vector", {"knots" : knots, "next" : next, "len" : len, **kwargs}) class _calc_mult(_Bosl2Base): def __init__(self, knots=None, **kwargs): super().__init__("_calc_mult", {"knots" : knots, **kwargs}) class is_nurbs_patch(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("is_nurbs_patch", {"x" : x, **kwargs}) class nurbs_patch_points(_Bosl2Base): def __init__(self, patch=None, degree=None, splinesteps=None, u=None, v=None, weights=None, type=None, mult=None, knots=None, **kwargs): super().__init__("nurbs_patch_points", {"patch" : patch, "degree" : degree, "splinesteps" : splinesteps, "u" : u, "v" : v, "weights" : weights, "type" : type, "mult" : mult, "knots" : knots, **kwargs}) class nurbs_vnf(_Bosl2Base): def __init__(self, patch=None, degree=None, splinesteps=None, weights=None, type=None, mult=None, knots=None, style=None, **kwargs): super().__init__("nurbs_vnf", {"patch" : patch, "degree" : degree, "splinesteps" : splinesteps, "weights" : weights, "type" : type, "mult" : mult, "knots" : knots, "style" : style, **kwargs}) class debug_nurbs(_Bosl2Base): def __init__(self, control=None, degree=None, splinesteps=None, width=None, size=None, mult=None, weights=None, type=None, knots=None, show_weights=None, show_knots=None, show_index=None, **kwargs): super().__init__("debug_nurbs", {"control" : control, "degree" : degree, "splinesteps" : splinesteps, "width" : width, "size" : size, "mult" : mult, "weights" : weights, "type" : type, "knots" : knots, "show_weights" : show_weights, "show_knots" : show_knots, "show_index" : show_index, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/openscad.py ================================================ from .bosl2_base import Bosl2Base as _Bosl2Base class union(_Bosl2Base): def __init__(self, **kwargs): super().__init__("union", {**kwargs}) class difference(_Bosl2Base): def __init__(self, **kwargs): super().__init__("difference", {**kwargs}) class intersection(_Bosl2Base): def __init__(self, **kwargs): super().__init__("intersection", {**kwargs}) class intersection_for(_Bosl2Base): def __init__(self, n=None, **kwargs): super().__init__("intersection_for", {"n" : n, **kwargs}) class translate(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("translate", {"v" : v, **kwargs}) class scale(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("scale", {"v" : v, **kwargs}) class rotate(_Bosl2Base): def __init__(self, a=None, v=None, **kwargs): super().__init__("rotate", {"a" : a, "v" : v, **kwargs}) class mirror(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("mirror", {"v" : v, **kwargs}) class resize(_Bosl2Base): def __init__(self, newsize=None, auto=None, **kwargs): super().__init__("resize", {"newsize" : newsize, "auto" : auto, **kwargs}) class color(_Bosl2Base): def __init__(self, c=None, alpha=None, **kwargs): super().__init__("color", {"c" : c, "alpha" : alpha, **kwargs}) class minkowski(_Bosl2Base): def __init__(self, **kwargs): super().__init__("minkowski", {**kwargs}) class offset(_Bosl2Base): def __init__(self, r=None, delta=None, chamfer=None, _fn=None, **kwargs): super().__init__("offset", {"r" : r, "delta" : delta, "chamfer" : chamfer, "_fn" : _fn, **kwargs}) class hull(_Bosl2Base): def __init__(self, **kwargs): super().__init__("hull", {**kwargs}) class render(_Bosl2Base): def __init__(self, convexity=None, **kwargs): super().__init__("render", {"convexity" : convexity, **kwargs}) class linear_extrude(_Bosl2Base): def __init__(self, height=None, center=None, convexity=None, twist=None, slices=None, scale=None, **kwargs): super().__init__("linear_extrude", {"height" : height, "center" : center, "convexity" : convexity, "twist" : twist, "slices" : slices, "scale" : scale, **kwargs}) class rotate_extrude(_Bosl2Base): def __init__(self, angle=None, convexity=None, _fn=None, **kwargs): super().__init__("rotate_extrude", {"angle" : angle, "convexity" : convexity, "_fn" : _fn, **kwargs}) class projection(_Bosl2Base): def __init__(self, cut=None, **kwargs): super().__init__("projection", {"cut" : cut, **kwargs}) class surface(_Bosl2Base): def __init__(self, file=None, center=None, convexity=None, invert=None, **kwargs): super().__init__("surface", {"file" : file, "center" : center, "convexity" : convexity, "invert" : invert, **kwargs}) class child(_Bosl2Base): def __init__(self, index=None, vector=None, range=None, **kwargs): super().__init__("child", {"index" : index, "vector" : vector, "range" : range, **kwargs}) class children(_Bosl2Base): def __init__(self, index=None, vector=None, range=None, **kwargs): super().__init__("children", {"index" : index, "vector" : vector, "range" : range, **kwargs}) class import_stl(_Bosl2Base): def __init__(self, file=None, origin=None, convexity=None, layer=None, **kwargs): super().__init__("import_stl", {"file" : file, "origin" : origin, "convexity" : convexity, "layer" : layer, **kwargs}) class import_dxf(_Bosl2Base): def __init__(self, file=None, origin=None, convexity=None, layer=None, **kwargs): super().__init__("import_dxf", {"file" : file, "origin" : origin, "convexity" : convexity, "layer" : layer, **kwargs}) class _import(_Bosl2Base): def __init__(self, file=None, origin=None, convexity=None, layer=None, **kwargs): super().__init__("_import", {"file" : file, "origin" : origin, "convexity" : convexity, "layer" : layer, **kwargs}) class assign(_Bosl2Base): def __init__(self, **kwargs): super().__init__("assign", {**kwargs}) class multmatrix(_Bosl2Base): def __init__(self, m=None, **kwargs): super().__init__("multmatrix", {"m" : m, **kwargs}) class polygon(_Bosl2Base): def __init__(self, points=None, paths=None, convexity=None, **kwargs): super().__init__("polygon", {"points" : points, "paths" : paths, "convexity" : convexity, **kwargs}) class circle(_Bosl2Base): def __init__(self, r=None, d=None, _fn=None, **kwargs): super().__init__("circle", {"r" : r, "d" : d, "_fn" : _fn, **kwargs}) class square(_Bosl2Base): def __init__(self, size=None, center=None, **kwargs): super().__init__("square", {"size" : size, "center" : center, **kwargs}) class sphere(_Bosl2Base): def __init__(self, r=None, d=None, _fn=None, **kwargs): super().__init__("sphere", {"r" : r, "d" : d, "_fn" : _fn, **kwargs}) class cube(_Bosl2Base): def __init__(self, size=None, center=None, **kwargs): super().__init__("cube", {"size" : size, "center" : center, **kwargs}) class cylinder(_Bosl2Base): def __init__(self, r=None, h=None, r1=None, r2=None, d=None, d1=None, d2=None, center=None, _fn=None, **kwargs): super().__init__("cylinder", {"r" : r, "h" : h, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "center" : center, "_fn" : _fn, **kwargs}) class polyhedron(_Bosl2Base): def __init__(self, points=None, faces=None, convexity=None, triangles=None, **kwargs): super().__init__("polyhedron", {"points" : points, "faces" : faces, "convexity" : convexity, "triangles" : triangles, **kwargs}) class text(_Bosl2Base): def __init__(self, text=None, size=None, font=None, halign=None, valign=None, spacing=None, direction=None, language=None, script=None, _fn=None, **kwargs): super().__init__("text", {"text" : text, "size" : size, "font" : font, "halign" : halign, "valign" : valign, "spacing" : spacing, "direction" : direction, "language" : language, "script" : script, "_fn" : _fn, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/partitions.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/partitions.scad'}", False) class half_of(_Bosl2Base): def __init__(self, p=None, v=None, cp=None, **kwargs): super().__init__("half_of", {"p" : p, "v" : v, "cp" : cp, **kwargs}) class left_half(_Bosl2Base): def __init__(self, p=None, x=None, **kwargs): super().__init__("left_half", {"p" : p, "x" : x, **kwargs}) class right_half(_Bosl2Base): def __init__(self, p=None, x=None, **kwargs): super().__init__("right_half", {"p" : p, "x" : x, **kwargs}) class front_half(_Bosl2Base): def __init__(self, p=None, y=None, **kwargs): super().__init__("front_half", {"p" : p, "y" : y, **kwargs}) class back_half(_Bosl2Base): def __init__(self, p=None, y=None, **kwargs): super().__init__("back_half", {"p" : p, "y" : y, **kwargs}) class bottom_half(_Bosl2Base): def __init__(self, p=None, z=None, **kwargs): super().__init__("bottom_half", {"p" : p, "z" : z, **kwargs}) class top_half(_Bosl2Base): def __init__(self, p=None, z=None, **kwargs): super().__init__("top_half", {"p" : p, "z" : z, **kwargs}) class _partition_subpath(_Bosl2Base): def __init__(self, type=None, **kwargs): super().__init__("_partition_subpath", {"type" : type, **kwargs}) class _partition_cutpath(_Bosl2Base): def __init__(self, l=None, h=None, cutsize=None, cutpath=None, gap=None, cutpath_centered=None, **kwargs): super().__init__("_partition_cutpath", {"l" : l, "h" : h, "cutsize" : cutsize, "cutpath" : cutpath, "gap" : gap, "cutpath_centered" : cutpath_centered, **kwargs}) class half_of(_Bosl2Base): def __init__(self, v=None, cp=None, s=None, planar=None, **kwargs): super().__init__("half_of", {"v" : v, "cp" : cp, "s" : s, "planar" : planar, **kwargs}) class left_half(_Bosl2Base): def __init__(self, s=None, x=None, planar=None, **kwargs): super().__init__("left_half", {"s" : s, "x" : x, "planar" : planar, **kwargs}) class right_half(_Bosl2Base): def __init__(self, s=None, x=None, planar=None, **kwargs): super().__init__("right_half", {"s" : s, "x" : x, "planar" : planar, **kwargs}) class front_half(_Bosl2Base): def __init__(self, s=None, y=None, planar=None, **kwargs): super().__init__("front_half", {"s" : s, "y" : y, "planar" : planar, **kwargs}) class back_half(_Bosl2Base): def __init__(self, s=None, y=None, planar=None, **kwargs): super().__init__("back_half", {"s" : s, "y" : y, "planar" : planar, **kwargs}) class bottom_half(_Bosl2Base): def __init__(self, s=None, z=None, **kwargs): super().__init__("bottom_half", {"s" : s, "z" : z, **kwargs}) class top_half(_Bosl2Base): def __init__(self, s=None, z=None, **kwargs): super().__init__("top_half", {"s" : s, "z" : z, **kwargs}) class partition_mask(_Bosl2Base): def __init__(self, l=None, w=None, h=None, cutsize=None, cutpath=None, gap=None, cutpath_centered=None, inverse=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("partition_mask", {"l" : l, "w" : w, "h" : h, "cutsize" : cutsize, "cutpath" : cutpath, "gap" : gap, "cutpath_centered" : cutpath_centered, "inverse" : inverse, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class partition_cut_mask(_Bosl2Base): def __init__(self, l=None, h=None, cutsize=None, cutpath=None, gap=None, cutpath_centered=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("partition_cut_mask", {"l" : l, "h" : h, "cutsize" : cutsize, "cutpath" : cutpath, "gap" : gap, "cutpath_centered" : cutpath_centered, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class partition(_Bosl2Base): def __init__(self, size=None, spread=None, cutsize=None, cutpath=None, gap=None, cutpath_centered=None, spin=None, **kwargs): super().__init__("partition", {"size" : size, "spread" : spread, "cutsize" : cutsize, "cutpath" : cutpath, "gap" : gap, "cutpath_centered" : cutpath_centered, "spin" : spin, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/paths.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/paths.scad'}", False) class is_path(_Bosl2Base): def __init__(self, list=None, dim=None, fast=None, **kwargs): super().__init__("is_path", {"list" : list, "dim" : dim, "fast" : fast, **kwargs}) class is_1region(_Bosl2Base): def __init__(self, path=None, name=None, **kwargs): super().__init__("is_1region", {"path" : path, "name" : name, **kwargs}) class force_path(_Bosl2Base): def __init__(self, path=None, name=None, **kwargs): super().__init__("force_path", {"path" : path, "name" : name, **kwargs}) class _path_select(_Bosl2Base): def __init__(self, path=None, s1=None, u1=None, s2=None, u2=None, closed=None, **kwargs): super().__init__("_path_select", {"path" : path, "s1" : s1, "u1" : u1, "s2" : s2, "u2" : u2, "closed" : closed, **kwargs}) class path_merge_collinear(_Bosl2Base): def __init__(self, path=None, closed=None, eps=None, **kwargs): super().__init__("path_merge_collinear", {"path" : path, "closed" : closed, "eps" : eps, **kwargs}) class path_length(_Bosl2Base): def __init__(self, path=None, closed=None, **kwargs): super().__init__("path_length", {"path" : path, "closed" : closed, **kwargs}) class path_segment_lengths(_Bosl2Base): def __init__(self, path=None, closed=None, **kwargs): super().__init__("path_segment_lengths", {"path" : path, "closed" : closed, **kwargs}) class path_length_fractions(_Bosl2Base): def __init__(self, path=None, closed=None, **kwargs): super().__init__("path_length_fractions", {"path" : path, "closed" : closed, **kwargs}) class _path_self_intersections(_Bosl2Base): def __init__(self, path=None, closed=None, eps=None, **kwargs): super().__init__("_path_self_intersections", {"path" : path, "closed" : closed, "eps" : eps, **kwargs}) class _sum_preserving_round(_Bosl2Base): def __init__(self, data=None, index=None, **kwargs): super().__init__("_sum_preserving_round", {"data" : data, "index" : index, **kwargs}) class subdivide_path(_Bosl2Base): def __init__(self, path=None, n=None, refine=None, maxlen=None, closed=None, exact=None, method=None, **kwargs): super().__init__("subdivide_path", {"path" : path, "n" : n, "refine" : refine, "maxlen" : maxlen, "closed" : closed, "exact" : exact, "method" : method, **kwargs}) class resample_path(_Bosl2Base): def __init__(self, path=None, n=None, spacing=None, keep_corners=None, closed=None, **kwargs): super().__init__("resample_path", {"path" : path, "n" : n, "spacing" : spacing, "keep_corners" : keep_corners, "closed" : closed, **kwargs}) class is_path_simple(_Bosl2Base): def __init__(self, path=None, closed=None, eps=None, **kwargs): super().__init__("is_path_simple", {"path" : path, "closed" : closed, "eps" : eps, **kwargs}) class path_closest_point(_Bosl2Base): def __init__(self, path=None, pt=None, closed=None, **kwargs): super().__init__("path_closest_point", {"path" : path, "pt" : pt, "closed" : closed, **kwargs}) class path_tangents(_Bosl2Base): def __init__(self, path=None, closed=None, uniform=None, **kwargs): super().__init__("path_tangents", {"path" : path, "closed" : closed, "uniform" : uniform, **kwargs}) class path_normals(_Bosl2Base): def __init__(self, path=None, tangents=None, closed=None, **kwargs): super().__init__("path_normals", {"path" : path, "tangents" : tangents, "closed" : closed, **kwargs}) class path_curvature(_Bosl2Base): def __init__(self, path=None, closed=None, **kwargs): super().__init__("path_curvature", {"path" : path, "closed" : closed, **kwargs}) class path_torsion(_Bosl2Base): def __init__(self, path=None, closed=None, **kwargs): super().__init__("path_torsion", {"path" : path, "closed" : closed, **kwargs}) class surface_normals(_Bosl2Base): def __init__(self, surf=None, col_wrap=None, row_wrap=None, **kwargs): super().__init__("surface_normals", {"surf" : surf, "col_wrap" : col_wrap, "row_wrap" : row_wrap, **kwargs}) class path_cut(_Bosl2Base): def __init__(self, path=None, cutdist=None, closed=None, **kwargs): super().__init__("path_cut", {"path" : path, "cutdist" : cutdist, "closed" : closed, **kwargs}) class _path_cut_getpaths(_Bosl2Base): def __init__(self, path=None, cutlist=None, closed=None, **kwargs): super().__init__("_path_cut_getpaths", {"path" : path, "cutlist" : cutlist, "closed" : closed, **kwargs}) class path_cut_points(_Bosl2Base): def __init__(self, path=None, cutdist=None, closed=None, direction=None, **kwargs): super().__init__("path_cut_points", {"path" : path, "cutdist" : cutdist, "closed" : closed, "direction" : direction, **kwargs}) class path_cut_points_recurse(_Bosl2Base): def __init__(self, path=None, dists=None, closed=None, pind=None, dtotal=None, dind=None, result=None, **kwargs): super().__init__("path_cut_points_recurse", {"path" : path, "dists" : dists, "closed" : closed, "pind" : pind, "dtotal" : dtotal, "dind" : dind, "result" : result, **kwargs}) class _path_cut_single(_Bosl2Base): def __init__(self, path=None, dist=None, closed=None, ind=None, eps=None, **kwargs): super().__init__("_path_cut_single", {"path" : path, "dist" : dist, "closed" : closed, "ind" : ind, "eps" : eps, **kwargs}) class _path_cuts_normals(_Bosl2Base): def __init__(self, path=None, cuts=None, dirs=None, closed=None, **kwargs): super().__init__("_path_cuts_normals", {"path" : path, "cuts" : cuts, "dirs" : dirs, "closed" : closed, **kwargs}) class _path_plane(_Bosl2Base): def __init__(self, path=None, ind=None, i=None, closed=None, **kwargs): super().__init__("_path_plane", {"path" : path, "ind" : ind, "i" : i, "closed" : closed, **kwargs}) class _path_cuts_dir(_Bosl2Base): def __init__(self, path=None, cuts=None, closed=None, eps=None, **kwargs): super().__init__("_path_cuts_dir", {"path" : path, "cuts" : cuts, "closed" : closed, "eps" : eps, **kwargs}) class _cut_to_seg_u_form(_Bosl2Base): def __init__(self, pathcut=None, path=None, closed=None, **kwargs): super().__init__("_cut_to_seg_u_form", {"pathcut" : pathcut, "path" : path, "closed" : closed, **kwargs}) class split_path_at_self_crossings(_Bosl2Base): def __init__(self, path=None, closed=None, eps=None, **kwargs): super().__init__("split_path_at_self_crossings", {"path" : path, "closed" : closed, "eps" : eps, **kwargs}) class _tag_self_crossing_subpaths(_Bosl2Base): def __init__(self, path=None, nonzero=None, closed=None, eps=None, **kwargs): super().__init__("_tag_self_crossing_subpaths", {"path" : path, "nonzero" : nonzero, "closed" : closed, "eps" : eps, **kwargs}) class polygon_parts(_Bosl2Base): def __init__(self, poly=None, nonzero=None, eps=None, **kwargs): super().__init__("polygon_parts", {"poly" : poly, "nonzero" : nonzero, "eps" : eps, **kwargs}) class _extreme_angle_fragment(_Bosl2Base): def __init__(self, seg=None, fragments=None, rightmost=None, eps=None, **kwargs): super().__init__("_extreme_angle_fragment", {"seg" : seg, "fragments" : fragments, "rightmost" : rightmost, "eps" : eps, **kwargs}) class _assemble_a_path_from_fragments(_Bosl2Base): def __init__(self, fragments=None, rightmost=None, startfrag=None, eps=None, **kwargs): super().__init__("_assemble_a_path_from_fragments", {"fragments" : fragments, "rightmost" : rightmost, "startfrag" : startfrag, "eps" : eps, **kwargs}) class _assemble_path_fragments(_Bosl2Base): def __init__(self, fragments=None, eps=None, _finished=None, **kwargs): super().__init__("_assemble_path_fragments", {"fragments" : fragments, "eps" : eps, "_finished" : _finished, **kwargs}) class _assemble_partial_paths(_Bosl2Base): def __init__(self, paths=None, closed=None, eps=None, **kwargs): super().__init__("_assemble_partial_paths", {"paths" : paths, "closed" : closed, "eps" : eps, **kwargs}) class _assemble_partial_paths_recur(_Bosl2Base): def __init__(self, edges=None, eps=None, paths=None, i=None, **kwargs): super().__init__("_assemble_partial_paths_recur", {"edges" : edges, "eps" : eps, "paths" : paths, "i" : i, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/polyhedra.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/polyhedra.scad'}", False) _tribonacci = _OpenSCADConstant('_tribonacci') _polyhedra_ = _OpenSCADConstant('_polyhedra_') _stellated_polyhedra_ = _OpenSCADConstant('_stellated_polyhedra_') class _unique_groups(_Bosl2Base): def __init__(self, m=None, **kwargs): super().__init__("_unique_groups", {"m" : m, **kwargs}) class _even_perms(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("_even_perms", {"v" : v, **kwargs}) class _all_perms(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("_all_perms", {"v" : v, **kwargs}) class _point_ref(_Bosl2Base): def __init__(self, points=None, sign=None, **kwargs): super().__init__("_point_ref", {"points" : points, "sign" : sign, **kwargs}) class regular_polyhedron_info(_Bosl2Base): def __init__(self, info=None, name=None, index=None, type=None, faces=None, facetype=None, hasfaces=None, side=None, ir=None, mr=None, _or=None, r=None, d=None, anchor=None, facedown=None, stellate=None, longside=None, h=None, height=None, **kwargs): super().__init__("regular_polyhedron_info", {"info" : info, "name" : name, "index" : index, "type" : type, "faces" : faces, "facetype" : facetype, "hasfaces" : hasfaces, "side" : side, "ir" : ir, "mr" : mr, "_or" : _or, "r" : r, "d" : d, "anchor" : anchor, "facedown" : facedown, "stellate" : stellate, "longside" : longside, "h" : h, "height" : height, **kwargs}) class _stellate_faces(_Bosl2Base): def __init__(self, scalefactor=None, stellate=None, vertices=None, faces_normals=None, **kwargs): super().__init__("_stellate_faces", {"scalefactor" : scalefactor, "stellate" : stellate, "vertices" : vertices, "faces_normals" : faces_normals, **kwargs}) class _trapezohedron(_Bosl2Base): def __init__(self, faces=None, r=None, side=None, longside=None, h=None, height=None, d=None, **kwargs): super().__init__("_trapezohedron", {"faces" : faces, "r" : r, "side" : side, "longside" : longside, "h" : h, "height" : height, "d" : d, **kwargs}) class _facenormal(_Bosl2Base): def __init__(self, pts=None, face=None, **kwargs): super().__init__("_facenormal", {"pts" : pts, "face" : face, **kwargs}) class _full_faces(_Bosl2Base): def __init__(self, pts=None, faces=None, **kwargs): super().__init__("_full_faces", {"pts" : pts, "faces" : faces, **kwargs}) class regular_polyhedron(_Bosl2Base): def __init__(self, name=None, index=None, type=None, faces=None, facetype=None, hasfaces=None, side=None, ir=None, mr=None, _or=None, r=None, d=None, anchor=None, rounding=None, repeat=None, facedown=None, draw=None, rotate_children=None, stellate=None, longside=None, h=None, height=None, **kwargs): super().__init__("regular_polyhedron", {"name" : name, "index" : index, "type" : type, "faces" : faces, "facetype" : facetype, "hasfaces" : hasfaces, "side" : side, "ir" : ir, "mr" : mr, "_or" : _or, "r" : r, "d" : d, "anchor" : anchor, "rounding" : rounding, "repeat" : repeat, "facedown" : facedown, "draw" : draw, "rotate_children" : rotate_children, "stellate" : stellate, "longside" : longside, "h" : h, "height" : height, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/regions.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/regions.scad'}", False) class is_region(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("is_region", {"x" : x, **kwargs}) class is_valid_region(_Bosl2Base): def __init__(self, region=None, eps=None, **kwargs): super().__init__("is_valid_region", {"region" : region, "eps" : eps, **kwargs}) class _polygon_crosses_region(_Bosl2Base): def __init__(self, region=None, poly=None, eps=None, **kwargs): super().__init__("_polygon_crosses_region", {"region" : region, "poly" : poly, "eps" : eps, **kwargs}) class is_region_simple(_Bosl2Base): def __init__(self, region=None, eps=None, **kwargs): super().__init__("is_region_simple", {"region" : region, "eps" : eps, **kwargs}) class make_region(_Bosl2Base): def __init__(self, polys=None, nonzero=None, eps=None, **kwargs): super().__init__("make_region", {"polys" : polys, "nonzero" : nonzero, "eps" : eps, **kwargs}) class force_region(_Bosl2Base): def __init__(self, poly=None, **kwargs): super().__init__("force_region", {"poly" : poly, **kwargs}) class point_in_region(_Bosl2Base): def __init__(self, point=None, region=None, eps=None, **kwargs): super().__init__("point_in_region", {"point" : point, "region" : region, "eps" : eps, **kwargs}) class _point_in_region(_Bosl2Base): def __init__(self, point=None, region=None, eps=None, i=None, cnt=None, **kwargs): super().__init__("_point_in_region", {"point" : point, "region" : region, "eps" : eps, "i" : i, "cnt" : cnt, **kwargs}) class region_area(_Bosl2Base): def __init__(self, region=None, **kwargs): super().__init__("region_area", {"region" : region, **kwargs}) class _clockwise_region(_Bosl2Base): def __init__(self, r=None, **kwargs): super().__init__("_clockwise_region", {"r" : r, **kwargs}) class are_regions_equal(_Bosl2Base): def __init__(self, region1=None, region2=None, either_winding=None, **kwargs): super().__init__("are_regions_equal", {"region1" : region1, "region2" : region2, "either_winding" : either_winding, **kwargs}) class __are_regions_equal(_Bosl2Base): def __init__(self, region1=None, region2=None, i=None, **kwargs): super().__init__("__are_regions_equal", {"region1" : region1, "region2" : region2, "i" : i, **kwargs}) class _region_region_intersections(_Bosl2Base): def __init__(self, region1=None, region2=None, closed1=None, closed2=None, eps=None, **kwargs): super().__init__("_region_region_intersections", {"region1" : region1, "region2" : region2, "closed1" : closed1, "closed2" : closed2, "eps" : eps, **kwargs}) class split_region_at_region_crossings(_Bosl2Base): def __init__(self, region1=None, region2=None, closed1=None, closed2=None, eps=None, **kwargs): super().__init__("split_region_at_region_crossings", {"region1" : region1, "region2" : region2, "closed1" : closed1, "closed2" : closed2, "eps" : eps, **kwargs}) class region_parts(_Bosl2Base): def __init__(self, region=None, **kwargs): super().__init__("region_parts", {"region" : region, **kwargs}) class _offset_chamfer(_Bosl2Base): def __init__(self, center=None, points=None, delta=None, **kwargs): super().__init__("_offset_chamfer", {"center" : center, "points" : points, "delta" : delta, **kwargs}) class _shift_segment(_Bosl2Base): def __init__(self, segment=None, d=None, **kwargs): super().__init__("_shift_segment", {"segment" : segment, "d" : d, **kwargs}) class _segment_extension(_Bosl2Base): def __init__(self, s1=None, s2=None, **kwargs): super().__init__("_segment_extension", {"s1" : s1, "s2" : s2, **kwargs}) class _makefaces(_Bosl2Base): def __init__(self, direction=None, startind=None, good=None, pointcount=None, closed=None, **kwargs): super().__init__("_makefaces", {"direction" : direction, "startind" : startind, "good" : good, "pointcount" : pointcount, "closed" : closed, **kwargs}) class _makefaces_recurse(_Bosl2Base): def __init__(self, startind1=None, startind2=None, numfirst=None, numsecond=None, lenlist=None, closed=None, firstind=None, secondind=None, faces=None, **kwargs): super().__init__("_makefaces_recurse", {"startind1" : startind1, "startind2" : startind2, "numfirst" : numfirst, "numsecond" : numsecond, "lenlist" : lenlist, "closed" : closed, "firstind" : firstind, "secondind" : secondind, "faces" : faces, **kwargs}) class _good_segments(_Bosl2Base): def __init__(self, path=None, d=None, shiftsegs=None, closed=None, quality=None, **kwargs): super().__init__("_good_segments", {"path" : path, "d" : d, "shiftsegs" : shiftsegs, "closed" : closed, "quality" : quality, **kwargs}) class _segment_good(_Bosl2Base): def __init__(self, path=None, pathseg_unit=None, pathseg_len=None, d=None, seg=None, alpha=None, index=None, **kwargs): super().__init__("_segment_good", {"path" : path, "pathseg_unit" : pathseg_unit, "pathseg_len" : pathseg_len, "d" : d, "seg" : seg, "alpha" : alpha, "index" : index, **kwargs}) class _point_dist(_Bosl2Base): def __init__(self, path=None, pathseg_unit=None, pathseg_len=None, pt=None, **kwargs): super().__init__("_point_dist", {"path" : path, "pathseg_unit" : pathseg_unit, "pathseg_len" : pathseg_len, "pt" : pt, **kwargs}) class offset(_Bosl2Base): def __init__(self, path=None, r=None, delta=None, chamfer=None, closed=None, check_valid=None, quality=None, error=None, return_faces=None, firstface_index=None, flip_faces=None, same_length=None, **kwargs): super().__init__("offset", {"path" : path, "r" : r, "delta" : delta, "chamfer" : chamfer, "closed" : closed, "check_valid" : check_valid, "quality" : quality, "error" : error, "return_faces" : return_faces, "firstface_index" : firstface_index, "flip_faces" : flip_faces, "same_length" : same_length, **kwargs}) class _filter_region_parts(_Bosl2Base): def __init__(self, region1=None, region2=None, keep=None, eps=None, **kwargs): super().__init__("_filter_region_parts", {"region1" : region1, "region2" : region2, "keep" : keep, "eps" : eps, **kwargs}) class _list_three(_Bosl2Base): def __init__(self, a=None, b=None, c=None, **kwargs): super().__init__("_list_three", {"a" : a, "b" : b, "c" : c, **kwargs}) class union(_Bosl2Base): def __init__(self, regions=None, b=None, c=None, eps=None, **kwargs): super().__init__("union", {"regions" : regions, "b" : b, "c" : c, "eps" : eps, **kwargs}) class difference(_Bosl2Base): def __init__(self, regions=None, b=None, c=None, eps=None, **kwargs): super().__init__("difference", {"regions" : regions, "b" : b, "c" : c, "eps" : eps, **kwargs}) class intersection(_Bosl2Base): def __init__(self, regions=None, b=None, c=None, eps=None, **kwargs): super().__init__("intersection", {"regions" : regions, "b" : b, "c" : c, "eps" : eps, **kwargs}) class exclusive_or(_Bosl2Base): def __init__(self, regions=None, b=None, c=None, eps=None, **kwargs): super().__init__("exclusive_or", {"regions" : regions, "b" : b, "c" : c, "eps" : eps, **kwargs}) class hull_region(_Bosl2Base): def __init__(self, region=None, **kwargs): super().__init__("hull_region", {"region" : region, **kwargs}) class fill(_Bosl2Base): def __init__(self, region=None, **kwargs): super().__init__("fill", {"region" : region, **kwargs}) class region(_Bosl2Base): def __init__(self, r=None, anchor=None, spin=None, cp=None, atype=None, **kwargs): super().__init__("region", {"r" : r, "anchor" : anchor, "spin" : spin, "cp" : cp, "atype" : atype, **kwargs}) class debug_region(_Bosl2Base): def __init__(self, region=None, vertices=None, edges=None, convexity=None, size=None, **kwargs): super().__init__("debug_region", {"region" : region, "vertices" : vertices, "edges" : edges, "convexity" : convexity, "size" : size, **kwargs}) class exclusive_or(_Bosl2Base): def __init__(self, **kwargs): super().__init__("exclusive_or", {**kwargs}) class hull_region(_Bosl2Base): def __init__(self, region=None, **kwargs): super().__init__("hull_region", {"region" : region, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/rounding.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/rounding.scad'}", False) class round_corners(_Bosl2Base): def __init__(self, path=None, method=None, radius=None, r=None, cut=None, joint=None, width=None, k=None, closed=None, verbose=None, **kwargs): super().__init__("round_corners", {"path" : path, "method" : method, "radius" : radius, "r" : r, "cut" : cut, "joint" : joint, "width" : width, "k" : k, "closed" : closed, "verbose" : verbose, **kwargs}) class _smooth_bez_fill(_Bosl2Base): def __init__(self, points=None, k=None, **kwargs): super().__init__("_smooth_bez_fill", {"points" : points, "k" : k, **kwargs}) class _bezcorner(_Bosl2Base): def __init__(self, points=None, parm=None, **kwargs): super().__init__("_bezcorner", {"points" : points, "parm" : parm, **kwargs}) class _chamfcorner(_Bosl2Base): def __init__(self, points=None, parm=None, **kwargs): super().__init__("_chamfcorner", {"points" : points, "parm" : parm, **kwargs}) class _circlecorner(_Bosl2Base): def __init__(self, points=None, parm=None, **kwargs): super().__init__("_circlecorner", {"points" : points, "parm" : parm, **kwargs}) class _rounding_offsets(_Bosl2Base): def __init__(self, edgespec=None, z_dir=None, **kwargs): super().__init__("_rounding_offsets", {"edgespec" : edgespec, "z_dir" : z_dir, **kwargs}) class smooth_path(_Bosl2Base): def __init__(self, path=None, tangents=None, size=None, relsize=None, method=None, splinesteps=None, uniform=None, closed=None, **kwargs): super().__init__("smooth_path", {"path" : path, "tangents" : tangents, "size" : size, "relsize" : relsize, "method" : method, "splinesteps" : splinesteps, "uniform" : uniform, "closed" : closed, **kwargs}) class _scalar_to_vector(_Bosl2Base): def __init__(self, value=None, length=None, varname=None, **kwargs): super().__init__("_scalar_to_vector", {"value" : value, "length" : length, "varname" : varname, **kwargs}) class path_join(_Bosl2Base): def __init__(self, paths=None, joint=None, k=None, relocate=None, closed=None, **kwargs): super().__init__("path_join", {"paths" : paths, "joint" : joint, "k" : k, "relocate" : relocate, "closed" : closed, **kwargs}) class _path_join(_Bosl2Base): def __init__(self, paths=None, joint=None, k=None, i=None, result=None, relocate=None, closed=None, **kwargs): super().__init__("_path_join", {"paths" : paths, "joint" : joint, "k" : k, "i" : i, "result" : result, "relocate" : relocate, "closed" : closed, **kwargs}) class offset_stroke(_Bosl2Base): def __init__(self, path=None, width=None, rounded=None, start=None, end=None, check_valid=None, quality=None, chamfer=None, closed=None, atype=None, anchor=None, spin=None, cp=None, **kwargs): super().__init__("offset_stroke", {"path" : path, "width" : width, "rounded" : rounded, "start" : start, "end" : end, "check_valid" : check_valid, "quality" : quality, "chamfer" : chamfer, "closed" : closed, "atype" : atype, "anchor" : anchor, "spin" : spin, "cp" : cp, **kwargs}) class os_pointed(_Bosl2Base): def __init__(self, dist=None, loc=None, **kwargs): super().__init__("os_pointed", {"dist" : dist, "loc" : loc, **kwargs}) class os_round(_Bosl2Base): def __init__(self, cut=None, angle=None, abs_angle=None, k=None, r=None, **kwargs): super().__init__("os_round", {"cut" : cut, "angle" : angle, "abs_angle" : abs_angle, "k" : k, "r" : r, **kwargs}) class os_flat(_Bosl2Base): def __init__(self, angle=None, abs_angle=None, **kwargs): super().__init__("os_flat", {"angle" : angle, "abs_angle" : abs_angle, **kwargs}) class angle_between_lines(_Bosl2Base): def __init__(self, line1=None, line2=None, **kwargs): super().__init__("angle_between_lines", {"line1" : line1, "line2" : line2, **kwargs}) class _parse_stroke_end(_Bosl2Base): def __init__(self, spec=None, name=None, **kwargs): super().__init__("_parse_stroke_end", {"spec" : spec, "name" : name, **kwargs}) class _stroke_end(_Bosl2Base): def __init__(self, width=None, left=None, right=None, spec=None, **kwargs): super().__init__("_stroke_end", {"width" : width, "left" : left, "right" : right, "spec" : spec, **kwargs}) class _path_line_intersection(_Bosl2Base): def __init__(self, path=None, line=None, ind=None, **kwargs): super().__init__("_path_line_intersection", {"path" : path, "line" : line, "ind" : ind, **kwargs}) class _make_offset_polyhedron(_Bosl2Base): def __init__(self, path=None, offsets=None, offset_type=None, flip_faces=None, quality=None, check_valid=None, cap=None, offsetind=None, vertexcount=None, vertices=None, faces=None, **kwargs): super().__init__("_make_offset_polyhedron", {"path" : path, "offsets" : offsets, "offset_type" : offset_type, "flip_faces" : flip_faces, "quality" : quality, "check_valid" : check_valid, "cap" : cap, "offsetind" : offsetind, "vertexcount" : vertexcount, "vertices" : vertices, "faces" : faces, **kwargs}) class _struct_valid(_Bosl2Base): def __init__(self, spec=None, func=None, name=None, **kwargs): super().__init__("_struct_valid", {"spec" : spec, "func" : func, "name" : name, **kwargs}) class offset_sweep(_Bosl2Base): def __init__(self, path=None, height=None, bottom=None, top=None, h=None, l=None, length=None, ends=None, bot=None, offset=None, r=None, steps=None, quality=None, check_valid=None, extra=None, caps=None, cut=None, chamfer_width=None, chamfer_height=None, joint=None, k=None, angle=None, anchor=None, orient=None, spin=None, atype=None, cp=None, _return_height=None, _flipdir=None, **kwargs): super().__init__("offset_sweep", {"path" : path, "height" : height, "bottom" : bottom, "top" : top, "h" : h, "l" : l, "length" : length, "ends" : ends, "bot" : bot, "offset" : offset, "r" : r, "steps" : steps, "quality" : quality, "check_valid" : check_valid, "extra" : extra, "caps" : caps, "cut" : cut, "chamfer_width" : chamfer_width, "chamfer_height" : chamfer_height, "joint" : joint, "k" : k, "angle" : angle, "anchor" : anchor, "orient" : orient, "spin" : spin, "atype" : atype, "cp" : cp, "_return_height" : _return_height, "_flipdir" : _flipdir, **kwargs}) class os_circle(_Bosl2Base): def __init__(self, r=None, cut=None, h=None, height=None, clip_angle=None, extra=None, check_valid=None, quality=None, steps=None, offset=None, **kwargs): super().__init__("os_circle", {"r" : r, "cut" : cut, "h" : h, "height" : height, "clip_angle" : clip_angle, "extra" : extra, "check_valid" : check_valid, "quality" : quality, "steps" : steps, "offset" : offset, **kwargs}) class os_teardrop(_Bosl2Base): def __init__(self, r=None, cut=None, extra=None, check_valid=None, quality=None, steps=None, offset=None, **kwargs): super().__init__("os_teardrop", {"r" : r, "cut" : cut, "extra" : extra, "check_valid" : check_valid, "quality" : quality, "steps" : steps, "offset" : offset, **kwargs}) class os_chamfer(_Bosl2Base): def __init__(self, height=None, width=None, cut=None, angle=None, extra=None, check_valid=None, quality=None, steps=None, offset=None, **kwargs): super().__init__("os_chamfer", {"height" : height, "width" : width, "cut" : cut, "angle" : angle, "extra" : extra, "check_valid" : check_valid, "quality" : quality, "steps" : steps, "offset" : offset, **kwargs}) class os_smooth(_Bosl2Base): def __init__(self, cut=None, joint=None, k=None, extra=None, check_valid=None, quality=None, steps=None, offset=None, **kwargs): super().__init__("os_smooth", {"cut" : cut, "joint" : joint, "k" : k, "extra" : extra, "check_valid" : check_valid, "quality" : quality, "steps" : steps, "offset" : offset, **kwargs}) class os_profile(_Bosl2Base): def __init__(self, points=None, extra=None, check_valid=None, quality=None, offset=None, **kwargs): super().__init__("os_profile", {"points" : points, "extra" : extra, "check_valid" : check_valid, "quality" : quality, "offset" : offset, **kwargs}) class os_mask(_Bosl2Base): def __init__(self, mask=None, out=None, extra=None, check_valid=None, quality=None, offset=None, **kwargs): super().__init__("os_mask", {"mask" : mask, "out" : out, "extra" : extra, "check_valid" : check_valid, "quality" : quality, "offset" : offset, **kwargs}) class convex_offset_extrude(_Bosl2Base): def __init__(self, height=None, bottom=None, top=None, h=None, l=None, length=None, offset=None, r=None, steps=None, extra=None, cut=None, chamfer_width=None, chamfer_height=None, joint=None, k=None, angle=None, convexity=None, thickness=None, **kwargs): super().__init__("convex_offset_extrude", {"height" : height, "bottom" : bottom, "top" : top, "h" : h, "l" : l, "length" : length, "offset" : offset, "r" : r, "steps" : steps, "extra" : extra, "cut" : cut, "chamfer_width" : chamfer_width, "chamfer_height" : chamfer_height, "joint" : joint, "k" : k, "angle" : angle, "convexity" : convexity, "thickness" : thickness, **kwargs}) class _remove_undefined_vals(_Bosl2Base): def __init__(self, list=None, **kwargs): super().__init__("_remove_undefined_vals", {"list" : list, **kwargs}) class _rp_compute_patches(_Bosl2Base): def __init__(self, top=None, bot=None, rtop=None, rsides=None, ktop=None, ksides=None, concave=None, **kwargs): super().__init__("_rp_compute_patches", {"top" : top, "bot" : bot, "rtop" : rtop, "rsides" : rsides, "ktop" : ktop, "ksides" : ksides, "concave" : concave, **kwargs}) class rounded_prism(_Bosl2Base): def __init__(self, bottom=None, top=None, joint_bot=None, joint_top=None, joint_sides=None, k_bot=None, k_top=None, k_sides=None, k=None, splinesteps=None, h=None, length=None, l=None, height=None, debug=None, _full_info=None, **kwargs): super().__init__("rounded_prism", {"bottom" : bottom, "top" : top, "joint_bot" : joint_bot, "joint_top" : joint_top, "joint_sides" : joint_sides, "k_bot" : k_bot, "k_top" : k_top, "k_sides" : k_sides, "k" : k, "splinesteps" : splinesteps, "h" : h, "length" : length, "l" : l, "height" : height, "debug" : debug, "_full_info" : _full_info, **kwargs}) class _cyl_hole(_Bosl2Base): def __init__(self, r=None, path=None, **kwargs): super().__init__("_cyl_hole", {"r" : r, "path" : path, **kwargs}) class _circle_mask(_Bosl2Base): def __init__(self, r=None, **kwargs): super().__init__("_circle_mask", {"r" : r, **kwargs}) class bent_cutout_mask(_Bosl2Base): def __init__(self, r=None, thickness=None, path=None, radius=None, convexity=None, **kwargs): super().__init__("bent_cutout_mask", {"r" : r, "thickness" : thickness, "path" : path, "radius" : radius, "convexity" : convexity, **kwargs}) class join_prism(_Bosl2Base): def __init__(self, polygon=None, base=None, base_r=None, base_d=None, base_T=None, scale=None, prism_end_T=None, short=None, length=None, l=None, height=None, h=None, aux=None, aux_T=None, aux_r=None, aux_d=None, overlap=None, base_overlap=None, aux_overlap=None, n=None, base_n=None, aux_n=None, end_n=None, fillet=None, base_fillet=None, aux_fillet=None, end_round=None, k=None, base_k=None, aux_k=None, end_k=None, uniform=None, base_uniform=None, aux_uniform=None, debug=None, return_axis=None, smooth_normals=None, base_smooth_normals=None, aux_smooth_normals=None, start=None, end=None, _name1=None, _name2=None, **kwargs): super().__init__("join_prism", {"polygon" : polygon, "base" : base, "base_r" : base_r, "base_d" : base_d, "base_T" : base_T, "scale" : scale, "prism_end_T" : prism_end_T, "short" : short, "length" : length, "l" : l, "height" : height, "h" : h, "aux" : aux, "aux_T" : aux_T, "aux_r" : aux_r, "aux_d" : aux_d, "overlap" : overlap, "base_overlap" : base_overlap, "aux_overlap" : aux_overlap, "n" : n, "base_n" : base_n, "aux_n" : aux_n, "end_n" : end_n, "fillet" : fillet, "base_fillet" : base_fillet, "aux_fillet" : aux_fillet, "end_round" : end_round, "k" : k, "base_k" : base_k, "aux_k" : aux_k, "end_k" : end_k, "uniform" : uniform, "base_uniform" : base_uniform, "aux_uniform" : aux_uniform, "debug" : debug, "return_axis" : return_axis, "smooth_normals" : smooth_normals, "base_smooth_normals" : base_smooth_normals, "aux_smooth_normals" : aux_smooth_normals, "start" : start, "end" : end, "_name1" : _name1, "_name2" : _name2, **kwargs}) class _fix_angle_list(_Bosl2Base): def __init__(self, list=None, ind=None, result=None, **kwargs): super().__init__("_fix_angle_list", {"list" : list, "ind" : ind, "result" : result, **kwargs}) class _cyl_line_intersection(_Bosl2Base): def __init__(self, R=None, line=None, ref=None, **kwargs): super().__init__("_cyl_line_intersection", {"R" : R, "line" : line, "ref" : ref, **kwargs}) class _sphere_line_isect_best(_Bosl2Base): def __init__(self, R=None, line=None, ref=None, **kwargs): super().__init__("_sphere_line_isect_best", {"R" : R, "line" : line, "ref" : ref, **kwargs}) class _prism_line_isect(_Bosl2Base): def __init__(self, poly_pairs=None, line=None, ref=None, **kwargs): super().__init__("_prism_line_isect", {"poly_pairs" : poly_pairs, "line" : line, "ref" : ref, **kwargs}) class _prism_fillet(_Bosl2Base): def __init__(self, name=None, base=None, R=None, bot=None, top=None, d=None, k=None, N=None, overlap=None, uniform=None, smooth_normals=None, debug=None, **kwargs): super().__init__("_prism_fillet", {"name" : name, "base" : base, "R" : R, "bot" : bot, "top" : top, "d" : d, "k" : k, "N" : N, "overlap" : overlap, "uniform" : uniform, "smooth_normals" : smooth_normals, "debug" : debug, **kwargs}) class _prism_fillet_plane(_Bosl2Base): def __init__(self, name=None, bot=None, top=None, d=None, k=None, N=None, overlap=None, debug=None, **kwargs): super().__init__("_prism_fillet_plane", {"name" : name, "bot" : bot, "top" : top, "d" : d, "k" : k, "N" : N, "overlap" : overlap, "debug" : debug, **kwargs}) class _prism_fillet_cyl(_Bosl2Base): def __init__(self, name=None, R=None, bot=None, top=None, d=None, k=None, N=None, overlap=None, uniform=None, debug=None, **kwargs): super().__init__("_prism_fillet_cyl", {"name" : name, "R" : R, "bot" : bot, "top" : top, "d" : d, "k" : k, "N" : N, "overlap" : overlap, "uniform" : uniform, "debug" : debug, **kwargs}) class _prism_fillet_sphere(_Bosl2Base): def __init__(self, name=None, R=None, bot=None, top=None, d=None, k=None, N=None, overlap=None, uniform=None, debug=None, **kwargs): super().__init__("_prism_fillet_sphere", {"name" : name, "R" : R, "bot" : bot, "top" : top, "d" : d, "k" : k, "N" : N, "overlap" : overlap, "uniform" : uniform, "debug" : debug, **kwargs}) class _getnormal(_Bosl2Base): def __init__(self, polygon=None, index=None, u=None, smooth_normals=None, **kwargs): super().__init__("_getnormal", {"polygon" : polygon, "index" : index, "u" : u, "smooth_normals" : smooth_normals, **kwargs}) class _polygon_step(_Bosl2Base): def __init__(self, poly=None, ind=None, u=None, dir=None, length=None, **kwargs): super().__init__("_polygon_step", {"poly" : poly, "ind" : ind, "u" : u, "dir" : dir, "length" : length, **kwargs}) class _prism_fillet_prism(_Bosl2Base): def __init__(self, name=None, basepoly=None, bot=None, top=None, d=None, k=None, N=None, overlap=None, uniform=None, smooth_normals=None, inside=None, debug=None, **kwargs): super().__init__("_prism_fillet_prism", {"name" : name, "basepoly" : basepoly, "bot" : bot, "top" : top, "d" : d, "k" : k, "N" : N, "overlap" : overlap, "uniform" : uniform, "smooth_normals" : smooth_normals, "inside" : inside, "debug" : debug, **kwargs}) class _get_obj_type(_Bosl2Base): def __init__(self, ind=None, geom=None, anchor=None, prof=None, **kwargs): super().__init__("_get_obj_type", {"ind" : ind, "geom" : geom, "anchor" : anchor, "prof" : prof, **kwargs}) class _check_join_shift(_Bosl2Base): def __init__(self, ind=None, type=None, shift=None, flip=None, **kwargs): super().__init__("_check_join_shift", {"ind" : ind, "type" : type, "shift" : shift, "flip" : flip, **kwargs}) class _is_geom_an_edge(_Bosl2Base): def __init__(self, geom=None, anchor=None, **kwargs): super().__init__("_is_geom_an_edge", {"geom" : geom, "anchor" : anchor, **kwargs}) class _prismoid_isect(_Bosl2Base): def __init__(self, geom=None, line=None, bounded=None, flip=None, **kwargs): super().__init__("_prismoid_isect", {"geom" : geom, "line" : line, "bounded" : bounded, "flip" : flip, **kwargs}) class _cone_isect(_Bosl2Base): def __init__(self, geom=None, line=None, bounded=None, flip=None, **kwargs): super().__init__("_cone_isect", {"geom" : geom, "line" : line, "bounded" : bounded, "flip" : flip, **kwargs}) class _extrusion_isect(_Bosl2Base): def __init__(self, geom=None, line=None, bounded=None, flip=None, **kwargs): super().__init__("_extrusion_isect", {"geom" : geom, "line" : line, "bounded" : bounded, "flip" : flip, **kwargs}) class _find_center_anchor(_Bosl2Base): def __init__(self, desc1=None, desc2=None, anchor2=None, flip=None, **kwargs): super().__init__("_find_center_anchor", {"desc1" : desc1, "desc2" : desc2, "anchor2" : anchor2, "flip" : flip, **kwargs}) class round_corners(_Bosl2Base): def __init__(self, path=None, method=None, radius=None, r=None, cut=None, joint=None, width=None, k=None, closed=None, verbose=None, **kwargs): super().__init__("round_corners", {"path" : path, "method" : method, "radius" : radius, "r" : r, "cut" : cut, "joint" : joint, "width" : width, "k" : k, "closed" : closed, "verbose" : verbose, **kwargs}) class smooth_path(_Bosl2Base): def __init__(self, path=None, tangents=None, size=None, relsize=None, method=None, splinesteps=None, uniform=None, closed=None, **kwargs): super().__init__("smooth_path", {"path" : path, "tangents" : tangents, "size" : size, "relsize" : relsize, "method" : method, "splinesteps" : splinesteps, "uniform" : uniform, "closed" : closed, **kwargs}) class path_join(_Bosl2Base): def __init__(self, paths=None, joint=None, k=None, relocate=None, closed=None, **kwargs): super().__init__("path_join", {"paths" : paths, "joint" : joint, "k" : k, "relocate" : relocate, "closed" : closed, **kwargs}) class offset_stroke(_Bosl2Base): def __init__(self, path=None, width=None, rounded=None, start=None, end=None, check_valid=None, quality=None, chamfer=None, closed=None, atype=None, anchor=None, spin=None, cp=None, **kwargs): super().__init__("offset_stroke", {"path" : path, "width" : width, "rounded" : rounded, "start" : start, "end" : end, "check_valid" : check_valid, "quality" : quality, "chamfer" : chamfer, "closed" : closed, "atype" : atype, "anchor" : anchor, "spin" : spin, "cp" : cp, **kwargs}) class _offset_sweep_region(_Bosl2Base): def __init__(self, region=None, height=None, bottom=None, top=None, h=None, l=None, length=None, ends=None, bot=None, top_hole=None, bot_hole=None, bottom_hole=None, ends_hole=None, offset=None, r=None, steps=None, quality=None, check_valid=None, extra=None, cut=None, chamfer_width=None, chamfer_height=None, joint=None, k=None, angle=None, convexity=None, anchor=None, cp=None, spin=None, orient=None, atype=None, **kwargs): super().__init__("_offset_sweep_region", {"region" : region, "height" : height, "bottom" : bottom, "top" : top, "h" : h, "l" : l, "length" : length, "ends" : ends, "bot" : bot, "top_hole" : top_hole, "bot_hole" : bot_hole, "bottom_hole" : bottom_hole, "ends_hole" : ends_hole, "offset" : offset, "r" : r, "steps" : steps, "quality" : quality, "check_valid" : check_valid, "extra" : extra, "cut" : cut, "chamfer_width" : chamfer_width, "chamfer_height" : chamfer_height, "joint" : joint, "k" : k, "angle" : angle, "convexity" : convexity, "anchor" : anchor, "cp" : cp, "spin" : spin, "orient" : orient, "atype" : atype, **kwargs}) class offset_sweep(_Bosl2Base): def __init__(self, path=None, height=None, bottom=None, top=None, h=None, l=None, length=None, ends=None, bot=None, offset=None, r=None, steps=None, quality=None, check_valid=None, extra=None, top_hole=None, bot_hole=None, bottom_hole=None, ends_hole=None, cut=None, chamfer_width=None, chamfer_height=None, joint=None, k=None, angle=None, convexity=None, anchor=None, cp=None, spin=None, orient=None, atype=None, _flipdir=None, **kwargs): super().__init__("offset_sweep", {"path" : path, "height" : height, "bottom" : bottom, "top" : top, "h" : h, "l" : l, "length" : length, "ends" : ends, "bot" : bot, "offset" : offset, "r" : r, "steps" : steps, "quality" : quality, "check_valid" : check_valid, "extra" : extra, "top_hole" : top_hole, "bot_hole" : bot_hole, "bottom_hole" : bottom_hole, "ends_hole" : ends_hole, "cut" : cut, "chamfer_width" : chamfer_width, "chamfer_height" : chamfer_height, "joint" : joint, "k" : k, "angle" : angle, "convexity" : convexity, "anchor" : anchor, "cp" : cp, "spin" : spin, "orient" : orient, "atype" : atype, "_flipdir" : _flipdir, **kwargs}) class convex_offset_extrude(_Bosl2Base): def __init__(self, height=None, bottom=None, top=None, h=None, l=None, length=None, offset=None, r=None, steps=None, extra=None, cut=None, chamfer_width=None, chamfer_height=None, joint=None, k=None, angle=None, convexity=None, thickness=None, **kwargs): super().__init__("convex_offset_extrude", {"height" : height, "bottom" : bottom, "top" : top, "h" : h, "l" : l, "length" : length, "offset" : offset, "r" : r, "steps" : steps, "extra" : extra, "cut" : cut, "chamfer_width" : chamfer_width, "chamfer_height" : chamfer_height, "joint" : joint, "k" : k, "angle" : angle, "convexity" : convexity, "thickness" : thickness, **kwargs}) class rounded_prism(_Bosl2Base): def __init__(self, bottom=None, top=None, joint_bot=None, joint_top=None, joint_sides=None, k_bot=None, k_top=None, k_sides=None, k=None, splinesteps=None, h=None, length=None, l=None, height=None, convexity=None, debug=None, anchor=None, cp=None, spin=None, orient=None, atype=None, **kwargs): super().__init__("rounded_prism", {"bottom" : bottom, "top" : top, "joint_bot" : joint_bot, "joint_top" : joint_top, "joint_sides" : joint_sides, "k_bot" : k_bot, "k_top" : k_top, "k_sides" : k_sides, "k" : k, "splinesteps" : splinesteps, "h" : h, "length" : length, "l" : l, "height" : height, "convexity" : convexity, "debug" : debug, "anchor" : anchor, "cp" : cp, "spin" : spin, "orient" : orient, "atype" : atype, **kwargs}) class bent_cutout_mask(_Bosl2Base): def __init__(self, r=None, thickness=None, path=None, radius=None, convexity=None, **kwargs): super().__init__("bent_cutout_mask", {"r" : r, "thickness" : thickness, "path" : path, "radius" : radius, "convexity" : convexity, **kwargs}) class join_prism(_Bosl2Base): def __init__(self, polygon=None, base=None, base_r=None, base_d=None, base_T=None, scale=None, prism_end_T=None, short=None, length=None, l=None, height=None, h=None, aux=None, aux_T=None, aux_r=None, aux_d=None, overlap=None, base_overlap=None, aux_overlap=None, n=None, base_n=None, end_n=None, aux_n=None, fillet=None, base_fillet=None, aux_fillet=None, end_round=None, k=None, base_k=None, aux_k=None, end_k=None, start=None, end=None, uniform=None, base_uniform=None, aux_uniform=None, smooth_normals=None, base_smooth_normals=None, aux_smooth_normals=None, debug=None, anchor=None, extent=None, cp=None, atype=None, orient=None, spin=None, convexity=None, _name1=None, _name2=None, **kwargs): super().__init__("join_prism", {"polygon" : polygon, "base" : base, "base_r" : base_r, "base_d" : base_d, "base_T" : base_T, "scale" : scale, "prism_end_T" : prism_end_T, "short" : short, "length" : length, "l" : l, "height" : height, "h" : h, "aux" : aux, "aux_T" : aux_T, "aux_r" : aux_r, "aux_d" : aux_d, "overlap" : overlap, "base_overlap" : base_overlap, "aux_overlap" : aux_overlap, "n" : n, "base_n" : base_n, "end_n" : end_n, "aux_n" : aux_n, "fillet" : fillet, "base_fillet" : base_fillet, "aux_fillet" : aux_fillet, "end_round" : end_round, "k" : k, "base_k" : base_k, "aux_k" : aux_k, "end_k" : end_k, "start" : start, "end" : end, "uniform" : uniform, "base_uniform" : base_uniform, "aux_uniform" : aux_uniform, "smooth_normals" : smooth_normals, "base_smooth_normals" : base_smooth_normals, "aux_smooth_normals" : aux_smooth_normals, "debug" : debug, "anchor" : anchor, "extent" : extent, "cp" : cp, "atype" : atype, "orient" : orient, "spin" : spin, "convexity" : convexity, "_name1" : _name1, "_name2" : _name2, **kwargs}) class prism_connector(_Bosl2Base): def __init__(self, profile=None, desc1=None, anchor1=None, desc2=None, anchor2=None, shift1=None, shift2=None, spin_align=None, scale=None, fillet=None, fillet1=None, fillet2=None, overlap=None, overlap1=None, overlap2=None, k=None, k1=None, k2=None, n=None, n1=None, n2=None, uniform=None, uniform1=None, uniform2=None, smooth_normals=None, smooth_normals1=None, smooth_normals2=None, debug=None, debug_pos=None, **kwargs): super().__init__("prism_connector", {"profile" : profile, "desc1" : desc1, "anchor1" : anchor1, "desc2" : desc2, "anchor2" : anchor2, "shift1" : shift1, "shift2" : shift2, "spin_align" : spin_align, "scale" : scale, "fillet" : fillet, "fillet1" : fillet1, "fillet2" : fillet2, "overlap" : overlap, "overlap1" : overlap1, "overlap2" : overlap2, "k" : k, "k1" : k1, "k2" : k2, "n" : n, "n1" : n1, "n2" : n2, "uniform" : uniform, "uniform1" : uniform1, "uniform2" : uniform2, "smooth_normals" : smooth_normals, "smooth_normals1" : smooth_normals1, "smooth_normals2" : smooth_normals2, "debug" : debug, "debug_pos" : debug_pos, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/screw_drive.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/screw_drive.scad'}", False) class _phillips_shaft(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("_phillips_shaft", {"x" : x, **kwargs}) class _ph_bot_angle(_Bosl2Base): def __init__(self, **kwargs): super().__init__("_ph_bot_angle", {**kwargs}) class _ph_side_angle(_Bosl2Base): def __init__(self, **kwargs): super().__init__("_ph_side_angle", {**kwargs}) class phillips_depth(_Bosl2Base): def __init__(self, size=None, d=None, **kwargs): super().__init__("phillips_depth", {"size" : size, "d" : d, **kwargs}) class phillips_diam(_Bosl2Base): def __init__(self, size=None, depth=None, **kwargs): super().__init__("phillips_diam", {"size" : size, "depth" : depth, **kwargs}) class hex_drive_mask(_Bosl2Base): def __init__(self, size=None, length=None, l=None, h=None, height=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("hex_drive_mask", {"size" : size, "length" : length, "l" : l, "h" : h, "height" : height, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class torx_info(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("torx_info", {"size" : size, **kwargs}) class torx_diam(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("torx_diam", {"size" : size, **kwargs}) class torx_depth(_Bosl2Base): def __init__(self, size=None, **kwargs): super().__init__("torx_depth", {"size" : size, **kwargs}) class phillips_mask(_Bosl2Base): def __init__(self, size=None, _fn=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("phillips_mask", {"size" : size, "_fn" : _fn, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class hex_drive_mask(_Bosl2Base): def __init__(self, size=None, length=None, l=None, h=None, height=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("hex_drive_mask", {"size" : size, "length" : length, "l" : l, "h" : h, "height" : height, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class torx_mask(_Bosl2Base): def __init__(self, size=None, l=None, center=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("torx_mask", {"size" : size, "l" : l, "center" : center, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class torx_mask2d(_Bosl2Base): def __init__(self, size=None, anchor=None, spin=None, **kwargs): super().__init__("torx_mask2d", {"size" : size, "anchor" : anchor, "spin" : spin, **kwargs}) class robertson_mask(_Bosl2Base): def __init__(self, size=None, extra=None, ang=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("robertson_mask", {"size" : size, "extra" : extra, "ang" : ang, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/screws.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/screws.scad'}", False) class _get_spec(_Bosl2Base): def __init__(self, spec=None, needtype=None, origin=None, thread=None, head=None, drive=None, drive_size=None, shape=None, thickness=None, **kwargs): super().__init__("_get_spec", {"spec" : spec, "needtype" : needtype, "origin" : origin, "thread" : thread, "head" : head, "drive" : drive, "drive_size" : drive_size, "shape" : shape, "thickness" : thickness, **kwargs}) class _struct_reset(_Bosl2Base): def __init__(self, s=None, keyval=None, grow=None, **kwargs): super().__init__("_struct_reset", {"s" : s, "keyval" : keyval, "grow" : grow, **kwargs}) class _nominal_diam(_Bosl2Base): def __init__(self, spec=None, **kwargs): super().__init__("_nominal_diam", {"spec" : spec, **kwargs}) class screw(_Bosl2Base): def __init__(self, spec=None, head=None, drive=None, thread=None, drive_size=None, length=None, l=None, thread_len=None, tolerance=None, details=None, undersize=None, shaft_undersize=None, head_undersize=None, atype=None, anchor=None, spin=None, orient=None, _shoulder_diam=None, _shoulder_len=None, bevel=None, bevel1=None, bevel2=None, bevelsize=None, blunt_start=None, blunt_start1=None, blunt_start2=None, _internal=None, _counterbore=None, _teardrop=None, **kwargs): super().__init__("screw", {"spec" : spec, "head" : head, "drive" : drive, "thread" : thread, "drive_size" : drive_size, "length" : length, "l" : l, "thread_len" : thread_len, "tolerance" : tolerance, "details" : details, "undersize" : undersize, "shaft_undersize" : shaft_undersize, "head_undersize" : head_undersize, "atype" : atype, "anchor" : anchor, "spin" : spin, "orient" : orient, "_shoulder_diam" : _shoulder_diam, "_shoulder_len" : _shoulder_len, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "bevelsize" : bevelsize, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "_internal" : _internal, "_counterbore" : _counterbore, "_teardrop" : _teardrop, **kwargs}) class screw_hole(_Bosl2Base): def __init__(self, spec=None, head=None, thread=None, oversize=None, hole_oversize=None, head_oversize=None, length=None, l=None, thread_len=None, tolerance=None, counterbore=None, teardrop=None, bevel=None, bevel1=None, bevel2=None, blunt_start=None, blunt_start1=None, blunt_start2=None, atype=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("screw_hole", {"spec" : spec, "head" : head, "thread" : thread, "oversize" : oversize, "hole_oversize" : hole_oversize, "head_oversize" : head_oversize, "length" : length, "l" : l, "thread_len" : thread_len, "tolerance" : tolerance, "counterbore" : counterbore, "teardrop" : teardrop, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "atype" : atype, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class shoulder_screw(_Bosl2Base): def __init__(self, s=None, d=None, length=None, head=None, thread_len=None, tolerance=None, head_size=None, drive=None, drive_size=None, thread=None, undersize=None, shaft_undersize=None, head_undersize=None, shoulder_undersize=None, blunt_start=None, blunt_start1=None, blunt_start2=None, atype=None, anchor=None, orient=None, spin=None, **kwargs): super().__init__("shoulder_screw", {"s" : s, "d" : d, "length" : length, "head" : head, "thread_len" : thread_len, "tolerance" : tolerance, "head_size" : head_size, "drive" : drive, "drive_size" : drive_size, "thread" : thread, "undersize" : undersize, "shaft_undersize" : shaft_undersize, "head_undersize" : head_undersize, "shoulder_undersize" : shoulder_undersize, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "atype" : atype, "anchor" : anchor, "orient" : orient, "spin" : spin, **kwargs}) class _ISO_thread_tolerance(_Bosl2Base): def __init__(self, diameter=None, pitch=None, internal=None, tolerance=None, **kwargs): super().__init__("_ISO_thread_tolerance", {"diameter" : diameter, "pitch" : pitch, "internal" : internal, "tolerance" : tolerance, **kwargs}) class _UTS_thread_tolerance(_Bosl2Base): def __init__(self, diam=None, pitch=None, internal=None, tolerance=None, **kwargs): super().__init__("_UTS_thread_tolerance", {"diam" : diam, "pitch" : pitch, "internal" : internal, "tolerance" : tolerance, **kwargs}) class _exact_thread_tolerance(_Bosl2Base): def __init__(self, d=None, P=None, **kwargs): super().__init__("_exact_thread_tolerance", {"d" : d, "P" : P, **kwargs}) class _parse_screw_name(_Bosl2Base): def __init__(self, name=None, **kwargs): super().__init__("_parse_screw_name", {"name" : name, **kwargs}) class _parse_drive(_Bosl2Base): def __init__(self, drive=None, drive_size=None, **kwargs): super().__init__("_parse_drive", {"drive" : drive, "drive_size" : drive_size, **kwargs}) class screw_head(_Bosl2Base): def __init__(self, screw_info=None, details=None, counterbore=None, flat_height=None, teardrop=None, slop=None, **kwargs): super().__init__("screw_head", {"screw_info" : screw_info, "details" : details, "counterbore" : counterbore, "flat_height" : flat_height, "teardrop" : teardrop, "slop" : slop, **kwargs}) class nut(_Bosl2Base): def __init__(self, spec=None, shape=None, thickness=None, nutwidth=None, thread=None, tolerance=None, hole_oversize=None, bevel=None, bevel1=None, bevel2=None, bevang=None, ibevel=None, ibevel1=None, ibevel2=None, blunt_start=None, blunt_start1=None, blunt_start2=None, anchor=None, spin=None, orient=None, oversize=None, **kwargs): super().__init__("nut", {"spec" : spec, "shape" : shape, "thickness" : thickness, "nutwidth" : nutwidth, "thread" : thread, "tolerance" : tolerance, "hole_oversize" : hole_oversize, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "bevang" : bevang, "ibevel" : ibevel, "ibevel1" : ibevel1, "ibevel2" : ibevel2, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "anchor" : anchor, "spin" : spin, "orient" : orient, "oversize" : oversize, **kwargs}) class screw_info(_Bosl2Base): def __init__(self, name=None, head=None, drive=None, thread=None, drive_size=None, shaft_oversize=None, head_oversize=None, _origin=None, **kwargs): super().__init__("screw_info", {"name" : name, "head" : head, "drive" : drive, "thread" : thread, "drive_size" : drive_size, "shaft_oversize" : shaft_oversize, "head_oversize" : head_oversize, "_origin" : _origin, **kwargs}) class nut_info(_Bosl2Base): def __init__(self, name=None, shape=None, thickness=None, thread=None, hole_oversize=None, width=None, _origin=None, **kwargs): super().__init__("nut_info", {"name" : name, "shape" : shape, "thickness" : thickness, "thread" : thread, "hole_oversize" : hole_oversize, "width" : width, "_origin" : _origin, **kwargs}) class _nut_info_english(_Bosl2Base): def __init__(self, diam=None, threadcount=None, thread=None, shape=None, thickness=None, width=None, **kwargs): super().__init__("_nut_info_english", {"diam" : diam, "threadcount" : threadcount, "thread" : thread, "shape" : shape, "thickness" : thickness, "width" : width, **kwargs}) class _downcase_if_str(_Bosl2Base): def __init__(self, s=None, **kwargs): super().__init__("_downcase_if_str", {"s" : s, **kwargs}) class _nut_info_metric(_Bosl2Base): def __init__(self, diam=None, pitch=None, thread=None, shape=None, thickness=None, width=None, **kwargs): super().__init__("_nut_info_metric", {"diam" : diam, "pitch" : pitch, "thread" : thread, "shape" : shape, "thickness" : thickness, "width" : width, **kwargs}) class _screw_info_english(_Bosl2Base): def __init__(self, diam=None, threadcount=None, head=None, thread=None, drive=None, **kwargs): super().__init__("_screw_info_english", {"diam" : diam, "threadcount" : threadcount, "head" : head, "thread" : thread, "drive" : drive, **kwargs}) class _screw_info_metric(_Bosl2Base): def __init__(self, diam=None, pitch=None, head=None, thread=None, drive=None, **kwargs): super().__init__("_screw_info_metric", {"diam" : diam, "pitch" : pitch, "head" : head, "thread" : thread, "drive" : drive, **kwargs}) class _is_positive(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("_is_positive", {"x" : x, **kwargs}) class _validate_nut_spec(_Bosl2Base): def __init__(self, spec=None, **kwargs): super().__init__("_validate_nut_spec", {"spec" : spec, **kwargs}) class _validate_screw_spec(_Bosl2Base): def __init__(self, spec=None, **kwargs): super().__init__("_validate_screw_spec", {"spec" : spec, **kwargs}) class thread_specification(_Bosl2Base): def __init__(self, screw_spec=None, tolerance=None, internal=None, **kwargs): super().__init__("thread_specification", {"screw_spec" : screw_spec, "tolerance" : tolerance, "internal" : internal, **kwargs}) class screw(_Bosl2Base): def __init__(self, spec=None, head=None, drive=None, thread=None, drive_size=None, length=None, l=None, thread_len=None, tolerance=None, details=None, undersize=None, shaft_undersize=None, head_undersize=None, atype=None, anchor=None, spin=None, orient=None, _shoulder_diam=None, _shoulder_len=None, bevel=None, bevel1=None, bevel2=None, bevelsize=None, blunt_start=None, blunt_start1=None, blunt_start2=None, _internal=None, _counterbore=None, _teardrop=None, **kwargs): super().__init__("screw", {"spec" : spec, "head" : head, "drive" : drive, "thread" : thread, "drive_size" : drive_size, "length" : length, "l" : l, "thread_len" : thread_len, "tolerance" : tolerance, "details" : details, "undersize" : undersize, "shaft_undersize" : shaft_undersize, "head_undersize" : head_undersize, "atype" : atype, "anchor" : anchor, "spin" : spin, "orient" : orient, "_shoulder_diam" : _shoulder_diam, "_shoulder_len" : _shoulder_len, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "bevelsize" : bevelsize, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "_internal" : _internal, "_counterbore" : _counterbore, "_teardrop" : _teardrop, **kwargs}) class screw_hole(_Bosl2Base): def __init__(self, spec=None, head=None, thread=None, oversize=None, hole_oversize=None, head_oversize=None, length=None, l=None, thread_len=None, tolerance=None, counterbore=None, teardrop=None, bevel=None, bevel1=None, bevel2=None, blunt_start=None, blunt_start1=None, blunt_start2=None, atype=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("screw_hole", {"spec" : spec, "head" : head, "thread" : thread, "oversize" : oversize, "hole_oversize" : hole_oversize, "head_oversize" : head_oversize, "length" : length, "l" : l, "thread_len" : thread_len, "tolerance" : tolerance, "counterbore" : counterbore, "teardrop" : teardrop, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "atype" : atype, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class shoulder_screw(_Bosl2Base): def __init__(self, s=None, d=None, length=None, head=None, thread_len=None, tolerance=None, head_size=None, drive=None, drive_size=None, thread=None, undersize=None, shaft_undersize=None, head_undersize=None, shoulder_undersize=None, blunt_start=None, blunt_start1=None, blunt_start2=None, atype=None, anchor=None, orient=None, spin=None, **kwargs): super().__init__("shoulder_screw", {"s" : s, "d" : d, "length" : length, "head" : head, "thread_len" : thread_len, "tolerance" : tolerance, "head_size" : head_size, "drive" : drive, "drive_size" : drive_size, "thread" : thread, "undersize" : undersize, "shaft_undersize" : shaft_undersize, "head_undersize" : head_undersize, "shoulder_undersize" : shoulder_undersize, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "atype" : atype, "anchor" : anchor, "orient" : orient, "spin" : spin, **kwargs}) class _driver(_Bosl2Base): def __init__(self, spec=None, **kwargs): super().__init__("_driver", {"spec" : spec, **kwargs}) class screw_head(_Bosl2Base): def __init__(self, screw_info=None, details=None, counterbore=None, flat_height=None, teardrop=None, slop=None, **kwargs): super().__init__("screw_head", {"screw_info" : screw_info, "details" : details, "counterbore" : counterbore, "flat_height" : flat_height, "teardrop" : teardrop, "slop" : slop, **kwargs}) class nut(_Bosl2Base): def __init__(self, spec=None, shape=None, thickness=None, nutwidth=None, thread=None, tolerance=None, hole_oversize=None, bevel=None, bevel1=None, bevel2=None, bevang=None, ibevel=None, ibevel1=None, ibevel2=None, blunt_start=None, blunt_start1=None, blunt_start2=None, anchor=None, spin=None, orient=None, oversize=None, **kwargs): super().__init__("nut", {"spec" : spec, "shape" : shape, "thickness" : thickness, "nutwidth" : nutwidth, "thread" : thread, "tolerance" : tolerance, "hole_oversize" : hole_oversize, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "bevang" : bevang, "ibevel" : ibevel, "ibevel1" : ibevel1, "ibevel2" : ibevel2, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "anchor" : anchor, "spin" : spin, "orient" : orient, "oversize" : oversize, **kwargs}) class nut_trap_side(_Bosl2Base): def __init__(self, trap_width=None, spec=None, shape=None, thickness=None, nutwidth=None, anchor=None, orient=None, spin=None, poke_len=None, poke_diam=None, **kwargs): super().__init__("nut_trap_side", {"trap_width" : trap_width, "spec" : spec, "shape" : shape, "thickness" : thickness, "nutwidth" : nutwidth, "anchor" : anchor, "orient" : orient, "spin" : spin, "poke_len" : poke_len, "poke_diam" : poke_diam, **kwargs}) class nut_trap_inline(_Bosl2Base): def __init__(self, length=None, spec=None, shape=None, l=None, height=None, h=None, nutwidth=None, anchor=None, orient=None, spin=None, **kwargs): super().__init__("nut_trap_inline", {"length" : length, "spec" : spec, "shape" : shape, "l" : l, "height" : height, "h" : h, "nutwidth" : nutwidth, "anchor" : anchor, "orient" : orient, "spin" : spin, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/shapes2d.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/shapes2d.scad'}", False) class square(_Bosl2Base): def __init__(self, size=None, center=None, anchor=None, spin=None, **kwargs): super().__init__("square", {"size" : size, "center" : center, "anchor" : anchor, "spin" : spin, **kwargs}) class rect(_Bosl2Base): def __init__(self, size=None, rounding=None, chamfer=None, atype=None, anchor=None, spin=None, _return_override=None, corner_flip=None, **kwargs): super().__init__("rect", {"size" : size, "rounding" : rounding, "chamfer" : chamfer, "atype" : atype, "anchor" : anchor, "spin" : spin, "_return_override" : _return_override, "corner_flip" : corner_flip, **kwargs}) class circle(_Bosl2Base): def __init__(self, r=None, d=None, points=None, corner=None, anchor=None, spin=None, **kwargs): super().__init__("circle", {"r" : r, "d" : d, "points" : points, "corner" : corner, "anchor" : anchor, "spin" : spin, **kwargs}) class _ellipse_refine(_Bosl2Base): def __init__(self, a=None, b=None, N=None, _theta=None, **kwargs): super().__init__("_ellipse_refine", {"a" : a, "b" : b, "N" : N, "_theta" : _theta, **kwargs}) class _ellipse_refine_realign(_Bosl2Base): def __init__(self, a=None, b=None, N=None, _theta=None, i=None, **kwargs): super().__init__("_ellipse_refine_realign", {"a" : a, "b" : b, "N" : N, "_theta" : _theta, "i" : i, **kwargs}) class ellipse(_Bosl2Base): def __init__(self, r=None, d=None, realign=None, circum=None, uniform=None, anchor=None, spin=None, **kwargs): super().__init__("ellipse", {"r" : r, "d" : d, "realign" : realign, "circum" : circum, "uniform" : uniform, "anchor" : anchor, "spin" : spin, **kwargs}) class regular_ngon(_Bosl2Base): def __init__(self, n=None, r=None, d=None, _or=None, od=None, ir=None, id=None, side=None, rounding=None, realign=None, align_tip=None, align_side=None, anchor=None, spin=None, _mat=None, _anchs=None, **kwargs): super().__init__("regular_ngon", {"n" : n, "r" : r, "d" : d, "_or" : _or, "od" : od, "ir" : ir, "id" : id, "side" : side, "rounding" : rounding, "realign" : realign, "align_tip" : align_tip, "align_side" : align_side, "anchor" : anchor, "spin" : spin, "_mat" : _mat, "_anchs" : _anchs, **kwargs}) class pentagon(_Bosl2Base): def __init__(self, r=None, d=None, _or=None, od=None, ir=None, id=None, side=None, rounding=None, realign=None, align_tip=None, align_side=None, anchor=None, spin=None, **kwargs): super().__init__("pentagon", {"r" : r, "d" : d, "_or" : _or, "od" : od, "ir" : ir, "id" : id, "side" : side, "rounding" : rounding, "realign" : realign, "align_tip" : align_tip, "align_side" : align_side, "anchor" : anchor, "spin" : spin, **kwargs}) class hexagon(_Bosl2Base): def __init__(self, r=None, d=None, _or=None, od=None, ir=None, id=None, side=None, rounding=None, realign=None, align_tip=None, align_side=None, anchor=None, spin=None, **kwargs): super().__init__("hexagon", {"r" : r, "d" : d, "_or" : _or, "od" : od, "ir" : ir, "id" : id, "side" : side, "rounding" : rounding, "realign" : realign, "align_tip" : align_tip, "align_side" : align_side, "anchor" : anchor, "spin" : spin, **kwargs}) class octagon(_Bosl2Base): def __init__(self, r=None, d=None, _or=None, od=None, ir=None, id=None, side=None, rounding=None, realign=None, align_tip=None, align_side=None, anchor=None, spin=None, **kwargs): super().__init__("octagon", {"r" : r, "d" : d, "_or" : _or, "od" : od, "ir" : ir, "id" : id, "side" : side, "rounding" : rounding, "realign" : realign, "align_tip" : align_tip, "align_side" : align_side, "anchor" : anchor, "spin" : spin, **kwargs}) class right_triangle(_Bosl2Base): def __init__(self, size=None, center=None, anchor=None, spin=None, **kwargs): super().__init__("right_triangle", {"size" : size, "center" : center, "anchor" : anchor, "spin" : spin, **kwargs}) class _trapezoid_dims(_Bosl2Base): def __init__(self, h=None, w1=None, w2=None, shift=None, ang=None, **kwargs): super().__init__("_trapezoid_dims", {"h" : h, "w1" : w1, "w2" : w2, "shift" : shift, "ang" : ang, **kwargs}) class trapezoid(_Bosl2Base): def __init__(self, h=None, w1=None, w2=None, ang=None, shift=None, chamfer=None, rounding=None, flip=None, anchor=None, spin=None, atype=None, _return_override=None, angle=None, **kwargs): super().__init__("trapezoid", {"h" : h, "w1" : w1, "w2" : w2, "ang" : ang, "shift" : shift, "chamfer" : chamfer, "rounding" : rounding, "flip" : flip, "anchor" : anchor, "spin" : spin, "atype" : atype, "_return_override" : _return_override, "angle" : angle, **kwargs}) class star(_Bosl2Base): def __init__(self, n=None, r=None, ir=None, d=None, _or=None, od=None, id=None, step=None, realign=None, align_tip=None, align_pit=None, anchor=None, spin=None, atype=None, _mat=None, _anchs=None, **kwargs): super().__init__("star", {"n" : n, "r" : r, "ir" : ir, "d" : d, "_or" : _or, "od" : od, "id" : id, "step" : step, "realign" : realign, "align_tip" : align_tip, "align_pit" : align_pit, "anchor" : anchor, "spin" : spin, "atype" : atype, "_mat" : _mat, "_anchs" : _anchs, **kwargs}) class _path_add_jitter(_Bosl2Base): def __init__(self, path=None, dist=None, closed=None, **kwargs): super().__init__("_path_add_jitter", {"path" : path, "dist" : dist, "closed" : closed, **kwargs}) class teardrop2d(_Bosl2Base): def __init__(self, r=None, ang=None, cap_h=None, d=None, circum=None, realign=None, anchor=None, spin=None, bot_corner=None, _extrapt=None, **kwargs): super().__init__("teardrop2d", {"r" : r, "ang" : ang, "cap_h" : cap_h, "d" : d, "circum" : circum, "realign" : realign, "anchor" : anchor, "spin" : spin, "bot_corner" : bot_corner, "_extrapt" : _extrapt, **kwargs}) class egg(_Bosl2Base): def __init__(self, length=None, r1=None, r2=None, R=None, d1=None, d2=None, D=None, anchor=None, spin=None, **kwargs): super().__init__("egg", {"length" : length, "r1" : r1, "r2" : r2, "R" : R, "d1" : d1, "d2" : d2, "D" : D, "anchor" : anchor, "spin" : spin, **kwargs}) class ring(_Bosl2Base): def __init__(self, n=None, ring_width=None, r=None, r1=None, r2=None, angle=None, d=None, d1=None, d2=None, cp=None, points=None, corner=None, width=None, thickness=None, start=None, long=None, full=None, cw=None, ccw=None, **kwargs): super().__init__("ring", {"n" : n, "ring_width" : ring_width, "r" : r, "r1" : r1, "r2" : r2, "angle" : angle, "d" : d, "d1" : d1, "d2" : d2, "cp" : cp, "points" : points, "corner" : corner, "width" : width, "thickness" : thickness, "start" : start, "long" : long, "full" : full, "cw" : cw, "ccw" : ccw, **kwargs}) class glued_circles(_Bosl2Base): def __init__(self, r=None, spread=None, tangent=None, d=None, anchor=None, spin=None, **kwargs): super().__init__("glued_circles", {"r" : r, "spread" : spread, "tangent" : tangent, "d" : d, "anchor" : anchor, "spin" : spin, **kwargs}) class squircle(_Bosl2Base): def __init__(self, size=None, squareness=None, style=None, anchor=None, spin=None, atype=None, **kwargs): super().__init__("squircle", {"size" : size, "squareness" : squareness, "style" : style, "anchor" : anchor, "spin" : spin, "atype" : atype, **kwargs}) class _squircle_fg(_Bosl2Base): def __init__(self, size=None, squareness=None, **kwargs): super().__init__("_squircle_fg", {"size" : size, "squareness" : squareness, **kwargs}) class squircle_radius_fg(_Bosl2Base): def __init__(self, squareness=None, r=None, angle=None, **kwargs): super().__init__("squircle_radius_fg", {"squareness" : squareness, "r" : r, "angle" : angle, **kwargs}) class _linearize_squareness(_Bosl2Base): def __init__(self, s=None, **kwargs): super().__init__("_linearize_squareness", {"s" : s, **kwargs}) class _squircle_se(_Bosl2Base): def __init__(self, size=None, squareness=None, **kwargs): super().__init__("_squircle_se", {"size" : size, "squareness" : squareness, **kwargs}) class squircle_radius_se(_Bosl2Base): def __init__(self, n=None, r=None, angle=None, **kwargs): super().__init__("squircle_radius_se", {"n" : n, "r" : r, "angle" : angle, **kwargs}) class _squircle_se_exponent(_Bosl2Base): def __init__(self, squareness=None, **kwargs): super().__init__("_squircle_se_exponent", {"squareness" : squareness, **kwargs}) class _squircle_bz(_Bosl2Base): def __init__(self, size=None, squareness=None, **kwargs): super().__init__("_squircle_bz", {"size" : size, "squareness" : squareness, **kwargs}) class keyhole(_Bosl2Base): def __init__(self, l=None, r1=None, r2=None, shoulder_r=None, d1=None, d2=None, length=None, anchor=None, spin=None, **kwargs): super().__init__("keyhole", {"l" : l, "r1" : r1, "r2" : r2, "shoulder_r" : shoulder_r, "d1" : d1, "d2" : d2, "length" : length, "anchor" : anchor, "spin" : spin, **kwargs}) class reuleaux_polygon(_Bosl2Base): def __init__(self, n=None, r=None, d=None, anchor=None, spin=None, **kwargs): super().__init__("reuleaux_polygon", {"n" : n, "r" : r, "d" : d, "anchor" : anchor, "spin" : spin, **kwargs}) class supershape(_Bosl2Base): def __init__(self, step=None, n=None, m1=None, m2=None, n1=None, n2=None, n3=None, a=None, b=None, r=None, d=None, anchor=None, spin=None, atype=None, **kwargs): super().__init__("supershape", {"step" : step, "n" : n, "m1" : m1, "m2" : m2, "n1" : n1, "n2" : n2, "n3" : n3, "a" : a, "b" : b, "r" : r, "d" : d, "anchor" : anchor, "spin" : spin, "atype" : atype, **kwargs}) class _superformula(_Bosl2Base): def __init__(self, theta=None, m1=None, m2=None, n1=None, n2=None, n3=None, a=None, b=None, **kwargs): super().__init__("_superformula", {"theta" : theta, "m1" : m1, "m2" : m2, "n1" : n1, "n2" : n2, "n3" : n3, "a" : a, "b" : b, **kwargs}) class square(_Bosl2Base): def __init__(self, size=None, center=None, anchor=None, spin=None, **kwargs): super().__init__("square", {"size" : size, "center" : center, "anchor" : anchor, "spin" : spin, **kwargs}) class rect(_Bosl2Base): def __init__(self, size=None, rounding=None, atype=None, chamfer=None, anchor=None, spin=None, corner_flip=None, **kwargs): super().__init__("rect", {"size" : size, "rounding" : rounding, "atype" : atype, "chamfer" : chamfer, "anchor" : anchor, "spin" : spin, "corner_flip" : corner_flip, **kwargs}) class circle(_Bosl2Base): def __init__(self, r=None, d=None, points=None, corner=None, anchor=None, spin=None, **kwargs): super().__init__("circle", {"r" : r, "d" : d, "points" : points, "corner" : corner, "anchor" : anchor, "spin" : spin, **kwargs}) class ellipse(_Bosl2Base): def __init__(self, r=None, d=None, realign=None, circum=None, uniform=None, anchor=None, spin=None, **kwargs): super().__init__("ellipse", {"r" : r, "d" : d, "realign" : realign, "circum" : circum, "uniform" : uniform, "anchor" : anchor, "spin" : spin, **kwargs}) class regular_ngon(_Bosl2Base): def __init__(self, n=None, r=None, d=None, _or=None, od=None, ir=None, id=None, side=None, rounding=None, realign=None, align_tip=None, align_side=None, anchor=None, spin=None, **kwargs): super().__init__("regular_ngon", {"n" : n, "r" : r, "d" : d, "_or" : _or, "od" : od, "ir" : ir, "id" : id, "side" : side, "rounding" : rounding, "realign" : realign, "align_tip" : align_tip, "align_side" : align_side, "anchor" : anchor, "spin" : spin, **kwargs}) class pentagon(_Bosl2Base): def __init__(self, r=None, d=None, _or=None, od=None, ir=None, id=None, side=None, rounding=None, realign=None, align_tip=None, align_side=None, anchor=None, spin=None, **kwargs): super().__init__("pentagon", {"r" : r, "d" : d, "_or" : _or, "od" : od, "ir" : ir, "id" : id, "side" : side, "rounding" : rounding, "realign" : realign, "align_tip" : align_tip, "align_side" : align_side, "anchor" : anchor, "spin" : spin, **kwargs}) class hexagon(_Bosl2Base): def __init__(self, r=None, d=None, _or=None, od=None, ir=None, id=None, side=None, rounding=None, realign=None, align_tip=None, align_side=None, anchor=None, spin=None, **kwargs): super().__init__("hexagon", {"r" : r, "d" : d, "_or" : _or, "od" : od, "ir" : ir, "id" : id, "side" : side, "rounding" : rounding, "realign" : realign, "align_tip" : align_tip, "align_side" : align_side, "anchor" : anchor, "spin" : spin, **kwargs}) class octagon(_Bosl2Base): def __init__(self, r=None, d=None, _or=None, od=None, ir=None, id=None, side=None, rounding=None, realign=None, align_tip=None, align_side=None, anchor=None, spin=None, **kwargs): super().__init__("octagon", {"r" : r, "d" : d, "_or" : _or, "od" : od, "ir" : ir, "id" : id, "side" : side, "rounding" : rounding, "realign" : realign, "align_tip" : align_tip, "align_side" : align_side, "anchor" : anchor, "spin" : spin, **kwargs}) class right_triangle(_Bosl2Base): def __init__(self, size=None, center=None, anchor=None, spin=None, **kwargs): super().__init__("right_triangle", {"size" : size, "center" : center, "anchor" : anchor, "spin" : spin, **kwargs}) class trapezoid(_Bosl2Base): def __init__(self, h=None, w1=None, w2=None, ang=None, shift=None, chamfer=None, rounding=None, flip=None, anchor=None, spin=None, atype=None, angle=None, **kwargs): super().__init__("trapezoid", {"h" : h, "w1" : w1, "w2" : w2, "ang" : ang, "shift" : shift, "chamfer" : chamfer, "rounding" : rounding, "flip" : flip, "anchor" : anchor, "spin" : spin, "atype" : atype, "angle" : angle, **kwargs}) class star(_Bosl2Base): def __init__(self, n=None, r=None, ir=None, d=None, _or=None, od=None, id=None, step=None, realign=None, align_tip=None, align_pit=None, anchor=None, spin=None, atype=None, **kwargs): super().__init__("star", {"n" : n, "r" : r, "ir" : ir, "d" : d, "_or" : _or, "od" : od, "id" : id, "step" : step, "realign" : realign, "align_tip" : align_tip, "align_pit" : align_pit, "anchor" : anchor, "spin" : spin, "atype" : atype, **kwargs}) class jittered_poly(_Bosl2Base): def __init__(self, path=None, dist=None, **kwargs): super().__init__("jittered_poly", {"path" : path, "dist" : dist, **kwargs}) class teardrop2d(_Bosl2Base): def __init__(self, r=None, ang=None, cap_h=None, d=None, circum=None, realign=None, bot_corner=None, anchor=None, spin=None, **kwargs): super().__init__("teardrop2d", {"r" : r, "ang" : ang, "cap_h" : cap_h, "d" : d, "circum" : circum, "realign" : realign, "bot_corner" : bot_corner, "anchor" : anchor, "spin" : spin, **kwargs}) class egg(_Bosl2Base): def __init__(self, length=None, r1=None, r2=None, R=None, d1=None, d2=None, D=None, anchor=None, spin=None, **kwargs): super().__init__("egg", {"length" : length, "r1" : r1, "r2" : r2, "R" : R, "d1" : d1, "d2" : d2, "D" : D, "anchor" : anchor, "spin" : spin, **kwargs}) class ring(_Bosl2Base): def __init__(self, n=None, ring_width=None, r=None, r1=None, r2=None, angle=None, d=None, d1=None, d2=None, cp=None, points=None, corner=None, width=None, thickness=None, start=None, long=None, full=None, cw=None, ccw=None, anchor=None, spin=None, **kwargs): super().__init__("ring", {"n" : n, "ring_width" : ring_width, "r" : r, "r1" : r1, "r2" : r2, "angle" : angle, "d" : d, "d1" : d1, "d2" : d2, "cp" : cp, "points" : points, "corner" : corner, "width" : width, "thickness" : thickness, "start" : start, "long" : long, "full" : full, "cw" : cw, "ccw" : ccw, "anchor" : anchor, "spin" : spin, **kwargs}) class glued_circles(_Bosl2Base): def __init__(self, r=None, spread=None, tangent=None, d=None, anchor=None, spin=None, **kwargs): super().__init__("glued_circles", {"r" : r, "spread" : spread, "tangent" : tangent, "d" : d, "anchor" : anchor, "spin" : spin, **kwargs}) class squircle(_Bosl2Base): def __init__(self, size=None, squareness=None, style=None, anchor=None, spin=None, atype=None, **kwargs): super().__init__("squircle", {"size" : size, "squareness" : squareness, "style" : style, "anchor" : anchor, "spin" : spin, "atype" : atype, **kwargs}) class keyhole(_Bosl2Base): def __init__(self, l=None, r1=None, r2=None, shoulder_r=None, d1=None, d2=None, length=None, anchor=None, spin=None, **kwargs): super().__init__("keyhole", {"l" : l, "r1" : r1, "r2" : r2, "shoulder_r" : shoulder_r, "d1" : d1, "d2" : d2, "length" : length, "anchor" : anchor, "spin" : spin, **kwargs}) class reuleaux_polygon(_Bosl2Base): def __init__(self, n=None, r=None, d=None, anchor=None, spin=None, **kwargs): super().__init__("reuleaux_polygon", {"n" : n, "r" : r, "d" : d, "anchor" : anchor, "spin" : spin, **kwargs}) class supershape(_Bosl2Base): def __init__(self, step=None, n=None, m1=None, m2=None, n1=None, n2=None, n3=None, a=None, b=None, r=None, d=None, anchor=None, spin=None, atype=None, **kwargs): super().__init__("supershape", {"step" : step, "n" : n, "m1" : m1, "m2" : m2, "n1" : n1, "n2" : n2, "n3" : n3, "a" : a, "b" : b, "r" : r, "d" : d, "anchor" : anchor, "spin" : spin, "atype" : atype, **kwargs}) class text(_Bosl2Base): def __init__(self, text=None, size=None, font=None, halign=None, valign=None, spacing=None, direction=None, language=None, script=None, anchor=None, spin=None, **kwargs): super().__init__("text", {"text" : text, "size" : size, "font" : font, "halign" : halign, "valign" : valign, "spacing" : spacing, "direction" : direction, "language" : language, "script" : script, "anchor" : anchor, "spin" : spin, **kwargs}) class round2d(_Bosl2Base): def __init__(self, r=None, _or=None, ir=None, **kwargs): super().__init__("round2d", {"r" : r, "_or" : _or, "ir" : ir, **kwargs}) class shell2d(_Bosl2Base): def __init__(self, thickness=None, _or=None, ir=None, **kwargs): super().__init__("shell2d", {"thickness" : thickness, "_or" : _or, "ir" : ir, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/shapes3d.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/shapes3d.scad'}", False) class cube(_Bosl2Base): def __init__(self, size=None, center=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cube", {"size" : size, "center" : center, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class cuboid(_Bosl2Base): def __init__(self, size=None, p1=None, p2=None, chamfer=None, rounding=None, edges=None, except_edges=None, trimcorners=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cuboid", {"size" : size, "p1" : p1, "p2" : p2, "chamfer" : chamfer, "rounding" : rounding, "edges" : edges, "except_edges" : except_edges, "trimcorners" : trimcorners, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class prismoid(_Bosl2Base): def __init__(self, size1=None, size2=None, h=None, shift=None, rounding=None, rounding1=None, rounding2=None, chamfer=None, chamfer1=None, chamfer2=None, l=None, height=None, length=None, center=None, anchor=None, spin=None, orient=None, xang=None, yang=None, _return_dim=None, **kwargs): super().__init__("prismoid", {"size1" : size1, "size2" : size2, "h" : h, "shift" : shift, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "l" : l, "height" : height, "length" : length, "center" : center, "anchor" : anchor, "spin" : spin, "orient" : orient, "xang" : xang, "yang" : yang, "_return_dim" : _return_dim, **kwargs}) class regular_prism(_Bosl2Base): def __init__(self, n=None, h=None, r=None, center=None, l=None, length=None, height=None, r1=None, r2=None, ir=None, ir1=None, ir2=None, _or=None, or1=None, or2=None, side=None, side1=None, side2=None, d=None, d1=None, d2=None, id=None, id1=None, id2=None, od=None, od1=None, od2=None, chamfer=None, chamfer1=None, chamfer2=None, chamfang=None, chamfang1=None, chamfang2=None, rounding=None, rounding1=None, rounding2=None, circum=None, realign=None, shift=None, teardrop=None, clip_angle=None, from_end=None, from_end1=None, from_end2=None, texture=None, tex_size=None, tex_reps=None, tex_inset=None, tex_rot=None, tex_depth=None, tex_samples=None, tex_taper=None, style=None, anchor=None, spin=None, orient=None, _return_anchors=None, **kwargs): super().__init__("regular_prism", {"n" : n, "h" : h, "r" : r, "center" : center, "l" : l, "length" : length, "height" : height, "r1" : r1, "r2" : r2, "ir" : ir, "ir1" : ir1, "ir2" : ir2, "_or" : _or, "or1" : or1, "or2" : or2, "side" : side, "side1" : side1, "side2" : side2, "d" : d, "d1" : d1, "d2" : d2, "id" : id, "id1" : id1, "id2" : id2, "od" : od, "od1" : od1, "od2" : od2, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "chamfang" : chamfang, "chamfang1" : chamfang1, "chamfang2" : chamfang2, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "circum" : circum, "realign" : realign, "shift" : shift, "teardrop" : teardrop, "clip_angle" : clip_angle, "from_end" : from_end, "from_end1" : from_end1, "from_end2" : from_end2, "texture" : texture, "tex_size" : tex_size, "tex_reps" : tex_reps, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "tex_depth" : tex_depth, "tex_samples" : tex_samples, "tex_taper" : tex_taper, "style" : style, "anchor" : anchor, "spin" : spin, "orient" : orient, "_return_anchors" : _return_anchors, **kwargs}) class textured_tile(_Bosl2Base): def __init__(self, texture=None, size=None, ysize=None, height=None, w1=None, w2=None, ang=None, h=None, shift=None, thickness=None, tex_size=None, tex_reps=None, tex_inset=None, tex_rot=None, tex_depth=None, style=None, atype=None, tex_extra=None, tex_skip=None, anchor=None, spin=None, orient=None, _return_anchor=None, **kwargs): super().__init__("textured_tile", {"texture" : texture, "size" : size, "ysize" : ysize, "height" : height, "w1" : w1, "w2" : w2, "ang" : ang, "h" : h, "shift" : shift, "thickness" : thickness, "tex_size" : tex_size, "tex_reps" : tex_reps, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "tex_depth" : tex_depth, "style" : style, "atype" : atype, "tex_extra" : tex_extra, "tex_skip" : tex_skip, "anchor" : anchor, "spin" : spin, "orient" : orient, "_return_anchor" : _return_anchor, **kwargs}) class _rect_tube_rounding(_Bosl2Base): def __init__(self, factor=None, ir=None, r=None, alternative=None, size=None, isize=None, **kwargs): super().__init__("_rect_tube_rounding", {"factor" : factor, "ir" : ir, "r" : r, "alternative" : alternative, "size" : size, "isize" : isize, **kwargs}) class rect_tube(_Bosl2Base): def __init__(self, h=None, size=None, isize=None, center=None, shift=None, wall=None, size1=None, size2=None, isize1=None, isize2=None, rounding=None, rounding1=None, rounding2=None, irounding=None, irounding1=None, irounding2=None, chamfer=None, chamfer1=None, chamfer2=None, ichamfer=None, ichamfer1=None, ichamfer2=None, anchor=None, spin=None, orient=None, l=None, length=None, height=None, **kwargs): super().__init__("rect_tube", {"h" : h, "size" : size, "isize" : isize, "center" : center, "shift" : shift, "wall" : wall, "size1" : size1, "size2" : size2, "isize1" : isize1, "isize2" : isize2, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "irounding" : irounding, "irounding1" : irounding1, "irounding2" : irounding2, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "ichamfer" : ichamfer, "ichamfer1" : ichamfer1, "ichamfer2" : ichamfer2, "anchor" : anchor, "spin" : spin, "orient" : orient, "l" : l, "length" : length, "height" : height, **kwargs}) class wedge(_Bosl2Base): def __init__(self, size=None, center=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("wedge", {"size" : size, "center" : center, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class octahedron(_Bosl2Base): def __init__(self, size=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("octahedron", {"size" : size, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class cylinder(_Bosl2Base): def __init__(self, h=None, r1=None, r2=None, center=None, r=None, d=None, d1=None, d2=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cylinder", {"h" : h, "r1" : r1, "r2" : r2, "center" : center, "r" : r, "d" : d, "d1" : d1, "d2" : d2, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class _cyl_path(_Bosl2Base): def __init__(self, r1=None, r2=None, l=None, chamfer=None, chamfer1=None, chamfer2=None, chamfang=None, chamfang1=None, chamfang2=None, rounding=None, rounding1=None, rounding2=None, from_end=None, from_end1=None, from_end2=None, teardrop=None, clip_angle=None, n=None, noscale=None, **kwargs): super().__init__("_cyl_path", {"r1" : r1, "r2" : r2, "l" : l, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "chamfang" : chamfang, "chamfang1" : chamfang1, "chamfang2" : chamfang2, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "from_end" : from_end, "from_end1" : from_end1, "from_end2" : from_end2, "teardrop" : teardrop, "clip_angle" : clip_angle, "n" : n, "noscale" : noscale, **kwargs}) class cyl(_Bosl2Base): def __init__(self, h=None, r=None, center=None, l=None, r1=None, r2=None, d=None, d1=None, d2=None, length=None, height=None, chamfer=None, chamfer1=None, chamfer2=None, chamfang=None, chamfang1=None, chamfang2=None, rounding=None, rounding1=None, rounding2=None, circum=None, realign=None, shift=None, teardrop=None, clip_angle=None, from_end=None, from_end1=None, from_end2=None, texture=None, tex_size=None, tex_reps=None, tex_counts=None, tex_inset=None, tex_rot=None, tex_scale=None, tex_depth=None, tex_samples=None, tex_taper=None, style=None, tex_style=None, extra=None, extra1=None, extra2=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cyl", {"h" : h, "r" : r, "center" : center, "l" : l, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "length" : length, "height" : height, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "chamfang" : chamfang, "chamfang1" : chamfang1, "chamfang2" : chamfang2, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "circum" : circum, "realign" : realign, "shift" : shift, "teardrop" : teardrop, "clip_angle" : clip_angle, "from_end" : from_end, "from_end1" : from_end1, "from_end2" : from_end2, "texture" : texture, "tex_size" : tex_size, "tex_reps" : tex_reps, "tex_counts" : tex_counts, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "tex_scale" : tex_scale, "tex_depth" : tex_depth, "tex_samples" : tex_samples, "tex_taper" : tex_taper, "style" : style, "tex_style" : tex_style, "extra" : extra, "extra1" : extra1, "extra2" : extra2, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class _teardrop_corner(_Bosl2Base): def __init__(self, r=None, corner=None, ang=None, **kwargs): super().__init__("_teardrop_corner", {"r" : r, "corner" : corner, "ang" : ang, **kwargs}) class _clipped_corner(_Bosl2Base): def __init__(self, r=None, corner=None, ang=None, **kwargs): super().__init__("_clipped_corner", {"r" : r, "corner" : corner, "ang" : ang, **kwargs}) class xcyl(_Bosl2Base): def __init__(self, h=None, r=None, d=None, r1=None, r2=None, d1=None, d2=None, l=None, chamfer=None, chamfer1=None, chamfer2=None, chamfang=None, chamfang1=None, chamfang2=None, rounding=None, rounding1=None, rounding2=None, circum=None, realign=None, from_end=None, length=None, height=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("xcyl", {"h" : h, "r" : r, "d" : d, "r1" : r1, "r2" : r2, "d1" : d1, "d2" : d2, "l" : l, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "chamfang" : chamfang, "chamfang1" : chamfang1, "chamfang2" : chamfang2, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "circum" : circum, "realign" : realign, "from_end" : from_end, "length" : length, "height" : height, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class ycyl(_Bosl2Base): def __init__(self, h=None, r=None, d=None, r1=None, r2=None, d1=None, d2=None, l=None, chamfer=None, chamfer1=None, chamfer2=None, chamfang=None, chamfang1=None, chamfang2=None, rounding=None, rounding1=None, rounding2=None, circum=None, realign=None, from_end=None, height=None, length=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("ycyl", {"h" : h, "r" : r, "d" : d, "r1" : r1, "r2" : r2, "d1" : d1, "d2" : d2, "l" : l, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "chamfang" : chamfang, "chamfang1" : chamfang1, "chamfang2" : chamfang2, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "circum" : circum, "realign" : realign, "from_end" : from_end, "height" : height, "length" : length, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class zcyl(_Bosl2Base): def __init__(self, h=None, r=None, d=None, r1=None, r2=None, d1=None, d2=None, l=None, chamfer=None, chamfer1=None, chamfer2=None, chamfang=None, chamfang1=None, chamfang2=None, rounding=None, rounding1=None, rounding2=None, circum=None, realign=None, from_end=None, length=None, height=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("zcyl", {"h" : h, "r" : r, "d" : d, "r1" : r1, "r2" : r2, "d1" : d1, "d2" : d2, "l" : l, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "chamfang" : chamfang, "chamfang1" : chamfang1, "chamfang2" : chamfang2, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "circum" : circum, "realign" : realign, "from_end" : from_end, "length" : length, "height" : height, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class tube(_Bosl2Base): def __init__(self, h=None, _or=None, ir=None, center=None, od=None, id=None, wall=None, or1=None, or2=None, od1=None, od2=None, ir1=None, ir2=None, id1=None, id2=None, realign=None, l=None, length=None, height=None, anchor=None, spin=None, orient=None, orounding1=None, irounding1=None, orounding2=None, irounding2=None, rounding1=None, rounding2=None, rounding=None, ochamfer1=None, ichamfer1=None, ochamfer2=None, ichamfer2=None, chamfer1=None, chamfer2=None, chamfer=None, irounding=None, ichamfer=None, orounding=None, ochamfer=None, teardrop=None, clip_angle=None, shift=None, ifn=None, rounding_fn=None, circum=None, **kwargs): super().__init__("tube", {"h" : h, "_or" : _or, "ir" : ir, "center" : center, "od" : od, "id" : id, "wall" : wall, "or1" : or1, "or2" : or2, "od1" : od1, "od2" : od2, "ir1" : ir1, "ir2" : ir2, "id1" : id1, "id2" : id2, "realign" : realign, "l" : l, "length" : length, "height" : height, "anchor" : anchor, "spin" : spin, "orient" : orient, "orounding1" : orounding1, "irounding1" : irounding1, "orounding2" : orounding2, "irounding2" : irounding2, "rounding1" : rounding1, "rounding2" : rounding2, "rounding" : rounding, "ochamfer1" : ochamfer1, "ichamfer1" : ichamfer1, "ochamfer2" : ochamfer2, "ichamfer2" : ichamfer2, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "chamfer" : chamfer, "irounding" : irounding, "ichamfer" : ichamfer, "orounding" : orounding, "ochamfer" : ochamfer, "teardrop" : teardrop, "clip_angle" : clip_angle, "shift" : shift, "ifn" : ifn, "rounding_fn" : rounding_fn, "circum" : circum, **kwargs}) class pie_slice(_Bosl2Base): def __init__(self, h=None, r=None, ang=None, center=None, r1=None, r2=None, d=None, d1=None, d2=None, l=None, length=None, height=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("pie_slice", {"h" : h, "r" : r, "ang" : ang, "center" : center, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "l" : l, "length" : length, "height" : height, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class sphere(_Bosl2Base): def __init__(self, r=None, d=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("sphere", {"r" : r, "d" : d, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class _subsample_triangle(_Bosl2Base): def __init__(self, p=None, N=None, **kwargs): super().__init__("_subsample_triangle", {"p" : p, "N" : N, **kwargs}) class _dual_vertices(_Bosl2Base): def __init__(self, vnf=None, **kwargs): super().__init__("_dual_vertices", {"vnf" : vnf, **kwargs}) class spheroid(_Bosl2Base): def __init__(self, r=None, style=None, d=None, circum=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("spheroid", {"r" : r, "style" : style, "d" : d, "circum" : circum, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class torus(_Bosl2Base): def __init__(self, r_maj=None, r_min=None, center=None, d_maj=None, d_min=None, _or=None, od=None, ir=None, id=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("torus", {"r_maj" : r_maj, "r_min" : r_min, "center" : center, "d_maj" : d_maj, "d_min" : d_min, "_or" : _or, "od" : od, "ir" : ir, "id" : id, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class teardrop(_Bosl2Base): def __init__(self, h=None, r=None, ang=None, cap_h=None, r1=None, r2=None, d=None, d1=None, d2=None, cap_h1=None, cap_h2=None, chamfer=None, chamfer1=None, chamfer2=None, circum=None, realign=None, bot_corner1=None, bot_corner2=None, bot_corner=None, l=None, length=None, height=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("teardrop", {"h" : h, "r" : r, "ang" : ang, "cap_h" : cap_h, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "cap_h1" : cap_h1, "cap_h2" : cap_h2, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "circum" : circum, "realign" : realign, "bot_corner1" : bot_corner1, "bot_corner2" : bot_corner2, "bot_corner" : bot_corner, "l" : l, "length" : length, "height" : height, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class onion(_Bosl2Base): def __init__(self, r=None, ang=None, cap_h=None, d=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("onion", {"r" : r, "ang" : ang, "cap_h" : cap_h, "d" : d, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class _cut_interp(_Bosl2Base): def __init__(self, pathcut=None, path=None, data=None, **kwargs): super().__init__("_cut_interp", {"pathcut" : pathcut, "path" : path, "data" : data, **kwargs}) class fillet(_Bosl2Base): def __init__(self, l=None, r=None, ang=None, r1=None, r2=None, d=None, d1=None, d2=None, excess=None, anchor=None, spin=None, orient=None, h=None, height=None, length=None, **kwargs): super().__init__("fillet", {"l" : l, "r" : r, "ang" : ang, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "excess" : excess, "anchor" : anchor, "spin" : spin, "orient" : orient, "h" : h, "height" : height, "length" : length, **kwargs}) class plot3d(_Bosl2Base): def __init__(self, f=None, x=None, y=None, zclip=None, zspan=None, base=None, anchor=None, orient=None, spin=None, atype=None, cp=None, style=None, **kwargs): super().__init__("plot3d", {"f" : f, "x" : x, "y" : y, "zclip" : zclip, "zspan" : zspan, "base" : base, "anchor" : anchor, "orient" : orient, "spin" : spin, "atype" : atype, "cp" : cp, "style" : style, **kwargs}) class plot_revolution(_Bosl2Base): def __init__(self, f=None, angle=None, z=None, arclength=None, path=None, rclip=None, rspan=None, horiz=None, r1=None, r2=None, r=None, d1=None, d2=None, d=None, anchor=None, orient=None, spin=None, atype=None, cp=None, style=None, reverse=None, **kwargs): super().__init__("plot_revolution", {"f" : f, "angle" : angle, "z" : z, "arclength" : arclength, "path" : path, "rclip" : rclip, "rspan" : rspan, "horiz" : horiz, "r1" : r1, "r2" : r2, "r" : r, "d1" : d1, "d2" : d2, "d" : d, "anchor" : anchor, "orient" : orient, "spin" : spin, "atype" : atype, "cp" : cp, "style" : style, "reverse" : reverse, **kwargs}) class heightfield(_Bosl2Base): def __init__(self, data=None, size=None, bottom=None, maxz=None, xrange=None, yrange=None, style=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("heightfield", {"data" : data, "size" : size, "bottom" : bottom, "maxz" : maxz, "xrange" : xrange, "yrange" : yrange, "style" : style, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class cylindrical_heightfield(_Bosl2Base): def __init__(self, data=None, l=None, r=None, base=None, transpose=None, aspect=None, style=None, maxh=None, xrange=None, yrange=None, r1=None, r2=None, d=None, d1=None, d2=None, h=None, height=None, length=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cylindrical_heightfield", {"data" : data, "l" : l, "r" : r, "base" : base, "transpose" : transpose, "aspect" : aspect, "style" : style, "maxh" : maxh, "xrange" : xrange, "yrange" : yrange, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "h" : h, "height" : height, "length" : length, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class cube(_Bosl2Base): def __init__(self, size=None, center=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cube", {"size" : size, "center" : center, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class cuboid(_Bosl2Base): def __init__(self, size=None, p1=None, p2=None, chamfer=None, rounding=None, edges=None, _except=None, except_edges=None, trimcorners=None, teardrop=None, clip_angle=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cuboid", {"size" : size, "p1" : p1, "p2" : p2, "chamfer" : chamfer, "rounding" : rounding, "edges" : edges, "_except" : _except, "except_edges" : except_edges, "trimcorners" : trimcorners, "teardrop" : teardrop, "clip_angle" : clip_angle, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class prismoid(_Bosl2Base): def __init__(self, size1=None, size2=None, h=None, shift=None, xang=None, yang=None, rounding=None, rounding1=None, rounding2=None, chamfer=None, chamfer1=None, chamfer2=None, l=None, height=None, length=None, center=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("prismoid", {"size1" : size1, "size2" : size2, "h" : h, "shift" : shift, "xang" : xang, "yang" : yang, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "l" : l, "height" : height, "length" : length, "center" : center, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class regular_prism(_Bosl2Base): def __init__(self, n=None, h=None, r=None, center=None, l=None, length=None, height=None, r1=None, r2=None, ir=None, ir1=None, ir2=None, _or=None, or1=None, or2=None, side=None, side1=None, side2=None, d=None, d1=None, d2=None, id=None, id1=None, id2=None, od=None, od1=None, od2=None, chamfer=None, chamfer1=None, chamfer2=None, chamfang=None, chamfang1=None, chamfang2=None, rounding=None, rounding1=None, rounding2=None, realign=None, shift=None, teardrop=None, clip_angle=None, from_end=None, from_end1=None, from_end2=None, texture=None, tex_size=None, tex_reps=None, tex_inset=None, tex_rot=None, tex_depth=None, tex_samples=None, tex_taper=None, style=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("regular_prism", {"n" : n, "h" : h, "r" : r, "center" : center, "l" : l, "length" : length, "height" : height, "r1" : r1, "r2" : r2, "ir" : ir, "ir1" : ir1, "ir2" : ir2, "_or" : _or, "or1" : or1, "or2" : or2, "side" : side, "side1" : side1, "side2" : side2, "d" : d, "d1" : d1, "d2" : d2, "id" : id, "id1" : id1, "id2" : id2, "od" : od, "od1" : od1, "od2" : od2, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "chamfang" : chamfang, "chamfang1" : chamfang1, "chamfang2" : chamfang2, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "realign" : realign, "shift" : shift, "teardrop" : teardrop, "clip_angle" : clip_angle, "from_end" : from_end, "from_end1" : from_end1, "from_end2" : from_end2, "texture" : texture, "tex_size" : tex_size, "tex_reps" : tex_reps, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "tex_depth" : tex_depth, "tex_samples" : tex_samples, "tex_taper" : tex_taper, "style" : style, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class textured_tile(_Bosl2Base): def __init__(self, texture=None, size=None, ysize=None, height=None, w1=None, w2=None, ang=None, h=None, shift=None, tex_size=None, tex_reps=None, tex_inset=None, tex_rot=None, tex_depth=None, diff=None, tex_extra=None, tex_skip=None, style=None, atype=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("textured_tile", {"texture" : texture, "size" : size, "ysize" : ysize, "height" : height, "w1" : w1, "w2" : w2, "ang" : ang, "h" : h, "shift" : shift, "tex_size" : tex_size, "tex_reps" : tex_reps, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "tex_depth" : tex_depth, "diff" : diff, "tex_extra" : tex_extra, "tex_skip" : tex_skip, "style" : style, "atype" : atype, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class rect_tube(_Bosl2Base): def __init__(self, h=None, size=None, isize=None, center=None, shift=None, wall=None, size1=None, size2=None, isize1=None, isize2=None, rounding=None, rounding1=None, rounding2=None, irounding=None, irounding1=None, irounding2=None, chamfer=None, chamfer1=None, chamfer2=None, ichamfer=None, ichamfer1=None, ichamfer2=None, anchor=None, spin=None, orient=None, l=None, length=None, height=None, **kwargs): super().__init__("rect_tube", {"h" : h, "size" : size, "isize" : isize, "center" : center, "shift" : shift, "wall" : wall, "size1" : size1, "size2" : size2, "isize1" : isize1, "isize2" : isize2, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "irounding" : irounding, "irounding1" : irounding1, "irounding2" : irounding2, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "ichamfer" : ichamfer, "ichamfer1" : ichamfer1, "ichamfer2" : ichamfer2, "anchor" : anchor, "spin" : spin, "orient" : orient, "l" : l, "length" : length, "height" : height, **kwargs}) class wedge(_Bosl2Base): def __init__(self, size=None, center=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("wedge", {"size" : size, "center" : center, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class octahedron(_Bosl2Base): def __init__(self, size=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("octahedron", {"size" : size, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class cylinder(_Bosl2Base): def __init__(self, h=None, r1=None, r2=None, center=None, r=None, d=None, d1=None, d2=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cylinder", {"h" : h, "r1" : r1, "r2" : r2, "center" : center, "r" : r, "d" : d, "d1" : d1, "d2" : d2, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class cyl(_Bosl2Base): def __init__(self, h=None, r=None, center=None, l=None, r1=None, r2=None, d=None, d1=None, d2=None, chamfer=None, chamfer1=None, chamfer2=None, chamfang=None, chamfang1=None, chamfang2=None, rounding=None, rounding1=None, rounding2=None, circum=None, realign=None, shift=None, teardrop=None, clip_angle=None, from_end=None, from_end1=None, from_end2=None, texture=None, tex_size=None, tex_reps=None, tex_counts=None, tex_inset=None, tex_rot=None, tex_scale=None, tex_depth=None, tex_samples=None, length=None, height=None, tex_taper=None, style=None, tex_style=None, extra=None, extra1=None, extra2=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cyl", {"h" : h, "r" : r, "center" : center, "l" : l, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "chamfang" : chamfang, "chamfang1" : chamfang1, "chamfang2" : chamfang2, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "circum" : circum, "realign" : realign, "shift" : shift, "teardrop" : teardrop, "clip_angle" : clip_angle, "from_end" : from_end, "from_end1" : from_end1, "from_end2" : from_end2, "texture" : texture, "tex_size" : tex_size, "tex_reps" : tex_reps, "tex_counts" : tex_counts, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "tex_scale" : tex_scale, "tex_depth" : tex_depth, "tex_samples" : tex_samples, "length" : length, "height" : height, "tex_taper" : tex_taper, "style" : style, "tex_style" : tex_style, "extra" : extra, "extra1" : extra1, "extra2" : extra2, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class xcyl(_Bosl2Base): def __init__(self, h=None, r=None, d=None, r1=None, r2=None, d1=None, d2=None, l=None, chamfer=None, chamfer1=None, chamfer2=None, chamfang=None, chamfang1=None, chamfang2=None, rounding=None, rounding1=None, rounding2=None, circum=None, realign=None, from_end=None, length=None, height=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("xcyl", {"h" : h, "r" : r, "d" : d, "r1" : r1, "r2" : r2, "d1" : d1, "d2" : d2, "l" : l, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "chamfang" : chamfang, "chamfang1" : chamfang1, "chamfang2" : chamfang2, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "circum" : circum, "realign" : realign, "from_end" : from_end, "length" : length, "height" : height, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class ycyl(_Bosl2Base): def __init__(self, h=None, r=None, d=None, r1=None, r2=None, d1=None, d2=None, l=None, chamfer=None, chamfer1=None, chamfer2=None, chamfang=None, chamfang1=None, chamfang2=None, rounding=None, rounding1=None, rounding2=None, circum=None, realign=None, from_end=None, height=None, length=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("ycyl", {"h" : h, "r" : r, "d" : d, "r1" : r1, "r2" : r2, "d1" : d1, "d2" : d2, "l" : l, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "chamfang" : chamfang, "chamfang1" : chamfang1, "chamfang2" : chamfang2, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "circum" : circum, "realign" : realign, "from_end" : from_end, "height" : height, "length" : length, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class zcyl(_Bosl2Base): def __init__(self, h=None, r=None, d=None, r1=None, r2=None, d1=None, d2=None, l=None, chamfer=None, chamfer1=None, chamfer2=None, chamfang=None, chamfang1=None, chamfang2=None, rounding=None, rounding1=None, rounding2=None, circum=None, realign=None, from_end=None, length=None, height=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("zcyl", {"h" : h, "r" : r, "d" : d, "r1" : r1, "r2" : r2, "d1" : d1, "d2" : d2, "l" : l, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "chamfang" : chamfang, "chamfang1" : chamfang1, "chamfang2" : chamfang2, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "circum" : circum, "realign" : realign, "from_end" : from_end, "length" : length, "height" : height, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class tube(_Bosl2Base): def __init__(self, h=None, _or=None, ir=None, center=None, od=None, id=None, wall=None, or1=None, or2=None, od1=None, od2=None, ir1=None, ir2=None, id1=None, id2=None, realign=None, l=None, length=None, height=None, anchor=None, spin=None, orient=None, orounding1=None, irounding1=None, orounding2=None, irounding2=None, rounding1=None, rounding2=None, rounding=None, ochamfer1=None, ichamfer1=None, ochamfer2=None, ichamfer2=None, chamfer1=None, chamfer2=None, chamfer=None, irounding=None, ichamfer=None, orounding=None, ochamfer=None, teardrop=None, clip_angle=None, shift=None, ifn=None, rounding_fn=None, circum=None, **kwargs): super().__init__("tube", {"h" : h, "_or" : _or, "ir" : ir, "center" : center, "od" : od, "id" : id, "wall" : wall, "or1" : or1, "or2" : or2, "od1" : od1, "od2" : od2, "ir1" : ir1, "ir2" : ir2, "id1" : id1, "id2" : id2, "realign" : realign, "l" : l, "length" : length, "height" : height, "anchor" : anchor, "spin" : spin, "orient" : orient, "orounding1" : orounding1, "irounding1" : irounding1, "orounding2" : orounding2, "irounding2" : irounding2, "rounding1" : rounding1, "rounding2" : rounding2, "rounding" : rounding, "ochamfer1" : ochamfer1, "ichamfer1" : ichamfer1, "ochamfer2" : ochamfer2, "ichamfer2" : ichamfer2, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "chamfer" : chamfer, "irounding" : irounding, "ichamfer" : ichamfer, "orounding" : orounding, "ochamfer" : ochamfer, "teardrop" : teardrop, "clip_angle" : clip_angle, "shift" : shift, "ifn" : ifn, "rounding_fn" : rounding_fn, "circum" : circum, **kwargs}) class pie_slice(_Bosl2Base): def __init__(self, h=None, r=None, ang=None, center=None, r1=None, r2=None, d=None, d1=None, d2=None, l=None, length=None, height=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("pie_slice", {"h" : h, "r" : r, "ang" : ang, "center" : center, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "l" : l, "length" : length, "height" : height, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class sphere(_Bosl2Base): def __init__(self, r=None, d=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("sphere", {"r" : r, "d" : d, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class spheroid(_Bosl2Base): def __init__(self, r=None, style=None, d=None, circum=None, dual=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("spheroid", {"r" : r, "style" : style, "d" : d, "circum" : circum, "dual" : dual, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class torus(_Bosl2Base): def __init__(self, r_maj=None, r_min=None, center=None, d_maj=None, d_min=None, _or=None, od=None, ir=None, id=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("torus", {"r_maj" : r_maj, "r_min" : r_min, "center" : center, "d_maj" : d_maj, "d_min" : d_min, "_or" : _or, "od" : od, "ir" : ir, "id" : id, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class teardrop(_Bosl2Base): def __init__(self, h=None, r=None, ang=None, cap_h=None, r1=None, r2=None, d=None, d1=None, d2=None, cap_h1=None, cap_h2=None, l=None, length=None, height=None, circum=None, realign=None, chamfer=None, chamfer1=None, chamfer2=None, anchor=None, spin=None, orient=None, bot_corner1=None, bot_corner2=None, bot_corner=None, **kwargs): super().__init__("teardrop", {"h" : h, "r" : r, "ang" : ang, "cap_h" : cap_h, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "cap_h1" : cap_h1, "cap_h2" : cap_h2, "l" : l, "length" : length, "height" : height, "circum" : circum, "realign" : realign, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, "anchor" : anchor, "spin" : spin, "orient" : orient, "bot_corner1" : bot_corner1, "bot_corner2" : bot_corner2, "bot_corner" : bot_corner, **kwargs}) class onion(_Bosl2Base): def __init__(self, r=None, ang=None, cap_h=None, d=None, circum=None, realign=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("onion", {"r" : r, "ang" : ang, "cap_h" : cap_h, "d" : d, "circum" : circum, "realign" : realign, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class text3d(_Bosl2Base): def __init__(self, text=None, h=None, size=None, font=None, spacing=None, direction=None, language=None, script=None, height=None, thickness=None, atype=None, center=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("text3d", {"text" : text, "h" : h, "size" : size, "font" : font, "spacing" : spacing, "direction" : direction, "language" : language, "script" : script, "height" : height, "thickness" : thickness, "atype" : atype, "center" : center, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class path_text(_Bosl2Base): def __init__(self, path=None, text=None, font=None, size=None, thickness=None, lettersize=None, offset=None, reverse=None, normal=None, top=None, center=None, textmetrics=None, kern=None, height=None, h=None, valign=None, language=None, script=None, **kwargs): super().__init__("path_text", {"path" : path, "text" : text, "font" : font, "size" : size, "thickness" : thickness, "lettersize" : lettersize, "offset" : offset, "reverse" : reverse, "normal" : normal, "top" : top, "center" : center, "textmetrics" : textmetrics, "kern" : kern, "height" : height, "h" : h, "valign" : valign, "language" : language, "script" : script, **kwargs}) class interior_fillet(_Bosl2Base): def __init__(self, l=None, r=None, ang=None, overlap=None, d=None, length=None, h=None, height=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("interior_fillet", {"l" : l, "r" : r, "ang" : ang, "overlap" : overlap, "d" : d, "length" : length, "h" : h, "height" : height, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class fillet(_Bosl2Base): def __init__(self, l=None, r=None, ang=None, r1=None, r2=None, excess=None, d1=None, d2=None, d=None, length=None, h=None, height=None, anchor=None, spin=None, orient=None, rounding=None, rounding1=None, rounding2=None, chamfer=None, chamfer1=None, chamfer2=None, **kwargs): super().__init__("fillet", {"l" : l, "r" : r, "ang" : ang, "r1" : r1, "r2" : r2, "excess" : excess, "d1" : d1, "d2" : d2, "d" : d, "length" : length, "h" : h, "height" : height, "anchor" : anchor, "spin" : spin, "orient" : orient, "rounding" : rounding, "rounding1" : rounding1, "rounding2" : rounding2, "chamfer" : chamfer, "chamfer1" : chamfer1, "chamfer2" : chamfer2, **kwargs}) class plot3d(_Bosl2Base): def __init__(self, f=None, x=None, y=None, zclip=None, zspan=None, base=None, anchor=None, orient=None, spin=None, atype=None, cp=None, convexity=None, style=None, **kwargs): super().__init__("plot3d", {"f" : f, "x" : x, "y" : y, "zclip" : zclip, "zspan" : zspan, "base" : base, "anchor" : anchor, "orient" : orient, "spin" : spin, "atype" : atype, "cp" : cp, "convexity" : convexity, "style" : style, **kwargs}) class plot_revolution(_Bosl2Base): def __init__(self, f=None, angle=None, z=None, arclength=None, path=None, rclip=None, rspan=None, horiz=None, r1=None, r2=None, r=None, d1=None, d2=None, d=None, convexity=None, anchor=None, orient=None, spin=None, atype=None, cp=None, style=None, reverse=None, **kwargs): super().__init__("plot_revolution", {"f" : f, "angle" : angle, "z" : z, "arclength" : arclength, "path" : path, "rclip" : rclip, "rspan" : rspan, "horiz" : horiz, "r1" : r1, "r2" : r2, "r" : r, "d1" : d1, "d2" : d2, "d" : d, "convexity" : convexity, "anchor" : anchor, "orient" : orient, "spin" : spin, "atype" : atype, "cp" : cp, "style" : style, "reverse" : reverse, **kwargs}) class heightfield(_Bosl2Base): def __init__(self, data=None, size=None, bottom=None, maxz=None, xrange=None, yrange=None, style=None, convexity=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("heightfield", {"data" : data, "size" : size, "bottom" : bottom, "maxz" : maxz, "xrange" : xrange, "yrange" : yrange, "style" : style, "convexity" : convexity, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class cylindrical_heightfield(_Bosl2Base): def __init__(self, data=None, l=None, r=None, base=None, transpose=None, aspect=None, style=None, convexity=None, xrange=None, yrange=None, maxh=None, r1=None, r2=None, d=None, d1=None, d2=None, h=None, height=None, length=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("cylindrical_heightfield", {"data" : data, "l" : l, "r" : r, "base" : base, "transpose" : transpose, "aspect" : aspect, "style" : style, "convexity" : convexity, "xrange" : xrange, "yrange" : yrange, "maxh" : maxh, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "h" : h, "height" : height, "length" : length, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class ruler(_Bosl2Base): def __init__(self, length=None, width=None, thickness=None, depth=None, labels=None, pipscale=None, maxscale=None, colors=None, alpha=None, unit=None, inch=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("ruler", {"length" : length, "width" : width, "thickness" : thickness, "depth" : depth, "labels" : labels, "pipscale" : pipscale, "maxscale" : maxscale, "colors" : colors, "alpha" : alpha, "unit" : unit, "inch" : inch, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/skin.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/skin.scad'}", False) __vnf_no_n_mesg = _OpenSCADConstant('__vnf_no_n_mesg') _leadin_ogive = _OpenSCADConstant('_leadin_ogive') _leadin_cut = _OpenSCADConstant('_leadin_cut') _leadin_sqrt = _OpenSCADConstant('_leadin_sqrt') _leadin_linear = _OpenSCADConstant('_leadin_linear') _lead_in_table = _OpenSCADConstant('_lead_in_table') _MAP_DIAG = _OpenSCADConstant('_MAP_DIAG') _MAP_LEFT = _OpenSCADConstant('_MAP_LEFT') _MAP_UP = _OpenSCADConstant('_MAP_UP') class skin(_Bosl2Base): def __init__(self, profiles=None, slices=None, refine=None, method=None, sampling=None, caps=None, closed=None, z=None, style=None, anchor=None, cp=None, spin=None, orient=None, atype=None, **kwargs): super().__init__("skin", {"profiles" : profiles, "slices" : slices, "refine" : refine, "method" : method, "sampling" : sampling, "caps" : caps, "closed" : closed, "z" : z, "style" : style, "anchor" : anchor, "cp" : cp, "spin" : spin, "orient" : orient, "atype" : atype, **kwargs}) class _make_all_prism_anchors(_Bosl2Base): def __init__(self, bot=None, top=None, startind=None, **kwargs): super().__init__("_make_all_prism_anchors", {"bot" : bot, "top" : top, "startind" : startind, **kwargs}) class linear_sweep(_Bosl2Base): def __init__(self, region=None, height=None, center=None, twist=None, scale=None, shift=None, slices=None, maxseg=None, style=None, caps=None, cp=None, atype=None, h=None, texture=None, tex_size=None, tex_reps=None, tex_counts=None, tex_inset=None, tex_rot=None, tex_scale=None, tex_depth=None, tex_samples=None, l=None, length=None, anchor=None, spin=None, orient=None, _return_geom=None, **kwargs): super().__init__("linear_sweep", {"region" : region, "height" : height, "center" : center, "twist" : twist, "scale" : scale, "shift" : shift, "slices" : slices, "maxseg" : maxseg, "style" : style, "caps" : caps, "cp" : cp, "atype" : atype, "h" : h, "texture" : texture, "tex_size" : tex_size, "tex_reps" : tex_reps, "tex_counts" : tex_counts, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "tex_scale" : tex_scale, "tex_depth" : tex_depth, "tex_samples" : tex_samples, "l" : l, "length" : length, "anchor" : anchor, "spin" : spin, "orient" : orient, "_return_geom" : _return_geom, **kwargs}) class rotate_sweep(_Bosl2Base): def __init__(self, shape=None, angle=None, texture=None, tex_size=None, tex_counts=None, tex_reps=None, tex_inset=None, tex_rot=None, tex_scale=None, tex_depth=None, tex_samples=None, tex_aspect=None, pixel_aspect=None, tex_taper=None, shift=None, caps=None, closed=None, style=None, cp=None, atype=None, anchor=None, spin=None, orient=None, start=None, _tex_inhibit_y_slicing=None, **kwargs): super().__init__("rotate_sweep", {"shape" : shape, "angle" : angle, "texture" : texture, "tex_size" : tex_size, "tex_counts" : tex_counts, "tex_reps" : tex_reps, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "tex_scale" : tex_scale, "tex_depth" : tex_depth, "tex_samples" : tex_samples, "tex_aspect" : tex_aspect, "pixel_aspect" : pixel_aspect, "tex_taper" : tex_taper, "shift" : shift, "caps" : caps, "closed" : closed, "style" : style, "cp" : cp, "atype" : atype, "anchor" : anchor, "spin" : spin, "orient" : orient, "start" : start, "_tex_inhibit_y_slicing" : _tex_inhibit_y_slicing, **kwargs}) class _force_xplus(_Bosl2Base): def __init__(self, data=None, **kwargs): super().__init__("_force_xplus", {"data" : data, **kwargs}) class _ss_polygon_r(_Bosl2Base): def __init__(self, N=None, theta=None, **kwargs): super().__init__("_ss_polygon_r", {"N" : N, "theta" : theta, **kwargs}) class spiral_sweep(_Bosl2Base): def __init__(self, poly=None, h=None, r=None, turns=None, taper=None, r1=None, r2=None, d=None, d1=None, d2=None, internal=None, lead_in_shape=None, lead_in_shape1=None, lead_in_shape2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, height=None, l=None, length=None, lead_in_sample=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("spiral_sweep", {"poly" : poly, "h" : h, "r" : r, "turns" : turns, "taper" : taper, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "internal" : internal, "lead_in_shape" : lead_in_shape, "lead_in_shape1" : lead_in_shape1, "lead_in_shape2" : lead_in_shape2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "height" : height, "l" : l, "length" : length, "lead_in_sample" : lead_in_sample, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class path_sweep(_Bosl2Base): def __init__(self, shape=None, path=None, method=None, normal=None, closed=None, twist=None, twist_by_length=None, scale=None, scale_by_length=None, symmetry=None, last_normal=None, tangent=None, uniform=None, relaxed=None, caps=None, style=None, transforms=None, texture=None, tex_reps=None, tex_size=None, tex_samples=None, tex_inset=None, tex_rot=None, tex_depth=None, tex_extra=None, tex_skip=None, anchor=None, cp=None, spin=None, orient=None, atype=None, _return_scales=None, **kwargs): super().__init__("path_sweep", {"shape" : shape, "path" : path, "method" : method, "normal" : normal, "closed" : closed, "twist" : twist, "twist_by_length" : twist_by_length, "scale" : scale, "scale_by_length" : scale_by_length, "symmetry" : symmetry, "last_normal" : last_normal, "tangent" : tangent, "uniform" : uniform, "relaxed" : relaxed, "caps" : caps, "style" : style, "transforms" : transforms, "texture" : texture, "tex_reps" : tex_reps, "tex_size" : tex_size, "tex_samples" : tex_samples, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "tex_depth" : tex_depth, "tex_extra" : tex_extra, "tex_skip" : tex_skip, "anchor" : anchor, "cp" : cp, "spin" : spin, "orient" : orient, "atype" : atype, "_return_scales" : _return_scales, **kwargs}) class path_sweep2d(_Bosl2Base): def __init__(self, shape=None, path=None, closed=None, caps=None, quality=None, style=None, anchor=None, cp=None, spin=None, orient=None, atype=None, **kwargs): super().__init__("path_sweep2d", {"shape" : shape, "path" : path, "closed" : closed, "caps" : caps, "quality" : quality, "style" : style, "anchor" : anchor, "cp" : cp, "spin" : spin, "orient" : orient, "atype" : atype, **kwargs}) class _ofs_vmap(_Bosl2Base): def __init__(self, ofs=None, closed=None, **kwargs): super().__init__("_ofs_vmap", {"ofs" : ofs, "closed" : closed, **kwargs}) class _ofs_face_edge(_Bosl2Base): def __init__(self, face=None, firstlen=None, second=None, **kwargs): super().__init__("_ofs_face_edge", {"face" : face, "firstlen" : firstlen, "second" : second, **kwargs}) class sweep(_Bosl2Base): def __init__(self, shape=None, transforms=None, closed=None, caps=None, style=None, anchor=None, cp=None, spin=None, orient=None, atype=None, texture=None, tex_reps=None, tex_size=None, tex_samples=None, tex_inset=None, tex_rot=None, tex_depth=None, tex_extra=None, tex_skip=None, _closed_for_normals=None, normals=None, **kwargs): super().__init__("sweep", {"shape" : shape, "transforms" : transforms, "closed" : closed, "caps" : caps, "style" : style, "anchor" : anchor, "cp" : cp, "spin" : spin, "orient" : orient, "atype" : atype, "texture" : texture, "tex_reps" : tex_reps, "tex_size" : tex_size, "tex_samples" : tex_samples, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "tex_depth" : tex_depth, "tex_extra" : tex_extra, "tex_skip" : tex_skip, "_closed_for_normals" : _closed_for_normals, "normals" : normals, **kwargs}) class _force_int(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("_force_int", {"x" : x, **kwargs}) class _find_ps_dir(_Bosl2Base): def __init__(self, frac=None, prevind=None, nextind=None, twist=None, anchor_pos=None, anchor_dir=None, **kwargs): super().__init__("_find_ps_dir", {"frac" : frac, "prevind" : prevind, "nextind" : nextind, "twist" : twist, "anchor_pos" : anchor_pos, "anchor_dir" : anchor_dir, **kwargs}) class subdivide_and_slice(_Bosl2Base): def __init__(self, profiles=None, slices=None, numpoints=None, method=None, closed=None, **kwargs): super().__init__("subdivide_and_slice", {"profiles" : profiles, "slices" : slices, "numpoints" : numpoints, "method" : method, "closed" : closed, **kwargs}) class slice_profiles(_Bosl2Base): def __init__(self, profiles=None, slices=None, closed=None, **kwargs): super().__init__("slice_profiles", {"profiles" : profiles, "slices" : slices, "closed" : closed, **kwargs}) class _closest_angle(_Bosl2Base): def __init__(self, alpha=None, beta=None, **kwargs): super().__init__("_closest_angle", {"alpha" : alpha, "beta" : beta, **kwargs}) class _smooth(_Bosl2Base): def __init__(self, data=None, len=None, closed=None, angle=None, **kwargs): super().__init__("_smooth", {"data" : data, "len" : len, "closed" : closed, "angle" : angle, **kwargs}) class rot_resample(_Bosl2Base): def __init__(self, rotlist=None, n=None, twist=None, scale=None, smoothlen=None, long=None, turns=None, closed=None, method=None, **kwargs): super().__init__("rot_resample", {"rotlist" : rotlist, "n" : n, "twist" : twist, "scale" : scale, "smoothlen" : smoothlen, "long" : long, "turns" : turns, "closed" : closed, "method" : method, **kwargs}) class _dp_distance_array(_Bosl2Base): def __init__(self, small=None, big=None, abort_thresh=None, **kwargs): super().__init__("_dp_distance_array", {"small" : small, "big" : big, "abort_thresh" : abort_thresh, **kwargs}) class _dp_distance_row(_Bosl2Base): def __init__(self, small=None, big=None, small_ind=None, tdist=None, **kwargs): super().__init__("_dp_distance_row", {"small" : small, "big" : big, "small_ind" : small_ind, "tdist" : tdist, **kwargs}) class _dp_extract_map(_Bosl2Base): def __init__(self, map=None, **kwargs): super().__init__("_dp_extract_map", {"map" : map, **kwargs}) class _skin_distance_match(_Bosl2Base): def __init__(self, poly1=None, poly2=None, **kwargs): super().__init__("_skin_distance_match", {"poly1" : poly1, "poly2" : poly2, **kwargs}) class _skin_aligned_distance_match(_Bosl2Base): def __init__(self, poly1=None, poly2=None, **kwargs): super().__init__("_skin_aligned_distance_match", {"poly1" : poly1, "poly2" : poly2, **kwargs}) class _skin_tangent_match(_Bosl2Base): def __init__(self, poly1=None, poly2=None, **kwargs): super().__init__("_skin_tangent_match", {"poly1" : poly1, "poly2" : poly2, **kwargs}) class _find_one_tangent(_Bosl2Base): def __init__(self, curve=None, edge=None, curve_offset=None, closed=None, **kwargs): super().__init__("_find_one_tangent", {"curve" : curve, "edge" : edge, "curve_offset" : curve_offset, "closed" : closed, **kwargs}) class associate_vertices(_Bosl2Base): def __init__(self, polygons=None, split=None, curpoly=None, **kwargs): super().__init__("associate_vertices", {"polygons" : polygons, "split" : split, "curpoly" : curpoly, **kwargs}) class _tex_fn_default(_Bosl2Base): def __init__(self, **kwargs): super().__init__("_tex_fn_default", {**kwargs}) class texture(_Bosl2Base): def __init__(self, tex=None, n=None, border=None, gap=None, roughness=None, inset=None, **kwargs): super().__init__("texture", {"tex" : tex, "n" : n, "border" : border, "gap" : gap, "roughness" : roughness, "inset" : inset, **kwargs}) class _get_vnf_tile_edges(_Bosl2Base): def __init__(self, texture=None, **kwargs): super().__init__("_get_vnf_tile_edges", {"texture" : texture, **kwargs}) class _validate_texture(_Bosl2Base): def __init__(self, texture=None, **kwargs): super().__init__("_validate_texture", {"texture" : texture, **kwargs}) class _tex_height(_Bosl2Base): def __init__(self, scale=None, inset=None, z=None, **kwargs): super().__init__("_tex_height", {"scale" : scale, "inset" : inset, "z" : z, **kwargs}) class _get_texture(_Bosl2Base): def __init__(self, texture=None, tex_rot=None, **kwargs): super().__init__("_get_texture", {"texture" : texture, "tex_rot" : tex_rot, **kwargs}) class _textured_linear_sweep(_Bosl2Base): def __init__(self, region=None, texture=None, tex_size=None, h=None, counts=None, inset=None, rot=None, tex_scale=None, twist=None, scale=None, shift=None, style=None, l=None, caps=None, height=None, length=None, samples=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("_textured_linear_sweep", {"region" : region, "texture" : texture, "tex_size" : tex_size, "h" : h, "counts" : counts, "inset" : inset, "rot" : rot, "tex_scale" : tex_scale, "twist" : twist, "scale" : scale, "shift" : shift, "style" : style, "l" : l, "caps" : caps, "height" : height, "length" : length, "samples" : samples, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class _tile_edge_path_list(_Bosl2Base): def __init__(self, vnf=None, axis=None, maxopen=None, **kwargs): super().__init__("_tile_edge_path_list", {"vnf" : vnf, "axis" : axis, "maxopen" : maxopen, **kwargs}) class _textured_revolution(_Bosl2Base): def __init__(self, shape=None, texture=None, tex_size=None, tex_scale=None, inset=None, rot=None, shift=None, taper=None, closed=None, angle=None, inhibit_y_slicing=None, tex_aspect=None, pixel_aspect=None, counts=None, samples=None, start=None, tex_extra=None, style=None, atype=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("_textured_revolution", {"shape" : shape, "texture" : texture, "tex_size" : tex_size, "tex_scale" : tex_scale, "inset" : inset, "rot" : rot, "shift" : shift, "taper" : taper, "closed" : closed, "angle" : angle, "inhibit_y_slicing" : inhibit_y_slicing, "tex_aspect" : tex_aspect, "pixel_aspect" : pixel_aspect, "counts" : counts, "samples" : samples, "start" : start, "tex_extra" : tex_extra, "style" : style, "atype" : atype, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class _textured_point_array(_Bosl2Base): def __init__(self, points=None, texture=None, tex_reps=None, tex_size=None, tex_samples=None, tex_inset=None, tex_rot=None, triangulate=None, tex_scaling=None, return_edges=None, col_wrap=None, tex_depth=None, row_wrap=None, caps=None, cap1=None, cap2=None, reverse=None, style=None, tex_extra=None, tex_skip=None, sidecaps=None, sidecap1=None, sidecap2=None, normals=None, **kwargs): super().__init__("_textured_point_array", {"points" : points, "texture" : texture, "tex_reps" : tex_reps, "tex_size" : tex_size, "tex_samples" : tex_samples, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "triangulate" : triangulate, "tex_scaling" : tex_scaling, "return_edges" : return_edges, "col_wrap" : col_wrap, "tex_depth" : tex_depth, "row_wrap" : row_wrap, "caps" : caps, "cap1" : cap1, "cap2" : cap2, "reverse" : reverse, "style" : style, "tex_extra" : tex_extra, "tex_skip" : tex_skip, "sidecaps" : sidecaps, "sidecap1" : sidecap1, "sidecap2" : sidecap2, "normals" : normals, **kwargs}) class _resample_point_array(_Bosl2Base): def __init__(self, data=None, size=None, col_wrap=None, row_wrap=None, **kwargs): super().__init__("_resample_point_array", {"data" : data, "size" : size, "col_wrap" : col_wrap, "row_wrap" : row_wrap, **kwargs}) class skin(_Bosl2Base): def __init__(self, profiles=None, slices=None, refine=None, method=None, sampling=None, caps=None, closed=None, z=None, style=None, convexity=None, anchor=None, cp=None, spin=None, orient=None, atype=None, **kwargs): super().__init__("skin", {"profiles" : profiles, "slices" : slices, "refine" : refine, "method" : method, "sampling" : sampling, "caps" : caps, "closed" : closed, "z" : z, "style" : style, "convexity" : convexity, "anchor" : anchor, "cp" : cp, "spin" : spin, "orient" : orient, "atype" : atype, **kwargs}) class linear_sweep(_Bosl2Base): def __init__(self, region=None, height=None, center=None, twist=None, scale=None, shift=None, slices=None, maxseg=None, style=None, convexity=None, caps=None, texture=None, tex_size=None, tex_reps=None, tex_counts=None, tex_inset=None, tex_rot=None, tex_depth=None, tex_scale=None, tex_samples=None, cp=None, atype=None, h=None, l=None, length=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("linear_sweep", {"region" : region, "height" : height, "center" : center, "twist" : twist, "scale" : scale, "shift" : shift, "slices" : slices, "maxseg" : maxseg, "style" : style, "convexity" : convexity, "caps" : caps, "texture" : texture, "tex_size" : tex_size, "tex_reps" : tex_reps, "tex_counts" : tex_counts, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "tex_depth" : tex_depth, "tex_scale" : tex_scale, "tex_samples" : tex_samples, "cp" : cp, "atype" : atype, "h" : h, "l" : l, "length" : length, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class rotate_sweep(_Bosl2Base): def __init__(self, shape=None, angle=None, texture=None, tex_size=None, tex_counts=None, tex_reps=None, tex_inset=None, tex_rot=None, tex_scale=None, tex_depth=None, tex_samples=None, tex_taper=None, shift=None, style=None, caps=None, closed=None, tex_extra=None, tex_aspect=None, pixel_aspect=None, cp=None, convexity=None, atype=None, anchor=None, spin=None, orient=None, start=None, _tex_inhibit_y_slicing=None, **kwargs): super().__init__("rotate_sweep", {"shape" : shape, "angle" : angle, "texture" : texture, "tex_size" : tex_size, "tex_counts" : tex_counts, "tex_reps" : tex_reps, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "tex_scale" : tex_scale, "tex_depth" : tex_depth, "tex_samples" : tex_samples, "tex_taper" : tex_taper, "shift" : shift, "style" : style, "caps" : caps, "closed" : closed, "tex_extra" : tex_extra, "tex_aspect" : tex_aspect, "pixel_aspect" : pixel_aspect, "cp" : cp, "convexity" : convexity, "atype" : atype, "anchor" : anchor, "spin" : spin, "orient" : orient, "start" : start, "_tex_inhibit_y_slicing" : _tex_inhibit_y_slicing, **kwargs}) class spiral_sweep(_Bosl2Base): def __init__(self, poly=None, h=None, r=None, turns=None, taper=None, r1=None, r2=None, d=None, d1=None, d2=None, internal=None, lead_in_shape=None, lead_in_shape1=None, lead_in_shape2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, height=None, l=None, length=None, lead_in_sample=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("spiral_sweep", {"poly" : poly, "h" : h, "r" : r, "turns" : turns, "taper" : taper, "r1" : r1, "r2" : r2, "d" : d, "d1" : d1, "d2" : d2, "internal" : internal, "lead_in_shape" : lead_in_shape, "lead_in_shape1" : lead_in_shape1, "lead_in_shape2" : lead_in_shape2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "height" : height, "l" : l, "length" : length, "lead_in_sample" : lead_in_sample, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class path_sweep(_Bosl2Base): def __init__(self, shape=None, path=None, method=None, normal=None, closed=None, twist=None, twist_by_length=None, scale=None, scale_by_length=None, symmetry=None, last_normal=None, tangent=None, uniform=None, relaxed=None, caps=None, style=None, convexity=None, anchor=None, cp=None, spin=None, orient=None, atype=None, profiles=None, width=None, texture=None, tex_reps=None, tex_size=None, tex_samples=None, tex_inset=None, tex_rot=None, tex_depth=None, tex_extra=None, tex_skip=None, **kwargs): super().__init__("path_sweep", {"shape" : shape, "path" : path, "method" : method, "normal" : normal, "closed" : closed, "twist" : twist, "twist_by_length" : twist_by_length, "scale" : scale, "scale_by_length" : scale_by_length, "symmetry" : symmetry, "last_normal" : last_normal, "tangent" : tangent, "uniform" : uniform, "relaxed" : relaxed, "caps" : caps, "style" : style, "convexity" : convexity, "anchor" : anchor, "cp" : cp, "spin" : spin, "orient" : orient, "atype" : atype, "profiles" : profiles, "width" : width, "texture" : texture, "tex_reps" : tex_reps, "tex_size" : tex_size, "tex_samples" : tex_samples, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "tex_depth" : tex_depth, "tex_extra" : tex_extra, "tex_skip" : tex_skip, **kwargs}) class path_sweep2d(_Bosl2Base): def __init__(self, profile=None, path=None, closed=None, caps=None, quality=None, style=None, convexity=None, anchor=None, cp=None, spin=None, orient=None, atype=None, **kwargs): super().__init__("path_sweep2d", {"profile" : profile, "path" : path, "closed" : closed, "caps" : caps, "quality" : quality, "style" : style, "convexity" : convexity, "anchor" : anchor, "cp" : cp, "spin" : spin, "orient" : orient, "atype" : atype, **kwargs}) class sweep(_Bosl2Base): def __init__(self, shape=None, transforms=None, closed=None, caps=None, style=None, convexity=None, anchor=None, cp=None, spin=None, orient=None, atype=None, texture=None, tex_reps=None, tex_size=None, tex_samples=None, tex_inset=None, tex_rot=None, tex_depth=None, tex_extra=None, tex_skip=None, normals=None, **kwargs): super().__init__("sweep", {"shape" : shape, "transforms" : transforms, "closed" : closed, "caps" : caps, "style" : style, "convexity" : convexity, "anchor" : anchor, "cp" : cp, "spin" : spin, "orient" : orient, "atype" : atype, "texture" : texture, "tex_reps" : tex_reps, "tex_size" : tex_size, "tex_samples" : tex_samples, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "tex_depth" : tex_depth, "tex_extra" : tex_extra, "tex_skip" : tex_skip, "normals" : normals, **kwargs}) class sweep_attach(_Bosl2Base): def __init__(self, parent=None, child=None, frac=None, idx=None, pathlen=None, spin=None, overlap=None, atype=None, cp=None, **kwargs): super().__init__("sweep_attach", {"parent" : parent, "child" : child, "frac" : frac, "idx" : idx, "pathlen" : pathlen, "spin" : spin, "overlap" : overlap, "atype" : atype, "cp" : cp, **kwargs}) class _textured_revolution(_Bosl2Base): def __init__(self, shape=None, texture=None, tex_size=None, tex_scale=None, inset=None, rot=None, shift=None, taper=None, closed=None, angle=None, style=None, atype=None, tex_aspect=None, pixel_aspect=None, inhibit_y_slicing=None, tex_extra=None, convexity=None, counts=None, samples=None, start=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("_textured_revolution", {"shape" : shape, "texture" : texture, "tex_size" : tex_size, "tex_scale" : tex_scale, "inset" : inset, "rot" : rot, "shift" : shift, "taper" : taper, "closed" : closed, "angle" : angle, "style" : style, "atype" : atype, "tex_aspect" : tex_aspect, "pixel_aspect" : pixel_aspect, "inhibit_y_slicing" : inhibit_y_slicing, "tex_extra" : tex_extra, "convexity" : convexity, "counts" : counts, "samples" : samples, "start" : start, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/sliders.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/sliders.scad'}", False) class slider(_Bosl2Base): def __init__(self, l=None, w=None, h=None, base=None, wall=None, ang=None, chamfer=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("slider", {"l" : l, "w" : w, "h" : h, "base" : base, "wall" : wall, "ang" : ang, "chamfer" : chamfer, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class rail(_Bosl2Base): def __init__(self, l=None, w=None, h=None, chamfer=None, ang=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("rail", {"l" : l, "w" : w, "h" : h, "chamfer" : chamfer, "ang" : ang, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class slider(_Bosl2Base): def __init__(self, l=None, w=None, h=None, base=None, wall=None, ang=None, chamfer=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("slider", {"l" : l, "w" : w, "h" : h, "base" : base, "wall" : wall, "ang" : ang, "chamfer" : chamfer, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class rail(_Bosl2Base): def __init__(self, l=None, w=None, h=None, chamfer=None, ang=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("rail", {"l" : l, "w" : w, "h" : h, "chamfer" : chamfer, "ang" : ang, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/std.py ================================================ from .openscad import * from .version import * from .constants import * from .transforms import * from .distributors import * from .miscellaneous import * from .color import * from .attachments import * from .beziers import * from .shapes3d import * from .shapes2d import * from .drawing import * from .masks3d import * from .masks2d import * from . import math as bosl2_math from .paths import * from . import lists as bosl2_lists from .comparisons import * from .linalg import * from .trigonometry import * from .vectors import * from .affine import * from .coords import * from .geometry import * from .regions import * from . import strings as bosl2_strings from .vnf import * from .structs import * from .rounding import * from .skin import * from . import utility as bosl2_utility from .partitions import * ================================================ FILE: solid2/extensions/bosl2/strings.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/strings.scad'}", False) class _is_liststr(_Bosl2Base): def __init__(self, s=None, **kwargs): super().__init__("_is_liststr", {"s" : s, **kwargs}) class substr(_Bosl2Base): def __init__(self, str=None, pos=None, len=None, **kwargs): super().__init__("substr", {"str" : str, "pos" : pos, "len" : len, **kwargs}) class _substr(_Bosl2Base): def __init__(self, str=None, pos=None, len=None, substr=None, **kwargs): super().__init__("_substr", {"str" : str, "pos" : pos, "len" : len, "substr" : substr, **kwargs}) class suffix(_Bosl2Base): def __init__(self, str=None, len=None, **kwargs): super().__init__("suffix", {"str" : str, "len" : len, **kwargs}) class str_find(_Bosl2Base): def __init__(self, str=None, pattern=None, start=None, last=None, all=None, **kwargs): super().__init__("str_find", {"str" : str, "pattern" : pattern, "start" : start, "last" : last, "all" : all, **kwargs}) class _str_find_first(_Bosl2Base): def __init__(self, str=None, pattern=None, max_sindex=None, sindex=None, **kwargs): super().__init__("_str_find_first", {"str" : str, "pattern" : pattern, "max_sindex" : max_sindex, "sindex" : sindex, **kwargs}) class _str_find_last(_Bosl2Base): def __init__(self, str=None, pattern=None, sindex=None, **kwargs): super().__init__("_str_find_last", {"str" : str, "pattern" : pattern, "sindex" : sindex, **kwargs}) class _str_find_all(_Bosl2Base): def __init__(self, str=None, pattern=None, **kwargs): super().__init__("_str_find_all", {"str" : str, "pattern" : pattern, **kwargs}) class substr_match(_Bosl2Base): def __init__(self, str=None, start=None, pattern=None, **kwargs): super().__init__("substr_match", {"str" : str, "start" : start, "pattern" : pattern, **kwargs}) class _substr_match_recurse(_Bosl2Base): def __init__(self, str=None, sindex=None, pattern=None, plen=None, pindex=None, **kwargs): super().__init__("_substr_match_recurse", {"str" : str, "sindex" : sindex, "pattern" : pattern, "plen" : plen, "pindex" : pindex, **kwargs}) class starts_with(_Bosl2Base): def __init__(self, str=None, pattern=None, **kwargs): super().__init__("starts_with", {"str" : str, "pattern" : pattern, **kwargs}) class ends_with(_Bosl2Base): def __init__(self, str=None, pattern=None, **kwargs): super().__init__("ends_with", {"str" : str, "pattern" : pattern, **kwargs}) class str_split(_Bosl2Base): def __init__(self, str=None, sep=None, keep_nulls=None, **kwargs): super().__init__("str_split", {"str" : str, "sep" : sep, "keep_nulls" : keep_nulls, **kwargs}) class _str_split_recurse(_Bosl2Base): def __init__(self, str=None, sep=None, i=None, result=None, **kwargs): super().__init__("_str_split_recurse", {"str" : str, "sep" : sep, "i" : i, "result" : result, **kwargs}) class _remove_empty_strs(_Bosl2Base): def __init__(self, list=None, **kwargs): super().__init__("_remove_empty_strs", {"list" : list, **kwargs}) class str_join(_Bosl2Base): def __init__(self, list=None, sep=None, _i=None, _result=None, **kwargs): super().__init__("str_join", {"list" : list, "sep" : sep, "_i" : _i, "_result" : _result, **kwargs}) class _str_count_leading(_Bosl2Base): def __init__(self, s=None, c=None, _i=None, **kwargs): super().__init__("_str_count_leading", {"s" : s, "c" : c, "_i" : _i, **kwargs}) class _str_count_trailing(_Bosl2Base): def __init__(self, s=None, c=None, _i=None, **kwargs): super().__init__("_str_count_trailing", {"s" : s, "c" : c, "_i" : _i, **kwargs}) class str_strip(_Bosl2Base): def __init__(self, s=None, c=None, start=None, end=None, **kwargs): super().__init__("str_strip", {"s" : s, "c" : c, "start" : start, "end" : end, **kwargs}) class str_pad(_Bosl2Base): def __init__(self, str=None, length=None, char=None, left=None, **kwargs): super().__init__("str_pad", {"str" : str, "length" : length, "char" : char, "left" : left, **kwargs}) class str_replace_char(_Bosl2Base): def __init__(self, str=None, char=None, replace=None, **kwargs): super().__init__("str_replace_char", {"str" : str, "char" : char, "replace" : replace, **kwargs}) class downcase(_Bosl2Base): def __init__(self, str=None, **kwargs): super().__init__("downcase", {"str" : str, **kwargs}) class upcase(_Bosl2Base): def __init__(self, str=None, **kwargs): super().__init__("upcase", {"str" : str, **kwargs}) class rand_str(_Bosl2Base): def __init__(self, n=None, charset=None, seed=None, **kwargs): super().__init__("rand_str", {"n" : n, "charset" : charset, "seed" : seed, **kwargs}) class parse_int(_Bosl2Base): def __init__(self, str=None, base=None, **kwargs): super().__init__("parse_int", {"str" : str, "base" : base, **kwargs}) class _parse_int_recurse(_Bosl2Base): def __init__(self, str=None, base=None, i=None, **kwargs): super().__init__("_parse_int_recurse", {"str" : str, "base" : base, "i" : i, **kwargs}) class parse_float(_Bosl2Base): def __init__(self, str=None, **kwargs): super().__init__("parse_float", {"str" : str, **kwargs}) class parse_frac(_Bosl2Base): def __init__(self, str=None, mixed=None, improper=None, signed=None, **kwargs): super().__init__("parse_frac", {"str" : str, "mixed" : mixed, "improper" : improper, "signed" : signed, **kwargs}) class parse_num(_Bosl2Base): def __init__(self, str=None, **kwargs): super().__init__("parse_num", {"str" : str, **kwargs}) class format_int(_Bosl2Base): def __init__(self, i=None, mindigits=None, **kwargs): super().__init__("format_int", {"i" : i, "mindigits" : mindigits, **kwargs}) class format_fixed(_Bosl2Base): def __init__(self, f=None, digits=None, **kwargs): super().__init__("format_fixed", {"f" : f, "digits" : digits, **kwargs}) class format_float(_Bosl2Base): def __init__(self, f=None, sig=None, **kwargs): super().__init__("format_float", {"f" : f, "sig" : sig, **kwargs}) class _format_matrix(_Bosl2Base): def __init__(self, M=None, sig=None, sep=None, eps=None, **kwargs): super().__init__("_format_matrix", {"M" : M, "sig" : sig, "sep" : sep, "eps" : eps, **kwargs}) class format(_Bosl2Base): def __init__(self, fmt=None, vals=None, **kwargs): super().__init__("format", {"fmt" : fmt, "vals" : vals, **kwargs}) class is_lower(_Bosl2Base): def __init__(self, s=None, **kwargs): super().__init__("is_lower", {"s" : s, **kwargs}) class is_upper(_Bosl2Base): def __init__(self, s=None, **kwargs): super().__init__("is_upper", {"s" : s, **kwargs}) class is_digit(_Bosl2Base): def __init__(self, s=None, **kwargs): super().__init__("is_digit", {"s" : s, **kwargs}) class is_hexdigit(_Bosl2Base): def __init__(self, s=None, **kwargs): super().__init__("is_hexdigit", {"s" : s, **kwargs}) class is_letter(_Bosl2Base): def __init__(self, s=None, **kwargs): super().__init__("is_letter", {"s" : s, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/structs.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/structs.scad'}", False) class struct_set(_Bosl2Base): def __init__(self, struct=None, key=None, value=None, grow=None, **kwargs): super().__init__("struct_set", {"struct" : struct, "key" : key, "value" : value, "grow" : grow, **kwargs}) class _format_key(_Bosl2Base): def __init__(self, key=None, **kwargs): super().__init__("_format_key", {"key" : key, **kwargs}) class struct_remove(_Bosl2Base): def __init__(self, struct=None, key=None, **kwargs): super().__init__("struct_remove", {"struct" : struct, "key" : key, **kwargs}) class struct_val(_Bosl2Base): def __init__(self, struct=None, key=None, default=None, **kwargs): super().__init__("struct_val", {"struct" : struct, "key" : key, "default" : default, **kwargs}) class struct_keys(_Bosl2Base): def __init__(self, struct=None, **kwargs): super().__init__("struct_keys", {"struct" : struct, **kwargs}) class echo_struct(_Bosl2Base): def __init__(self, struct=None, name=None, **kwargs): super().__init__("echo_struct", {"struct" : struct, "name" : name, **kwargs}) class is_struct(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("is_struct", {"x" : x, **kwargs}) class echo_struct(_Bosl2Base): def __init__(self, struct=None, name=None, **kwargs): super().__init__("echo_struct", {"struct" : struct, "name" : name, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/threading.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/threading.scad'}", False) class threaded_rod(_Bosl2Base): def __init__(self, d=None, l=None, pitch=None, left_handed=None, bevel=None, bevel1=None, bevel2=None, starts=None, internal=None, d1=None, d2=None, length=None, h=None, height=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, teardrop=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("threaded_rod", {"d" : d, "l" : l, "pitch" : pitch, "left_handed" : left_handed, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "starts" : starts, "internal" : internal, "d1" : d1, "d2" : d2, "length" : length, "h" : h, "height" : height, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "teardrop" : teardrop, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class threaded_nut(_Bosl2Base): def __init__(self, nutwidth=None, id=None, h=None, pitch=None, starts=None, shape=None, left_handed=None, bevel=None, bevel1=None, bevel2=None, id1=None, id2=None, ibevel1=None, ibevel2=None, ibevel=None, bevang=None, thickness=None, height=None, length=None, l=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("threaded_nut", {"nutwidth" : nutwidth, "id" : id, "h" : h, "pitch" : pitch, "starts" : starts, "shape" : shape, "left_handed" : left_handed, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "id1" : id1, "id2" : id2, "ibevel1" : ibevel1, "ibevel2" : ibevel2, "ibevel" : ibevel, "bevang" : bevang, "thickness" : thickness, "height" : height, "length" : length, "l" : l, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class trapezoidal_threaded_rod(_Bosl2Base): def __init__(self, d=None, l=None, pitch=None, thread_angle=None, thread_depth=None, flank_angle=None, left_handed=None, bevel=None, bevel1=None, bevel2=None, starts=None, internal=None, d1=None, d2=None, length=None, h=None, height=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, teardrop=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("trapezoidal_threaded_rod", {"d" : d, "l" : l, "pitch" : pitch, "thread_angle" : thread_angle, "thread_depth" : thread_depth, "flank_angle" : flank_angle, "left_handed" : left_handed, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "starts" : starts, "internal" : internal, "d1" : d1, "d2" : d2, "length" : length, "h" : h, "height" : height, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "teardrop" : teardrop, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class trapezoidal_threaded_nut(_Bosl2Base): def __init__(self, nutwidth=None, id=None, h=None, pitch=None, thread_angle=None, thread_depth=None, shape=None, flank_angle=None, left_handed=None, starts=None, bevel=None, bevel1=None, bevel2=None, bevang=None, ibevel1=None, ibevel2=None, ibevel=None, thickness=None, height=None, id1=None, id2=None, length=None, l=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("trapezoidal_threaded_nut", {"nutwidth" : nutwidth, "id" : id, "h" : h, "pitch" : pitch, "thread_angle" : thread_angle, "thread_depth" : thread_depth, "shape" : shape, "flank_angle" : flank_angle, "left_handed" : left_handed, "starts" : starts, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "bevang" : bevang, "ibevel1" : ibevel1, "ibevel2" : ibevel2, "ibevel" : ibevel, "thickness" : thickness, "height" : height, "id1" : id1, "id2" : id2, "length" : length, "l" : l, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class acme_threaded_rod(_Bosl2Base): def __init__(self, d=None, l=None, tpi=None, pitch=None, starts=None, left_handed=None, bevel=None, bevel1=None, bevel2=None, internal=None, d1=None, d2=None, length=None, h=None, height=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, teardrop=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("acme_threaded_rod", {"d" : d, "l" : l, "tpi" : tpi, "pitch" : pitch, "starts" : starts, "left_handed" : left_handed, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "internal" : internal, "d1" : d1, "d2" : d2, "length" : length, "h" : h, "height" : height, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "teardrop" : teardrop, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class acme_threaded_nut(_Bosl2Base): def __init__(self, nutwidth=None, id=None, h=None, tpi=None, pitch=None, starts=None, left_handed=None, shape=None, bevel=None, bevel1=None, bevel2=None, bevang=None, ibevel=None, ibevel1=None, ibevel2=None, height=None, thickness=None, length=None, l=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("acme_threaded_nut", {"nutwidth" : nutwidth, "id" : id, "h" : h, "tpi" : tpi, "pitch" : pitch, "starts" : starts, "left_handed" : left_handed, "shape" : shape, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "bevang" : bevang, "ibevel" : ibevel, "ibevel1" : ibevel1, "ibevel2" : ibevel2, "height" : height, "thickness" : thickness, "length" : length, "l" : l, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class npt_threaded_rod(_Bosl2Base): def __init__(self, size=None, left_handed=None, bevel=None, bevel1=None, bevel2=None, hollow=None, internal=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("npt_threaded_rod", {"size" : size, "left_handed" : left_handed, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "hollow" : hollow, "internal" : internal, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class buttress_threaded_rod(_Bosl2Base): def __init__(self, d=None, l=None, pitch=None, left_handed=None, starts=None, bevel=None, bevel1=None, bevel2=None, internal=None, d1=None, d2=None, length=None, h=None, height=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, teardrop=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("buttress_threaded_rod", {"d" : d, "l" : l, "pitch" : pitch, "left_handed" : left_handed, "starts" : starts, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "internal" : internal, "d1" : d1, "d2" : d2, "length" : length, "h" : h, "height" : height, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "teardrop" : teardrop, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class buttress_threaded_nut(_Bosl2Base): def __init__(self, nutwidth=None, id=None, h=None, pitch=None, shape=None, left_handed=None, bevel=None, bevel1=None, bevel2=None, bevang=None, starts=None, ibevel=None, ibevel1=None, ibevel2=None, height=None, thickness=None, length=None, l=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("buttress_threaded_nut", {"nutwidth" : nutwidth, "id" : id, "h" : h, "pitch" : pitch, "shape" : shape, "left_handed" : left_handed, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "bevang" : bevang, "starts" : starts, "ibevel" : ibevel, "ibevel1" : ibevel1, "ibevel2" : ibevel2, "height" : height, "thickness" : thickness, "length" : length, "l" : l, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class square_threaded_rod(_Bosl2Base): def __init__(self, d=None, l=None, pitch=None, left_handed=None, bevel=None, bevel1=None, bevel2=None, starts=None, internal=None, d1=None, d2=None, length=None, h=None, height=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, teardrop=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("square_threaded_rod", {"d" : d, "l" : l, "pitch" : pitch, "left_handed" : left_handed, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "starts" : starts, "internal" : internal, "d1" : d1, "d2" : d2, "length" : length, "h" : h, "height" : height, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "teardrop" : teardrop, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class square_threaded_nut(_Bosl2Base): def __init__(self, nutwidth=None, id=None, h=None, pitch=None, left_handed=None, bevel=None, bevel1=None, bevel2=None, bevang=None, ibevel=None, ibevel1=None, ibevel2=None, height=None, thickness=None, length=None, l=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, starts=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("square_threaded_nut", {"nutwidth" : nutwidth, "id" : id, "h" : h, "pitch" : pitch, "left_handed" : left_handed, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "bevang" : bevang, "ibevel" : ibevel, "ibevel1" : ibevel1, "ibevel2" : ibevel2, "height" : height, "thickness" : thickness, "length" : length, "l" : l, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "starts" : starts, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class ball_screw_rod(_Bosl2Base): def __init__(self, d=None, l=None, pitch=None, ball_diam=None, ball_arc=None, starts=None, left_handed=None, internal=None, length=None, h=None, height=None, bevel=None, bevel1=None, bevel2=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("ball_screw_rod", {"d" : d, "l" : l, "pitch" : pitch, "ball_diam" : ball_diam, "ball_arc" : ball_arc, "starts" : starts, "left_handed" : left_handed, "internal" : internal, "length" : length, "h" : h, "height" : height, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class generic_threaded_rod(_Bosl2Base): def __init__(self, d=None, l=None, pitch=None, profile=None, left_handed=None, internal=None, bevel=None, bevel1=None, bevel2=None, starts=None, d1=None, d2=None, length=None, h=None, height=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, teardrop=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("generic_threaded_rod", {"d" : d, "l" : l, "pitch" : pitch, "profile" : profile, "left_handed" : left_handed, "internal" : internal, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "starts" : starts, "d1" : d1, "d2" : d2, "length" : length, "h" : h, "height" : height, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "teardrop" : teardrop, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class generic_threaded_nut(_Bosl2Base): def __init__(self, nutwidth=None, id=None, h=None, pitch=None, profile=None, shape=None, left_handed=None, starts=None, bevel=None, bevel1=None, bevel2=None, bevang=None, ibevel=None, ibevel1=None, ibevel2=None, id1=None, id2=None, height=None, thickness=None, length=None, l=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("generic_threaded_nut", {"nutwidth" : nutwidth, "id" : id, "h" : h, "pitch" : pitch, "profile" : profile, "shape" : shape, "left_handed" : left_handed, "starts" : starts, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "bevang" : bevang, "ibevel" : ibevel, "ibevel1" : ibevel1, "ibevel2" : ibevel2, "id1" : id1, "id2" : id2, "height" : height, "thickness" : thickness, "length" : length, "l" : l, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class thread_helix(_Bosl2Base): def __init__(self, d=None, pitch=None, thread_depth=None, flank_angle=None, turns=None, profile=None, starts=None, left_handed=None, internal=None, d1=None, d2=None, thread_angle=None, lead_in_shape=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, lead_in_sample=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("thread_helix", {"d" : d, "pitch" : pitch, "thread_depth" : thread_depth, "flank_angle" : flank_angle, "turns" : turns, "profile" : profile, "starts" : starts, "left_handed" : left_handed, "internal" : internal, "d1" : d1, "d2" : d2, "thread_angle" : thread_angle, "lead_in_shape" : lead_in_shape, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "lead_in_sample" : lead_in_sample, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class threaded_rod(_Bosl2Base): def __init__(self, d=None, l=None, pitch=None, left_handed=None, bevel=None, bevel1=None, bevel2=None, starts=None, internal=None, d1=None, d2=None, length=None, h=None, height=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, teardrop=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("threaded_rod", {"d" : d, "l" : l, "pitch" : pitch, "left_handed" : left_handed, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "starts" : starts, "internal" : internal, "d1" : d1, "d2" : d2, "length" : length, "h" : h, "height" : height, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "teardrop" : teardrop, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class threaded_nut(_Bosl2Base): def __init__(self, nutwidth=None, id=None, h=None, pitch=None, starts=None, shape=None, left_handed=None, bevel=None, bevel1=None, bevel2=None, id1=None, id2=None, ibevel1=None, ibevel2=None, ibevel=None, bevang=None, thickness=None, height=None, length=None, l=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("threaded_nut", {"nutwidth" : nutwidth, "id" : id, "h" : h, "pitch" : pitch, "starts" : starts, "shape" : shape, "left_handed" : left_handed, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "id1" : id1, "id2" : id2, "ibevel1" : ibevel1, "ibevel2" : ibevel2, "ibevel" : ibevel, "bevang" : bevang, "thickness" : thickness, "height" : height, "length" : length, "l" : l, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class trapezoidal_threaded_rod(_Bosl2Base): def __init__(self, d=None, l=None, pitch=None, thread_angle=None, thread_depth=None, flank_angle=None, left_handed=None, bevel=None, bevel1=None, bevel2=None, starts=None, internal=None, d1=None, d2=None, length=None, h=None, height=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, teardrop=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("trapezoidal_threaded_rod", {"d" : d, "l" : l, "pitch" : pitch, "thread_angle" : thread_angle, "thread_depth" : thread_depth, "flank_angle" : flank_angle, "left_handed" : left_handed, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "starts" : starts, "internal" : internal, "d1" : d1, "d2" : d2, "length" : length, "h" : h, "height" : height, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "teardrop" : teardrop, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class trapezoidal_threaded_nut(_Bosl2Base): def __init__(self, nutwidth=None, id=None, h=None, pitch=None, thread_angle=None, thread_depth=None, shape=None, flank_angle=None, left_handed=None, starts=None, bevel=None, bevel1=None, bevel2=None, bevang=None, ibevel1=None, ibevel2=None, ibevel=None, thickness=None, height=None, id1=None, id2=None, length=None, l=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("trapezoidal_threaded_nut", {"nutwidth" : nutwidth, "id" : id, "h" : h, "pitch" : pitch, "thread_angle" : thread_angle, "thread_depth" : thread_depth, "shape" : shape, "flank_angle" : flank_angle, "left_handed" : left_handed, "starts" : starts, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "bevang" : bevang, "ibevel1" : ibevel1, "ibevel2" : ibevel2, "ibevel" : ibevel, "thickness" : thickness, "height" : height, "id1" : id1, "id2" : id2, "length" : length, "l" : l, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class acme_threaded_rod(_Bosl2Base): def __init__(self, d=None, l=None, tpi=None, pitch=None, starts=None, left_handed=None, bevel=None, bevel1=None, bevel2=None, internal=None, d1=None, d2=None, length=None, h=None, height=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, teardrop=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("acme_threaded_rod", {"d" : d, "l" : l, "tpi" : tpi, "pitch" : pitch, "starts" : starts, "left_handed" : left_handed, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "internal" : internal, "d1" : d1, "d2" : d2, "length" : length, "h" : h, "height" : height, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "teardrop" : teardrop, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class acme_threaded_nut(_Bosl2Base): def __init__(self, nutwidth=None, id=None, h=None, tpi=None, pitch=None, starts=None, left_handed=None, shape=None, bevel=None, bevel1=None, bevel2=None, bevang=None, ibevel=None, ibevel1=None, ibevel2=None, height=None, thickness=None, length=None, l=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("acme_threaded_nut", {"nutwidth" : nutwidth, "id" : id, "h" : h, "tpi" : tpi, "pitch" : pitch, "starts" : starts, "left_handed" : left_handed, "shape" : shape, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "bevang" : bevang, "ibevel" : ibevel, "ibevel1" : ibevel1, "ibevel2" : ibevel2, "height" : height, "thickness" : thickness, "length" : length, "l" : l, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class npt_threaded_rod(_Bosl2Base): def __init__(self, size=None, left_handed=None, bevel=None, bevel1=None, bevel2=None, hollow=None, internal=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("npt_threaded_rod", {"size" : size, "left_handed" : left_handed, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "hollow" : hollow, "internal" : internal, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class buttress_threaded_rod(_Bosl2Base): def __init__(self, d=None, l=None, pitch=None, left_handed=None, starts=None, bevel=None, bevel1=None, bevel2=None, internal=None, d1=None, d2=None, length=None, h=None, height=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, teardrop=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("buttress_threaded_rod", {"d" : d, "l" : l, "pitch" : pitch, "left_handed" : left_handed, "starts" : starts, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "internal" : internal, "d1" : d1, "d2" : d2, "length" : length, "h" : h, "height" : height, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "teardrop" : teardrop, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class buttress_threaded_nut(_Bosl2Base): def __init__(self, nutwidth=None, id=None, h=None, pitch=None, shape=None, left_handed=None, bevel=None, bevel1=None, bevel2=None, bevang=None, starts=None, ibevel=None, ibevel1=None, ibevel2=None, height=None, thickness=None, length=None, l=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("buttress_threaded_nut", {"nutwidth" : nutwidth, "id" : id, "h" : h, "pitch" : pitch, "shape" : shape, "left_handed" : left_handed, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "bevang" : bevang, "starts" : starts, "ibevel" : ibevel, "ibevel1" : ibevel1, "ibevel2" : ibevel2, "height" : height, "thickness" : thickness, "length" : length, "l" : l, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class square_threaded_rod(_Bosl2Base): def __init__(self, d=None, l=None, pitch=None, left_handed=None, bevel=None, bevel1=None, bevel2=None, starts=None, internal=None, d1=None, d2=None, length=None, h=None, height=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, teardrop=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("square_threaded_rod", {"d" : d, "l" : l, "pitch" : pitch, "left_handed" : left_handed, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "starts" : starts, "internal" : internal, "d1" : d1, "d2" : d2, "length" : length, "h" : h, "height" : height, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "teardrop" : teardrop, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class square_threaded_nut(_Bosl2Base): def __init__(self, nutwidth=None, id=None, h=None, pitch=None, left_handed=None, bevel=None, bevel1=None, bevel2=None, bevang=None, ibevel=None, ibevel1=None, ibevel2=None, height=None, thickness=None, length=None, l=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, starts=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("square_threaded_nut", {"nutwidth" : nutwidth, "id" : id, "h" : h, "pitch" : pitch, "left_handed" : left_handed, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "bevang" : bevang, "ibevel" : ibevel, "ibevel1" : ibevel1, "ibevel2" : ibevel2, "height" : height, "thickness" : thickness, "length" : length, "l" : l, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "starts" : starts, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class ball_screw_rod(_Bosl2Base): def __init__(self, d=None, l=None, pitch=None, ball_diam=None, ball_arc=None, starts=None, left_handed=None, internal=None, length=None, h=None, height=None, bevel=None, bevel1=None, bevel2=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("ball_screw_rod", {"d" : d, "l" : l, "pitch" : pitch, "ball_diam" : ball_diam, "ball_arc" : ball_arc, "starts" : starts, "left_handed" : left_handed, "internal" : internal, "length" : length, "h" : h, "height" : height, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class generic_threaded_rod(_Bosl2Base): def __init__(self, d=None, l=None, pitch=None, profile=None, left_handed=None, internal=None, bevel=None, bevel1=None, bevel2=None, starts=None, d1=None, d2=None, length=None, h=None, height=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, teardrop=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("generic_threaded_rod", {"d" : d, "l" : l, "pitch" : pitch, "profile" : profile, "left_handed" : left_handed, "internal" : internal, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "starts" : starts, "d1" : d1, "d2" : d2, "length" : length, "h" : h, "height" : height, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "teardrop" : teardrop, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class generic_threaded_nut(_Bosl2Base): def __init__(self, nutwidth=None, id=None, h=None, pitch=None, profile=None, shape=None, left_handed=None, starts=None, bevel=None, bevel1=None, bevel2=None, bevang=None, ibevel=None, ibevel1=None, ibevel2=None, id1=None, id2=None, height=None, thickness=None, length=None, l=None, blunt_start=None, blunt_start1=None, blunt_start2=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, end_len=None, end_len1=None, end_len2=None, lead_in_shape=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("generic_threaded_nut", {"nutwidth" : nutwidth, "id" : id, "h" : h, "pitch" : pitch, "profile" : profile, "shape" : shape, "left_handed" : left_handed, "starts" : starts, "bevel" : bevel, "bevel1" : bevel1, "bevel2" : bevel2, "bevang" : bevang, "ibevel" : ibevel, "ibevel1" : ibevel1, "ibevel2" : ibevel2, "id1" : id1, "id2" : id2, "height" : height, "thickness" : thickness, "length" : length, "l" : l, "blunt_start" : blunt_start, "blunt_start1" : blunt_start1, "blunt_start2" : blunt_start2, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "end_len" : end_len, "end_len1" : end_len1, "end_len2" : end_len2, "lead_in_shape" : lead_in_shape, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class _nutshape(_Bosl2Base): def __init__(self, nutwidth=None, h=None, shape=None, bevel1=None, bevel2=None, **kwargs): super().__init__("_nutshape", {"nutwidth" : nutwidth, "h" : h, "shape" : shape, "bevel1" : bevel1, "bevel2" : bevel2, **kwargs}) class thread_helix(_Bosl2Base): def __init__(self, d=None, pitch=None, thread_depth=None, flank_angle=None, turns=None, profile=None, starts=None, left_handed=None, internal=None, d1=None, d2=None, thread_angle=None, lead_in_shape=None, lead_in=None, lead_in1=None, lead_in2=None, lead_in_ang=None, lead_in_ang1=None, lead_in_ang2=None, lead_in_sample=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("thread_helix", {"d" : d, "pitch" : pitch, "thread_depth" : thread_depth, "flank_angle" : flank_angle, "turns" : turns, "profile" : profile, "starts" : starts, "left_handed" : left_handed, "internal" : internal, "d1" : d1, "d2" : d2, "thread_angle" : thread_angle, "lead_in_shape" : lead_in_shape, "lead_in" : lead_in, "lead_in1" : lead_in1, "lead_in2" : lead_in2, "lead_in_ang" : lead_in_ang, "lead_in_ang1" : lead_in_ang1, "lead_in_ang2" : lead_in_ang2, "lead_in_sample" : lead_in_sample, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/transforms.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/transforms.scad'}", False) _NO_ARG = _OpenSCADConstant('_NO_ARG') _transform = _OpenSCADConstant('_transform') class move(_Bosl2Base): def __init__(self, v=None, p=None, **kwargs): super().__init__("move", {"v" : v, "p" : p, **kwargs}) class translate(_Bosl2Base): def __init__(self, v=None, p=None, **kwargs): super().__init__("translate", {"v" : v, "p" : p, **kwargs}) class left(_Bosl2Base): def __init__(self, x=None, p=None, **kwargs): super().__init__("left", {"x" : x, "p" : p, **kwargs}) class right(_Bosl2Base): def __init__(self, x=None, p=None, **kwargs): super().__init__("right", {"x" : x, "p" : p, **kwargs}) class xmove(_Bosl2Base): def __init__(self, x=None, p=None, **kwargs): super().__init__("xmove", {"x" : x, "p" : p, **kwargs}) class fwd(_Bosl2Base): def __init__(self, y=None, p=None, **kwargs): super().__init__("fwd", {"y" : y, "p" : p, **kwargs}) class back(_Bosl2Base): def __init__(self, y=None, p=None, **kwargs): super().__init__("back", {"y" : y, "p" : p, **kwargs}) class ymove(_Bosl2Base): def __init__(self, y=None, p=None, **kwargs): super().__init__("ymove", {"y" : y, "p" : p, **kwargs}) class down(_Bosl2Base): def __init__(self, z=None, p=None, **kwargs): super().__init__("down", {"z" : z, "p" : p, **kwargs}) class up(_Bosl2Base): def __init__(self, z=None, p=None, **kwargs): super().__init__("up", {"z" : z, "p" : p, **kwargs}) class zmove(_Bosl2Base): def __init__(self, z=None, p=None, **kwargs): super().__init__("zmove", {"z" : z, "p" : p, **kwargs}) class rot(_Bosl2Base): def __init__(self, a=None, v=None, cp=None, _from=None, to=None, reverse=None, p=None, **kwargs): super().__init__("rot", {"a" : a, "v" : v, "cp" : cp, "_from" : _from, "to" : to, "reverse" : reverse, "p" : p, **kwargs}) class xrot(_Bosl2Base): def __init__(self, a=None, p=None, cp=None, **kwargs): super().__init__("xrot", {"a" : a, "p" : p, "cp" : cp, **kwargs}) class yrot(_Bosl2Base): def __init__(self, a=None, p=None, cp=None, **kwargs): super().__init__("yrot", {"a" : a, "p" : p, "cp" : cp, **kwargs}) class zrot(_Bosl2Base): def __init__(self, a=None, p=None, cp=None, **kwargs): super().__init__("zrot", {"a" : a, "p" : p, "cp" : cp, **kwargs}) class tilt(_Bosl2Base): def __init__(self, to=None, cp=None, reverse=None, p=None, **kwargs): super().__init__("tilt", {"to" : to, "cp" : cp, "reverse" : reverse, "p" : p, **kwargs}) class scale(_Bosl2Base): def __init__(self, v=None, p=None, cp=None, **kwargs): super().__init__("scale", {"v" : v, "p" : p, "cp" : cp, **kwargs}) class xscale(_Bosl2Base): def __init__(self, x=None, p=None, cp=None, **kwargs): super().__init__("xscale", {"x" : x, "p" : p, "cp" : cp, **kwargs}) class yscale(_Bosl2Base): def __init__(self, y=None, p=None, cp=None, **kwargs): super().__init__("yscale", {"y" : y, "p" : p, "cp" : cp, **kwargs}) class zscale(_Bosl2Base): def __init__(self, z=None, p=None, cp=None, **kwargs): super().__init__("zscale", {"z" : z, "p" : p, "cp" : cp, **kwargs}) class mirror(_Bosl2Base): def __init__(self, v=None, p=None, **kwargs): super().__init__("mirror", {"v" : v, "p" : p, **kwargs}) class xflip(_Bosl2Base): def __init__(self, p=None, x=None, **kwargs): super().__init__("xflip", {"p" : p, "x" : x, **kwargs}) class yflip(_Bosl2Base): def __init__(self, p=None, y=None, **kwargs): super().__init__("yflip", {"p" : p, "y" : y, **kwargs}) class zflip(_Bosl2Base): def __init__(self, p=None, z=None, **kwargs): super().__init__("zflip", {"p" : p, "z" : z, **kwargs}) class frame_map(_Bosl2Base): def __init__(self, x=None, y=None, z=None, p=None, reverse=None, **kwargs): super().__init__("frame_map", {"x" : x, "y" : y, "z" : z, "p" : p, "reverse" : reverse, **kwargs}) class skew(_Bosl2Base): def __init__(self, p=None, sxy=None, sxz=None, syx=None, syz=None, szx=None, szy=None, axy=None, axz=None, ayx=None, ayz=None, azx=None, azy=None, **kwargs): super().__init__("skew", {"p" : p, "sxy" : sxy, "sxz" : sxz, "syx" : syx, "syz" : syz, "szx" : szx, "szy" : szy, "axy" : axy, "axz" : axz, "ayx" : ayx, "ayz" : ayz, "azx" : azx, "azy" : azy, **kwargs}) class is_2d_transform(_Bosl2Base): def __init__(self, t=None, **kwargs): super().__init__("is_2d_transform", {"t" : t, **kwargs}) class apply(_Bosl2Base): def __init__(self, transform=None, points=None, **kwargs): super().__init__("apply", {"transform" : transform, "points" : points, **kwargs}) class _apply(_Bosl2Base): def __init__(self, transform=None, points=None, **kwargs): super().__init__("_apply", {"transform" : transform, "points" : points, **kwargs}) class move(_Bosl2Base): def __init__(self, v=None, p=None, **kwargs): super().__init__("move", {"v" : v, "p" : p, **kwargs}) class left(_Bosl2Base): def __init__(self, x=None, p=None, **kwargs): super().__init__("left", {"x" : x, "p" : p, **kwargs}) class right(_Bosl2Base): def __init__(self, x=None, p=None, **kwargs): super().__init__("right", {"x" : x, "p" : p, **kwargs}) class xmove(_Bosl2Base): def __init__(self, x=None, p=None, **kwargs): super().__init__("xmove", {"x" : x, "p" : p, **kwargs}) class fwd(_Bosl2Base): def __init__(self, y=None, p=None, **kwargs): super().__init__("fwd", {"y" : y, "p" : p, **kwargs}) class back(_Bosl2Base): def __init__(self, y=None, p=None, **kwargs): super().__init__("back", {"y" : y, "p" : p, **kwargs}) class ymove(_Bosl2Base): def __init__(self, y=None, p=None, **kwargs): super().__init__("ymove", {"y" : y, "p" : p, **kwargs}) class down(_Bosl2Base): def __init__(self, z=None, p=None, **kwargs): super().__init__("down", {"z" : z, "p" : p, **kwargs}) class up(_Bosl2Base): def __init__(self, z=None, p=None, **kwargs): super().__init__("up", {"z" : z, "p" : p, **kwargs}) class zmove(_Bosl2Base): def __init__(self, z=None, p=None, **kwargs): super().__init__("zmove", {"z" : z, "p" : p, **kwargs}) class rot(_Bosl2Base): def __init__(self, a=None, v=None, cp=None, _from=None, to=None, reverse=None, **kwargs): super().__init__("rot", {"a" : a, "v" : v, "cp" : cp, "_from" : _from, "to" : to, "reverse" : reverse, **kwargs}) class xrot(_Bosl2Base): def __init__(self, a=None, p=None, cp=None, **kwargs): super().__init__("xrot", {"a" : a, "p" : p, "cp" : cp, **kwargs}) class yrot(_Bosl2Base): def __init__(self, a=None, p=None, cp=None, **kwargs): super().__init__("yrot", {"a" : a, "p" : p, "cp" : cp, **kwargs}) class zrot(_Bosl2Base): def __init__(self, a=None, p=None, cp=None, **kwargs): super().__init__("zrot", {"a" : a, "p" : p, "cp" : cp, **kwargs}) class tilt(_Bosl2Base): def __init__(self, to=None, cp=None, reverse=None, **kwargs): super().__init__("tilt", {"to" : to, "cp" : cp, "reverse" : reverse, **kwargs}) class xscale(_Bosl2Base): def __init__(self, x=None, p=None, cp=None, **kwargs): super().__init__("xscale", {"x" : x, "p" : p, "cp" : cp, **kwargs}) class yscale(_Bosl2Base): def __init__(self, y=None, p=None, cp=None, **kwargs): super().__init__("yscale", {"y" : y, "p" : p, "cp" : cp, **kwargs}) class zscale(_Bosl2Base): def __init__(self, z=None, p=None, cp=None, **kwargs): super().__init__("zscale", {"z" : z, "p" : p, "cp" : cp, **kwargs}) class xflip(_Bosl2Base): def __init__(self, p=None, x=None, **kwargs): super().__init__("xflip", {"p" : p, "x" : x, **kwargs}) class yflip(_Bosl2Base): def __init__(self, p=None, y=None, **kwargs): super().__init__("yflip", {"p" : p, "y" : y, **kwargs}) class zflip(_Bosl2Base): def __init__(self, p=None, z=None, **kwargs): super().__init__("zflip", {"p" : p, "z" : z, **kwargs}) class frame_map(_Bosl2Base): def __init__(self, x=None, y=None, z=None, p=None, reverse=None, **kwargs): super().__init__("frame_map", {"x" : x, "y" : y, "z" : z, "p" : p, "reverse" : reverse, **kwargs}) class skew(_Bosl2Base): def __init__(self, p=None, sxy=None, sxz=None, syx=None, syz=None, szx=None, szy=None, axy=None, axz=None, ayx=None, ayz=None, azx=None, azy=None, **kwargs): super().__init__("skew", {"p" : p, "sxy" : sxy, "sxz" : sxz, "syx" : syx, "syz" : syz, "szx" : szx, "szy" : szy, "axy" : axy, "axz" : axz, "ayx" : ayx, "ayz" : ayz, "azx" : azx, "azy" : azy, **kwargs}) class translate(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("translate", {"v" : v, **kwargs}) class rotate(_Bosl2Base): def __init__(self, a=None, v=None, **kwargs): super().__init__("rotate", {"a" : a, "v" : v, **kwargs}) class scale(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("scale", {"v" : v, **kwargs}) class multmatrix(_Bosl2Base): def __init__(self, m=None, **kwargs): super().__init__("multmatrix", {"m" : m, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/trigonometry.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/trigonometry.scad'}", False) class law_of_cosines(_Bosl2Base): def __init__(self, a=None, b=None, c=None, C=None, **kwargs): super().__init__("law_of_cosines", {"a" : a, "b" : b, "c" : c, "C" : C, **kwargs}) class law_of_sines(_Bosl2Base): def __init__(self, a=None, A=None, b=None, B=None, **kwargs): super().__init__("law_of_sines", {"a" : a, "A" : A, "b" : b, "B" : B, **kwargs}) class hyp_opp_to_adj(_Bosl2Base): def __init__(self, hyp=None, opp=None, **kwargs): super().__init__("hyp_opp_to_adj", {"hyp" : hyp, "opp" : opp, **kwargs}) class opp_hyp_to_adj(_Bosl2Base): def __init__(self, opp=None, hyp=None, **kwargs): super().__init__("opp_hyp_to_adj", {"opp" : opp, "hyp" : hyp, **kwargs}) class hyp_ang_to_adj(_Bosl2Base): def __init__(self, hyp=None, ang=None, **kwargs): super().__init__("hyp_ang_to_adj", {"hyp" : hyp, "ang" : ang, **kwargs}) class ang_hyp_to_adj(_Bosl2Base): def __init__(self, ang=None, hyp=None, **kwargs): super().__init__("ang_hyp_to_adj", {"ang" : ang, "hyp" : hyp, **kwargs}) class opp_ang_to_adj(_Bosl2Base): def __init__(self, opp=None, ang=None, **kwargs): super().__init__("opp_ang_to_adj", {"opp" : opp, "ang" : ang, **kwargs}) class ang_opp_to_adj(_Bosl2Base): def __init__(self, ang=None, opp=None, **kwargs): super().__init__("ang_opp_to_adj", {"ang" : ang, "opp" : opp, **kwargs}) class hyp_adj_to_opp(_Bosl2Base): def __init__(self, hyp=None, adj=None, **kwargs): super().__init__("hyp_adj_to_opp", {"hyp" : hyp, "adj" : adj, **kwargs}) class adj_hyp_to_opp(_Bosl2Base): def __init__(self, adj=None, hyp=None, **kwargs): super().__init__("adj_hyp_to_opp", {"adj" : adj, "hyp" : hyp, **kwargs}) class hyp_ang_to_opp(_Bosl2Base): def __init__(self, hyp=None, ang=None, **kwargs): super().__init__("hyp_ang_to_opp", {"hyp" : hyp, "ang" : ang, **kwargs}) class ang_hyp_to_opp(_Bosl2Base): def __init__(self, ang=None, hyp=None, **kwargs): super().__init__("ang_hyp_to_opp", {"ang" : ang, "hyp" : hyp, **kwargs}) class adj_ang_to_opp(_Bosl2Base): def __init__(self, adj=None, ang=None, **kwargs): super().__init__("adj_ang_to_opp", {"adj" : adj, "ang" : ang, **kwargs}) class ang_adj_to_opp(_Bosl2Base): def __init__(self, ang=None, adj=None, **kwargs): super().__init__("ang_adj_to_opp", {"ang" : ang, "adj" : adj, **kwargs}) class adj_opp_to_hyp(_Bosl2Base): def __init__(self, adj=None, opp=None, **kwargs): super().__init__("adj_opp_to_hyp", {"adj" : adj, "opp" : opp, **kwargs}) class opp_adj_to_hyp(_Bosl2Base): def __init__(self, opp=None, adj=None, **kwargs): super().__init__("opp_adj_to_hyp", {"opp" : opp, "adj" : adj, **kwargs}) class adj_ang_to_hyp(_Bosl2Base): def __init__(self, adj=None, ang=None, **kwargs): super().__init__("adj_ang_to_hyp", {"adj" : adj, "ang" : ang, **kwargs}) class ang_adj_to_hyp(_Bosl2Base): def __init__(self, ang=None, adj=None, **kwargs): super().__init__("ang_adj_to_hyp", {"ang" : ang, "adj" : adj, **kwargs}) class opp_ang_to_hyp(_Bosl2Base): def __init__(self, opp=None, ang=None, **kwargs): super().__init__("opp_ang_to_hyp", {"opp" : opp, "ang" : ang, **kwargs}) class ang_opp_to_hyp(_Bosl2Base): def __init__(self, ang=None, opp=None, **kwargs): super().__init__("ang_opp_to_hyp", {"ang" : ang, "opp" : opp, **kwargs}) class hyp_adj_to_ang(_Bosl2Base): def __init__(self, hyp=None, adj=None, **kwargs): super().__init__("hyp_adj_to_ang", {"hyp" : hyp, "adj" : adj, **kwargs}) class adj_hyp_to_ang(_Bosl2Base): def __init__(self, adj=None, hyp=None, **kwargs): super().__init__("adj_hyp_to_ang", {"adj" : adj, "hyp" : hyp, **kwargs}) class hyp_opp_to_ang(_Bosl2Base): def __init__(self, hyp=None, opp=None, **kwargs): super().__init__("hyp_opp_to_ang", {"hyp" : hyp, "opp" : opp, **kwargs}) class opp_hyp_to_ang(_Bosl2Base): def __init__(self, opp=None, hyp=None, **kwargs): super().__init__("opp_hyp_to_ang", {"opp" : opp, "hyp" : hyp, **kwargs}) class adj_opp_to_ang(_Bosl2Base): def __init__(self, adj=None, opp=None, **kwargs): super().__init__("adj_opp_to_ang", {"adj" : adj, "opp" : opp, **kwargs}) class opp_adj_to_ang(_Bosl2Base): def __init__(self, opp=None, adj=None, **kwargs): super().__init__("opp_adj_to_ang", {"opp" : opp, "adj" : adj, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/tripod_mounts.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/tripod_mounts.scad'}", False) class manfrotto_rc2_plate(_Bosl2Base): def __init__(self, chamfer=None, anchor=None, orient=None, spin=None, **kwargs): super().__init__("manfrotto_rc2_plate", {"chamfer" : chamfer, "anchor" : anchor, "orient" : orient, "spin" : spin, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/turtle3d.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/turtle3d.scad'}", False) class _transpart(_Bosl2Base): def __init__(self, T=None, **kwargs): super().__init__("_transpart", {"T" : T, **kwargs}) class _rotpart(_Bosl2Base): def __init__(self, T=None, **kwargs): super().__init__("_rotpart", {"T" : T, **kwargs}) class _turtle3d_state_valid(_Bosl2Base): def __init__(self, state=None, **kwargs): super().__init__("_turtle3d_state_valid", {"state" : state, **kwargs}) class turtle3d(_Bosl2Base): def __init__(self, commands=None, state=None, transforms=None, full_state=None, repeat=None, **kwargs): super().__init__("turtle3d", {"commands" : commands, "state" : state, "transforms" : transforms, "full_state" : full_state, "repeat" : repeat, **kwargs}) class _turtle3d_repeat(_Bosl2Base): def __init__(self, commands=None, state=None, repeat=None, **kwargs): super().__init__("_turtle3d_repeat", {"commands" : commands, "state" : state, "repeat" : repeat, **kwargs}) class _turtle3d_command_len(_Bosl2Base): def __init__(self, commands=None, index=None, **kwargs): super().__init__("_turtle3d_command_len", {"commands" : commands, "index" : index, **kwargs}) class _turtle3d(_Bosl2Base): def __init__(self, commands=None, state=None, index=None, **kwargs): super().__init__("_turtle3d", {"commands" : commands, "state" : state, "index" : index, **kwargs}) class _turtle3d_rotation(_Bosl2Base): def __init__(self, command=None, angle=None, center=None, **kwargs): super().__init__("_turtle3d_rotation", {"command" : command, "angle" : angle, "center" : center, **kwargs}) class _tupdate(_Bosl2Base): def __init__(self, state=None, tran=None, pretran=None, **kwargs): super().__init__("_tupdate", {"state" : state, "tran" : tran, "pretran" : pretran, **kwargs}) class _turtle3d_command(_Bosl2Base): def __init__(self, command=None, parm=None, parm2=None, state=None, index=None, **kwargs): super().__init__("_turtle3d_command", {"command" : command, "parm" : parm, "parm2" : parm2, "state" : state, "index" : index, **kwargs}) class _turtle3d_list_command(_Bosl2Base): def __init__(self, command=None, arcsteps=None, movescale=None, lastT=None, lastPre=None, index=None, **kwargs): super().__init__("_turtle3d_list_command", {"command" : command, "arcsteps" : arcsteps, "movescale" : movescale, "lastT" : lastT, "lastPre" : lastPre, "index" : index, **kwargs}) class turtle3d(_Bosl2Base): def __init__(self, commands=None, state=None, transforms=None, full_state=None, repeat=None, **kwargs): super().__init__("turtle3d", {"commands" : commands, "state" : state, "transforms" : transforms, "full_state" : full_state, "repeat" : repeat, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/utility.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/utility.scad'}", False) class typeof(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("typeof", {"x" : x, **kwargs}) class is_type(_Bosl2Base): def __init__(self, x=None, types=None, **kwargs): super().__init__("is_type", {"x" : x, "types" : types, **kwargs}) class is_def(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("is_def", {"x" : x, **kwargs}) class is_str(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("is_str", {"x" : x, **kwargs}) class is_int(_Bosl2Base): def __init__(self, n=None, **kwargs): super().__init__("is_int", {"n" : n, **kwargs}) class is_integer(_Bosl2Base): def __init__(self, n=None, **kwargs): super().__init__("is_integer", {"n" : n, **kwargs}) class all_integer(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("all_integer", {"x" : x, **kwargs}) class is_nan(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("is_nan", {"x" : x, **kwargs}) class is_finite(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("is_finite", {"x" : x, **kwargs}) class is_range(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("is_range", {"x" : x, **kwargs}) class valid_range(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("valid_range", {"x" : x, **kwargs}) class is_func(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("is_func", {"x" : x, **kwargs}) class is_consistent(_Bosl2Base): def __init__(self, list=None, pattern=None, **kwargs): super().__init__("is_consistent", {"list" : list, "pattern" : pattern, **kwargs}) class _list_pattern(_Bosl2Base): def __init__(self, list=None, **kwargs): super().__init__("_list_pattern", {"list" : list, **kwargs}) class same_shape(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("same_shape", {"a" : a, "b" : b, **kwargs}) class is_bool_list(_Bosl2Base): def __init__(self, list=None, length=None, **kwargs): super().__init__("is_bool_list", {"list" : list, "length" : length, **kwargs}) class any(_Bosl2Base): def __init__(self, l=None, func=None, **kwargs): super().__init__("any", {"l" : l, "func" : func, **kwargs}) class _any_func(_Bosl2Base): def __init__(self, l=None, func=None, i=None, out=None, **kwargs): super().__init__("_any_func", {"l" : l, "func" : func, "i" : i, "out" : out, **kwargs}) class _any_bool(_Bosl2Base): def __init__(self, l=None, i=None, out=None, **kwargs): super().__init__("_any_bool", {"l" : l, "i" : i, "out" : out, **kwargs}) class all(_Bosl2Base): def __init__(self, l=None, func=None, **kwargs): super().__init__("all", {"l" : l, "func" : func, **kwargs}) class _all_func(_Bosl2Base): def __init__(self, l=None, func=None, i=None, out=None, **kwargs): super().__init__("_all_func", {"l" : l, "func" : func, "i" : i, "out" : out, **kwargs}) class _all_bool(_Bosl2Base): def __init__(self, l=None, i=None, out=None, **kwargs): super().__init__("_all_bool", {"l" : l, "i" : i, "out" : out, **kwargs}) class num_true(_Bosl2Base): def __init__(self, l=None, func=None, **kwargs): super().__init__("num_true", {"l" : l, "func" : func, **kwargs}) class default(_Bosl2Base): def __init__(self, v=None, dflt=None, **kwargs): super().__init__("default", {"v" : v, "dflt" : dflt, **kwargs}) class first_defined(_Bosl2Base): def __init__(self, v=None, recursive=None, _i=None, **kwargs): super().__init__("first_defined", {"v" : v, "recursive" : recursive, "_i" : _i, **kwargs}) class one_defined(_Bosl2Base): def __init__(self, vals=None, names=None, dflt=None, **kwargs): super().__init__("one_defined", {"vals" : vals, "names" : names, "dflt" : dflt, **kwargs}) class num_defined(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("num_defined", {"v" : v, **kwargs}) class any_defined(_Bosl2Base): def __init__(self, v=None, recursive=None, **kwargs): super().__init__("any_defined", {"v" : v, "recursive" : recursive, **kwargs}) class all_defined(_Bosl2Base): def __init__(self, v=None, recursive=None, **kwargs): super().__init__("all_defined", {"v" : v, "recursive" : recursive, **kwargs}) class u_add(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("u_add", {"a" : a, "b" : b, **kwargs}) class u_sub(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("u_sub", {"a" : a, "b" : b, **kwargs}) class u_mul(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("u_mul", {"a" : a, "b" : b, **kwargs}) class u_div(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("u_div", {"a" : a, "b" : b, **kwargs}) class get_anchor(_Bosl2Base): def __init__(self, anchor=None, center=None, uncentered=None, dflt=None, **kwargs): super().__init__("get_anchor", {"anchor" : anchor, "center" : center, "uncentered" : uncentered, "dflt" : dflt, **kwargs}) class get_radius(_Bosl2Base): def __init__(self, r1=None, r2=None, r=None, d1=None, d2=None, d=None, dflt=None, **kwargs): super().__init__("get_radius", {"r1" : r1, "r2" : r2, "r" : r, "d1" : d1, "d2" : d2, "d" : d, "dflt" : dflt, **kwargs}) class scalar_vec3(_Bosl2Base): def __init__(self, v=None, dflt=None, **kwargs): super().__init__("scalar_vec3", {"v" : v, "dflt" : dflt, **kwargs}) class segs(_Bosl2Base): def __init__(self, r=None, **kwargs): super().__init__("segs", {"r" : r, **kwargs}) class no_function(_Bosl2Base): def __init__(self, name=None, **kwargs): super().__init__("no_function", {"name" : name, **kwargs}) class _valstr(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("_valstr", {"x" : x, **kwargs}) class looping(_Bosl2Base): def __init__(self, state=None, **kwargs): super().__init__("looping", {"state" : state, **kwargs}) class loop_while(_Bosl2Base): def __init__(self, state=None, _continue=None, **kwargs): super().__init__("loop_while", {"state" : state, "_continue" : _continue, **kwargs}) class loop_done(_Bosl2Base): def __init__(self, state=None, **kwargs): super().__init__("loop_done", {"state" : state, **kwargs}) class no_children(_Bosl2Base): def __init__(self, count=None, **kwargs): super().__init__("no_children", {"count" : count, **kwargs}) class req_children(_Bosl2Base): def __init__(self, count=None, **kwargs): super().__init__("req_children", {"count" : count, **kwargs}) class no_module(_Bosl2Base): def __init__(self, **kwargs): super().__init__("no_module", {**kwargs}) class deprecate(_Bosl2Base): def __init__(self, new_name=None, **kwargs): super().__init__("deprecate", {"new_name" : new_name, **kwargs}) class echo_viewport(_Bosl2Base): def __init__(self, **kwargs): super().__init__("echo_viewport", {**kwargs}) class assert_approx(_Bosl2Base): def __init__(self, got=None, expected=None, info=None, **kwargs): super().__init__("assert_approx", {"got" : got, "expected" : expected, "info" : info, **kwargs}) class assert_equal(_Bosl2Base): def __init__(self, got=None, expected=None, info=None, **kwargs): super().__init__("assert_equal", {"got" : got, "expected" : expected, "info" : info, **kwargs}) class shape_compare(_Bosl2Base): def __init__(self, eps=None, **kwargs): super().__init__("shape_compare", {"eps" : eps, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/vectors.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/vectors.scad'}", False) class is_vector(_Bosl2Base): def __init__(self, v=None, length=None, zero=None, all_nonzero=None, eps=None, **kwargs): super().__init__("is_vector", {"v" : v, "length" : length, "zero" : zero, "all_nonzero" : all_nonzero, "eps" : eps, **kwargs}) class add_scalar(_Bosl2Base): def __init__(self, v=None, s=None, **kwargs): super().__init__("add_scalar", {"v" : v, "s" : s, **kwargs}) class v_mul(_Bosl2Base): def __init__(self, v1=None, v2=None, **kwargs): super().__init__("v_mul", {"v1" : v1, "v2" : v2, **kwargs}) class v_div(_Bosl2Base): def __init__(self, v1=None, v2=None, **kwargs): super().__init__("v_div", {"v1" : v1, "v2" : v2, **kwargs}) class v_abs(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("v_abs", {"v" : v, **kwargs}) class v_ceil(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("v_ceil", {"v" : v, **kwargs}) class v_floor(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("v_floor", {"v" : v, **kwargs}) class v_round(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("v_round", {"v" : v, **kwargs}) class v_lookup(_Bosl2Base): def __init__(self, x=None, v=None, **kwargs): super().__init__("v_lookup", {"x" : x, "v" : v, **kwargs}) class unit(_Bosl2Base): def __init__(self, v=None, error=None, **kwargs): super().__init__("unit", {"v" : v, "error" : error, **kwargs}) class v_theta(_Bosl2Base): def __init__(self, v=None, **kwargs): super().__init__("v_theta", {"v" : v, **kwargs}) class vector_angle(_Bosl2Base): def __init__(self, v1=None, v2=None, v3=None, **kwargs): super().__init__("vector_angle", {"v1" : v1, "v2" : v2, "v3" : v3, **kwargs}) class vector_axis(_Bosl2Base): def __init__(self, v1=None, v2=None, v3=None, **kwargs): super().__init__("vector_axis", {"v1" : v1, "v2" : v2, "v3" : v3, **kwargs}) class vector_bisect(_Bosl2Base): def __init__(self, v1=None, v2=None, **kwargs): super().__init__("vector_bisect", {"v1" : v1, "v2" : v2, **kwargs}) class vector_perp(_Bosl2Base): def __init__(self, v=None, w=None, **kwargs): super().__init__("vector_perp", {"v" : v, "w" : w, **kwargs}) class closest_point(_Bosl2Base): def __init__(self, pt=None, points=None, **kwargs): super().__init__("closest_point", {"pt" : pt, "points" : points, **kwargs}) class furthest_point(_Bosl2Base): def __init__(self, pt=None, points=None, **kwargs): super().__init__("furthest_point", {"pt" : pt, "points" : points, **kwargs}) class vector_search(_Bosl2Base): def __init__(self, query=None, r=None, target=None, **kwargs): super().__init__("vector_search", {"query" : query, "r" : r, "target" : target, **kwargs}) class _bt_search(_Bosl2Base): def __init__(self, query=None, r=None, points=None, tree=None, **kwargs): super().__init__("_bt_search", {"query" : query, "r" : r, "points" : points, "tree" : tree, **kwargs}) class vector_search_tree(_Bosl2Base): def __init__(self, points=None, leafsize=None, treemin=None, **kwargs): super().__init__("vector_search_tree", {"points" : points, "leafsize" : leafsize, "treemin" : treemin, **kwargs}) class _bt_tree(_Bosl2Base): def __init__(self, points=None, ind=None, leafsize=None, **kwargs): super().__init__("_bt_tree", {"points" : points, "ind" : ind, "leafsize" : leafsize, **kwargs}) class vector_nearest(_Bosl2Base): def __init__(self, query=None, k=None, target=None, **kwargs): super().__init__("vector_nearest", {"query" : query, "k" : k, "target" : target, **kwargs}) class _bt_nearest(_Bosl2Base): def __init__(self, p=None, k=None, points=None, tree=None, answers=None, **kwargs): super().__init__("_bt_nearest", {"p" : p, "k" : k, "points" : points, "tree" : tree, "answers" : answers, **kwargs}) class _insert_sorted(_Bosl2Base): def __init__(self, list=None, k=None, new=None, **kwargs): super().__init__("_insert_sorted", {"list" : list, "k" : k, "new" : new, **kwargs}) class _insert_many(_Bosl2Base): def __init__(self, list=None, k=None, newlist=None, i=None, **kwargs): super().__init__("_insert_many", {"list" : list, "k" : k, "newlist" : newlist, "i" : i, **kwargs}) class pointlist_bounds(_Bosl2Base): def __init__(self, pts=None, **kwargs): super().__init__("pointlist_bounds", {"pts" : pts, **kwargs}) class fit_to_box(_Bosl2Base): def __init__(self, pts=None, x=None, y=None, z=None, **kwargs): super().__init__("fit_to_box", {"pts" : pts, "x" : x, "y" : y, "z" : z, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/version.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/version.scad'}", False) BOSL_VERSION = _OpenSCADConstant('BOSL_VERSION') class bosl_version(_Bosl2Base): def __init__(self, **kwargs): super().__init__("bosl_version", {**kwargs}) class bosl_version_num(_Bosl2Base): def __init__(self, **kwargs): super().__init__("bosl_version_num", {**kwargs}) class bosl_version_str(_Bosl2Base): def __init__(self, **kwargs): super().__init__("bosl_version_str", {**kwargs}) class _version_split_str(_Bosl2Base): def __init__(self, x=None, _i=None, _out=None, _num=None, **kwargs): super().__init__("_version_split_str", {"x" : x, "_i" : _i, "_out" : _out, "_num" : _num, **kwargs}) class version_to_list(_Bosl2Base): def __init__(self, version=None, **kwargs): super().__init__("version_to_list", {"version" : version, **kwargs}) class version_to_str(_Bosl2Base): def __init__(self, version=None, **kwargs): super().__init__("version_to_str", {"version" : version, **kwargs}) class version_to_num(_Bosl2Base): def __init__(self, version=None, **kwargs): super().__init__("version_to_num", {"version" : version, **kwargs}) class version_cmp(_Bosl2Base): def __init__(self, a=None, b=None, **kwargs): super().__init__("version_cmp", {"a" : a, "b" : b, **kwargs}) class bosl_required(_Bosl2Base): def __init__(self, version=None, **kwargs): super().__init__("bosl_required", {"version" : version, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/vnf.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/vnf.scad'}", False) EMPTY_VNF = _OpenSCADConstant('EMPTY_VNF') _vnf_validate_errs = _OpenSCADConstant('_vnf_validate_errs') class vnf_vertex_array(_Bosl2Base): def __init__(self, points=None, caps=None, cap1=None, cap2=None, col_wrap=None, row_wrap=None, reverse=None, style=None, triangulate=None, return_edges=None, texture=None, tex_reps=None, tex_size=None, tex_samples=None, tex_inset=None, tex_rot=None, tex_scaling=None, tex_depth=None, tex_extra=None, tex_skip=None, sidecaps=None, sidecap1=None, sidecap2=None, normals=None, **kwargs): super().__init__("vnf_vertex_array", {"points" : points, "caps" : caps, "cap1" : cap1, "cap2" : cap2, "col_wrap" : col_wrap, "row_wrap" : row_wrap, "reverse" : reverse, "style" : style, "triangulate" : triangulate, "return_edges" : return_edges, "texture" : texture, "tex_reps" : tex_reps, "tex_size" : tex_size, "tex_samples" : tex_samples, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "tex_scaling" : tex_scaling, "tex_depth" : tex_depth, "tex_extra" : tex_extra, "tex_skip" : tex_skip, "sidecaps" : sidecaps, "sidecap1" : sidecap1, "sidecap2" : sidecap2, "normals" : normals, **kwargs}) class vnf_tri_array(_Bosl2Base): def __init__(self, points=None, caps=None, cap1=None, cap2=None, col_wrap=None, row_wrap=None, reverse=None, limit_bunching=None, **kwargs): super().__init__("vnf_tri_array", {"points" : points, "caps" : caps, "cap1" : cap1, "cap2" : cap2, "col_wrap" : col_wrap, "row_wrap" : row_wrap, "reverse" : reverse, "limit_bunching" : limit_bunching, **kwargs}) class _lofttri(_Bosl2Base): def __init__(self, p1=None, p2=None, i1offset=None, i2offset=None, n1=None, n2=None, reverse=None, trilist=None, i1=None, i2=None, tricount1=None, tricount2=None, trimax=None, **kwargs): super().__init__("_lofttri", {"p1" : p1, "p2" : p2, "i1offset" : i1offset, "i2offset" : i2offset, "n1" : n1, "n2" : n2, "reverse" : reverse, "trilist" : trilist, "i1" : i1, "i2" : i2, "tricount1" : tricount1, "tricount2" : tricount2, "trimax" : trimax, **kwargs}) class vnf_join(_Bosl2Base): def __init__(self, vnfs=None, **kwargs): super().__init__("vnf_join", {"vnfs" : vnfs, **kwargs}) class vnf_from_polygons(_Bosl2Base): def __init__(self, polygons=None, fast=None, eps=None, **kwargs): super().__init__("vnf_from_polygons", {"polygons" : polygons, "fast" : fast, "eps" : eps, **kwargs}) class _path_path_closest_vertices(_Bosl2Base): def __init__(self, path1=None, path2=None, **kwargs): super().__init__("_path_path_closest_vertices", {"path1" : path1, "path2" : path2, **kwargs}) class _join_paths_at_vertices(_Bosl2Base): def __init__(self, path1=None, path2=None, v1=None, v2=None, **kwargs): super().__init__("_join_paths_at_vertices", {"path1" : path1, "path2" : path2, "v1" : v1, "v2" : v2, **kwargs}) class _cleave_connected_region(_Bosl2Base): def __init__(self, region=None, eps=None, **kwargs): super().__init__("_cleave_connected_region", {"region" : region, "eps" : eps, **kwargs}) class _polyHoles(_Bosl2Base): def __init__(self, outer=None, holes=None, extremes=None, eps=None, n=None, **kwargs): super().__init__("_polyHoles", {"outer" : outer, "holes" : holes, "extremes" : extremes, "eps" : eps, "n" : n, **kwargs}) class _bridge(_Bosl2Base): def __init__(self, pt=None, outer=None, eps=None, **kwargs): super().__init__("_bridge", {"pt" : pt, "outer" : outer, "eps" : eps, **kwargs}) class vnf_from_region(_Bosl2Base): def __init__(self, region=None, transform=None, reverse=None, triangulate=None, **kwargs): super().__init__("vnf_from_region", {"region" : region, "transform" : transform, "reverse" : reverse, "triangulate" : triangulate, **kwargs}) class is_vnf(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("is_vnf", {"x" : x, **kwargs}) class is_vnf_list(_Bosl2Base): def __init__(self, x=None, **kwargs): super().__init__("is_vnf_list", {"x" : x, **kwargs}) class vnf_vertices(_Bosl2Base): def __init__(self, vnf=None, **kwargs): super().__init__("vnf_vertices", {"vnf" : vnf, **kwargs}) class vnf_faces(_Bosl2Base): def __init__(self, vnf=None, **kwargs): super().__init__("vnf_faces", {"vnf" : vnf, **kwargs}) class vnf_reverse_faces(_Bosl2Base): def __init__(self, vnf=None, **kwargs): super().__init__("vnf_reverse_faces", {"vnf" : vnf, **kwargs}) class vnf_quantize(_Bosl2Base): def __init__(self, vnf=None, q=None, **kwargs): super().__init__("vnf_quantize", {"vnf" : vnf, "q" : q, **kwargs}) class vnf_merge_points(_Bosl2Base): def __init__(self, vnf=None, eps=None, **kwargs): super().__init__("vnf_merge_points", {"vnf" : vnf, "eps" : eps, **kwargs}) class vnf_drop_unused_points(_Bosl2Base): def __init__(self, vnf=None, **kwargs): super().__init__("vnf_drop_unused_points", {"vnf" : vnf, **kwargs}) class _link_indicator(_Bosl2Base): def __init__(self, l=None, imin=None, imax=None, **kwargs): super().__init__("_link_indicator", {"l" : l, "imin" : imin, "imax" : imax, **kwargs}) class vnf_triangulate(_Bosl2Base): def __init__(self, vnf=None, **kwargs): super().__init__("vnf_triangulate", {"vnf" : vnf, **kwargs}) class vnf_unify_faces(_Bosl2Base): def __init__(self, vnf=None, **kwargs): super().__init__("vnf_unify_faces", {"vnf" : vnf, **kwargs}) class _detri_combine_faces(_Bosl2Base): def __init__(self, edgelist=None, faces=None, normals=None, facelist=None, curface=None, **kwargs): super().__init__("_detri_combine_faces", {"edgelist" : edgelist, "faces" : faces, "normals" : normals, "facelist" : facelist, "curface" : curface, **kwargs}) class vnf_slice(_Bosl2Base): def __init__(self, vnf=None, dir=None, cuts=None, **kwargs): super().__init__("vnf_slice", {"vnf" : vnf, "dir" : dir, "cuts" : cuts, **kwargs}) class _shift_cut_plane(_Bosl2Base): def __init__(self, vnf=None, dir=None, cut=None, off=None, **kwargs): super().__init__("_shift_cut_plane", {"vnf" : vnf, "dir" : dir, "cut" : cut, "off" : off, **kwargs}) class _split_polygon_at_x(_Bosl2Base): def __init__(self, poly=None, x=None, **kwargs): super().__init__("_split_polygon_at_x", {"poly" : poly, "x" : x, **kwargs}) class _split_2dpolygons_at_each_x(_Bosl2Base): def __init__(self, polys=None, xs=None, _i=None, **kwargs): super().__init__("_split_2dpolygons_at_each_x", {"polys" : polys, "xs" : xs, "_i" : _i, **kwargs}) class _slice_3dpolygons(_Bosl2Base): def __init__(self, polys=None, dir=None, cuts=None, **kwargs): super().__init__("_slice_3dpolygons", {"polys" : polys, "dir" : dir, "cuts" : cuts, **kwargs}) class vnf_volume(_Bosl2Base): def __init__(self, vnf=None, **kwargs): super().__init__("vnf_volume", {"vnf" : vnf, **kwargs}) class vnf_area(_Bosl2Base): def __init__(self, vnf=None, **kwargs): super().__init__("vnf_area", {"vnf" : vnf, **kwargs}) class _vnf_centroid(_Bosl2Base): def __init__(self, vnf=None, eps=None, **kwargs): super().__init__("_vnf_centroid", {"vnf" : vnf, "eps" : eps, **kwargs}) class vnf_bounds(_Bosl2Base): def __init__(self, vnf=None, fast=None, **kwargs): super().__init__("vnf_bounds", {"vnf" : vnf, "fast" : fast, **kwargs}) class projection(_Bosl2Base): def __init__(self, vnf=None, cut=None, z=None, eps=None, **kwargs): super().__init__("projection", {"vnf" : vnf, "cut" : cut, "z" : z, "eps" : eps, **kwargs}) class vnf_halfspace(_Bosl2Base): def __init__(self, plane=None, vnf=None, closed=None, boundary=None, **kwargs): super().__init__("vnf_halfspace", {"plane" : plane, "vnf" : vnf, "closed" : closed, "boundary" : boundary, **kwargs}) class _assemble_paths(_Bosl2Base): def __init__(self, vertices=None, edges=None, paths=None, i=None, **kwargs): super().__init__("_assemble_paths", {"vertices" : vertices, "edges" : edges, "paths" : paths, "i" : i, **kwargs}) class _vnfcut(_Bosl2Base): def __init__(self, plane=None, vertices=None, vertexmap=None, inside=None, faces=None, vertcount=None, newfaces=None, newedges=None, newvertices=None, i=None, **kwargs): super().__init__("_vnfcut", {"plane" : plane, "vertices" : vertices, "vertexmap" : vertexmap, "inside" : inside, "faces" : faces, "vertcount" : vertcount, "newfaces" : newfaces, "newedges" : newedges, "newvertices" : newvertices, "i" : i, **kwargs}) class _triangulate_planar_convex_polygons(_Bosl2Base): def __init__(self, polys=None, **kwargs): super().__init__("_triangulate_planar_convex_polygons", {"polys" : polys, **kwargs}) class vnf_bend(_Bosl2Base): def __init__(self, vnf=None, r=None, d=None, axis=None, **kwargs): super().__init__("vnf_bend", {"vnf" : vnf, "r" : r, "d" : d, "axis" : axis, **kwargs}) class vnf_hull(_Bosl2Base): def __init__(self, vnf=None, **kwargs): super().__init__("vnf_hull", {"vnf" : vnf, **kwargs}) class _sort_pairs0(_Bosl2Base): def __init__(self, arr=None, **kwargs): super().__init__("_sort_pairs0", {"arr" : arr, **kwargs}) class vnf_boundary(_Bosl2Base): def __init__(self, vnf=None, merge=None, idx=None, **kwargs): super().__init__("vnf_boundary", {"vnf" : vnf, "merge" : merge, "idx" : idx, **kwargs}) class vnf_small_offset(_Bosl2Base): def __init__(self, vnf=None, delta=None, merge=None, **kwargs): super().__init__("vnf_small_offset", {"vnf" : vnf, "delta" : delta, "merge" : merge, **kwargs}) class vnf_sheet(_Bosl2Base): def __init__(self, vnf=None, delta=None, style=None, merge=None, thickness=None, **kwargs): super().__init__("vnf_sheet", {"vnf" : vnf, "delta" : delta, "style" : style, "merge" : merge, "thickness" : thickness, **kwargs}) class _vnf_validate(_Bosl2Base): def __init__(self, vnf=None, show_warns=None, check_isects=None, **kwargs): super().__init__("_vnf_validate", {"vnf" : vnf, "show_warns" : show_warns, "check_isects" : check_isects, **kwargs}) class _vnf_validate_err(_Bosl2Base): def __init__(self, name=None, extra=None, **kwargs): super().__init__("_vnf_validate_err", {"name" : name, "extra" : extra, **kwargs}) class _pts_not_reported(_Bosl2Base): def __init__(self, pts=None, varr=None, reports=None, **kwargs): super().__init__("_pts_not_reported", {"pts" : pts, "varr" : varr, "reports" : reports, **kwargs}) class _edge_not_reported(_Bosl2Base): def __init__(self, edge=None, varr=None, reports=None, **kwargs): super().__init__("_edge_not_reported", {"edge" : edge, "varr" : varr, "reports" : reports, **kwargs}) class _vnf_find_edge_faces(_Bosl2Base): def __init__(self, vnf=None, edge=None, **kwargs): super().__init__("_vnf_find_edge_faces", {"vnf" : vnf, "edge" : edge, **kwargs}) class _vnf_find_corner_faces(_Bosl2Base): def __init__(self, vnf=None, corner=None, **kwargs): super().__init__("_vnf_find_corner_faces", {"vnf" : vnf, "corner" : corner, **kwargs}) class vnf_vertex_array(_Bosl2Base): def __init__(self, points=None, caps=None, cap1=None, cap2=None, col_wrap=None, row_wrap=None, reverse=None, style=None, triangulate=None, texture=None, tex_reps=None, tex_size=None, tex_samples=None, tex_inset=None, tex_rot=None, tex_depth=None, tex_extra=None, tex_skip=None, sidecaps=None, sidecap1=None, sidecap2=None, tex_scaling=None, convexity=None, cp=None, anchor=None, spin=None, orient=None, atype=None, **kwargs): super().__init__("vnf_vertex_array", {"points" : points, "caps" : caps, "cap1" : cap1, "cap2" : cap2, "col_wrap" : col_wrap, "row_wrap" : row_wrap, "reverse" : reverse, "style" : style, "triangulate" : triangulate, "texture" : texture, "tex_reps" : tex_reps, "tex_size" : tex_size, "tex_samples" : tex_samples, "tex_inset" : tex_inset, "tex_rot" : tex_rot, "tex_depth" : tex_depth, "tex_extra" : tex_extra, "tex_skip" : tex_skip, "sidecaps" : sidecaps, "sidecap1" : sidecap1, "sidecap2" : sidecap2, "tex_scaling" : tex_scaling, "convexity" : convexity, "cp" : cp, "anchor" : anchor, "spin" : spin, "orient" : orient, "atype" : atype, **kwargs}) class vnf_tri_array(_Bosl2Base): def __init__(self, points=None, caps=None, cap1=None, cap2=None, col_wrap=None, row_wrap=None, reverse=None, limit_bunching=None, convexity=None, cp=None, anchor=None, spin=None, orient=None, atype=None, **kwargs): super().__init__("vnf_tri_array", {"points" : points, "caps" : caps, "cap1" : cap1, "cap2" : cap2, "col_wrap" : col_wrap, "row_wrap" : row_wrap, "reverse" : reverse, "limit_bunching" : limit_bunching, "convexity" : convexity, "cp" : cp, "anchor" : anchor, "spin" : spin, "orient" : orient, "atype" : atype, **kwargs}) class vnf_polyhedron(_Bosl2Base): def __init__(self, vnf=None, convexity=None, cp=None, anchor=None, spin=None, orient=None, atype=None, **kwargs): super().__init__("vnf_polyhedron", {"vnf" : vnf, "convexity" : convexity, "cp" : cp, "anchor" : anchor, "spin" : spin, "orient" : orient, "atype" : atype, **kwargs}) class vnf_wireframe(_Bosl2Base): def __init__(self, vnf=None, width=None, **kwargs): super().__init__("vnf_wireframe", {"vnf" : vnf, "width" : width, **kwargs}) class vnf_hull(_Bosl2Base): def __init__(self, vnf=None, fast=None, **kwargs): super().__init__("vnf_hull", {"vnf" : vnf, "fast" : fast, **kwargs}) class _show_vertices(_Bosl2Base): def __init__(self, vertices=None, size=None, filter=None, **kwargs): super().__init__("_show_vertices", {"vertices" : vertices, "size" : size, "filter" : filter, **kwargs}) class _show_faces(_Bosl2Base): def __init__(self, vertices=None, faces=None, size=None, filter=None, **kwargs): super().__init__("_show_faces", {"vertices" : vertices, "faces" : faces, "size" : size, "filter" : filter, **kwargs}) class debug_vnf(_Bosl2Base): def __init__(self, vnf=None, faces=None, vertices=None, opacity=None, size=None, convexity=None, filter=None, **kwargs): super().__init__("debug_vnf", {"vnf" : vnf, "faces" : faces, "vertices" : vertices, "opacity" : opacity, "size" : size, "convexity" : convexity, "filter" : filter, **kwargs}) class vnf_validate(_Bosl2Base): def __init__(self, vnf=None, size=None, show_warns=None, check_isects=None, opacity=None, adjacent=None, label_verts=None, label_faces=None, wireframe=None, **kwargs): super().__init__("vnf_validate", {"vnf" : vnf, "size" : size, "show_warns" : show_warns, "check_isects" : check_isects, "opacity" : opacity, "adjacent" : adjacent, "label_verts" : label_verts, "label_faces" : label_faces, "wireframe" : wireframe, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/walls.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/walls.scad'}", False) class _bevelSolid(_Bosl2Base): def __init__(self, shape=None, bevel=None, **kwargs): super().__init__("_bevelSolid", {"shape" : shape, "bevel" : bevel, **kwargs}) class sparse_wall(_Bosl2Base): def __init__(self, h=None, l=None, thick=None, maxang=None, strut=None, max_bridge=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("sparse_wall", {"h" : h, "l" : l, "thick" : thick, "maxang" : maxang, "strut" : strut, "max_bridge" : max_bridge, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class sparse_wall2d(_Bosl2Base): def __init__(self, size=None, maxang=None, strut=None, max_bridge=None, anchor=None, spin=None, **kwargs): super().__init__("sparse_wall2d", {"size" : size, "maxang" : maxang, "strut" : strut, "max_bridge" : max_bridge, "anchor" : anchor, "spin" : spin, **kwargs}) class sparse_cuboid(_Bosl2Base): def __init__(self, size=None, dir=None, strut=None, maxang=None, max_bridge=None, chamfer=None, rounding=None, edges=None, _except=None, except_edges=None, trimcorners=None, teardrop=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("sparse_cuboid", {"size" : size, "dir" : dir, "strut" : strut, "maxang" : maxang, "max_bridge" : max_bridge, "chamfer" : chamfer, "rounding" : rounding, "edges" : edges, "_except" : _except, "except_edges" : except_edges, "trimcorners" : trimcorners, "teardrop" : teardrop, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class hex_panel(_Bosl2Base): def __init__(self, shape=None, strut=None, spacing=None, frame=None, bevel_frame=None, h=None, height=None, l=None, length=None, bevel=None, anchor=None, orient=None, cp=None, atype=None, spin=None, **kwargs): super().__init__("hex_panel", {"shape" : shape, "strut" : strut, "spacing" : spacing, "frame" : frame, "bevel_frame" : bevel_frame, "h" : h, "height" : height, "l" : l, "length" : length, "bevel" : bevel, "anchor" : anchor, "orient" : orient, "cp" : cp, "atype" : atype, "spin" : spin, **kwargs}) class _honeycomb(_Bosl2Base): def __init__(self, shape=None, spacing=None, hex_wall=None, **kwargs): super().__init__("_honeycomb", {"shape" : shape, "spacing" : spacing, "hex_wall" : hex_wall, **kwargs}) class _bevelWall(_Bosl2Base): def __init__(self, shape=None, bevel=None, thickness=None, **kwargs): super().__init__("_bevelWall", {"shape" : shape, "bevel" : bevel, "thickness" : thickness, **kwargs}) class corrugated_wall(_Bosl2Base): def __init__(self, h=None, l=None, thick=None, strut=None, wall=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("corrugated_wall", {"h" : h, "l" : l, "thick" : thick, "strut" : strut, "wall" : wall, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class thinning_wall(_Bosl2Base): def __init__(self, h=None, l=None, thick=None, ang=None, braces=None, strut=None, wall=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("thinning_wall", {"h" : h, "l" : l, "thick" : thick, "ang" : ang, "braces" : braces, "strut" : strut, "wall" : wall, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class thinning_triangle(_Bosl2Base): def __init__(self, h=None, l=None, thick=None, ang=None, strut=None, wall=None, diagonly=None, center=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("thinning_triangle", {"h" : h, "l" : l, "thick" : thick, "ang" : ang, "strut" : strut, "wall" : wall, "diagonly" : diagonly, "center" : center, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) class narrowing_strut(_Bosl2Base): def __init__(self, w=None, l=None, wall=None, ang=None, anchor=None, spin=None, orient=None, **kwargs): super().__init__("narrowing_strut", {"w" : w, "l" : l, "wall" : wall, "ang" : ang, "anchor" : anchor, "spin" : spin, "orient" : orient, **kwargs}) ================================================ FILE: solid2/extensions/bosl2/wiring.py ================================================ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{_Path(__file__).parent.parent / 'bosl2/BOSL2/wiring.scad'}", False) class _hex_offset_ring(_Bosl2Base): def __init__(self, d=None, lev=None, **kwargs): super().__init__("_hex_offset_ring", {"d" : d, "lev" : lev, **kwargs}) class _hex_offsets(_Bosl2Base): def __init__(self, n=None, d=None, lev=None, arr=None, **kwargs): super().__init__("_hex_offsets", {"n" : n, "d" : d, "lev" : lev, "arr" : arr, **kwargs}) class wire_bundle(_Bosl2Base): def __init__(self, path=None, wires=None, wirediam=None, rounding=None, wirenum=None, corner_steps=None, **kwargs): super().__init__("wire_bundle", {"path" : path, "wires" : wires, "wirediam" : wirediam, "rounding" : rounding, "wirenum" : wirenum, "corner_steps" : corner_steps, **kwargs}) ================================================ FILE: solid2/extensions/bosl2_generator.py ================================================ #! /usr/bin/env python from pathlib import Path from solid2.core.utils import escape_openscad_identifier as escape from solid2.libs.py_scadparser import scad_parser from openscad_extension_generator import generateStub, makePackage headerTemplate = """\ from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path from .bosl2_base import Bosl2Base as _Bosl2Base _extra_scad_include(f"{{_Path(__file__).parent.parent / '{scadFile}'}}", {use_not_include}) """ callableTemplate = """\ class {name}(_Bosl2Base): def __init__({paramStr}): super().__init__({initStr}) """ mixinHeader = """ from solid2.core.object_base import AccessSyntaxMixin as _AccessSyntaxMixin class Bosl2AccessSyntaxMixin(_AccessSyntaxMixin): def _get_std(self): from . import std return std """ mixinTemplate = """ def {name}(self, {paramListWithDefaults}**kwargs): return self._get_std().{name}({paramList}**kwargs)(self) """ scad_builtins_primitives = \ Path(__file__).parent.parent / "core" / "builtins" / "openscad.primitives" def generateBosl2Std(bosl2_dir): stubFile = Path(__file__).absolute().parent / "bosl2" / "std.py" with open(stubFile, "w") as std_f: std_f.write("from .openscad import *\n") with open(bosl2_dir / "std.scad") as f: for l in f.readlines(): l = l.strip() if not l.startswith("include <"): continue l = l.replace("include <", "").replace(">", "") if Path(l).stem not in ["math", "lists", "strings", "utility"]: std_f.write(f"from .{Path(l).stem} import *\n") else: std_f.write(f"from . import {Path(l).stem} as bosl2_{Path(l).stem}\n") def generateBosl2AccessSyntaxMixin(bosl2_dir, outputDir): def generateCallable(c): name = escape(c.name) paramNames = [escape(p.name) for p in c.parameters] paramNames = list(dict.fromkeys(paramNames)) paramListWithDefaults = ", ".join([f"{p}=None" for p in paramNames]) paramList = ", ".join([f'{p}' for p in paramNames]) if paramListWithDefaults: paramListWithDefaults += ", " if paramList: paramList += ", " return mixinTemplate.format(name=name, paramListWithDefaults=paramListWithDefaults, paramList=paramList) mods = ["transforms", "attachments", "miscellaneous", "distributors", "partitions", "color"] mixinFiles = [(bosl2_dir / m).with_suffix(".scad") for m in mods] modules = [] for f in mixinFiles: m, _, _ = scad_parser.parseFile(f) modules += m with open(outputDir / "bosl2_access_syntax_mixin.py", "w") as f: f.write(mixinHeader) for c in modules: if c.name.startswith("_"): continue f.write(generateCallable(c)) bosl2_dir = Path("./bosl2/BOSL2") output_dir = Path(__file__).parent / "bosl2" makePackage(output_dir) generateBosl2Std(bosl2_dir) generateBosl2AccessSyntaxMixin(bosl2_dir, output_dir) for f in bosl2_dir.iterdir(): if not f.suffix == ".scad": continue if f.name in ["std.scad", "builtins.scad", "bosl1compat.scad"]: continue generateStub(f, output_dir, False, headerTemplate=headerTemplate, callableTemplate=callableTemplate) generateStub(scad_builtins_primitives, output_dir, False, headerTemplate=\ "from .bosl2_base import Bosl2Base as _Bosl2Base\n\n", callableTemplate=callableTemplate) ================================================ FILE: solid2/extensions/greedy_scad_interface/__init__.py ================================================ from .customizer_widgets import CustomizerCheckboxVariable,\ CustomizerDropdownVariable,\ CustomizerSliderVariable,\ CustomizerSpinnerVariable,\ CustomizerTextboxVariable from .scad_variable import ScadValue, ScadVariable from .scad_interface import * ================================================ FILE: solid2/extensions/greedy_scad_interface/customizer_widgets.py ================================================ from .scad_variable import ScadVariable class CustomizerDropdownVariable(ScadVariable): def __init__(self, name, default_value, options=None, label='', tab=''): options_str = options if options else "" if isinstance(options, list): options_str = '[' + ", ".join(map(str, options)) + ']' if isinstance(options, dict): reverse_options = [ f'{options[k]} : "{k}"' for k in options.keys()] options_str = f'[{", ".join(reverse_options)}]' super().__init__(name, default_value, options_str, label=label, tab=tab) class CustomizerSliderVariable(ScadVariable): def __init__(self, name, default_value, min_='', max_='', step='', label='', tab=''): options_str = '[' options_str += min_ and str(min_) + ':' options_str += step and str(step) + ':' options_str += str(max_) + ']' super().__init__(name, default_value, options_str, label=label, tab=tab) class CustomizerSpinnerVariable(ScadVariable): def __init__(self, name, default_value, step='', label='', tab=''): options_str = step and str(step) super().__init__(name, default_value, options_str, label=label, tab=tab) class CustomizerCheckboxVariable(ScadVariable): def __init__(self, name, default_value, label='', tab=''): super().__init__(name, default_value, label=label, tab=tab) class CustomizerTextboxVariable(ScadVariable): def __init__(self, name, default_value, max_length='', label='', tab=''): options_str = max_length and str(max_length) super().__init__(name, default_value, options_str, label=label, tab=tab) ================================================ FILE: solid2/extensions/greedy_scad_interface/scad_interface.py ================================================ from solid2 import register_pre_render as _register_pre_render from .scad_variable import ScadVariable as _ScadVariable,\ ScadValue as _ScadValue _fonts = [] def register_font(filename): _fonts.append(filename) def get_animation_time(): return _ScadValue("$t") def set_global_fn(_fn): _ScadVariable("$fn", _fn) def set_global_fa(_fa): _ScadVariable("$fa", _fa) def set_global_fs(_fs): _ScadVariable("$fs", _fs) def set_global_viewport_translation(trans): _ScadVariable("$vpt", trans) def set_global_viewport_rotation(rot): _ScadVariable("$vpr", rot) def set_global_viewport_fov(fov): _ScadVariable("$vpf", fov) def set_global_viewport_distance(d): _ScadVariable("$vpd", d) def set_global_variable(var_name, value): _ScadVariable(var_name, value) @_register_pre_render def _get_scad_header(_): base_str = "\n".join([f"use <{f}>" for f in _fonts]) base_str += "\n\n" if base_str else "" base_str += "\n".join(_ScadVariable.registered_variables.values()) if base_str: base_str += "\n" return base_str ================================================ FILE: solid2/extensions/greedy_scad_interface/scad_variable.py ================================================ from solid2.core.object_base import OpenSCADConstant from ...core.utils import py2openscad class ScadValue(OpenSCADConstant) : pass class ScadVariable(ScadValue): registered_variables = {} def __init__(self, name, default_value, options_str='', label='', tab=''): super().__init__(name) builtinVars = ["$fn", "$fa", "$fs", "$vpt", "$vpr", "$vpf", "$vpd"] if name not in builtinVars and name in self.registered_variables.keys(): raise ValueError("Multiple instances of ScadVariable with the same name.") def_str = self.get_definition(name, default_value, options_str, label, tab) self.registered_variables.update({name : def_str}) def get_definition(self, name, default_value, options_str, label, tab): tab = tab and f'/* [{tab}] */\n' label = label and f'//{label}\n' options_str = options_str and f' //{options_str}' default_value = py2openscad(default_value) return f'{tab}{label}{name} = {default_value};{options_str}' ================================================ FILE: solid2/extensions/openscad_extension_generator.py ================================================ #! /usr/bin/env python from pathlib import Path from solid2.core.utils import escape_openscad_identifier as escape from solid2.libs.py_scadparser import scad_parser headerTemplate = """\ from solid2.core.object_base import OpenSCADObject as _OpenSCADObject,\ OpenSCADConstant as _OpenSCADConstant from solid2.core.scad_import import extra_scad_include as _extra_scad_include from pathlib import Path as _Path _extra_scad_include(f"{{_Path(__file__).parent / _Path('../'*{parentCount}) / '{scadFile}'}}", use_not_include={use_not_include}) """ constantTemplate = "{name} = _OpenSCADConstant('{name}')" callableTemplate = """\ class {name}(_OpenSCADObject): def __init__({paramStr}): super().__init__({initStr}) """ def generateStub(scadFile, outputDir, use_not_include, headerTemplate=headerTemplate, callableTemplate=callableTemplate, parentCount=1): def generateHeader(): return headerTemplate.format(__file__=__file__, scadFile=scadFile, use_not_include=use_not_include, parentCount=parentCount) def generateConstant(c): return constantTemplate.format(name=escape(c.name)) + "\n" def generateCallable(c): name = escape(c.name) paramNames = [escape(p.name) for p in c.parameters] paramNames = list(dict.fromkeys(paramNames)) paramStr = ", ".join(["self"] + [f"{p}=None" for p in paramNames] + ["**kwargs"]) initList = [f'"{p}" : {p}' for p in paramNames] initList.append("**kwargs") initStr = f'"{name}", {{{", ".join(initList)}}}' return callableTemplate.format(name=name, paramStr=paramStr, initStr=initStr) modules, functions, global_vars = scad_parser.parseFile(scadFile) escaped_filename = escape(scadFile.stem) + ".py" with open(outputDir / escaped_filename, "w") as f: f.write(generateHeader()) for c in global_vars: f.write(generateConstant(c)) for c in functions + modules: f.write(generateCallable(c)) def makePackage(directory): import os if not os.path.exists(directory): os.mkdir(directory) if not os.path.exists(directory / "__init__.py"): with open(directory / "__init__.py", "w") : pass if __name__ == "__main__": from argparse import ArgumentParser parser = ArgumentParser(description="generates a solidpython2 extensions " "from a OpenSCAD library") parser.add_argument("scadInDir", help="directory containing the scad (library) files") parser.add_argument("packageName", help="name of the generated python package") parser.add_argument("-i", "--include", action='store_false', default=True, help="use OpenSCADs 'include' to import the library. " "Otherwiese OpenSCADs 'use' is used") args = parser.parse_args() def generatePackage(inDir, outDir, parentCount=1): for f in inDir.iterdir(): if f.is_dir(): makePackage(outDir) generatePackage(inDir / f.name, outDir / f.name, parentCount+1) elif f.suffix == ".scad": makePackage(outDir) generateStub(f, outDir, args.include, parentCount=parentCount) generatePackage(Path(args.scadInDir), Path(".") / args.packageName) ================================================ FILE: solid2/extensions/scad_control_structures.py ================================================ from solid2 import ScadValue as _ScadValue, \ scad_inline as _scad_inline, \ union as _union from solid2.core.utils import indent as _indent def scad_range(start, stop, step=1): return f"[{start}:{step}:{stop}]" def scad_for(scadrange, loop_lambda): index = _ScadValue("scad_for_index") body = loop_lambda(index)._render() c = (f"for({index} = {scadrange}) {{\n" f"{_indent(body)}\n" "}\n") return _union()(_scad_inline(c)) def scad_if(condition, if_body, else_body): c = (f"if({condition}) {{\n" f"{_indent(if_body._render())}\n" "} else {\n" f"{_indent(else_body._render())}\n" "}\n") return _union()(_scad_inline(c)) ================================================ FILE: solid2/libs/__init__.py ================================================ ================================================ FILE: tests/examples_scad/.gitignore ================================================ *.png !*.scad ================================================ FILE: tests/examples_scad/01-basics.scad ================================================ $fn = 72; difference() { cube(size = [10, 20, 30]); sphere(r = 10); } ================================================ FILE: tests/examples_scad/02-vars-and-operators.scad ================================================ difference() { cube(size = [10, 20, 30]); sphere(r = 10); } ================================================ FILE: tests/examples_scad/03-debug-background.scad ================================================ union() { difference() { cube(size = [10, 20, 30]); #sphere(r = 10); } %cylinder(h = 30, r = 4); } ================================================ FILE: tests/examples_scad/04-convenience.scad ================================================ difference() { rotate(a = [45, 45, 45]) { translate(v = [0, 0, -5]) { cube(size = [10, 20, 30]); } } #translate(v = [0, 5, 0]) { sphere(r = 10); } } ================================================ FILE: tests/examples_scad/05-access-style-syntax.scad ================================================ difference() { rotate(a = [45, 45, 45]) { translate(v = [0, 0, -5]) { cube(size = [10, 20, 30]); } } #translate(v = [0, 5, 0]) { sphere(r = 10); } } ================================================ FILE: tests/examples_scad/06-functions.scad ================================================ union() { cube(center = true, size = [100, 250, 50]); translate(v = [0, 0, 50]) { difference() { cube(center = true, size = [80, 100, 60]); union() { translate(v = [0, 0, -10]) { cube(center = true, size = [200, 55, 50]); } rotate(a = [0, 0, 90]) { translate(v = [0, 0, -10]) { cube(center = true, size = [200, 55, 50]); } } } } } translate(v = [0, -80, 0]) { translate(v = [0, 0, -20]) { union() { translate(v = [-70, 0, 0]) { rotate(a = [0, 90, 0]) { cylinder(center = true, h = 15, r = 35); } } translate(v = [70, 0, 0]) { rotate(a = [0, 90, 0]) { cylinder(center = true, h = 15, r = 35); } } rotate(a = [0, 90, 0]) { cylinder(center = true, h = 120, r = 10); } } } } translate(v = [0, 80, 0]) { translate(v = [0, 0, -20]) { union() { translate(v = [-70, 0, 0]) { rotate(a = [0, 90, 0]) { cylinder(center = true, h = 15, r = 35); } } translate(v = [70, 0, 0]) { rotate(a = [0, 90, 0]) { cylinder(center = true, h = 15, r = 35); } } rotate(a = [0, 90, 0]) { cylinder(center = true, h = 120, r = 10); } } } } } ================================================ FILE: tests/examples_scad/07-libs-bosl2-attachable.scad ================================================ include <../../solid2/extensions/bosl2/BOSL2/version.scad>; include <../../solid2/extensions/bosl2/BOSL2/constants.scad>; include <../../solid2/extensions/bosl2/BOSL2/transforms.scad>; include <../../solid2/extensions/bosl2/BOSL2/distributors.scad>; include <../../solid2/extensions/bosl2/BOSL2/miscellaneous.scad>; include <../../solid2/extensions/bosl2/BOSL2/color.scad>; include <../../solid2/extensions/bosl2/BOSL2/attachments.scad>; include <../../solid2/extensions/bosl2/BOSL2/beziers.scad>; include <../../solid2/extensions/bosl2/BOSL2/shapes3d.scad>; include <../../solid2/extensions/bosl2/BOSL2/shapes2d.scad>; include <../../solid2/extensions/bosl2/BOSL2/drawing.scad>; include <../../solid2/extensions/bosl2/BOSL2/masks3d.scad>; include <../../solid2/extensions/bosl2/BOSL2/masks2d.scad>; include <../../solid2/extensions/bosl2/BOSL2/math.scad>; include <../../solid2/extensions/bosl2/BOSL2/paths.scad>; include <../../solid2/extensions/bosl2/BOSL2/lists.scad>; include <../../solid2/extensions/bosl2/BOSL2/comparisons.scad>; include <../../solid2/extensions/bosl2/BOSL2/linalg.scad>; include <../../solid2/extensions/bosl2/BOSL2/trigonometry.scad>; include <../../solid2/extensions/bosl2/BOSL2/vectors.scad>; include <../../solid2/extensions/bosl2/BOSL2/affine.scad>; include <../../solid2/extensions/bosl2/BOSL2/coords.scad>; include <../../solid2/extensions/bosl2/BOSL2/geometry.scad>; include <../../solid2/extensions/bosl2/BOSL2/regions.scad>; include <../../solid2/extensions/bosl2/BOSL2/strings.scad>; include <../../solid2/extensions/bosl2/BOSL2/vnf.scad>; include <../../solid2/extensions/bosl2/BOSL2/structs.scad>; include <../../solid2/extensions/bosl2/BOSL2/rounding.scad>; include <../../solid2/extensions/bosl2/BOSL2/skin.scad>; include <../../solid2/extensions/bosl2/BOSL2/utility.scad>; include <../../solid2/extensions/bosl2/BOSL2/partitions.scad>; attachable(anchor = CENTER, orient = UP, size = [300, 100, 100], spin = 0) { union() { xcopies(spacing = 200) { cube(center = true, size = 100); } xcyl(d = 25.0, h = 200); } union() { attach(parent = TOP) { cube(center = true, size = 50); } attach(parent = LEFT) { sphere(r = 50); } show_anchors(s = 30); } } ================================================ FILE: tests/examples_scad/07-libs-bosl2-logo.scad ================================================ include <../../solid2/extensions/bosl2/BOSL2/version.scad>; include <../../solid2/extensions/bosl2/BOSL2/constants.scad>; include <../../solid2/extensions/bosl2/BOSL2/transforms.scad>; include <../../solid2/extensions/bosl2/BOSL2/distributors.scad>; include <../../solid2/extensions/bosl2/BOSL2/miscellaneous.scad>; include <../../solid2/extensions/bosl2/BOSL2/color.scad>; include <../../solid2/extensions/bosl2/BOSL2/attachments.scad>; include <../../solid2/extensions/bosl2/BOSL2/beziers.scad>; include <../../solid2/extensions/bosl2/BOSL2/shapes3d.scad>; include <../../solid2/extensions/bosl2/BOSL2/shapes2d.scad>; include <../../solid2/extensions/bosl2/BOSL2/drawing.scad>; include <../../solid2/extensions/bosl2/BOSL2/masks3d.scad>; include <../../solid2/extensions/bosl2/BOSL2/masks2d.scad>; include <../../solid2/extensions/bosl2/BOSL2/math.scad>; include <../../solid2/extensions/bosl2/BOSL2/paths.scad>; include <../../solid2/extensions/bosl2/BOSL2/lists.scad>; include <../../solid2/extensions/bosl2/BOSL2/comparisons.scad>; include <../../solid2/extensions/bosl2/BOSL2/linalg.scad>; include <../../solid2/extensions/bosl2/BOSL2/trigonometry.scad>; include <../../solid2/extensions/bosl2/BOSL2/vectors.scad>; include <../../solid2/extensions/bosl2/BOSL2/affine.scad>; include <../../solid2/extensions/bosl2/BOSL2/coords.scad>; include <../../solid2/extensions/bosl2/BOSL2/geometry.scad>; include <../../solid2/extensions/bosl2/BOSL2/regions.scad>; include <../../solid2/extensions/bosl2/BOSL2/strings.scad>; include <../../solid2/extensions/bosl2/BOSL2/vnf.scad>; include <../../solid2/extensions/bosl2/BOSL2/structs.scad>; include <../../solid2/extensions/bosl2/BOSL2/rounding.scad>; include <../../solid2/extensions/bosl2/BOSL2/skin.scad>; include <../../solid2/extensions/bosl2/BOSL2/utility.scad>; include <../../solid2/extensions/bosl2/BOSL2/partitions.scad>; include <../../solid2/extensions/bosl2/BOSL2/gears.scad>; include <../../solid2/extensions/bosl2/BOSL2/screws.scad>; include <../../solid2/extensions/bosl2/BOSL2/cubetruss.scad>; $fa = 1; $fs = 1; xdistribute(spacing = 50) { recolor(c = "#f77") { diff(remove = "hole") { cuboid(anchor = FRONT, chamfer = 10, edges = [(RIGHT + BACK), (RIGHT + FRONT)], size = [45, 45, 10]) { tag(tag = "hole") { cuboid(chamfer = 5, edges = [(RIGHT + BACK), (RIGHT + FRONT)], size = [30, 30, 11]); } attach(child = BACK, overlap = 5, parent = FRONT) { cuboid(edges = [(RIGHT + BACK), (RIGHT + FRONT)], rounding = 15, size = [45, 45, 10]) { tag(tag = "hole") { cuboid(edges = [(RIGHT + BACK), (RIGHT + FRONT)], rounding = 10, size = [30, 30, 11]); } } } } } } recolor(c = "#7f7") { bevel_gear(face_width = 12, pitch = 8, pitch_angle = 45, shaft_diam = 25, slices = 12, spiral_angle = 30, teeth = 20); } recolor(c = "#99f") { path_sweep(path = bezpath_curve(bezpath = [[-18, -20], [-18, -45], [18, -45], [18, -20], [18, 0], [-18, 0], [-18, 20], [-18, 45], [18, 45], [18, 20]]), shape = regular_ngon(d = 10, n = 3, spin = 90)); } recolor(c = "#0bf") { move(v = [-15, -35, 0]) { cubetruss_corner(bracing = false, clipthick = 0, extents = [3, 8, 0, 0, 0], h = 1, size = 10, strut = 1); } } recolor(c = "#777") { xdistribute(spacing = 24) { screw(anchor = "origin", head = "hex", orient = BACK, spec = "M12,70") { attach(child = CENTER, parent = BOT) { nut(spec = "M12", thickness = 10); } } screw(anchor = "origin", head = "hex", orient = BACK, spec = "M12,70") { attach(child = CENTER, parent = BOT) { nut(spec = "M12", thickness = 10); } } } } } ================================================ FILE: tests/examples_scad/07-libs-bosl2.scad ================================================ include <../../solid2/extensions/bosl2/BOSL2/version.scad>; include <../../solid2/extensions/bosl2/BOSL2/constants.scad>; include <../../solid2/extensions/bosl2/BOSL2/transforms.scad>; include <../../solid2/extensions/bosl2/BOSL2/distributors.scad>; include <../../solid2/extensions/bosl2/BOSL2/miscellaneous.scad>; include <../../solid2/extensions/bosl2/BOSL2/color.scad>; include <../../solid2/extensions/bosl2/BOSL2/attachments.scad>; include <../../solid2/extensions/bosl2/BOSL2/beziers.scad>; include <../../solid2/extensions/bosl2/BOSL2/shapes3d.scad>; include <../../solid2/extensions/bosl2/BOSL2/shapes2d.scad>; include <../../solid2/extensions/bosl2/BOSL2/drawing.scad>; include <../../solid2/extensions/bosl2/BOSL2/masks3d.scad>; include <../../solid2/extensions/bosl2/BOSL2/masks2d.scad>; include <../../solid2/extensions/bosl2/BOSL2/math.scad>; include <../../solid2/extensions/bosl2/BOSL2/paths.scad>; include <../../solid2/extensions/bosl2/BOSL2/lists.scad>; include <../../solid2/extensions/bosl2/BOSL2/comparisons.scad>; include <../../solid2/extensions/bosl2/BOSL2/linalg.scad>; include <../../solid2/extensions/bosl2/BOSL2/trigonometry.scad>; include <../../solid2/extensions/bosl2/BOSL2/vectors.scad>; include <../../solid2/extensions/bosl2/BOSL2/affine.scad>; include <../../solid2/extensions/bosl2/BOSL2/coords.scad>; include <../../solid2/extensions/bosl2/BOSL2/geometry.scad>; include <../../solid2/extensions/bosl2/BOSL2/regions.scad>; include <../../solid2/extensions/bosl2/BOSL2/strings.scad>; include <../../solid2/extensions/bosl2/BOSL2/vnf.scad>; include <../../solid2/extensions/bosl2/BOSL2/structs.scad>; include <../../solid2/extensions/bosl2/BOSL2/rounding.scad>; include <../../solid2/extensions/bosl2/BOSL2/skin.scad>; include <../../solid2/extensions/bosl2/BOSL2/utility.scad>; include <../../solid2/extensions/bosl2/BOSL2/partitions.scad>; include <../../solid2/extensions/bosl2/BOSL2/metric_screws.scad>; union() { #bounding_box() { path_extrude(path = [[0, 0, 0], [33, 33, 33], [66, 33, 40], [100, 0, 0], [150, 0, 0]]) { circle($fn = 6, r = 10); } } recolor(c = "purple") { path_extrude(path = [[0, 0, 0], [33, 33, 33], [66, 33, 40], [100, 0, 0], [150, 0, 0]]) { circle($fn = 6, r = 10); } } fwd(y = 100) { diff() { cuboid(size = 50) { tag(tag = "remove") { attach(parent = TOP) { sphere(d = 40); } } tag(tag = "keep") { attach(parent = CTR) { cylinder(d = 10, h = 40); } } } } } left(x = 100) { metric_bolt(headtype = "hex", l = 40, size = 20); } back(y = 100) { heightfield(bottom = -1, data = [[-0.7158354760083571, -0.09777126940501375, 0.553818813206015, 0.9508184515435334, 0.9437285851822178, 0.5643904318910452, -0.01528900397670874, -0.5729354351462002, -0.9259311737964365, -0.9866658946445946, -0.7710099754671497, -0.36977206094538123, 0.0961793703293298, 0.5171216654477707, 0.8199555226173607, 0.9753959210713569, 0.9911848272864543, 0.8983805029159327, 0.7370998663151956, 0.5456621280611279, 0.3544785436780216, 0.1841790651713167, 0.04659851464007364, -0.052844195143546255, -0.11251048882501428, -0.13235175009777303, -0.11251048882501428, -0.052844195143546255, 0.04659851464007364, 0.1841790651713167, 0.3544785436780216, 0.5456621280611279, 0.7370998663151956, 0.8983805029159327, 0.9911848272864543, 0.9753959210713569, 0.8199555226173607, 0.5171216654477707, 0.0961793703293298, -0.36977206094538123, -0.7710099754671497, -0.9866658946445946, -0.9259311737964365, -0.5729354351462002, -0.01528900397670874, 0.5643904318910452, 0.9437285851822178, 0.9508184515435334, 0.553818813206015, -0.09777126940501375], [-0.09777126940501375, 0.5780962926354162, 0.9677093359135412, 0.909348191100782, 0.45690344147541284, -0.17403707166257712, -0.7211568839360558, -0.9880316240928618, -0.9071867414201306, -0.5396963022265032, -0.02760600627447501, 0.4701369183201865, 0.8302999955979169, 0.9916552086207551, 0.9545112551957777, 0.7625584504796027, 0.4787847819991722, 0.16472584477074798, -0.13235175009777303, -0.3839842381511847, -0.5789496358185631, -0.7185332705339138, -0.8110635436155982, -0.8672002621460978, -0.8965494243902328, -0.9055783620066239, -0.8965494243902328, -0.8672002621460978, -0.8110635436155982, -0.7185332705339138, -0.5789496358185631, -0.3839842381511847, -0.13235175009777303, 0.16472584477074798, 0.4787847819991722, 0.7625584504796027, 0.9545112551957777, 0.9916552086207551, 0.8302999955979169, 0.4701369183201865, -0.02760600627447501, -0.5396963022265032, -0.9071867414201306, -0.9880316240928618, -0.7211568839360558, -0.17403707166257712, 0.45690344147541284, 0.909348191100782, 0.9677093359135412, 0.5780962926354162], [0.553818813206015, 0.9677093359135412, 0.8961364196158191, 0.4001993726403515, -0.2677948252231252, -0.8054445870804156, -0.9999248173626606, -0.8027125451584881, -0.320602419432942, 0.2536796241035926, 0.727913119918548, 0.9753959210713569, 0.9599849292731429, 0.7239439305723232, 0.3544785436780216, -0.052844195143546255, -0.42101420248427274, -0.7040964370475585, -0.887140035350667, -0.9784905124788417, -0.9996939741393799, -0.9766101758528882, -0.9333656865281341, -0.8892231315429847, -0.8575975897333462, -0.8462204041751706, -0.8575975897333462, -0.8892231315429847, -0.9333656865281341, -0.9766101758528882, -0.9996939741393799, -0.9784905124788417, -0.887140035350667, -0.7040964370475585, -0.42101420248427274, -0.052844195143546255, 0.3544785436780216, 0.7239439305723232, 0.9599849292731429, 0.9753959210713569, 0.727913119918548, 0.2536796241035926, -0.320602419432942, -0.8027125451584881, -0.9999248173626606, -0.8054445870804156, -0.2677948252231252, 0.4001993726403515, 0.8961364196158191, 0.9677093359135412], [0.9508184515435334, 0.909348191100782, 0.4001993726403515, -0.2986026440580049, -0.8426112405177267, -0.9936231122371427, -0.7135482820487202, -0.15043367466348193, 0.45418422532509545, 0.8778684012984409, 0.9970765516272863, 0.8099508994563396, 0.40878600496256273, -0.07274873415833447, -0.5106954441094101, -0.8229869266810047, -0.9784905124788417, -0.9883875439237823, -0.8892231315429847, -0.7259123218586886, -0.5395308232720181, -0.36117831706278347, -0.2108600771143173, -0.09940899775107966, -0.031561728068998866, -0.008851309290403876, -0.031561728068998866, -0.09940899775107966, -0.2108600771143173, -0.36117831706278347, -0.5395308232720181, -0.7259123218586886, -0.8892231315429847, -0.9883875439237823, -0.9784905124788417, -0.8229869266810047, -0.5106954441094101, -0.07274873415833447, 0.40878600496256273, 0.8099508994563396, 0.9970765516272863, 0.8778684012984409, 0.45418422532509545, -0.15043367466348193, -0.7135482820487202, -0.9936231122371427, -0.8426112405177267, -0.2986026440580049, 0.4001993726403515, 0.909348191100782], [0.9437285851822178, 0.45690344147541284, -0.2677948252231252, -0.8426112405177267, -0.9892668187780492, -0.6636338842129675, -0.045255173119998, 0.577530538995622, 0.9508042427723833, 0.9545112551957777, 0.6242995590883633, 0.10591864700171519, -0.42101420248427274, -0.8110635436155982, -0.9895644478503135, -0.9545833223822333, -0.7553386617118615, -0.46271600927183404, -0.1442896235333068, 0.15024779411670722, 0.393205596105676, 0.5758065019122222, 0.7018171073220065, 0.7809125866717632, 0.8233862126726764, 0.8366556385360561, 0.8233862126726764, 0.7809125866717632, 0.7018171073220065, 0.5758065019122222, 0.393205596105676, 0.15024779411670722, -0.1442896235333068, -0.46271600927183404, -0.7553386617118615, -0.9545833223822333, -0.9895644478503135, -0.8110635436155982, -0.42101420248427274, 0.10591864700171519, 0.6242995590883633, 0.9545112551957777, 0.9508042427723833, 0.577530538995622, -0.045255173119998, -0.6636338842129675, -0.9892668187780492, -0.8426112405177267, -0.2677948252231252, 0.45690344147541284], [0.5643904318910452, -0.17403707166257712, -0.8054445870804156, -0.9936231122371427, -0.6636338842129675, -0.009937201600071412, 0.6350748642631946, 0.9793226624873786, 0.8983805029159327, 0.4615624875447749, -0.13235175009777303, -0.6591064566557293, -0.9577345186201252, -0.9717790528591356, -0.7408102813303544, -0.36117831706278347, 0.0594013868715, 0.4354061127346995, 0.7184201511154031, 0.8959366989404217, 0.9810135747654135, 0.9997053962201027, 0.9807356389159875, 0.9490461902387302, 0.9228549487508323, 0.9129452507276277, 0.9228549487508323, 0.9490461902387302, 0.9807356389159875, 0.9997053962201027, 0.9810135747654135, 0.8959366989404217, 0.7184201511154031, 0.4354061127346995, 0.0594013868715, -0.36117831706278347, -0.7408102813303544, -0.9717790528591356, -0.9577345186201252, -0.6591064566557293, -0.13235175009777303, 0.4615624875447749, 0.8983805029159327, 0.9793226624873786, 0.6350748642631946, -0.009937201600071412, -0.6636338842129675, -0.9936231122371427, -0.8054445870804156, -0.17403707166257712], [-0.01528900397670874, -0.7211568839360558, -0.9999248173626606, -0.7135482820487202, -0.045255173119998, 0.6350748642631946, 0.9861675309117627, 0.8622844455154678, 0.3544785436780216, -0.28907125514443305, -0.7988038975130448, -0.9992433916004055, -0.8575975897333462, -0.46271600927183404, 0.036641970611123245, 0.49708668342823564, 0.8233862126726764, 0.9810135747654135, 0.9852623084849599, 0.8797342206140177, 0.7154910816495544, 0.5370464912494449, 0.37632652685444434, 0.252649147081716, 0.17582294024532347, 0.14987720966295234, 0.17582294024532347, 0.252649147081716, 0.37632652685444434, 0.5370464912494449, 0.7154910816495544, 0.8797342206140177, 0.9852623084849599, 0.9810135747654135, 0.8233862126726764, 0.49708668342823564, 0.036641970611123245, -0.46271600927183404, -0.8575975897333462, -0.9992433916004055, -0.7988038975130448, -0.28907125514443305, 0.3544785436780216, 0.8622844455154678, 0.9861675309117627, 0.6350748642631946, -0.045255173119998, -0.7135482820487202, -0.9999248173626606, -0.7211568839360558], [-0.5729354351462002, -0.9880316240928618, -0.8027125451584881, -0.15043367466348193, 0.577530538995622, 0.9793226624873786, 0.8622844455154678, 0.31751041845612377, -0.36525286620192765, -0.8672002621460978, -0.9914061586009497, -0.7259123218586886, -0.2108600771143173, 0.3502527398419366, 0.7809125866717632, 0.9854307373467088, 0.956586601484016, 0.7500645547914181, 0.44721751781684405, 0.12379166736845787, -0.16722487140352646, -0.399037586302389, -0.565688817406875, -0.6733906518850356, -0.7323723324376428, -0.750987246771676, -0.7323723324376428, -0.6733906518850356, -0.565688817406875, -0.399037586302389, -0.16722487140352646, 0.12379166736845787, 0.44721751781684405, 0.7500645547914181, 0.956586601484016, 0.9854307373467088, 0.7809125866717632, 0.3502527398419366, -0.2108600771143173, -0.7259123218586886, -0.9914061586009497, -0.8672002621460978, -0.36525286620192765, 0.31751041845612377, 0.8622844455154678, 0.9793226624873786, 0.577530538995622, -0.15043367466348193, -0.8027125451584881, -0.9880316240928618], [-0.9259311737964365, -0.9071867414201306, -0.320602419432942, 0.45418422532509545, 0.9508042427723833, 0.8983805029159327, 0.3544785436780216, -0.36525286620192765, -0.887140035350667, -0.9766101758528882, -0.6291191778335704, -0.031561728068998866, 0.5565388448499853, 0.9255541197058049, 0.9852623084849599, 0.7665984826660711, 0.37632652685444434, -0.06122338153363395, -0.44822580183753064, -0.7323723324376428, -0.9042033484553401, -0.9828460722647567, -0.9998706698457897, -0.9869844897640472, -0.9690672970578027, -0.9613974918795568, -0.9690672970578027, -0.9869844897640472, -0.9998706698457897, -0.9828460722647567, -0.9042033484553401, -0.7323723324376428, -0.44822580183753064, -0.06122338153363395, 0.37632652685444434, 0.7665984826660711, 0.9852623084849599, 0.9255541197058049, 0.5565388448499853, -0.031561728068998866, -0.6291191778335704, -0.9766101758528882, -0.887140035350667, -0.36525286620192765, 0.3544785436780216, 0.8983805029159327, 0.9508042427723833, 0.45418422532509545, -0.320602419432942, -0.9071867414201306], [-0.9866658946445946, -0.5396963022265032, 0.2536796241035926, 0.8778684012984409, 0.9545112551957777, 0.4615624875447749, -0.28907125514443305, -0.8672002621460978, -0.9766101758528882, -0.5941982082298611, 0.0594013868715, 0.6675079670136292, 0.9810135747654135, 0.9129452507276277, 0.5370464912494449, 0.018405303267344752, -0.4723862364856837, -0.8197716090940644, -0.9828460722647567, -0.9818619158392312, -0.8699452785942385, -0.7064425466207848, -0.5403536357338068, -0.4046099138586663, -0.31765585797787305, -0.2879033166650653, -0.31765585797787305, -0.4046099138586663, -0.5403536357338068, -0.7064425466207848, -0.8699452785942385, -0.9818619158392312, -0.9828460722647567, -0.8197716090940644, -0.4723862364856837, 0.018405303267344752, 0.5370464912494449, 0.9129452507276277, 0.9810135747654135, 0.6675079670136292, 0.0594013868715, -0.5941982082298611, -0.9766101758528882, -0.8672002621460978, -0.28907125514443305, 0.4615624875447749, 0.9545112551957777, 0.8778684012984409, 0.2536796241035926, -0.5396963022265032], [-0.7710099754671497, -0.02760600627447501, 0.727913119918548, 0.9970765516272863, 0.6242995590883633, -0.13235175009777303, -0.7988038975130448, -0.9914061586009497, -0.6291191778335704, 0.0594013868715, 0.7018171073220065, 0.9952084655965423, 0.8414046940486856, 0.3521027624179121, -0.2459315899387359, -0.7323723324376428, -0.9771688419778408, -0.9613974918795568, -0.7479592241617414, -0.43274114505056144, -0.10324074641368002, 0.18275564204117561, 0.39943890886127764, 0.5440171490365727, 0.6246372204389422, 0.6502878401571168, 0.6246372204389422, 0.5440171490365727, 0.39943890886127764, 0.18275564204117561, -0.10324074641368002, -0.43274114505056144, -0.7479592241617414, -0.9613974918795568, -0.9771688419778408, -0.7323723324376428, -0.2459315899387359, 0.3521027624179121, 0.8414046940486856, 0.9952084655965423, 0.7018171073220065, 0.0594013868715, -0.6291191778335704, -0.9914061586009497, -0.7988038975130448, -0.13235175009777303, 0.6242995590883633, 0.9970765516272863, 0.727913119918548, -0.02760600627447501], [-0.36977206094538123, 0.4701369183201865, 0.9753959210713569, 0.8099508994563396, 0.10591864700171519, -0.6591064566557293, -0.9992433916004055, -0.7259123218586886, -0.031561728068998866, 0.6675079670136292, 0.9952084655965423, 0.8130861137605422, 0.252649147081716, -0.399037586302389, -0.8649557077942015, -0.997255180156715, -0.8048090667832768, -0.4046099138586663, 0.05545895688281034, 0.4585981653620278, 0.7459063049687641, 0.911839860974458, 0.9837263751105298, 0.9999876561221204, 0.99485348900195, 0.9906073556948704, 0.99485348900195, 0.9999876561221204, 0.9837263751105298, 0.911839860974458, 0.7459063049687641, 0.4585981653620278, 0.05545895688281034, -0.4046099138586663, -0.8048090667832768, -0.997255180156715, -0.8649557077942015, -0.399037586302389, 0.252649147081716, 0.8130861137605422, 0.9952084655965423, 0.6675079670136292, -0.031561728068998866, -0.7259123218586886, -0.9992433916004055, -0.6591064566557293, 0.10591864700171519, 0.8099508994563396, 0.9753959210713569, 0.4701369183201865], [0.0961793703293298, 0.8302999955979169, 0.9599849292731429, 0.40878600496256273, -0.42101420248427274, -0.9577345186201252, -0.8575975897333462, -0.2108600771143173, 0.5565388448499853, 0.9810135747654135, 0.8414046940486856, 0.252649147081716, -0.44822580183753064, -0.9159022382375784, -0.9690672970578027, -0.6390451336705433, -0.10324074641368002, 0.4292170574242703, 0.8094061726446607, 0.9837263751105298, 0.9782847848018178, 0.8599133508523288, 0.6999256919024505, 0.5535124793565069, 0.4546989718040998, 0.4201670368266409, 0.4546989718040998, 0.5535124793565069, 0.6999256919024505, 0.8599133508523288, 0.9782847848018178, 0.9837263751105298, 0.8094061726446607, 0.4292170574242703, -0.10324074641368002, -0.6390451336705433, -0.9690672970578027, -0.9159022382375784, -0.44822580183753064, 0.252649147081716, 0.8414046940486856, 0.9810135747654135, 0.5565388448499853, -0.2108600771143173, -0.8575975897333462, -0.9577345186201252, -0.42101420248427274, 0.40878600496256273, 0.9599849292731429, 0.8302999955979169], [0.5171216654477707, 0.9916552086207551, 0.7239439305723232, -0.07274873415833447, -0.8110635436155982, -0.9717790528591356, -0.46271600927183404, 0.3502527398419366, 0.9255541197058049, 0.9129452507276277, 0.3521027624179121, -0.399037586302389, -0.9159022382375784, -0.9528820890159757, -0.5403536357338068, 0.08735244321299503, 0.6502878401571168, 0.9596509227929731, 0.9702044875563652, 0.7513049894133318, 0.4201670368266409, 0.08264565346767089, -0.19578093930261975, -0.390197009595547, -0.5010191903189258, -0.5365729180004349, -0.5010191903189258, -0.390197009595547, -0.19578093930261975, 0.08264565346767089, 0.4201670368266409, 0.7513049894133318, 0.9702044875563652, 0.9596509227929731, 0.6502878401571168, 0.08735244321299503, -0.5403536357338068, -0.9528820890159757, -0.9159022382375784, -0.399037586302389, 0.3521027624179121, 0.9129452507276277, 0.9255541197058049, 0.3502527398419366, -0.46271600927183404, -0.9717790528591356, -0.8110635436155982, -0.07274873415833447, 0.7239439305723232, 0.9916552086207551], [0.8199555226173607, 0.9545112551957777, 0.3544785436780216, -0.5106954441094101, -0.9895644478503135, -0.7408102813303544, 0.036641970611123245, 0.7809125866717632, 0.9852623084849599, 0.5370464912494449, -0.2459315899387359, -0.8649557077942015, -0.9690672970578027, -0.5403536357338068, 0.1510338945637309, 0.7459063049687641, 0.9971509674428002, 0.8599133508523288, 0.4546989718040998, -0.03639848633421769, -0.4647255575123954, -0.7589315343767972, -0.9186368297074818, -0.9829793407063873, -0.9987608967574537, -0.9999902065507035, -0.9987608967574537, -0.9829793407063873, -0.9186368297074818, -0.7589315343767972, -0.4647255575123954, -0.03639848633421769, 0.4546989718040998, 0.8599133508523288, 0.9971509674428002, 0.7459063049687641, 0.1510338945637309, -0.5403536357338068, -0.9690672970578027, -0.8649557077942015, -0.2459315899387359, 0.5370464912494449, 0.9852623084849599, 0.7809125866717632, 0.036641970611123245, -0.7408102813303544, -0.9895644478503135, -0.5106954441094101, 0.3544785436780216, 0.9545112551957777], [0.9753959210713569, 0.7625584504796027, -0.052844195143546255, -0.8229869266810047, -0.9545833223822333, -0.36117831706278347, 0.49708668342823564, 0.9854307373467088, 0.7665984826660711, 0.018405303267344752, -0.7323723324376428, -0.997255180156715, -0.6390451336705433, 0.08735244321299503, 0.7459063049687641, 0.9999876561221204, 0.7753400962492819, 0.2375839859261567, -0.35210108504889737, -0.786095708473608, -0.9829793407063873, -0.9747394897226348, -0.8497593056327711, -0.6984726873116567, -0.5851764690934534, -0.5440211108893698, -0.5851764690934534, -0.6984726873116567, -0.8497593056327711, -0.9747394897226348, -0.9829793407063873, -0.786095708473608, -0.35210108504889737, 0.2375839859261567, 0.7753400962492819, 0.9999876561221204, 0.7459063049687641, 0.08735244321299503, -0.6390451336705433, -0.997255180156715, -0.7323723324376428, 0.018405303267344752, 0.7665984826660711, 0.9854307373467088, 0.49708668342823564, -0.36117831706278347, -0.9545833223822333, -0.8229869266810047, -0.052844195143546255, 0.7625584504796027], [0.9911848272864543, 0.4787847819991722, -0.42101420248427274, -0.9784905124788417, -0.7553386617118615, 0.0594013868715, 0.8233862126726764, 0.956586601484016, 0.37632652685444434, -0.4723862364856837, -0.9771688419778408, -0.8048090667832768, -0.10324074641368002, 0.6502878401571168, 0.9971509674428002, 0.7753400962492819, 0.16084964506716973, -0.5010191903189258, -0.9186368297074818, -0.9840363888387289, -0.7648781678542789, -0.41148230684214054, -0.06201520022829486, 0.2037957684966491, 0.36104927727853203, 0.4121184852417566, 0.36104927727853203, 0.2037957684966491, -0.06201520022829486, -0.41148230684214054, -0.7648781678542789, -0.9840363888387289, -0.9186368297074818, -0.5010191903189258, 0.16084964506716973, 0.7753400962492819, 0.9971509674428002, 0.6502878401571168, -0.10324074641368002, -0.8048090667832768, -0.9771688419778408, -0.4723862364856837, 0.37632652685444434, 0.956586601484016, 0.8233862126726764, 0.0594013868715, -0.7553386617118615, -0.9784905124788417, -0.42101420248427274, 0.4787847819991722], [0.8983805029159327, 0.16472584477074798, -0.7040964370475585, -0.9883875439237823, -0.46271600927183404, 0.4354061127346995, 0.9810135747654135, 0.7500645547914181, -0.06122338153363395, -0.8197716090940644, -0.9613974918795568, -0.4046099138586663, 0.4292170574242703, 0.9596509227929731, 0.8599133508523288, 0.2375839859261567, -0.5010191903189258, -0.949820680215173, -0.9339707316330099, -0.5440211108893698, -0.009203041372185148, 0.4622279808582701, 0.7712319401165738, 0.9240590869570797, 0.9783888223346213, 0.9893582466233818, 0.9783888223346213, 0.9240590869570797, 0.7712319401165738, 0.4622279808582701, -0.009203041372185148, -0.5440211108893698, -0.9339707316330099, -0.949820680215173, -0.5010191903189258, 0.2375839859261567, 0.8599133508523288, 0.9596509227929731, 0.4292170574242703, -0.4046099138586663, -0.9613974918795568, -0.8197716090940644, -0.06122338153363395, 0.7500645547914181, 0.9810135747654135, 0.4354061127346995, -0.46271600927183404, -0.9883875439237823, -0.7040964370475585, 0.16472584477074798], [0.7370998663151956, -0.13235175009777303, -0.887140035350667, -0.8892231315429847, -0.1442896235333068, 0.7184201511154031, 0.9852623084849599, 0.44721751781684405, -0.44822580183753064, -0.9828460722647567, -0.7479592241617414, 0.05545895688281034, 0.8094061726446607, 0.9702044875563652, 0.4546989718040998, -0.35210108504889737, -0.9186368297074818, -0.9339707316330099, -0.4570867375418006, 0.2037957684966491, 0.7328169085463447, 0.9783888223346213, 0.9717622535057333, 0.8398053526495963, 0.7088612918380416, 0.6569865987187891, 0.7088612918380416, 0.8398053526495963, 0.9717622535057333, 0.9783888223346213, 0.7328169085463447, 0.2037957684966491, -0.4570867375418006, -0.9339707316330099, -0.9186368297074818, -0.35210108504889737, 0.4546989718040998, 0.9702044875563652, 0.8094061726446607, 0.05545895688281034, -0.7479592241617414, -0.9828460722647567, -0.44822580183753064, 0.44721751781684405, 0.9852623084849599, 0.7184201511154031, -0.1442896235333068, -0.8892231315429847, -0.887140035350667, -0.13235175009777303], [0.5456621280611279, -0.3839842381511847, -0.9784905124788417, -0.7259123218586886, 0.15024779411670722, 0.8959366989404217, 0.8797342206140177, 0.12379166736845787, -0.7323723324376428, -0.9818619158392312, -0.43274114505056144, 0.4585981653620278, 0.9837263751105298, 0.7513049894133318, -0.03639848633421769, -0.786095708473608, -0.9840363888387289, -0.5440211108893698, 0.2037957684966491, 0.8072610908541349, 0.9990439103118804, 0.8003730606575937, 0.4123377500596421, 0.04135821352247398, -0.19908366251892284, -0.27941549819892586, -0.19908366251892284, 0.04135821352247398, 0.4123377500596421, 0.8003730606575937, 0.9990439103118804, 0.8072610908541349, 0.2037957684966491, -0.5440211108893698, -0.9840363888387289, -0.786095708473608, -0.03639848633421769, 0.7513049894133318, 0.9837263751105298, 0.4585981653620278, -0.43274114505056144, -0.9818619158392312, -0.7323723324376428, 0.12379166736845787, 0.8797342206140177, 0.8959366989404217, 0.15024779411670722, -0.7259123218586886, -0.9784905124788417, -0.3839842381511847], [0.3544785436780216, -0.5789496358185631, -0.9996939741393799, -0.5395308232720181, 0.393205596105676, 0.9810135747654135, 0.7154910816495544, -0.16722487140352646, -0.9042033484553401, -0.8699452785942385, -0.10324074641368002, 0.7459063049687641, 0.9782847848018178, 0.4201670368266409, -0.4647255575123954, -0.9829793407063873, -0.7648781678542789, -0.009203041372185148, 0.7328169085463447, 0.9990439103118804, 0.7088612918380416, 0.11965157649377203, -0.43697551727207756, -0.7820948988254615, -0.9261848392897116, -0.9589242746631385, -0.9261848392897116, -0.7820948988254615, -0.43697551727207756, 0.11965157649377203, 0.7088612918380416, 0.9990439103118804, 0.7328169085463447, -0.009203041372185148, -0.7648781678542789, -0.9829793407063873, -0.4647255575123954, 0.4201670368266409, 0.9782847848018178, 0.7459063049687641, -0.10324074641368002, -0.8699452785942385, -0.9042033484553401, -0.16722487140352646, 0.7154910816495544, 0.9810135747654135, 0.393205596105676, -0.5395308232720181, -0.9996939741393799, -0.5789496358185631], [0.1841790651713167, -0.7185332705339138, -0.9766101758528882, -0.36117831706278347, 0.5758065019122222, 0.9997053962201027, 0.5370464912494449, -0.399037586302389, -0.9828460722647567, -0.7064425466207848, 0.18275564204117561, 0.911839860974458, 0.8599133508523288, 0.08264565346767089, -0.7589315343767972, -0.9747394897226348, -0.41148230684214054, 0.4622279808582701, 0.9783888223346213, 0.8003730606575937, 0.11965157649377203, -0.586176193003373, -0.9589242746631385, -0.9712777989606532, -0.8313391791635062, -0.7568024953079282, -0.8313391791635062, -0.9712777989606532, -0.9589242746631385, -0.586176193003373, 0.11965157649377203, 0.8003730606575937, 0.9783888223346213, 0.4622279808582701, -0.41148230684214054, -0.9747394897226348, -0.7589315343767972, 0.08264565346767089, 0.8599133508523288, 0.911839860974458, 0.18275564204117561, -0.7064425466207848, -0.9828460722647567, -0.399037586302389, 0.5370464912494449, 0.9997053962201027, 0.5758065019122222, -0.36117831706278347, -0.9766101758528882, -0.7185332705339138], [0.04659851464007364, -0.8110635436155982, -0.9333656865281341, -0.2108600771143173, 0.7018171073220065, 0.9807356389159875, 0.37632652685444434, -0.565688817406875, -0.9998706698457897, -0.5403536357338068, 0.39943890886127764, 0.9837263751105298, 0.6999256919024505, -0.19578093930261975, -0.9186368297074818, -0.8497593056327711, -0.06201520022829486, 0.7712319401165738, 0.9717622535057333, 0.4123377500596421, -0.43697551727207756, -0.9589242746631385, -0.8916822544789358, -0.44749175223692067, -0.020683531529582487, 0.1411200080598672, -0.020683531529582487, -0.44749175223692067, -0.8916822544789358, -0.9589242746631385, -0.43697551727207756, 0.4123377500596421, 0.9717622535057333, 0.7712319401165738, -0.06201520022829486, -0.8497593056327711, -0.9186368297074818, -0.19578093930261975, 0.6999256919024505, 0.9837263751105298, 0.39943890886127764, -0.5403536357338068, -0.9998706698457897, -0.565688817406875, 0.37632652685444434, 0.9807356389159875, 0.7018171073220065, -0.2108600771143173, -0.9333656865281341, -0.8110635436155982], [-0.052844195143546255, -0.8672002621460978, -0.8892231315429847, -0.09940899775107966, 0.7809125866717632, 0.9490461902387302, 0.252649147081716, -0.6733906518850356, -0.9869844897640472, -0.4046099138586663, 0.5440171490365727, 0.9999876561221204, 0.5535124793565069, -0.390197009595547, -0.9829793407063873, -0.6984726873116567, 0.2037957684966491, 0.9240590869570797, 0.8398053526495963, 0.04135821352247398, -0.7820948988254615, -0.9712777989606532, -0.44749175223692067, 0.30807174236304485, 0.786749131547214, 0.9092974268256817, 0.786749131547214, 0.30807174236304485, -0.44749175223692067, -0.9712777989606532, -0.7820948988254615, 0.04135821352247398, 0.8398053526495963, 0.9240590869570797, 0.2037957684966491, -0.6984726873116567, -0.9829793407063873, -0.390197009595547, 0.5535124793565069, 0.9999876561221204, 0.5440171490365727, -0.4046099138586663, -0.9869844897640472, -0.6733906518850356, 0.252649147081716, 0.9490461902387302, 0.7809125866717632, -0.09940899775107966, -0.8892231315429847, -0.8672002621460978], [-0.11251048882501428, -0.8965494243902328, -0.8575975897333462, -0.031561728068998866, 0.8233862126726764, 0.9228549487508323, 0.17582294024532347, -0.7323723324376428, -0.9690672970578027, -0.31765585797787305, 0.6246372204389422, 0.99485348900195, 0.4546989718040998, -0.5010191903189258, -0.9987608967574537, -0.5851764690934534, 0.36104927727853203, 0.9783888223346213, 0.7088612918380416, -0.19908366251892284, -0.9261848392897116, -0.8313391791635062, -0.020683531529582487, 0.786749131547214, 0.9877659459927356, 0.8414709848078965, 0.9877659459927356, 0.786749131547214, -0.020683531529582487, -0.8313391791635062, -0.9261848392897116, -0.19908366251892284, 0.7088612918380416, 0.9783888223346213, 0.36104927727853203, -0.5851764690934534, -0.9987608967574537, -0.5010191903189258, 0.4546989718040998, 0.99485348900195, 0.6246372204389422, -0.31765585797787305, -0.9690672970578027, -0.7323723324376428, 0.17582294024532347, 0.9228549487508323, 0.8233862126726764, -0.031561728068998866, -0.8575975897333462, -0.8965494243902328], [-0.13235175009777303, -0.9055783620066239, -0.8462204041751706, -0.008851309290403876, 0.8366556385360561, 0.9129452507276277, 0.14987720966295234, -0.750987246771676, -0.9613974918795568, -0.2879033166650653, 0.6502878401571168, 0.9906073556948704, 0.4201670368266409, -0.5365729180004349, -0.9999902065507035, -0.5440211108893698, 0.4121184852417566, 0.9893582466233818, 0.6569865987187891, -0.27941549819892586, -0.9589242746631385, -0.7568024953079282, 0.1411200080598672, 0.9092974268256817, 0.8414709848078965, 0.0, 0.8414709848078965, 0.9092974268256817, 0.1411200080598672, -0.7568024953079282, -0.9589242746631385, -0.27941549819892586, 0.6569865987187891, 0.9893582466233818, 0.4121184852417566, -0.5440211108893698, -0.9999902065507035, -0.5365729180004349, 0.4201670368266409, 0.9906073556948704, 0.6502878401571168, -0.2879033166650653, -0.9613974918795568, -0.750987246771676, 0.14987720966295234, 0.9129452507276277, 0.8366556385360561, -0.008851309290403876, -0.8462204041751706, -0.9055783620066239], [-0.11251048882501428, -0.8965494243902328, -0.8575975897333462, -0.031561728068998866, 0.8233862126726764, 0.9228549487508323, 0.17582294024532347, -0.7323723324376428, -0.9690672970578027, -0.31765585797787305, 0.6246372204389422, 0.99485348900195, 0.4546989718040998, -0.5010191903189258, -0.9987608967574537, -0.5851764690934534, 0.36104927727853203, 0.9783888223346213, 0.7088612918380416, -0.19908366251892284, -0.9261848392897116, -0.8313391791635062, -0.020683531529582487, 0.786749131547214, 0.9877659459927356, 0.8414709848078965, 0.9877659459927356, 0.786749131547214, -0.020683531529582487, -0.8313391791635062, -0.9261848392897116, -0.19908366251892284, 0.7088612918380416, 0.9783888223346213, 0.36104927727853203, -0.5851764690934534, -0.9987608967574537, -0.5010191903189258, 0.4546989718040998, 0.99485348900195, 0.6246372204389422, -0.31765585797787305, -0.9690672970578027, -0.7323723324376428, 0.17582294024532347, 0.9228549487508323, 0.8233862126726764, -0.031561728068998866, -0.8575975897333462, -0.8965494243902328], [-0.052844195143546255, -0.8672002621460978, -0.8892231315429847, -0.09940899775107966, 0.7809125866717632, 0.9490461902387302, 0.252649147081716, -0.6733906518850356, -0.9869844897640472, -0.4046099138586663, 0.5440171490365727, 0.9999876561221204, 0.5535124793565069, -0.390197009595547, -0.9829793407063873, -0.6984726873116567, 0.2037957684966491, 0.9240590869570797, 0.8398053526495963, 0.04135821352247398, -0.7820948988254615, -0.9712777989606532, -0.44749175223692067, 0.30807174236304485, 0.786749131547214, 0.9092974268256817, 0.786749131547214, 0.30807174236304485, -0.44749175223692067, -0.9712777989606532, -0.7820948988254615, 0.04135821352247398, 0.8398053526495963, 0.9240590869570797, 0.2037957684966491, -0.6984726873116567, -0.9829793407063873, -0.390197009595547, 0.5535124793565069, 0.9999876561221204, 0.5440171490365727, -0.4046099138586663, -0.9869844897640472, -0.6733906518850356, 0.252649147081716, 0.9490461902387302, 0.7809125866717632, -0.09940899775107966, -0.8892231315429847, -0.8672002621460978], [0.04659851464007364, -0.8110635436155982, -0.9333656865281341, -0.2108600771143173, 0.7018171073220065, 0.9807356389159875, 0.37632652685444434, -0.565688817406875, -0.9998706698457897, -0.5403536357338068, 0.39943890886127764, 0.9837263751105298, 0.6999256919024505, -0.19578093930261975, -0.9186368297074818, -0.8497593056327711, -0.06201520022829486, 0.7712319401165738, 0.9717622535057333, 0.4123377500596421, -0.43697551727207756, -0.9589242746631385, -0.8916822544789358, -0.44749175223692067, -0.020683531529582487, 0.1411200080598672, -0.020683531529582487, -0.44749175223692067, -0.8916822544789358, -0.9589242746631385, -0.43697551727207756, 0.4123377500596421, 0.9717622535057333, 0.7712319401165738, -0.06201520022829486, -0.8497593056327711, -0.9186368297074818, -0.19578093930261975, 0.6999256919024505, 0.9837263751105298, 0.39943890886127764, -0.5403536357338068, -0.9998706698457897, -0.565688817406875, 0.37632652685444434, 0.9807356389159875, 0.7018171073220065, -0.2108600771143173, -0.9333656865281341, -0.8110635436155982], [0.1841790651713167, -0.7185332705339138, -0.9766101758528882, -0.36117831706278347, 0.5758065019122222, 0.9997053962201027, 0.5370464912494449, -0.399037586302389, -0.9828460722647567, -0.7064425466207848, 0.18275564204117561, 0.911839860974458, 0.8599133508523288, 0.08264565346767089, -0.7589315343767972, -0.9747394897226348, -0.41148230684214054, 0.4622279808582701, 0.9783888223346213, 0.8003730606575937, 0.11965157649377203, -0.586176193003373, -0.9589242746631385, -0.9712777989606532, -0.8313391791635062, -0.7568024953079282, -0.8313391791635062, -0.9712777989606532, -0.9589242746631385, -0.586176193003373, 0.11965157649377203, 0.8003730606575937, 0.9783888223346213, 0.4622279808582701, -0.41148230684214054, -0.9747394897226348, -0.7589315343767972, 0.08264565346767089, 0.8599133508523288, 0.911839860974458, 0.18275564204117561, -0.7064425466207848, -0.9828460722647567, -0.399037586302389, 0.5370464912494449, 0.9997053962201027, 0.5758065019122222, -0.36117831706278347, -0.9766101758528882, -0.7185332705339138], [0.3544785436780216, -0.5789496358185631, -0.9996939741393799, -0.5395308232720181, 0.393205596105676, 0.9810135747654135, 0.7154910816495544, -0.16722487140352646, -0.9042033484553401, -0.8699452785942385, -0.10324074641368002, 0.7459063049687641, 0.9782847848018178, 0.4201670368266409, -0.4647255575123954, -0.9829793407063873, -0.7648781678542789, -0.009203041372185148, 0.7328169085463447, 0.9990439103118804, 0.7088612918380416, 0.11965157649377203, -0.43697551727207756, -0.7820948988254615, -0.9261848392897116, -0.9589242746631385, -0.9261848392897116, -0.7820948988254615, -0.43697551727207756, 0.11965157649377203, 0.7088612918380416, 0.9990439103118804, 0.7328169085463447, -0.009203041372185148, -0.7648781678542789, -0.9829793407063873, -0.4647255575123954, 0.4201670368266409, 0.9782847848018178, 0.7459063049687641, -0.10324074641368002, -0.8699452785942385, -0.9042033484553401, -0.16722487140352646, 0.7154910816495544, 0.9810135747654135, 0.393205596105676, -0.5395308232720181, -0.9996939741393799, -0.5789496358185631], [0.5456621280611279, -0.3839842381511847, -0.9784905124788417, -0.7259123218586886, 0.15024779411670722, 0.8959366989404217, 0.8797342206140177, 0.12379166736845787, -0.7323723324376428, -0.9818619158392312, -0.43274114505056144, 0.4585981653620278, 0.9837263751105298, 0.7513049894133318, -0.03639848633421769, -0.786095708473608, -0.9840363888387289, -0.5440211108893698, 0.2037957684966491, 0.8072610908541349, 0.9990439103118804, 0.8003730606575937, 0.4123377500596421, 0.04135821352247398, -0.19908366251892284, -0.27941549819892586, -0.19908366251892284, 0.04135821352247398, 0.4123377500596421, 0.8003730606575937, 0.9990439103118804, 0.8072610908541349, 0.2037957684966491, -0.5440211108893698, -0.9840363888387289, -0.786095708473608, -0.03639848633421769, 0.7513049894133318, 0.9837263751105298, 0.4585981653620278, -0.43274114505056144, -0.9818619158392312, -0.7323723324376428, 0.12379166736845787, 0.8797342206140177, 0.8959366989404217, 0.15024779411670722, -0.7259123218586886, -0.9784905124788417, -0.3839842381511847], [0.7370998663151956, -0.13235175009777303, -0.887140035350667, -0.8892231315429847, -0.1442896235333068, 0.7184201511154031, 0.9852623084849599, 0.44721751781684405, -0.44822580183753064, -0.9828460722647567, -0.7479592241617414, 0.05545895688281034, 0.8094061726446607, 0.9702044875563652, 0.4546989718040998, -0.35210108504889737, -0.9186368297074818, -0.9339707316330099, -0.4570867375418006, 0.2037957684966491, 0.7328169085463447, 0.9783888223346213, 0.9717622535057333, 0.8398053526495963, 0.7088612918380416, 0.6569865987187891, 0.7088612918380416, 0.8398053526495963, 0.9717622535057333, 0.9783888223346213, 0.7328169085463447, 0.2037957684966491, -0.4570867375418006, -0.9339707316330099, -0.9186368297074818, -0.35210108504889737, 0.4546989718040998, 0.9702044875563652, 0.8094061726446607, 0.05545895688281034, -0.7479592241617414, -0.9828460722647567, -0.44822580183753064, 0.44721751781684405, 0.9852623084849599, 0.7184201511154031, -0.1442896235333068, -0.8892231315429847, -0.887140035350667, -0.13235175009777303], [0.8983805029159327, 0.16472584477074798, -0.7040964370475585, -0.9883875439237823, -0.46271600927183404, 0.4354061127346995, 0.9810135747654135, 0.7500645547914181, -0.06122338153363395, -0.8197716090940644, -0.9613974918795568, -0.4046099138586663, 0.4292170574242703, 0.9596509227929731, 0.8599133508523288, 0.2375839859261567, -0.5010191903189258, -0.949820680215173, -0.9339707316330099, -0.5440211108893698, -0.009203041372185148, 0.4622279808582701, 0.7712319401165738, 0.9240590869570797, 0.9783888223346213, 0.9893582466233818, 0.9783888223346213, 0.9240590869570797, 0.7712319401165738, 0.4622279808582701, -0.009203041372185148, -0.5440211108893698, -0.9339707316330099, -0.949820680215173, -0.5010191903189258, 0.2375839859261567, 0.8599133508523288, 0.9596509227929731, 0.4292170574242703, -0.4046099138586663, -0.9613974918795568, -0.8197716090940644, -0.06122338153363395, 0.7500645547914181, 0.9810135747654135, 0.4354061127346995, -0.46271600927183404, -0.9883875439237823, -0.7040964370475585, 0.16472584477074798], [0.9911848272864543, 0.4787847819991722, -0.42101420248427274, -0.9784905124788417, -0.7553386617118615, 0.0594013868715, 0.8233862126726764, 0.956586601484016, 0.37632652685444434, -0.4723862364856837, -0.9771688419778408, -0.8048090667832768, -0.10324074641368002, 0.6502878401571168, 0.9971509674428002, 0.7753400962492819, 0.16084964506716973, -0.5010191903189258, -0.9186368297074818, -0.9840363888387289, -0.7648781678542789, -0.41148230684214054, -0.06201520022829486, 0.2037957684966491, 0.36104927727853203, 0.4121184852417566, 0.36104927727853203, 0.2037957684966491, -0.06201520022829486, -0.41148230684214054, -0.7648781678542789, -0.9840363888387289, -0.9186368297074818, -0.5010191903189258, 0.16084964506716973, 0.7753400962492819, 0.9971509674428002, 0.6502878401571168, -0.10324074641368002, -0.8048090667832768, -0.9771688419778408, -0.4723862364856837, 0.37632652685444434, 0.956586601484016, 0.8233862126726764, 0.0594013868715, -0.7553386617118615, -0.9784905124788417, -0.42101420248427274, 0.4787847819991722], [0.9753959210713569, 0.7625584504796027, -0.052844195143546255, -0.8229869266810047, -0.9545833223822333, -0.36117831706278347, 0.49708668342823564, 0.9854307373467088, 0.7665984826660711, 0.018405303267344752, -0.7323723324376428, -0.997255180156715, -0.6390451336705433, 0.08735244321299503, 0.7459063049687641, 0.9999876561221204, 0.7753400962492819, 0.2375839859261567, -0.35210108504889737, -0.786095708473608, -0.9829793407063873, -0.9747394897226348, -0.8497593056327711, -0.6984726873116567, -0.5851764690934534, -0.5440211108893698, -0.5851764690934534, -0.6984726873116567, -0.8497593056327711, -0.9747394897226348, -0.9829793407063873, -0.786095708473608, -0.35210108504889737, 0.2375839859261567, 0.7753400962492819, 0.9999876561221204, 0.7459063049687641, 0.08735244321299503, -0.6390451336705433, -0.997255180156715, -0.7323723324376428, 0.018405303267344752, 0.7665984826660711, 0.9854307373467088, 0.49708668342823564, -0.36117831706278347, -0.9545833223822333, -0.8229869266810047, -0.052844195143546255, 0.7625584504796027], [0.8199555226173607, 0.9545112551957777, 0.3544785436780216, -0.5106954441094101, -0.9895644478503135, -0.7408102813303544, 0.036641970611123245, 0.7809125866717632, 0.9852623084849599, 0.5370464912494449, -0.2459315899387359, -0.8649557077942015, -0.9690672970578027, -0.5403536357338068, 0.1510338945637309, 0.7459063049687641, 0.9971509674428002, 0.8599133508523288, 0.4546989718040998, -0.03639848633421769, -0.4647255575123954, -0.7589315343767972, -0.9186368297074818, -0.9829793407063873, -0.9987608967574537, -0.9999902065507035, -0.9987608967574537, -0.9829793407063873, -0.9186368297074818, -0.7589315343767972, -0.4647255575123954, -0.03639848633421769, 0.4546989718040998, 0.8599133508523288, 0.9971509674428002, 0.7459063049687641, 0.1510338945637309, -0.5403536357338068, -0.9690672970578027, -0.8649557077942015, -0.2459315899387359, 0.5370464912494449, 0.9852623084849599, 0.7809125866717632, 0.036641970611123245, -0.7408102813303544, -0.9895644478503135, -0.5106954441094101, 0.3544785436780216, 0.9545112551957777], [0.5171216654477707, 0.9916552086207551, 0.7239439305723232, -0.07274873415833447, -0.8110635436155982, -0.9717790528591356, -0.46271600927183404, 0.3502527398419366, 0.9255541197058049, 0.9129452507276277, 0.3521027624179121, -0.399037586302389, -0.9159022382375784, -0.9528820890159757, -0.5403536357338068, 0.08735244321299503, 0.6502878401571168, 0.9596509227929731, 0.9702044875563652, 0.7513049894133318, 0.4201670368266409, 0.08264565346767089, -0.19578093930261975, -0.390197009595547, -0.5010191903189258, -0.5365729180004349, -0.5010191903189258, -0.390197009595547, -0.19578093930261975, 0.08264565346767089, 0.4201670368266409, 0.7513049894133318, 0.9702044875563652, 0.9596509227929731, 0.6502878401571168, 0.08735244321299503, -0.5403536357338068, -0.9528820890159757, -0.9159022382375784, -0.399037586302389, 0.3521027624179121, 0.9129452507276277, 0.9255541197058049, 0.3502527398419366, -0.46271600927183404, -0.9717790528591356, -0.8110635436155982, -0.07274873415833447, 0.7239439305723232, 0.9916552086207551], [0.0961793703293298, 0.8302999955979169, 0.9599849292731429, 0.40878600496256273, -0.42101420248427274, -0.9577345186201252, -0.8575975897333462, -0.2108600771143173, 0.5565388448499853, 0.9810135747654135, 0.8414046940486856, 0.252649147081716, -0.44822580183753064, -0.9159022382375784, -0.9690672970578027, -0.6390451336705433, -0.10324074641368002, 0.4292170574242703, 0.8094061726446607, 0.9837263751105298, 0.9782847848018178, 0.8599133508523288, 0.6999256919024505, 0.5535124793565069, 0.4546989718040998, 0.4201670368266409, 0.4546989718040998, 0.5535124793565069, 0.6999256919024505, 0.8599133508523288, 0.9782847848018178, 0.9837263751105298, 0.8094061726446607, 0.4292170574242703, -0.10324074641368002, -0.6390451336705433, -0.9690672970578027, -0.9159022382375784, -0.44822580183753064, 0.252649147081716, 0.8414046940486856, 0.9810135747654135, 0.5565388448499853, -0.2108600771143173, -0.8575975897333462, -0.9577345186201252, -0.42101420248427274, 0.40878600496256273, 0.9599849292731429, 0.8302999955979169], [-0.36977206094538123, 0.4701369183201865, 0.9753959210713569, 0.8099508994563396, 0.10591864700171519, -0.6591064566557293, -0.9992433916004055, -0.7259123218586886, -0.031561728068998866, 0.6675079670136292, 0.9952084655965423, 0.8130861137605422, 0.252649147081716, -0.399037586302389, -0.8649557077942015, -0.997255180156715, -0.8048090667832768, -0.4046099138586663, 0.05545895688281034, 0.4585981653620278, 0.7459063049687641, 0.911839860974458, 0.9837263751105298, 0.9999876561221204, 0.99485348900195, 0.9906073556948704, 0.99485348900195, 0.9999876561221204, 0.9837263751105298, 0.911839860974458, 0.7459063049687641, 0.4585981653620278, 0.05545895688281034, -0.4046099138586663, -0.8048090667832768, -0.997255180156715, -0.8649557077942015, -0.399037586302389, 0.252649147081716, 0.8130861137605422, 0.9952084655965423, 0.6675079670136292, -0.031561728068998866, -0.7259123218586886, -0.9992433916004055, -0.6591064566557293, 0.10591864700171519, 0.8099508994563396, 0.9753959210713569, 0.4701369183201865], [-0.7710099754671497, -0.02760600627447501, 0.727913119918548, 0.9970765516272863, 0.6242995590883633, -0.13235175009777303, -0.7988038975130448, -0.9914061586009497, -0.6291191778335704, 0.0594013868715, 0.7018171073220065, 0.9952084655965423, 0.8414046940486856, 0.3521027624179121, -0.2459315899387359, -0.7323723324376428, -0.9771688419778408, -0.9613974918795568, -0.7479592241617414, -0.43274114505056144, -0.10324074641368002, 0.18275564204117561, 0.39943890886127764, 0.5440171490365727, 0.6246372204389422, 0.6502878401571168, 0.6246372204389422, 0.5440171490365727, 0.39943890886127764, 0.18275564204117561, -0.10324074641368002, -0.43274114505056144, -0.7479592241617414, -0.9613974918795568, -0.9771688419778408, -0.7323723324376428, -0.2459315899387359, 0.3521027624179121, 0.8414046940486856, 0.9952084655965423, 0.7018171073220065, 0.0594013868715, -0.6291191778335704, -0.9914061586009497, -0.7988038975130448, -0.13235175009777303, 0.6242995590883633, 0.9970765516272863, 0.727913119918548, -0.02760600627447501], [-0.9866658946445946, -0.5396963022265032, 0.2536796241035926, 0.8778684012984409, 0.9545112551957777, 0.4615624875447749, -0.28907125514443305, -0.8672002621460978, -0.9766101758528882, -0.5941982082298611, 0.0594013868715, 0.6675079670136292, 0.9810135747654135, 0.9129452507276277, 0.5370464912494449, 0.018405303267344752, -0.4723862364856837, -0.8197716090940644, -0.9828460722647567, -0.9818619158392312, -0.8699452785942385, -0.7064425466207848, -0.5403536357338068, -0.4046099138586663, -0.31765585797787305, -0.2879033166650653, -0.31765585797787305, -0.4046099138586663, -0.5403536357338068, -0.7064425466207848, -0.8699452785942385, -0.9818619158392312, -0.9828460722647567, -0.8197716090940644, -0.4723862364856837, 0.018405303267344752, 0.5370464912494449, 0.9129452507276277, 0.9810135747654135, 0.6675079670136292, 0.0594013868715, -0.5941982082298611, -0.9766101758528882, -0.8672002621460978, -0.28907125514443305, 0.4615624875447749, 0.9545112551957777, 0.8778684012984409, 0.2536796241035926, -0.5396963022265032], [-0.9259311737964365, -0.9071867414201306, -0.320602419432942, 0.45418422532509545, 0.9508042427723833, 0.8983805029159327, 0.3544785436780216, -0.36525286620192765, -0.887140035350667, -0.9766101758528882, -0.6291191778335704, -0.031561728068998866, 0.5565388448499853, 0.9255541197058049, 0.9852623084849599, 0.7665984826660711, 0.37632652685444434, -0.06122338153363395, -0.44822580183753064, -0.7323723324376428, -0.9042033484553401, -0.9828460722647567, -0.9998706698457897, -0.9869844897640472, -0.9690672970578027, -0.9613974918795568, -0.9690672970578027, -0.9869844897640472, -0.9998706698457897, -0.9828460722647567, -0.9042033484553401, -0.7323723324376428, -0.44822580183753064, -0.06122338153363395, 0.37632652685444434, 0.7665984826660711, 0.9852623084849599, 0.9255541197058049, 0.5565388448499853, -0.031561728068998866, -0.6291191778335704, -0.9766101758528882, -0.887140035350667, -0.36525286620192765, 0.3544785436780216, 0.8983805029159327, 0.9508042427723833, 0.45418422532509545, -0.320602419432942, -0.9071867414201306], [-0.5729354351462002, -0.9880316240928618, -0.8027125451584881, -0.15043367466348193, 0.577530538995622, 0.9793226624873786, 0.8622844455154678, 0.31751041845612377, -0.36525286620192765, -0.8672002621460978, -0.9914061586009497, -0.7259123218586886, -0.2108600771143173, 0.3502527398419366, 0.7809125866717632, 0.9854307373467088, 0.956586601484016, 0.7500645547914181, 0.44721751781684405, 0.12379166736845787, -0.16722487140352646, -0.399037586302389, -0.565688817406875, -0.6733906518850356, -0.7323723324376428, -0.750987246771676, -0.7323723324376428, -0.6733906518850356, -0.565688817406875, -0.399037586302389, -0.16722487140352646, 0.12379166736845787, 0.44721751781684405, 0.7500645547914181, 0.956586601484016, 0.9854307373467088, 0.7809125866717632, 0.3502527398419366, -0.2108600771143173, -0.7259123218586886, -0.9914061586009497, -0.8672002621460978, -0.36525286620192765, 0.31751041845612377, 0.8622844455154678, 0.9793226624873786, 0.577530538995622, -0.15043367466348193, -0.8027125451584881, -0.9880316240928618], [-0.01528900397670874, -0.7211568839360558, -0.9999248173626606, -0.7135482820487202, -0.045255173119998, 0.6350748642631946, 0.9861675309117627, 0.8622844455154678, 0.3544785436780216, -0.28907125514443305, -0.7988038975130448, -0.9992433916004055, -0.8575975897333462, -0.46271600927183404, 0.036641970611123245, 0.49708668342823564, 0.8233862126726764, 0.9810135747654135, 0.9852623084849599, 0.8797342206140177, 0.7154910816495544, 0.5370464912494449, 0.37632652685444434, 0.252649147081716, 0.17582294024532347, 0.14987720966295234, 0.17582294024532347, 0.252649147081716, 0.37632652685444434, 0.5370464912494449, 0.7154910816495544, 0.8797342206140177, 0.9852623084849599, 0.9810135747654135, 0.8233862126726764, 0.49708668342823564, 0.036641970611123245, -0.46271600927183404, -0.8575975897333462, -0.9992433916004055, -0.7988038975130448, -0.28907125514443305, 0.3544785436780216, 0.8622844455154678, 0.9861675309117627, 0.6350748642631946, -0.045255173119998, -0.7135482820487202, -0.9999248173626606, -0.7211568839360558], [0.5643904318910452, -0.17403707166257712, -0.8054445870804156, -0.9936231122371427, -0.6636338842129675, -0.009937201600071412, 0.6350748642631946, 0.9793226624873786, 0.8983805029159327, 0.4615624875447749, -0.13235175009777303, -0.6591064566557293, -0.9577345186201252, -0.9717790528591356, -0.7408102813303544, -0.36117831706278347, 0.0594013868715, 0.4354061127346995, 0.7184201511154031, 0.8959366989404217, 0.9810135747654135, 0.9997053962201027, 0.9807356389159875, 0.9490461902387302, 0.9228549487508323, 0.9129452507276277, 0.9228549487508323, 0.9490461902387302, 0.9807356389159875, 0.9997053962201027, 0.9810135747654135, 0.8959366989404217, 0.7184201511154031, 0.4354061127346995, 0.0594013868715, -0.36117831706278347, -0.7408102813303544, -0.9717790528591356, -0.9577345186201252, -0.6591064566557293, -0.13235175009777303, 0.4615624875447749, 0.8983805029159327, 0.9793226624873786, 0.6350748642631946, -0.009937201600071412, -0.6636338842129675, -0.9936231122371427, -0.8054445870804156, -0.17403707166257712], [0.9437285851822178, 0.45690344147541284, -0.2677948252231252, -0.8426112405177267, -0.9892668187780492, -0.6636338842129675, -0.045255173119998, 0.577530538995622, 0.9508042427723833, 0.9545112551957777, 0.6242995590883633, 0.10591864700171519, -0.42101420248427274, -0.8110635436155982, -0.9895644478503135, -0.9545833223822333, -0.7553386617118615, -0.46271600927183404, -0.1442896235333068, 0.15024779411670722, 0.393205596105676, 0.5758065019122222, 0.7018171073220065, 0.7809125866717632, 0.8233862126726764, 0.8366556385360561, 0.8233862126726764, 0.7809125866717632, 0.7018171073220065, 0.5758065019122222, 0.393205596105676, 0.15024779411670722, -0.1442896235333068, -0.46271600927183404, -0.7553386617118615, -0.9545833223822333, -0.9895644478503135, -0.8110635436155982, -0.42101420248427274, 0.10591864700171519, 0.6242995590883633, 0.9545112551957777, 0.9508042427723833, 0.577530538995622, -0.045255173119998, -0.6636338842129675, -0.9892668187780492, -0.8426112405177267, -0.2677948252231252, 0.45690344147541284], [0.9508184515435334, 0.909348191100782, 0.4001993726403515, -0.2986026440580049, -0.8426112405177267, -0.9936231122371427, -0.7135482820487202, -0.15043367466348193, 0.45418422532509545, 0.8778684012984409, 0.9970765516272863, 0.8099508994563396, 0.40878600496256273, -0.07274873415833447, -0.5106954441094101, -0.8229869266810047, -0.9784905124788417, -0.9883875439237823, -0.8892231315429847, -0.7259123218586886, -0.5395308232720181, -0.36117831706278347, -0.2108600771143173, -0.09940899775107966, -0.031561728068998866, -0.008851309290403876, -0.031561728068998866, -0.09940899775107966, -0.2108600771143173, -0.36117831706278347, -0.5395308232720181, -0.7259123218586886, -0.8892231315429847, -0.9883875439237823, -0.9784905124788417, -0.8229869266810047, -0.5106954441094101, -0.07274873415833447, 0.40878600496256273, 0.8099508994563396, 0.9970765516272863, 0.8778684012984409, 0.45418422532509545, -0.15043367466348193, -0.7135482820487202, -0.9936231122371427, -0.8426112405177267, -0.2986026440580049, 0.4001993726403515, 0.909348191100782], [0.553818813206015, 0.9677093359135412, 0.8961364196158191, 0.4001993726403515, -0.2677948252231252, -0.8054445870804156, -0.9999248173626606, -0.8027125451584881, -0.320602419432942, 0.2536796241035926, 0.727913119918548, 0.9753959210713569, 0.9599849292731429, 0.7239439305723232, 0.3544785436780216, -0.052844195143546255, -0.42101420248427274, -0.7040964370475585, -0.887140035350667, -0.9784905124788417, -0.9996939741393799, -0.9766101758528882, -0.9333656865281341, -0.8892231315429847, -0.8575975897333462, -0.8462204041751706, -0.8575975897333462, -0.8892231315429847, -0.9333656865281341, -0.9766101758528882, -0.9996939741393799, -0.9784905124788417, -0.887140035350667, -0.7040964370475585, -0.42101420248427274, -0.052844195143546255, 0.3544785436780216, 0.7239439305723232, 0.9599849292731429, 0.9753959210713569, 0.727913119918548, 0.2536796241035926, -0.320602419432942, -0.8027125451584881, -0.9999248173626606, -0.8054445870804156, -0.2677948252231252, 0.4001993726403515, 0.8961364196158191, 0.9677093359135412], [-0.09777126940501375, 0.5780962926354162, 0.9677093359135412, 0.909348191100782, 0.45690344147541284, -0.17403707166257712, -0.7211568839360558, -0.9880316240928618, -0.9071867414201306, -0.5396963022265032, -0.02760600627447501, 0.4701369183201865, 0.8302999955979169, 0.9916552086207551, 0.9545112551957777, 0.7625584504796027, 0.4787847819991722, 0.16472584477074798, -0.13235175009777303, -0.3839842381511847, -0.5789496358185631, -0.7185332705339138, -0.8110635436155982, -0.8672002621460978, -0.8965494243902328, -0.9055783620066239, -0.8965494243902328, -0.8672002621460978, -0.8110635436155982, -0.7185332705339138, -0.5789496358185631, -0.3839842381511847, -0.13235175009777303, 0.16472584477074798, 0.4787847819991722, 0.7625584504796027, 0.9545112551957777, 0.9916552086207551, 0.8302999955979169, 0.4701369183201865, -0.02760600627447501, -0.5396963022265032, -0.9071867414201306, -0.9880316240928618, -0.7211568839360558, -0.17403707166257712, 0.45690344147541284, 0.909348191100782, 0.9677093359135412, 0.5780962926354162]], size = [100, 100]); } } ================================================ FILE: tests/examples_scad/07-libs.scad ================================================ use <../../../../../.local/share/OpenSCAD/libraries/BOSL/metric_screws.scad>; metric_bolt(headtype = "hex", l = 20, size = 6); ================================================ FILE: tests/examples_scad/08-extensions.scad ================================================ //the root tree contains 2 non sense comment(s) union() { //non sense comment color(c = "red") { translate(v = [0, 0, 1]) { translate(v = [-1, 0, 0]) { cube(size = 10); } } } //non sense comment color(c = "red") { translate(v = [0, 0, 3]) { translate(v = [-3, 0, 0]) { cube(size = 5); } } } } ================================================ FILE: tests/examples_scad/09-code-attach-extension.scad ================================================ cube(size = 10); /* Generated from the following ExpSolid code: #! /usr/bin/env python from pathlib import Path from solid2 import cube, register_post_render # ============= # = Extension = # ============= # This is more or less the same as -- regular -- SolidPython does when it # writes a scad file. It appends the python source to the end of the *.scad # file. # # If you like this, you can simply import this extension that should do it. # # register the post_render extension using the decorator. This hooks it into # the "_render" routine. It will be called after the root gets rendered. It's # return string will be appended to the rendered string. @register_post_render def attach_code_post_render(_): #find the "root" file calling_file = None import __main__ # not called from a terminal? if hasattr(__main__, "__file__"): # extract filename and replace suffix calling_file = Path(__main__.__file__).absolute() else: return '' # no code available. Called from withing a python shell assert(calling_file.exists()) # read source file with calling_file.open("r") as f: code_str = f.read() # escape /_* and *_/ because otherwise it would end this comment block which # we use to inject the solid code code_str = code_str.replace("/_*", "/_*") code_str = code_str.replace("*_/", "*_/") # return the string to be appended to the *.scad file return f'/_* Generated from the following ExpSolid code:\n\n' +\ f'{code_str}*_/' # ============= if __name__ == "__main__": c = cube(10) c.save_as_scad() */ ================================================ FILE: tests/examples_scad/10-customizer.scad ================================================ objects = 4; //[2, 4, 6] side = 4; //[] cube_pos = [5, 5, 5]; //[] cube_size = 5; //[] text = "customize me!"; //[customize me!, Thank you!] union() { for (i = [1:objects]){ translate([2*i*side,0,0]){ cube(side); } } translate(v = cube_pos) { cube(size = (cube_size * 2)); } translate(v = [0, -20, 0]) { text(text = "text"); } } ================================================ FILE: tests/examples_scad/11-fonts.scad ================================================ use <../../11-font/RichEatin.otf> >; $vpt = [700, 900, 200]; text(font = "Rich Eatin'", text = "blablub"); ================================================ FILE: tests/examples_scad/12-animation.scad ================================================ rotation_speed = 1.0; //[] $vpt = [4, 3, 15]; $vpr = [60, 0, ((rotation_speed * $t) * 360)]; $vpd = 100; cube(size = ($t * 10)); ================================================ FILE: tests/examples_scad/13-animated-bouncing-ball.scad ================================================ $vpt = [700, 900, 200]; $vpr = [80, 0, 20]; $vpd = 6000; bouncing_ball_data = [[4.975, 4.975, 191.04], [9.925125, 9.925125, 373.1648], [14.850499374999998, 14.850499374999998, 546.418976], [19.751246878125, 19.751246878125, 710.84688112], [24.627490643734372, 24.627490643734372, 866.4926467144], [29.4793531905157, 29.4793531905157, 1013.400183480828], [34.30695642456312, 34.30695642456312, 1151.6131825634238], [39.1104216424403, 39.1104216424403, 1281.1751166506067], [43.8898695342281, 43.8898695342281, 1402.1292410673536], [48.645420186556954, 48.645420186556954, 1514.518594862017], [53.37719308562417, 53.37719308562417, 1618.3860018877067], [58.08530712019605, 58.08530712019605, 1713.7740718782682], [62.769880584595064, 62.769880584595064, 1800.7252015188767], [67.43103118167208, 67.43103118167208, 1879.2815755112822], [72.06887602576373, 72.06887602576373, 1949.4851676337257], [76.68353164563491, 76.68353164563491, 2011.377741795557], [81.27511398740674, 81.27511398740674, 2065.0008530865794], [85.84373841746971, 85.84373841746971, 2110.3958488211465], [90.38951972538236, 90.38951972538236, 2147.6038695770408], [94.91257212675545, 94.91257212675545, 2176.6658502291557], [99.41300926612168, 99.41300926612168, 2197.62252097801], [103.89094421979107, 103.89094421979107, 2210.5144083731197], [108.34648949869211, 108.34648949869211, 2215.381836331254], [112.77975705119864, 112.77975705119864, 2212.2649271495975], [117.19085826594265, 117.19085826594265, 2201.2036025138495], [121.57990397461293, 121.57990397461293, 2182.2375845012803], [125.94700445473987, 125.94700445473987, 2155.4063965787736], [130.29226943246616, 130.29226943246616, 2120.74936459588], [134.61580808530383, 134.61580808530383, 2078.3056177729004], [138.91772904487732, 138.91772904487732, 2028.114089684036], [143.19814039965294, 143.19814039965294, 1970.2135192356156], [147.45714969765467, 147.45714969765467, 1904.6424516394375], [151.6948639491664, 151.6948639491664, 1831.4392393812402], [155.91138962942057, 155.91138962942057, 1750.642043184334], [160.10683268127346, 160.10683268127346, 1662.2888329684122], [164.2812985178671, 164.2812985178671, 1566.41738880357], [168.43489202527775, 168.43489202527775, 1463.0653018595522], [172.56771756515136, 172.56771756515136, 1352.2699753502543], [176.6798789773256, 176.6798789773256, 1234.068625473503], [180.77147958243896, 180.77147958243896, 1108.4982823461355], [184.84262218452676, 184.84262218452676, 975.5957909344048], [188.89340907360412, 188.89340907360412, 835.3978119797328], [192.9239420282361, 192.9239420282361, 687.9408229198341], [196.93432231809493, 196.93432231809493, 533.2611188052349], [200.92465070650445, 200.92465070650445, 371.39481321120866], [204.89502745297193, 204.89502745297193, 202.37783914515256], [208.84555231570707, 208.84555231570707, 100], [212.77632455412854, 212.77632455412854, 267.29122974974723], [216.68744293135788, 216.68744293135788, 425.78600335074566], [220.5790057167011, 220.5790057167011, 575.5283030837392], [224.45111068811758, 224.45111068811758, 716.5618913180676], [228.30385513467698, 228.30385513467698, 848.9303116112245], [232.1373358590036, 232.1373358590036, 972.6768898029156], [235.95164917970857, 235.95164917970857, 1087.8447351036482], [239.74689093381002, 239.74689093381002, 1194.476741177877], [243.52315647914097, 243.52315647914097, 1292.6155872217348], [247.28054069674525, 247.28054069674525, 1382.3037390353734], [251.01913799326152, 251.01913799326152, 1463.5834500899437], [254.7390423032952, 254.7390423032952, 1536.4967625892411], [258.44034709177873, 258.44034709177873, 1601.085508526042], [262.1231453563198, 262.1231453563198, 1657.3913107331591], [265.7875296295382, 265.7875296295382, 1705.4555839292404], [269.4335919813905, 269.4335919813905, 1745.3195357593415], [273.06142402148356, 273.06142402148356, 1777.024167830292], [276.67111690137614, 276.67111690137614, 1800.610276740888], [280.2627613168693, 280.2627613168693, 1816.1184551069307], [283.8364475102849, 283.8364475102849, 1823.5890925811432], [287.3922652727335, 287.3922652727335, 1823.0623768679845], [290.9303039463698, 290.9303039463698, 1814.5782947333919], [294.45065242663793, 294.45065242663793, 1798.1766330094722], [297.95339916450473, 297.95339916450473, 1773.896979594172], [301.4386321686822, 301.4386321686822, 1741.7787244459485], [304.9064390078388, 304.9064390078388, 1701.861060573466], [308.3569068127996, 308.3569068127996, 1654.1829850203458], [311.79012227873557, 311.79012227873557, 1598.7832998449912], [315.2061716673419, 315.2061716673419, 1535.7006130955135], [318.6051408090052, 318.6051408090052, 1464.9733397797831], [321.9871151049602, 321.9871151049602, 1386.6397028306314], [325.3521795294354, 325.3521795294354, 1300.7377340662256], [328.7004186317882, 328.7004186317882, 1207.3052751456416], [332.0319165386292, 332.0319165386292, 1106.3799785196607], [335.3467569559361, 335.3467569559361, 997.9993083768095], [338.6450231711564, 338.6450231711564, 882.2005415846726], [341.92679805530065, 341.92679805530065, 759.0207686264964], [345.19216406502414, 345.19216406502414, 628.4968945331111], [348.441203244699, 348.441203244699, 490.6656398101927], [351.6739972284755, 351.6739972284755, 345.56354136088896], [354.89062724233315, 354.89062724233315, 193.2269534038317], [358.09117410612146, 358.09117410612146, 100], [361.27571823559083, 361.27571823559083, 250.77723049218562], [364.4443396444129, 364.4443396444129, 392.8405748319103], [367.5971179461908, 367.5971179461908, 526.2336024499364], [370.73413235645984, 370.73413235645984, 650.9996649298723], [373.85546169467756, 373.85546169467756, 767.1818970974086], [376.96118438620414, 376.96118438620414, 874.8232181041072], [380.0513784642731, 380.0513784642731, 973.9663325057724], [383.1261215719517, 383.1261215719517, 1064.653731335429], [386.18549096409197, 386.18549096409197, 1146.9276931709376], [389.2295635092715, 389.2295635092715, 1220.8302851972685], [392.25841569172513, 392.25841569172513, 1286.403364263468], [395.2721236132665, 395.2721236132665, 1343.688577934336], [398.2707629952002, 398.2707629952002, 1392.7273655368501], [401.2544091802242, 401.2544091802242, 1433.5609592013516], [404.22313713432305, 404.22313713432305, 1466.2303848975305], [407.17702144865143, 407.17702144865143, 1490.7764634652285], [410.11613634140815, 410.11613634140815, 1507.239811640088], [413.0405556597011, 413.0405556597011, 1515.6608430740732], [415.9503528814026, 415.9503528814026, 1516.0797693508885], [418.84560111699557, 418.84560111699557, 1508.5366009963197], [421.72637311141057, 421.72637311141057, 1493.0711484835238], [424.5927412458535, 424.5927412458535, 1469.7230232332918], [427.4447775396242, 427.4447775396242, 1438.531638609311], [430.2825536519261, 430.2825536519261, 1399.53621090845], [433.10614088366646, 433.10614088366646, 1352.7757603460932], [435.9156101792481, 435.9156101792481, 1298.2891120365484], [438.71103212835186, 438.71103212835186, 1236.1148969685514], [441.4924769677101, 441.4924769677101, 1166.2915529758943], [444.2600145828716, 444.2600145828716, 1088.8573257032006], [447.0137145099572, 447.0137145099572, 1003.8502695668702], [449.7536459374074, 449.7536459374074, 911.3082487112215], [452.47987770772033, 452.47987770772033, 811.268937959851], [455.1924783191817, 455.1924783191817, 703.7698237622374], [457.8915159275858, 457.8915159275858, 588.8482051356118], [460.57705834794785, 460.57705834794785, 466.5411946021194], [463.2491730562081, 463.2491730562081, 336.8857191212944], [465.90792719092707, 465.90792719092707, 199.9185210178736], [468.5533875549724, 468.5533875549724, 100], [471.1856206171975, 471.1856206171975, 235.5611503023392], [473.80469251411154, 473.80469251411154, 362.4844948531667], [476.410669051541, 476.410669051541, 480.81322268124006], [479.00361570628326, 479.00361570628326, 590.5903068701731], [481.58359762775183, 481.58359762775183, 691.8585056381614], [484.1506796396131, 484.1506796396131, 784.6603634123098], [486.704926241415, 486.704926241415, 869.0382118975875], [489.24640161020795, 489.24640161020795, 945.0341711404388], [491.7751696021569, 491.7751696021569, 1012.6901505870759], [494.2912937541461, 494.2912937541461, 1072.0478501364796], [496.79483728537537, 496.79483728537537, 1123.1487611881364], [499.2858630989485, 499.2858630989485, 1166.0341676845349], [501.76443378345374, 501.76443378345374, 1200.7451471484515], [504.2306116145365, 504.2306116145365, 1227.3225717150483], [506.6844585564638, 506.6844585564638, 1245.8071091588122], [509.1260362636815, 509.1260362636815, 1256.2392239153573], [511.5554060823631, 511.5554060823631, 1258.6591780981198], [513.9726290519512, 513.9726290519512, 1253.1070325099683], [516.3777659066915, 516.3777659066915, 1239.6226476497577], [518.770877077158, 518.770877077158, 1218.245684713848], [521.1520226917722, 521.1520226917722, 1189.015606592618], [523.5212625783133, 523.5212625783133, 1151.9716788619942], [525.8786562654218, 525.8786562654218, 1107.1529707700233], [528.2242629840947, 528.2242629840947, 1054.5983562185124], [530.5581416691742, 530.5581416691742, 994.3465147397591], [532.8803509608283, 532.8803509608283, 926.4359324683995], [535.1909492060241, 535.1909492060241, 850.9049031083968], [537.489994459994, 537.489994459994, 767.791528895194], [539.7775444876941, 539.7775444876941, 677.1337215530573], [542.0536567652556, 542.0536567652556, 578.9692032476312], [544.3183884814293, 544.3183884814293, 473.3355075337322], [546.5717965390222, 546.5717965390222, 360.26998029840274], [548.8139375563271, 548.8139375563271, 239.80978069924993], [551.0448678685455, 551.0448678685455, 111.99188209809287], [553.2646435292028, 553.2646435292028, 100], [555.4733203115568, 555.4733203115568, 226.5031150626105], [557.670953709999, 557.670953709999, 344.4137145499079], [559.857598941449, 559.857598941449, 453.77476103976886], [562.0333109467418, 562.0333109467418, 554.6290022971805], [564.1981443920081, 564.1981443920081, 647.018972348305], [566.3521536700481, 566.3521536700481, 730.986992549174], [568.4953929016979, 568.4953929016979, 806.5751726490387], [570.6279159371894, 570.6279159371894, 873.825411848404], [572.7497763575035, 572.7497763575035, 932.7793998517725], [574.861027475716, 574.861027475716, 983.4786179151241], [576.9617223383374, 576.9617223383374, 1025.964339888159], [579.0519137266457, 579.0519137266457, 1060.2776332513288], [581.1316541580125, 581.1316541580125, 1086.4593601476827], [583.2009958872223, 583.2009958872223, 1104.5501784095547], [585.2599909077862, 585.2599909077862, 1114.5905425801175], [587.3086909532473, 587.3086909532473, 1116.6207049298273], [589.347147498481, 589.347147498481, 1110.6807164677887], [591.3754117609886, 591.3754117609886, 1096.8104279480601], [593.3935347021837, 593.3935347021837, 1075.0494908709304], [595.4015670286728, 595.4015670286728, 1045.4373584791863], [597.3995591935295, 597.3995591935295, 1008.0132867494009], [599.3875613975619, 599.3875613975619, 962.8163353782644], [601.365623590574, 601.365623590574, 909.8853687639836], [603.3337954726212, 603.3337954726212, 849.2590569827742], [605.2921264952581, 605.2921264952581, 780.9758767604708], [607.2406658627818, 607.2406658627818, 705.0741124392789], [609.1794625334679, 609.1794625334679, 621.591856939693], [611.1085652208006, 611.1085652208006, 530.567012717605], [613.0280223946967, 613.0280223946967, 432.0372927166275], [614.9378822827232, 614.9378822827232, 326.0402213156549], [616.8381928713096, 616.8381928713096, 212.6131352716871], [618.729001906953, 618.729001906953, 100], [620.6103568974182, 620.6103568974182, 212.25585086067917], [622.4823051129312, 622.4823051129312, 315.99042246705494], [624.3448935873665, 624.3448935873665, 411.24632121539884], [626.1981691194297, 626.1981691194297, 498.065940470001], [628.0421782738326, 628.0421782738326, 576.4914616283302], [629.8769673824635, 629.8769673824635, 646.5648551808677], [631.7025825455512, 631.7025825455512, 708.3278817656425], [633.5190696328234, 633.5190696328234, 761.8220932174934], [635.3264742846593, 635.3264742846593, 807.0888336120851], [637.124841913236, 637.124841913236, 844.1692403047039], [638.9142177036698, 638.9142177036698, 873.1042449638595], [640.6946466151514, 640.6946466151514, 893.9345745997194], [642.4661733820757, 642.4661733820757, 906.7007525874], [644.2288425151653, 644.2288425151653, 911.4430996851421], [645.9826983025895, 645.9826983025895, 908.2017350473956], [647.7277848110765, 647.7277848110765, 897.0165772328378], [649.4641458870211, 649.4641458870211, 877.9273452073528], [651.191825157586, 651.191825157586, 850.9735593419952], [652.910866031798, 652.910866031798, 816.1945424059644], [654.621311701639, 654.621311701639, 773.6294205546137], [656.3232051431308, 656.3232051431308, 723.3171243125198], [658.0165891174152, 658.0165891174152, 665.2963895516364], [659.7015061718281, 659.7015061718281, 599.6057584645573], [661.3779986409689, 661.3779986409689, 526.2835805329137], [663.0461086477641, 663.0461086477641, 445.3680134909283], [664.7058781045253, 664.7058781045253, 356.89702428415285], [666.3573487140027, 666.3573487140027, 260.90839002341124], [668.0005619704326, 668.0005619704326, 157.43969893397338], [669.6355591605804, 669.6355591605804, 100], [671.2623813647775, 671.2623813647775, 202.39679089582071], [672.8810694579537, 672.8810694579537, 296.32159783716236], [674.4916641106639, 674.4916641106639, 381.81678074379727], [676.0942057901105, 676.0942057901105, 458.924487735899], [677.68873476116, 677.68873476116, 527.6866561930402], [679.2752910873543, 679.2752910873543, 588.1450138078958], [680.8539146319175, 680.8539146319175, 640.341079634677], [682.424645058758, 682.424645058758, 684.3161651323244], [683.9875218334641, 683.9875218334641, 720.1113752024835], [685.5425842242968, 685.5425842242968, 747.7676092222918], [687.0898713031753, 687.0898713031753, 767.325562072001], [688.6294219466595, 688.6294219466595, 778.8257251574618], [690.1612748369262, 690.1612748369262, 782.3083874274952], [691.6854684627415, 691.6854684627415, 777.8136363861785], [693.2020411204278, 693.2020411204278, 765.3813591000683], [694.7110309148256, 694.7110309148256, 745.0512432003886], [696.2124757602516, 696.2124757602516, 716.8627778802074], [697.7064133814503, 697.7064133814503, 680.8552548866271], [699.192881314543, 699.192881314543, 637.0677695080146], [700.6719169079703, 700.6719169079703, 585.5392215562953], [702.1435573234304, 702.1435573234304, 526.3083163443346], [703.6078395368132, 703.6078395368132, 459.41356565843364], [705.0648003391292, 705.0648003391292, 384.8932887259622], [706.5144763374335, 706.5144763374335, 302.7856131781531], [707.9569039557464, 707.9569039557464, 213.12847600808303], [709.3921194359676, 709.3921194359676, 115.95962452386333], [710.8201588387877, 710.8201588387877, 100], [712.2410580445938, 712.2410580445938, 196.1597921906646], [713.6548527543708, 713.6548527543708, 283.8787854203759], [715.061578490599, 715.061578490599, 363.1991836839386], [716.461270598146, 716.461270598146, 434.1629799561835], [717.8539642451553, 717.8539642451553, 496.8119572470672], [719.2396944239296, 719.2396944239296, 551.1876896514965], [720.6184959518099, 720.6184959518099, 597.3315433939036], [721.9904034720508, 721.9904034720508, 635.2846778675987], [723.3554514546906, 723.3554514546906, 665.0880466689252], [724.7136741974172, 724.7136741974172, 686.7823986262453], [726.0651058264301, 726.0651058264301, 700.4082788237786], [727.409780297298, 727.409780297298, 706.0060296203243], [728.7477313958115, 728.7477313958115, 703.6157916628872], [730.0789927388324, 730.0789927388324, 693.2775048952374], [731.4035977751382, 731.4035977751382, 675.0309095614258], [732.7215797862625, 732.7215797862625, 648.9155472042833], [734.0329718873312, 734.0329718873312, 614.9707616589264], [735.3378070278945, 735.3378070278945, 573.2357000412965], [736.6361179927551, 736.6361179927551, 523.7493137317546], [737.9279374027913, 737.9279374027913, 466.55035935376037], [739.2132977157773, 739.2132977157773, 401.6773997476562], [740.4922312271984, 740.4922312271984, 329.1688049395825], [741.7647700710625, 741.7647700710625, 249.0627531055492], [743.0309462207072, 743.0309462207072, 161.39723153068604], [744.2907914896036, 744.2907914896036, 100], [745.5443375321556, 745.5443375321556, 186.75125799715389], [746.7916158444948, 746.7916158444948, 265.108759704322], [748.0326577652723, 748.0326577652723, 335.1144739029543], [749.267494476446, 749.267494476446, 396.8101595305934], [750.4961570040638, 750.4961570040638, 450.2373667300943], [751.7186762190435, 751.7186762190435, 495.43743789359775], [752.9350828379482, 752.9350828379482, 532.4515087012836], [754.1454074237585, 754.1454074237585, 561.3205091549311], [755.3496803866396, 755.3496803866396, 582.0851646063103], [756.5479319847065, 756.5479319847065, 594.7859967804326], [757.7401923247829, 757.7401923247829, 599.4633247936843], [758.926491363159, 758.926491363159, 596.1572661668697], [760.1068589063432, 760.1068589063432, 584.9077378331892], [761.2813246118114, 761.2813246118114, 565.7544571411771], [762.4499179887524, 762.4499179887524, 538.7369428526251], [763.6126683988086, 763.6126683988086, 503.8945161355159], [764.7696050568146, 764.7696050568146, 461.2663015519922], [765.9207570315306, 765.9207570315306, 410.89122804138617], [767.0661532463729, 767.0661532463729, 352.80802989833313], [768.205822480141, 768.205822480141, 287.05524774599536], [769.3397933677403, 769.3397933677403, 213.67122950441927], [770.4680944009016, 770.4680944009016, 132.69413135405108], [771.590753928897, 771.590753928897, 100], [772.7078001592525, 772.7078001592525, 180.12955159631827], [773.8192611584562, 773.8192611584562, 251.89845543465495], [774.925164852664, 774.925164852664, 315.3485147537999], [776.0255390284007, 776.0255390284007, 370.52132377634916], [777.1204113332586, 777.1204113332586, 417.45826875378566], [778.2098092765923, 778.2098092765923, 456.200529006335], [779.2937602302094, 779.2937602302094, 486.7890779576216], [780.3722914290584, 780.3722914290584, 509.2646841641518], [781.4454299719131, 781.4454299719131, 523.6679123396493], [782.5132028220535, 782.5132028220535, 530.0391243742694], [783.5756368079432, 783.5756368079432, 528.4184803487163], [784.6327586239034, 784.6327586239034, 518.845939543291], [785.6845948307839, 785.6845948307839, 501.36126144189285], [786.73117185663, 786.73117185663, 476.00400673100165], [787.7725159973469, 787.7725159973469, 442.8135382936649], [788.8086534173601, 788.8086534173601, 401.82902219851485], [789.8396101502733, 789.8396101502733, 353.08942868384054], [790.8654120995219, 790.8654120995219, 296.63353313673963], [791.8860850390242, 791.8860850390242, 232.4999170673742], [792.9016546138291, 792.9016546138291, 160.7269690783556], [793.9121463407599, 793.9121463407599, 100], [794.9175856090561, 794.9175856090561, 171.01721283282814], [795.9179976810109, 795.9179976810109, 233.71933960149212], [796.9134076926058, 796.9134076926058, 288.1479557363128], [797.9038406541428, 797.9038406541428, 334.34442879045935], [798.889321450872, 798.889321450872, 372.3499194793352], [799.8698748436176, 799.8698748436176, 402.20538271476664], [800.8455254693995, 800.8455254693995, 423.95156863402093], [801.8162978420524, 801.8162978420524, 437.62902362367896], [802.7822163528422, 802.7822163528422, 443.2780913383887], [803.7433052710779, 803.7433052710779, 440.9389137145249], [804.6995887447225, 804.6995887447225, 430.6514319787804], [805.6510908009989, 805.6510908009989, 412.45538765171466], [806.5978353469939, 806.5978353469939, 386.3903235462842], [807.5398461702589, 807.5398461702589, 352.4955847613809], [808.4771469394076, 808.4771469394076, 310.8103196704021], [809.4097612047105, 809.4097612047105, 261.37348090487825], [810.337712398687, 810.337712398687, 204.223826333182], [811.2610238366935, 811.2610238366935, 139.3999200343442], [812.17971871751, 812.17971871751, 100], [813.0938201239225, 813.0938201239225, 164.1374878335069], [814.0033510233028, 814.0033510233028, 219.99428822784625], [814.9083342681863, 814.9083342681863, 267.6118046202139], [815.8087925968454, 815.8087925968454, 307.0312334306197], [816.7047486338612, 816.7047486338612, 338.29356509697345], [817.5962248906919, 817.5962248906919, 361.43958510499544], [818.4832437662385, 818.4832437662385, 376.5098750129774], [819.3658275474073, 819.3658275474073, 383.5448134714194], [820.2439984096703, 820.2439984096703, 382.5845772375692], [821.1177784176219, 821.1177784176219, 373.66914218488824], [821.9871895255338, 821.9871895255338, 356.8382843074707], [822.8522535779061, 822.8522535779061, 332.13158071944025], [823.7129923100166, 823.7129923100166, 299.58841064934995], [824.5694273484665, 824.5694273484665, 259.2479564296101], [825.4215802117242, 825.4215802117242, 211.14920448096893], [826.2694723106656, 826.2694723106656, 155.330946292071], [827.1131249491123, 827.1131249491123, 100], [827.9525593243667, 827.9525593243667, 155.2216710634637], [828.7877965277448, 828.7877965277448, 202.20723377161008], [829.6188575451062, 829.6188575451062, 240.9978686662157], [830.4457632573806, 830.4457632573806, 271.63455038634834], [831.2685344410937, 831.2685344410937, 294.1580486978803], [832.0871917688883, 832.0871917688883, 308.6089295178546], [832.9017558100438, 832.9017558100438, 315.02755593372905], [833.7122470309936, 833.7122470309936, 313.4540892175241], [834.5186857958386, 834.5186857958386, 303.9284898349002], [835.3210923668594, 835.3210923668594, 286.4905184491894], [836.119486905025, 836.119486905025, 261.1797369204071], [836.9138894705, 836.9138894705, 228.03550929926874], [837.7043200231475, 837.7043200231475, 187.09700281623608], [838.4907984230317, 838.4907984230317, 138.4031888656186], [839.2733444309166, 839.2733444309166, 100], [840.051977708762, 840.051977708762, 148.1682931564601], [840.8267178202182, 840.8267178202182, 188.13574484713786], [841.597584231117, 841.597584231117, 219.94335927936226], [842.3645963099615, 842.3645963099615, 243.63193563942554], [843.1277733284116, 843.1277733284116, 259.24206911768846], [843.8871344617696, 843.8871344617696, 266.8141519285601], [844.6426987894607, 844.6426987894607, 266.38837432537736], [845.3944852955134, 845.3944852955134, 258.0047256102105], [846.1425128690358, 846.1425128690358, 241.70299513861954], [846.8868003046906, 846.8868003046906, 217.52277331938652], [847.6273663031672, 847.6273663031672, 185.50345260924965], [848.3642294716514, 848.3642294716514, 145.68422850266347], [849.097408324293, 849.097408324293, 100], [849.8269212826716, 849.8269212826716, 139.382227346123], [850.5527866762583, 850.5527866762583, 170.60754355551535], [851.275022742877, 851.275022742877, 193.71673318386075], [851.9936476291626, 851.9936476291626, 208.75037686406444], [852.7086793910169, 852.7086793910169, 215.7488523258671], [853.4201359940618, 853.4201359940618, 214.75233541036073], [854.1280353140914, 854.1280353140914, 205.8008010794319], [854.832395137521, 854.832395137521, 188.9340244201577], [855.5332331618333, 855.5332331618333, 164.19158164417988], [856.2305669960242, 856.2305669960242, 131.61285108208196], [856.9244141610441, 856.9244141610441, 100], [857.6147920902389, 857.6147920902389, 132.213957724741], [858.3017181297877, 858.3017181297877, 156.30684566085827], [858.9852095391387, 858.9852095391387, 172.31926915729497], [859.665283491443, 859.665283491443, 180.2916305362495], [860.3419570739858, 860.3419570739858, 180.26413010830925], [861.0152472886158, 861.0152472886158, 172.2767671825087], [861.6851710521727, 861.6851710521727, 156.36934107133715], [862.3517451969118, 862.3517451969118, 132.58145209072146], [863.0149864709273, 863.0149864709273, 100.95250255500883], [863.6749115385726, 863.6749115385726, 100], [864.3315369808797, 864.3315369808797, 131.27365076409387], [864.9848792959754, 864.9848792959754, 154.43093327436728], [865.6349548994955, 865.6349548994955, 169.51242937208931], [866.281780124998, 866.281780124998, 176.55851798932275], [866.9253712243731, 866.9253712243731, 175.60937616347002], [867.5657443682512, 867.5657443682512, 166.70498004674656], [868.2029156464099, 868.2029156464099, 149.8851059106067], [868.8369010681779, 868.8369010681779, 125.18933114514756], [869.467716562837, 869.467716562837, 100], [870.0953779800228, 870.0953779800228, 124.40963441217369], [870.7199010901227, 870.7199010901227, 140.7372206522865], [871.341301584672, 871.341301584672, 149.02316896119876], [871.9595950767487, 871.9595950767487, 149.30768752856648], [872.5747971013649, 872.5747971013649, 141.63078350309735], [873.186923115858, 873.186923115858, 126.03226399775555], [873.7959885002787, 873.7959885002787, 102.55173708994047], [874.4020085577773, 874.4020085577773, 100], [875.0049985149884, 875.0049985149884, 123.20650865190963], [875.6049735224135, 875.6049735224135, 138.33698476055972], [876.2019486548014, 876.2019486548014, 145.43180848866655], [876.7959389115274, 876.7959389115274, 144.53115809813283], [877.3869592169698, 877.3869592169698, 135.6750109595518], [877.9750244208849, 877.9750244208849, 118.90314455666366], [878.5601492987805, 878.5601492987805, 100], [879.1423485522866, 879.1423485522866, 116.56476703551932], [879.7216368095252, 879.7216368095252, 125.08671023586105], [880.2980286254775, 880.2980286254775, 125.60604372020107], [880.8715384823502, 880.8715384823502, 118.16278053711939], [881.4421807899384, 881.4421807899384, 102.79673366995311], [882.0099698859888, 882.0099698859888, 100], [882.5749200365589, 882.5749200365589, 115.17297054966629], [883.1370454363761, 883.1370454363761, 122.31007624658425], [883.6963602091942, 883.6963602091942, 121.45149641501762], [884.2528784081481, 884.2528784081481, 112.63720948260881], [884.8066140161075, 884.8066140161075, 100], [885.3575809460269, 885.3575809460269, 108.68656442025802], [885.9057930412968, 885.9057930412968, 109.36969601841476], [886.4512640760903, 886.4512640760903, 102.08941195858071], [886.9940077557098, 886.9940077557098, 100], [887.5340377169313, 887.5340377169313, 107.1678632263372], [888.0713675283466, 888.0713675283466, 106.33988713654273], [888.6060106907049, 888.6060106907049, 100], [889.1379806372514, 889.1379806372514, 100.77991702829878], [889.6672907340652, 889.6672907340652, 100], [890.1939542803949, 890.1939542803949, 100], [890.7179845089929, 890.7179845089929, 100], [891.2393945864479, 891.2393945864479, 100], [891.7581976135157, 891.7581976135157, 100], [892.2744066254481, 892.2744066254481, 100], [892.7880345923209, 892.7880345923209, 100], [893.2990944193592, 893.2990944193592, 100], [893.8075989472625, 893.8075989472625, 100], [894.3135609525261, 894.3135609525261, 100], [894.8169931477635, 894.8169931477635, 100], [895.3179081820247, 895.3179081820247, 100], [895.8163186411145, 895.8163186411145, 100], [896.312237047909, 896.312237047909, 100], [896.8056758626694, 896.8056758626694, 100], [897.2966474833561, 897.2966474833561, 100], [897.7851642459393, 897.7851642459393, 100], [898.2712384247096, 898.2712384247096, 100], [898.754882232586, 898.754882232586, 100], [899.2361078214232, 899.2361078214232, 100], [899.714927282316, 899.714927282316, 100], [900.1913526459044, 900.1913526459044, 100], [900.6653958826749, 900.6653958826749, 100], [901.1370689032616, 901.1370689032616, 100], [901.6063835587453, 901.6063835587453, 100], [902.0733516409515, 902.0733516409515, 100], [902.5379848827467, 902.5379848827467, 100], [903.000294958333, 903.000294958333, 100], [903.4602934835414, 903.4602934835414, 100], [903.9179920161237, 903.9179920161237, 100], [904.373402056043, 904.373402056043, 100], [904.8265350457627, 904.8265350457627, 100], [905.2774023705339, 905.2774023705339, 100], [905.7260153586813, 905.7260153586813, 100], [906.1723852818878, 906.1723852818878, 100], [906.6165233554784, 906.6165233554784, 100], [907.058440738701, 907.058440738701, 100], [907.4981485350075, 907.4981485350075, 100], [907.9356577923324, 907.9356577923324, 100], [908.3709795033708, 908.3709795033708, 100], [908.804124605854, 908.804124605854, 100], [909.2351039828247, 909.2351039828247, 100], [909.6639284629106, 909.6639284629106, 100], [910.090608820596, 910.090608820596, 100], [910.515155776493, 910.515155776493, 100], [910.9375799976106, 910.9375799976106, 100], [911.3578920976225, 911.3578920976225, 100], [911.7761026371344, 911.7761026371344, 100], [912.1922221239487, 912.1922221239487, 100], [912.6062610133289, 912.6062610133289, 100], [913.0182297082622, 913.0182297082622, 100], [913.4281385597209, 913.4281385597209, 100], [913.8359978669223, 913.8359978669223, 100], [914.2418178775877, 914.2418178775877, 100], [914.6456087881998, 914.6456087881998, 100], [915.0473807442587, 915.0473807442587, 100], [915.4471438405374, 915.4471438405374, 100], [915.8449081213347, 915.8449081213347, 100], [916.240683580728, 916.240683580728, 100], [916.6344801628244, 916.6344801628244, 100], [917.0263077620102, 917.0263077620102, 100], [917.4161762232002, 917.4161762232002, 100], [917.8040953420842, 917.8040953420842, 100], [918.1900748653738, 918.1900748653738, 100], [918.574124491047, 918.574124491047, 100], [918.9562538685917, 918.9562538685917, 100], [919.3364725992487, 919.3364725992487, 100], [919.7147902362525, 919.7147902362525, 100], [920.0912162850713, 920.0912162850713, 100], [920.4657602036459, 920.4657602036459, 100], [920.8384314026276, 920.8384314026276, 100], [921.2092392456145, 921.2092392456145, 100], [921.5781930493864, 921.5781930493864, 100], [921.9453020841395, 921.9453020841395, 100], [922.3105755737188, 922.3105755737188, 100], [922.6740226958502, 922.6740226958502, 100], [923.035652582371, 923.035652582371, 100], [923.3954743194591, 923.3954743194591, 100], [923.7534969478619, 923.7534969478619, 100], [924.1097294631226, 924.1097294631226, 100], [924.4641808158069, 924.4641808158069, 100], [924.8168599117279, 924.8168599117279, 100], [925.1677756121692, 925.1677756121692, 100], [925.5169367341083, 925.5169367341083, 100], [925.8643520504378, 925.8643520504378, 100], [926.2100302901856, 926.2100302901856, 100], [926.5539801387347, 926.5539801387347, 100], [926.896210238041, 926.896210238041, 100], [927.2367291868508, 927.2367291868508, 100], [927.5755455409166, 927.5755455409166, 100], [927.912667813212, 927.912667813212, 100], [928.248104474146, 928.248104474146, 100], [928.5818639517753, 928.5818639517753, 100], [928.9139546320164, 928.9139546320164, 100], [929.2443848588563, 929.2443848588563, 100], [929.573162934562, 929.573162934562, 100], [929.9002971198892, 929.9002971198892, 100], [930.2257956342897, 930.2257956342897, 100], [930.5496666561182, 930.5496666561182, 100], [930.8719183228376, 930.8719183228376, 100], [931.1925587312234, 931.1925587312234, 100], [931.5115959375672, 931.5115959375672, 100], [931.8290379578793, 931.8290379578793, 100], [932.1448927680899, 932.1448927680899, 100], [932.4591683042495, 932.4591683042495, 100], [932.7718724627282, 932.7718724627282, 100], [933.0830131004145, 933.0830131004145, 100], [933.3925980349125, 933.3925980349125, 100], [933.7006350447379, 933.7006350447379, 100], [934.0071318695142, 934.0071318695142, 100], [934.3120962101666, 934.3120962101666, 100], [934.6155357291158, 934.6155357291158, 100], [934.9174580504701, 934.9174580504701, 100], [935.2178707602178, 935.2178707602178, 100], [935.5167814064167, 935.5167814064167, 100], [935.8141974993846, 935.8141974993846, 100], [936.1101265118876, 936.1101265118876, 100], [936.4045758793281, 936.4045758793281, 100], [936.6975529999315, 936.6975529999315, 100], [936.9890652349319, 936.9890652349319, 100], [937.2791199087573, 937.2791199087573, 100], [937.5677243092134, 937.5677243092134, 100], [937.8548856876673, 937.8548856876673, 100], [938.140611259229, 938.140611259229, 100], [938.4249082029328, 938.4249082029328, 100], [938.7077836619181, 938.7077836619181, 100], [938.9892447436085, 938.9892447436085, 100], [939.2692985198905, 939.2692985198905, 100], [939.5479520272911, 939.5479520272911, 100], [939.8252122671546, 939.8252122671546, 100], [940.1010862058188, 940.1010862058188, 100], [940.3755807747897, 940.3755807747897, 100], [940.6487028709157, 940.6487028709157, 100], [940.9204593565611, 940.9204593565611, 100], [941.1908570597783, 941.1908570597783, 100], [941.4599027744794, 941.4599027744794, 100], [941.727603260607, 941.727603260607, 100], [941.9939652443039, 941.9939652443039, 100], [942.2589954180823, 942.2589954180823, 100], [942.5227004409919, 942.5227004409919, 100], [942.7850869387869, 942.7850869387869, 100], [943.046161504093, 943.046161504093, 100], [943.3059306965725, 943.3059306965725, 100], [943.5644010430897, 943.5644010430897, 100], [943.8215790378742, 943.8215790378742, 100], [944.0774711426849, 944.0774711426849, 100], [944.3320837869715, 944.3320837869715, 100], [944.5854233680366, 944.5854233680366, 100], [944.8374962511964, 944.8374962511964, 100], [945.0883087699405, 945.0883087699405, 100], [945.3378672260908, 945.3378672260908, 100], [945.5861778899604, 945.5861778899604, 100], [945.8332470005106, 945.8332470005106, 100], [946.079080765508, 946.079080765508, 100], [946.3236853616805, 946.3236853616805, 100], [946.5670669348722, 946.5670669348722, 100], [946.8092316001978, 946.8092316001978, 100], [947.0501854421968, 947.0501854421968, 100], [947.2899345149858, 947.2899345149858, 100], [947.5284848424109, 947.5284848424109, 100], [947.7658424181989, 947.7658424181989, 100], [948.0020132061079, 948.0020132061079, 100], [948.2370031400774, 948.2370031400774, 100], [948.4708181243769, 948.4708181243769, 100], [948.703464033755, 948.703464033755, 100], [948.9349467135862, 948.9349467135862, 100], [949.1652719800182, 949.1652719800182, 100], [949.3944456201182, 949.3944456201182, 100], [949.6224733920176, 949.6224733920176, 100], [949.8493610250575, 949.8493610250575, 100], [950.0751142199323, 950.0751142199323, 100], [950.2997386488327, 950.2997386488327, 100], [950.5232399555885, 950.5232399555885, 100], [950.7456237558105, 950.7456237558105, 100], [950.9668956370314, 950.9668956370314, 100], [951.1870611588462, 951.1870611588462, 100], [951.4061258530519, 951.4061258530519, 100], [951.6240952237866, 951.6240952237866, 100], [951.8409747476677, 951.8409747476677, 100], [952.0567698739294, 952.0567698739294, 100], [952.2714860245597, 952.2714860245597, 100], [952.4851285944369, 952.4851285944369, 100], [952.6977029514647, 952.6977029514647, 100], [952.9092144367074, 952.9092144367074, 100], [953.1196683645239, 953.1196683645239, 100], [953.3290700227013, 953.3290700227013, 100], [953.5374246725878, 953.5374246725878, 100], [953.7447375492249, 953.7447375492249, 100], [953.9510138614787, 953.9510138614787, 100], [954.1562587921713, 954.1562587921713, 100], [954.3604774982105, 954.3604774982105, 100], [954.5636751107194, 954.5636751107194, 100], [954.7658567351658, 954.7658567351658, 100], [954.96702745149, 954.96702745149, 100], [955.1671923142326, 955.1671923142326, 100], [955.3663563526615, 955.3663563526615, 100], [955.5645245708981, 955.5645245708981, 100], [955.7617019480437, 955.7617019480437, 100], [955.9578934383035, 955.9578934383035, 100], [956.1531039711119, 956.1531039711119, 100], [956.3473384512564, 956.3473384512564, 100], [956.5406017590001, 956.5406017590001, 100], [956.7328987502051, 956.7328987502051, 100], [956.924234256454, 956.924234256454, 100], [957.1146130851718, 957.1146130851718, 100], [957.3040400197459, 957.3040400197459, 100], [957.4925198196472, 957.4925198196472, 100], [957.680057220549, 957.680057220549, 100], [957.8666569344463, 957.8666569344463, 100], [958.052323649774, 958.052323649774, 100], [958.2370620315252, 958.2370620315252, 100], [958.4208767213676, 958.4208767213676, 100], [958.6037723377607, 958.6037723377607, 100], [958.7857534760719, 958.7857534760719, 100], [958.9668247086915, 958.9668247086915, 100], [959.146990585148, 959.146990585148, 100], [959.3262556322223, 959.3262556322223, 100], [959.5046243540612, 959.5046243540612, 100], [959.6821012322908, 959.6821012322908, 100], [959.8586907261293, 959.8586907261293, 100], [960.0343972724987, 960.0343972724987, 100], [960.2092252861362, 960.2092252861362, 100], [960.3831791597055, 960.3831791597055, 100], [960.556263263907, 960.556263263907, 100], [960.7284819475875, 960.7284819475875, 100], [960.8998395378495, 960.8998395378495, 100], [961.0703403401602, 961.0703403401602, 100], [961.2399886384594, 961.2399886384594, 100], [961.4087886952672, 961.4087886952672, 100], [961.5767447517908, 961.5767447517908, 100], [961.7438610280318, 961.7438610280318, 100], [961.9101417228917, 961.9101417228917, 100], [962.0755910142773, 962.0755910142773, 100], [962.2402130592059, 962.2402130592059, 100], [962.4040119939099, 962.4040119939099, 100], [962.5669919339404, 962.5669919339404, 100], [962.7291569742706, 962.7291569742706, 100], [962.8905111893993, 962.8905111893993, 100], [963.0510586334523, 963.0510586334523, 100], [963.210803340285, 963.210803340285, 100], [963.3697493235836, 963.3697493235836, 100], [963.5279005769657, 963.5279005769657, 100], [963.6852610740809, 963.6852610740809, 100], [963.8418347687106, 963.8418347687106, 100], [963.997625594867, 963.997625594867, 100], [964.1526374668927, 964.1526374668927, 100], [964.3068742795582, 964.3068742795582, 100], [964.4603399081604, 964.4603399081604, 100], [964.6130382086196, 964.6130382086196, 100], [964.7649730175765, 964.7649730175765, 100], [964.9161481524886, 964.9161481524886, 100], [965.0665674117262, 965.0665674117262, 100], [965.2162345746675, 965.2162345746675, 100], [965.3651534017941, 965.3651534017941, 100], [965.5133276347851, 965.5133276347851, 100], [965.6607609966112, 965.6607609966112, 100], [965.8074571916281, 965.8074571916281, 100], [965.95341990567, 965.95341990567, 100], [966.0986528061417, 966.0986528061417, 100], [966.243159542111, 966.243159542111, 100], [966.3869437444005, 966.3869437444005, 100], [966.5300090256785, 966.5300090256785, 100], [966.6723589805501, 966.6723589805501, 100], [966.8139971856474, 966.8139971856474, 100], [966.9549271997191, 966.9549271997191, 100], [967.0951525637205, 967.0951525637205, 100], [967.2346768009019, 967.2346768009019, 100], [967.3735034168974, 967.3735034168974, 100], [967.5116358998129, 967.5116358998129, 100], [967.6490777203138, 967.6490777203138, 100], [967.7858323317122, 967.7858323317122, 100], [967.9219031700536, 967.9219031700536, 100], [968.0572936542034, 968.0572936542034, 100], [968.1920071859323, 968.1920071859323, 100], [968.3260471500026, 968.3260471500026, 100], [968.4594169142526, 968.4594169142526, 100], [968.5921198296813, 968.5921198296813, 100], [968.7241592305329, 968.7241592305329, 100], [968.8555384343803, 968.8555384343803, 100], [968.9862607422084, 968.9862607422084, 100], [969.1163294384974, 969.1163294384974, 100], [969.2457477913049, 969.2457477913049, 100], [969.3745190523483, 969.3745190523483, 100], [969.5026464570866, 969.5026464570866, 100], [969.6301332248012, 969.6301332248012, 100], [969.7569825586771, 969.7569825586771, 100], [969.8831976458837, 969.8831976458837, 100], [970.0087816576543, 970.0087816576543, 100], [970.133737749366, 970.133737749366, 100], [970.2580690606192, 970.2580690606192, 100], [970.381778715316, 970.381778715316, 100], [970.5048698217395, 970.5048698217395, 100], [970.6273454726307, 970.6273454726307, 100], [970.7492087452675, 970.7492087452675, 100], [970.8704627015412, 970.8704627015412, 100], [970.9911103880335, 970.9911103880335, 100], [971.1111548360933, 971.1111548360933, 100], [971.2305990619128, 971.2305990619128, 100], [971.3494460666033, 971.3494460666033, 100], [971.4676988362702, 971.4676988362702, 100], [971.5853603420888, 971.5853603420888, 100], [971.7024335403784, 971.7024335403784, 100], [971.8189213726764, 971.8189213726764, 100], [971.934826765813, 971.934826765813, 100], [972.0501526319839, 972.0501526319839, 100], [972.164901868824, 972.164901868824, 100], [972.2790773594799, 972.2790773594799, 100], [972.3926819726825, 972.3926819726825, 100], [972.5057185628191, 972.5057185628191, 100], [972.618189970005, 972.618189970005, 100], [972.730099020155, 972.730099020155, 100], [972.8414485250541, 972.8414485250541, 100], [972.9522412824289, 972.9522412824289, 100], [973.0624800760168, 973.0624800760168, 100], [973.1721676756366, 973.1721676756366, 100], [973.2813068372584, 973.2813068372584, 100], [973.3899003030721, 973.3899003030721, 100], [973.4979508015567, 973.4979508015567, 100], [973.6054610475489, 973.6054610475489, 100], [973.7124337423112, 973.7124337423112, 100], [973.8188715735996, 973.8188715735996, 100], [973.9247772157316, 973.9247772157316, 100], [974.030153329653, 974.030153329653, 100], [974.1350025630047, 974.1350025630047, 100], [974.2393275501897, 974.2393275501897, 100], [974.3431309124388, 974.3431309124388, 100], [974.4464152578767, 974.4464152578767, 100], [974.5491831815873, 974.5491831815873, 100], [974.6514372656793, 974.6514372656793, 100], [974.753180079351, 974.753180079351, 100], [974.8544141789542, 974.8544141789542, 100], [974.9551421080595, 974.9551421080595, 100], [975.0553663975192, 975.0553663975192, 100], [975.1550895655315, 975.1550895655315, 100], [975.2543141177039, 975.2543141177039, 100], [975.3530425471154, 975.3530425471154, 100], [975.4512773343798, 975.4512773343798, 100], [975.549020947708, 975.549020947708, 100], [975.6462758429694, 975.6462758429694, 100], [975.7430444637546, 975.7430444637546, 100], [975.8393292414358, 975.8393292414358, 100], [975.9351325952287, 975.9351325952287, 100], [976.0304569322525, 976.0304569322525, 100], [976.1253046475912, 976.1253046475912, 100], [976.2196781243532, 976.2196781243532, 100], [976.3135797337314, 976.3135797337314, 100], [976.4070118350628, 976.4070118350628, 100], [976.4999767758875, 976.4999767758875, 100], [976.592476892008, 976.592476892008, 100], [976.684514507548, 976.684514507548, 100], [976.7760919350103, 976.7760919350103, 100], [976.8672114753352, 976.8672114753352, 100], [976.9578754179586, 976.9578754179586, 100], [977.0480860408687, 977.0480860408687, 100], [977.1378456106644, 977.1378456106644, 100], [977.227156382611, 977.227156382611, 100], [977.316020600698, 977.316020600698, 100], [977.4044404976945, 977.4044404976945, 100], [977.492418295206, 977.492418295206, 100], [977.5799562037299, 977.5799562037299, 100], [977.6670564227113, 977.6670564227113, 100], [977.7537211405978, 977.7537211405978, 100], [977.8399525348948, 977.8399525348948, 100], [977.9257527722203, 977.9257527722203, 100], [978.0111240083593, 978.0111240083593, 100], [978.0960683883175, 978.0960683883175, 100], [978.1805880463759, 978.1805880463759, 100], [978.264685106144, 978.264685106144, 100], [978.3483616806133, 978.3483616806133, 100], [978.4316198722101, 978.4316198722101, 100], [978.5144617728491, 978.5144617728491, 100], [978.5968894639849, 978.5968894639849, 100], [978.678905016665, 978.678905016665, 100], [978.7605104915817, 978.7605104915817, 100], [978.8417079391238, 978.8417079391238, 100], [978.9224993994281, 978.9224993994281, 100], [979.002886902431, 979.002886902431, 100], [979.0828724679188, 979.0828724679188, 100], [979.1624581055793, 979.1624581055793, 100], [979.2416458150514, 979.2416458150514, 100], [979.3204375859762, 979.3204375859762, 100], [979.3988353980462, 979.3988353980462, 100], [979.476841221056, 979.476841221056, 100], [979.5544570149507, 979.5544570149507, 100], [979.6316847298759, 979.6316847298759, 100], [979.7085263062265, 979.7085263062265, 100], [979.7849836746954, 979.7849836746954, 100], [979.8610587563219, 979.8610587563219, 100], [979.9367534625403, 979.9367534625403, 100], [980.0120696952276, 980.0120696952276, 100], [980.0870093467515, 980.0870093467515, 100], [980.1615743000177, 980.1615743000177, 100], [980.2357664285176, 980.2357664285176, 100], [980.3095875963751, 980.3095875963751, 100], [980.3830396583932, 980.3830396583932, 100], [980.4561244601011, 980.4561244601011, 100], [980.5288438378007, 980.5288438378007, 100], [980.6011996186116, 980.6011996186116, 100], [980.6731936205185, 980.6731936205185, 100], [980.7448276524159, 980.7448276524159, 100], [980.8161035141538, 980.8161035141538, 100], [980.887022996583, 980.887022996583, 100], [980.9575878816001, 980.9575878816001, 100], [981.0277999421921, 981.0277999421921, 100], [981.0976609424812, 981.0976609424812, 100], [981.1671726377688, 981.1671726377688, 100], [981.23633677458, 981.23633677458, 100], [981.3051550907071, 981.3051550907071, 100], [981.3736293152535, 981.3736293152535, 100], [981.4417611686773, 981.4417611686773, 100], [981.5095523628339, 981.5095523628339, 100], [981.5770046010198, 981.5770046010198, 100], [981.6441195780146, 981.6441195780146, 100], [981.7108989801245, 981.7108989801245, 100], [981.7773444852239, 981.7773444852239, 100], [981.8434577627978, 981.8434577627978, 100], [981.9092404739838, 981.9092404739838, 100], [981.9746942716139, 981.9746942716139, 100], [982.0398208002558, 982.0398208002558, 100], [982.1046216962545, 982.1046216962545, 100], [982.1690985877733, 982.1690985877733, 100], [982.2332530948345, 982.2332530948345, 100], [982.2970868293603, 982.2970868293603, 100], [982.3606013952135, 982.3606013952135, 100], [982.4237983882374, 982.4237983882374, 100], [982.4866793962963, 982.4866793962963, 100], [982.5492459993147, 982.5492459993147, 100], [982.6114997693181, 982.6114997693181, 100], [982.6734422704716, 982.6734422704716, 100], [982.7350750591193, 982.7350750591193, 100], [982.7963996838237, 982.7963996838237, 100], [982.8574176854046, 982.8574176854046, 100], [982.9181305969776, 982.9181305969776, 100], [982.9785399439927, 982.9785399439927, 100], [983.0386472442727, 983.0386472442727, 100], [983.0984540080514, 983.0984540080514, 100], [983.1579617380111, 983.1579617380111, 100], [983.217171929321, 983.217171929321, 100], [983.2760860696744, 983.2760860696744, 100], [983.3347056393261, 983.3347056393261, 100], [983.3930321111295, 983.3930321111295, 100], [983.4510669505738, 983.4510669505738, 100], [983.508811615821, 983.508811615821, 100], [983.5662675577419, 983.5662675577419, 100], [983.6234362199532, 983.6234362199532, 100], [983.6803190388534, 983.6803190388534, 100], [983.7369174436592, 983.7369174436592, 100], [983.7932328564409, 983.7932328564409, 100], [983.8492666921587, 983.8492666921587, 100], [983.9050203586979, 983.9050203586979, 100], [983.9604952569044, 983.9604952569044, 100], [984.0156927806199, 984.0156927806199, 100], [984.0706143167168, 984.0706143167168, 100], [984.1252612451333, 984.1252612451333, 100], [984.1796349389076, 984.1796349389076, 100], [984.2337367642131, 984.2337367642131, 100], [984.287568080392, 984.287568080392, 100], [984.3411302399901, 984.3411302399901, 100], [984.3944245887901, 984.3944245887901, 100], [984.4474524658461, 984.4474524658461, 100], [984.5002152035169, 984.5002152035169, 100], [984.5527141274993, 984.5527141274993, 100], [984.6049505568618, 984.6049505568618, 100], [984.6569258040774, 984.6569258040774, 100], [984.7086411750571, 984.7086411750571, 100], [984.7600979691819, 984.7600979691819, 100], [984.811297479336, 984.811297479336, 100], [984.8622409919393, 984.8622409919393, 100], [984.9129297869796, 984.9129297869796, 100], [984.9633651380447, 984.9633651380447, 100], [985.0135483123544, 985.0135483123544, 100], [985.0634805707926, 985.0634805707926, 100], [985.1131631679386, 985.1131631679386, 100], [985.1625973520989, 985.1625973520989, 100], [985.2117843653384, 985.2117843653384, 100], [985.2607254435118, 985.2607254435118, 100], [985.3094218162942, 985.3094218162942, 100], [985.3578747072127, 985.3578747072127, 100], [985.4060853336766, 985.4060853336766, 100], [985.4540549070083, 985.4540549070083, 100], [985.5017846324732, 985.5017846324732, 100], [985.5492757093109, 985.5492757093109, 100], [985.5965293307644, 985.5965293307644, 100], [985.6435466841106, 985.6435466841106, 100], [985.6903289506901, 985.6903289506901, 100], [985.7368773059366, 985.7368773059366, 100], [985.7831929194069, 985.7831929194069, 100], [985.8292769548099, 985.8292769548099, 100], [985.8751305700358, 985.8751305700358, 100], [985.9207549171856, 985.9207549171856, 100], [985.9661511425996, 985.9661511425996, 100], [986.0113203868866, 986.0113203868866, 100], [986.0562637849522, 986.0562637849522, 100], [986.1009824660274, 986.1009824660274, 100], [986.1454775536972, 986.1454775536972, 100], [986.1897501659288, 986.1897501659288, 100], [986.2338014150992, 986.2338014150992, 100], [986.2776324080237, 986.2776324080237, 100], [986.3212442459836, 986.3212442459836, 100], [986.3646380247537, 986.3646380247537, 100], [986.40781483463, 986.40781483463, 100], [986.4507757604568, 986.4507757604568, 100], [986.4935218816546, 986.4935218816546, 100], [986.5360542722464, 986.5360542722464, 100], [986.5783740008851, 986.5783740008851, 100], [986.6204821308806, 986.6204821308806, 100], [986.6623797202262, 986.6623797202262, 100], [986.7040678216251, 986.7040678216251, 100], [986.745547482517, 986.745547482517, 100], [986.7868197451045, 986.7868197451045, 100], [986.827885646379, 986.827885646379, 100], [986.8687462181471, 986.8687462181471, 100], [986.9094024870564, 986.9094024870564, 100], [986.949855474621, 986.949855474621, 100], [986.9901061972479, 986.9901061972479, 100], [987.0301556662616, 987.0301556662616, 100], [987.0700048879303, 987.0700048879303, 100], [987.1096548634906, 987.1096548634906, 100], [987.1491065891731, 987.1491065891731, 100], [987.1883610562272, 987.1883610562272, 100], [987.2274192509461, 987.2274192509461, 100], [987.2662821546913, 987.2662821546913, 100], [987.3049507439179, 987.3049507439179, 100], [987.3434259901983, 987.3434259901983, 100], [987.3817088602473, 987.3817088602473, 100], [987.4198003159461, 987.4198003159461, 100], [987.4577013143663, 987.4577013143663, 100], [987.4954128077945, 987.4954128077945, 100], [987.5329357437556, 987.5329357437556, 100], [987.5702710650369, 987.5702710650369, 100], [987.6074197097117, 987.6074197097117, 100], [987.6443826111632, 987.6443826111632, 100], [987.6811606981074, 987.6811606981074, 100], [987.7177548946169, 987.7177548946169, 100], [987.7541661201437, 987.7541661201437, 100], [987.790395289543, 987.790395289543, 100], [987.8264433130953, 987.8264433130953, 100], [987.8623110965298, 987.8623110965298, 100], [987.8979995410472, 987.8979995410472, 100], [987.933509543342, 987.933509543342, 100], [987.9688419956253, 987.9688419956253, 100], [988.0039977856472, 988.0039977856472, 100], [988.038977796719, 988.038977796719, 100], [988.0737829077354, 988.0737829077354, 100], [988.1084139931968, 988.1084139931968, 100], [988.1428719232308, 988.1428719232308, 100], [988.1771575636146, 988.1771575636146, 100], [988.2112717757966, 988.2112717757966, 100], [988.2452154169176, 988.2452154169176, 100], [988.2789893398331, 988.2789893398331, 100], [988.3125943931338, 988.3125943931338, 100], [988.3460314211682, 988.3460314211682, 100], [988.3793012640623, 988.3793012640623, 100]]; union() { translate(v = bouncing_ball_data[$t * 1000]) { sphere(r = 100); } %cube(size = [2000, 2000, 0.01]); } ================================================ FILE: tests/examples_scad/16-mazebox-bosl2.scad ================================================ include <../../solid2/extensions/bosl2/BOSL2/version.scad>; include <../../solid2/extensions/bosl2/BOSL2/constants.scad>; include <../../solid2/extensions/bosl2/BOSL2/transforms.scad>; include <../../solid2/extensions/bosl2/BOSL2/distributors.scad>; include <../../solid2/extensions/bosl2/BOSL2/miscellaneous.scad>; include <../../solid2/extensions/bosl2/BOSL2/color.scad>; include <../../solid2/extensions/bosl2/BOSL2/attachments.scad>; include <../../solid2/extensions/bosl2/BOSL2/beziers.scad>; include <../../solid2/extensions/bosl2/BOSL2/shapes3d.scad>; include <../../solid2/extensions/bosl2/BOSL2/shapes2d.scad>; include <../../solid2/extensions/bosl2/BOSL2/drawing.scad>; include <../../solid2/extensions/bosl2/BOSL2/masks3d.scad>; include <../../solid2/extensions/bosl2/BOSL2/masks2d.scad>; include <../../solid2/extensions/bosl2/BOSL2/math.scad>; include <../../solid2/extensions/bosl2/BOSL2/paths.scad>; include <../../solid2/extensions/bosl2/BOSL2/lists.scad>; include <../../solid2/extensions/bosl2/BOSL2/comparisons.scad>; include <../../solid2/extensions/bosl2/BOSL2/linalg.scad>; include <../../solid2/extensions/bosl2/BOSL2/trigonometry.scad>; include <../../solid2/extensions/bosl2/BOSL2/vectors.scad>; include <../../solid2/extensions/bosl2/BOSL2/affine.scad>; include <../../solid2/extensions/bosl2/BOSL2/coords.scad>; include <../../solid2/extensions/bosl2/BOSL2/geometry.scad>; include <../../solid2/extensions/bosl2/BOSL2/regions.scad>; include <../../solid2/extensions/bosl2/BOSL2/strings.scad>; include <../../solid2/extensions/bosl2/BOSL2/vnf.scad>; include <../../solid2/extensions/bosl2/BOSL2/structs.scad>; include <../../solid2/extensions/bosl2/BOSL2/rounding.scad>; include <../../solid2/extensions/bosl2/BOSL2/skin.scad>; include <../../solid2/extensions/bosl2/BOSL2/utility.scad>; include <../../solid2/extensions/bosl2/BOSL2/partitions.scad>; difference() { union() { tube(or = 30.357749073643905, center = true, h = 88, ir = 28.357749073643905); down(z = 40) { zcyl(h = 10, r = 35.557749073643905); } } union() { cylindrical_extrude(or = 30.557749073643905, ir = 30.357749073643905) { offset(r = 0.0) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 30.357749073643905, ir = 30.157749073643906) { offset(r = -0.01231165940486223) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 30.157749073643906, ir = 29.957749073643903) { offset(r = -0.04894348370484647) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 29.957749073643903, ir = 29.757749073643904) { offset(r = -0.1089934758116321) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 29.757749073643904, ir = 29.557749073643905) { offset(r = -0.19098300562505255) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 29.557749073643905, ir = 29.357749073643905) { offset(r = -0.2928932188134524) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 29.357749073643905, ir = 29.157749073643906) { offset(r = -0.41221474770752686) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 29.157749073643906, ir = 28.957749073643903) { offset(r = -0.5460095002604533) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 28.957749073643903, ir = 28.757749073643904) { offset(r = -0.6909830056250525) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 28.757749073643904, ir = 28.557749073643905) { offset(r = -0.843565534959769) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } zrot(a = 120.0) { union() { cylindrical_extrude(or = 30.557749073643905, ir = 30.357749073643905) { offset(r = 0.0) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 30.357749073643905, ir = 30.157749073643906) { offset(r = -0.01231165940486223) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 30.157749073643906, ir = 29.957749073643903) { offset(r = -0.04894348370484647) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 29.957749073643903, ir = 29.757749073643904) { offset(r = -0.1089934758116321) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 29.757749073643904, ir = 29.557749073643905) { offset(r = -0.19098300562505255) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 29.557749073643905, ir = 29.357749073643905) { offset(r = -0.2928932188134524) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 29.357749073643905, ir = 29.157749073643906) { offset(r = -0.41221474770752686) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 29.157749073643906, ir = 28.957749073643903) { offset(r = -0.5460095002604533) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 28.957749073643903, ir = 28.757749073643904) { offset(r = -0.6909830056250525) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 28.757749073643904, ir = 28.557749073643905) { offset(r = -0.843565534959769) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } } } zrot(a = 240.0) { union() { cylindrical_extrude(or = 30.557749073643905, ir = 30.357749073643905) { offset(r = 0.0) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 30.357749073643905, ir = 30.157749073643906) { offset(r = -0.01231165940486223) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 30.157749073643906, ir = 29.957749073643903) { offset(r = -0.04894348370484647) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 29.957749073643903, ir = 29.757749073643904) { offset(r = -0.1089934758116321) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 29.757749073643904, ir = 29.557749073643905) { offset(r = -0.19098300562505255) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 29.557749073643905, ir = 29.357749073643905) { offset(r = -0.2928932188134524) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 29.357749073643905, ir = 29.157749073643906) { offset(r = -0.41221474770752686) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 29.157749073643906, ir = 28.957749073643903) { offset(r = -0.5460095002604533) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 28.957749073643903, ir = 28.757749073643904) { offset(r = -0.6909830056250525) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } cylindrical_extrude(or = 28.757749073643904, ir = 28.557749073643905) { offset(r = -0.843565534959769) { projection(cut = true) { up(z = 10) { surface(center = true, file = "maze7.png", invert = true); } } } } } } } } ================================================ FILE: tests/examples_scad/17-greedy-scad-interface.scad ================================================ $fn = 32; $vpd = ((abs(sin(($t * 360))) * 10) + 5); $vpt = [0, -1, 0]; $vpr = [63, 0, ($t * 360)]; $vpf = 25; /* [Colors] */ //The color of the cube cube_color = "blue"; //[red, green, blue] /* [Animation] */ //Animation speed factor anim_factor = 1; //[1:0.5:10] union() { color(alpha = 1.0, c = cube_color) { cube(center = true, size = abs(sin((($t * 360) * anim_factor)))); } translate(v = [0, -2, 0]) { color(alpha = 1.0, c = cube_color) { sphere(r = abs(sin(((($t * 360) * anim_factor) - 90)))); } } } ================================================ FILE: tests/examples_test.py ================================================ import os import platform import unittest import shutil import subprocess import re from pathlib import Path class ExamplesTest(unittest.TestCase): def test_examples(self): def get_openscad_executable(): OPENSCAD_EXECUTABLES = { 'Darwin': "/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD", 'Linux': "openscad" } return OPENSCAD_EXECUTABLES[platform.system()] root = Path(__file__).parent.parent def copyWithRelativeIncludes(src, dest): with open(src, 'r') as srcFile: with open(dest, 'w') as destFile: for l in srcFile: if l.startswith("include <"): incPath = l.replace("include <", "").replace(">;", "").replace("\n","") relIncPath = os.path.relpath(incPath, Path(dest).parent) l = f"include <{relIncPath}>;\n" elif l.startswith("use <"): incPath = l.replace("use <", "").replace(">;", "").replace("\n","") relIncPath = os.path.relpath(incPath, Path(dest).parent) l = f"use <{relIncPath}>;\n" destFile.write(l) for f in sorted(Path(root / "solid2" / "examples/").iterdir()): if not re.match("[0-9][0-9]-.*\.py", f.name): continue if f.stem.endswith(".x"): continue test_scad_file = root / "tests" / "examples_scad" \ / f.with_suffix('.scad').name print(f) # call example (generate *.scad file) subprocess.check_call(["python3", f.as_posix()]) # copy generated scad file to examples_scad/ copyWithRelativeIncludes(f.with_suffix(".scad"), test_scad_file) # call git diff test/examples_scad/{f}.scad diff = subprocess.check_output(["git", "diff", test_scad_file.as_posix()]) # make sure there's no diff self.assertEqual(diff.decode(), "") # render with openscad subprocess.check_call([get_openscad_executable(), "-o", test_scad_file.with_suffix(".png"), "--preview", "-", test_scad_file], stderr=subprocess.DEVNULL) ================================================ FILE: tests/run_tests.py ================================================ #! /usr/bin/env python from examples_test import ExamplesTest if __name__ == "__main__": import unittest unittest.main()