[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: chickenpox: dia in LWN (again)



Le Fri, Mar 19, 2004, à 10:49:37AM +0100, Philippe Biondi a écrit:


> What abount an unique CP at the center of the figure that can receive as
> many connections as needed, and an algorighm to compute the output point
> of the figure (intersection with the "bounding shape") ?

This is also interesting, but won't be suitable to all kinds of objects (case
in point: UML Class). Hmmm. OK, I see, it would be an extra thingy, in
addition to the existing (or dynamic) CP's. 
I don't know how well this would play with autorouting (dia internal
autorouting, not graphviz), though.

> My problem is automatic placement. I've sent on this list a small Python
> program that can read a GraphViz autoplaced .dot and create a Dia grah.
> It is very simple and works great, except that :
> - I'm unable to chose the right connecting point
> - I lack connecting points (I need more that 50 for some networks)

I think I see what you mean. In that specific case, there may be a different
way to pursue, provided all the necessary bindings are exposed to PyDia:
	1. use the .dot, pretending there's a connection point in the centre
of every object.
	2. the prerequisites for chickenpox mode will make reasonably easy
to get the object's closest edge point from a given point. From that, it
shouldn't be difficult to develop the algorithm a little further to get an
object's list of intersections between its edges and a given segment.
	3. for each segment placed by dot and connected to an object, get the 
list of edge intersections. Pick out the edge intersection closest to the
other end of the segment [the edge intersection finder will need to be
exposed to PyDia]
	4. create a dynCP on the object at the point you just found; move
the end of the segment to that new dynCP [the dynCP API will need to be 
exposed to PyDia]

	-- Cyrille

-- 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK