gotcha

Author Topic: bend a pipe  (Read 11270 times)

January 22, 2016, 12:31:43 PM
Read 11270 times

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Hi Friends,
Here's another situation where I'm hoping to get some tips on this subject, rather than having tips to offer.  I want to make a believable bend in a pipe, or metal rod, or like a chain link.  This is related to a topic at IF:  http://www.inkscapeforum.com/viewtopic.php?f=5&t=21000

For this, I'm just interested in making a correct bend.  If I can get the shadow/blur to work, I'll post in that topic.  But for this one, how to make the bend right.

Here are some screenshots, to illustrate.  First, I have it with straight sides:

bp.png
*bp.png
(34.69 kB . 644x493)
(viewed 2099 times)


If  I simply change corner nodes to smooth, it puts a bend in part of the pipe/rod that needs to remain straight.

bp2.png
*bp2.png
(41.88 kB . 604x491)
(viewed 1886 times)


Somehow I need the side to stay straight, and the curve can only start near the corner.  For now, I'm thinking about adding more nodes to the sides. 

bp3.png
*bp3.png
(31.37 kB . 575x462)
(viewed 1916 times)


But still, if all I do is change a corner node to smooth, it puts the curve in the wrong place.

bp4.png
*bp4.png
(19.17 kB . 664x391)
(viewed 1907 times)


So I'm thinking about using a circle, to make the right kind of curve.  Something like this:

bp5.png
*bp5.png
(44.5 kB . 777x427)
(viewed 1864 times)


But how to decide what size circle is needed?  There must be some kind of ratio, relative to the angle of the bend, that determines how large of a circle would be needed.  Plus, the bend at the outer side must be a larger circle than the bend on the inner side. 

If it was a right angle (like the top of a capital f (F), I would line up the top and left nodes of the circle to the top and left side of the right angle.  I think??  Since this is 135° angle.....  Hhmm....  There must be a way to use the Ellipse tool to draw the exactly correct arc for the corner...

Hhmm.  If I center the circle on the midpoint of this black line (where black arrow points)

bp6.png
*bp6.png
(35 kB . 512x345)
(viewed 1898 times)


then scale the circle until it touches both sides of the pipe/rod....that should work, right?  Aqua fill, red stroked circle.  Is that right?

bp7.png
*bp7.png
(52.53 kB . 807x461)
(viewed 1932 times)


But if it is, how to get the right size circle for the inner corner?  Is it the same circle??
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

January 22, 2016, 03:44:46 PM
Reply #1

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Hi.

All these banding is based on a "prismatic" rod.
Meaning that it has an axis and the "width" is the same from start to end. Which is equal to the shape on such image is built up by sort-of parallel lines.

Now, if you draw a bending radius on the corner smaller than the stroke's width, the inner side of the line won't have any arc.
Also all arcs are parallel in one bending, so the circles should be concentric.
For testing it you can look at paths with wide strokes and varying their widths.

January 22, 2016, 08:25:03 PM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
So you mean....  I make a path with a corner (135°), then stroke to path, and then add a stroke.   And I can use a stroke on that curved line  - a wide stroke, and the stroke will show what the arc should be?

Quote (selected)
Now, if you draw a bending radius on the corner smaller than the stroke's width, the inner side of the line won't have any arc.

There's not going to be a stroke.  I'm thinking "realism" again.  Do you mean the the inner curve will be a square corner?  I don't think so.....not with real metal.  Maybe in Inkscape it works like that.  But if you bent real metal, you would bend it around something.  I guess it would take the curve of whatever you used to bend it.  So maybe the inner curve wouldn't matter very much.

I can't think of anything I might have laying around my home where I could test a real-world example....  What I need is your "bent chrome rail" in real life.  Well, maybe I'll scrounge around.  OH!  What about....I think it's called a hex wrench.  It's pretty small, but I'll have a look at that.  Although it's a 90° corner.....  Time for a treasure hunt, lol!  (Also time for dinner   :-D)

Thanks for your comments  :)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

January 22, 2016, 09:26:15 PM
Reply #3

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Something similar.

January 23, 2016, 01:00:19 AM
Reply #4

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Thanks for the file.

Hhmm, maybe I could find some way to skew 2 round corner rectangles to the right angle, then difference them to achieve the proper inner curve? 

I found the hex wrench, but the inner curve is very different from the outer curve.  And I found a few curved metal rod-like objects, but the inner curve seems to have more to do with the tool that curved it.  So I think I may be left with my imagination, together with my current theory, that the inner curve and outer curve don't necessary have any relationship.

