pax_global_header 0000666 0000000 0000000 00000000064 13764321163 0014520 g ustar 00root root 0000000 0000000 52 comment=36304c4d3500c0541fa1331337baf4b2acad737f
PyWavefront-1.3.3/ 0000775 0000000 0000000 00000000000 13764321163 0014010 5 ustar 00root root 0000000 0000000 PyWavefront-1.3.3/.circleci/ 0000775 0000000 0000000 00000000000 13764321163 0015643 5 ustar 00root root 0000000 0000000 PyWavefront-1.3.3/.circleci/config.yml 0000664 0000000 0000000 00000003424 13764321163 0017636 0 ustar 00root root 0000000 0000000 # Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
- image: circleci/python:3.4
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4
working_directory: ~/repo
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "test-requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: install dependencies
command: |
rm -rf venv # bad pip link
virtualenv venv
. venv/bin/activate
pip install -r test-requirements.txt
sudo apt-get update
sudo apt-get install freeglut3-dev
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "test-requirements.txt" }}
# run tests!
# this example uses Django's built-in test-runner
# other common Python testing frameworks include pytest and nose
# https://pytest.org
# https://nose.readthedocs.io
- run:
name: run tests
command: |
. venv/bin/activate
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
export DISPLAY=':99.0'
python setup.py develop
pytest
- store_artifacts:
path: test-reports
destination: test-reports
PyWavefront-1.3.3/.gitignore 0000664 0000000 0000000 00000000256 13764321163 0016003 0 ustar 00root root 0000000 0000000
# build
*.egg-info
dist
*.pyc
*.pyo
build
MANIFEST
*.swp
# virtualenvs
env
.env
.venv
.venv2
.venv3
# IDEs
.idea
.vscode
# osx
.DS_Store
# local testing
/data/
/test.py
PyWavefront-1.3.3/CHANGELOG.md 0000664 0000000 0000000 00000010620 13764321163 0015620 0 ustar 00root root 0000000 0000000 # Change Log
Release history on Github: https://github.com/pywavefront/PyWavefront/releases
## 1.3.3
* Support objects with one vertex statement
## 1.3.2
* Properly handle face lines with unspecified normal index such as `1/2/`
## 1.3.1
* visualization: objects without lighting will now have their ambient
color set using `glColor`.
## 1.3.0
* Textures will now use `GL_REPEAT` by default (as the specificiation suggests)
* Added support for parsing texture options in materials.
The following options are parsed: `blendu`, `blendv`, `bm`, `boost`, `cc`,
`clamp`, `imfchan`, `mm`, `o`, `s`, `t`, `texres`
* Added `options` property to `Texture` class
* visualization now respect the `clamp` option. If `on` the texture will use
`GL_CLAMP_TO_EDGE`. Otherwise `GL_REPEAT` will be used.
* All example windows can now be resized
## 1.2.0
* Pywavefront is now using `pathlib` internally. `Path` instances can also
be passed to all parsers.
* Bug fix: Texture paths in materials should no longer be mangled when
containing spaces or special characters. It should always be read
exactly as it appears in the file.
* Texture: `file_name` property added as a more robust way to get
the texture file name without path. This should even work for
hard coded windows path on Linux and OS X.
* Texture: Added `find` method searching for the exact texture name in a directory
and all subdirectories. By default it will search from the obj file's location.
* Visualization: `draw` methods now supports `lighting_enabled` and `textures_enabled`
making the user able to toggle on/off lighting and texturing.
* Visualization: Now works with NPOT textures (texture whose dimensions are not powers of 2)
## 1.1.0
* Fixed an incompatibility issue related to image loading in pyglet 1.4.x
* Texture instances now store the texture name as they appear in the material
and an optional path parameter that represents the absolute path to the
texture.
* Removed dead code related related to python 2/3 compatibility
## 1.0.5
* Visualization module should enable depth testing by default.
This is what most people need.
## 1.0.4
* Faces with undefined texture coordinates will
fall back to uv index 0
## 1.0.3
* Fix vertex format exceptions - PR #86
## 1.0.2
* Fix two parsing IndexErrors - PR #84
## 1.0.1
* Release only for Python3, not universal - Fixes #79
## 1.0.0
* Use Python 3.4 on CI server - PR #78
* Switch to Python 3.4+ - PR #77
* Fix support for earlier py3 versions, which do not support json as bytes - PR #76
* Add option to retain face data - PR #74
## 0.4.2
* Add Python 3.7 support - PR #72
* Add missing material properties - PR #70
* Tweak README - PR #68
## 0.4.1
* Add Python 3 - PR #65
## 0.4.0
* Add binary cache - PR #63
* Fix handling of negative indices - PR #62
* Set up logger - PR #60
* Allow textures to load from anywhere - PR #59
## 0.3.2
* Fix README - PR #55
* Allow users to override material parser - PR #54
* Allow parser to create missing materials - PR #52
* Fix pypi markdown, tweak README - PR #51
## 0.3.1
* Revamp README - PR #48
* Fix various bugs - PR #47
* Cap shininess in visualization - PR #46
* Support different vertex formats + example - PR #43
* Detect vertex format, vertex color, and tests - PR #42
## 0.3.0
* Run all parser tests for gzip file - PR #40
* Revamp parser to prepare to support different vertex formats - PR #38
* Make dir available as instance attribute + tests - PR #33
* Use setuptools - PR #31
## 0.2.0
* Make Pyglet an optional dependency - PR #30
* Close file descriptor when no longer needed - PR #29
* Specify the full path for the test files. Remove Pyglet dependency on unit tests - PR #28
* Use the correct accented "e" character- PR #27
* Add basic circleci configuration
## 0.1.7
* Handle any unimplemented flag and carry on with a warning - PR #21
* Add support to object-less obj file - PR #23
## 0.1.6
* Import .obj without material file - PR #16
## 0.1.5
* Support transparency - PR #15
## 0.1.4
* Include MANIFEST file - PR #12
## 0.1.3
* Replace Pyglet resource with native open() - PR #7
* Remove UTF-8 encoding/decoding - PR #9
* Fix issues with parsing resource files - PR #9
## 0.1.2
* Update syntax to Python 3 - PR #3
* Add support for opening .obj files in other directories - PR #5
* Conform to PEP 8 - PR #5
* Add support for relative imports - PR #5
## 0.1.1
* Add material setters.
* Add lighting in example.
## 0.1
* Initial release.
PyWavefront-1.3.3/LICENSE 0000664 0000000 0000000 00000003015 13764321163 0015014 0 ustar 00root root 0000000 0000000 Copyright (c) 2013-2018 Kurt Yoder
Copyright (c) 2019 Pywavefront Contributors
All rights reserved.
Redistribution and use in source and binary forms, 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.
* Neither the name of Pywavefront 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 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 SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
PyWavefront-1.3.3/MANIFEST.in 0000664 0000000 0000000 00000000236 13764321163 0015547 0 ustar 00root root 0000000 0000000 # Documentation
include CHANGELOG.md
include README.md
include LICENSE
# Source files
recursive-include pywavefront *
# Tests
recursive-include test/test_*
PyWavefront-1.3.3/README.md 0000664 0000000 0000000 00000015675 13764321163 0015305 0 ustar 00root root 0000000 0000000 [](https://pypi.org/project/PyWavefront/)
[](https://circleci.com/gh/pywavefront/PyWavefront)
[](#readme)
# PyWavefront
PyWavefront reads Wavefront 3D object files (`something.obj`, `something.obj.gz`
and `something.mtl`) and generates interleaved vertex data for each material ready for rendering.
* Python 3.4+ is supported in 1.x versions
* Python 2.7 is supported in 0.x versions
A simple (optional) visualization module is also provided for
rendering the object(s). The interleaved data can also be used by
more modern renderers thought VBOs or VAOs.
Currently the most commonly used features in [the specification](https://en.wikipedia.org/wiki/Wavefront_.obj_file) has
been implemented:
* Positions
* Texture Coordinates
* Normals
* Vertex Color
* Material parsing
* Texture and texture parameters
We currently don't support parameter space vertices, line elements or smoothing groups.
Create an issue or pull request on github if needed features are missing.
The package is on [pypi](https://pypi.org/project/PyWavefront/)
or can be cloned on [github](https://github.com/pywavefront/PyWavefront).
```bash
pip install pywavefront
```
Also check out the [roadmap](https://github.com/pywavefront/PyWavefront/blob/master/ROADMAP.md) for future plans.
## Usage
Basic example loading an obj file:
```python
import pywavefront
scene = pywavefront.Wavefront('something.obj')
```
A more complex example
* `strict` (Default: `False`) will raise an exception if unsupported features are found in the obj or mtl file
* `encoding` (Default: `utf-8`) of the obj and mtl file(s)
* `create_materials` (Default: `False`) will create materials if mtl file is missing or obj file references non-existing materials
* `collect_faces` (Default: `False`) will collect triangle face data for every mesh. In case faces with more than three vertices are specified they will be triangulated. See the documentation of `ObjParser#consume_faces()` in [`obj.py`](https://github.com/pywavefront/PyWavefront/blob/master/pywavefront/obj.py).
* `parse` (Default: `True`) decides if parsing should start immediately.
* `cache` (Default: `False`) writes the parsed geometry to a binary file for faster loading in the future
```python
import pywavefront
scene = pywavefront.Wavefront('something.obj', strict=True, encoding="iso-8859-1", parse=False)
scene.parse() # Explicit call to parse() needed when parse=False
# Iterate vertex data collected in each material
for name, material in scene.materials.items():
# Contains the vertex format (string) such as "T2F_N3F_V3F"
# T2F, C3F, N3F and V3F may appear in this string
material.vertex_format
# Contains the vertex list of floats in the format described above
material.vertices
# Material properties
material.diffuse
material.ambient
material.texture
# ..
```
## Binary Cache
When ``cache=True`` the interleaved vertex data is written
as floats to a ``.bin`` file after the file is loaded. A json
file is also generated describing the contents of the binary file.
The binary file will be loaded the next time we attempt to load
the obj file reducing the loading time significantly.
Tests have shown loading time reduction by 10 to 100 times
depending on the size and structure of the original obj file.
Loading ``myfile.obj`` will generate the following files in the
same directory.
```txt
myfile.obj.bin
myfile.obj.json
```
Json file example:
```json
{
"created_at": "2018-07-16T14:28:43.451336",
"version": "0.1",
"materials": [
"lost_empire.mtl"
],
"vertex_buffers": [
{
"material": "Stone",
"vertex_format": "T2F_N3F_V3F",
"byte_offset": 0,
"byte_length": 5637888
},
{
"material": "Grass",
"vertex_format": "T2F_N3F_V3F",
"byte_offset": 5637888,
"byte_length": 6494208
}
]
}
```
These files will **not be recreated until you delete them**.
The bin file is also compressed with gzip to greatly reduce size.
## Visualization
[Pyglet](http://www.pyglet.org/) is required to use the visualization module.
```bash
pip install pyglet
```
Example:
```python
import pywavefront
from pywavefront import visualization
[create a window and set up your OpenGl context]
obj = pywavefront.Wavefront('something.obj')
[inside your drawing loop]
visualization.draw(obj)
```
## Logging
The default log level is `ERROR`. This is configurable including overriding the formatter.
```python
import logging
import pywavefront
pywavefront.configure_logging(
logging.DEBUG,
formatter=logging.Formatter('%(name)s-%(levelname)s: %(message)s')
)
```
### Examples
The [examples](https://github.com/pywavefront/PyWavefront/tree/master/examples)
directory contains some basic examples using the `visualization` module and further
instructions on how to run them.
### Generating a Wavefront file with Blender
The following presumes you are using [Blender](http://www.blender.org/) to generate your mesh:
* Using Blender, create a mesh with a UV-mapped texture. The UV-mapping is important!
If it is working properly, you will see the texture applied within Blender's 3d view.
* Export the mesh from Blender using the Wavefront format, including normals.
* Reference your `*.obj` file as in the pywavefront example above.
## Tests
All tests can be found in the `tests` directory. To run the tests:
```bash
# Install pywavefront in develop mode
python setup.py develop
# Install required packages for running tests
pip install -r test-requirements.txt
# Run all tests
pytest
# Optionally specific tests modules can be runned separately
pytest tests/test_parser.py
```
## Community
PyWavefront Discord server : https://discord.gg/h3Rh4QN
## Owners & Maintainers
* Einar Forselv ([@einarf](https://github.com/einarf)) - Main Contact
* Kurt Yoder ([@greenmoss](https://github.com/greenmoss/)) - Backup
## Contributors
In alphabetical order:
* [ComFreek](https://github.com/ComFreek)
* Daniel Coelho [1danielcoelho](https://github.com/1danielcoelho)
* [@dav92lee](https://github.com/dav92lee)
* Jerek Shoemaker ([intrepid94](https://github.com/intrepid94))
* [Marxlp](https://github.com/Marxlp)
* Mathieu Lamarre
* [Oliv4945](https://github.com/Oliv4945)
* Patrik Huber ([patrikhuber](https://github.com/patrikhuber))
* Sérgio Agostinho ([SergioRAgostinho](https://github.com/SergioRAgostinho))
* Zohar Jackson
* hkarrson ([hkarrson](https://github.com/hkarrson))
## Project History
PyWavefront was originally started by @greenmoss (Kurt Yoder) in 2013.
He was the sole maintainer of the project until February 2019 when
the PyWavefront Maintainers organization was created adding @einarf
(Einar Forselv) as an additional owner and maintainer of the project.
License
-------
PyWavefront is [BSD-licensed](https://github.com/pywavefront/PyWavefront/blob/master/LICENSE)
PyWavefront-1.3.3/ROADMAP.md 0000664 0000000 0000000 00000006130 13764321163 0015415 0 ustar 00root root 0000000 0000000
# PyWavefront 2.0
## Introduction
PyWavefront is used by projects and people from both data science and pure 3D
rendering. Providing visualisation capabilities also seems to be important for
a lot of users. There are ties to [pyglet](https://bitbucket.org/pyglet/pyglet/wiki/Home)
we probably should not break.
Currently the project mainly has 3D rendering in mind. We see that in the parser
were interlaved vertex data is genereted on the fly. This is not always what
users want and will need improvements. Collecting face data was also added
fairly recently but is limited to trinagles to make it consistent with the
rest of the library.
The plan is to revamp the project structure and making the parse result a lot more flexible supporting triangles and quads + other optimization. The goal is to make the library easier to use for data science as well as 3d rendering. Parsing should only
collect the actual data. We then provide methods for obtaining the data in
various ways after the parse is done.
Better resolve and locate textures referenced in materials. Right
now the `Texture` class is a bit of a mess because of almost a
decade of not breaking compatibility.
## Documentation
Write proper docs using either readthedocs or github pages.
A `docs` branch was started a while ago and we should revive that.
## Improved Visualization
Pyglet has changed a lot lately with then 1.4 release and a 2.0
release with shaders is in the works. We should definitley
upgrade the viewer to support basic shaders even if we only
stick with GL2.1.
Possibly also provide a 3.3+ viewer with pyglet. A ModernGL
alternative could also be nice.
Support proper window resizing and camera so people can inspect
their models. Maybe also expose things like fullscreen mode.
We must not forget this library is popular because of the simple
viewing capabilities.
## Introduce pywavefront Command
Bring PyWavefront to the command line making common operations easily
accessible.
```bash
# Renders the obj file
pywavefront show test.obj
# Cache management
pywavefront gen_cache test.obj
pywavefront del_cache test.obj
# .. possibly other commands
```
## Memory Management
TLDR; Use `numpy` to store internal data using 6 times less memory.
We are currently collecting and storing indices and postions using native
python types.
```py
>> import sys
>> data = [x for x in range(1000000)]
>> f"Array size: {(len(data) * sys.getsizeof(int())) // 1024 // 1024} MB")
Array size: 22.8876953125 MB
>> f"sizeof int: {sys.getsizeof(int())} bytes"
sizeof int: 24 bytes
>> f"sizeof float: {sys.getsizeof(float())} bytes"
sizeof float: 24 bytes
```
As we can see an `int` and `float` actually takes 24 bytes in python.
This is 6 times more than necessary
With `numpy` we can solve this entirely
```py
import numpy as np
data = np.arange(1_000_000)
f"Item size: {data.itemsize}"
Item size: 4
f"Array size: {len(data) * data.itemsize / 1024 / 1024} MB"
Array size: 3.814697265625 MB
```
An advantage is also that we can reshape the array without
allocating new memory.
PyWavefront-1.3.3/examples/ 0000775 0000000 0000000 00000000000 13764321163 0015626 5 ustar 00root root 0000000 0000000 PyWavefront-1.3.3/examples/README.md 0000664 0000000 0000000 00000001534 13764321163 0017110 0 ustar 00root root 0000000 0000000 # Examples
## Requirements
```bash
# Install pywavefront in dev mode if you dont have pywavefront installed
python setup.py develop
# Enter the examples directory and install requirements
cd examples
pip install -r requirements.txt
# Run an example
python.exe boxes.py
```
## Boxes
Loads and displays 6 different cubes of the folloing vertex formats:
* Only positions
* With normals
* With vertex color
* With texture coordinates
* With texture cooddinates and vertex color
* With texture coordinates and normals
```
python boxes.py
```
## Globe Simple
Renders a simple low poly globe with texture coordinates and basic lighting.
```
python globe_simple.py
```
## Globe Complex
Renders a simple globe (higher resolution) with texture coordinates and basic lighting.
```
python globe_complex.py
```
PyWavefront-1.3.3/examples/boxes.py 0000664 0000000 0000000 00000003672 13764321163 0017330 0 ustar 00root root 0000000 0000000 """
Demonstrates the different vertex formats supported.
Pyglet don't support all formats pywavefront can produce.
Supported by pyglet:
V3F
C3F_V3F
N3F_V3F
T2F_V3F
T2F_C3F_V3F
T2F_N3F_V3F
Additional formats:
C3F_N3F_V3F
T2F_C3F_N3F_V3F
"""
import ctypes
import os
from pyglet.gl import *
from pywavefront import visualization, Wavefront
window = pyglet.window.Window(width=1280, height=720, resizable=True)
root_path = os.path.dirname(__file__)
box1 = Wavefront(os.path.join(root_path, 'data/box/box-V3F.obj'))
box2 = Wavefront(os.path.join(root_path, 'data/box/box-C3F_V3F.obj'))
box3 = Wavefront(os.path.join(root_path, 'data/box/box-N3F_V3F.obj'))
box4 = Wavefront(os.path.join(root_path, 'data/box/box-T2F_V3F.obj'))
box5 = Wavefront(os.path.join(root_path, 'data/box/box-T2F_C3F_V3F.obj'))
box6 = Wavefront(os.path.join(root_path, 'data/box/box-T2F_N3F_V3F.obj'))
rotation = 0.0
lightfv = ctypes.c_float * 4
@window.event
def on_resize(width, height):
viewport_width, viewport_height = window.get_framebuffer_size()
glViewport(0, 0, viewport_width, viewport_height)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
gluPerspective(45., float(width)/height, 1., 100.)
glMatrixMode(GL_MODELVIEW)
return True
@window.event
def on_draw():
window.clear()
glLoadIdentity()
glLightfv(GL_LIGHT0, GL_POSITION, lightfv(-1.0, 1.0, 1.0, 0.0))
draw_box(box1, -4.0, 2.0)
draw_box(box2, 0.0, 2.0)
draw_box(box3, 4.0, 2.0)
draw_box(box4, -4.0, -2.0)
draw_box(box5, 0.0, -2.0)
draw_box(box6, 4.0, -2.0)
def draw_box(box, x, y):
glLoadIdentity()
glTranslated(x, y, -10.0)
glRotatef(rotation, 0.0, 1.0, 0.0)
glRotatef(-25.0, 1.0, 0.0, 0.0)
glRotatef(45.0, 0.0, 0.0, 1.0)
visualization.draw(box)
def update(dt):
global rotation
rotation += 90.0 * dt
if rotation > 720.0:
rotation = 0.0
pyglet.clock.schedule(update)
pyglet.app.run()
PyWavefront-1.3.3/examples/data/ 0000775 0000000 0000000 00000000000 13764321163 0016537 5 ustar 00root root 0000000 0000000 PyWavefront-1.3.3/examples/data/box/ 0000775 0000000 0000000 00000000000 13764321163 0017327 5 ustar 00root root 0000000 0000000 PyWavefront-1.3.3/examples/data/box/box-C3F_V3F.obj 0000664 0000000 0000000 00000000774 13764321163 0021652 0 ustar 00root root 0000000 0000000 # Blender v2.78 (sub 0) OBJ File: 'box.blend'
# www.blender.org
mtllib box.mtl
o Cube
v 1.000000 -1.000000 -1.000000 1.0 0.0 0.0
v 1.000000 -1.000000 1.000000 0.0 1.0 0.0
v -1.000000 -1.000000 1.000000 0.0 0.0 1.0
v -1.000000 -1.000000 -1.000000 1.0 1.0 0.0
v 1.000000 1.000000 -0.999999 1.0 0.0 1.0
v 0.999999 1.000000 1.000001 0.0 1.0 1.0
v -1.000000 1.000000 1.000000 1.0 1.0 1.0
v -1.000000 1.000000 -1.000000 0.0 0.0 0.0
usemtl Material
s off
f 1 2 3 4
f 5 8 7 6
f 1 5 6 2
f 2 6 7 3
f 3 7 8 4
f 5 1 4 8
PyWavefront-1.3.3/examples/data/box/box-N3F_V3F.obj 0000664 0000000 0000000 00000001173 13764321163 0021657 0 ustar 00root root 0000000 0000000 # Blender v2.78 (sub 0) OBJ File: 'box.blend'
# www.blender.org
mtllib box.mtl
o Cube
v 1.000000 -1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -0.999999
v 0.999999 1.000000 1.000001
v -1.000000 1.000000 1.000000
v -1.000000 1.000000 -1.000000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
vn 1.0000 0.0000 0.0000
vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000
vn 0.0000 0.0000 -1.0000
usemtl Material
s off
f 1//1 2//1 3//1 4//1
f 5//2 8//2 7//2 6//2
f 1//3 5//3 6//3 2//3
f 2//4 6//4 7//4 3//4
f 3//5 7//5 8//5 4//5
f 5//6 1//6 4//6 8//6
PyWavefront-1.3.3/examples/data/box/box-T2F_C3F_V3F.obj 0000664 0000000 0000000 00000001613 13764321163 0022316 0 ustar 00root root 0000000 0000000 # Blender v2.78 (sub 0) OBJ File: 'box.blend'
# www.blender.org
mtllib box.mtl
o Cube
v 1.000000 -1.000000 -1.000000 1.0 0.0 0.0
v 1.000000 -1.000000 1.000000 0.0 1.0 0.0
v -1.000000 -1.000000 1.000000 0.0 0.0 1.0
v -1.000000 -1.000000 -1.000000 1.0 1.0 0.0
v 1.000000 1.000000 -0.999999 1.0 0.0 1.0
v 0.999999 1.000000 1.000001 0.0 1.0 1.0
v -1.000000 1.000000 1.000000 1.0 1.0 1.0
v -1.000000 1.000000 -1.000000 0.0 0.0 0.0
vt 0.0000 0.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 0.0000 0.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 0.0000 0.0000
vt 1.0000 0.0000
vt 0.0000 1.0000
vt 0.0000 0.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 0.0000 1.0000
usemtl Material
s off
f 1/1 2/2 3/3 4/4
f 5/5 8/6 7/7 6/8
f 1/1 5/9 6/10 2/11
f 2/12 6/13 7/7 3/14
f 3/15 7/16 8/17 4/4
f 5/5 1/18 4/19 8/20
PyWavefront-1.3.3/examples/data/box/box-T2F_N3F_V3F.obj 0000664 0000000 0000000 00000001762 13764321163 0022336 0 ustar 00root root 0000000 0000000 # Blender v2.78 (sub 0) OBJ File: 'box.blend'
# www.blender.org
mtllib box.mtl
o Cube
v 1.000000 -1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -0.999999
v 0.999999 1.000000 1.000001
v -1.000000 1.000000 1.000000
v -1.000000 1.000000 -1.000000
vt 0.0000 0.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 0.0000 0.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 0.0000 0.0000
vt 1.0000 0.0000
vt 0.0000 1.0000
vt 0.0000 0.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 0.0000 1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
vn 1.0000 0.0000 0.0000
vn -0.0000 -0.0000 1.0000
vn -1.0000 -0.0000 -0.0000
vn 0.0000 0.0000 -1.0000
usemtl Material
s off
f 1/1/1 2/2/1 3/3/1 4/4/1
f 5/5/2 8/6/2 7/7/2 6/8/2
f 1/1/3 5/9/3 6/10/3 2/11/3
f 2/12/4 6/13/4 7/7/4 3/14/4
f 3/15/5 7/16/5 8/17/5 4/4/5
f 5/5/6 1/18/6 4/19/6 8/20/6
PyWavefront-1.3.3/examples/data/box/box-T2F_V3F.obj 0000664 0000000 0000000 00000001453 13764321163 0021665 0 ustar 00root root 0000000 0000000 # Blender v2.78 (sub 0) OBJ File: 'box.blend'
# www.blender.org
mtllib box.mtl
o Cube
v 1.000000 -1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -0.999999
v 0.999999 1.000000 1.000001
v -1.000000 1.000000 1.000000
v -1.000000 1.000000 -1.000000
vt 0.0000 0.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 0.0000 0.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 0.0000 0.0000
vt 1.0000 0.0000
vt 0.0000 1.0000
vt 0.0000 0.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 0.0000 1.0000
usemtl Material
s off
f 1/1 2/2 3/3 4/4
f 5/5 8/6 7/7 6/8
f 1/1 5/9 6/10 2/11
f 2/12 6/13 7/7 3/14
f 3/15 7/16 8/17 4/4
f 5/5 1/18 4/19 8/20
PyWavefront-1.3.3/examples/data/box/box-V3F.obj 0000664 0000000 0000000 00000000634 13764321163 0021212 0 ustar 00root root 0000000 0000000 # Blender v2.78 (sub 0) OBJ File: 'box.blend'
# www.blender.org
mtllib box.mtl
o Cube
v 1.000000 -1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -0.999999
v 0.999999 1.000000 1.000001
v -1.000000 1.000000 1.000000
v -1.000000 1.000000 -1.000000
usemtl Material
s off
f 1 2 3 4
f 5 8 7 6
f 1 5 6 2
f 2 6 7 3
f 3 7 8 4
f 5 1 4 8
PyWavefront-1.3.3/examples/data/box/box.mtl 0000664 0000000 0000000 00000000370 13764321163 0020635 0 ustar 00root root 0000000 0000000 # Blender MTL File: 'box.blend'
# Material Count: 1
newmtl Material
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd box.png
PyWavefront-1.3.3/examples/data/box/box.png 0000664 0000000 0000000 00000347707 13764321163 0020647 0 ustar 00root root 0000000 0000000 PNG
IHDR ?1 tIME
8N pHYs
B4 fIDATxt[w,u&k*pnRҌlg(~ZU_^eZ^#Mdwsp.@/oG-<
UYoo~Kdtv*j۞fuya~88OrTK.-?~TmiF>i/n+'~SmMk]ClBQ:ζ䓍v6l=|e}}Ӆ+ЖoJ0hRm]dͿ~amwdu|٩8mqMewON>?)W~tayٌ6/p&\߅R.ՖƔ(ƛ]S7O?$]$2k'b_an|?{ ~>Ʌ.˧5xq߅e1>ޟgmb~j.Cs5;4$>QK}w?}n-C>7Zd)}^^lS?f ZnG-):U3ptm*'+:狕O:8&k/??jO^_ojmL߱;PޟE^ތ_7cvz9Ǫ˫{&[&1/>_RIgƃI-&{[MiN*5W:M(xwtΦDڶLTbunQUM~'5>ZӃq{{?oys۶ʇG<״M`moz_FUs]6*3W:m"Zuy8Q_'ltV6MyZ]o<w}۷5UmpC/~^v5C/w|wm*s9w)J-\|}5vabSw'~3Oo7ۺȳf9b[9m=$^x5߾z{B}[ZT7UeޕmэM
;*,C4DZS?t]4v>os=Kav2eӤiZOyQ|rӰoX;Ua|;<@ԹOf6{ΔqR t*zjwi[fabaV
ݬj5dO?L_qӔݡ7CO"x_5t[ue$Uٴ]6}z`
@6l}Rg,i?^try<0,6Q4c>ksk~}鳡SsFַjALMj>[^Q
3?Za
\uЎH Yww,'f/3]S,el{]ԏmǼk0EfSKzMj_C:tNc(wmX&LnGC2-)M]Z`Ok8dFo4
e(<3B
痡.<`
.kgv<YhleVOp!-]uuXZMe(v[դN
b
pH}|ke*|y4j'z_]铢l;܍b^#}MU_z]]atfrwYX
070|v8f*ϧivf/?P