Showing preview only (814K chars total). Download the full file or copy to clipboard to get everything.
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 <target>' where <target> 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
# "<project> v<release> 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 <link> 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 ^<target^>` where ^<target^> 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 <http://www.thingiverse.com/thing:1481>`__. It
generates valid OpenSCAD code from Python code with minimal overhead. Here's a
simple example:
This Python code:
.. code:: python
from solid2 import *
d = cube(5) + sphere(5).right(5) - cylinder(r=2, h=6)
Generates this OpenSCAD code:
.. code::
difference(){
union(){
cube(5);
translate( [5, 0,0]){
sphere(5);
}
}
cylinder(r=2, h=6);
}
As can be clearly seen, the SolidPython code is a lot shorter (and I think a lot better readable and maintainable) than the OpenSCAD code it compiles to.
Advantages
----------
In contrast to OpenSCAD -- which is a constrained domain specific language --
Python is a full blown modern programming language and as such supports
pretty much all modern programming features. Furthermore a huge number of
libraries is available.
SolidPython lets you use all these fancy python features to generate your
constructive solid geometry models.
On the one hand it makes the generation of your models a lot easier, because
you don't need to learn another domain specific language and you can use all
the programming technique you're already familiar with. On the other hand it
gives you a lot more power, because you can use all the comprehensive python
libraries to generate your models.
Getting Started
---------------
The `wiki <https://github.com/jeff-dh/SolidPython/wiki>`__ is the place to look for docs and tutorials. Furthermore the `examples <https://github.com/jeff-dh/SolidPython/tree/master-2.0.0-beta-dev/solid2/examples>`__ might be interesting to you too.
Contact
=======
Enjoy!
If you have any questions or bug reports please report them to the SolidPython
`GitHub page <https://github.com/jeff-dh/SolidPython>`__!
Cheers!
License
=======
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
General Public License for more details.
`Full text of the
license <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt>`__.
Some class docstrings are derived from the `OpenSCAD User Manual
<https://en.wikibooks.org/wiki/OpenSCAD_User_Manual>`__, so
are available under the `Creative Commons Attribution-ShareAlike License
<https://creativecommons.org/licenses/by-sa/3.0/>`__.
================================================
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 <http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Minkowski_sum_3/Chapter_main.html>`__
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 <http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Convex_hull_2/Chapter_main.html>`__
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 == "<module>":
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 <BOSL2/std.scad>
# include <BOSL2/gears.scad>
# include <BOSL2/beziers.scad>
# include <BOSL2/screws.scad>
# include <BOSL2/cubetruss.scad>
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})
c
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
Showing preview only (345K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3785 symbols across 90 files)
FILE: solid2/config.py
class Config (line 8) | class Config:
method __init__ (line 9) | def __init__(self):
method get_openscad_library_paths (line 18) | def get_openscad_library_paths(self):
method get_pickle_cache_dir (line 48) | def get_pickle_cache_dir(self):
FILE: solid2/core/builtins/convenience.py
class _ModifierBase (line 11) | class _ModifierBase(_ObjectBase, _OperatorMixin, _AccessSyntaxMixin):
method __init__ (line 12) | def __init__(self, child=None):
class debug (line 17) | class debug(_ModifierBase):
method _render (line 18) | def _render(self):
class background (line 21) | class background(_ModifierBase):
method _render (line 22) | def _render(self):
class root (line 25) | class root(_ModifierBase):
method _render (line 26) | def _render(self):
class disable (line 29) | class disable(_ModifierBase):
method _render (line 30) | def _render(self):
function up (line 36) | def up(z): return translate((0, 0, z))
function down (line 37) | def down(z): return translate((0, 0, -z))
function right (line 38) | def right(x): return translate((x, 0, 0))
function left (line 39) | def left(x): return translate((-x, 0, 0))
function forward (line 40) | def forward(y): return translate((0, y, 0))
function fwd (line 41) | def fwd(y): return forward(y)
function back (line 42) | def back(y): return translate((0, -y, 0))
function translateX (line 44) | def translateX(x) : return translate((x, 0, 0))
function translateY (line 45) | def translateY(y) : return translate((0, y, 0))
function translateZ (line 46) | def translateZ(z) : return translate((0, 0, z))
function rotateX (line 48) | def rotateX(x): return rotate((x, 0, 0))
function rotateY (line 49) | def rotateY(y): return rotate((0, y, 0))
function rotateZ (line 50) | def rotateZ(z): return rotate((0, 0, z))
function scaleX (line 52) | def scaleX(x): return scale((x, 1, 1))
function scaleY (line 53) | def scaleY(y): return scale((1, y, 1))
function scaleZ (line 54) | def scaleZ(z): return scale((1, 1, z))
function resizeX (line 57) | def resizeX(x): return resize((x, 0, 0))
function resizeY (line 58) | def resizeY(y): return resize((0, y, 0))
function resizeZ (line 59) | def resizeZ(z): return resize((0, 0, z))
function mirrorX (line 61) | def mirrorX(): return mirror((1, 0, 0))
function mirrorY (line 62) | def mirrorY(): return mirror((0, 1, 0))
function mirrorZ (line 63) | def mirrorZ(): return mirror((0, 0, 1))
function _extract_size_list (line 77) | def _extract_size_list(size_count, *args):
function translate (line 98) | def translate(*args, **kwargs):
function scale (line 103) | def scale(*args, **kwargs):
function rotate (line 108) | def rotate(*args, **kwargs):
function square (line 113) | def square(*args, **kwargs):
function cube (line 118) | def cube(*args, **kwargs):
function resize (line 124) | def resize(*args, **kwargs):
function mirror (line 129) | def mirror(*args, **kwargs):
FILE: solid2/core/builtins/openscad_functions.py
function _base_fn (line 2) | def _base_fn(name, *args):
function cos (line 9) | def cos(n): return _base_fn("cos", n)
function sin (line 10) | def sin(n): return _base_fn("sin", n)
function tan (line 11) | def tan(n): return _base_fn("tan", n)
function acos (line 12) | def acos(n): return _base_fn('acos', n)
function asin (line 13) | def asin(n): return _base_fn('asin', n)
function atan (line 14) | def atan(n): return _base_fn('atan', n)
function atan2 (line 15) | def atan2(n, m): return _base_fn('atan2', n, m)
function abs (line 17) | def abs(n): return _base_fn('abs', n)
function ceil (line 18) | def ceil(n): return _base_fn('ceil', n)
function exp (line 19) | def exp(n): return _base_fn('exp', n)
function floor (line 20) | def floor(n): return _base_fn('floor', n)
function len (line 21) | def len(n): return _base_fn('len', n)
function ln (line 22) | def ln(n): return _base_fn('ln', n)
function log (line 23) | def log(n): return _base_fn('log', n)
function norm (line 24) | def norm(v): return _base_fn('norm', v)
function pow (line 25) | def pow(n, m): return _base_fn('pow', n, m)
function round (line 26) | def round(n): return _base_fn('round', n)
function sign (line 27) | def sign(n): return _base_fn('sign', n)
function sqrt (line 28) | def sqrt(n): return _base_fn('sqrt', n)
function min (line 30) | def min(*args): return _base_fn('min', *args)
function max (line 31) | def max(*args): return _base_fn('max', *args)
function concat (line 33) | def concat(*args): return _base_fn('concat', *args)
function cross (line 34) | def cross(*args): return _base_fn('cross', *args)
function lookup (line 35) | def lookup(*args): return _base_fn('lookup', *args)
function rands (line 36) | def rands(*args): return _base_fn('rands', *args)
function not_ (line 37) | def not_(*args): return _base_fn('!', *args)
FILE: solid2/core/builtins/openscad_primitives.py
class polygon (line 24) | class polygon(_OpenSCADObject):
method __init__ (line 44) | def __init__(self, points: _Union[Points, _BareOpenSCADObject], paths:...
class circle (line 58) | class circle(_OpenSCADObject):
method __init__ (line 73) | def __init__(self, r: float = None, d: float = None, _fn: int = None) ...
class square (line 78) | class square(_OpenSCADObject):
method __init__ (line 96) | def __init__(self, size: ScadSize = None, center: bool = None) -> None:
class sphere (line 101) | class sphere(_OpenSCADObject):
method __init__ (line 116) | def __init__(self, r: float = None, d: float = None, _fn: int = None) ...
class cube (line 121) | class cube(_OpenSCADObject):
method __init__ (line 139) | def __init__(self, size: ScadSize = None, center: bool = None) -> None:
class cylinder (line 144) | class cylinder(_OpenSCADObject):
method __init__ (line 182) | def __init__(self, h: float = None, r1: float = None, r2: float = None...
class polyhedron (line 191) | class polyhedron(_OpenSCADObject):
method __init__ (line 219) | def __init__(self, points: P3s, faces: Indexes, convexity: int = None,...
class union (line 226) | class union(_OpenSCADObject):
method __init__ (line 232) | def __init__(self) -> None:
class intersection (line 236) | class intersection(_OpenSCADObject):
method __init__ (line 242) | def __init__(self) -> None:
class difference (line 246) | class difference(_OpenSCADObject):
method __init__ (line 251) | def __init__(self) -> None:
class translate (line 255) | class translate(_OpenSCADObject):
method __init__ (line 263) | def __init__(self, v: P3 = None) -> None:
class scale (line 267) | class scale(_OpenSCADObject):
method __init__ (line 275) | def __init__(self, v: P3 = None) -> None:
class rotate (line 279) | class rotate(_OpenSCADObject):
method __init__ (line 291) | def __init__(self, a: _Union[float, Vec3] = None, v: Vec3 = None) -> N...
class mirror (line 295) | class mirror(_OpenSCADObject):
method __init__ (line 304) | def __init__(self, v: Vec3) -> None:
class resize (line 308) | class resize(_OpenSCADObject):
method __init__ (line 319) | def __init__(self, newsize: Vec3, auto: _Tuple[bool, bool, bool] = Non...
class multmatrix (line 323) | class multmatrix(_OpenSCADObject):
method __init__ (line 332) | def __init__(self, m: _Tuple[Vec4, Vec4, Vec4, Vec4]) -> None:
class color (line 336) | class color(_OpenSCADObject):
method __init__ (line 350) | def __init__(self, c: _Union[Vec34, str], alpha: float = 1.0) -> None:
class minkowski (line 354) | class minkowski(_OpenSCADObject):
method __init__ (line 361) | def __init__(self) -> None:
class offset (line 365) | class offset(_OpenSCADObject):
method __init__ (line 387) | def __init__(self, r: float = None, delta: float = None, chamfer: bool...
class hull (line 400) | class hull(_OpenSCADObject):
method __init__ (line 407) | def __init__(self) -> None:
class render (line 411) | class render(_OpenSCADObject):
method __init__ (line 420) | def __init__(self, convexity: int = None) -> None:
class linear_extrude (line 424) | class linear_extrude(_OpenSCADObject):
method __init__ (line 455) | def __init__(self, height: float = None, center: bool = None, convexit...
class rotate_extrude (line 463) | class rotate_extrude(_OpenSCADObject):
method __init__ (line 493) | def __init__(self, angle: float = 360, convexity: int = None, _fn: int...
class dxf_linear_extrude (line 499) | class dxf_linear_extrude(_OpenSCADObject):
method __init__ (line 500) | def __init__(self, file: PathStr, layer: float = None, height: float =...
class projection (line 510) | class projection(_OpenSCADObject):
method __init__ (line 521) | def __init__(self, cut: bool = None) -> None:
class surface (line 525) | class surface(_OpenSCADObject):
method __init__ (line 549) | def __init__(self, file, center: bool = None, convexity: int = None, i...
class text (line 555) | class text(_OpenSCADObject):
method __init__ (line 604) | def __init__(self, text: str, size: float = None, font: str = None, ha...
class child (line 615) | class child(_OpenSCADObject):
method __init__ (line 616) | def __init__(self, index: int = None, vector: _Sequence[int] = None, r...
class children (line 622) | class children(_OpenSCADObject):
method __init__ (line 639) | def __init__(self, index: int = None, vector: float = None, range: P23...
class import_stl (line 645) | class import_stl(_OpenSCADObject):
method __init__ (line 646) | def __init__(self, file: PathStr, origin: P2 = (0, 0), convexity: int ...
class import_dxf (line 652) | class import_dxf(_OpenSCADObject):
method __init__ (line 653) | def __init__(self, file, origin=(0, 0), convexity: int = None, layer: ...
class import_ (line 659) | class import_(_OpenSCADObject):
method __init__ (line 674) | def __init__(self, file: PathStr, origin: P2 = (0, 0), convexity: int ...
class _import (line 679) | class _import(import_): pass
class intersection_for (line 682) | class intersection_for(_OpenSCADObject):
method __init__ (line 688) | def __init__(self, n: int) -> None:
FILE: solid2/core/extension_manager.py
class ExtensionManager (line 2) | class ExtensionManager():
method __init__ (line 3) | def __init__(self):
method register_root_wrapper (line 9) | def register_root_wrapper(self, ext):
method register_pre_render (line 12) | def register_pre_render(self, func):
method register_post_render (line 15) | def register_post_render(self, func):
method register_access_syntax (line 18) | def register_access_syntax(self, fn):
method wrap_root_node (line 30) | def wrap_root_node(self, root):
method call_pre_render (line 37) | def call_pre_render(self, root):
method call_post_render (line 45) | def call_post_render(self, root):
method access_syntax_lookup (line 53) | def access_syntax_lookup(self, key):
function register_access_syntax (line 59) | def register_access_syntax(fn):
function register_pre_render (line 63) | def register_pre_render(fn):
function register_post_render (line 67) | def register_post_render(fn):
function register_root_wrapper (line 71) | def register_root_wrapper(fn):
FILE: solid2/core/object_base/access_syntax_mixin.py
function builtins (line 3) | def builtins():
class AccessSyntaxMixin (line 7) | class AccessSyntaxMixin:
method intersection_for (line 9) | def intersection_for(self, n): return builtins().intersection_for(...
method color (line 10) | def color(self, color, alpha=1.0): return builtins().color(color, alph...
method hull (line 11) | def hull(self): return builtins().hull()(self)
method render (line 12) | def render(self, convexity=None): return builtins().render(convexity)...
method projection (line 13) | def projection(self, cut=None): return builtins().projection(cut)(s...
method surface (line 15) | def surface(self, file, center=None, convexity=None, invert=None):
method offset (line 17) | def offset(self, r=None, delta=None, chamfer=None, _fn=None):
method mirror (line 20) | def mirror(self, *args, **kwargs): return builtins().mirror(*args, **k...
method resize (line 21) | def resize(self, *args, **kwargs): return builtins().resize(*args, **k...
method mirrorX (line 23) | def mirrorX(self): return builtins().mirrorX()(self)
method mirrorY (line 24) | def mirrorY(self): return builtins().mirrorY()(self)
method mirrorZ (line 25) | def mirrorZ(self): return builtins().mirrorZ()(self)
method resizeX (line 27) | def resizeX(self, x): return builtins().resizeX(x)(self)
method resizeY (line 28) | def resizeY(self, y): return builtins().resizeY(y)(self)
method resizeZ (line 29) | def resizeZ(self, z): return builtins().resizeZ(z)(self)
method union (line 31) | def union(self): return builtins().union()(self)
method difference (line 32) | def difference(self): return builtins().difference()(self)
method intersection (line 33) | def intersection(self): return builtins().intersection()(self)
method rotate_extrude (line 36) | def rotate_extrude(self, angle=None, convexity=None, _fn=None):
method linear_extrude (line 39) | def linear_extrude(self, height=None, center=None, convexity=None, \
method translate (line 44) | def translate(self, *args, **kwargs): return builtins().translate(*arg...
method scale (line 45) | def scale(self, *args, **kwargs): return builtins().scale(*args, *...
method rotate (line 46) | def rotate(self, *args, **kwargs): return builtins().rotate(*args, ...
method down (line 48) | def down(self, z): return builtins().down(z)(self)
method up (line 49) | def up(self, z): return builtins().up(z)(self)
method left (line 50) | def left(self, x): return builtins().left(x)(self)
method right (line 51) | def right(self, x): return builtins().right(x)(self)
method back (line 52) | def back(self, y): return builtins().back(y)(self)
method fwd (line 53) | def fwd(self, y): return builtins().fwd(y)(self)
method forward (line 54) | def forward(self, y): return builtins().fwd(y)(self)
method translateX (line 56) | def translateX(self, x): return builtins().translateX(x)(self)
method translateY (line 57) | def translateY(self, y): return builtins().translateY(y)(self)
method translateZ (line 58) | def translateZ(self, z): return builtins().translateZ(z)(self)
method rotateX (line 60) | def rotateX(self, x): return builtins().rotateX(x)(self)
method rotateY (line 61) | def rotateY(self, y): return builtins().rotateY(y)(self)
method rotateZ (line 62) | def rotateZ(self, z): return builtins().rotateZ(z)(self)
method scaleX (line 64) | def scaleX(self, x): return builtins().scaleX(x)(self)
method scaleY (line 65) | def scaleY(self, y): return builtins().scaleY(y)(self)
method scaleZ (line 66) | def scaleZ(self, z): return builtins().scaleZ(z)(self)
method debug (line 68) | def debug(self): return builtins().debug()(self)
method background (line 69) | def background(self): return builtins().background()(self)
method root (line 70) | def root(self): return builtins().root()(self)
method disable (line 71) | def disable(self): return builtins().disable()(self)
method __getattr__ (line 73) | def __getattr__(self, name):
FILE: solid2/core/object_base/object_base_impl.py
class RenderMixin (line 7) | class RenderMixin:
method __repr__ (line 8) | def __repr__(self):
method as_scad (line 11) | def as_scad(self):
method save_as_scad (line 15) | def save_as_scad(self, filename='', outdir=''):
method save_as_stl (line 19) | def save_as_stl(self, filename=None):
method _ipython_display_ (line 23) | def _ipython_display_(self):
class ObjectBase (line 38) | class ObjectBase(RenderMixin):
method __init__ (line 39) | def __init__(self):
method add (line 42) | def add(self, c):
method _render (line 55) | def _render(self):
method __call__ (line 61) | def __call__(self, *args):
class BareOpenSCADObject (line 69) | class BareOpenSCADObject(ObjectBase):
method __init__ (line 70) | def __init__(self, name, params):
method _render (line 75) | def _render(self):
method _generate_scad_head (line 91) | def _generate_scad_head(self):
class OpenSCADObject (line 120) | class OpenSCADObject(AccessSyntaxMixin, OperatorMixin, BareOpenSCADObject):
class OpenSCADConstant (line 123) | class OpenSCADConstant:
method __init__ (line 124) | def __init__(self, value):
method __repr__ (line 130) | def __repr__(self):
method __operator_base__ (line 133) | def __operator_base__(self, op, other):
method __roperator_base__ (line 136) | def __roperator_base__(self, op, other):
method __unary_operator_base__ (line 139) | def __unary_operator_base__(self, op):
method __illegal_operator__ (line 142) | def __illegal_operator__(self):
method __add__ (line 149) | def __add__(self, other): return self.__operator_base__("+", other)
method __sub__ (line 150) | def __sub__(self, other): return self.__operator_base__("-", other)
method __mul__ (line 151) | def __mul__(self, other): return self.__operator_base__("*", other)
method __mod__ (line 152) | def __mod__(self, other): return self.__operator_base__("%", other)
method __pow__ (line 153) | def __pow__(self, other): return self.__operator_base__("^", other)
method __truediv__ (line 154) | def __truediv__(self, other): return self.__operator_base__("/", other)
method __radd__ (line 156) | def __radd__(self, other): return self.__roperator_base__("+", other)
method __rsub__ (line 157) | def __rsub__(self, other): return self.__roperator_base__("-", other)
method __rmul__ (line 158) | def __rmul__(self, other): return self.__roperator_base__("*", other)
method __rmod__ (line 159) | def __rmod__(self, other): return self.__roperator_base__("%", other)
method __rpow__ (line 160) | def __rpow__(self, other): return self.__roperator_base__("^", other)
method __rtruediv__ (line 161) | def __rtruediv__(self, other): return self.__roperator_base__("/", other)
method __neg__ (line 164) | def __neg__(self): return self.__unary_operator_base__("-")
method __abs__ (line 167) | def __abs__(self): return OpenSCADConstant(f'abs({self})')
method __eq__ (line 170) | def __eq__(self, other): return self.__operator_base__("==", other) #t...
method __ne__ (line 171) | def __ne__(self, other): return self.__operator_base__("!=", other) #t...
method __le__ (line 172) | def __le__(self, other): return self.__operator_base__("<=", other)
method __ge__ (line 173) | def __ge__(self, other): return self.__operator_base__(">=", other)
method __lt__ (line 174) | def __lt__(self, other): return self.__operator_base__("<", other)
method __gt__ (line 175) | def __gt__(self, other): return self.__operator_base__(">", other)
method __bool__ (line 178) | def __bool__(self):
method _render (line 183) | def _render(self):
function scad_inline (line 187) | def scad_inline(code):
class OpenSCADParameterFunction (line 190) | class OpenSCADParameterFunction(OpenSCADConstant):
function scad_inline_parameter_func (line 193) | def scad_inline_parameter_func(code):
FILE: solid2/core/object_base/operator_mixin.py
class OperatorMixin (line 2) | class OperatorMixin:
method _union_op (line 3) | def _union_op(self, x, unionType):
method _difference_op (line 26) | def _difference_op(self, x, differenceType):
method _intersection_op (line 42) | def _intersection_op(self, x, intersectionType):
method __add__ (line 63) | def __add__(self, x):
method __or__ (line 66) | def __or__(self, x):
method __radd__ (line 69) | def __radd__(self, x):
method __sub__ (line 72) | def __sub__(self, x):
method __mul__ (line 75) | def __mul__(self, x):
method __and__ (line 78) | def __and__(self, x):
method __invert__ (line 81) | def __invert__(self):
FILE: solid2/core/object_factory.py
function check_signature (line 7) | def check_signature(name, args_def, kwargs_def, *args, **kwargs):
function create_openscad_wrapper_from_symbols (line 48) | def create_openscad_wrapper_from_symbols(name, args, kwargs):
FILE: solid2/core/parse_scad.py
function get_pickle_filename (line 15) | def get_pickle_filename(filename):
function check_pickle_cache (line 30) | def check_pickle_cache(filename):
function update_pickle_cache (line 51) | def update_pickle_cache(filename, callables, global_vars):
function get_scad_file_as_dict (line 67) | def get_scad_file_as_dict(filename):
FILE: solid2/core/scad_import.py
function check_module_cache (line 13) | def check_module_cache(resolved_scad, use_not_include):
function update_module_cache (line 29) | def update_module_cache(resolved_scad, new_namespace_dict, use_not_inclu...
function load_scad_file_into_dict (line 34) | def load_scad_file_into_dict(resolved_scad, dest_namespace_dict, use_not...
function load_scad_dir_into_dict (line 48) | def load_scad_dir_into_dict(resolved_scad, dest_namespace_dict, use_not_...
function load_scad_file_or_dir_into_dict (line 65) | def load_scad_file_or_dir_into_dict(filename, dest_namespace_dict, use_n...
function get_callers_namespace_dict (line 89) | def get_callers_namespace_dict(depth=2):
function use (line 103) | def use(filename, skip_render=False):
function include (line 106) | def include(filename, skip_render=False):
function import_scad (line 109) | def import_scad(filename, dest_namespace=None, use_not_include=True, ski...
function extra_scad_include (line 117) | def extra_scad_include(filename, use_not_include=True):
class ExpSolidNamespace (line 124) | class ExpSolidNamespace(SimpleNamespace):
method __init__ (line 134) | def __init__(self, filename):
method __repr__ (line 138) | def __repr__(self):
FILE: solid2/core/scad_render.py
function get_default_filename (line 7) | def get_default_filename(suffix):
function render_to_stl_file (line 19) | def render_to_stl_file(root, filename):
function scad_render (line 36) | def scad_render(root, file_header = ''):
function scad_render_to_file (line 57) | def scad_render_to_file(scad_object, filename=None, out_dir='', file_hea...
function _write_to_file (line 66) | def _write_to_file(out_string, filename=None, outdir=''):
function get_include_string (line 83) | def get_include_string():
FILE: solid2/core/utils.py
function indent (line 11) | def indent(s):
function escape_openscad_identifier (line 14) | def escape_openscad_identifier(identifier):
function unescape_openscad_identifier (line 28) | def unescape_openscad_identifier(identifier):
function resolve_scad_filename (line 45) | def resolve_scad_filename(scad_file):
function py2openscad (line 56) | def py2openscad(o):
FILE: solid2/examples/06-functions.py
function wheel (line 14) | def wheel():
function axle (line 17) | def axle():
function torso (line 25) | def torso():
function car (line 34) | def car():
FILE: solid2/examples/07-libs-bosl2-attachable.py
function cubic_barbell (line 5) | def cubic_barbell(s=100, anchor=CENTER, spin=0, orient=UP):
FILE: solid2/examples/07-libs-bosl2-logo.py
function B (line 20) | def B():
function O (line 47) | def O():
function S (line 56) | def S():
function L (line 81) | def L():
function II (line 91) | def II():
FILE: solid2/examples/07-libs-bosl2.py
function bolt (line 8) | def bolt():
function extrude_along_path (line 11) | def extrude_along_path():
function heightfield_test (line 15) | def heightfield_test():
function bosl_diff (line 30) | def bosl_diff():
function bosl_diff2 (line 45) | def bosl_diff2():
FILE: solid2/examples/08-extensions.py
function leftUp (line 16) | def leftUp(obj, x=1):
class red (line 22) | class red(OpenSCADObject):
method __init__ (line 23) | def __init__(self):
class non_sense_comment (line 31) | class non_sense_comment(ObjectBase, AccessSyntaxMixin, OperatorMixin):
method _render (line 32) | def _render(self):
function non_sense_pre_render (line 40) | def non_sense_pre_render(root):
FILE: solid2/examples/09-code-attach-extension.py
function attach_code_post_render (line 20) | def attach_code_post_render(_):
FILE: solid2/examples/13-animated-bouncing-ball.py
class Vector3 (line 15) | class Vector3:
method __init__ (line 16) | def __init__(self, x=0.0, y=0.0, z=0.0):
method __add__ (line 21) | def __add__(self, other):
method __mul__ (line 26) | def __mul__(self, factor):
method tolist (line 31) | def tolist(self):
function get_bouncing_ball_data (line 35) | def get_bouncing_ball_data(pos=Vector3(), vel=Vector3(5.0, 5.0, 200.0)):
FILE: solid2/examples/14-implicitCAD.x.py
function wheel (line 21) | def wheel():
function axle (line 24) | def axle():
function torso (line 33) | def torso():
function car (line 45) | def car():
FILE: solid2/examples/15-implicitCAD2.x.py
function ex1 (line 13) | def ex1():
function ex2 (line 21) | def ex2():
function ex3 (line 32) | def ex3():
function ex4 (line 41) | def ex4():
function ex5 (line 46) | def ex5():
FILE: solid2/examples/16-mazebox-bosl2.py
function mazebox (line 10) | def mazebox():
FILE: solid2/examples/17-greedy-scad-interface.py
function funny_cube (line 21) | def funny_cube():
function funny_sphere (line 40) | def funny_sphere():
function do_nots (line 50) | def do_nots():
FILE: solid2/examples/18-scad-control-structures.py
function f_loop (line 8) | def f_loop(i):
FILE: solid2/extensions/bosl2/affine.py
class affine2d_identity (line 9) | class affine2d_identity(_Bosl2Base):
method __init__ (line 10) | def __init__(self, **kwargs):
class affine2d_translate (line 13) | class affine2d_translate(_Bosl2Base):
method __init__ (line 14) | def __init__(self, v=None, **kwargs):
class affine2d_scale (line 17) | class affine2d_scale(_Bosl2Base):
method __init__ (line 18) | def __init__(self, v=None, **kwargs):
class affine2d_zrot (line 21) | class affine2d_zrot(_Bosl2Base):
method __init__ (line 22) | def __init__(self, ang=None, **kwargs):
class affine2d_mirror (line 25) | class affine2d_mirror(_Bosl2Base):
method __init__ (line 26) | def __init__(self, v=None, **kwargs):
class affine2d_skew (line 29) | class affine2d_skew(_Bosl2Base):
method __init__ (line 30) | def __init__(self, xa=None, ya=None, **kwargs):
class affine3d_identity (line 33) | class affine3d_identity(_Bosl2Base):
method __init__ (line 34) | def __init__(self, **kwargs):
class affine3d_translate (line 37) | class affine3d_translate(_Bosl2Base):
method __init__ (line 38) | def __init__(self, v=None, **kwargs):
class affine3d_scale (line 41) | class affine3d_scale(_Bosl2Base):
method __init__ (line 42) | def __init__(self, v=None, **kwargs):
class affine3d_xrot (line 45) | class affine3d_xrot(_Bosl2Base):
method __init__ (line 46) | def __init__(self, ang=None, **kwargs):
class affine3d_yrot (line 49) | class affine3d_yrot(_Bosl2Base):
method __init__ (line 50) | def __init__(self, ang=None, **kwargs):
class affine3d_zrot (line 53) | class affine3d_zrot(_Bosl2Base):
method __init__ (line 54) | def __init__(self, ang=None, **kwargs):
class affine3d_rot_by_axis (line 57) | class affine3d_rot_by_axis(_Bosl2Base):
method __init__ (line 58) | def __init__(self, u=None, ang=None, **kwargs):
class affine3d_rot_from_to (line 61) | class affine3d_rot_from_to(_Bosl2Base):
method __init__ (line 62) | def __init__(self, _from=None, to=None, **kwargs):
class affine3d_mirror (line 65) | class affine3d_mirror(_Bosl2Base):
method __init__ (line 66) | def __init__(self, v=None, **kwargs):
class affine3d_skew (line 69) | class affine3d_skew(_Bosl2Base):
method __init__ (line 70) | def __init__(self, sxy=None, sxz=None, syx=None, syz=None, szx=None, s...
class affine3d_skew_xy (line 73) | class affine3d_skew_xy(_Bosl2Base):
method __init__ (line 74) | def __init__(self, xa=None, ya=None, **kwargs):
class affine3d_skew_xz (line 77) | class affine3d_skew_xz(_Bosl2Base):
method __init__ (line 78) | def __init__(self, xa=None, za=None, **kwargs):
class affine3d_skew_yz (line 81) | class affine3d_skew_yz(_Bosl2Base):
method __init__ (line 82) | def __init__(self, ya=None, za=None, **kwargs):
FILE: solid2/extensions/bosl2/attachments.py
class _quant_anch (line 42) | class _quant_anch(_Bosl2Base):
method __init__ (line 43) | def __init__(self, x=None, **kwargs):
class _make_anchor_legal (line 46) | class _make_anchor_legal(_Bosl2Base):
method __init__ (line 47) | def __init__(self, anchor=None, geom=None, **kwargs):
class _is_geometry (line 50) | class _is_geometry(_Bosl2Base):
method __init__ (line 51) | def __init__(self, entry=None, **kwargs):
class reorient (line 54) | class reorient(_Bosl2Base):
method __init__ (line 55) | def __init__(self, anchor=None, spin=None, orient=None, size=None, siz...
class named_anchor (line 58) | class named_anchor(_Bosl2Base):
method __init__ (line 59) | def __init__(self, name=None, pos=None, orient=None, spin=None, rot=No...
class attach_geom (line 62) | class attach_geom(_Bosl2Base):
method __init__ (line 63) | def __init__(self, size=None, size2=None, shift=None, scale=None, twis...
class define_part (line 66) | class define_part(_Bosl2Base):
method __init__ (line 67) | def __init__(self, name=None, geom=None, inside=None, T=None, **kwargs):
class _attach_geom_2d (line 70) | class _attach_geom_2d(_Bosl2Base):
method __init__ (line 71) | def __init__(self, geom=None, **kwargs):
class _attach_geom_size (line 74) | class _attach_geom_size(_Bosl2Base):
method __init__ (line 75) | def __init__(self, geom=None, **kwargs):
class _attach_geom_edge_path (line 78) | class _attach_geom_edge_path(_Bosl2Base):
method __init__ (line 79) | def __init__(self, geom=None, edge=None, **kwargs):
class _attach_transform (line 82) | class _attach_transform(_Bosl2Base):
method __init__ (line 83) | def __init__(self, anchor=None, spin=None, orient=None, geom=None, p=N...
class _get_cp (line 86) | class _get_cp(_Bosl2Base):
method __init__ (line 87) | def __init__(self, geom=None, **kwargs):
method __init__ (line 91) | def __init__(self, geom=None, **kwargs):
class _get_cp (line 90) | class _get_cp(_Bosl2Base):
method __init__ (line 87) | def __init__(self, geom=None, **kwargs):
method __init__ (line 91) | def __init__(self, geom=None, **kwargs):
class _three_edge_corner_dir (line 94) | class _three_edge_corner_dir(_Bosl2Base):
method __init__ (line 95) | def __init__(self, facevecs=None, edges=None, **kwargs):
class _find_anchor (line 98) | class _find_anchor(_Bosl2Base):
method __init__ (line 99) | def __init__(self, anchor=None, geom=None, **kwargs):
class _is_shown (line 102) | class _is_shown(_Bosl2Base):
method __init__ (line 103) | def __init__(self, **kwargs):
class _standard_anchors (line 106) | class _standard_anchors(_Bosl2Base):
method __init__ (line 107) | def __init__(self, two_d=None, **kwargs):
class _edges_vec_txt (line 110) | class _edges_vec_txt(_Bosl2Base):
method __init__ (line 111) | def __init__(self, x=None, **kwargs):
class _edges_text (line 114) | class _edges_text(_Bosl2Base):
method __init__ (line 115) | def __init__(self, edges=None, **kwargs):
class _is_edge_array (line 118) | class _is_edge_array(_Bosl2Base):
method __init__ (line 119) | def __init__(self, x=None, **kwargs):
class _edge_set (line 122) | class _edge_set(_Bosl2Base):
method __init__ (line 123) | def __init__(self, v=None, **kwargs):
class _normalize_edges (line 126) | class _normalize_edges(_Bosl2Base):
method __init__ (line 127) | def __init__(self, v=None, **kwargs):
class _edges (line 130) | class _edges(_Bosl2Base):
method __init__ (line 131) | def __init__(self, v=None, _except=None, **kwargs):
class _is_corner_array (line 134) | class _is_corner_array(_Bosl2Base):
method __init__ (line 135) | def __init__(self, x=None, **kwargs):
class _normalize_corners (line 138) | class _normalize_corners(_Bosl2Base):
method __init__ (line 139) | def __init__(self, v=None, **kwargs):
class _corner_set (line 142) | class _corner_set(_Bosl2Base):
method __init__ (line 143) | def __init__(self, v=None, **kwargs):
class _corners (line 146) | class _corners(_Bosl2Base):
method __init__ (line 147) | def __init__(self, v=None, _except=None, **kwargs):
class _corner_edges (line 150) | class _corner_edges(_Bosl2Base):
method __init__ (line 151) | def __init__(self, edges=None, v=None, **kwargs):
class _corner_edge_count (line 154) | class _corner_edge_count(_Bosl2Base):
method __init__ (line 155) | def __init__(self, edges=None, v=None, **kwargs):
class _corners_text (line 158) | class _corners_text(_Bosl2Base):
method __init__ (line 159) | def __init__(self, corners=None, **kwargs):
class _force_rot (line 162) | class _force_rot(_Bosl2Base):
method __init__ (line 163) | def __init__(self, T=None, **kwargs):
class _local_struct_val (line 166) | class _local_struct_val(_Bosl2Base):
method __init__ (line 167) | def __init__(self, struct=None, key=None, **kwargs):
class _force_anchor_2d (line 170) | class _force_anchor_2d(_Bosl2Base):
method __init__ (line 171) | def __init__(self, anchor=None, **kwargs):
class _compute_spin (line 174) | class _compute_spin(_Bosl2Base):
method __init__ (line 175) | def __init__(self, anchor_dir=None, spin_dir=None, **kwargs):
class _canonical_edge (line 178) | class _canonical_edge(_Bosl2Base):
method __init__ (line 179) | def __init__(self, edge=None, **kwargs):
class parent (line 182) | class parent(_Bosl2Base):
method __init__ (line 183) | def __init__(self, **kwargs):
class parent_part (line 186) | class parent_part(_Bosl2Base):
method __init__ (line 187) | def __init__(self, name=None, **kwargs):
class desc_point (line 190) | class desc_point(_Bosl2Base):
method __init__ (line 191) | def __init__(self, desc=None, p=None, anchor=None, **kwargs):
class desc_dir (line 194) | class desc_dir(_Bosl2Base):
method __init__ (line 195) | def __init__(self, desc=None, dir=None, anchor=None, **kwargs):
class desc_attach (line 198) | class desc_attach(_Bosl2Base):
method __init__ (line 199) | def __init__(self, desc=None, anchor=None, p=None, reverse=None, **kwa...
class desc_dist (line 202) | class desc_dist(_Bosl2Base):
method __init__ (line 203) | def __init__(self, desc1=None, anchor1=None, desc2=None, anchor2=None,...
class transform_desc (line 206) | class transform_desc(_Bosl2Base):
method __init__ (line 207) | def __init__(self, T=None, desc=None, **kwargs):
class is_description (line 210) | class is_description(_Bosl2Base):
method __init__ (line 211) | def __init__(self, desc=None, **kwargs):
class position (line 214) | class position(_Bosl2Base):
method __init__ (line 215) | def __init__(self, at=None, _from=None, **kwargs):
class orient (line 218) | class orient(_Bosl2Base):
method __init__ (line 219) | def __init__(self, anchor=None, spin=None, **kwargs):
class align (line 222) | class align(_Bosl2Base):
method __init__ (line 223) | def __init__(self, anchor=None, align=None, inside=None, inset=None, s...
class attach (line 226) | class attach(_Bosl2Base):
method __init__ (line 227) | def __init__(self, parent=None, child=None, overlap=None, align=None, ...
class attach_part (line 230) | class attach_part(_Bosl2Base):
method __init__ (line 231) | def __init__(self, name=None, **kwargs):
class tag (line 234) | class tag(_Bosl2Base):
method __init__ (line 235) | def __init__(self, tag=None, **kwargs):
class tag_this (line 238) | class tag_this(_Bosl2Base):
method __init__ (line 239) | def __init__(self, tag=None, **kwargs):
class force_tag (line 242) | class force_tag(_Bosl2Base):
method __init__ (line 243) | def __init__(self, tag=None, **kwargs):
class default_tag (line 246) | class default_tag(_Bosl2Base):
method __init__ (line 247) | def __init__(self, tag=None, do_tag=None, **kwargs):
class tag_scope (line 250) | class tag_scope(_Bosl2Base):
method __init__ (line 251) | def __init__(self, scope=None, **kwargs):
class diff (line 254) | class diff(_Bosl2Base):
method __init__ (line 255) | def __init__(self, remove=None, keep=None, **kwargs):
class tag_diff (line 258) | class tag_diff(_Bosl2Base):
method __init__ (line 259) | def __init__(self, tag=None, remove=None, keep=None, **kwargs):
class intersect (line 262) | class intersect(_Bosl2Base):
method __init__ (line 263) | def __init__(self, intersect=None, keep=None, **kwargs):
class tag_intersect (line 266) | class tag_intersect(_Bosl2Base):
method __init__ (line 267) | def __init__(self, tag=None, intersect=None, keep=None, **kwargs):
class conv_hull (line 270) | class conv_hull(_Bosl2Base):
method __init__ (line 271) | def __init__(self, keep=None, **kwargs):
class tag_conv_hull (line 274) | class tag_conv_hull(_Bosl2Base):
method __init__ (line 275) | def __init__(self, tag=None, keep=None, **kwargs):
class hide (line 278) | class hide(_Bosl2Base):
method __init__ (line 279) | def __init__(self, tags=None, **kwargs):
class hide_this (line 282) | class hide_this(_Bosl2Base):
method __init__ (line 283) | def __init__(self, **kwargs):
class show_only (line 286) | class show_only(_Bosl2Base):
method __init__ (line 287) | def __init__(self, tags=None, **kwargs):
class show_all (line 290) | class show_all(_Bosl2Base):
method __init__ (line 291) | def __init__(self, **kwargs):
class show_int (line 294) | class show_int(_Bosl2Base):
method __init__ (line 295) | def __init__(self, tags=None, **kwargs):
class face_mask (line 298) | class face_mask(_Bosl2Base):
method __init__ (line 299) | def __init__(self, faces=None, **kwargs):
class edge_mask (line 302) | class edge_mask(_Bosl2Base):
method __init__ (line 303) | def __init__(self, edges=None, _except=None, **kwargs):
class corner_mask (line 306) | class corner_mask(_Bosl2Base):
method __init__ (line 307) | def __init__(self, corners=None, _except=None, **kwargs):
class face_profile (line 310) | class face_profile(_Bosl2Base):
method __init__ (line 311) | def __init__(self, faces=None, r=None, d=None, excess=None, convexity=...
class edge_profile (line 314) | class edge_profile(_Bosl2Base):
method __init__ (line 315) | def __init__(self, edges=None, _except=None, excess=None, convexity=No...
class edge_profile_asym (line 318) | class edge_profile_asym(_Bosl2Base):
method __init__ (line 319) | def __init__(self, edges=None, _except=None, excess=None, convexity=No...
class corner_profile (line 322) | class corner_profile(_Bosl2Base):
method __init__ (line 323) | def __init__(self, corners=None, _except=None, r=None, d=None, convexi...
class attachable (line 326) | class attachable(_Bosl2Base):
method __init__ (line 327) | def __init__(self, anchor=None, spin=None, orient=None, size=None, siz...
class _show_highlight (line 330) | class _show_highlight(_Bosl2Base):
method __init__ (line 331) | def __init__(self, **kwargs):
class _show_ghost (line 334) | class _show_ghost(_Bosl2Base):
method __init__ (line 335) | def __init__(self, **kwargs):
class show_anchors (line 338) | class show_anchors(_Bosl2Base):
method __init__ (line 339) | def __init__(self, s=None, std=None, custom=None, **kwargs):
class anchor_arrow (line 342) | class anchor_arrow(_Bosl2Base):
method __init__ (line 343) | def __init__(self, s=None, color=None, flag=None, _tag=None, _fn=None,...
class anchor_arrow2d (line 346) | class anchor_arrow2d(_Bosl2Base):
method __init__ (line 347) | def __init__(self, s=None, color=None, _tag=None, **kwargs):
class expose_anchors (line 350) | class expose_anchors(_Bosl2Base):
method __init__ (line 351) | def __init__(self, opacity=None, **kwargs):
class show_transform_list (line 354) | class show_transform_list(_Bosl2Base):
method __init__ (line 355) | def __init__(self, tlist=None, s=None, **kwargs):
class generic_airplane (line 358) | class generic_airplane(_Bosl2Base):
method __init__ (line 359) | def __init__(self, s=None, **kwargs):
class frame_ref (line 362) | class frame_ref(_Bosl2Base):
method __init__ (line 363) | def __init__(self, s=None, opacity=None, **kwargs):
class _edges_text3d (line 366) | class _edges_text3d(_Bosl2Base):
method __init__ (line 367) | def __init__(self, txt=None, size=None, **kwargs):
class _show_edges (line 370) | class _show_edges(_Bosl2Base):
method __init__ (line 371) | def __init__(self, edges=None, size=None, text=None, txtsize=None, top...
class _show_corners (line 374) | class _show_corners(_Bosl2Base):
method __init__ (line 375) | def __init__(self, corners=None, size=None, text=None, txtsize=None, t...
class _show_cube_faces (line 378) | class _show_cube_faces(_Bosl2Base):
method __init__ (line 379) | def __init__(self, faces=None, size=None, toplabel=None, botlabel=None...
class restore (line 382) | class restore(_Bosl2Base):
method __init__ (line 383) | def __init__(self, desc=None, **kwargs):
class desc_copies (line 386) | class desc_copies(_Bosl2Base):
method __init__ (line 387) | def __init__(self, transforms=None, **kwargs):
FILE: solid2/extensions/bosl2/ball_bearings.py
class ball_bearing_info (line 9) | class ball_bearing_info(_Bosl2Base):
method __init__ (line 10) | def __init__(self, trade_size=None, **kwargs):
class ball_bearing (line 13) | class ball_bearing(_Bosl2Base):
method __init__ (line 14) | def __init__(self, trade_size=None, id=None, od=None, width=None, shie...
FILE: solid2/extensions/bosl2/beziers.py
class bezier_points (line 10) | class bezier_points(_Bosl2Base):
method __init__ (line 11) | def __init__(self, curve=None, u=None, **kwargs):
class _signed_pascals_triangle (line 14) | class _signed_pascals_triangle(_Bosl2Base):
method __init__ (line 15) | def __init__(self, N=None, tri=None, **kwargs):
class _compute_bezier_matrix (line 18) | class _compute_bezier_matrix(_Bosl2Base):
method __init__ (line 19) | def __init__(self, N=None, **kwargs):
class _bezier_matrix (line 22) | class _bezier_matrix(_Bosl2Base):
method __init__ (line 23) | def __init__(self, N=None, **kwargs):
class bezier_curve (line 26) | class bezier_curve(_Bosl2Base):
method __init__ (line 27) | def __init__(self, bezier=None, splinesteps=None, endpoint=None, **kwa...
class bezier_derivative (line 30) | class bezier_derivative(_Bosl2Base):
method __init__ (line 31) | def __init__(self, bezier=None, u=None, order=None, **kwargs):
class bezier_tangent (line 34) | class bezier_tangent(_Bosl2Base):
method __init__ (line 35) | def __init__(self, bezier=None, u=None, **kwargs):
class bezier_curvature (line 38) | class bezier_curvature(_Bosl2Base):
method __init__ (line 39) | def __init__(self, bezier=None, u=None, **kwargs):
class bezier_closest_point (line 42) | class bezier_closest_point(_Bosl2Base):
method __init__ (line 43) | def __init__(self, bezier=None, pt=None, max_err=None, u=None, end_u=N...
class bezier_length (line 46) | class bezier_length(_Bosl2Base):
method __init__ (line 47) | def __init__(self, bezier=None, start_u=None, end_u=None, max_deflect=...
class bezier_line_intersection (line 50) | class bezier_line_intersection(_Bosl2Base):
method __init__ (line 51) | def __init__(self, bezier=None, line=None, **kwargs):
class bezpath_points (line 54) | class bezpath_points(_Bosl2Base):
method __init__ (line 55) | def __init__(self, bezpath=None, curveind=None, u=None, N=None, **kwar...
class bezpath_curve (line 58) | class bezpath_curve(_Bosl2Base):
method __init__ (line 59) | def __init__(self, bezpath=None, splinesteps=None, N=None, endpoint=No...
class bezpath_closest_point (line 62) | class bezpath_closest_point(_Bosl2Base):
method __init__ (line 63) | def __init__(self, bezpath=None, pt=None, N=None, max_err=None, seg=No...
class bezpath_length (line 66) | class bezpath_length(_Bosl2Base):
method __init__ (line 67) | def __init__(self, bezpath=None, N=None, max_deflect=None, **kwargs):
class path_to_bezpath (line 70) | class path_to_bezpath(_Bosl2Base):
method __init__ (line 71) | def __init__(self, path=None, closed=None, tangents=None, uniform=None...
class path_to_bezcornerpath (line 74) | class path_to_bezcornerpath(_Bosl2Base):
method __init__ (line 75) | def __init__(self, path=None, closed=None, size=None, relsize=None, **...
class _bez_path_corner (line 78) | class _bez_path_corner(_Bosl2Base):
method __init__ (line 79) | def __init__(self, p=None, curvesize=None, relative=None, mincurvesize...
class bezpath_close_to_axis (line 82) | class bezpath_close_to_axis(_Bosl2Base):
method __init__ (line 83) | def __init__(self, bezpath=None, axis=None, N=None, **kwargs):
class bezpath_offset (line 86) | class bezpath_offset(_Bosl2Base):
method __init__ (line 87) | def __init__(self, offset=None, bezier=None, N=None, **kwargs):
class bez_begin (line 90) | class bez_begin(_Bosl2Base):
method __init__ (line 91) | def __init__(self, pt=None, a=None, r=None, p=None, **kwargs):
class bez_tang (line 94) | class bez_tang(_Bosl2Base):
method __init__ (line 95) | def __init__(self, pt=None, a=None, r1=None, r2=None, p=None, **kwargs):
class bez_joint (line 98) | class bez_joint(_Bosl2Base):
method __init__ (line 99) | def __init__(self, pt=None, a1=None, a2=None, r1=None, r2=None, p1=Non...
class bez_end (line 102) | class bez_end(_Bosl2Base):
method __init__ (line 103) | def __init__(self, pt=None, a=None, r=None, p=None, **kwargs):
class is_bezier_patch (line 106) | class is_bezier_patch(_Bosl2Base):
method __init__ (line 107) | def __init__(self, x=None, **kwargs):
class bezier_patch_flat (line 110) | class bezier_patch_flat(_Bosl2Base):
method __init__ (line 111) | def __init__(self, size=None, N=None, spin=None, orient=None, trans=No...
class bezier_patch_reverse (line 114) | class bezier_patch_reverse(_Bosl2Base):
method __init__ (line 115) | def __init__(self, patch=None, **kwargs):
class bezier_patch_points (line 118) | class bezier_patch_points(_Bosl2Base):
method __init__ (line 119) | def __init__(self, patch=None, u=None, v=None, **kwargs):
class _bezier_rectangle (line 122) | class _bezier_rectangle(_Bosl2Base):
method __init__ (line 123) | def __init__(self, patch=None, splinesteps=None, style=None, **kwargs):
class bezier_vnf (line 126) | class bezier_vnf(_Bosl2Base):
method __init__ (line 127) | def __init__(self, patches=None, splinesteps=None, style=None, **kwargs):
class bezier_vnf_degenerate_patch (line 130) | class bezier_vnf_degenerate_patch(_Bosl2Base):
method __init__ (line 131) | def __init__(self, patch=None, splinesteps=None, reverse=None, return_...
class bezier_patch_normals (line 134) | class bezier_patch_normals(_Bosl2Base):
method __init__ (line 135) | def __init__(self, patch=None, u=None, v=None, **kwargs):
class bezier_sheet (line 138) | class bezier_sheet(_Bosl2Base):
method __init__ (line 139) | def __init__(self, patch=None, delta=None, splinesteps=None, style=Non...
class debug_bezier (line 142) | class debug_bezier(_Bosl2Base):
method __init__ (line 143) | def __init__(self, bezpath=None, width=None, N=None, **kwargs):
class debug_bezier_patches (line 146) | class debug_bezier_patches(_Bosl2Base):
method __init__ (line 147) | def __init__(self, patches=None, size=None, splinesteps=None, showcps=...
FILE: solid2/extensions/bosl2/bosl2_access_syntax_mixin.py
class Bosl2AccessSyntaxMixin (line 4) | class Bosl2AccessSyntaxMixin(_AccessSyntaxMixin):
method _get_std (line 6) | def _get_std(self):
method move (line 10) | def move(self, v=None, p=None, **kwargs):
method left (line 13) | def left(self, x=None, p=None, **kwargs):
method right (line 16) | def right(self, x=None, p=None, **kwargs):
method xmove (line 19) | def xmove(self, x=None, p=None, **kwargs):
method fwd (line 22) | def fwd(self, y=None, p=None, **kwargs):
method back (line 25) | def back(self, y=None, p=None, **kwargs):
method ymove (line 28) | def ymove(self, y=None, p=None, **kwargs):
method down (line 31) | def down(self, z=None, p=None, **kwargs):
method up (line 34) | def up(self, z=None, p=None, **kwargs):
method zmove (line 37) | def zmove(self, z=None, p=None, **kwargs):
method rot (line 40) | def rot(self, a=None, v=None, cp=None, _from=None, to=None, reverse=No...
method xrot (line 43) | def xrot(self, a=None, p=None, cp=None, **kwargs):
method yrot (line 46) | def yrot(self, a=None, p=None, cp=None, **kwargs):
method zrot (line 49) | def zrot(self, a=None, p=None, cp=None, **kwargs):
method tilt (line 52) | def tilt(self, to=None, cp=None, reverse=None, **kwargs):
method xscale (line 55) | def xscale(self, x=None, p=None, cp=None, **kwargs):
method yscale (line 58) | def yscale(self, y=None, p=None, cp=None, **kwargs):
method zscale (line 61) | def zscale(self, z=None, p=None, cp=None, **kwargs):
method xflip (line 64) | def xflip(self, p=None, x=None, **kwargs):
method yflip (line 67) | def yflip(self, p=None, y=None, **kwargs):
method zflip (line 70) | def zflip(self, p=None, z=None, **kwargs):
method frame_map (line 73) | def frame_map(self, x=None, y=None, z=None, p=None, reverse=None, **kw...
method skew (line 76) | def skew(self, p=None, sxy=None, sxz=None, syx=None, syz=None, szx=Non...
method translate (line 79) | def translate(self, v=None, **kwargs):
method rotate (line 82) | def rotate(self, a=None, v=None, **kwargs):
method scale (line 85) | def scale(self, v=None, **kwargs):
method multmatrix (line 88) | def multmatrix(self, m=None, **kwargs):
method position (line 91) | def position(self, at=None, _from=None, **kwargs):
method orient (line 94) | def orient(self, anchor=None, spin=None, **kwargs):
method align (line 97) | def align(self, anchor=None, align=None, inside=None, inset=None, shif...
method attach (line 100) | def attach(self, parent=None, child=None, overlap=None, align=None, sp...
method attach_part (line 103) | def attach_part(self, name=None, **kwargs):
method tag (line 106) | def tag(self, tag=None, **kwargs):
method tag_this (line 109) | def tag_this(self, tag=None, **kwargs):
method force_tag (line 112) | def force_tag(self, tag=None, **kwargs):
method default_tag (line 115) | def default_tag(self, tag=None, do_tag=None, **kwargs):
method tag_scope (line 118) | def tag_scope(self, scope=None, **kwargs):
method diff (line 121) | def diff(self, remove=None, keep=None, **kwargs):
method tag_diff (line 124) | def tag_diff(self, tag=None, remove=None, keep=None, **kwargs):
method intersect (line 127) | def intersect(self, intersect=None, keep=None, **kwargs):
method tag_intersect (line 130) | def tag_intersect(self, tag=None, intersect=None, keep=None, **kwargs):
method conv_hull (line 133) | def conv_hull(self, keep=None, **kwargs):
method tag_conv_hull (line 136) | def tag_conv_hull(self, tag=None, keep=None, **kwargs):
method hide (line 139) | def hide(self, tags=None, **kwargs):
method hide_this (line 142) | def hide_this(self, **kwargs):
method show_only (line 145) | def show_only(self, tags=None, **kwargs):
method show_all (line 148) | def show_all(self, **kwargs):
method show_int (line 151) | def show_int(self, tags=None, **kwargs):
method face_mask (line 154) | def face_mask(self, faces=None, **kwargs):
method edge_mask (line 157) | def edge_mask(self, edges=None, _except=None, **kwargs):
method corner_mask (line 160) | def corner_mask(self, corners=None, _except=None, **kwargs):
method face_profile (line 163) | def face_profile(self, faces=None, r=None, d=None, excess=None, convex...
method edge_profile (line 166) | def edge_profile(self, edges=None, _except=None, excess=None, convexit...
method edge_profile_asym (line 169) | def edge_profile_asym(self, edges=None, _except=None, excess=None, con...
method corner_profile (line 172) | def corner_profile(self, corners=None, _except=None, r=None, d=None, c...
method attachable (line 175) | def attachable(self, anchor=None, spin=None, orient=None, size=None, s...
method show_anchors (line 178) | def show_anchors(self, s=None, std=None, custom=None, **kwargs):
method anchor_arrow (line 181) | def anchor_arrow(self, s=None, color=None, flag=None, _tag=None, _fn=N...
method anchor_arrow2d (line 184) | def anchor_arrow2d(self, s=None, color=None, _tag=None, **kwargs):
method expose_anchors (line 187) | def expose_anchors(self, opacity=None, **kwargs):
method show_transform_list (line 190) | def show_transform_list(self, tlist=None, s=None, **kwargs):
method generic_airplane (line 193) | def generic_airplane(self, s=None, **kwargs):
method frame_ref (line 196) | def frame_ref(self, s=None, opacity=None, **kwargs):
method restore (line 199) | def restore(self, desc=None, **kwargs):
method desc_copies (line 202) | def desc_copies(self, transforms=None, **kwargs):
method extrude_from_to (line 205) | def extrude_from_to(self, pt1=None, pt2=None, convexity=None, twist=No...
method path_extrude2d (line 208) | def path_extrude2d(self, path=None, caps=None, closed=None, s=None, co...
method path_extrude (line 211) | def path_extrude(self, path=None, convexity=None, clipsize=None, **kwa...
method cylindrical_extrude (line 214) | def cylindrical_extrude(self, ir=None, _or=None, od=None, id=None, siz...
method bounding_box (line 217) | def bounding_box(self, excess=None, planar=None, **kwargs):
method chain_hull (line 220) | def chain_hull(self, **kwargs):
method minkowski_difference (line 223) | def minkowski_difference(self, planar=None, **kwargs):
method offset3d (line 226) | def offset3d(self, r=None, size=None, convexity=None, **kwargs):
method round3d (line 229) | def round3d(self, r=None, _or=None, ir=None, size=None, **kwargs):
method move_copies (line 232) | def move_copies(self, a=None, **kwargs):
method xcopies (line 235) | def xcopies(self, spacing=None, n=None, l=None, sp=None, **kwargs):
method ycopies (line 238) | def ycopies(self, spacing=None, n=None, l=None, sp=None, **kwargs):
method zcopies (line 241) | def zcopies(self, spacing=None, n=None, l=None, sp=None, **kwargs):
method line_of (line 244) | def line_of(self, spacing=None, n=None, l=None, p1=None, p2=None, **kw...
method line_copies (line 247) | def line_copies(self, spacing=None, n=None, l=None, p1=None, p2=None, ...
method grid2d (line 250) | def grid2d(self, spacing=None, n=None, size=None, stagger=None, inside...
method grid_copies (line 253) | def grid_copies(self, spacing=None, n=None, size=None, stagger=None, i...
method rot_copies (line 256) | def rot_copies(self, rots=None, v=None, cp=None, n=None, sa=None, offs...
method xrot_copies (line 259) | def xrot_copies(self, rots=None, cp=None, n=None, sa=None, r=None, d=N...
method yrot_copies (line 262) | def yrot_copies(self, rots=None, cp=None, n=None, sa=None, r=None, d=N...
method zrot_copies (line 265) | def zrot_copies(self, rots=None, cp=None, n=None, sa=None, r=None, d=N...
method arc_of (line 268) | def arc_of(self, n=None, r=None, rx=None, ry=None, d=None, dx=None, dy...
method arc_copies (line 271) | def arc_copies(self, n=None, r=None, rx=None, ry=None, d=None, dx=None...
method ovoid_spread (line 274) | def ovoid_spread(self, n=None, r=None, d=None, cone_ang=None, scale=No...
method sphere_copies (line 277) | def sphere_copies(self, n=None, r=None, d=None, cone_ang=None, scale=N...
method path_spread (line 280) | def path_spread(self, path=None, n=None, spacing=None, sp=None, rotate...
method path_copies (line 283) | def path_copies(self, path=None, n=None, spacing=None, sp=None, dist=N...
method xflip_copy (line 286) | def xflip_copy(self, offset=None, x=None, **kwargs):
method yflip_copy (line 289) | def yflip_copy(self, offset=None, y=None, **kwargs):
method zflip_copy (line 292) | def zflip_copy(self, offset=None, z=None, **kwargs):
method mirror_copy (line 295) | def mirror_copy(self, v=None, offset=None, cp=None, **kwargs):
method xdistribute (line 298) | def xdistribute(self, spacing=None, sizes=None, l=None, **kwargs):
method ydistribute (line 301) | def ydistribute(self, spacing=None, sizes=None, l=None, **kwargs):
method zdistribute (line 304) | def zdistribute(self, spacing=None, sizes=None, l=None, **kwargs):
method distribute (line 307) | def distribute(self, spacing=None, sizes=None, dir=None, l=None, **kwa...
method half_of (line 310) | def half_of(self, v=None, cp=None, s=None, planar=None, **kwargs):
method left_half (line 313) | def left_half(self, s=None, x=None, planar=None, **kwargs):
method right_half (line 316) | def right_half(self, s=None, x=None, planar=None, **kwargs):
method front_half (line 319) | def front_half(self, s=None, y=None, planar=None, **kwargs):
method back_half (line 322) | def back_half(self, s=None, y=None, planar=None, **kwargs):
method bottom_half (line 325) | def bottom_half(self, s=None, z=None, **kwargs):
method top_half (line 328) | def top_half(self, s=None, z=None, **kwargs):
method partition_mask (line 331) | def partition_mask(self, l=None, w=None, h=None, cutsize=None, cutpath...
method partition_cut_mask (line 334) | def partition_cut_mask(self, l=None, h=None, cutsize=None, cutpath=Non...
method partition (line 337) | def partition(self, size=None, spread=None, cutsize=None, cutpath=None...
method recolor (line 340) | def recolor(self, c=None, **kwargs):
method color_this (line 343) | def color_this(self, c=None, **kwargs):
method rainbow (line 346) | def rainbow(self, list=None, stride=None, maxhues=None, shuffle=None, ...
method color_overlaps (line 349) | def color_overlaps(self, color=None, **kwargs):
method highlight (line 352) | def highlight(self, highlight=None, **kwargs):
method highlight_this (line 355) | def highlight_this(self, **kwargs):
method ghost (line 358) | def ghost(self, ghost=None, **kwargs):
method ghost_this (line 361) | def ghost_this(self, **kwargs):
method hsl (line 364) | def hsl(self, h=None, s=None, l=None, a=None, **kwargs):
method hsv (line 367) | def hsv(self, h=None, s=None, v=None, a=None, **kwargs):
FILE: solid2/extensions/bosl2/bosl2_base.py
class Bosl2OperatorMixin (line 6) | class Bosl2OperatorMixin(OperatorMixin):
method __add__ (line 7) | def __add__(self, x):
method __or__ (line 11) | def __or__(self, x):
method __radd__ (line 15) | def __radd__(self, x):
method __sub__ (line 19) | def __sub__(self, x):
method __mul__ (line 23) | def __mul__(self, x):
method __and__ (line 27) | def __and__(self, x):
class Bosl2Base (line 32) | class Bosl2Base(Bosl2AccessSyntaxMixin, Bosl2OperatorMixin, BareOpenSCAD...
FILE: solid2/extensions/bosl2/bosl2_patches.py
function attachable_add (line 11) | def attachable_add(self, c):
FILE: solid2/extensions/bosl2/bottlecaps.py
class pco1810_neck (line 12) | class pco1810_neck(_Bosl2Base):
method __init__ (line 13) | def __init__(self, wall=None, anchor=None, spin=None, orient=None, **k...
method __init__ (line 61) | def __init__(self, wall=None, anchor=None, spin=None, orient=None, **k...
class pco1810_cap (line 16) | class pco1810_cap(_Bosl2Base):
method __init__ (line 17) | def __init__(self, h=None, r=None, d=None, wall=None, texture=None, an...
method __init__ (line 65) | def __init__(self, h=None, r=None, d=None, wall=None, texture=None, an...
class pco1881_neck (line 20) | class pco1881_neck(_Bosl2Base):
method __init__ (line 21) | def __init__(self, wall=None, anchor=None, spin=None, orient=None, **k...
method __init__ (line 69) | def __init__(self, wall=None, anchor=None, spin=None, orient=None, **k...
class pco1881_cap (line 24) | class pco1881_cap(_Bosl2Base):
method __init__ (line 25) | def __init__(self, wall=None, texture=None, anchor=None, spin=None, or...
method __init__ (line 73) | def __init__(self, wall=None, texture=None, anchor=None, spin=None, or...
class generic_bottle_neck (line 28) | class generic_bottle_neck(_Bosl2Base):
method __init__ (line 29) | def __init__(self, neck_d=None, id=None, thread_od=None, height=None, ...
method __init__ (line 77) | def __init__(self, wall=None, neck_d=None, id=None, thread_od=None, he...
class generic_bottle_cap (line 32) | class generic_bottle_cap(_Bosl2Base):
method __init__ (line 33) | def __init__(self, wall=None, texture=None, height=None, thread_od=Non...
method __init__ (line 81) | def __init__(self, wall=None, texture=None, height=None, thread_depth=...
class bottle_adapter_neck_to_cap (line 36) | class bottle_adapter_neck_to_cap(_Bosl2Base):
method __init__ (line 37) | def __init__(self, wall=None, texture=None, cap_wall=None, cap_h=None,...
method __init__ (line 85) | def __init__(self, wall=None, texture=None, cap_wall=None, cap_h=None,...
class bottle_adapter_cap_to_cap (line 40) | class bottle_adapter_cap_to_cap(_Bosl2Base):
method __init__ (line 41) | def __init__(self, wall=None, texture=None, cap_h1=None, cap_thread_od...
method __init__ (line 89) | def __init__(self, wall=None, texture=None, cap_h1=None, cap_thread_de...
class bottle_adapter_neck_to_neck (line 44) | class bottle_adapter_neck_to_neck(_Bosl2Base):
method __init__ (line 45) | def __init__(self, d=None, neck_od1=None, neck_id1=None, thread_od1=No...
method __init__ (line 93) | def __init__(self, d=None, neck_od1=None, neck_id1=None, thread_od1=No...
class _sp_thread_profile (line 48) | class _sp_thread_profile(_Bosl2Base):
method __init__ (line 49) | def __init__(self, tpi=None, a=None, S=None, style=None, flip=None, **...
class sp_neck (line 52) | class sp_neck(_Bosl2Base):
method __init__ (line 53) | def __init__(self, diam=None, type=None, wall=None, id=None, style=Non...
method __init__ (line 97) | def __init__(self, diam=None, type=None, wall=None, id=None, style=Non...
class sp_diameter (line 56) | class sp_diameter(_Bosl2Base):
method __init__ (line 57) | def __init__(self, diam=None, type=None, **kwargs):
class pco1810_neck (line 60) | class pco1810_neck(_Bosl2Base):
method __init__ (line 13) | def __init__(self, wall=None, anchor=None, spin=None, orient=None, **k...
method __init__ (line 61) | def __init__(self, wall=None, anchor=None, spin=None, orient=None, **k...
class pco1810_cap (line 64) | class pco1810_cap(_Bosl2Base):
method __init__ (line 17) | def __init__(self, h=None, r=None, d=None, wall=None, texture=None, an...
method __init__ (line 65) | def __init__(self, h=None, r=None, d=None, wall=None, texture=None, an...
class pco1881_neck (line 68) | class pco1881_neck(_Bosl2Base):
method __init__ (line 21) | def __init__(self, wall=None, anchor=None, spin=None, orient=None, **k...
method __init__ (line 69) | def __init__(self, wall=None, anchor=None, spin=None, orient=None, **k...
class pco1881_cap (line 72) | class pco1881_cap(_Bosl2Base):
method __init__ (line 25) | def __init__(self, wall=None, texture=None, anchor=None, spin=None, or...
method __init__ (line 73) | def __init__(self, wall=None, texture=None, anchor=None, spin=None, or...
class generic_bottle_neck (line 76) | class generic_bottle_neck(_Bosl2Base):
method __init__ (line 29) | def __init__(self, neck_d=None, id=None, thread_od=None, height=None, ...
method __init__ (line 77) | def __init__(self, wall=None, neck_d=None, id=None, thread_od=None, he...
class generic_bottle_cap (line 80) | class generic_bottle_cap(_Bosl2Base):
method __init__ (line 33) | def __init__(self, wall=None, texture=None, height=None, thread_od=Non...
method __init__ (line 81) | def __init__(self, wall=None, texture=None, height=None, thread_depth=...
class bottle_adapter_neck_to_cap (line 84) | class bottle_adapter_neck_to_cap(_Bosl2Base):
method __init__ (line 37) | def __init__(self, wall=None, texture=None, cap_wall=None, cap_h=None,...
method __init__ (line 85) | def __init__(self, wall=None, texture=None, cap_wall=None, cap_h=None,...
class bottle_adapter_cap_to_cap (line 88) | class bottle_adapter_cap_to_cap(_Bosl2Base):
method __init__ (line 41) | def __init__(self, wall=None, texture=None, cap_h1=None, cap_thread_od...
method __init__ (line 89) | def __init__(self, wall=None, texture=None, cap_h1=None, cap_thread_de...
class bottle_adapter_neck_to_neck (line 92) | class bottle_adapter_neck_to_neck(_Bosl2Base):
method __init__ (line 45) | def __init__(self, d=None, neck_od1=None, neck_id1=None, thread_od1=No...
method __init__ (line 93) | def __init__(self, d=None, neck_od1=None, neck_id1=None, thread_od1=No...
class sp_neck (line 96) | class sp_neck(_Bosl2Base):
method __init__ (line 53) | def __init__(self, diam=None, type=None, wall=None, id=None, style=Non...
method __init__ (line 97) | def __init__(self, diam=None, type=None, wall=None, id=None, style=Non...
class sp_cap (line 100) | class sp_cap(_Bosl2Base):
method __init__ (line 101) | def __init__(self, diam=None, type=None, wall=None, style=None, top_ad...
FILE: solid2/extensions/bosl2/color.py
class highlight (line 9) | class highlight(_Bosl2Base):
method __init__ (line 10) | def __init__(self, highlight=None, **kwargs):
method __init__ (line 50) | def __init__(self, highlight=None, **kwargs):
class highlight_this (line 13) | class highlight_this(_Bosl2Base):
method __init__ (line 14) | def __init__(self, **kwargs):
method __init__ (line 54) | def __init__(self, **kwargs):
class ghost (line 17) | class ghost(_Bosl2Base):
method __init__ (line 18) | def __init__(self, ghost=None, **kwargs):
method __init__ (line 58) | def __init__(self, ghost=None, **kwargs):
class ghost_this (line 21) | class ghost_this(_Bosl2Base):
method __init__ (line 22) | def __init__(self, **kwargs):
method __init__ (line 62) | def __init__(self, **kwargs):
class hsl (line 25) | class hsl(_Bosl2Base):
method __init__ (line 26) | def __init__(self, h=None, s=None, l=None, a=None, **kwargs):
method __init__ (line 66) | def __init__(self, h=None, s=None, l=None, a=None, **kwargs):
class hsv (line 29) | class hsv(_Bosl2Base):
method __init__ (line 30) | def __init__(self, h=None, s=None, v=None, a=None, **kwargs):
method __init__ (line 70) | def __init__(self, h=None, s=None, v=None, a=None, **kwargs):
class recolor (line 33) | class recolor(_Bosl2Base):
method __init__ (line 34) | def __init__(self, c=None, **kwargs):
class color_this (line 37) | class color_this(_Bosl2Base):
method __init__ (line 38) | def __init__(self, c=None, **kwargs):
class rainbow (line 41) | class rainbow(_Bosl2Base):
method __init__ (line 42) | def __init__(self, list=None, stride=None, maxhues=None, shuffle=None,...
class color_overlaps (line 45) | class color_overlaps(_Bosl2Base):
method __init__ (line 46) | def __init__(self, color=None, **kwargs):
class highlight (line 49) | class highlight(_Bosl2Base):
method __init__ (line 10) | def __init__(self, highlight=None, **kwargs):
method __init__ (line 50) | def __init__(self, highlight=None, **kwargs):
class highlight_this (line 53) | class highlight_this(_Bosl2Base):
method __init__ (line 14) | def __init__(self, **kwargs):
method __init__ (line 54) | def __init__(self, **kwargs):
class ghost (line 57) | class ghost(_Bosl2Base):
method __init__ (line 18) | def __init__(self, ghost=None, **kwargs):
method __init__ (line 58) | def __init__(self, ghost=None, **kwargs):
class ghost_this (line 61) | class ghost_this(_Bosl2Base):
method __init__ (line 22) | def __init__(self, **kwargs):
method __init__ (line 62) | def __init__(self, **kwargs):
class hsl (line 65) | class hsl(_Bosl2Base):
method __init__ (line 26) | def __init__(self, h=None, s=None, l=None, a=None, **kwargs):
method __init__ (line 66) | def __init__(self, h=None, s=None, l=None, a=None, **kwargs):
class hsv (line 69) | class hsv(_Bosl2Base):
method __init__ (line 30) | def __init__(self, h=None, s=None, v=None, a=None, **kwargs):
method __init__ (line 70) | def __init__(self, h=None, s=None, v=None, a=None, **kwargs):
FILE: solid2/extensions/bosl2/comparisons.py
class approx (line 9) | class approx(_Bosl2Base):
method __init__ (line 10) | def __init__(self, a=None, b=None, eps=None, **kwargs):
class all_zero (line 13) | class all_zero(_Bosl2Base):
method __init__ (line 14) | def __init__(self, x=None, eps=None, **kwargs):
class all_nonzero (line 17) | class all_nonzero(_Bosl2Base):
method __init__ (line 18) | def __init__(self, x=None, eps=None, **kwargs):
class all_positive (line 21) | class all_positive(_Bosl2Base):
method __init__ (line 22) | def __init__(self, x=None, eps=None, **kwargs):
class all_negative (line 25) | class all_negative(_Bosl2Base):
method __init__ (line 26) | def __init__(self, x=None, eps=None, **kwargs):
class all_nonpositive (line 29) | class all_nonpositive(_Bosl2Base):
method __init__ (line 30) | def __init__(self, x=None, eps=None, **kwargs):
class all_nonnegative (line 33) | class all_nonnegative(_Bosl2Base):
method __init__ (line 34) | def __init__(self, x=None, eps=None, **kwargs):
class all_equal (line 37) | class all_equal(_Bosl2Base):
method __init__ (line 38) | def __init__(self, vec=None, eps=None, **kwargs):
class are_ends_equal (line 41) | class are_ends_equal(_Bosl2Base):
method __init__ (line 42) | def __init__(self, list=None, eps=None, **kwargs):
class is_increasing (line 45) | class is_increasing(_Bosl2Base):
method __init__ (line 46) | def __init__(self, list=None, strict=None, **kwargs):
class is_decreasing (line 49) | class is_decreasing(_Bosl2Base):
method __init__ (line 50) | def __init__(self, list=None, strict=None, **kwargs):
class _type_num (line 53) | class _type_num(_Bosl2Base):
method __init__ (line 54) | def __init__(self, x=None, **kwargs):
class compare_vals (line 57) | class compare_vals(_Bosl2Base):
method __init__ (line 58) | def __init__(self, a=None, b=None, **kwargs):
class compare_lists (line 61) | class compare_lists(_Bosl2Base):
method __init__ (line 62) | def __init__(self, a=None, b=None, **kwargs):
class min_index (line 65) | class min_index(_Bosl2Base):
method __init__ (line 66) | def __init__(self, vals=None, all=None, **kwargs):
class max_index (line 69) | class max_index(_Bosl2Base):
method __init__ (line 70) | def __init__(self, vals=None, all=None, **kwargs):
class find_approx (line 73) | class find_approx(_Bosl2Base):
method __init__ (line 74) | def __init__(self, val=None, list=None, start=None, all=None, eps=None...
class __find_approx (line 77) | class __find_approx(_Bosl2Base):
method __init__ (line 78) | def __init__(self, val=None, list=None, eps=None, i=None, **kwargs):
class deduplicate (line 81) | class deduplicate(_Bosl2Base):
method __init__ (line 82) | def __init__(self, list=None, closed=None, eps=None, **kwargs):
class deduplicate_indexed (line 85) | class deduplicate_indexed(_Bosl2Base):
method __init__ (line 86) | def __init__(self, list=None, indices=None, closed=None, eps=None, **k...
class list_wrap (line 89) | class list_wrap(_Bosl2Base):
method __init__ (line 90) | def __init__(self, list=None, eps=None, **kwargs):
class cleanup_path (line 93) | class cleanup_path(_Bosl2Base):
method __init__ (line 94) | def __init__(self, list=None, eps=None, **kwargs):
class close_path (line 97) | class close_path(_Bosl2Base):
method __init__ (line 98) | def __init__(self, list=None, eps=None, **kwargs):
class list_unwrap (line 101) | class list_unwrap(_Bosl2Base):
method __init__ (line 102) | def __init__(self, list=None, eps=None, **kwargs):
class unique (line 105) | class unique(_Bosl2Base):
method __init__ (line 106) | def __init__(self, list=None, **kwargs):
class _unique_sort (line 109) | class _unique_sort(_Bosl2Base):
method __init__ (line 110) | def __init__(self, l=None, **kwargs):
class unique_count (line 113) | class unique_count(_Bosl2Base):
method __init__ (line 114) | def __init__(self, list=None, **kwargs):
class unique_approx (line 117) | class unique_approx(_Bosl2Base):
method __init__ (line 118) | def __init__(self, data=None, eps=None, **kwargs):
class unique_approx_indexed (line 121) | class unique_approx_indexed(_Bosl2Base):
method __init__ (line 122) | def __init__(self, data=None, eps=None, **kwargs):
class _valid_idx (line 125) | class _valid_idx(_Bosl2Base):
method __init__ (line 126) | def __init__(self, idx=None, imin=None, imax=None, **kwargs):
class _group_sort_by_index (line 129) | class _group_sort_by_index(_Bosl2Base):
method __init__ (line 130) | def __init__(self, l=None, idx=None, **kwargs):
class _group_sort (line 133) | class _group_sort(_Bosl2Base):
method __init__ (line 134) | def __init__(self, l=None, **kwargs):
class _sort_scalars (line 137) | class _sort_scalars(_Bosl2Base):
method __init__ (line 138) | def __init__(self, arr=None, **kwargs):
class _sort_vectors (line 141) | class _sort_vectors(_Bosl2Base):
method __init__ (line 142) | def __init__(self, arr=None, _i=None, **kwargs):
method __init__ (line 146) | def __init__(self, arr=None, idxlist=None, _i=None, **kwargs):
class _sort_vectors (line 145) | class _sort_vectors(_Bosl2Base):
method __init__ (line 142) | def __init__(self, arr=None, _i=None, **kwargs):
method __init__ (line 146) | def __init__(self, arr=None, idxlist=None, _i=None, **kwargs):
class _sort_general (line 149) | class _sort_general(_Bosl2Base):
method __init__ (line 150) | def __init__(self, arr=None, idx=None, indexed=None, **kwargs):
class _lexical_sort (line 153) | class _lexical_sort(_Bosl2Base):
method __init__ (line 154) | def __init__(self, arr=None, **kwargs):
class _indexed_sort (line 157) | class _indexed_sort(_Bosl2Base):
method __init__ (line 158) | def __init__(self, arrind=None, **kwargs):
class sort (line 161) | class sort(_Bosl2Base):
method __init__ (line 162) | def __init__(self, list=None, idx=None, **kwargs):
class sortidx (line 165) | class sortidx(_Bosl2Base):
method __init__ (line 166) | def __init__(self, list=None, idx=None, **kwargs):
class group_sort (line 169) | class group_sort(_Bosl2Base):
method __init__ (line 170) | def __init__(self, list=None, idx=None, **kwargs):
class group_data (line 173) | class group_data(_Bosl2Base):
method __init__ (line 174) | def __init__(self, groups=None, values=None, **kwargs):
class list_smallest (line 177) | class list_smallest(_Bosl2Base):
method __init__ (line 178) | def __init__(self, list=None, k=None, **kwargs):
FILE: solid2/extensions/bosl2/constants.py
class get_slop (line 29) | class get_slop(_Bosl2Base):
method __init__ (line 30) | def __init__(self, **kwargs):
class EDGE (line 33) | class EDGE(_Bosl2Base):
method __init__ (line 34) | def __init__(self, a=None, b=None, **kwargs):
class FACE (line 37) | class FACE(_Bosl2Base):
method __init__ (line 38) | def __init__(self, i=None, **kwargs):
FILE: solid2/extensions/bosl2/coords.py
class point2d (line 9) | class point2d(_Bosl2Base):
method __init__ (line 10) | def __init__(self, p=None, fill=None, **kwargs):
class path2d (line 13) | class path2d(_Bosl2Base):
method __init__ (line 14) | def __init__(self, points=None, **kwargs):
class point3d (line 17) | class point3d(_Bosl2Base):
method __init__ (line 18) | def __init__(self, p=None, fill=None, **kwargs):
class path3d (line 21) | class path3d(_Bosl2Base):
method __init__ (line 22) | def __init__(self, points=None, fill=None, **kwargs):
class point4d (line 25) | class point4d(_Bosl2Base):
method __init__ (line 26) | def __init__(self, p=None, fill=None, **kwargs):
class path4d (line 29) | class path4d(_Bosl2Base):
method __init__ (line 30) | def __init__(self, points=None, fill=None, **kwargs):
class polar_to_xy (line 33) | class polar_to_xy(_Bosl2Base):
method __init__ (line 34) | def __init__(self, r=None, theta=None, **kwargs):
class xy_to_polar (line 37) | class xy_to_polar(_Bosl2Base):
method __init__ (line 38) | def __init__(self, x=None, y=None, **kwargs):
class project_plane (line 41) | class project_plane(_Bosl2Base):
method __init__ (line 42) | def __init__(self, plane=None, p=None, **kwargs):
class lift_plane (line 45) | class lift_plane(_Bosl2Base):
method __init__ (line 46) | def __init__(self, plane=None, p=None, **kwargs):
class cylindrical_to_xyz (line 49) | class cylindrical_to_xyz(_Bosl2Base):
method __init__ (line 50) | def __init__(self, r=None, theta=None, z=None, **kwargs):
class xyz_to_cylindrical (line 53) | class xyz_to_cylindrical(_Bosl2Base):
method __init__ (line 54) | def __init__(self, x=None, y=None, z=None, **kwargs):
class spherical_to_xyz (line 57) | class spherical_to_xyz(_Bosl2Base):
method __init__ (line 58) | def __init__(self, r=None, theta=None, phi=None, **kwargs):
class xyz_to_spherical (line 61) | class xyz_to_spherical(_Bosl2Base):
method __init__ (line 62) | def __init__(self, x=None, y=None, z=None, **kwargs):
class altaz_to_xyz (line 65) | class altaz_to_xyz(_Bosl2Base):
method __init__ (line 66) | def __init__(self, alt=None, az=None, r=None, **kwargs):
class xyz_to_altaz (line 69) | class xyz_to_altaz(_Bosl2Base):
method __init__ (line 70) | def __init__(self, x=None, y=None, z=None, **kwargs):
FILE: solid2/extensions/bosl2/cubetruss.py
class cubetruss_dist (line 13) | class cubetruss_dist(_Bosl2Base):
method __init__ (line 14) | def __init__(self, cubes=None, gaps=None, size=None, strut=None, **kwa...
class cubetruss (line 17) | class cubetruss(_Bosl2Base):
method __init__ (line 18) | def __init__(self, extents=None, clips=None, bracing=None, size=None, ...
class cubetruss_corner (line 21) | class cubetruss_corner(_Bosl2Base):
method __init__ (line 22) | def __init__(self, h=None, extents=None, bracing=None, size=None, stru...
class cubetruss_support (line 25) | class cubetruss_support(_Bosl2Base):
method __init__ (line 26) | def __init__(self, size=None, strut=None, extents=None, anchor=None, s...
class cubetruss_foot (line 29) | class cubetruss_foot(_Bosl2Base):
method __init__ (line 30) | def __init__(self, w=None, size=None, strut=None, clipthick=None, anch...
class cubetruss_joiner (line 33) | class cubetruss_joiner(_Bosl2Base):
method __init__ (line 34) | def __init__(self, w=None, vert=None, size=None, strut=None, clipthick...
class cubetruss_uclip (line 37) | class cubetruss_uclip(_Bosl2Base):
method __init__ (line 38) | def __init__(self, dual=None, size=None, strut=None, clipthick=None, a...
class cubetruss_segment (line 41) | class cubetruss_segment(_Bosl2Base):
method __init__ (line 42) | def __init__(self, size=None, strut=None, bracing=None, anchor=None, s...
class cubetruss_clip (line 45) | class cubetruss_clip(_Bosl2Base):
method __init__ (line 46) | def __init__(self, extents=None, size=None, strut=None, clipthick=None...
FILE: solid2/extensions/bosl2/distributors.py
class move_copies (line 9) | class move_copies(_Bosl2Base):
method __init__ (line 10) | def __init__(self, a=None, p=None, **kwargs):
method __init__ (line 78) | def __init__(self, a=None, **kwargs):
class xcopies (line 13) | class xcopies(_Bosl2Base):
method __init__ (line 14) | def __init__(self, spacing=None, n=None, l=None, sp=None, p=None, **kw...
method __init__ (line 82) | def __init__(self, spacing=None, n=None, l=None, sp=None, **kwargs):
class ycopies (line 17) | class ycopies(_Bosl2Base):
method __init__ (line 18) | def __init__(self, spacing=None, n=None, l=None, sp=None, p=None, **kw...
method __init__ (line 86) | def __init__(self, spacing=None, n=None, l=None, sp=None, **kwargs):
class zcopies (line 21) | class zcopies(_Bosl2Base):
method __init__ (line 22) | def __init__(self, spacing=None, n=None, l=None, sp=None, p=None, **kw...
method __init__ (line 90) | def __init__(self, spacing=None, n=None, l=None, sp=None, **kwargs):
class line_copies (line 25) | class line_copies(_Bosl2Base):
method __init__ (line 26) | def __init__(self, spacing=None, n=None, l=None, p1=None, p2=None, p=N...
method __init__ (line 98) | def __init__(self, spacing=None, n=None, l=None, p1=None, p2=None, **k...
class grid_copies (line 29) | class grid_copies(_Bosl2Base):
method __init__ (line 30) | def __init__(self, spacing=None, n=None, size=None, stagger=None, insi...
method __init__ (line 106) | def __init__(self, spacing=None, n=None, size=None, stagger=None, insi...
class rot_copies (line 33) | class rot_copies(_Bosl2Base):
method __init__ (line 34) | def __init__(self, rots=None, v=None, cp=None, n=None, sa=None, offset...
method __init__ (line 110) | def __init__(self, rots=None, v=None, cp=None, n=None, sa=None, offset...
class xrot_copies (line 37) | class xrot_copies(_Bosl2Base):
method __init__ (line 38) | def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None...
method __init__ (line 114) | def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None...
class yrot_copies (line 41) | class yrot_copies(_Bosl2Base):
method __init__ (line 42) | def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None...
method __init__ (line 118) | def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None...
class zrot_copies (line 45) | class zrot_copies(_Bosl2Base):
method __init__ (line 46) | def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None...
method __init__ (line 122) | def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None...
class arc_copies (line 49) | class arc_copies(_Bosl2Base):
method __init__ (line 50) | def __init__(self, n=None, r=None, rx=None, ry=None, d=None, dx=None, ...
method __init__ (line 130) | def __init__(self, n=None, r=None, rx=None, ry=None, d=None, dx=None, ...
class sphere_copies (line 53) | class sphere_copies(_Bosl2Base):
method __init__ (line 54) | def __init__(self, n=None, r=None, d=None, cone_ang=None, scale=None, ...
method __init__ (line 138) | def __init__(self, n=None, r=None, d=None, cone_ang=None, scale=None, ...
class path_copies (line 57) | class path_copies(_Bosl2Base):
method __init__ (line 58) | def __init__(self, path=None, n=None, spacing=None, sp=None, dist=None...
method __init__ (line 146) | def __init__(self, path=None, n=None, spacing=None, sp=None, dist=None...
class xflip_copy (line 61) | class xflip_copy(_Bosl2Base):
method __init__ (line 62) | def __init__(self, offset=None, x=None, p=None, **kwargs):
method __init__ (line 150) | def __init__(self, offset=None, x=None, **kwargs):
class yflip_copy (line 65) | class yflip_copy(_Bosl2Base):
method __init__ (line 66) | def __init__(self, offset=None, y=None, p=None, **kwargs):
method __init__ (line 154) | def __init__(self, offset=None, y=None, **kwargs):
class zflip_copy (line 69) | class zflip_copy(_Bosl2Base):
method __init__ (line 70) | def __init__(self, offset=None, z=None, p=None, **kwargs):
method __init__ (line 158) | def __init__(self, offset=None, z=None, **kwargs):
class mirror_copy (line 73) | class mirror_copy(_Bosl2Base):
method __init__ (line 74) | def __init__(self, v=None, offset=None, cp=None, p=None, **kwargs):
method __init__ (line 162) | def __init__(self, v=None, offset=None, cp=None, **kwargs):
class move_copies (line 77) | class move_copies(_Bosl2Base):
method __init__ (line 10) | def __init__(self, a=None, p=None, **kwargs):
method __init__ (line 78) | def __init__(self, a=None, **kwargs):
class xcopies (line 81) | class xcopies(_Bosl2Base):
method __init__ (line 14) | def __init__(self, spacing=None, n=None, l=None, sp=None, p=None, **kw...
method __init__ (line 82) | def __init__(self, spacing=None, n=None, l=None, sp=None, **kwargs):
class ycopies (line 85) | class ycopies(_Bosl2Base):
method __init__ (line 18) | def __init__(self, spacing=None, n=None, l=None, sp=None, p=None, **kw...
method __init__ (line 86) | def __init__(self, spacing=None, n=None, l=None, sp=None, **kwargs):
class zcopies (line 89) | class zcopies(_Bosl2Base):
method __init__ (line 22) | def __init__(self, spacing=None, n=None, l=None, sp=None, p=None, **kw...
method __init__ (line 90) | def __init__(self, spacing=None, n=None, l=None, sp=None, **kwargs):
class line_of (line 93) | class line_of(_Bosl2Base):
method __init__ (line 94) | def __init__(self, spacing=None, n=None, l=None, p1=None, p2=None, **k...
class line_copies (line 97) | class line_copies(_Bosl2Base):
method __init__ (line 26) | def __init__(self, spacing=None, n=None, l=None, p1=None, p2=None, p=N...
method __init__ (line 98) | def __init__(self, spacing=None, n=None, l=None, p1=None, p2=None, **k...
class grid2d (line 101) | class grid2d(_Bosl2Base):
method __init__ (line 102) | def __init__(self, spacing=None, n=None, size=None, stagger=None, insi...
class grid_copies (line 105) | class grid_copies(_Bosl2Base):
method __init__ (line 30) | def __init__(self, spacing=None, n=None, size=None, stagger=None, insi...
method __init__ (line 106) | def __init__(self, spacing=None, n=None, size=None, stagger=None, insi...
class rot_copies (line 109) | class rot_copies(_Bosl2Base):
method __init__ (line 34) | def __init__(self, rots=None, v=None, cp=None, n=None, sa=None, offset...
method __init__ (line 110) | def __init__(self, rots=None, v=None, cp=None, n=None, sa=None, offset...
class xrot_copies (line 113) | class xrot_copies(_Bosl2Base):
method __init__ (line 38) | def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None...
method __init__ (line 114) | def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None...
class yrot_copies (line 117) | class yrot_copies(_Bosl2Base):
method __init__ (line 42) | def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None...
method __init__ (line 118) | def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None...
class zrot_copies (line 121) | class zrot_copies(_Bosl2Base):
method __init__ (line 46) | def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None...
method __init__ (line 122) | def __init__(self, rots=None, cp=None, n=None, sa=None, r=None, d=None...
class arc_of (line 125) | class arc_of(_Bosl2Base):
method __init__ (line 126) | def __init__(self, n=None, r=None, rx=None, ry=None, d=None, dx=None, ...
class arc_copies (line 129) | class arc_copies(_Bosl2Base):
method __init__ (line 50) | def __init__(self, n=None, r=None, rx=None, ry=None, d=None, dx=None, ...
method __init__ (line 130) | def __init__(self, n=None, r=None, rx=None, ry=None, d=None, dx=None, ...
class ovoid_spread (line 133) | class ovoid_spread(_Bosl2Base):
method __init__ (line 134) | def __init__(self, n=None, r=None, d=None, cone_ang=None, scale=None, ...
class sphere_copies (line 137) | class sphere_copies(_Bosl2Base):
method __init__ (line 54) | def __init__(self, n=None, r=None, d=None, cone_ang=None, scale=None, ...
method __init__ (line 138) | def __init__(self, n=None, r=None, d=None, cone_ang=None, scale=None, ...
class path_spread (line 141) | class path_spread(_Bosl2Base):
method __init__ (line 142) | def __init__(self, path=None, n=None, spacing=None, sp=None, rotate_ch...
class path_copies (line 145) | class path_copies(_Bosl2Base):
method __init__ (line 58) | def __init__(self, path=None, n=None, spacing=None, sp=None, dist=None...
method __init__ (line 146) | def __init__(self, path=None, n=None, spacing=None, sp=None, dist=None...
class xflip_copy (line 149) | class xflip_copy(_Bosl2Base):
method __init__ (line 62) | def __init__(self, offset=None, x=None, p=None, **kwargs):
method __init__ (line 150) | def __init__(self, offset=None, x=None, **kwargs):
class yflip_copy (line 153) | class yflip_copy(_Bosl2Base):
method __init__ (line 66) | def __init__(self, offset=None, y=None, p=None, **kwargs):
method __init__ (line 154) | def __init__(self, offset=None, y=None, **kwargs):
class zflip_copy (line 157) | class zflip_copy(_Bosl2Base):
method __init__ (line 70) | def __init__(self, offset=None, z=None, p=None, **kwargs):
method __init__ (line 158) | def __init__(self, offset=None, z=None, **kwargs):
class mirror_copy (line 161) | class mirror_copy(_Bosl2Base):
method __init__ (line 74) | def __init__(self, v=None, offset=None, cp=None, p=None, **kwargs):
method __init__ (line 162) | def __init__(self, v=None, offset=None, cp=None, **kwargs):
class xdistribute (line 165) | class xdistribute(_Bosl2Base):
method __init__ (line 166) | def __init__(self, spacing=None, sizes=None, l=None, **kwargs):
class ydistribute (line 169) | class ydistribute(_Bosl2Base):
method __init__ (line 170) | def __init__(self, spacing=None, sizes=None, l=None, **kwargs):
class zdistribute (line 173) | class zdistribute(_Bosl2Base):
method __init__ (line 174) | def __init__(self, spacing=None, sizes=None, l=None, **kwargs):
class distribute (line 177) | class distribute(_Bosl2Base):
method __init__ (line 178) | def __init__(self, spacing=None, sizes=None, dir=None, l=None, **kwargs):
FILE: solid2/extensions/bosl2/drawing.py
class stroke (line 9) | class stroke(_Bosl2Base):
method __init__ (line 10) | def __init__(self, path=None, width=None, closed=None, endcaps=None, e...
method __init__ (line 58) | def __init__(self, path=None, width=None, closed=None, endcaps=None, e...
class dashed_stroke (line 13) | class dashed_stroke(_Bosl2Base):
method __init__ (line 14) | def __init__(self, path=None, dashpat=None, closed=None, fit=None, min...
method __init__ (line 62) | def __init__(self, path=None, dashpat=None, width=None, closed=None, f...
class arc (line 17) | class arc(_Bosl2Base):
method __init__ (line 18) | def __init__(self, n=None, r=None, angle=None, d=None, cp=None, points...
method __init__ (line 66) | def __init__(self, n=None, r=None, angle=None, d=None, cp=None, points...
class _rounded_arc (line 21) | class _rounded_arc(_Bosl2Base):
method __init__ (line 22) | def __init__(self, radius=None, rounding=None, angle=None, n=None, **k...
class catenary (line 25) | class catenary(_Bosl2Base):
method __init__ (line 26) | def __init__(self, width=None, droop=None, n=None, angle=None, **kwargs):
method __init__ (line 70) | def __init__(self, width=None, droop=None, n=None, angle=None, anchor=...
class helix (line 29) | class helix(_Bosl2Base):
method __init__ (line 30) | def __init__(self, l=None, h=None, turns=None, angle=None, r=None, r1=...
method __init__ (line 74) | def __init__(self, l=None, h=None, turns=None, angle=None, r=None, r1=...
class _normal_segment (line 33) | class _normal_segment(_Bosl2Base):
method __init__ (line 34) | def __init__(self, p1=None, p2=None, **kwargs):
class turtle (line 37) | class turtle(_Bosl2Base):
method __init__ (line 38) | def __init__(self, commands=None, state=None, full_state=None, repeat=...
method __init__ (line 78) | def __init__(self, commands=None, state=None, full_state=None, repeat=...
class _turtle_repeat (line 41) | class _turtle_repeat(_Bosl2Base):
method __init__ (line 42) | def __init__(self, commands=None, state=None, full_state=None, repeat=...
class _turtle_command_len (line 45) | class _turtle_command_len(_Bosl2Base):
method __init__ (line 46) | def __init__(self, commands=None, index=None, **kwargs):
class _turtle (line 49) | class _turtle(_Bosl2Base):
method __init__ (line 50) | def __init__(self, commands=None, state=None, full_state=None, index=N...
class _turtle_command (line 53) | class _turtle_command(_Bosl2Base):
method __init__ (line 54) | def __init__(self, command=None, parm=None, parm2=None, state=None, in...
class stroke (line 57) | class stroke(_Bosl2Base):
method __init__ (line 10) | def __init__(self, path=None, width=None, closed=None, endcaps=None, e...
method __init__ (line 58) | def __init__(self, path=None, width=None, closed=None, endcaps=None, e...
class dashed_stroke (line 61) | class dashed_stroke(_Bosl2Base):
method __init__ (line 14) | def __init__(self, path=None, dashpat=None, closed=None, fit=None, min...
method __init__ (line 62) | def __init__(self, path=None, dashpat=None, width=None, closed=None, f...
class arc (line 65) | class arc(_Bosl2Base):
method __init__ (line 18) | def __init__(self, n=None, r=None, angle=None, d=None, cp=None, points...
method __init__ (line 66) | def __init__(self, n=None, r=None, angle=None, d=None, cp=None, points...
class catenary (line 69) | class catenary(_Bosl2Base):
method __init__ (line 26) | def __init__(self, width=None, droop=None, n=None, angle=None, **kwargs):
method __init__ (line 70) | def __init__(self, width=None, droop=None, n=None, angle=None, anchor=...
class helix (line 73) | class helix(_Bosl2Base):
method __init__ (line 30) | def __init__(self, l=None, h=None, turns=None, angle=None, r=None, r1=...
method __init__ (line 74) | def __init__(self, l=None, h=None, turns=None, angle=None, r=None, r1=...
class turtle (line 77) | class turtle(_Bosl2Base):
method __init__ (line 38) | def __init__(self, commands=None, state=None, full_state=None, repeat=...
method __init__ (line 78) | def __init__(self, commands=None, state=None, full_state=None, repeat=...
class debug_polygon (line 81) | class debug_polygon(_Bosl2Base):
method __init__ (line 82) | def __init__(self, points=None, paths=None, vertices=None, edges=None,...
class _debug_poly_verts (line 85) | class _debug_poly_verts(_Bosl2Base):
method __init__ (line 86) | def __init__(self, points=None, size=None, **kwargs):
class _debug_poly_edges (line 89) | class _debug_poly_edges(_Bosl2Base):
method __init__ (line 90) | def __init__(self, j=None, points=None, path=None, vertices=None, size...
FILE: solid2/extensions/bosl2/fnliterals.py
class map (line 9) | class map(_Bosl2Base):
method __init__ (line 10) | def __init__(self, func=None, list=None, **kwargs):
class filter (line 13) | class filter(_Bosl2Base):
method __init__ (line 14) | def __init__(self, func=None, list=None, **kwargs):
class reduce (line 17) | class reduce(_Bosl2Base):
method __init__ (line 18) | def __init__(self, func=None, list=None, init=None, **kwargs):
class accumulate (line 21) | class accumulate(_Bosl2Base):
method __init__ (line 22) | def __init__(self, func=None, list=None, init=None, **kwargs):
class _while (line 25) | class _while(_Bosl2Base):
method __init__ (line 26) | def __init__(self, init=None, cond=None, func=None, **kwargs):
class for_n (line 29) | class for_n(_Bosl2Base):
method __init__ (line 30) | def __init__(self, n=None, init=None, func=None, **kwargs):
class find_all (line 33) | class find_all(_Bosl2Base):
method __init__ (line 34) | def __init__(self, func=None, list=None, **kwargs):
class find_first (line 37) | class find_first(_Bosl2Base):
method __init__ (line 38) | def __init__(self, func=None, list=None, start=None, **kwargs):
class binsearch (line 41) | class binsearch(_Bosl2Base):
method __init__ (line 42) | def __init__(self, key=None, list=None, idx=None, cmp=None, **kwargs):
class simple_hash (line 45) | class simple_hash(_Bosl2Base):
method __init__ (line 46) | def __init__(self, x=None, **kwargs):
class hashmap (line 49) | class hashmap(_Bosl2Base):
method __init__ (line 50) | def __init__(self, hashsize=None, items=None, table=None, **kwargs):
class f_1arg (line 53) | class f_1arg(_Bosl2Base):
method __init__ (line 54) | def __init__(self, target_func=None, **kwargs):
class f_2arg (line 57) | class f_2arg(_Bosl2Base):
method __init__ (line 58) | def __init__(self, target_func=None, **kwargs):
class f_2arg_simple (line 61) | class f_2arg_simple(_Bosl2Base):
method __init__ (line 62) | def __init__(self, target_func=None, **kwargs):
class f_3arg (line 65) | class f_3arg(_Bosl2Base):
method __init__ (line 66) | def __init__(self, target_func=None, **kwargs):
class ival (line 69) | class ival(_Bosl2Base):
method __init__ (line 70) | def __init__(self, target_func=None, **kwargs):
class xval (line 73) | class xval(_Bosl2Base):
method __init__ (line 74) | def __init__(self, target_func=None, **kwargs):
class f_cmp (line 77) | class f_cmp(_Bosl2Base):
method __init__ (line 78) | def __init__(self, a=None, b=None, **kwargs):
class f_gt (line 81) | class f_gt(_Bosl2Base):
method __init__ (line 82) | def __init__(self, a=None, b=None, **kwargs):
class f_lt (line 85) | class f_lt(_Bosl2Base):
method __init__ (line 86) | def __init__(self, a=None, b=None, **kwargs):
class f_gte (line 89) | class f_gte(_Bosl2Base):
method __init__ (line 90) | def __init__(self, a=None, b=None, **kwargs):
class f_lte (line 93) | class f_lte(_Bosl2Base):
method __init__ (line 94) | def __init__(self, a=None, b=None, **kwargs):
class f_eq (line 97) | class f_eq(_Bosl2Base):
method __init__ (line 98) | def __init__(self, a=None, b=None, **kwargs):
class f_neq (line 101) | class f_neq(_Bosl2Base):
method __init__ (line 102) | def __init__(self, a=None, b=None, **kwargs):
class f_approx (line 105) | class f_approx(_Bosl2Base):
method __init__ (line 106) | def __init__(self, a=None, b=None, **kwargs):
class f_napprox (line 109) | class f_napprox(_Bosl2Base):
method __init__ (line 110) | def __init__(self, a=None, b=None, **kwargs):
class f_or (line 113) | class f_or(_Bosl2Base):
method __init__ (line 114) | def __init__(self, a=None, b=None, **kwargs):
class f_and (line 117) | class f_and(_Bosl2Base):
method __init__ (line 118) | def __init__(self, a=None, b=None, **kwargs):
class f_nor (line 121) | class f_nor(_Bosl2Base):
method __init__ (line 122) | def __init__(self, a=None, b=None, **kwargs):
class f_nand (line 125) | class f_nand(_Bosl2Base):
method __init__ (line 126) | def __init__(self, a=None, b=None, **kwargs):
class f_xor (line 129) | class f_xor(_Bosl2Base):
method __init__ (line 130) | def __init__(self, a=None, b=None, **kwargs):
class f_not (line 133) | class f_not(_Bosl2Base):
method __init__ (line 134) | def __init__(self, a=None, **kwargs):
class f_even (line 137) | class f_even(_Bosl2Base):
method __init__ (line 138) | def __init__(self, a=None, **kwargs):
class f_odd (line 141) | class f_odd(_Bosl2Base):
method __init__ (line 142) | def __init__(self, a=None, **kwargs):
class f_add (line 145) | class f_add(_Bosl2Base):
method __init__ (line 146) | def __init__(self, a=None, b=None, **kwargs):
class f_sub (line 149) | class f_sub(_Bosl2Base):
method __init__ (line 150) | def __init__(self, a=None, b=None, **kwargs):
class f_mul (line 153) | class f_mul(_Bosl2Base):
method __init__ (line 154) | def __init__(self, a=None, b=None, **kwargs):
class f_div (line 157) | class f_div(_Bosl2Base):
method __init__ (line 158) | def __init__(self, a=None, b=None, **kwargs):
class f_mod (line 161) | class f_mod(_Bosl2Base):
method __init__ (line 162) | def __init__(self, a=None, b=None, **kwargs):
class f_pow (line 165) | class f_pow(_Bosl2Base):
method __init__ (line 166) | def __init__(self, a=None, b=None, **kwargs):
class f_neg (line 169) | class f_neg(_Bosl2Base):
method __init__ (line 170) | def __init__(self, a=None, **kwargs):
class f_min (line 173) | class f_min(_Bosl2Base):
method __init__ (line 174) | def __init__(self, a=None, **kwargs):
class f_max (line 177) | class f_max(_Bosl2Base):
method __init__ (line 178) | def __init__(self, a=None, **kwargs):
class f_min2 (line 181) | class f_min2(_Bosl2Base):
method __init__ (line 182) | def __init__(self, a=None, b=None, **kwargs):
class f_max2 (line 185) | class f_max2(_Bosl2Base):
method __init__ (line 186) | def __init__(self, a=None, b=None, **kwargs):
class f_min3 (line 189) | class f_min3(_Bosl2Base):
method __init__ (line 190) | def __init__(self, a=None, b=None, c=None, **kwargs):
class f_max3 (line 193) | class f_max3(_Bosl2Base):
method __init__ (line 194) | def __init__(self, a=None, b=None, c=None, **kwargs):
class f_sin (line 197) | class f_sin(_Bosl2Base):
method __init__ (line 198) | def __init__(self, a=None, **kwargs):
class f_cos (line 201) | class f_cos(_Bosl2Base):
method __init__ (line 202) | def __init__(self, a=None, **kwargs):
class f_tan (line 205) | class f_tan(_Bosl2Base):
method __init__ (line 206) | def __init__(self, a=None, **kwargs):
class f_asin (line 209) | class f_asin(_Bosl2Base):
method __init__ (line 210) | def __init__(self, a=None, **kwargs):
class f_acos (line 213) | class f_acos(_Bosl2Base):
method __init__ (line 214) | def __init__(self, a=None, **kwargs):
class f_atan (line 217) | class f_atan(_Bosl2Base):
method __init__ (line 218) | def __init__(self, a=None, **kwargs):
class f_atan2 (line 221) | class f_atan2(_Bosl2Base):
method __init__ (line 222) | def __init__(self, a=None, b=None, **kwargs):
class f_len (line 225) | class f_len(_Bosl2Base):
method __init__ (line 226) | def __init__(self, a=None, **kwargs):
class f_chr (line 229) | class f_chr(_Bosl2Base):
method __init__ (line 230) | def __init__(self, a=None, **kwargs):
class f_ord (line 233) | class f_ord(_Bosl2Base):
method __init__ (line 234) | def __init__(self, a=None, **kwargs):
class f_str (line 237) | class f_str(_Bosl2Base):
method __init__ (line 238) | def __init__(self, a=None, **kwargs):
class f_str2 (line 241) | class f_str2(_Bosl2Base):
method __init__ (line 242) | def __init__(self, a=None, b=None, **kwargs):
class f_str3 (line 245) | class f_str3(_Bosl2Base):
method __init__ (line 246) | def __init__(self, a=None, b=None, c=None, **kwargs):
class f_floor (line 249) | class f_floor(_Bosl2Base):
method __init__ (line 250) | def __init__(self, a=None, **kwargs):
class f_round (line 253) | class f_round(_Bosl2Base):
method __init__ (line 254) | def __init__(self, a=None, **kwargs):
class f_ceil (line 257) | class f_ceil(_Bosl2Base):
method __init__ (line 258) | def __init__(self, a=None, **kwargs):
class f_abs (line 261) | class f_abs(_Bosl2Base):
method __init__ (line 262) | def __init__(self, a=None, **kwargs):
class f_sign (line 265) | class f_sign(_Bosl2Base):
method __init__ (line 266) | def __init__(self, a=None, **kwargs):
class f_ln (line 269) | class f_ln(_Bosl2Base):
method __init__ (line 270) | def __init__(self, a=None, **kwargs):
class f_log (line 273) | class f_log(_Bosl2Base):
method __init__ (line 274) | def __init__(self, a=None, **kwargs):
class f_exp (line 277) | class f_exp(_Bosl2Base):
method __init__ (line 278) | def __init__(self, a=None, **kwargs):
class f_sqr (line 281) | class f_sqr(_Bosl2Base):
method __init__ (line 282) | def __init__(self, a=None, **kwargs):
class f_sqrt (line 285) | class f_sqrt(_Bosl2Base):
method __init__ (line 286) | def __init__(self, a=None, **kwargs):
class f_norm (line 289) | class f_norm(_Bosl2Base):
method __init__ (line 290) | def __init__(self, a=None, **kwargs):
class f_cross (line 293) | class f_cross(_Bosl2Base):
method __init__ (line 294) | def __init__(self, a=None, b=None, **kwargs):
class f_is_def (line 297) | class f_is_def(_Bosl2Base):
method __init__ (line 298) | def __init__(self, a=None, **kwargs):
class f_is_undef (line 301) | class f_is_undef(_Bosl2Base):
method __init__ (line 302) | def __init__(self, a=None, **kwargs):
class f_is_bool (line 305) | class f_is_bool(_Bosl2Base):
method __init__ (line 306) | def __init__(self, a=None, **kwargs):
class f_is_num (line 309) | class f_is_num(_Bosl2Base):
method __init__ (line 310) | def __init__(self, a=None, **kwargs):
class f_is_int (line 313) | class f_is_int(_Bosl2Base):
method __init__ (line 314) | def __init__(self, a=None, **kwargs):
class f_is_nan (line 317) | class f_is_nan(_Bosl2Base):
method __init__ (line 318) | def __init__(self, a=None, **kwargs):
class f_is_finite (line 321) | class f_is_finite(_Bosl2Base):
method __init__ (line 322) | def __init__(self, a=None, **kwargs):
class f_is_string (line 325) | class f_is_string(_Bosl2Base):
method __init__ (line 326) | def __init__(self, a=None, **kwargs):
class f_is_list (line 329) | class f_is_list(_Bosl2Base):
method __init__ (line 330) | def __init__(self, a=None, **kwargs):
class f_is_range (line 333) | class f_is_range(_Bosl2Base):
method __init__ (line 334) | def __init__(self, a=None, **kwargs):
class f_is_function (line 337) | class f_is_function(_Bosl2Base):
method __init__ (line 338) | def __init__(self, a=None, **kwargs):
class f_is_vector (line 341) | class f_is_vector(_Bosl2Base):
method __init__ (line 342) | def __init__(self, a=None, b=None, **kwargs):
class f_is_path (line 345) | class f_is_path(_Bosl2Base):
method __init__ (line 346) | def __init__(self, a=None, b=None, **kwargs):
class f_is_region (line 349) | class f_is_region(_Bosl2Base):
method __init__ (line 350) | def __init__(self, a=None, **kwargs):
class f_is_vnf (line 353) | class f_is_vnf(_Bosl2Base):
method __init__ (line 354) | def __init__(self, a=None, **kwargs):
class f_is_patch (line 357) | class f_is_patch(_Bosl2Base):
method __init__ (line 358) | def __init__(self, a=None, **kwargs):
FILE: solid2/extensions/bosl2/gears.py
class _inherit_gear_param (line 21) | class _inherit_gear_param(_Bosl2Base):
method __init__ (line 22) | def __init__(self, name=None, val=None, pval=None, dflt=None, invert=N...
class _inherit_gear_pitch (line 25) | class _inherit_gear_pitch(_Bosl2Base):
method __init__ (line 26) | def __init__(self, fname=None, pitch=None, circ_pitch=None, diam_pitch...
class _inherit_gear_pa (line 29) | class _inherit_gear_pa(_Bosl2Base):
method __init__ (line 30) | def __init__(self, pressure_angle=None, **kwargs):
class _inherit_gear_helical (line 33) | class _inherit_gear_helical(_Bosl2Base):
method __init__ (line 34) | def __init__(self, helical=None, invert=None, **kwargs):
class _inherit_gear_thickness (line 37) | class _inherit_gear_thickness(_Bosl2Base):
method __init__ (line 38) | def __init__(self, thickness=None, dflt=None, **kwargs):
class spur_gear (line 41) | class spur_gear(_Bosl2Base):
method __init__ (line 42) | def __init__(self, circ_pitch=None, teeth=None, thickness=None, shaft_...
method __init__ (line 178) | def __init__(self, circ_pitch=None, teeth=None, thickness=None, shaft_...
class spur_gear2d (line 45) | class spur_gear2d(_Bosl2Base):
method __init__ (line 46) | def __init__(self, circ_pitch=None, teeth=None, hide=None, pressure_an...
method __init__ (line 182) | def __init__(self, circ_pitch=None, teeth=None, hide=None, pressure_an...
class rack (line 49) | class rack(_Bosl2Base):
method __init__ (line 50) | def __init__(self, pitch=None, teeth=None, thickness=None, backing=Non...
method __init__ (line 194) | def __init__(self, pitch=None, teeth=None, thickness=None, backing=Non...
class rack2d (line 53) | class rack2d(_Bosl2Base):
method __init__ (line 54) | def __init__(self, pitch=None, teeth=None, backing=None, pressure_angl...
method __init__ (line 198) | def __init__(self, pitch=None, teeth=None, backing=None, width=None, b...
class crown_gear (line 57) | class crown_gear(_Bosl2Base):
method __init__ (line 58) | def __init__(self, circ_pitch=None, teeth=None, backing=None, face_wid...
method __init__ (line 202) | def __init__(self, circ_pitch=None, teeth=None, backing=None, face_wid...
class bevel_gear (line 61) | class bevel_gear(_Bosl2Base):
method __init__ (line 62) | def __init__(self, teeth=None, mate_teeth=None, shaft_angle=None, back...
method __init__ (line 206) | def __init__(self, teeth=None, mate_teeth=None, shaft_angle=None, bott...
class worm (line 65) | class worm(_Bosl2Base):
method __init__ (line 66) | def __init__(self, circ_pitch=None, d=None, l=None, starts=None, left_...
method __init__ (line 210) | def __init__(self, circ_pitch=None, d=None, l=None, starts=None, left_...
class enveloping_worm (line 69) | class enveloping_worm(_Bosl2Base):
method __init__ (line 70) | def __init__(self, circ_pitch=None, mate_teeth=None, d=None, left_hand...
method __init__ (line 214) | def __init__(self, circ_pitch=None, mate_teeth=None, d=None, left_hand...
class worm_gear (line 73) | class worm_gear(_Bosl2Base):
method __init__ (line 74) | def __init__(self, circ_pitch=None, teeth=None, worm_diam=None, worm_s...
method __init__ (line 218) | def __init__(self, circ_pitch=None, teeth=None, worm_diam=None, worm_s...
class _gear_tooth_profile (line 77) | class _gear_tooth_profile(_Bosl2Base):
method __init__ (line 78) | def __init__(self, circ_pitch=None, teeth=None, pressure_angle=None, c...
class planetary_gears (line 81) | class planetary_gears(_Bosl2Base):
method __init__ (line 82) | def __init__(self, n=None, max_teeth=None, helical=None, circ_pitch=No...
class circular_pitch (line 85) | class circular_pitch(_Bosl2Base):
method __init__ (line 86) | def __init__(self, circ_pitch=None, mod=None, pitch=None, diam_pitch=N...
class diametral_pitch (line 89) | class diametral_pitch(_Bosl2Base):
method __init__ (line 90) | def __init__(self, circ_pitch=None, mod=None, pitch=None, diam_pitch=N...
class module_value (line 93) | class module_value(_Bosl2Base):
method __init__ (line 94) | def __init__(self, circ_pitch=None, mod=None, pitch=None, diam_pitch=N...
class _adendum (line 97) | class _adendum(_Bosl2Base):
method __init__ (line 98) | def __init__(self, circ_pitch=None, profile_shift=None, shorten=None, ...
class _dedendum (line 101) | class _dedendum(_Bosl2Base):
method __init__ (line 102) | def __init__(self, circ_pitch=None, clearance=None, profile_shift=None...
class pitch_radius (line 105) | class pitch_radius(_Bosl2Base):
method __init__ (line 106) | def __init__(self, circ_pitch=None, teeth=None, helical=None, mod=None...
class outer_radius (line 109) | class outer_radius(_Bosl2Base):
method __init__ (line 110) | def __init__(self, circ_pitch=None, teeth=None, clearance=None, intern...
class root_radius (line 113) | class root_radius(_Bosl2Base):
method __init__ (line 114) | def __init__(self, teeth=None, helical=None, clearance=None, internal=...
class _root_radius_basic (line 117) | class _root_radius_basic(_Bosl2Base):
method __init__ (line 118) | def __init__(self, circ_pitch=None, teeth=None, clearance=None, intern...
class _base_radius (line 121) | class _base_radius(_Bosl2Base):
method __init__ (line 122) | def __init__(self, circ_pitch=None, teeth=None, pressure_angle=None, h...
class bevel_pitch_angle (line 125) | class bevel_pitch_angle(_Bosl2Base):
method __init__ (line 126) | def __init__(self, teeth=None, mate_teeth=None, drive_angle=None, **kw...
class worm_gear_thickness (line 129) | class worm_gear_thickness(_Bosl2Base):
method __init__ (line 130) | def __init__(self, circ_pitch=None, teeth=None, worm_diam=None, worm_a...
class worm_dist (line 133) | class worm_dist(_Bosl2Base):
method __init__ (line 134) | def __init__(self, d=None, starts=None, teeth=None, mod=None, profile_...
class gear_dist (line 137) | class gear_dist(_Bosl2Base):
method __init__ (line 138) | def __init__(self, teeth1=None, teeth2=None, helical=None, profile_shi...
class _invol (line 141) | class _invol(_Bosl2Base):
method __init__ (line 142) | def __init__(self, a=None, **kwargs):
class _working_pressure_angle (line 145) | class _working_pressure_angle(_Bosl2Base):
method __init__ (line 146) | def __init__(self, teeth1=None, profile_shift1=None, teeth2=None, prof...
class gear_dist_skew (line 149) | class gear_dist_skew(_Bosl2Base):
method __init__ (line 150) | def __init__(self, teeth1=None, teeth2=None, helical1=None, helical2=N...
class _working_normal_pressure_angle_skew (line 153) | class _working_normal_pressure_angle_skew(_Bosl2Base):
method __init__ (line 154) | def __init__(self, teeth1=None, profile_shift1=None, helical1=None, te...
class gear_skew_angle (line 157) | class gear_skew_angle(_Bosl2Base):
method __init__ (line 158) | def __init__(self, teeth1=None, teeth2=None, helical1=None, helical2=N...
class get_profile_shift (line 161) | class get_profile_shift(_Bosl2Base):
method __init__ (line 162) | def __init__(self, desired=None, teeth1=None, teeth2=None, helical=Non...
class auto_profile_shift (line 165) | class auto_profile_shift(_Bosl2Base):
method __init__ (line 166) | def __init__(self, teeth=None, pressure_angle=None, helical=None, min_...
class gear_shorten (line 169) | class gear_shorten(_Bosl2Base):
method __init__ (line 170) | def __init__(self, teeth1=None, teeth2=None, helical=None, profile_shi...
class gear_shorten_skew (line 173) | class gear_shorten_skew(_Bosl2Base):
method __init__ (line 174) | def __init__(self, teeth1=None, teeth2=None, helical1=None, helical2=N...
class spur_gear (line 177) | class spur_gear(_Bosl2Base):
method __init__ (line 42) | def __init__(self, circ_pitch=None, teeth=None, thickness=None, shaft_...
method __init__ (line 178) | def __init__(self, circ_pitch=None, teeth=None, thickness=None, shaft_...
class spur_gear2d (line 181) | class spur_gear2d(_Bosl2Base):
method __init__ (line 46) | def __init__(self, circ_pitch=None, teeth=None, hide=None, pressure_an...
method __init__ (line 182) | def __init__(self, circ_pitch=None, teeth=None, hide=None, pressure_an...
class ring_gear (line 185) | class ring_gear(_Bosl2Base):
method __init__ (line 186) | def __init__(self, circ_pitch=None, teeth=None, thickness=None, backin...
class ring_gear2d (line 189) | class ring_gear2d(_Bosl2Base):
method __init__ (line 190) | def __init__(self, circ_pitch=None, teeth=None, backing=None, pressure...
class rack (line 193) | class rack(_Bosl2Base):
method __init__ (line 50) | def __init__(self, pitch=None, teeth=None, thickness=None, backing=Non...
method __init__ (line 194) | def __init__(self, pitch=None, teeth=None, thickness=None, backing=Non...
class rack2d (line 197) | class rack2d(_Bosl2Base):
method __init__ (line 54) | def __init__(self, pitch=None, teeth=None, backing=None, pressure_angl...
method __init__ (line 198) | def __init__(self, pitch=None, teeth=None, backing=None, width=None, b...
class crown_gear (line 201) | class crown_gear(_Bosl2Base):
method __init__ (line 58) | def __init__(self, circ_pitch=None, teeth=None, backing=None, face_wid...
method __init__ (line 202) | def __init__(self, circ_pitch=None, teeth=None, backing=None, face_wid...
class bevel_gear (line 205) | class bevel_gear(_Bosl2Base):
method __init__ (line 62) | def __init__(self, teeth=None, mate_teeth=None, shaft_angle=None, back...
method __init__ (line 206) | def __init__(self, teeth=None, mate_teeth=None, shaft_angle=None, bott...
class worm (line 209) | class worm(_Bosl2Base):
method __init__ (line 66) | def __init__(self, circ_pitch=None, d=None, l=None, starts=None, left_...
method __init__ (line 210) | def __init__(self, circ_pitch=None, d=None, l=None, starts=None, left_...
class enveloping_worm (line 213) | class enveloping_worm(_Bosl2Base):
method __init__ (line 70) | def __init__(self, circ_pitch=None, mate_teeth=None, d=None, left_hand...
method __init__ (line 214) | def __init__(self, circ_pitch=None, mate_teeth=None, d=None, left_hand...
class worm_gear (line 217) | class worm_gear(_Bosl2Base):
method __init__ (line 74) | def __init__(self, circ_pitch=None, teeth=None, worm_diam=None, worm_s...
method __init__ (line 218) | def __init__(self, circ_pitch=None, teeth=None, worm_diam=None, worm_s...
class _show_gear_tooth_profile (line 221) | class _show_gear_tooth_profile(_Bosl2Base):
method __init__ (line 222) | def __init__(self, circ_pitch=None, teeth=None, pressure_angle=None, p...
FILE: solid2/extensions/bosl2/geometry.py
class is_point_on_line (line 9) | class is_point_on_line(_Bosl2Base):
method __init__ (line 10) | def __init__(self, point=None, line=None, bounded=None, eps=None, **kw...
class _is_point_on_line (line 13) | class _is_point_on_line(_Bosl2Base):
method __init__ (line 14) | def __init__(self, point=None, line=None, bounded=None, eps=None, **kw...
class _dist2line (line 17) | class _dist2line(_Bosl2Base):
method __init__ (line 18) | def __init__(self, d=None, n=None, **kwargs):
class _valid_line (line 21) | class _valid_line(_Bosl2Base):
method __init__ (line 22) | def __init__(self, line=None, dim=None, eps=None, **kwargs):
class _valid_plane (line 25) | class _valid_plane(_Bosl2Base):
method __init__ (line 26) | def __init__(self, p=None, eps=None, **kwargs):
class _is_at_left (line 29) | class _is_at_left(_Bosl2Base):
method __init__ (line 30) | def __init__(self, pt=None, line=None, eps=None, **kwargs):
class _degenerate_tri (line 33) | class _degenerate_tri(_Bosl2Base):
method __init__ (line 34) | def __init__(self, tri=None, eps=None, **kwargs):
class _tri_class (line 37) | class _tri_class(_Bosl2Base):
method __init__ (line 38) | def __init__(self, tri=None, eps=None, **kwargs):
class _pt_in_tri (line 41) | class _pt_in_tri(_Bosl2Base):
method __init__ (line 42) | def __init__(self, point=None, tri=None, eps=None, **kwargs):
class _point_left_of_line2d (line 45) | class _point_left_of_line2d(_Bosl2Base):
method __init__ (line 46) | def __init__(self, point=None, line=None, eps=None, **kwargs):
class is_collinear (line 49) | class is_collinear(_Bosl2Base):
method __init__ (line 50) | def __init__(self, a=None, b=None, c=None, eps=None, **kwargs):
class point_line_distance (line 53) | class point_line_distance(_Bosl2Base):
method __init__ (line 54) | def __init__(self, pt=None, line=None, bounded=None, **kwargs):
class segment_distance (line 57) | class segment_distance(_Bosl2Base):
method __init__ (line 58) | def __init__(self, seg1=None, seg2=None, eps=None, **kwargs):
class line_normal (line 61) | class line_normal(_Bosl2Base):
method __init__ (line 62) | def __init__(self, p1=None, p2=None, **kwargs):
class _general_line_intersection (line 65) | class _general_line_intersection(_Bosl2Base):
method __init__ (line 66) | def __init__(self, s1=None, s2=None, eps=None, **kwargs):
class line_intersection (line 69) | class line_intersection(_Bosl2Base):
method __init__ (line 70) | def __init__(self, line1=None, line2=None, bounded1=None, bounded2=Non...
class line_closest_point (line 73) | class line_closest_point(_Bosl2Base):
method __init__ (line 74) | def __init__(self, line=None, pt=None, bounded=None, **kwargs):
class _line_greatest_distance (line 77) | class _line_greatest_distance(_Bosl2Base):
method __init__ (line 78) | def __init__(self, points=None, line=None, **kwargs):
class line_from_points (line 81) | class line_from_points(_Bosl2Base):
method __init__ (line 82) | def __init__(self, points=None, check_collinear=None, eps=None, fast=N...
class is_coplanar (line 85) | class is_coplanar(_Bosl2Base):
method __init__ (line 86) | def __init__(self, points=None, eps=None, **kwargs):
class plane3pt (line 89) | class plane3pt(_Bosl2Base):
method __init__ (line 90) | def __init__(self, p1=None, p2=None, p3=None, **kwargs):
class plane3pt_indexed (line 93) | class plane3pt_indexed(_Bosl2Base):
method __init__ (line 94) | def __init__(self, points=None, i1=None, i2=None, i3=None, **kwargs):
class plane_from_normal (line 97) | class plane_from_normal(_Bosl2Base):
method __init__ (line 98) | def __init__(self, normal=None, pt=None, **kwargs):
class _eigenvals_symm_3 (line 101) | class _eigenvals_symm_3(_Bosl2Base):
method __init__ (line 102) | def __init__(self, M=None, **kwargs):
class _eigenvec_symm_3 (line 105) | class _eigenvec_symm_3(_Bosl2Base):
method __init__ (line 106) | def __init__(self, M=None, evals=None, i=None, **kwargs):
class _covariance_evec_eval (line 109) | class _covariance_evec_eval(_Bosl2Base):
method __init__ (line 110) | def __init__(self, points=None, eigenvalue_id=None, **kwargs):
class plane_from_points (line 113) | class plane_from_points(_Bosl2Base):
method __init__ (line 114) | def __init__(self, points=None, check_coplanar=None, eps=None, fast=No...
class plane_from_polygon (line 117) | class plane_from_polygon(_Bosl2Base):
method __init__ (line 118) | def __init__(self, poly=None, check_coplanar=None, eps=None, fast=None...
class plane_normal (line 121) | class plane_normal(_Bosl2Base):
method __init__ (line 122) | def __init__(self, plane=None, **kwargs):
class plane_offset (line 125) | class plane_offset(_Bosl2Base):
method __init__ (line 126) | def __init__(self, plane=None, **kwargs):
class _general_plane_line_intersection (line 129) | class _general_plane_line_intersection(_Bosl2Base):
method __init__ (line 130) | def __init__(self, plane=None, line=None, eps=None, **kwargs):
class _normalize_plane (line 133) | class _normalize_plane(_Bosl2Base):
method __init__ (line 134) | def __init__(self, plane=None, **kwargs):
class plane_line_intersection (line 137) | class plane_line_intersection(_Bosl2Base):
method __init__ (line 138) | def __init__(self, plane=None, line=None, bounded=None, eps=None, **kw...
class plane_intersection (line 141) | class plane_intersection(_Bosl2Base):
method __init__ (line 142) | def __init__(self, plane1=None, plane2=None, plane3=None, **kwargs):
class plane_line_angle (line 145) | class plane_line_angle(_Bosl2Base):
method __init__ (line 146) | def __init__(self, plane=None, line=None, **kwargs):
class plane_closest_point (line 149) | class plane_closest_point(_Bosl2Base):
method __init__ (line 150) | def __init__(self, plane=None, points=None, **kwargs):
class point_plane_distance (line 153) | class point_plane_distance(_Bosl2Base):
method __init__ (line 154) | def __init__(self, plane=None, point=None, **kwargs):
class _pointlist_greatest_distance (line 157) | class _pointlist_greatest_distance(_Bosl2Base):
method __init__ (line 158) | def __init__(self, points=None, plane=None, **kwargs):
class are_points_on_plane (line 161) | class are_points_on_plane(_Bosl2Base):
method __init__ (line 162) | def __init__(self, points=None, plane=None, eps=None, **kwargs):
class _is_point_above_plane (line 165) | class _is_point_above_plane(_Bosl2Base):
method __init__ (line 166) | def __init__(self, plane=None, point=None, **kwargs):
class circle_line_intersection (line 169) | class circle_line_intersection(_Bosl2Base):
method __init__ (line 170) | def __init__(self, r=None, cp=None, line=None, bounded=None, d=None, e...
class _circle_or_sphere_line_intersection (line 173) | class _circle_or_sphere_line_intersection(_Bosl2Base):
method __init__ (line 174) | def __init__(self, r=None, cp=None, line=None, bounded=None, d=None, e...
class circle_circle_intersection (line 177) | class circle_circle_intersection(_Bosl2Base):
method __init__ (line 178) | def __init__(self, r1=None, cp1=None, r2=None, cp2=None, eps=None, d1=...
class circle_2tangents (line 181) | class circle_2tangents(_Bosl2Base):
method __init__ (line 182) | def __init__(self, r=None, pt1=None, pt2=None, pt3=None, tangents=None...
class circle_3points (line 185) | class circle_3points(_Bosl2Base):
method __init__ (line 186) | def __init__(self, pt1=None, pt2=None, pt3=None, **kwargs):
class circle_point_tangents (line 189) | class circle_point_tangents(_Bosl2Base):
method __init__ (line 190) | def __init__(self, r=None, cp=None, pt=None, d=None, **kwargs):
class circle_circle_tangents (line 193) | class circle_circle_tangents(_Bosl2Base):
method __init__ (line 194) | def __init__(self, r1=None, cp1=None, r2=None, cp2=None, d1=None, d2=N...
class _noncollinear_triple (line 197) | class _noncollinear_triple(_Bosl2Base):
method __init__ (line 198) | def __init__(self, points=None, error=None, eps=None, **kwargs):
class sphere_line_intersection (line 201) | class sphere_line_intersection(_Bosl2Base):
method __init__ (line 202) | def __init__(self, r=None, cp=None, line=None, bounded=None, d=None, e...
class polygon_area (line 205) | class polygon_area(_Bosl2Base):
method __init__ (line 206) | def __init__(self, poly=None, signed=None, **kwargs):
class centroid (line 209) | class centroid(_Bosl2Base):
method __init__ (line 210) | def __init__(self, object=None, eps=None, **kwargs):
class _region_centroid (line 213) | class _region_centroid(_Bosl2Base):
method __init__ (line 214) | def __init__(self, region=None, eps=None, **kwargs):
class _polygon_centroid (line 217) | class _polygon_centroid(_Bosl2Base):
method __init__ (line 218) | def __init__(self, poly=None, eps=None, **kwargs):
class polygon_normal (line 221) | class polygon_normal(_Bosl2Base):
method __init__ (line 222) | def __init__(self, poly=None, **kwargs):
class _point_above_below_segment (line 225) | class _point_above_below_segment(_Bosl2Base):
method __init__ (line 226) | def __init__(self, point=None, edge=None, **kwargs):
class point_in_polygon (line 229) | class point_in_polygon(_Bosl2Base):
method __init__ (line 230) | def __init__(self, point=None, poly=None, nonzero=None, eps=None, **kw...
class polygon_line_intersection (line 233) | class polygon_line_intersection(_Bosl2Base):
method __init__ (line 234) | def __init__(self, poly=None, line=None, bounded=None, nonzero=None, e...
class _merge_segments (line 237) | class _merge_segments(_Bosl2Base):
method __init__ (line 238) | def __init__(self, insegs=None, outsegs=None, eps=None, i=None, **kwar...
class polygon_triangulate (line 241) | class polygon_triangulate(_Bosl2Base):
method __init__ (line 242) | def __init__(self, poly=None, ind=None, error=None, eps=None, **kwargs):
class _triangulate (line 245) | class _triangulate(_Bosl2Base):
method __init__ (line 246) | def __init__(self, poly=None, ind=None, error=None, eps=None, tris=Non...
class _get_ear (line 249) | class _get_ear(_Bosl2Base):
method __init__ (line 250) | def __init__(self, poly=None, ind=None, eps=None, _i=None, **kwargs):
class _none_inside (line 253) | class _none_inside(_Bosl2Base):
method __init__ (line 254) | def __init__(self, idxs=None, poly=None, p0=None, p1=None, p2=None, ep...
class is_polygon_clockwise (line 257) | class is_polygon_clockwise(_Bosl2Base):
method __init__ (line 258) | def __init__(self, poly=None, **kwargs):
class clockwise_polygon (line 261) | class clockwise_polygon(_Bosl2Base):
method __init__ (line 262) | def __init__(self, poly=None, **kwargs):
class ccw_polygon (line 265) | class ccw_polygon(_Bosl2Base):
method __init__ (line 266) | def __init__(self, poly=None, **kwargs):
class reverse_polygon (line 269) | class reverse_polygon(_Bosl2Base):
method __init__ (line 270) | def __init__(self, poly=None, **kwargs):
class reindex_polygon (line 273) | class reindex_polygon(_Bosl2Base):
method __init__ (line 274) | def __init__(self, reference=None, poly=None, return_error=None, **kwa...
class align_polygon (line 277) | class align_polygon(_Bosl2Base):
method __init__ (line 278) | def __init__(self, reference=None, poly=None, angles=None, cp=None, tr...
class are_polygons_equal (line 281) | class are_polygons_equal(_Bosl2Base):
method __init__ (line 282) | def __init__(self, poly1=None, poly2=None, eps=None, **kwargs):
class _are_polygons_equal (line 285) | class _are_polygons_equal(_Bosl2Base):
method __init__ (line 286) | def __init__(self, poly1=None, poly2=None, eps=None, st=None, **kwargs):
class _is_polygon_in_list (line 289) | class _is_polygon_in_list(_Bosl2Base):
method __init__ (line 290) | def __init__(self, poly=None, polys=None, **kwargs):
class ___is_polygon_in_list (line 293) | class ___is_polygon_in_list(_Bosl2Base):
method __init__ (line 294) | def __init__(self, poly=None, polys=None, i=None, **kwargs):
class hull (line 297) | class hull(_Bosl2Base):
method __init__ (line 298) | def __init__(self, points=None, **kwargs):
class _backtracking (line 301) | class _backtracking(_Bosl2Base):
method __init__ (line 302) | def __init__(self, i=None, points=None, h=None, t=None, m=None, all=No...
class _is_cw (line 305) | class _is_cw(_Bosl2Base):
method __init__ (line 306) | def __init__(self, a=None, b=None, c=None, all=None, **kwargs):
class hull2d_path (line 309) | class hull2d_path(_Bosl2Base):
method __init__ (line 310) | def __init__(self, points=None, all=None, **kwargs):
class _hull_collinear (line 313) | class _hull_collinear(_Bosl2Base):
method __init__ (line 314) | def __init__(self, points=None, **kwargs):
class hull3d_faces (line 317) | class hull3d_faces(_Bosl2Base):
method __init__ (line 318) | def __init__(self, points=None, **kwargs):
class _hull3d_iterative (line 321) | class _hull3d_iterative(_Bosl2Base):
method __init__ (line 322) | def __init__(self, points=None, triangles=None, planes=None, remaining...
class _remove_internal_edges (line 325) | class _remove_internal_edges(_Bosl2Base):
method __init__ (line 326) | def __init__(self, halfedges=None, **kwargs):
class _find_first_noncoplanar (line 329) | class _find_first_noncoplanar(_Bosl2Base):
method __init__ (line 330) | def __init__(self, plane=None, points=None, i=None, **kwargs):
class is_polygon_convex (line 333) | class is_polygon_convex(_Bosl2Base):
method __init__ (line 334) | def __init__(self, poly=None, eps=None, **kwargs):
class convex_distance (line 337) | class convex_distance(_Bosl2Base):
method __init__ (line 338) | def __init__(self, points1=None, points2=None, eps=None, **kwargs):
class _GJK_distance (line 341) | class _GJK_distance(_Bosl2Base):
method __init__ (line 342) | def __init__(self, points1=None, points2=None, eps=None, lbd=None, d=N...
class convex_collision (line 345) | class convex_collision(_Bosl2Base):
method __init__ (line 346) | def __init__(self, points1=None, points2=None, eps=None, **kwargs):
class _GJK_collide (line 349) | class _GJK_collide(_Bosl2Base):
method __init__ (line 350) | def __init__(self, points1=None, points2=None, d=None, simplex=None, e...
class _closest_simplex (line 353) | class _closest_simplex(_Bosl2Base):
method __init__ (line 354) | def __init__(self, s=None, eps=None, **kwargs):
class _closest_s1 (line 357) | class _closest_s1(_Bosl2Base):
method __init__ (line 358) | def __init__(self, s=None, eps=None, **kwargs):
class _closest_s2 (line 361) | class _closest_s2(_Bosl2Base):
method __init__ (line 362) | def __init__(self, s=None, eps=None, **kwargs):
class _closest_s3 (line 365) | class _closest_s3(_Bosl2Base):
method __init__ (line 366) | def __init__(self, s=None, eps=None, **kwargs):
class _tri_normal (line 369) | class _tri_normal(_Bosl2Base):
method __init__ (line 370) | def __init__(self, tri=None, **kwargs):
class _support_diff (line 373) | class _support_diff(_Bosl2Base):
method __init__ (line 374) | def __init__(self, p1=None, p2=None, d=None, **kwargs):
class rot_decode (line 377) | class rot_decode(_Bosl2Base):
method __init__ (line 378) | def __init__(self, M=None, long=None, **kwargs):
class show_plane (line 381) | class show_plane(_Bosl2Base):
method __init__ (line 382) | def __init__(self, plane=None, size=None, offset=None, **kwargs):
class hull_points (line 385) | class hull_points(_Bosl2Base):
method __init__ (line 386) | def __init__(self, points=None, fast=None, **kwargs):
FILE: solid2/extensions/bosl2/hinges.py
class knuckle_hinge (line 9) | class knuckle_hinge(_Bosl2Base):
method __init__ (line 10) | def __init__(self, length=None, segs=None, offset=None, inner=None, ar...
method __init__ (line 14) | def __init__(self, length=None, segs=None, offset=None, inner=None, ar...
class knuckle_hinge (line 13) | class knuckle_hinge(_Bosl2Base):
method __init__ (line 10) | def __init__(self, length=None, segs=None, offset=None, inner=None, ar...
method __init__ (line 14) | def __init__(self, length=None, segs=None, offset=None, inner=None, ar...
class _knuckle_hinge_profile (line 17) | class _knuckle_hinge_profile(_Bosl2Base):
method __init__ (line 18) | def __init__(self, offset=None, arm_height=None, arm_angle=None, knuck...
class living_hinge_mask (line 21) | class living_hinge_mask(_Bosl2Base):
method __init__ (line 22) | def __init__(self, l=None, thick=None, layerheight=None, foldangle=Non...
class folding_hinge_mask (line 25) | class folding_hinge_mask(_Bosl2Base):
method __init__ (line 26) | def __init__(self, l=None, thick=None, layerheight=None, foldangle=Non...
class apply_folding_hinges_and_snaps (line 29) | class apply_folding_hinges_and_snaps(_Bosl2Base):
method __init__ (line 30) | def __init__(self, thick=None, foldangle=None, hinges=None, snaps=None...
class snap_lock (line 33) | class snap_lock(_Bosl2Base):
method __init__ (line 34) | def __init__(self, thick=None, snaplen=None, snapdiam=None, layerheigh...
class snap_socket (line 37) | class snap_socket(_Bosl2Base):
method __init__ (line 38) | def __init__(self, thick=None, snaplen=None, snapdiam=None, layerheigh...
FILE: solid2/extensions/bosl2/isosurface.py
class _cubeindex (line 21) | class _cubeindex(_Bosl2Base):
method __init__ (line 22) | def __init__(self, f=None, isoval=None, **kwargs):
class _clipfacindex (line 25) | class _clipfacindex(_Bosl2Base):
method __init__ (line 26) | def __init__(self, f=None, isovalmin=None, isovalmax=None, **kwargs):
class _bbox_faces (line 29) | class _bbox_faces(_Bosl2Base):
method __init__ (line 30) | def __init__(self, v0=None, voxsize=None, bbox=None, **kwargs):
class _isosurface_cubes (line 33) | class _isosurface_cubes(_Bosl2Base):
method __init__ (line 34) | def __init__(self, voxsize=None, bbox=None, fieldarray=None, fieldfunc...
class _isosurface_triangles (line 37) | class _isosurface_triangles(_Bosl2Base):
method __init__ (line 38) | def __init__(self, cubelist=None, voxsize=None, isovalmin=None, isoval...
class _clipfacevertices (line 41) | class _clipfacevertices(_Bosl2Base):
method __init__ (line 42) | def __init__(self, vcube=None, fld=None, bbface=None, isovalmin=None, ...
class _mctrindex (line 45) | class _mctrindex(_Bosl2Base):
method __init__ (line 46) | def __init__(self, f=None, isoval=None, **kwargs):
class _bbox_sides (line 49) | class _bbox_sides(_Bosl2Base):
method __init__ (line 50) | def __init__(self, pc=None, pixsize=None, bbox=None, **kwargs):
class _contour_pixels (line 53) | class _contour_pixels(_Bosl2Base):
method __init__ (line 54) | def __init__(self, pixsize=None, bbox=None, fieldarray=None, fieldfunc...
class _contour_vertices (line 57) | class _contour_vertices(_Bosl2Base):
method __init__ (line 58) | def __init__(self, pxlist=None, pxsize=None, isovalmin=None, isovalmax...
class mb_cutoff (line 61) | class mb_cutoff(_Bosl2Base):
method __init__ (line 62) | def __init__(self, dist=None, cutoff=None, **kwargs):
class _mb_sphere_basic (line 65) | class _mb_sphere_basic(_Bosl2Base):
method __init__ (line 66) | def __init__(self, point=None, r=None, neg=None, **kwargs):
class _mb_sphere_influence (line 69) | class _mb_sphere_influence(_Bosl2Base):
method __init__ (line 70) | def __init__(self, point=None, r=None, ex=None, neg=None, **kwargs):
class _mb_sphere_cutoff (line 73) | class _mb_sphere_cutoff(_Bosl2Base):
method __init__ (line 74) | def __init__(self, point=None, r=None, cutoff=None, neg=None, **kwargs):
class _mb_sphere_full (line 77) | class _mb_sphere_full(_Bosl2Base):
method __init__ (line 78) | def __init__(self, point=None, r=None, cutoff=None, ex=None, neg=None,...
class mb_sphere (line 81) | class mb_sphere(_Bosl2Base):
method __init__ (line 82) | def __init__(self, r=None, cutoff=None, influence=None, negative=None,...
class _mb_cuboid_basic (line 85) | class _mb_cuboid_basic(_Bosl2Base):
method __init__ (line 86) | def __init__(self, point=None, inv_size=None, xp=None, neg=None, **kwa...
class _mb_cuboid_influence (line 89) | class _mb_cuboid_influence(_Bosl2Base):
method __init__ (line 90) | def __init__(self, point=None, inv_size=None, xp=None, ex=None, neg=No...
class _mb_cuboid_cutoff (line 93) | class _mb_cuboid_cutoff(_Bosl2Base):
method __init__ (line 94) | def __init__(self, point=None, inv_size=None, xp=None, cutoff=None, ne...
class _mb_cuboid_full (line 97) | class _mb_cuboid_full(_Bosl2Base):
method __init__ (line 98) | def __init__(self, point=None, inv_size=None, xp=None, ex=None, cutoff...
class mb_cuboid (line 101) | class mb_cuboid(_Bosl2Base):
method __init__ (line 102) | def __init__(self, size=None, squareness=None, cutoff=None, influence=...
class _revsurf_basic (line 105) | class _revsurf_basic(_Bosl2Base):
method __init__ (line 106) | def __init__(self, point=None, path=None, coef=None, neg=None, maxdist...
class _revsurf_influence (line 109) | class _revsurf_influence(_Bosl2Base):
method __init__ (line 110) | def __init__(self, point=None, path=None, coef=None, exp=None, neg=Non...
class _revsurf_cutoff (line 113) | class _revsurf_cutoff(_Bosl2Base):
method __init__ (line 114) | def __init__(self, point=None, path=None, coef=None, cutoff=None, neg=...
class _revsurf_full (line 117) | class _revsurf_full(_Bosl2Base):
method __init__ (line 118) | def __init__(self, point=None, path=None, coef=None, cutoff=None, exp=...
class mb_cyl (line 121) | class mb_cyl(_Bosl2Base):
method __init__ (line 122) | def __init__(self, h=None, r=None, rounding=None, r1=None, r2=None, l=...
class _mb_disk_basic (line 125) | class _mb_disk_basic(_Bosl2Base):
method __init__ (line 126) | def __init__(self, point=None, hl=None, r=None, neg=None, **kwargs):
class _mb_disk_influence (line 129) | class _mb_disk_influence(_Bosl2Base):
method __init__ (line 130) | def __init__(self, point=None, hl=None, r=None, ex=None, neg=None, **k...
class _mb_disk_cutoff (line 133) | class _mb_disk_cutoff(_Bosl2Base):
method __init__ (line 134) | def __init__(self, point=None, hl=None, r=None, cutoff=None, neg=None,...
class _mb_disk_full (line 137) | class _mb_disk_full(_Bosl2Base):
method __init__ (line 138) | def __init__(self, point=None, hl=None, r=None, cutoff=None, ex=None, ...
class mb_disk (line 141) | class mb_disk(_Bosl2Base):
method __init__ (line 142) | def __init__(self, h=None, r=None, cutoff=None, influence=None, negati...
class _mb_capsule_basic (line 145) | class _mb_capsule_basic(_Bosl2Base):
method __init__ (line 146) | def __init__(self, dv=None, hl=None, r=None, neg=None, **kwargs):
class _mb_capsule_influence (line 149) | class _mb_capsule_influence(_Bosl2Base):
method __init__ (line 150) | def __init__(self, dv=None, hl=None, r=None, ex=None, neg=None, **kwar...
class _mb_capsule_cutoff (line 153) | class _mb_capsule_cutoff(_Bosl2Base):
method __init__ (line 154) | def __init__(self, dv=None, hl=None, r=None, cutoff=None, neg=None, **...
class _mb_capsule_full (line 157) | class _mb_capsule_full(_Bosl2Base):
method __init__ (line 158) | def __init__(self, dv=None, hl=None, r=None, cutoff=None, ex=None, neg...
class mb_capsule (line 161) | class mb_capsule(_Bosl2Base):
method __init__ (line 162) | def __init__(self, h=None, r=None, cutoff=None, influence=None, negati...
class mb_connector (line 165) | class mb_connector(_Bosl2Base):
method __init__ (line 166) | def __init__(self, p1=None, p2=None, r=None, cutoff=None, influence=No...
class _mb_torus_basic (line 169) | class _mb_torus_basic(_Bosl2Base):
method __init__ (line 170) | def __init__(self, point=None, rmaj=None, rmin=None, neg=None, **kwargs):
class _mb_torus_influence (line 173) | class _mb_torus_influence(_Bosl2Base):
method __init__ (line 174) | def __init__(self, point=None, rmaj=None, rmin=None, ex=None, neg=None...
class _mb_torus_cutoff (line 177) | class _mb_torus_cutoff(_Bosl2Base):
method __init__ (line 178) | def __init__(self, point=None, rmaj=None, rmin=None, cutoff=None, neg=...
class _mb_torus_full (line 181) | class _mb_torus_full(_Bosl2Base):
method __init__ (line 182) | def __init__(self, point=None, rmaj=None, rmin=None, cutoff=None, ex=N...
class mb_torus (line 185) | class mb_torus(_Bosl2Base):
method __init__ (line 186) | def __init__(self, r_maj=None, r_min=None, cutoff=None, influence=None...
class _mb_octahedron_basic (line 189) | class _mb_octahedron_basic(_Bosl2Base):
method __init__ (line 190) | def __init__(self, point=None, invr=None, xp=None, neg=None, **kwargs):
class _mb_octahedron_influence (line 193) | class _mb_octahedron_influence(_Bosl2Base):
method __init__ (line 194) | def __init__(self, point=None, invr=None, xp=None, ex=None, neg=None, ...
class _mb_octahedron_cutoff (line 197) | class _mb_octahedron_cutoff(_Bosl2Base):
method __init__ (line 198) | def __init__(self, point=None, invr=None, xp=None, cutoff=None, neg=No...
class _mb_octahedron_full (line 201) | class _mb_octahedron_full(_Bosl2Base):
method __init__ (line 202) | def __init__(self, point=None, invr=None, xp=None, cutoff=None, ex=Non...
class mb_octahedron (line 205) | class mb_octahedron(_Bosl2Base):
method __init__ (line 206) | def __init__(self, size=None, squareness=None, cutoff=None, influence=...
class _debug_cube (line 209) | class _debug_cube(_Bosl2Base):
method __init__ (line 210) | def __init__(self, size=None, squareness=None, **kwargs):
class _debug_octahedron (line 213) | class _debug_octahedron(_Bosl2Base):
method __init__ (line 214) | def __init__(self, size=None, squareness=None, **kwargs):
class debug_tetra (line 217) | class debug_tetra(_Bosl2Base):
method __init__ (line 218) | def __init__(self, r=None, **kwargs):
class metaballs (line 221) | class metaballs(_Bosl2Base):
method __init__ (line 222) | def __init__(self, spec=None, bounding_box=None, voxel_size=None, voxe...
method __init__ (line 338) | def __init__(self, spec=None, bounding_box=None, voxel_size=None, voxe...
class _mb_unwind_list (line 225) | class _mb_unwind_list(_Bosl2Base):
method __init__ (line 226) | def __init__(self, list=None, parent_trans=None, depth=None, twoD=None...
class _mb_circle_full (line 229) | class _mb_circle_full(_Bosl2Base):
method __init__ (line 230) | def __init__(self, point=None, r=None, cutoff=None, ex=None, neg=None,...
class mb_circle (line 233) | class mb_circle(_Bosl2Base):
method __init__ (line 234) | def __init__(self, r=None, cutoff=None, influence=None, negative=None,...
class _mb_squircle_full (line 237) | class _mb_squircle_full(_Bosl2Base):
method __init__ (line 238) | def __init__(self, point=None, inv_size=None, xp=None, ex=None, cutoff...
class mb_rect (line 241) | class mb_rect(_Bosl2Base):
method __init__ (line 242) | def __init__(self, size=None, squareness=None, cutoff=None, influence=...
class _trapsurf_full (line 245) | class _trapsurf_full(_Bosl2Base):
method __init__ (line 246) | def __init__(self, point=None, path=None, coef=None, cutoff=None, exp=...
class mb_trapezoid (line 249) | class mb_trapezoid(_Bosl2Base):
method __init__ (line 250) | def __init__(self, h=None, w1=None, w2=None, ang=None, rounding=None, ...
class _mb_stadium_full (line 253) | class _mb_stadium_full(_Bosl2Base):
method __init__ (line 254) | def __init__(self, dv=None, hl=None, r=None, cutoff=None, ex=None, neg...
class _mb_stadium_sideways_full (line 257) | class _mb_stadium_sideways_full(_Bosl2Base):
method __init__ (line 258) | def __init__(self, dv=None, hl=None, r=None, cutoff=None, ex=None, neg...
class mb_stadium (line 261) | class mb_stadium(_Bosl2Base):
method __init__ (line 262) | def __init__(self, size=None, cutoff=None, influence=None, negative=No...
class mb_connector2d (line 265) | class mb_connector2d(_Bosl2Base):
method __init__ (line 266) | def __init__(self, p1=None, p2=None, r=None, cutoff=None, influence=No...
class _mb_ring_full (line 269) | class _mb_ring_full(_Bosl2Base):
method __init__ (line 270) | def __init__(self, point=None, rmaj=None, rmin=None, cutoff=None, ex=N...
class mb_ring (line 273) | class mb_ring(_Bosl2Base):
method __init__ (line 274) | def __init__(self, r1=None, r2=None, cutoff=None, influence=None, nega...
class metaballs2d (line 277) | class metaballs2d(_Bosl2Base):
method __init__ (line 278) | def __init__(self, spec=None, bounding_box=None, pixel_size=None, pixe...
method __init__ (line 342) | def __init__(self, spec=None, bounding_box=None, pixel_size=None, pixe...
class _metaballs2dfield (line 281) | class _metaballs2dfield(_Bosl2Base):
method __init__ (line 282) | def __init__(self, funclist=None, transmatrix=None, bbox=None, pixsize...
class isosurface (line 285) | class isosurface(_Bosl2Base):
method __init__ (line 286) | def __init__(self, f=None, isovalue=None, bounding_box=None, voxel_siz...
method __init__ (line 346) | def __init__(self, f=None, isovalue=None, bounding_box=None, voxel_siz...
class _getautovoxsize (line 289) | class _getautovoxsize(_Bosl2Base):
method __init__ (line 290) | def __init__(self, bbox=None, numvoxels=None, **kwargs):
class _getvoxsize (line 293) | class _getvoxsize(_Bosl2Base):
method __init__ (line 294) | def __init__(self, voxel_size=None, bounding_box=None, exactbounds=Non...
class _getbbox (line 297) | class _getbbox(_Bosl2Base):
method __init__ (line 298) | def __init__(self, voxel_size=None, bounding_box=None, exactbounds=Non...
class _showstats_isosurface (line 301) | class _showstats_isosurface(_Bosl2Base):
method __init__ (line 302) | def __init__(self, voxsize=None, bbox=None, isoval=None, cubes=None, t...
class contour (line 305) | class contour(_Bosl2Base):
method __init__ (line 306) | def __init__(self, f=None, isovalue=None, bounding_box=None, pixel_siz...
method __init__ (line 350) | def __init__(self, f=None, isovalue=None, bounding_box=None, pixel_siz...
class _region_smooth (line 309) | class _region_smooth(_Bosl2Base):
method __init__ (line 310) | def __init__(self, reg=None, passes=None, bbox=None, count=None, **kwa...
class _is_pt_on_bbox (line 313) | class _is_pt_on_bbox(_Bosl2Base):
method __init__ (line 314) | def __init__(self, p=None, bbox=None, **kwargs):
class _pathpts_on_bbox (line 317) | class _pathpts_on_bbox(_Bosl2Base):
method __init__ (line 318) | def __init__(self, path=None, bbox=None, i=None, count=None, **kwargs):
class _getautopixsize (line 321) | class _getautopixsize(_Bosl2Base):
method __init__ (line 322) | def __init__(self, bbox=None, numpixels=None, **kwargs):
class _getpixsize (line 325) | class _getpixsize(_Bosl2Base):
method __init__ (line 326) | def __init__(self, pixel_size=None, bounding_box=None, exactbounds=Non...
class _getbbox2d (line 329) | class _getbbox2d(_Bosl2Base):
method __init__ (line 330) | def __init__(self, pixel_size=None, bounding_box=None, exactbounds=Non...
class _showstats_contour (line 333) | class _showstats_contour(_Bosl2Base):
method __init__ (line 334) | def __init__(self, pixelsize=None, bbox=None, isovalmin=None, isovalma...
class metaballs (line 337) | class metaballs(_Bosl2Base):
method __init__ (line 222) | def __init__(self, spec=None, bounding_box=None, voxel_size=None, voxe...
method __init__ (line 338) | def __init__(self, spec=None, bounding_box=None, voxel_size=None, voxe...
class metaballs2d (line 341) | class metaballs2d(_Bosl2Base):
method __init__ (line 278) | def __init__(self, spec=None, bounding_box=None, pixel_size=None, pixe...
method __init__ (line 342) | def __init__(self, spec=None, bounding_box=None, pixel_size=None, pixe...
class isosurface (line 345) | class isosurface(_Bosl2Base):
method __init__ (line 286) | def __init__(self, f=None, isovalue=None, bounding_box=None, voxel_siz...
method __init__ (line 346) | def __init__(self, f=None, isovalue=None, bounding_box=None, voxel_siz...
class contour (line 349) | class contour(_Bosl2Base):
method __init__ (line 306) | def __init__(self, f=None, isovalue=None, bounding_box=None, pixel_siz...
method __init__ (line 350) | def __init__(self, f=None, isovalue=None, bounding_box=None, pixel_siz...
FILE: solid2/extensions/bosl2/joiners.py
class half_joiner_clear (line 9) | class half_joiner_clear(_Bosl2Base):
method __init__ (line 10) | def __init__(self, l=None, w=None, ang=None, clearance=None, overlap=N...
method __init__ (line 50) | def __init__(self, l=None, w=None, ang=None, clearance=None, overlap=N...
class half_joiner (line 13) | class half_joiner(_Bosl2Base):
method __init__ (line 14) | def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None...
method __init__ (line 54) | def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None...
class half_joiner2 (line 17) | class half_joiner2(_Bosl2Base):
method __init__ (line 18) | def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None...
method __init__ (line 58) | def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None...
class joiner_clear (line 21) | class joiner_clear(_Bosl2Base):
method __init__ (line 22) | def __init__(self, l=None, w=None, ang=None, clearance=None, overlap=N...
method __init__ (line 62) | def __init__(self, l=None, w=None, ang=None, clearance=None, overlap=N...
class joiner (line 25) | class joiner(_Bosl2Base):
method __init__ (line 26) | def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None...
method __init__ (line 66) | def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None...
class dovetail (line 29) | class dovetail(_Bosl2Base):
method __init__ (line 30) | def __init__(self, gender=None, width=None, height=None, slide=None, h...
method __init__ (line 70) | def __init__(self, gender=None, width=None, height=None, slide=None, h...
class _pin_size (line 33) | class _pin_size(_Bosl2Base):
method __init__ (line 34) | def __init__(self, size=None, **kwargs):
class snap_pin (line 37) | class snap_pin(_Bosl2Base):
method __init__ (line 38) | def __init__(self, size=None, r=None, radius=None, d=None, diameter=No...
method __init__ (line 86) | def __init__(self, size=None, r=None, radius=None, d=None, diameter=No...
class snap_pin_socket (line 41) | class snap_pin_socket(_Bosl2Base):
method __init__ (line 42) | def __init__(self, size=None, r=None, radius=None, l=None, length=None...
method __init__ (line 90) | def __init__(self, size=None, r=None, radius=None, l=None, length=None...
class rabbit_clip (line 45) | class rabbit_clip(_Bosl2Base):
method __init__ (line 46) | def __init__(self, type=None, length=None, width=None, snap=None, thic...
method __init__ (line 94) | def __init__(self, type=None, length=None, width=None, snap=None, thic...
class half_joiner_clear (line 49) | class half_joiner_clear(_Bosl2Base):
method __init__ (line 10) | def __init__(self, l=None, w=None, ang=None, clearance=None, overlap=N...
method __init__ (line 50) | def __init__(self, l=None, w=None, ang=None, clearance=None, overlap=N...
class half_joiner (line 53) | class half_joiner(_Bosl2Base):
method __init__ (line 14) | def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None...
method __init__ (line 54) | def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None...
class half_joiner2 (line 57) | class half_joiner2(_Bosl2Base):
method __init__ (line 18) | def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None...
method __init__ (line 58) | def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None...
class joiner_clear (line 61) | class joiner_clear(_Bosl2Base):
method __init__ (line 22) | def __init__(self, l=None, w=None, ang=None, clearance=None, overlap=N...
method __init__ (line 62) | def __init__(self, l=None, w=None, ang=None, clearance=None, overlap=N...
class joiner (line 65) | class joiner(_Bosl2Base):
method __init__ (line 26) | def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None...
method __init__ (line 66) | def __init__(self, l=None, w=None, base=None, ang=None, screwsize=None...
class dovetail (line 69) | class dovetail(_Bosl2Base):
method __init__ (line 30) | def __init__(self, gender=None, width=None, height=None, slide=None, h...
method __init__ (line 70) | def __init__(self, gender=None, width=None, height=None, slide=None, h...
class _pin_nub (line 73) | class _pin_nub(_Bosl2Base):
method __init__ (line 74) | def __init__(self, r=None, nub=None, h=None, **kwargs):
class _pin_slot (line 77) | class _pin_slot(_Bosl2Base):
method __init__ (line 78) | def __init__(self, l=None, r=None, t=None, d=None, nub=None, depth=Non...
class _pin_shaft (line 81) | class _pin_shaft(_Bosl2Base):
method __init__ (line 82) | def __init__(self, r=None, lStraight=None, nub=None, nubscale=None, st...
class snap_pin (line 85) | class snap_pin(_Bosl2Base):
method __init__ (line 38) | def __init__(self, size=None, r=None, radius=None, d=None, diameter=No...
method __init__ (line 86) | def __init__(self, size=None, r=None, radius=None, d=None, diameter=No...
class snap_pin_socket (line 89) | class snap_pin_socket(_Bosl2Base):
method __init__ (line 42) | def __init__(self, size=None, r=None, radius=None, l=None, length=None...
method __init__ (line 90) | def __init__(self, size=None, r=None, radius=None, l=None, length=None...
class rabbit_clip (line 93) | class rabbit_clip(_Bosl2Base):
method __init__ (line 46) | def __init__(self, type=None, length=None, width=None, snap=None, thic...
method __init__ (line 94) | def __init__(self, type=None, length=None, width=None, snap=None, thic...
class hirth (line 97) | class hirth(_Bosl2Base):
method __init__ (line 98) | def __init__(self, n=None, ir=None, _or=None, id=None, od=None, tooth_...
FILE: solid2/extensions/bosl2/linalg.py
class is_matrix (line 9) | class is_matrix(_Bosl2Base):
method __init__ (line 10) | def __init__(self, A=None, m=None, n=None, square=None, **kwargs):
class is_matrix_symmetric (line 13) | class is_matrix_symmetric(_Bosl2Base):
method __init__ (line 14) | def __init__(self, A=None, eps=None, **kwargs):
class is_rotation (line 17) | class is_rotation(_Bosl2Base):
method __init__ (line 18) | def __init__(self, A=None, dim=None, centered=None, **kwargs):
class echo_matrix (line 21) | class echo_matrix(_Bosl2Base):
method __init__ (line 22) | def __init__(self, M=None, description=None, sig=None, sep=None, eps=N...
method __init__ (line 134) | def __init__(self, M=None, description=None, sig=None, sep=None, eps=N...
class column (line 25) | class column(_Bosl2Base):
method __init__ (line 26) | def __init__(self, M=None, i=None, **kwargs):
class submatrix (line 29) | class submatrix(_Bosl2Base):
method __init__ (line 30) | def __init__(self, M=None, idx1=None, idx2=None, **kwargs):
class ident (line 33) | class ident(_Bosl2Base):
method __init__ (line 34) | def __init__(self, n=None, **kwargs):
class diagonal_matrix (line 37) | class diagonal_matrix(_Bosl2Base):
method __init__ (line 38) | def __init__(self, diag=None, offdiag=None, **kwargs):
class transpose (line 41) | class transpose(_Bosl2Base):
method __init__ (line 42) | def __init__(self, M=None, reverse=None, **kwargs):
class outer_product (line 45) | class outer_product(_Bosl2Base):
method __init__ (line 46) | def __init__(self, u=None, v=None, **kwargs):
class submatrix_set (line 49) | class submatrix_set(_Bosl2Base):
method __init__ (line 50) | def __init__(self, M=None, A=None, m=None, n=None, **kwargs):
class hstack (line 53) | class hstack(_Bosl2Base):
method __init__ (line 54) | def __init__(self, M1=None, M2=None, M3=None, **kwargs):
class block_matrix (line 57) | class block_matrix(_Bosl2Base):
method __init__ (line 58) | def __init__(self, M=None, **kwargs):
class linear_solve (line 61) | class linear_solve(_Bosl2Base):
method __init__ (line 62) | def __init__(self, A=None, b=None, pivot=None, **kwargs):
class linear_solve3 (line 65) | class linear_solve3(_Bosl2Base):
method __init__ (line 66) | def __init__(self, A=None, b=None, **kwargs):
class matrix_inverse (line 69) | class matrix_inverse(_Bosl2Base):
method __init__ (line 70) | def __init__(self, A=None, **kwargs):
class rot_inverse (line 73) | class rot_inverse(_Bosl2Base):
method __init__ (line 74) | def __init__(self, T=None, **kwargs):
class null_space (line 77) | class null_space(_Bosl2Base):
method __init__ (line 78) | def __init__(self, A=None, eps=None, **kwargs):
class qr_factor (line 81) | class qr_factor(_Bosl2Base):
method __init__ (line 82) | def __init__(self, A=None, pivot=None, **kwargs):
class _qr_factor (line 85) | class _qr_factor(_Bosl2Base):
method __init__ (line 86) | def __init__(self, A=None, Q=None, P=None, pivot=None, col=None, m=Non...
class _swap_matrix (line 89) | class _swap_matrix(_Bosl2Base):
method __init__ (line 90) | def __init__(self, n=None, i=None, j=None, **kwargs):
class back_substitute (line 93) | class back_substitute(_Bosl2Base):
method __init__ (line 94) | def __init__(self, R=None, b=None, transpose=None, **kwargs):
class _back_substitute (line 97) | class _back_substitute(_Bosl2Base):
method __init__ (line 98) | def __init__(self, R=None, b=None, x=None, **kwargs):
class cholesky (line 101) | class cholesky(_Bosl2Base):
method __init__ (line 102) | def __init__(self, A=None, **kwargs):
class _cholesky (line 105) | class _cholesky(_Bosl2Base):
method __init__ (line 106) | def __init__(self, A=None, L=None, n=None, **kwargs):
class det2 (line 109) | class det2(_Bosl2Base):
method __init__ (line 110) | def __init__(self, M=None, **kwargs):
class det3 (line 113) | class det3(_Bosl2Base):
method __init__ (line 114) | def __init__(self, M=None, **kwargs):
class det4 (line 117) | class det4(_Bosl2Base):
method __init__ (line 118) | def __init__(self, M=None, **kwargs):
class determinant (line 121) | class determinant(_Bosl2Base):
method __init__ (line 122) | def __init__(self, M=None, **kwargs):
class norm_fro (line 125) | class norm_fro(_Bosl2Base):
method __init__ (line 126) | def __init__(self, A=None, **kwargs):
class matrix_trace (line 129) | class matrix_trace(_Bosl2Base):
method __init__ (line 130) | def __init__(self, M=None, **kwargs):
class echo_matrix (line 133) | class echo_matrix(_Bosl2Base):
method __init__ (line 22) | def __init__(self, M=None, description=None, sig=None, sep=None, eps=N...
method __init__ (line 134) | def __init__(self, M=None, description=None, sig=None, sep=None, eps=N...
FILE: solid2/extensions/bosl2/linear_bearings.py
class lmXuu_info (line 9) | class lmXuu_info(_Bosl2Base):
method __init__ (line 10) | def __init__(self, size=None, **kwargs):
class linear_bearing_housing (line 13) | class linear_bearing_housing(_Bosl2Base):
method __init__ (line 14) | def __init__(self, d=None, l=None, tab=None, gap=None, wall=None, tabw...
class linear_bearing (line 17) | class linear_bearing(_Bosl2Base):
method __init__ (line 18) | def __init__(self, l=None, od=None, id=None, length=None, anchor=None,...
class lmXuu_housing (line 21) | class lmXuu_housing(_Bosl2Base):
method __init__ (line 22) | def __init__(self, size=None, tab=None, gap=None, wall=None, tabwall=N...
class lmXuu_bearing (line 25) | class lmXuu_bearing(_Bosl2Base):
method __init__ (line 26) | def __init__(self, size=None, anchor=None, spin=None, orient=None, **k...
FILE: solid2/extensions/bosl2/lists.py
class is_homogeneous (line 9) | class is_homogeneous(_Bosl2Base):
method __init__ (line 10) | def __init__(self, l=None, depth=None, **kwargs):
class is_homogenous (line 13) | class is_homogenous(_Bosl2Base):
method __init__ (line 14) | def __init__(self, l=None, depth=None, **kwargs):
class _same_type (line 17) | class _same_type(_Bosl2Base):
method __init__ (line 18) | def __init__(self, a=None, b=None, depth=None, **kwargs):
class min_length (line 21) | class min_length(_Bosl2Base):
method __init__ (line 22) | def __init__(self, list=None, **kwargs):
class max_length (line 25) | class max_length(_Bosl2Base):
method __init__ (line 26) | def __init__(self, list=None, **kwargs):
class _list_shape_recurse (line 29) | class _list_shape_recurse(_Bosl2Base):
method __init__ (line 30) | def __init__(self, v=None, **kwargs):
method __init__ (line 34) | def __init__(self, v=None, **kwargs):
class _list_shape_recurse (line 33) | class _list_shape_recurse(_Bosl2Base):
method __init__ (line 30) | def __init__(self, v=None, **kwargs):
method __init__ (line 34) | def __init__(self, v=None, **kwargs):
class list_shape (line 37) | class list_shape(_Bosl2Base):
method __init__ (line 38) | def __init__(self, v=None, depth=None, **kwargs):
class in_list (line 41) | class in_list(_Bosl2Base):
method __init__ (line 42) | def __init__(self, val=None, list=None, idx=None, **kwargs):
class select (line 45) | class select(_Bosl2Base):
method __init__ (line 46) | def __init__(self, list=None, start=None, end=None, **kwargs):
class slice (line 49) | class slice(_Bosl2Base):
method __init__ (line 50) | def __init__(self, list=None, start=None, end=None, **kwargs):
class last (line 53) | class last(_Bosl2Base):
method __init__ (line 54) | def __init__(self, list=None, **kwargs):
class list_head (line 57) | class list_head(_Bosl2Base):
method __init__ (line 58) | def __init__(self, list=None, to=None, **kwargs):
class list_tail (line 61) | class list_tail(_Bosl2Base):
method __init__ (line 62) | def __init__(self, list=None, _from=None, **kwargs):
class bselect (line 65) | class bselect(_Bosl2Base):
method __init__ (line 66) | def __init__(self, list=None, index=None, **kwargs):
class repeat (line 69) | class repeat(_Bosl2Base):
method __init__ (line 70) | def __init__(self, val=None, n=None, i=None, **kwargs):
class list_bset (line 73) | class list_bset(_Bosl2Base):
method __init__ (line 74) | def __init__(self, indexset=None, valuelist=None, dflt=None, **kwargs):
class list (line 77) | class list(_Bosl2Base):
method __init__ (line 78) | def __init__(self, l=None, **kwargs):
class force_list (line 81) | class force_list(_Bosl2Base):
method __init__ (line 82) | def __init__(self, value=None, n=None, fill=None, **kwargs):
class reverse (line 85) | class reverse(_Bosl2Base):
method __init__ (line 86) | def __init__(self, list=None, **kwargs):
class list_rotate (line 89) | class list_rotate(_Bosl2Base):
method __init__ (line 90) | def __init__(self, list=None, n=None, **kwargs):
class shuffle (line 93) | class shuffle(_Bosl2Base):
method __init__ (line 94) | def __init__(self, list=None, seed=None, **kwargs):
class repeat_entries (line 97) | class repeat_entries(_Bosl2Base):
method __init__ (line 98) | def __init__(self, list=None, N=None, exact=None, **kwargs):
class list_pad (line 101) | class list_pad(_Bosl2Base):
method __init__ (line 102) | def __init__(self, list=None, minlen=None, fill=None, **kwargs):
class list_set (line 105) | class list_set(_Bosl2Base):
method __init__ (line 106) | def __init__(self, list=None, indices=None, values=None, dflt=None, mi...
class list_insert (line 109) | class list_insert(_Bosl2Base):
method __init__ (line 110) | def __init__(self, list=None, indices=None, values=None, **kwargs):
class list_remove (line 113) | class list_remove(_Bosl2Base):
method __init__ (line 114) | def __init__(self, list=None, ind=None, **kwargs):
class list_remove_values (line 117) | class list_remove_values(_Bosl2Base):
method __init__ (line 118) | def __init__(self, list=None, values=None, all=None, **kwargs):
class idx (line 121) | class idx(_Bosl2Base):
method __init__ (line 122) | def __init__(self, list=None, s=None, e=None, step=None, **kwargs):
class pair (line 125) | class pair(_Bosl2Base):
method __init__ (line 126) | def __init__(self, list=None, wrap=None, **kwargs):
class triplet (line 129) | class triplet(_Bosl2Base):
method __init__ (line 130) | def __init__(self, list=None, wrap=None, **kwargs):
class combinations (line 133) | class combinations(_Bosl2Base):
method __init__ (line 134) | def __init__(self, l=None, n=None, _s=None, **kwargs):
class permutations (line 137) | class permutations(_Bosl2Base):
method __init__ (line 138) | def __init__(self, l=None, n=None, **kwargs):
class list_to_matrix (line 141) | class list_to_matrix(_Bosl2Base):
method __init__ (line 142) | def __init__(self, v=None, cnt=None, dflt=None, **kwargs):
class flatten (line 145) | class flatten(_Bosl2Base):
method __init__ (line 146) | def __init__(self, l=None, **kwargs):
class full_flatten (line 149) | class full_flatten(_Bosl2Base):
method __init__ (line 150) | def __init__(self, l=None, **kwargs):
class set_union (line 153) | class set_union(_Bosl2Base):
method __init__ (line 154) | def __init__(self, a=None, b=None, get_indices=None, **kwargs):
class set_difference (line 157) | class set_difference(_Bosl2Base):
method __init__ (line 158) | def __init__(self, a=None, b=None, **kwargs):
class set_intersection (line 161) | class set_intersection(_Bosl2Base):
method __init__ (line 162) | def __init__(self, a=None, b=None, **kwargs):
FILE: solid2/extensions/bosl2/masks2d.py
class _inset_corner (line 9) | class _inset_corner(_Bosl2Base):
method __init__ (line 10) | def __init__(self, corner=None, mask_angle=None, inset=None, excess=No...
class mask2d_roundover (line 13) | class mask2d_roundover(_Bosl2Base):
method __init__ (line 14) | def __init__(self, r=None, inset=None, mask_angle=None, excess=None, c...
method __init__ (line 42) | def __init__(self, r=None, inset=None, mask_angle=None, excess=None, f...
class mask2d_teardrop (line 17) | class mask2d_teardrop(_Bosl2Base):
method __init__ (line 18) | def __init__(self, r=None, angle=None, inset=None, mask_angle=None, ex...
method __init__ (line 46) | def __init__(self, r=None, angle=None, mask_angle=None, excess=None, i...
class mask2d_cove (line 21) | class mask2d_cove(_Bosl2Base):
method __init__ (line 22) | def __init__(self, r=None, inset=None, mask_angle=None, excess=None, f...
method __init__ (line 50) | def __init__(self, r=None, inset=None, mask_angle=None, excess=None, f...
class mask2d_chamfer (line 25) | class mask2d_chamfer(_Bosl2Base):
method __init__ (line 26) | def __init__(self, edge=None, angle=None, inset=None, excess=None, mas...
method __init__ (line 54) | def __init__(self, edge=None, angle=None, inset=None, excess=None, mas...
class mask2d_rabbet (line 29) | class mask2d_rabbet(_Bosl2Base):
method __init__ (line 30) | def __init__(self, size=None, mask_angle=None, excess=None, anchor=Non...
method __init__ (line 58) | def __init__(self, size=None, mask_angle=None, excess=None, anchor=Non...
class mask2d_dovetail (line 33) | class mask2d_dovetail(_Bosl2Base):
method __init__ (line 34) | def __init__(self, edge=None, angle=None, slope=None, shelf=None, inse...
method __init__ (line 62) | def __init__(self, edge=None, angle=None, shelf=None, inset=None, mask...
class mask2d_ogee (line 37) | class mask2d_ogee(_Bosl2Base):
method __init__ (line 38) | def __init__(self, pattern=None, excess=None, anchor=None, spin=None, ...
method __init__ (line 66) | def __init__(self, pattern=None, excess=None, anchor=None, spin=None, ...
class mask2d_roundover (line 41) | class mask2d_roundover(_Bosl2Base):
method __init__ (line 14) | def __init__(self, r=None, inset=None, mask_angle=None, excess=None, c...
method __init__ (line 42) | def __init__(self, r=None, inset=None, mask_angle=None, excess=None, f...
class mask2d_teardrop (line 45) | class mask2d_teardrop(_Bosl2Base):
method __init__ (line 18) | def __init__(self, r=None, angle=None, inset=None, mask_angle=None, ex...
method __init__ (line 46) | def __init__(self, r=None, angle=None, mask_angle=None, excess=None, i...
class mask2d_cove (line 49) | class mask2d_cove(_Bosl2Base):
method __init__ (line 22) | def __init__(self, r=None, inset=None, mask_angle=None, excess=None, f...
method __init__ (line 50) | def __init__(self, r=None, inset=None, mask_angle=None, excess=None, f...
class mask2d_chamfer (line 53) | class mask2d_chamfer(_Bosl2Base):
method __init__ (line 26) | def __init__(self, edge=None, angle=None, inset=None, excess=None, mas...
method __init__ (line 54) | def __init__(self, edge=None, angle=None, inset=None, excess=None, mas...
class mask2d_rabbet (line 57) | class mask2d_rabbet(_Bosl2Base):
method __init__ (line 30) | def __init__(self, size=None, mask_angle=None, excess=None, anchor=Non...
method __init__ (line 58) | def __init__(self, size=None, mask_angle=None, excess=None, anchor=Non...
class mask2d_dovetail (line 61) | class mask2d_dovetail(_Bosl2Base):
method __init__ (line 34) | def __init__(self, edge=None, angle=None, slope=None, shelf=None, inse...
method __init__ (line 62) | def __init__(self, edge=None, angle=None, shelf=None, inset=None, mask...
class mask2d_ogee (line 65) | class mask2d_ogee(_Bosl2Base):
method __init__ (line 38) | def __init__(self, pattern=None, excess=None, anchor=None, spin=None, ...
method __init__ (line 66) | def __init__(self, pattern=None, excess=None, anchor=None, spin=None, ...
FILE: solid2/extensions/bosl2/masks3d.py
class chamfer_edge_mask (line 9) | class chamfer_edge_mask(_Bosl2Base):
method __init__ (line 10) | def __init__(self, l=None, chamfer=None, excess=None, h=None, length=N...
method __init__ (line 54) | def __init__(self, l=None, chamfer=None, excess=None, h=None, length=N...
class chamfer_corner_mask (line 13) | class chamfer_corner_mask(_Bosl2Base):
method __init__ (line 14) | def __init__(self, chamfer=None, anchor=None, spin=None, orient=None, ...
method __init__ (line 58) | def __init__(self, chamfer=None, anchor=None, spin=None, orient=None, ...
class chamfer_cylinder_mask (line 17) | class chamfer_cylinder_mask(_Bosl2Base):
method __init__ (line 18) | def __init__(self, r=None, chamfer=None, d=None, ang=None, from_end=No...
method __init__ (line 62) | def __init__(self, r=None, chamfer=None, d=None, ang=None, from_end=No...
class rounding_edge_mask (line 21) | class rounding_edge_mask(_Bosl2Base):
method __init__ (line 22) | def __init__(self, l=None, r=None, ang=None, r1=None, r2=None, d=None,...
method __init__ (line 66) | def __init__(self, l=None, r=None, ang=None, r1=None, r2=None, excess=...
class rounding_corner_mask (line 25) | class rounding_corner_mask(_Bosl2Base):
method __init__ (line 26) | def __init__(self, r=None, ang=None, d=None, style=None, excess=None, ...
method __init__ (line 70) | def __init__(self, r=None, ang=None, d=None, style=None, excess=None, ...
class rounding_angled_edge_mask (line 29) | class rounding_angled_edge_mask(_Bosl2Base):
method __init__ (line 30) | def __init__(self, h=None, r=None, r1=None, r2=None, d=None, d1=None, ...
method __init__ (line 74) | def __init__(self, h=None, r=None, r1=None, r2=None, d=None, d1=None, ...
class rounding_angled_corner_mask (line 33) | class rounding_angled_corner_mask(_Bosl2Base):
method __init__ (line 34) | def __init__(self, r=None, ang=None, d=None, anchor=None, spin=None, o...
method __init__ (line 78) | def __init__(self, r=None, ang=None, d=None, anchor=None, spin=None, o...
class rounding_cylinder_mask (line 37) | class rounding_cylinder_mask(_Bosl2Base):
method __init__ (line 38) | def __init__(self, r=None, rounding=None, d=None, anchor=None, spin=No...
method __init__ (line 82) | def __init__(self, r=None, rounding=None, d=None, anchor=None, spin=No...
class rounding_hole_mask (line 41) | class rounding_hole_mask(_Bosl2Base):
method __init__ (line 42) | def __init__(self, r=None, rounding=None, excess=None, d=None, anchor=...
method __init__ (line 86) | def __init__(self, r=None, rounding=None, excess=None, d=None, anchor=...
class teardrop_edge_mask (line 45) | class teardrop_edge_mask(_Bosl2Base):
method __init__ (line 46) | def __init__(self, l=None, r=None, angle=None, excess=None, d=None, an...
method __init__ (line 90) | def __init__(self, l=None, r=None, angle=None, excess=None, d=None, an...
class teardrop_corner_mask (line 49) | class teardrop_corner_mask(_Bosl2Base):
method __init__ (line 50) | def __init__(self, r=None, angle=None, excess=None, d=None, anchor=Non...
method __init__ (line 94) | def __init__(self, r=None, angle=None, excess=None, d=None, anchor=Non...
class chamfer_edge_mask (line 53) | class chamfer_edge_mask(_Bosl2Base):
method __init__ (line 10) | def __init__(self, l=None, chamfer=None, excess=None, h=None, length=N...
method __init__ (line 54) | def __init__(self, l=None, chamfer=None, excess=None, h=None, length=N...
class chamfer_corner_mask (line 57) | class chamfer_corner_mask(_Bosl2Base):
method __init__ (line 14) | def __init__(self, chamfer=None, anchor=None, spin=None, orient=None, ...
method __init__ (line 58) | def __init__(self, chamfer=None, anchor=None, spin=None, orient=None, ...
class chamfer_cylinder_mask (line 61) | class chamfer_cylinder_mask(_Bosl2Base):
method __init__ (line 18) | def __init__(self, r=None, chamfer=None, d=None, ang=None, from_end=No...
method __init__ (line 62) | def __init__(self, r=None, chamfer=None, d=None, ang=None, from_end=No...
class rounding_edge_mask (line 65) | class rounding_edge_mask(_Bosl2Base):
method __init__ (line 22) | def __init__(self, l=None, r=None, ang=None, r1=None, r2=None, d=None,...
method __init__ (line 66) | def __init__(self, l=None, r=None, ang=None, r1=None, r2=None, excess=...
class rounding_corner_mask (line 69) | class rounding_corner_mask(_Bosl2Base):
method __init__ (line 26) | def __init__(self, r=None, ang=None, d=None, style=None, excess=None, ...
method __init__ (line 70) | def __init__(self, r=None, ang=None, d=None, style=None, excess=None, ...
class rounding_angled_edge_mask (line 73) | class rounding_angled_edge_mask(_Bosl2Base):
method __init__ (line 30) | def __init__(self, h=None, r=None, r1=None, r2=None, d=None, d1=None, ...
method __init__ (line 74) | def __init__(self, h=None, r=None, r1=None, r2=None, d=None, d1=None, ...
class rounding_angled_corner_mask (line 77) | class rounding_angled_corner_mask(_Bosl2Base):
method __init__ (line 34) | def __init__(self, r=None, ang=None, d=None, anchor=None, spin=None, o...
method __init__ (line 78) | def __init__(self, r=None, ang=None, d=None, anchor=None, spin=None, o...
class rounding_cylinder_mask (line 81) | class rounding_cylinder_mask(_Bosl2Base):
method __init__ (line 38) | def __init__(self, r=None, rounding=None, d=None, anchor=None, spin=No...
method __init__ (line 82) | def __init__(self, r=None, rounding=None, d=None, anchor=None, spin=No...
class rounding_hole_mask (line 85) | class rounding_hole_mask(_Bosl2Base):
method __init__ (line 42) | def __init__(self, r=None, rounding=None, excess=None, d=None, anchor=...
method __init__ (line 86) | def __init__(self, r=None, rounding=None, excess=None, d=None, anchor=...
class teardrop_edge_mask (line 89) | class teardrop_edge_mask(_Bosl2Base):
method __init__ (line 46) | def __init__(self, l=None, r=None, angle=None, excess=None, d=None, an...
method __init__ (line 90) | def __init__(self, l=None, r=None, angle=None, excess=None, d=None, an...
class teardrop_corner_mask (line 93) | class teardrop_corner_mask(_Bosl2Base):
method __init__ (line 50) | def __init__(self, r=None, angle=None, excess=None, d=None, anchor=Non...
method __init__ (line 94) | def __init__(self, r=None, angle=None, excess=None, d=None, anchor=Non...
FILE: solid2/extensions/bosl2/math.py
class count (line 13) | class count(_Bosl2Base):
method __init__ (line 14) | def __init__(self, n=None, s=None, step=None, reverse=None, **kwargs):
class lerp (line 17) | class lerp(_Bosl2Base):
method __init__ (line 18) | def __init__(self, a=None, b=None, u=None, **kwargs):
class lerpn (line 21) | class lerpn(_Bosl2Base):
method __init__ (line 22) | def __init__(self, a=None, b=None, n=None, endpoint=None, **kwargs):
class bilerp (line 25) | class bilerp(_Bosl2Base):
method __init__ (line 26) | def __init__(self, points=None, x=None, y=None, **kwargs):
class sqr (line 29) | class sqr(_Bosl2Base):
method __init__ (line 30) | def __init__(self, x=None, **kwargs):
class log2 (line 33) | class log2(_Bosl2Base):
method __init__ (line 34) | def __init__(self, x=None, **kwargs):
class hypot (line 37) | class hypot(_Bosl2Base):
method __init__ (line 38) | def __init__(self, x=None, y=None, z=None, **kwargs):
class factorial (line 41) | class factorial(_Bosl2Base):
method __init__ (line 42) | def __init__(self, n=None, d=None, **kwargs):
class binomial (line 45) | class binomial(_Bosl2Base):
method __init__ (line 46) | def __init__(self, n=None, **kwargs):
class binomial_coefficient (line 49) | class binomial_coefficient(_Bosl2Base):
method __init__ (line 50) | def __init__(self, n=None, k=None, **kwargs):
class gcd (line 53) | class gcd(_Bosl2Base):
method __init__ (line 54) | def __init__(self, a=None, b=None, **kwargs):
class _lcm (line 57) | class _lcm(_Bosl2Base):
method __init__ (line 58) | def __init__(self, a=None, b=None, **kwargs):
class _lcmlist (line 61) | class _lcmlist(_Bosl2Base):
method __init__ (line 62) | def __init__(self, a=None, **kwargs):
class lcm (line 65) | class lcm(_Bosl2Base):
method __init__ (line 66) | def __init__(self, a=None, b=None, **kwargs):
class rational_approx (line 69) | class rational_approx(_Bosl2Base):
method __init__ (line 70) | def __init__(self, x=None, maxq=None, cfrac=None, p=None, q=None, **kw...
class _cfrac_to_pq (line 73) | class _cfrac_to_pq(_Bosl2Base):
method __init__ (line 74) | def __init__(self, cfrac=None, p=None, q=None, ind=None, **kwargs):
class sinh (line 77) | class sinh(_Bosl2Base):
method __init__ (line 78) | def __init__(self, x=None, **kwargs):
class cosh (line 81) | class cosh(_Bosl2Base):
method __init__ (line 82) | def __init__(self, x=None, **kwargs):
class tanh (line 85) | class tanh(_Bosl2Base):
method __init__ (line 86) | def __init__(self, x=None, **kwargs):
class asinh (line 89) | class asinh(_Bosl2Base):
method __init__ (line 90) | def __init__(self, x=None, **kwargs):
class acosh (line 93) | class acosh(_Bosl2Base):
method __init__ (line 94) | def __init__(self, x=None, **kwargs):
class atanh (line 97) | class atanh(_Bosl2Base):
method __init__ (line 98) | def __init__(self, x=None, **kwargs):
class quant (line 101) | class quant(_Bosl2Base):
method __init__ (line 102) | def __init__(self, x=None, y=None, **kwargs):
class _roundall (line 105) | class _roundall(_Bosl2Base):
method __init__ (line 106) | def __init__(self, data=None, **kwargs):
class quantdn (line 109) | class quantdn(_Bosl2Base):
method __init__ (line 110) | def __init__(self, x=None, y=None, **kwargs):
class _floorall (line 113) | class _floorall(_Bosl2Base):
method __init__ (line 114) | def __init__(self, data=None, **kwargs):
class quantup (line 117) | class quantup(_Bosl2Base):
method __init__ (line 118) | def __init__(self, x=None, y=None, **kwargs):
class _ceilall (line 121) | class _ceilall(_Bosl2Base):
method __init__ (line 122) | def __init__(self, data=None, **kwargs):
class constrain (line 125) | class constrain(_Bosl2Base):
method __init__ (line 126) | def __init__(self, v=None, minval=None, maxval=None, **kwargs):
class posmod (line 129) | class posmod(_Bosl2Base):
method __init__ (line 130) | def __init__(self, x=None, m=None, **kwargs):
class modang (line 133) | class modang(_Bosl2Base):
method __init__ (line 134) | def __init__(self, x=None, **kwargs):
class mean_angle (line 137) | class mean_angle(_Bosl2Base):
method __init__ (line 138) | def __init__(self, angle1=None, angle2=None, **kwargs):
class fit_to_range (line 141) | class fit_to_range(_Bosl2Base):
method __init__ (line 142) | def __init__(self, M=None, minval=None, maxval=None, **kwargs):
class sum (line 145) | class sum(_Bosl2Base):
method __init__ (line 146) | def __init__(self, v=None, dflt=None, **kwargs):
class _sum (line 149) | class _sum(_Bosl2Base):
method __init__ (line 150) | def __init__(self, v=None, _total=None, _i=None, **kwargs):
class mean (line 153) | class mean(_Bosl2Base):
method __init__ (line 154) | def __init__(self, v=None, **kwargs):
class median (line 157) | class median(_Bosl2Base):
method __init__ (line 158) | def __init__(self, v=None, **kwargs):
class deltas (line 161) | class deltas(_Bosl2Base):
method __init__ (line 162) | def __init__(self, v=None, wrap=None, **kwargs):
class cumsum (line 165) | class cumsum(_Bosl2Base):
method __init__ (line 166) | def __init__(self, v=None, **kwargs):
class product (line 169) | class product(_Bosl2Base):
method __init__ (line 170) | def __init__(self, list=None, right=None, **kwargs):
class cumprod (line 173) | class cumprod(_Bosl2Base):
method __init__ (line 174) | def __init__(self, list=None, right=None, **kwargs):
class convolve (line 177) | class convolve(_Bosl2Base):
method __init__ (line 178) | def __init__(self, p=None, q=None, **kwargs):
class sum_of_sines (line 181) | class sum_of_sines(_Bosl2Base):
method __init__ (line 182) | def __init__(self, a=None, sines=None, **kwargs):
class rand_int (line 185) | class rand_int(_Bosl2Base):
method __init__ (line 186) | def __init__(self, minval=None, maxval=None, n=None, seed=None, **kwar...
class random_points (line 189) | class random_points(_Bosl2Base):
method __init__ (line 190) | def __init__(self, n=None, dim=None, scale=None, seed=None, **kwargs):
class gaussian_rands (line 193) | class gaussian_rands(_Bosl2Base):
method __init__ (line 194) | def __init__(self, n=None, mean=None, cov=None, seed=None, **kwargs):
class exponential_rands (line 197) | class exponential_rands(_Bosl2Base):
method __init__ (line 198) | def __init__(self, n=None, _lambda=None, seed=None, **kwargs):
class spherical_random_points (line 201) | class spherical_random_points(_Bosl2Base):
method __init__ (line 202) | def __init__(self, n=None, radius=None, seed=None, **kwargs):
class random_polygon (line 205) | class random_polygon(_Bosl2Base):
method __init__ (line 206) | def __init__(self, n=None, size=None, seed=None, **kwargs):
class deriv (line 209) | class deriv(_Bosl2Base):
method __init__ (line 210) | def __init__(self, data=None, h=None, closed=None, **kwargs):
class _dnu_calc (line 213) | class _dnu_calc(_Bosl2Base):
method __init__ (line 214) | def __init__(self, f1=None, fc=None, f2=None, h1=None, h2=None, **kwar...
class _deriv_nonuniform (line 217) | class _deriv_nonuniform(_Bosl2Base):
method __init__ (line 218) | def __init__(self, data=None, h=None, closed=None, **kwargs):
class deriv2 (line 221) | class deriv2(_Bosl2Base):
method __init__ (line 222) | def __init__(self, data=None, h=None, closed=None, **kwargs):
class deriv3 (line 225) | class deriv3(_Bosl2Base):
method __init__ (line 226) | def __init__(self, data=None, h=None, closed=None, **kwargs):
class complex (line 229) | class complex(_Bosl2Base):
method __init__ (line 230) | def __init__(self, list=None, **kwargs):
class c_mul (line 233) | class c_mul(_Bosl2Base):
method __init__ (line 234) | def __init__(self, z1=None, z2=None, **kwargs):
class _split_complex (line 237) | class _split_complex(_Bosl2Base):
method __init__ (line 238) | def __init__(self, data=None, **kwargs):
class _combine_complex (line 241) | class _combine_complex(_Bosl2Base):
method __init__ (line 242) | def __init__(self, data=None, **kwargs):
class _c_mul (line 245) | class _c_mul(_Bosl2Base):
method __init__ (line 246) | def __init__(self, z1=None, z2=None, **kwargs):
class c_div (line 249) | class c_div(_Bosl2Base):
method __init__ (line 250) | def __init__(self, z1=None, z2=None, **kwargs):
class c_conj (line 253) | class c_conj(_Bosl2Base):
method __init__ (line 254) | def __init__(self, z=None, **kwargs):
class c_real (line 257) | class c_real(_Bosl2Base):
method __init__ (line 258) | def __init__(self, z=None, **kwargs):
class c_imag (line 261) | class c_imag(_Bosl2Base):
method __init__ (line 262) | def __init__(self, z=None, **kwargs):
class c_ident (line 265) | class c_ident(_Bosl2Base):
method __init__ (line 266) | def __init__(self, n=None, **kwargs):
class c_norm (line 269) | class c_norm(_Bosl2Base):
method __init__ (line 270) | def __init__(self, z=None, **kwargs):
class quadratic_roots (line 273) | class quadratic_roots(_Bosl2Base):
method __init__ (line 274) | def __init__(self, a=None, b=None, c=None, real=None, **kwargs):
class polynomial (line 277) | class polynomial(_Bosl2Base):
method __init__ (line 278) | def __init__(self, p=None, z=None, k=None, total=None, **kwargs):
class poly_mult (line 281) | class poly_mult(_Bosl2Base):
method __init__ (line 282) | def __init__(self, p=None, q=None, **kwargs):
class poly_div (line 285) | class poly_div(_Bosl2Base):
method __init__ (line 286) | def __init__(self, n=None, d=None, **kwargs):
class _poly_div (line 289) | class _poly_div(_Bosl2Base):
method __init__ (line 290) | def __init__(self, n=None, d=None, q=None, **kwargs):
class _poly_trim (line 293) | class _poly_trim(_Bosl2Base):
method __init__ (line 294) | def __init__(self, p=None, eps=None, **kwargs):
class poly_add (line 297) | class poly_add(_Bosl2Base):
method __init__ (line 298) | def __init__(self, p=None, q=None, **kwargs):
class poly_roots (line 301) | class poly_roots(_Bosl2Base):
method __init__ (line 302) | def __init__(self, p=None, tol=None, error_bound=None, **kwargs):
class _poly_roots (line 305) | class _poly_roots(_Bosl2Base):
method __init__ (line 306) | def __init__(self, p=None, pderiv=None, s=None, z=None, tol=None, i=No...
class real_roots (line 309) | class real_roots(_Bosl2Base):
method __init__ (line 310) | def __init__(self, p=None, eps=None, tol=None, **kwargs):
class root_find (line 313) | class root_find(_Bosl2Base):
method __init__ (line 314) | def __init__(self, f=None, x0=None, x1=None, tol=None, **kwargs):
class _rfcheck (line 317) | class _rfcheck(_Bosl2Base):
method __init__ (line 318) | def __init__(self, x=None, y=None, range=None, tol=None, **kwargs):
class _rootfind (line 321) | class _rootfind(_Bosl2Base):
method __init__ (line 322) | def __init__(self, f=None, xpts=None, ypts=None, yrange=None, tol=None...
FILE: solid2/extensions/bosl2/metric_screws.py
class get_metric_bolt_head_size (line 10) | class get_metric_bolt_head_size(_Bosl2Base):
method __init__ (line 11) | def __init__(self, size=None, **kwargs):
class get_metric_bolt_head_height (line 14) | class get_metric_bolt_head_height(_Bosl2Base):
method __init__ (line 15) | def __init__(self, size=None, **kwargs):
class get_metric_socket_cap_diam (line 18) | class get_metric_socket_cap_diam(_Bosl2Base):
method __init__ (line 19) | def __init__(self, size=None, **kwargs):
class get_metric_socket_cap_height (line 22) | class get_metric_socket_cap_height(_Bosl2Base):
method __init__ (line 23) | def __init__(self, size=None, **kwargs):
class get_metric_socket_cap_socket_size (line 26) | class get_metric_socket_cap_socket_size(_Bosl2Base):
method __init__ (line 27) | def __init__(self, size=None, **kwargs):
class get_metric_socket_cap_socket_depth (line 30) | class get_metric_socket_cap_socket_depth(_Bosl2Base):
method __init__ (line 31) | def __init__(self, size=None, **kwargs):
class get_metric_iso_coarse_thread_pitch (line 34) | class get_metric_iso_coarse_thread_pitch(_Bosl2Base):
method __init__ (line 35) | def __init__(self, size=None, **kwargs):
class get_metric_iso_fine_thread_pitch (line 38) | class get_metric_iso_fine_thread_pitch(_Bosl2Base):
method __init__ (line 39) | def __init__(self, size=None, **kwargs):
class get_metric_iso_superfine_thread_pitch (line 42) | class get_metric_iso_superfine_thread_pitch(_Bosl2Base):
method __init__ (line 43) | def __init__(self, size=None, **kwargs):
class get_metric_jis_thread_pitch (line 46) | class get_metric_jis_thread_pitch(_Bosl2Base):
method __init__ (line 47) | def __init__(self, size=None, **kwargs):
class get_metric_nut_size (line 50) | class get_metric_nut_size(_Bosl2Base):
method __init__ (line 51) | def __init__(self, size=None, **kwargs):
class get_metric_nut_thickness (line 54) | class get_metric_nut_thickness(_Bosl2Base):
method __init__ (line 55) | def __init__(self, size=None, **kwargs):
class generic_screw (line 58) | class generic_screw(_Bosl2Base):
method __init__ (line 59) | def __init__(self, screwsize=None, screwlen=None, headsize=None, headl...
class metric_bolt (line 62) | class metric_bolt(_Bosl2Base):
method __init__ (line 63) | def __init__(self, headtype=None, size=None, l=None, shank=None, pitch...
class metric_nut (line 66) | class metric_nut(_Bosl2Base):
method __init__ (line 67) | def __init__(self, size=None, hole=None, pitch=None, details=None, fla...
FILE: solid2/extensions/bosl2/miscellaneous.py
class extrude_from_to (line 9) | class extrude_from_to(_Bosl2Base):
method __init__ (line 10) | def __init__(self, pt1=None, pt2=None, convexity=None, twist=None, sca...
class path_extrude2d (line 13) | class path_extrude2d(_Bosl2Base):
method __init__ (line 14) | def __init__(self, path=None, caps=None, closed=None, s=None, convexit...
class path_extrude (line 17) | class path_extrude(_Bosl2Base):
method __init__ (line 18) | def __init__(self, path=None, convexity=None, clipsize=None, **kwargs):
class cylindrical_extrude (line 21) | class cylindrical_extrude(_Bosl2Base):
method __init__ (line 22) | def __init__(self, ir=None, _or=None, od=None, id=None, size=None, con...
class bounding_box (line 25) | class bounding_box(_Bosl2Base):
method __init__ (line 26) | def __init__(self, excess=None, planar=None, **kwargs):
class chain_hull (line 29) | class chain_hull(_Bosl2Base):
method __init__ (line 30) | def __init__(self, **kwargs):
class minkowski_difference (line 33) | class minkowski_difference(_Bosl2Base):
method __init__ (line 34) | def __init__(self, planar=None, **kwargs):
class offset3d (line 37) | class offset3d(_Bosl2Base):
method __init__ (line 38) | def __init__(self, r=None, size=None, convexity=None, **kwargs):
class round3d (line 41) | class round3d(_Bosl2Base):
method __init__ (line 42) | def __init__(self, r=None, _or=None, ir=None, size=None, **kwargs):
FILE: solid2/extensions/bosl2/modular_hose.py
class modular_hose (line 12) | class modular_hose(_Bosl2Base):
method __init__ (line 13) | def __init__(self, size=None, type=None, clearance=None, waist_len=Non...
method __init__ (line 21) | def __init__(self, size=None, type=None, clearance=None, waist_len=Non...
class modular_hose_radius (line 16) | class modular_hose_radius(_Bosl2Base):
method __init__ (line 17) | def __init__(self, size=None, outer=None, **kwargs):
class modular_hose (line 20) | class modular_hose(_Bosl2Base):
method __init__ (line 13) | def __init__(self, size=None, type=None, clearance=None, waist_len=Non...
method __init__ (line 21) | def __init__(self, size=None, type=None, clearance=None, waist_len=Non...
FILE: solid2/extensions/bosl2/mutators.py
class bounding_box (line 9) | class bounding_box(_Bosl2Base):
method __init__ (line 10) | def __init__(self, excess=None, planar=None, **kwargs):
class chain_hull (line 13) | class chain_hull(_Bosl2Base):
method __init__ (line 14) | def __init__(self, **kwargs):
class path_extrude2d (line 17) | class path_extrude2d(_Bosl2Base):
method __init__ (line 18) | def __init__(self, path=None, caps=None, closed=None, s=None, convexit...
class cylindrical_extrude (line 21) | class cylindrical_extrude(_Bosl2Base):
method __init__ (line 22) | def __init__(self, ir=None, _or=None, od=None, id=None, size=None, con...
class extrude_from_to (line 25) | class extrude_from_to(_Bosl2Base):
method __init__ (line 26) | def __init__(self, pt1=None, pt2=None, convexity=None, twist=None, sca...
class path_extrude (line 29) | class path_extrude(_Bosl2Base):
method __init__ (line 30) | def __init__(self, path=None, convexity=None, clipsize=None, **kwargs):
class minkowski_difference (line 33) | class minkowski_difference(_Bosl2Base):
method __init__ (line 34) | def __init__(self, planar=None, **kwargs):
class offset3d (line 37) | class offset3d(_Bosl2Base):
method __init__ (line 38) | def __init__(self, r=None, size=None, convexity=None, **kwargs):
class round3d (line 41) | class round3d(_Bosl2Base):
method __init__ (line 42) | def __init__(self, r=None, _or=None, ir=None, size=None, **kwargs):
FILE: solid2/extensions/bosl2/nema_steppers.py
class nema_motor_info (line 9) | class nema_motor_info(_Bosl2Base):
method __init__ (line 10) | def __init__(self, size=None, **kwargs):
class nema_stepper_motor (line 13) | class nema_stepper_motor(_Bosl2Base):
method __init__ (line 14) | def __init__(self, size=None, h=None, shaft_len=None, details=None, at...
class nema_mount_mask (line 17) | class nema_mount_mask(_Bosl2Base):
method __init__ (line 18) | def __init__(self, size=None, depth=None, l=None, atype=None, anchor=N...
FILE: solid2/extensions/bosl2/nurbs.py
class nurbs_curve (line 9) | class nurbs_curve(_Bosl2Base):
method __init__ (line 10) | def __init__(self, control=None, degree=None, splinesteps=None, u=None...
class _nurbs_pt (line 13) | class _nurbs_pt(_Bosl2Base):
method __init__ (line 14) | def __init__(self, knot=None, control=None, u=None, r=None, p=None, k=...
class _extend_knot_mult (line 17) | class _extend_knot_mult(_Bosl2Base):
method __init__ (line 18) | def __init__(self, mult=None, next=None, len=None, **kwargs):
class _extend_knot_vector (line 21) | class _extend_knot_vector(_Bosl2Base):
method __init__ (line 22) | def __init__(self, knots=None, next=None, len=None, **kwargs):
class _calc_mult (line 25) | class _calc_mult(_Bosl2Base):
method __init__ (line 26) | def __init__(self, knots=None, **kwargs):
class is_nurbs_patch (line 29) | class is_nurbs_patch(_Bosl2Base):
method __init__ (line 30) | def __init__(self, x=None, **kwargs):
class nurbs_patch_points (line 33) | class nurbs_patch_points(_Bosl2Base):
method __init__ (line 34) | def __init__(self, patch=None, degree=None, splinesteps=None, u=None, ...
class nurbs_vnf (line 37) | class nurbs_vnf(_Bosl2Base):
method __init__ (line 38) | def __init__(self, patch=None, degree=None, splinesteps=None, weights=...
class debug_nurbs (line 41) | class debug_nurbs(_Bosl2Base):
method __init__ (line 42) | def __init__(self, control=None, degree=None, splinesteps=None, width=...
FILE: solid2/extensions/bosl2/openscad.py
class union (line 3) | class union(_Bosl2Base):
method __init__ (line 4) | def __init__(self, **kwargs):
class difference (line 7) | class difference(_Bosl2Base):
method __init__ (line 8) | def __init__(self, **kwargs):
class intersection (line 11) | class intersection(_Bosl2Base):
method __init__ (line 12) | def __init__(self, **kwargs):
class intersection_for (line 15) | class intersection_for(_Bosl2Base):
method __init__ (line 16) | def __init__(self, n=None, **kwargs):
class translate (line 19) | class translate(_Bosl2Base):
method __init__ (line 20) | def __init__(self, v=None, **kwargs):
class scale (line 23) | class scale(_Bosl2Base):
method __init__ (line 24) | def __init__(self, v=None, **kwargs):
class rotate (line 27) | class rotate(_Bosl2Base):
method __init__ (line 28) | def __init__(self, a=None, v=None, **kwargs):
class mirror (line 31) | class mirror(_Bosl2Base):
method __init__ (line 32) | def __init__(self, v=None, **kwargs):
class resize (line 35) | class resize(_Bosl2Base):
method __init__ (line 36) | def __init__(self, newsize=None, auto=None, **kwargs):
class color (line 39) | class color(_Bosl2Base):
method __init__ (line 40) | def __init__(self, c=None, alpha=None, **kwargs):
class minkowski (line 43) | class minkowski(_Bosl2Base):
method __init__ (line 44) | def __init__(self, **kwargs):
class offset (line 47) | class offset(_Bosl2Base):
Condensed preview — 142 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (835K chars).
[
{
"path": ".gitignore",
"chars": 176,
"preview": ".idea\n*.scad\n*.pyc\n*.pyo\n.installed.cfg\ndist\nbin\ndevelop-eggs\n*.egg-info\ndist\ndownloads\neggs\nparts\n*.egg-info\nlib\nlib64\n"
},
{
"path": ".gitmodules",
"chars": 237,
"preview": "[submodule \"solid2/libs/BOSL2\"]\n\tpath = solid2/extensions/bosl2/BOSL2\n\turl = git@github.com:revarbat/BOSL2.git\n[submodul"
},
{
"path": "Doc/Makefile",
"chars": 6782,
"preview": "# Makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS =\nSPHINXBUILD "
},
{
"path": "Doc/conf.py",
"chars": 8323,
"preview": "#!/usr/bin/env python2.7\n# -*- coding: utf-8 -*-\n#\n# SolidPython documentation build configuration file, created by\n# sp"
},
{
"path": "Doc/index.rst",
"chars": 668,
"preview": ".. SolidPython documentation master file, created by\n sphinx-quickstart on Thu May 1 19:55:31 2014.\n You can adapt "
},
{
"path": "Doc/make.bat",
"chars": 6469,
"preview": "@ECHO OFF\n\nREM Command file for Sphinx documentation\n\nif \"%SPHINXBUILD%\" == \"\" (\n\tset SPHINXBUILD=sphinx-build\n)\nset BUI"
},
{
"path": "README.rst",
"chars": 2837,
"preview": "SolidPython\n===========\n \nOpenSCAD for Python\n-------------------\n\nSolidPython is a generalization of Phillip Tiefenba"
},
{
"path": "pyproject.toml",
"chars": 1116,
"preview": "[tool.poetry]\nname = \"solidpython2\"\nversion = \"2.1.3\"\ndescription = \"Python interface to the OpenSCAD declarative geomet"
},
{
"path": "solid2/__init__.py",
"chars": 158,
"preview": "#only import the external interface!\n\nfrom .core import *\n\nfrom .extensions.greedy_scad_interface import *\nfrom .extensi"
},
{
"path": "solid2/config.py",
"chars": 1931,
"preview": "#this is global config file for exp_solid\nfrom pathlib import Path\nimport os\nimport platform\nimport sys\nimport re\n\nclass"
},
{
"path": "solid2/core/__init__.py",
"chars": 463,
"preview": "#only import the external interface!\nfrom .builtins import *\n\nfrom .scad_render import scad_render,\\\n "
},
{
"path": "solid2/core/builtins/__init__.py",
"chars": 87,
"preview": "from .primitives import *\nfrom .convenience import *\n\nfrom . import openscad_functions\n"
},
{
"path": "solid2/core/builtins/convenience.py",
"chars": 3861,
"preview": "import numbers\nfrom ...config import config as _config\nfrom ..object_base import ObjectBase as _ObjectBase,\\\n "
},
{
"path": "solid2/core/builtins/implicit.primitives",
"chars": 1040,
"preview": "module sphere(r=default, d=default);\nmodule cube(size=default, center=default, r=default, x=default, y=default, z=defaul"
},
{
"path": "solid2/core/builtins/openscad.mutators",
"chars": 754,
"preview": "module translate(v);\nmodule scale(v);\nmodule rotate(a=default, v=default);\nmodule mirror(v);\nmodule resize(newsize, auto"
},
{
"path": "solid2/core/builtins/openscad.primitives",
"chars": 1968,
"preview": "module union();\nmodule difference();\nmodule intersection();\nmodule intersection_for(n);\n\nmodule translate(v);\nmodule sca"
},
{
"path": "solid2/core/builtins/openscad_functions.py",
"chars": 1493,
"preview": "\ndef _base_fn(name, *args):\n from solid2.core.object_base import scad_inline as scad_inline\n from solid2.core.util"
},
{
"path": "solid2/core/builtins/openscad_primitives.py",
"chars": 25643,
"preview": "from ..object_base import OpenSCADObject as _OpenSCADObject, \\\n BareOpenSCADObject as _BareOpen"
},
{
"path": "solid2/core/builtins/primitives.py",
"chars": 367,
"preview": "from ..scad_import import use as _use\nfrom ...config import config as _config\nfrom pathlib import Path as _Path\n\n# This "
},
{
"path": "solid2/core/extension_manager.py",
"chars": 2020,
"preview": "\nclass ExtensionManager():\n def __init__(self):\n self.wrapper = []\n self.pre_render = []\n self.p"
},
{
"path": "solid2/core/object_base/__init__.py",
"chars": 32,
"preview": "from .object_base_impl import *\n"
},
{
"path": "solid2/core/object_base/access_syntax_mixin.py",
"chars": 3939,
"preview": "from ...config import config\n\ndef builtins():\n from .. import builtins\n return builtins\n\nclass AccessSyntaxMixin:\n"
},
{
"path": "solid2/core/object_base/object_base_impl.py",
"chars": 6602,
"preview": "from .access_syntax_mixin import AccessSyntaxMixin\nfrom .operator_mixin import OperatorMixin\n\n#don't do relative imports"
},
{
"path": "solid2/core/object_base/operator_mixin.py",
"chars": 2262,
"preview": "\nclass OperatorMixin:\n def _union_op(self, x, unionType):\n \"\"\"\n This makes u = a+b identical to:\n "
},
{
"path": "solid2/core/object_factory.py",
"chars": 3994,
"preview": "from .object_base import OpenSCADObject\nfrom .utils import escape_openscad_identifier\n\n# =========================\n# = c"
},
{
"path": "solid2/core/parse_scad.py",
"chars": 3524,
"preview": "import hashlib\nimport pickle\nfrom functools import partial\nfrom pathlib import Path\nfrom collections import namedtuple\n\n"
},
{
"path": "solid2/core/scad_import.py",
"chars": 5489,
"preview": "from types import SimpleNamespace\nimport inspect\n\nfrom .utils import resolve_scad_filename, escape_openscad_identifier\nf"
},
{
"path": "solid2/core/scad_render.py",
"chars": 3133,
"preview": "from pathlib import Path\n\nfrom .scad_import import module_cache_by_resolved_filename, extra_scad_includes\nfrom ..config "
},
{
"path": "solid2/core/utils.py",
"chars": 2037,
"preview": "import keyword\nimport re\nimport textwrap\nfrom pathlib import Path\n\nfrom ..config import config\n\n#don't do relative impor"
},
{
"path": "solid2/examples/01-basics.py",
"chars": 597,
"preview": "#! /usr/bin/env python\n\nfrom solid2 import cube, sphere, difference, set_global_fn\n\nset_global_fn(72)\n\ndifference()(\n "
},
{
"path": "solid2/examples/02-vars-and-operators.py",
"chars": 815,
"preview": "#! /usr/bin/env python\n\nfrom solid2 import cube, sphere\n\n# you can store any \"openscad object\" in a regular variable. No"
},
{
"path": "solid2/examples/03-debug-background.py",
"chars": 687,
"preview": "#! /usr/bin/env python\n\nfrom solid2 import cube, sphere, cylinder, background, debug\n\nc = cube([10, 20, 30])\n\ns = debug("
},
{
"path": "solid2/examples/04-convenience.py",
"chars": 1309,
"preview": "#! /usr/bin/env python\n\nfrom solid2 import cube, sphere, rotate, down, forward\n\n# the convenience module defines some co"
},
{
"path": "solid2/examples/05-access-style-syntax.py",
"chars": 923,
"preview": "#! /usr/bin/env python\n\nfrom solid2 import cube, sphere\n\n# Since I don't like the OpenSCAD syntax I added \"access-style\""
},
{
"path": "solid2/examples/06-functions.py",
"chars": 1129,
"preview": "#! /usr/bin/env python\n\nfrom solid2 import cylinder, cube\n\n# as soon as the objects get more sophisticated it makes sens"
},
{
"path": "solid2/examples/07-libs-bosl2-attachable.py",
"chars": 583,
"preview": "from solid2.extensions.bosl2 import cube, sphere, xcyl, union, xcopies, \\\n attachable"
},
{
"path": "solid2/examples/07-libs-bosl2-logo.py",
"chars": 3450,
"preview": "# include <BOSL2/std.scad>\n# include <BOSL2/gears.scad>\n# include <BOSL2/beziers.scad>\n# include <BOSL2/screws.scad>\n# i"
},
{
"path": "solid2/examples/07-libs-bosl2.py",
"chars": 1876,
"preview": "#! /usr/bin/env python\n\nfrom solid2.extensions.bosl2 import circle, cuboid, sphere, cylinder, \\\n "
},
{
"path": "solid2/examples/07-libs.x.py",
"chars": 527,
"preview": "#! /usr/bin/env python\n\nfrom solid2 import import_scad\n\n# you can use OpenSCAD libraries in SolidPython. This examples n"
},
{
"path": "solid2/examples/08-extensions.py",
"chars": 2838,
"preview": "#! /usr/bin/env python\n\nfrom solid2 import cube, register_access_syntax, register_pre_render\n\nfrom solid2.core.object_ba"
},
{
"path": "solid2/examples/09-code-attach-extension.py",
"chars": 1579,
"preview": "#! /usr/bin/env python\n\nfrom pathlib import Path\n\nfrom solid2 import cube, register_post_render\n\n# =============\n# = Ext"
},
{
"path": "solid2/examples/10-customizer.py",
"chars": 1042,
"preview": "#! /usr/bin/env python\n\nfrom solid2 import cube, text, translate, union, scad_render_to_file, scad_inline, \\\n "
},
{
"path": "solid2/examples/11-font/LICENSE_README",
"chars": 158,
"preview": "RichEatin.otf is from:\n https://fontlibrary.org/en/font/rich-eatin\n\nAuthor: Cos Ryan\n\nLicense: CC BY\n https://creative"
},
{
"path": "solid2/examples/11-fonts.x.py",
"chars": 243,
"preview": "#! /usr/bin/env python\n\nfrom solid2 import text, register_font, set_global_viewport_translation\n\nregister_font(\"11-font/"
},
{
"path": "solid2/examples/12-animation.py",
"chars": 604,
"preview": "#! /usr/bin/env python\n\nfrom solid2 import cube, scad_render_to_file, \\\n set_global_viewport_translati"
},
{
"path": "solid2/examples/13-animated-bouncing-ball.py",
"chars": 2320,
"preview": "#! /usr/bin/env python\n\nfrom solid2 import sphere, cube, translate, background, \\\n scad_inline, scad_r"
},
{
"path": "solid2/examples/14-implicitCAD.x.py",
"chars": 1473,
"preview": "#! /usr/bin/env python\n\n# run extopenscad with -r 2 to get proper results:\n# extopenscad -r 2 examples/14-implicit"
},
{
"path": "solid2/examples/15-implicitCAD2.x.py",
"chars": 2096,
"preview": "#! /usr/bin/env python\n\nimport sys\nsys.argv.append(\"--implicit\")\n\nfrom solid2 import square, circle, cylinder, \\\n "
},
{
"path": "solid2/examples/16-mazebox-bosl2.py",
"chars": 1140,
"preview": "#! /usr/bin/env python\n\n# this is a basic \"a mazing box\" (mazebox), just tried to reimplement it with\n# bosl2. It's base"
},
{
"path": "solid2/examples/17-greedy-scad-interface.py",
"chars": 2847,
"preview": "#! /usr/bin/env python\n\nfrom solid2 import cube, sphere, color, ScadValue, translate, \\\n openscad_func"
},
{
"path": "solid2/examples/18-scad-control-structures.py",
"chars": 465,
"preview": "from solid2 import CustomizerDropdownVariable, \\\n CustomizerSliderVariable, \\\n cube,"
},
{
"path": "solid2/extensions/__init__.py",
"chars": 1,
"preview": "\n"
},
{
"path": "solid2/extensions/bosl2/__init__.py",
"chars": 216,
"preview": "from ...config import config as _config\n\nif _config.use_implicit_builtins:\n raise Exception(\"ExpSolid: unfortunately "
},
{
"path": "solid2/extensions/bosl2/affine.py",
"chars": 3302,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/attachments.py",
"chars": 19199,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/ball_bearings.py",
"chars": 972,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/beziers.py",
"chars": 8380,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/bosl2_access_syntax_mixin.py",
"chars": 18310,
"preview": "\nfrom solid2.core.object_base import AccessSyntaxMixin as _AccessSyntaxMixin\n\nclass Bosl2AccessSyntaxMixin(_AccessSyntax"
},
{
"path": "solid2/extensions/bosl2/bosl2_base.py",
"chars": 1002,
"preview": "from solid2.core.object_base.object_base_impl import BareOpenSCADObject\nfrom solid2.core.object_base.operator_mixin impo"
},
{
"path": "solid2/extensions/bosl2/bosl2_patches.py",
"chars": 829,
"preview": "__nothing__ = None\n\nfrom .bosl2_base import Bosl2Base\nfrom .std import union, attachable\n\n#============ attachable add ="
},
{
"path": "solid2/extensions/bosl2/bottlecaps.py",
"chars": 11360,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/color.py",
"chars": 2728,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/comparisons.py",
"chars": 7554,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/constants.py",
"chars": 1379,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/coords.py",
"chars": 2994,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/cubetruss.py",
"chars": 3601,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/distributors.py",
"chars": 10771,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/drawing.py",
"chars": 9374,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/fnliterals.py",
"chars": 12638,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/gears.py",
"chars": 29662,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/geometry.py",
"chars": 19887,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/hinges.py",
"chars": 5184,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/isosurface.py",
"chars": 26747,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/joiners.py",
"chars": 10063,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/linalg.py",
"chars": 5610,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/linear_bearings.py",
"chars": 1813,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/lists.py",
"chars": 6930,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/masks2d.py",
"chars": 6889,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/masks3d.py",
"chars": 8519,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/math.py",
"chars": 13002,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/metric_screws.py",
"chars": 3798,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/miscellaneous.py",
"chars": 2322,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/modular_hose.py",
"chars": 1379,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/mutators.py",
"chars": 2317,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/nema_steppers.py",
"chars": 1171,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/nurbs.py",
"chars": 2927,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/openscad.py",
"chars": 6047,
"preview": "from .bosl2_base import Bosl2Base as _Bosl2Base\n\nclass union(_Bosl2Base):\n def __init__(self, **kwargs):\n super"
},
{
"path": "solid2/extensions/bosl2/partitions.py",
"chars": 4287,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/paths.py",
"chars": 8524,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/polyhedra.py",
"chars": 3467,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/regions.py",
"chars": 8485,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/rounding.py",
"chars": 25911,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/screw_drive.py",
"chars": 3184,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/screws.py",
"chars": 14606,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/shapes2d.py",
"chars": 18135,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/shapes3d.py",
"chars": 39126,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/skin.py",
"chars": 23274,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/sliders.py",
"chars": 1649,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/std.py",
"chars": 813,
"preview": "from .openscad import *\nfrom .version import *\nfrom .constants import *\nfrom .transforms import *\nfrom .distributors imp"
},
{
"path": "solid2/extensions/bosl2/strings.py",
"chars": 7374,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/structs.py",
"chars": 1704,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/threading.py",
"chars": 37862,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/transforms.py",
"chars": 9466,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/trigonometry.py",
"chars": 4768,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/tripod_mounts.py",
"chars": 593,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/turtle3d.py",
"chars": 3042,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/utility.py",
"chars": 8061,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/vectors.py",
"chars": 5005,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/version.py",
"chars": 1754,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/vnf.py",
"chars": 14967,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/walls.py",
"chars": 4248,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2/wiring.py",
"chars": 1027,
"preview": "from solid2.core.object_base import OpenSCADConstant as _OpenSCADConstant\nfrom solid2.core.scad_import import extra_scad"
},
{
"path": "solid2/extensions/bosl2_generator.py",
"chars": 3777,
"preview": "#! /usr/bin/env python\n\nfrom pathlib import Path\n\nfrom solid2.core.utils import escape_openscad_identifier as escape\nfro"
},
{
"path": "solid2/extensions/greedy_scad_interface/__init__.py",
"chars": 381,
"preview": "from .customizer_widgets import CustomizerCheckboxVariable,\\\n CustomizerDropdownVariable,"
},
{
"path": "solid2/extensions/greedy_scad_interface/customizer_widgets.py",
"chars": 1647,
"preview": "from .scad_variable import ScadVariable\n\nclass CustomizerDropdownVariable(ScadVariable):\n def __init__(self, name, de"
},
{
"path": "solid2/extensions/greedy_scad_interface/scad_interface.py",
"chars": 1107,
"preview": "from solid2 import register_pre_render as _register_pre_render\nfrom .scad_variable import ScadVariable as _ScadVariable,"
},
{
"path": "solid2/extensions/greedy_scad_interface/scad_variable.py",
"chars": 1034,
"preview": "from solid2.core.object_base import OpenSCADConstant\nfrom ...core.utils import py2openscad\n\nclass ScadValue(OpenSCADCons"
},
{
"path": "solid2/extensions/openscad_extension_generator.py",
"chars": 3623,
"preview": "#! /usr/bin/env python\n\nfrom pathlib import Path\n\nfrom solid2.core.utils import escape_openscad_identifier as escape\nfro"
},
{
"path": "solid2/extensions/scad_control_structures.py",
"chars": 748,
"preview": "from solid2 import ScadValue as _ScadValue, \\\n scad_inline as _scad_inline, \\\n union"
},
{
"path": "solid2/libs/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "tests/examples_scad/.gitignore",
"chars": 14,
"preview": "*.png\n!*.scad\n"
},
{
"path": "tests/examples_scad/01-basics.scad",
"chars": 73,
"preview": "$fn = 72;\n\ndifference() {\n\tcube(size = [10, 20, 30]);\n\tsphere(r = 10);\n}\n"
},
{
"path": "tests/examples_scad/02-vars-and-operators.scad",
"chars": 62,
"preview": "difference() {\n\tcube(size = [10, 20, 30]);\n\tsphere(r = 10);\n}\n"
},
{
"path": "tests/examples_scad/03-debug-background.scad",
"chars": 106,
"preview": "union() {\n\tdifference() {\n\t\tcube(size = [10, 20, 30]);\n\t\t#sphere(r = 10);\n\t}\n\t%cylinder(h = 30, r = 4);\n}\n"
},
{
"path": "tests/examples_scad/04-convenience.scad",
"chars": 162,
"preview": "difference() {\n\trotate(a = [45, 45, 45]) {\n\t\ttranslate(v = [0, 0, -5]) {\n\t\t\tcube(size = [10, 20, 30]);\n\t\t}\n\t}\n\t#translat"
},
{
"path": "tests/examples_scad/05-access-style-syntax.scad",
"chars": 162,
"preview": "difference() {\n\trotate(a = [45, 45, 45]) {\n\t\ttranslate(v = [0, 0, -5]) {\n\t\t\tcube(size = [10, 20, 30]);\n\t\t}\n\t}\n\t#translat"
},
{
"path": "tests/examples_scad/06-functions.scad",
"chars": 1211,
"preview": "union() {\n\tcube(center = true, size = [100, 250, 50]);\n\ttranslate(v = [0, 0, 50]) {\n\t\tdifference() {\n\t\t\tcube(center = tr"
},
{
"path": "tests/examples_scad/07-libs-bosl2-attachable.scad",
"chars": 2216,
"preview": "include <../../solid2/extensions/bosl2/BOSL2/version.scad>;\ninclude <../../solid2/extensions/bosl2/BOSL2/constants.scad>"
},
{
"path": "tests/examples_scad/07-libs-bosl2-logo.scad",
"chars": 3626,
"preview": "include <../../solid2/extensions/bosl2/BOSL2/version.scad>;\ninclude <../../solid2/extensions/bosl2/BOSL2/constants.scad>"
},
{
"path": "tests/examples_scad/07-libs-bosl2.scad",
"chars": 54378,
"preview": "include <../../solid2/extensions/bosl2/BOSL2/version.scad>;\ninclude <../../solid2/extensions/bosl2/BOSL2/constants.scad>"
},
{
"path": "tests/examples_scad/07-libs.scad",
"chars": 132,
"preview": "use <../../../../../.local/share/OpenSCAD/libraries/BOSL/metric_screws.scad>;\n\n\n\n\n\nmetric_bolt(headtype = \"hex\", l = 20,"
},
{
"path": "tests/examples_scad/08-extensions.scad",
"chars": 328,
"preview": "//the root tree contains 2 non sense comment(s)\n\nunion() {\n\t//non sense comment\n\tcolor(c = \"red\") {\n\t\ttranslate(v = [0, "
},
{
"path": "tests/examples_scad/09-code-attach-extension.scad",
"chars": 1653,
"preview": "cube(size = 10);\n/* Generated from the following ExpSolid code:\n\n#! /usr/bin/env python\n\nfrom pathlib import Path\n\nfrom "
},
{
"path": "tests/examples_scad/10-customizer.scad",
"chars": 360,
"preview": "objects = 4; //[2, 4, 6]\nside = 4; //[]\ncube_pos = [5, 5, 5]; //[]\ncube_size = 5; //[]\ntext = \"customize me!\"; //[custom"
},
{
"path": "tests/examples_scad/11-fonts.scad",
"chars": 109,
"preview": "use <../../11-font/RichEatin.otf>\n>;\n\n$vpt = [700, 900, 200];\n\ntext(font = \"Rich Eatin'\", text = \"blablub\");\n"
},
{
"path": "tests/examples_scad/12-animation.scad",
"chars": 130,
"preview": "rotation_speed = 1.0; //[]\n$vpt = [4, 3, 15];\n$vpr = [60, 0, ((rotation_speed * $t) * 360)];\n$vpd = 100;\n\ncube(size = ($"
},
{
"path": "tests/examples_scad/13-animated-bouncing-ball.scad",
"chars": 51132,
"preview": "$vpt = [700, 900, 200];\n$vpr = [80, 0, 20];\n$vpd = 6000;\nbouncing_ball_data = [[4.975, 4.975, 191.04], [9.925125, 9.9251"
},
{
"path": "tests/examples_scad/16-mazebox-bosl2.scad",
"chars": 9821,
"preview": "include <../../solid2/extensions/bosl2/BOSL2/version.scad>;\ninclude <../../solid2/extensions/bosl2/BOSL2/constants.scad>"
},
{
"path": "tests/examples_scad/17-greedy-scad-interface.scad",
"chars": 521,
"preview": "$fn = 32;\n$vpd = ((abs(sin(($t * 360))) * 10) + 5);\n$vpt = [0, -1, 0];\n$vpr = [63, 0, ($t * 360)];\n$vpf = 25;\n/* [Colors"
},
{
"path": "tests/examples_test.py",
"chars": 2531,
"preview": "import os\nimport platform\nimport unittest\nimport shutil\nimport subprocess\nimport re\nfrom pathlib import Path\n\n\nclass Exa"
},
{
"path": "tests/run_tests.py",
"chars": 130,
"preview": "#! /usr/bin/env python\nfrom examples_test import ExamplesTest\n\nif __name__ == \"__main__\":\n import unittest\n unitte"
}
]
// ... and 1 more files (download for full content)
About this extraction
This page contains the full source code of the jeff-dh/SolidPython GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 142 files (769.0 KB), approximately 261.3k tokens, and a symbol index with 3785 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.