On 2010/5/20 John Griessen wrote:
> I noticed my ipython-and-leo-editor session segfaulted right away when I added
> /usr/lib/python2.5/site-packages/OCC
> to the PYTHONPATH env variable.
>
> So I just stopped using leo and made a vim file, test_paf.py, like below:
> -----------------------------
> from OCC.PAF.Context import ParametricModelingContext
> from OCC.PAF.Parametric import Parameters
> p = Parameters()
> tutorial_context = ParametricModelingContext(p)
> tutorial_context.init_display()
>
> p.height = 33.3
>
> p.radius = 22.9
>
> tutorial_context.register_operations(tutorial_context.prim_operations)
> my_cylinder = 
> tutorial_context.prim_operations.MakeCylinderRH(p.radius,p.height,name="cylinder1",
>  show=True)
> -------------------------
>
> Now, when I do:
> python2.5 test_paf.py
> I get:
>
> $ /usr/bin/python2.5 test_paf.py
> The Relation class needs the sympy library. Please check 
> http://code.google.com/p/sympy/

Install the python-sympy Debian package

> could not find the resource:a148e300-5740-11d1-a904-080036aaa103.Location

No idea about this one.

> MSG:/backups-650mb/pythonocc-read-only/src/contrib/GEOM/src/GEOMImpl/GEOMImpl_IShapesOperations.cpp
>  [142] :
> GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations
>
> [PAF] all operations registered
> [PAF] ParametricModelingContext initialized
> Traceback (most recent call last):
>   File "test_paf.py", line 6, in <module>
>     tutorial_context.init_display()
> AttributeError: 'ParametricModelingContext' object has no attribute 
> 'init_display'
>
>
> Some things are there. init_display cant be found.

Right, this method does not exist, but this is because you made some
errors, test_box.py contains:
  from OCC.Display.SimpleGui import init_display
  display, start_display, add_menu, add_function_to_menu = init_display()
It works fine here, maybe you could first try to run
  python test_box.py

Denis

_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to