newb - closed polyline

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

newb - closed polyline

Carl Trachte
Hi.

If this is a duplicate post - my apologies.

I've used the FreeBSD 6.1 ports utility to install pythoncad revision
28.  I can't seem to figure out how to close a polyline (bring the
last segment back to the start point).  Any help would be appreciated.

Thanks a ton.

Carl T.
_______________________________________________
PythonCAD mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/pythoncad
Reply | Threaded
Open this post in threaded view
|

Re: newb - closed polyline

Art Haas
On Sun, May 06, 2007 at 07:53:35PM -0700, Carl Trachte wrote:
> Hi.
>
> If this is a duplicate post - my apologies.
>
> I've used the FreeBSD 6.1 ports utility to install pythoncad revision
> 28.  I can't seem to figure out how to close a polyline (bring the
> last segment back to the start point).  Any help would be appreciated.
>

Hi.

When you want to stop drawing the polyline segments, you press the
'shift' key down and click on the final point. As you want to make
the polyline closed, simply click on the initial point where things
started.

I've not considered adding a polyline feature where the final segment
automatically "closes" things. If I get some feedback on this it may be
worth looking into.

Art Haas
--
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822
_______________________________________________
PythonCAD mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/pythoncad
Reply | Threaded
Open this post in threaded view
|

Re: newb - closed polyline

Carl Trachte
Art,

Thanks.  One more newb question - how do you do point snap when doing this?  In other words, how do you snap to the exact location of the first point in the polyline?

If this is in the FAQ or the doc, please point me in the right direction and I'll research it further.  

I haven't looked at the code yet either.  If there's a spot there that makes it clear, I'm more than willing to investigate.

Thanks.

Carl T.

On 5/7/07, Art Haas <[hidden email]> wrote:
On Sun, May 06, 2007 at 07:53:35PM -0700, Carl Trachte wrote:
> I've used the FreeBSD 6.1 ports utility to install pythoncad revision
> 28.  I can't seem to figure out how to close a polyline (bring the
> last segment back to the start point).  Any help would be appreciated.

When you want to stop drawing the polyline segments, you press the
'shift' key down and click on the final point. As you want to make
the polyline closed, simply click on the initial point where things
started.

I've not considered adding a polyline feature where the final segment
automatically "closes" things. If I get some feedback on this it may be
worth looking into.


_______________________________________________
PythonCAD mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/pythoncad
Reply | Threaded
Open this post in threaded view
|

Re: newb - closed polyline

Art Haas
On Mon, May 07, 2007 at 02:51:56PM -0700, Carl Trachte wrote:
> Art,
>
> Thanks.  One more newb question - how do you do point snap when doing this?
> In other words, how do you snap to the exact location of the first point in
> the polyline?

If you click near it, the program will automatically "snap" to the
point. There is an option in the Preferences dialog named 'Highlight
Points'. If it isn't already on, turn it on and you'll see little boxes
around each Point entity. If you click within the box then the "snap"
should occur. If it doesn't happen you've most likely found a bug.

> If this is in the FAQ or the doc, please point me in the right direction and
> I'll research it further.
>
> I haven't looked at the code yet either.  If there's a spot there that makes
> it clear, I'm more than willing to investigate.

You wrote earlier that you are using the R28 release. That release is
quite old and a number of bugs have been fixed, plus various
improvements to the program have been added. I'm not familiar
with the BSD ports system to know if a newer releases is available, but
if so I'd try to use it. If you don't mind pulling the code straight
from the public Subversion repo that would be an even better choice.

Art Haas
--
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822
_______________________________________________
PythonCAD mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/pythoncad
Reply | Threaded
Open this post in threaded view
|

Re: newb - closed polyline

Carl Trachte
Thanks, again, Art.  I'll get to work.

I'm trying to get pythoncad set up under Cygwin.  If I have any luck with that, I'll probably have more questions.  

For now, the BSD port, although a bit dated, at least gives me a working app that I can get started on.

Carl T.

On 5/7/07, Art Haas <[hidden email]> wrote:
On Mon, May 07, 2007 at 02:51:56PM -0700, Carl Trachte wrote:

You wrote earlier that you are using the R28 release. That release is
quite old and a number of bugs have been fixed, plus various
improvements to the program have been added. I'm not familiar
with the BSD ports system to know if a newer releases is available, but
if so I'd try to use it. If you don't mind pulling the code straight
from the public Subversion repo that would be an even better choice.




_______________________________________________
PythonCAD mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/pythoncad
Reply | Threaded
Open this post in threaded view
|

Re: newb - closed polyline

Carl Trachte
I've got the latest source from the subversion repository and I'm using it with Python 2.4 in Cygwin.

