pax_global_header00006660000000000000000000000064131357563370014527gustar00rootroot0000000000000052 comment=75320b19e8a8b55a3eb97cdae07dc8742b88f067 numpy-stl-2.3.2/000077500000000000000000000000001313575633700135035ustar00rootroot00000000000000numpy-stl-2.3.2/.codeclimate.yml000066400000000000000000000001741313575633700165570ustar00rootroot00000000000000languages: Ruby: true JavaScript: true PHP: true Python: true exclude_paths: - 'tests/*' - 'docs/*' numpy-stl-2.3.2/.coveragerc000066400000000000000000000003751313575633700156310ustar00rootroot00000000000000[report] fail_under = 100 exclude_lines = pragma: no cover def __repr__ if self.debug: if settings.DEBUG raise AssertionError raise NotImplementedError if 0: if __name__ == .__main__.: [run] source = stl branch = True numpy-stl-2.3.2/.github/000077500000000000000000000000001313575633700150435ustar00rootroot00000000000000numpy-stl-2.3.2/.github/stale.yml000066400000000000000000000013331313575633700166760ustar00rootroot00000000000000# Number of days of inactivity before an issue becomes stale daysUntilStale: 60 # Number of days of inactivity before a stale issue is closed daysUntilClose: 7 # Issues with these labels will never be considered stale exemptLabels: - in-progress - help-wanted - pinned - security - enhancement # Label to use when marking an issue as stale staleLabel: no-activity # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. # Comment to post when closing a stale issue. Set to `false` to disable closeComment: false numpy-stl-2.3.2/.gitignore000066400000000000000000000001641313575633700154740ustar00rootroot00000000000000build dist docs/_build cover *.egg-info .cache .coverage **/htmlcov **/*.pyc **/*.pyo **/*.so /*.stl /.tox /stl/*.c numpy-stl-2.3.2/.travis.yml000066400000000000000000000014441313575633700156170ustar00rootroot00000000000000sudo: false language: python python: 3.5 cache: - pip - directory: - .tox/dist - .tox/distshare env: - TOX_ENV=docs - TOX_ENV=flake8 - TOX_ENV=py27-nix - TOX_ENV=py34-nix - TOX_ENV=py35-nix - TOX_ENV=py36-nix install: - pip install -r tests/requirements.txt - pip install coveralls flake8 tox - pip install -e . script: - tox -e $TOX_ENV after_success: - coveralls before_script: flake8 --ignore=W391 stl tests notifications: email: on_success: never on_failure: change deploy: provider: pypi user: WoLpH password: secure: HVxDUJ6ns7G7xypuibu01ruDfO4orV5lNr1Mor003MX3HVivvKsTwWqY5K1J+J+C4mgK6ahyvanD5GahYvcWia/Y2xeH2VnytnAgo+W3AI+h72+1oaRpvQHynJ7Fz6Mc0zad0GcbQh3QuA7Pu3IOWs7buUL+MQM6d9QLTkerOvs= on: tags: true distributions: bdist_wheel sdist repo: WoLpH/numpy-stl numpy-stl-2.3.2/CONTRIBUTING.rst000066400000000000000000000070231313575633700161460ustar00rootroot00000000000000============ Contributing ============ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. You can contribute in many ways: Types of Contributions ---------------------- Report Bugs ~~~~~~~~~~~ Report bugs at https://github.com/WoLpH/numpy-stl/issues. If you are reporting a bug, please include: * Your operating system name and version. * Any details about your local setup that might be helpful in troubleshooting. * Detailed steps to reproduce the bug. Fix Bugs ~~~~~~~~ Look through the GitHub issues for bugs. Anything tagged with "bug" is open to whoever wants to implement it. Implement Features ~~~~~~~~~~~~~~~~~~ Look through the GitHub issues for features. Anything tagged with "feature" is open to whoever wants to implement it. Write Documentation ~~~~~~~~~~~~~~~~~~~ Python Progressbar could always use more documentation, whether as part of the official Python Progressbar docs, in docstrings, or even on the web in blog posts, articles, and such. Submit Feedback ~~~~~~~~~~~~~~~ The best way to send feedback is to file an issue at https://github.com/WoLpH/numpy-stl/issues. If you are proposing a feature: * Explain in detail how it would work. * Keep the scope as narrow as possible, to make it easier to implement. * Remember that this is a volunteer-driven project, and that contributions are welcome :) Get Started! ------------ Ready to contribute? Here's how to set up `numpy-stl` for local development. 1. Fork the `numpy-stl` repo on GitHub. 2. Clone your fork locally:: $ git clone --branch develop git@github.com:your_name_here/numpy-stl.git numpy_stl 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: $ mkvirtualenv numpy_stl $ cd numpy_stl/ $ pip install -e . 4. Create a branch for local development with `git-flow-avh`_:: $ git-flow feature start name-of-your-bugfix-or-feature Or without git-flow: $ git checkout -b feature/name-of-your-bugfix-or-feature Now you can make your changes locally. 5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:: $ flake8 --ignore=W391 stl tests $ py.test $ tox To get flake8 and tox, just pip install them into your virtualenv using the requirements file. $ pip install -r tests/requirements.txt 6. Commit your changes and push your branch to GitHub with `git-flow-avh`_:: $ git add . $ git commit -m "Your detailed description of your changes." $ git-flow feature publish Or without git-flow: $ git add . $ git commit -m "Your detailed description of your changes." $ git push -u origin feature/name-of-your-bugfix-or-feature 7. Submit a pull request through the GitHub website. Pull Request Guidelines ----------------------- Before you submit a pull request, check that it meets these guidelines: 1. The pull request should include tests. 2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst. 3. The pull request should work for Python 2.7, 3.3, 3.4 and 3.5. Check https://travis-ci.org/WoLpH/numpy-stl/pull_requests and make sure that the tests pass for all supported Python versions. Tips ---- To run a subset of tests:: $ py.test tests/some_test.py .. _git-flow-avh: https://github.com/petervanderdoes/gitflow numpy-stl-2.3.2/LICENSE000066400000000000000000000027451313575633700145200ustar00rootroot00000000000000Copyright (c) 2016, Rick van Hattem All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. numpy-stl-2.3.2/MANIFEST.in000066400000000000000000000004061313575633700152410ustar00rootroot00000000000000# Include all documentation files include-recursive *.rst include stl/*.pyx include stl/*.c include LICENSE # Include docs and tests graft tests graft docs # Skip compiled python files global-exclude *.py[co] # Remove all build directories prune docs/_build numpy-stl-2.3.2/README.rst000066400000000000000000000320021313575633700151670ustar00rootroot00000000000000numpy-stl ============================================================================== Simple library to make working with STL files (and 3D objects in general) fast and easy. Due to all operations heavily relying on `numpy` this is one of the fastest STL editing libraries for Python available. Links ----- - The source: https://github.com/WoLpH/numpy-stl - Project page: https://pypi.python.org/pypi/numpy-stl - Reporting bugs: https://github.com/WoLpH/numpy-stl/issues - Documentation: http://numpy-stl.readthedocs.org/en/latest/ - My blog: https://wol.ph/ Requirements for installing: ------------------------------------------------------------------------------ - `numpy`_ any recent version - `python-utils`_ version 1.6 or greater Installation: ------------------------------------------------------------------------------ `pip install numpy-stl` Initial usage: ------------------------------------------------------------------------------ - `stl2bin your_ascii_stl_file.stl new_binary_stl_file.stl` - `stl2ascii your_binary_stl_file.stl new_ascii_stl_file.stl` - `stl your_ascii_stl_file.stl new_binary_stl_file.stl` Contributing: ------------------------------------------------------------------------------ Contributions are always welcome. Please view the guidelines to get started: https://github.com/WoLpH/numpy-stl/blob/develop/CONTRIBUTING.rst Quickstart ------------------------------------------------------------------------------ .. code-block:: python import numpy from stl import mesh # Using an existing stl file: your_mesh = mesh.Mesh.from_file('some_file.stl') # Or creating a new mesh (make sure not to overwrite the `mesh` import by # naming it `mesh`): VERTICE_COUNT = 100 data = numpy.zeros(VERTICE_COUNT, dtype=mesh.Mesh.dtype) your_mesh = mesh.Mesh(data, remove_empty_areas=False) # The mesh normals (calculated automatically) your_mesh.normals # The mesh vectors your_mesh.v0, your_mesh.v1, your_mesh.v2 # Accessing individual points (concatenation of v0, v1 and v2 in triplets) assert (your_mesh.points[0][0:3] == your_mesh.v0[0]).all() assert (your_mesh.points[0][3:6] == your_mesh.v1[0]).all() assert (your_mesh.points[0][6:9] == your_mesh.v2[0]).all() assert (your_mesh.points[1][0:3] == your_mesh.v0[1]).all() your_mesh.save('new_stl_file.stl') Plotting using `matplotlib`_ is equally easy: .. code-block:: python from stl import mesh from mpl_toolkits import mplot3d from matplotlib import pyplot # Create a new plot figure = pyplot.figure() axes = mplot3d.Axes3D(figure) # Load the STL files and add the vectors to the plot your_mesh = mesh.Mesh.from_file('tests/stl_binary/HalfDonut.stl') axes.add_collection3d(mplot3d.art3d.Poly3DCollection(your_mesh.vectors)) # Auto scale to the mesh size scale = your_mesh.points.flatten(-1) axes.auto_scale_xyz(scale, scale, scale) # Show the plot to the screen pyplot.show() .. _numpy: http://numpy.org/ .. _matplotlib: http://matplotlib.org/ .. _python-utils: https://github.com/WoLpH/python-utils Modifying Mesh objects ------------------------------------------------------------------------------ .. code-block:: python from stl import mesh import math import numpy # Create 3 faces of a cube data = numpy.zeros(6, dtype=mesh.Mesh.dtype) # Top of the cube data['vectors'][0] = numpy.array([[0, 1, 1], [1, 0, 1], [0, 0, 1]]) data['vectors'][1] = numpy.array([[1, 0, 1], [0, 1, 1], [1, 1, 1]]) # Right face data['vectors'][2] = numpy.array([[1, 0, 0], [1, 0, 1], [1, 1, 0]]) data['vectors'][3] = numpy.array([[1, 1, 1], [1, 0, 1], [1, 1, 0]]) # Left face data['vectors'][4] = numpy.array([[0, 0, 0], [1, 0, 0], [1, 0, 1]]) data['vectors'][5] = numpy.array([[0, 0, 0], [0, 0, 1], [1, 0, 1]]) # Since the cube faces are from 0 to 1 we can move it to the middle by # substracting .5 data['vectors'] -= .5 # Generate 4 different meshes so we can rotate them later meshes = [mesh.Mesh(data.copy()) for _ in range(4)] # Rotate 90 degrees over the Y axis meshes[0].rotate([0.0, 0.5, 0.0], math.radians(90)) # Translate 2 points over the X axis meshes[1].x += 2 # Rotate 90 degrees over the X axis meshes[2].rotate([0.5, 0.0, 0.0], math.radians(90)) # Translate 2 points over the X and Y points meshes[2].x += 2 meshes[2].y += 2 # Rotate 90 degrees over the X and Y axis meshes[3].rotate([0.5, 0.0, 0.0], math.radians(90)) meshes[3].rotate([0.0, 0.5, 0.0], math.radians(90)) # Translate 2 points over the Y axis meshes[3].y += 2 # Optionally render the rotated cube faces from matplotlib import pyplot from mpl_toolkits import mplot3d # Create a new plot figure = pyplot.figure() axes = mplot3d.Axes3D(figure) # Render the cube faces for m in meshes: axes.add_collection3d(mplot3d.art3d.Poly3DCollection(m.vectors)) # Auto scale to the mesh size scale = numpy.concatenate([m.points for m in meshes]).flatten(-1) axes.auto_scale_xyz(scale, scale, scale) # Show the plot to the screen pyplot.show() Extending Mesh objects ------------------------------------------------------------------------------ .. code-block:: python from stl import mesh import math import numpy # Create 3 faces of a cube data = numpy.zeros(6, dtype=mesh.Mesh.dtype) # Top of the cube data['vectors'][0] = numpy.array([[0, 1, 1], [1, 0, 1], [0, 0, 1]]) data['vectors'][1] = numpy.array([[1, 0, 1], [0, 1, 1], [1, 1, 1]]) # Right face data['vectors'][2] = numpy.array([[1, 0, 0], [1, 0, 1], [1, 1, 0]]) data['vectors'][3] = numpy.array([[1, 1, 1], [1, 0, 1], [1, 1, 0]]) # Left face data['vectors'][4] = numpy.array([[0, 0, 0], [1, 0, 0], [1, 0, 1]]) data['vectors'][5] = numpy.array([[0, 0, 0], [0, 0, 1], [1, 0, 1]]) # Since the cube faces are from 0 to 1 we can move it to the middle by # substracting .5 data['vectors'] -= .5 cube_back = mesh.Mesh(data.copy()) cube_front = mesh.Mesh(data.copy()) # Rotate 90 degrees over the X axis followed by the Y axis followed by the # X axis cube_back.rotate([0.5, 0.0, 0.0], math.radians(90)) cube_back.rotate([0.0, 0.5, 0.0], math.radians(90)) cube_back.rotate([0.5, 0.0, 0.0], math.radians(90)) cube = mesh.Mesh(numpy.concatenate([ cube_back.data.copy(), cube_front.data.copy(), ])) # Optionally render the rotated cube faces from matplotlib import pyplot from mpl_toolkits import mplot3d # Create a new plot figure = pyplot.figure() axes = mplot3d.Axes3D(figure) # Render the cube axes.add_collection3d(mplot3d.art3d.Poly3DCollection(cube.vectors)) # Auto scale to the mesh size scale = cube_back.points.flatten(-1) axes.auto_scale_xyz(scale, scale, scale) # Show the plot to the screen pyplot.show() Creating Mesh objects from a list of vertices and faces ------------------------------------------------------------------------------ .. code-block:: python import numpy as np from stl import mesh # Define the 8 vertices of the cube vertices = np.array([\ [-1, -1, -1], [+1, -1, -1], [+1, +1, -1], [-1, +1, -1], [-1, -1, +1], [+1, -1, +1], [+1, +1, +1], [-1, +1, +1]]) # Define the 12 triangles composing the cube faces = np.array([\ [0,3,1], [1,3,2], [0,4,7], [0,7,3], [4,5,6], [4,6,7], [5,1,2], [5,2,6], [2,3,6], [3,7,6], [0,1,5], [0,5,4]]) # Create the mesh cube = mesh.Mesh(np.zeros(faces.shape[0], dtype=mesh.Mesh.dtype)) for i, f in enumerate(faces): for j in range(3): cube.vectors[i][j] = vertices[f[j],:] # Write the mesh to file "cube.stl" cube.save('cube.stl') Evaluating Mesh properties (Volume, Center of gravity, Inertia) ------------------------------------------------------------------------------ .. code-block:: python import numpy as np from stl import mesh # Using an existing closed stl file: your_mesh = mesh.Mesh.from_file('some_file.stl') volume, cog, inertia = your_mesh.get_mass_properties() print("Volume = {0}".format(volume)) print("Position of the center of gravity (COG) = {0}".format(cog)) print("Inertia matrix at expressed at the COG = {0}".format(inertia[0,:])) print(" {0}".format(inertia[1,:])) print(" {0}".format(inertia[2,:])) Combining multiple STL files ------------------------------------------------------------------------------ .. code-block:: python import math import stl from stl import mesh import numpy # find the max dimensions, so we can know the bounding box, getting the height, # width, length (because these are the step size)... def find_mins_maxs(obj): minx = maxx = miny = maxy = minz = maxz = None for p in obj.points: # p contains (x, y, z) if minx is None: minx = p[stl.Dimension.X] maxx = p[stl.Dimension.X] miny = p[stl.Dimension.Y] maxy = p[stl.Dimension.Y] minz = p[stl.Dimension.Z] maxz = p[stl.Dimension.Z] else: maxx = max(p[stl.Dimension.X], maxx) minx = min(p[stl.Dimension.X], minx) maxy = max(p[stl.Dimension.Y], maxy) miny = min(p[stl.Dimension.Y], miny) maxz = max(p[stl.Dimension.Z], maxz) minz = min(p[stl.Dimension.Z], minz) return minx, maxx, miny, maxy, minz, maxz def translate(_solid, step, padding, multiplier, axis): if axis == 'x': items = [0, 3, 6] elif axis == 'y': items = [1, 4, 7] elif axis == 'z': items = [2, 5, 8] for p in _solid.points: # point items are ((x, y, z), (x, y, z), (x, y, z)) for i in range(3): p[items[i]] += (step * multiplier) + (padding * multiplier) def copy_obj(obj, dims, num_rows, num_cols, num_layers): w, l, h = dims copies = [] for layer in range(num_layers): for row in range(num_rows): for col in range(num_cols): # skip the position where original being copied is if row == 0 and col == 0 and layer == 0: continue _copy = mesh.Mesh(obj.data.copy()) # pad the space between objects by 10% of the dimension being # translated if col != 0: translate(_copy, w, w / 10., col, 'x') if row != 0: translate(_copy, l, l / 10., row, 'y') if layer != 0: translate(_copy, h, h / 10., layer, 'z') copies.append(_copy) return copies # Using an existing stl file: main_body = mesh.Mesh.from_file('ball_and_socket_simplified_-_main_body.stl') # rotate along Y main_body.rotate([0.0, 0.5, 0.0], math.radians(90)) minx, maxx, miny, maxy, minz, maxz = find_mins_maxs(main_body) w1 = maxx - minx l1 = maxy - miny h1 = maxz - minz copies = copy_obj(main_body, (w1, l1, h1), 2, 2, 1) # I wanted to add another related STL to the final STL twist_lock = mesh.Mesh.from_file('ball_and_socket_simplified_-_twist_lock.stl') minx, maxx, miny, maxy, minz, maxz = find_mins_maxs(twist_lock) w2 = maxx - minx l2 = maxy - miny h2 = maxz - minz translate(twist_lock, w1, w1 / 10., 3, 'x') copies2 = copy_obj(twist_lock, (w2, l2, h2), 2, 2, 1) combined = mesh.Mesh(numpy.concatenate([main_body.data, twist_lock.data] + [copy.data for copy in copies] + [copy.data for copy in copies2])) combined.save('combined.stl', mode=stl.Mode.ASCII) # save as ASCII numpy-stl-2.3.2/appveyor.yml000066400000000000000000000036571313575633700161060ustar00rootroot00000000000000environment: # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the # /E:ON and /V:ON options are not enabled in the batch script intepreter # See: http://stackoverflow.com/a/13751649/163740 # CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd" matrix: - PYTHON: "C:\\Python27" PYTHON_VERSION: "2.7" PYTHON_ARCH: "32" TOXENV: py27-windows-32 - PYTHON: "C:\\Python27-x64" PYTHON_VERSION: "2.7" PYTHON_ARCH: "64" TOXENV: py27-windows-64 - PYTHON: "C:\\Python34" PYTHON_VERSION: "3.4" PYTHON_ARCH: "32" TOXENV: py34-windows-32 - PYTHON: "C:\\Python34-x64" PYTHON_VERSION: "3.4" PYTHON_ARCH: "64" TOXENV: py34-windows-64 DISTUTILS_USE_SDK: "1" - PYTHON: "C:\\Python35" PYTHON_VERSION: "3.5" PYTHON_ARCH: "32" TOXENV: py35-windows-32 - PYTHON: "C:\\Python35-x64" PYTHON_VERSION: "3.5" PYTHON_ARCH: "64" TOXENV: py35-windows-64 install: # Download setup scripts and unzip # - ps: "wget https://github.com/cloudify-cosmo/appveyor-utils/archive/master.zip -OutFile ./master.zip" # - "7z e master.zip */appveyor/* -oappveyor" # Install Python (from the official .msi of http://python.org) and pip when # not already installed. # - "powershell ./appveyor/install.ps1" # Prepend newly installed Python to the PATH of this build (this cannot be # done from inside the powershell script as it would require to restart # the parent CMD process). # - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" # Check that we have the expected version and architecture for Python - "python --version" - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" build: false # Not a C# project, build stuff at the test step instead. before_test: - build.cmd %PYTHON%\\python.exe -m pip install tox numpy cython" test_script: - build.cmd %PYTHON%\\python.exe -m tox -e %TOXENV%" numpy-stl-2.3.2/build.cmd000066400000000000000000000015261313575633700152730ustar00rootroot00000000000000@echo off :: To build extensions for 64 bit Python 3, we need to configure environment :: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: :: MS Windows SDK for Windows 7 and .NET Framework 4 :: :: More details at: :: https://github.com/cython/cython/wiki/CythonExtensionsOnWindows IF "%DISTUTILS_USE_SDK%"=="1" ( ECHO Configuring environment to build with MSVC on a 64bit architecture ECHO Using Windows SDK 7.1 "C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\WindowsSdkVer.exe" -q -version:v7.1 CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release SET MSSdk=1 REM Need the following to allow tox to see the SDK compiler SET TOX_TESTENV_PASSENV=DISTUTILS_USE_SDK MSSdk INCLUDE LIB ) ELSE ( ECHO Using default MSVC build environment ) CALL %* numpy-stl-2.3.2/docs/000077500000000000000000000000001313575633700144335ustar00rootroot00000000000000numpy-stl-2.3.2/docs/Makefile000066400000000000000000000127201313575633700160750ustar00rootroot00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " 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 " 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/PythonUtils.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PythonUtils.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/PythonUtils" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PythonUtils" @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." 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." numpy-stl-2.3.2/docs/_theme/000077500000000000000000000000001313575633700156745ustar00rootroot00000000000000numpy-stl-2.3.2/docs/_theme/LICENSE000066400000000000000000000035541313575633700167100ustar00rootroot00000000000000Modifications: Copyright (c) 2012 Rick van Hattem. Original Projects: Copyright (c) 2010 Kenneth Reitz. Copyright (c) 2010 by Armin Ronacher. Some rights reserved. Redistribution and use in source and binary forms of the theme, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The names of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission. We kindly ask you to only use these themes in an unmodified manner just for Flask and Flask-related products, not for unrelated projects. If you like the visual style and want to use it for your own projects, please consider making some larger changes to the themes (such as changing font faces, sizes, colors or margins). THIS THEME IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS THEME, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. numpy-stl-2.3.2/docs/_theme/flask_theme_support.py000066400000000000000000000114171313575633700223300ustar00rootroot00000000000000# flasky extensions. flasky pygments style based on tango style from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Whitespace, Punctuation, Other, Literal class FlaskyStyle(Style): background_color = "#f8f8f8" default_style = "" styles = { # No corresponding class for the following: # Text: "", # class: '' Whitespace: "underline #f8f8f8", # class: 'w' Error: "#a40000 border:#ef2929", # class: 'err' Other: "#000000", # class 'x' Comment: "italic #8f5902", # class: 'c' Comment.Preproc: "noitalic", # class: 'cp' Keyword: "bold #004461", # class: 'k' Keyword.Constant: "bold #004461", # class: 'kc' Keyword.Declaration: "bold #004461", # class: 'kd' Keyword.Namespace: "bold #004461", # class: 'kn' Keyword.Pseudo: "bold #004461", # class: 'kp' Keyword.Reserved: "bold #004461", # class: 'kr' Keyword.Type: "bold #004461", # class: 'kt' Operator: "#582800", # class: 'o' Operator.Word: "bold #004461", # class: 'ow' - like keywords Punctuation: "bold #000000", # class: 'p' # because special names such as Name.Class, Name.Function, etc. # are not recognized as such later in the parsing, we choose them # to look the same as ordinary variables. Name: "#000000", # class: 'n' Name.Attribute: "#c4a000", # class: 'na' - to be revised Name.Builtin: "#004461", # class: 'nb' Name.Builtin.Pseudo: "#3465a4", # class: 'bp' Name.Class: "#000000", # class: 'nc' - to be revised Name.Constant: "#000000", # class: 'no' - to be revised Name.Decorator: "#888", # class: 'nd' - to be revised Name.Entity: "#ce5c00", # class: 'ni' Name.Exception: "bold #cc0000", # class: 'ne' Name.Function: "#000000", # class: 'nf' Name.Property: "#000000", # class: 'py' Name.Label: "#f57900", # class: 'nl' Name.Namespace: "#000000", # class: 'nn' - to be revised Name.Other: "#000000", # class: 'nx' Name.Tag: "bold #004461", # class: 'nt' - like a keyword Name.Variable: "#000000", # class: 'nv' - to be revised Name.Variable.Class: "#000000", # class: 'vc' - to be revised Name.Variable.Global: "#000000", # class: 'vg' - to be revised Name.Variable.Instance: "#000000", # class: 'vi' - to be revised Number: "#990000", # class: 'm' Literal: "#000000", # class: 'l' Literal.Date: "#000000", # class: 'ld' String: "#4e9a06", # class: 's' String.Backtick: "#4e9a06", # class: 'sb' String.Char: "#4e9a06", # class: 'sc' String.Doc: "italic #8f5902", # class: 'sd' - like a comment String.Double: "#4e9a06", # class: 's2' String.Escape: "#4e9a06", # class: 'se' String.Heredoc: "#4e9a06", # class: 'sh' String.Interpol: "#4e9a06", # class: 'si' String.Other: "#4e9a06", # class: 'sx' String.Regex: "#4e9a06", # class: 'sr' String.Single: "#4e9a06", # class: 's1' String.Symbol: "#4e9a06", # class: 'ss' Generic: "#000000", # class: 'g' Generic.Deleted: "#a40000", # class: 'gd' Generic.Emph: "italic #000000", # class: 'ge' Generic.Error: "#ef2929", # class: 'gr' Generic.Heading: "bold #000080", # class: 'gh' Generic.Inserted: "#00A000", # class: 'gi' Generic.Output: "#888", # class: 'go' Generic.Prompt: "#745334", # class: 'gp' Generic.Strong: "bold #000000", # class: 'gs' Generic.Subheading: "bold #800080", # class: 'gu' Generic.Traceback: "bold #a40000", # class: 'gt' } numpy-stl-2.3.2/docs/_theme/wolph/000077500000000000000000000000001313575633700170255ustar00rootroot00000000000000numpy-stl-2.3.2/docs/_theme/wolph/layout.html000066400000000000000000000011061313575633700212260ustar00rootroot00000000000000{%- extends "basic/layout.html" %} {%- block extrahead %} {{ super() }} {% if theme_touch_icon %} {% endif %} {% endblock %} {%- block relbar2 %}{% endblock %} {%- block footer %} {%- endblock %} numpy-stl-2.3.2/docs/_theme/wolph/relations.html000066400000000000000000000011161313575633700217120ustar00rootroot00000000000000

