Hi, I am not a fan of pre-processors and scripts that are not pure python. I think that such an architecture is unnecessary in a dynamic language like python or javascript. Is it not possible to accomplish the abstractions without pre-proccessing or another layer of syntax above python?
On 12/22/10, julien blanchard <julien...@yahoo.fr> wrote: >>> Is there a mailing list I can join to stay informed on progress? > Unfortunately there's no mailing list for now for the project > >>> I can't find license information for the project > We intended to release the project under GPL V3, we have to think a little > more > about that... > > The scripting engine we developed doesn't require its own lexer/parser like > a > whole language. > It's using the Python's ones since a kind of simple preprocessor transform > the > script in plain python. > > In fact, the goal is to provide an abstraction layer over python that > - simplify writing / reading cad programs > - allow real time changes on graphical view > - allow cad object oriented conception (I see this opposed to "simple > temporal > sequence of basic operations") > - use classic python's features > >>> I'm more interested in the semantics you defined for >>> CAD data handling/creation/etc. > I'd really like to collaborate on this topic. That's clearly one next big > step > in the project and I imagined that as a high level API of pythonocc. We have > for > now simple "primitives" but we have to work on this topic > >>> many models are easily created using an extruded profile. The>> operation >>> >>>involves creating a 'sketch', which is a 2d set of closed >>> curves, and the sweeps it along anoher curve to create a solid. > > > Pycado relies on this scheme. For example to create a square pipe we can > write > > > # cs0 stands for default coordinate system > # group is a keyword "preprocessed" by pycado > group sqr_pipe(cs0, side, thick, length): > # rectangle has been defined in Pycado (not a primitive), creating a > "surface" > by joining "lines" > # rectangle owns two attributes width and length > rec_1 = rectangle(cs0, side, side) > > # create 2nd sqare in a new coordinate system (the inside square) > cs_sqr2 = coord_sys(cs0, TRANSLATE, vx*thick + vy*thick) > rec_2 = rectangle(cs_sqr2, side - 2*thick, side - 2*thick) > > # cut sqare 1 by square 2, giving a new surface (each square is already a > surface) > res = surface(CUT, rec_1.res, rec_2.res) > # just keeping visible this last surface > rec_1.res.hide() > rec_2.res.hide() > > # extrude section, giving a solid > res = solid(EXTRUSION, res, cs0.vz*length) > > All pycado objects already implement the same interface, and the idea beyond > pyquery seems close to our objectives, so, I will take a look. > > > > > ----- Message d'origine ---- > De : "pythonocc-users-requ...@gna.org" <pythonocc-users-requ...@gna.org> > À : pythonocc-users@gna.org > Envoyé le : Mer 22 décembre 2010, 16h 47min 20s > Objet : Pythonocc-users Digest, Vol 25, Issue 25 > > 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. Re : Anyone seen this? (Dave Cowden) (julien blanchard) > 2. Re: Re : Anyone seen this? (Dave Cowden) (Dave Cowden) > 3. Re: Re : Anyone seen this? (Dave Cowden) (???????) > 4. Re: Re : Anyone seen this? (Dave Cowden) (Thomas Paviot) > 5. Re: Re : Anyone seen this? (Dave Cowden) (Dave Cowden) > 6. Re: Re : Anyone seen this? (Dave Cowden) (Dave Cowden) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 22 Dec 2010 12:50:36 +0000 (GMT) > From: julien blanchard <julien...@yahoo.fr> > Subject: [Pythonocc-users] Re : Anyone seen this? (Dave Cowden) > To: pythonocc-users@gna.org > Message-ID: <89891.9670...@web27507.mail.ukl.yahoo.com> > Content-Type: text/plain; charset=utf-8 > > Hello, > > I have just read the thread of Dave Cowden and I think that a project we're > working on might interest someone. > > We have started the pycado > project http://julienbld.github.com/pycado/ which seems quite similar to > what > you're looking for and to http://openscad.org/. > It is based upon pythonocc and still in an early stage but it is working > whith a > > restricted number of features. > > You'll find more information into the web page and feel free to download > the sources and ask us anything about the project. > > We are now two developers and started the project on spring 2010 but we have > not > > been active for the last months due to lack of time. We would be > very insteresting in continuing the development with other people or to > merge > with a similar project. > > Julien Blanchard. > > > > > > > ------------------------------ > > Message: 2 > Date: Wed, 22 Dec 2010 08:11:41 -0500 > From: Dave Cowden <dave.cow...@gmail.com> > Subject: Re: [Pythonocc-users] Re : Anyone seen this? (Dave Cowden) > To: julien blanchard <julien...@yahoo.fr>, pythonocc-users@gna.org > Message-ID: > <aanlktikgzhfkqw4l0chaols=z5btypaj4iykywc75...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Hi, julien: > > Yep, this is right along the lines I was hoping for! Is there a > mailing list I can join to stay informed on progress? > > > > On 12/22/10, julien blanchard <julien...@yahoo.fr> wrote: >> Hello, >> >> I have just read the thread of Dave Cowden and I think that a project >> we're >> working on might interest someone. >> >> We have started the pycado >> project http://julienbld.github.com/pycado/ which seems quite similar to >> what >> you're looking for and to http://openscad.org/. >> It is based upon pythonocc and still in an early stage but it is working >> whith a >> restricted number of features. >> >> You'll find more information into the web page and feel free to download >> the sources and ask us anything about the project. >> >> We are now two developers and started the project on spring 2010 but we >> have >> not >> been active for the last months due to lack of time. We would be >> very insteresting in continuing the development with other people or to >> merge >> with a similar project. >> >> Julien Blanchard. >> >> >> >> > > -- > Sent from my mobile device > > > > ------------------------------ > > Message: 3 > Date: Wed, 22 Dec 2010 15:12:58 +0200 > From: ??????? <niki.spah...@gmail.com> > Subject: Re: [Pythonocc-users] Re : Anyone seen this? (Dave Cowden) > To: "pythonOCC users mailing list." <pythonocc-users@gna.org> > Message-ID: > <aanlktikmjyfckf-p4mdmthhwamr-zli9+mwhmm=0x...@mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > Very interesting concept. I can't find license information for the project. > > Niki > > > > ------------------------------ > > Message: 4 > Date: Wed, 22 Dec 2010 15:38:27 +0100 > From: Thomas Paviot <tpav...@gmail.com> > Subject: Re: [Pythonocc-users] Re : Anyone seen this? (Dave Cowden) > To: "pythonOCC users mailing list." <pythonocc-users@gna.org> > Message-ID: > <aanlktikqmuajg-vwu7m7r0i309vg6qyexo94kpbio...@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hello Julien, > > I was not aware of your project, although I try to stay up-to-date with > pythonocc related project. Internet is still a forest where google can get > lost. > > Your pycado is a really interesting project. I don't know exactly what are > your final objectives with it, but the beginnings seem promising. I will > test it as soon as possible. > > Your approach of developing a scripting engine can be classified in the > "Macro-Parametric solutions" category. As far as I understand your code, you > developed a kind of scripting language aiming at map the feature tree > available in most CAD softwares. That's indeed something we discussed here a > few days ago, and it looks like there is here a few fans of such a > technology. > > However, I'm still not convinced by this approach. In my opinion, developing > a scripting engine (with a parser, lexer etc.) with limited features on top > of a dynamic programming language like python is a kind of inconsistency. It > makes me think about something I'd call BASIC for CAD (I love BASIC, I > learnt programming with this language!-but it was a long time ago). > Furthermore, I do think that the modeling of 3D shapes is something much > more complex than a simple temporal sequence of basic operations (you might > call them "features"). Anyway, it's only my current opinion, and I could > fall in love with your project and change my mind. > > Whatever the technical solution you chose to perform CAD operations > (scripting or not), I'm more interested in the semantics you defined for CAD > data handling/creation/etc. At some point, it's a topic on which we could > collaborate (we've been here discussing the development of a high level API > for pythonOCC for a long time). > > Best Regards, > > Thomas > > 2010/12/22 julien blanchard <julien...@yahoo.fr> > >> Hello, >> >> I have just read the thread of Dave Cowden and I think that a project >> we're >> working on might interest someone. >> >> We have started the pycado >> project http://julienbld.github.com/pycado/ which seems quite similar to >> what >> you're looking for and to http://openscad.org/. >> It is based upon pythonocc and still in an early stage but it is working >> whith a >> restricted number of features. >> >> You'll find more information into the web page and feel free to download >> the sources and ask us anything about the project. >> >> We are now two developers and started the project on spring 2010 but we >> have not >> been active for the last months due to lack of time. We would be >> very insteresting in continuing the development with other people or to >> merge >> with a similar project. >> >> Julien Blanchard. >> >> >> >> >> _______________________________________________ >> Pythonocc-users mailing list >> Pythonocc-users@gna.org >> https://mail.gna.org/listinfo/pythonocc-users >> > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: </public/pythonocc-users/attachments/20101222/ee0bc295/attachment.htm> > > ------------------------------ > > Message: 5 > Date: Wed, 22 Dec 2010 10:21:15 -0500 > From: Dave Cowden <dave.cow...@gmail.com> > Subject: Re: [Pythonocc-users] Re : Anyone seen this? (Dave Cowden) > To: "pythonOCC users mailing list." <pythonocc-users@gna.org> > Message-ID: > <aanlktimwi9t1v0susmxenzo0x+bg1xak6qat4xfyg...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Yes, I agree with thomas on the idea of collaborating on basic constructs. > > I have an example that might be a good to illustrate. I have found > that many models are easily created using an extruded profile. The > operation involves creating a 'sketch', which is a 2d set of closed > curves, and the sweeps it along anoher curve to create a solid. > > This operation is of cousre possible diectly with occ, but it would > bee too much code. > > In this example, there are a few abstactions that are useful: the idea > of a sketch, its semantic relationship with the curve to create an > object. Basically, I would like to be able to relate these > abstractions one time and have the kernel rebuild the solid when they > change. > > A useful and important aspect of these abstractions is tha they should > encapsulate building behaviors, while exposing properties allowing > them to be parametricly modified. > > > > On 12/22/10, Thomas Paviot <tpav...@gmail.com> wrote: >> Hello Julien, >> >> I was not aware of your project, although I try to stay up-to-date with >> pythonocc related project. Internet is still a forest where google can get >> lost. >> >> Your pycado is a really interesting project. I don't know exactly what are >> your final objectives with it, but the beginnings seem promising. I will >> test it as soon as possible. >> >> Your approach of developing a scripting engine can be classified in the >> "Macro-Parametric solutions" category. As far as I understand your code, >> you >> developed a kind of scripting language aiming at map the feature tree >> available in most CAD softwares. That's indeed something we discussed here >> a >> few days ago, and it looks like there is here a few fans of such a >> technology. >> >> However, I'm still not convinced by this approach. In my opinion, >> developing >> a scripting engine (with a parser, lexer etc.) with limited features on >> top >> of a dynamic programming language like python is a kind of inconsistency. >> It >> makes me think about something I'd call BASIC for CAD (I love BASIC, I >> learnt programming with this language!-but it was a long time ago). >> Furthermore, I do think that the modeling of 3D shapes is something much >> more complex than a simple temporal sequence of basic operations (you >> might >> call them "features"). Anyway, it's only my current opinion, and I could >> fall in love with your project and change my mind. >> >> Whatever the technical solution you chose to perform CAD operations >> (scripting or not), I'm more interested in the semantics you defined for >> CAD >> data handling/creation/etc. At some point, it's a topic on which we could >> collaborate (we've been here discussing the development of a high level >> API >> for pythonOCC for a long time). >> >> Best Regards, >> >> Thomas >> >> 2010/12/22 julien blanchard <julien...@yahoo.fr> >> >>> Hello, >>> >>> I have just read the thread of Dave Cowden and I think that a project >>> we're >>> working on might interest someone. >>> >>> We have started the pycado >>> project http://julienbld.github.com/pycado/ which seems quite similar to >>> what >>> you're looking for and to http://openscad.org/. >>> It is based upon pythonocc and still in an early stage but it is working >>> whith a >>> restricted number of features. >>> >>> You'll find more information into the web page and feel free to download >>> the sources and ask us anything about the project. >>> >>> We are now two developers and started the project on spring 2010 but we >>> have not >>> been active for the last months due to lack of time. We would be >>> very insteresting in continuing the development with other people or to >>> merge >>> with a similar project. >>> >>> Julien Blanchard. >>> >>> >>> >>> >>> _______________________________________________ >>> Pythonocc-users mailing list >>> Pythonocc-users@gna.org >>> https://mail.gna.org/listinfo/pythonocc-users >>> >> > > -- > Sent from my mobile device > > > > ------------------------------ > > Message: 6 > Date: Wed, 22 Dec 2010 10:47:10 -0500 > From: Dave Cowden <dave.cow...@gmail.com> > Subject: Re: [Pythonocc-users] Re : Anyone seen this? (Dave Cowden) > To: "pythonOCC users mailing list." <pythonocc-users@gna.org> > Message-ID: > <aanlktim6n1stpccspkxcrgm7k8ayh_qk=bdsupatf...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Is anyone here familiar with jquery? > > Jquery is a javascript api that makes web dev much easier. There is a > python equivalent: pyquery I think. > > The reason I mention it here is, it might be a useful way to construct > a cad api in a way that allows much flexibility while preserving 3gl > capability and dynamic features > > In essence, the basic idea with jquery is that there is a basic object > interface that has a number of common properties and behaviors. Most > of the time the jquery object composes anothe core object, like a dom > node. > > The power comes from the idea that most behviors of a jquery object > return other jquery objects rather than primatives, so it is possoible > to create extremely compact but expressive scripts. > > Here is an example of how such an api might look when translated to cad > terms: > > c = $(Circle(...)) > Cv = $(curve(...)) > > (Note these are wrappers, not the underlying circle and curve > objects-- the $ function creates and returns the adapter, and by > convention all behaviors also return adapters ) > > c.moveTostart(cv).extrude(cv).translate(1,2,3).rotate(90).eachFace ( { > Do some processing here > }) > > The idea is that the wrapper objects returned by each operation allow > chaining in this way, and provide adapters to common functions so that > things like translate always work. Note that the wrapper provides > iteration over relevant collections so that anonymous functions can be > used to make looping code easier. This is how the api gets rid of the > horrible repetitve topexp looping code. > > > It is possible of course to do more detailed stuff by getting the > object the wrapper points to. This is normally done with a getObject > or similar method. > > I really like this style of api, because there is much flexibility in > the composition. > > > On 12/22/10, Thomas Paviot <tpav...@gmail.com> wrote: >> Hello Julien, >> >> I was not aware of your project, although I try to stay up-to-date with >> pythonocc related project. Internet is still a forest where google can get >> lost. >> >> Your pycado is a really interesting project. I don't know exactly what are >> your final objectives with it, but the beginnings seem promising. I will >> test it as soon as possible. >> >> Your approach of developing a scripting engine can be classified in the >> "Macro-Parametric solutions" category. As far as I understand your code, >> you >> developed a kind of scripting language aiming at map the feature tree >> available in most CAD softwares. That's indeed something we discussed here >> a >> few days ago, and it looks like there is here a few fans of such a >> technology. >> >> However, I'm still not convinced by this approach. In my opinion, >> developing >> a scripting engine (with a parser, lexer etc.) with limited features on >> top >> of a dynamic programming language like python is a kind of inconsistency. >> It >> makes me think about something I'd call BASIC for CAD (I love BASIC, I >> learnt programming with this language!-but it was a long time ago). >> Furthermore, I do think that the modeling of 3D shapes is something much >> more complex than a simple temporal sequence of basic operations (you >> might >> call them "features"). Anyway, it's only my current opinion, and I could >> fall in love with your project and change my mind. >> >> Whatever the technical solution you chose to perform CAD operations >> (scripting or not), I'm more interested in the semantics you defined for >> CAD >> data handling/creation/etc. At some point, it's a topic on which we could >> collaborate (we've been here discussing the development of a high level >> API >> for pythonOCC for a long time). >> >> Best Regards, >> >> Thomas >> >> 2010/12/22 julien blanchard <julien...@yahoo.fr> >> >>> Hello, >>> >>> I have just read the thread of Dave Cowden and I think that a project >>> we're >>> working on might interest someone. >>> >>> We have started the pycado >>> project http://julienbld.github.com/pycado/ which seems quite similar to >>> what >>> you're looking for and to http://openscad.org/. >>> It is based upon pythonocc and still in an early stage but it is working >>> whith a >>> restricted number of features. >>> >>> You'll find more information into the web page and feel free to download >>> the sources and ask us anything about the project. >>> >>> We are now two developers and started the project on spring 2010 but we >>> have not >>> been active for the last months due to lack of time. We would be >>> very insteresting in continuing the development with other people or to >>> merge >>> with a similar project. >>> >>> Julien Blanchard. >>> >>> >>> >>> >>> _______________________________________________ >>> Pythonocc-users mailing list >>> Pythonocc-users@gna.org >>> https://mail.gna.org/listinfo/pythonocc-users >>> >> > > -- > Sent from my mobile device > > > > ------------------------------ > > _______________________________________________ > Pythonocc-users mailing list > Pythonocc-users@gna.org > https://mail.gna.org/listinfo/pythonocc-users > > > End of Pythonocc-users Digest, Vol 25, Issue 25 > *********************************************** > > > > > > _______________________________________________ > Pythonocc-users mailing list > Pythonocc-users@gna.org > https://mail.gna.org/listinfo/pythonocc-users > -- Sent from my mobile device _______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users