[PythonCAD] pythoncad drawing

Art Haas ahaas at airmail.net
Tue Jul 27 17:53:29 CEST 2004

On Tue, Jul 27, 2004 at 10:35:07AM -0500, Eric Wilhelm wrote:
> # The following was supposedly scribed by
> # Art Haas
> # on Tuesday 27 July 2004 09:44 am:
> >> 4. ?I find the point-table concept somewhat ?objectionable. ?Unless you
> >> are aiming for relational drafting, it seems somewhat overkill.
> >
> >?
> >???
> If this is associative or relational drafting, then you have a circle with a 
> center point, and a segment which uses that same point plus another point.  
> If you move the circle, the segment moves.  If you move the segment, the 
> circle moves.  (Actually, you are moving the point, which is being shared 
> between entities.)  Is this a behavior you were aiming for?

No. I just tried doing some simple moves things and only the one entity
I click on to move is moved. I made a circle, then drew a segment which
used the center point, then when to 'Modify'->'Move'->'Horizontal'. I
then made two mouse clicks to define the distance, then I clicked on the
circle. It moved, and the segment did not. Doing a move operation on the
segment left the circle in place.

How are you doing the move? Are you drawing a box around the entities?

> I think it is mainly an issue about importing geometry.
> Without digging into the code, I can offer this example:
>  http://ericwilhelm.homeip.net/uber-converter/examples/dup_points.xml
> pythoncad doesn't like loading this hand-modified file.  I'm guessing that it 
> (the use of a point table) has something to do with your snap scheme.
> dwg and dxf files are going to have points stored in each entity, even if
> they are matching points.  Because of round-off error, it seems that you
> would have an expensive point-comparison task to import a large dwg/dxf into 
> pythoncad.

There will have to be some sort of testing involved when loading in a
DWG/DXF file because of the file's way of storing points. I don't
believe doing a test to look for an existing point when loading a new
entity from one of these files will be that bad though. At least I hope
that is the case.

> Also, what is the relationship between points on different layers?  If there 
> can be duplicated points on separate layers, then you don't have the 
> associativity between objects on different layers.  That seems somewhat 
> inconsistent.  To be consistent, you would need a global points table instead 
> of per-layer.

Objects that are on different layers have no associativity in regards to
sharing points. That is, you can't make an entity with some of its
points in one layer, and other points in another. Dimensions are the
only entities that can span layers.

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

More information about the PythonCAD mailing list