Editing problem
Editing problem
I'm working on a 2.2 MB file converted to svg from CorelDraw X7. The file is a railway map, and for the most part the conversion seems to have worked (though problems with text, about which I'll be writing a separate plea for help!). However, I used a small rectangle in CorelDraw to use across lines at 90 degrees at the point of meeting as the marker of a junction-point between two lines. When I click on one of these and look at Object Properties, I find that I've got a "path", not a "rect", even though there are four nodes, not two. (There's no fill - the stroke thickness makes it look like a solid object.) In terms of just looking at the file, there is no problem, but when I edit the map and either duplicate one of these symbols to add a new one or rotate to some extent one of the existing ones, a triangle gets thrown off, out from one of the ends. The number of nodes and their place has not changed. What I'd like to know is how to stop this happening, or if it must happen, how to edit it out quickly and simply -- I can't find a way. An example of the object in question is in the attached file, as a tiny speck in the middle -- substantial magnification required!
- Attachments
-
- Problem example.svg
- Example of my problem -- magnify hugely to see!
- (1.91 KiB) Downloaded 170 times
Re: Editing problem
There are 5 nodes in that example path, which, has a large miter limit set.
Try selecting the "double node" -at the top corner-, with the node tool
delete segment between two non-endpoint nodes -
-
join (merge) selected endnodes -
-.
Try selecting the "double node" -at the top corner-, with the node tool
delete segment between two non-endpoint nodes -

join (merge) selected endnodes -

Re: Editing problem
Thank you very much for that. It makes me wonder how some but not all of these acquired the extra node! It would be a massive undertaking to edit them all separately, so I'll have to try and find a way of doing a Find & Replace to put in a new symbol for the whole lot. But that's by the way. How did you recognise that the node in the top corner was a double node? Was it from the fact that it is a slightly smaller square than the other three?
Re: Editing problem
Yes, that is one hint on more nodes at the exact same place.
Also at the bottom, the indication bar tells there are 5 nodes of the path.
You can use the find panel (Ctrl+F) to select all objects with the same attribute, like
stroke-miterlimit:22.92558479 or
stroke-width:0.35437387
(values taken by the xml editor, Shift+Ctrl+X).
Depending on your needs a custom marker may work instead of separate paths alike.
Also at the bottom, the indication bar tells there are 5 nodes of the path.
You can use the find panel (Ctrl+F) to select all objects with the same attribute, like
stroke-miterlimit:22.92558479 or
stroke-width:0.35437387
(values taken by the xml editor, Shift+Ctrl+X).
Depending on your needs a custom marker may work instead of separate paths alike.
Re: Editing problem

