As a few of you know I have been trying to code skeletal strokes (vector only) for inkscape. As of now ( and for a little while) I have been stuck. I have coded the coordanite difference function, which is the basis of the whole idea. I'm current trying to code the Path difference function. I have looked at both NR::Path and livarot's Path classes. NR::Path doesn't seem to be what I need. Livarot on the other seemed to be what i need. But I'm just not understanding (grokking) how to use it for what I want. Let me explain what path difference function should do.
<psuedo-code> path PathDiff(path1,path2){ path pathTemp; // really needs to have a node adding function to work correctly and // so both pathes have he same number of nodes, but you'll get the point pathTemp.startnode=coorddiff(path1.startnode, path2.startnode); pathTemp.starthandle=coorddiff(path1.starthandle, path2.starthandle); if node != path1.endnode{ // repeats until last node pathTemp.middlehandle1=coorddiff(path1.middlehandle1, path2.middlehandle1); pathTemp.middlenode=coorddiff(path1.middlenode, path2.middlenode); pathTemp.middlehandle2=coorddiff(path1.middlehandle2, path2.middlehandle2); else pathTemp.endhandle=coorddiff(path1.endhandle, path2.endhandle); pathTemp.endnode=coorddiff(path1.endnode, path2.endnode); return pathTemp; </psuedo-code>
Basicly I need help understanding how to do this with whatever is the correct class is. Any help, *pointers, or advice welcome. I would like to have the basics in 0.43 but at this rate it might not be until 0.50
Thanks josh blocher verbalshadow
p.s. sorry about the state of the psuedo-code if it's not understandable.
Mental or Peter, could you take a look at what verbal shadow is trying to do and offer a suggestion? It sounds fairly straightforward but I have to admit I don't know enough about NR::Path to give an answer.
Bryce
On Fri, Aug 05, 2005 at 11:12:31PM +0400, Joshua Blocher wrote:
As a few of you know I have been trying to code skeletal strokes (vector only) for inkscape. As of now ( and for a little while) I have been stuck. I have coded the coordanite difference function, which is the basis of the whole idea. I'm current trying to code the Path difference function. I have looked at both NR::Path and livarot's Path classes. NR::Path doesn't seem to be what I need. Livarot on the other seemed to be what i need. But I'm just not understanding (grokking) how to use it for what I want. Let me explain what path difference function should do.
<psuedo-code> path PathDiff(path1,path2){ path pathTemp; // really needs to have a node adding function to work correctly and // so both pathes have he same number of nodes, but you'll get the point pathTemp.startnode=coorddiff(path1.startnode, path2.startnode); pathTemp.starthandle=coorddiff(path1.starthandle, path2.starthandle); if node != path1.endnode{ // repeats until last node pathTemp.middlehandle1=coorddiff(path1.middlehandle1, path2.middlehandle1); pathTemp.middlenode=coorddiff(path1.middlenode, path2.middlenode); pathTemp.middlehandle2=coorddiff(path1.middlehandle2, path2.middlehandle2); else pathTemp.endhandle=coorddiff(path1.endhandle, path2.endhandle); pathTemp.endnode=coorddiff(path1.endnode, path2.endnode); return pathTemp; </psuedo-code>
Basicly I need help understanding how to do this with whatever is the correct class is. Any help, *pointers, or advice welcome. I would like to have the basics in 0.43 but at this rate it might not be until 0.50
Thanks josh blocher verbalshadow
p.s. sorry about the state of the psuedo-code if it's not understandable.
participants (2)
-
Bryce Harrington
-
Joshua Blocher