Simple line drawings

Post questions on how to use or achieve an effect in Inkscape.
28martin
Posts: 5
Joined: Fri Sep 21, 2012 7:49 pm

Simple line drawings

Postby 28martin » Tue Sep 25, 2012 1:20 am

Hi All. I'm not sure that Inkscape is the right program for what I need to do, which is, to illustrate my book on basic electricity.
I need to do some very basic line drawings. No colors, no grey shades, nothing fancy.
Lets say I want to show a wire (two parallel straight lines) through a toroid (two concentric circles).
Now, on one side of the toroid, the wire is on top. On the other side, the wire is below the toroid.
I should be able to erase the bit of wire on one side of the toroid, and on the other side I want to erase the bit of toroid under the wire.
I can't find a way to do this.
Also sometimes, I want to lengthen an existing straight line, to meet another object,(touching, but not crossing).
I remember seeing this done a long time ago,and it seemed quite easy, but I don't remember what program was used. Probably Autocad - which I will never be able to afford.
Any helpful suggestions would be greatly appreciated.
Many thanx.
Martin.

generatemutate
Posts: 39
Joined: Thu Aug 23, 2012 5:48 am

Re: Simple line drawings

Postby generatemutate » Tue Sep 25, 2012 3:02 am

Hi 28martin

I'm not 100% sure what you need. It is easy to remove part of objects.

One method is to edit the nodes, by double clicking.

Another is to cut bits off 'solid' objects. see Boolean operations at-
http://inkscape.org/doc/advanced/tutorial-advanced.html

If you have a path you want to cut, go to the Path menu,
use 'object -> Path' then 'stroke -> Path'

---

You can use snap to node to snap to another path/object. Also you may find the grid handy if your not already.
here's some ready symbols
http://www.mbeckler.org/inkscape/circuit_symbols/ (use save target on the page)

hope that helps...

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Simple line drawings

Postby druban » Tue Sep 25, 2012 9:48 am

28martin wrote:Lets say I want to show a wire (two parallel straight lines) through a toroid (two concentric circles).
Now, on one side of the toroid, the wire is on top. On the other side, the wire is below the toroid.
I should be able to erase the bit of wire on one side of the toroid, and on the other side I want to erase the bit of toroid under the wire.

Not possible. Object A cannot be both under and on top of object B. When you see vector illustrations that look like this object A or object B is always made up of 2 objects (or an object that is discontinuous at the crossing point).

Also sometimes, I want to lengthen an existing straight line, to meet another object,(touching, but not crossing).

Use the :tool_node: to ctrl-alt-drag (this restricts the movement of the node to its tangent) the end node of the path you want to lengthen until it snaps to the path you want it to end at. You will have to enable the appropriate snap in your snap toolbar.
Your mind is what you think it is.

User avatar
shawnhcorey
Posts: 149
Joined: Mon Jan 07, 2008 12:17 pm

Re: Simple line drawings

Postby shawnhcorey » Wed Sep 26, 2012 12:39 am

You need to divide an object into two parts. From what you typed, it would probably be easier to use multiple wires to get the look you want. Are you using a grid? It makes lining up things easier.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Simple line drawings

Postby brynn » Wed Sep 26, 2012 4:16 am

If line drawings is what you want, then Inkscape is your answer! When I first read your questions, I had something in mind that Inkscape can surely do. But I see that others have interpretted your description in other ways.

druban says (in part)
druban wrote:Not possible. Object A cannot be both under and on top of object B.

That's not even possible in real life, lol!

It might be helpful if we could see an example of what you want to do. I thought you had 2 concentric circles with a vertical or diagonal line across them, and you wanted to delete the part of the line inside the circles. Then one line will touch the top and one line will touch the bottom. But I don't think that's right either.

Question -- Is the toroid shown in simulated 3D, so that if we're looking at it say from a 45 degree angle to the face of the 2 concentric circles (like if you spin a coin on a table and it stops 45 deg to the face of the coin, and doesn't fall over). In reality, a wire goes through the center, but to illustrate this, part of the line needs to be "under" and another part "over" the concentric circles? If that's the case, you can't do it with a single line. It's like druban said, you may need 2 lines wires. But I'm really guessing about your siuation.

