Thanks much for your answer!
I don 't manage to pass the vertex_list  to the display.DisplayShape, I get
following error message ( I gave a look in the OCCViewer.py and AIS.py but
since I am new in Python I couldn t solve the prob )

ERROR:
Traceback (most recent call last):
  File "D:\DATA_PYTHON_D\PYTHONOCC\mon_test_5.py", line 102, in montest
    display.DisplayShape( liste , update=True )
  File "C:\Python26\lib\site-packages\OCC\Display\OCCViewer.py", line 313,
in DisplayShape
    shape_to_display = OCC.AIS.AIS_Shape(shape)
  File "C:\Python26\lib\site-packages\OCC\AIS.py", line 6192, in __init__
    _AIS.AIS_Shape_swiginit(self,_AIS.new_AIS_Shape(*args))
TypeError: in method 'new_AIS_Shape', argument 1 of type 'TopoDS_Shape const
&'
-------

I tried 2 codes as follows :
-------------
CODE1 :
        pt = gp_Pnt ( coord_x, coord_y, coord_z )
        pt_brep = BRepBuilderAPI_MakeVertex ( pt )
        liste.append ( pt_brep )

    display.DisplayShape( liste , update=False)

CODE 2:
        pt = gp_Pnt ( coord_x, coord_y, coord_z )
        vertx = OCC.BRepBuilderAPI.BRepBuilderAPI_MakeVertex(pt)
        aisShape = OCC.AIS.AIS_Shape(vertx.Vertex())
        liste.append ( aisShape )

    display.DisplayShape( liste , update=False )
---------------

I' m running PythonOCC 0.4 on win XP with the included OpenCASCADE / Python
2.6

Thanks for any hint!
Francois

-------------------------------------------------------------------------------
On Mon, Dec 13, 2010 at 6:42 PM, jelle feringa <jelleferi...@gmail.com>wrote:

> Hi,
>
> You are updating the viewer for each vertex, which is catastrophic for
> performance.
> First build your vertices and give the list as an argument to
> display.DisplayShape( your_vertex_list_here ).
> That should help.
>
> -jelle
>
>   On Mon, Dec 13, 2010 at 5:13 PM, Henry Bonette 
> <freeminde...@gmail.com>wrote:
>
>>   Hello the community,
>>
>> I am new here and started a project, whose purpose is first to deal with a
>> cloud of points.
>> 100 000 points at least is quite usual for measuring systems.
>> Also the points should be selectable (even if it is only in a defined or
>> selected area).
>>
>> Using following code, the performances in the viewer like usual
>> ROTATE/ZOOM/PAN are far from being acceptable, even with 20 000 points.
>> I am wondering if it is due to the BREP representation I used here ?
>>
>> So my question is :
>> Do I need this Brep fonction to have selectable points ?
>> Is there any way to have acceptable ROTATE ZOOM PAN for large points model
>> ?
>> ( Note I read I can pass a the list of points "liste" in the
>> display.DisplayShape(...) but I didn t found out how ... but this will fast
>> up the first display I guess, not ROTATE ZOOM PAN)
>>
>> Thanks for any help
>> Francois
>>
>> --------------------------
>>
>> CODE:
>> ...
>> pt = gp_Pnt ( coord_x, coord_y, coord_z )
>> liste.append ( pt )
>>
>> for ppi in liste :
>>    display.DisplayShape( BRepBuilderAPI_MakeVertex (ppi).Shape(),
>> update=False )
>>
>> display.FitAll ( )
>> ...
>> ---------------------------
>>
>> _______________________________________________
>> Pythonocc-users mailing list
>> Pythonocc-users@gna.org
>> https://mail.gna.org/listinfo/pythonocc-users
>>
>>
>
> _______________________________________________
> Pythonocc-users mailing list
> Pythonocc-users@gna.org
> https://mail.gna.org/listinfo/pythonocc-users
>
>
_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to