On 14 July 2010 06:00, <pythonocc-users-requ...@gna.org> wrote: > Send Pythonocc-users mailing list submissions to > pythonocc-users@gna.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.gna.org/listinfo/pythonocc-users > or, via email, send a message with subject or body 'help' to > pythonocc-users-requ...@gna.org > > You can reach the person managing the list at > pythonocc-users-ow...@gna.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Pythonocc-users digest..." > > > Today's Topics: > > 1. usage of OCC.PAF.Context.curve_operations.MakePolyline (Free Cad) > 2. Re: python-occ GUI segmentation faults on intel graphic cards > (Oliver Borm) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 13 Jul 2010 14:13:31 +0000 (GMT) > From: Free Cad <free...@ymail.com> > Subject: [Pythonocc-users] usage of > OCC.PAF.Context.curve_operations.MakePolyline > To: pythonocc-users@gna.org > Message-ID: <524203.82953...@web29205.mail.ird.yahoo.com> > Content-Type: text/plain; charset=iso-8859-1 > > What are the arguments to call > OCC.PAF.Context.curve_operations.MakePolyline? > Please have a look at the example at the end of this message. The call > 'my_context.curve_operations.MakePolyline([my_pnt1,my_pnt2])' throws the > following error message: > > > got *args: (<OCC.PAF.Context.curve_operations object at 0x1770610>, > > [<OCC.SGEOM.Handle_GEOM_Object; proxy of <Swig Object of type > >'Handle_GEOM_Object *' at > > > > 0x2000cac8> >, <OCC.SGEOM.Handle_GEOM_Object; proxy of <Swig Object of > type > > 'Handle_GEOM_Object *' at 0x2000ce88> >]) > > modified args: ([<OCC.SGEOM.Handle_GEOM_Object; proxy of <Swig Object of > type > > 'Handle_GEOM_Object *' at 0x2000cac8> >, <OCC.SGEOM.Handle_GEOM_Object; > proxy > >of <Swig > > > > Object of type 'Handle_GEOM_Object *' at 0x2000ce88> >],) > > got **kwargs: {} > > How do I create a polyline or other curves given a list of points? > > Thank you > Bj?rn > > ---- begin example ---- > from OCC.PAF.Context import ParametricModelingContext > from OCC.PAF.Parametric import Parameters > > p = Parameters() # Create a parameters set > my_context = ParametricModelingContext(p) # Create and initialize a > parametric context > > my_context.init_display() # start display# > my_context.register_operations(my_context.basic_operations, > my_context.prim_operations, > my_context.curve_operations,my_context.local_operations) > > p.X1, p.Y1, p.Z1, p.X2, p.Y2, p.Z2, p.RADIUS = > 12,70,12,30,30,30,4 # Create 7 parameters > > my_pnt1 = my_context.basic_operations.MakePointXYZ(p.X1,p.Y1,p.Z1, > name="Pnt1", > show=False) > my_pnt2 = my_context.basic_operations.MakePointXYZ(p.X2,p.Y2,p.Z2, > name="Pnt2", > show=False) > my_poly=my_context.curve_operations.MakePolyline([my_pnt1,my_pnt2]) > ---- end of example ---- > > > > > > > > ------------------------------ > > Message: 2 > Date: Tue, 13 Jul 2010 20:42:08 +0200 > From: Oliver Borm <oli.b...@web.de> > Subject: Re: [Pythonocc-users] python-occ GUI segmentation faults on > intel graphic cards > To: "pythonOCC users mailing list." <pythonocc-users@gna.org> > Message-ID: <4c3cb380.7050...@web.de> > Content-Type: text/plain; charset="utf-8" > > Hello Marcos, > > and you got the python-occ GUI working from that svn compilation, when > you restart the X-Server before every use? >
Well I tried your supposed solution, but I have had no success. To which > "hello.py" script are you referring in your description? If I want to > start the python-occ GUI in console mode I come to the following error: > > Error: couldn't connect to X Server > > Which is absolutely clear, because no X-Server is running. And if I > neglect this magic "hello.py" I just end up in restarting the X-Server > and that also solves not my problem. Maybe you have some more > information for me ... ? > > I tested the python-occ also on the same laptop with the Intel graphic > card but with a gentoo Linux installation, and it just worked. So I > suppose it is just a very specific ubuntu (10.04) problem, which may be > solved with the right setting. > > Thanks, > Oliver > Hi Oliver, I will explain you what I have done: 1. I Installed the Ubuntu package that you contribute to python-occ. 2. I got the "segmentation fault". 3. I deactivated the graphic acceleration. 4. I ran the HelloWorld.py example and works. Because of necessary deactivation of graphic acceleration, I compilate python-occ from svn (including mesh and geom modules). Previously I installed Salome and works with out graphic problem (open-cascade of course was installed from Ubuntu10.04 packages) So, because of Salome installation I redefine the CASROOT to opencascade libs in to Salome installation folder. I would like to contribute with python-occ and Ubuntu users developing an Ubuntu package in the native platform. And said good bye to segmentation fault. I will appreciate if you would like to help me to do so. ¿Did you develop the python-occ package in native Ubuntu 10.04 environment or from virtual machine running over different native environment? Best regards, Marcos.
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users