What I can do is draw an open polyline, then draw a segment that snaps to the two polyline endpoints (the snap works as you, Art, described, and colors the snapped point location box a different color than the other points - in my case it's default blue versus default yellow).

What I haven't yet figured out is how to make the segment part of the polyline.

Thancad (a Tkinter based Python CAD app) was actually designed for this sort of thing.  I corresponded with its author briefly.  It's not a bad tool for what I'm doing, but development on it has, as far as I know, stopped back in 2004.

Is this the sort of thing worth trying to incorporate into PythonCAD, or is PythonCAD's audience less of a GIS crowd, and more of a circuit board drawing group?

Thanks for suffering more questions.

Carl T.

On 5/7/07, Carl Trachte <[hidden email]> wrote:
Thanks, again, Art.  I'll get to work.

I'm trying to get pythoncad set up under Cygwin.  If I have any luck with that, I'll probably have more questions.  

For now, the BSD port, although a bit dated, at least gives me a working app that I can get started on.

Carl T.

On 5/7/07, Art Haas <[hidden email]> wrote:
On Mon, May 07, 2007 at 02:51:56PM -0700, Carl Trachte wrote:

You wrote earlier that you are using the R28 release. That release is
quite old and a number of bugs have been fixed, plus various
improvements to the program have been added. I'm not familiar
with the BSD ports system to know if a newer releases is available, but
if so I'd try to use it. If you don't mind pulling the code straight
from the public Subversion repo that would be an even better choice.





_______________________________________________
PythonCAD mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/pythoncad
Reply | Threaded
Open this post in threaded view
|

Re: newb - closed polyline

José Antonio Martín Prieto
I think that Carl is right. When you're drawing a polyline, the boxes
that should appear around the endpoints does not appear until you
finish the polyline. So I think there is no way to make a closed
polyline.

Jose.

On 5/10/07, Carl Trachte <[hidden email]> wrote:

> I've got the latest source from the subversion repository and I'm using it
> with Python 2.4 in Cygwin.
>
> What I can do is draw an open polyline, then draw a segment that snaps to
> the two polyline endpoints (the snap works as you, Art, described, and
> colors the snapped point location box a different color than the other
> points - in my case it's default blue versus default yellow).
>
> What I haven't yet figured out is how to make the segment part of the
> polyline.
>
> Thancad (a Tkinter based Python CAD app) was actually designed for this sort
> of thing.  I corresponded with its author briefly.  It's not a bad tool for
> what I'm doing, but development on it has, as far as I know, stopped back in
> 2004.
>
> Is this the sort of thing worth trying to incorporate into PythonCAD, or is
> PythonCAD's audience less of a GIS crowd, and more of a circuit board
> drawing group?
>
> Thanks for suffering more questions.
>
>  Carl T.
>
>
> On 5/7/07, Carl Trachte <[hidden email]> wrote:
> > Thanks, again, Art.  I'll get to work.
> >
> > I'm trying to get pythoncad set up under Cygwin.  If I have any luck with
> that, I'll probably have more questions.
> >
> > For now, the BSD port, although a bit dated, at least gives me a working
> app that I can get started on.
> >
> > Carl T.
> >
> >
> > On 5/7/07, Art Haas < [hidden email]> wrote:
> > > On Mon, May 07, 2007 at 02:51:56PM -0700, Carl Trachte wrote:
> > >
> > > You wrote earlier that you are using the R28 release. That release is
> > > quite old and a number of bugs have been fixed, plus various
> > > improvements to the program have been added. I'm not familiar
> > > with the BSD ports system to know if a newer releases is available, but
> > > if so I'd try to use it. If you don't mind pulling the code straight
> > > from the public Subversion repo that would be an even better choice.
> > >
> > >
> > >
> >
> >
>
>
> _______________________________________________
> PythonCAD mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/pythoncad
>
>


--
"In a world without frontiers, who needs Gates and Windows?
_______________________________________________
PythonCAD mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/pythoncad
Reply | Threaded
Open this post in threaded view
|

Re: newb - closed polyline

Art Haas
In reply to this post by Carl Trachte
On Thu, May 10, 2007 at 09:09:25AM -0700, Carl Trachte wrote:

> I've got the latest source from the subversion repository and I'm using it
> with Python 2.4 in Cygwin.
>
> What I can do is draw an open polyline, then draw a segment that snaps to
> the two polyline endpoints (the snap works as you, Art, described, and
> colors the snapped point location box a different color than the other
> points - in my case it's default blue versus default yellow).
>
> What I haven't yet figured out is how to make the segment part of the
> polyline.

Right now you can't. There isn't a way (yet) to combine the two entities
into a single polyline.

I've also poked around the code and know why the behavior you've
described happens. The code for drawing the Polylines is in the
'gtkentities.py' file, specifically the polyline_button_press_cb()
function. There is a test to see if a point is found near the x/y
coordinates where the mouse was clicked. When the polyline is being
created, though, any new point being added to Layer for the polyline
doesn't get created until after the final mouse click happens, so
the test "fails" in that the soon-to-be added point doesn't yet exist. A
possible fix is to examine the coordinates of the to-be-created
Polyline and see if the latest mouseclick lands near enough so that
those coordinates will be used.

> Thancad (a Tkinter based Python CAD app) was actually designed for this sort
> of thing.  I corresponded with its author briefly.  It's not a bad tool for
> what I'm doing, but development on it has, as far as I know, stopped back in
> 2004.

I'd heard of this program but haven't followed it.

> Is this the sort of thing worth trying to incorporate into PythonCAD, or is
> PythonCAD's audience less of a GIS crowd, and more of a circuit board
> drawing group?

I'm hoping that PythonCAD eventually appeals to any and every crowd
needing CAD software.

> Thanks for suffering more questions.

No problem. Keep 'em coming.

Art
--
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822
_______________________________________________
PythonCAD mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/pythoncad