Related Topics

numpy-stl-2.3.2/docs/_theme/wolph/static/000077500000000000000000000000001313575633700203145ustar00rootroot00000000000000numpy-stl-2.3.2/docs/_theme/wolph/static/flasky.css_t000066400000000000000000000156061313575633700226520ustar00rootroot00000000000000/* * flasky.css_t * ~~~~~~~~~~~~ * * :copyright: Copyright 2010 by Armin Ronacher. Modifications by Kenneth Reitz. * :license: Flask Design License, see LICENSE for details. */ {% set page_width = '940px' %} {% set sidebar_width = '220px' %} @import url("basic.css"); /* -- page layout ----------------------------------------------------------- */ body { font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro'; font-size: 17px; background-color: white; color: #000; margin: 0; padding: 0; } div.document { width: {{ page_width }}; margin: 30px auto 0 auto; } div.documentwrapper { float: left; width: 100%; } div.bodywrapper { margin: 0 0 0 {{ sidebar_width }}; } div.sphinxsidebar { width: {{ sidebar_width }}; } hr { border: 1px solid #B1B4B6; } div.body { background-color: #ffffff; color: #3E4349; padding: 0 30px 0 30px; } img.floatingflask { padding: 0 0 10px 10px; float: right; } div.footer { width: {{ page_width }}; margin: 20px auto 30px auto; font-size: 14px; color: #888; text-align: right; } div.footer a { color: #888; } div.related { display: none; } div.sphinxsidebar a { color: #444; text-decoration: none; border-bottom: 1px dotted #999; } div.sphinxsidebar a:hover { border-bottom: 1px solid #999; } div.sphinxsidebar { font-size: 14px; line-height: 1.5; } div.sphinxsidebarwrapper { padding: 0px 10px; } div.sphinxsidebarwrapper p.logo { padding: 0 0 20px 0; margin: 0; text-align: center; } div.sphinxsidebar h3, div.sphinxsidebar h4 { font-family: 'Garamond', 'Georgia', serif; color: #555; font-size: 24px; font-weight: normal; margin: 0 0 5px 0; padding: 0; } div.sphinxsidebar h4 { font-size: 20px; } div.sphinxsidebar h3 a { color: #444; } div.sphinxsidebar p.logo a, div.sphinxsidebar h3 a, div.sphinxsidebar p.logo a:hover, div.sphinxsidebar h3 a:hover { border: none; } div.sphinxsidebar p { color: #555; margin: 10px 0; } div.sphinxsidebar ul { margin: 10px 0; padding: 0; color: #000; } div.sphinxsidebar input[type="text"] { width: 160px!important; } div.sphinxsidebar input { border: 1px solid #ccc; font-family: 'Georgia', serif; font-size: 1em; } /* -- body styles ----------------------------------------------------------- */ a { color: #004B6B; text-decoration: underline; } a:hover { color: #6D4100; text-decoration: underline; } div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { font-family: 'Garamond', 'Georgia', serif; font-weight: normal; margin: 30px 0px 10px 0px; padding: 0; } div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } div.body h2 { font-size: 180%; } div.body h3 { font-size: 150%; } div.body h4 { font-size: 130%; } div.body h5 { font-size: 100%; } div.body h6 { font-size: 100%; } a.headerlink { color: #ddd; padding: 0 4px; text-decoration: none; } a.headerlink:hover { color: #444; background: #eaeaea; } div.body p, div.body dd, div.body li { line-height: 1.4em; } div.admonition { background: #fafafa; margin: 20px -30px; padding: 10px 30px; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; } div.admonition tt.xref, div.admonition a tt { border-bottom: 1px solid #fafafa; } dd div.admonition { margin-left: -60px; padding-left: 60px; } div.admonition p.admonition-title { font-family: 'Garamond', 'Georgia', serif; font-weight: normal; font-size: 24px; margin: 0 0 10px 0; padding: 0; line-height: 1; } div.admonition p.last { margin-bottom: 0; } div.highlight { background-color: white; } dt:target, .highlight { background: #FAF3E8; } div.note { background-color: #eee; border: 1px solid #ccc; } div.seealso { background-color: #ffc; border: 1px solid #ff6; } div.topic { background-color: #eee; } p.admonition-title { display: inline; } p.admonition-title:after { content: ":"; } pre, tt { font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 0.9em; } img.screenshot { } tt.descname, tt.descclassname { font-size: 0.95em; } tt.descname { padding-right: 0.08em; } img.screenshot { -moz-box-shadow: 2px 2px 4px #eee; -webkit-box-shadow: 2px 2px 4px #eee; box-shadow: 2px 2px 4px #eee; } table.docutils { border: 1px solid #888; -moz-box-shadow: 2px 2px 4px #eee; -webkit-box-shadow: 2px 2px 4px #eee; box-shadow: 2px 2px 4px #eee; } table.docutils td, table.docutils th { border: 1px solid #888; padding: 0.25em 0.7em; } table.field-list, table.footnote { border: none; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } table.footnote { margin: 15px 0; width: 100%; border: 1px solid #eee; background: #fdfdfd; font-size: 0.9em; } table.footnote + table.footnote { margin-top: -15px; border-top: none; } table.field-list th { padding: 0 0.8em 0 0; } table.field-list td { padding: 0; } table.footnote td.label { width: 0px; padding: 0.3em 0 0.3em 0.5em; } table.footnote td { padding: 0.3em 0.5em; } dl { margin: 0; padding: 0; } dl dd { margin-left: 30px; } blockquote { margin: 0 0 0 30px; padding: 0; } ul, ol { margin: 10px 0 10px 30px; padding: 0; } pre { background: #eee; padding: 7px 30px; margin: 15px -30px; line-height: 1.3em; } dl pre, blockquote pre, li pre { margin-left: -60px; padding-left: 60px; } dl dl pre { margin-left: -90px; padding-left: 90px; } tt { background-color: #ecf0f3; color: #222; /* padding: 1px 2px; */ } tt.xref, a tt { background-color: #FBFBFB; border-bottom: 1px solid white; } a.reference { text-decoration: none; border-bottom: 1px dotted #004B6B; } a.reference:hover { border-bottom: 1px solid #6D4100; } a.footnote-reference { text-decoration: none; font-size: 0.7em; vertical-align: top; border-bottom: 1px dotted #004B6B; } a.footnote-reference:hover { border-bottom: 1px solid #6D4100; } a:hover tt { background: #EEE; } /* scrollbars */ ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-button:start:decrement, ::-webkit-scrollbar-button:end:increment { display: block; height: 10px; } ::-webkit-scrollbar-button:vertical:increment { background-color: #fff; } ::-webkit-scrollbar-track-piece { background-color: #eee; -webkit-border-radius: 3px; } ::-webkit-scrollbar-thumb:vertical { height: 50px; background-color: #ccc; -webkit-border-radius: 3px; } ::-webkit-scrollbar-thumb:horizontal { width: 50px; background-color: #ccc; -webkit-border-radius: 3px; } /* misc. */ .revsys-inline { display: none!important; } numpy-stl-2.3.2/docs/_theme/wolph/static/small_flask.css000066400000000000000000000017201313575633700233160ustar00rootroot00000000000000/* * small_flask.css_t * ~~~~~~~~~~~~~~~~~ * * :copyright: Copyright 2010 by Armin Ronacher. * :license: Flask Design License, see LICENSE for details. */ body { margin: 0; padding: 20px 30px; } div.documentwrapper { float: none; background: white; } div.sphinxsidebar { display: block; float: none; width: 102.5%; margin: 50px -30px -20px -30px; padding: 10px 20px; background: #333; color: white; } div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, div.sphinxsidebar h3 a { color: white; } div.sphinxsidebar a { color: #aaa; } div.sphinxsidebar p.logo { display: none; } div.document { width: 100%; margin: 0; } div.related { display: block; margin: 0; padding: 10px 0 20px 0; } div.related ul, div.related ul li { margin: 0; padding: 0; } div.footer { display: none; } div.bodywrapper { margin: 0; } div.body { min-height: 0; padding: 0; } numpy-stl-2.3.2/docs/_theme/wolph/theme.conf000066400000000000000000000001721313575633700207760ustar00rootroot00000000000000[theme] inherit = basic stylesheet = flasky.css pygments_style = flask_theme_support.FlaskyStyle [options] touch_icon = numpy-stl-2.3.2/docs/conf.py000066400000000000000000000266431313575633700157450ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # Documentation build configuration file, created by # sphinx-quickstart on Thu Feb 27 20:00:23 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 os import sys import datetime try: import numpy assert numpy except ImportError: # From the readthedocs manual # http://read-the-docs.readthedocs.org/en/latest/faq.html?highlight=numpy print >>sys.stderr, 'Unable to import numpy, falling back to mock' import mock MOCK_MODULES = ['pygtk', 'gtk', 'gobject', 'argparse', 'numpy', 'pandas'] for mod_name in MOCK_MODULES: sys.modules[mod_name] = mock.Mock() # 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('..')) from stl import __about__ as metadata # -- 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.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.mathjax', 'sphinx.ext.ifconfig', '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 = metadata.__package_name__.replace('-', ' ').capitalize() copyright = u'%s, %s' % ( datetime.date.today().year, metadata.__author__, ) # 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 = metadata.__version__ # The full version, including alpha/beta/rc tags. release = metadata.__version__ # 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 = 'wolph' # 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 = ['_theme'] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". # html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. #html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = metadata.__package_name__ + '-doc' # -- 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]). latex_documents = [( 'index', '%s.tex' % metadata.__package_name__, u'%s Documentation' % metadata.__package_name__.replace('-', ' ').capitalize(), metadata.__author__, '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', metadata.__package_name__, u'%s Documentation' % metadata.__package_name__.replace('-', ' ').capitalize(), [metadata.__author__], 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', metadata.__package_name__, u'%s Documentation' % metadata.__package_name__.replace('-', ' ').capitalize(), metadata.__author__, metadata.__package_name__, metadata.__description__, '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 # -- Options for Epub output ---------------------------------------------- # Bibliographic Dublin Core info. epub_title = metadata.__package_name__.replace('-', ' ').capitalize() epub_author = metadata.__author__ epub_publisher = metadata.__author__ epub_copyright = copyright # The HTML theme for the epub output. Since the default themes are not optimized # for small screen space, using the same theme for HTML and epub output is # usually not wise. This defaults to 'epub', a theme designed to save visual # space. #epub_theme = 'epub' # The language of the text. It defaults to the language option # or en if the language is not set. #epub_language = '' # The scheme of the identifier. Typical schemes are ISBN or URL. #epub_scheme = '' # The unique identifier of the text. This can be a ISBN number # or the project homepage. #epub_identifier = '' # A unique identification for the text. #epub_uid = '' # A tuple containing the cover image and cover page html template filenames. #epub_cover = () # A sequence of (type, uri, title) tuples for the guide element of content.opf. #epub_guide = () # HTML files that should be inserted before the pages created by sphinx. # The format is a list of tuples containing the path and title. #epub_pre_files = [] # HTML files shat should be inserted after the pages created by sphinx. # The format is a list of tuples containing the path and title. #epub_post_files = [] # A list of files that should not be packed into the epub file. epub_exclude_files = ['search.html'] # The depth of the table of contents in toc.ncx. #epub_tocdepth = 3 # Allow duplicate toc entries. #epub_tocdup = True # Choose between 'default' and 'includehidden'. #epub_tocscope = 'default' # Fix unsupported image types using the PIL. #epub_fix_images = False # Scale large images. #epub_max_image_width = 0 # How to display URL addresses: 'footnote', 'no', or 'inline'. #epub_show_urls = 'inline' # If false, no index is generated. #epub_use_index = True # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { 'python': ('http://docs.python.org/2', None), 'pythonutils': ('http://python-utils.readthedocs.org/en/latest/', None), 'numpy': ('http://docs.scipy.org/doc/numpy/', None), 'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None), 'matplotlib': ('http://matplotlib.sourceforge.net/', None), } numpy-stl-2.3.2/docs/index.rst000066400000000000000000000003571313575633700163010ustar00rootroot00000000000000Welcome to numpy-stl's documentation! ======================================== Contents: .. toctree:: :maxdepth: 4 usage tests stl Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` numpy-stl-2.3.2/docs/make.bat000066400000000000000000000117621313575633700160470ustar00rootroot00000000000000@ECHO OFF REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set BUILDDIR=_build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . set I18NSPHINXOPTS=%SPHINXOPTS% . if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% ) if "%1" == "" goto help if "%1" == "help" ( :help echo.Please use `make ^` where ^ is one of echo. html to make standalone HTML files echo. dirhtml to make HTML files named index.html in directories echo. singlehtml to make a single large HTML file echo. pickle to make pickle files echo. json to make JSON files echo. htmlhelp to make HTML files and a HTML help project echo. qthelp to make HTML files and a qthelp project echo. devhelp to make HTML files and a Devhelp project echo. epub to make an epub echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter echo. text to make text files echo. man to make manual pages echo. texinfo to make Texinfo files echo. gettext to make PO message catalogs echo. changes to make an overview over all changed/added/deprecated items echo. 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 ) 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\PythonUtils.qhcp echo.To view the help file: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\PythonUtils.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" == "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 ) :end numpy-stl-2.3.2/docs/requirements.txt000066400000000000000000000000221313575633700177110ustar00rootroot00000000000000mock python-utils numpy-stl-2.3.2/docs/stl.rst000066400000000000000000000013031313575633700157640ustar00rootroot00000000000000stl package =========== stl.Mesh -------- .. autoclass:: stl.Mesh :members: :undoc-members: :inherited-members: :show-inheritance: stl.main module --------------- .. automodule:: stl.main :members: :undoc-members: :inherited-members: :show-inheritance: stl.base module --------------- .. automodule:: stl.base :members: :undoc-members: :inherited-members: :show-inheritance: stl.mesh module --------------- .. automodule:: stl.mesh :members: :undoc-members: :inherited-members: :show-inheritance: stl.stl module -------------- .. automodule:: stl.stl :members: :undoc-members: :inherited-members: :show-inheritance: numpy-stl-2.3.2/docs/tests.rst000066400000000000000000000012021313575633700163220ustar00rootroot00000000000000tests and examples ================== tests.stl_corruption module --------------------------- .. literalinclude:: ../tests/stl_corruption.py tests.test_commandline module ----------------------------- .. literalinclude:: ../tests/test_commandline.py tests.test_convert module ------------------------- .. literalinclude:: ../tests/test_convert.py tests.test_mesh module ---------------------- .. literalinclude:: ../tests/test_mesh.py tests.test_multiple module -------------------------- .. literalinclude:: ../tests/test_multiple.py tests.test_rotate module ------------------------ .. literalinclude:: ../tests/test_rotate.py numpy-stl-2.3.2/docs/usage.rst000066400000000000000000000000361313575633700162700ustar00rootroot00000000000000 .. include :: ../README.rst numpy-stl-2.3.2/pytest.ini000066400000000000000000000004701313575633700155350ustar00rootroot00000000000000[pytest] basetemp = tmp python_files = stl/*.py tests/*.py addopts = --doctest-modules --cov stl --cov-report term-missing --cov-report html --no-cov-on-fail --pep8 --flakes --ignore=build pep8ignore = *.py W391 docs/*.py ALL flakes-ignore = docs/*.py ALL numpy-stl-2.3.2/setup.cfg000066400000000000000000000002261313575633700153240ustar00rootroot00000000000000[build_sphinx] source-dir = docs/ build-dir = docs/_build all_files = 1 [upload_sphinx] upload-dir = docs/_build/html [bdist_wheel] universal = 0 numpy-stl-2.3.2/setup.py000066400000000000000000000051721313575633700152220ustar00rootroot00000000000000from __future__ import print_function import os import sys import warnings from setuptools import setup, extension from setuptools.command.build_ext import build_ext setup_kwargs = {} try: import numpy from Cython import Build setup_kwargs['ext_modules'] = Build.cythonize([ extension.Extension( 'stl._speedups', ['stl/_speedups.pyx'], include_dirs=[numpy.get_include()], ), ]) except ImportError: print('WARNING', file=sys.stderr) print('Cython and Numpy is required for building extension.', file=sys.stderr) print('Falling back to pure Python implementation.', file=sys.stderr) # To prevent importing about and thereby breaking the coverage info we use this # exec hack about = {} with open('stl/__about__.py') as fp: exec(fp.read(), about) if os.path.isfile('README.rst'): long_description = open('README.rst').read() else: long_description = 'See http://pypi.python.org/pypi/%s/' % ( about['__package_name__']) install_requires = [ 'numpy', 'nine', 'python-utils>=1.6.2', ] try: import enum assert enum except ImportError: install_requires.append('enum34') if os.environ.get('PYTEST_RUNNER', '').lower() == 'false': tests_require = [] setup_requires = [] else: tests_require = ['pytest'] setup_requires = ['pytest-runner'] class BuildExt(build_ext): def run(self): try: build_ext.run(self) except Exception as e: warnings.warn(''' Unable to build speedups module, defaulting to pure Python. Note that the pure Python version is more than fast enough in most cases %r ''' % e) if __name__ == '__main__': setup( name=about['__package_name__'], version=about['__version__'], author=about['__author__'], author_email=about['__author_email__'], description=about['__description__'], url=about['__url__'], license='BSD', packages=['stl'], long_description=long_description, tests_require=tests_require, setup_requires=setup_requires, entry_points={ 'console_scripts': [ 'stl = %s.main:main' % about['__import_name__'], 'stl2ascii = %s.main:to_ascii' % about['__import_name__'], 'stl2bin = %s.main:to_binary' % about['__import_name__'], ], }, classifiers=['License :: OSI Approved :: BSD License'], install_requires=install_requires, cmdclass=dict( build_ext=BuildExt, ), **setup_kwargs ) numpy-stl-2.3.2/stl/000077500000000000000000000000001313575633700143055ustar00rootroot00000000000000numpy-stl-2.3.2/stl/__about__.py000066400000000000000000000005001313575633700165600ustar00rootroot00000000000000__package_name__ = 'numpy-stl' __import_name__ = 'stl' __version__ = '2.3.2' __author__ = 'Rick van Hattem' __author_email__ = 'Wolph@Wol.ph' __description__ = ' '.join(''' Library to make reading, writing and modifying both binary and ascii STL files easy. '''.split()) __url__ = 'https://github.com/WoLpH/numpy-stl/' numpy-stl-2.3.2/stl/__init__.py000066400000000000000000000005671313575633700164260ustar00rootroot00000000000000from .stl import BUFFER_SIZE from .stl import HEADER_SIZE from .stl import COUNT_SIZE from .stl import MAX_COUNT from .stl import Mode from .base import Dimension from .base import RemoveDuplicates from .mesh import Mesh __all__ = [ 'BUFFER_SIZE', 'HEADER_SIZE', 'COUNT_SIZE', 'MAX_COUNT', 'Mode', 'Dimension', 'RemoveDuplicates', 'Mesh', ] numpy-stl-2.3.2/stl/_speedups.pyx000066400000000000000000000122301313575633700170340ustar00rootroot00000000000000from libc.stdio cimport * from libc.string cimport memcpy, strcmp, strstr, strcpy IF UNAME_SYSNAME == u"Windows": cdef extern from "io.h": int dup(int fd) ELSE: cdef extern from "unistd.h": int dup(int fd) import numpy as np cimport numpy as np np.import_array() cdef packed struct Facet: np.float32_t n[3] np.float32_t v[3][3] np.uint16_t attr dtype = np.dtype([ ('normals', np.float32, 3), ('vectors', np.float32, (3, 3)), ('attr', np.uint16, 1), ]) DEF ALLOC_SIZE = 200000 DEF BUF_SIZE = 8192 DEF LINE_SIZE = 8192 cdef struct s_State: FILE* fp char buf[BUF_SIZE] char line[LINE_SIZE] size_t pos size_t size size_t line_num int recoverable ctypedef s_State State cdef char* readline(State* state) except NULL: cdef size_t line_pos = 0 cdef char current; while True: if state.pos == state.size: if feof(state.fp): if line_pos != 0: state.line[line_pos] = '\0' return state.line raise RuntimeError(state.recoverable, "Unexpected EOF") state.size = fread(state.buf, 1, BUF_SIZE, state.fp) state.pos = 0 state.recoverable = 0 current = state.buf[state.pos] state.pos += 1 if line_pos != 0 or (current != ' ' \ and current != '\t' \ and current != '\r'): if current == '\n': state.line_num += 1 if line_pos != 0: state.line[line_pos] = '\0' return state.line elif 0x40 < current < 0x5b: # Change all ascii characters to lower case state.line[line_pos] = current | 0x60 line_pos += 1 else: state.line[line_pos] = current line_pos += 1 def ascii_read(fh, buf): cdef char* line cdef char name[LINE_SIZE] cdef np.ndarray[Facet, cast=True] arr = np.zeros(ALLOC_SIZE, dtype = dtype) cdef size_t offset; cdef Facet* facet = arr.data cdef size_t pos = 0 cdef State state try: state.size = len(buf) memcpy(state.buf, buf, state.size) state.pos = 0 state.line_num = 0 state.recoverable = 1 state.fp = fdopen(dup(fh.fileno()), 'rb') fseek(state.fp, fh.tell(), SEEK_SET) line = readline(&state) if strstr(line, "solid") != line: raise RuntimeError(state.recoverable, "Solid name not found (%i:%s)" % (state.line_num, line)) strcpy(name, line+5) while True: line = readline(&state) line = state.line if strstr(line, "endsolid") != NULL: arr.resize(facet - arr.data, refcheck=False) return (name).strip(), arr if strcmp(line, "color") == 0: readline(&state) continue elif sscanf(line, "%*s %*s %f %f %f", facet.n, facet.n+1, facet.n+2) != 3: raise RuntimeError(state.recoverable, "Can't read normals (%i:%s)" % (state.line_num, line)) readline(&state) # outer loop for i in range(3): line = readline(&state) if sscanf(line, "%*s %f %f %f\n", facet.v[i], facet.v[i]+1, facet.v[i]+2) != 3: raise RuntimeError(state.recoverable, "Can't read vertex (%i:%s)" % (state.line_num, line)) readline(&state) # endloop readline(&state) # endfacet facet += 1 offset = facet - arr.data if arr.shape[0] == offset: arr.resize(arr.shape[0] + ALLOC_SIZE, refcheck=False) facet = arr.data + offset finally: if state.recoverable == 0: pos = ftell(state.fp) - state.size + state.pos fclose(state.fp) fh.seek(pos, SEEK_SET) def ascii_write(fh, name, np.ndarray[Facet, mode = 'c', cast=True] arr): cdef FILE* fp cdef Facet* facet = arr.data cdef Facet* end = arr.data + arr.shape[0] cdef size_t pos = 0 try: fp = fdopen(dup(fh.fileno()), 'wb') fseek(fp, fh.tell(), SEEK_SET) fprintf(fp, 'solid %s\n', name) while facet != end: fprintf(fp, "facet normal %f %f %f\n" " outer loop\n" " vertex %f %f %f\n" " vertex %f %f %f\n" " vertex %f %f %f\n" " endloop\n" "endfacet\n", facet.n[0], facet.n[1], facet.n[2], facet.v[0][0], facet.v[0][1], facet.v[0][2], facet.v[1][0], facet.v[1][1], facet.v[1][2], facet.v[2][0], facet.v[2][1], facet.v[2][2]) facet += 1 fprintf(fp, 'endsolid %s\n', name) finally: pos = ftell(fp) fclose(fp) fh.seek(pos, SEEK_SET) numpy-stl-2.3.2/stl/base.py000066400000000000000000000423401313575633700155740ustar00rootroot00000000000000from __future__ import (absolute_import, division, print_function, unicode_literals) import enum import math import numpy import logging import collections from python_utils import logger from .utils import s #: When removing empty areas, remove areas that are smaller than this AREA_SIZE_THRESHOLD = 0 #: Vectors in a point VECTORS = 3 #: Dimensions used in a vector DIMENSIONS = 3 class Dimension(enum.IntEnum): #: X index (for example, `mesh.v0[0][X]`) X = 0 #: Y index (for example, `mesh.v0[0][Y]`) Y = 1 #: Z index (for example, `mesh.v0[0][Z]`) Z = 2 # For backwards compatibility, leave the original references X = Dimension.X Y = Dimension.Y Z = Dimension.Z class RemoveDuplicates(enum.Enum): ''' Choose whether to remove no duplicates, leave only a single of the duplicates or remove all duplicates (leaving holes). ''' NONE = 0 SINGLE = 1 ALL = 2 @classmethod def map(cls, value): if value and value in cls: pass elif value: value = cls.SINGLE else: value = cls.NONE return value def logged(class_): # For some reason the Logged baseclass is not properly initiated on Linux # systems while this works on OS X. Please let me know if you can tell me # what silly mistake I made here logger_name = logger.Logged._Logged__get_name( __name__, class_.__name__, ) class_.logger = logging.getLogger(logger_name) for key in dir(logger.Logged): if not key.startswith('__'): setattr(class_, key, getattr(class_, key)) return class_ @logged class BaseMesh(logger.Logged, collections.Mapping): ''' Mesh object with easy access to the vectors through v0, v1 and v2. The normals, areas, min, max and units are calculated automatically. :param numpy.array data: The data for this mesh :param bool calculate_normals: Whether to calculate the normals :param bool remove_empty_areas: Whether to remove triangles with 0 area (due to rounding errors for example) :ivar str name: Name of the solid, only exists in ASCII files :ivar numpy.array data: Data as :func:`BaseMesh.dtype` :ivar numpy.array points: All points (Nx9) :ivar numpy.array normals: Normals for this mesh, calculated automatically by default (Nx3) :ivar numpy.array vectors: Vectors in the mesh (Nx3x3) :ivar numpy.array attr: Attributes per vector (used by binary STL) :ivar numpy.array x: Points on the X axis by vertex (Nx3) :ivar numpy.array y: Points on the Y axis by vertex (Nx3) :ivar numpy.array z: Points on the Z axis by vertex (Nx3) :ivar numpy.array v0: Points in vector 0 (Nx3) :ivar numpy.array v1: Points in vector 1 (Nx3) :ivar numpy.array v2: Points in vector 2 (Nx3) >>> data = numpy.zeros(10, dtype=BaseMesh.dtype) >>> mesh = BaseMesh(data, remove_empty_areas=False) >>> # Increment vector 0 item 0 >>> mesh.v0[0] += 1 >>> mesh.v1[0] += 2 >>> # Check item 0 (contains v0, v1 and v2) >>> mesh[0] array([ 1., 1., 1., 2., 2., 2., 0., 0., 0.], dtype=float32) >>> mesh.vectors[0] # doctest: +NORMALIZE_WHITESPACE array([[ 1., 1., 1.], [ 2., 2., 2.], [ 0., 0., 0.]], dtype=float32) >>> mesh.v0[0] array([ 1., 1., 1.], dtype=float32) >>> mesh.points[0] array([ 1., 1., 1., 2., 2., 2., 0., 0., 0.], dtype=float32) >>> mesh.data[0] # doctest: +NORMALIZE_WHITESPACE ([ 0., 0., 0.], [[ 1., 1., 1.], [ 2., 2., 2.], [ 0., 0., 0.]], [0]) >>> mesh.x[0] array([ 1., 2., 0.], dtype=float32) >>> mesh[0] = 3 >>> mesh[0] array([ 3., 3., 3., 3., 3., 3., 3., 3., 3.], dtype=float32) >>> len(mesh) == len(list(mesh)) True >>> (mesh.min_ < mesh.max_).all() True >>> mesh.update_normals() >>> mesh.units.sum() 0.0 >>> mesh.v0[:] = mesh.v1[:] = mesh.v2[:] = 0 >>> mesh.points.sum() 0.0 >>> mesh.v0 = mesh.v1 = mesh.v2 = 0 >>> mesh.x = mesh.y = mesh.z = 0 >>> mesh.attr = 1 >>> (mesh.attr == 1).all() True >>> mesh.normals = 2 >>> (mesh.normals == 2).all() True >>> mesh.vectors = 3 >>> (mesh.vectors == 3).all() True >>> mesh.points = 4 >>> (mesh.points == 4).all() True ''' #: - normals: :func:`numpy.float32`, `(3, )` #: - vectors: :func:`numpy.float32`, `(3, 3)` #: - attr: :func:`numpy.uint16`, `(1, )` dtype = numpy.dtype([ (s('normals'), numpy.float32, (3, )), (s('vectors'), numpy.float32, (3, 3)), (s('attr'), numpy.uint16, (1, )), ]) dtype = dtype.newbyteorder('<') # Even on big endian arches, use little e. def __init__(self, data, calculate_normals=True, remove_empty_areas=False, remove_duplicate_polygons=RemoveDuplicates.NONE, name='', speedups=True, **kwargs): super(BaseMesh, self).__init__(**kwargs) self.speedups = speedups if remove_empty_areas: data = self.remove_empty_areas(data) if RemoveDuplicates.map(remove_duplicate_polygons).value: data = self.remove_duplicate_polygons(data, remove_duplicate_polygons) self.name = name self.data = data if calculate_normals: self.update_normals() @property def attr(self): return self.data['attr'] @attr.setter def attr(self, value): self.data['attr'] = value @property def normals(self): return self.data['normals'] @normals.setter def normals(self, value): self.data['normals'] = value @property def vectors(self): return self.data['vectors'] @vectors.setter def vectors(self, value): self.data['vectors'] = value @property def points(self): return self.vectors.reshape(self.data.size, 9) @points.setter def points(self, value): self.points[:] = value @property def v0(self): return self.vectors[:, 0] @v0.setter def v0(self, value): self.vectors[:, 0] = value @property def v1(self): return self.vectors[:, 1] @v1.setter def v1(self, value): self.vectors[:, 1] = value @property def v2(self): return self.vectors[:, 2] @v2.setter def v2(self, value): self.vectors[:, 2] = value @property def x(self): return self.points[:, Dimension.X::3] @x.setter def x(self, value): self.points[:, Dimension.X::3] = value @property def y(self): return self.points[:, Dimension.Y::3] @y.setter def y(self, value): self.points[:, Dimension.Y::3] = value @property def z(self): return self.points[:, Dimension.Z::3] @z.setter def z(self, value): self.points[:, Dimension.Z::3] = value @classmethod def remove_duplicate_polygons(cls, data, value=RemoveDuplicates.SINGLE): value = RemoveDuplicates.map(value) polygons = data['vectors'].sum(axis=1) # Get a sorted list of indices idx = numpy.lexsort(polygons.T) # Get the indices of all different indices diff = numpy.any(polygons[idx[1:]] != polygons[idx[:-1]], axis=1) if value is RemoveDuplicates.SINGLE: # Only return the unique data, the True is so we always get at # least the originals return data[numpy.sort(idx[numpy.concatenate(([True], diff))])] elif value is RemoveDuplicates.ALL: # We need to return both items of the shifted diff diff_a = numpy.concatenate(([True], diff)) diff_b = numpy.concatenate((diff, [True])) diff = numpy.concatenate((diff, [False])) # Combine both unique lists filtered_data = data[numpy.sort(idx[diff_a & diff_b])] if len(filtered_data) <= len(data) / 2: return data[numpy.sort(idx[diff_a])] else: return data[numpy.sort(idx[diff])] else: return data @classmethod def remove_empty_areas(cls, data): vectors = data['vectors'] v0 = vectors[:, 0] v1 = vectors[:, 1] v2 = vectors[:, 2] normals = numpy.cross(v1 - v0, v2 - v0) squared_areas = (normals ** 2).sum(axis=1) return data[squared_areas > AREA_SIZE_THRESHOLD ** 2] def update_normals(self): '''Update the normals for all points''' self.normals[:] = numpy.cross(self.v1 - self.v0, self.v2 - self.v0) def update_min(self): self._min = self.vectors.min(axis=(0, 1)) def update_max(self): self._max = self.vectors.max(axis=(0, 1)) def update_areas(self): areas = .5 * numpy.sqrt((self.normals ** 2).sum(axis=1)) self.areas = areas.reshape((areas.size, 1)) def get_mass_properties(self): ''' Evaluate and return a tuple with the following elements: - the volume - the position of the center of gravity (COG) - the inertia matrix expressed at the COG Documentation can be found here: http://www.geometrictools.com/Documentation/PolyhedralMassProperties.pdf ''' def subexpression(x): w0, w1, w2 = x[:, 0], x[:, 1], x[:, 2] temp0 = w0 + w1 f1 = temp0 + w2 temp1 = w0 * w0 temp2 = temp1 + w1 * temp0 f2 = temp2 + w2 * f1 f3 = w0 * temp1 + w1 * temp2 + w2 * f2 g0 = f2 + w0 * (f1 + w0) g1 = f2 + w1 * (f1 + w1) g2 = f2 + w2 * (f1 + w2) return f1, f2, f3, g0, g1, g2 x0, x1, x2 = self.x[:, 0], self.x[:, 1], self.x[:, 2] y0, y1, y2 = self.y[:, 0], self.y[:, 1], self.y[:, 2] z0, z1, z2 = self.z[:, 0], self.z[:, 1], self.z[:, 2] a1, b1, c1 = x1 - x0, y1 - y0, z1 - z0 a2, b2, c2 = x2 - x0, y2 - y0, z2 - z0 d0, d1, d2 = b1 * c2 - b2 * c1, a2 * c1 - a1 * c2, a1 * b2 - a2 * b1 f1x, f2x, f3x, g0x, g1x, g2x = subexpression(self.x) f1y, f2y, f3y, g0y, g1y, g2y = subexpression(self.y) f1z, f2z, f3z, g0z, g1z, g2z = subexpression(self.z) intg = numpy.zeros((10)) intg[0] = sum(d0 * f1x) intg[1:4] = sum(d0 * f2x), sum(d1 * f2y), sum(d2 * f2z) intg[4:7] = sum(d0 * f3x), sum(d1 * f3y), sum(d2 * f3z) intg[7] = sum(d0 * (y0 * g0x + y1 * g1x + y2 * g2x)) intg[8] = sum(d1 * (z0 * g0y + z1 * g1y + z2 * g2y)) intg[9] = sum(d2 * (x0 * g0z + x1 * g1z + x2 * g2z)) intg /= numpy.array([6, 24, 24, 24, 60, 60, 60, 120, 120, 120]) volume = intg[0] cog = intg[1:4] / volume cogsq = cog ** 2 inertia = numpy.zeros((3, 3)) inertia[0, 0] = intg[5] + intg[6] - volume * (cogsq[1] + cogsq[2]) inertia[1, 1] = intg[4] + intg[6] - volume * (cogsq[2] + cogsq[0]) inertia[2, 2] = intg[4] + intg[5] - volume * (cogsq[0] + cogsq[1]) inertia[0, 1] = inertia[1, 0] = -(intg[7] - volume * cog[0] * cog[1]) inertia[1, 2] = inertia[2, 1] = -(intg[8] - volume * cog[1] * cog[2]) inertia[0, 2] = inertia[2, 0] = -(intg[9] - volume * cog[2] * cog[0]) return volume, cog, inertia def update_units(self): units = self.normals.copy() non_zero_areas = self.areas > 0 areas = self.areas if non_zero_areas.shape[0] != areas.shape[0]: # pragma: no cover self.warning('Zero sized areas found, ' 'units calculation will be partially incorrect') if non_zero_areas.any(): non_zero_areas.shape = non_zero_areas.shape[0] areas = numpy.hstack((2 * areas[non_zero_areas],) * DIMENSIONS) units[non_zero_areas] /= areas self.units = units @classmethod def rotation_matrix(cls, axis, theta): ''' Generate a rotation matrix to Rotate the matrix over the given axis by the given theta (angle) Uses the `Euler-Rodrigues `_ formula for fast rotations. :param numpy.array axis: Axis to rotate over (x, y, z) :param float theta: Rotation angle in radians, use `math.radians` to convert degrees to radians if needed. ''' axis = numpy.asarray(axis) # No need to rotate if there is no actual rotation if not axis.any(): return numpy.zeros((3, 3)) theta = 0.5 * numpy.asarray(theta) axis = axis / numpy.linalg.norm(axis) a = math.cos(theta) b, c, d = - axis * math.sin(theta) angles = a, b, c, d powers = [x * y for x in angles for y in angles] aa, ab, ac, ad = powers[0:4] ba, bb, bc, bd = powers[4:8] ca, cb, cc, cd = powers[8:12] da, db, dc, dd = powers[12:16] return numpy.array([[aa + bb - cc - dd, 2 * (bc + ad), 2 * (bd - ac)], [2 * (bc - ad), aa + cc - bb - dd, 2 * (cd + ab)], [2 * (bd + ac), 2 * (cd - ab), aa + dd - bb - cc]]) def rotate(self, axis, theta, point=None): ''' Rotate the matrix over the given axis by the given theta (angle) Uses the :py:func:`rotation_matrix` in the background. .. note:: Note that the `point` was accidentaly inverted with the old version of the code. To get the old and incorrect behaviour simply pass `-point` instead of `point` or `-numpy.array(point)` if you're passing along an array. :param numpy.array axis: Axis to rotate over (x, y, z) :param float theta: Rotation angle in radians, use `math.radians` to convert degrees to radians if needed. :param numpy.array point: Rotation point so manual translation is not required ''' # No need to rotate if there is no actual rotation if not theta: return if isinstance(point, (numpy.ndarray, list, tuple)) and len(point) == 3: point = numpy.asarray(point) elif point is None: point = numpy.array([0, 0, 0]) elif isinstance(point, (int, float)): point = numpy.asarray([point] * 3) else: raise TypeError('Incorrect type for point', point) rotation_matrix = self.rotation_matrix(axis, theta) # No need to rotate if there is no actual rotation if not rotation_matrix.any(): return def _rotate(matrix): if point.any(): # Translate while rotating return (matrix - point).dot(rotation_matrix) + point else: # Simply apply the rotation return matrix.dot(rotation_matrix) for i in range(3): self.vectors[:, i] = _rotate(self.vectors[:, i]) def translate(self, translation): ''' Translate the mesh in the three directions :param numpy.array translation: Translation vector (x, y, z) ''' assert len(translation) == 3, "Translation vector must be of length 3" self.x += translation[0] self.y += translation[1] self.z += translation[2] def transform(self, matrix): ''' Transform the mesh with a rotation and a translation stored in a single 4x4 matrix :param numpy.array matrix: Transform matrix with shape (4, 4), where matrix[0:3, 0:3] represents the rotation part of the transformation matrix[0:3, 3] represents the translation part of the transformation ''' is_a_4x4_matrix = matrix.shape == (4, 4) assert is_a_4x4_matrix, "Transformation matrix must be of shape (4, 4)" rotation = matrix[0:3, 0:3] unit_det_rotation = numpy.allclose(numpy.linalg.det(rotation), 1.0) assert unit_det_rotation, "Rotation matrix has not a unit determinant" for i in range(3): self.vectors[:, i] = numpy.dot(rotation, self.vectors[:, i].T).T self.x += matrix[0, 3] self.y += matrix[1, 3] self.z += matrix[2, 3] def _get_or_update(key): def _get(self): if not hasattr(self, '_%s' % key): getattr(self, 'update_%s' % key)() return getattr(self, '_%s' % key) return _get def _set(key): def _set(self, value): setattr(self, '_%s' % key, value) return _set min_ = property(_get_or_update('min'), _set('min'), doc='Mesh minimum value') max_ = property(_get_or_update('max'), _set('max'), doc='Mesh maximum value') areas = property(_get_or_update('areas'), _set('areas'), doc='Mesh areas') units = property(_get_or_update('units'), _set('units'), doc='Mesh unit vectors') def __getitem__(self, k): return self.points[k] def __setitem__(self, k, v): self.points[k] = v def __len__(self): return self.points.shape[0] def __iter__(self): for point in self.points: yield point numpy-stl-2.3.2/stl/main.py000066400000000000000000000063151313575633700156100ustar00rootroot00000000000000import sys import random import argparse from . import stl def _get_parser(description): parser = argparse.ArgumentParser(description=description) parser.add_argument('infile', nargs='?', type=argparse.FileType('rb'), default=sys.stdin, help='STL file to read') parser.add_argument('outfile', nargs='?', type=argparse.FileType('wb'), default=sys.stdout, help='STL file to write') parser.add_argument('--name', nargs='?', help='Name of the mesh') parser.add_argument( '-n', '--use-file-normals', action='store_true', help='Read the normals from the file instead of recalculating them') parser.add_argument( '-r', '--remove-empty-areas', action='store_true', help='Remove areas with 0 surface areas to prevent errors during ' 'normal calculation') parser.add_argument('-s', '--disable-speedups', action='store_true', help='Disable Cython speedups') return parser def _get_name(args): names = [ args.name, getattr(args.outfile, 'name', None), getattr(args.infile, 'name', None), 'numpy-stl-%06d' % random.randint(0, 1e6), ] for name in names: # pragma: no branch if name and isinstance(name, str) and not name.startswith('<'): return name def main(): parser = _get_parser('Convert STL files from ascii to binary and back') parser.add_argument('-a', '--ascii', action='store_true', help='Write ASCII file (default is binary)') parser.add_argument('-b', '--binary', action='store_true', help='Force binary file (for TTYs)') args = parser.parse_args() name = _get_name(args) stl_file = stl.StlMesh(filename=name, fh=args.infile, calculate_normals=False, remove_empty_areas=args.remove_empty_areas, speedups=not args.disable_speedups) if args.binary: mode = stl.BINARY elif args.ascii: mode = stl.ASCII else: mode = stl.AUTOMATIC stl_file.save(name, args.outfile, mode=mode, update_normals=not args.use_file_normals) def to_ascii(): parser = _get_parser('Convert STL files to ASCII (text) format') args = parser.parse_args() name = _get_name(args) stl_file = stl.StlMesh(filename=name, fh=args.infile, calculate_normals=False, remove_empty_areas=args.remove_empty_areas, speedups=not args.disable_speedups) stl_file.save(name, args.outfile, mode=stl.ASCII, update_normals=not args.use_file_normals) def to_binary(): parser = _get_parser('Convert STL files to ASCII (text) format') args = parser.parse_args() name = _get_name(args) stl_file = stl.StlMesh(filename=name, fh=args.infile, calculate_normals=False, remove_empty_areas=args.remove_empty_areas, speedups=not args.disable_speedups) stl_file.save(name, args.outfile, mode=stl.BINARY, update_normals=not args.use_file_normals) numpy-stl-2.3.2/stl/mesh.py000066400000000000000000000000671313575633700156160ustar00rootroot00000000000000from . import stl class Mesh(stl.BaseStl): pass numpy-stl-2.3.2/stl/stl.py000066400000000000000000000311001313575633700154540ustar00rootroot00000000000000from __future__ import (absolute_import, division, print_function, unicode_literals) import io import os import enum import numpy import struct import logging import datetime from . import base from . import __about__ as metadata from .utils import b from .utils import s try: from . import _speedups except ImportError: # pragma: no cover _speedups = None logger = logging.getLogger(__name__) class Mode(enum.IntEnum): #: Automatically detect whether the output is a TTY, if so, write ASCII #: otherwise write BINARY AUTOMATIC = 0 #: Force writing ASCII ASCII = 1 #: Force writing BINARY BINARY = 2 # For backwards compatibility, leave the original references AUTOMATIC = Mode.AUTOMATIC ASCII = Mode.ASCII BINARY = Mode.BINARY #: Amount of bytes to read while using buffered reading BUFFER_SIZE = 4096 #: The amount of bytes in the header field HEADER_SIZE = 80 #: The amount of bytes in the count field COUNT_SIZE = 4 #: The maximum amount of triangles we can read from binary files MAX_COUNT = 1e8 class BaseStl(base.BaseMesh): @classmethod def load(cls, fh, mode=AUTOMATIC, speedups=True): '''Load Mesh from STL file Automatically detects binary versus ascii STL files. :param file fh: The file handle to open :param int mode: Automatically detect the filetype or force binary ''' header = fh.read(HEADER_SIZE).lower() if not header: return if isinstance(header, str): # pragma: no branch header = b(header) name = '' if mode in (AUTOMATIC, ASCII) and header.startswith(b('solid')): try: name, data = cls._load_ascii( fh, header, speedups=speedups) except RuntimeError as exception: (recoverable, e) = exception.args # If we didn't read beyond the header the stream is still # readable through the binary reader if recoverable: name, data = cls._load_binary(fh, header, check_size=False) else: # Apparently we've read beyond the header. Let's try # seeking :) # Note that this fails when reading from stdin, we can't # recover from that. fh.seek(HEADER_SIZE) # Since we know this is a seekable file now and we're not # 100% certain it's binary, check the size while reading name, data = cls._load_binary(fh, header, check_size=True) else: name, data = cls._load_binary(fh, header) return name, data @classmethod def _load_binary(cls, fh, header, check_size=False): # Read the triangle count count_data = fh.read(COUNT_SIZE) if len(count_data) != COUNT_SIZE: count = 0 else: count, = struct.unpack(s(' 0: position = fh.tell() fh.seek(position - size_unprocessedlines) raise StopIteration() else: raise RuntimeError(recoverable[0], '%r should start with %r' % (line, prefix)) if len(values) == 3: return [float(v) for v in values] else: # pragma: no cover raise RuntimeError(recoverable[0], 'Incorrect value %r' % line) else: return b(line) line = get() if not line.startswith(b('solid ')) and line.startswith(b('solid')): cls.warning('ASCII STL files should start with solid . ' 'The application that produced this STL file may be ' 'faulty, please report this error. The erroneous ' 'line: %r', line) if not lines: raise RuntimeError(recoverable[0], 'No lines found, impossible to read') # Yield the name yield line[5:].strip() while True: # Read from the header lines first, until that point we can recover # and go to the binary option. After that we cannot due to # unseekable files such as sys.stdin # # Numpy doesn't support any non-file types so wrapping with a # buffer and/or StringIO does not work. try: normals = get('facet normal') assert get() == b('outer loop') v0 = get('vertex') v1 = get('vertex') v2 = get('vertex') assert get() == b('endloop') assert get() == b('endfacet') attrs = 0 yield (normals, (v0, v1, v2), attrs) except AssertionError as e: # pragma: no cover raise RuntimeError(recoverable[0], e) except StopIteration: raise @classmethod def _load_ascii(cls, fh, header, speedups=True): if _speedups and speedups: return _speedups.ascii_read(fh, header) else: iterator = cls._ascii_reader(fh, header) name = next(iterator) return name, numpy.fromiter(iterator, dtype=cls.dtype) def save(self, filename, fh=None, mode=AUTOMATIC, update_normals=True): '''Save the STL to a (binary) file If mode is :py:data:`AUTOMATIC` an :py:data:`ASCII` file will be written if the output is a TTY and a :py:data:`BINARY` file otherwise. :param str filename: The file to load :param file fh: The file handle to open :param int mode: The mode to write, default is :py:data:`AUTOMATIC`. :param bool update_normals: Whether to update the normals ''' assert filename, 'Filename is required for the STL headers' if update_normals: self.update_normals() if mode is AUTOMATIC: if fh and os.isatty(fh.fileno()): # pragma: no cover write = self._write_ascii else: write = self._write_binary elif mode is BINARY: write = self._write_binary elif mode is ASCII: write = self._write_ascii else: raise ValueError('Mode %r is invalid' % mode) name = os.path.split(filename)[-1] try: if fh: write(fh, name) else: with open(filename, 'wb') as fh: write(fh, filename) except IOError: # pragma: no cover pass def _write_ascii(self, fh, name): if _speedups and self.speedups: _speedups.ascii_write(fh, b(name), self.data) else: def p(s, file): file.write(b('%s\n' % s)) p('solid %s' % name, file=fh) for row in self.data: vectors = row['vectors'] p('facet normal %f %f %f' % tuple(row['normals']), file=fh) p(' outer loop', file=fh) p(' vertex %f %f %f' % tuple(vectors[0]), file=fh) p(' vertex %f %f %f' % tuple(vectors[1]), file=fh) p(' vertex %f %f %f' % tuple(vectors[2]), file=fh) p(' endloop', file=fh) p('endfacet', file=fh) p('endsolid %s' % name, file=fh) def _write_binary(self, fh, name): # Create the header header = '%s (%s) %s %s' % ( metadata.__package_name__, metadata.__version__, datetime.datetime.now(), name, ) # Make it exactly 80 characters header = header[:80].ljust(80, ' ') packed = struct.pack(s(' 84, ( 'numpy silently refused to write our file. Note that writing ' 'to `StringIO` objects is not supported by `numpy`') @classmethod def from_file(cls, filename, calculate_normals=True, fh=None, mode=Mode.AUTOMATIC, speedups=True, **kwargs): '''Load a mesh from a STL file :param str filename: The file to load :param bool calculate_normals: Whether to update the normals :param file fh: The file handle to open :param dict \**kwargs: The same as for :py:class:`stl.mesh.Mesh` ''' if fh: name, data = cls.load( fh, mode=mode, speedups=speedups) else: try: with open(filename, 'rb') as fh: name, data = cls.load( fh, mode=mode, speedups=speedups) except AssertionError: # pragma: no cover logger.warn('Unable to read the file with speedups, retrying') with open(filename, 'rb') as fh: name, data = cls.load( fh, mode=Mode.ASCII, speedups=False) return cls(data, calculate_normals, name=name, speedups=speedups, **kwargs) @classmethod def from_multi_file(cls, filename, calculate_normals=True, fh=None, mode=ASCII, speedups=True, **kwargs): '''Load multiple meshes from a STL file :param str filename: The file to load :param bool calculate_normals: Whether to update the normals :param file fh: The file handle to open :param dict \**kwargs: The same as for :py:class:`stl.mesh.Mesh` ''' if fh: close = False else: fh = open(filename, 'rb') close = True try: raw_data = cls.load(fh, mode=mode, speedups=speedups) while raw_data: name, data = raw_data yield cls(data, calculate_normals, name=name, speedups=speedups, **kwargs) raw_data = cls.load(fh, mode=mode, speedups=speedups) finally: if close: fh.close() StlMesh = BaseStl.from_file numpy-stl-2.3.2/stl/utils.py000066400000000000000000000010351313575633700160160ustar00rootroot00000000000000from __future__ import (absolute_import, division, print_function, unicode_literals) import sys IS_PYTHON2 = (sys.version_info[0] == 2) def b(s, encoding='ascii', errors='replace'): # pragma: no cover if IS_PYTHON2: return bytes(s) else: if isinstance(s, str): return bytes(s, encoding, errors) else: return s # return bytes(s, encoding, errors) def s(s): # pragma: no cover if IS_PYTHON2: return bytes(s) else: return s numpy-stl-2.3.2/tests/000077500000000000000000000000001313575633700146455ustar00rootroot00000000000000numpy-stl-2.3.2/tests/__init__.py000066400000000000000000000000001313575633700167440ustar00rootroot00000000000000numpy-stl-2.3.2/tests/conftest.py000066400000000000000000000016001313575633700170410ustar00rootroot00000000000000import py import pytest def pytest_generate_tests(metafunc): # Run all tests both with and without speedups metafunc.fixturenames.append('speedups') metafunc.parametrize('speedups', [False, True]) @pytest.fixture(scope='session') def cwd(): return py.path.local(__file__).dirpath() @pytest.fixture(scope='session') def ascii_path(cwd): return cwd.join('stl_ascii') @pytest.fixture(scope='session') def binary_path(cwd): return cwd.join('stl_binary') @pytest.fixture(scope='session', params=['ascii', 'binary']) def binary_ascii_path(request, ascii_path, binary_path): return ascii_path if request.param == 'ascii' else binary_path @pytest.fixture(scope='session') def ascii_file(ascii_path): return str(ascii_path.join('HalfDonut.stl')) @pytest.fixture(scope='session') def binary_file(binary_path): return str(binary_path.join('HalfDonut.stl')) numpy-stl-2.3.2/tests/requirements.txt000066400000000000000000000002251313575633700201300ustar00rootroot00000000000000cov-core coverage docutils execnet numpy cython pep8 py pyflakes pytest pytest-cache pytest-cov pytest-flakes pytest-pep8 python-utils Sphinx flake8 numpy-stl-2.3.2/tests/stl_ascii/000077500000000000000000000000001313575633700166175ustar00rootroot00000000000000numpy-stl-2.3.2/tests/stl_ascii/HalfDonut.stl000066400000000000000000001512131313575633700212320ustar00rootroot00000000000000solid HalfDonut.stl facet normal -0.014565 0.073223 -0.002897 outer loop vertex 0.399344 0.461940 1.044090 vertex 0.500000 0.500000 1.500000 vertex 0.576120 0.500000 1.117320 endloop endfacet facet normal -0.017352 0.087235 -0.003452 outer loop vertex 0.399344 0.461940 1.044090 vertex 0.308658 0.461940 1.500000 vertex 0.500000 0.500000 1.500000 endloop endfacet facet normal 0.011778 0.059213 0.002343 outer loop vertex 0.752897 0.461940 1.190540 vertex 0.500000 0.500000 1.500000 vertex 0.691342 0.461940 1.500000 endloop endfacet facet normal 0.014565 0.073223 0.002897 outer loop vertex 0.752897 0.461940 1.190540 vertex 0.576120 0.500000 1.117320 vertex 0.500000 0.500000 1.500000 endloop endfacet facet normal 0.026813 0.040128 0.005334 outer loop vertex 0.902761 0.353553 1.252620 vertex 0.691342 0.461940 1.500000 vertex 0.853553 0.353553 1.500000 endloop endfacet facet normal 0.033541 0.050198 0.006672 outer loop vertex 0.902761 0.353553 1.252620 vertex 0.752897 0.461940 1.190540 vertex 0.691342 0.461940 1.500000 endloop endfacet facet normal 0.033401 0.022318 0.006644 outer loop vertex 1.002900 0.191342 1.294090 vertex 0.853553 0.353553 1.500000 vertex 0.961940 0.191342 1.500000 endloop endfacet facet normal 0.040128 0.026813 0.007982 outer loop vertex 1.002900 0.191342 1.294090 vertex 0.902761 0.353553 1.252620 vertex 0.853553 0.353553 1.500000 endloop endfacet facet normal -0.090751 0.060638 -0.018051 outer loop vertex 0.149344 0.191342 0.940540 vertex 0.038060 0.191342 1.500000 vertex 0.249480 0.353553 0.982018 endloop endfacet facet normal -0.084022 0.056143 -0.016713 outer loop vertex 0.038060 0.191342 1.500000 vertex 0.146447 0.353553 1.500000 vertex 0.249480 0.353553 0.982018 endloop endfacet facet normal -0.049415 0.073954 -0.009829 outer loop vertex 0.249480 0.353553 0.982018 vertex 0.308658 0.461940 1.500000 vertex 0.399344 0.461940 1.044090 endloop endfacet facet normal -0.056143 0.084022 -0.011167 outer loop vertex 0.249480 0.353553 0.982018 vertex 0.146447 0.353553 1.500000 vertex 0.308658 0.461940 1.500000 endloop endfacet facet normal -0.012348 0.073224 -0.008250 outer loop vertex 0.657594 0.461940 0.657594 vertex 0.576120 0.500000 1.117320 vertex 0.792893 0.500000 0.792893 endloop endfacet facet normal -0.014710 0.087235 -0.009829 outer loop vertex 0.657594 0.461940 0.657594 vertex 0.399344 0.461940 1.044090 vertex 0.576120 0.500000 1.117320 endloop endfacet facet normal 0.009985 0.059213 0.006672 outer loop vertex 0.928192 0.461940 0.928192 vertex 0.792893 0.500000 0.792893 vertex 0.752897 0.461940 1.190540 endloop endfacet facet normal 0.012348 0.073223 0.008250 outer loop vertex 0.752897 0.461940 1.190540 vertex 0.792893 0.500000 0.792893 vertex 0.576120 0.500000 1.117320 endloop endfacet facet normal 0.022732 0.040130 0.015188 outer loop vertex 1.042890 0.353553 1.042890 vertex 0.752897 0.461940 1.190540 vertex 0.902761 0.353553 1.252620 endloop endfacet facet normal 0.028435 0.050197 0.019000 outer loop vertex 1.042890 0.353553 1.042890 vertex 0.928192 0.461940 0.928192 vertex 0.752897 0.461940 1.190540 endloop endfacet facet normal 0.028316 0.022317 0.018919 outer loop vertex 1.119530 0.191342 1.119530 vertex 0.902761 0.353553 1.252620 vertex 1.002900 0.191342 1.294090 endloop endfacet facet normal 0.034021 0.026813 0.022730 outer loop vertex 1.119530 0.191342 1.119530 vertex 1.042890 0.353553 1.042890 vertex 0.902761 0.353553 1.252620 endloop endfacet facet normal -0.076935 0.060638 -0.051406 outer loop vertex 0.466252 0.191342 0.466252 vertex 0.149344 0.191342 0.940540 vertex 0.542893 0.353553 0.542893 endloop endfacet facet normal -0.071231 0.056142 -0.047595 outer loop vertex 0.149344 0.191342 0.940540 vertex 0.249480 0.353553 0.982018 vertex 0.542893 0.353553 0.542893 endloop endfacet facet normal -0.047595 0.084023 -0.031802 outer loop vertex 0.542893 0.353553 0.542893 vertex 0.249480 0.353553 0.982018 vertex 0.657594 0.461940 0.657594 endloop endfacet facet normal -0.041891 0.073952 -0.027991 outer loop vertex 0.249480 0.353553 0.982018 vertex 0.399344 0.461940 1.044090 vertex 0.657594 0.461940 0.657594 endloop endfacet facet normal -0.009829 0.087235 -0.014710 outer loop vertex 1.044090 0.461940 0.399344 vertex 0.657594 0.461940 0.657594 vertex 1.117320 0.500000 0.576120 endloop endfacet facet normal -0.008250 0.073224 -0.012348 outer loop vertex 0.657594 0.461940 0.657594 vertex 0.792893 0.500000 0.792893 vertex 1.117320 0.500000 0.576120 endloop endfacet facet normal 0.006672 0.059213 0.009985 outer loop vertex 1.190540 0.461940 0.752897 vertex 0.792893 0.500000 0.792893 vertex 0.928192 0.461940 0.928192 endloop endfacet facet normal 0.008250 0.073223 0.012348 outer loop vertex 1.190540 0.461940 0.752897 vertex 1.117320 0.500000 0.576120 vertex 0.792893 0.500000 0.792893 endloop endfacet facet normal 0.015188 0.040130 0.022732 outer loop vertex 1.252620 0.353553 0.902761 vertex 1.190540 0.461940 0.752897 vertex 1.042890 0.353553 1.042890 endloop endfacet facet normal 0.019000 0.050197 0.028435 outer loop vertex 1.042890 0.353553 1.042890 vertex 1.190540 0.461940 0.752897 vertex 0.928192 0.461940 0.928192 endloop endfacet facet normal 0.018919 0.022317 0.028316 outer loop vertex 1.294090 0.191342 1.002900 vertex 1.252620 0.353553 0.902761 vertex 1.119530 0.191342 1.119530 endloop endfacet facet normal 0.022730 0.026813 0.034021 outer loop vertex 1.119530 0.191342 1.119530 vertex 1.252620 0.353553 0.902761 vertex 1.042890 0.353553 1.042890 endloop endfacet facet normal -0.047595 0.056142 -0.071231 outer loop vertex 0.940540 0.191342 0.149344 vertex 0.542893 0.353553 0.542893 vertex 0.982018 0.353553 0.249480 endloop endfacet facet normal -0.051406 0.060638 -0.076935 outer loop vertex 0.940540 0.191342 0.149344 vertex 0.466252 0.191342 0.466252 vertex 0.542893 0.353553 0.542893 endloop endfacet facet normal -0.027991 0.073952 -0.041891 outer loop vertex 0.982018 0.353553 0.249480 vertex 0.657594 0.461940 0.657594 vertex 1.044090 0.461940 0.399344 endloop endfacet facet normal -0.031802 0.084023 -0.047595 outer loop vertex 0.982018 0.353553 0.249480 vertex 0.542893 0.353553 0.542893 vertex 0.657594 0.461940 0.657594 endloop endfacet facet normal -0.003452 0.087235 -0.017352 outer loop vertex 1.500000 0.461940 0.308658 vertex 1.044090 0.461940 0.399344 vertex 1.500000 0.500000 0.500000 endloop endfacet facet normal -0.002897 0.073223 -0.014565 outer loop vertex 1.044090 0.461940 0.399344 vertex 1.117320 0.500000 0.576120 vertex 1.500000 0.500000 0.500000 endloop endfacet facet normal 0.002897 0.073223 0.014565 outer loop vertex 1.190540 0.461940 0.752897 vertex 1.500000 0.500000 0.500000 vertex 1.117320 0.500000 0.576120 endloop endfacet facet normal 0.002343 0.059213 0.011778 outer loop vertex 1.500000 0.461940 0.691342 vertex 1.500000 0.500000 0.500000 vertex 1.190540 0.461940 0.752897 endloop endfacet facet normal 0.005334 0.040128 0.026813 outer loop vertex 1.500000 0.353553 0.853553 vertex 1.500000 0.461940 0.691342 vertex 1.252620 0.353553 0.902761 endloop endfacet facet normal 0.006672 0.050198 0.033541 outer loop vertex 1.252620 0.353553 0.902761 vertex 1.500000 0.461940 0.691342 vertex 1.190540 0.461940 0.752897 endloop endfacet facet normal 0.006644 0.022318 0.033401 outer loop vertex 1.500000 0.191342 0.961940 vertex 1.500000 0.353553 0.853553 vertex 1.294090 0.191342 1.002900 endloop endfacet facet normal 0.007982 0.026813 0.040128 outer loop vertex 1.294090 0.191342 1.002900 vertex 1.500000 0.353553 0.853553 vertex 1.252620 0.353553 0.902761 endloop endfacet facet normal -0.016713 0.056143 -0.084022 outer loop vertex 1.500000 0.191342 0.038060 vertex 0.982018 0.353553 0.249480 vertex 1.500000 0.353553 0.146447 endloop endfacet facet normal -0.018051 0.060638 -0.090751 outer loop vertex 1.500000 0.191342 0.038060 vertex 0.940540 0.191342 0.149344 vertex 0.982018 0.353553 0.249480 endloop endfacet facet normal -0.011167 0.084022 -0.056143 outer loop vertex 1.500000 0.353553 0.146447 vertex 0.982018 0.353553 0.249480 vertex 1.500000 0.461940 0.308658 endloop endfacet facet normal -0.009829 0.073954 -0.049415 outer loop vertex 0.982018 0.353553 0.249480 vertex 1.044090 0.461940 0.399344 vertex 1.500000 0.461940 0.308658 endloop endfacet facet normal 0.003452 0.087235 -0.017352 outer loop vertex 1.500000 0.461940 0.308658 vertex 1.500000 0.500000 0.500000 vertex 1.955910 0.461940 0.399344 endloop endfacet facet normal 0.002897 0.073223 -0.014565 outer loop vertex 1.955910 0.461940 0.399344 vertex 1.500000 0.500000 0.500000 vertex 1.882680 0.500000 0.576120 endloop endfacet facet normal -0.002897 0.073223 0.014565 outer loop vertex 1.809460 0.461940 0.752897 vertex 1.882680 0.500000 0.576120 vertex 1.500000 0.500000 0.500000 endloop endfacet facet normal -0.002343 0.059213 0.011778 outer loop vertex 1.500000 0.461940 0.691342 vertex 1.809460 0.461940 0.752897 vertex 1.500000 0.500000 0.500000 endloop endfacet facet normal -0.005334 0.040128 0.026813 outer loop vertex 1.500000 0.353553 0.853553 vertex 1.747380 0.353553 0.902761 vertex 1.500000 0.461940 0.691342 endloop endfacet facet normal -0.006672 0.050198 0.033541 outer loop vertex 1.747380 0.353553 0.902761 vertex 1.809460 0.461940 0.752897 vertex 1.500000 0.461940 0.691342 endloop endfacet facet normal -0.006644 0.022318 0.033401 outer loop vertex 1.500000 0.191342 0.961940 vertex 1.705910 0.191342 1.002900 vertex 1.500000 0.353553 0.853553 endloop endfacet facet normal -0.007982 0.026813 0.040128 outer loop vertex 1.705910 0.191342 1.002900 vertex 1.747380 0.353553 0.902761 vertex 1.500000 0.353553 0.853553 endloop endfacet facet normal 0.016713 0.056142 -0.084022 outer loop vertex 1.500000 0.191342 0.038060 vertex 1.500000 0.353553 0.146447 vertex 2.017980 0.353553 0.249480 endloop endfacet facet normal 0.018051 0.060638 -0.090751 outer loop vertex 1.500000 0.191342 0.038060 vertex 2.017980 0.353553 0.249480 vertex 2.059460 0.191342 0.149344 endloop endfacet facet normal 0.011167 0.084022 -0.056142 outer loop vertex 1.500000 0.353553 0.146447 vertex 1.500000 0.461940 0.308658 vertex 2.017980 0.353553 0.249480 endloop endfacet facet normal 0.009829 0.073953 -0.049415 outer loop vertex 2.017980 0.353553 0.249480 vertex 1.500000 0.461940 0.308658 vertex 1.955910 0.461940 0.399344 endloop endfacet facet normal 0.009829 0.087236 -0.014710 outer loop vertex 1.955910 0.461940 0.399344 vertex 1.882680 0.500000 0.576120 vertex 2.342410 0.461940 0.657594 endloop endfacet facet normal 0.008250 0.073224 -0.012348 outer loop vertex 2.342410 0.461940 0.657594 vertex 1.882680 0.500000 0.576120 vertex 2.207110 0.500000 0.792893 endloop endfacet facet normal -0.008250 0.073224 0.012348 outer loop vertex 1.809460 0.461940 0.752897 vertex 2.207110 0.500000 0.792893 vertex 1.882680 0.500000 0.576120 endloop endfacet facet normal -0.006672 0.059213 0.009985 outer loop vertex 1.809460 0.461940 0.752897 vertex 2.071810 0.461940 0.928192 vertex 2.207110 0.500000 0.792893 endloop endfacet facet normal -0.015188 0.040130 0.022732 outer loop vertex 1.747380 0.353553 0.902761 vertex 1.957110 0.353553 1.042890 vertex 1.809460 0.461940 0.752897 endloop endfacet facet normal -0.019000 0.050197 0.028435 outer loop vertex 1.957110 0.353553 1.042890 vertex 2.071810 0.461940 0.928192 vertex 1.809460 0.461940 0.752897 endloop endfacet facet normal -0.018919 0.022317 0.028316 outer loop vertex 1.705910 0.191342 1.002900 vertex 1.880470 0.191342 1.119530 vertex 1.747380 0.353553 0.902761 endloop endfacet facet normal -0.022730 0.026813 0.034021 outer loop vertex 1.880470 0.191342 1.119530 vertex 1.957110 0.353553 1.042890 vertex 1.747380 0.353553 0.902761 endloop endfacet facet normal 0.051406 0.060638 -0.076935 outer loop vertex 2.059460 0.191342 0.149344 vertex 2.457110 0.353553 0.542893 vertex 2.533750 0.191342 0.466252 endloop endfacet facet normal 0.047595 0.056143 -0.071232 outer loop vertex 2.059460 0.191342 0.149344 vertex 2.017980 0.353553 0.249480 vertex 2.457110 0.353553 0.542893 endloop endfacet facet normal 0.031802 0.084023 -0.047596 outer loop vertex 2.017980 0.353553 0.249480 vertex 2.342410 0.461940 0.657594 vertex 2.457110 0.353553 0.542893 endloop endfacet facet normal 0.027991 0.073952 -0.041892 outer loop vertex 2.017980 0.353553 0.249480 vertex 1.955910 0.461940 0.399344 vertex 2.342410 0.461940 0.657594 endloop endfacet facet normal 0.014710 0.087236 -0.009829 outer loop vertex 2.342410 0.461940 0.657594 vertex 2.423880 0.500000 1.117320 vertex 2.600660 0.461940 1.044090 endloop endfacet facet normal 0.012348 0.073224 -0.008250 outer loop vertex 2.342410 0.461940 0.657594 vertex 2.207110 0.500000 0.792893 vertex 2.423880 0.500000 1.117320 endloop endfacet facet normal -0.009985 0.059212 0.006672 outer loop vertex 2.071810 0.461940 0.928192 vertex 2.247100 0.461940 1.190540 vertex 2.207110 0.500000 0.792893 endloop endfacet facet normal -0.012348 0.073224 0.008250 outer loop vertex 2.247100 0.461940 1.190540 vertex 2.423880 0.500000 1.117320 vertex 2.207110 0.500000 0.792893 endloop endfacet facet normal -0.028435 0.050197 0.018999 outer loop vertex 1.957110 0.353553 1.042890 vertex 2.247100 0.461940 1.190540 vertex 2.071810 0.461940 0.928192 endloop endfacet facet normal -0.022732 0.040129 0.015188 outer loop vertex 1.957110 0.353553 1.042890 vertex 2.097240 0.353553 1.252620 vertex 2.247100 0.461940 1.190540 endloop endfacet facet normal -0.034021 0.026813 0.022731 outer loop vertex 1.880470 0.191342 1.119530 vertex 2.097240 0.353553 1.252620 vertex 1.957110 0.353553 1.042890 endloop endfacet facet normal -0.028316 0.022317 0.018919 outer loop vertex 1.880470 0.191342 1.119530 vertex 1.997100 0.191342 1.294090 vertex 2.097240 0.353553 1.252620 endloop endfacet facet normal 0.076935 0.060638 -0.051406 outer loop vertex 2.533750 0.191342 0.466252 vertex 2.457110 0.353553 0.542893 vertex 2.850660 0.191342 0.940540 endloop endfacet facet normal 0.071231 0.056144 -0.047594 outer loop vertex 2.850660 0.191342 0.940540 vertex 2.457110 0.353553 0.542893 vertex 2.750520 0.353553 0.982018 endloop endfacet facet normal 0.047595 0.084022 -0.031802 outer loop vertex 2.457110 0.353553 0.542893 vertex 2.342410 0.461940 0.657594 vertex 2.750520 0.353553 0.982018 endloop endfacet facet normal 0.041891 0.073950 -0.027991 outer loop vertex 2.750520 0.353553 0.982018 vertex 2.342410 0.461940 0.657594 vertex 2.600660 0.461940 1.044090 endloop endfacet facet normal 0.017352 0.087234 -0.003451 outer loop vertex 2.600660 0.461940 1.044090 vertex 2.500000 0.500000 1.500000 vertex 2.691340 0.461940 1.500000 endloop endfacet facet normal 0.014565 0.073224 -0.002897 outer loop vertex 2.600660 0.461940 1.044090 vertex 2.423880 0.500000 1.117320 vertex 2.500000 0.500000 1.500000 endloop endfacet facet normal -0.011778 0.059212 0.002343 outer loop vertex 2.247100 0.461940 1.190540 vertex 2.308660 0.461940 1.500000 vertex 2.500000 0.500000 1.500000 endloop endfacet facet normal -0.014565 0.073224 0.002897 outer loop vertex 2.247100 0.461940 1.190540 vertex 2.500000 0.500000 1.500000 vertex 2.423880 0.500000 1.117320 endloop endfacet facet normal -0.033541 0.050197 0.006672 outer loop vertex 2.097240 0.353553 1.252620 vertex 2.308660 0.461940 1.500000 vertex 2.247100 0.461940 1.190540 endloop endfacet facet normal -0.026813 0.040128 0.005334 outer loop vertex 2.097240 0.353553 1.252620 vertex 2.146450 0.353553 1.500000 vertex 2.308660 0.461940 1.500000 endloop endfacet facet normal -0.040128 0.026813 0.007982 outer loop vertex 1.997100 0.191342 1.294090 vertex 2.146450 0.353553 1.500000 vertex 2.097240 0.353553 1.252620 endloop endfacet facet normal -0.033401 0.022319 0.006644 outer loop vertex 1.997100 0.191342 1.294090 vertex 2.038060 0.191342 1.500000 vertex 2.146450 0.353553 1.500000 endloop endfacet facet normal 0.090751 0.060640 -0.018051 outer loop vertex 2.850660 0.191342 0.940540 vertex 2.750520 0.353553 0.982018 vertex 2.961940 0.191342 1.500000 endloop endfacet facet normal 0.084022 0.056144 -0.016713 outer loop vertex 2.961940 0.191342 1.500000 vertex 2.750520 0.353553 0.982018 vertex 2.853550 0.353553 1.500000 endloop endfacet facet normal 0.056143 0.084022 -0.011167 outer loop vertex 2.750520 0.353553 0.982018 vertex 2.691340 0.461940 1.500000 vertex 2.853550 0.353553 1.500000 endloop endfacet facet normal 0.049415 0.073951 -0.009829 outer loop vertex 2.750520 0.353553 0.982018 vertex 2.600660 0.461940 1.044090 vertex 2.691340 0.461940 1.500000 endloop endfacet facet normal 0.017352 0.087234 0.003451 outer loop vertex 2.691340 0.461940 1.500000 vertex 2.500000 0.500000 1.500000 vertex 2.600660 0.461940 1.955910 endloop endfacet facet normal 0.014565 0.073224 0.002897 outer loop vertex 2.600660 0.461940 1.955910 vertex 2.500000 0.500000 1.500000 vertex 2.423880 0.500000 1.882680 endloop endfacet facet normal -0.011778 0.059212 -0.002343 outer loop vertex 2.308660 0.461940 1.500000 vertex 2.247100 0.461940 1.809460 vertex 2.500000 0.500000 1.500000 endloop endfacet facet normal -0.014565 0.073224 -0.002897 outer loop vertex 2.247100 0.461940 1.809460 vertex 2.423880 0.500000 1.882680 vertex 2.500000 0.500000 1.500000 endloop endfacet facet normal -0.026813 0.040128 -0.005334 outer loop vertex 2.146450 0.353553 1.500000 vertex 2.097240 0.353553 1.747380 vertex 2.308660 0.461940 1.500000 endloop endfacet facet normal -0.033541 0.050197 -0.006672 outer loop vertex 2.097240 0.353553 1.747380 vertex 2.247100 0.461940 1.809460 vertex 2.308660 0.461940 1.500000 endloop endfacet facet normal -0.040128 0.026813 -0.007982 outer loop vertex 1.997100 0.191342 1.705910 vertex 2.097240 0.353553 1.747380 vertex 2.146450 0.353553 1.500000 endloop endfacet facet normal -0.033401 0.022319 -0.006644 outer loop vertex 2.038060 0.191342 1.500000 vertex 1.997100 0.191342 1.705910 vertex 2.146450 0.353553 1.500000 endloop endfacet facet normal 0.090751 0.060640 0.018051 outer loop vertex 2.961940 0.191342 1.500000 vertex 2.750520 0.353553 2.017980 vertex 2.850660 0.191342 2.059460 endloop endfacet facet normal 0.084022 0.056144 0.016713 outer loop vertex 2.961940 0.191342 1.500000 vertex 2.853550 0.353553 1.500000 vertex 2.750520 0.353553 2.017980 endloop endfacet facet normal 0.056142 0.084022 0.011167 outer loop vertex 2.853550 0.353553 1.500000 vertex 2.691340 0.461940 1.500000 vertex 2.750520 0.353553 2.017980 endloop endfacet facet normal 0.049415 0.073951 0.009829 outer loop vertex 2.750520 0.353553 2.017980 vertex 2.691340 0.461940 1.500000 vertex 2.600660 0.461940 1.955910 endloop endfacet facet normal 0.014710 0.087237 0.009829 outer loop vertex 2.600660 0.461940 1.955910 vertex 2.423880 0.500000 1.882680 vertex 2.342410 0.461940 2.342410 endloop endfacet facet normal 0.012348 0.073224 0.008250 outer loop vertex 2.342410 0.461940 2.342410 vertex 2.423880 0.500000 1.882680 vertex 2.207110 0.500000 2.207110 endloop endfacet facet normal -0.012348 0.073225 -0.008250 outer loop vertex 2.247100 0.461940 1.809460 vertex 2.207110 0.500000 2.207110 vertex 2.423880 0.500000 1.882680 endloop endfacet facet normal -0.009985 0.059213 -0.006672 outer loop vertex 2.247100 0.461940 1.809460 vertex 2.071810 0.461940 2.071810 vertex 2.207110 0.500000 2.207110 endloop endfacet facet normal -0.022732 0.040129 -0.015188 outer loop vertex 2.097240 0.353553 1.747380 vertex 1.957110 0.353553 1.957110 vertex 2.247100 0.461940 1.809460 endloop endfacet facet normal -0.028435 0.050197 -0.018999 outer loop vertex 1.957110 0.353553 1.957110 vertex 2.071810 0.461940 2.071810 vertex 2.247100 0.461940 1.809460 endloop endfacet facet normal -0.028316 0.022317 -0.018919 outer loop vertex 1.997100 0.191342 1.705910 vertex 1.880470 0.191342 1.880470 vertex 2.097240 0.353553 1.747380 endloop endfacet facet normal -0.034021 0.026813 -0.022731 outer loop vertex 1.880470 0.191342 1.880470 vertex 1.957110 0.353553 1.957110 vertex 2.097240 0.353553 1.747380 endloop endfacet facet normal 0.076935 0.060638 0.051406 outer loop vertex 2.850660 0.191342 2.059460 vertex 2.457110 0.353553 2.457110 vertex 2.533750 0.191342 2.533750 endloop endfacet facet normal 0.071232 0.056145 0.047594 outer loop vertex 2.850660 0.191342 2.059460 vertex 2.750520 0.353553 2.017980 vertex 2.457110 0.353553 2.457110 endloop endfacet facet normal 0.047596 0.084022 0.031802 outer loop vertex 2.750520 0.353553 2.017980 vertex 2.342410 0.461940 2.342410 vertex 2.457110 0.353553 2.457110 endloop endfacet facet normal 0.041892 0.073950 0.027991 outer loop vertex 2.750520 0.353553 2.017980 vertex 2.600660 0.461940 1.955910 vertex 2.342410 0.461940 2.342410 endloop endfacet facet normal 0.009829 0.087237 0.014710 outer loop vertex 2.342410 0.461940 2.342410 vertex 1.882680 0.500000 2.423880 vertex 1.955910 0.461940 2.600660 endloop endfacet facet normal 0.008250 0.073224 0.012348 outer loop vertex 2.342410 0.461940 2.342410 vertex 2.207110 0.500000 2.207110 vertex 1.882680 0.500000 2.423880 endloop endfacet facet normal -0.006672 0.059213 -0.009985 outer loop vertex 2.071810 0.461940 2.071810 vertex 1.809460 0.461940 2.247100 vertex 2.207110 0.500000 2.207110 endloop endfacet facet normal -0.008250 0.073225 -0.012348 outer loop vertex 1.809460 0.461940 2.247100 vertex 1.882680 0.500000 2.423880 vertex 2.207110 0.500000 2.207110 endloop endfacet facet normal -0.018999 0.050197 -0.028435 outer loop vertex 1.957110 0.353553 1.957110 vertex 1.809460 0.461940 2.247100 vertex 2.071810 0.461940 2.071810 endloop endfacet facet normal -0.015188 0.040129 -0.022732 outer loop vertex 1.957110 0.353553 1.957110 vertex 1.747380 0.353553 2.097240 vertex 1.809460 0.461940 2.247100 endloop endfacet facet normal -0.022731 0.026813 -0.034021 outer loop vertex 1.880470 0.191342 1.880470 vertex 1.747380 0.353553 2.097240 vertex 1.957110 0.353553 1.957110 endloop endfacet facet normal -0.018919 0.022317 -0.028316 outer loop vertex 1.880470 0.191342 1.880470 vertex 1.705910 0.191342 1.997100 vertex 1.747380 0.353553 2.097240 endloop endfacet facet normal 0.051406 0.060638 0.076935 outer loop vertex 2.533750 0.191342 2.533750 vertex 2.457110 0.353553 2.457110 vertex 2.059460 0.191342 2.850660 endloop endfacet facet normal 0.047594 0.056145 0.071232 outer loop vertex 2.059460 0.191342 2.850660 vertex 2.457110 0.353553 2.457110 vertex 2.017980 0.353553 2.750520 endloop endfacet facet normal 0.031802 0.084022 0.047596 outer loop vertex 2.457110 0.353553 2.457110 vertex 2.342410 0.461940 2.342410 vertex 2.017980 0.353553 2.750520 endloop endfacet facet normal 0.027991 0.073950 0.041892 outer loop vertex 2.017980 0.353553 2.750520 vertex 2.342410 0.461940 2.342410 vertex 1.955910 0.461940 2.600660 endloop endfacet facet normal 0.003451 0.087234 0.017352 outer loop vertex 1.955910 0.461940 2.600660 vertex 1.500000 0.500000 2.500000 vertex 1.500000 0.461940 2.691340 endloop endfacet facet normal 0.002897 0.073224 0.014565 outer loop vertex 1.955910 0.461940 2.600660 vertex 1.882680 0.500000 2.423880 vertex 1.500000 0.500000 2.500000 endloop endfacet facet normal -0.002897 0.073224 -0.014565 outer loop vertex 1.809460 0.461940 2.247100 vertex 1.500000 0.500000 2.500000 vertex 1.882680 0.500000 2.423880 endloop endfacet facet normal -0.002343 0.059212 -0.011778 outer loop vertex 1.809460 0.461940 2.247100 vertex 1.500000 0.461940 2.308660 vertex 1.500000 0.500000 2.500000 endloop endfacet facet normal -0.006672 0.050197 -0.033541 outer loop vertex 1.747380 0.353553 2.097240 vertex 1.500000 0.461940 2.308660 vertex 1.809460 0.461940 2.247100 endloop endfacet facet normal -0.005334 0.040128 -0.026813 outer loop vertex 1.747380 0.353553 2.097240 vertex 1.500000 0.353553 2.146450 vertex 1.500000 0.461940 2.308660 endloop endfacet facet normal -0.007982 0.026813 -0.040128 outer loop vertex 1.705910 0.191342 1.997100 vertex 1.500000 0.353553 2.146450 vertex 1.747380 0.353553 2.097240 endloop endfacet facet normal -0.006644 0.022319 -0.033401 outer loop vertex 1.705910 0.191342 1.997100 vertex 1.500000 0.191342 2.038060 vertex 1.500000 0.353553 2.146450 endloop endfacet facet normal 0.018051 0.060640 0.090751 outer loop vertex 2.059460 0.191342 2.850660 vertex 2.017980 0.353553 2.750520 vertex 1.500000 0.191342 2.961940 endloop endfacet facet normal 0.016713 0.056144 0.084022 outer loop vertex 1.500000 0.191342 2.961940 vertex 2.017980 0.353553 2.750520 vertex 1.500000 0.353553 2.853550 endloop endfacet facet normal 0.011167 0.084022 0.056142 outer loop vertex 2.017980 0.353553 2.750520 vertex 1.500000 0.461940 2.691340 vertex 1.500000 0.353553 2.853550 endloop endfacet facet normal 0.009829 0.073951 0.049415 outer loop vertex 2.017980 0.353553 2.750520 vertex 1.955910 0.461940 2.600660 vertex 1.500000 0.461940 2.691340 endloop endfacet facet normal -0.002897 0.073224 0.014565 outer loop vertex 1.044090 0.461940 2.600660 vertex 1.500000 0.500000 2.500000 vertex 1.117320 0.500000 2.423880 endloop endfacet facet normal -0.003451 0.087234 0.017352 outer loop vertex 1.044090 0.461940 2.600660 vertex 1.500000 0.461940 2.691340 vertex 1.500000 0.500000 2.500000 endloop endfacet facet normal 0.002897 0.073224 -0.014565 outer loop vertex 1.190540 0.461940 2.247100 vertex 1.117320 0.500000 2.423880 vertex 1.500000 0.500000 2.500000 endloop endfacet facet normal 0.002343 0.059212 -0.011778 outer loop vertex 1.190540 0.461940 2.247100 vertex 1.500000 0.500000 2.500000 vertex 1.500000 0.461940 2.308660 endloop endfacet facet normal 0.005334 0.040128 -0.026813 outer loop vertex 1.252620 0.353553 2.097240 vertex 1.500000 0.461940 2.308660 vertex 1.500000 0.353553 2.146450 endloop endfacet facet normal 0.006672 0.050197 -0.033541 outer loop vertex 1.252620 0.353553 2.097240 vertex 1.190540 0.461940 2.247100 vertex 1.500000 0.461940 2.308660 endloop endfacet facet normal 0.006644 0.022319 -0.033401 outer loop vertex 1.294090 0.191342 1.997100 vertex 1.500000 0.353553 2.146450 vertex 1.500000 0.191342 2.038060 endloop endfacet facet normal 0.007982 0.026813 -0.040128 outer loop vertex 1.294090 0.191342 1.997100 vertex 1.252620 0.353553 2.097240 vertex 1.500000 0.353553 2.146450 endloop endfacet facet normal -0.018051 0.060640 0.090751 outer loop vertex 0.940540 0.191342 2.850660 vertex 1.500000 0.191342 2.961940 vertex 0.982018 0.353553 2.750520 endloop endfacet facet normal -0.016713 0.056144 0.084022 outer loop vertex 1.500000 0.191342 2.961940 vertex 1.500000 0.353553 2.853550 vertex 0.982018 0.353553 2.750520 endloop endfacet facet normal -0.009829 0.073951 0.049415 outer loop vertex 0.982018 0.353553 2.750520 vertex 1.500000 0.461940 2.691340 vertex 1.044090 0.461940 2.600660 endloop endfacet facet normal -0.011167 0.084022 0.056143 outer loop vertex 0.982018 0.353553 2.750520 vertex 1.500000 0.353553 2.853550 vertex 1.500000 0.461940 2.691340 endloop endfacet facet normal -0.008250 0.073224 0.012348 outer loop vertex 0.657594 0.461940 2.342410 vertex 1.117320 0.500000 2.423880 vertex 0.792893 0.500000 2.207110 endloop endfacet facet normal -0.009829 0.087236 0.014710 outer loop vertex 0.657594 0.461940 2.342410 vertex 1.044090 0.461940 2.600660 vertex 1.117320 0.500000 2.423880 endloop endfacet facet normal 0.006672 0.059212 -0.009985 outer loop vertex 0.928192 0.461940 2.071810 vertex 0.792893 0.500000 2.207110 vertex 1.190540 0.461940 2.247100 endloop endfacet facet normal 0.008250 0.073224 -0.012348 outer loop vertex 1.190540 0.461940 2.247100 vertex 0.792893 0.500000 2.207110 vertex 1.117320 0.500000 2.423880 endloop endfacet facet normal 0.015188 0.040129 -0.022732 outer loop vertex 1.042890 0.353553 1.957110 vertex 1.190540 0.461940 2.247100 vertex 1.252620 0.353553 2.097240 endloop endfacet facet normal 0.018999 0.050197 -0.028435 outer loop vertex 1.042890 0.353553 1.957110 vertex 0.928192 0.461940 2.071810 vertex 1.190540 0.461940 2.247100 endloop endfacet facet normal 0.018919 0.022317 -0.028316 outer loop vertex 1.119530 0.191342 1.880470 vertex 1.252620 0.353553 2.097240 vertex 1.294090 0.191342 1.997100 endloop endfacet facet normal 0.022731 0.026813 -0.034021 outer loop vertex 1.119530 0.191342 1.880470 vertex 1.042890 0.353553 1.957110 vertex 1.252620 0.353553 2.097240 endloop endfacet facet normal -0.051406 0.060638 0.076935 outer loop vertex 0.466252 0.191342 2.533750 vertex 0.940540 0.191342 2.850660 vertex 0.542893 0.353553 2.457110 endloop endfacet facet normal -0.047594 0.056144 0.071231 outer loop vertex 0.940540 0.191342 2.850660 vertex 0.982018 0.353553 2.750520 vertex 0.542893 0.353553 2.457110 endloop endfacet facet normal -0.031802 0.084022 0.047595 outer loop vertex 0.542893 0.353553 2.457110 vertex 0.982018 0.353553 2.750520 vertex 0.657594 0.461940 2.342410 endloop endfacet facet normal -0.027991 0.073950 0.041891 outer loop vertex 0.982018 0.353553 2.750520 vertex 1.044090 0.461940 2.600660 vertex 0.657594 0.461940 2.342410 endloop endfacet facet normal -0.014710 0.087236 0.009829 outer loop vertex 0.399344 0.461940 1.955910 vertex 0.657594 0.461940 2.342410 vertex 0.576120 0.500000 1.882680 endloop endfacet facet normal -0.012348 0.073224 0.008250 outer loop vertex 0.657594 0.461940 2.342410 vertex 0.792893 0.500000 2.207110 vertex 0.576120 0.500000 1.882680 endloop endfacet facet normal 0.009985 0.059213 -0.006672 outer loop vertex 0.752897 0.461940 1.809460 vertex 0.792893 0.500000 2.207110 vertex 0.928192 0.461940 2.071810 endloop endfacet facet normal 0.012348 0.073224 -0.008250 outer loop vertex 0.752897 0.461940 1.809460 vertex 0.576120 0.500000 1.882680 vertex 0.792893 0.500000 2.207110 endloop endfacet facet normal 0.022732 0.040130 -0.015188 outer loop vertex 0.902761 0.353553 1.747380 vertex 0.752897 0.461940 1.809460 vertex 1.042890 0.353553 1.957110 endloop endfacet facet normal 0.028435 0.050197 -0.019000 outer loop vertex 1.042890 0.353553 1.957110 vertex 0.752897 0.461940 1.809460 vertex 0.928192 0.461940 2.071810 endloop endfacet facet normal 0.028316 0.022317 -0.018919 outer loop vertex 1.002900 0.191342 1.705910 vertex 0.902761 0.353553 1.747380 vertex 1.119530 0.191342 1.880470 endloop endfacet facet normal 0.034021 0.026813 -0.022730 outer loop vertex 1.119530 0.191342 1.880470 vertex 0.902761 0.353553 1.747380 vertex 1.042890 0.353553 1.957110 endloop endfacet facet normal -0.071232 0.056143 0.047595 outer loop vertex 0.149344 0.191342 2.059460 vertex 0.542893 0.353553 2.457110 vertex 0.249480 0.353553 2.017980 endloop endfacet facet normal -0.076935 0.060638 0.051406 outer loop vertex 0.149344 0.191342 2.059460 vertex 0.466252 0.191342 2.533750 vertex 0.542893 0.353553 2.457110 endloop endfacet facet normal -0.041892 0.073952 0.027991 outer loop vertex 0.249480 0.353553 2.017980 vertex 0.657594 0.461940 2.342410 vertex 0.399344 0.461940 1.955910 endloop endfacet facet normal -0.047596 0.084023 0.031802 outer loop vertex 0.249480 0.353553 2.017980 vertex 0.542893 0.353553 2.457110 vertex 0.657594 0.461940 2.342410 endloop endfacet facet normal -0.017352 0.087235 0.003452 outer loop vertex 0.308658 0.461940 1.500000 vertex 0.399344 0.461940 1.955910 vertex 0.500000 0.500000 1.500000 endloop endfacet facet normal -0.014565 0.073223 0.002897 outer loop vertex 0.399344 0.461940 1.955910 vertex 0.576120 0.500000 1.882680 vertex 0.500000 0.500000 1.500000 endloop endfacet facet normal 0.011778 0.059213 -0.002343 outer loop vertex 0.691342 0.461940 1.500000 vertex 0.500000 0.500000 1.500000 vertex 0.752897 0.461940 1.809460 endloop endfacet facet normal 0.014565 0.073223 -0.002897 outer loop vertex 0.752897 0.461940 1.809460 vertex 0.500000 0.500000 1.500000 vertex 0.576120 0.500000 1.882680 endloop endfacet facet normal 0.026813 0.040128 -0.005334 outer loop vertex 0.853553 0.353553 1.500000 vertex 0.691342 0.461940 1.500000 vertex 0.902761 0.353553 1.747380 endloop endfacet facet normal 0.033541 0.050198 -0.006672 outer loop vertex 0.902761 0.353553 1.747380 vertex 0.691342 0.461940 1.500000 vertex 0.752897 0.461940 1.809460 endloop endfacet facet normal 0.033401 0.022318 -0.006644 outer loop vertex 0.961940 0.191342 1.500000 vertex 0.853553 0.353553 1.500000 vertex 1.002900 0.191342 1.705910 endloop endfacet facet normal 0.040128 0.026813 -0.007982 outer loop vertex 1.002900 0.191342 1.705910 vertex 0.853553 0.353553 1.500000 vertex 0.902761 0.353553 1.747380 endloop endfacet facet normal -0.084022 0.056142 0.016713 outer loop vertex 0.038060 0.191342 1.500000 vertex 0.249480 0.353553 2.017980 vertex 0.146447 0.353553 1.500000 endloop endfacet facet normal -0.090751 0.060638 0.018051 outer loop vertex 0.038060 0.191342 1.500000 vertex 0.149344 0.191342 2.059460 vertex 0.249480 0.353553 2.017980 endloop endfacet facet normal -0.056142 0.084022 0.011167 outer loop vertex 0.146447 0.353553 1.500000 vertex 0.249480 0.353553 2.017980 vertex 0.308658 0.461940 1.500000 endloop endfacet facet normal -0.049415 0.073953 0.009829 outer loop vertex 0.249480 0.353553 2.017980 vertex 0.399344 0.461940 1.955910 vertex 0.308658 0.461940 1.500000 endloop endfacet facet normal 0.039399 0.007837 0.007837 outer loop vertex 1.038060 0.000000 1.308660 vertex 1.002900 0.191342 1.294090 vertex 0.961940 0.191342 1.500000 endloop endfacet facet normal 0.036611 0.007282 0.007282 outer loop vertex 1.038060 0.000000 1.308660 vertex 0.961940 0.191342 1.500000 vertex 1.000000 0.000000 1.500000 endloop endfacet facet normal -0.109835 0.021847 -0.021848 outer loop vertex 0.114181 0.000000 0.925975 vertex 0.000000 0.000000 1.500000 vertex 0.149344 0.191342 0.940540 endloop endfacet facet normal -0.107048 0.021293 -0.021293 outer loop vertex 0.000000 0.000000 1.500000 vertex 0.038060 0.191342 1.500000 vertex 0.149344 0.191342 0.940540 endloop endfacet facet normal 0.033401 0.007839 0.022316 outer loop vertex 1.146450 0.000000 1.146450 vertex 1.119530 0.191342 1.119530 vertex 1.002900 0.191342 1.294090 endloop endfacet facet normal 0.031038 0.007283 0.020740 outer loop vertex 1.146450 0.000000 1.146450 vertex 1.002900 0.191342 1.294090 vertex 1.038060 0.000000 1.308660 endloop endfacet facet normal -0.093114 0.021847 -0.062217 outer loop vertex 0.439340 0.000000 0.439340 vertex 0.114181 0.000000 0.925975 vertex 0.466252 0.191342 0.466252 endloop endfacet facet normal -0.090751 0.021293 -0.060638 outer loop vertex 0.114181 0.000000 0.925975 vertex 0.149344 0.191342 0.940540 vertex 0.466252 0.191342 0.466252 endloop endfacet facet normal 0.022316 0.007839 0.033401 outer loop vertex 1.146450 0.000000 1.146450 vertex 1.294090 0.191342 1.002900 vertex 1.119530 0.191342 1.119530 endloop endfacet facet normal 0.020740 0.007283 0.031038 outer loop vertex 1.308660 0.000000 1.038060 vertex 1.294090 0.191342 1.002900 vertex 1.146450 0.000000 1.146450 endloop endfacet facet normal -0.062217 0.021847 -0.093114 outer loop vertex 0.925975 0.000000 0.114181 vertex 0.439340 0.000000 0.439340 vertex 0.466252 0.191342 0.466252 endloop endfacet facet normal -0.060638 0.021293 -0.090751 outer loop vertex 0.925975 0.000000 0.114181 vertex 0.466252 0.191342 0.466252 vertex 0.940540 0.191342 0.149344 endloop endfacet facet normal 0.007837 0.007837 0.039399 outer loop vertex 1.308660 0.000000 1.038060 vertex 1.500000 0.191342 0.961940 vertex 1.294090 0.191342 1.002900 endloop endfacet facet normal 0.007282 0.007282 0.036611 outer loop vertex 1.500000 0.000000 1.000000 vertex 1.500000 0.191342 0.961940 vertex 1.308660 0.000000 1.038060 endloop endfacet facet normal -0.021848 0.021847 -0.109835 outer loop vertex 1.500000 0.000000 0.000000 vertex 0.925975 0.000000 0.114181 vertex 0.940540 0.191342 0.149344 endloop endfacet facet normal -0.021293 0.021293 -0.107048 outer loop vertex 1.500000 0.000000 0.000000 vertex 0.940540 0.191342 0.149344 vertex 1.500000 0.191342 0.038060 endloop endfacet facet normal -0.007837 0.007837 0.039399 outer loop vertex 1.691340 0.000000 1.038060 vertex 1.705910 0.191342 1.002900 vertex 1.500000 0.191342 0.961940 endloop endfacet facet normal -0.007282 0.007282 0.036611 outer loop vertex 1.500000 0.000000 1.000000 vertex 1.691340 0.000000 1.038060 vertex 1.500000 0.191342 0.961940 endloop endfacet facet normal 0.021848 0.021848 -0.109836 outer loop vertex 1.500000 0.000000 0.000000 vertex 2.059460 0.191342 0.149344 vertex 2.074030 0.000000 0.114181 endloop endfacet facet normal 0.021293 0.021293 -0.107048 outer loop vertex 1.500000 0.000000 0.000000 vertex 1.500000 0.191342 0.038060 vertex 2.059460 0.191342 0.149344 endloop endfacet facet normal -0.022316 0.007839 0.033401 outer loop vertex 1.853550 0.000000 1.146450 vertex 1.880470 0.191342 1.119530 vertex 1.705910 0.191342 1.002900 endloop endfacet facet normal -0.020740 0.007283 0.031038 outer loop vertex 1.691340 0.000000 1.038060 vertex 1.853550 0.000000 1.146450 vertex 1.705910 0.191342 1.002900 endloop endfacet facet normal 0.062217 0.021846 -0.093113 outer loop vertex 2.074030 0.000000 0.114181 vertex 2.533750 0.191342 0.466252 vertex 2.560660 0.000000 0.439340 endloop endfacet facet normal 0.060638 0.021295 -0.090752 outer loop vertex 2.074030 0.000000 0.114181 vertex 2.059460 0.191342 0.149344 vertex 2.533750 0.191342 0.466252 endloop endfacet facet normal -0.031038 0.007283 0.020740 outer loop vertex 1.853550 0.000000 1.146450 vertex 1.961940 0.000000 1.308660 vertex 1.997100 0.191342 1.294090 endloop endfacet facet normal -0.033401 0.007839 0.022316 outer loop vertex 1.853550 0.000000 1.146450 vertex 1.997100 0.191342 1.294090 vertex 1.880470 0.191342 1.119530 endloop endfacet facet normal 0.093114 0.021846 -0.062217 outer loop vertex 2.560660 0.000000 0.439340 vertex 2.533750 0.191342 0.466252 vertex 2.885820 0.000000 0.925975 endloop endfacet facet normal 0.090751 0.021292 -0.060638 outer loop vertex 2.885820 0.000000 0.925975 vertex 2.533750 0.191342 0.466252 vertex 2.850660 0.191342 0.940540 endloop endfacet facet normal -0.036611 0.007282 0.007282 outer loop vertex 1.961940 0.000000 1.308660 vertex 2.000000 0.000000 1.500000 vertex 2.038060 0.191342 1.500000 endloop endfacet facet normal -0.039399 0.007837 0.007837 outer loop vertex 1.961940 0.000000 1.308660 vertex 2.038060 0.191342 1.500000 vertex 1.997100 0.191342 1.294090 endloop endfacet facet normal 0.109835 0.021846 -0.021847 outer loop vertex 2.885820 0.000000 0.925975 vertex 2.850660 0.191342 0.940540 vertex 3.000000 0.000000 1.500000 endloop endfacet facet normal 0.107048 0.021293 -0.021293 outer loop vertex 3.000000 0.000000 1.500000 vertex 2.850660 0.191342 0.940540 vertex 2.961940 0.191342 1.500000 endloop endfacet facet normal -0.039399 0.007837 -0.007837 outer loop vertex 1.961940 0.000000 1.691340 vertex 1.997100 0.191342 1.705910 vertex 2.038060 0.191342 1.500000 endloop endfacet facet normal -0.036611 0.007282 -0.007282 outer loop vertex 2.000000 0.000000 1.500000 vertex 1.961940 0.000000 1.691340 vertex 2.038060 0.191342 1.500000 endloop endfacet facet normal 0.109836 0.021846 0.021847 outer loop vertex 3.000000 0.000000 1.500000 vertex 2.850660 0.191342 2.059460 vertex 2.885820 0.000000 2.074030 endloop endfacet facet normal 0.107048 0.021293 0.021293 outer loop vertex 3.000000 0.000000 1.500000 vertex 2.961940 0.191342 1.500000 vertex 2.850660 0.191342 2.059460 endloop endfacet facet normal -0.033401 0.007839 -0.022316 outer loop vertex 1.853550 0.000000 1.853550 vertex 1.880470 0.191342 1.880470 vertex 1.997100 0.191342 1.705910 endloop endfacet facet normal -0.031038 0.007283 -0.020740 outer loop vertex 1.961940 0.000000 1.691340 vertex 1.853550 0.000000 1.853550 vertex 1.997100 0.191342 1.705910 endloop endfacet facet normal 0.093113 0.021845 0.062217 outer loop vertex 2.885820 0.000000 2.074030 vertex 2.533750 0.191342 2.533750 vertex 2.560660 0.000000 2.560660 endloop endfacet facet normal 0.090752 0.021293 0.060638 outer loop vertex 2.885820 0.000000 2.074030 vertex 2.850660 0.191342 2.059460 vertex 2.533750 0.191342 2.533750 endloop endfacet facet normal -0.020740 0.007283 -0.031038 outer loop vertex 1.853550 0.000000 1.853550 vertex 1.691340 0.000000 1.961940 vertex 1.705910 0.191342 1.997100 endloop endfacet facet normal -0.022316 0.007839 -0.033401 outer loop vertex 1.853550 0.000000 1.853550 vertex 1.705910 0.191342 1.997100 vertex 1.880470 0.191342 1.880470 endloop endfacet facet normal 0.062217 0.021845 0.093113 outer loop vertex 2.560660 0.000000 2.560660 vertex 2.533750 0.191342 2.533750 vertex 2.074030 0.000000 2.885820 endloop endfacet facet normal 0.060638 0.021293 0.090752 outer loop vertex 2.074030 0.000000 2.885820 vertex 2.533750 0.191342 2.533750 vertex 2.059460 0.191342 2.850660 endloop endfacet facet normal -0.007282 0.007282 -0.036611 outer loop vertex 1.691340 0.000000 1.961940 vertex 1.500000 0.000000 2.000000 vertex 1.500000 0.191342 2.038060 endloop endfacet facet normal -0.007837 0.007837 -0.039399 outer loop vertex 1.691340 0.000000 1.961940 vertex 1.500000 0.191342 2.038060 vertex 1.705910 0.191342 1.997100 endloop endfacet facet normal 0.021847 0.021846 0.109836 outer loop vertex 2.074030 0.000000 2.885820 vertex 2.059460 0.191342 2.850660 vertex 1.500000 0.000000 3.000000 endloop endfacet facet normal 0.021293 0.021293 0.107048 outer loop vertex 1.500000 0.000000 3.000000 vertex 2.059460 0.191342 2.850660 vertex 1.500000 0.191342 2.961940 endloop endfacet facet normal 0.007837 0.007837 -0.039399 outer loop vertex 1.308660 0.000000 1.961940 vertex 1.294090 0.191342 1.997100 vertex 1.500000 0.191342 2.038060 endloop endfacet facet normal 0.007282 0.007282 -0.036611 outer loop vertex 1.308660 0.000000 1.961940 vertex 1.500000 0.191342 2.038060 vertex 1.500000 0.000000 2.000000 endloop endfacet facet normal -0.021847 0.021846 0.109835 outer loop vertex 0.925975 0.000000 2.885820 vertex 1.500000 0.000000 3.000000 vertex 0.940540 0.191342 2.850660 endloop endfacet facet normal -0.021293 0.021293 0.107048 outer loop vertex 1.500000 0.000000 3.000000 vertex 1.500000 0.191342 2.961940 vertex 0.940540 0.191342 2.850660 endloop endfacet facet normal 0.022316 0.007839 -0.033401 outer loop vertex 1.146450 0.000000 1.853550 vertex 1.119530 0.191342 1.880470 vertex 1.294090 0.191342 1.997100 endloop endfacet facet normal 0.020740 0.007283 -0.031038 outer loop vertex 1.146450 0.000000 1.853550 vertex 1.294090 0.191342 1.997100 vertex 1.308660 0.000000 1.961940 endloop endfacet facet normal -0.062217 0.021846 0.093114 outer loop vertex 0.439340 0.000000 2.560660 vertex 0.925975 0.000000 2.885820 vertex 0.466252 0.191342 2.533750 endloop endfacet facet normal -0.060638 0.021292 0.090751 outer loop vertex 0.925975 0.000000 2.885820 vertex 0.940540 0.191342 2.850660 vertex 0.466252 0.191342 2.533750 endloop endfacet facet normal 0.033401 0.007839 -0.022316 outer loop vertex 1.146450 0.000000 1.853550 vertex 1.002900 0.191342 1.705910 vertex 1.119530 0.191342 1.880470 endloop endfacet facet normal 0.031038 0.007283 -0.020740 outer loop vertex 1.038060 0.000000 1.691340 vertex 1.002900 0.191342 1.705910 vertex 1.146450 0.000000 1.853550 endloop endfacet facet normal -0.093113 0.021846 0.062217 outer loop vertex 0.114181 0.000000 2.074030 vertex 0.439340 0.000000 2.560660 vertex 0.466252 0.191342 2.533750 endloop endfacet facet normal -0.090752 0.021295 0.060638 outer loop vertex 0.114181 0.000000 2.074030 vertex 0.466252 0.191342 2.533750 vertex 0.149344 0.191342 2.059460 endloop endfacet facet normal 0.039399 0.007837 -0.007837 outer loop vertex 1.038060 0.000000 1.691340 vertex 0.961940 0.191342 1.500000 vertex 1.002900 0.191342 1.705910 endloop endfacet facet normal 0.036611 0.007282 -0.007282 outer loop vertex 1.000000 0.000000 1.500000 vertex 0.961940 0.191342 1.500000 vertex 1.038060 0.000000 1.691340 endloop endfacet facet normal -0.109836 0.021848 0.021848 outer loop vertex 0.000000 0.000000 1.500000 vertex 0.114181 0.000000 2.074030 vertex 0.149344 0.191342 2.059460 endloop endfacet facet normal -0.107048 0.021293 0.021293 outer loop vertex 0.000000 0.000000 1.500000 vertex 0.149344 0.191342 2.059460 vertex 0.038060 0.191342 1.500000 endloop endfacet facet normal 0.000000 -0.574028 0.000000 outer loop vertex 0.439340 0.000000 0.439340 vertex 1.146450 0.000000 1.146450 vertex 0.114181 0.000000 0.925975 endloop endfacet facet normal 0.000000 -0.574028 0.000000 outer loop vertex 0.925975 0.000000 0.114181 vertex 1.146450 0.000000 1.146450 vertex 0.439340 0.000000 0.439340 endloop endfacet facet normal 0.000000 -0.617722 0.000000 outer loop vertex 1.500000 0.000000 0.000000 vertex 1.146450 0.000000 1.146450 vertex 0.925975 0.000000 0.114181 endloop endfacet facet normal 0.000000 -0.617722 0.000000 outer loop vertex 0.114181 0.000000 0.925975 vertex 1.146450 0.000000 1.146450 vertex 0.000000 0.000000 1.500000 endloop endfacet facet normal 0.000000 -0.698465 0.000000 outer loop vertex 1.146450 0.000000 1.146450 vertex 0.114181 0.000000 2.074030 vertex 0.000000 0.000000 1.500000 endloop endfacet facet normal 0.000000 -0.698465 0.000000 outer loop vertex 1.500000 0.000000 0.000000 vertex 2.074030 0.000000 0.114181 vertex 1.146450 0.000000 1.146450 endloop endfacet facet normal 0.000000 -0.131088 0.000000 outer loop vertex 2.560660 0.000000 2.560660 vertex 2.074030 0.000000 2.885820 vertex 1.500000 0.000000 3.000000 endloop endfacet facet normal 0.000000 -0.373298 0.000000 outer loop vertex 2.560660 0.000000 2.560660 vertex 1.500000 0.000000 3.000000 vertex 0.925975 0.000000 2.885820 endloop endfacet facet normal 0.000000 -0.689768 0.000000 outer loop vertex 0.439340 0.000000 2.560660 vertex 2.560660 0.000000 2.560660 vertex 0.925975 0.000000 2.885820 endloop endfacet facet normal 0.000000 -1.032298 0.000000 outer loop vertex 0.114181 0.000000 2.074030 vertex 2.560660 0.000000 2.560660 vertex 0.439340 0.000000 2.560660 endloop endfacet facet normal 0.000000 -1.348763 0.000000 outer loop vertex 0.114181 0.000000 2.074030 vertex 2.885820 0.000000 2.074030 vertex 2.560660 0.000000 2.560660 endloop endfacet facet normal 0.000000 -0.131086 0.000000 outer loop vertex 2.560660 0.000000 0.439340 vertex 2.885820 0.000000 0.925975 vertex 3.000000 0.000000 1.500000 endloop endfacet facet normal 0.000000 -0.373301 0.000000 outer loop vertex 2.560660 0.000000 0.439340 vertex 3.000000 0.000000 1.500000 vertex 2.885820 0.000000 2.074030 endloop endfacet facet normal 0.000000 -0.689760 0.000000 outer loop vertex 2.074030 0.000000 0.114181 vertex 2.560660 0.000000 0.439340 vertex 2.885820 0.000000 2.074030 endloop endfacet facet normal 0.000000 -0.066904 0.000000 outer loop vertex 2.074030 0.000000 0.114181 vertex 1.308660 0.000000 1.038060 vertex 1.146450 0.000000 1.146450 endloop endfacet facet normal 0.000000 -0.147645 0.000000 outer loop vertex 2.074030 0.000000 0.114181 vertex 1.500000 0.000000 1.000000 vertex 1.308660 0.000000 1.038060 endloop endfacet facet normal 0.000000 -0.191340 0.000000 outer loop vertex 2.074030 0.000000 0.114181 vertex 1.691340 0.000000 1.038060 vertex 1.500000 0.000000 1.000000 endloop endfacet facet normal 0.000000 -0.191342 0.000000 outer loop vertex 2.074030 0.000000 0.114181 vertex 1.853550 0.000000 1.146450 vertex 1.691340 0.000000 1.038060 endloop endfacet facet normal 0.000000 -1.270093 0.000000 outer loop vertex 2.074030 0.000000 0.114181 vertex 2.885820 0.000000 2.074030 vertex 1.853550 0.000000 1.146450 endloop endfacet facet normal 0.000000 -0.066904 0.000000 outer loop vertex 1.853550 0.000000 1.146450 vertex 2.885820 0.000000 2.074030 vertex 1.961940 0.000000 1.308660 endloop endfacet facet normal 0.000000 -0.147645 0.000000 outer loop vertex 1.961940 0.000000 1.308660 vertex 2.885820 0.000000 2.074030 vertex 2.000000 0.000000 1.500000 endloop endfacet facet normal 0.000000 -0.191340 0.000000 outer loop vertex 2.000000 0.000000 1.500000 vertex 2.885820 0.000000 2.074030 vertex 1.961940 0.000000 1.691340 endloop endfacet facet normal 0.000000 -0.191342 0.000000 outer loop vertex 1.961940 0.000000 1.691340 vertex 2.885820 0.000000 2.074030 vertex 1.853550 0.000000 1.853550 endloop endfacet facet normal 0.000000 -0.147652 0.000000 outer loop vertex 1.853550 0.000000 1.853550 vertex 2.885820 0.000000 2.074030 vertex 1.691340 0.000000 1.961940 endloop endfacet facet normal 0.000000 -0.066909 0.000000 outer loop vertex 1.691340 0.000000 1.961940 vertex 2.885820 0.000000 2.074030 vertex 1.500000 0.000000 2.000000 endloop endfacet facet normal 0.000000 -0.066904 0.000000 outer loop vertex 1.146450 0.000000 1.146450 vertex 1.038060 0.000000 1.308660 vertex 0.114181 0.000000 2.074030 endloop endfacet facet normal 0.000000 -0.147645 0.000000 outer loop vertex 1.038060 0.000000 1.308660 vertex 1.000000 0.000000 1.500000 vertex 0.114181 0.000000 2.074030 endloop endfacet facet normal 0.000000 -0.191340 0.000000 outer loop vertex 1.000000 0.000000 1.500000 vertex 1.038060 0.000000 1.691340 vertex 0.114181 0.000000 2.074030 endloop endfacet facet normal 0.000000 -0.191342 0.000000 outer loop vertex 1.038060 0.000000 1.691340 vertex 1.146450 0.000000 1.853550 vertex 0.114181 0.000000 2.074030 endloop endfacet facet normal 0.000000 -0.147652 0.000000 outer loop vertex 1.146450 0.000000 1.853550 vertex 1.308660 0.000000 1.961940 vertex 0.114181 0.000000 2.074030 endloop endfacet facet normal 0.000000 -0.205184 0.000000 outer loop vertex 1.500000 0.000000 2.000000 vertex 2.885820 0.000000 2.074030 vertex 0.114181 0.000000 2.074030 endloop endfacet facet normal 0.000000 -0.066909 0.000000 outer loop vertex 1.308660 0.000000 1.961940 vertex 1.500000 0.000000 2.000000 vertex 0.114181 0.000000 2.074030 endloop endfacet endsolid HalfDonut.stl numpy-stl-2.3.2/tests/stl_ascii/Moon.stl000066400000000000000000000523211313575633700202560ustar00rootroot00000000000000solid Moon.stl facet normal -0.091618 0.000000 -0.072093 outer loop vertex 0.360463 0.000000 2.525000 vertex 0.000000 0.000000 2.983090 vertex 0.360463 0.200000 2.525000 endloop endfacet facet normal -0.091618 0.000000 -0.072093 outer loop vertex 0.000000 0.000000 2.983090 vertex 0.000000 0.200000 2.983090 vertex 0.360463 0.200000 2.525000 endloop endfacet facet normal -0.003382 0.000000 0.025682 outer loop vertex 0.000000 0.000000 2.983090 vertex 0.128412 0.000000 3.000000 vertex 0.000000 0.200000 2.983090 endloop endfacet facet normal -0.003382 0.000000 0.025682 outer loop vertex 0.128412 0.000000 3.000000 vertex 0.128412 0.200000 3.000000 vertex 0.000000 0.200000 2.983090 endloop endfacet facet normal 0.010222 -0.000000 0.077646 outer loop vertex 0.516641 0.000000 2.948890 vertex 0.516641 0.200000 2.948890 vertex 0.128412 0.000000 3.000000 endloop endfacet facet normal 0.010222 -0.000000 0.077646 outer loop vertex 0.128412 0.000000 3.000000 vertex 0.516641 0.200000 2.948890 vertex 0.128412 0.200000 3.000000 endloop endfacet facet normal 0.029970 -0.000000 0.072354 outer loop vertex 0.878412 0.000000 2.799040 vertex 0.878412 0.200000 2.799040 vertex 0.516641 0.000000 2.948890 endloop endfacet facet normal 0.029970 -0.000000 0.072354 outer loop vertex 0.516641 0.000000 2.948890 vertex 0.878412 0.200000 2.799040 vertex 0.516641 0.200000 2.948890 endloop endfacet facet normal 0.047676 -0.000000 0.062132 outer loop vertex 1.189070 0.000000 2.560660 vertex 1.189070 0.200000 2.560660 vertex 0.878412 0.000000 2.799040 endloop endfacet facet normal 0.047676 -0.000000 0.062132 outer loop vertex 0.878412 0.000000 2.799040 vertex 1.189070 0.200000 2.560660 vertex 0.878412 0.200000 2.799040 endloop endfacet facet normal 0.062132 -0.000000 0.047676 outer loop vertex 1.427450 0.000000 2.250000 vertex 1.427450 0.200000 2.250000 vertex 1.189070 0.000000 2.560660 endloop endfacet facet normal 0.062132 -0.000000 0.047676 outer loop vertex 1.189070 0.000000 2.560660 vertex 1.427450 0.200000 2.250000 vertex 1.189070 0.200000 2.560660 endloop endfacet facet normal 0.072354 -0.000000 0.029970 outer loop vertex 1.577300 0.000000 1.888230 vertex 1.577300 0.200000 1.888230 vertex 1.427450 0.000000 2.250000 endloop endfacet facet normal 0.072354 -0.000000 0.029970 outer loop vertex 1.427450 0.000000 2.250000 vertex 1.577300 0.200000 1.888230 vertex 1.427450 0.200000 2.250000 endloop endfacet facet normal 0.077646 -0.000000 0.010222 outer loop vertex 1.628410 0.000000 1.500000 vertex 1.628410 0.200000 1.500000 vertex 1.577300 0.000000 1.888230 endloop endfacet facet normal 0.077646 -0.000000 0.010222 outer loop vertex 1.577300 0.000000 1.888230 vertex 1.628410 0.200000 1.500000 vertex 1.577300 0.200000 1.888230 endloop endfacet facet normal 0.077646 0.000000 -0.010222 outer loop vertex 1.577300 0.000000 1.111770 vertex 1.577300 0.200000 1.111770 vertex 1.628410 0.000000 1.500000 endloop endfacet facet normal 0.077646 0.000000 -0.010222 outer loop vertex 1.628410 0.000000 1.500000 vertex 1.577300 0.200000 1.111770 vertex 1.628410 0.200000 1.500000 endloop endfacet facet normal 0.072354 0.000000 -0.029970 outer loop vertex 1.427450 0.000000 0.750000 vertex 1.427450 0.200000 0.750000 vertex 1.577300 0.000000 1.111770 endloop endfacet facet normal 0.072354 0.000000 -0.029970 outer loop vertex 1.577300 0.000000 1.111770 vertex 1.427450 0.200000 0.750000 vertex 1.577300 0.200000 1.111770 endloop endfacet facet normal 0.062132 0.000000 -0.047676 outer loop vertex 1.189070 0.000000 0.439340 vertex 1.189070 0.200000 0.439340 vertex 1.427450 0.000000 0.750000 endloop endfacet facet normal 0.062132 0.000000 -0.047676 outer loop vertex 1.427450 0.000000 0.750000 vertex 1.189070 0.200000 0.439340 vertex 1.427450 0.200000 0.750000 endloop endfacet facet normal 0.047676 0.000000 -0.062132 outer loop vertex 0.878412 0.000000 0.200962 vertex 0.878412 0.200000 0.200962 vertex 1.189070 0.000000 0.439340 endloop endfacet facet normal 0.047676 0.000000 -0.062132 outer loop vertex 1.189070 0.000000 0.439340 vertex 0.878412 0.200000 0.200962 vertex 1.189070 0.200000 0.439340 endloop endfacet facet normal 0.029970 0.000000 -0.072354 outer loop vertex 0.516641 0.000000 0.051111 vertex 0.516641 0.200000 0.051111 vertex 0.878412 0.000000 0.200962 endloop endfacet facet normal 0.029970 0.000000 -0.072354 outer loop vertex 0.878412 0.000000 0.200962 vertex 0.516641 0.200000 0.051111 vertex 0.878412 0.200000 0.200962 endloop endfacet facet normal 0.010222 0.000000 -0.077646 outer loop vertex 0.128412 0.000000 0.000000 vertex 0.128412 0.200000 0.000000 vertex 0.516641 0.000000 0.051111 endloop endfacet facet normal 0.010222 0.000000 -0.077646 outer loop vertex 0.516641 0.000000 0.051111 vertex 0.128412 0.200000 0.000000 vertex 0.516641 0.200000 0.051111 endloop endfacet facet normal -0.003381 0.000000 -0.025682 outer loop vertex 0.128412 0.000000 0.000000 vertex 0.000000 0.000000 0.016906 vertex 0.128412 0.200000 0.000000 endloop endfacet facet normal -0.003381 0.000000 -0.025682 outer loop vertex 0.000000 0.000000 0.016906 vertex 0.000000 0.200000 0.016906 vertex 0.128412 0.200000 0.000000 endloop endfacet facet normal -0.091619 0.000000 0.072093 outer loop vertex 0.000000 0.000000 0.016906 vertex 0.360463 0.000000 0.475000 vertex 0.000000 0.200000 0.016906 endloop endfacet facet normal -0.091619 0.000000 0.072093 outer loop vertex 0.360463 0.000000 0.475000 vertex 0.360463 0.200000 0.475000 vertex 0.000000 0.200000 0.016906 endloop endfacet facet normal -0.098884 0.000000 0.039960 outer loop vertex 0.360463 0.000000 0.475000 vertex 0.560264 0.000000 0.969421 vertex 0.360463 0.200000 0.475000 endloop endfacet facet normal -0.098884 0.000000 0.039960 outer loop vertex 0.560264 0.000000 0.969421 vertex 0.560264 0.200000 0.969421 vertex 0.360463 0.200000 0.475000 endloop endfacet facet normal -0.106116 0.000000 0.013630 outer loop vertex 0.560264 0.000000 0.969421 vertex 0.628412 0.000000 1.500000 vertex 0.560264 0.200000 0.969421 endloop endfacet facet normal -0.106116 0.000000 0.013630 outer loop vertex 0.628412 0.000000 1.500000 vertex 0.628412 0.200000 1.500000 vertex 0.560264 0.200000 0.969421 endloop endfacet facet normal -0.106116 0.000000 -0.013630 outer loop vertex 0.628412 0.000000 1.500000 vertex 0.560264 0.000000 2.030580 vertex 0.628412 0.200000 1.500000 endloop endfacet facet normal -0.106116 0.000000 -0.013630 outer loop vertex 0.560264 0.000000 2.030580 vertex 0.560264 0.200000 2.030580 vertex 0.628412 0.200000 1.500000 endloop endfacet facet normal -0.098884 0.000000 -0.039960 outer loop vertex 0.560264 0.000000 2.030580 vertex 0.360463 0.000000 2.525000 vertex 0.560264 0.200000 2.030580 endloop endfacet facet normal -0.098884 0.000000 -0.039960 outer loop vertex 0.360463 0.000000 2.525000 vertex 0.360463 0.200000 2.525000 vertex 0.560264 0.200000 2.030580 endloop endfacet facet normal 0.000000 -0.064920 0.000000 outer loop vertex 0.360463 0.000000 2.525000 vertex 0.128412 0.000000 3.000000 vertex 0.000000 0.000000 2.983090 endloop endfacet facet normal 0.000000 -0.172549 0.000000 outer loop vertex 0.360463 0.000000 2.525000 vertex 0.516641 0.000000 2.948890 vertex 0.128412 0.000000 3.000000 endloop endfacet facet normal 0.000000 -0.176754 0.000000 outer loop vertex 0.360463 0.000000 2.525000 vertex 0.878412 0.000000 2.799040 vertex 0.516641 0.000000 2.948890 endloop endfacet facet normal 0.000000 -0.310838 0.000000 outer loop vertex 0.560264 0.000000 2.030580 vertex 0.878412 0.000000 2.799040 vertex 0.360463 0.000000 2.525000 endloop endfacet facet normal 0.000000 -0.314568 0.000000 outer loop vertex 0.560264 0.000000 2.030580 vertex 1.189070 0.000000 2.560660 vertex 0.878412 0.000000 2.799040 endloop endfacet facet normal 0.000000 -0.321705 0.000000 outer loop vertex 0.560264 0.000000 2.030580 vertex 1.427450 0.000000 2.250000 vertex 1.189070 0.000000 2.560660 endloop endfacet facet normal 0.000000 -0.475065 0.000000 outer loop vertex 0.628412 0.000000 1.500000 vertex 1.427450 0.000000 2.250000 vertex 0.560264 0.000000 2.030580 endloop endfacet facet normal 0.000000 -0.401456 0.000000 outer loop vertex 0.628412 0.000000 1.500000 vertex 1.577300 0.000000 1.888230 vertex 1.427450 0.000000 2.250000 endloop endfacet facet normal 0.000000 -0.388229 0.000000 outer loop vertex 0.628412 0.000000 1.500000 vertex 1.628410 0.000000 1.500000 vertex 1.577300 0.000000 1.888230 endloop endfacet facet normal 0.000000 -0.530578 0.000000 outer loop vertex 0.560264 0.000000 0.969421 vertex 1.628410 0.000000 1.500000 vertex 0.628412 0.000000 1.500000 endloop endfacet facet normal 0.000000 -0.387568 0.000000 outer loop vertex 0.560264 0.000000 0.969421 vertex 1.577300 0.000000 1.111770 vertex 1.628410 0.000000 1.500000 endloop endfacet facet normal 0.000000 -0.346602 0.000000 outer loop vertex 1.427450 0.000000 0.750000 vertex 1.577300 0.000000 1.111770 vertex 0.560264 0.000000 0.969421 endloop endfacet facet normal 0.000000 -0.472596 0.000000 outer loop vertex 0.360463 0.000000 0.475000 vertex 1.427450 0.000000 0.750000 vertex 0.560264 0.000000 0.969421 endloop endfacet facet normal 0.000000 -0.265916 0.000000 outer loop vertex 1.189070 0.000000 0.439340 vertex 1.427450 0.000000 0.750000 vertex 0.360463 0.000000 0.475000 endloop endfacet facet normal 0.000000 -0.208600 0.000000 outer loop vertex 0.878412 0.000000 0.200962 vertex 1.189070 0.000000 0.439340 vertex 0.360463 0.000000 0.475000 endloop endfacet facet normal 0.000000 -0.176754 0.000000 outer loop vertex 0.516641 0.000000 0.051111 vertex 0.878412 0.000000 0.200962 vertex 0.360463 0.000000 0.475000 endloop endfacet facet normal 0.000000 -0.172548 0.000000 outer loop vertex 0.128412 0.000000 0.000000 vertex 0.516641 0.000000 0.051111 vertex 0.360463 0.000000 0.475000 endloop endfacet facet normal 0.000000 -0.064919 0.000000 outer loop vertex 0.128412 0.000000 0.000000 vertex 0.360463 0.000000 0.475000 vertex 0.000000 0.000000 0.016906 endloop endfacet facet normal 0.000000 0.037063 0.000000 outer loop vertex 1.383780 0.350000 0.775216 vertex 1.577980 0.350000 1.500000 vertex 1.528590 0.350000 1.124820 endloop endfacet facet normal 0.000000 0.108667 0.000000 outer loop vertex 1.153410 0.350000 0.475000 vertex 1.577980 0.350000 1.500000 vertex 1.383780 0.350000 0.775216 endloop endfacet facet normal 0.000000 0.209914 0.000000 outer loop vertex 0.853196 0.350000 0.244637 vertex 1.577980 0.350000 1.500000 vertex 1.153410 0.350000 0.475000 endloop endfacet facet normal 0.000000 0.333927 0.000000 outer loop vertex 0.503588 0.350000 0.099824 vertex 1.577980 0.350000 1.500000 vertex 0.853196 0.350000 0.244637 endloop endfacet facet normal 0.000000 0.472246 0.000000 outer loop vertex 0.128412 0.350000 0.050432 vertex 1.577980 0.350000 1.500000 vertex 0.503588 0.350000 0.099824 endloop endfacet facet normal 0.000000 0.615443 0.000000 outer loop vertex 0.128412 0.350000 0.050432 vertex 1.528590 0.350000 1.875180 vertex 1.577980 0.350000 1.500000 endloop endfacet facet normal 0.000000 0.037062 0.000000 outer loop vertex 1.383780 0.350000 2.224780 vertex 0.853196 0.350000 2.755360 vertex 1.153410 0.350000 2.525000 endloop endfacet facet normal 0.000000 0.108656 0.000000 outer loop vertex 1.383780 0.350000 2.224780 vertex 0.503588 0.350000 2.900180 vertex 0.853196 0.350000 2.755360 endloop endfacet facet normal 0.000000 0.209921 0.000000 outer loop vertex 1.383780 0.350000 2.224780 vertex 0.128412 0.350000 2.949570 vertex 0.503588 0.350000 2.900180 endloop endfacet facet normal 0.000000 0.333920 0.000000 outer loop vertex 1.528590 0.350000 1.875180 vertex 0.128412 0.350000 2.949570 vertex 1.383780 0.350000 2.224780 endloop endfacet facet normal 0.000000 0.015158 0.000000 outer loop vertex 0.404155 0.350000 2.550330 vertex 0.093609 0.350000 2.944990 vertex 0.128412 0.350000 2.949570 endloop endfacet facet normal 0.000000 0.262752 0.000000 outer loop vertex 1.528590 0.350000 1.875180 vertex 0.404155 0.350000 2.550330 vertex 0.128412 0.350000 2.949570 endloop endfacet facet normal 0.000000 0.431753 0.000000 outer loop vertex 1.528590 0.350000 1.875180 vertex 0.609035 0.350000 2.043340 vertex 0.404155 0.350000 2.550330 endloop endfacet facet normal 0.000000 0.487895 -0.000000 outer loop vertex 0.678823 0.350000 1.500000 vertex 0.609035 0.350000 2.043340 vertex 1.528590 0.350000 1.875180 endloop endfacet facet normal 0.000000 0.435529 0.000000 outer loop vertex 0.609035 0.350000 0.956661 vertex 0.678823 0.350000 1.500000 vertex 1.528590 0.350000 1.875180 endloop endfacet facet normal 0.000000 0.015158 -0.000000 outer loop vertex 0.128412 0.350000 0.050432 vertex 0.093609 0.350000 0.055013 vertex 0.404155 0.350000 0.449671 endloop endfacet facet normal 0.000000 0.278019 0.000000 outer loop vertex 0.404155 0.350000 0.449671 vertex 0.609035 0.350000 0.956661 vertex 1.528590 0.350000 1.875180 endloop endfacet facet normal 0.000000 0.055844 0.000000 outer loop vertex 0.128412 0.350000 0.050432 vertex 0.404155 0.350000 0.449671 vertex 1.528590 0.350000 1.875180 endloop endfacet facet normal -0.002537 0.006475 0.019262 outer loop vertex 0.000000 0.200000 2.983090 vertex 0.128412 0.200000 3.000000 vertex 0.093609 0.350000 2.944990 endloop endfacet facet normal -0.000687 0.001755 0.005220 outer loop vertex 0.128412 0.200000 3.000000 vertex 0.128412 0.350000 2.949570 vertex 0.093609 0.350000 2.944990 endloop endfacet facet normal -0.059199 0.025110 -0.046582 outer loop vertex 0.360463 0.200000 2.525000 vertex 0.093609 0.350000 2.944990 vertex 0.404155 0.350000 2.550330 endloop endfacet facet normal -0.068713 0.029148 -0.054069 outer loop vertex 0.360463 0.200000 2.525000 vertex 0.000000 0.200000 2.983090 vertex 0.093609 0.350000 2.944990 endloop endfacet facet normal -0.074163 0.026663 -0.029970 outer loop vertex 0.560264 0.200000 2.030580 vertex 0.360463 0.200000 2.525000 vertex 0.609035 0.350000 2.043340 endloop endfacet facet normal -0.076048 0.027341 -0.030732 outer loop vertex 0.360463 0.200000 2.525000 vertex 0.404155 0.350000 2.550330 vertex 0.609035 0.350000 2.043340 endloop endfacet facet normal -0.079587 0.026747 -0.010222 outer loop vertex 0.628412 0.200000 1.500000 vertex 0.560264 0.200000 2.030580 vertex 0.678823 0.350000 1.500000 endloop endfacet facet normal -0.081501 0.027390 -0.010468 outer loop vertex 0.560264 0.200000 2.030580 vertex 0.609035 0.350000 2.043340 vertex 0.678823 0.350000 1.500000 endloop endfacet facet normal -0.081501 0.027390 0.010468 outer loop vertex 0.560264 0.200000 0.969421 vertex 0.678823 0.350000 1.500000 vertex 0.609035 0.350000 0.956661 endloop endfacet facet normal -0.079587 0.026747 0.010222 outer loop vertex 0.560264 0.200000 0.969421 vertex 0.628412 0.200000 1.500000 vertex 0.678823 0.350000 1.500000 endloop endfacet facet normal -0.076048 0.027341 0.030732 outer loop vertex 0.360463 0.200000 0.475000 vertex 0.609035 0.350000 0.956661 vertex 0.404155 0.350000 0.449671 endloop endfacet facet normal -0.074163 0.026663 0.029970 outer loop vertex 0.360463 0.200000 0.475000 vertex 0.560264 0.200000 0.969421 vertex 0.609035 0.350000 0.956661 endloop endfacet facet normal -0.068714 0.029146 0.054069 outer loop vertex 0.000000 0.200000 0.016906 vertex 0.360463 0.200000 0.475000 vertex 0.093609 0.350000 0.055013 endloop endfacet facet normal -0.059199 0.025109 0.046582 outer loop vertex 0.360463 0.200000 0.475000 vertex 0.404155 0.350000 0.449671 vertex 0.093609 0.350000 0.055013 endloop endfacet facet normal -0.000687 0.001755 -0.005220 outer loop vertex 0.128412 0.200000 0.000000 vertex 0.093609 0.350000 0.055013 vertex 0.128412 0.350000 0.050432 endloop endfacet facet normal -0.002536 0.006476 -0.019262 outer loop vertex 0.128412 0.200000 0.000000 vertex 0.000000 0.200000 0.016906 vertex 0.093609 0.350000 0.055013 endloop endfacet facet normal 0.007667 0.019579 -0.058234 outer loop vertex 0.128412 0.200000 0.000000 vertex 0.503588 0.350000 0.099824 vertex 0.516641 0.200000 0.051111 endloop endfacet facet normal 0.007409 0.018921 -0.056276 outer loop vertex 0.128412 0.200000 0.000000 vertex 0.128412 0.350000 0.050432 vertex 0.503588 0.350000 0.099824 endloop endfacet facet normal 0.022478 0.019579 -0.054266 outer loop vertex 0.516641 0.200000 0.051111 vertex 0.853196 0.350000 0.244637 vertex 0.878412 0.200000 0.200962 endloop endfacet facet normal 0.021722 0.018921 -0.052441 outer loop vertex 0.516641 0.200000 0.051111 vertex 0.503588 0.350000 0.099824 vertex 0.853196 0.350000 0.244637 endloop endfacet facet normal 0.035757 0.019579 -0.046599 outer loop vertex 0.878412 0.200000 0.200962 vertex 1.153410 0.350000 0.475000 vertex 1.189070 0.200000 0.439340 endloop endfacet facet normal 0.034554 0.018921 -0.045032 outer loop vertex 0.878412 0.200000 0.200962 vertex 0.853196 0.350000 0.244637 vertex 1.153410 0.350000 0.475000 endloop endfacet facet normal 0.046599 0.019579 -0.035757 outer loop vertex 1.189070 0.200000 0.439340 vertex 1.153410 0.350000 0.475000 vertex 1.427450 0.200000 0.750000 endloop endfacet facet normal 0.045032 0.018919 -0.034556 outer loop vertex 1.427450 0.200000 0.750000 vertex 1.153410 0.350000 0.475000 vertex 1.383780 0.350000 0.775216 endloop endfacet facet normal 0.054266 0.019577 -0.022478 outer loop vertex 1.427450 0.200000 0.750000 vertex 1.383780 0.350000 0.775216 vertex 1.577300 0.200000 1.111770 endloop endfacet facet normal 0.052441 0.018919 -0.021721 outer loop vertex 1.577300 0.200000 1.111770 vertex 1.383780 0.350000 0.775216 vertex 1.528590 0.350000 1.124820 endloop endfacet facet normal 0.058234 0.019578 -0.007667 outer loop vertex 1.577300 0.200000 1.111770 vertex 1.528590 0.350000 1.124820 vertex 1.628410 0.200000 1.500000 endloop endfacet facet normal 0.056277 0.018920 -0.007409 outer loop vertex 1.628410 0.200000 1.500000 vertex 1.528590 0.350000 1.124820 vertex 1.577980 0.350000 1.500000 endloop endfacet facet normal 0.058234 0.019578 0.007667 outer loop vertex 1.628410 0.200000 1.500000 vertex 1.528590 0.350000 1.875180 vertex 1.577300 0.200000 1.888230 endloop endfacet facet normal 0.056277 0.018920 0.007409 outer loop vertex 1.628410 0.200000 1.500000 vertex 1.577980 0.350000 1.500000 vertex 1.528590 0.350000 1.875180 endloop endfacet facet normal 0.054266 0.019578 0.022478 outer loop vertex 1.577300 0.200000 1.888230 vertex 1.383780 0.350000 2.224780 vertex 1.427450 0.200000 2.250000 endloop endfacet facet normal 0.052440 0.018919 0.021721 outer loop vertex 1.577300 0.200000 1.888230 vertex 1.528590 0.350000 1.875180 vertex 1.383780 0.350000 2.224780 endloop endfacet facet normal 0.046599 0.019579 0.035757 outer loop vertex 1.427450 0.200000 2.250000 vertex 1.153410 0.350000 2.525000 vertex 1.189070 0.200000 2.560660 endloop endfacet facet normal 0.045033 0.018921 0.034556 outer loop vertex 1.427450 0.200000 2.250000 vertex 1.383780 0.350000 2.224780 vertex 1.153410 0.350000 2.525000 endloop endfacet facet normal 0.034554 0.018922 0.045032 outer loop vertex 0.878412 0.200000 2.799040 vertex 1.153410 0.350000 2.525000 vertex 0.853196 0.350000 2.755360 endloop endfacet facet normal 0.035757 0.019579 0.046599 outer loop vertex 1.189070 0.200000 2.560660 vertex 1.153410 0.350000 2.525000 vertex 0.878412 0.200000 2.799040 endloop endfacet facet normal 0.022477 0.019581 0.054266 outer loop vertex 0.878412 0.200000 2.799040 vertex 0.853196 0.350000 2.755360 vertex 0.516641 0.200000 2.948890 endloop endfacet facet normal 0.021723 0.018920 0.052441 outer loop vertex 0.516641 0.200000 2.948890 vertex 0.853196 0.350000 2.755360 vertex 0.503588 0.350000 2.900180 endloop endfacet facet normal 0.007667 0.019578 0.058234 outer loop vertex 0.516641 0.200000 2.948890 vertex 0.503588 0.350000 2.900180 vertex 0.128412 0.200000 3.000000 endloop endfacet facet normal 0.007408 0.018920 0.056276 outer loop vertex 0.128412 0.200000 3.000000 vertex 0.503588 0.350000 2.900180 vertex 0.128412 0.350000 2.949570 endloop endfacet endsolid Moon.stl numpy-stl-2.3.2/tests/stl_ascii/Star.stl000066400000000000000000000307151313575633700202620ustar00rootroot00000000000000solid Star.stl facet normal 0.000000 -0.645975 0.000000 outer loop vertex 0.834040 0.000000 0.694596 vertex 0.369040 0.000000 1.500000 vertex 0.000002 0.000000 0.750000 endloop endfacet facet normal 0.000000 -0.645973 0.000000 outer loop vertex 0.369040 0.000000 1.500000 vertex 0.834040 0.000000 2.305400 vertex 0.000002 0.000000 2.250000 endloop endfacet facet normal 0.000000 -0.645974 0.000000 outer loop vertex 1.299040 0.000000 0.000000 vertex 1.764040 0.000000 0.694596 vertex 0.834040 0.000000 0.694596 endloop endfacet facet normal 0.000000 -0.645978 0.000000 outer loop vertex 0.834040 0.000000 2.305400 vertex 1.764040 0.000000 2.305400 vertex 1.299040 0.000000 3.000000 endloop endfacet facet normal 0.000000 -0.645976 0.000000 outer loop vertex 1.764040 0.000000 0.694596 vertex 2.598080 0.000000 0.750000 vertex 2.229040 0.000000 1.500000 endloop endfacet facet normal 0.000000 -0.645975 0.000000 outer loop vertex 2.229040 0.000000 1.500000 vertex 2.598080 0.000000 2.250000 vertex 1.764040 0.000000 2.305400 endloop endfacet facet normal 0.000000 -0.749024 0.000000 outer loop vertex 0.834040 0.000000 0.694596 vertex 0.834040 0.000000 2.305400 vertex 0.369040 0.000000 1.500000 endloop endfacet facet normal 0.000000 -1.498048 0.000000 outer loop vertex 0.834040 0.000000 0.694596 vertex 1.764040 0.000000 0.694596 vertex 0.834040 0.000000 2.305400 endloop endfacet facet normal 0.000000 -1.498049 0.000000 outer loop vertex 1.764040 0.000000 0.694596 vertex 2.229040 0.000000 1.500000 vertex 0.834040 0.000000 2.305400 endloop endfacet facet normal 0.000000 -0.749022 0.000000 outer loop vertex 2.229040 0.000000 1.500000 vertex 1.764040 0.000000 2.305400 vertex 0.834040 0.000000 2.305400 endloop endfacet facet normal -0.187500 0.000000 -0.092260 outer loop vertex 0.369040 0.000000 1.500000 vertex 0.000002 0.000000 2.250000 vertex 0.369040 0.250000 1.500000 endloop endfacet facet normal -0.187500 0.000000 -0.092260 outer loop vertex 0.000002 0.000000 2.250000 vertex 0.000002 0.250000 2.250000 vertex 0.369040 0.250000 1.500000 endloop endfacet facet normal -0.013850 0.000000 0.208509 outer loop vertex 0.000002 0.000000 2.250000 vertex 0.834040 0.000000 2.305400 vertex 0.000002 0.250000 2.250000 endloop endfacet facet normal -0.013850 0.000000 0.208509 outer loop vertex 0.834040 0.000000 2.305400 vertex 0.834040 0.250000 2.305400 vertex 0.000002 0.250000 2.250000 endloop endfacet facet normal -0.173650 0.000000 0.116250 outer loop vertex 0.834040 0.000000 2.305400 vertex 1.299040 0.000000 3.000000 vertex 0.834040 0.250000 2.305400 endloop endfacet facet normal -0.173650 0.000000 0.116250 outer loop vertex 1.299040 0.000000 3.000000 vertex 1.299040 0.250000 3.000000 vertex 0.834040 0.250000 2.305400 endloop endfacet facet normal 0.173650 -0.000000 0.116250 outer loop vertex 1.764040 0.000000 2.305400 vertex 1.764040 0.250000 2.305400 vertex 1.299040 0.000000 3.000000 endloop endfacet facet normal 0.173650 -0.000000 0.116250 outer loop vertex 1.299040 0.000000 3.000000 vertex 1.764040 0.250000 2.305400 vertex 1.299040 0.250000 3.000000 endloop endfacet facet normal 0.013850 -0.000000 0.208510 outer loop vertex 2.598080 0.000000 2.250000 vertex 2.598080 0.250000 2.250000 vertex 1.764040 0.000000 2.305400 endloop endfacet facet normal 0.013850 -0.000000 0.208510 outer loop vertex 1.764040 0.000000 2.305400 vertex 2.598080 0.250000 2.250000 vertex 1.764040 0.250000 2.305400 endloop endfacet facet normal 0.187500 0.000000 -0.092260 outer loop vertex 2.229040 0.000000 1.500000 vertex 2.229040 0.250000 1.500000 vertex 2.598080 0.000000 2.250000 endloop endfacet facet normal 0.187500 0.000000 -0.092260 outer loop vertex 2.598080 0.000000 2.250000 vertex 2.229040 0.250000 1.500000 vertex 2.598080 0.250000 2.250000 endloop endfacet facet normal 0.187500 -0.000000 0.092260 outer loop vertex 2.598080 0.000000 0.750000 vertex 2.598080 0.250000 0.750000 vertex 2.229040 0.000000 1.500000 endloop endfacet facet normal 0.187500 -0.000000 0.092260 outer loop vertex 2.229040 0.000000 1.500000 vertex 2.598080 0.250000 0.750000 vertex 2.229040 0.250000 1.500000 endloop endfacet facet normal 0.013851 0.000000 -0.208510 outer loop vertex 1.764040 0.000000 0.694596 vertex 1.764040 0.250000 0.694596 vertex 2.598080 0.000000 0.750000 endloop endfacet facet normal 0.013851 0.000000 -0.208510 outer loop vertex 2.598080 0.000000 0.750000 vertex 1.764040 0.250000 0.694596 vertex 2.598080 0.250000 0.750000 endloop endfacet facet normal 0.173649 0.000000 -0.116250 outer loop vertex 1.299040 0.000000 0.000000 vertex 1.299040 0.250000 0.000000 vertex 1.764040 0.000000 0.694596 endloop endfacet facet normal 0.173649 0.000000 -0.116250 outer loop vertex 1.764040 0.000000 0.694596 vertex 1.299040 0.250000 0.000000 vertex 1.764040 0.250000 0.694596 endloop endfacet facet normal -0.173649 0.000000 -0.116250 outer loop vertex 1.299040 0.000000 0.000000 vertex 0.834040 0.000000 0.694596 vertex 1.299040 0.250000 0.000000 endloop endfacet facet normal -0.173649 0.000000 -0.116250 outer loop vertex 0.834040 0.000000 0.694596 vertex 0.834040 0.250000 0.694596 vertex 1.299040 0.250000 0.000000 endloop endfacet facet normal -0.013851 0.000000 -0.208509 outer loop vertex 0.834040 0.000000 0.694596 vertex 0.000002 0.000000 0.750000 vertex 0.834040 0.250000 0.694596 endloop endfacet facet normal -0.013851 0.000000 -0.208509 outer loop vertex 0.000002 0.000000 0.750000 vertex 0.000002 0.250000 0.750000 vertex 0.834040 0.250000 0.694596 endloop endfacet facet normal -0.187500 0.000000 0.092260 outer loop vertex 0.000002 0.000000 0.750000 vertex 0.369040 0.000000 1.500000 vertex 0.000002 0.250000 0.750000 endloop endfacet facet normal -0.187500 0.000000 0.092260 outer loop vertex 0.369040 0.000000 1.500000 vertex 0.369040 0.250000 1.500000 vertex 0.000002 0.250000 0.750000 endloop endfacet facet normal 0.000000 0.500424 -0.000000 outer loop vertex 0.480490 0.350000 1.500000 vertex 0.155677 0.350000 2.160120 vertex 0.889765 0.350000 2.208880 endloop endfacet facet normal 0.000000 0.500426 0.000000 outer loop vertex 0.889765 0.350000 0.791115 vertex 0.155677 0.350000 0.839879 vertex 0.480490 0.350000 1.500000 endloop endfacet facet normal 0.000000 0.500426 0.000000 outer loop vertex 0.889765 0.350000 2.208880 vertex 1.299040 0.350000 2.820240 vertex 1.708310 0.350000 2.208880 endloop endfacet facet normal 0.000000 0.500423 -0.000000 outer loop vertex 1.299040 0.350000 0.179758 vertex 0.889765 0.350000 0.791115 vertex 1.708310 0.350000 0.791115 endloop endfacet facet normal 0.000000 0.500425 -0.000000 outer loop vertex 2.117590 0.350000 1.500000 vertex 1.708310 0.350000 2.208880 vertex 2.442400 0.350000 2.160120 endloop endfacet facet normal 0.000000 0.500427 0.000000 outer loop vertex 1.708310 0.350000 0.791115 vertex 2.117590 0.350000 1.500000 vertex 2.442400 0.350000 0.839879 endloop endfacet facet normal 0.000000 0.580256 -0.000000 outer loop vertex 0.889765 0.350000 0.791115 vertex 0.480490 0.350000 1.500000 vertex 0.889765 0.350000 2.208880 endloop endfacet facet normal 0.000000 1.160504 0.000000 outer loop vertex 0.889765 0.350000 0.791115 vertex 0.889765 0.350000 2.208880 vertex 1.708310 0.350000 2.208880 endloop endfacet facet normal 0.000000 1.160513 0.000000 outer loop vertex 0.889765 0.350000 0.791115 vertex 1.708310 0.350000 2.208880 vertex 2.117590 0.350000 1.500000 endloop endfacet facet normal 0.000000 0.580254 0.000000 outer loop vertex 0.889765 0.350000 0.791115 vertex 2.117590 0.350000 1.500000 vertex 1.708310 0.350000 0.791115 endloop endfacet facet normal -0.075000 0.083587 0.036904 outer loop vertex 0.000002 0.250000 0.750000 vertex 0.369040 0.250000 1.500000 vertex 0.155677 0.350000 0.839879 endloop endfacet facet normal -0.066012 0.073570 0.032481 outer loop vertex 0.369040 0.250000 1.500000 vertex 0.480490 0.350000 1.500000 vertex 0.155677 0.350000 0.839879 endloop endfacet facet normal -0.066012 0.073570 -0.032481 outer loop vertex 0.369040 0.250000 1.500000 vertex 0.155677 0.350000 2.160120 vertex 0.480490 0.350000 1.500000 endloop endfacet facet normal -0.075000 0.083587 -0.036904 outer loop vertex 0.369040 0.250000 1.500000 vertex 0.000002 0.250000 2.250000 vertex 0.155677 0.350000 2.160120 endloop endfacet facet normal -0.005540 0.083588 0.083404 outer loop vertex 0.000002 0.250000 2.250000 vertex 0.834040 0.250000 2.305400 vertex 0.155677 0.350000 2.160120 endloop endfacet facet normal -0.004876 0.073571 0.073409 outer loop vertex 0.834040 0.250000 2.305400 vertex 0.889765 0.350000 2.208880 vertex 0.155677 0.350000 2.160120 endloop endfacet facet normal -0.069460 0.083588 0.046500 outer loop vertex 0.834040 0.250000 2.305400 vertex 1.299040 0.250000 3.000000 vertex 1.299040 0.350000 2.820240 endloop endfacet facet normal -0.061136 0.073571 0.040927 outer loop vertex 0.834040 0.250000 2.305400 vertex 1.299040 0.350000 2.820240 vertex 0.889765 0.350000 2.208880 endloop endfacet facet normal 0.069460 0.083588 0.046500 outer loop vertex 1.764040 0.250000 2.305400 vertex 1.299040 0.350000 2.820240 vertex 1.299040 0.250000 3.000000 endloop endfacet facet normal 0.061136 0.073574 0.040927 outer loop vertex 1.764040 0.250000 2.305400 vertex 1.708310 0.350000 2.208880 vertex 1.299040 0.350000 2.820240 endloop endfacet facet normal 0.005540 0.083588 0.083404 outer loop vertex 2.598080 0.250000 2.250000 vertex 2.442400 0.350000 2.160120 vertex 1.764040 0.250000 2.305400 endloop endfacet facet normal 0.004876 0.073572 0.073409 outer loop vertex 1.764040 0.250000 2.305400 vertex 2.442400 0.350000 2.160120 vertex 1.708310 0.350000 2.208880 endloop endfacet facet normal 0.075000 0.083591 -0.036904 outer loop vertex 2.229040 0.250000 1.500000 vertex 2.442400 0.350000 2.160120 vertex 2.598080 0.250000 2.250000 endloop endfacet facet normal 0.066012 0.073570 -0.032481 outer loop vertex 2.229040 0.250000 1.500000 vertex 2.117590 0.350000 1.500000 vertex 2.442400 0.350000 2.160120 endloop endfacet facet normal 0.075000 0.083591 0.036904 outer loop vertex 2.598080 0.250000 0.750000 vertex 2.442400 0.350000 0.839879 vertex 2.229040 0.250000 1.500000 endloop endfacet facet normal 0.066012 0.073570 0.032481 outer loop vertex 2.229040 0.250000 1.500000 vertex 2.442400 0.350000 0.839879 vertex 2.117590 0.350000 1.500000 endloop endfacet facet normal 0.005540 0.083588 -0.083404 outer loop vertex 1.764040 0.250000 0.694596 vertex 2.442400 0.350000 0.839879 vertex 2.598080 0.250000 0.750000 endloop endfacet facet normal 0.004876 0.073571 -0.073409 outer loop vertex 1.764040 0.250000 0.694596 vertex 1.708310 0.350000 0.791115 vertex 2.442400 0.350000 0.839879 endloop endfacet facet normal 0.061136 0.073573 -0.040927 outer loop vertex 1.764040 0.250000 0.694596 vertex 1.299040 0.350000 0.179758 vertex 1.708310 0.350000 0.791115 endloop endfacet facet normal 0.069460 0.083587 -0.046500 outer loop vertex 1.299040 0.250000 0.000000 vertex 1.299040 0.350000 0.179758 vertex 1.764040 0.250000 0.694596 endloop endfacet facet normal -0.061136 0.073571 -0.040927 outer loop vertex 0.834040 0.250000 0.694596 vertex 0.889765 0.350000 0.791115 vertex 1.299040 0.350000 0.179758 endloop endfacet facet normal -0.069460 0.083587 -0.046500 outer loop vertex 1.299040 0.250000 0.000000 vertex 0.834040 0.250000 0.694596 vertex 1.299040 0.350000 0.179758 endloop endfacet facet normal -0.004876 0.073571 -0.073409 outer loop vertex 0.834040 0.250000 0.694596 vertex 0.155677 0.350000 0.839879 vertex 0.889765 0.350000 0.791115 endloop endfacet facet normal -0.005540 0.083587 -0.083404 outer loop vertex 0.834040 0.250000 0.694596 vertex 0.000002 0.250000 0.750000 vertex 0.155677 0.350000 0.839879 endloop endfacet endsolid Star.stl numpy-stl-2.3.2/tests/stl_binary/000077500000000000000000000000001313575633700170135ustar00rootroot00000000000000numpy-stl-2.3.2/tests/stl_binary/HalfDonut.stl000066400000000000000000000342251313575633700214310ustar00rootroot00000000000000solid test.stl 2014-10-16 15:37:40.542327 HalfDonut.stl ;n==v>f>????|??W?%=2bv>f>?l>f>????@<r=i;ܽ@?f>c????0?f>?:n<==;ܽ@?f>c?|??W????x<]$=Į;Xg?>U?0?f>?sZ?>?b =M=Ԟ;Xg?>U?ܽ@?f>c?0?f>?X=(Զ?sZ?>?Av?(C>?]$= <@<_?(C>?Xg?>U?sZ?>?o۹w_x=>(C>;p?=(C>?w>>e{?e=鈼=(C>?4>>?w>>e{?gJt= !w>>e{?l>f>?v>f>?e=6w>>e{?4>>?l>f>?MJ[=,X(?f>X(?|??W? J?? J?cq0= !X(?f>X(?v>f>?|??W?#m? J?? J?ܽ@?f>c?MJ<=,<ܽ@?f>c? J?? J?|??W?y8<_$=xk}?ܽ@?f>c?Xg?>U?<M=Bk}?m?f>m?ܽ@?f>c? <ѶL?Xg?>U?_?(C>?Y =Y<<5L?k}?>k}?Xg?>U?_x=R>(C>>>(C>;p? ?> ?ᑽe=B>(C>;p?w>>e{? ?> ?oB.=B ?> ?w>>e{?X(?f>X(? +t=BM弯w>>e{?v>f>?X(?f>X(? !0=cq?f>v>X(?f>X(?W??|?,[=MJX(?f>X(? J?? J?W??|?;r=#ܽ@? J?? J?m?f>m?,<=MJܽ@?W??|? J?? J?x<_$=y8Xg?c?f>ܽ@?k}?>k}?B<M=k}?c?f>ܽ@?m?f>m?O<Ѷ< _?U?>Xg?L?(C>L?<5L?U?>Xg?k}?>k}?Be=ᑽ;p?(C>> ?> ?e{?>w>R_x=;p?(C>>>(C>> ?> ?BMt= +e{?>w>X(?f>X(??f>v>B-=oBe{?>w> ?> ?X(?f>X(?2b=%?f>l>?f>v>???==;n?f>v>W??|????=;=:nܽ@????W??|?i;r=@<?f>0????c?f>ܽ@?Į;]$=x<?>sZ??f>0?U?>Xg?Ԟ;M=b =U?>Xg??f>0?c?f>ܽ@?K;)ԶAv??>sZ??(C>_?@< <]$=?(C>_??>sZ?U?>Xg?鈼e=?(C>=e{?>w>?>4>w_x=o۹?(C>=;p?(C>>e{?>w>6=e?>4>e{?>w>?f>l> !t=gJe{?>w>?f>v>?f>l>2b;=%?f>l>???B[?f>v>=;=;nB[?f>v>?????|?==:nܽ@???|????ir=@<?f>0?c?f>ܽ@????Į]$=x<?>sZ?&?>Xg??f>0?ԞڻM=b =&?>Xg?c?f>ܽ@??f>0?Kٻ)ԶAv?B[?(C>_??>sZ?@ <]$=B[?(C>_?&?>Xg??>sZ?<{e=?(C>=?>4>&@>w><_x=m۹?(C>=&@>w>1@(C>>6<=ye?>4>?f>l>&@>w> !w>?f>l>B[?f>v> !<= qB[?f>v>??|? @f>X(?,<=rNJ @f>X(???|?JA @? J?,d=qNJܽ@?JA @? J???|?ڻor=M#ܽ@?@f>m?JA @? J?x_$=y8<&?>Xg??>k}?c?f>ܽ@?BM=2k}?@f>m?c?f>ܽ@?OѶ< _?>?(C>L?&?>Xg?<5Y<Y =>?(C>L??>k}?&?>Xg?R=|_x=#1@(C>>JA@> ?("@(C>>B=e=ᑽ1@(C>>&@>w>JA@> ?B=J=B&@>w> @f>X(?JA@> ?BM<.t=+&@>w>B[?f>v> @f>X(?cq<= ! @f>X(? @?W?7q&@f>?MJ<\=), @f>X(?JA @? J? @?W?#r=;@f>m?}@f>c?JA @? J?MJ=),<}@f>c? @?W?JA @? J?M=$k}?}@f>c?@f>m?y8^$=/xk}?.9@>U?}@f>c?Y <5<>?(C>L?.9@>U??>k}? VҶ?(C>L??(C>?.9@>U?=V_x=hR("@(C>>JA@> ?7q6@(C>;p?=Te=HB7q6@(C>;p?JA@> ?0@>e{?oB==BJA@> ? @f>X(?0@>e{? +=Is=BM弅0@>e{? @f>X(?7q&@f>?%<=.b7q&@f>? @??>,@f>?;n<==7q&@f>? @?W? @??@]r=;}@f>c?@f>? @??:nL==;}@f>c? @?? @?W?b M=D;.9@>U?@f>?}@f>c?xۼ\$=Ʈ;.9@>U?p_ @>?@f>?]$<?p_ @>?.9@>U?Xն<7;?(C>?o@(C>?p_ @>?o۹=ax=Xߓ7q6@(C>;p?0@>e{?m=@(C>?=`e=舼m=@(C>?0@>e{?6@>?e==?60@>e{?>,@f>?6@>?gJ=s=!0@>e{?7q&@f>?>,@f>?%<=.b;>,@f>? @??7q&@f>B[?;n<==;7q&@f>B[? @?? @??@\r=@f>?}@f>c? @??:nL==}@f>c? @?? @??xۼ\$=Ʈp_ @>?.9@>&?@f>?b M=Dڻ.9@>&?}@f>c?@f>?]$<?(C>B[?.9@>&?p_ @>?Xն<7ٻo@(C>??(C>B[?p_ @>?m۹=ax=Xߓ?0@>&@7q6@(C>1@=(e=?6@>?0@>&@ye=}=?6<6@>?>,@f>?0@>&@gJ=s=!<0@>&@>,@f>?7q&@f>B[? q<^= !<7q&@f>B[? @?? @f> @rNJ<=),< @f> @ @??JA @?JA @qNJ=),}@f>c?JA @?JA @ @??M#r=ڻ}@f>c?@f>@JA @?JA @y8^$=/x.9@>&??>?}@f>c?2輯M=$?>?@f>@}@f>c? UҶB[?>?(C>>?.9@>&?Y <5>?(C>>??>?.9@>&?#=8_x=hR=7q6@(C>1@JA@>JA@("@(C>("@=he=HB=7q6@(C>1@0@>&@JA@>JA@B==B=0@>&@ @f> @JA@>JA@+=Zs=BM<0@>&@7q&@f>B[? @f> @ !<^= q< @f> @?? @B[?f>7q&@),<=rNJ< @f> @JA @?JA @?? @ڻr=M#@f>@c?f>}@JA @?JA @),=qNJc?f>}@?? @JA @?JA @$M=2輕?>?c?f>}@@f>@/x^$=y8?>?&?>.9@c?f>}@5<Y >?(C>>?&?>.9@?>?OVҶ< >?(C>>?B[?(C>?&?>.9@hR=8_x=#=("@(C>("@JA@>JA@1@(C>7q6@HB=he==1@(C>7q6@JA@>JA@&@>0@B==B=JA@>JA@ @f> @&@>0@BM0@ @f> @B[?f>7q&@.b;=%7q&@?? @?f>>,@=;=;n7q&@?? @?? @=L=:nc?f>}@?? @?? @]r=@c?f>}@?f>@?? @DڻM=b &?>.9@?f>@c?f>}@Ʈ\$=xۼ&?>.9@?>p_ @?f>@<]$B[?(C>??>p_ @&?>.9@7ٻն??(C>o@?>p_ @Xߓ7q6@&@>0@?(C>m=@<(e==?(C>m=@&@>0@?>6@?6<}=ye=&@>0@?f>>,@?>6@!0@B[?f>7q&@?f>>,@==;n7q&@?? @W?? @.b=%7q&@?f>>,@?? @=;L=:nc?f>}@W?? @?? @;]r=@c?f>}@?? @?f>@Ʈ;\$=xۼU?>.9@?f>@?>p_ @D;M=b U?>.9@c?f>}@?f>@7;ն??>p_ @?(C>o@<<]$?(C>?U?>.9@?>p_ @Xߓax=o۹=;p?(C>7q6@?(C>m=@e{?>0@舼`e==?(C>m=@?>6@e{?>0@!s=gJ=e{?>0@?f>>,@?f>7q&@?6=e=e{?>0@?>6@?f>>,@),\=MJ<X(?f> @W?? @ J??JA @ !=cq<X(?f> @?f>7q&@W?? @;r=#m?f>@ J??JA @c?f>}@),<=MJc?f>}@ J??JA @W?? @/x<^$=y8k}?>?c?f>}@U?>.9@$<M=k}?>?m?f>@c?f>}@O>?U?>.9@?(C>?5<<Y L?(C>>?k}?>?U?>.9@hRV_x==>(C>("@;p?(C>7q6@ ?>JA@HBTe==;p?(C>7q6@e{?>0@ ?>JA@B=oB= ?>JA@e{?>0@X(?f> @BMIs= +=e{?>0@?f>7q&@X(?f> @ q= !f>B[?X(?f> @|???rNJ=,<X(?f> @ J??JA @|???M#c? J??JA @m?f>@qNJc?|??? J??JA @y8<_$=xXg?>&?ܽ@?f>c?k}?>?2?ܽ@?f>c?m?f>@ <ѶB[?Xg?>&?L?(C>>?Y =Y<<5L?(C>>?Xg?>&?k}?>?ᑽe=B=>(C>1@ ?>JA@w>>&@#|_x=R=>(C>1@>(C>("@ ?>JA@+.t=BM>&@X(?f> @v>f>B[?BJ=B=w>>&@ ?>JA@X(?f> @%=2b;l>f>?v>f>B[????;n==;v>f>B[?|??????@<r=i0?f>????ܽ@?f>c?:n<==ܽ@?f>c????|???x<]$=ĮsZ?>?0?f>?Xg?>&?b =M=ԞڻXg?>&?0?f>?ܽ@?f>c?X=)Զ?sZ?>?_?(C>B[?]$= <@_?(C>B[?sZ?>?Xg?>&?{e=<=(C>?w>>&@4>>?m۹_x=<=(C>?>(C>1@w>>&@ye=6<4>>?w>>&@l>f>?gJt= !>&@v>f>B[?l>f>?a!=d?Av?(C>?=5;¡;&߄?,?Av?(C>???8ཀ<= m??>(C>;p?<۽n?>(C>;p?%=n<{ж<ྒ?ྒ?L?(C>L?_?(C>?B?&߄?,?h~<~,>,>= m?>(C>>۹n(C>;p?>(C>>{ж_?L?(C>L? _?ྒ?ྒ?~x,>>(C>>Z_xn<۹ m?=>(C>>;p?(C>>RhAv??(C>_?¡;5;=???(C>Av?,?&߄?<8? m?=;p?(C>>Jon<<۽?;p?(C>>?(C>=Rhd<a!=}?&߄?B[?(C>_??(C>Av?¡5;=??}?&߄??(C>Av?<<?1@(C>>@=Jo=1@(C>>{жn<%= A?ྒ?>?(C>L?B[?(C>_? 橼Z;B<}?&߄? A?ྒ?B[?(C>_?~=<汾@=("@(C>>#@,>Z_x=vr<۹@=1@(C>>("@(C>>BX; < A?ྒ? ?,??(C>?%n<{ж< A?ྒ??(C>?>?(C>L?h=T<~#@,>("@(C>>F8@ m?۹=k<_xF8@ m?("@(C>>7q6@(C>;p?;¡; ?,?@?o@(C>?a!d??(C>?8=;p?@@?<=n;p?m=@(C>?a!dB[?o@(C>?;¡@? ?}?o@(C>?=81@F8@@<=n?7q6@(C>1@%n<{ж A? A?>?(C>>??(C>B[?BZ; 橼 ?}? A? A??(C>B[?汾=<~=F8@@("@(C>("@#@#@۹=^o<_x=F8@@7q6@(C>1@("@(C>("@ 橼X;B A? A?}? ?B[?(C>?{жn<% A? A?B[?(C>?>?(C>>?~=<汾=#@#@("@(C>("@@F8@_x=^o<۹=@F8@("@(C>("@1@(C>7q6@¡;}? ??@?(C>o@Dhd<a!}? ??(C>o@B[?(C>?j<6<=@F8@1@(C>7q6@?@@m7q6@?(C>m=@Dh??(C>o@¡;;,? ??(C>o@?@j<8= m?F8@?@@;p?(C>7q6@mn<<=?@@?(C>m=@;p?(C>7q6@{ж>??(C>? ?,? ?~T#@ m?F8@>(C>("@_xk<۹= m?F8@;p?(C>7q6@>(C>("@%=n<{жྒ? A?_?(C>B[?L?(C>>?BB[?ྒ? A?汾<~==@,>#@>(C>("@۹vr(C>("@>(C>1@a!=d?_?(C>B[?=5;¡??Av?(C>?&߄?}?<<?=@>(C>1@<۽n(C>1@=(C>?{,>,>ྒ?ྒ?= m?z m?=ྒ?ྒ?,>,> #?ྒ?ྒ? m?= #= m?ྒ?ྒ??2ྒ?ྒ?=@?2?@=ྒ?ྒ?;#@#@@F8@?@@ #@#@?@@ m?F8@0,>#@#@#@ m?F8@V"=@#@#@,>#@@=@F8@@#@#@f;#@,>F8@ m?@@?C!#@,>@@?F8@@"0@=#@,>F8@@@=,?&߄?ྒ?ྒ?D0@=??,?&߄?C@=}?&߄???3C@= A?ྒ?}?&߄?i@=F8@@ A?ྒ? A?ྒ?F8@@ ?,?N0 ?,?F8@@@?C@?F8@@ ?}??C ?}?F8@@ A? A?2 A? A?F8@@}? ?}? ?F8@@?@ྒ?ྒ?&߄?,?=@C0&߄?,???=@C??&߄?}?=@5C&߄?}?ྒ? A?=@2ྒ? A?,? ?=@R?@F8@@=@,? ??@=@ numpy-stl-2.3.2/tests/stl_binary/Moon.stl000066400000000000000000000133741313575633700204570ustar00rootroot00000000000000numpy-stl (1.0.0) 2014-10-16 15:37:40.642049 Moon.stl t3I>!@>@>L>!@3I>@L>>@>L>!@ͤ]c<>@o~>@@L>>@ͤ]c@@o~>L>@@L>>@3z'<=B?<@B?L><@o~>@@3z'<=o~>@@B?L><@o~>L>@@<p.=`?y#3@`?L>y#3@B?<@<p.=B?<@`?L>y#3@B?L><@GC=}~=r3?#@r3?L>#@`?y#3@GC=}~=`?y#3@r3?L>#@`?L>y#3@~~=GC=?@?L>@r3?#@~~=GC=r3?#@?L>@r3?L>#@W.=??@W.=??L>@=3z'???=3z'??L>?=3z'?{N??L>{N?o??=3z'o???L>{N?o?L>?W.=?@??L>@??{N?W.=?{N??L>@??L>{N? ~~=GCr3?,>r3?L>,>?@? ~~=GC?@?r3?L>,>?L>@?}GC=}~`?M>`?L>M>r3?,>}GC=}~r3?,>`?L>M>r3?L>,><p.B?YQ=B?L>YQ=`?M><p.`?M>B?L>YQ=`?L>M>{'<o~>o~>L>B?YQ={'<B?YQ=o~>L>B?L>YQ= ]cҼo~>t~L> ]cҼt~<L>t~L>I=t~<>33>L>t~<I=>33>>L>33>L>t~<΃ʽO#=>33>vm?+x?>L>33>΃ʽO#=vm?+x?vm?L>+x?>L>33>=SٽN_+x?=SٽN_< ?? ?L>?vm?L>+x?ZSٽN_ ??vm?@ ?L>?ZSٽN_vm?@vm?L>@ ?L>?ʽO#vm?@>!@vm?L>@ʽO#>!@>L>!@vm?L>@>!@o~>@@>@0>!@B?<@o~>@@4>!@`?y#3@B?<@#&vm?@`?y#3@>!@vm?@r3?#@`?y#3@vm?@?@r3?#@; ???@vm?@; ?????@ƾ ??o????vm?+x?o?? ??]oƾvm?+x??{N?o??u?@??{N?vm?+x? >33>?@?vm?+x?&r3?,>?@?>33>*U`?M>r3?,>>33> 4B?YQ=`?M>>33>0o~>B?YQ=>33>o~>>33>t~<4=?33>tF?@?33>?֨?33>?=?33>33>@?33>??33>tF?V>kZ?33>z>@?33>??33>33>t>%?33>p=@?33>?kZ?33>z>=>o~>33>ɑN=@?33>?%?33>p=?o~>33>ɑN=֨?33>?@?33>?=?33>b@kZ?33>W0@?33>!@܆=?33>b@%?33>9@kZ?33>W0@V>?33>b@o~>33><@%?33>9@>֨?33>?o~>33><@?33>b@Wx<g>33>8#@=33>z<@o~>33><@`>֨?33>?g>33>8#@o~>33><@>֨?33>??33>@g>33>8#@n>X-?33>??33>@֨?33>?>?33>t?X-?33>?֨?33>?Xx<o~>33>ɑN==33>PUa=g>33>G;>X>g>33>G;>?33>t?֨?33>?d=o~>33>ɑN=g>33>G;>֨?33>?;&/;ʝ<L>>@o~>L>@@=33>z<@4 :M;o~>L>@@o~>33><@=33>z<@zr<>>L>!@=33>z<@g>33>8#@$L>!@L>>@=33>z<@◽k@>L>!@?33>@P/<>L>!@g>33>8#@?33>@<{' ?L>?vm?L>@X-?33>?馽p`<̂+vm?L>@?33>@X-?33>?馽\`<̂++x?X-?33>??33>t?m<{'+x? ?L>?X-?33>?P<<>L>33>?33>t?g>33>G;>◽ l<<>L>33>vm?L>+x??33>t?t~<>L>33>=33>PUa=Tzrձ<>=>L>33>g>33>G;>=33>PUa=!4::Mo~>L>=33>PUa=o~>33>ɑN=W1&44;ʝo~>L>L>t~<=33>PUa=8;d<$no~>L>%?33>p=B?L>YQ=;<fo~>L>o~>33>ɑN=%?33>p= #<dYQ=kZ?33>z>`?L>M>;<YQ=%?33>p=kZ?33>z>u=\c`?L>M>?33>33>r3?L>,> =M>kZ?33>z>?33>33>>=c,>?33>33>?L>@?s8=< ?L>@??33>33>?33>tF?E^=#`<"?L>@??33>tF??L>{N?V={N??33>tF?֨?33>?Jn=Ua{N?֨?33>?o?L>?f=<o?L>?֨?33>?@?33>?Jn=Ua?֨?33>??L>?f=<;o?L>?@?33>?֨?33>?E^=^a<"??33>b@?L>@VV=?֨?33>??33>b@>=c@?33>!@r3?L>#@t8=,< =?L>@?33>b@?33>!@v =y#3@?33>!@kZ?33>W0@u=dc=r3?L>#@?33>!@`?L>y#3@"y#3@kZ?33>W0@B?L><@<|<@kZ?33>W0@%?33>9@L7;wa<$n=B?L><@%?33>9@o~>L>@@;m<f=o~>L>@@%?33>9@o~>33><@numpy-stl-2.3.2/tests/stl_binary/Star.stl000066400000000000000000000066341313575633700204610ustar00rootroot00000000000000numpy-stl (1.0.0) 2014-10-16 15:37:40.741314 Star.stl D^%U? 1?>?76@?^%>?U?@76@^%F?? 1?U? 1?^%U?@?@F?@@^%? 1?F&@@?@?^%@?F&@@?@?U? 1?U?@>?U? 1?? 1?U?@? 1?@?U?@?@??@U?@@>?76@>>?@򼽽76@76>@>>?bU>76@U?@76>@bU>U?@U?>@76>@P1z=U?@F?@@U?>@P1z=F?@@F?>@@U?>@P1>|=?@?>@F?@@P1>|=F?@@?>@F?>@@b<U>F&@@F&@>@?@b<U>?@F&@>@?>@@>򼽗@?@>?F&@@@>F&@@@>?F&@>@@>=F&@@?F&@>@?@?@>=@?F&@>@?@>?Pb<U? 1??> 1?F&@@?Pb<UF&@@??> 1?F&@>@? 1>|F?F?>? 1? 1>|? 1?F?>?> 1? 1zF?U? 1?F?> 1zU? 1?U?> 1?F?>PbUU? 1?76@?U?> 1?PbU76@?76>@?U?> 1?@=76@?>?76>@?@=>?>>?76>@??>33>?i>33>h? @c?33>J^ @?c?33>J?i>33>OW?>33>??c?33>J^ @F?33>~4@?33>J^ @?F?33>{8>c?33>J??33>J??@33>??33>J^ @HP@33>h? @??33>J?@33>?HP@33>OW??c?33>J?>33>?c?33>J^ @h?c?33>J?c?33>J^ @?33>J^ @?c?33>J??33>J^ @@33>??c?33>J?@33>??33>J?/=p(=76>@?>>?i>33>OW?Z1= =>>?>33>?i>33>OW?L1= >>?i>33>h? @>33>?/=p(>>?76>@i>33>h? @̈0=Ϫ=76>@U?>@i>33>h? @Ɵ=ZW=U?>@c?33>J^ @i>33>h? @ Ab0=v>=U?>@F?>@@F?33>~4@iz='=U?>@F?33>~4@c?33>J^ @ A=f0=v>=?>@F?33>~4@F?>@@iz=ޭ='=?>@?33>J^ @F?33>~4@̈;D0=Ϫ=F&@>@HP@33>h? @?>@Ɵ;Ĭ=tW=?>@HP@33>h? @?33>J^ @=1=(@>?HP@33>h? @F&@>@L1= = @>?@33>?HP@33>h? @=1=(=F&@>@?HP@33>OW?@>?Z1== =@>?HP@33>OW?@33>??;(0=Ϫ?> 1?HP@33>OW?F&@>@?4ʟ;=tW?> 1??33>J?HP@33>OW?liz=='?> 1?F?33>{8>?33>J?@=/=v>F?>F?33>{8>?> 1?liz<='U?> 1?c?33>J?F?33>{8>@/=v>F?>U?> 1?F?33>{8>4ʟK=ZWU?> 1?i>33>OW?c?33>J??/=ϪU?> 1?76>@?i>33>OW?numpy-stl-2.3.2/tests/stl_binary/StarWithEmptyHeader.stl000066400000000000000000000066341313575633700234450ustar00rootroot00000000000000 D^%U? 1?>?76@?^%>?U?@76@^%F?? 1?U? 1?^%U?@?@F?@@^%? 1?F&@@?@?^%@?F&@@?@?U? 1?U?@>?U? 1?? 1?U?@? 1?@?U?@?@??@U?@@>?76@>>?@򼽽76@76>@>>?bU>76@U?@76>@bU>U?@U?>@76>@P1z=U?@F?@@U?>@P1z=F?@@F?>@@U?>@P1>|=?@?>@F?@@P1>|=F?@@?>@F?>@@b<U>F&@@F&@>@?@b<U>?@F&@>@?>@@>򼽗@?@>?F&@@@>F&@@@>?F&@>@@>=F&@@?F&@>@?@?@>=@?F&@>@?@>?Pb<U? 1??> 1?F&@@?Pb<UF&@@??> 1?F&@>@? 1>|F?F?>? 1? 1>|? 1?F?>?> 1? 1zF?U? 1?F?> 1zU? 1?U?> 1?F?>PbUU? 1?76@?U?> 1?PbU76@?76>@?U?> 1?@=76@?>?76>@?@=>?>>?76>@??>33>?i>33>h? @c?33>J^ @?c?33>J?i>33>OW?>33>??c?33>J^ @F?33>~4@?33>J^ @?F?33>{8>c?33>J??33>J??@33>??33>J^ @HP@33>h? @??33>J?@33>?HP@33>OW??c?33>J?>33>?c?33>J^ @h?c?33>J?c?33>J^ @?33>J^ @?c?33>J??33>J^ @@33>??c?33>J?@33>??33>J?/=p(=76>@?>>?i>33>OW?Z1= =>>?>33>?i>33>OW?L1= >>?i>33>h? @>33>?/=p(>>?76>@i>33>h? @̈0=Ϫ=76>@U?>@i>33>h? @Ɵ=ZW=U?>@c?33>J^ @i>33>h? @ Ab0=v>=U?>@F?>@@F?33>~4@iz='=U?>@F?33>~4@c?33>J^ @ A=f0=v>=?>@F?33>~4@F?>@@iz=ޭ='=?>@?33>J^ @F?33>~4@̈;D0=Ϫ=F&@>@HP@33>h? @?>@Ɵ;Ĭ=tW=?>@HP@33>h? @?33>J^ @=1=(@>?HP@33>h? @F&@>@L1= = @>?@33>?HP@33>h? @=1=(=F&@>@?HP@33>OW?@>?Z1== =@>?HP@33>OW?@33>??;(0=Ϫ?> 1?HP@33>OW?F&@>@?4ʟ;=tW?> 1??33>J?HP@33>OW?liz=='?> 1?F?33>{8>?33>J?@=/=v>F?>F?33>{8>?> 1?liz<='U?> 1?c?33>J?F?33>{8>@/=v>F?>U?> 1?F?33>{8>4ʟK=ZWU?> 1?i>33>OW?c?33>J??/=ϪU?> 1?76>@?i>33>OW?numpy-stl-2.3.2/tests/stl_corruption.py000066400000000000000000000070031313575633700203050ustar00rootroot00000000000000from __future__ import print_function import pytest import struct from stl import mesh _STL_FILE = ''' solid test.stl facet normal -0.014565 0.073223 -0.002897 outer loop vertex 0.399344 0.461940 1.044090 vertex 0.500000 0.500000 1.500000 vertex 0.576120 0.500000 1.117320 endloop endfacet endsolid test.stl '''.lstrip() def test_valid_ascii(tmpdir, speedups): tmp_file = tmpdir.join('tmp.stl') with tmp_file.open('w+') as fh: fh.write(_STL_FILE) fh.seek(0) mesh.Mesh.from_file(str(tmp_file), fh=fh, speedups=speedups) def test_ascii_with_missing_name(tmpdir, speedups): tmp_file = tmpdir.join('tmp.stl') with tmp_file.open('w+') as fh: # Split the file into lines lines = _STL_FILE.splitlines() # Remove everything except solid lines[0] = lines[0].split()[0] # Join the lines to test files that start with solid without space fh.write('\n'.join(lines)) fh.seek(0) mesh.Mesh.from_file(str(tmp_file), fh=fh, speedups=speedups) def test_ascii_with_blank_lines(tmpdir, speedups): _stl_file = ''' solid test.stl facet normal -0.014565 0.073223 -0.002897 outer loop vertex 0.399344 0.461940 1.044090 vertex 0.500000 0.500000 1.500000 vertex 0.576120 0.500000 1.117320 endloop endfacet endsolid test.stl '''.lstrip() tmp_file = tmpdir.join('tmp.stl') with tmp_file.open('w+') as fh: fh.write(_stl_file) fh.seek(0) mesh.Mesh.from_file(str(tmp_file), fh=fh, speedups=speedups) def test_incomplete_ascii_file(tmpdir, speedups): tmp_file = tmpdir.join('tmp.stl') with tmp_file.open('w+') as fh: fh.write('solid some_file.stl') fh.seek(0) with pytest.raises(AssertionError): mesh.Mesh.from_file(str(tmp_file), fh=fh, speedups=speedups) for offset in (-20, 82, 100): with tmp_file.open('w+') as fh: fh.write(_STL_FILE[:-offset]) fh.seek(0) with pytest.raises(AssertionError): mesh.Mesh.from_file(str(tmp_file), fh=fh, speedups=speedups) def test_corrupt_ascii_file(tmpdir, speedups): tmp_file = tmpdir.join('tmp.stl') with tmp_file.open('w+') as fh: fh.write(_STL_FILE) fh.seek(40) print('####\n' * 100, file=fh) fh.seek(0) with pytest.raises(AssertionError): mesh.Mesh.from_file(str(tmp_file), fh=fh, speedups=speedups) with tmp_file.open('w+') as fh: fh.write(_STL_FILE) fh.seek(40) print(' ' * 100, file=fh) fh.seek(80) fh.write(struct.pack('