pythoncad-developer Mailing List for PythonCAD (Page 14)
CAD Application entire developed in Python
Status: Beta
Brought to you by:
matteoboscolo
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
|
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(30) |
Feb
(65) |
Mar
(32) |
Apr
(42) |
May
(32) |
Jun
(18) |
Jul
(4) |
Aug
(30) |
Sep
(31) |
Oct
(28) |
Nov
(4) |
Dec
(40) |
2011 |
Jan
(18) |
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
(4) |
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
(7) |
Feb
(3) |
Mar
|
Apr
(3) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Yagnesh D. <yn...@gm...> - 2010-02-08 10:01:43
|
R37 is Ok But we must do some debug of current R37 so that people can install, try it and at least have feeling that "PythonCAD does works" As we will not be releasing soon something based on latest concept. Also we have now moved back from alpha to planning. - - - - - Best regards Yagnesh Desai Save a tree...please don't print this e-mail. |
From: Matteo B. <mat...@bo...> - 2010-02-07 17:30:47
|
hi Gertwin, > The user can do undo steps in the current revision but not touch > anything in any older revision, older revisions are "read only" > We need to think very carefully about the implementation. may be a line could be in revision 1 released the new version need to change the line of 10 mm , so we have to take care of the old version and create a new version of the some line. so 2 record are ready for this entity This is an example of a line story .. step 1: create a new entity 01 - Line - 10,10,10,100 - 1 - Active step 2: release the version 1 of the drawing 01 - Line - 10,10,10,100 - 1 - Released step 3: Create a new version of the drawing (Version 2) and mark as old_Released the old version of the line 01 - Line - 10,10,10,100 - 1 - Old_Released 02 - Line - 10,10,10,110 - 2 - Active Regards, Matteo |
From: Matteo B. <mat...@bo...> - 2010-02-07 17:17:48
|
I agree with Gertwing R37 is the last release .. Regards, Matgeo On Sun, 2010-02-07 at 15:39 +0000, ger...@gm... wrote: > I think that will be R37, in R38 we have already started a > restructuring. > R37 is the last release version of the "original" PythonCAD. > > Regards, > Gertwin > > > Op schreef Yagnesh Desai <yn...@gm...>: > > Friends; > > > > > > > > Going forward since we will be changing most of the > > > > codes. I suggest as a milestone we must always host > > > > the working code of PythonCAD R38 (Debugged). > > > > > > > > This will very well honour the efforts made by Art Hass and > > > > his team. > > > > > > > > -- > > > > Best regards > > > > > > > > Yagnesh Desai > > > > > > > > Save a tree...please don't print this e-mail. > > > > > > > > > ------------------------------------------------------------------------------ > > > > The Planet: dedicated and managed hosting, cloud storage, colocation > > > > Stay online with enterprise data centers and the best network in the > business > > > > Choose flexible plans and management services without long-term > contracts > > > > Personal 24x7 support from experience hosting pros just a phone call > away. > > > > http://p.sf.net/sfu/theplanet-com > > > > _______________________________________________ > > > > Pythoncad-developer mailing list > > > > Pyt...@li... > > > > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer > > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ Pythoncad-developer mailing list Pyt...@li... https://lists.sourceforge.net/lists/listinfo/pythoncad-developer |
From: <ger...@gm...> - 2010-02-07 16:10:36
|
I like this idea of revisions. The user can do undo steps in the current revision but not touch anything in any older revision, older revisions are "read only" We need to think very carefully about the implementation. I will start to write the use cases for "undo", "redo" and "show revision". I will send you the links to these pages so anyone can add remarks and additions. After that we can create the additional fields for the database tables from the use cases. Regards, Gertwin Op schreef Matteo Boscolo <mat...@bo...>: > You are right Yagnesh, > Even if we think of a pdm integration ... or erp .. this will help us > too mutch. > we can provide 3 additional column at the entity table: > date*revision*state > date : > could have null or a date > if null we can delete the entity > if date have a value we can not delete (it's versionade) > revision: > a number that indicate the revision > could be a str field in case the user use letter insted of nuber for > revision > starte: > Indicate the state of the entity released/undo_mark/... all we whant > in case the date field is not null the state is released > what do you think ? > Regards > Matteo > On Sun, 2010-02-07 at 08:04 +0530, Yagnesh Desai wrote: > > Gertwin; > > > > I like the Idea. I think providing the facility of how drawing looked > > on a particular date is helpful, if we are able to tag that > > particular state of drawing as Major "Revision" then it would > > be very helpful. > > > > All engineers use drawings as Rev 0, Rev 1, Rev 2 etc. All > > the intermediate states are not that important. > > > > That is I can roll back to older "sensible" version and not > > the draft version of it. > > > > - - - - - - > > Best regards > > Yagnesh Desai > > Save a tree...please don't print this e-mail. > > > > > > On Sat, Feb 6, 2010 at 11:51 PM, ger...@gm...> wrote: > > > Hi All, > > > > > > I was thinking about implementing undo functionality in combination > with the > > > database. > > > I am not aware how this is solved in the current version but with a > database > > > we can make the undo recording persistent (you can undo changes from a > > > previous drawing session). > > > > > > The idea is not to modify entities in the database but mark the old > entity > > > state as deleted and insert a new record for the modified entity > state. > > > Then there are two records in the database, one is the previous state > and > > > one is the the current state of the entity. > > > Of course the entities that are marked as deleted (previous state) > are not > > > drawn. > > > > > > When the user does undo the current state is marked as deleted and the > > > previous state is marked as not deleted. > > > A redo does this marking in the opposite direction. > > > > > > If we add a column "state" and a column "undo_mark" to our entity > table we > > > can achieve this. > > > The column "state" holds the delete (or not) state. > > > The column "undo_mark" holds the value of the undo id. > > > Because the user can modify many entities at once all those entities > get the > > > same "undo_mark". > > > > > > This way the history of the drawing is kept in the database and the > user can > > > undo and redo actions from previous sessions. > > > If we also add a time stamp we even can provide functionality that > will show > > > how the drawing looked at a certain date. > > > > > > I think this functionality can have some use and is something other > CAD > > > programs does not always provide. > > > Undo and redo are simple database queries that are easy to implement. > > > We must keep the display list in sync with the state of the database > but I > > > think this also it not difficult. > > > > > > We also need a function that compresses the drawing by removing the > history. > > > > > > If it needs clarification, let me know I will try to explain. > > > > > > Do you think it is useful? > > > > > > Regards, > > > Gertwin > > > > ------------------------------------------------------------------------------ > > > The Planet: dedicated and managed hosting, cloud storage, colocation > > > Stay online with enterprise data centers and the best network in the > > > business > > > Choose flexible plans and management services without long-term > contracts > > > Personal 24x7 support from experience hosting pros just a phone call > away. > > > http://p.sf.net/sfu/theplanet-com > > > _______________________________________________ > > > Pythoncad-developer mailing list > > > Pyt...@li... > > > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer > > > > > > > > > > > ------------------------------------------------------------------------------ > > The Planet: dedicated and managed hosting, cloud storage, colocation > > Stay online with enterprise data centers and the best network in the > business > > Choose flexible plans and management services without long-term > contracts > > Personal 24x7 support from experience hosting pros just a phone call > away. > > http://p.sf.net/sfu/theplanet-com > > _______________________________________________ > > Pythoncad-developer mailing list > > Pyt...@li... > > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer > > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Pythoncad-developer mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer |
From: <ger...@gm...> - 2010-02-07 15:58:19
|
OK, I see what a balloon is. We can implement this as a block that contains a attribute variable. I agree with you that we first do brainstorming about what entities to support and later decide how to implement these entities. Yes please add a page to the wiki with all entities. Maybe it is useful to create a link for each entity to its own page. On that page we can describe this entity (functionality, how it is implemented, etc.). This can also act as documentation for new developers. Regards, Gertwin Op schreef Matteo Boscolo <mat...@bo...>: > > 11) Is Polygon/Rectangle needed, this is a special form of a polyline. > > There must be a tool for the user to create it. > > Internal it is a (closed) polyline. > ok but tu store this like polilyne we will have some trouble during > filler or trim operation > so will be better to have four Segment instead > > 13) + 14) + 15) + 16) These are all the same. > > A symbol itself is a entity. > > A Marker, Arrow, section symbol and a Welding symbol are two instances > > of the same symbol entity. > > We need symbol definitions that defines how the symbol looks like. > > And we need symbol references that is a instance of the symbol > > definition. > > > > 18) Is layer an entity? > > I thought it is more a entity attribute. > > A layer itself has no visible representation. > > 19) Is Label not the same as text? > > What is the difference? > For my point of view label is a text with an arrow > > 20) What is a Ballon? > Ballon is a number of letter inside a circle or a square with an arrow > attached that indicate the position of the ballon > it's used for mark a group/block > 21) titleblok > 22) part list > this two culd be a block rapresentation > > > > I think we should keep the list of entities as short as possible. > this is right, > what I want to do with this list is to define all the entity that we > want to support in pythoncad and find for each of it the right > rappresentation. > It'like a brain storming to do not miss any entity and have the right > solution for pythoncad. > so as i suggest in the starting mail, > Those are the step to go on with new kernel implementation: > 1) get a list of all the entity that we need in pythoncad > 2) describe it with a schema like you have done in this e-mail > 3) describe how any entity will be described in the database > 4) start create the kernel with the database > 5) start convert pythoncad for the new kernel > may be is better to create in the wiki all the entity that we will be > support . > Any Comment ? > Regards, > Matteo |
From: <ger...@gm...> - 2010-02-07 15:40:04
|
I think that will be R37, in R38 we have already started a restructuring. R37 is the last release version of the "original" PythonCAD. Regards, Gertwin Op schreef Yagnesh Desai <yn...@gm...>: > Friends; > Going forward since we will be changing most of the > codes. I suggest as a milestone we must always host > the working code of PythonCAD R38 (Debugged). > This will very well honour the efforts made by Art Hass and > his team. > -- > Best regards > Yagnesh Desai > Save a tree...please don't print this e-mail. > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Pythoncad-developer mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer |
From: Yagnesh D. <yn...@gm...> - 2010-02-07 11:05:09
|
Friends; Going forward since we will be changing most of the codes. I suggest as a milestone we must always host the working code of PythonCAD R38 (Debugged). This will very well honour the efforts made by Art Hass and his team. -- Best regards Yagnesh Desai Save a tree...please don't print this e-mail. |
From: Matteo B. <mat...@bo...> - 2010-02-07 08:50:52
|
> 11) Is Polygon/Rectangle needed, this is a special form of a polyline. > There must be a tool for the user to create it. > Internal it is a (closed) polyline. ok but tu store this like polilyne we will have some trouble during filler or trim operation so will be better to have four Segment instead > 13) + 14) + 15) + 16) These are all the same. > A symbol itself is a entity. > A Marker, Arrow, section symbol and a Welding symbol are two instances > of the same symbol entity. > We need symbol definitions that defines how the symbol looks like. > And we need symbol references that is a instance of the symbol > definition. > > 18) Is layer an entity? > I thought it is more a entity attribute. > A layer itself has no visible representation. > 19) Is Label not the same as text? > What is the difference? For my point of view label is a text with an arrow > 20) What is a Ballon? Ballon is a number of letter inside a circle or a square with an arrow attached that indicate the position of the ballon it's used for mark a group/block 21) titleblok 22) part list this two culd be a block rapresentation > > I think we should keep the list of entities as short as possible. this is right, what I want to do with this list is to define all the entity that we want to support in pythoncad and find for each of it the right rappresentation. It'like a brain storming to do not miss any entity and have the right solution for pythoncad. so as i suggest in the starting mail, Those are the step to go on with new kernel implementation: 1) get a list of all the entity that we need in pythoncad 2) describe it with a schema like you have done in this e-mail 3) describe how any entity will be described in the database 4) start create the kernel with the database 5) start convert pythoncad for the new kernel may be is better to create in the wiki all the entity that we will be support . Any Comment ? Regards, Matteo |
From: Matteo B. <mat...@bo...> - 2010-02-07 08:33:12
|
You are right Yagnesh, Even if we think of a pdm integration ... or erp .. this will help us too mutch. we can provide 3 additional column at the entity table: date*revision*state date : could have null or a date if null we can delete the entity if date have a value we can not delete (it's versionade) revision: a number that indicate the revision could be a str field in case the user use letter insted of nuber for revision starte: Indicate the state of the entity released/undo_mark/... all we whant in case the date field is not null the state is released what do you think ? Regards Matteo On Sun, 2010-02-07 at 08:04 +0530, Yagnesh Desai wrote: > Gertwin; > > I like the Idea. I think providing the facility of how drawing looked > on a particular date is helpful, if we are able to tag that > particular state of drawing as Major "Revision" then it would > be very helpful. > > All engineers use drawings as Rev 0, Rev 1, Rev 2 etc. All > the intermediate states are not that important. > > That is I can roll back to older "sensible" version and not > the draft version of it. > > - - - - - - > Best regards > Yagnesh Desai > Save a tree...please don't print this e-mail. > > > On Sat, Feb 6, 2010 at 11:51 PM, <ger...@gm...> wrote: > > Hi All, > > > > I was thinking about implementing undo functionality in combination with the > > database. > > I am not aware how this is solved in the current version but with a database > > we can make the undo recording persistent (you can undo changes from a > > previous drawing session). > > > > The idea is not to modify entities in the database but mark the old entity > > state as deleted and insert a new record for the modified entity state. > > Then there are two records in the database, one is the previous state and > > one is the the current state of the entity. > > Of course the entities that are marked as deleted (previous state) are not > > drawn. > > > > When the user does undo the current state is marked as deleted and the > > previous state is marked as not deleted. > > A redo does this marking in the opposite direction. > > > > If we add a column "state" and a column "undo_mark" to our entity table we > > can achieve this. > > The column "state" holds the delete (or not) state. > > The column "undo_mark" holds the value of the undo id. > > Because the user can modify many entities at once all those entities get the > > same "undo_mark". > > > > This way the history of the drawing is kept in the database and the user can > > undo and redo actions from previous sessions. > > If we also add a time stamp we even can provide functionality that will show > > how the drawing looked at a certain date. > > > > I think this functionality can have some use and is something other CAD > > programs does not always provide. > > Undo and redo are simple database queries that are easy to implement. > > We must keep the display list in sync with the state of the database but I > > think this also it not difficult. > > > > We also need a function that compresses the drawing by removing the history. > > > > If it needs clarification, let me know I will try to explain. > > > > Do you think it is useful? > > > > Regards, > > Gertwin > > ------------------------------------------------------------------------------ > > The Planet: dedicated and managed hosting, cloud storage, colocation > > Stay online with enterprise data centers and the best network in the > > business > > Choose flexible plans and management services without long-term contracts > > Personal 24x7 support from experience hosting pros just a phone call away. > > http://p.sf.net/sfu/theplanet-com > > _______________________________________________ > > Pythoncad-developer mailing list > > Pyt...@li... > > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer > > > > > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Pythoncad-developer mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer > |
From: Yagnesh D. <yn...@gm...> - 2010-02-07 02:34:15
|
Gertwin; I like the Idea. I think providing the facility of how drawing looked on a particular date is helpful, if we are able to tag that particular state of drawing as Major "Revision" then it would be very helpful. All engineers use drawings as Rev 0, Rev 1, Rev 2 etc. All the intermediate states are not that important. That is I can roll back to older "sensible" version and not the draft version of it. - - - - - - Best regards Yagnesh Desai Save a tree...please don't print this e-mail. On Sat, Feb 6, 2010 at 11:51 PM, <ger...@gm...> wrote: > Hi All, > > I was thinking about implementing undo functionality in combination with the > database. > I am not aware how this is solved in the current version but with a database > we can make the undo recording persistent (you can undo changes from a > previous drawing session). > > The idea is not to modify entities in the database but mark the old entity > state as deleted and insert a new record for the modified entity state. > Then there are two records in the database, one is the previous state and > one is the the current state of the entity. > Of course the entities that are marked as deleted (previous state) are not > drawn. > > When the user does undo the current state is marked as deleted and the > previous state is marked as not deleted. > A redo does this marking in the opposite direction. > > If we add a column "state" and a column "undo_mark" to our entity table we > can achieve this. > The column "state" holds the delete (or not) state. > The column "undo_mark" holds the value of the undo id. > Because the user can modify many entities at once all those entities get the > same "undo_mark". > > This way the history of the drawing is kept in the database and the user can > undo and redo actions from previous sessions. > If we also add a time stamp we even can provide functionality that will show > how the drawing looked at a certain date. > > I think this functionality can have some use and is something other CAD > programs does not always provide. > Undo and redo are simple database queries that are easy to implement. > We must keep the display list in sync with the state of the database but I > think this also it not difficult. > > We also need a function that compresses the drawing by removing the history. > > If it needs clarification, let me know I will try to explain. > > Do you think it is useful? > > Regards, > Gertwin > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Pythoncad-developer mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer > > |
From: Matteo B. <mat...@bo...> - 2010-02-06 18:36:33
|
Hi Gertwing, I like this solution very clever solution .,.... regars, Matteo On Sat, 2010-02-06 at 18:21 +0000, ger...@gm... wrote: > Hi All, > > I was thinking about implementing undo functionality in combination > with the database. > I am not aware how this is solved in the current version but with a > database we can make the undo recording persistent (you can undo > changes from a previous drawing session). > > The idea is not to modify entities in the database but mark the old > entity state as deleted and insert a new record for the modified > entity state. > Then there are two records in the database, one is the previous state > and one is the the current state of the entity. > Of course the entities that are marked as deleted (previous state) are > not drawn. > > When the user does undo the current state is marked as deleted and the > previous state is marked as not deleted. > A redo does this marking in the opposite direction. > > If we add a column "state" and a column "undo_mark" to our entity > table we can achieve this. > The column "state" holds the delete (or not) state. > The column "undo_mark" holds the value of the undo id. > Because the user can modify many entities at once all those entities > get the same "undo_mark". > > This way the history of the drawing is kept in the database and the > user can undo and redo actions from previous sessions. > If we also add a time stamp we even can provide functionality that > will show how the drawing looked at a certain date. > > I think this functionality can have some use and is something other > CAD programs does not always provide. > Undo and redo are simple database queries that are easy to implement. > We must keep the display list in sync with the state of the database > but I think this also it not difficult. > > We also need a function that compresses the drawing by removing the > history. > > If it needs clarification, let me know I will try to explain. > > Do you think it is useful? > > Regards, > Gertwin > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ Pythoncad-developer mailing list Pyt...@li... https://lists.sourceforge.net/lists/listinfo/pythoncad-developer |
From: <ger...@gm...> - 2010-02-06 18:22:03
|
Hi All, I was thinking about implementing undo functionality in combination with the database. I am not aware how this is solved in the current version but with a database we can make the undo recording persistent (you can undo changes from a previous drawing session). The idea is not to modify entities in the database but mark the old entity state as deleted and insert a new record for the modified entity state. Then there are two records in the database, one is the previous state and one is the the current state of the entity. Of course the entities that are marked as deleted (previous state) are not drawn. When the user does undo the current state is marked as deleted and the previous state is marked as not deleted. A redo does this marking in the opposite direction. If we add a column "state" and a column "undo_mark" to our entity table we can achieve this. The column "state" holds the delete (or not) state. The column "undo_mark" holds the value of the undo id. Because the user can modify many entities at once all those entities get the same "undo_mark". This way the history of the drawing is kept in the database and the user can undo and redo actions from previous sessions. If we also add a time stamp we even can provide functionality that will show how the drawing looked at a certain date. I think this functionality can have some use and is something other CAD programs does not always provide. Undo and redo are simple database queries that are easy to implement. We must keep the display list in sync with the state of the database but I think this also it not difficult. We also need a function that compresses the drawing by removing the history. If it needs clarification, let me know I will try to explain. Do you think it is useful? Regards, Gertwin |
From: Yagnesh D. <yn...@gm...> - 2010-02-06 04:10:28
|
Friends; Can you suggest some online references which I can use for my weekend study ? http://www.tortall.net/mu/wiki/CairoTutorial is one I have come across. an will be checking out http://cairographics.org But in case you guys have any specific reference for newbie please recommend. - - - Best regards Yagnesh Desai Save a tree...please don't print this e-mail. |
From: Yagnesh D. <yn...@gm...> - 2010-02-06 02:41:53
|
You are right we can have both definations clear. But having a definition will provide us a better direction and purpose. On Fri, Feb 5, 2010 at 10:00 PM, <ger...@gm...> wrote: > For who is this definition? > > Is it for users that want to use a CAD platform? > Is it for developers who want to contribute? > > If it is for users than the addition of "Python" or "C/C++" does not make > any sense. > For the user this first few lines must tel him why he should use PythonCAD > and not an other CAD package. > Maybe he even don't know what Python is. > > So I think it is best to split this definition. > First only what is PythonCAD, second > > > Op schreef Yagnesh Desai <yn...@gm...>: >> Friends; >> >> >> >> I think since we are going ahead with major restructuring >> >> we must address this question. >> >> >> >> The old defination of >> >> >> >> " PythonCAD is a CAD package written, surprisingly enough, in Python " >> >> needs more further addition >> >> >> >> What is PythonCAD ? >> >> - 2D/3D >> >> - majority in Python (or with some part in C, C++) >> >> - supports all renderer (or we can select only Cairo, selecting only >> >> one renderer can ease some of coding issue but >> >> makes us more dependent on the renderer project) >> >> - Crossplatform (A must have) >> >> - Scriptable (there is no macro function currently but yes it is >> >> scriptable for advance python user) >> >> - supports which file format as a policy (ie we will have to keep one >> >> STANDARD file format for which we will >> >> provide plugin out of box, dxf is not open) >> >> >> >> Some more questions can come to your mind and once we have >> >> answered such Policy & Defination related questions we will have ease >> >> in future. >> >> >> >> - - >> >> Best regards >> >> >> >> Yagnesh Desai >> >> Save a tree...please don't print this e-mail. >> >> >> >> >> ------------------------------------------------------------------------------ >> >> The Planet: dedicated and managed hosting, cloud storage, colocation >> >> Stay online with enterprise data centers and the best network in the >> business >> >> Choose flexible plans and management services without long-term contracts >> >> Personal 24x7 support from experience hosting pros just a phone call away. >> >> http://p.sf.net/sfu/theplanet-com >> >> _______________________________________________ >> >> Pythoncad-developer mailing list >> >> Pyt...@li... >> >> https://lists.sourceforge.net/lists/listinfo/pythoncad-developer >> > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Pythoncad-developer mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer > > -- Best regards Yagnesh Desai Save a tree...please don't print this e-mail. |
From: Yagnesh D. <yn...@gm...> - 2010-02-06 02:12:13
|
We need to add the "Block" in the entity list. On Fri, Feb 5, 2010 at 1:07 PM, Matteo Boscolo <mat...@bo...> wrote: > > > Hi Gertwing, > > > > I like your structure because we can store in a row of db a tuple that > indicate the points and the kind of object that we are going to store. > > > > The db entity could be in case of point > > Id ++ coordinate ++ type > > 01 ++ (10,10)++ point > > 02 ++ (10,10,20,20)++Segment > > And so on for all the entity > > We can go on with this step: > > 1) Get a full list of the entity that we need do describe > > 2) Create a sort of classes that try to describe all this entity > > 3) Create the simple and efficient way to store in on db > > 4) Start to convert pythoncad entity to the new entity > > > > I would like to go on with this step before of all. > > So start listing all the entity that we will need in pythoncad > > > > 1) Point > > 2) Segment > > 3) Circle > > 4) Arc > > 5) Ellipse > > 6) Nurbs > > 7) Polyline > > 8) Hatch > > 9) Text > > 10) Image > > 11) Polygon (triangle/rectangle….) > > 12) Dimension > > 13) Arrow > > 14) Marker > > 15) Section symbol > > 16) Welding symbol > > 17) Groups > > 18) Layer > > 19) Label > > 20) Ballon > > 21) … > > > > Regards > > Matteo > > > > From: ger...@gm... [mailto:ger...@gm...] > Sent: 04 February 2010 22:39 > To: pythoncad-developer > Subject: [Pythoncad-developer] Proposal geometry objects > > > > Hi all, > > I did some thinking about the entity geometry. > > The current version maintains one point list where all entities make use of. > I want to preserve this method because it has some advantages. > > But I want to change the way the entities use these points. > The current version defines different geometries for each entity (segment, > polyline, arc, etc.). > > I want to define only two different geometry objects that all entities can > share. > It consist of only points, no start-, end angles, center points or radius. > Because there are only points in the geometry transformations can be done > really quick, all points are multiplied by the same matrix. > > If needed the program must calculate the center point, radius and angles of > circles and arcs. > This is done far less often than entity drawing so this is more efficient. > > The main advantage is creating point lists for cairo drawing is more easy. > All entities share the same geometry class, a single function is used to > draw them all. > It is more easy to optimize a single draw function for speed than all > different functions for all entities. > This excludes hatches of course which will have it own draw function. > > > Some preliminary code: > > class Point(object): > """ > Indicates a single point with x and y ordinates (2D point) > The interpretation indicates how the connection is drawn to the next point. > With this construction linear and circular lines are constructed. > > These point objects are stored in a single table in the database. > """ > def __init__(self): > # id of point > self.__id = 0 > # X ordinate > self.__x = 0.0 > # Y ordinate > self.__y = 0.0 > # interpretation connection to next point > # L = linear > # C = circular > # None = not used (single point geometry) > # more interpretation values needed for dimensions? > self.__interpretation = 'L' > > > class SGeometry(object): > """ > Indicates a single geometry. > This is used in segment, polyline, arc, circle. > > examples: > 1) A segment geometry consists of a list of two points. > The point interpretation from the first to the second point is 'L' (linear) > > 2) An arc geometry consists of a list of three points. > The first point is the start point of the arc, the second point is on the > arc and the third point is the end point. > The point interpretation from the first to the second point is 'C' > (circular) > The point interpretation from the second to the third point is 'C' > (circular) > > 3) An polyline consists of a list of three or more points. > The point interpretation can be 'L' (linear) or 'C' (circular) > This gives the opportunity to create polylines with linear and arc segments. > > 4) An circle geometry consists of a list of five points. > A circle is represented as two arcs where the first and fifth point are the > same. > The point interpretation from the first to the second point is 'C' > (circular) > The point interpretation from the second to the third point is 'C' > (circular) > > For a single geometry the geometry interpretation is None. > Interpretation is used for complex geometries. > """ > def __init__(self): > # list of points ids > self.__point_ids = [] > # interpretation used in complex geometry > # O = outer ring > # I = inner ring > # None = not used. > self.__interpretation = None > > > class CGeometry(object): > """ > Indicates a complex geometry. > This is used in hatches. > > A hatch can contain islands. > The list contains a outer ring and a inner ring (island). > The rings are closed polylines (SGeometry objects). > > ??? Can inner rings contain other inner rings (nested islands) ??? > """ > def __init__(self): > # list of single geometries. > # order in the list is important, first a outer ring, than the inner rings > self.__sgeometries = [] > > > Even a text can have the same geometry as a segment (two points). > The first point is the text location, the second point is the rotation. > The distance between the first and second point is the text height. > > > Regards, > Gertwin > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Pythoncad-developer mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer > > -- Best regards Yagnesh Desai Save a tree...please don't print this e-mail. |
From: Gertwin G. <ger...@gm...> - 2010-02-05 20:07:59
|
Yagnesh, This is a way to store the geometry in memory and file/database. It is independent off the drawing methods, there are no Cairo datatypes in it not does it depend on the Cairo library. We can use it for Cairo, OpenGL or whatever. Regards, Gertwin 2010/2/5 Yagnesh Desai <yn...@gm...>: > Friends; > > Is this method only suited to Cairo or it will > be possible to use this method in other renderer? > > > > > On Fri, Feb 5, 2010 at 1:07 PM, Matteo Boscolo > <mat...@bo...> wrote: >> >> >> Hi Gertwing, >> >> >> >> I like your structure because we can store in a row of db a tuple that >> indicate the points and the kind of object that we are going to store. >> >> >> >> The db entity could be in case of point >> >> Id ++ coordinate ++ type >> >> 01 ++ (10,10)++ point >> >> 02 ++ (10,10,20,20)++Segment >> >> And so on for all the entity >> >> We can go on with this step: >> >> 1) Get a full list of the entity that we need do describe >> >> 2) Create a sort of classes that try to describe all this entity >> >> 3) Create the simple and efficient way to store in on db >> >> 4) Start to convert pythoncad entity to the new entity >> >> >> >> I would like to go on with this step before of all. >> >> So start listing all the entity that we will need in pythoncad >> >> >> >> 1) Point >> >> 2) Segment >> >> 3) Circle >> >> 4) Arc >> >> 5) Ellipse >> >> 6) Nurbs >> >> 7) Polyline >> >> 8) Hatch >> >> 9) Text >> >> 10) Image >> >> 11) Polygon (triangle/rectangle….) >> >> 12) Dimension >> >> 13) Arrow >> >> 14) Marker >> >> 15) Section symbol >> >> 16) Welding symbol >> >> 17) Groups >> >> 18) Layer >> >> 19) Label >> >> 20) Ballon >> >> 21) … >> >> >> >> Regards >> >> Matteo >> >> >> >> From: ger...@gm... [mailto:ger...@gm...] >> Sent: 04 February 2010 22:39 >> To: pythoncad-developer >> Subject: [Pythoncad-developer] Proposal geometry objects >> >> >> >> Hi all, >> >> I did some thinking about the entity geometry. >> >> The current version maintains one point list where all entities make use of. >> I want to preserve this method because it has some advantages. >> >> But I want to change the way the entities use these points. >> The current version defines different geometries for each entity (segment, >> polyline, arc, etc.). >> >> I want to define only two different geometry objects that all entities can >> share. >> It consist of only points, no start-, end angles, center points or radius. >> Because there are only points in the geometry transformations can be done >> really quick, all points are multiplied by the same matrix. >> >> If needed the program must calculate the center point, radius and angles of >> circles and arcs. >> This is done far less often than entity drawing so this is more efficient. >> >> The main advantage is creating point lists for cairo drawing is more easy. >> All entities share the same geometry class, a single function is used to >> draw them all. >> It is more easy to optimize a single draw function for speed than all >> different functions for all entities. >> This excludes hatches of course which will have it own draw function. >> >> >> Some preliminary code: >> >> class Point(object): >> """ >> Indicates a single point with x and y ordinates (2D point) >> The interpretation indicates how the connection is drawn to the next point. >> With this construction linear and circular lines are constructed. >> >> These point objects are stored in a single table in the database. >> """ >> def __init__(self): >> # id of point >> self.__id = 0 >> # X ordinate >> self.__x = 0.0 >> # Y ordinate >> self.__y = 0.0 >> # interpretation connection to next point >> # L = linear >> # C = circular >> # None = not used (single point geometry) >> # more interpretation values needed for dimensions? >> self.__interpretation = 'L' >> >> >> class SGeometry(object): >> """ >> Indicates a single geometry. >> This is used in segment, polyline, arc, circle. >> >> examples: >> 1) A segment geometry consists of a list of two points. >> The point interpretation from the first to the second point is 'L' (linear) >> >> 2) An arc geometry consists of a list of three points. >> The first point is the start point of the arc, the second point is on the >> arc and the third point is the end point. >> The point interpretation from the first to the second point is 'C' >> (circular) >> The point interpretation from the second to the third point is 'C' >> (circular) >> >> 3) An polyline consists of a list of three or more points. >> The point interpretation can be 'L' (linear) or 'C' (circular) >> This gives the opportunity to create polylines with linear and arc segments. >> >> 4) An circle geometry consists of a list of five points. >> A circle is represented as two arcs where the first and fifth point are the >> same. >> The point interpretation from the first to the second point is 'C' >> (circular) >> The point interpretation from the second to the third point is 'C' >> (circular) >> >> For a single geometry the geometry interpretation is None. >> Interpretation is used for complex geometries. >> """ >> def __init__(self): >> # list of points ids >> self.__point_ids = [] >> # interpretation used in complex geometry >> # O = outer ring >> # I = inner ring >> # None = not used. >> self.__interpretation = None >> >> >> class CGeometry(object): >> """ >> Indicates a complex geometry. >> This is used in hatches. >> >> A hatch can contain islands. >> The list contains a outer ring and a inner ring (island). >> The rings are closed polylines (SGeometry objects). >> >> ??? Can inner rings contain other inner rings (nested islands) ??? >> """ >> def __init__(self): >> # list of single geometries. >> # order in the list is important, first a outer ring, than the inner rings >> self.__sgeometries = [] >> >> >> Even a text can have the same geometry as a segment (two points). >> The first point is the text location, the second point is the rotation. >> The distance between the first and second point is the text height. >> >> >> Regards, >> Gertwin >> >> ------------------------------------------------------------------------------ >> The Planet: dedicated and managed hosting, cloud storage, colocation >> Stay online with enterprise data centers and the best network in the >> business >> Choose flexible plans and management services without long-term contracts >> Personal 24x7 support from experience hosting pros just a phone call away. >> http://p.sf.net/sfu/theplanet-com >> _______________________________________________ >> Pythoncad-developer mailing list >> Pyt...@li... >> https://lists.sourceforge.net/lists/listinfo/pythoncad-developer >> >> > > > > -- > Best regards > > Yagnesh Desai > > Save a tree...please don't print this e-mail. > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Pythoncad-developer mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer > |
From: <ger...@gm...> - 2010-02-05 16:30:40
|
For who is this definition? Is it for users that want to use a CAD platform? Is it for developers who want to contribute? If it is for users than the addition of "Python" or "C/C++" does not make any sense. For the user this first few lines must tel him why he should use PythonCAD and not an other CAD package. Maybe he even don't know what Python is. So I think it is best to split this definition. First only what is PythonCAD, second Op schreef Yagnesh Desai <yn...@gm...>: > Friends; > I think since we are going ahead with major restructuring > we must address this question. > The old defination of > " PythonCAD is a CAD package written, surprisingly enough, in Python " > needs more further addition > What is PythonCAD ? > - 2D/3D > - majority in Python (or with some part in C, C++) > - supports all renderer (or we can select only Cairo, selecting only > one renderer can ease some of coding issue but > makes us more dependent on the renderer project) > - Crossplatform (A must have) > - Scriptable (there is no macro function currently but yes it is > scriptable for advance python user) > - supports which file format as a policy (ie we will have to keep one > STANDARD file format for which we will > provide plugin out of box, dxf is not open) > Some more questions can come to your mind and once we have > answered such Policy & Defination related questions we will have ease > in future. > - - > Best regards > Yagnesh Desai > Save a tree...please don't print this e-mail. > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Pythoncad-developer mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer |
From: <ger...@gm...> - 2010-02-05 11:58:08
|
Hi Matteo, Step 1: The list of entities. This are just remarks, maybe I see it wrong. 2) We can eliminate Segment, a segment is just a polyline with two points. There must be a tool for the user to create it. 11) Is Polygon/Rectangle needed, this is a special form of a polyline. There must be a tool for the user to create it. Internal it is a (closed) polyline. 13) + 14) + 15) + 16) These are all the same. A symbol itself is a entity. A Marker, Arrow, section symbol and a Welding symbol are two instances of the same symbol entity. We need symbol definitions that defines how the symbol looks like. And we need symbol references that is a instance of the symbol definition. 18) Is layer an entity? I thought it is more a entity attribute. A layer itself has no visible representation. 19) Is Label not the same as text? What is the difference? 20) What is a Ballon? I think we should keep the list of entities as short as possible. Each entity will cost us time to implement (object definition + drawing + printing). We allway can provide different tools to the user. Regards, Gertwin Op schreef Matteo Boscolo <mat...@bo...>: > Hi Gertwing, > I like your structure because we can store in a row of db a > tuple that indicate the points and the kind of object that we are going to > store. > The db entity could be in case of point > Id ++ coordinate ++ type > 01 ++ (10,10)++ point > 02 ++ (10,10,20,20)++Segment > And so on for all the entity > We can go on with this step: > 1) > Get a full list of the entity that we need do describe > 2) > Create a sort of classes that try to describe all this entity > 3) > Create the simple and efficient way to store in on db > 4) > Start to convert pythoncad entity to the new entity > I would like to go on with this step before of all. > So start listing all the entity that we will need in pythoncad > 1) > Point > 2) > Segment > 3) > Circle > 4) > Arc > 5) > Ellipse > 6) > Nurbs > 7) > Polyline > 8) > Hatch > 9) > Text > 10) > Image > 11) > Polygon (triangle/rectangle….) > 12) > Dimension > 13) > Arrow > 14) > Marker > 15) > Section symbol > 16) > Welding symbol > 17) > Groups > 18) > Layer > 19) > Label > 20) > Ballon > 21) > … > Regards > Matteo > From: > ger...@gm... [mailto:ger...@gm...] > Sent: 04 February 2010 22:39 > To: pythoncad-developer > Subject: [Pythoncad-developer] Proposal geometry objects > Hi all, > I did some thinking about the entity geometry. > The current version maintains one point list where all entities make use > of. > I want to preserve this method because it has some advantages. > But I want to change the way the entities use these points. > The current version defines different geometries for each entity (segment, > polyline, arc, etc.). > I want to define only two different geometry objects that all entities can > share. > It consist of only points, no start-, end angles, center points or radius. > Because there are only points in the geometry transformations can be done > really quick, all points are multiplied by the same matrix. > If needed the program must calculate the center point, radius and angles > of > circles and arcs. > This is done far less often than entity drawing so this is more efficient. > The main advantage is creating point lists for cairo drawing is more easy. > All entities share the same geometry class, a single function is used to > draw them > all. > It is more easy to optimize a single draw function for speed than all > different > functions for all entities. > This excludes hatches of course which will have it own draw function. > Some preliminary code: > class Point(object): > """ > Indicates a single point with x and y ordinates (2D point) > The interpretation indicates how the connection is drawn to the next > point. > With this construction linear and circular lines are constructed. > These point objects are stored in a single table in the database. > """ > def __init__(self): > # id of point > self.__id = 0 > # X ordinate > self.__x = 0.0 > # Y ordinate > self.__y = 0.0 > # interpretation connection to next point > # L = linear > # C = circular > # None = not used (single point geometry) > # more interpretation values needed for dimensions? > self.__interpretation = 'L' > class SGeometry(object): > """ > Indicates a single geometry. > This is used in segment, polyline, arc, circle. > examples: > 1) A segment geometry consists of a list of two points. > The point interpretation from the first to the second point is 'L' > (linear) > 2) An arc geometry consists of a list of three points. > The first point is the start point of the arc, the second point is on the > arc > and the third point is the end point. > The point interpretation from the first to the second point is 'C' > (circular) > The point interpretation from the second to the third point is 'C' > (circular) > 3) An polyline consists of a list of three or more points. > The point interpretation can be 'L' (linear) or 'C' (circular) > This gives the opportunity to create polylines with linear and arc > segments. > 4) An circle geometry consists of a list of five points. > A circle is represented as two arcs where the first and fifth point are > the > same. > The point interpretation from the first to the second point is 'C' > (circular) > The point interpretation from the second to the third point is 'C' > (circular) > For a single geometry the geometry interpretation is None. > Interpretation is used for complex geometries. > """ > def __init__(self): > # list of points ids > self.__point_ids = [] > # interpretation used in complex geometry > # O = outer ring > # I = inner ring > # None = not used. > self.__interpretation = None > class CGeometry(object): > """ > Indicates a complex geometry. > This is used in hatches. > A hatch can contain islands. > The list contains a outer ring and a inner ring (island). > The rings are closed polylines (SGeometry objects). > ??? Can inner rings contain other inner rings (nested islands) ??? > """ > def __init__(self): > # list of single geometries. > # order in the list is important, first a outer ring, than the inner rings > self.__sgeometries = [] > Even a text can have the same geometry as a segment (two points). > The first point is the text location, the second point is the rotation. > The distance between the first and second point is the text height. > Regards, > Gertwin |
From: Yagnesh D. <yn...@gm...> - 2010-02-05 11:53:50
|
Friends; I think since we are going ahead with major restructuring we must address this question. The old defination of " PythonCAD is a CAD package written, surprisingly enough, in Python " needs more further addition What is PythonCAD ? - 2D/3D - majority in Python (or with some part in C, C++) - supports all renderer (or we can select only Cairo, selecting only one renderer can ease some of coding issue but makes us more dependent on the renderer project) - Crossplatform (A must have) - Scriptable (there is no macro function currently but yes it is scriptable for advance python user) - supports which file format as a policy (ie we will have to keep one STANDARD file format for which we will provide plugin out of box, dxf is not open) Some more questions can come to your mind and once we have answered such Policy & Defination related questions we will have ease in future. - - Best regards Yagnesh Desai Save a tree...please don't print this e-mail. |
From: Yagnesh D. <yn...@gm...> - 2010-02-05 11:46:26
|
Friends; Is this method only suited to Cairo or it will be possible to use this method in other renderer? On Fri, Feb 5, 2010 at 1:07 PM, Matteo Boscolo <mat...@bo...> wrote: > > > Hi Gertwing, > > > > I like your structure because we can store in a row of db a tuple that > indicate the points and the kind of object that we are going to store. > > > > The db entity could be in case of point > > Id ++ coordinate ++ type > > 01 ++ (10,10)++ point > > 02 ++ (10,10,20,20)++Segment > > And so on for all the entity > > We can go on with this step: > > 1) Get a full list of the entity that we need do describe > > 2) Create a sort of classes that try to describe all this entity > > 3) Create the simple and efficient way to store in on db > > 4) Start to convert pythoncad entity to the new entity > > > > I would like to go on with this step before of all. > > So start listing all the entity that we will need in pythoncad > > > > 1) Point > > 2) Segment > > 3) Circle > > 4) Arc > > 5) Ellipse > > 6) Nurbs > > 7) Polyline > > 8) Hatch > > 9) Text > > 10) Image > > 11) Polygon (triangle/rectangle….) > > 12) Dimension > > 13) Arrow > > 14) Marker > > 15) Section symbol > > 16) Welding symbol > > 17) Groups > > 18) Layer > > 19) Label > > 20) Ballon > > 21) … > > > > Regards > > Matteo > > > > From: ger...@gm... [mailto:ger...@gm...] > Sent: 04 February 2010 22:39 > To: pythoncad-developer > Subject: [Pythoncad-developer] Proposal geometry objects > > > > Hi all, > > I did some thinking about the entity geometry. > > The current version maintains one point list where all entities make use of. > I want to preserve this method because it has some advantages. > > But I want to change the way the entities use these points. > The current version defines different geometries for each entity (segment, > polyline, arc, etc.). > > I want to define only two different geometry objects that all entities can > share. > It consist of only points, no start-, end angles, center points or radius. > Because there are only points in the geometry transformations can be done > really quick, all points are multiplied by the same matrix. > > If needed the program must calculate the center point, radius and angles of > circles and arcs. > This is done far less often than entity drawing so this is more efficient. > > The main advantage is creating point lists for cairo drawing is more easy. > All entities share the same geometry class, a single function is used to > draw them all. > It is more easy to optimize a single draw function for speed than all > different functions for all entities. > This excludes hatches of course which will have it own draw function. > > > Some preliminary code: > > class Point(object): > """ > Indicates a single point with x and y ordinates (2D point) > The interpretation indicates how the connection is drawn to the next point. > With this construction linear and circular lines are constructed. > > These point objects are stored in a single table in the database. > """ > def __init__(self): > # id of point > self.__id = 0 > # X ordinate > self.__x = 0.0 > # Y ordinate > self.__y = 0.0 > # interpretation connection to next point > # L = linear > # C = circular > # None = not used (single point geometry) > # more interpretation values needed for dimensions? > self.__interpretation = 'L' > > > class SGeometry(object): > """ > Indicates a single geometry. > This is used in segment, polyline, arc, circle. > > examples: > 1) A segment geometry consists of a list of two points. > The point interpretation from the first to the second point is 'L' (linear) > > 2) An arc geometry consists of a list of three points. > The first point is the start point of the arc, the second point is on the > arc and the third point is the end point. > The point interpretation from the first to the second point is 'C' > (circular) > The point interpretation from the second to the third point is 'C' > (circular) > > 3) An polyline consists of a list of three or more points. > The point interpretation can be 'L' (linear) or 'C' (circular) > This gives the opportunity to create polylines with linear and arc segments. > > 4) An circle geometry consists of a list of five points. > A circle is represented as two arcs where the first and fifth point are the > same. > The point interpretation from the first to the second point is 'C' > (circular) > The point interpretation from the second to the third point is 'C' > (circular) > > For a single geometry the geometry interpretation is None. > Interpretation is used for complex geometries. > """ > def __init__(self): > # list of points ids > self.__point_ids = [] > # interpretation used in complex geometry > # O = outer ring > # I = inner ring > # None = not used. > self.__interpretation = None > > > class CGeometry(object): > """ > Indicates a complex geometry. > This is used in hatches. > > A hatch can contain islands. > The list contains a outer ring and a inner ring (island). > The rings are closed polylines (SGeometry objects). > > ??? Can inner rings contain other inner rings (nested islands) ??? > """ > def __init__(self): > # list of single geometries. > # order in the list is important, first a outer ring, than the inner rings > self.__sgeometries = [] > > > Even a text can have the same geometry as a segment (two points). > The first point is the text location, the second point is the rotation. > The distance between the first and second point is the text height. > > > Regards, > Gertwin > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Pythoncad-developer mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer > > -- Best regards Yagnesh Desai Save a tree...please don't print this e-mail. |
From: <ger...@gm...> - 2010-02-05 11:31:31
|
I missed such a feature in the old code. This is indeed very helpful. Regards, Gertwin Op schreef Matteo Boscolo <mat...@bo...>: > Hi All, > Before starting coding in pythoncad I would like to create a single > module for debugging purpose. > This module will have some global variable that will switch on and off > the print of the debug and will have the possibility to write the log in > IO windows or in a log file. > This will be very important for debugging porpoise. > The module will be something like this > Class PythonCadTracer(object): > def info(msg): > def debug(msg): > def error(msg): > def in(msg): > def out(msg): > def warning(msg): > def onWriteFile(self): > def onWriteIO(self): > the in and out function take care of the time spent doing the operation > so in case of function this will be > def myFunc(): > pyTracer.in("myFunc") > pyTracer.out("myFunc") > the output will be > Start function myFunc > End function myFunc in 10 s > Let me know ... > Regards, > Matteo > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Pythoncad-developer mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer |
From: <ger...@gm...> - 2010-02-05 11:28:36
|
Hi Matteo, For me your convention is OK. The most important is that we all use the same convention. Regards, Gertwin Op schreef Matteo Boscolo <mat...@bo...>: > For me the convention is ok, > But insted of using an underscore for the function name I prefer > to have the Upper case letter of the first word ..like this: > For Function: > def getLineFromSegment(): > instead of > def get_line_form_segment(): > For Classes: > Class Segment(object): > and I like to have the descriprion on each functions/class like > this > def line(x,y,x1,y1): > “”” > Create > a line > x: double coordinate of the x point > “”” > For me it's very important the documentation of each > function / class > In case of global variable we can use the UPPER Case and the > underline to separate the words > DEBUG_GUI=True > Let me know if for you this conversion is ok > Regards, > Matteo > From: > ger...@gm... [mailto:ger...@gm...] > Sent: 04 February 2010 07:56 > To: Yagnesh Desai; pythoncad-developer > Subject: Re: [Pythoncad-developer] coding convention > Hi Yagnesh, > That's all right, your skills will improve. > We all can learn from each other. > I saw Arts coding conventions just recently. > It is good to have some unity in our code. > Regards, > Gertwin > Op schreef Yagnesh Desai yn...@gm...>: > > Gretwin; > > > > > > > > I know the coding done by me needs lot of touch up. > > > > > > > > I need to improve my coding skills as this is the first time > > > > I am doing any coding for such project. I only used to > > > > do editing of recorded macros. > > > > > > > > Also I am not good at OOP and whatever coding I did > > > > was with good help of Matteo. > > > > > > > > Hope to improve and learn more while contributing to > > > > PythonCAD. > > > > > > > > If the convention in old wiki is what can be followed > > > > we must use it for there must not be any difference > > > > in the way old and new one. > > > > > > > > > > > > On Thu, Feb 4, 2010 at 2:07 AM, Gertwin Groen ger...@gm...> > wrote: > > > > > Hi all, > > > > > > > > > > Now the we start working on the best PythonCAD ever it is time to > > > > > think about some coding convention. > > > > > In the old wiki this is mentioned but it is not followed by us in the > > > > > last months. > > > > > > > > > > I think the easiest thing to do is to follow the PyGTK coding > conventions: > > > > > > > > > > example: > > > > > > > > > > class gtk.CellEditable(gobject.GInterface): > > > > > def start_editing(event) > > > > > def editing_done() > > > > > def remove_widget() > > > > > > > > > > Lower case package, module (and file) names. > > > > > Mixed upper and lower case for class names, each word starts with a > > > > > capital letter. > > > > > Functions and class members are lower case, words are divided by a > underscore. > > > > > Variable names are lower case, words are divided by a underscore. > > > > > > > > > > See the pygtk-demo for examples. > > > > > > > > > > Any comments? > > > > > > > > > > Regards, > > > > > Gertwin > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > > The Planet: dedicated and managed hosting, cloud storage, colocation > > > > > Stay online with enterprise data centers and the best network in the > business > > > > > Choose flexible plans and management services without long-term > contracts > > > > > Personal 24x7 support from experience hosting pros just a phone call > away. > > > > > http://p.sf.net/sfu/theplanet-com > > > > > _______________________________________________ > > > > > Pythoncad-developer mailing list > > > > > Pyt...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer > > > > > > > > > > > > > > > > > > > > > -- > > > > Best regards > > > > > > > > Yagnesh Desai > > > > > > > > Save a tree...please don't print this e-mail. > > > > > > > > > ------------------------------------------------------------------------------ > > > > The Planet: dedicated and managed hosting, cloud storage, colocation > > > > Stay online with enterprise data centers and the best network in the > business > > > > Choose flexible plans and management services without long-term > contracts > > > > Personal 24x7 support from experience hosting pros just a phone call > away. > > > > http://p.sf.net/sfu/theplanet-com > > > > _______________________________________________ > > > > Pythoncad-developer mailing list > > > > Pyt...@li... > > > > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer > > |
From: Matteo B. <mat...@bo...> - 2010-02-05 08:18:08
|
Hi All, Before starting coding in pythoncad I would like to create a single module for debugging purpose. This module will have some global variable that will switch on and off the print of the debug and will have the possibility to write the log in IO windows or in a log file. This will be very important for debugging porpoise. The module will be something like this Class PythonCadTracer(object): def info(msg): def debug(msg): def error(msg): def in(msg): def out(msg): def warning(msg): def onWriteFile(self): def onWriteIO(self): the in and out function take care of the time spent doing the operation so in case of function this will be def myFunc(): pyTracer.in("myFunc") pyTracer.out("myFunc") the output will be Start function myFunc End function myFunc in 10 s Let me know ... Regards, Matteo |
From: Matteo B. <mat...@bo...> - 2010-02-05 08:07:17
|
For me the convention is ok, But insted of using an underscore for the function name I prefer to have the Upper case letter of the first word ..like this: For Function: def getLineFromSegment(): instead of def get_line_form_segment(): For Classes: Class Segment(object): and I like to have the descriprion on each functions/class like this def line(x,y,x1,y1): """ Create a line x: double coordinate of the x point """ For me it's very important the documentation of each function / class In case of global variable we can use the UPPER Case and the underline to separate the words DEBUG_GUI=True Let me know if for you this conversion is ok Regards, Matteo From: ger...@gm... [mailto:ger...@gm...] Sent: 04 February 2010 07:56 To: Yagnesh Desai; pythoncad-developer Subject: Re: [Pythoncad-developer] coding convention Hi Yagnesh, That's all right, your skills will improve. We all can learn from each other. I saw Arts coding conventions just recently. It is good to have some unity in our code. Regards, Gertwin Op schreef Yagnesh Desai <yn...@gm...>: > Gretwin; > > > > I know the coding done by me needs lot of touch up. > > > > I need to improve my coding skills as this is the first time > > I am doing any coding for such project. I only used to > > do editing of recorded macros. > > > > Also I am not good at OOP and whatever coding I did > > was with good help of Matteo. > > > > Hope to improve and learn more while contributing to > > PythonCAD. > > > > If the convention in old wiki is what can be followed > > we must use it for there must not be any difference > > in the way old and new one. > > > > > > On Thu, Feb 4, 2010 at 2:07 AM, Gertwin Groen ger...@gm...> wrote: > > > Hi all, > > > > > > Now the we start working on the best PythonCAD ever it is time to > > > think about some coding convention. > > > In the old wiki this is mentioned but it is not followed by us in the > > > last months. > > > > > > I think the easiest thing to do is to follow the PyGTK coding conventions: > > > > > > example: > > > > > > class gtk.CellEditable(gobject.GInterface): > > > def start_editing(event) > > > def editing_done() > > > def remove_widget() > > > > > > Lower case package, module (and file) names. > > > Mixed upper and lower case for class names, each word starts with a > > > capital letter. > > > Functions and class members are lower case, words are divided by a underscore. > > > Variable names are lower case, words are divided by a underscore. > > > > > > See the pygtk-demo for examples. > > > > > > Any comments? > > > > > > Regards, > > > Gertwin > > > > > > ---------------------------------------------------------------------------- -- > > > The Planet: dedicated and managed hosting, cloud storage, colocation > > > Stay online with enterprise data centers and the best network in the business > > > Choose flexible plans and management services without long-term contracts > > > Personal 24x7 support from experience hosting pros just a phone call away. > > > http://p.sf.net/sfu/theplanet-com > > > _______________________________________________ > > > Pythoncad-developer mailing list > > > Pyt...@li... > > > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer > > > > > > > > > > > -- > > Best regards > > > > Yagnesh Desai > > > > Save a tree...please don't print this e-mail. > > > > ---------------------------------------------------------------------------- -- > > The Planet: dedicated and managed hosting, cloud storage, colocation > > Stay online with enterprise data centers and the best network in the business > > Choose flexible plans and management services without long-term contracts > > Personal 24x7 support from experience hosting pros just a phone call away. > > http://p.sf.net/sfu/theplanet-com > > _______________________________________________ > > Pythoncad-developer mailing list > > Pyt...@li... > > https://lists.sourceforge.net/lists/listinfo/pythoncad-developer > |
From: Matteo B. <mat...@bo...> - 2010-02-05 07:37:50
|
Hi Gertwing, I like your structure because we can store in a row of db a tuple that indicate the points and the kind of object that we are going to store. The db entity could be in case of point Id ++ coordinate ++ type 01 ++ (10,10)++ point 02 ++ (10,10,20,20)++Segment And so on for all the entity We can go on with this step: 1) Get a full list of the entity that we need do describe 2) Create a sort of classes that try to describe all this entity 3) Create the simple and efficient way to store in on db 4) Start to convert pythoncad entity to the new entity I would like to go on with this step before of all. So start listing all the entity that we will need in pythoncad 1) Point 2) Segment 3) Circle 4) Arc 5) Ellipse 6) Nurbs 7) Polyline 8) Hatch 9) Text 10) Image 11) Polygon (triangle/rectangle..) 12) Dimension 13) Arrow 14) Marker 15) Section symbol 16) Welding symbol 17) Groups 18) Layer 19) Label 20) Ballon 21) . Regards Matteo From: ger...@gm... [mailto:ger...@gm...] Sent: 04 February 2010 22:39 To: pythoncad-developer Subject: [Pythoncad-developer] Proposal geometry objects Hi all, I did some thinking about the entity geometry. The current version maintains one point list where all entities make use of. I want to preserve this method because it has some advantages. But I want to change the way the entities use these points. The current version defines different geometries for each entity (segment, polyline, arc, etc.). I want to define only two different geometry objects that all entities can share. It consist of only points, no start-, end angles, center points or radius. Because there are only points in the geometry transformations can be done really quick, all points are multiplied by the same matrix. If needed the program must calculate the center point, radius and angles of circles and arcs. This is done far less often than entity drawing so this is more efficient. The main advantage is creating point lists for cairo drawing is more easy. All entities share the same geometry class, a single function is used to draw them all. It is more easy to optimize a single draw function for speed than all different functions for all entities. This excludes hatches of course which will have it own draw function. Some preliminary code: class Point(object): """ Indicates a single point with x and y ordinates (2D point) The interpretation indicates how the connection is drawn to the next point. With this construction linear and circular lines are constructed. These point objects are stored in a single table in the database. """ def __init__(self): # id of point self.__id = 0 # X ordinate self.__x = 0.0 # Y ordinate self.__y = 0.0 # interpretation connection to next point # L = linear # C = circular # None = not used (single point geometry) # more interpretation values needed for dimensions? self.__interpretation = 'L' class SGeometry(object): """ Indicates a single geometry. This is used in segment, polyline, arc, circle. examples: 1) A segment geometry consists of a list of two points. The point interpretation from the first to the second point is 'L' (linear) 2) An arc geometry consists of a list of three points. The first point is the start point of the arc, the second point is on the arc and the third point is the end point. The point interpretation from the first to the second point is 'C' (circular) The point interpretation from the second to the third point is 'C' (circular) 3) An polyline consists of a list of three or more points. The point interpretation can be 'L' (linear) or 'C' (circular) This gives the opportunity to create polylines with linear and arc segments. 4) An circle geometry consists of a list of five points. A circle is represented as two arcs where the first and fifth point are the same. The point interpretation from the first to the second point is 'C' (circular) The point interpretation from the second to the third point is 'C' (circular) For a single geometry the geometry interpretation is None. Interpretation is used for complex geometries. """ def __init__(self): # list of points ids self.__point_ids = [] # interpretation used in complex geometry # O = outer ring # I = inner ring # None = not used. self.__interpretation = None class CGeometry(object): """ Indicates a complex geometry. This is used in hatches. A hatch can contain islands. The list contains a outer ring and a inner ring (island). The rings are closed polylines (SGeometry objects). ??? Can inner rings contain other inner rings (nested islands) ??? """ def __init__(self): # list of single geometries. # order in the list is important, first a outer ring, than the inner rings self.__sgeometries = [] Even a text can have the same geometry as a segment (two points). The first point is the text location, the second point is the rotation. The distance between the first and second point is the text height. Regards, Gertwin |