Update docs

This commit is contained in:
Runar Tenfjord 2012-11-24 21:06:49 +01:00
parent 7d7197d392
commit 0f1c1ca7d9
10 changed files with 58 additions and 22 deletions

View file

@ -55,7 +55,6 @@ clean:
-rm $(LIB)
-rm -rf build dist
-rm -rf occmodel/@docs/build
-rm -rf occmodel/@docs/html
-rm MANIFEST occmodel/@src/Config.pxi
-rm occmodel.so occmodel/occmodel.cpp
-rm occmodelviewer.so occmodel/occmodelviewer.c

View file

@ -40,6 +40,9 @@ on the OCE_ project site. The python 2.7 module is linked against
'OCE-0.10.0-Win-MSVC2008.zip' and the python 3.3 module is
linked against 'OCE-0.10.0-Win-MSVC2010.zip'.
For Linux build scripts are available for ArchLinux in the AUR_
repository. These could be adapted to other Linux distros.
Documentation
=============
@ -53,4 +56,6 @@ See online Sphinx docs_
.. _pypi: http://pypi.python.org/pypi/occmodel
.. _OCE: https://github.com/tpaviot/oce/downloads
.. _OCE: https://github.com/tpaviot/oce/downloads
.. _AUR: https://aur.archlinux.org/packages/?O=0&K=occmodel

View file

@ -2,12 +2,15 @@ Introduction
============
Examples are available by executing the demo
function.
script.
.. code-block:: python
from occmodeldemo import demo
demo()
::
# windows
C:\Python2.7\Scripts\occmodeldemo.py
# linux
occmodeldemo.py
.. figure:: images/demo_window.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

View file

@ -1,7 +1,5 @@
occmodel documentation
======================
**Overview**
Overview
========
occmodel is a small self-contained library which gives a
high level access to the OpenCASCADE modelling kernel.
@ -20,6 +18,32 @@ Most of the code have been adapted from the freecad project (GPL 2).
The license is GPL v2.
Building
========
* Python 2.7/3.x and Cython 0.17 or later.
* A working installation of OpenCASCADE (OCE prefered)
* The geotools_ library.
* The optional viewer and demo needs the gltools_ library.
Note that currently I can not find a way to install the required
Cython 'pxd' files with distutils and this file has to be copied
manually.
On the Windows platform installers are available on the
pypi_ web site. It is possible to build the module from source
with the help of the express edition of Visual Studio, but the
process is rather involved compared to Linux.
To complete the windows installation the OpenCASCADE dll's must be
installed and placed in the system path. Prebuilt binaries are available
on the OCE_ project site. The python 2.7 module is linked against
'OCE-0.10.0-Win-MSVC2008.zip' and the python 3.3 module is
linked against 'OCE-0.10.0-Win-MSVC2010.zip'.
For Linux build scripts are available for ArchLinux in the AUR_
repository. These could be adapted to other Linux distros.
Examples
========
@ -41,4 +65,14 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
* :ref:`search`
.. _geotools: http://github.com/tenko/geotools
.. _gltools: https://github.com/tenko/gltools
.. _pypi: http://pypi.python.org/pypi/occmodel
.. _OCE: https://github.com/tpaviot/oce/downloads
.. _AUR: https://aur.archlinux.org/packages/?O=0&K=occmodel

View file

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
#cython: embedsignature=True
from __future__ import print_function
import sys
import math
@ -1126,13 +1127,4 @@ def viewer(objs, colors = None, interactive = False, logger = sys.stderr):
inputHookManager.enable(mw)
return mw
else:
mw.mainLoop()
if __name__ == '__main__':
#e1 = occ.Edge().createCircle(center=(0.,0.,0.),normal=(0.,0.,-1.),radius = .5)
#f1 = occ.Face().createConstrained(e1, ((0.,.0,-.5),))
w1 = occ.Wire().createRectangle(width = 1., height = 1., radius = 0.)
e1 = occ.Edge().createCircle(center=(0.,0.,0.),normal=(0.,0.,1.),radius = .25)
face = occ.Face().createFace((w1, e1))
viewer((face,))
mw.mainLoop()

View file

@ -116,6 +116,9 @@ This viewer is utilizing modern OpenGL methods like GLSL
shaders and vertex buffers to ensure visual quality and
maximum speed. To use the viewer OpenGL version 2.1 is
needed.
In order to complete the installation OpenCASCADE must be installed
on the system. Check the home page or the README file for details.
''',
classifiers = [value for value in classifiers.split("\n") if value],
author='Runar Tenfjord',