OH!  I just had another insight!

When you said the circles should be concentric, it didn't make sense.  Because in my examples above, the inner circle and outer circle aren't going to be sharing the same center.  But the center of the inner circle will lie on the same diagonal line, like the yellow circle below.  It will be smaller, of course, but how small to make it is the question.  And exactly where to put it.

bp8.png
*bp8.png
(33.82 kB . 457x317)
(viewed 1867 times)


I think the answer is the ratio between the lengths and/or heights of line A and line B below.  Or no...the ratio of the length of just the horizontal part of those lines.

bp9.png
*bp9.png
(51.12 kB . 580x502)
(viewed 1843 times)


Then I would use that ratio for 2 things -- to make the inner circle the right size, and where to place the center of that circle on the diagonal line.  And then I'll have to do that for each of the 3 to 5 pieces that will make a "unit"

Unless my idea about how big to make the outer circle, is wrong....??  Oh,  I'll do like you suggested, and make a round corner rectangle.  Wait, that won't work.  Because how do I know how rounded to make the corners?

I don't know.  But I think I can go further with the inner circle now.  Thanks again for your comments.  I'll let you know what happens.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

January 23, 2016, 01:13:00 AM
Reply #5

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Oh, I think I've got it.  Notice that aqua circle.  When it's centered on the diagonal line (which is the midpoint of the arc), it's widest point on the right is precisely on the (vertical) grid line that marks half the horizontal distance between the left and right curves.  That's how I can adjust the circle precisely!   I just have to find the correct place on the diagonal line for the center of the circle, and scale until the right side touches that vertical grid line.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

January 23, 2016, 03:19:42 AM
Reply #6

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
If the rod is prismatic, either the A or B curve can be good, but not both at the same time.
As you draw it the bending is much thicker than the rest.

For that 135° turns you can use the * tool and draw octagons  to try out similarly to that previous attached svg.

January 23, 2016, 04:29:31 AM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Oh, the A and B lines are just really thick to make it clear which paths I was talking about.  They aren't objects that will be part of the drawing.

Oh yeah, nested octagons would work.  But I already did it the hard way.  I have all the curves made, but still have to finish node editing the curves and take out the sharp corners.

I tried to search out "prismatic rod".  I found some "prismatic drilling rod", but it didn't look like what I was thinking of.  I found "prismatic rod of the scale" which appears to be part of an rpg???  And I found "Oscillations of a Prismatic Rod" which is an abstract for some scientific paper, but didn't show a picture.  What I mean by "rod" would be like a screwdriver where both the handle and the working end are cut off.  Or like straw that's solid in the middle.

Anyway, thanks again for your help  :D

Edit -- attached you can see the little curves
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

January 23, 2016, 04:42:16 AM
Reply #8

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
It's possible that I have missed the "jargon". The term prismatic I know was from the structural engineering field. Prismatic as having the same section along an axis. Maybe "even width" would be better wording.
(Cross section is defined as the section with the smallest area through "any given point" of the object/girder, and the axis is defined by the centroid of all the cross sections.)

January 23, 2016, 08:05:38 AM
Reply #9

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Some variants.

January 23, 2016, 08:09:55 AM
Reply #10

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I've been confused, because I think of a prism as a pyramid shaped piece of glass or crystal -- or just something that bends light.

After some searching, I finally found this:

"Characteristic of a solid figure in which the two ends are similar and parallel, with parallelograms for sides: used extensively in space frames covering open areas or large atrium areas."

That kind of explains how your background in architechture probably gave you that knowledge.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

January 23, 2016, 08:16:52 AM
Reply #11

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Thanks again for your files! 

At first, I thought I was looking for some geometric rules ("theorums"??).  But after much thinking outloud, I realized that the inner curve doesn't have to follow any rule.  Around my home, I've found examples of this kind of object, where the inner curve is everything from the 90° angle, to nearly identical curves.  Even some where the inner curve was an acute angle, like a sharp V shape.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

January 24, 2016, 02:32:35 AM
Reply #12

styxlawyer

  • Jr. Member

  • Offline
  • ***

  • 13
  • Gender
    Male

    Male
Writing as a retired engineer who has "bent" lots of pipes and rods, in real life the two circles will always be concentric and separated by the thickness of the pipe. Also, the centre of the bend circles will be on a line perpendicular to the pipe and not at a diagonal. In the case where you have a 90 dgeree inner bend it means the inner circle is very small, but the outer circle will still be concentric.

In the attached drawing the pipe with a right-angle bend is yellow and the bending is shown by two concentric circles - green for the inner radius and purple for the outer radius. The thickness of the pipe doesn't change, only the bending radii.