Oh! How funny! I just looked up "toroid" in Wikipedia. By chance, I drew something like a "torus" some time ago. I called it a tiny atom smasher! (viewtopic.php" onclick="readonly();return false;"text-decoration: underline">Alice's Restaurant where Arlo Guthrie talks about the black and white photos of the littering crime, with lines and arrows, lol!)
Last edited by brynn on Wed Sep 26, 2012 10:15 am, edited 1 time in total.
Reason: "lines" to "wires"

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Simple line drawings

Postby druban » Wed Sep 26, 2012 5:36 am

Off topic:
brynn wrote:
Not possible. Object A cannot be both under and on top of object B.

That's not even possible in real life, lol!

Hmm. i'm sure I can think of lots of things that actually are that way but an omelette keeps coming to mind. It must be lunchtime!
On a more serious note, this of course is a frequent problem in any two dimensional graphic medium trying to represent the real world. Think of a knot, an example of a single object which is both in front of and behind .... itself!
Your mind is what you think it is.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Simple line drawings

Postby brynn » Wed Sep 26, 2012 10:12 am

Off topic:
druban wrote:[offtopic]
brynn wrote:
Not possible. Object A cannot be both under and on top of object B.

That's not even possible in real life, lol!

Hmm. i'm sure I can think of lots of things that actually are that way but an omelette keeps coming to mind. It must be lunchtime!
On a more serious note, this of course is a frequent problem in any two dimensional graphic medium trying to represent the real world. Think of a knot, an example of a single object which is both in front of and behind .... itself!


Well I was just teasing, really. I probably should have used :P instead of lol. But you're right. If Object A can be folded, of course this is possible. But folding isn't an option in this case. And of course I understand about representing 3D in 2D. I agreed with you about what might be the solution.
[/offtopic]

PS -- I can't seem to make the nested off topic tags work, but this whole reply is off topic :D

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Simple line drawings

Postby Xav » Wed Sep 26, 2012 9:58 pm

28martin wrote:Lets say I want to show a wire (two parallel straight lines) through a toroid (two concentric circles).


Attached is a quick drawing of a toroidal transformer (albeit an isolating transformer, as I've used the same number of turns on each side). It's not quite what you're asking for, as I've only drawn the wires as a single path, but shows the basic approach.

On the left I've made up the turns from multiple separate paths. For what you want, this would probably be the easiest approach. In fact for what you want I would draw the wire as a thick line made up of separate paths, get it into about the right shape, then use Path > Stroke to Path to give you a more complex path that you can fill and stroke to look more like a wire (though you'll need to do some tidying up with :tool_node: ).

On the right is an alternative approach which is probably overkill for your needs, but demonstrates how you can "hide" parts of a path if they need to go under something else. In this case the wire is a single path with a clipping path applied to it to hide the parts that are "behind" the toroid. Right click on the wire and "Release Clip" to see what's going on.
Attachments
toroidal_transformer.svg
Toroidal transformer
(5.76 KiB) Downloaded 275 times
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

28martin
Posts: 5
Joined: Fri Sep 21, 2012 7:49 pm

Re: Simple line drawings

Postby 28martin » Mon Oct 01, 2012 8:56 pm

Thanx All. I forgot to mention that I am completely new to this Most of your replies are way over my head, so I'm packing it in. I tried many tutorials on Youtube and those in the manual, but I'm not getting anywhere.
Cheerrs and thanx again.

LindaJeanne
Posts: 8
Joined: Mon Aug 27, 2012 2:46 am

Re: Simple line drawings

Postby LindaJeanne » Mon Oct 01, 2012 10:04 pm

28martin wrote:Thanx All. I forgot to mention that I am completely new to this Most of your replies are way over my head, so I'm packing it in. I tried many tutorials on Youtube and those in the manual, but I'm not getting anywhere.
Cheerrs and thanx again.



28martin,

I have to dash off to catch the train, but I can give a more beginner-oriented description of how to do what I think you're trying to do this evening (if someone here doesn't beat me to it, which they very well might :))

LindaJeanne
Posts: 8
Joined: Mon Aug 27, 2012 2:46 am

Re: Simple line drawings

Postby LindaJeanne » Tue Oct 02, 2012 5:14 am