Re: Editing problem
May I come back with a follow-up? I want to try and find the 5-node objects. Can I search by node-count, and if so, what is the expression (I have been unable to find it)? "stroke-miterlimit" and "stroke-width" as suggested don't work because absolutely the only difference between the two classes of object is 4 nodes versus 5 nodes. The various Select options don't seem to differentiate between the 4- and 5-node versions. Sorry to be such a nuisance with this ....
Re: Editing problem
Not an automated way of doing this I'm afraid.
But, as you are more interested in finding those with "double nodes", you can try making a custom marker to make it easier.
A simple circle, with no stroke but red fill, and a 50% opacity converted to a marked would result showing the problematic parts with darker shades -just select all the paths and set the new marker to start and middle nodes (in 0.48 you had to set a default marker before the custom one appearing in the dropdown list of the markers).
But, as you are more interested in finding those with "double nodes", you can try making a custom marker to make it easier.
A simple circle, with no stroke but red fill, and a 50% opacity converted to a marked would result showing the problematic parts with darker shades -just select all the paths and set the new marker to start and middle nodes (in 0.48 you had to set a default marker before the custom one appearing in the dropdown list of the markers).
Re: Editing problem
Thanks once again. I'm finding problems in creating a new marker (despite what you say in your last line and what is in the Manual), so this is going to need some time to experiment a little further. (I've also tried various ways of doing Find & Replace by opening the file in a text-editor, but have found no way of getting my desired result that way round. Still, it makes an interesting diversion when I've been to a standstill trying to edit text on path as the whole system slows to breaking point!) All good fun!
Re: Editing problem
Maybe the example can make it clearer:
Re: Editing problem
Hi! Yes, that's exactly what I thought you meant, and that would be very helpful indeed in identifying the problem items. My difficulty with it is (and (I've just had another try) that "Object to Marker" is not creating a custom marker for me, even after I've tried putting another marker from the official list in first. If I look in the /share/markers file, there's only an empty document markers.svg there -- not trace of the customer marker I should just have created (which needless to say is not on offer on the drop-down lists either).
Re: Editing problem
Hi
Try this;
Select all -( Ctrl A )
Perform a Path - Union ( Ctrl + ) - Plus on numpad.
Perform a Path - Break Apart ( Shift Ctrl K )
All your "Five Node Objects" or objects with overlapping nodes will now have the "excess nodes removed".
Try this;
Select all -( Ctrl A )
Perform a Path - Union ( Ctrl + ) - Plus on numpad.
Perform a Path - Break Apart ( Shift Ctrl K )
All your "Five Node Objects" or objects with overlapping nodes will now have the "excess nodes removed".
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: Editing problem
Hello,
It's interesting this topic!...
First, try to isolate your problematic paths (in a layer, sub layer or group). And them try the simplify command (Ctrl + L). It worked with your example.
About find 4 nodes paths, or 5 nodes paths...mmm... could it be possible??
It's interesting this topic!...
First, try to isolate your problematic paths (in a layer, sub layer or group). And them try the simplify command (Ctrl + L). It worked with your example.
About find 4 nodes paths, or 5 nodes paths...mmm... could it be possible??
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
Re: Editing problem
Hi.
Sure, a small extension to go through all the objects counting the number of nodes in each object would do the job.
Optionally it could also reduce the number of nodes in the "bad" objects according to a set of predefined rules, - (depending on what the original objects looks like.)
hulf2012 wrote:About find 4 nodes paths, or 5 nodes paths...mmm... could it be possible??
Sure, a small extension to go through all the objects counting the number of nodes in each object would do the job.
Optionally it could also reduce the number of nodes in the "bad" objects according to a set of predefined rules, - (depending on what the original objects looks like.)
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: Editing problem
Thanks for the further suggestions. Ctrl and A, Ctrl and numerical +, Ctrl and K seemed to work for the first two stages, but then reverted in the third. Ctrl and L works, but needs the problem items to be identified first -- and that is the problem. There are just short of 700 of these items and they are very small, so their node-structure can only be seen at high magnification. They are randomly scattered throughout the total, seemingly fewer than 5%. So the identification is a problem. I attach a section (just a section) of two layers of the map shewing the lines for locating purposes and the junction-markers which are the problem. I know there is at least one of the problem shapes here .... I suspect the only serious answer is going to be to leave it and deal with each problem as it shews itself, on an individual basis. (If I had been starting from scratch in Inkscape I should have used a symbol, and I did indeed use a symbol in the CorelDraw original - but that's not how they came across in the transfer from one program to another.)
- Attachments
-
- TEST MAP.svg
- (255 KiB) Downloaded 165 times
Re: Editing problem
Hello
Ragstian:
Yes, an extension will do the job... do you want to do it ?
. What I can tell you is that python lxml library, as far as I know, have special methods or functions to do special text search. And the "inkex.py" library I believe it converts the "d" attribute in a list, or a table of all the points. And don't forget to mention that python have other modules to work with strings of text...
After examining the "d" atribute made on Inkscape, I see that points are separated by commas, at least in my version.
But I was wondering If The find tool you can use "regular expresions"... like it's shown here:
http://www.regular-expressions.info/tutorial.html
But My guess the answer is no.
Rinbad:
The simplification command can be used in a group of paths, and it can be configured to limitate its power (please consult the Inkscape Guide)... Give a try... If doens't work, perform Ctrl+Z
About doing the search by number of points... the solution may take a long time
Ragstian:
Yes, an extension will do the job... do you want to do it ?

After examining the "d" atribute made on Inkscape, I see that points are separated by commas, at least in my version.
But I was wondering If The find tool you can use "regular expresions"... like it's shown here:
http://www.regular-expressions.info/tutorial.html
But My guess the answer is no.
Rinbad:
The simplification command can be used in a group of paths, and it can be configured to limitate its power (please consult the Inkscape Guide)... Give a try... If doens't work, perform Ctrl+Z
About doing the search by number of points... the solution may take a long time
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
Re: Editing problem
Nothing doing, I fear, so it's going to be a question of dealing with things one by one as they shew up. But as one who had no familiarity at all with svg "under the hood" until these last days I've found a question that I wonder if anyone could answer for me. As I wrote, the file I'm dealing with was create in CorelDraw and exported in svg from that program. I used two symbols in the original (and used separate layers for each). The code for these in the present Inkscape file is:
<path
inkscape:connector-curvature="0"
id="path20711"
style="display:inline;fill:none;stroke:#000000;stroke-width:0.28349999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:22.92558479;stroke-dasharray:none;stroke-opacity:1"
d="m 0.1417,0.222 1.8221,0 0,-0.0803 -1.8221,0 0,0.0803 z"
transform="matrix(-0.4078125,1.1816125,1.1816125,0.4078125,1803.7836,3589.265)" />
for the one I have been asking about in this thread, and for the other:
<path
inkscape:connector-curvature="0"
id="path8143"
style="fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:0.28349999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:22.92558479;stroke-dasharray:none;stroke-opacity:1"
d="m 1.1044,2.067 c 0.5315,0 0.9626,-0.4311 0.9626,-0.9626 0,-0.5315 -0.4311,-0.9627 -0.9626,-0.9627 -0.5315,0 -0.9627,0.4312 -0.9627,0.9627 0,0.5315 0.4312,0.9626 0.9627,0.9626 z"
transform="matrix(1.25,0,0,-1.25,2303.1914,3543.3701)" />
In both cases the "d" line is the same for all instances of the shape (former symbol) whilst the "transform" line varies. Am I right to assume that the "d" line simply sets the size, independent of position, whilst the "transform" line sets the position as well as any rotation etc?
Please forgive me if this is something that should be blindingly obvious to me!
<path
inkscape:connector-curvature="0"
id="path20711"
style="display:inline;fill:none;stroke:#000000;stroke-width:0.28349999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:22.92558479;stroke-dasharray:none;stroke-opacity:1"
d="m 0.1417,0.222 1.8221,0 0,-0.0803 -1.8221,0 0,0.0803 z"
transform="matrix(-0.4078125,1.1816125,1.1816125,0.4078125,1803.7836,3589.265)" />
for the one I have been asking about in this thread, and for the other:
<path
inkscape:connector-curvature="0"
id="path8143"
style="fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:0.28349999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:22.92558479;stroke-dasharray:none;stroke-opacity:1"
d="m 1.1044,2.067 c 0.5315,0 0.9626,-0.4311 0.9626,-0.9626 0,-0.5315 -0.4311,-0.9627 -0.9626,-0.9627 -0.5315,0 -0.9627,0.4312 -0.9627,0.9627 0,0.5315 0.4312,0.9626 0.9627,0.9626 z"
transform="matrix(1.25,0,0,-1.25,2303.1914,3543.3701)" />
In both cases the "d" line is the same for all instances of the shape (former symbol) whilst the "transform" line varies. Am I right to assume that the "d" line simply sets the size, independent of position, whilst the "transform" line sets the position as well as any rotation etc?
Please forgive me if this is something that should be blindingly obvious to me!
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Editing problem
rinbad wrote: Am I right to assume that the "d" line simply sets the size, independent of position, whilst the "transform" line sets the position as well as any rotation etc?
Here is some info on transforms in the XML:
http://tavmjong.free.fr/INKSCAPE/MANUAL ... sforms-Xml
Inside that section is a link to the matrix info.
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/