Bends.svg
*Bends.svg
(4.51 kB - downloaded 1881 times)

January 24, 2016, 10:45:19 AM
Reply #13

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Thanks for the info styxlawyer!

When you say the center of the circle should be on a line perpendicular to the pipe -- perpendicular to which side?

I was only guessing when I decided where the circle should be.  That diagonal line is what I would call the center of the bend angle.  So the angle is 135, then the diagonal line is 67.5.

If that line should be perpendicular to the pipe, which side of the pipe?  Or are there 2 perpendicular lines on both sides of the bend....  Well, as long as the perpendicular lines are the same distance from the bend, then the intersection of those 2 perpendicular lines is also where my diagonal line intersects them.  And where you place the perpendicular lines determines the radius of the circle.

So I guess it works both ways!

In the end, what I did was use the same circle.  I made the circle for the outer curve, then broke the circle where it touched the sides of the pipe.  Then I duplicated that arc, centered it on my diagonal line, and scaled it to fit each piece.  Is saw that as better than drawing 6 circles and editing all 6.

If I had seen Lazur's files in time, I think the nested hexagon would have been a faster way.  But I was too deep into my own solution, before I saw his file and understood his comments.

In my examples the measurements are all off by a tiny amount, because the top part of my pipe is 7 pixels tall, but the diagonal cross section is 7.08.  That's as close as I could get with a pixel grid, and without creating some very technical custom grid.  Because in the end, I'll need a grid to rotate and snap these pieces into the chain links.  Of course I'll scale everything bigger, when it's finished.

Thanks again for your input.  It gives me a fuller understanding  :)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

January 24, 2016, 11:47:59 AM
Reply #14

styxlawyer

  • Jr. Member

  • Offline
  • ***

  • 13
  • Gender
    Male

    Male
You're welcome. I look forward to seeing the finished drawing.

January 24, 2016, 05:58:16 PM
Reply #15

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
the inner curve doesn't have to follow any rule

That is right, if you draw the chain straight from scratch, the overall shape can have any form. If you don't want to overcomplicate the geometry the easiest way would be drawing with no fill but strokes.

However if you want to add curves to the existing chain you can only lay the center of the curve on the bisectrix and draw the inner and outer curves from concentric circles.

January 24, 2016, 08:45:24 PM
Reply #16

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Well.....the circles could be concentric.  After all, they are  just different size circles, and when the centers are aligned, they become concentric.  For the last hour, I've been trying to recreate the whole setup, using circles that are concentric from the start, and octagons but it's becoming so problematic, that I might just drop it.  I think the arcs I made are probably correct....or correct enough.

Problems
 -- need to create an axonomic grid to handle the octagons, to create the "concentric" octagons.
 -- can't use scaling to create the 3 different pieces, can only use inset, so need to calculate the correct sizes, because...
 -- dynamic inset handle won't snap  (although will be able to in next new version), so just making the major pieces will take a while
 -- and that's all on top of the original problems, which mostly have to do with using snapping and grids and guides and layers, and disable/enabling various snap options and/or hiding/unhiding grids, guides and layers to accomplish the snapping

Or maybe I'll have more patience on another future day...

But still, I appreciate all your attention and comments!  Likely I will pick it up on another day, because I am so curious.  But for now, I need to put aside and rest my brains :D
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

January 25, 2016, 03:02:31 PM
Reply #17

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Let's see :hmm:

Quote (selected)
need to create an axonomic grid to handle the octagons, to create the "concentric" octagons.

There is no need for any grids regardless axonometric or rectangular. You can use them but the process will only get more complicated. Why? As a visual guide it's off most of the time, distracting from any construction off the grid. Likely when drawing random chains.
Snapping is another problem it creates, wether to snap to grid intersection points or not -if not, why to display it even?
So drop it, I suggest.

Quote (selected)
can't use scaling to create the 3 different pieces, can only use inset, so need to calculate the correct sizes, because

Because of reasons. That is two different problems put into one.

How to draw a ring with a decent shading, and how actually create a chain pattern.
For the first, it was your choice to go filled paths with no strokes, while you could use stroked paths with no fills.
Complicated or not, you can use filtering to skip that kind of construction you try to do.

The latter, how to make the chains linked is where that late "handy tutorial" can come handy.

Quote (selected)
dynamic inset handle won't snap  (although will be able to in next new version), so just making the major pieces will take a while

The dynamic offset is quite problematic itself, the stroke to path option is currently more precise with the ability to set joins and use on open paths too. Another reason for using strokes and no fill (though I would construct it from filled paths personally  >-D)