LindaJeanne wrote:
28martin wrote:Thanx All. I forgot to mention that I am completely new to this Most of your replies are way over my head, so I'm packing it in. I tried many tutorials on Youtube and those in the manual, but I'm not getting anywhere.
Cheerrs and thanx again.



28martin,

I have to dash off to catch the train, but I can give a more beginner-oriented description of how to do what I think you're trying to do this evening (if someone here doesn't beat me to it, which they very well might :))



Try this, and tell me if it does what you want.


A. Creating the Torus.
  • Choose the ellipse :tool_ellipse: tool. Hold the [ctrl] key down while you draw with it to force it to be a circle. Make it the outer edge of the torus.
  • Even if you want this white when you're done, I suggest you set it to another color for now, to make it easier to see what's going on.
    • Click a pale-but-not-white color in the palette bar at the bottom of the screen
  • Choose the select :tool_selector: tool. Re-select your circle if it became unselected.
  • Click the "duplicate" button (or hit [ctrl]-D) to duplicate the circle. It won't look like anything has changed, because your new circle is exactly on top of your old one.
  • Choose the ellipse :tool_ellipse: tool again. There will be small squares at the top and left of your circle, and a small circle on the right. Hold down the [ctrl] key (to force the ellipse to remain a circle) and drag one of the squares in to get the diameter of your inner circle.
  • Use the select :tool_selector: tool to adjust the placement of your inner circle if necessary.
    • Now, you don't want two circles on top of each other, but a torus. We can do that ;)
  • Using the select :tool_selector: tool, drag a box that fully contains BOTH circles, so that both are selected.
  • From the "Path" menu, choose "difference" (or hit [ctrl] [minus sign - ]) If you set the circles to a different fill-color than the background, you will now see the background showing through the middle of the torus. Getting closer!

B. Creating the Wire
  • Choose the rectangle :tool_rectangle: tool, and draw a narrow rectangle where you want your wire to go.
  • Now, there are two things we need to fix:
    • so far, the rectangle is on top of BOTH edges of the torrus instead of going through it, and
    • it's a rectangle -- when I think what you want is a pair of open-ended parallel lines, yes?
    • We can fix both these things :)
  • Select your torus again, and click the "Duplicate" button or hit [ctrl]-D.
    • THIS IS IMPORTANT. What we're about to do will make the new torus vanish, so we want to be working on a copy!
  • The "Duplicate" torus will appear entirely on top of your rectangle/wire.
  • Shift-click on the rectangle, so that both the new torus and the rectangle/wire are selected.
  • From the "Path" menu, choose "Division" (Or hit [ctrl][slash /])
The duplicate torus will vanish, and the rectangle will now be cut into five pieces, where the torus lines were. It may look like we're getting further away from the end result, but actually we're getting closer!

C. Fixing the Wire
  • Choose the segment of the wire that you want to be behind the torus. Select it by itself, and hit the delete key.
  • Now we need to get rid of the extra lines we added to the part of the wire in front of the torus.
    • There are three segments that we want to join back into a single segment.
    • Click the first to select it. Shift-click the second. Shift-click the third.
    • When all three are selected, go to the "Path" menu and choose "Union" (or hit [ctrl] [plus +]).
    • The three will merge back into one.
  • Almost there! Now we just need to get rid of those end-segments.

D. Getting rid of the end-segments to create two parallel lines (with fill between them)
  • Choose the node :tool_node: tool. select one end of the wire. nodes should appear at the corners and around the "round part" where it meets the torus.
  • Using the node :tool_node: tool, draw a rectangle around the two end-nodes; the ones you want to remove the line between.
  • On your command bar, should be an icon showing two little squares with a line between them, then an arrow pointing down, then two little squares WITHOUT the line between them. Click this button to delete the line-segment between your two selected nodes.
  • Select the other end of the wire. Draw another box to select those two end-nodes, and delete the line between them.
  • Now, switch back to the select :tool_selector: tool. Draw a box around everything, so that everything is selected. Now click white on the palette bar at the bottom of the screen, to make the fill the same color as the background so that you have simple line drawings.

This seems complicated, but as you get used to the software, many of these steps will become second-nature. Really :).


Return to “Help with using Inkscape”