Quote (selected)
-- and that's all on top of the original problems, which mostly have to do with using snapping and grids and guides and layers, and disable/enabling various snap options and/or hiding/unhiding grids, guides and layers to accomplish the snapping

Snapping: you need only a few options and hardly change them for such construction.
Snap to bounding box corners off, snap to smooth, cusp nodes on, snap to path intersection switch it on in some cases but most of the time it's not necessary. Snapping to path segments hardly ever. Snapping of bounding box centers can come handy times like this case though I have found it not always working  correctly.
Snap to guides-yes, snap to grid -no.

Layers: a huge NO. for a file less than 1 MB what would you hide to speed up the rendering?
They make things only more complicated. Probably people use it because they can't abandone raster editing routines.
 

Could go on and on how those you mention could be skipped.
Use spacer objects instead of grids if that's really necessary.

Quote (selected)
Or maybe I'll have more patience on another future day...


Or maybe I'll have more time to break down a few simple constructions to steps in some articles. 
(On a side note today's spam count went 33 at if because I wasn't there on and off all day. Took half an hour. That could mean a good article in a week's time.)

Quote (selected)
But still, I appreciate all your attention and comments!  Likely I will pick it up on another day, because I am so curious.  But for now, I need to put aside and rest my brains :D


That squiggle line tutorial needs to be written soon (though that I started writing on another hdd not working right.)

January 26, 2016, 09:07:51 AM
Reply #18

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Hhm, well my reply to most of those comments are that's just the way I use Inkscape, and accomplish various results.  While I suspect you may rely more on calculations away from the canvas, for precision, I rely heavily on snapping to grids and guides, for precision.  I think I also rely heavily on the geometry rules I remember from so long ago.

But I will pick it up again.  Maybe today, or maybe in a day or 2.

I don't think the op even cares anymore.  Or at least has lost interest for now.  But his question made me wonder if the same thing as my original chain could be made with blurring AND made me wonder if the blurred shading could be created in a "unit", before the units are assembled into the whole (rather than the units assembled, and blurred shading added to the whole).

Quote (selected)
How to draw a ring with a decent shading, and how actually create a chain pattern.

Hhmmm, there's another challenge.  My new links will have rounded corners, instead of sharp.  But it will still have straight sides (like a chain link fence).  But making that design where the current...rotated square, or diamond shaped ring is a circle instead....  That presents a whole different set of problems!  Maybe I'll try that next....although I'll make a new topic  ;)  Actually it might even be much easier with a circle.....

Oh yes, certainly the z-order trick will be needed.  That's why I'm making this original "unit".  But first, I have to create the original unit with all the right proportions.  (I've lost the original from long ago, that's why I'm re-creating it new.  Plus, I wanted to add curved corners.)

Quote (selected)
(On a side note today's spam count went 33 at if because I wasn't there on and off all day. Took half an hour. That could mean a good article in a week's time.)

Yes, I saw all that, and I'm sorry for the distraction it certainly injects into your work, every day.  However, you did volunteer   :fyi:

The bottom line for me, is that I'm powerless to change anything.  I was asked to stop moderating, and I'm not going to start again.  The only one with any power is you, but that's only because you have the ear of the admin.  I suspect it will take a threat by you to resign, before he will reinstate the first message moderation.  That's because no one is clicking the Report button.  You just delete and ban when you see spam.  If micro was getting reports for every spam, he would know how bad it is.  That's why I posted that message, urging people to report the spam.  But it was completely ignored!

What if you took a day off?  What if you took 2 days off?  What if you took a week off?  You think people will start reporting the spam then?  Everyone deserves a week's vacation now and then   0:)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

January 26, 2016, 11:25:29 AM
Reply #19

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
 :ot1: It was more of an invite. Because at the time I was the only one reporting spams and complaining a specific spammer posting twelve topcs in a row that could get avoided if the first report blocked the user.
Currently the notification is useless. Using the "show unread posts" instead, getting there to each spam posts, each spammer, choosing their name and ip adress separately, and after three unnecessary clarifications and closing three tabs, have to open each notification to make the new motification board clear.  :ot2:


With blurring you can create a semi-transparent shape, that can be a good input for a diffuse filter, then with fecomposite you can clip it to the object's bounds. Fairly simple filter to put together from scratch, though would need an understanding of the filter editor.

Personally I use alot of snapping and guides as well in some cases, there are some nice tricks to get used to.
« Last Edit: January 26, 2016, 12:15:04 PM by Lazur »